3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/world/JoinServerWorldResult.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
19struct IThirdPartyServerRepository;
22namespace Network {
struct ServerID; }
25namespace Social {
struct User; }
38 enum class ServerType :
int {
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;
67 ServerWorldJoiner& operator=(ServerWorldJoiner
const&);
68 ServerWorldJoiner(ServerWorldJoiner
const&);
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,
88 ::Bedrock::NotNullNonOwnerPtr<::GatheringManager>
const& gatheringManager
91 MCAPI ::Social::GameConnectionInfo
92 _getGameConnectionInfo(::NetworkWorldInfo& world, ::World::ServerWorldJoiner::ServerType serverType);
94 MCAPI
void _joinFriendWorld(
95 ::NetworkWorldInfo
const& world,
96 ::std::function<
void(::World::JoinServerWorldResult)> onCompleteCallback
99 MCAPI
void _joinLanWorld(
100 ::PingedCompatibleServer
const* world,
101 ::std::function<
void(::std::unique_ptr<::ProgressHandler>)> onCompleteCallback,
102 ::std::function<
void(::World::JoinServerWorldResult)> onErrorCallback
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
112 MCAPI
bool _validateInternetConnection(::Social::User& user)
const;
114 MCAPI ::World::JoinServerWorldResult _validateUserInfo(::std::shared_ptr<::Social::User> user)
const;
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
122 MCAPI
void joinFriendServerWorld(
123 ::Network::ServerID
const& serverId,
124 ::std::function<
void(::World::JoinServerWorldResult)> onCompleteCallback
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
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
139 MCAPI ~ServerWorldJoiner();
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,
159 ::Bedrock::NotNullNonOwnerPtr<::GatheringManager>
const& gatheringManager
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 PingedCompatibleServer.h:5