blob: ed707b3c457147c586ff7d374d82dd7f9efcb44e [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)
deadbeefd99a2002017-01-18 08:55:23 -080021 PROXY_SIGNALING_THREAD_DESTRUCTOR()
22 PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>, local_streams)
23 PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>, remote_streams)
perkj@webrtc.orgc2dd5ee2014-11-04 11:31:29 +000024 PROXY_METHOD1(bool, AddStream, MediaStreamInterface*)
henrike@webrtc.org28e20752013-07-10 00:45:36 +000025 PROXY_METHOD1(void, RemoveStream, MediaStreamInterface*)
deadbeefe1f9d832016-01-14 15:35:42 -080026 PROXY_METHOD2(rtc::scoped_refptr<RtpSenderInterface>,
27 AddTrack,
28 MediaStreamTrackInterface*,
29 std::vector<MediaStreamInterface*>)
30 PROXY_METHOD1(bool, RemoveTrack, RtpSenderInterface*)
buildbot@webrtc.orgd4e598d2014-07-29 17:36:52 +000031 PROXY_METHOD1(rtc::scoped_refptr<DtmfSenderInterface>,
deadbeefd99a2002017-01-18 08:55:23 -080032 CreateDtmfSender,
33 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)
deadbeefd99a2002017-01-18 08:55:23 -080042 PROXY_METHOD3(bool,
43 GetStats,
44 StatsObserver*,
wu@webrtc.orgb9a088b2014-02-13 23:18:49 +000045 MediaStreamTrackInterface*,
46 StatsOutputLevel)
hbos74e1a4f2016-09-15 23:33:01 -070047 PROXY_METHOD1(void, GetStats, RTCStatsCollectorCallback*)
buildbot@webrtc.orgd4e598d2014-07-29 17:36:52 +000048 PROXY_METHOD2(rtc::scoped_refptr<DataChannelInterface>,
deadbeefd99a2002017-01-18 08:55:23 -080049 CreateDataChannel,
50 const std::string&,
51 const DataChannelInit*)
henrike@webrtc.org28e20752013-07-10 00:45:36 +000052 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, local_description)
53 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, remote_description)
deadbeeffe4a8a42016-12-20 17:56:17 -080054 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
55 pending_local_description)
56 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
57 pending_remote_description)
58 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
59 current_local_description)
60 PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
61 current_remote_description)
deadbeefd99a2002017-01-18 08:55:23 -080062 PROXY_METHOD2(void,
63 CreateOffer,
64 CreateSessionDescriptionObserver*,
henrike@webrtc.org28e20752013-07-10 00:45:36 +000065 const MediaConstraintsInterface*)
deadbeefd99a2002017-01-18 08:55:23 -080066 PROXY_METHOD2(void,
67 CreateAnswer,
68 CreateSessionDescriptionObserver*,
henrike@webrtc.org28e20752013-07-10 00:45:36 +000069 const MediaConstraintsInterface*)
htaa2a49d92016-03-04 02:51:39 -080070 PROXY_METHOD2(void,
71 CreateOffer,
72 CreateSessionDescriptionObserver*,
73 const RTCOfferAnswerOptions&)
74 PROXY_METHOD2(void,
75 CreateAnswer,
76 CreateSessionDescriptionObserver*,
77 const RTCOfferAnswerOptions&)
deadbeefd99a2002017-01-18 08:55:23 -080078 PROXY_METHOD2(void,
79 SetLocalDescription,
80 SetSessionDescriptionObserver*,
henrike@webrtc.org28e20752013-07-10 00:45:36 +000081 SessionDescriptionInterface*)
deadbeefd99a2002017-01-18 08:55:23 -080082 PROXY_METHOD2(void,
83 SetRemoteDescription,
84 SetSessionDescriptionObserver*,
henrike@webrtc.org28e20752013-07-10 00:45:36 +000085 SessionDescriptionInterface*)
deadbeef46c73892016-11-16 19:42:04 -080086 PROXY_METHOD0(PeerConnectionInterface::RTCConfiguration, GetConfiguration);
deadbeef293e9262017-01-11 12:28:30 -080087 PROXY_METHOD2(bool,
88 SetConfiguration,
89 const PeerConnectionInterface::RTCConfiguration&,
90 RTCError*);
deadbeef1e234612016-12-24 01:43:32 -080091 PROXY_METHOD1(bool,
deadbeefa67696b2015-09-29 11:56:26 -070092 SetConfiguration,
deadbeef1e234612016-12-24 01:43:32 -080093 const PeerConnectionInterface::RTCConfiguration&);
henrike@webrtc.org28e20752013-07-10 00:45:36 +000094 PROXY_METHOD1(bool, AddIceCandidate, const IceCandidateInterface*)
Honghai Zhang7fb69db2016-03-14 11:59:18 -070095 PROXY_METHOD1(bool,
96 RemoveIceCandidates,
97 const std::vector<cricket::Candidate>&);
buildbot@webrtc.org1567b8c2014-05-08 19:54:16 +000098 PROXY_METHOD1(void, RegisterUMAObserver, UMAObserver*)
henrike@webrtc.org28e20752013-07-10 00:45:36 +000099 PROXY_METHOD0(SignalingState, signaling_state)
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000100 PROXY_METHOD0(IceConnectionState, ice_connection_state)
101 PROXY_METHOD0(IceGatheringState, ice_gathering_state)
ivoc14d5dbe2016-07-04 07:06:55 -0700102 PROXY_METHOD2(bool, StartRtcEventLog, rtc::PlatformFile, int64_t)
103 PROXY_METHOD0(void, StopRtcEventLog)
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000104 PROXY_METHOD0(void, Close)
deadbeefd99a2002017-01-18 08:55:23 -0800105END_PROXY_MAP()
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000106
107} // namespace webrtc
108
Henrik Kjellander15583c12016-02-10 10:53:12 +0100109#endif // WEBRTC_API_PEERCONNECTIONPROXY_H_