LeviLamina
Loading...
Searching...
No Matches
StunMessage.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/external/cricket/StunAttributeValueType.h"
7
8// auto generated forward declare list
9// clang-format off
10namespace cricket { class StunAddressAttribute; }
11namespace cricket { class StunAttribute; }
12namespace cricket { class StunByteStringAttribute; }
13namespace cricket { class StunErrorCodeAttribute; }
14namespace cricket { class StunUInt16ListAttribute; }
15namespace cricket { class StunUInt32Attribute; }
16namespace cricket { class StunUInt64Attribute; }
17namespace rtc { class ByteBufferReader; }
18namespace rtc { class ByteBufferWriter; }
19// clang-format on
20
21namespace cricket {
22
24public:
25 // StunMessage inner types define
26 enum class IntegrityStatus : int {
27 KNotSet = 0,
28 KNoIntegrity = 1,
29 KIntegrityOk = 2,
30 KIntegrityBad = 3,
31 KMaxValue = 3,
32 };
33
34public:
35 // member variables
36 // NOLINTBEGIN
46 // NOLINTEND
47
48public:
49 // prevent constructor by default
50 StunMessage& operator=(StunMessage const&);
52
53public:
54 // virtual functions
55 // NOLINTBEGIN
56 // vIndex: 0
57 virtual ~StunMessage() = default;
58
59 // vIndex: 1
60 virtual ::cricket::StunMessage* CreateNew() const;
61
62 // vIndex: 2
63 virtual ::cricket::StunAttributeValueType GetAttributeValueType(int) const;
64 // NOLINTEND
65
66public:
67 // member functions
68 // NOLINTBEGIN
69 MCAPI void AddAttribute(::std::unique_ptr<::cricket::StunAttribute>);
70
71 MCAPI bool AddFingerprint();
72
73 MCAPI bool AddMessageIntegrity(::std::string_view);
74
75 MCAPI bool AddMessageIntegrity32(::std::string_view);
76
77 MCAPI bool AddMessageIntegrityOfType(int, uint64, ::std::string_view);
78
79 MCAPI ::std::unique_ptr<::cricket::StunMessage> Clone() const;
80
81 MCAPI ::cricket::StunAttribute* CreateAttribute(int, uint64);
82
83 MCAPI bool EqualAttributes(::cricket::StunMessage const*, ::std::function<bool(int)>) const;
84
85 MCAPI ::cricket::StunAddressAttribute const* GetAddress(int) const;
86
87 MCAPI ::cricket::StunAttribute const* GetAttribute(int) const;
88
89 MCAPI ::cricket::StunByteStringAttribute const* GetByteString(int) const;
90
91 MCAPI ::cricket::StunErrorCodeAttribute const* GetErrorCode() const;
92
93 MCAPI int GetErrorCodeValue() const;
94
95 MCAPI ::std::vector<ushort> GetNonComprehendedAttributes() const;
96
97 MCAPI ::cricket::StunUInt16ListAttribute const* GetUInt16List(int) const;
98
99 MCAPI ::cricket::StunUInt32Attribute const* GetUInt32(int) const;
100
101 MCAPI ::cricket::StunUInt64Attribute const* GetUInt64(int) const;
102
103 MCAPI bool IsLegacy() const;
104
105 MCAPI bool Read(::rtc::ByteBufferReader*);
106
107 MCAPI ::cricket::StunMessage::IntegrityStatus RevalidateMessageIntegrity(::std::string const&);
108
109 MCAPI StunMessage();
110
111 MCAPI explicit StunMessage(ushort);
112
113 MCAPI StunMessage(ushort, ::std::string_view);
114
115 MCAPI ::cricket::StunMessage::IntegrityStatus ValidateMessageIntegrity(::std::string const&);
116
117 MCAPI bool Write(::rtc::ByteBufferWriter*) const;
118 // NOLINTEND
119
120public:
121 // static functions
122 // NOLINTBEGIN
123 MCAPI static ::std::string GenerateTransactionId();
124
125 MCAPI static bool IsStunMethod(::rtc::ArrayView<int>, char const*, uint64);
126
127 MCAPI static bool ValidateFingerprint(char const*, uint64);
128
129 MCAPI static bool ValidateMessageIntegrityOfType(int, uint64, char const*, uint64, ::std::string const&);
130 // NOLINTEND
131
132public:
133 // constructor thunks
134 // NOLINTBEGIN
135 MCAPI void* $ctor();
136
137 MCAPI void* $ctor(ushort);
138
139 MCAPI void* $ctor(ushort, ::std::string_view);
140 // NOLINTEND
141
142public:
143 // destructor thunk
144 // NOLINTBEGIN
145
146 // NOLINTEND
147
148public:
149 // virtual function thunks
150 // NOLINTBEGIN
151
152 // NOLINTEND
153
154public:
155 // vftables
156 // NOLINTBEGIN
157 MCAPI static void** $vftable();
158 // NOLINTEND
159};
160
161} // namespace cricket
Definition StunMessage.h:23
Definition _HeaderOutputPredefine.h:238
Definition ByteBufferReader.h:12
Definition ByteBufferWriter.h:11
Definition Read.h:6
Definition Write.h:6
Definition Alias.h:14