perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 1 | /* |
kjellander | b24317b | 2016-02-10 07:54:43 -0800 | [diff] [blame] | 2 | * Copyright 2014 The WebRTC project authors. All Rights Reserved. |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +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. |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 9 | */ |
jlmiller@webrtc.org | 5f93d0a | 2015-01-20 21:36:13 +0000 | [diff] [blame] | 10 | |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 11 | #ifndef WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_ |
| 12 | #define WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_ |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 13 | |
kwiberg | d1fe281 | 2016-04-27 06:47:29 -0700 | [diff] [blame] | 14 | #include <memory> |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 15 | #include <string> |
kwiberg | 0eb15ed | 2015-12-17 03:04:15 -0800 | [diff] [blame] | 16 | #include <utility> |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 17 | |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 18 | #include "webrtc/api/peerconnectioninterface.h" |
| 19 | #include "webrtc/api/proxy.h" |
Henrik Boström | 5e56c59 | 2015-08-11 10:33:13 +0200 | [diff] [blame] | 20 | #include "webrtc/base/bind.h" |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 21 | |
| 22 | namespace webrtc { |
| 23 | |
deadbeef | b10f32f | 2017-02-08 01:38:21 -0800 | [diff] [blame^] | 24 | // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods |
| 25 | // are called on is an implementation detail. |
nisse | 72c8d2b | 2016-04-15 03:49:07 -0700 | [diff] [blame] | 26 | BEGIN_SIGNALING_PROXY_MAP(PeerConnectionFactory) |
deadbeef | d99a200 | 2017-01-18 08:55:23 -0800 | [diff] [blame] | 27 | PROXY_SIGNALING_THREAD_DESTRUCTOR() |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 28 | PROXY_METHOD1(void, SetOptions, const Options&) |
deadbeef | d99a200 | 2017-01-18 08:55:23 -0800 | [diff] [blame] | 29 | PROXY_METHOD5(rtc::scoped_refptr<PeerConnectionInterface>, |
| 30 | CreatePeerConnection, |
| 31 | const PeerConnectionInterface::RTCConfiguration&, |
| 32 | const MediaConstraintsInterface*, |
| 33 | std::unique_ptr<cricket::PortAllocator>, |
| 34 | std::unique_ptr<rtc::RTCCertificateGeneratorInterface>, |
| 35 | PeerConnectionObserver*); |
| 36 | PROXY_METHOD4(rtc::scoped_refptr<PeerConnectionInterface>, |
| 37 | CreatePeerConnection, |
| 38 | const PeerConnectionInterface::RTCConfiguration&, |
| 39 | std::unique_ptr<cricket::PortAllocator>, |
| 40 | std::unique_ptr<rtc::RTCCertificateGeneratorInterface>, |
| 41 | PeerConnectionObserver*); |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 42 | PROXY_METHOD1(rtc::scoped_refptr<MediaStreamInterface>, |
| 43 | CreateLocalMediaStream, const std::string&) |
| 44 | PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>, |
| 45 | CreateAudioSource, const MediaConstraintsInterface*) |
hta | a2a49d9 | 2016-03-04 02:51:39 -0800 | [diff] [blame] | 46 | PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>, |
| 47 | CreateAudioSource, |
| 48 | const cricket::AudioOptions&) |
perkj | a3ede6c | 2016-03-08 01:27:48 +0100 | [diff] [blame] | 49 | PROXY_METHOD2(rtc::scoped_refptr<VideoTrackSourceInterface>, |
| 50 | CreateVideoSource, |
| 51 | cricket::VideoCapturer*, |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 52 | const MediaConstraintsInterface*) |
perkj | a3ede6c | 2016-03-08 01:27:48 +0100 | [diff] [blame] | 53 | PROXY_METHOD1(rtc::scoped_refptr<VideoTrackSourceInterface>, |
hta | a2a49d9 | 2016-03-04 02:51:39 -0800 | [diff] [blame] | 54 | CreateVideoSource, |
| 55 | cricket::VideoCapturer*) |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 56 | PROXY_METHOD2(rtc::scoped_refptr<VideoTrackInterface>, |
perkj | a3ede6c | 2016-03-08 01:27:48 +0100 | [diff] [blame] | 57 | CreateVideoTrack, |
| 58 | const std::string&, |
| 59 | VideoTrackSourceInterface*) |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 60 | PROXY_METHOD2(rtc::scoped_refptr<AudioTrackInterface>, |
| 61 | CreateAudioTrack, const std::string&, AudioSourceInterface*) |
ivoc | d66b44d | 2016-01-15 03:06:36 -0800 | [diff] [blame] | 62 | PROXY_METHOD2(bool, StartAecDump, rtc::PlatformFile, int64_t) |
ivoc | 797ef12 | 2015-10-22 03:25:41 -0700 | [diff] [blame] | 63 | PROXY_METHOD0(void, StopAecDump) |
ivoc | 14d5dbe | 2016-07-04 07:06:55 -0700 | [diff] [blame] | 64 | // TODO(ivoc): Remove the StartRtcEventLog and StopRtcEventLog functions as |
| 65 | // soon as they are removed from PeerConnectionFactoryInterface. |
ivoc | 112a3d8 | 2015-10-16 02:22:18 -0700 | [diff] [blame] | 66 | PROXY_METHOD1(bool, StartRtcEventLog, rtc::PlatformFile) |
ivoc | c1513ee | 2016-05-13 08:30:39 -0700 | [diff] [blame] | 67 | PROXY_METHOD2(bool, StartRtcEventLog, rtc::PlatformFile, int64_t) |
ivoc | 112a3d8 | 2015-10-16 02:22:18 -0700 | [diff] [blame] | 68 | PROXY_METHOD0(void, StopRtcEventLog) |
deadbeef | d99a200 | 2017-01-18 08:55:23 -0800 | [diff] [blame] | 69 | END_PROXY_MAP() |
perkj@webrtc.org | 81134d0 | 2015-01-12 08:30:16 +0000 | [diff] [blame] | 70 | |
| 71 | } // namespace webrtc |
| 72 | |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 73 | #endif // WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_ |