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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // See http://dev.w3.org/2011/webrtc/editor/webrtc.html#state-definitions . | 145 // See http://dev.w3.org/2011/webrtc/editor/webrtc.html#state-definitions . |
146 enum SignalingState { | 146 enum SignalingState { |
147 kStable, | 147 kStable, |
148 kHaveLocalOffer, | 148 kHaveLocalOffer, |
149 kHaveLocalPrAnswer, | 149 kHaveLocalPrAnswer, |
150 kHaveRemoteOffer, | 150 kHaveRemoteOffer, |
151 kHaveRemotePrAnswer, | 151 kHaveRemotePrAnswer, |
152 kClosed, | 152 kClosed, |
153 }; | 153 }; |
154 | 154 |
| 155 // TODO(bemasc): Remove IceState when callers are changed to |
| 156 // IceConnection/GatheringState. |
| 157 enum IceState { |
| 158 kIceNew, |
| 159 kIceGathering, |
| 160 kIceWaiting, |
| 161 kIceChecking, |
| 162 kIceConnected, |
| 163 kIceCompleted, |
| 164 kIceFailed, |
| 165 kIceClosed, |
| 166 }; |
| 167 |
155 enum IceGatheringState { | 168 enum IceGatheringState { |
156 kIceGatheringNew, | 169 kIceGatheringNew, |
157 kIceGatheringGathering, | 170 kIceGatheringGathering, |
158 kIceGatheringComplete | 171 kIceGatheringComplete |
159 }; | 172 }; |
160 | 173 |
161 enum IceConnectionState { | 174 enum IceConnectionState { |
162 kIceConnectionNew, | 175 kIceConnectionNew, |
163 kIceConnectionChecking, | 176 kIceConnectionChecking, |
164 kIceConnectionConnected, | 177 kIceConnectionConnected, |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 // Removes a group of remote candidates from the ICE agent. | 515 // Removes a group of remote candidates from the ICE agent. |
503 virtual bool RemoveIceCandidates( | 516 virtual bool RemoveIceCandidates( |
504 const std::vector<cricket::Candidate>& candidates) { | 517 const std::vector<cricket::Candidate>& candidates) { |
505 return false; | 518 return false; |
506 } | 519 } |
507 | 520 |
508 virtual void RegisterUMAObserver(UMAObserver* observer) = 0; | 521 virtual void RegisterUMAObserver(UMAObserver* observer) = 0; |
509 | 522 |
510 // Returns the current SignalingState. | 523 // Returns the current SignalingState. |
511 virtual SignalingState signaling_state() = 0; | 524 virtual SignalingState signaling_state() = 0; |
| 525 |
| 526 // TODO(bemasc): Remove ice_state when callers are changed to |
| 527 // IceConnection/GatheringState. |
| 528 // Returns the current IceState. |
| 529 virtual IceState ice_state() { |
| 530 RTC_NOTREACHED(); |
| 531 return kIceNew; |
| 532 } |
512 virtual IceConnectionState ice_connection_state() = 0; | 533 virtual IceConnectionState ice_connection_state() = 0; |
513 virtual IceGatheringState ice_gathering_state() = 0; | 534 virtual IceGatheringState ice_gathering_state() = 0; |
514 | 535 |
515 // Starts RtcEventLog using existing file. Takes ownership of |file| and | 536 // Starts RtcEventLog using existing file. Takes ownership of |file| and |
516 // passes it on to Call, which will take the ownership. If the | 537 // passes it on to Call, which will take the ownership. If the |
517 // operation fails the file will be closed. The logging will stop | 538 // operation fails the file will be closed. The logging will stop |
518 // automatically after 10 minutes have passed, or when the StopRtcEventLog | 539 // automatically after 10 minutes have passed, or when the StopRtcEventLog |
519 // function is called. | 540 // function is called. |
520 // TODO(ivoc): Make this pure virtual when Chrome is updated. | 541 // TODO(ivoc): Make this pure virtual when Chrome is updated. |
521 virtual bool StartRtcEventLog(rtc::PlatformFile file, | 542 virtual bool StartRtcEventLog(rtc::PlatformFile file, |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 778 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
758 cricket::WebRtcVideoDecoderFactory* decoder_factory) { | 779 cricket::WebRtcVideoDecoderFactory* decoder_factory) { |
759 return CreatePeerConnectionFactory( | 780 return CreatePeerConnectionFactory( |
760 worker_and_network_thread, worker_and_network_thread, signaling_thread, | 781 worker_and_network_thread, worker_and_network_thread, signaling_thread, |
761 default_adm, encoder_factory, decoder_factory); | 782 default_adm, encoder_factory, decoder_factory); |
762 } | 783 } |
763 | 784 |
764 } // namespace webrtc | 785 } // namespace webrtc |
765 | 786 |
766 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ | 787 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ |
OLD | NEW |