OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // Returns the current stats for this connection. | 101 // Returns the current stats for this connection. |
102 virtual bool GetStats(ConnectionInfos* infos) = 0; | 102 virtual bool GetStats(ConnectionInfos* infos) = 0; |
103 | 103 |
104 // Is DTLS active? | 104 // Is DTLS active? |
105 virtual bool IsDtlsActive() const = 0; | 105 virtual bool IsDtlsActive() const = 0; |
106 | 106 |
107 // Default implementation. | 107 // Default implementation. |
108 virtual bool GetSslRole(rtc::SSLRole* role) const = 0; | 108 virtual bool GetSslRole(rtc::SSLRole* role) const = 0; |
109 | 109 |
110 // Sets up the ciphers to use for DTLS-SRTP. | 110 // Sets up the ciphers to use for DTLS-SRTP. |
111 virtual bool SetSrtpCiphers(const std::vector<std::string>& ciphers) = 0; | 111 virtual bool SetSrtpCryptoSuites(const std::vector<int>& ciphers) = 0; |
| 112 // Keep the original one for backward compatibility until all dependencies |
| 113 // move away. TODO(guoweis): Remove this function. |
| 114 virtual bool SetSrtpCiphers(const std::vector<std::string>& ciphers); |
112 | 115 |
113 // Finds out which DTLS-SRTP cipher was negotiated. | 116 // Finds out which DTLS-SRTP cipher was negotiated. |
114 // TODO(guoweis): Remove this once all dependencies implement this. | 117 // TODO(guoweis): Remove this once all dependencies implement this. |
115 virtual bool GetSrtpCryptoSuite(std::string* cipher) { | 118 virtual bool GetSrtpCryptoSuite(int* cipher) { return false; } |
116 return false; | |
117 } | |
118 | 119 |
119 // Finds out which DTLS cipher was negotiated. | 120 // Finds out which DTLS cipher was negotiated. |
120 // TODO(guoweis): Remove this once all dependencies implement this. | 121 // TODO(guoweis): Remove this once all dependencies implement this. |
121 virtual bool GetSslCipherSuite(int* cipher) { return false; } | 122 virtual bool GetSslCipherSuite(int* cipher) { return false; } |
122 | 123 |
123 // Gets the local RTCCertificate used for DTLS. | 124 // Gets the local RTCCertificate used for DTLS. |
124 virtual rtc::scoped_refptr<rtc::RTCCertificate> | 125 virtual rtc::scoped_refptr<rtc::RTCCertificate> |
125 GetLocalCertificate() const = 0; | 126 GetLocalCertificate() const = 0; |
126 | 127 |
127 // Gets a copy of the remote side's SSL certificate, owned by the caller. | 128 // Gets a copy of the remote side's SSL certificate, owned by the caller. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 bool writable_; | 174 bool writable_; |
174 bool receiving_; | 175 bool receiving_; |
175 DtlsTransportState dtls_state_ = DTLS_TRANSPORT_NEW; | 176 DtlsTransportState dtls_state_ = DTLS_TRANSPORT_NEW; |
176 | 177 |
177 RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannel); | 178 RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannel); |
178 }; | 179 }; |
179 | 180 |
180 } // namespace cricket | 181 } // namespace cricket |
181 | 182 |
182 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_ | 183 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_ |
OLD | NEW |