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;
21namespace Bedrock::Threading { class Mutex; }
22namespace NetherNet { struct NetworkID; }
23// clang-format on
24
25class NetherNetServerLocator : public ::StubServerLocator {
26public:
27 // NetherNetServerLocator inner types declare
28 // clang-format off
29 struct ServerData;
30 // clang-format on
31
32 // NetherNetServerLocator inner types define
33 struct ServerData {
34 public:
35 // member variables
36 // NOLINTBEGIN
46 // NOLINTEND
47
48 public:
49 // prevent constructor by default
50 ServerData& operator=(ServerData const&);
51 ServerData(ServerData const&);
52 ServerData();
53
54 public:
55 // member functions
56 // NOLINTBEGIN
57 MCNAPI ::Bedrock::Result<void> read(::ReadOnlyBinaryStream& stream);
58
59 MCNAPI void write(::BinaryStream& stream) const;
60
61 MCNAPI ~ServerData();
62 // NOLINTEND
63
64 public:
65 // destructor thunk
66 // NOLINTBEGIN
67 MCNAPI void $dtor();
68 // NOLINTEND
69 };
70
71public:
72 // member variables
73 // NOLINTBEGIN
82 // NOLINTEND
83
84public:
85 // prevent constructor by default
86 NetherNetServerLocator& operator=(NetherNetServerLocator const&);
87 NetherNetServerLocator(NetherNetServerLocator const&);
88 NetherNetServerLocator();
89
90public:
91 // virtual functions
92 // NOLINTBEGIN
93 virtual ~NetherNetServerLocator() /*override*/;
94
95 virtual void startAnnouncingServer(
96 ::std::string const& playerName,
97 ::std::string const& worldName,
98 ::GameType gameType,
99 int numPlayers,
100 int maxNumPlayers,
101 bool isJoinableThroughServerScreen,
102 bool isEditorWorld,
103 bool isHardcore
104 ) /*override*/;
105
106 virtual void stopAnnouncingServer() /*override*/;
107
108 virtual void startServerDiscovery(::PortPair ports) /*override*/;
109
110 virtual void stopServerDiscovery() /*override*/;
111
112 virtual ::std::vector<::PingedCompatibleServer> getServerList() const /*override*/;
113
114 virtual void clearServerList() /*override*/;
115
116 virtual void update() /*override*/;
117 // NOLINTEND
118
119public:
120 // member functions
121 // NOLINTBEGIN
122 MCNAPI NetherNetServerLocator(
123 ::Bedrock::NotNullNonOwnerPtr<::NetherNetConnector>&& connector,
124 ::Bedrock::NonOwnerPointer<::AppPlatform> const& appPlatform,
125 ::Bedrock::NonOwnerPointer<::SignalingService> signalingService
126 );
127
129
130 MCNAPI void _onDiscoveryResponse(::NetherNet::NetworkID const& networkID, ::gsl::span<char const> responseData);
131
132 MCNAPI void _setDiscoveryRequestCallback(bool enable);
133
134 MCNAPI void _setDiscoveryResponseCallback(bool enable);
135
136 MCNAPI void _setIsAnnouncing(bool isAnnouncing);
137
138 MCNAPI void _setIsDiscovering(bool isDiscovering);
139 // NOLINTEND
140
141public:
142 // static functions
143 // NOLINTBEGIN
144 MCNAPI static ::PingedCompatibleServer
145 _transformFrom(::NetherNet::NetworkID const& networkID, ::NetherNetServerLocator::ServerData&& serverData);
146 // NOLINTEND
147
148public:
149 // constructor thunks
150 // NOLINTBEGIN
151 MCNAPI void* $ctor(
152 ::Bedrock::NotNullNonOwnerPtr<::NetherNetConnector>&& connector,
153 ::Bedrock::NonOwnerPointer<::AppPlatform> const& appPlatform,
154 ::Bedrock::NonOwnerPointer<::SignalingService> signalingService
155 );
156 // NOLINTEND
157
158public:
159 // destructor thunk
160 // NOLINTBEGIN
161 MCNAPI void $dtor();
162 // NOLINTEND
163
164public:
165 // virtual function thunks
166 // NOLINTBEGIN
168 ::std::string const& playerName,
169 ::std::string const& worldName,
170 ::GameType gameType,
171 int numPlayers,
172 int maxNumPlayers,
173 bool isJoinableThroughServerScreen,
174 bool isEditorWorld,
175 bool isHardcore
176 );
177
179
180 MCNAPI void $startServerDiscovery(::PortPair ports);
181
182 MCNAPI void $stopServerDiscovery();
183
184 MCNAPI ::std::vector<::PingedCompatibleServer> $getServerList() const;
185
186 MCNAPI void $clearServerList();
187
188 MCNAPI void $update();
189
190
191 // NOLINTEND
192
193public:
194 // vftables
195 // NOLINTBEGIN
196 MCNAPI static void** $vftable();
197 // NOLINTEND
198};
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 $startServerDiscovery(::PortPair ports)
MCAPI void _setIsDiscovering(bool isDiscovering)
MCAPI void _setIsAnnouncing(bool isAnnouncing)
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 $startAnnouncingServer(::std::string const &playerName, ::std::string const &worldName, ::GameType gameType, int numPlayers, int maxNumPlayers, bool isJoinableThroughServerScreen, bool isEditorWorld, bool isHardcore)
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)
Definition ReadOnlyBinaryStream.h:8
Definition SignalingService.h:39
Definition StubServerLocator.h:17
STL namespace.
Definition NetherNetConnector.h:27
Definition NetherNetServerLocator.h:33
MCAPI void write(::BinaryStream &stream) const
MCAPI ::Bedrock::Result< void > read(::ReadOnlyBinaryStream &stream)
Definition NetworkID.h:17
Definition PingedCompatibleServer.h:5
Definition PortPair.h:5
Definition Alias.h:14