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 = -1,
29 Poor = 0,
30 Mid = 1,
31 Good = 2,
32 };
33
34public:
35 // virtual functions
36 // NOLINTBEGIN
37 virtual void hostServer();
38
39 virtual ::Social::EduJoinerResponse
40 tryAcceptJoiner(::std::string const& sessionToken, ::std::string const& joinerToHostNonce);
41
42 virtual ::std::string getHostToJoinerNonce(::std::string const& sessionToken) const;
43
44 virtual ::Bedrock::Threading::Async<void> onNextFetchJoiners();
45
46 virtual ::Bedrock::Threading::Async<::Social::EduFetchTenantSettingsResponse> requestTenantSettings();
47
48 virtual ::Bedrock::Threading::Async<::Social::EduFetchServersResponse> requestBroadcastedServers();
49
50 virtual ::Bedrock::Threading::Async<::Social::EduFetchServersResponse>
51 requestServerInfo(::std::vector<::std::string> const& currentServerIds);
52
53 virtual ::Bedrock::Threading::Async<::Social::EduAddServerResponse> requestAddServer(::std::string const& serverId);
54
55 virtual ::Bedrock::Threading::Async<::Social::EduJoinServerResponse>
56 requestJoinServer(::std::string const& serverId, ::std::string const& passcode);
57
58 virtual void saveCachedServersToDisk(
60 ::std::string,
62 ::std::less<::std::string>,
63 ::std::vector<::std::string>,
64 ::std::vector<::Social::EduDedicatedServerDetails>> const& servers
65 );
66
67 virtual ::brstd::flat_map<
68 ::std::string,
70 ::std::less<::std::string>,
71 ::std::vector<::std::string>,
72 ::std::vector<::Social::EduDedicatedServerDetails>>
73 loadCachedServersFromDisk();
74
75 virtual ::Social::EduHeadlessConnectionHandshake getHandshake() const;
76
77 virtual ::std::string getHostIp() const;
78
79 virtual int getHostPort() const;
80
81#ifdef LL_PLAT_S
82 virtual ~IEduMultiplayerHeadless() /*override*/ = default;
83#else // LL_PLAT_C
84 virtual ~IEduMultiplayerHeadless() /*override*/;
85#endif
86
87 // NOLINTEND
88
89public:
90 // static functions
91 // NOLINTBEGIN
92#ifdef LL_PLAT_C
93 MCNAPI static ::std::string const& getServicesEndpoint();
94#endif
95 // NOLINTEND
96
97public:
98 // static variables
99 // NOLINTBEGIN
100 MCNAPI static ::EducationServicesEnvironment& mCachedEnvironment();
101 // NOLINTEND
102
103public:
104 // destructor thunk
105 // NOLINTBEGIN
106 MCNAPI void $dtor();
107 // NOLINTEND
108
109public:
110 // virtual function thunks
111 // NOLINTBEGIN
112#ifdef LL_PLAT_C
113 MCNAPI void $hostServer();
114
115 MCNAPI ::Social::EduJoinerResponse
116 $tryAcceptJoiner(::std::string const& sessionToken, ::std::string const& joinerToHostNonce);
117
118 MCNAPI ::std::string $getHostToJoinerNonce(::std::string const& sessionToken) const;
119
120 MCNAPI ::Bedrock::Threading::Async<void> $onNextFetchJoiners();
121#endif
122
123
124 // NOLINTEND
125};
126
127} // 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