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