peerconnection.h revision 28e20752806a492f5a6a5d343c02f9556f39b1cd
128e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org/*
228e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org * libjingle
328e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org * Copyright 2012, Google Inc.
428e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org *
528e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org * Redistribution and use in source and binary forms, with or without
628e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org * modification, are permitted provided that the following conditions are met:
728e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org *
828e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org *  1. Redistributions of source code must retain the above copyright notice,
928e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org *     this list of conditions and the following disclaimer.
1028e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org *  2. Redistributions in binary form must reproduce the above copyright notice,
1128e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org *     this list of conditions and the following disclaimer in the documentation
1228e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org *     and/or other materials provided with the distribution.
1328e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org *  3. The name of the author may not be used to endorse or promote products
1428e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org *     derived from this software without specific prior written permission.
1528e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org *
1628e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
1728e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1828e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
1928e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2028e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
2128e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
2228e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
2328e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
2428e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
2528e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2628e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org */
2728e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
2828e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org#ifndef TALK_APP_WEBRTC_PEERCONNECTION_H_
2928e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org#define TALK_APP_WEBRTC_PEERCONNECTION_H_
3028e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
3128e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org#include <string>
3228e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
3328e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org#include "talk/app/webrtc/mediastreamsignaling.h"
3428e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org#include "talk/app/webrtc/peerconnectioninterface.h"
3528e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org#include "talk/app/webrtc/peerconnectionfactory.h"
3628e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org#include "talk/app/webrtc/statscollector.h"
3728e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org#include "talk/app/webrtc/streamcollection.h"
3828e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org#include "talk/app/webrtc/webrtcsession.h"
3928e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org#include "talk/base/scoped_ptr.h"
4028e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
4128e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.orgnamespace webrtc {
4228e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.orgclass MediaStreamHandlerContainer;
4328e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
4428e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.orgtypedef std::vector<PortAllocatorFactoryInterface::StunConfiguration>
4528e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org    StunConfigurations;
4628e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.orgtypedef std::vector<PortAllocatorFactoryInterface::TurnConfiguration>
4728e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org    TurnConfigurations;
4828e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
4928e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org// PeerConnectionImpl implements the PeerConnection interface.
5028e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org// It uses MediaStreamSignaling and WebRtcSession to implement
5128e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org// the PeerConnection functionality.
5228e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.orgclass PeerConnection : public PeerConnectionInterface,
5328e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                       public MediaStreamSignalingObserver,
5428e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                       public IceObserver,
5528e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                       public talk_base::MessageHandler,
5628e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                       public sigslot::has_slots<> {
5728e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org public:
5828e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  explicit PeerConnection(PeerConnectionFactory* factory);
5928e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
6028e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  bool Initialize(const PeerConnectionInterface::IceServers& configuration,
6128e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                  const MediaConstraintsInterface* constraints,
6228e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                  webrtc::PortAllocatorFactoryInterface* allocator_factory,
6328e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                  PeerConnectionObserver* observer);
6428e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual talk_base::scoped_refptr<StreamCollectionInterface> local_streams();
6528e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual talk_base::scoped_refptr<StreamCollectionInterface> remote_streams();
6628e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual bool AddStream(MediaStreamInterface* local_stream,
6728e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                         const MediaConstraintsInterface* constraints);
6828e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void RemoveStream(MediaStreamInterface* local_stream);
6928e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
7028e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual talk_base::scoped_refptr<DtmfSenderInterface> CreateDtmfSender(
7128e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org      AudioTrackInterface* track);
7228e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
7328e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual talk_base::scoped_refptr<DataChannelInterface> CreateDataChannel(
7428e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org      const std::string& label,
7528e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org      const DataChannelInit* config);
7628e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual bool GetStats(StatsObserver* observer,
7728e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                        webrtc::MediaStreamTrackInterface* track);
7828e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
7928e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual SignalingState signaling_state();
8028e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
8128e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  // TODO(bemasc): Remove ice_state() when callers are removed.
8228e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual IceState ice_state();
8328e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual IceConnectionState ice_connection_state();
8428e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual IceGatheringState ice_gathering_state();
8528e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
8628e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual const SessionDescriptionInterface* local_description() const;
8728e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual const SessionDescriptionInterface* remote_description() const;
8828e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
8928e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  // JSEP01
9028e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void CreateOffer(CreateSessionDescriptionObserver* observer,
9128e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                           const MediaConstraintsInterface* constraints);
9228e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void CreateAnswer(CreateSessionDescriptionObserver* observer,
9328e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                            const MediaConstraintsInterface* constraints);
9428e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void SetLocalDescription(SetSessionDescriptionObserver* observer,
9528e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                                   SessionDescriptionInterface* desc);
9628e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void SetRemoteDescription(SetSessionDescriptionObserver* observer,
9728e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                                    SessionDescriptionInterface* desc);
9828e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual bool UpdateIce(const IceServers& configuration,
9928e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                         const MediaConstraintsInterface* constraints);
10028e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual bool AddIceCandidate(const IceCandidateInterface* candidate);
10128e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
10228e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void Close();
10328e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
10428e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org protected:
10528e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual ~PeerConnection();
10628e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
10728e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org private:
10828e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  // Implements MessageHandler.
10928e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void OnMessage(talk_base::Message* msg);
11028e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
11128e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  // Implements MediaStreamSignalingObserver.
11228e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void OnAddRemoteStream(MediaStreamInterface* stream) OVERRIDE;
11328e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void OnRemoveRemoteStream(MediaStreamInterface* stream) OVERRIDE;
11428e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void OnAddDataChannel(DataChannelInterface* data_channel) OVERRIDE;
11528e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void OnAddRemoteAudioTrack(MediaStreamInterface* stream,
11628e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                                     AudioTrackInterface* audio_track,
11728e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                                     uint32 ssrc) OVERRIDE;
11828e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void OnAddRemoteVideoTrack(MediaStreamInterface* stream,
11928e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                                     VideoTrackInterface* video_track,
12028e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                                     uint32 ssrc) OVERRIDE;
12128e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void OnRemoveRemoteAudioTrack(
12228e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org      MediaStreamInterface* stream,
12328e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org      AudioTrackInterface* audio_track) OVERRIDE;
12428e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void OnRemoveRemoteVideoTrack(
12528e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org      MediaStreamInterface* stream,
12628e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org      VideoTrackInterface* video_track) OVERRIDE;
12728e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void OnAddLocalAudioTrack(MediaStreamInterface* stream,
12828e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                                    AudioTrackInterface* audio_track,
12928e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                                    uint32 ssrc) OVERRIDE;
13028e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void OnAddLocalVideoTrack(MediaStreamInterface* stream,
13128e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                                    VideoTrackInterface* video_track,
13228e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                                    uint32 ssrc) OVERRIDE;
13328e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void OnRemoveLocalAudioTrack(
13428e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org      MediaStreamInterface* stream,
13528e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org      AudioTrackInterface* audio_track) OVERRIDE;
13628e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void OnRemoveLocalVideoTrack(
13728e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org      MediaStreamInterface* stream,
13828e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org      VideoTrackInterface* video_track) OVERRIDE;
13928e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void OnRemoveLocalStream(MediaStreamInterface* stream);
14028e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
14128e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  // Implements IceObserver
14228e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void OnIceConnectionChange(IceConnectionState new_state);
14328e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void OnIceGatheringChange(IceGatheringState new_state);
14428e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void OnIceCandidate(const IceCandidateInterface* candidate);
14528e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  virtual void OnIceComplete();
14628e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
14728e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  // Signals from WebRtcSession.
14828e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  void OnSessionStateChange(cricket::BaseSession* session,
14928e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                            cricket::BaseSession::State state);
15028e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  void ChangeSignalingState(SignalingState signaling_state);
15128e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
15228e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  bool DoInitialize(const StunConfigurations& stun_config,
15328e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                    const TurnConfigurations& turn_config,
15428e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                    const MediaConstraintsInterface* constraints,
15528e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                    webrtc::PortAllocatorFactoryInterface* allocator_factory,
15628e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                    PeerConnectionObserver* observer);
15728e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
15828e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  talk_base::Thread* signaling_thread() const {
15928e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org    return factory_->signaling_thread();
16028e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  }
16128e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
16228e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  void PostSetSessionDescriptionFailure(SetSessionDescriptionObserver* observer,
16328e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org                                        const std::string& error);
16428e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
16528e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  bool IsClosed() const {
16628e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org    return signaling_state_ == PeerConnectionInterface::kClosed;
16728e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  }
16828e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
16928e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  // Storing the factory as a scoped reference pointer ensures that the memory
17028e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  // in the PeerConnectionFactoryImpl remains available as long as the
17128e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  // PeerConnection is running. It is passed to PeerConnection as a raw pointer.
17228e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  // However, since the reference counting is done in the
17328e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  // PeerConnectionFactoryInteface all instances created using the raw pointer
17428e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  // will refer to the same reference count.
17528e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  talk_base::scoped_refptr<PeerConnectionFactory> factory_;
17628e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  PeerConnectionObserver* observer_;
17728e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  SignalingState signaling_state_;
17828e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  // TODO(bemasc): Remove ice_state_.
17928e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  IceState ice_state_;
18028e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  IceConnectionState ice_connection_state_;
18128e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  IceGatheringState ice_gathering_state_;
18228e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
18328e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  talk_base::scoped_ptr<cricket::PortAllocator> port_allocator_;
18428e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  talk_base::scoped_ptr<WebRtcSession> session_;
18528e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  talk_base::scoped_ptr<MediaStreamSignaling> mediastream_signaling_;
18628e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  talk_base::scoped_ptr<MediaStreamHandlerContainer> stream_handler_container_;
18728e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org  StatsCollector stats_;
18828e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org};
18928e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
19028e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org}  // namespace webrtc
19128e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org
19228e20752806a492f5a6a5d343c02f9556f39b1cdhenrike@webrtc.org#endif  // TALK_APP_WEBRTC_PEERCONNECTION_H_
193