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 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #ifndef API_PEERCONNECTIONPROXY_H_ |
| 12 | #define API_PEERCONNECTIONPROXY_H_ |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 13 | |
Elad Alon | 99c3fe5 | 2017-10-13 16:29:40 +0200 | [diff] [blame] | 14 | #include <memory> |
oprypin | 803dc29 | 2017-02-01 01:55:59 -0800 | [diff] [blame] | 15 | #include <string> |
| 16 | #include <vector> |
| 17 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 18 | #include "api/peerconnectioninterface.h" |
| 19 | #include "api/proxy.h" |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 20 | |
| 21 | namespace webrtc { |
| 22 | |
deadbeef | b10f32f | 2017-02-08 01:38:21 -0800 | [diff] [blame] | 23 | // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods |
| 24 | // are called on is an implementation detail. |
nisse | 72c8d2b | 2016-04-15 03:49:07 -0700 | [diff] [blame] | 25 | BEGIN_SIGNALING_PROXY_MAP(PeerConnection) |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 26 | PROXY_SIGNALING_THREAD_DESTRUCTOR() |
| 27 | PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>, local_streams) |
| 28 | PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>, remote_streams) |
| 29 | PROXY_METHOD1(bool, AddStream, MediaStreamInterface*) |
| 30 | PROXY_METHOD1(void, RemoveStream, MediaStreamInterface*) |
| 31 | PROXY_METHOD2(RTCErrorOr<rtc::scoped_refptr<RtpSenderInterface>>, |
| 32 | AddTrack, |
| 33 | rtc::scoped_refptr<MediaStreamTrackInterface>, |
| 34 | const std::vector<std::string>&); |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 35 | PROXY_METHOD1(bool, RemoveTrack, RtpSenderInterface*) |
| 36 | PROXY_METHOD1(RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>>, |
| 37 | AddTransceiver, |
| 38 | rtc::scoped_refptr<MediaStreamTrackInterface>) |
| 39 | PROXY_METHOD2(RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>>, |
| 40 | AddTransceiver, |
| 41 | rtc::scoped_refptr<MediaStreamTrackInterface>, |
| 42 | const RtpTransceiverInit&) |
| 43 | PROXY_METHOD1(RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>>, |
| 44 | AddTransceiver, |
| 45 | cricket::MediaType) |
| 46 | PROXY_METHOD2(RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>>, |
| 47 | AddTransceiver, |
| 48 | cricket::MediaType, |
| 49 | const RtpTransceiverInit&) |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 50 | PROXY_METHOD2(rtc::scoped_refptr<RtpSenderInterface>, |
| 51 | CreateSender, |
| 52 | const std::string&, |
| 53 | const std::string&) |
| 54 | PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpSenderInterface>>, |
| 55 | GetSenders) |
| 56 | PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpReceiverInterface>>, |
| 57 | GetReceivers) |
| 58 | PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpTransceiverInterface>>, |
| 59 | GetTransceivers) |
| 60 | PROXY_METHOD3(bool, |
| 61 | GetStats, |
| 62 | StatsObserver*, |
| 63 | MediaStreamTrackInterface*, |
| 64 | StatsOutputLevel) |
| 65 | PROXY_METHOD1(void, GetStats, RTCStatsCollectorCallback*) |
| 66 | PROXY_METHOD2(void, |
| 67 | GetStats, |
| 68 | rtc::scoped_refptr<RtpSenderInterface>, |
| 69 | rtc::scoped_refptr<RTCStatsCollectorCallback>); |
| 70 | PROXY_METHOD2(void, |
| 71 | GetStats, |
| 72 | rtc::scoped_refptr<RtpReceiverInterface>, |
| 73 | rtc::scoped_refptr<RTCStatsCollectorCallback>); |
| 74 | PROXY_METHOD2(rtc::scoped_refptr<DataChannelInterface>, |
| 75 | CreateDataChannel, |
| 76 | const std::string&, |
| 77 | const DataChannelInit*) |
| 78 | PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, local_description) |
| 79 | PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, remote_description) |
| 80 | PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, |
| 81 | pending_local_description) |
| 82 | PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, |
| 83 | pending_remote_description) |
| 84 | PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, |
| 85 | current_local_description) |
| 86 | PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, |
| 87 | current_remote_description) |
| 88 | PROXY_METHOD2(void, |
| 89 | CreateOffer, |
| 90 | CreateSessionDescriptionObserver*, |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 91 | const RTCOfferAnswerOptions&) |
| 92 | PROXY_METHOD2(void, |
| 93 | CreateAnswer, |
| 94 | CreateSessionDescriptionObserver*, |
| 95 | const RTCOfferAnswerOptions&) |
| 96 | PROXY_METHOD2(void, |
| 97 | SetLocalDescription, |
| 98 | SetSessionDescriptionObserver*, |
| 99 | SessionDescriptionInterface*) |
| 100 | PROXY_METHOD2(void, |
| 101 | SetRemoteDescription, |
| 102 | SetSessionDescriptionObserver*, |
| 103 | SessionDescriptionInterface*) |
| 104 | PROXY_METHOD2(void, |
| 105 | SetRemoteDescription, |
| 106 | std::unique_ptr<SessionDescriptionInterface>, |
| 107 | rtc::scoped_refptr<SetRemoteDescriptionObserverInterface>); |
| 108 | PROXY_METHOD0(PeerConnectionInterface::RTCConfiguration, GetConfiguration); |
| 109 | PROXY_METHOD2(bool, |
| 110 | SetConfiguration, |
| 111 | const PeerConnectionInterface::RTCConfiguration&, |
| 112 | RTCError*); |
| 113 | PROXY_METHOD1(bool, |
| 114 | SetConfiguration, |
| 115 | const PeerConnectionInterface::RTCConfiguration&); |
| 116 | PROXY_METHOD1(bool, AddIceCandidate, const IceCandidateInterface*) |
| 117 | PROXY_METHOD1(bool, |
| 118 | RemoveIceCandidates, |
| 119 | const std::vector<cricket::Candidate>&); |
| 120 | PROXY_METHOD1(void, SetAudioPlayout, bool) |
| 121 | PROXY_METHOD1(void, SetAudioRecording, bool) |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 122 | PROXY_METHOD1(RTCError, SetBitrate, const BitrateSettings&); |
| 123 | PROXY_METHOD1(void, |
| 124 | SetBitrateAllocationStrategy, |
| 125 | std::unique_ptr<rtc::BitrateAllocationStrategy>); |
| 126 | PROXY_METHOD0(SignalingState, signaling_state) |
| 127 | PROXY_METHOD0(IceConnectionState, ice_connection_state) |
| 128 | PROXY_METHOD0(IceGatheringState, ice_gathering_state) |
| 129 | PROXY_METHOD2(bool, StartRtcEventLog, rtc::PlatformFile, int64_t) |
| 130 | PROXY_METHOD2(bool, |
| 131 | StartRtcEventLog, |
| 132 | std::unique_ptr<RtcEventLogOutput>, |
| 133 | int64_t); |
| 134 | PROXY_METHOD0(void, StopRtcEventLog) |
| 135 | PROXY_METHOD0(void, Close) |
deadbeef | d99a200 | 2017-01-18 08:55:23 -0800 | [diff] [blame] | 136 | END_PROXY_MAP() |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 137 | |
| 138 | } // namespace webrtc |
| 139 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 140 | #endif // API_PEERCONNECTIONPROXY_H_ |