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 Json { class Value; }
27namespace Social { struct EduDedicatedServerDetails; }
28// clang-format on
29
31public:
32 // member variables
33 // NOLINTBEGIN
34 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::PlayScreenModel>> mPlayScreenModel;
35 ::ll::TypedStorage<1, 1, bool> mShowNestedButtons;
36 ::ll::TypedStorage<1, 1, bool> mMatchedServersNeedsRefresh;
37 ::ll::TypedStorage<8, 32, ::std::string> mSearchString;
38 ::ll::TypedStorage<8, 32, ::std::string> mAddServerInfoString;
39 ::ll::TypedStorage<8, 32, ::std::string> mMostRecentlyAddedServer;
40 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mMatchedServers;
41 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DlcUIWrapper>> mDlcUIWrapper;
42 ::ll::TypedStorage<8, 8, ::PackManagerContentSource*> mWorldContentSource;
43 ::ll::TypedStorage<8, 8, ::IContentManager&> mContentManager;
44 ::ll::TypedStorage<1, 1, bool> mHasInitializedServerList;
45 ::ll::TypedStorage<1, 1, bool> mErrorFromRefresh;
46 ::ll::TypedStorage<1, 1, bool> mIsDoneLoadingKnownServers;
47 ::ll::TypedStorage<1, 1, bool> mIsDoneLoadingUnknownServers;
48 ::ll::TypedStorage<1, 1, bool> mIsDoneFetchHandler;
49 ::ll::TypedStorage<1, 1, bool> mNeedsRefocus;
50 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastFullServerInfoRefresh;
51 ::ll::TypedStorage<8, 40, ::std::queue<::Social::EduResponseError, ::std::deque<::Social::EduResponseError>>>
52 mFetchErrorQueue;
53 ::ll::TypedStorage<8, 40, ::std::queue<::Social::EduResponseError, ::std::deque<::Social::EduResponseError>>>
54 mAddErrorQueue;
55 ::ll::TypedStorage<8, 32, ::std::string> mBannerErrorString;
56 ::ll::TypedStorage<1, 1, bool> mPopupOpen;
57 ::ll::TypedStorage<8, 32, ::std::string> mAddServerId;
58 ::ll::TypedStorage<8, 32, ::std::string> mJoinServerId;
59 ::ll::TypedStorage<
60 8,
61 48,
62 ::brstd::flat_map<
63 ::std::string,
64 ::std::string,
65 ::std::less<::std::string>,
66 ::std::vector<::std::string>,
67 ::std::vector<::std::string>>>
68 mUnmatchedServers;
69 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::EDUAddServerScreenController>> mAddServerScreenController;
70 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::EDUPasscodeEntryScreenController>> mPasscodeEntryScreenController;
71 ::ll::TypedStorage<
72 8,
73 128,
74 ::Bedrock::Threading::BasicLockbox<
75 ::brstd::flat_map<
76 ::std::string,
77 ::Social::EduDedicatedServerDetails,
78 ::std::less<::std::string>,
79 ::std::vector<::std::string>,
80 ::std::vector<::Social::EduDedicatedServerDetails>>,
81 ::std::mutex>>
82 mServersBox;
83 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mCacheFilePath;
84 ::ll::TypedStorage<8, 336, ::TaskGroup> mTaskGroup;
85 // NOLINTEND
86
87public:
88 // prevent constructor by default
89 EDUServersScreenController& operator=(EDUServersScreenController const&);
90 EDUServersScreenController(EDUServersScreenController const&);
91 EDUServersScreenController();
92
93public:
94 // virtual functions
95 // NOLINTBEGIN
96 virtual ~EDUServersScreenController() /*override*/ = default;
97
98 virtual void onOpen() /*override*/;
99
100 virtual void onTerminate() /*override*/;
101
102 virtual ::ui::DirtyFlag tick() /*override*/;
103
104 virtual ::ui::ViewRequest handleEvent(::ScreenEvent& screenEvent) /*override*/;
105
106 virtual void addStaticScreenVars(::Json::Value& globalVars) /*override*/;
107 // NOLINTEND
108
109public:
110 // member functions
111 // NOLINTBEGIN
112 MCAPI explicit EDUServersScreenController(::std::shared_ptr<::PlayScreenModel> model);
113
114 MCAPI void _closeAddServerModal();
115
116 MCAPI void _closePasscodeEntryModal();
117
118 MCAPI void _closeSharePopup();
119
120 MCAPI ::std::optional<::Social::EduDedicatedServerDetails> _getServerDetails(::UIPropertyBag& bag) const;
121
122 MCAPI void _launchShareUri(::std::string const& uri, ::std::string const& toastMsg, ::std::string const& eventName);
123
124 MCAPI void _refreshServerInfo(::std::vector<::std::string> serverIds, ::Social::EduRefreshType const& refreshType);
125
126 MCAPI void _requestAddServer(::std::string const& serverId);
127
128 MCAPI void _requestJoinServer(::Social::EduDedicatedServerDetails const& details, ::std::string const& passcode);
129
130 MCAPI void _showAddServerModal();
131
132 MCAPI void _showFetchErrorMessage(::Social::EduResponseError& error);
133
134 MCAPI void _showPasscodeEntryModal(::Social::EduDedicatedServerDetails const& details);
135 // NOLINTEND
136
137public:
138 // static functions
139 // NOLINTBEGIN
140 MCAPI static uint64 _getTileIndex(::UIPropertyBag& bag);
141 // NOLINTEND
142
143public:
144 // constructor thunks
145 // NOLINTBEGIN
146 MCAPI void* $ctor(::std::shared_ptr<::PlayScreenModel> model);
147 // NOLINTEND
148
149public:
150 // virtual function thunks
151 // NOLINTBEGIN
152 MCAPI void $onOpen();
153
154 MCAPI void $onTerminate();
155
156 MCAPI ::ui::DirtyFlag $tick();
157
158 MCAPI ::ui::ViewRequest $handleEvent(::ScreenEvent& screenEvent);
159
160 MCAPI void $addStaticScreenVars(::Json::Value& globalVars);
161 // NOLINTEND
162};
Definition DlcUIWrapper.h:5
Definition EDUAddServerScreenController.h:5
Definition EDUPasscodeEntryScreenController.h:5
Definition EDUServersScreenController.h:5
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