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