| 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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 public: | 509 public: |
| 510 enum StateType { | 510 enum StateType { |
| 511 kSignalingState, | 511 kSignalingState, |
| 512 kIceState, | 512 kIceState, |
| 513 }; | 513 }; |
| 514 | 514 |
| 515 // Triggered when the SignalingState changed. | 515 // Triggered when the SignalingState changed. |
| 516 virtual void OnSignalingChange( | 516 virtual void OnSignalingChange( |
| 517 PeerConnectionInterface::SignalingState new_state) = 0; | 517 PeerConnectionInterface::SignalingState new_state) = 0; |
| 518 | 518 |
| 519 // TODO(deadbeef): Once all subclasses override the scoped_refptr versions |
| 520 // of the below three methods, make them pure virtual and remove the raw |
| 521 // pointer version. |
| 522 |
| 519 // Triggered when media is received on a new stream from remote peer. | 523 // Triggered when media is received on a new stream from remote peer. |
| 520 virtual void OnAddStream(MediaStreamInterface* stream) = 0; | 524 virtual void OnAddStream(rtc::scoped_refptr<MediaStreamInterface> stream) {} |
| 525 // Deprecated; please use the version that uses a scoped_refptr. |
| 526 virtual void OnAddStream(MediaStreamInterface* stream) {} |
| 521 | 527 |
| 522 // Triggered when a remote peer close a stream. | 528 // Triggered when a remote peer close a stream. |
| 523 virtual void OnRemoveStream(MediaStreamInterface* stream) = 0; | 529 virtual void OnRemoveStream(rtc::scoped_refptr<MediaStreamInterface> stream) { |
| 530 } |
| 531 // Deprecated; please use the version that uses a scoped_refptr. |
| 532 virtual void OnRemoveStream(MediaStreamInterface* stream) {} |
| 524 | 533 |
| 525 // Triggered when a remote peer open a data channel. | 534 // Triggered when a remote peer opens a data channel. |
| 526 virtual void OnDataChannel(DataChannelInterface* data_channel) = 0; | 535 virtual void OnDataChannel( |
| 536 rtc::scoped_refptr<DataChannelInterface> data_channel){}; |
| 537 // Deprecated; please use the version that uses a scoped_refptr. |
| 538 virtual void OnDataChannel(DataChannelInterface* data_channel) {} |
| 527 | 539 |
| 528 // Triggered when renegotiation is needed, for example the ICE has restarted. | 540 // Triggered when renegotiation is needed. For example, an ICE restart |
| 541 // has begun. |
| 529 virtual void OnRenegotiationNeeded() = 0; | 542 virtual void OnRenegotiationNeeded() = 0; |
| 530 | 543 |
| 531 // Called any time the IceConnectionState changes | 544 // Called any time the IceConnectionState changes. |
| 532 virtual void OnIceConnectionChange( | 545 virtual void OnIceConnectionChange( |
| 533 PeerConnectionInterface::IceConnectionState new_state) = 0; | 546 PeerConnectionInterface::IceConnectionState new_state) = 0; |
| 534 | 547 |
| 535 // Called any time the IceGatheringState changes | 548 // Called any time the IceGatheringState changes. |
| 536 virtual void OnIceGatheringChange( | 549 virtual void OnIceGatheringChange( |
| 537 PeerConnectionInterface::IceGatheringState new_state) = 0; | 550 PeerConnectionInterface::IceGatheringState new_state) = 0; |
| 538 | 551 |
| 539 // New Ice candidate have been found. | 552 // A new ICE candidate has been gathered. |
| 540 virtual void OnIceCandidate(const IceCandidateInterface* candidate) = 0; | 553 virtual void OnIceCandidate(const IceCandidateInterface* candidate) = 0; |
| 541 | 554 |
| 542 // Ice candidates have been removed. | 555 // Ice candidates have been removed. |
| 543 // TODO(honghaiz): Make this a pure virtual method when all its subclasses | 556 // TODO(honghaiz): Make this a pure virtual method when all its subclasses |
| 544 // implement it. | 557 // implement it. |
| 545 virtual void OnIceCandidatesRemoved( | 558 virtual void OnIceCandidatesRemoved( |
| 546 const std::vector<cricket::Candidate>& candidates) {} | 559 const std::vector<cricket::Candidate>& candidates) {} |
| 547 | 560 |
| 548 // Called when the ICE connection receiving status changes. | 561 // Called when the ICE connection receiving status changes. |
| 549 virtual void OnIceConnectionReceivingChange(bool receiving) {} | 562 virtual void OnIceConnectionReceivingChange(bool receiving) {} |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 CreatePeerConnectionFactory( | 708 CreatePeerConnectionFactory( |
| 696 rtc::Thread* worker_thread, | 709 rtc::Thread* worker_thread, |
| 697 rtc::Thread* signaling_thread, | 710 rtc::Thread* signaling_thread, |
| 698 AudioDeviceModule* default_adm, | 711 AudioDeviceModule* default_adm, |
| 699 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 712 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
| 700 cricket::WebRtcVideoDecoderFactory* decoder_factory); | 713 cricket::WebRtcVideoDecoderFactory* decoder_factory); |
| 701 | 714 |
| 702 } // namespace webrtc | 715 } // namespace webrtc |
| 703 | 716 |
| 704 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ | 717 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ |
| OLD | NEW |