LeviLamina
Loading...
Searching...
No Matches
ServerWorldJoiner.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/world/JoinServerWorldResult.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8
9// auto generated forward declare list
10// clang-format off
11class IAppPlatform;
12class IClientInstance;
15class ProgressHandler;
16class ServerLocator;
17class TaskGroup;
18struct GatheringManager;
19struct IThirdPartyServerRepository;
20struct NetworkWorldInfo;
22namespace Network { struct ServerID; }
23namespace Social { class GameConnectionInfo; }
24namespace Social { class IUserManager; }
25namespace Social { struct User; }
26namespace World { class ExternalServerWorldList; }
27namespace World { class FriendServerWorldList; }
28namespace World { class IServerURLResolver; }
29namespace World { class LanServerWorldList; }
30namespace World { class ThirdPartyWorldList; }
31// clang-format on
32
33namespace World {
34
36public:
37 // ServerWorldJoiner inner types define
38 enum class ServerType : int {
39 ThirdParty = 0,
40 ExternalServer = 1,
41 ExperienceServer = 2,
42 };
43
44public:
45 // member variables
46 // NOLINTBEGIN
47 ::ll::TypedStorage<8, 8, ::IClientInstance&> mClient;
48 ::ll::TypedStorage<8, 8, ::IMinecraftEventing&> mMinecraftEventing;
49 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::Social::IUserManager>> mUserManager;
50 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::IAppPlatform>> mAppPlatform;
51 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IThirdPartyServerRepository>> mThirdPartyServerRepository;
52 ::ll::TypedStorage<8, 8, ::ServerLocator&> mServerLocator;
53 ::ll::TypedStorage<8, 8, ::World::IServerURLResolver&> mServerURLResolver;
54 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mTaskGroup;
55 ::ll::TypedStorage<8, 8, ::INetworkGameConnector&> mNetworkGameConnector;
56 ::ll::TypedStorage<8, 8, ::World::ExternalServerWorldList&> mExternalServerWorldList;
57 ::ll::TypedStorage<8, 8, ::World::FriendServerWorldList&> mFriendServerWorldList;
58 ::ll::TypedStorage<8, 8, ::World::LanServerWorldList&> mLanServerWorldList;
59 ::ll::TypedStorage<8, 8, ::World::ThirdPartyWorldList&> mThirdPartyWorldList;
60 ::ll::TypedStorage<1, 1, bool> mIsEduMode;
61 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::GatheringManager>> mGatheringManager;
62 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mServerConnectionTime;
63 // NOLINTEND
64
65public:
66 // prevent constructor by default
67 ServerWorldJoiner& operator=(ServerWorldJoiner const&);
68 ServerWorldJoiner(ServerWorldJoiner const&);
69 ServerWorldJoiner();
70
71public:
72 // member functions
73 // NOLINTBEGIN
74 MCAPI ServerWorldJoiner(
75 ::IClientInstance& client,
76 ::IMinecraftEventing& minecraftEventing,
77 ::Bedrock::NotNullNonOwnerPtr<::Social::IUserManager> const& userManager,
78 ::Bedrock::NonOwnerPointer<::IAppPlatform> const& appPlatform,
79 ::Bedrock::NotNullNonOwnerPtr<::IThirdPartyServerRepository> thirdPartyServerRepository,
80 ::ServerLocator& serverLocator,
81 ::World::IServerURLResolver& serverURLResolver,
82 ::INetworkGameConnector& networkGameConnector,
83 ::World::ExternalServerWorldList& externalServerWorldList,
84 ::World::FriendServerWorldList& friendServerWorldList,
85 ::World::LanServerWorldList& lanServerWorldList,
86 ::World::ThirdPartyWorldList& thirdPartyWorldList,
87 bool isEduMode,
88 ::Bedrock::NotNullNonOwnerPtr<::GatheringManager> const& gatheringManager
89 );
90
91 MCAPI ::Social::GameConnectionInfo
92 _getGameConnectionInfo(::NetworkWorldInfo& world, ::World::ServerWorldJoiner::ServerType serverType);
93
94 MCAPI void _joinFriendWorld(
95 ::NetworkWorldInfo const& world,
96 ::std::function<void(::World::JoinServerWorldResult)> onCompleteCallback
97 );
98
99 MCAPI void _joinLanWorld(
100 ::PingedCompatibleServer const* world,
101 ::std::function<void(::std::unique_ptr<::ProgressHandler>)> onCompleteCallback,
102 ::std::function<void(::World::JoinServerWorldResult)> onErrorCallback
103 );
104
105 MCAPI void _joinNetworkWorld(
106 ::NetworkWorldInfo& world,
107 ::World::ServerWorldJoiner::ServerType serverType,
108 ::std::function<void(::std::unique_ptr<::ProgressHandler>, bool)> onJoinServerCompleted,
109 ::std::function<void(::World::JoinServerWorldResult)> onErrorCallback
110 );
111
112 MCAPI bool _validateInternetConnection(::Social::User& user) const;
113
114 MCAPI ::World::JoinServerWorldResult _validateUserInfo(::std::shared_ptr<::Social::User> user) const;
115
116 MCAPI void joinExternalNetworkWorld(
117 ::std::string const& id,
118 ::std::function<void(::std::unique_ptr<::ProgressHandler>, bool)> onJoinServerCompleted,
119 ::std::function<void(::World::JoinServerWorldResult)> onErrorCallback
120 );
121
122 MCAPI void joinFriendServerWorld(
123 ::Network::ServerID const& serverId,
124 ::std::function<void(::World::JoinServerWorldResult)> onCompleteCallback
125 );
126
127 MCAPI void joinLANServerWorld(
128 ::Network::ServerID const& serverId,
129 ::std::function<void(::std::unique_ptr<::ProgressHandler>)> onCompleteCallback,
130 ::std::function<void(::World::JoinServerWorldResult)> onErrorCallback
131 );
132
133 MCAPI void joinThirdPartyServerWorld(
134 ::std::string const& id,
135 ::std::function<void(::std::unique_ptr<::ProgressHandler>, bool)> onJoinServerCompleted,
136 ::std::function<void(::World::JoinServerWorldResult)> onErrorCallback
137 );
138
139 MCAPI ~ServerWorldJoiner();
140 // NOLINTEND
141
142public:
143 // constructor thunks
144 // NOLINTBEGIN
145 MCAPI void* $ctor(
146 ::IClientInstance& client,
147 ::IMinecraftEventing& minecraftEventing,
148 ::Bedrock::NotNullNonOwnerPtr<::Social::IUserManager> const& userManager,
149 ::Bedrock::NonOwnerPointer<::IAppPlatform> const& appPlatform,
150 ::Bedrock::NotNullNonOwnerPtr<::IThirdPartyServerRepository> thirdPartyServerRepository,
151 ::ServerLocator& serverLocator,
152 ::World::IServerURLResolver& serverURLResolver,
153 ::INetworkGameConnector& networkGameConnector,
154 ::World::ExternalServerWorldList& externalServerWorldList,
155 ::World::FriendServerWorldList& friendServerWorldList,
156 ::World::LanServerWorldList& lanServerWorldList,
157 ::World::ThirdPartyWorldList& thirdPartyWorldList,
158 bool isEduMode,
159 ::Bedrock::NotNullNonOwnerPtr<::GatheringManager> const& gatheringManager
160 );
161 // NOLINTEND
162
163public:
164 // destructor thunk
165 // NOLINTBEGIN
166 MCAPI void $dtor();
167 // NOLINTEND
168};
169
170} // namespace World
Definition IAppPlatform.h:16
Definition IClientInstance.h:5
Definition IMinecraftEventing.h:137
Definition INetworkGameConnector.h:5
Definition ProgressHandler.h:5
Definition ServerLocator.h:19
Definition GameConnectionInfo.h:21
Definition IUserManager.h:34
Definition TaskGroup.h:53
Definition ExternalServerWorldList.h:7
Definition FriendServerWorldList.h:7
Definition IServerURLResolver.h:7
Definition LanServerWorldList.h:7
Definition ServerWorldJoiner.h:7
Definition ThirdPartyWorldList.h:7
Definition GatheringManager.h:5
Definition NetworkWorldInfo.h:5
Definition ServerID.h:7
Definition PingedCompatibleServer.h:5
Definition User.h:7