2013-07-10 00:45:36 +00:00
|
|
|
/*
|
2016-02-10 07:54:43 -08:00
|
|
|
* Copyright 2012 The WebRTC project authors. All Rights Reserved.
|
2013-07-10 00:45:36 +00:00
|
|
|
*
|
2016-02-10 07:54:43 -08:00
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
2013-07-10 00:45:36 +00:00
|
|
|
*/
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#ifndef API_PEERCONNECTIONPROXY_H_
|
|
|
|
|
#define API_PEERCONNECTIONPROXY_H_
|
2013-07-10 00:45:36 +00:00
|
|
|
|
2017-10-13 16:29:40 +02:00
|
|
|
#include <memory>
|
2017-02-01 01:55:59 -08:00
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "api/peerconnectioninterface.h"
|
|
|
|
|
#include "api/proxy.h"
|
2013-07-10 00:45:36 +00:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
2017-02-08 01:38:21 -08:00
|
|
|
// TODO(deadbeef): Move this to .cc file and out of api/. What threads methods
|
|
|
|
|
// are called on is an implementation detail.
|
2016-04-15 03:49:07 -07:00
|
|
|
BEGIN_SIGNALING_PROXY_MAP(PeerConnection)
|
2017-01-18 08:55:23 -08:00
|
|
|
PROXY_SIGNALING_THREAD_DESTRUCTOR()
|
|
|
|
|
PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>, local_streams)
|
|
|
|
|
PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>, remote_streams)
|
2014-11-04 11:31:29 +00:00
|
|
|
PROXY_METHOD1(bool, AddStream, MediaStreamInterface*)
|
2013-07-10 00:45:36 +00:00
|
|
|
PROXY_METHOD1(void, RemoveStream, MediaStreamInterface*)
|
2016-01-14 15:35:42 -08:00
|
|
|
PROXY_METHOD2(rtc::scoped_refptr<RtpSenderInterface>,
|
|
|
|
|
AddTrack,
|
|
|
|
|
MediaStreamTrackInterface*,
|
|
|
|
|
std::vector<MediaStreamInterface*>)
|
|
|
|
|
PROXY_METHOD1(bool, RemoveTrack, RtpSenderInterface*)
|
2014-07-29 17:36:52 +00:00
|
|
|
PROXY_METHOD1(rtc::scoped_refptr<DtmfSenderInterface>,
|
2017-01-18 08:55:23 -08:00
|
|
|
CreateDtmfSender,
|
|
|
|
|
AudioTrackInterface*)
|
2015-12-18 16:58:44 -08:00
|
|
|
PROXY_METHOD2(rtc::scoped_refptr<RtpSenderInterface>,
|
2015-11-25 11:26:01 -08:00
|
|
|
CreateSender,
|
2015-12-18 16:58:44 -08:00
|
|
|
const std::string&,
|
2015-11-25 11:26:01 -08:00
|
|
|
const std::string&)
|
2015-09-28 16:53:55 -07:00
|
|
|
PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpSenderInterface>>,
|
|
|
|
|
GetSenders)
|
|
|
|
|
PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpReceiverInterface>>,
|
|
|
|
|
GetReceivers)
|
2017-01-18 08:55:23 -08:00
|
|
|
PROXY_METHOD3(bool,
|
|
|
|
|
GetStats,
|
|
|
|
|
StatsObserver*,
|
2014-02-13 23:18:49 +00:00
|
|
|
MediaStreamTrackInterface*,
|
|
|
|
|
StatsOutputLevel)
|
2016-09-15 23:33:01 -07:00
|
|
|
PROXY_METHOD1(void, GetStats, RTCStatsCollectorCallback*)
|
2014-07-29 17:36:52 +00:00
|
|
|
PROXY_METHOD2(rtc::scoped_refptr<DataChannelInterface>,
|
2017-01-18 08:55:23 -08:00
|
|
|
CreateDataChannel,
|
|
|
|
|
const std::string&,
|
|
|
|
|
const DataChannelInit*)
|
2013-07-10 00:45:36 +00:00
|
|
|
PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, local_description)
|
|
|
|
|
PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, remote_description)
|
2016-12-20 17:56:17 -08:00
|
|
|
PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
|
|
|
|
|
pending_local_description)
|
|
|
|
|
PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
|
|
|
|
|
pending_remote_description)
|
|
|
|
|
PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
|
|
|
|
|
current_local_description)
|
|
|
|
|
PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
|
|
|
|
|
current_remote_description)
|
2017-01-18 08:55:23 -08:00
|
|
|
PROXY_METHOD2(void,
|
|
|
|
|
CreateOffer,
|
|
|
|
|
CreateSessionDescriptionObserver*,
|
2013-07-10 00:45:36 +00:00
|
|
|
const MediaConstraintsInterface*)
|
2017-01-18 08:55:23 -08:00
|
|
|
PROXY_METHOD2(void,
|
|
|
|
|
CreateAnswer,
|
|
|
|
|
CreateSessionDescriptionObserver*,
|
2013-07-10 00:45:36 +00:00
|
|
|
const MediaConstraintsInterface*)
|
2016-03-04 02:51:39 -08:00
|
|
|
PROXY_METHOD2(void,
|
|
|
|
|
CreateOffer,
|
|
|
|
|
CreateSessionDescriptionObserver*,
|
|
|
|
|
const RTCOfferAnswerOptions&)
|
|
|
|
|
PROXY_METHOD2(void,
|
|
|
|
|
CreateAnswer,
|
|
|
|
|
CreateSessionDescriptionObserver*,
|
|
|
|
|
const RTCOfferAnswerOptions&)
|
2017-01-18 08:55:23 -08:00
|
|
|
PROXY_METHOD2(void,
|
|
|
|
|
SetLocalDescription,
|
|
|
|
|
SetSessionDescriptionObserver*,
|
2013-07-10 00:45:36 +00:00
|
|
|
SessionDescriptionInterface*)
|
2017-01-18 08:55:23 -08:00
|
|
|
PROXY_METHOD2(void,
|
|
|
|
|
SetRemoteDescription,
|
|
|
|
|
SetSessionDescriptionObserver*,
|
2013-07-10 00:45:36 +00:00
|
|
|
SessionDescriptionInterface*)
|
2016-11-16 19:42:04 -08:00
|
|
|
PROXY_METHOD0(PeerConnectionInterface::RTCConfiguration, GetConfiguration);
|
2017-01-11 12:28:30 -08:00
|
|
|
PROXY_METHOD2(bool,
|
|
|
|
|
SetConfiguration,
|
|
|
|
|
const PeerConnectionInterface::RTCConfiguration&,
|
|
|
|
|
RTCError*);
|
2016-12-24 01:43:32 -08:00
|
|
|
PROXY_METHOD1(bool,
|
2015-09-29 11:56:26 -07:00
|
|
|
SetConfiguration,
|
2016-12-24 01:43:32 -08:00
|
|
|
const PeerConnectionInterface::RTCConfiguration&);
|
2013-07-10 00:45:36 +00:00
|
|
|
PROXY_METHOD1(bool, AddIceCandidate, const IceCandidateInterface*)
|
2016-03-14 11:59:18 -07:00
|
|
|
PROXY_METHOD1(bool,
|
|
|
|
|
RemoveIceCandidates,
|
|
|
|
|
const std::vector<cricket::Candidate>&);
|
2017-11-01 11:06:56 +01:00
|
|
|
PROXY_METHOD1(void, SetAudioPlayout, bool)
|
|
|
|
|
PROXY_METHOD1(void, SetAudioRecording, bool)
|
2014-05-08 19:54:16 +00:00
|
|
|
PROXY_METHOD1(void, RegisterUMAObserver, UMAObserver*)
|
2017-06-02 14:37:37 -07:00
|
|
|
PROXY_METHOD1(RTCError, SetBitrate, const BitrateParameters&);
|
2017-10-20 10:37:47 +02:00
|
|
|
PROXY_METHOD1(void,
|
|
|
|
|
SetBitrateAllocationStrategy,
|
|
|
|
|
std::unique_ptr<rtc::BitrateAllocationStrategy>);
|
2013-07-10 00:45:36 +00:00
|
|
|
PROXY_METHOD0(SignalingState, signaling_state)
|
|
|
|
|
PROXY_METHOD0(IceConnectionState, ice_connection_state)
|
|
|
|
|
PROXY_METHOD0(IceGatheringState, ice_gathering_state)
|
2016-07-04 07:06:55 -07:00
|
|
|
PROXY_METHOD2(bool, StartRtcEventLog, rtc::PlatformFile, int64_t)
|
2017-11-20 17:38:14 +01:00
|
|
|
PROXY_METHOD2(bool,
|
|
|
|
|
StartRtcEventLog,
|
|
|
|
|
std::unique_ptr<RtcEventLogOutput>,
|
|
|
|
|
int64_t);
|
2016-07-04 07:06:55 -07:00
|
|
|
PROXY_METHOD0(void, StopRtcEventLog)
|
2013-07-10 00:45:36 +00:00
|
|
|
PROXY_METHOD0(void, Close)
|
2017-01-18 08:55:23 -08:00
|
|
|
END_PROXY_MAP()
|
2013-07-10 00:45:36 +00:00
|
|
|
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#endif // API_PEERCONNECTIONPROXY_H_
|