LeviLamina
Loading...
Searching...
No Matches
EDUServersScreenController.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
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/social/EduResponseError.h"
15
16// auto generated forward declare list
17// clang-format off
18class DlcUIWrapper;
21class IContentManager;
22class PlayScreenModel;
23class UIPropertyBag;
25struct ScreenEvent;
26namespace Bedrock::Threading { class Mutex; }
27namespace Json { class Value; }
28namespace Social { struct EduDedicatedServerDetails; }
29// clang-format on
30
32public:
33 // member variables
34 // NOLINTBEGIN
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>>>
53 mFetchErrorQueue;
54 ::ll::TypedStorage<8, 40, ::std::queue<::Social::EduResponseError, ::std::deque<::Social::EduResponseError>>>
55 mAddErrorQueue;
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;
60 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::EDUAddServerScreenController>> mAddServerScreenController;
61 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::EDUPasscodeEntryScreenController>> mPasscodeEntryScreenController;
62 ::ll::TypedStorage<
63 8,
64 128,
65 ::Bedrock::Threading::BasicLockbox<
66 ::brstd::flat_map<
67 ::std::string,
68 ::Social::EduDedicatedServerDetails,
69 ::std::less<::std::string>,
70 ::std::vector<::std::string>,
71 ::std::vector<::Social::EduDedicatedServerDetails>>,
72 ::Bedrock::Threading::Mutex>>
73 mServersBox;
74 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mCacheFilePath;
75 ::ll::TypedStorage<8, 336, ::TaskGroup> mTaskGroup;
76 // NOLINTEND
77
78public:
79 // prevent constructor by default
80 EDUServersScreenController& operator=(EDUServersScreenController const&);
81 EDUServersScreenController(EDUServersScreenController const&);
82 EDUServersScreenController();
83
84public:
85 // virtual functions
86 // NOLINTBEGIN
87 virtual ~EDUServersScreenController() /*override*/;
88
89 virtual void onOpen() /*override*/;
90
91 virtual void onTerminate() /*override*/;
92
93 virtual ::ui::DirtyFlag tick() /*override*/;
94
95 virtual ::ui::ViewRequest handleEvent(::ScreenEvent& screenEvent) /*override*/;
96
97 virtual void addStaticScreenVars(::Json::Value& globalVars) /*override*/;
98 // NOLINTEND
99
100public:
101 // member functions
102 // NOLINTBEGIN
103 MCAPI explicit EDUServersScreenController(::std::shared_ptr<::PlayScreenModel> model);
104
105 MCAPI void _closeAddServerModal();
106
107 MCAPI void _closePasscodeEntryModal();
108
109 MCAPI void _closeSharePopup();
110
111 MCAPI void _getCachedServers();
112
113 MCAPI ::std::optional<::Social::EduDedicatedServerDetails> _getServerDetails(::UIPropertyBag& bag) const;
114
115 MCAPI ::std::optional<::Social::EduDedicatedServerDetails>
116 _getServerDetailsById(::std::string const& serverId) const;
117
118 MCAPI uint64 _getTileIndex(::UIPropertyBag& bag) const;
119
120 MCAPI void _launchShareUri(::std::string const& uri, ::std::string const& toastMsg, ::std::string const& eventName);
121
122 MCAPI void _refreshServerInfo(::std::vector<::std::string> serverIds, ::Social::EduRefreshType const& refreshType);
123
124 MCAPI void _refreshServerList();
125
126 MCAPI void _registerBindings();
127
128 MCAPI void _registerControllerCallbacks();
129
130 MCAPI void _registerEventHandlers();
131
132 MCAPI void _registerSubControllers();
133
134 MCAPI void _removeServer(::UIPropertyBag* bag);
135
136 MCAPI void _requestAddServer(::std::string const& serverId);
137
138 MCAPI void _requestJoinServer(::Social::EduDedicatedServerDetails const& details, ::std::string const& passcode);
139
140 MCAPI void _showAddErrorMessage(::Social::EduResponseError& error);
141
142 MCAPI void _showAddServerModal();
143
144 MCAPI void _showFetchErrorMessage(::Social::EduResponseError& error);
145
146 MCAPI void _showPasscodeEntryModal(::Social::EduDedicatedServerDetails const& details);
147
148 MCAPI void _showRemoveServerModal(::UIPropertyBag* bag);
149
150 MCAPI void _showSharePopup(::std::string const& popupFactory, ::std::string const& popupName);
151
152 MCAPI void _updateServerList(
153 ::brstd::flat_map<
154 ::std::string,
155 ::Social::EduDedicatedServerDetails,
156 ::std::less<::std::string>,
157 ::std::vector<::std::string>,
158 ::std::vector<::Social::EduDedicatedServerDetails>> const& servers
159 );
160
161 MCAPI void cacheAddServer(::std::string const& serverId);
162
163 MCAPI void cacheJoinServer(::std::string const& serverId);
164
165 MCAPI bool getIsDoneLoadingServers() const;
166
167 MCAPI void setDoneFetchHandler();
168 // NOLINTEND
169
170public:
171 // constructor thunks
172 // NOLINTBEGIN
173 MCAPI void* $ctor(::std::shared_ptr<::PlayScreenModel> model);
174 // NOLINTEND
175
176public:
177 // destructor thunk
178 // NOLINTBEGIN
179 MCAPI void $dtor();
180 // NOLINTEND
181
182public:
183 // virtual function thunks
184 // NOLINTBEGIN
185 MCAPI void $onOpen();
186
187 MCAPI void $onTerminate();
188
189 MCAPI ::ui::DirtyFlag $tick();
190
191 MCAPI ::ui::ViewRequest $handleEvent(::ScreenEvent& screenEvent);
192
193 MCAPI void $addStaticScreenVars(::Json::Value& globalVars);
194 // NOLINTEND
195
196public:
197 // vftables
198 // NOLINTBEGIN
199 MCNAPI static void** $vftableForScreenController();
200
202 // NOLINTEND
203};
Definition Mutex.h:10
Definition DlcUIWrapper.h:5
Definition EDUAddServerScreenController.h:5
Definition EDUPasscodeEntryScreenController.h:5
Definition EDUServersScreenController.h:5
static MCAPI void ** $vftableForScreenController()
static MCAPI void ** $vftableForEnableNonOwnerReferences()
Definition IContentManager.h:5
Definition Value.h:16
Definition PlayScreenModel.h:5
Definition SettingsScreenControllerBase.h:5
Definition UIPropertyBag.h:5
Definition PackManagerContentSource.h:5
Definition ScreenEvent.h:5
Definition EduDedicatedServerDetails.h:15