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 270 matching lines...) Loading... |
281 bool SetLocalTransportDescription(const TransportDescription& description, | 281 bool SetLocalTransportDescription(const TransportDescription& description, |
282 ContentAction action, | 282 ContentAction action, |
283 std::string* error_desc); | 283 std::string* error_desc); |
284 | 284 |
285 // Set the remote TransportDescription to be used by DTLS and ICE channels | 285 // Set the remote TransportDescription to be used by DTLS and ICE channels |
286 // that are part of this Transport. | 286 // that are part of this Transport. |
287 bool SetRemoteTransportDescription(const TransportDescription& description, | 287 bool SetRemoteTransportDescription(const TransportDescription& description, |
288 ContentAction action, | 288 ContentAction action, |
289 std::string* error_desc); | 289 std::string* error_desc); |
290 | 290 |
| 291 // Set the "needs-ice-restart" flag as described in JSEP. After the flag is |
| 292 // set, offers should generate new ufrags/passwords until an ICE restart |
| 293 // occurs. |
| 294 // |
| 295 // This and the below method can be called safely from any thread as long as |
| 296 // SetXTransportDescription is not in progress. |
| 297 void SetNeedsIceRestartFlag(); |
| 298 // Returns true if the ICE restart flag above was set, and no ICE restart has |
| 299 // occurred yet for this transport (by applying a local description with |
| 300 // changed ufrag/password). |
| 301 bool NeedsIceRestart() const; |
| 302 |
291 void GetSslRole(rtc::SSLRole* ssl_role) const; | 303 void GetSslRole(rtc::SSLRole* ssl_role) const; |
292 | 304 |
293 // TODO(deadbeef): Make this const. See comment in transportcontroller.h. | 305 // TODO(deadbeef): Make this const. See comment in transportcontroller.h. |
294 bool GetStats(TransportStats* stats); | 306 bool GetStats(TransportStats* stats); |
295 | 307 |
296 // The current local transport description, possibly used | 308 // The current local transport description, possibly used |
297 // by the transport controller. | 309 // by the transport controller. |
298 const TransportDescription* local_description() const { | 310 const TransportDescription* local_description() const { |
299 return local_description_.get(); | 311 return local_description_.get(); |
300 } | 312 } |
(...skipping 40 matching lines...) Loading... |
341 // Pushes down the transport parameters from the remote description to the | 353 // Pushes down the transport parameters from the remote description to the |
342 // transport channel. | 354 // transport channel. |
343 bool ApplyRemoteTransportDescription(TransportChannelImpl* channel, | 355 bool ApplyRemoteTransportDescription(TransportChannelImpl* channel, |
344 std::string* error_desc); | 356 std::string* error_desc); |
345 | 357 |
346 // Pushes down the transport parameters obtained via negotiation. | 358 // Pushes down the transport parameters obtained via negotiation. |
347 bool ApplyNegotiatedTransportDescription(TransportChannelImpl* channel, | 359 bool ApplyNegotiatedTransportDescription(TransportChannelImpl* channel, |
348 std::string* error_desc); | 360 std::string* error_desc); |
349 | 361 |
350 const std::string mid_; | 362 const std::string mid_; |
| 363 // needs-ice-restart bit as described in JSEP. |
| 364 bool needs_ice_restart_ = false; |
351 rtc::scoped_refptr<rtc::RTCCertificate> certificate_; | 365 rtc::scoped_refptr<rtc::RTCCertificate> certificate_; |
352 rtc::SSLRole secure_role_ = rtc::SSL_CLIENT; | 366 rtc::SSLRole secure_role_ = rtc::SSL_CLIENT; |
353 std::unique_ptr<rtc::SSLFingerprint> remote_fingerprint_; | 367 std::unique_ptr<rtc::SSLFingerprint> remote_fingerprint_; |
354 std::unique_ptr<TransportDescription> local_description_; | 368 std::unique_ptr<TransportDescription> local_description_; |
355 std::unique_ptr<TransportDescription> remote_description_; | 369 std::unique_ptr<TransportDescription> remote_description_; |
356 bool local_description_set_ = false; | 370 bool local_description_set_ = false; |
357 bool remote_description_set_ = false; | 371 bool remote_description_set_ = false; |
358 | 372 |
359 // Candidate component => DTLS channel | 373 // Candidate component => DTLS channel |
360 std::map<int, TransportChannelImpl*> channels_; | 374 std::map<int, TransportChannelImpl*> channels_; |
361 | 375 |
362 RTC_DISALLOW_COPY_AND_ASSIGN(JsepTransport); | 376 RTC_DISALLOW_COPY_AND_ASSIGN(JsepTransport); |
363 }; | 377 }; |
364 | 378 |
365 } // namespace cricket | 379 } // namespace cricket |
366 | 380 |
367 #endif // WEBRTC_P2P_BASE_JSEPTRANSPORT_H_ | 381 #endif // WEBRTC_P2P_BASE_JSEPTRANSPORT_H_ |
OLD | NEW |