| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 |
| 11 | #ifndef PC_MEDIA_PROTOCOL_NAMES_H_ |
| 12 | #define PC_MEDIA_PROTOCOL_NAMES_H_ |
| 13 |
| 14 | #include "absl/strings/string_view.h" |
| 15 |
| 16 | namespace cricket { |
| 17 |
| 18 | // Names or name prefixes of protocols as defined by SDP specifications, |
| 19 | // and generated in SDP produced by WebRTC. |
| 20 | extern const char kMediaProtocolSctp[]; |
| 21 | extern const char kMediaProtocolUdpDtlsSctp[]; |
| 22 | extern const char kMediaProtocolDtlsSavpf[]; |
| 23 | extern const char kMediaProtocolSavpf[]; |
| 24 | extern const char kMediaProtocolAvpf[]; |
| 25 |
| 26 | // Exported for testing only |
| 27 | extern const char kMediaProtocolTcpDtlsSctp[]; |
| 28 | extern const char kMediaProtocolDtlsSctp[]; |
| 29 |
| 30 | // Returns true if the given media section protocol indicates use of RTP. |
| 31 | bool IsRtpProtocol(absl::string_view protocol); |
| 32 | // Returns true if the given media section protocol indicates use of SCTP. |
| 33 | bool IsSctpProtocol(absl::string_view protocol); |
| 34 |
| 35 | // Returns true if the given media protocol is unencrypted SCTP |
| 36 | bool IsPlainSctp(absl::string_view protocol); |
| 37 | // Returns true if the given media protocol is encrypted SCTP |
| 38 | bool IsDtlsSctp(absl::string_view protocol); |
| 39 |
| 40 | // Returns true if the given media protocol is unencrypted RTP |
| 41 | bool IsPlainRtp(absl::string_view protocol); |
| 42 | // Returns true if the given media protocol is encrypted RTP |
| 43 | bool IsDtlsRtp(absl::string_view protocol); |
| 44 |
| 45 | } // namespace cricket |
| 46 |
| 47 | #endif // PC_MEDIA_PROTOCOL_NAMES_H_ |
| 48 |