| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 STATE_CLOSED, // Close() was called. | 131 STATE_CLOSED, // Close() was called. |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 enum Error { | 134 enum Error { |
| 135 ERROR_NONE = 0, // no error | 135 ERROR_NONE = 0, // no error |
| 136 ERROR_CONTENT = 1, // channel errors in SetLocalContent/SetRemoteContent | 136 ERROR_CONTENT = 1, // channel errors in SetLocalContent/SetRemoteContent |
| 137 ERROR_TRANSPORT = 2, // transport error of some kind | 137 ERROR_TRANSPORT = 2, // transport error of some kind |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 WebRtcSession(webrtc::MediaControllerInterface* media_controller, | 140 WebRtcSession(webrtc::MediaControllerInterface* media_controller, |
| 141 rtc::Thread* network_thread, |
| 142 rtc::Thread* worker_thread, |
| 141 rtc::Thread* signaling_thread, | 143 rtc::Thread* signaling_thread, |
| 142 rtc::Thread* worker_thread, | |
| 143 cricket::PortAllocator* port_allocator); | 144 cricket::PortAllocator* port_allocator); |
| 144 virtual ~WebRtcSession(); | 145 virtual ~WebRtcSession(); |
| 145 | 146 |
| 146 // These are const to allow them to be called from const methods. | 147 // These are const to allow them to be called from const methods. |
| 148 rtc::Thread* worker_thread() const { return worker_thread_; } |
| 147 rtc::Thread* signaling_thread() const { return signaling_thread_; } | 149 rtc::Thread* signaling_thread() const { return signaling_thread_; } |
| 148 rtc::Thread* worker_thread() const { return worker_thread_; } | |
| 149 | 150 |
| 150 // The ID of this session. | 151 // The ID of this session. |
| 151 const std::string& id() const { return sid_; } | 152 const std::string& id() const { return sid_; } |
| 152 | 153 |
| 153 bool Initialize( | 154 bool Initialize( |
| 154 const PeerConnectionFactoryInterface::Options& options, | 155 const PeerConnectionFactoryInterface::Options& options, |
| 155 std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | 156 std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
| 156 const PeerConnectionInterface::RTCConfiguration& rtc_configuration); | 157 const PeerConnectionInterface::RTCConfiguration& rtc_configuration); |
| 157 // Deletes the voice, video and data channel and changes the session state | 158 // Deletes the voice, video and data channel and changes the session state |
| 158 // to STATE_CLOSED. | 159 // to STATE_CLOSED. |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 // Reports stats for all transports in use. | 458 // Reports stats for all transports in use. |
| 458 void ReportTransportStats(); | 459 void ReportTransportStats(); |
| 459 | 460 |
| 460 // Gather the usage of IPv4/IPv6 as best connection. | 461 // Gather the usage of IPv4/IPv6 as best connection. |
| 461 void ReportBestConnectionState(const cricket::TransportStats& stats); | 462 void ReportBestConnectionState(const cricket::TransportStats& stats); |
| 462 | 463 |
| 463 void ReportNegotiatedCiphers(const cricket::TransportStats& stats); | 464 void ReportNegotiatedCiphers(const cricket::TransportStats& stats); |
| 464 | 465 |
| 465 void OnSentPacket_w(const rtc::SentPacket& sent_packet); | 466 void OnSentPacket_w(const rtc::SentPacket& sent_packet); |
| 466 | 467 |
| 468 rtc::Thread* const worker_thread_; |
| 467 rtc::Thread* const signaling_thread_; | 469 rtc::Thread* const signaling_thread_; |
| 468 rtc::Thread* const worker_thread_; | |
| 469 | 470 |
| 470 State state_ = STATE_INIT; | 471 State state_ = STATE_INIT; |
| 471 Error error_ = ERROR_NONE; | 472 Error error_ = ERROR_NONE; |
| 472 std::string error_desc_; | 473 std::string error_desc_; |
| 473 | 474 |
| 474 const std::string sid_; | 475 const std::string sid_; |
| 475 bool initial_offerer_ = false; | 476 bool initial_offerer_ = false; |
| 476 | 477 |
| 477 std::unique_ptr<cricket::TransportController> transport_controller_; | 478 std::unique_ptr<cricket::TransportController> transport_controller_; |
| 478 MediaControllerInterface* media_controller_; | 479 MediaControllerInterface* media_controller_; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 PeerConnectionInterface::BundlePolicy bundle_policy_; | 511 PeerConnectionInterface::BundlePolicy bundle_policy_; |
| 511 | 512 |
| 512 // Declares the RTCP mux policy for the WebRTCSession. | 513 // Declares the RTCP mux policy for the WebRTCSession. |
| 513 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_; | 514 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_; |
| 514 | 515 |
| 515 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession); | 516 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession); |
| 516 }; | 517 }; |
| 517 } // namespace webrtc | 518 } // namespace webrtc |
| 518 | 519 |
| 519 #endif // WEBRTC_API_WEBRTCSESSION_H_ | 520 #endif // WEBRTC_API_WEBRTCSESSION_H_ |
| OLD | NEW |