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