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/cereal/ContextArea.h"
7#include "mc/deps/core/threading/Async.h"
8#include "mc/deps/core/utility/NonOwnerPointer.h"
9#include "mc/network/StubServerLocator.h"
10#include "mc/platform/threading/UniqueLock.h"
11#include "mc/world/level/GameType.h"
12
13// auto generated forward declare list
14// clang-format off
15class AppPlatform;
20struct PortPair;
22namespace Bedrock::Http { class DispatcherInterface; }
23namespace NetherNet { struct NetworkID; }
24namespace Social { struct Nonce; }
25namespace cereal { struct ReflectionCtx; }
26namespace cereal { struct SchemaWriter; }
27// clang-format on
28
29class NetherNetServerLocator : public ::StubServerLocator {
30public:
31 // NetherNetServerLocator inner types declare
32 // clang-format off
33 struct ServerData;
34 // clang-format on
35
36 // NetherNetServerLocator inner types define
37 struct ServerData {
38 public:
39 // member variables
40 // NOLINTBEGIN
54 // NOLINTEND
55
56 public:
57 // prevent constructor by default
58 ServerData& operator=(ServerData const&);
59 ServerData(ServerData const&);
60 ServerData();
61
62 public:
63 // static functions
64 // NOLINTBEGIN
65 MCNAPI static void bindType(::cereal::ReflectionCtx& ctx);
66 // NOLINTEND
67 };
68
69public:
70 // member variables
71 // NOLINTBEGIN
84 // NOLINTEND
85
86public:
87 // prevent constructor by default
88 NetherNetServerLocator& operator=(NetherNetServerLocator const&);
89 NetherNetServerLocator(NetherNetServerLocator const&);
90 NetherNetServerLocator();
91
92public:
93 // virtual functions
94 // NOLINTBEGIN
95 virtual ~NetherNetServerLocator() /*override*/ = default;
96
97 virtual void startAnnouncingServer(
98 ::std::string const& playerName,
99 ::std::string const& worldName,
100 ::GameType gameType,
101 int numPlayers,
102 int maxNumPlayers,
103 bool isJoinableThroughServerScreen,
104 bool isEditorWorld,
105 bool isHardcore,
107 ::Social::Nonce const& nonce
108 ) /*override*/;
109
110 virtual void stopAnnouncingServer() /*override*/;
111
112 virtual void startServerDiscovery(::PortPair ports) /*override*/;
113
114 virtual void stopServerDiscovery() /*override*/;
115
116 virtual void addCustomServer(::AsynchronousIPResolver const& futureIP, int port) /*override*/;
117
118 virtual ::std::vector<::PingedCompatibleServer> getServerList() const /*override*/;
119
120 virtual void update() /*override*/;
121 // NOLINTEND
122
123public:
124 // member functions
125 // NOLINTBEGIN
126 MCNAPI NetherNetServerLocator(
127 ::Bedrock::NotNullNonOwnerPtr<::NetherNetConnector>&& connector,
128 ::Bedrock::NonOwnerPointer<::AppPlatform> const& appPlatform,
129 ::Bedrock::NonOwnerPointer<::Bedrock::Http::DispatcherInterface> dispatcher,
130 ::Bedrock::NonOwnerPointer<::SignalingService> signalingService
131 );
132
134
135 MCNAPI bool _onDiscoveryRequest(::cereal::SchemaWriter& writer, ::cereal::ContextArea area);
136
137 MCNAPI ::Bedrock::Threading::Async<::PingedCompatibleServer> _pingExternalServer(
138 ::AsynchronousIPResolver const& futureIP,
139 ushort port,
140 ::std::vector<::std::string> urls,
141 uint64 index
142 );
143
144 MCNAPI void _setDiscoveryRequestCallback(bool enable);
145
146 MCNAPI void _setDiscoveryResponseCallback(bool enable);
147
148 MCNAPI void clearServerList();
149 // NOLINTEND
150
151public:
152 // static functions
153 // NOLINTBEGIN
154 MCNAPI static ::PingedCompatibleServer
155 _transformFrom(::NetherNet::NetworkID const& networkID, ::NetherNetServerLocator::ServerData&& serverData);
156 // NOLINTEND
157
158public:
159 // constructor thunks
160 // NOLINTBEGIN
161 MCNAPI void* $ctor(
162 ::Bedrock::NotNullNonOwnerPtr<::NetherNetConnector>&& connector,
163 ::Bedrock::NonOwnerPointer<::AppPlatform> const& appPlatform,
164 ::Bedrock::NonOwnerPointer<::Bedrock::Http::DispatcherInterface> dispatcher,
165 ::Bedrock::NonOwnerPointer<::SignalingService> signalingService
166 );
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 isJoinableThroughServerScreen,
179 bool isEditorWorld,
180 bool isHardcore,
182 ::Social::Nonce const& nonce
183 );
184
186
187 MCNAPI void $startServerDiscovery(::PortPair ports);
188
189 MCNAPI void $stopServerDiscovery();
190
191 MCNAPI void $addCustomServer(::AsynchronousIPResolver const& futureIP, int port);
192
193 MCNAPI ::std::vector<::PingedCompatibleServer> $getServerList() const;
194
195 MCNAPI void $update();
196
197
198 // NOLINTEND
199};
Definition AppPlatform.h:78
Definition AsynchronousIPResolver.h:5
Definition DispatcherInterface.h:17
MCAPI ::Bedrock::Threading::Async<::PingedCompatibleServer > _pingExternalServer(::AsynchronousIPResolver const &futureIP, ushort port, ::std::vector<::std::string > urls, uint64 index)
MCAPI void $startAnnouncingServer(::std::string const &playerName, ::std::string const &worldName, ::GameType gameType, int numPlayers, int maxNumPlayers, bool isJoinableThroughServerScreen, bool isEditorWorld, bool isHardcore, ::ServerSupportedAuthenticationTypes supportedAuth, ::Social::Nonce const &nonce)
MCAPI void $stopAnnouncingServer()
MCAPI void $startServerDiscovery(::PortPair ports)
MCAPI void * $ctor(::Bedrock::NotNullNonOwnerPtr<::NetherNetConnector > &&connector, ::Bedrock::NonOwnerPointer<::AppPlatform > const &appPlatform, ::Bedrock::NonOwnerPointer<::Bedrock::Http::DispatcherInterface > dispatcher, ::Bedrock::NonOwnerPointer<::SignalingService > signalingService)
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 $addCustomServer(::AsynchronousIPResolver const &futureIP, int port)
MCAPI ::std::vector<::PingedCompatibleServer > $getServerList() const
MCAPI void _setDiscoveryResponseCallback(bool enable)
MCAPI bool _onDiscoveryRequest(::cereal::SchemaWriter &writer, ::cereal::ContextArea area)
Definition SignalingService.h:37
Definition StubServerLocator.h:19
STL namespace.
Definition NetherNetConnector.h:31
Definition NetherNetServerLocator.h:37
static MCAPI void bindType(::cereal::ReflectionCtx &ctx)
Definition NetworkID.h:17
Definition PingedCompatibleServer.h:5
Definition PortPair.h:5
Definition ServerSupportedAuthenticationTypes.h:5
Definition Nonce.h:10
Definition ReflectionCtx.h:11
Definition SchemaWriter.h:16
Definition ctx.h:5
Definition Alias.h:14