3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/StoreNavigationOrigin.h"
7#include "mc/client/gui/screens/controllers/MarketplacePassTabIndex.h"
8#include "mc/client/gui/screens/controllers/SlotSelectedAction.h"
9#include "mc/client/gui/screens/models/IMainMenuScreenModel.h"
10#include "mc/client/gui/screens/models/InstantiationResult.h"
11#include "mc/client/gui/screens/models/MinecraftScreenModel.h"
12#include "mc/client/gui/screens/models/PlayScreenDefaultTab.h"
13#include "mc/client/network/NetworkFilter.h"
14#include "mc/client/social/MultiplayerServiceIdentifier.h"
15#include "mc/client/store/iap/PurchasePath.h"
16#include "mc/client/store/sidebar/Type.h"
17#include "mc/deps/core/threading/Async.h"
18#include "mc/deps/core/threading/SharedAsync.h"
19#include "mc/deps/core/threading/TaskGroup.h"
20#include "mc/deps/core/utility/NonOwnerPointer.h"
21#include "mc/identity/IdentityType.h"
22#include "mc/network/EditorConnectionJoinIntent.h"
23#include "mc/options/FeedbackType.h"
24#include "mc/platform/brstd/move_only_function.h"
25#include "mc/util/DownloadError.h"
26#include "mc/util/UploadState.h"
39class IStoreCatalogItem;
47class OfferCollectionComponent;
50class PlatformOfferTransactionContext;
54class RealmsTransactionContext;
59class StoreCatalogItem;
60class StoreCatalogRepository;
61class StoreSearchQuery;
62class TransactionContext;
75struct PlatformOfferPurchaseDetails;
77struct RealmsPurchaseDetails;
79struct SubmitItemRatingResult;
82namespace Core {
class Path; }
85namespace Realms {
struct World; }
89namespace Social {
class User; }
91namespace mce {
class UUID; }
98 ::ll::TypedStorage<8, 336, ::TaskGroup> mTaskGroup;
99 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::MinecoinCatalogModel>> mMinecoinCatalogModel;
100 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::WorldSeedCatalogModel>> mWorldSeedCatalogModel;
101 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::WorldFileDownloadManager>> mFileDownloadManager;
102 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mFileUploadTaskGroup;
103 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::Bedrock::Threading::SharedAsync<void>>> mPreviousUpload;
104 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ResourcePackPathLifetimeHelpers::ResourcePackPathCache>>
105 mResourcePackPathCache;
106 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::WorldTemplateManager>> mWorldTemplateManager;
107 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::AnnouncementSurface>> mLoginAnnouncementSurface;
108 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::AnnouncementSurface>> mMarketplaceAnnouncementSurface;
109 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DlcChecker>> mDlcChecker;
110 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::LegacyWorldConverter>> mLegacyWorldConverter;
115 MainMenuScreenModel();
120 virtual ~MainMenuScreenModel() ;
122 virtual void navigateToDlcProgressScreen(
123 ::std::vector<::DlcId>
const& dlcIds,
124 ::std::function<
void(
bool,
bool)> callback,
125 bool showCloseButton,
126 bool processingUpdates,
127 bool requireCancelToExit
130 virtual ::std::string
const& getLastPoppedScreenName() const ;
132 virtual ::Bedrock::NotNullNonOwnerPtr<::StoreCatalogRepository> getStoreCatalogRepository() const ;
134 virtual
bool doesPlatformSupportRealms() const ;
136 virtual
bool isSelectedSkinInitialized() const ;
138 virtual
void repopulateWorldTemplates() ;
140 virtual ::WorldTemplateInfo const* findWorldTemplateByUUID(::std::vector<::mce::UUID> const& packUUIDs) const
143 virtual
bool isPackIdInRealmsPlus(::std::
string const& packId) const ;
145 virtual
float getStoreNetworkFailureTimeout() const ;
147 virtual
bool isInGame() const ;
149 virtual ::IMinecraftEventing& getMinecraftEventing() const;
151 virtual
bool isAdhocEnabled() const ;
153 virtual
bool isNetworkEnabled(::NetworkFilter withFilter) const ;
155 virtual
bool platformTTSExists() const ;
161 MCAPI explicit MainMenuScreenModel(::MinecraftScreenModelContext context);
163 MCAPI
void _showAnnouncementIfAvailable(::Bedrock::NonOwnerPointer<::AnnouncementSurface> surface);
165 MCAPI
bool canDisableRecipeUnlockingAsDefault() const;
167 MCAPI
void cancelCreateRealmsWorld();
169 MCAPI
bool checkStoreForAvailableUpdates() const;
171 MCAPI
void clearAllUserCache();
173 MCAPI
void clearLayoutCache();
175 MCAPI
void clearScreenshotsCache();
177 MCAPI ::std::shared_ptr<::CatalogCollection>
178 createCatalogCollection(::std::vector<::std::shared_ptr<::SearchQuery>> const& queries,
int maxVisibleOffers);
180 MCAPI ::std::shared_ptr<::CatalogCollection>
181 createCatalogCollection(::StoreSearchQuery const& query,
int maxVisibleOffers);
183 MCAPI ::std::vector<::EDULibraryCategory> createLibraryCategoryPage(::std::vector<::std::
string> const& pages);
185 MCAPI ::std::shared_ptr<::LibraryCollection>
186 createLibraryCollection(::std::shared_ptr<::LibraryCollectionConfig> config);
188 MCAPI ::std::shared_ptr<::WorldFileDownloadManager> createLibraryWorldFileDownloadManager();
190 MCAPI ::std::shared_ptr<::ResourcePackFileUploadManager> createResourcePackFileUploadManager();
192 MCAPI ::std::shared_ptr<::WorldFileUploadManager> createWorldFileUploadManager();
194 MCAPI
void dismissNewPlayerFlow();
196 MCAPI
void fetchContentInRealmsPlus(::std::function<
void()> callback);
198 MCAPI
void fetchLibraryWorldSize(::std::shared_ptr<::LessonItem> lessonItem);
200 MCAPI
void forcePersonaServiceSync() const;
202 MCFOLD
bool fulfillPriorPlatformOfferPurchase(
203 ::std::weak_ptr<::Purchase> purchase,
204 ::std::unique_ptr<::PlatformOfferTransactionContext> context
207 MCFOLD
bool fulfillPriorRealmsPurchase(
208 ::std::weak_ptr<::Purchase> purchase,
209 ::std::unique_ptr<::RealmsTransactionContext> context
212 MCAPI ::Bedrock::NotNullNonOwnerPtr<::IContentAccessibilityProvider const> getAccessibilityProvider() const;
214 MCAPI ::EDULibraryCategory* getLibraryCategory(::std::
string const& name);
216 MCAPI ::MinecoinCatalogModel& getMinecoinCatalogModel();
218 MCAPI ::std::string_view getNewPlayerFlowTargetRoute() const;
220 MCAPI ::std::shared_ptr<::Social::User> getPrimaryUser() const;
222 MCAPI ::std::shared_ptr<::Realms::Stories::FacetStateManager> const getRealmsStoriesFacetStateManager() const;
224 MCAPI ::std::shared_ptr<::Realms::RealmsWorldContext> const getRealmsWorldContext() const;
226 MCAPI ::SkinPackCollectionModel& getSkinPackCollection();
228 MCAPI ::StoreCatalogItem& getStoreCatalogItemByProductId(::std::
string const& productId);
230 MCAPI
bool getStoreRequiresRestoreButton() const;
232 MCAPI
bool getStoreShouldHideUpdateRow() const;
234 MCAPI
bool getStoreSupportsSubscriptions() const;
236 MCAPI ::std::
string getSunsettingText();
238 MCAPI
bool getUnfulfilledPlatformOfferPurchase(::PlatformOfferPurchaseDetails& details);
240 MCAPI
bool getUnfulfilledRealmsPurchase(::RealmsPurchaseDetails& details);
242 MCAPI
int getUserCoinBalance() const;
244 MCAPI ::std::
string getUserCoinBalanceAsString() const;
246 MCAPI ::WorldFileDownloadManager& getWorldFileDownloadManager();
248 MCAPI ::WorldSeedCatalogModel& getWorldSeedCatalogModel();
250 MCAPI
bool hasDismissedNewPlayerFlow() const;
252 MCAPI
bool hasSeenSonyTokensPopup() const;
254 MCAPI
void instantiateTemplate(
255 ::PackManifest const& manifest,
256 ::std::function<
void(::LevelSummary*, ::InstantiationResult)> callback
259 MCAPI
bool isAbleToFetch(
bool signInFailed) const;
261 MCAPI
bool isAppStoreReady() const;
263 MCAPI
bool isMarketplacePassTrialAvailable() const;
265 MCAPI
bool isNewPlayerPathV3ABCTest() const;
267 MCAPI
bool isPlatformServiceMultiplayerConnected() const;
269 MCAPI
bool isRealmsCachedTrialAvailable() const;
271 MCAPI
bool isServiceMultiplayerAvailableAndConnected(::Social::MultiplayerServiceIdentifier service) const;
273 MCAPI
bool isSidebarNavigationLayoutActive(::sidebar::navigationLayout::Type layoutType) const;
275 MCAPI
void joinExperienceWorld(::ExperienceJoinRequestInfo const& connectionData);
277 MCAPI
void launchSunsettingUri();
279 MCAPI
void navigateToApplyResourcePacksScreen(::std::function<
void(::MinecraftScreenModel&)> applyPacks);
281 MCAPI
void navigateToBundleWarningScreen(
282 ::IStoreCatalogItem const& catalogItem,
283 ::OfferCollectionComponent const& bundle,
284 ::std::function<
void()> onPurchaseCallback
287 MCAPI
void navigateToChooseRealmScreen(
288 ::std::function<
void(::Realms::World)> callback,
289 ::SlotSelectedAction action,
290 ::std::function<
void()> onCancelCallback
293 MCAPI
void navigateToCoinPurchaseScreen(
294 ::std::
string const& coinPurchaseScreenPageId,
296 ::std::function<
void(
bool,
int)> callback
299 MCAPI
void navigateToCreateWorldUpsellScreen(
bool firstTimeShown, ::std::
string const& additionalScreenInfo);
301 MCAPI
void navigateToEDUFetchProgressHandler(::std::shared_ptr<::PlayScreenModel> model);
303 MCAPI
void navigateToEDUFetchServersProgressHandler(
304 ::Bedrock::NonOwnerPointer<::EDUServersScreenController> eduServersScreenController
307 MCAPI
void navigateToEDULibraryRoot();
309 MCAPI
void navigateToEDUPlayScreen();
311 MCAPI
void navigateToEDUServerResolvingProgressHandler(
312 ::Social::EduDedicatedServerDetails const& details,
313 ::std::
string const& passcode,
314 ::std::shared_ptr<::PlayScreenModel> model,
315 ::brstd::move_only_function<
void()>& reopenPasscodeEntry
318 MCAPI
void navigateToEDUServersScreen();
320 MCAPI
void navigateToEDUUploadProgressHandler(
321 ::std::
string const& levelId,
322 ::std::
string const& levelName,
323 ::Bedrock::NonOwnerPointer<::EduCloud::IEduCloudSaveSystem> eduCloudSaveSystem,
324 ::std::optional<::CloudSaveLevelInfo> cloudSaveInfo
327 MCAPI
void navigateToFeaturedWorld();
329 MCAPI
void navigateToFileDownloadScreenAsync(
330 uint64 estimatedDiskWriteSize,
331 ::std::
string const& realmID,
333 ::std::
string const& realmName,
334 ::std::
string const& realmVersion,
335 ::std::
string const& realmVersionName,
336 ::std::function<
void(
bool)> callback
339 MCAPI
void navigateToLibraryItemScreen(::std::shared_ptr<::LibraryItem> item);
341 MCAPI
void navigateToLibraryItemScreen(::std::
string itemId);
343 MCAPI
void navigateToLibrarySearchScreen(
344 ::std::shared_ptr<::LibraryCollection> collection,
345 ::std::
string const& libraryTitle,
346 ::std::
string const& libraryIcon
349 MCAPI
void navigateToLibraryTagScreen(
350 ::std::shared_ptr<::LibraryCollection> collection,
351 ::std::
string const& libraryTitle,
352 ::std::
string const& libraryIcon,
353 ::std::
string const& libraryPageDescription
356 MCAPI
void navigateToLibraryWorldScreen(
357 ::std::shared_ptr<::LibraryCollection> collection,
358 ::std::
string const& libraryTitle,
359 ::std::
string const& libraryIcon,
360 ::std::
string const& libraryPageDescription,
361 ::std::
string const& categoryTitle
364 MCAPI
void navigateToLocalWorldPickerScreen(
365 ::std::
string const& realmID,
367 ::std::function<
void(::UploadState, ::Realms::World)> callback
370 MCAPI
void navigateToManifestValidationScreen(
371 ::ResourceLocation const& resourceLocation,
372 ::std::shared_ptr<::PackContentItem const> const& contentItem
375 MCAPI
void navigateToMarketplacePassPDPScreen(
376 ::MarketplacePassTabIndex tabIndex,
377 ::sidebar::navigationLayout::Type sidebarLayoutType
380 MCAPI
void navigateToMarketplacePassPDPViewAllPacksScreen();
382 MCAPI
void navigateToOreUIChooseRealmSubscriptionScreen();
384 MCAPI
void navigateToOreUIRealmsCreatePreviewWithOnlyOneSubscriptionScreen();
386 MCAPI
void navigateToPackSettingsScreen(::PackSettingsInfo packSettingsInfo);
388 MCAPI
void navigateToPlayScreen(::PlayScreenDefaultTab tab);
390 MCAPI
void navigateToPromotionAction(::ExperiencePromotion const& promotion);
392 MCAPI
void navigateToPurchaseOfferScreen(::IStoreCatalogItem const& item, ::StoreNavigationOrigin origin,
bool);
394 MCAPI
void navigateToPurchaseOfferScreen(
395 ::std::
string const& productId,
396 ::StoreNavigationOrigin origin,
397 ::std::
string const&,
402 navigateToPurchaseOfferScreen(::mce::UUID const& uuid, ::StoreNavigationOrigin origin, ::std::
string const&,
bool);
405 navigateToRealmsAllowListScreen(::Realms::World const& world, ::std::function<
void()> followUpActionAfterCreation);
407 MCAPI
void navigateToRealmsCreateScreen(::RealmsCreateParams const& createParams);
409 MCAPI
bool navigateToRealmsOffers(::StoreDataDrivenScreenParams const& params);
411 MCAPI
void navigateToRealmsPDPViewAllPacksScreen();
413 MCAPI
void navigateToRealmsPlusPurchaseWarningScreen(::std::function<
void()> callback);
415 MCAPI
void navigateToRealmsWorldProgressScreen(
416 ::std::
string const& uniqueEventName,
417 ::std::unique_ptr<::ProgressHandler> connectHandler,
418 ::std::unique_ptr<::ProgressHandler> progressHandler,
419 ::std::function<
void()> onlineSafetyCancelledCallback
422 MCAPI
void navigateToStoreInventoryScreen();
424 MCAPI
void navigateToStoreSearchScreen(::std::
string const& searchText, ::std::
string const& mPackTypeFilter);
426 MCAPI
void navigateToStoreSearchScreen(
427 ::LinksToStyle const& linksToStyle,
428 ::std::
string const& searchText,
429 ::std::
string const& packTypeFilter
432 MCAPI
void navigateToSubmitFeedbackScreen(::FeedbackType feedbackType, ::std::
string const& identifier);
434 MCAPI
void navigateToSunsettingScreen(::std::
string title);
436 MCAPI
void navigateToUGCViewerScreen(
437 ::std::function<
void(::std::
string const&, ::std::
string const&, ::Core::Path const&)> closeCallback
440 MCAPI
void navigateToUploadPackFileProgressScreen(
441 ::std::
string const& realmID,
442 ::Core::Path const& path,
445 ::std::function<
void(::UploadState, ::Realms::World)> uploadPackCallback
449 navigateToWorldConversionCompleteScreen(::std::
string const& levelId, ::std::function<
void()> cancelCallback);
451 MCAPI ::std::unique_ptr<::DlcUIWrapper> newDlcUIWrapper(::MainMenuScreenController& controller);
453 MCAPI ::Bedrock::Threading::Async<::Safety::TextScanResult>
454 performPlayerSafetyScanRequest(::std::
string const& feedback);
456 MCAPI
bool prepareAppStoreForPurchases(::std::function<
void(
bool)> callback);
459 purchaseMarketplacePass(::std::
string const& productSku, ::std::unique_ptr<::TransactionContext>&& context);
461 MCAPI
bool purchasePlatformOffer(
462 ::PlatformOfferModel const& platformOfferModel,
463 ::std::unique_ptr<::TransactionContext>&& context,
467 MCAPI
void quickPlay();
469 MCAPI
void redeemRealmsCatalogOffer(::std::
string const& productId, ::std::function<
void(
bool)> outerCallback);
471 MCAPI
void refreshUserInventory() const;
473 MCAPI ::Bedrock::PubSub::Subscription
474 registerPrimaryUserSignInSubscriber(::std::function<
void(uint, ::Social::IdentityType)> listener);
476 MCAPI
void setDeepLinkListenerMainMenuParameters(::std::function<
void(::DownloadError const&)> onDownloadError);
478 MCAPI
void setEditorConnectionJoinIntent(::EditorConnectionJoinIntent editorConnectionJoinIntent);
480 MCAPI
void setHasSeenSonyTokenPopup(
bool newValue);
482 MCAPI
void setStoreCatalogItemViewed(::IStoreCatalogItem const& item) const;
484 MCAPI
void setStoreCatalogItemViewed(::std::
string const& productId) const;
486 MCAPI
void submitReviewFor(::std::
string const& productId,
int rating, ::std::function<
void()> successCallback);
488 MCAPI ::Bedrock::Threading::Async<::SubmitItemRatingResult>
489 submitReviewForEntitlementManager(::std::
string const& productId,
int rating);
491 MCAPI
bool supportsFliteTTS() const;
493 MCAPI
bool supportsXboxLiveAchievements() const;
495 MCAPI
void uploadLocalWorldFile(
496 ::std::
string const& realmID,
497 ::std::
string const& worldID,
499 ::std::function<
void(::UploadState, ::Realms::World)> callback
506 MCAPI
void* $ctor(::MinecraftScreenModelContext context);
518 MCAPI
void $navigateToDlcProgressScreen(
519 ::std::vector<::DlcId> const& dlcIds,
520 ::std::function<
void(
bool,
bool)> callback,
521 bool showCloseButton,
522 bool processingUpdates,
523 bool requireCancelToExit
526 MCAPI ::std::
string const& $getLastPoppedScreenName() const;
528 MCFOLD ::Bedrock::NotNullNonOwnerPtr<::StoreCatalogRepository> $getStoreCatalogRepository() const;
530 MCFOLD
bool $doesPlatformSupportRealms() const;
532 MCFOLD
bool $isSelectedSkinInitialized() const;
534 MCAPI
void $repopulateWorldTemplates();
536 MCAPI ::WorldTemplateInfo const* $findWorldTemplateByUUID(::std::vector<::mce::UUID> const& packUUIDs) const;
538 MCAPI
bool $isPackIdInRealmsPlus(::std::
string const& packId) const;
540 MCFOLD
float $getStoreNetworkFailureTimeout() const;
542 MCFOLD
bool $isInGame() const;
544 MCAPI ::IMinecraftEventing& $getMinecraftEventing() const;
546 MCAPI
bool $isAdhocEnabled() const;
548 MCAPI
bool $isNetworkEnabled(::NetworkFilter withFilter) const;
550 MCFOLD
bool $platformTTSExists() const;
Definition AnnouncementSurface.h:5
Definition Subscription.h:10
Definition CatalogCollection.h:5
Definition CloudSaveLevelInfo.h:10
Definition DlcChecker.h:5
Definition DlcUIWrapper.h:5
Definition IContentAccessibilityProvider.h:13
Definition IMainMenuScreenModel.h:5
Definition IMinecraftEventing.h:147
Definition LegacyWorldConverter.h:5
Definition LessonItem.h:5
Definition LibraryCollectionConfig.h:5
Definition LibraryCollection.h:5
Definition LibraryItem.h:5
Definition MainMenuScreenController.h:5
Definition MainMenuScreenModel.h:5
Definition MinecoinCatalogModel.h:5
Definition MinecraftScreenModel.h:5
Definition PackManifest.h:39
Definition PlayScreenModel.h:5
Definition ProgressHandler.h:5
Definition RealmsCreateParams.h:5
Definition RealmsWorldContext.h:7
Definition FacetStateManager.h:7
Definition ResourceLocation.h:15
Definition ResourcePackFileUploadManager.h:26
Definition ResourcePackPathCache.h:7
Definition SearchQuery.h:5
Definition SkinPackCollectionModel.h:5
Definition WorldFileDownloadManager.h:5
Definition WorldFileUploadManager.h:5
Definition WorldSeedCatalogModel.h:5
Definition WorldTemplateManager.h:21
Definition EDULibraryCategory.h:5
Definition IEduCloudSaveSystem.h:7
Definition ExperienceJoinRequestInfo.h:5
Definition LevelSummary.h:30
Definition MinecraftScreenModelContext.h:5
Definition PackContentItem.h:5
Definition PackSettingsInfo.h:5
Definition TextScanResult.h:7
Definition EduDedicatedServerDetails.h:15
Definition StoreDataDrivenScreenParams.h:5
Definition WorldTemplateInfo.h:12