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,
99 ::GameType gameType,
100 int numPlayers,
101 int maxNumPlayers,
102 bool isJoinableThroughServerScreen,
103 bool isEditorWorld,
104 bool isHardcore
105 ) /*override*/;
106
107 virtual void stopAnnouncingServer(::Bedrock::NonOwnerPointer<::AppPlatform> appPlatform) /*override*/;
108
109 virtual void startServerDiscovery(::PortPair ports) /*override*/;
110
111 virtual void stopServerDiscovery() /*override*/;
112
113 virtual ::std::vector<::PingedCompatibleServer> getServerList() const /*override*/;
114
115 virtual void clearServerList() /*override*/;
116
117 virtual void update() /*override*/;
118 // NOLINTEND
119
120public:
121 // member functions
122 // NOLINTBEGIN
123 MCNAPI NetherNetServerLocator(
124 ::Bedrock::NotNullNonOwnerPtr<::NetherNetConnector>&& connector,
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<::SignalingService> signalingService
154 );
155 // NOLINTEND
156
157public:
158 // destructor thunk
159 // NOLINTBEGIN
160 MCNAPI void $dtor();
161 // NOLINTEND
162
163public:
164 // virtual function thunks
165 // NOLINTBEGIN
167 ::std::string const& playerName,
168 ::std::string const& worldName,
169 ::Bedrock::NonOwnerPointer<::AppPlatform> appPlatform,
170 ::GameType gameType,
171 int numPlayers,
172 int maxNumPlayers,
173 bool isJoinableThroughServerScreen,
174 bool isEditorWorld,
175 bool isHardcore
176 );
177
178 MCNAPI void $stopAnnouncingServer(::Bedrock::NonOwnerPointer<::AppPlatform> appPlatform);
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:90
Definition NonOwnerPointer.h:9
Definition Mutex.h:10
Definition BinaryStream.h:11
MCAPI void $startAnnouncingServer(::std::string const &playerName, ::std::string const &worldName, ::Bedrock::NonOwnerPointer<::AppPlatform > appPlatform, ::GameType gameType, int numPlayers, int maxNumPlayers, bool isJoinableThroughServerScreen, bool isEditorWorld, bool isHardcore)
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 * $ctor(::Bedrock::NotNullNonOwnerPtr<::NetherNetConnector > &&connector, ::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 ::std::vector<::PingedCompatibleServer > $getServerList() const
MCAPI void _setDiscoveryResponseCallback(bool enable)
MCAPI void $stopAnnouncingServer(::Bedrock::NonOwnerPointer<::AppPlatform > appPlatform)
Definition ReadOnlyBinaryStream.h:8
Definition SignalingService.h:38
MCAPI StubServerLocator()
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