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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 PortAllocator* port_allocator() const { return port_allocator_; } | 57 PortAllocator* port_allocator() const { return port_allocator_; } |
58 | 58 |
59 // Can only be set before transports are created. | 59 // Can only be set before transports are created. |
60 // TODO(deadbeef): Make this an argument to the constructor once BaseSession | 60 // TODO(deadbeef): Make this an argument to the constructor once BaseSession |
61 // and WebRtcSession are combined | 61 // and WebRtcSession are combined |
62 bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version); | 62 bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version); |
63 | 63 |
64 void SetIceConfig(const IceConfig& config); | 64 void SetIceConfig(const IceConfig& config); |
65 void SetIceRole(IceRole ice_role); | 65 void SetIceRole(IceRole ice_role); |
66 | 66 |
| 67 // Set the "needs-ice-restart" flag as described in JSEP. |
| 68 void SetNeedsIceRestartFlag(); |
| 69 // Returns true if the ICE restart flag above was set, and no ICE restart has |
| 70 // occurred yet for |transport_name|. If the transport has been deleted as a |
| 71 // result of bundling, returns false. |
| 72 bool NeedsIceRestart(const std::string& transport_name) const; |
| 73 |
67 bool GetSslRole(const std::string& transport_name, rtc::SSLRole* role) const; | 74 bool GetSslRole(const std::string& transport_name, rtc::SSLRole* role) const; |
68 | 75 |
69 // Specifies the identity to use in this session. | 76 // Specifies the identity to use in this session. |
70 // Can only be called once. | 77 // Can only be called once. |
71 bool SetLocalCertificate( | 78 bool SetLocalCertificate( |
72 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); | 79 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); |
73 bool GetLocalCertificate( | 80 bool GetLocalCertificate( |
74 const std::string& transport_name, | 81 const std::string& transport_name, |
75 rtc::scoped_refptr<rtc::RTCCertificate>* certificate) const; | 82 rtc::scoped_refptr<rtc::RTCCertificate>* certificate) const; |
76 // Caller owns returned certificate. This method mainly exists for stats | 83 // Caller owns returned certificate. This method mainly exists for stats |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 }; | 203 }; |
197 | 204 |
198 // Helper functions to get a channel or transport, or iterator to it (in case | 205 // Helper functions to get a channel or transport, or iterator to it (in case |
199 // it needs to be erased). | 206 // it needs to be erased). |
200 std::vector<RefCountedChannel>::iterator GetChannelIterator_n( | 207 std::vector<RefCountedChannel>::iterator GetChannelIterator_n( |
201 const std::string& transport_name, | 208 const std::string& transport_name, |
202 int component); | 209 int component); |
203 std::vector<RefCountedChannel>::const_iterator GetChannelIterator_n( | 210 std::vector<RefCountedChannel>::const_iterator GetChannelIterator_n( |
204 const std::string& transport_name, | 211 const std::string& transport_name, |
205 int component) const; | 212 int component) const; |
206 const JsepTransport* GetJsepTransport_n( | 213 const JsepTransport* GetJsepTransport( |
207 const std::string& transport_name) const; | 214 const std::string& transport_name) const; |
208 JsepTransport* GetJsepTransport_n(const std::string& transport_name); | 215 JsepTransport* GetJsepTransport(const std::string& transport_name); |
209 const RefCountedChannel* GetChannel_n(const std::string& transport_name, | 216 const RefCountedChannel* GetChannel_n(const std::string& transport_name, |
210 int component) const; | 217 int component) const; |
211 RefCountedChannel* GetChannel_n(const std::string& transport_name, | 218 RefCountedChannel* GetChannel_n(const std::string& transport_name, |
212 int component); | 219 int component); |
213 | 220 |
214 JsepTransport* GetOrCreateJsepTransport_n(const std::string& transport_name); | 221 JsepTransport* GetOrCreateJsepTransport(const std::string& transport_name); |
215 void DestroyAllChannels_n(); | 222 void DestroyAllChannels_n(); |
216 | 223 |
217 bool SetSslMaxProtocolVersion_n(rtc::SSLProtocolVersion version); | 224 bool SetSslMaxProtocolVersion_n(rtc::SSLProtocolVersion version); |
218 void SetIceConfig_n(const IceConfig& config); | 225 void SetIceConfig_n(const IceConfig& config); |
219 void SetIceRole_n(IceRole ice_role); | 226 void SetIceRole_n(IceRole ice_role); |
220 bool GetSslRole_n(const std::string& transport_name, | 227 bool GetSslRole_n(const std::string& transport_name, |
221 rtc::SSLRole* role) const; | 228 rtc::SSLRole* role) const; |
222 bool SetLocalCertificate_n( | 229 bool SetLocalCertificate_n( |
223 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); | 230 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); |
224 bool GetLocalCertificate_n( | 231 bool GetLocalCertificate_n( |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 rtc::AsyncInvoker invoker_; | 287 rtc::AsyncInvoker invoker_; |
281 // True if QUIC is used instead of DTLS. | 288 // True if QUIC is used instead of DTLS. |
282 bool quic_ = false; | 289 bool quic_ = false; |
283 | 290 |
284 webrtc::MetricsObserverInterface* metrics_observer_ = nullptr; | 291 webrtc::MetricsObserverInterface* metrics_observer_ = nullptr; |
285 }; | 292 }; |
286 | 293 |
287 } // namespace cricket | 294 } // namespace cricket |
288 | 295 |
289 #endif // WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ | 296 #endif // WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ |
OLD | NEW |