LeviLamina
Loading...
Searching...
No Matches
WorldResourcePackDownloader.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/world/IWorldResourcePackDownloader.h"
7#include "mc/client/world/PackDownloadError.h"
8#include "mc/deps/core/utility/NonOwnerPointer.h"
9
10// auto generated forward declare list
11// clang-format off
12class DlcDependency;
13class IClientInstance;
15class IDlcBatchModel;
16class IDlcBatcher;
17class IDlcValidation;
18class IEntitlementManager;
19class ILevelListCache;
20class IStoreCatalogRepository;
22struct PackIdVersion;
23namespace World { struct PackCheckResult; }
24namespace World { struct PackDownloadProgressInfo; }
25// clang-format on
26
27namespace World {
28
29class WorldResourcePackDownloader : public ::World::IWorldResourcePackDownloader {
30public:
31 // member variables
32 // NOLINTBEGIN
33 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IDlcBatcher>> mDlcBatcher;
34 ::ll::TypedStorage<8, 8, ::IDlcValidation&> mDlcValidation;
35 ::ll::TypedStorage<8, 8, ::IContentAcquisition&> mContentAcquisition;
36 ::ll::TypedStorage<8, 8, ::IStoreCatalogRepository&> mStoreCatalogRepository;
37 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IEntitlementManager>> mEntitlementManager;
38 ::ll::TypedStorage<8, 8, ::IClientInstance&> mClientInstance;
39 ::ll::TypedStorage<8, 8, ::ILevelListCache&> mLevelListCache;
40 ::ll::TypedStorage<8, 8, ::IDlcBatchModel*> mDlcBatchModel;
41 ::ll::TypedStorage<8, 8, uint64> mDlcSizeToDownload;
42 ::ll::TypedStorage<8, 8, uint64> mDlcIdsToDownload;
43 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::DlcValidationState>> mDlcState;
44 ::ll::TypedStorage<8, 16, ::std::shared_ptr<bool>> mExistenceTracker;
45 ::ll::TypedStorage<8, 64, ::std::function<void(::std::optional<::World::PackDownloadError>)>> mOnCheckPackComplete;
46 ::ll::TypedStorage<8, 64, ::std::function<void()>> mOnDownloadCompleteCallback;
47 ::ll::TypedStorage<8, 64, ::std::function<void(uint64)>> mOnGetPackSizeCompleteCallback;
48 // NOLINTEND
49
50public:
51 // prevent constructor by default
52 WorldResourcePackDownloader& operator=(WorldResourcePackDownloader const&);
53 WorldResourcePackDownloader(WorldResourcePackDownloader const&);
54 WorldResourcePackDownloader();
55
56public:
57 // virtual functions
58 // NOLINTBEGIN
59 virtual void downloadPacks(
60 ::std::vector<::std::string> const& productIds,
61 ::std::function<void()> onCompleteCallback,
62 ::std::function<void(::World::PackDownloadError)> onErrorCallback
63 ) /*override*/;
64
65 virtual ::World::PackDownloadProgressInfo getProgress() /*override*/;
66
67 virtual void
68 getDownloadingPackTitles(::std::function<void(::std::vector<::std::string>)> packTitlesCallback) /*override*/;
69
70 virtual void cancelDownloadPack() /*override*/;
71
72 virtual void getPackSizes(
73 ::std::vector<::std::string> const& productIds,
74 ::std::function<void(uint64)> onCompleteCallback
75 ) /*override*/;
76
77 virtual ::World::PackCheckResult
78 checkDlc(::std::string const& levelId, ::PackIdVersion const& packIdVersion, bool const isForRealms) const
79 /*override*/;
80 // NOLINTEND
81
82public:
83 // member functions
84 // NOLINTBEGIN
85 MCAPI WorldResourcePackDownloader(
86 ::IDlcValidation& dlcValidation,
87 ::IContentAcquisition& contentAcquisition,
88 ::IStoreCatalogRepository& storeCatalogRepository,
89 ::Bedrock::NotNullNonOwnerPtr<::IEntitlementManager> entitlementManager,
90 ::IClientInstance& clientInstance,
91 ::ILevelListCache& levelListCache
92 );
93
94 MCAPI void _checkPacks();
95
96 MCAPI void _downloadPacks();
97
98 MCFOLD bool
99 _hasExpiredRealmsPlusSubscription(::Bedrock::NotNullNonOwnerPtr<::IEntitlementManager> entitlementManager) const;
100
101 MCAPI bool _hasRealmsPlusDlcDependencies(
102 ::std::vector<::DlcDependency> const& dependencies,
103 ::IStoreCatalogRepository const& storeCatalogRepository
104 ) const;
105 // NOLINTEND
106
107public:
108 // constructor thunks
109 // NOLINTBEGIN
110 MCAPI void* $ctor(
111 ::IDlcValidation& dlcValidation,
112 ::IContentAcquisition& contentAcquisition,
113 ::IStoreCatalogRepository& storeCatalogRepository,
114 ::Bedrock::NotNullNonOwnerPtr<::IEntitlementManager> entitlementManager,
115 ::IClientInstance& clientInstance,
116 ::ILevelListCache& levelListCache
117 );
118 // NOLINTEND
119
120public:
121 // virtual function thunks
122 // NOLINTBEGIN
123 MCAPI void $downloadPacks(
124 ::std::vector<::std::string> const& productIds,
125 ::std::function<void()> onCompleteCallback,
126 ::std::function<void(::World::PackDownloadError)> onErrorCallback
127 );
128
129 MCAPI ::World::PackDownloadProgressInfo $getProgress();
130
131 MCAPI void $getDownloadingPackTitles(::std::function<void(::std::vector<::std::string>)> packTitlesCallback);
132
133 MCAPI void $cancelDownloadPack();
134
135 MCAPI void
136 $getPackSizes(::std::vector<::std::string> const& productIds, ::std::function<void(uint64)> onCompleteCallback);
137
138 MCAPI ::World::PackCheckResult
139 $checkDlc(::std::string const& levelId, ::PackIdVersion const& packIdVersion, bool const isForRealms) const;
140 // NOLINTEND
141
142public:
143 // vftables
144 // NOLINTBEGIN
145 MCNAPI static void** $vftable();
146 // NOLINTEND
147};
148
149} // namespace World
Definition DlcDependency.h:5
Definition IClientInstance.h:5
Definition IContentAcquisition.h:5
Definition IDlcBatchModel.h:5
Definition IDlcBatcher.h:5
Definition IDlcValidation.h:5
Definition ILevelListCache.h:27
Definition WorldResourcePackDownloader.h:7
static MCAPI void ** $vftable()
Definition DlcValidationState.h:5
Definition PackIdVersion.h:10
Definition PackCheckResult.h:7
Definition PackDownloadProgressInfo.h:7