LeviLamina
Loading...
Searching...
No Matches
IEduMultiplayerHeadless.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/deps/core/utility/EnableNonOwnerReferences.h"
8#include "mc/options/EducationServicesEnvironment.h"
9#include "mc/platform/brstd/flat_map.h"
10#include "mc/social/EduJoinerResponse.h"
11
12// auto generated forward declare list
13// clang-format off
14namespace Social { struct EduAddServerResponse; }
15namespace Social { struct EduDedicatedServerDetails; }
16namespace Social { struct EduFetchServersResponse; }
17namespace Social { struct EduFetchTenantSettingsResponse; }
18namespace Social { struct EduHeadlessConnectionHandshake; }
19namespace Social { struct EduJoinServerResponse; }
20// clang-format on
21
22namespace Social {
23
25public:
26 // IEduMultiplayerHeadless inner types define
27 enum class ServerHealth : int {
28 Unknown = 4294967295,
29 Poor = 0,
30 Mid = 1,
31 Good = 2,
32 };
33
34public:
35 // virtual functions
36 // NOLINTBEGIN
37 virtual void hostServer();
38
39#ifdef LL_PLAT_S
40 virtual ::Social::EduJoinerResponse tryAcceptJoiner(::std::string const&, ::std::string const&);
41#else // LL_PLAT_C
42 virtual ::Social::EduJoinerResponse
43 tryAcceptJoiner(::std::string const& sessionToken, ::std::string const& joinerToHostNonce);
44#endif
45
46#ifdef LL_PLAT_S
47 virtual ::std::string getHostToJoinerNonce(::std::string const&) const;
48#else // LL_PLAT_C
49 virtual ::std::string getHostToJoinerNonce(::std::string const& sessionToken) const;
50#endif
51
52 virtual ::Bedrock::Threading::Async<void> onNextFetchJoiners();
53
54 virtual ::Bedrock::Threading::Async<::Social::EduFetchTenantSettingsResponse> requestTenantSettings();
55
56 virtual ::Bedrock::Threading::Async<::Social::EduFetchServersResponse> requestBroadcastedServers();
57
58 virtual ::Bedrock::Threading::Async<::Social::EduFetchServersResponse>
59 requestServerInfo(::std::vector<::std::string> const& currentServerIds);
60
61 virtual ::Bedrock::Threading::Async<::Social::EduAddServerResponse> requestAddServer(::std::string const& serverId);
62
63 virtual ::Bedrock::Threading::Async<::Social::EduJoinServerResponse>
64 requestJoinServer(::std::string const& serverId, ::std::string const& passcode);
65
66 virtual void saveCachedServersToDisk(
68 ::std::string,
70 ::std::less<::std::string>,
71 ::std::vector<::std::string>,
72 ::std::vector<::Social::EduDedicatedServerDetails>> const& servers
73 );
74
75 virtual ::brstd::flat_map<
76 ::std::string,
78 ::std::less<::std::string>,
79 ::std::vector<::std::string>,
80 ::std::vector<::Social::EduDedicatedServerDetails>>
81 loadCachedServersFromDisk();
82
83 virtual ::Social::EduHeadlessConnectionHandshake getHandshake() const;
84
85 virtual ::std::string getHostIp() const;
86
87 virtual int getHostPort() const;
88 // NOLINTEND
89
90public:
91 // static functions
92 // NOLINTBEGIN
93#ifdef LL_PLAT_C
94 MCNAPI static ::std::string const& getServicesEndpoint();
95#endif
96 // NOLINTEND
97
98public:
99 // static variables
100 // NOLINTBEGIN
101 MCNAPI static ::EducationServicesEnvironment& mCachedEnvironment();
102 // NOLINTEND
103
104public:
105 // virtual function thunks
106 // NOLINTBEGIN
107#ifdef LL_PLAT_C
108 MCNAPI void $hostServer();
109
110 MCNAPI ::Social::EduJoinerResponse
111 $tryAcceptJoiner(::std::string const& sessionToken, ::std::string const& joinerToHostNonce);
112
113 MCNAPI ::std::string $getHostToJoinerNonce(::std::string const& sessionToken) const;
114
115 MCNAPI ::Bedrock::Threading::Async<void> $onNextFetchJoiners();
116#endif
117
118
119 // NOLINTEND
120};
121
122} // namespace Social
Definition EnableNonOwnerReferences.h:7
Definition IEduMultiplayerHeadless.h:24
static MCAPI ::EducationServicesEnvironment & mCachedEnvironment()
Definition flat_map.h:15
Definition EduAddServerResponse.h:7
Definition EduDedicatedServerDetails.h:15
Definition EduFetchServersResponse.h:7
Definition EduFetchTenantSettingsResponse.h:7
Definition EduHeadlessConnectionHandshake.h:12
Definition EduJoinServerResponse.h:7