LeviLamina
Loading...
Searching...
No Matches
LanThreadManager.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/ILanDiscovery.h"
8#include "mc/deps/nether_net/lan/Controller.h"
9#include "mc/external/rtc/Thread.h"
10#include "mc/external/sigslot/has_slots.h"
11#include "mc/external/sigslot/single_threaded.h"
12
13// auto generated forward declare list
14// clang-format off
15namespace Bedrock::PubSub { class Subscription; }
16namespace NetherNet { struct DiscoveryResponsePacket; }
17namespace NetherNet { struct ILanEventHandler; }
18namespace NetherNet { struct NetworkID; }
19namespace NetherNet { struct ThreadInit; }
20namespace rtc { class AsyncPacketSocket; }
21namespace rtc { class ReceivedPacket; }
22namespace rtc { class SocketAddress; }
23// clang-format on
24
25namespace NetherNet {
26
28 public ::rtc::Thread,
29 public ::sigslot::has_slots<::sigslot::single_threaded>,
32public:
33 // member variables
34 // NOLINTBEGIN
47 // NOLINTEND
48
49public:
50 // prevent constructor by default
51 LanThreadManager& operator=(LanThreadManager const&);
54
55public:
56 // virtual functions
57 // NOLINTBEGIN
58 // vIndex: 3
59 virtual ~LanThreadManager() /*override*/;
60
61 // vIndex: 6
62 virtual ::Bedrock::PubSub::Subscription RegisterEventHandler(::NetherNet::ILanEventHandler* handler) /*override*/;
63
64 // vIndex: 0
65 virtual bool IsBroadcastDiscoveryEnabled(::NetherNet::NetworkID id) /*override*/;
66
67 // vIndex: 2
68 virtual void EnableBroadcastDiscovery(::NetherNet::NetworkID id) /*override*/;
69
70 // vIndex: 1
71 virtual void DisableBroadcastDiscovery(::NetherNet::NetworkID id) /*override*/;
72
73 // vIndex: 4
74 virtual void SendLanBroadcastResponse(
75 ::rtc::SocketAddress const& destination,
77 ) /*override*/;
78
79 // vIndex: 5
80 virtual void SendSignalingMessageTo(
81 ::NetherNet::NetworkID networkIdFrom,
82 ::NetherNet::NetworkID networkIdTo,
83 ::std::string const& message
84 ) /*override*/;
85
86 // vIndex: 3
87 virtual bool IsNetworkIdOnLan(::NetherNet::NetworkID networkId) /*override*/;
88
89 // vIndex: 7
90 virtual void Suspend() /*override*/;
91
92 // vIndex: 8
93 virtual void Resume() /*override*/;
94 // NOLINTEND
95
96public:
97 // member functions
98 // NOLINTBEGIN
99 MCNAPI void BeginNetworkDiscovery();
100
101 MCNAPI void BroadcastTask();
102
104
105 MCNAPI void DestroyLanResources();
106
107 MCNAPI void Initialize(
108 char const* threadName,
109 ::NetherNet::ThreadInit const& threadInit,
110 uint64 applicationId,
111 ushort port,
112 ::std::chrono::milliseconds interval
113 );
114
116
118
120
121 MCNAPI void SendLanBroadcastRequest(::std::unique_ptr<::rtc::AsyncPacketSocket>& socket, ::NetherNet::NetworkID id);
122
124 ::std::unique_ptr<::rtc::AsyncPacketSocket>& socket,
125 ::NetherNet::NetworkID networkIdFrom,
126 ::NetherNet::NetworkID networkIdTo,
127 ::std::string const& message
128 );
129
130 MCNAPI ::std::error_code SendToHelper(
131 ::std::unique_ptr<::rtc::AsyncPacketSocket>& socket,
132 void const* data,
133 uint64 size,
134 ::rtc::SocketAddress const& addr
135 );
136
137 MCNAPI void Shutdown();
138 // NOLINTEND
139
140public:
141 // constructor thunks
142 // NOLINTBEGIN
143 MCNAPI void* $ctor(::NetherNet::ContextProxy const& ctx);
144 // NOLINTEND
145
146public:
147 // destructor thunk
148 // NOLINTBEGIN
149 MCNAPI void $dtor();
150 // NOLINTEND
151
152public:
153 // virtual function thunks
154 // NOLINTBEGIN
155 MCNAPI ::Bedrock::PubSub::Subscription $RegisterEventHandler(::NetherNet::ILanEventHandler* handler);
156
158
160
162
164 ::rtc::SocketAddress const& destination,
166 );
167
169 ::NetherNet::NetworkID networkIdFrom,
170 ::NetherNet::NetworkID networkIdTo,
171 ::std::string const& message
172 );
173
175
176 MCNAPI void $Suspend();
177
178 MCNAPI void $Resume();
179 // NOLINTEND
180
181public:
182 // vftables
183 // NOLINTBEGIN
184 MCNAPI static void** $vftableForHasSlots();
185
186 MCNAPI static void** $vftableForILanDiscovery();
187
188 MCNAPI static void** $vftableForThread();
189
190 MCNAPI static void** $vftableForContextProxy();
191 // NOLINTEND
192};
193
194} // namespace NetherNet
Definition ContextProxy.h:18
Definition ILanDiscovery.h:16
Definition LanThreadManager.h:31
MCAPI void $SendLanBroadcastResponse(::rtc::SocketAddress const &destination, ::NetherNet::DiscoveryResponsePacket const &packet)
MCAPI void * $ctor(::NetherNet::ContextProxy const &ctx)
MCAPI void BeginNetworkDiscovery()
MCAPI void DestroyLanResources()
static MCAPI void ** $vftableForILanDiscovery()
MCAPI void $SendSignalingMessageTo(::NetherNet::NetworkID networkIdFrom, ::NetherNet::NetworkID networkIdTo, ::std::string const &message)
MCAPI void OnNetworkDiscoveryComplete()
static MCAPI void ** $vftableForThread()
MCAPI bool $IsBroadcastDiscoveryEnabled(::NetherNet::NetworkID id)
MCAPI void $DisableBroadcastDiscovery(::NetherNet::NetworkID id)
static MCAPI void ** $vftableForContextProxy()
MCAPI void Initialize(char const *threadName, ::NetherNet::ThreadInit const &threadInit, uint64 applicationId, ushort port, ::std::chrono::milliseconds interval)
MCAPI void SendSignalingMessageTo(::std::unique_ptr<::rtc::AsyncPacketSocket > &socket, ::NetherNet::NetworkID networkIdFrom, ::NetherNet::NetworkID networkIdTo, ::std::string const &message)
MCAPI::std::error_code SendToHelper(::std::unique_ptr<::rtc::AsyncPacketSocket > &socket, void const *data, uint64 size, ::rtc::SocketAddress const &addr)
MCAPI::Bedrock::PubSub::Subscription $RegisterEventHandler(::NetherNet::ILanEventHandler *handler)
MCAPI void $EnableBroadcastDiscovery(::NetherNet::NetworkID id)
MCAPI LanThreadManager(::NetherNet::ContextProxy const &ctx)
MCAPI void OnPacket(::rtc::AsyncPacketSocket *, ::rtc::ReceivedPacket const &packet)
MCAPI void SendLanBroadcastRequest(::std::unique_ptr<::rtc::AsyncPacketSocket > &socket, ::NetherNet::NetworkID id)
static MCAPI void ** $vftableForHasSlots()
MCAPI bool $IsNetworkIdOnLan(::NetherNet::NetworkID networkId)
MCAPI void CreateEncryptedBroadcastSocket()
Definition Controller.h:7
Definition AsyncPacketSocket.h:20
Definition ReceivedPacket.h:16
Definition SocketAddress.h:12
Definition Thread.h:20
Definition has_slots.h:8
Definition DiscoveryResponsePacket.h:10
Definition ILanEventHandler.h:15
Definition NetworkID.h:21
Definition ThreadInit.h:7
Definition ctx.h:5
Definition Alias.h:14