LeviLamina
Loading...
Searching...
No Matches
rtc.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/external/rtc/AdapterType.h"
7#include "mc/external/rtc/WeakPtr.h"
8
9// auto generated forward declare list
10// clang-format off
11namespace cricket { class Port; }
12namespace rtc { class AsyncPacketSocket; }
13namespace rtc { class ClockInterface; }
14namespace rtc { class IPAddress; }
15namespace rtc { class MessageDigest; }
16namespace rtc { class SocketAddress; }
17namespace rtc { class SocketServer; }
18namespace rtc { struct PacketInfo; }
19namespace webrtc { class SctpDataChannelControllerInterface; }
20// clang-format on
21
22namespace rtc {
23// inner types
24enum : int {
25 Trunc = 16711681,
26};
27
28// functions
29// NOLINTBEGIN
30MCNAPI int64 ASN1TimeToSec(uchar const* s, uint64 length, bool long_format);
31
32MCNAPI ::std::string AdapterTypeToString(::rtc::AdapterType type);
33
34MCNAPI uint64 ComputeDigest(::std::string_view alg, void const* input, uint64 in_len, void* output, uint64 out_len);
35
36MCNAPI uint64
37ComputeDigest(::rtc::MessageDigest* digest, void const* input, uint64 in_len, void* output, uint64 out_len);
38
39MCNAPI uint64 ComputeHmac(
40 ::std::string_view alg,
41 void const* key,
42 uint64 key_len,
43 void const* input,
44 uint64 in_len,
45 void* output,
46 uint64 out_len
47);
48
49MCNAPI uint64 ComputeHmac(
51 void const* key,
52 uint64 key_len,
53 void const* input,
54 uint64 in_len,
55 void* output,
56 uint64 out_len
57);
58
59MCNAPI void CopySocketInformationToPacketInfo(
60 uint64 packet_size_bytes,
61 ::rtc::AsyncPacketSocket const& socket_from,
62 bool is_connectionless,
64);
65
66MCNAPI ::std::unique_ptr<::rtc::SocketServer> CreateDefaultSocketServer();
67
68MCNAPI uint CreateRandomId();
69
70MCNAPI uint64 CreateRandomId64();
71
72MCNAPI uint CreateRandomNonZeroId();
73
74MCNAPI bool CreateRandomString(uint64 len, ::std::string* str);
75
76MCNAPI ::std::string CreateRandomString(uint64 len);
77
78MCNAPI ::std::string CreateRandomUuid();
79
80MCNAPI ulong CurrentThreadId();
81
82MCNAPI ulong CurrentThreadRef();
83
84MCNAPI ::rtc::SocketAddress EmptySocketAddressWithFamily(int family);
85
86MCNAPI void ExplicitZeroMemory(void* ptr, uint64 len);
87
88MCNAPI ::rtc::IPAddress GetAnyIP(int family);
89
90MCNAPI double GetNextMovingAverage(double prev_average, double cur, double ratio);
91
92MCNAPI uint GetPrefix(::_IP_ADAPTER_PREFIX_XP* prefixlist, ::rtc::IPAddress const& ip, ::rtc::IPAddress* prefix);
93
94MCNAPI bool GetSrtpKeyAndSaltLengths(int crypto_suite, int* key_length, int* salt_length);
95
96MCNAPI int IPAddressPrecedence(::rtc::IPAddress const& ip);
97
98MCNAPI bool IPFromAddrInfo(::addrinfo* info, ::rtc::IPAddress* out);
99
100MCNAPI bool IPFromString(::std::string_view str, ::rtc::IPAddress* out);
101
102MCNAPI bool IPIs6Bone(::rtc::IPAddress const& ip);
103
104MCNAPI bool IPIs6To4(::rtc::IPAddress const& ip);
105
106MCNAPI bool IPIsAny(::rtc::IPAddress const& ip);
107
108MCNAPI bool IPIsLinkLocal(::rtc::IPAddress const& ip);
109
110MCNAPI bool IPIsLoopback(::rtc::IPAddress const& ip);
111
112MCNAPI bool IPIsMacBased(::rtc::IPAddress const& ip);
113
114MCNAPI bool IPIsPrivate(::rtc::IPAddress const& ip);
115
116MCNAPI bool IPIsPrivateNetwork(::rtc::IPAddress const& ip);
117
118MCNAPI bool IPIsSharedNetwork(::rtc::IPAddress const& ip);
119
120MCNAPI bool IPIsSiteLocal(::rtc::IPAddress const& ip);
121
122MCNAPI bool IPIsTeredo(::rtc::IPAddress const& ip);
123
124MCNAPI bool IPIsULA(::rtc::IPAddress const& ip);
125
126MCNAPI bool IPIsUnspec(::rtc::IPAddress const& ip);
127
128MCNAPI bool IPIsV4Compatibility(::rtc::IPAddress const& ip);
129
130MCNAPI bool IPIsV4Mapped(::rtc::IPAddress const& ip);
131
132MCNAPI bool InitRandom(int seed);
133
134MCNAPI bool InitRandom(char const* seed, uint64 len);
135
136MCNAPI bool InitializeSSL();
137
138MCNAPI bool IsFips180DigestAlgorithm(::std::string_view alg);
139
140MCNAPI bool IsGcmCryptoSuite(int crypto_suite);
141
142MCNAPI bool IsThreadRefEqual(ulong const& a, ulong const& b);
143
144MCNAPI ::std::string MakeNetworkKey(::std::string_view name, ::rtc::IPAddress const& prefix, int prefix_length);
145
146MCNAPI void SetCurrentThreadName(char const* name);
147
148MCNAPI bool SocketAddressFromSockAddrStorage(::sockaddr_storage const& addr, ::rtc::SocketAddress* out);
149
150MCNAPI ::std::string SrtpCryptoSuiteToName(int crypto_suite);
151
152MCNAPI ::std::string StringFormat(char const*, ...);
153
154MCNAPI int64 SystemTimeMillis();
155
156MCNAPI int64 SystemTimeNanos();
157
158MCNAPI uint Time32();
159
160MCNAPI int64 TimeAfter(int64 elapsed);
161
162MCNAPI int64 TimeDiff(int64 later, int64 earlier);
163
164MCNAPI int64 TimeMicros();
165
166MCNAPI int64 TimeMillis();
167
168MCNAPI int64 TimeNanos();
169
170MCNAPI int64 TimeUTCMicros();
171
172MCNAPI int64 TimeUTCMillis();
173
174MCNAPI int64 TmToSeconds(::tm const& tm);
175
176MCNAPI ::std::string ToHex(int i);
177
178MCNAPI ::std::string ToString(bool b);
179
180MCNAPI ::std::string ToString(long double d);
181
182MCNAPI ::std::string ToString(double d);
183
184MCNAPI ::std::string ToString(ushort s);
185
186MCNAPI ::std::string ToString(int64 s);
187
188MCNAPI ::std::string ToString(uint64 s);
189
190MCNAPI ::std::string ToString(ulong s);
191
192MCNAPI ::std::string ToString(long s);
193
194MCNAPI ::std::string ToString(::std::string_view s);
195
196MCNAPI ::std::string ToString(uint s);
197
198MCNAPI ::std::string ToString(int s);
199
200MCNAPI ::std::string TransformAlpnProtocols(::std::vector<::std::string> const& alpn_protocols);
201
202MCNAPI ::rtc::IPAddress TruncateIP(::rtc::IPAddress const& ip, int length);
203
204MCNAPI uint UpdateCrc32(uint start, void const* buf, uint64 len);
205
206MCNAPI int64 WinUwpSystemTimeNanos();
207
208MCNAPI uint64 hex_decode_with_delimiter(::rtc::ArrayView<char> cbuffer, ::std::string_view source, char delimiter);
209
210MCNAPI ::std::string hex_encode(::std::string_view str);
211
212MCNAPI ::std::string hex_encode_with_delimiter(::std::string_view source, char delimiter);
213
214MCNAPI char const* inet_ntop(int af, void const* src, char* dst, int size);
215
216MCNAPI int inet_pton(int af, ::std::string_view src, void* dst);
217
218MCNAPI bool operator!=(::rtc::WeakPtr<::webrtc::SctpDataChannelControllerInterface> const& weak_ptr, nullptr_t);
219
220MCNAPI bool operator!=(::rtc::WeakPtr<::cricket::Port> const& weak_ptr, nullptr_t);
221
222MCNAPI bool operator==(::rtc::WeakPtr<::webrtc::SctpDataChannelControllerInterface> const& weak_ptr, nullptr_t);
223
224MCNAPI bool operator==(::rtc::WeakPtr<::cricket::Port> const& weak_ptr, nullptr_t);
225
226MCNAPI ::std::vector<::std::string_view> split(::std::string_view source, char delimiter);
227
228MCNAPI uint64 tokenize(::std::string_view source, char delimiter, ::std::vector<::std::string>* fields);
229
230MCNAPI bool tokenize_first(::std::string_view source, char delimiter, ::std::string* token, ::std::string* rest);
231
232MCNAPI char const* win32_inet_ntop(int af, void const* src, char* dst, int size);
233
234MCNAPI int win32_inet_pton(int af, char const* src, void* dst);
235// NOLINTEND
236
237// static variables
238// NOLINTBEGIN
239MCNAPI ::std::add_lvalue_reference_t<char const[]> DIGEST_MD5();
240
241MCNAPI ::std::add_lvalue_reference_t<char const[]> DIGEST_SHA_1();
242
243MCNAPI ::std::add_lvalue_reference_t<char const[]> DIGEST_SHA_224();
244
245MCNAPI ::std::add_lvalue_reference_t<char const[]> DIGEST_SHA_256();
246
247MCNAPI ::std::add_lvalue_reference_t<char const[]> DIGEST_SHA_384();
248
249MCNAPI ::std::add_lvalue_reference_t<char const[]> DIGEST_SHA_512();
250
251MCNAPI ::rtc::ClockInterface*& g_clock();
252
253MCNAPI ::std::add_lvalue_reference_t<char const[]> kCsAeadAes128Gcm();
254
255MCNAPI ::std::add_lvalue_reference_t<char const[]> kCsAeadAes256Gcm();
256
257MCNAPI ::std::add_lvalue_reference_t<char const[]> kCsAesCm128HmacSha1_32();
258
259MCNAPI ::std::add_lvalue_reference_t<char const[]> kCsAesCm128HmacSha1_80();
260
261MCNAPI ::std::add_lvalue_reference_t<char const[]> kPemTypeCertificate();
262
263MCNAPI ::std::add_lvalue_reference_t<char const[]> kPemTypeEcPrivateKey();
264
265MCNAPI ::std::add_lvalue_reference_t<char const[]> kPemTypeRsaPrivateKey();
266
267MCNAPI ::std::add_lvalue_reference_t<char const[]> kPublicIPv4Host();
268
269MCNAPI ::std::add_lvalue_reference_t<char const[]> kPublicIPv6Host();
270// NOLINTEND
271
272} // namespace rtc
Definition _HeaderOutputPredefine.h:260
Definition AsyncPacketSocket.h:20
Definition IPAddress.h:7
Definition MessageDigest.h:7
Definition SocketAddress.h:12
Definition WeakPtr.h:8
Definition PacketInfo.h:7