LeviLamina
Loading...
Searching...
No Matches
RealmsAllowListScreenController.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/MainMenuScreenController.h"
8#include "mc/client/gui/screens/controllers/RealmPlayer.h"
9#include "mc/client/network/realms/RealmsAPI.h"
10#include "mc/client/network/realms/World.h"
11#include "mc/server/commands/PlayerPermissionLevel.h"
12
13// auto generated forward declare list
14// clang-format off
18class ProgressHandler;
19class UIPropertyBag;
20namespace Json { class Value; }
21namespace Realms { struct Player; }
22namespace Social { struct PlatformUserProfileData; }
23// clang-format on
24
26public:
27 // RealmsAllowListScreenController inner types define
28 enum class SearchState : int {
29 NotInitialized = -1,
30 NotFound = 0,
31 Found = 1,
32 };
33
34 enum class RealmPlayerList : int {
35 InvalidMemberList = -1,
36 MembersList = 0,
37 InvitedFriendsList = 1,
38 UninvitedFriendsList = 2,
39 BlockedPlayersList = 3,
40 };
41
42 using InviteList = ::std::map<::std::string, ::RealmsAPI::InviteAction>;
43
44public:
45 // member variables
46 // NOLINTBEGIN
47 ::ll::TypedStorage<8, 208, ::RealmPlayer> EMPTY_PLAYER;
48 ::ll::TypedStorage<1, 1, bool> mLoading;
49 ::ll::TypedStorage<1, 1, bool> mListsLoaded;
50 ::ll::TypedStorage<1, 1, bool> mFromExistingWorld;
51 ::ll::TypedStorage<8, 64, ::std::function<void()>> mFollowUpActionAfterCreation;
52 ::ll::TypedStorage<1, 1, bool> mRefreshUI;
53 ::ll::TypedStorage<1, 1, bool> mClickedRefresh;
54 ::ll::TypedStorage<8, 656, ::Realms::World> mWorld;
55 ::ll::TypedStorage<1, 1, bool> mInvitesSent;
56 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastRefreshUpdate;
57 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastFriendListUpdate;
58 ::ll::TypedStorage<1, 1, bool> mNewWorld;
59 ::ll::TypedStorage<1, 1, bool> mPermissionsDirty;
60 ::ll::TypedStorage<1, 1, bool> mMembersListDirty;
61 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastTryJoin;
62 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ProgressHandler>> mProgressHandler;
63 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PlatformMultiplayerRestrictions>> mPlatformMultiplayerRestrictions;
64 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::DropdownScreenController>> mMembersDropdownController;
65 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::DropdownScreenController>> mInvitedFriendsDropdownController;
66 ::ll::TypedStorage<4, 4, int> mUninvitedFriendsPageIndex;
67 ::ll::TypedStorage<4, 4, int> mInvitedFriendsPageIndex;
68 ::ll::TypedStorage<4, 4, int> mMembersPageIndex;
69 ::ll::TypedStorage<4, 4, int> mBlockedPlayersPageIndex;
70 ::ll::TypedStorage<1, 1, ::PlayerPermissionLevel> mDefaultPermission;
71 ::ll::TypedStorage<1, 1, ::PlayerPermissionLevel> mDefaultPermissionOld;
72 ::ll::TypedStorage<8, 32, ::std::string> mUninvitedFriendsLastFilter;
73 ::ll::TypedStorage<8, 32, ::std::string> mInvitedFriendsLastFilter;
74 ::ll::TypedStorage<8, 32, ::std::string> mMembersLastFilter;
75 ::ll::TypedStorage<8, 32, ::std::string> mBlockedPlayersLastFilter;
76 ::ll::TypedStorage<4, 4, int> mPreviousMembersPageIndex;
77 ::ll::TypedStorage<4, 4, int> mPreviousInvitedFriendsPageIndex;
78 ::ll::TypedStorage<4, 4, int> mPreviousUninvitedFriendsPageIndex;
79 ::ll::TypedStorage<4, 4, int> mPreviousBlockedPlayersPageIndex;
80 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::RealmPlayer>> mCompleteWorldPlayerList;
81 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::Social::PlatformUserProfileData>>
82 mLinkedPlatformAccounts;
83 ::ll::TypedStorage<4, 4, ::std::atomic<uint>> mLinkedAccountLoadCounter;
84 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mCurrentMembersList;
85 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mFullMembersList;
86 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mFilteredMembersList;
87 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mCurrentInvitedFriendsList;
88 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mFullInvitedFriendsList;
89 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mFilteredInvitedFriendsList;
90 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mCurrentUninvitedFriendsList;
91 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mFullUninvitedFriendsList;
92 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mFilteredUninvitedFriendsList;
93 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mCurrentBlockedPlayersList;
94 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mFullBlockedPlayersList;
95 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mFilteredBlockedPlayersList;
96 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mPendingXuidsForLinkedAccounts;
97 ::ll::TypedStorage<8, 64, ::std::unordered_set<::std::string>> mPreviouslyObservedXboxLiveFriends;
98 ::ll::TypedStorage<8, 32, ::std::string> mSharePopupBButtonDescription;
99 ::ll::TypedStorage<4, 4, uint> mCurrentUpdatedPlayers;
100 ::ll::TypedStorage<1, 1, bool> mShowLinkedAccounts;
101 // NOLINTEND
102
103public:
104 // prevent constructor by default
105 RealmsAllowListScreenController();
106
107public:
108 // virtual functions
109 // NOLINTBEGIN
110 virtual ~RealmsAllowListScreenController() /*override*/;
111
112 virtual void onLeave() /*override*/;
113
114 virtual ::ui::DirtyFlag tick() /*override*/;
115
116 virtual void addStaticScreenVars(::Json::Value& globalVars) /*override*/;
117
118 virtual ::std::string _getButtonBDescription() /*override*/;
119
120 virtual bool _getGamepadHelperVisible() const /*override*/;
121 // NOLINTEND
122
123public:
124 // member functions
125 // NOLINTBEGIN
126 MCAPI RealmsAllowListScreenController(
127 ::std::shared_ptr<::MainMenuScreenModel> model,
128 ::Realms::World const& world,
129 bool const& fromExistingWorld,
130 ::std::function<void()> followUpCallbackAfterCreation,
131 bool fromSettingsOrAllowListEntryPoint
132 );
133
134 MCAPI void _buildPlayerList();
135
136 MCAPI void _clearFromFriendLists(::std::string const& xuid);
137
138 MCAPI void _clearMemberList();
139
140 MCAPI void _finalizeLinkedAccountLoading();
141
142 MCAPI void _getBlocklistProfiles(::std::vector<::std::string> allXuids, ::std::vector<::std::string> blockList);
143
144 MCAPI ::std::map<::std::string, ::RealmsAPI::InviteAction> _getInvitesToSend() const;
145
146 MCAPI ::RealmPlayer*
147 _getRealmPlayerAtIndex(int index, ::RealmsAllowListScreenController::RealmPlayerList realmPlayerList);
148
149 MCAPI ::RealmPlayer* _getRealmPlayerFromXuid(::std::string const& xuid);
150
151 MCAPI ::RealmsAllowListScreenController::RealmPlayerList const
152 _getRealmPlayerListFromCollection(::UIPropertyBag const* bag) const;
153
154 MCAPI void _handleDoesNotHavePermission(::std::function<void()> newWorldCallback);
155
156 MCAPI void _handlePlayerInvite(::RealmPlayer& player);
157
158 MCAPI void _handleUpdateFailed(::std::function<void()> callback);
159
160 MCAPI void _initializeLinkedAccounts(
161 ::std::vector<::std::string>& platformIds,
162 ::std::vector<::Social::PlatformUserProfileData> const& platformProfiles
163 );
164
165 MCAPI void _initializePlayerList(::std::function<void()> callback);
166
167 MCAPI bool _isFriend(::std::string const& xuid);
168
169 MCAPI void _joinRealm();
170
171 MCAPI void _markStatusNoLongerChanged(::std::map<::std::string, ::RealmsAPI::InviteAction> const& changed);
172
173 MCAPI void _refreshOrExit(::std::function<void()> callback);
174
175 MCAPI void _registerBindings();
176
177 MCAPI void _registerEventHandlers();
178
179 MCAPI void _requestPlatformGamerpic(::Social::PlatformUserProfileData const& platformEntry);
180
181 MCAPI void _sendInvites(::std::function<void()> callback);
182
183 MCAPI bool _shouldUpdateFriendsList();
184
185 MCAPI void _sortPlayerList();
186
187 MCAPI void _updateAllListModels();
188
189 MCAPI void _updateFriendsList();
190
191 MCAPI void _updateLinkedAccountLoading();
192
193 MCAPI void _updatePlayerList(
194 ::std::vector<::Realms::Player> const& newPlayers,
195 ::std::vector<::Realms::Player> const& newBlockList
196 );
197
198 MCAPI void _updatePlayerlistModel(
199 ::std::string const& filter,
200 ::RealmsAllowListScreenController::RealmPlayerList realmPlayerList,
201 bool forceUpdate
202 );
203
204 MCAPI void sendDefaultPermission(::PlayerPermissionLevel const& permission);
205
206 MCAPI void sendInvitesWithProgress(::std::function<void()> callback);
207
208 MCAPI void sendUserPermission(
209 ::std::string const& xuid,
210 ::PlayerPermissionLevel permission,
211 ::PlayerPermissionLevel oldPermission
212 );
213 // NOLINTEND
214
215public:
216 // constructor thunks
217 // NOLINTBEGIN
218 MCAPI void* $ctor(
219 ::std::shared_ptr<::MainMenuScreenModel> model,
220 ::Realms::World const& world,
221 bool const& fromExistingWorld,
222 ::std::function<void()> followUpCallbackAfterCreation,
223 bool fromSettingsOrAllowListEntryPoint
224 );
225 // NOLINTEND
226
227public:
228 // destructor thunk
229 // NOLINTBEGIN
230 MCAPI void $dtor();
231 // NOLINTEND
232
233public:
234 // virtual function thunks
235 // NOLINTBEGIN
236 MCAPI void $onLeave();
237
238 MCAPI ::ui::DirtyFlag $tick();
239
240 MCAPI void $addStaticScreenVars(::Json::Value& globalVars);
241
242 MCAPI ::std::string $_getButtonBDescription();
243
244 MCFOLD bool $_getGamepadHelperVisible() const;
245 // NOLINTEND
246
247public:
248 // vftables
249 // NOLINTBEGIN
250 MCNAPI static void** $vftableForScreenController();
251
253 // NOLINTEND
254};
Definition DropdownScreenController.h:5
Definition Value.h:16
Definition MainMenuScreenController.h:5
Definition MainMenuScreenModel.h:5
Definition PlatformMultiplayerRestrictions.h:5
Definition ProgressHandler.h:5
Definition RealmsAllowListScreenController.h:5
static MCAPI void ** $vftableForScreenController()
static MCAPI void ** $vftableForEnableNonOwnerReferences()
Definition UIPropertyBag.h:5
Definition Player.h:7
Definition PlatformUserProfileData.h:7