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 EduHeadlessConnectionHandshake; }
18namespace Social { struct EduJoinServerResponse; }
19// clang-format on
20
21namespace Social {
22
24public:
25 // IEduMultiplayerHeadless inner types define
26 enum class ServerHealth : int {
27 Unknown = -1,
28 Poor = 0,
29 Mid = 1,
30 Good = 2,
31 };
32
33public:
34 // virtual functions
35 // NOLINTBEGIN
36 virtual void hostServer();
37
38 virtual ::Social::EduJoinerResponse
39 tryAcceptJoiner(::std::string const& sessionToken, ::std::string const& joinerToHostNonce);
40
41 virtual ::std::string getHostToJoinerNonce(::std::string const& sessionToken) const;
42
43 virtual ::Bedrock::Threading::Async<void> onNextFetchJoiners();
44
45 virtual ::Bedrock::Threading::Async<::Social::EduFetchServersResponse> requestBroadcastedServers();
46
47 virtual ::Bedrock::Threading::Async<::Social::EduFetchServersResponse>
48 requestServerInfo(::std::vector<::std::string> const&);
49
50 virtual ::Bedrock::Threading::Async<::Social::EduAddServerResponse> requestAddServer(::std::string const&);
51
52 virtual ::Bedrock::Threading::Async<::Social::EduJoinServerResponse>
53 requestJoinServer(::std::string const&, ::std::string const&);
54
55 virtual void saveCachedServersToDisk(
57 ::std::string,
59 ::std::less<::std::string>,
60 ::std::vector<::std::string>,
61 ::std::vector<::Social::EduDedicatedServerDetails>> const&
62 );
63
64 virtual ::brstd::flat_map<
65 ::std::string,
67 ::std::less<::std::string>,
68 ::std::vector<::std::string>,
69 ::std::vector<::Social::EduDedicatedServerDetails>>
70 loadCachedServersFromDisk();
71
72 virtual ::Social::EduHeadlessConnectionHandshake getHandshake() const;
73
74 virtual ::std::string getHostIp() const;
75
76 virtual int getHostPort() const;
77
78#ifdef LL_PLAT_S
79 virtual ~IEduMultiplayerHeadless() /*override*/ = default;
80#else // LL_PLAT_C
81 virtual ~IEduMultiplayerHeadless() /*override*/;
82#endif
83
84 // NOLINTEND
85
86public:
87 // static functions
88 // NOLINTBEGIN
89 MCNAPI_C static ::std::string const& getServicesEndpoint();
90 // NOLINTEND
91
92public:
93 // static variables
94 // NOLINTBEGIN
95 MCNAPI static ::EducationServicesEnvironment& mCachedEnvironment();
96 // NOLINTEND
97
98public:
99 // destructor thunk
100 // NOLINTBEGIN
101 MCNAPI void $dtor();
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:23
static MCAPI ::EducationServicesEnvironment & mCachedEnvironment()
Definition flat_map.h:8
Definition EduAddServerResponse.h:7
Definition EduDedicatedServerDetails.h:15
Definition EduFetchServersResponse.h:7
Definition EduHeadlessConnectionHandshake.h:12
Definition EduJoinServerResponse.h:7