| 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 30 matching lines...) Expand all Loading... |
| 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 | 47 |
| 48 void SetIceConfig(const IceConfig& config); | 48 void SetIceConfig(const IceConfig& config); |
| 49 void SetIceRole(IceRole ice_role); | 49 void SetIceRole(IceRole ice_role); |
| 50 | 50 |
| 51 // TODO(deadbeef) - Return role of each transport, as role may differ from | 51 bool GetSslRole(const std::string& transport_name, rtc::SSLRole* role); |
| 52 // one another. | |
| 53 // In current implementaion we just return the role of the first transport | |
| 54 // alphabetically. | |
| 55 bool GetSslRole(rtc::SSLRole* role); | |
| 56 | 52 |
| 57 // Specifies the identity to use in this session. | 53 // Specifies the identity to use in this session. |
| 58 // Can only be called once. | 54 // Can only be called once. |
| 59 bool SetLocalCertificate( | 55 bool SetLocalCertificate( |
| 60 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); | 56 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); |
| 61 bool GetLocalCertificate( | 57 bool GetLocalCertificate( |
| 62 const std::string& transport_name, | 58 const std::string& transport_name, |
| 63 rtc::scoped_refptr<rtc::RTCCertificate>* certificate); | 59 rtc::scoped_refptr<rtc::RTCCertificate>* certificate); |
| 64 // Caller owns returned certificate | 60 // Caller owns returned certificate |
| 65 bool GetRemoteSSLCertificate(const std::string& transport_name, | 61 bool GetRemoteSSLCertificate(const std::string& transport_name, |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 const std::string& transport_name, | 149 const std::string& transport_name, |
| 154 int component); | 150 int component); |
| 155 | 151 |
| 156 Transport* GetOrCreateTransport_w(const std::string& transport_name); | 152 Transport* GetOrCreateTransport_w(const std::string& transport_name); |
| 157 void DestroyTransport_w(const std::string& transport_name); | 153 void DestroyTransport_w(const std::string& transport_name); |
| 158 void DestroyAllTransports_w(); | 154 void DestroyAllTransports_w(); |
| 159 | 155 |
| 160 bool SetSslMaxProtocolVersion_w(rtc::SSLProtocolVersion version); | 156 bool SetSslMaxProtocolVersion_w(rtc::SSLProtocolVersion version); |
| 161 void SetIceConfig_w(const IceConfig& config); | 157 void SetIceConfig_w(const IceConfig& config); |
| 162 void SetIceRole_w(IceRole ice_role); | 158 void SetIceRole_w(IceRole ice_role); |
| 163 bool GetSslRole_w(rtc::SSLRole* role); | 159 bool GetSslRole_w(const std::string& transport_name, rtc::SSLRole* role); |
| 164 bool SetLocalCertificate_w( | 160 bool SetLocalCertificate_w( |
| 165 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); | 161 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); |
| 166 bool GetLocalCertificate_w( | 162 bool GetLocalCertificate_w( |
| 167 const std::string& transport_name, | 163 const std::string& transport_name, |
| 168 rtc::scoped_refptr<rtc::RTCCertificate>* certificate); | 164 rtc::scoped_refptr<rtc::RTCCertificate>* certificate); |
| 169 bool GetRemoteSSLCertificate_w(const std::string& transport_name, | 165 bool GetRemoteSSLCertificate_w(const std::string& transport_name, |
| 170 rtc::SSLCertificate** cert); | 166 rtc::SSLCertificate** cert); |
| 171 bool SetLocalTransportDescription_w(const std::string& transport_name, | 167 bool SetLocalTransportDescription_w(const std::string& transport_name, |
| 172 const TransportDescription& tdesc, | 168 const TransportDescription& tdesc, |
| 173 ContentAction action, | 169 ContentAction action, |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 IceRole ice_role_ = ICEROLE_CONTROLLING; | 210 IceRole ice_role_ = ICEROLE_CONTROLLING; |
| 215 // Flag which will be set to true after the first role switch | 211 // Flag which will be set to true after the first role switch |
| 216 bool ice_role_switch_ = false; | 212 bool ice_role_switch_ = false; |
| 217 uint64_t ice_tiebreaker_ = rtc::CreateRandomId64(); | 213 uint64_t ice_tiebreaker_ = rtc::CreateRandomId64(); |
| 218 rtc::scoped_refptr<rtc::RTCCertificate> certificate_; | 214 rtc::scoped_refptr<rtc::RTCCertificate> certificate_; |
| 219 }; | 215 }; |
| 220 | 216 |
| 221 } // namespace cricket | 217 } // namespace cricket |
| 222 | 218 |
| 223 #endif // WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ | 219 #endif // WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ |
| OLD | NEW |