| 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 |
| 11 #ifndef WEBRTC_API_PEERCONNECTIONPROXY_H_ | 11 #ifndef WEBRTC_API_PEERCONNECTIONPROXY_H_ |
| 12 #define WEBRTC_API_PEERCONNECTIONPROXY_H_ | 12 #define WEBRTC_API_PEERCONNECTIONPROXY_H_ |
| 13 | 13 |
| 14 #include "webrtc/api/peerconnectioninterface.h" | 14 #include "webrtc/api/peerconnectioninterface.h" |
| 15 #include "webrtc/api/proxy.h" | 15 #include "webrtc/api/proxy.h" |
| 16 | 16 |
| 17 namespace webrtc { | 17 namespace webrtc { |
| 18 | 18 |
| 19 // Define proxy for PeerConnectionInterface. | 19 // Define proxy for PeerConnectionInterface. |
| 20 BEGIN_SIGNALING_PROXY_MAP(PeerConnection) | 20 BEGIN_SIGNALING_PROXY_MAP(PeerConnection) |
| 21 PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>, | 21 PROXY_SIGNALING_THREAD_DESTRUCTOR() |
| 22 local_streams) | 22 PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>, local_streams) |
| 23 PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>, | 23 PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>, remote_streams) |
| 24 remote_streams) | |
| 25 PROXY_METHOD1(bool, AddStream, MediaStreamInterface*) | 24 PROXY_METHOD1(bool, AddStream, MediaStreamInterface*) |
| 26 PROXY_METHOD1(void, RemoveStream, MediaStreamInterface*) | 25 PROXY_METHOD1(void, RemoveStream, MediaStreamInterface*) |
| 27 PROXY_METHOD2(rtc::scoped_refptr<RtpSenderInterface>, | 26 PROXY_METHOD2(rtc::scoped_refptr<RtpSenderInterface>, |
| 28 AddTrack, | 27 AddTrack, |
| 29 MediaStreamTrackInterface*, | 28 MediaStreamTrackInterface*, |
| 30 std::vector<MediaStreamInterface*>) | 29 std::vector<MediaStreamInterface*>) |
| 31 PROXY_METHOD1(bool, RemoveTrack, RtpSenderInterface*) | 30 PROXY_METHOD1(bool, RemoveTrack, RtpSenderInterface*) |
| 32 PROXY_METHOD1(rtc::scoped_refptr<DtmfSenderInterface>, | 31 PROXY_METHOD1(rtc::scoped_refptr<DtmfSenderInterface>, |
| 33 CreateDtmfSender, AudioTrackInterface*) | 32 CreateDtmfSender, |
| 33 AudioTrackInterface*) |
| 34 PROXY_METHOD2(rtc::scoped_refptr<RtpSenderInterface>, | 34 PROXY_METHOD2(rtc::scoped_refptr<RtpSenderInterface>, |
| 35 CreateSender, | 35 CreateSender, |
| 36 const std::string&, | 36 const std::string&, |
| 37 const std::string&) | 37 const std::string&) |
| 38 PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpSenderInterface>>, | 38 PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpSenderInterface>>, |
| 39 GetSenders) | 39 GetSenders) |
| 40 PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpReceiverInterface>>, | 40 PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpReceiverInterface>>, |
| 41 GetReceivers) | 41 GetReceivers) |
| 42 PROXY_METHOD3(bool, GetStats, StatsObserver*, | 42 PROXY_METHOD3(bool, |
| 43 GetStats, |
| 44 StatsObserver*, |
| 43 MediaStreamTrackInterface*, | 45 MediaStreamTrackInterface*, |
| 44 StatsOutputLevel) | 46 StatsOutputLevel) |
| 45 PROXY_METHOD1(void, GetStats, RTCStatsCollectorCallback*) | 47 PROXY_METHOD1(void, GetStats, RTCStatsCollectorCallback*) |
| 46 PROXY_METHOD2(rtc::scoped_refptr<DataChannelInterface>, | 48 PROXY_METHOD2(rtc::scoped_refptr<DataChannelInterface>, |
| 47 CreateDataChannel, const std::string&, const DataChannelInit*) | 49 CreateDataChannel, |
| 50 const std::string&, |
| 51 const DataChannelInit*) |
| 48 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, local_description) | 52 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, local_description) |
| 49 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, remote_description) | 53 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, remote_description) |
| 50 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, | 54 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, |
| 51 pending_local_description) | 55 pending_local_description) |
| 52 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, | 56 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, |
| 53 pending_remote_description) | 57 pending_remote_description) |
| 54 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, | 58 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, |
| 55 current_local_description) | 59 current_local_description) |
| 56 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, | 60 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, |
| 57 current_remote_description) | 61 current_remote_description) |
| 58 PROXY_METHOD2(void, CreateOffer, CreateSessionDescriptionObserver*, | 62 PROXY_METHOD2(void, |
| 63 CreateOffer, |
| 64 CreateSessionDescriptionObserver*, |
| 59 const MediaConstraintsInterface*) | 65 const MediaConstraintsInterface*) |
| 60 PROXY_METHOD2(void, CreateAnswer, CreateSessionDescriptionObserver*, | 66 PROXY_METHOD2(void, |
| 67 CreateAnswer, |
| 68 CreateSessionDescriptionObserver*, |
| 61 const MediaConstraintsInterface*) | 69 const MediaConstraintsInterface*) |
| 62 PROXY_METHOD2(void, | 70 PROXY_METHOD2(void, |
| 63 CreateOffer, | 71 CreateOffer, |
| 64 CreateSessionDescriptionObserver*, | 72 CreateSessionDescriptionObserver*, |
| 65 const RTCOfferAnswerOptions&) | 73 const RTCOfferAnswerOptions&) |
| 66 PROXY_METHOD2(void, | 74 PROXY_METHOD2(void, |
| 67 CreateAnswer, | 75 CreateAnswer, |
| 68 CreateSessionDescriptionObserver*, | 76 CreateSessionDescriptionObserver*, |
| 69 const RTCOfferAnswerOptions&) | 77 const RTCOfferAnswerOptions&) |
| 70 PROXY_METHOD2(void, SetLocalDescription, SetSessionDescriptionObserver*, | 78 PROXY_METHOD2(void, |
| 79 SetLocalDescription, |
| 80 SetSessionDescriptionObserver*, |
| 71 SessionDescriptionInterface*) | 81 SessionDescriptionInterface*) |
| 72 PROXY_METHOD2(void, SetRemoteDescription, SetSessionDescriptionObserver*, | 82 PROXY_METHOD2(void, |
| 83 SetRemoteDescription, |
| 84 SetSessionDescriptionObserver*, |
| 73 SessionDescriptionInterface*) | 85 SessionDescriptionInterface*) |
| 74 PROXY_METHOD0(PeerConnectionInterface::RTCConfiguration, GetConfiguration); | 86 PROXY_METHOD0(PeerConnectionInterface::RTCConfiguration, GetConfiguration); |
| 75 PROXY_METHOD2(bool, | 87 PROXY_METHOD2(bool, |
| 76 SetConfiguration, | 88 SetConfiguration, |
| 77 const PeerConnectionInterface::RTCConfiguration&, | 89 const PeerConnectionInterface::RTCConfiguration&, |
| 78 RTCError*); | 90 RTCError*); |
| 79 PROXY_METHOD1(bool, | 91 PROXY_METHOD1(bool, |
| 80 SetConfiguration, | 92 SetConfiguration, |
| 81 const PeerConnectionInterface::RTCConfiguration&); | 93 const PeerConnectionInterface::RTCConfiguration&); |
| 82 PROXY_METHOD1(bool, AddIceCandidate, const IceCandidateInterface*) | 94 PROXY_METHOD1(bool, AddIceCandidate, const IceCandidateInterface*) |
| 83 PROXY_METHOD1(bool, | 95 PROXY_METHOD1(bool, |
| 84 RemoveIceCandidates, | 96 RemoveIceCandidates, |
| 85 const std::vector<cricket::Candidate>&); | 97 const std::vector<cricket::Candidate>&); |
| 86 PROXY_METHOD1(void, RegisterUMAObserver, UMAObserver*) | 98 PROXY_METHOD1(void, RegisterUMAObserver, UMAObserver*) |
| 87 PROXY_METHOD0(SignalingState, signaling_state) | 99 PROXY_METHOD0(SignalingState, signaling_state) |
| 88 PROXY_METHOD0(IceConnectionState, ice_connection_state) | 100 PROXY_METHOD0(IceConnectionState, ice_connection_state) |
| 89 PROXY_METHOD0(IceGatheringState, ice_gathering_state) | 101 PROXY_METHOD0(IceGatheringState, ice_gathering_state) |
| 90 PROXY_METHOD2(bool, StartRtcEventLog, rtc::PlatformFile, int64_t) | 102 PROXY_METHOD2(bool, StartRtcEventLog, rtc::PlatformFile, int64_t) |
| 91 PROXY_METHOD0(void, StopRtcEventLog) | 103 PROXY_METHOD0(void, StopRtcEventLog) |
| 92 PROXY_METHOD0(void, Close) | 104 PROXY_METHOD0(void, Close) |
| 93 END_SIGNALING_PROXY() | 105 END_PROXY_MAP() |
| 94 | 106 |
| 95 } // namespace webrtc | 107 } // namespace webrtc |
| 96 | 108 |
| 97 #endif // WEBRTC_API_PEERCONNECTIONPROXY_H_ | 109 #endif // WEBRTC_API_PEERCONNECTIONPROXY_H_ |
| OLD | NEW |