henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 | [diff] [blame] | 1 | /* |
kjellander | b24317b | 2016-02-10 15:54:43 | [diff] [blame] | 2 | * Copyright 2012 The WebRTC project authors. All Rights Reserved. |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 | [diff] [blame] | 3 | * |
kjellander | b24317b | 2016-02-10 15:54:43 | [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 | [diff] [blame] | 9 | */ |
| 10 | |
Steve Anton | 10542f2 | 2019-01-11 17:11:00 | [diff] [blame] | 11 | #ifndef API_PEER_CONNECTION_PROXY_H_ |
| 12 | #define API_PEER_CONNECTION_PROXY_H_ |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 | [diff] [blame] | 13 | |
Elad Alon | 99c3fe5 | 2017-10-13 14:29:40 | [diff] [blame] | 14 | #include <memory> |
oprypin | 803dc29 | 2017-02-01 09:55:59 | [diff] [blame] | 15 | #include <string> |
| 16 | #include <vector> |
| 17 | |
Steve Anton | 10542f2 | 2019-01-11 17:11:00 | [diff] [blame] | 18 | #include "api/peer_connection_interface.h" |
Mirko Bonadei | 92ea95e | 2017-09-15 04:47:31 | [diff] [blame] | 19 | #include "api/proxy.h" |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 | [diff] [blame] | 20 | |
| 21 | namespace webrtc { |
| 22 | |
deadbeef | b10f32f | 2017-02-08 09:38:21 | [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 10:49:07 | [diff] [blame] | 25 | BEGIN_SIGNALING_PROXY_MAP(PeerConnection) |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [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>, |
Steve Anton | e920351 | 2018-12-19 00:29:34 | [diff] [blame] | 34 | const std::vector<std::string>&) |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 35 | PROXY_METHOD1(bool, RemoveTrack, RtpSenderInterface*) |
Steve Anton | e920351 | 2018-12-19 00:29:34 | [diff] [blame] | 36 | PROXY_METHOD1(RTCError, RemoveTrackNew, rtc::scoped_refptr<RtpSenderInterface>) |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 37 | PROXY_METHOD1(RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>>, |
| 38 | AddTransceiver, |
| 39 | rtc::scoped_refptr<MediaStreamTrackInterface>) |
| 40 | PROXY_METHOD2(RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>>, |
| 41 | AddTransceiver, |
| 42 | rtc::scoped_refptr<MediaStreamTrackInterface>, |
| 43 | const RtpTransceiverInit&) |
| 44 | PROXY_METHOD1(RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>>, |
| 45 | AddTransceiver, |
| 46 | cricket::MediaType) |
| 47 | PROXY_METHOD2(RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>>, |
| 48 | AddTransceiver, |
| 49 | cricket::MediaType, |
| 50 | const RtpTransceiverInit&) |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 51 | PROXY_METHOD2(rtc::scoped_refptr<RtpSenderInterface>, |
| 52 | CreateSender, |
| 53 | const std::string&, |
| 54 | const std::string&) |
| 55 | PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpSenderInterface>>, |
| 56 | GetSenders) |
| 57 | PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpReceiverInterface>>, |
| 58 | GetReceivers) |
| 59 | PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpTransceiverInterface>>, |
| 60 | GetTransceivers) |
| 61 | PROXY_METHOD3(bool, |
| 62 | GetStats, |
| 63 | StatsObserver*, |
| 64 | MediaStreamTrackInterface*, |
| 65 | StatsOutputLevel) |
| 66 | PROXY_METHOD1(void, GetStats, RTCStatsCollectorCallback*) |
| 67 | PROXY_METHOD2(void, |
| 68 | GetStats, |
| 69 | rtc::scoped_refptr<RtpSenderInterface>, |
Steve Anton | e920351 | 2018-12-19 00:29:34 | [diff] [blame] | 70 | rtc::scoped_refptr<RTCStatsCollectorCallback>) |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 71 | PROXY_METHOD2(void, |
| 72 | GetStats, |
| 73 | rtc::scoped_refptr<RtpReceiverInterface>, |
Steve Anton | e920351 | 2018-12-19 00:29:34 | [diff] [blame] | 74 | rtc::scoped_refptr<RTCStatsCollectorCallback>) |
Niels Möller | 7b04a91 | 2019-09-13 13:41:21 | [diff] [blame^] | 75 | PROXY_METHOD0(void, ClearStatsCache) |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 76 | PROXY_METHOD2(rtc::scoped_refptr<DataChannelInterface>, |
| 77 | CreateDataChannel, |
| 78 | const std::string&, |
| 79 | const DataChannelInit*) |
| 80 | PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, local_description) |
| 81 | PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, remote_description) |
| 82 | PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 83 | current_local_description) |
| 84 | PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, |
| 85 | current_remote_description) |
Steve Anton | e920351 | 2018-12-19 00:29:34 | [diff] [blame] | 86 | PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, |
| 87 | pending_local_description) |
| 88 | PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, |
| 89 | pending_remote_description) |
Henrik Boström | 79b6980 | 2019-07-18 09:16:56 | [diff] [blame] | 90 | PROXY_METHOD0(void, RestartIce) |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 91 | PROXY_METHOD2(void, |
| 92 | CreateOffer, |
| 93 | CreateSessionDescriptionObserver*, |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 94 | const RTCOfferAnswerOptions&) |
| 95 | PROXY_METHOD2(void, |
| 96 | CreateAnswer, |
| 97 | CreateSessionDescriptionObserver*, |
| 98 | const RTCOfferAnswerOptions&) |
| 99 | PROXY_METHOD2(void, |
| 100 | SetLocalDescription, |
| 101 | SetSessionDescriptionObserver*, |
| 102 | SessionDescriptionInterface*) |
| 103 | PROXY_METHOD2(void, |
| 104 | SetRemoteDescription, |
| 105 | SetSessionDescriptionObserver*, |
| 106 | SessionDescriptionInterface*) |
| 107 | PROXY_METHOD2(void, |
| 108 | SetRemoteDescription, |
| 109 | std::unique_ptr<SessionDescriptionInterface>, |
Steve Anton | e920351 | 2018-12-19 00:29:34 | [diff] [blame] | 110 | rtc::scoped_refptr<SetRemoteDescriptionObserverInterface>) |
| 111 | PROXY_METHOD0(PeerConnectionInterface::RTCConfiguration, GetConfiguration) |
Niels Möller | 2579f0c | 2019-08-19 07:58:17 | [diff] [blame] | 112 | PROXY_METHOD1(RTCError, |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 113 | SetConfiguration, |
Steve Anton | e920351 | 2018-12-19 00:29:34 | [diff] [blame] | 114 | const PeerConnectionInterface::RTCConfiguration&) |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 115 | PROXY_METHOD1(bool, AddIceCandidate, const IceCandidateInterface*) |
Steve Anton | e920351 | 2018-12-19 00:29:34 | [diff] [blame] | 116 | PROXY_METHOD1(bool, RemoveIceCandidates, const std::vector<cricket::Candidate>&) |
| 117 | PROXY_METHOD1(RTCError, SetBitrate, const BitrateSettings&) |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 118 | PROXY_METHOD1(void, SetAudioPlayout, bool) |
| 119 | PROXY_METHOD1(void, SetAudioRecording, bool) |
Harald Alvestrand | 4139047 | 2018-12-03 17:45:19 | [diff] [blame] | 120 | PROXY_METHOD1(rtc::scoped_refptr<DtlsTransportInterface>, |
| 121 | LookupDtlsTransportByMid, |
| 122 | const std::string&) |
Harald Alvestrand | cdea67d | 2019-02-28 20:33:00 | [diff] [blame] | 123 | PROXY_CONSTMETHOD0(rtc::scoped_refptr<SctpTransportInterface>, GetSctpTransport) |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 124 | PROXY_METHOD0(SignalingState, signaling_state) |
| 125 | PROXY_METHOD0(IceConnectionState, ice_connection_state) |
Steve Anton | e920351 | 2018-12-19 00:29:34 | [diff] [blame] | 126 | PROXY_METHOD0(IceConnectionState, standardized_ice_connection_state) |
| 127 | PROXY_METHOD0(PeerConnectionState, peer_connection_state) |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 128 | PROXY_METHOD0(IceGatheringState, ice_gathering_state) |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 129 | PROXY_METHOD2(bool, |
| 130 | StartRtcEventLog, |
| 131 | std::unique_ptr<RtcEventLogOutput>, |
Steve Anton | e920351 | 2018-12-19 00:29:34 | [diff] [blame] | 132 | int64_t) |
Tim Haloun | 74e63b8 | 2019-06-04 18:23:32 | [diff] [blame] | 133 | PROXY_METHOD1(bool, StartRtcEventLog, std::unique_ptr<RtcEventLogOutput>) |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 134 | PROXY_METHOD0(void, StopRtcEventLog) |
| 135 | PROXY_METHOD0(void, Close) |
deadbeef | d99a200 | 2017-01-18 16:55:23 | [diff] [blame] | 136 | END_PROXY_MAP() |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 | [diff] [blame] | 137 | |
| 138 | } // namespace webrtc |
| 139 | |
Steve Anton | 10542f2 | 2019-01-11 17:11:00 | [diff] [blame] | 140 | #endif // API_PEER_CONNECTION_PROXY_H_ |