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();
58
59 // vIndex: 1
60 virtual ::cricket::StunMessage* CreateNew() const;
61
62 // vIndex: 2
63 virtual ::cricket::StunAttributeValueType GetAttributeValueType(int type) const;
64 // NOLINTEND
65
66public:
67 // member functions
68 // NOLINTBEGIN
69 MCNAPI void AddAttribute(::std::unique_ptr<::cricket::StunAttribute> attr);
70
71 MCNAPI bool AddFingerprint();
72
73 MCNAPI bool AddMessageIntegrity(::std::string_view password);
74
75 MCNAPI bool AddMessageIntegrity32(::std::string_view password);
76
77 MCNAPI bool AddMessageIntegrityOfType(int attr_type, uint64 attr_size, ::std::string_view key);
78
79 MCNAPI ::std::unique_ptr<::cricket::StunMessage> Clone() const;
80
81 MCNAPI ::cricket::StunAttribute* CreateAttribute(int type, uint64 length);
82
83 MCNAPI bool
84 EqualAttributes(::cricket::StunMessage const* other, ::std::function<bool(int)> attribute_type_mask) const;
85
86 MCNAPI ::cricket::StunAddressAttribute const* GetAddress(int type) const;
87
88 MCNAPI ::cricket::StunAttribute const* GetAttribute(int type) const;
89
90 MCNAPI ::cricket::StunByteStringAttribute const* GetByteString(int type) const;
91
92 MCNAPI ::cricket::StunErrorCodeAttribute const* GetErrorCode() const;
93
94 MCNAPI int GetErrorCodeValue() const;
95
96 MCNAPI ::std::vector<ushort> GetNonComprehendedAttributes() const;
97
98 MCNAPI ::cricket::StunUInt16ListAttribute const* GetUInt16List(int type) const;
99
100 MCNAPI ::cricket::StunUInt32Attribute const* GetUInt32(int type) const;
101
102 MCNAPI ::cricket::StunUInt64Attribute const* GetUInt64(int type) const;
103
104 MCNAPI bool IsLegacy() const;
105
106 MCNAPI bool Read(::rtc::ByteBufferReader* buf);
107
108 MCNAPI ::cricket::StunMessage::IntegrityStatus RevalidateMessageIntegrity(::std::string const& password);
109
110 MCNAPI StunMessage();
111
112 MCNAPI explicit StunMessage(ushort type);
113
114 MCNAPI StunMessage(ushort type, ::std::string_view transaction_id);
115
116 MCNAPI ::cricket::StunMessage::IntegrityStatus ValidateMessageIntegrity(::std::string const& password);
117
118 MCNAPI bool Write(::rtc::ByteBufferWriter* buf) const;
119 // NOLINTEND
120
121public:
122 // static functions
123 // NOLINTBEGIN
124 MCNAPI static ::std::string GenerateTransactionId();
125
126 MCNAPI static bool IsStunMethod(::rtc::ArrayView<int> methods, char const* data, uint64 size);
127
128 MCNAPI static bool ValidateFingerprint(char const* data, uint64 size);
129
131 int mi_attr_type,
132 uint64 mi_attr_size,
133 char const* data,
134 uint64 size,
135 ::std::string const& password
136 );
137 // NOLINTEND
138
139public:
140 // constructor thunks
141 // NOLINTBEGIN
142 MCNAPI void* $ctor();
143
144 MCNAPI void* $ctor(ushort type);
145
146 MCNAPI void* $ctor(ushort type, ::std::string_view transaction_id);
147 // NOLINTEND
148
149public:
150 // destructor thunk
151 // NOLINTBEGIN
152 MCNAPI void $dtor();
153 // NOLINTEND
154
155public:
156 // virtual function thunks
157 // NOLINTBEGIN
158 MCNAPI ::cricket::StunMessage* $CreateNew() const;
159
160 MCNAPI ::cricket::StunAttributeValueType $GetAttributeValueType(int type) const;
161 // NOLINTEND
162
163public:
164 // vftables
165 // NOLINTBEGIN
166 MCNAPI static void** $vftable();
167 // NOLINTEND
168};
169
170} // namespace cricket
Definition StunMessage.h:23
MCAPI ::std::vector< ushort > GetNonComprehendedAttributes() const
MCAPI::cricket::StunAttribute const * GetAttribute(int type) const
static MCAPI bool IsStunMethod(::rtc::ArrayView< int > methods, char const *data, uint64 size)
MCAPI bool AddMessageIntegrityOfType(int attr_type, uint64 attr_size, ::std::string_view key)
MCAPI ::std::unique_ptr<::cricket::StunMessage > Clone() const
MCAPI bool Write(::rtc::ByteBufferWriter *buf) const
MCAPI StunMessage(ushort type)
MCAPI StunMessage(ushort type, ::std::string_view transaction_id)
MCAPI::cricket::StunAttribute * CreateAttribute(int type, uint64 length)
MCAPI::cricket::StunByteStringAttribute const * GetByteString(int type) const
MCAPI::cricket::StunAttributeValueType $GetAttributeValueType(int type) const
MCAPI void * $ctor(ushort type, ::std::string_view transaction_id)
static MCAPI bool ValidateFingerprint(char const *data, uint64 size)
MCAPI void $dtor()
MCAPI void * $ctor(ushort type)
static MCAPI bool ValidateMessageIntegrityOfType(int mi_attr_type, uint64 mi_attr_size, char const *data, uint64 size, ::std::string const &password)
MCAPI::cricket::StunMessage::IntegrityStatus ValidateMessageIntegrity(::std::string const &password)
MCAPI bool AddMessageIntegrity32(::std::string_view password)
MCAPI bool IsLegacy() const
MCAPI::cricket::StunMessage * $CreateNew() const
static MCAPI void ** $vftable()
MCAPI bool Read(::rtc::ByteBufferReader *buf)
MCAPI void AddAttribute(::std::unique_ptr<::cricket::StunAttribute > attr)
MCAPI::cricket::StunUInt32Attribute const * GetUInt32(int type) const
static MCAPI ::std::string GenerateTransactionId()
MCAPI::cricket::StunUInt64Attribute const * GetUInt64(int type) const
MCAPI void * $ctor()
MCAPI bool EqualAttributes(::cricket::StunMessage const *other, ::std::function< bool(int)> attribute_type_mask) const
MCAPI bool AddMessageIntegrity(::std::string_view password)
MCAPI::cricket::StunUInt16ListAttribute const * GetUInt16List(int type) const
MCAPI::cricket::StunErrorCodeAttribute const * GetErrorCode() const
MCAPI int GetErrorCodeValue() const
MCAPI::cricket::StunAddressAttribute const * GetAddress(int type) const
MCAPI bool AddFingerprint()
MCAPI::cricket::StunMessage::IntegrityStatus RevalidateMessageIntegrity(::std::string const &password)
Definition _HeaderOutputPredefine.h:260
Definition ByteBufferReader.h:12
Definition ByteBufferWriter.h:11
Definition Alias.h:14