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/platform/brstd/move_only_function.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 void tryAcceptJoiner(
41 ::std::string const& sessionToken,
42 ::std::string const& joinerToHostNonce,
43 ::brstd::move_only_function<void()> onDisconnect,
44 ::brstd::move_only_function<void()> onAccept
45 );
46
47 virtual ::std::string getHostToJoinerNonce(::std::string const& sessionToken) const;
48
49 virtual bool isChatDisabled(::std::string const&) const;
50
51 virtual ::Bedrock::Threading::Async<::Social::EduFetchTenantSettingsResponse> requestTenantSettings();
52
53 virtual ::Bedrock::Threading::Async<::Social::EduFetchServersResponse> requestBroadcastedServers();
54
55 virtual ::Bedrock::Threading::Async<::Social::EduFetchServersResponse>
56 requestServerInfo(::std::vector<::std::string> const& currentServerIds);
57
58 virtual ::Bedrock::Threading::Async<::Social::EduAddServerResponse> requestAddServer(::std::string const& serverId);
59
60 virtual ::Bedrock::Threading::Async<::Social::EduJoinServerResponse>
61 requestJoinServer(::std::string const& serverId, ::std::string const& passcode);
62
63 virtual void saveCachedServersToDisk(
65 ::std::string,
67 ::std::less<::std::string>,
68 ::std::vector<::std::string>,
69 ::std::vector<::Social::EduDedicatedServerDetails>> const& servers
70 );
71
72 virtual ::brstd::flat_map<
73 ::std::string,
75 ::std::less<::std::string>,
76 ::std::vector<::std::string>,
77 ::std::vector<::Social::EduDedicatedServerDetails>>
78 loadCachedServersFromDisk();
79
80 virtual bool tryJoinWorld(::Social::GameConnectionInfo const& connection);
81
82 virtual void clearConnection();
83
84 virtual ::Social::EduHeadlessConnectionHandshake getHandshake() const;
85
86 virtual ::std::string getHostIp() const;
87
88 virtual int getHostPort() const;
89 // NOLINTEND
90
91public:
92 // static variables
93 // NOLINTBEGIN
94#ifdef LL_PLAT_C
95 MCNAPI static ::EducationServicesEnvironment& mCachedEnvironment();
96#endif
97 // NOLINTEND
98
99public:
100 // virtual function thunks
101 // NOLINTBEGIN
102#ifdef LL_PLAT_C
103 MCNAPI void $hostServer();
104
105 MCNAPI void $tryAcceptJoiner(
106 ::std::string const& sessionToken,
107 ::std::string const& joinerToHostNonce,
108 ::brstd::move_only_function<void()> onDisconnect,
109 ::brstd::move_only_function<void()> onAccept
110 );
111
112 MCNAPI ::std::string $getHostToJoinerNonce(::std::string const& sessionToken) const;
113
114 MCNAPI bool $isChatDisabled(::std::string const&) const;
115#endif
116
117
118 // NOLINTEND
119};
120
121} // namespace Social
Definition EnableNonOwnerReferences.h:7
Definition GameConnectionInfo.h:24
Definition IEduMultiplayerHeadless.h:25
Definition flat_map.h:15
Definition move_only_function.h:9
Definition EduAddServerResponse.h:7
Definition EduDedicatedServerDetails.h:15
Definition EduFetchServersResponse.h:7
Definition EduFetchTenantSettingsResponse.h:7
Definition EduHeadlessConnectionHandshake.h:12
Definition EduJoinServerResponse.h:7