3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/DirtyFlag.h"
7#include "mc/client/gui/ViewRequest.h"
8#include "mc/client/gui/screens/controllers/EduRefreshType.h"
9#include "mc/client/gui/screens/controllers/SettingsScreenControllerBase.h"
10#include "mc/deps/core/file/PathBuffer.h"
11#include "mc/deps/core/threading/BasicLockbox.h"
12#include "mc/deps/core/threading/TaskGroup.h"
13#include "mc/platform/brstd/flat_map.h"
14#include "mc/platform/threading/Mutex.h"
15#include "mc/social/EduResponseError.h"
27namespace Json {
class Value; }
35 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::PlayScreenModel>> mPlayScreenModel;
36 ::ll::TypedStorage<1, 1, bool> mShowNestedButtons;
37 ::ll::TypedStorage<1, 1, bool> mMatchedServersNeedsRefresh;
38 ::ll::TypedStorage<8, 32, ::std::string> mSearchString;
39 ::ll::TypedStorage<8, 32, ::std::string> mAddServerInfoString;
40 ::ll::TypedStorage<8, 32, ::std::string> mMostRecentlyAddedServer;
41 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mMatchedServers;
42 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DlcUIWrapper>> mDlcUIWrapper;
43 ::ll::TypedStorage<8, 8, ::PackManagerContentSource*> mWorldContentSource;
44 ::ll::TypedStorage<8, 8, ::IContentManager&> mContentManager;
45 ::ll::TypedStorage<1, 1, bool> mHasInitializedServerList;
46 ::ll::TypedStorage<1, 1, bool> mErrorFromRefresh;
47 ::ll::TypedStorage<1, 1, bool> mIsDoneLoadingKnownServers;
48 ::ll::TypedStorage<1, 1, bool> mIsDoneLoadingUnknownServers;
49 ::ll::TypedStorage<1, 1, bool> mIsDoneFetchHandler;
50 ::ll::TypedStorage<1, 1, bool> mNeedsRefocus;
51 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastFullServerInfoRefresh;
52 ::ll::TypedStorage<8, 40, ::std::queue<::Social::EduResponseError, ::std::deque<::Social::EduResponseError>>>
54 ::ll::TypedStorage<8, 40, ::std::queue<::Social::EduResponseError, ::std::deque<::Social::EduResponseError>>>
56 ::ll::TypedStorage<8, 32, ::std::string> mBannerErrorString;
57 ::ll::TypedStorage<1, 1, bool> mPopupOpen;
58 ::ll::TypedStorage<8, 32, ::std::string> mAddServerId;
59 ::ll::TypedStorage<8, 32, ::std::string> mJoinServerId;
66 ::std::less<::std::string>,
67 ::std::vector<::std::string>,
68 ::std::vector<::std::string>>>
70 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::EDUAddServerScreenController>> mAddServerScreenController;
71 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::EDUPasscodeEntryScreenController>> mPasscodeEntryScreenController;
75 ::Bedrock::Threading::BasicLockbox<
78 ::Social::EduDedicatedServerDetails,
79 ::std::less<::std::string>,
80 ::std::vector<::std::string>,
81 ::std::vector<::Social::EduDedicatedServerDetails>>,
82 ::Bedrock::Threading::Mutex>>
84 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mCacheFilePath;
85 ::ll::TypedStorage<8, 336, ::TaskGroup> mTaskGroup;
90 EDUServersScreenController& operator=(EDUServersScreenController
const&);
91 EDUServersScreenController(EDUServersScreenController
const&);
92 EDUServersScreenController();
97 virtual ~EDUServersScreenController() =
default;
99 virtual void onOpen() ;
101 virtual void onTerminate() ;
103 virtual ::ui::DirtyFlag tick() ;
105 virtual ::ui::ViewRequest handleEvent(::ScreenEvent& screenEvent) ;
107 virtual void addStaticScreenVars(::Json::Value& globalVars) ;
113 MCAPI
explicit EDUServersScreenController(::std::shared_ptr<::PlayScreenModel> model);
115 MCAPI
void _closeAddServerModal();
117 MCAPI
void _closePasscodeEntryModal();
119 MCAPI
void _closeSharePopup();
121 MCAPI ::std::optional<::Social::EduDedicatedServerDetails> _getServerDetails(::UIPropertyBag& bag)
const;
123 MCAPI
void _launchShareUri(::std::string
const& uri, ::std::string
const& toastMsg, ::std::string
const& eventName);
125 MCAPI
void _refreshServerInfo(::std::vector<::std::string> serverIds, ::Social::EduRefreshType
const& refreshType);
127 MCAPI
void _requestAddServer(::std::string
const& serverId);
129 MCAPI
void _requestJoinServer(::Social::EduDedicatedServerDetails
const& details, ::std::string
const& passcode);
131 MCAPI
void _showAddServerModal();
133 MCAPI
void _showFetchErrorMessage(::Social::EduResponseError& error);
135 MCAPI
void _showPasscodeEntryModal(::Social::EduDedicatedServerDetails
const& details);
141 MCAPI
static uint64 _getTileIndex(::UIPropertyBag& bag);
147 MCAPI
void* $ctor(::std::shared_ptr<::PlayScreenModel> model);
153 MCAPI
void $onOpen();
155 MCAPI
void $onTerminate();
157 MCAPI ::ui::DirtyFlag $tick();
159 MCAPI ::ui::ViewRequest $handleEvent(::ScreenEvent& screenEvent);
161 MCAPI
void $addStaticScreenVars(::Json::Value& globalVars);
Definition DlcUIWrapper.h:5
Definition EDUAddServerScreenController.h:5
Definition EDUPasscodeEntryScreenController.h:5
Definition IContentManager.h:5
Definition PlayScreenModel.h:5
Definition SettingsScreenControllerBase.h:5
Definition UIPropertyBag.h:5
Definition PackManagerContentSource.h:5
Definition ScreenEvent.h:5
Definition EduDedicatedServerDetails.h:15