LeviLamina
Loading...
Searching...
No Matches
ServerLocator.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/threading/Async.h"
7#include "mc/network/NetworkEnableDisableListener.h"
8#include "mc/network/ServerConnectivityTestResult.h"
9#include "mc/world/level/GameType.h"
10
11// auto generated forward declare list
12// clang-format off
15struct PortPair;
17// clang-format on
18
19class ServerLocator : public ::NetworkEnableDisableListener {
20public:
21 // virtual functions
22 // NOLINTBEGIN
23 virtual ~ServerLocator() /*override*/ = default;
24
25 virtual void startAnnouncingServer(
26 ::std::string const& playerName,
27 ::std::string const& worldName,
28 ::GameType gameType,
29 int numPlayers,
30 int maxNumPlayers,
31 bool isJoinableThroughServerScreen,
32 bool isEditorWorld,
33 bool isHardcore,
35 ) = 0;
36
37 virtual void stopAnnouncingServer() = 0;
38
39 virtual void startServerDiscovery(::PortPair ports) = 0;
40
41 virtual void stopServerDiscovery() = 0;
42
43 virtual void addCustomServer(::AsynchronousIPResolver const& futureIP, int port) = 0;
44
45 virtual void addCustomServer(::std::string const& address, int port) = 0;
46
47 virtual ::std::vector<::PingedCompatibleServer> getServerList() const = 0;
48
49 virtual void clearServerList() = 0;
50
51 virtual void update() = 0;
52
53 virtual float getPingTimeForGUID(::std::string const& guid) = 0;
54
55 virtual void checkCanConnectToCustomServerAsync(
56 ::std::string hostIpAddress,
57 int port,
58 ::std::function<void(::ServerConnectivityTestResult)> callback
59 ) = 0;
60
61 virtual void _onDisable() /*override*/;
62
63 virtual void _onEnable() /*override*/;
64 // NOLINTEND
65
66public:
67 // member functions
68 // NOLINTBEGIN
69#ifdef LL_PLAT_C
70 MCNAPI ::Bedrock::Threading::Async<::ServerConnectivityTestResult>
71 checkCanConnectToCustomServerAsync(::std::string const& hostIpAddress, int port);
72#endif
73 // NOLINTEND
74
75public:
76 // virtual function thunks
77 // NOLINTBEGIN
78 MCNAPI void $_onDisable();
79
80 MCNAPI void $_onEnable();
81
82
83 // NOLINTEND
84};
Definition AsynchronousIPResolver.h:8
Definition ServerLocator.h:19
MCAPI void $_onEnable()
MCAPI void $_onDisable()
Definition PingedCompatibleServer.h:5
Definition PortPair.h:5
Definition ServerSupportedAuthenticationTypes.h:5