LeviLamina
Loading...
Searching...
No Matches
Port.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/external/cricket/IceRole.h"
7#include "mc/external/cricket/PortInterface.h"
8#include "mc/external/cricket/ProtocolType.h"
9#include "mc/external/rtc/DiffServCodePoint.h"
10#include "mc/external/rtc/WeakPtr.h"
11#include "mc/external/sigslot/has_slots.h"
12#include "mc/external/webrtc/IceCandidateType.h"
13
14// auto generated forward declare list
15// clang-format off
16namespace cricket { class Candidate; }
17namespace cricket { class Connection; }
18namespace cricket { class IceMessage; }
19namespace cricket { class StunMessage; }
20namespace cricket { class StunStats; }
21namespace rtc { class AsyncPacketSocket; }
22namespace rtc { class Network; }
23namespace rtc { class PacketSocketFactory; }
24namespace rtc { class ReceivedPacket; }
25namespace rtc { class SocketAddress; }
26namespace rtc { struct PacketInfo; }
27namespace rtc { struct ProxyInfo; }
28namespace rtc { struct SentPacket; }
29namespace sigslot { class single_threaded; }
30namespace webrtc { class FieldTrialsView; }
31namespace webrtc { class TaskQueueBase; }
32// clang-format on
33
34namespace cricket {
35
36class Port : public ::cricket::PortInterface, public ::sigslot::has_slots<::sigslot::single_threaded> {
37public:
38 // Port inner types define
39 enum class State : int {
40 Init = 0,
41 KeepAliveUntilPruned = 1,
42 Pruned = 2,
43 };
44
45public:
46 // member variables
47 // NOLINTBEGIN
80 // NOLINTEND
81
82public:
83 // prevent constructor by default
84 Port& operator=(Port const&);
85 Port(Port const&);
86 Port();
87
88public:
89 // virtual functions
90 // NOLINTBEGIN
91 // vIndex: 0
92 virtual ~Port() /*override*/ = default;
93
94 // vIndex: 1
95 virtual ::webrtc::IceCandidateType Type() const /*override*/;
96
97 // vIndex: 2
98 virtual ::rtc::Network const* Network() const /*override*/;
99
100 // vIndex: 4
101 virtual ::cricket::IceRole GetIceRole() const /*override*/;
102
103 // vIndex: 3
104 virtual void SetIceRole(::cricket::IceRole) /*override*/;
105
106 // vIndex: 5
107 virtual void SetIceTiebreaker(uint64) /*override*/;
108
109 // vIndex: 6
110 virtual uint64 IceTiebreaker() const /*override*/;
111
112 // vIndex: 7
113 virtual bool SharedSocket() const /*override*/;
114
115 // vIndex: 25
116 virtual ::webrtc::TaskQueueBase* thread() /*override*/;
117
118 // vIndex: 26
119 virtual ::rtc::PacketSocketFactory* socket_factory() const /*override*/;
120
121 // vIndex: 32
122 virtual ::std::string const& content_name() const /*override*/;
123
124 // vIndex: 31
125 virtual bool send_retransmit_count_attribute() const /*override*/;
126
127 // vIndex: 29
128 virtual uint generation() const /*override*/;
129
130 // vIndex: 30
131 virtual void set_generation(uint) /*override*/;
132
133 // vIndex: 16
134 virtual ::std::vector<::cricket::Candidate> const& Candidates() const /*override*/;
135
136 // vIndex: 19
137 virtual void SubscribePortDestroyed(::std::function<void(::cricket::PortInterface*)>) /*override*/;
138
139 // vIndex: 10
140 virtual ::cricket::Connection* GetConnection(::rtc::SocketAddress const&) /*override*/;
141
142 // vIndex: 23
143 virtual void DestroyConnection(::cricket::Connection*) /*override*/;
144
145 // vIndex: 24
146 virtual void DestroyConnectionAsync(::cricket::Connection*) /*override*/;
147
148 // vIndex: 41
149 virtual bool HandleIncomingPacket(::rtc::AsyncPacketSocket*, ::rtc::ReceivedPacket const&);
150
151 // vIndex: 42
152 virtual bool CanHandleIncomingPacketsFrom(::rtc::SocketAddress const&) const;
153
154 // vIndex: 18
155 virtual void SendBindingErrorResponse(
158 int,
159 ::std::string_view
160 ) /*override*/;
161
162 // vIndex: 27
163 virtual ::std::string const& user_agent() /*override*/;
164
165 // vIndex: 28
166 virtual ::rtc::ProxyInfo const& proxy() /*override*/;
167
168 // vIndex: 20
169 virtual void EnablePortPackets() /*override*/;
170
171 // vIndex: 21
172 virtual ::std::string ToString() const /*override*/;
173
174 // vIndex: 37
175 virtual bool ParseStunUsername(::cricket::StunMessage const*, ::std::string*, ::std::string*) const /*override*/;
176
177 // vIndex: 38
178 virtual ::std::string CreateStunUsername(::std::string_view) const /*override*/;
179
180 // vIndex: 39
181 virtual bool
182 MaybeIceRoleConflict(::rtc::SocketAddress const&, ::cricket::IceMessage*, ::std::string_view) /*override*/;
183
184 // vIndex: 43
185 virtual void OnSentPacket(::rtc::AsyncPacketSocket*, ::rtc::SentPacket const&) = 0;
186
187 // vIndex: 33
188 virtual void AddPrflxCandidate(::cricket::Candidate const&) /*override*/;
189
190 // vIndex: 40
191 virtual short network_cost() const /*override*/;
192
193 // vIndex: 22
194 virtual void GetStunStats(::std::optional<::cricket::StunStats>*) /*override*/;
195
196 // vIndex: 34
197 virtual void UpdateNetworkCost() /*override*/;
198
199 // vIndex: 44
200 virtual void PostAddAddress(bool);
201
202 // vIndex: 36
203 virtual bool
204 GetStunMessage(char const*, uint64, ::rtc::SocketAddress const&, ::std::unique_ptr<::cricket::IceMessage>*, ::std::string*) /*override*/
205 ;
206
207 // vIndex: 35
208 virtual ::rtc::DiffServCodePoint StunDscpValue() const /*override*/;
209
210 // vIndex: 45
211 virtual void HandleConnectionDestroyed(::cricket::Connection*);
212 // NOLINTEND
213
214public:
215 // member functions
216 // NOLINTBEGIN
217 MCAPI void AddAddress(
221 ::std::string_view,
222 ::std::string_view,
223 ::std::string_view,
224 ::webrtc::IceCandidateType,
225 uint,
226 uint,
227 ::std::string_view,
228 bool
229 );
230
231 MCAPI void AddOrReplaceConnection(::cricket::Connection*);
232
233 MCAPI void CancelPendingTasks();
234
235 MCAPI void CopyPortInformationToPacketInfo(::rtc::PacketInfo*) const;
236
237 MCAPI void Destroy();
238
239 MCAPI void DestroyAllConnections();
240
241 MCAPI void DestroyConnectionInternal(::cricket::Connection*, bool);
242
243 MCAPI void DestroyIfDead();
244
245 MCAPI void FinishAddingAddress(::cricket::Candidate const&, bool);
246
247 MCAPI bool IsCompatibleAddress(::rtc::SocketAddress const&);
248
249 MCAPI void KeepAliveUntilPruned();
250
251 MCAPI bool MaybeObfuscateAddress(::cricket::Candidate const&, bool);
252
253 MCAPI ::rtc::WeakPtr<::cricket::Port> NewWeakPtr();
254
255 MCAPI bool OnConnectionDestroyed(::cricket::Connection*);
256
257 MCAPI void OnNetworkTypeChanged(::rtc::Network const*);
258
259 MCAPI void OnReadPacket(::rtc::ReceivedPacket const&, ::cricket::ProtocolType);
260
261 MCAPI void OnReadyToSend();
262
263 MCAPI
264 Port(::webrtc::TaskQueueBase*, ::webrtc::IceCandidateType, ::rtc::PacketSocketFactory*, ::rtc::Network const*, ::std::string_view, ::std::string_view, ::webrtc::FieldTrialsView const*);
265
266 MCAPI Port(
268 ::webrtc::IceCandidateType,
270 ::rtc::Network const*,
271 ushort,
272 ushort,
273 ::std::string_view,
274 ::std::string_view,
276 bool
277 );
278
279 MCAPI void PostDestroyIfDead(bool);
280
281 MCAPI void Prune();
282
283 MCAPI void SendPortDestroyed(::cricket::Port*);
284
285 MCAPI void
286 SendUnknownAttributesErrorResponse(::cricket::StunMessage*, ::rtc::SocketAddress const&, ::std::vector<ushort> const&);
287
288 MCAPI void SetIceParameters(int, ::std::string_view, ::std::string_view);
289
290 MCAPI void set_content_name(::std::string_view);
291
292 MCAPI ::std::string const& username_fragment() const;
293 // NOLINTEND
294
295public:
296 // constructor thunks
297 // NOLINTBEGIN
298 MCAPI void*
299 $ctor(::webrtc::TaskQueueBase*, ::webrtc::IceCandidateType, ::rtc::PacketSocketFactory*, ::rtc::Network const*, ::std::string_view, ::std::string_view, ::webrtc::FieldTrialsView const*);
300
301 MCAPI void* $ctor(
303 ::webrtc::IceCandidateType,
305 ::rtc::Network const*,
306 ushort,
307 ushort,
308 ::std::string_view,
309 ::std::string_view,
311 bool
312 );
313 // NOLINTEND
314
315public:
316 // destructor thunk
317 // NOLINTBEGIN
318
319 // NOLINTEND
320
321public:
322 // virtual function thunks
323 // NOLINTBEGIN
324
325 // NOLINTEND
326
327public:
328 // vftables
329 // NOLINTBEGIN
330 MCAPI static void** $vftableForHasSlots();
331
332 MCAPI static void** $vftableForPortInterface();
333 // NOLINTEND
334};
335
336} // namespace cricket
Definition Candidate.h:15
Definition Connection.h:38
Definition IceMessage.h:11
Definition PortInterface.h:29
Definition Port.h:36
Definition StunMessage.h:23
Definition AsyncPacketSocket.h:20
Definition Network.h:18
Definition PacketSocketFactory.h:17
Definition ReceivedPacket.h:16
Definition SocketAddress.h:12
Definition has_slots.h:8
Definition FieldTrialsView.h:7
Definition TaskQueueBase.h:16
Definition Alias.h:14
Definition PacketInfo.h:7
Definition SentPacket.h:12