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 { class GameConnectionInfo; }
15namespace Social { struct EduAddServerResponse; }
16namespace Social { struct EduDedicatedServerDetails; }
17namespace Social { struct EduFetchServersResponse; }
18namespace Social { struct EduFetchTenantSettingsResponse; }
19namespace Social { struct EduHeadlessConnectionHandshake; }
20namespace Social { struct EduJoinServerResponse; }
21// clang-format on
22
23namespace Social {
24
26public:
27 // IEduMultiplayerHeadless inner types define
28 enum class ServerHealth : int {
29 Unknown = -1,
30 Poor = 0,
31 Mid = 1,
32 Good = 2,
33 };
34
35public:
36 // virtual functions
37 // NOLINTBEGIN
38 virtual void hostServer();
39
40 virtual ::Social::EduJoinerResponse
41 tryAcceptJoiner(::std::string const& sessionToken, ::std::string const& joinerToHostNonce);
42
43 virtual ::std::string getHostToJoinerNonce(::std::string const& sessionToken) const;
44
45 virtual ::Bedrock::Threading::Async<void> onNextFetchJoiners();
46
47 virtual ::Bedrock::Threading::Async<::Social::EduFetchTenantSettingsResponse> requestTenantSettings();
48
49 virtual ::Bedrock::Threading::Async<::Social::EduFetchServersResponse> requestBroadcastedServers();
50
51 virtual ::Bedrock::Threading::Async<::Social::EduFetchServersResponse>
52 requestServerInfo(::std::vector<::std::string> const& currentServerIds);
53
54 virtual ::Bedrock::Threading::Async<::Social::EduAddServerResponse> requestAddServer(::std::string const& serverId);
55
56 virtual ::Bedrock::Threading::Async<::Social::EduJoinServerResponse>
57 requestJoinServer(::std::string const& serverId, ::std::string const& passcode);
58
59 virtual void saveCachedServersToDisk(
61 ::std::string,
63 ::std::less<::std::string>,
64 ::std::vector<::std::string>,
65 ::std::vector<::Social::EduDedicatedServerDetails>> const& servers
66 );
67
68 virtual ::brstd::flat_map<
69 ::std::string,
71 ::std::less<::std::string>,
72 ::std::vector<::std::string>,
73 ::std::vector<::Social::EduDedicatedServerDetails>>
74 loadCachedServersFromDisk();
75
76 virtual bool tryJoinWorld(::Social::GameConnectionInfo const& connection);
77
78 virtual void clearConnection();
79
80 virtual ::Social::EduHeadlessConnectionHandshake getHandshake() const;
81
82 virtual ::std::string getHostIp() const;
83
84 virtual int getHostPort() const;
85 // NOLINTEND
86
87public:
88 // static variables
89 // NOLINTBEGIN
90#ifdef LL_PLAT_C
91 MCNAPI static ::EducationServicesEnvironment& mCachedEnvironment();
92#endif
93 // NOLINTEND
94
95public:
96 // virtual function thunks
97 // NOLINTBEGIN
98#ifdef LL_PLAT_C
99 MCNAPI void $hostServer();
100
101 MCNAPI ::Social::EduJoinerResponse
102 $tryAcceptJoiner(::std::string const& sessionToken, ::std::string const& joinerToHostNonce);
103
104 MCNAPI ::std::string $getHostToJoinerNonce(::std::string const& sessionToken) const;
105
106 MCNAPI ::Bedrock::Threading::Async<void> $onNextFetchJoiners();
107#endif
108
109
110 // NOLINTEND
111};
112
113} // namespace Social
Definition EnableNonOwnerReferences.h:7
Definition GameConnectionInfo.h:24
Definition IEduMultiplayerHeadless.h:25
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