| 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 SetSrtpCryptoSuites(const std::vector<int>& ciphers) = 0; | 111 virtual bool SetSrtpCiphers(const std::vector<std::string>& 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); | |
| 115 | 112 |
| 116 // Finds out which DTLS-SRTP cipher was negotiated. | 113 // Finds out which DTLS-SRTP cipher was negotiated. |
| 117 // TODO(guoweis): Remove this once all dependencies implement this. | 114 // TODO(guoweis): Remove this once all dependencies implement this. |
| 118 virtual bool GetSrtpCryptoSuite(int* cipher) { return false; } | 115 virtual bool GetSrtpCryptoSuite(std::string* cipher) { |
| 116 return false; |
| 117 } |
| 119 | 118 |
| 120 // Finds out which DTLS cipher was negotiated. | 119 // Finds out which DTLS cipher was negotiated. |
| 121 // TODO(guoweis): Remove this once all dependencies implement this. | 120 // TODO(guoweis): Remove this once all dependencies implement this. |
| 122 virtual bool GetSslCipherSuite(int* cipher) { return false; } | 121 virtual bool GetSslCipherSuite(int* cipher) { return false; } |
| 123 | 122 |
| 124 // Gets the local RTCCertificate used for DTLS. | 123 // Gets the local RTCCertificate used for DTLS. |
| 125 virtual rtc::scoped_refptr<rtc::RTCCertificate> | 124 virtual rtc::scoped_refptr<rtc::RTCCertificate> |
| 126 GetLocalCertificate() const = 0; | 125 GetLocalCertificate() const = 0; |
| 127 | 126 |
| 128 // Gets a copy of the remote side's SSL certificate, owned by the caller. | 127 // Gets a copy of the remote side's SSL certificate, owned by the caller. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 bool writable_; | 170 bool writable_; |
| 172 bool receiving_; | 171 bool receiving_; |
| 173 DtlsTransportState dtls_state_ = DTLS_TRANSPORT_NEW; | 172 DtlsTransportState dtls_state_ = DTLS_TRANSPORT_NEW; |
| 174 | 173 |
| 175 RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannel); | 174 RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannel); |
| 176 }; | 175 }; |
| 177 | 176 |
| 178 } // namespace cricket | 177 } // namespace cricket |
| 179 | 178 |
| 180 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_ | 179 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_ |
| OLD | NEW |