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/screens/controllers/SettingsScreenControllerBase.h"
8#include "mc/deps/core/file/PathBuffer.h"
9#include "mc/deps/core/threading/BasicLockbox.h"
10#include "mc/deps/core/threading/TaskGroup.h"
11#include "mc/platform/brstd/flat_map.h"
12
13// auto generated forward declare list
14// clang-format off
15class DlcUIWrapper;
18class IContentManager;
19class PlayScreenModel;
21struct UIPropertyBag;
22namespace Bedrock::Threading { class Mutex; }
23namespace Json { class Value; }
24namespace Social { struct EduDedicatedServerDetails; }
25namespace Social { struct EduResponseError; }
26// clang-format on
27
29public:
30 // member variables
31 // NOLINTBEGIN
32 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::PlayScreenModel>> mPlayScreenModel;
33 ::ll::TypedStorage<1, 1, bool> mShowNestedButtons;
34 ::ll::TypedStorage<1, 1, bool> mMatchedServersNeedsRefresh;
35 ::ll::TypedStorage<8, 32, ::std::string> mSearchString;
36 ::ll::TypedStorage<8, 32, ::std::string> mAddServerInfoString;
37 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mMatchedServers;
38 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DlcUIWrapper>> mDlcUIWrapper;
39 ::ll::TypedStorage<8, 8, ::PackManagerContentSource*> mWorldContentSource;
40 ::ll::TypedStorage<8, 8, ::IContentManager&> mContentManager;
41 ::ll::TypedStorage<1, 1, bool> mHasInitializedServerList;
42 ::ll::TypedStorage<1, 1, bool> mIsDoneLoadingServers;
43 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastFullServerInfoRefresh;
44 ::ll::TypedStorage<8, 40, ::std::queue<::Social::EduResponseError, ::std::deque<::Social::EduResponseError>>>
45 mErrorQueue;
46 ::ll::TypedStorage<1, 1, bool> mPopupOpen;
47 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::EDUAddServerScreenController>> mAddServerScreenController;
48 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::EDUPasswordEntryScreenController>> mPasswordEntryScreenController;
49 ::ll::TypedStorage<
50 8,
51 136,
52 ::Bedrock::Threading::BasicLockbox<
53 ::brstd::flat_map<
54 ::std::string,
55 ::Social::EduDedicatedServerDetails,
56 ::std::less<::std::string>,
57 ::std::vector<::std::string>,
58 ::std::vector<::Social::EduDedicatedServerDetails>>,
59 ::Bedrock::Threading::Mutex>>
60 mServersBox;
61 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mCacheFilePath;
62 ::ll::TypedStorage<8, 336, ::TaskGroup> mTaskGroup;
63 // NOLINTEND
64
65public:
66 // prevent constructor by default
67 EDUServersScreenController& operator=(EDUServersScreenController const&);
68 EDUServersScreenController(EDUServersScreenController const&);
69 EDUServersScreenController();
70
71public:
72 // virtual functions
73 // NOLINTBEGIN
74 virtual ~EDUServersScreenController() /*override*/;
75
76 virtual void onOpen() /*override*/;
77
78 virtual void onTerminate() /*override*/;
79
80 virtual ::ui::DirtyFlag tick() /*override*/;
81
82 virtual void addStaticScreenVars(::Json::Value& globalVars) /*override*/;
83 // NOLINTEND
84
85public:
86 // member functions
87 // NOLINTBEGIN
88 MCAPI explicit EDUServersScreenController(::std::shared_ptr<::PlayScreenModel> model);
89
90 MCAPI void _closeAddServerModal();
91
92 MCAPI void _closePasswordEntryModal();
93
94 MCAPI void _closeSharePopup();
95
96 MCAPI void _getCachedServers();
97
98 MCAPI ::std::optional<::Social::EduDedicatedServerDetails> _getServerDetails(::UIPropertyBag& bag) const;
99
100 MCAPI uint64 _getTileIndex(::UIPropertyBag& bag) const;
101
102 MCAPI void _joinServer(::UIPropertyBag* bag);
103
104 MCAPI void _launchShareUri(::std::string const& uri, ::std::string const& toastMsg, ::std::string const& eventName);
105
106 MCAPI void _refreshServerInfo(::std::vector<::std::string> serverIds);
107
108 MCAPI void _refreshServerList();
109
110 MCAPI void _registerBindings();
111
112 MCAPI void _registerControllerCallbacks();
113
114 MCAPI void _registerEventHandlers();
115
116 MCAPI void _registerSubControllers();
117
118 MCAPI void _removeServer(::UIPropertyBag* bag);
119
120 MCAPI void _requestAddServer(::std::string const& serverId);
121
122 MCAPI void _requestJoinServer(::Social::EduDedicatedServerDetails const& details, ::std::string const& password);
123
124 MCAPI void _showAddServerModal();
125
126 MCAPI void _showErrorMessage(::Social::EduResponseError& error);
127
128 MCAPI void _showPasswordEntryModal(::Social::EduDedicatedServerDetails const& details);
129
130 MCAPI void _showRemoveServerModal(::UIPropertyBag* bag);
131
132 MCAPI void _showSharePopup(::std::string const& popupFactory, ::std::string const& popupName);
133 // NOLINTEND
134
135public:
136 // constructor thunks
137 // NOLINTBEGIN
138 MCAPI void* $ctor(::std::shared_ptr<::PlayScreenModel> model);
139 // NOLINTEND
140
141public:
142 // destructor thunk
143 // NOLINTBEGIN
144 MCAPI void $dtor();
145 // NOLINTEND
146
147public:
148 // virtual function thunks
149 // NOLINTBEGIN
150 MCAPI void $onOpen();
151
152 MCAPI void $onTerminate();
153
154 MCAPI ::ui::DirtyFlag $tick();
155
156 MCAPI void $addStaticScreenVars(::Json::Value& globalVars);
157 // NOLINTEND
158
159public:
160 // vftables
161 // NOLINTBEGIN
162 MCNAPI static void** $vftableForScreenController();
163
165 // NOLINTEND
166};
Definition Mutex.h:10
Definition DlcUIWrapper.h:5
Definition EDUAddServerScreenController.h:5
Definition EDUPasswordEntryScreenController.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 PackManagerContentSource.h:5
Definition EduDedicatedServerDetails.h:15
Definition EduResponseError.h:7
Definition UIPropertyBag.h:5