LeviLamina
Loading...
Searching...
No Matches
SimpleNetworkInterfaceImpl.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/nether_net/ContextProxy.h"
7#include "mc/deps/nether_net/ESendType.h"
8#include "mc/deps/nether_net/ESessionError.h"
9#include "mc/deps/nether_net/ILanEventHandler.h"
10#include "mc/deps/nether_net/INetherNetTransportInterface.h"
11#include "mc/deps/nether_net/ISignalingEventHandler.h"
12#include "mc/deps/nether_net/SignalingChannelId.h"
13#include "mc/deps/nether_net/utils/ErrorOr.h"
14#include "mc/external/webrtc/PeerConnectionInterface.h"
15
16// auto generated forward declare list
17// clang-format off
18namespace Bedrock::PubSub { class Subscription; }
19namespace NetherNet { class CandidateAdd; }
20namespace NetherNet { class ConnectError; }
21namespace NetherNet { class ConnectRequest; }
22namespace NetherNet { class ConnectResponse; }
23namespace NetherNet { class INetherNetTransportInterfaceCallbacks; }
24namespace NetherNet { class ISignalingInterface; }
25namespace NetherNet { struct NetworkID; }
26namespace NetherNet { struct SessionState; }
27namespace NetherNet { struct StunRelayServer; }
28namespace NetherNet { struct TransportConfiguration; }
29namespace NetherNet::LanEvents { struct DiscoveryRequest; }
30namespace NetherNet::LanEvents { struct DiscoveryResponse; }
31namespace NetherNet::LanEvents { struct MessageReceived; }
32namespace NetherNet::SignalingEvents { struct MessageReceived; }
33// clang-format on
34
35namespace NetherNet {
36
41public:
42 // member variables
43 // NOLINTBEGIN
57 // NOLINTEND
58
59public:
60 // prevent constructor by default
64
65public:
66 // virtual functions
67 // NOLINTBEGIN
68 // vIndex: 0
69 virtual ~SimpleNetworkInterfaceImpl() /*override*/;
70
71 // vIndex: 1
72 virtual bool SendPacket(
74 uint64 connectionId,
75 ::std::string const& data,
76 ::NetherNet::ESendType eSendType
77 ) /*override*/;
78
79 // vIndex: 2
80 virtual bool
81 IsPacketAvailable(::NetherNet::NetworkID remoteId, uint64 connectionId, uint* pcbMessageSize) /*override*/;
82
83 // vIndex: 3
84 virtual void ClearPacketData(::NetherNet::NetworkID remoteId, uint64 connectionId) /*override*/;
85
86 // vIndex: 4
87 virtual bool ReadPacket(
89 uint64 connectionId,
90 void* pubDest,
91 uint cbDest,
92 uint* pcbMessageSize
93 ) /*override*/;
94
95 // vIndex: 5
96 virtual bool OpenSessionWithUser(::NetherNet::NetworkID networkIDRemote) /*override*/;
97
98 // vIndex: 6
99 virtual bool CloseSessionWithUser(::NetherNet::NetworkID networkIDRemote, uint64 connectionId) /*override*/;
100
101 // vIndex: 7
102 virtual bool GetSessionState(
103 ::NetherNet::NetworkID networkIDRemote,
104 uint64 connectionId,
105 ::NetherNet::SessionState* pConnectionState
106 ) /*override*/;
107
108 // vIndex: 8
109 virtual void SetSignalingInterface(
110 ::std::shared_ptr<::NetherNet::ISignalingInterface> const& pWebRTCSignalingInterface
111 ) /*override*/;
112
113 // vIndex: 9
114 virtual void SetRelayConfig(::std::vector<::NetherNet::StunRelayServer> const& config) /*override*/;
115
116 // vIndex: 10
117 virtual void SetInactivityTimeout(
118 ::NetherNet::NetworkID remoteId,
119 ::std::optional<::std::chrono::seconds> inactivityTimeout
120 ) /*override*/;
121
122 // vIndex: 17
123 virtual ::Bedrock::PubSub::Subscription
124 RegisterEventHandler(::NetherNet::ISignalingEventHandler* handler) /*override*/;
125
126 // vIndex: 16
127 virtual ::Bedrock::PubSub::Subscription RegisterEventHandler(::NetherNet::ILanEventHandler* handler) /*override*/;
128
129 // vIndex: 11
130 virtual bool IsBroadcastDiscoveryEnabled() /*override*/;
131
132 // vIndex: 12
133 virtual void EnableBroadcastDiscovery() /*override*/;
134
135 // vIndex: 13
136 virtual void DisableBroadcastDiscovery() /*override*/;
137
138 // vIndex: 14
139 virtual void EnableLANSignaling() /*override*/;
140
141 // vIndex: 15
142 virtual void DisableLANSignaling() /*override*/;
143
144 // vIndex: 1
145 virtual void OnSignalingEvent(::NetherNet::SignalingEvents::MessageReceived const& event) /*override*/;
146
147 // vIndex: 3
148 virtual void OnLanEvent(::NetherNet::LanEvents::MessageReceived const& event) /*override*/;
149
150 // vIndex: 2
151 virtual void OnLanEvent(::NetherNet::LanEvents::DiscoveryRequest const& event) /*override*/;
152
153 // vIndex: 1
154 virtual void OnLanEvent(::NetherNet::LanEvents::DiscoveryResponse const& event) /*override*/;
155 // NOLINTEND
156
157public:
158 // member functions
159 // NOLINTBEGIN
161
163 ::NetherNet::TransportConfiguration const* pConfiguration,
165 );
166
169 ::std::string const& message,
170 ::NetherNet::SignalingChannelId sourceChannel
171 );
172
173 MCNAPI ::NetherNet::ErrorOr<void, ::NetherNet::ESessionError> SendToSignalingChannel(
174 ::NetherNet::NetworkID networkIDTo,
175 ::std::variant<
179 ::NetherNet::CandidateAdd> const& signal,
180 ::std::optional<::NetherNet::SignalingChannelId> preference
181 );
182 // NOLINTEND
183
184public:
185 // destructor thunk
186 // NOLINTBEGIN
187 MCNAPI void $dtor();
188 // NOLINTEND
189
190public:
191 // virtual function thunks
192 // NOLINTBEGIN
193 MCNAPI bool $SendPacket(
194 ::NetherNet::NetworkID remoteId,
195 uint64 connectionId,
196 ::std::string const& data,
197 ::NetherNet::ESendType eSendType
198 );
199
200 MCNAPI bool $IsPacketAvailable(::NetherNet::NetworkID remoteId, uint64 connectionId, uint* pcbMessageSize);
201
202 MCNAPI void $ClearPacketData(::NetherNet::NetworkID remoteId, uint64 connectionId);
203
204 MCNAPI bool
205 $ReadPacket(::NetherNet::NetworkID remoteId, uint64 connectionId, void* pubDest, uint cbDest, uint* pcbMessageSize);
206
207 MCNAPI bool $OpenSessionWithUser(::NetherNet::NetworkID networkIDRemote);
208
209 MCNAPI bool $CloseSessionWithUser(::NetherNet::NetworkID networkIDRemote, uint64 connectionId);
210
211 MCNAPI bool $GetSessionState(
212 ::NetherNet::NetworkID networkIDRemote,
213 uint64 connectionId,
214 ::NetherNet::SessionState* pConnectionState
215 );
216
217 MCNAPI void
218 $SetSignalingInterface(::std::shared_ptr<::NetherNet::ISignalingInterface> const& pWebRTCSignalingInterface);
219
220 MCNAPI void $SetRelayConfig(::std::vector<::NetherNet::StunRelayServer> const& config);
221
222 MCNAPI void
223 $SetInactivityTimeout(::NetherNet::NetworkID remoteId, ::std::optional<::std::chrono::seconds> inactivityTimeout);
224
225 MCNAPI ::Bedrock::PubSub::Subscription $RegisterEventHandler(::NetherNet::ISignalingEventHandler* handler);
226
227 MCNAPI ::Bedrock::PubSub::Subscription $RegisterEventHandler(::NetherNet::ILanEventHandler* handler);
228
230
232
234
235 MCNAPI void $EnableLANSignaling();
236
237 MCNAPI void $DisableLANSignaling();
238
240
242
244
246 // NOLINTEND
247
248public:
249 // vftables
250 // NOLINTBEGIN
251 MCNAPI static void** $vftableForISignalingEventHandler();
252
253 MCNAPI static void** $vftableForILanEventHandler();
254
255 MCNAPI static void** $vftableForContextProxy();
256
258 // NOLINTEND
259};
260
261} // namespace NetherNet
Definition CandidateAdd.h:7
Definition ConnectError.h:7
Definition ConnectRequest.h:7
Definition ConnectResponse.h:7
Definition ContextProxy.h:18
Definition INetherNetTransportInterfaceCallbacks.h:15
Definition INetherNetTransportInterface.h:21
Definition SimpleNetworkInterfaceImpl.h:40
MCAPI bool $OpenSessionWithUser(::NetherNet::NetworkID networkIDRemote)
MCAPI ::NetherNet::ErrorOr< void, ::NetherNet::ESessionError > SendToSignalingChannel(::NetherNet::NetworkID networkIDTo, ::std::variant< ::NetherNet::ConnectRequest, ::NetherNet::ConnectResponse, ::NetherNet::ConnectError, ::NetherNet::CandidateAdd > const &signal, ::std::optional<::NetherNet::SignalingChannelId > preference)
MCAPI void $OnSignalingEvent(::NetherNet::SignalingEvents::MessageReceived const &event)
static MCAPI void ** $vftableForISignalingEventHandler()
static MCAPI void ** $vftableForContextProxy()
MCAPI void InitializeConfiguration(::NetherNet::TransportConfiguration const *pConfiguration, ::webrtc::PeerConnectionInterface::RTCConfiguration *pRtcConfigOut)
MCAPI void $OnLanEvent(::NetherNet::LanEvents::DiscoveryRequest const &event)
MCAPI void $ClearPacketData(::NetherNet::NetworkID remoteId, uint64 connectionId)
MCAPI void ReceiveFromSignalingChannel(::NetherNet::NetworkID from, ::std::string const &message, ::NetherNet::SignalingChannelId sourceChannel)
MCAPI bool $IsPacketAvailable(::NetherNet::NetworkID remoteId, uint64 connectionId, uint *pcbMessageSize)
MCAPI bool $GetSessionState(::NetherNet::NetworkID networkIDRemote, uint64 connectionId, ::NetherNet::SessionState *pConnectionState)
MCAPI void $SetSignalingInterface(::std::shared_ptr<::NetherNet::ISignalingInterface > const &pWebRTCSignalingInterface)
MCAPI bool $ReadPacket(::NetherNet::NetworkID remoteId, uint64 connectionId, void *pubDest, uint cbDest, uint *pcbMessageSize)
static MCAPI void ** $vftableForINetherNetTransportInterface()
MCAPI void $SetRelayConfig(::std::vector<::NetherNet::StunRelayServer > const &config)
MCAPI void $OnLanEvent(::NetherNet::LanEvents::DiscoveryResponse const &event)
MCAPI::Bedrock::PubSub::Subscription $RegisterEventHandler(::NetherNet::ILanEventHandler *handler)
MCAPI::Bedrock::PubSub::Subscription $RegisterEventHandler(::NetherNet::ISignalingEventHandler *handler)
MCAPI void Initialize(::NetherNet::INetherNetTransportInterfaceCallbacks *pCallbacks)
MCAPI bool $SendPacket(::NetherNet::NetworkID remoteId, uint64 connectionId, ::std::string const &data, ::NetherNet::ESendType eSendType)
static MCAPI void ** $vftableForILanEventHandler()
MCAPI void $SetInactivityTimeout(::NetherNet::NetworkID remoteId, ::std::optional<::std::chrono::seconds > inactivityTimeout)
MCAPI void $OnLanEvent(::NetherNet::LanEvents::MessageReceived const &event)
MCAPI bool $CloseSessionWithUser(::NetherNet::NetworkID networkIDRemote, uint64 connectionId)
Definition ILanEventHandler.h:15
Definition ISignalingEventHandler.h:12
Definition DiscoveryRequest.h:7
Definition DiscoveryResponse.h:7
Definition MessageReceived.h:7
Definition NetworkID.h:21
Definition SessionState.h:7
Definition MessageReceived.h:7
Definition TransportConfiguration.h:7
Definition Alias.h:14
Definition PeerConnectionInterface.h:193