| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2015 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 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 rtc::Thread* signaling_thread() const { return signaling_thread_; } | 38 rtc::Thread* signaling_thread() const { return signaling_thread_; } |
| 39 rtc::Thread* worker_thread() const { return worker_thread_; } | 39 rtc::Thread* worker_thread() const { return worker_thread_; } |
| 40 | 40 |
| 41 PortAllocator* port_allocator() const { return port_allocator_; } | 41 PortAllocator* port_allocator() const { return port_allocator_; } |
| 42 | 42 |
| 43 // Can only be set before transports are created. | 43 // Can only be set before transports are created. |
| 44 // TODO(deadbeef): Make this an argument to the constructor once BaseSession | 44 // TODO(deadbeef): Make this an argument to the constructor once BaseSession |
| 45 // and WebRtcSession are combined | 45 // and WebRtcSession are combined |
| 46 bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version); | 46 bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version); |
| 47 bool SetEnableGcmCiphers(bool enable); |
| 47 | 48 |
| 48 void SetIceConfig(const IceConfig& config); | 49 void SetIceConfig(const IceConfig& config); |
| 49 void SetIceRole(IceRole ice_role); | 50 void SetIceRole(IceRole ice_role); |
| 50 | 51 |
| 51 // TODO(deadbeef) - Return role of each transport, as role may differ from | 52 // TODO(deadbeef) - Return role of each transport, as role may differ from |
| 52 // one another. | 53 // one another. |
| 53 // In current implementaion we just return the role of the first transport | 54 // In current implementaion we just return the role of the first transport |
| 54 // alphabetically. | 55 // alphabetically. |
| 55 bool GetSslRole(rtc::SSLRole* role); | 56 bool GetSslRole(rtc::SSLRole* role); |
| 56 | 57 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 152 |
| 152 std::vector<RefCountedChannel>::iterator FindChannel_w( | 153 std::vector<RefCountedChannel>::iterator FindChannel_w( |
| 153 const std::string& transport_name, | 154 const std::string& transport_name, |
| 154 int component); | 155 int component); |
| 155 | 156 |
| 156 Transport* GetOrCreateTransport_w(const std::string& transport_name); | 157 Transport* GetOrCreateTransport_w(const std::string& transport_name); |
| 157 void DestroyTransport_w(const std::string& transport_name); | 158 void DestroyTransport_w(const std::string& transport_name); |
| 158 void DestroyAllTransports_w(); | 159 void DestroyAllTransports_w(); |
| 159 | 160 |
| 160 bool SetSslMaxProtocolVersion_w(rtc::SSLProtocolVersion version); | 161 bool SetSslMaxProtocolVersion_w(rtc::SSLProtocolVersion version); |
| 162 bool SetEnableGcmCiphers_w(bool enable); |
| 161 void SetIceConfig_w(const IceConfig& config); | 163 void SetIceConfig_w(const IceConfig& config); |
| 162 void SetIceRole_w(IceRole ice_role); | 164 void SetIceRole_w(IceRole ice_role); |
| 163 bool GetSslRole_w(rtc::SSLRole* role); | 165 bool GetSslRole_w(rtc::SSLRole* role); |
| 164 bool SetLocalCertificate_w( | 166 bool SetLocalCertificate_w( |
| 165 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); | 167 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); |
| 166 bool GetLocalCertificate_w( | 168 bool GetLocalCertificate_w( |
| 167 const std::string& transport_name, | 169 const std::string& transport_name, |
| 168 rtc::scoped_refptr<rtc::RTCCertificate>* certificate); | 170 rtc::scoped_refptr<rtc::RTCCertificate>* certificate); |
| 169 bool GetRemoteSSLCertificate_w(const std::string& transport_name, | 171 bool GetRemoteSSLCertificate_w(const std::string& transport_name, |
| 170 rtc::SSLCertificate** cert); | 172 rtc::SSLCertificate** cert); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 196 | 198 |
| 197 rtc::Thread* const signaling_thread_ = nullptr; | 199 rtc::Thread* const signaling_thread_ = nullptr; |
| 198 rtc::Thread* const worker_thread_ = nullptr; | 200 rtc::Thread* const worker_thread_ = nullptr; |
| 199 typedef std::map<std::string, Transport*> TransportMap; | 201 typedef std::map<std::string, Transport*> TransportMap; |
| 200 TransportMap transports_; | 202 TransportMap transports_; |
| 201 | 203 |
| 202 std::vector<RefCountedChannel> channels_; | 204 std::vector<RefCountedChannel> channels_; |
| 203 | 205 |
| 204 PortAllocator* const port_allocator_ = nullptr; | 206 PortAllocator* const port_allocator_ = nullptr; |
| 205 rtc::SSLProtocolVersion ssl_max_version_ = rtc::SSL_PROTOCOL_DTLS_10; | 207 rtc::SSLProtocolVersion ssl_max_version_ = rtc::SSL_PROTOCOL_DTLS_10; |
| 208 bool enable_gcm_ciphers_ = false; |
| 206 | 209 |
| 207 // Aggregate state for TransportChannelImpls. | 210 // Aggregate state for TransportChannelImpls. |
| 208 IceConnectionState connection_state_ = kIceConnectionConnecting; | 211 IceConnectionState connection_state_ = kIceConnectionConnecting; |
| 209 bool receiving_ = false; | 212 bool receiving_ = false; |
| 210 IceGatheringState gathering_state_ = kIceGatheringNew; | 213 IceGatheringState gathering_state_ = kIceGatheringNew; |
| 211 | 214 |
| 212 // TODO(deadbeef): Move the fields below down to the transports themselves | 215 // TODO(deadbeef): Move the fields below down to the transports themselves |
| 213 IceConfig ice_config_; | 216 IceConfig ice_config_; |
| 214 IceRole ice_role_ = ICEROLE_CONTROLLING; | 217 IceRole ice_role_ = ICEROLE_CONTROLLING; |
| 215 // Flag which will be set to true after the first role switch | 218 // Flag which will be set to true after the first role switch |
| 216 bool ice_role_switch_ = false; | 219 bool ice_role_switch_ = false; |
| 217 uint64_t ice_tiebreaker_ = rtc::CreateRandomId64(); | 220 uint64_t ice_tiebreaker_ = rtc::CreateRandomId64(); |
| 218 rtc::scoped_refptr<rtc::RTCCertificate> certificate_; | 221 rtc::scoped_refptr<rtc::RTCCertificate> certificate_; |
| 219 }; | 222 }; |
| 220 | 223 |
| 221 } // namespace cricket | 224 } // namespace cricket |
| 222 | 225 |
| 223 #endif // WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ | 226 #endif // WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ |
| OLD | NEW |