LeviLamina
Loading...
Searching...
No Matches
PeerConnectionInterface.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/external/cricket/MediaType.h"
7#include "mc/external/webrtc/RTCErrorOr.h"
8#include "mc/external/webrtc/RefCountInterface.h"
9#include "mc/external/webrtc/scoped_refptr.h"
10
11// auto generated forward declare list
12// clang-format off
13namespace cricket { class Candidate; }
14namespace rtc { class Thread; }
15namespace webrtc { class CreateSessionDescriptionObserver; }
16namespace webrtc { class DataChannelInterface; }
17namespace webrtc { class DtlsTransportInterface; }
18namespace webrtc { class IceCandidateInterface; }
19namespace webrtc { class MediaStreamInterface; }
20namespace webrtc { class MediaStreamTrackInterface; }
21namespace webrtc { class RTCError; }
22namespace webrtc { class RTCStatsCollectorCallback; }
23namespace webrtc { class Resource; }
24namespace webrtc { class RtcEventLogOutput; }
25namespace webrtc { class RtpReceiverInterface; }
26namespace webrtc { class RtpSenderInterface; }
27namespace webrtc { class RtpTransceiverInterface; }
28namespace webrtc { class SctpTransportInterface; }
29namespace webrtc { class SessionDescriptionInterface; }
30namespace webrtc { class SetLocalDescriptionObserverInterface; }
31namespace webrtc { class SetRemoteDescriptionObserverInterface; }
32namespace webrtc { class SetSessionDescriptionObserver; }
33namespace webrtc { class StatsObserver; }
34namespace webrtc { class StreamCollectionInterface; }
35namespace webrtc { struct BandwidthEstimationSettings; }
36namespace webrtc { struct BitrateSettings; }
37namespace webrtc { struct DataChannelInit; }
38namespace webrtc { struct RtpEncodingParameters; }
39namespace webrtc { struct RtpTransceiverInit; }
40// clang-format on
41
42namespace webrtc {
43
45public:
46 // PeerConnectionInterface inner types declare
47 // clang-format off
48 struct IceServer;
50 struct RTCConfiguration;
52 // clang-format on
53
54 // PeerConnectionInterface inner types define
55 enum class BundlePolicy : int {
56 KBundlePolicyBalanced = 0,
57 KBundlePolicyMaxBundle = 1,
58 KBundlePolicyMaxCompat = 2,
59 };
60
61 enum class CandidateNetworkPolicy : int {
62 KCandidateNetworkPolicyAll = 0,
63 KCandidateNetworkPolicyLowCost = 1,
64 };
65
66 enum class ContinualGatheringPolicy : int {
67 Once = 0,
68 Continually = 1,
69 };
70
71 enum class IceConnectionState : int {
72 KIceConnectionNew = 0,
73 KIceConnectionChecking = 1,
74 KIceConnectionConnected = 2,
75 KIceConnectionCompleted = 3,
76 KIceConnectionFailed = 4,
77 KIceConnectionDisconnected = 5,
78 KIceConnectionClosed = 6,
79 KIceConnectionMax = 7,
80 };
81
82 enum class IceGatheringState : int {
83 KIceGatheringNew = 0,
84 KIceGatheringGathering = 1,
85 KIceGatheringComplete = 2,
86 };
87
88 enum class IceTransportsType : int {
89 KNone = 0,
90 KRelay = 1,
91 KNoHost = 2,
92 KAll = 3,
93 };
94
95 enum class PeerConnectionState : int {
96 KNew = 0,
97 KConnecting = 1,
98 KConnected = 2,
99 KDisconnected = 3,
100 KFailed = 4,
101 KClosed = 5,
102 };
103
104 enum class RTCConfigurationType : int {
105 KSafe = 0,
106 KAggressive = 1,
107 };
108
109 enum class RtcpMuxPolicy : int {
110 KRtcpMuxPolicyNegotiate = 0,
111 KRtcpMuxPolicyRequire = 1,
112 };
113
114 enum class SignalingState : int {
115 KStable = 0,
116 KHaveLocalOffer = 1,
117 KHaveLocalPrAnswer = 2,
118 KHaveRemoteOffer = 3,
119 KHaveRemotePrAnswer = 4,
120 KClosed = 5,
121 };
122
123 enum class StatsOutputLevel : int {
124 KStatsOutputLevelStandard = 0,
125 KStatsOutputLevelDebug = 1,
126 };
127
128 enum class TcpCandidatePolicy : int {
129 KTcpCandidatePolicyEnabled = 0,
130 KTcpCandidatePolicyDisabled = 1,
131 };
132
133 enum class TlsCertPolicy : int {
134 KTlsCertPolicySecure = 0,
135 KTlsCertPolicyInsecureNoCheck = 1,
136 };
137
138 struct IceServer {
139 public:
140 // member variables
141 // NOLINTBEGIN
150 // NOLINTEND
151
152 public:
153 // member functions
154 // NOLINTBEGIN
155 MCNAPI IceServer();
156
158
159 MCNAPI ::webrtc::PeerConnectionInterface::IceServer&
161
163
164 MCNAPI ~IceServer();
165 // NOLINTEND
166
167 public:
168 // constructor thunks
169 // NOLINTBEGIN
170 MCNAPI void* $ctor();
171
173 // NOLINTEND
174
175 public:
176 // destructor thunk
177 // NOLINTBEGIN
178 MCNAPI void $dtor();
179 // NOLINTEND
180 };
181
182 struct PortAllocatorConfig {
183 public:
184 // member variables
185 // NOLINTBEGIN
189 // NOLINTEND
190
191 public:
192 // prevent constructor by default
193 PortAllocatorConfig& operator=(PortAllocatorConfig const&);
194 PortAllocatorConfig(PortAllocatorConfig const&);
195 PortAllocatorConfig();
196 };
197
199 public:
200 // member variables
201 // NOLINTBEGIN
250 // NOLINTEND
251
252 public:
253 // member functions
254 // NOLINTBEGIN
256
258
259 MCNAPI ::webrtc::PeerConnectionInterface::RTCConfiguration&
261
263
265 // NOLINTEND
266
267 public:
268 // constructor thunks
269 // NOLINTBEGIN
270 MCNAPI void* $ctor();
271
273 // NOLINTEND
274
275 public:
276 // destructor thunk
277 // NOLINTBEGIN
278 MCNAPI void $dtor();
279 // NOLINTEND
280 };
281
282 struct RTCOfferAnswerOptions {
283 public:
284 // member variables
285 // NOLINTBEGIN
294 // NOLINTEND
295
296 public:
297 // prevent constructor by default
298 RTCOfferAnswerOptions& operator=(RTCOfferAnswerOptions const&);
299 RTCOfferAnswerOptions(RTCOfferAnswerOptions const&);
300
301 public:
302 // member functions
303 // NOLINTBEGIN
305 // NOLINTEND
306
307 public:
308 // constructor thunks
309 // NOLINTBEGIN
310 MCNAPI void* $ctor();
311 // NOLINTEND
312 };
313
314public:
315 // virtual functions
316 // NOLINTBEGIN
317 virtual ::webrtc::scoped_refptr<::webrtc::StreamCollectionInterface> local_streams() = 0;
318
319 virtual ::webrtc::scoped_refptr<::webrtc::StreamCollectionInterface> remote_streams() = 0;
320
321 virtual bool AddStream(::webrtc::MediaStreamInterface*) = 0;
322
323 virtual void RemoveStream(::webrtc::MediaStreamInterface* remove_stream) = 0;
324
325 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpSenderInterface>>
326 AddTrack(::webrtc::scoped_refptr<::webrtc::MediaStreamTrackInterface>, ::std::vector<::std::string> const&) = 0;
327
328 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpSenderInterface>> AddTrack(
330 ::std::vector<::std::string> const&,
331 ::std::vector<::webrtc::RtpEncodingParameters> const&
332 ) = 0;
333
334 virtual ::webrtc::RTCError RemoveTrackOrError(::webrtc::scoped_refptr<::webrtc::RtpSenderInterface>);
335
336 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpTransceiverInterface>>
338
339 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpTransceiverInterface>> AddTransceiver(
342 ) = 0;
343
344 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpTransceiverInterface>>
345 AddTransceiver(::cricket::MediaType) = 0;
346
347 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpTransceiverInterface>>
348 AddTransceiver(::cricket::MediaType, ::webrtc::RtpTransceiverInit const&) = 0;
349
350 virtual ::webrtc::scoped_refptr<::webrtc::RtpSenderInterface>
351 CreateSender(::std::string const&, ::std::string const&) = 0;
352
353 virtual ::std::vector<::webrtc::scoped_refptr<::webrtc::RtpSenderInterface>> GetSenders() const = 0;
354
355 virtual ::std::vector<::webrtc::scoped_refptr<::webrtc::RtpReceiverInterface>> GetReceivers() const = 0;
356
357 virtual ::std::vector<::webrtc::scoped_refptr<::webrtc::RtpTransceiverInterface>> GetTransceivers() const = 0;
358
359 virtual bool GetStats(
362 ::webrtc::PeerConnectionInterface::StatsOutputLevel
363 ) = 0;
364
365 virtual void GetStats(::webrtc::RTCStatsCollectorCallback*) = 0;
366
367 virtual void GetStats(
370 ) = 0;
371
372 virtual void GetStats(
375 ) = 0;
376
377 virtual void ClearStatsCache();
378
379 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::DataChannelInterface>>
380 CreateDataChannelOrError(::std::string const&, ::webrtc::DataChannelInit const*);
381
382 virtual ::webrtc::scoped_refptr<::webrtc::DataChannelInterface>
383 CreateDataChannel(::std::string const& label, ::webrtc::DataChannelInit const* config);
384
385 virtual ::webrtc::SessionDescriptionInterface const* local_description() const = 0;
386
387 virtual ::webrtc::SessionDescriptionInterface const* remote_description() const = 0;
388
389 virtual ::webrtc::SessionDescriptionInterface const* current_local_description() const = 0;
390
391 virtual ::webrtc::SessionDescriptionInterface const* current_remote_description() const = 0;
392
393 virtual ::webrtc::SessionDescriptionInterface const* pending_local_description() const = 0;
394
395 virtual ::webrtc::SessionDescriptionInterface const* pending_remote_description() const = 0;
396
397 virtual void RestartIce() = 0;
398
399 virtual void CreateOffer(
402 ) = 0;
403
404 virtual void CreateAnswer(
407 ) = 0;
408
409 virtual void SetLocalDescription(
410 ::std::unique_ptr<::webrtc::SessionDescriptionInterface>,
412 );
413
415
416 virtual void
418
419 virtual void SetLocalDescription(::webrtc::SetSessionDescriptionObserver*);
420
421 virtual void SetRemoteDescription(
422 ::std::unique_ptr<::webrtc::SessionDescriptionInterface>,
424 ) = 0;
425
427
428 virtual bool ShouldFireNegotiationNeededEvent(uint) = 0;
429
430 virtual ::webrtc::PeerConnectionInterface::RTCConfiguration GetConfiguration() = 0;
431
432 virtual ::webrtc::RTCError SetConfiguration(::webrtc::PeerConnectionInterface::RTCConfiguration const&) = 0;
433
434 virtual bool AddIceCandidate(::webrtc::IceCandidateInterface const*) = 0;
435
436 virtual void
437 AddIceCandidate(::std::unique_ptr<::webrtc::IceCandidateInterface>, ::std::function<void(::webrtc::RTCError)>);
438
439 virtual bool RemoveIceCandidates(::std::vector<::cricket::Candidate> const&) = 0;
440
441 virtual ::webrtc::RTCError SetBitrate(::webrtc::BitrateSettings const&) = 0;
442
443 virtual void ReconfigureBandwidthEstimation(::webrtc::BandwidthEstimationSettings const&) = 0;
444
445 virtual void SetAudioPlayout(bool) = 0;
446
447 virtual void SetAudioRecording(bool) = 0;
448
449 virtual ::webrtc::scoped_refptr<::webrtc::DtlsTransportInterface>
450 LookupDtlsTransportByMid(::std::string const&) = 0;
451
452 virtual ::webrtc::scoped_refptr<::webrtc::SctpTransportInterface> GetSctpTransport() const = 0;
453
454 virtual ::webrtc::PeerConnectionInterface::SignalingState signaling_state() = 0;
455
456 virtual ::webrtc::PeerConnectionInterface::IceConnectionState ice_connection_state() = 0;
457
458 virtual ::webrtc::PeerConnectionInterface::IceConnectionState standardized_ice_connection_state() = 0;
459
460 virtual ::webrtc::PeerConnectionInterface::PeerConnectionState peer_connection_state() = 0;
461
462 virtual ::webrtc::PeerConnectionInterface::IceGatheringState ice_gathering_state() = 0;
463
464 virtual ::std::optional<bool> can_trickle_ice_candidates() = 0;
465
466 virtual void AddAdaptationResource(::webrtc::scoped_refptr<::webrtc::Resource>) = 0;
467
468 virtual bool StartRtcEventLog(::std::unique_ptr<::webrtc::RtcEventLogOutput>, int64) = 0;
469
470 virtual bool StartRtcEventLog(::std::unique_ptr<::webrtc::RtcEventLogOutput>) = 0;
471
472 virtual void StopRtcEventLog() = 0;
473
474 virtual void Close() = 0;
475
476 virtual ::rtc::Thread* signaling_thread() const = 0;
477
478 virtual ~PeerConnectionInterface() /*override*/ = default;
479 // NOLINTEND
480
481public:
482 // static functions
483 // NOLINTBEGIN
484 MCNAPI static ::std::string_view AsString(::webrtc::PeerConnectionInterface::SignalingState state);
485 // NOLINTEND
486
487public:
488 // virtual function thunks
489 // NOLINTBEGIN
490 MCNAPI ::webrtc::scoped_refptr<::webrtc::DataChannelInterface>
491 $CreateDataChannel(::std::string const& label, ::webrtc::DataChannelInit const* config);
492
493
494 // NOLINTEND
495};
496
497} // namespace webrtc
Definition Candidate.h:15
Definition Thread.h:20
Definition CreateSessionDescriptionObserver.h:16
Definition DataChannelInterface.h:19
Definition DtlsTransportInterface.h:18
Definition IceCandidateInterface.h:12
Definition MediaStreamInterface.h:18
Definition MediaStreamTrackInterface.h:11
Definition PeerConnectionInterface.h:44
MCAPI ::webrtc::scoped_refptr<::webrtc::DataChannelInterface > $CreateDataChannel(::std::string const &label, ::webrtc::DataChannelInit const *config)
static MCAPI ::std::string_view AsString(::webrtc::PeerConnectionInterface::SignalingState state)
Definition RTCError.h:10
Definition RTCStatsCollectorCallback.h:16
Definition RefCountInterface.h:10
Definition Resource.h:15
Definition RtcEventLogOutput.h:7
Definition RtpReceiverInterface.h:24
Definition RtpSenderInterface.h:26
Definition RtpTransceiverInterface.h:22
Definition SctpTransportInterface.h:18
Definition SessionDescriptionInterface.h:18
Definition SetLocalDescriptionObserverInterface.h:15
Definition SetRemoteDescriptionObserverInterface.h:15
Definition SetSessionDescriptionObserver.h:15
Definition StatsObserver.h:15
Definition StreamCollectionInterface.h:16
Definition scoped_refptr.h:8
Definition Alias.h:14
Definition BandwidthEstimationSettings.h:7
Definition BitrateSettings.h:7
Definition DataChannelInit.h:7
Definition PeerConnectionInterface.h:138
MCAPI bool operator==(::webrtc::PeerConnectionInterface::IceServer const &o) const
MCAPI IceServer(::webrtc::PeerConnectionInterface::IceServer const &)
MCAPI void * $ctor(::webrtc::PeerConnectionInterface::IceServer const &)
MCAPI::webrtc::PeerConnectionInterface::IceServer & operator=(::webrtc::PeerConnectionInterface::IceServer const &)
Definition PeerConnectionInterface.h:182
Definition PeerConnectionInterface.h:198
MCAPI::webrtc::PeerConnectionInterface::RTCConfiguration & operator=(::webrtc::PeerConnectionInterface::RTCConfiguration const &)
MCAPI bool operator==(::webrtc::PeerConnectionInterface::RTCConfiguration const &o) const
MCAPI void * $ctor(::webrtc::PeerConnectionInterface::RTCConfiguration const &)
MCAPI RTCConfiguration(::webrtc::PeerConnectionInterface::RTCConfiguration const &)
Definition PeerConnectionInterface.h:282
Definition RtpEncodingParameters.h:7
Definition RtpTransceiverInit.h:7