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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 return false; | 432 return false; |
433 } | 433 } |
434 // Provides a remote candidate to the ICE Agent. | 434 // Provides a remote candidate to the ICE Agent. |
435 // A copy of the |candidate| will be created and added to the remote | 435 // A copy of the |candidate| will be created and added to the remote |
436 // description. So the caller of this method still has the ownership of the | 436 // description. So the caller of this method still has the ownership of the |
437 // |candidate|. | 437 // |candidate|. |
438 // TODO(ronghuawu): Consider to change this so that the AddIceCandidate will | 438 // TODO(ronghuawu): Consider to change this so that the AddIceCandidate will |
439 // take the ownership of the |candidate|. | 439 // take the ownership of the |candidate|. |
440 virtual bool AddIceCandidate(const IceCandidateInterface* candidate) = 0; | 440 virtual bool AddIceCandidate(const IceCandidateInterface* candidate) = 0; |
441 | 441 |
| 442 // Removes a group of remote candidates from the ICE agent. |
| 443 virtual bool RemoveIceCandidates( |
| 444 const std::vector<cricket::Candidate>& candidates) { |
| 445 return false; |
| 446 } |
| 447 |
442 virtual void RegisterUMAObserver(UMAObserver* observer) = 0; | 448 virtual void RegisterUMAObserver(UMAObserver* observer) = 0; |
443 | 449 |
444 // Returns the current SignalingState. | 450 // Returns the current SignalingState. |
445 virtual SignalingState signaling_state() = 0; | 451 virtual SignalingState signaling_state() = 0; |
446 | 452 |
447 // TODO(bemasc): Remove ice_state when callers are changed to | 453 // TODO(bemasc): Remove ice_state when callers are changed to |
448 // IceConnection/GatheringState. | 454 // IceConnection/GatheringState. |
449 // Returns the current IceState. | 455 // Returns the current IceState. |
450 virtual IceState ice_state() = 0; | 456 virtual IceState ice_state() = 0; |
451 virtual IceConnectionState ice_connection_state() = 0; | 457 virtual IceConnectionState ice_connection_state() = 0; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 virtual void OnIceConnectionChange( | 494 virtual void OnIceConnectionChange( |
489 PeerConnectionInterface::IceConnectionState new_state) = 0; | 495 PeerConnectionInterface::IceConnectionState new_state) = 0; |
490 | 496 |
491 // Called any time the IceGatheringState changes | 497 // Called any time the IceGatheringState changes |
492 virtual void OnIceGatheringChange( | 498 virtual void OnIceGatheringChange( |
493 PeerConnectionInterface::IceGatheringState new_state) = 0; | 499 PeerConnectionInterface::IceGatheringState new_state) = 0; |
494 | 500 |
495 // New Ice candidate have been found. | 501 // New Ice candidate have been found. |
496 virtual void OnIceCandidate(const IceCandidateInterface* candidate) = 0; | 502 virtual void OnIceCandidate(const IceCandidateInterface* candidate) = 0; |
497 | 503 |
| 504 // Ice candidates have been removed. |
| 505 // TODO(honghaiz): Make this a pure virtual method when all its subclasses |
| 506 // implement it. |
| 507 virtual void OnIceCandidatesRemoved( |
| 508 const std::vector<cricket::Candidate>& candidates) {} |
| 509 |
498 // Called when the ICE connection receiving status changes. | 510 // Called when the ICE connection receiving status changes. |
499 virtual void OnIceConnectionReceivingChange(bool receiving) {} | 511 virtual void OnIceConnectionReceivingChange(bool receiving) {} |
500 | 512 |
501 protected: | 513 protected: |
502 // Dtor protected as objects shouldn't be deleted via this interface. | 514 // Dtor protected as objects shouldn't be deleted via this interface. |
503 ~PeerConnectionObserver() {} | 515 ~PeerConnectionObserver() {} |
504 }; | 516 }; |
505 | 517 |
506 // PeerConnectionFactoryInterface is the factory interface use for creating | 518 // PeerConnectionFactoryInterface is the factory interface use for creating |
507 // PeerConnection, MediaStream and media tracks. | 519 // PeerConnection, MediaStream and media tracks. |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 CreatePeerConnectionFactory( | 644 CreatePeerConnectionFactory( |
633 rtc::Thread* worker_thread, | 645 rtc::Thread* worker_thread, |
634 rtc::Thread* signaling_thread, | 646 rtc::Thread* signaling_thread, |
635 AudioDeviceModule* default_adm, | 647 AudioDeviceModule* default_adm, |
636 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 648 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
637 cricket::WebRtcVideoDecoderFactory* decoder_factory); | 649 cricket::WebRtcVideoDecoderFactory* decoder_factory); |
638 | 650 |
639 } // namespace webrtc | 651 } // namespace webrtc |
640 | 652 |
641 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ | 653 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ |
OLD | NEW |