LeviLamina
Loading...
Searching...
No Matches
NetherNetServerLocator.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/network/StubServerLocator.h"
8#include "mc/platform/Result.h"
9#include "mc/platform/threading/UniqueLock.h"
10#include "mc/world/level/GameType.h"
11
12// auto generated forward declare list
13// clang-format off
14class AppPlatform;
15class BinaryStream;
20struct PortPair;
22namespace Bedrock::Threading { class Mutex; }
23namespace NetherNet { struct NetworkID; }
24// clang-format on
25
26class NetherNetServerLocator : public ::StubServerLocator {
27public:
28 // NetherNetServerLocator inner types declare
29 // clang-format off
30 struct ServerData;
31 // clang-format on
32
33 // NetherNetServerLocator inner types define
34 struct ServerData {
35 public:
36 // member variables
37 // NOLINTBEGIN
48 // NOLINTEND
49
50 public:
51 // prevent constructor by default
52 ServerData& operator=(ServerData const&);
53 ServerData(ServerData const&);
54 ServerData();
55
56 public:
57 // member functions
58 // NOLINTBEGIN
59 MCNAPI ::NetherNetServerLocator::ServerData& operator=(::NetherNetServerLocator::ServerData&&);
60
61 MCNAPI ::Bedrock::Result<void> read(::ReadOnlyBinaryStream& stream);
62
63 MCNAPI void write(::BinaryStream& stream) const;
64
65 MCNAPI ~ServerData();
66 // NOLINTEND
67
68 public:
69 // destructor thunk
70 // NOLINTBEGIN
71 MCNAPI void $dtor();
72 // NOLINTEND
73 };
74
75public:
76 // member variables
77 // NOLINTBEGIN
86 // NOLINTEND
87
88public:
89 // prevent constructor by default
90 NetherNetServerLocator& operator=(NetherNetServerLocator const&);
91 NetherNetServerLocator(NetherNetServerLocator const&);
92 NetherNetServerLocator();
93
94public:
95 // virtual functions
96 // NOLINTBEGIN
97 virtual ~NetherNetServerLocator() /*override*/;
98
99 virtual void startAnnouncingServer(
100 ::std::string const& playerName,
101 ::std::string const& worldName,
102 ::GameType gameType,
103 int numPlayers,
104 int maxNumPlayers,
105 bool isEditorWorld,
106 bool isHardcore,
107 bool supportedAuth,
109 ) /*override*/;
110
111 virtual void stopAnnouncingServer() /*override*/;
112
113 virtual void startServerDiscovery(::PortPair) /*override*/;
114
115 virtual void stopServerDiscovery() /*override*/;
116
117 virtual ::std::vector<::PingedCompatibleServer> getServerList() const /*override*/;
118
119 virtual void clearServerList() /*override*/;
120
121 virtual void update() /*override*/;
122 // NOLINTEND
123
124public:
125 // member functions
126 // NOLINTBEGIN
127 MCNAPI NetherNetServerLocator(
128 ::Bedrock::NotNullNonOwnerPtr<::NetherNetConnector>&& connector,
129 ::Bedrock::NonOwnerPointer<::AppPlatform> const& appPlatform,
130 ::Bedrock::NonOwnerPointer<::SignalingService> signalingService
131 );
132
134
135 MCNAPI void _onDiscoveryResponse(::NetherNet::NetworkID const& networkID, ::gsl::span<char const> responseData);
136
137 MCNAPI void _pruneStaleServers(::std::chrono::seconds staleAfter);
138
139 MCNAPI void _setDiscoveryRequestCallback(bool enable);
140
141 MCNAPI void _setDiscoveryResponseCallback(bool enable);
142
143 MCNAPI void _setIsDiscovering(bool isDiscovering);
144 // NOLINTEND
145
146public:
147 // static functions
148 // NOLINTBEGIN
149 MCNAPI static ::PingedCompatibleServer
150 _transformFrom(::NetherNet::NetworkID const& networkID, ::NetherNetServerLocator::ServerData&& serverData);
151 // NOLINTEND
152
153public:
154 // constructor thunks
155 // NOLINTBEGIN
156 MCNAPI void* $ctor(
157 ::Bedrock::NotNullNonOwnerPtr<::NetherNetConnector>&& connector,
158 ::Bedrock::NonOwnerPointer<::AppPlatform> const& appPlatform,
159 ::Bedrock::NonOwnerPointer<::SignalingService> signalingService
160 );
161 // NOLINTEND
162
163public:
164 // destructor thunk
165 // NOLINTBEGIN
166 MCNAPI void $dtor();
167 // NOLINTEND
168
169public:
170 // virtual function thunks
171 // NOLINTBEGIN
173 ::std::string const& playerName,
174 ::std::string const& worldName,
175 ::GameType gameType,
176 int numPlayers,
177 int maxNumPlayers,
178 bool isEditorWorld,
179 bool isHardcore,
180 bool supportedAuth,
182 );
183
185
187
188 MCNAPI void $stopServerDiscovery();
189
190 MCNAPI ::std::vector<::PingedCompatibleServer> $getServerList() const;
191
192 MCNAPI void $clearServerList();
193
194 MCNAPI void $update();
195
196
197 // NOLINTEND
198
199public:
200 // vftables
201 // NOLINTBEGIN
202 MCNAPI static void** $vftable();
203 // NOLINTEND
204};
Definition AppPlatform.h:91
Definition Mutex.h:10
Definition BinaryStream.h:11
MCAPI void $stopAnnouncingServer()
MCAPI void _onDiscoveryResponse(::NetherNet::NetworkID const &networkID, ::gsl::span< char const > responseData)
MCAPI void _setIsDiscovering(bool isDiscovering)
static MCAPI void ** $vftable()
MCAPI void $clearServerList()
MCAPI void _setDiscoveryRequestCallback(bool enable)
static MCAPI ::PingedCompatibleServer _transformFrom(::NetherNet::NetworkID const &networkID, ::NetherNetServerLocator::ServerData &&serverData)
MCAPI void _cacheDiscoveryResponseData()
MCAPI void $stopServerDiscovery()
MCAPI void $startServerDiscovery(::PortPair)
MCAPI ::std::vector<::PingedCompatibleServer > $getServerList() const
MCAPI void * $ctor(::Bedrock::NotNullNonOwnerPtr<::NetherNetConnector > &&connector, ::Bedrock::NonOwnerPointer<::AppPlatform > const &appPlatform, ::Bedrock::NonOwnerPointer<::SignalingService > signalingService)
MCAPI void _setDiscoveryResponseCallback(bool enable)
MCAPI void $startAnnouncingServer(::std::string const &playerName, ::std::string const &worldName, ::GameType gameType, int numPlayers, int maxNumPlayers, bool isEditorWorld, bool isHardcore, bool supportedAuth, ::ServerSupportedAuthenticationTypes)
MCAPI void _pruneStaleServers(::std::chrono::seconds staleAfter)
Definition ReadOnlyBinaryStream.h:8
Definition SignalingService.h:41
STL namespace.
Definition NetherNetConnector.h:33
Definition NetherNetServerLocator.h:34
MCAPI void write(::BinaryStream &stream) const
MCAPI::NetherNetServerLocator::ServerData & operator=(::NetherNetServerLocator::ServerData &&)
MCAPI ::Bedrock::Result< void > read(::ReadOnlyBinaryStream &stream)
Definition NetworkID.h:17
Definition PingedCompatibleServer.h:5
Definition PortPair.h:5
Definition ServerSupportedAuthenticationTypes.h:5
Definition Alias.h:14