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 bool ReadPacket(
86 uint64 connectionId,
87 void* pubDest,
88 uint cbDest,
89 uint* pcbMessageSize
90 ) /*override*/;
91
92 // vIndex: 4
93 virtual bool OpenSessionWithUser(::NetherNet::NetworkID networkIDRemote) /*override*/;
94
95 // vIndex: 5
96 virtual bool CloseSessionWithUser(::NetherNet::NetworkID networkIDRemote, uint64 connectionId) /*override*/;
97
98 // vIndex: 6
99 virtual bool GetSessionState(
100 ::NetherNet::NetworkID networkIDRemote,
101 uint64 connectionId,
102 ::NetherNet::SessionState* pConnectionState
103 ) /*override*/;
104
105 // vIndex: 7
106 virtual void SetSignalingInterface(
107 ::std::shared_ptr<::NetherNet::ISignalingInterface> const& pWebRTCSignalingInterface
108 ) /*override*/;
109
110 // vIndex: 8
111 virtual void SetRelayConfig(::std::vector<::NetherNet::StunRelayServer> const& config) /*override*/;
112
113 // vIndex: 15
114 virtual ::Bedrock::PubSub::Subscription
115 RegisterEventHandler(::NetherNet::ISignalingEventHandler* handler) /*override*/;
116
117 // vIndex: 14
118 virtual ::Bedrock::PubSub::Subscription RegisterEventHandler(::NetherNet::ILanEventHandler* handler) /*override*/;
119
120 // vIndex: 9
121 virtual bool IsBroadcastDiscoveryEnabled() /*override*/;
122
123 // vIndex: 10
124 virtual void EnableBroadcastDiscovery() /*override*/;
125
126 // vIndex: 11
127 virtual void DisableBroadcastDiscovery() /*override*/;
128
129 // vIndex: 12
130 virtual void EnableLANSignaling() /*override*/;
131
132 // vIndex: 13
133 virtual void DisableLANSignaling() /*override*/;
134
135 // vIndex: 1
136 virtual void OnSignalingEvent(::NetherNet::SignalingEvents::MessageReceived const& event) /*override*/;
137
138 // vIndex: 3
139 virtual void OnLanEvent(::NetherNet::LanEvents::MessageReceived const& event) /*override*/;
140
141 // vIndex: 2
142 virtual void OnLanEvent(::NetherNet::LanEvents::DiscoveryRequest const& event) /*override*/;
143
144 // vIndex: 1
145 virtual void OnLanEvent(::NetherNet::LanEvents::DiscoveryResponse const& event) /*override*/;
146 // NOLINTEND
147
148public:
149 // member functions
150 // NOLINTBEGIN
151 MCNAPI ::webrtc::PeerConnectionInterface::RTCConfiguration GetRTCConfig(::NetherNet::NetworkID peerId) const;
152
154
156 ::NetherNet::TransportConfiguration const* pConfiguration,
158 );
159
162 ::std::string const& message,
163 ::NetherNet::SignalingChannelId sourceChannel
164 );
165
166 MCNAPI ::NetherNet::ErrorOr<void, ::NetherNet::ESessionError> SendToSignalingChannel(
167 ::NetherNet::NetworkID networkIDTo,
168 ::std::variant<
172 ::NetherNet::CandidateAdd> const& signal,
173 ::std::optional<::NetherNet::SignalingChannelId> preference
174 );
175 // NOLINTEND
176
177public:
178 // destructor thunk
179 // NOLINTBEGIN
180 MCNAPI void $dtor();
181 // NOLINTEND
182
183public:
184 // virtual function thunks
185 // NOLINTBEGIN
186 MCNAPI bool $SendPacket(
187 ::NetherNet::NetworkID remoteId,
188 uint64 connectionId,
189 ::std::string const& data,
190 ::NetherNet::ESendType eSendType
191 );
192
193 MCNAPI bool $IsPacketAvailable(::NetherNet::NetworkID remoteId, uint64 connectionId, uint* pcbMessageSize);
194
195 MCNAPI bool
196 $ReadPacket(::NetherNet::NetworkID remoteId, uint64 connectionId, void* pubDest, uint cbDest, uint* pcbMessageSize);
197
198 MCNAPI bool $OpenSessionWithUser(::NetherNet::NetworkID networkIDRemote);
199
200 MCNAPI bool $CloseSessionWithUser(::NetherNet::NetworkID networkIDRemote, uint64 connectionId);
201
202 MCNAPI bool $GetSessionState(
203 ::NetherNet::NetworkID networkIDRemote,
204 uint64 connectionId,
205 ::NetherNet::SessionState* pConnectionState
206 );
207
208 MCNAPI void
209 $SetSignalingInterface(::std::shared_ptr<::NetherNet::ISignalingInterface> const& pWebRTCSignalingInterface);
210
211 MCNAPI void $SetRelayConfig(::std::vector<::NetherNet::StunRelayServer> const& config);
212
213 MCNAPI ::Bedrock::PubSub::Subscription $RegisterEventHandler(::NetherNet::ISignalingEventHandler* handler);
214
215 MCNAPI ::Bedrock::PubSub::Subscription $RegisterEventHandler(::NetherNet::ILanEventHandler* handler);
216
218
220
222
223 MCNAPI void $EnableLANSignaling();
224
225 MCNAPI void $DisableLANSignaling();
226
228
230
232
234 // NOLINTEND
235
236public:
237 // vftables
238 // NOLINTBEGIN
239 MCNAPI static void** $vftableForISignalingEventHandler();
240
241 MCNAPI static void** $vftableForILanEventHandler();
242
243 MCNAPI static void** $vftableForContextProxy();
244
246 // NOLINTEND
247};
248
249} // namespace NetherNet
Definition CandidateAdd.h:7
Definition ConnectError.h:7
Definition ConnectRequest.h:12
Definition ConnectResponse.h:12
Definition ContextProxy.h:18
Definition INetherNetTransportInterfaceCallbacks.h:16
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 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 $OnLanEvent(::NetherNet::LanEvents::MessageReceived const &event)
MCAPI bool $CloseSessionWithUser(::NetherNet::NetworkID networkIDRemote, uint64 connectionId)
MCAPI::webrtc::PeerConnectionInterface::RTCConfiguration GetRTCConfig(::NetherNet::NetworkID peerId) const
Definition ILanEventHandler.h:15
Definition ISignalingEventHandler.h:12
Definition DiscoveryRequest.h:7
Definition DiscoveryResponse.h:7
Definition MessageReceived.h:7
Definition NetworkID.h:17
Definition SessionState.h:7
Definition MessageReceived.h:7
Definition TransportConfiguration.h:7
Definition Alias.h:14
Definition PeerConnectionInterface.h:193