Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: talk/app/webrtc/peerconnectioninterface.h

Issue 1669993003: Remove deprecated PeerConnectionObserver::OnStateChange and OnIceComplete (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixed tests. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 // methods. 458 // methods.
459 class PeerConnectionObserver { 459 class PeerConnectionObserver {
460 public: 460 public:
461 enum StateType { 461 enum StateType {
462 kSignalingState, 462 kSignalingState,
463 kIceState, 463 kIceState,
464 }; 464 };
465 465
466 // Triggered when the SignalingState changed. 466 // Triggered when the SignalingState changed.
467 virtual void OnSignalingChange( 467 virtual void OnSignalingChange(
468 PeerConnectionInterface::SignalingState new_state) {} 468 PeerConnectionInterface::SignalingState new_state) = 0;
469
470 // Triggered when SignalingState or IceState have changed.
471 // TODO(bemasc): Remove once callers transition to OnSignalingChange.
472 virtual void OnStateChange(StateType state_changed) {}
473 469
474 // Triggered when media is received on a new stream from remote peer. 470 // Triggered when media is received on a new stream from remote peer.
475 virtual void OnAddStream(MediaStreamInterface* stream) = 0; 471 virtual void OnAddStream(MediaStreamInterface* stream) = 0;
476 472
477 // Triggered when a remote peer close a stream. 473 // Triggered when a remote peer close a stream.
478 virtual void OnRemoveStream(MediaStreamInterface* stream) = 0; 474 virtual void OnRemoveStream(MediaStreamInterface* stream) = 0;
479 475
480 // Triggered when a remote peer open a data channel. 476 // Triggered when a remote peer open a data channel.
481 virtual void OnDataChannel(DataChannelInterface* data_channel) = 0; 477 virtual void OnDataChannel(DataChannelInterface* data_channel) = 0;
482 478
483 // Triggered when renegotiation is needed, for example the ICE has restarted. 479 // Triggered when renegotiation is needed, for example the ICE has restarted.
484 virtual void OnRenegotiationNeeded() = 0; 480 virtual void OnRenegotiationNeeded() = 0;
485 481
486 // Called any time the IceConnectionState changes 482 // Called any time the IceConnectionState changes
487 virtual void OnIceConnectionChange( 483 virtual void OnIceConnectionChange(
488 PeerConnectionInterface::IceConnectionState new_state) {} 484 PeerConnectionInterface::IceConnectionState new_state) = 0;
489 485
490 // Called any time the IceGatheringState changes 486 // Called any time the IceGatheringState changes
491 virtual void OnIceGatheringChange( 487 virtual void OnIceGatheringChange(
492 PeerConnectionInterface::IceGatheringState new_state) {} 488 PeerConnectionInterface::IceGatheringState new_state) = 0;
493 489
494 // New Ice candidate have been found. 490 // New Ice candidate have been found.
495 virtual void OnIceCandidate(const IceCandidateInterface* candidate) = 0; 491 virtual void OnIceCandidate(const IceCandidateInterface* candidate) = 0;
496 492
497 // TODO(bemasc): Remove this once callers transition to OnIceGatheringChange.
498 // All Ice candidates have been found.
499 virtual void OnIceComplete() {}
500
501 // Called when the ICE connection receiving status changes. 493 // Called when the ICE connection receiving status changes.
502 virtual void OnIceConnectionReceivingChange(bool receiving) {} 494 virtual void OnIceConnectionReceivingChange(bool receiving) {}
503 495
504 protected: 496 protected:
505 // Dtor protected as objects shouldn't be deleted via this interface. 497 // Dtor protected as objects shouldn't be deleted via this interface.
506 ~PeerConnectionObserver() {} 498 ~PeerConnectionObserver() {}
507 }; 499 };
508 500
509 // PeerConnectionFactoryInterface is the factory interface use for creating 501 // PeerConnectionFactoryInterface is the factory interface use for creating
510 // PeerConnection, MediaStream and media tracks. 502 // PeerConnection, MediaStream and media tracks.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 CreatePeerConnectionFactory( 613 CreatePeerConnectionFactory(
622 rtc::Thread* worker_thread, 614 rtc::Thread* worker_thread,
623 rtc::Thread* signaling_thread, 615 rtc::Thread* signaling_thread,
624 AudioDeviceModule* default_adm, 616 AudioDeviceModule* default_adm,
625 cricket::WebRtcVideoEncoderFactory* encoder_factory, 617 cricket::WebRtcVideoEncoderFactory* encoder_factory,
626 cricket::WebRtcVideoDecoderFactory* decoder_factory); 618 cricket::WebRtcVideoDecoderFactory* decoder_factory);
627 619
628 } // namespace webrtc 620 } // namespace webrtc
629 621
630 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ 622 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_
OLDNEW
« no previous file with comments | « talk/app/webrtc/peerconnection_unittest.cc ('k') | talk/app/webrtc/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698