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 uint64 _getTileIndex(::UIPropertyBag& bag) const;
116
117 MCAPI void _launchShareUri(::std::string const& uri, ::std::string const& toastMsg, ::std::string const& eventName);
118
119 MCAPI void _refreshServerInfo(::std::vector<::std::string> serverIds, ::Social::EduRefreshType const& refreshType);
120
121 MCAPI void _refreshServerList();
122
123 MCAPI void _registerBindings();
124
125 MCAPI void _registerControllerCallbacks();
126
127 MCAPI void _registerEventHandlers();
128
129 MCAPI void _registerSubControllers();
130
131 MCAPI void _removeServer(::UIPropertyBag* bag);
132
133 MCAPI void _requestAddServer(::std::string const& serverId);
134
135 MCAPI void _requestJoinServer(::Social::EduDedicatedServerDetails const& details, ::std::string const& passcode);
136
137 MCAPI void _showAddErrorMessage(::Social::EduResponseError& error);
138
139 MCAPI void _showAddServerModal();
140
141 MCAPI void _showFetchErrorMessage(::Social::EduResponseError& error);
142
143 MCAPI void _showPasscodeEntryModal(::Social::EduDedicatedServerDetails const& details);
144
145 MCAPI void _showRemoveServerModal(::UIPropertyBag* bag);
146
147 MCAPI void _showSharePopup(::std::string const& popupFactory, ::std::string const& popupName);
148
149 MCAPI void _updateServerList(
150 ::brstd::flat_map<
151 ::std::string,
152 ::Social::EduDedicatedServerDetails,
153 ::std::less<::std::string>,
154 ::std::vector<::std::string>,
155 ::std::vector<::Social::EduDedicatedServerDetails>> const& servers
156 );
157 // NOLINTEND
158
159public:
160 // constructor thunks
161 // NOLINTBEGIN
162 MCAPI void* $ctor(::std::shared_ptr<::PlayScreenModel> model);
163 // NOLINTEND
164
165public:
166 // destructor thunk
167 // NOLINTBEGIN
168 MCAPI void $dtor();
169 // NOLINTEND
170
171public:
172 // virtual function thunks
173 // NOLINTBEGIN
174 MCAPI void $onOpen();
175
176 MCAPI void $onTerminate();
177
178 MCAPI ::ui::DirtyFlag $tick();
179
180 MCAPI ::ui::ViewRequest $handleEvent(::ScreenEvent& screenEvent);
181
182 MCAPI void $addStaticScreenVars(::Json::Value& globalVars);
183 // NOLINTEND
184
185public:
186 // vftables
187 // NOLINTBEGIN
188 MCNAPI static void** $vftableForScreenController();
189
191 // NOLINTEND
192};
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