blob: 58a4272596ac81884c8d66ee090996bf5913429d [file] [log] [blame]
perkj@webrtc.org81134d02015-01-12 08:30:16 +00001/*
kjellanderb24317b2016-02-10 07:54:43 -08002 * Copyright 2014 The WebRTC project authors. All Rights Reserved.
perkj@webrtc.org81134d02015-01-12 08:30:16 +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.
perkj@webrtc.org81134d02015-01-12 08:30:16 +00009 */
jlmiller@webrtc.org5f93d0a2015-01-20 21:36:13 +000010
Steve Anton10542f22019-01-11 09:11:00 -080011#ifndef API_PEER_CONNECTION_FACTORY_PROXY_H_
12#define API_PEER_CONNECTION_FACTORY_PROXY_H_
perkj@webrtc.org81134d02015-01-12 08:30:16 +000013
kwibergd1fe2812016-04-27 06:47:29 -070014#include <memory>
perkj@webrtc.org81134d02015-01-12 08:30:16 +000015#include <string>
kwiberg0eb15ed2015-12-17 03:04:15 -080016#include <utility>
perkj@webrtc.org81134d02015-01-12 08:30:16 +000017
Steve Anton10542f22019-01-11 09:11:00 -080018#include "api/peer_connection_interface.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020019#include "api/proxy.h"
perkj@webrtc.org81134d02015-01-12 08:30:16 +000020
21namespace webrtc {
22
deadbeefb10f32f2017-02-08 01:38:21 -080023// TODO(deadbeef): Move this to .cc file and out of api/. What threads methods
24// are called on is an implementation detail.
nisse72c8d2b2016-04-15 03:49:07 -070025BEGIN_SIGNALING_PROXY_MAP(PeerConnectionFactory)
Yves Gerey665174f2018-06-19 15:03:05 +020026PROXY_SIGNALING_THREAD_DESTRUCTOR()
Yves Gerey665174f2018-06-19 15:03:05 +020027PROXY_METHOD1(void, SetOptions, const Options&)
Yves Gerey665174f2018-06-19 15:03:05 +020028PROXY_METHOD4(rtc::scoped_refptr<PeerConnectionInterface>,
29 CreatePeerConnection,
30 const PeerConnectionInterface::RTCConfiguration&,
31 std::unique_ptr<cricket::PortAllocator>,
32 std::unique_ptr<rtc::RTCCertificateGeneratorInterface>,
Nico Weber22f99252019-02-20 10:13:16 -050033 PeerConnectionObserver*)
Yves Gerey665174f2018-06-19 15:03:05 +020034PROXY_METHOD2(rtc::scoped_refptr<PeerConnectionInterface>,
35 CreatePeerConnection,
36 const PeerConnectionInterface::RTCConfiguration&,
Nico Weber22f99252019-02-20 10:13:16 -050037 PeerConnectionDependencies)
Harald Alvestrandfaaaa872020-11-27 11:30:21 +000038PROXY_METHOD2(RTCErrorOr<rtc::scoped_refptr<PeerConnectionInterface>>,
39 CreatePeerConnectionOrError,
40 const PeerConnectionInterface::RTCConfiguration&,
41 PeerConnectionDependencies)
Florent Castelli72b751a2018-06-28 14:09:33 +020042PROXY_CONSTMETHOD1(webrtc::RtpCapabilities,
43 GetRtpSenderCapabilities,
Nico Weber22f99252019-02-20 10:13:16 -050044 cricket::MediaType)
Florent Castelli72b751a2018-06-28 14:09:33 +020045PROXY_CONSTMETHOD1(webrtc::RtpCapabilities,
46 GetRtpReceiverCapabilities,
Nico Weber22f99252019-02-20 10:13:16 -050047 cricket::MediaType)
Yves Gerey665174f2018-06-19 15:03:05 +020048PROXY_METHOD1(rtc::scoped_refptr<MediaStreamInterface>,
49 CreateLocalMediaStream,
50 const std::string&)
51PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>,
52 CreateAudioSource,
53 const cricket::AudioOptions&)
Yves Gerey665174f2018-06-19 15:03:05 +020054PROXY_METHOD2(rtc::scoped_refptr<VideoTrackInterface>,
55 CreateVideoTrack,
56 const std::string&,
57 VideoTrackSourceInterface*)
58PROXY_METHOD2(rtc::scoped_refptr<AudioTrackInterface>,
59 CreateAudioTrack,
60 const std::string&,
61 AudioSourceInterface*)
Niels Möllere8e4dc42019-06-11 14:04:16 +020062PROXY_METHOD2(bool, StartAecDump, FILE*, int64_t)
Yves Gerey665174f2018-06-19 15:03:05 +020063PROXY_METHOD0(void, StopAecDump)
deadbeefd99a2002017-01-18 08:55:23 -080064END_PROXY_MAP()
perkj@webrtc.org81134d02015-01-12 08:30:16 +000065
66} // namespace webrtc
67
Steve Anton10542f22019-01-11 09:11:00 -080068#endif // API_PEER_CONNECTION_FACTORY_PROXY_H_