Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
StubServerLocator.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/network/ServerConnectivityTestResult.h"
7#include "mc/network/ServerLocator.h"
8#include "mc/world/level/GameType.h"
9
10// auto generated forward declare list
11// clang-format off
14struct PortPair;
16namespace Social { struct Nonce; }
17// clang-format on
18
20public:
21 // virtual functions
22 // NOLINTBEGIN
23 virtual ~StubServerLocator() /*override*/ = default;
24
25#ifdef LL_PLAT_S
26 virtual void startAnnouncingServer(
27 ::std::string const& playerName,
28 ::std::string const& worldName,
29 ::GameType gameType,
30 int numPlayers,
31 int maxNumPlayers,
32 bool isJoinableThroughServerScreen,
33 bool isEditorWorld,
34 bool isHardcore,
36 ::Social::Nonce const& nonce
37 ) /*override*/;
38#else // LL_PLAT_C
39 virtual void startAnnouncingServer(
40 ::std::string const& playerName,
41 ::std::string const& worldName,
42 ::GameType worldGameType,
43 int numPlayers,
44 int maxNumPlayers,
45 bool isJoinableThroughServerScreen,
46 bool isEditorWorld,
47 bool isHardcore,
49 ::Social::Nonce const& nonce
50 ) /*override*/;
51#endif
52
53 virtual void stopAnnouncingServer() /*override*/;
54
55 virtual void startServerDiscovery(::PortPair ports) /*override*/;
56
57 virtual void addCustomServer(::AsynchronousIPResolver const& futureIP, int port) /*override*/;
58
59 virtual void stopServerDiscovery() /*override*/;
60
61 virtual ::std::vector<::PingedCompatibleServer> getServerList() const /*override*/;
62
63 virtual void update() /*override*/;
64
65#ifdef LL_PLAT_S
66 virtual ::std::chrono::milliseconds getPingTimeForGUID(::std::string const&) /*override*/;
67#else // LL_PLAT_C
68 virtual ::std::chrono::milliseconds getPingTimeForGUID(::std::string const& guid) /*override*/;
69#endif
70
71#ifdef LL_PLAT_S
72 virtual void checkCanConnectToCustomServerAsync(
73 ::std::string,
74 int,
75 ::std::function<void(::ServerConnectivityTestResult)> callback
76 ) /*override*/;
77#else // LL_PLAT_C
78 virtual void checkCanConnectToCustomServerAsync(
79 ::std::string hostIpAddress,
80 int port,
81 ::std::function<void(::ServerConnectivityTestResult)> callback
82 ) /*override*/;
83#endif
84
85 // NOLINTEND
86
87public:
88 // virtual function thunks
89 // NOLINTBEGIN
90#ifdef LL_PLAT_S
91 MCNAPI void $startAnnouncingServer(
92 ::std::string const& playerName,
93 ::std::string const& worldName,
94 ::GameType gameType,
95 int numPlayers,
96 int maxNumPlayers,
97 bool isJoinableThroughServerScreen,
98 bool isEditorWorld,
99 bool isHardcore,
101 ::Social::Nonce const& nonce
102 );
103#else // LL_PLAT_C
105 ::std::string const& playerName,
106 ::std::string const& worldName,
107 ::GameType worldGameType,
108 int numPlayers,
109 int maxNumPlayers,
110 bool isJoinableThroughServerScreen,
111 bool isEditorWorld,
112 bool isHardcore,
114 ::Social::Nonce const& nonce
115 );
116#endif
117
119
121
122 MCNAPI void $addCustomServer(::AsynchronousIPResolver const& futureIP, int port);
123
124 MCNAPI void $stopServerDiscovery();
125
126 MCNAPI ::std::vector<::PingedCompatibleServer> $getServerList() const;
127
128 MCNAPI void $update();
129
130#ifdef LL_PLAT_S
131 MCNAPI ::std::chrono::milliseconds $getPingTimeForGUID(::std::string const&);
132#else // LL_PLAT_C
133 MCNAPI ::std::chrono::milliseconds $getPingTimeForGUID(::std::string const& guid);
134#endif
135
136#ifdef LL_PLAT_S
138 ::std::string,
139 int,
140 ::std::function<void(::ServerConnectivityTestResult)> callback
141 );
142#else // LL_PLAT_C
144 ::std::string hostIpAddress,
145 int port,
146 ::std::function<void(::ServerConnectivityTestResult)> callback
147 );
148#endif
149
150
151 // NOLINTEND
152};
Definition AsynchronousIPResolver.h:5
Definition ServerLocator.h:22
Definition StubServerLocator.h:19
MCAPI void $stopAnnouncingServer()
MCAPI::std::chrono::milliseconds $getPingTimeForGUID(::std::string const &guid)
MCAPI void $checkCanConnectToCustomServerAsync(::std::string hostIpAddress, int port, ::std::function< void(::ServerConnectivityTestResult)> callback)
MCAPI void $addCustomServer(::AsynchronousIPResolver const &futureIP, int port)
MCAPI void $startServerDiscovery(::PortPair ports)
MCAPI ::std::vector<::PingedCompatibleServer > $getServerList() const
MCAPI void $startAnnouncingServer(::std::string const &playerName, ::std::string const &worldName, ::GameType worldGameType, int numPlayers, int maxNumPlayers, bool isJoinableThroughServerScreen, bool isEditorWorld, bool isHardcore, ::ServerSupportedAuthenticationTypes supportedAuth, ::Social::Nonce const &nonce)
MCAPI void $update()
MCAPI void $stopServerDiscovery()
Definition PingedCompatibleServer.h:5
Definition PortPair.h:5
Definition ServerSupportedAuthenticationTypes.h:5
Definition Nonce.h:10