henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 1 | /* |
kjellander | b24317b | 2016-02-10 07:54:43 -0800 | [diff] [blame] | 2 | * Copyright 2012 The WebRTC project authors. All Rights Reserved. |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 3 | * |
kjellander | b24317b | 2016-02-10 07:54:43 -0800 | [diff] [blame] | 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 |
| 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.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 9 | */ |
| 10 | |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 11 | #ifndef WEBRTC_API_PEERCONNECTIONPROXY_H_ |
| 12 | #define WEBRTC_API_PEERCONNECTIONPROXY_H_ |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 13 | |
oprypin | 803dc29 | 2017-02-01 01:55:59 -0800 | [diff] [blame] | 14 | #include <string> |
| 15 | #include <vector> |
| 16 | |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 17 | #include "webrtc/api/peerconnectioninterface.h" |
| 18 | #include "webrtc/api/proxy.h" |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 19 | |
| 20 | namespace webrtc { |
| 21 | |
deadbeef | b10f32f | 2017-02-08 01:38:21 -0800 | [diff] [blame^] | 22 | // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods |
| 23 | // are called on is an implementation detail. |
nisse | 72c8d2b | 2016-04-15 03:49:07 -0700 | [diff] [blame] | 24 | BEGIN_SIGNALING_PROXY_MAP(PeerConnection) |
deadbeef | d99a200 | 2017-01-18 08:55:23 -0800 | [diff] [blame] | 25 | PROXY_SIGNALING_THREAD_DESTRUCTOR() |
| 26 | PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>, local_streams) |
| 27 | PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>, remote_streams) |
perkj@webrtc.org | c2dd5ee | 2014-11-04 11:31:29 +0000 | [diff] [blame] | 28 | PROXY_METHOD1(bool, AddStream, MediaStreamInterface*) |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 29 | PROXY_METHOD1(void, RemoveStream, MediaStreamInterface*) |
deadbeef | e1f9d83 | 2016-01-14 15:35:42 -0800 | [diff] [blame] | 30 | PROXY_METHOD2(rtc::scoped_refptr<RtpSenderInterface>, |
| 31 | AddTrack, |
| 32 | MediaStreamTrackInterface*, |
| 33 | std::vector<MediaStreamInterface*>) |
| 34 | PROXY_METHOD1(bool, RemoveTrack, RtpSenderInterface*) |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 35 | PROXY_METHOD1(rtc::scoped_refptr<DtmfSenderInterface>, |
deadbeef | d99a200 | 2017-01-18 08:55:23 -0800 | [diff] [blame] | 36 | CreateDtmfSender, |
| 37 | AudioTrackInterface*) |
deadbeef | bd7d8f7 | 2015-12-18 16:58:44 -0800 | [diff] [blame] | 38 | PROXY_METHOD2(rtc::scoped_refptr<RtpSenderInterface>, |
deadbeef | fac0655 | 2015-11-25 11:26:01 -0800 | [diff] [blame] | 39 | CreateSender, |
deadbeef | bd7d8f7 | 2015-12-18 16:58:44 -0800 | [diff] [blame] | 40 | const std::string&, |
deadbeef | fac0655 | 2015-11-25 11:26:01 -0800 | [diff] [blame] | 41 | const std::string&) |
deadbeef | 70ab1a1 | 2015-09-28 16:53:55 -0700 | [diff] [blame] | 42 | PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpSenderInterface>>, |
| 43 | GetSenders) |
| 44 | PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpReceiverInterface>>, |
| 45 | GetReceivers) |
deadbeef | d99a200 | 2017-01-18 08:55:23 -0800 | [diff] [blame] | 46 | PROXY_METHOD3(bool, |
| 47 | GetStats, |
| 48 | StatsObserver*, |
wu@webrtc.org | b9a088b | 2014-02-13 23:18:49 +0000 | [diff] [blame] | 49 | MediaStreamTrackInterface*, |
| 50 | StatsOutputLevel) |
hbos | 74e1a4f | 2016-09-15 23:33:01 -0700 | [diff] [blame] | 51 | PROXY_METHOD1(void, GetStats, RTCStatsCollectorCallback*) |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 52 | PROXY_METHOD2(rtc::scoped_refptr<DataChannelInterface>, |
deadbeef | d99a200 | 2017-01-18 08:55:23 -0800 | [diff] [blame] | 53 | CreateDataChannel, |
| 54 | const std::string&, |
| 55 | const DataChannelInit*) |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 56 | PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, local_description) |
| 57 | PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, remote_description) |
deadbeef | fe4a8a4 | 2016-12-20 17:56:17 -0800 | [diff] [blame] | 58 | PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, |
| 59 | pending_local_description) |
| 60 | PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, |
| 61 | pending_remote_description) |
| 62 | PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, |
| 63 | current_local_description) |
| 64 | PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, |
| 65 | current_remote_description) |
deadbeef | d99a200 | 2017-01-18 08:55:23 -0800 | [diff] [blame] | 66 | PROXY_METHOD2(void, |
| 67 | CreateOffer, |
| 68 | CreateSessionDescriptionObserver*, |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 69 | const MediaConstraintsInterface*) |
deadbeef | d99a200 | 2017-01-18 08:55:23 -0800 | [diff] [blame] | 70 | PROXY_METHOD2(void, |
| 71 | CreateAnswer, |
| 72 | CreateSessionDescriptionObserver*, |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 73 | const MediaConstraintsInterface*) |
hta | a2a49d9 | 2016-03-04 02:51:39 -0800 | [diff] [blame] | 74 | PROXY_METHOD2(void, |
| 75 | CreateOffer, |
| 76 | CreateSessionDescriptionObserver*, |
| 77 | const RTCOfferAnswerOptions&) |
| 78 | PROXY_METHOD2(void, |
| 79 | CreateAnswer, |
| 80 | CreateSessionDescriptionObserver*, |
| 81 | const RTCOfferAnswerOptions&) |
deadbeef | d99a200 | 2017-01-18 08:55:23 -0800 | [diff] [blame] | 82 | PROXY_METHOD2(void, |
| 83 | SetLocalDescription, |
| 84 | SetSessionDescriptionObserver*, |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 85 | SessionDescriptionInterface*) |
deadbeef | d99a200 | 2017-01-18 08:55:23 -0800 | [diff] [blame] | 86 | PROXY_METHOD2(void, |
| 87 | SetRemoteDescription, |
| 88 | SetSessionDescriptionObserver*, |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 89 | SessionDescriptionInterface*) |
deadbeef | 46c7389 | 2016-11-16 19:42:04 -0800 | [diff] [blame] | 90 | PROXY_METHOD0(PeerConnectionInterface::RTCConfiguration, GetConfiguration); |
deadbeef | 293e926 | 2017-01-11 12:28:30 -0800 | [diff] [blame] | 91 | PROXY_METHOD2(bool, |
| 92 | SetConfiguration, |
| 93 | const PeerConnectionInterface::RTCConfiguration&, |
| 94 | RTCError*); |
deadbeef | 1e23461 | 2016-12-24 01:43:32 -0800 | [diff] [blame] | 95 | PROXY_METHOD1(bool, |
deadbeef | a67696b | 2015-09-29 11:56:26 -0700 | [diff] [blame] | 96 | SetConfiguration, |
deadbeef | 1e23461 | 2016-12-24 01:43:32 -0800 | [diff] [blame] | 97 | const PeerConnectionInterface::RTCConfiguration&); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 98 | PROXY_METHOD1(bool, AddIceCandidate, const IceCandidateInterface*) |
Honghai Zhang | 7fb69db | 2016-03-14 11:59:18 -0700 | [diff] [blame] | 99 | PROXY_METHOD1(bool, |
| 100 | RemoveIceCandidates, |
| 101 | const std::vector<cricket::Candidate>&); |
buildbot@webrtc.org | 1567b8c | 2014-05-08 19:54:16 +0000 | [diff] [blame] | 102 | PROXY_METHOD1(void, RegisterUMAObserver, UMAObserver*) |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 103 | PROXY_METHOD0(SignalingState, signaling_state) |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 104 | PROXY_METHOD0(IceConnectionState, ice_connection_state) |
| 105 | PROXY_METHOD0(IceGatheringState, ice_gathering_state) |
ivoc | 14d5dbe | 2016-07-04 07:06:55 -0700 | [diff] [blame] | 106 | PROXY_METHOD2(bool, StartRtcEventLog, rtc::PlatformFile, int64_t) |
| 107 | PROXY_METHOD0(void, StopRtcEventLog) |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 108 | PROXY_METHOD0(void, Close) |
deadbeef | d99a200 | 2017-01-18 08:55:23 -0800 | [diff] [blame] | 109 | END_PROXY_MAP() |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 110 | |
| 111 | } // namespace webrtc |
| 112 | |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 113 | #endif // WEBRTC_API_PEERCONNECTIONPROXY_H_ |