blob: 1609a751e16a334c2482844781dfa244cf614044 [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:36 +00001/*
kjellanderb24317b2016-02-10 07:54:43 -08002 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
henrike@webrtc.org28e20752013-07-10 00:45:36 +00003 *
kjellanderb24317b2016-02-10 07:54:43 -08004 * 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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
henrike@webrtc.org28e20752013-07-10 00:45:36 +00009 */
10
Henrik Kjellander15583c12016-02-10 10:53:12 +010011#ifndef WEBRTC_API_PEERCONNECTIONPROXY_H_
12#define WEBRTC_API_PEERCONNECTIONPROXY_H_
henrike@webrtc.org28e20752013-07-10 00:45:36 +000013
Henrik Kjellander15583c12016-02-10 10:53:12 +010014#include "webrtc/api/peerconnectioninterface.h"
15#include "webrtc/api/proxy.h"
henrike@webrtc.org28e20752013-07-10 00:45:36 +000016
17namespace webrtc {
18
19// Define proxy for PeerConnectionInterface.
nisse72c8d2b2016-04-15 03:49:07 -070020BEGIN_SIGNALING_PROXY_MAP(PeerConnection)
buildbot@webrtc.orgd4e598d2014-07-29 17:36:52 +000021 PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>,
henrike@webrtc.org28e20752013-07-10 00:45:36 +000022 local_streams)
buildbot@webrtc.orgd4e598d2014-07-29 17:36:52 +000023 PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>,
henrike@webrtc.org28e20752013-07-10 00:45:36 +000024 remote_streams)
perkj@webrtc.orgc2dd5ee2014-11-04 11:31:29 +000025 PROXY_METHOD1(bool, AddStream, MediaStreamInterface*)
henrike@webrtc.org28e20752013-07-10 00:45:36 +000026 PROXY_METHOD1(void, RemoveStream, MediaStreamInterface*)
deadbeefe1f9d832016-01-14 15:35:42 -080027 PROXY_METHOD2(rtc::scoped_refptr<RtpSenderInterface>,
28 AddTrack,
29 MediaStreamTrackInterface*,
30 std::vector<MediaStreamInterface*>)
31 PROXY_METHOD1(bool, RemoveTrack, RtpSenderInterface*)
buildbot@webrtc.orgd4e598d2014-07-29 17:36:52 +000032 PROXY_METHOD1(rtc::scoped_refptr<DtmfSenderInterface>,
henrike@webrtc.org28e20752013-07-10 00:45:36 +000033 CreateDtmfSender, AudioTrackInterface*)
deadbeefbd7d8f72015-12-18 16:58:44 -080034 PROXY_METHOD2(rtc::scoped_refptr<RtpSenderInterface>,
deadbeeffac06552015-11-25 11:26:01 -080035 CreateSender,
deadbeefbd7d8f72015-12-18 16:58:44 -080036 const std::string&,
deadbeeffac06552015-11-25 11:26:01 -080037 const std::string&)
deadbeef70ab1a12015-09-28 16:53:55 -070038 PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpSenderInterface>>,
39 GetSenders)
40 PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpReceiverInterface>>,
41 GetReceivers)
wu@webrtc.orgb9a088b2014-02-13 23:18:49 +000042 PROXY_METHOD3(bool, GetStats, StatsObserver*,
43 MediaStreamTrackInterface*,
44 StatsOutputLevel)
hbos74e1a4f2016-09-15 23:33:01 -070045 PROXY_METHOD1(void, GetStats, RTCStatsCollectorCallback*)
buildbot@webrtc.orgd4e598d2014-07-29 17:36:52 +000046 PROXY_METHOD2(rtc::scoped_refptr<DataChannelInterface>,
henrike@webrtc.org28e20752013-07-10 00:45:36 +000047 CreateDataChannel, const std::string&, const DataChannelInit*)
48 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, local_description)
49 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, remote_description)
deadbeeffe4a8a42016-12-20 17:56:17 -080050 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
51 pending_local_description)
52 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
53 pending_remote_description)
54 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
55 current_local_description)
56 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
57 current_remote_description)
henrike@webrtc.org28e20752013-07-10 00:45:36 +000058 PROXY_METHOD2(void, CreateOffer, CreateSessionDescriptionObserver*,
59 const MediaConstraintsInterface*)
60 PROXY_METHOD2(void, CreateAnswer, CreateSessionDescriptionObserver*,
61 const MediaConstraintsInterface*)
htaa2a49d92016-03-04 02:51:39 -080062 PROXY_METHOD2(void,
63 CreateOffer,
64 CreateSessionDescriptionObserver*,
65 const RTCOfferAnswerOptions&)
66 PROXY_METHOD2(void,
67 CreateAnswer,
68 CreateSessionDescriptionObserver*,
69 const RTCOfferAnswerOptions&)
henrike@webrtc.org28e20752013-07-10 00:45:36 +000070 PROXY_METHOD2(void, SetLocalDescription, SetSessionDescriptionObserver*,
71 SessionDescriptionInterface*)
72 PROXY_METHOD2(void, SetRemoteDescription, SetSessionDescriptionObserver*,
73 SessionDescriptionInterface*)
deadbeef46c73892016-11-16 19:42:04 -080074 PROXY_METHOD0(PeerConnectionInterface::RTCConfiguration, GetConfiguration);
deadbeef293e9262017-01-11 12:28:30 -080075 PROXY_METHOD2(bool,
76 SetConfiguration,
77 const PeerConnectionInterface::RTCConfiguration&,
78 RTCError*);
deadbeef1e234612016-12-24 01:43:32 -080079 PROXY_METHOD1(bool,
deadbeefa67696b2015-09-29 11:56:26 -070080 SetConfiguration,
deadbeef1e234612016-12-24 01:43:32 -080081 const PeerConnectionInterface::RTCConfiguration&);
henrike@webrtc.org28e20752013-07-10 00:45:36 +000082 PROXY_METHOD1(bool, AddIceCandidate, const IceCandidateInterface*)
Honghai Zhang7fb69db2016-03-14 11:59:18 -070083 PROXY_METHOD1(bool,
84 RemoveIceCandidates,
85 const std::vector<cricket::Candidate>&);
buildbot@webrtc.org1567b8c2014-05-08 19:54:16 +000086 PROXY_METHOD1(void, RegisterUMAObserver, UMAObserver*)
henrike@webrtc.org28e20752013-07-10 00:45:36 +000087 PROXY_METHOD0(SignalingState, signaling_state)
henrike@webrtc.org28e20752013-07-10 00:45:36 +000088 PROXY_METHOD0(IceConnectionState, ice_connection_state)
89 PROXY_METHOD0(IceGatheringState, ice_gathering_state)
ivoc14d5dbe2016-07-04 07:06:55 -070090 PROXY_METHOD2(bool, StartRtcEventLog, rtc::PlatformFile, int64_t)
91 PROXY_METHOD0(void, StopRtcEventLog)
henrike@webrtc.org28e20752013-07-10 00:45:36 +000092 PROXY_METHOD0(void, Close)
nisse72c8d2b2016-04-15 03:49:07 -070093END_SIGNALING_PROXY()
henrike@webrtc.org28e20752013-07-10 00:45:36 +000094
95} // namespace webrtc
96
Henrik Kjellander15583c12016-02-10 10:53:12 +010097#endif // WEBRTC_API_PEERCONNECTIONPROXY_H_