Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(644)

Side by Side Diff: webrtc/p2p/base/transportchannel.h

Issue 1458023002: Reland Convert internal representation of Srtp cryptos from string to int (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/p2p/base/transport.cc ('k') | webrtc/p2p/base/transportchannel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
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. TODO(guoweis): Make this pure
111 virtual bool SetSrtpCiphers(const std::vector<std::string>& ciphers) = 0; 111 // virtual once all dependencies have implementation.
112 virtual bool SetSrtpCryptoSuites(const std::vector<int>& ciphers);
113
114 // Keep the original one for backward compatibility until all dependencies
115 // move away. TODO(guoweis): Remove this function.
116 virtual bool SetSrtpCiphers(const std::vector<std::string>& ciphers);
112 117
113 // Finds out which DTLS-SRTP cipher was negotiated. 118 // Finds out which DTLS-SRTP cipher was negotiated.
114 // TODO(guoweis): Remove this once all dependencies implement this. 119 // TODO(guoweis): Remove this once all dependencies implement this.
115 virtual bool GetSrtpCryptoSuite(std::string* cipher) { 120 virtual bool GetSrtpCryptoSuite(int* cipher) { return false; }
116 return false;
117 }
118 121
119 // Finds out which DTLS cipher was negotiated. 122 // Finds out which DTLS cipher was negotiated.
120 // TODO(guoweis): Remove this once all dependencies implement this. 123 // TODO(guoweis): Remove this once all dependencies implement this.
121 virtual bool GetSslCipherSuite(int* cipher) { return false; } 124 virtual bool GetSslCipherSuite(int* cipher) { return false; }
122 125
123 // Gets the local RTCCertificate used for DTLS. 126 // Gets the local RTCCertificate used for DTLS.
124 virtual rtc::scoped_refptr<rtc::RTCCertificate> 127 virtual rtc::scoped_refptr<rtc::RTCCertificate>
125 GetLocalCertificate() const = 0; 128 GetLocalCertificate() const = 0;
126 129
127 // Gets a copy of the remote side's SSL certificate, owned by the caller. 130 // 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
170 bool writable_; 173 bool writable_;
171 bool receiving_; 174 bool receiving_;
172 DtlsTransportState dtls_state_ = DTLS_TRANSPORT_NEW; 175 DtlsTransportState dtls_state_ = DTLS_TRANSPORT_NEW;
173 176
174 RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannel); 177 RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannel);
175 }; 178 };
176 179
177 } // namespace cricket 180 } // namespace cricket
178 181
179 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_ 182 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/transport.cc ('k') | webrtc/p2p/base/transportchannel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698