LeviLamina
Loading...
Searching...
No Matches
PackManifest.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/screens/controllers/PackCategory.h"
7#include "mc/deps/core/file/PathBuffer.h"
8#include "mc/deps/core/resource/ContentIdentity.h"
9#include "mc/deps/core/resource/PackIdVersion.h"
10#include "mc/deps/core/resource/PackOrigin.h"
11#include "mc/deps/core/resource/PackType.h"
12#include "mc/deps/core/resource/ResourceFileSystem.h"
13#include "mc/deps/core/resource/ResourceLocation.h"
14#include "mc/deps/core/resource/ResourceMetadata.h"
15#include "mc/deps/core/sem_ver/SemVersion.h"
16#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
17#include "mc/resources/ManifestOrigin.h"
18#include "mc/resources/ManifestType.h"
19#include "mc/resources/MinEngineVersion.h"
20#include "mc/resources/PackCapability.h"
21#include "mc/resources/PackManifestFormat.h"
22#include "mc/resources/PackScope.h"
23#include "mc/resources/TemplateLockState.h"
24#include "mc/util/BaseGameVersion.h"
25
26// auto generated forward declare list
27// clang-format off
30namespace Json { class Value; }
31namespace SharedTypes::v3_0_0::PackManifestDefinition { struct DropdownSetting; }
32namespace SharedTypes::v3_0_0::PackManifestDefinition { struct LabelSetting; }
33namespace SharedTypes::v3_0_0::PackManifestDefinition { struct NativeModuleDependency; }
34namespace SharedTypes::v3_0_0::PackManifestDefinition { struct SliderSetting; }
35namespace SharedTypes::v3_0_0::PackManifestDefinition { struct ToggleSetting; }
36// clang-format on
37
38class PackManifest : public ::Bedrock::EnableNonOwnerReferences {
39public:
40 // PackManifest inner types define
41 enum class PackRedownloadableState : int {
42 Redownloadable = 0,
43 NotRedownloadable = 1,
44 Unknown = 2,
45 };
46
47public:
48 // member variables
49 // NOLINTBEGIN
50 ::ll::TypedStorage<1, 1, ::ManifestType> mManifestType;
51 ::ll::TypedStorage<1, 1, ::ManifestOrigin> mManifestOrigin;
52 ::ll::TypedStorage<8, 56, ::ResourceLocation> mLocation;
53 ::ll::TypedStorage<8, 56, ::ResourceLocation> mPackIconLocation;
54 ::ll::TypedStorage<8, 24, ::ContentIdentity> mContentIdentity;
55 ::ll::TypedStorage<8, 24, ::ContentIdentity> mSourceIdentity;
56 ::ll::TypedStorage<4, 4, ::PackCategory> mPackCategory;
57 ::ll::TypedStorage<1, 1, ::PackOrigin> mPackOrigin;
58 ::ll::TypedStorage<1, 1, bool> mIsTitleLocked;
59 ::ll::TypedStorage<1, 1, bool> mExpired;
60 ::ll::TypedStorage<8, 8, uint64> mSize;
61 ::ll::TypedStorage<8, 32, ::std::string> mLastModifiedDate;
62 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mLanguageCodesForPackKeywords;
63 ::ll::TypedStorage<1, 1, bool> mFailsGameVersionMatch;
64 ::ll::TypedStorage<1, 1, ::PackManifestFormat> mFormatVersion;
65 ::ll::TypedStorage<1, 1, ::PackManifestFormat> mOriginalFormatVersion;
66 ::ll::TypedStorage<8, 32, ::std::string> mName;
67 ::ll::TypedStorage<8, 32, ::std::string> mDescription;
68 ::ll::TypedStorage<8, 48, ::PackIdVersion> mIdentity;
69 ::ll::TypedStorage<1, 1, ::PackScope> mPackScope;
70 ::ll::TypedStorage<1, 1, ::PackType> mPackType;
71 ::ll::TypedStorage<8, 32, ::BaseGameVersion> mRequiredBaseGameVersion;
72 ::ll::TypedStorage<8, 32, ::MinEngineVersion> mMinEngineVersion;
73 ::ll::TypedStorage<1, 1, ::TemplateLockState> mTemplateOptionLockState;
74 ::ll::TypedStorage<4, 4, ::PackManifest::PackRedownloadableState> mPackReDownloadableState;
75 ::ll::TypedStorage<4, 4, ::PackCapability::TrustLevel> mMaximumAllowedTrustLevel;
76 ::ll::TypedStorage<1, 1, bool> mIsHidden;
77 ::ll::TypedStorage<1, 1, bool> mIsPlatformLocked;
78 ::ll::TypedStorage<1, 1, bool> mIsRandomSeedAllowed;
79 ::ll::TypedStorage<1, 1, bool> mHasClientScript;
80 ::ll::TypedStorage<1, 1, bool> mHasEducationMetadata;
81 ::ll::TypedStorage<1, 1, bool> mHasPlugins;
82 ::ll::TypedStorage<1, 1, bool> mHasValidUUID;
83 ::ll::TypedStorage<8, 24, ::std::vector<::ResourceInformation>> mModules;
84 ::ll::TypedStorage<8, 24, ::std::vector<::LegacyPackIdVersion>> mLegacyModuleDependencies;
85 ::ll::TypedStorage<8, 24, ::std::vector<::PackIdVersion>> mPackDependencies;
86 ::ll::TypedStorage<8, 24, ::std::vector<::SharedTypes::v3_0_0::PackManifestDefinition::NativeModuleDependency>>
87 mNativeModuleDependencies;
88 ::ll::TypedStorage<
89 8,
90 32,
91 ::std::optional<::std::vector<::std::variant<
96 mPackSettingsDef;
97 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::PackCapability::TrustLevel>> mCapabilities;
98 ::ll::TypedStorage<8, 136, ::ResourceMetadata> mMetadata;
99 ::ll::TypedStorage<8, 24, ::SemVersion> mOptimizationVersion;
100 // NOLINTEND
101
102#ifdef LL_PLAT_S
103public:
104 // prevent constructor by default
105 PackManifest& operator=(PackManifest const&);
106 PackManifest();
107
108#else // LL_PLAT_C
109public:
110 // prevent constructor by default
111 PackManifest();
112
113#endif
114public:
115 // virtual functions
116 // NOLINTBEGIN
117 virtual ~PackManifest() /*override*/;
118
119 virtual ::std::unique_ptr<::PackManifest> clone() const;
120 // NOLINTEND
121
122public:
123 // member functions
124 // NOLINTBEGIN
125 MCAPI PackManifest(::PackManifest const&);
126
127 MCAPI explicit PackManifest(::ManifestType type);
128
129 MCAPI void _serializeDependencies(::Json::Value& destination) const;
130
131 MCAPI void _serializeHeader(::Json::Value& destination) const;
132
133 MCAPI void _serializeLegacyModuleDependencies(::Json::Value& destination) const;
134
135 MCAPI void _serializeMeta(::Json::Value& destination) const;
136
137 MCAPI void _serializeModules(::Json::Value& destination) const;
138
139 MCAPI void _serializeVersion(::Json::Value& destination, ::SemVersion const& version) const;
140
141 MCAPI void addModule(::ResourceInformation const& resourceInfo);
142
143 MCAPI void addPackCapability(::std::string_view capability, ::PackCapability::TrustLevel trustLevel);
144
145#ifdef LL_PLAT_C
146 MCAPI bool canBeRedownloaded() const;
147
148 MCAPI ::Core::PathBuffer<::std::string> generateBaseIconPath() const;
149
150 MCAPI ::Core::PathBuffer<::std::string> generateIconPath() const;
151#endif
152
153 MCFOLD ::ContentIdentity const& getContentIdentity() const;
154
155 MCFOLD ::std::vector<::PackIdVersion> const& getDependentPackIdentities() const;
156
157 MCAPI ::std::string getDescription() const;
158
159#ifdef LL_PLAT_C
160 MCAPI ::ResourceFileSystem getFileSystemFromOrigin() const;
161#endif
162
163 MCFOLD ::PackManifestFormat getFormatVersion() const;
164
165 MCFOLD ::PackIdVersion const& getIdentity() const;
166
167 MCFOLD ::std::vector<::std::string> const& getLanguageCodesForPackKeywords() const;
168
169#ifdef LL_PLAT_C
170 MCFOLD ::std::string const& getLastModifiedDate() const;
171
172 MCFOLD ::std::vector<::LegacyPackIdVersion> const& getLegacyModuleDependencies() const;
173#endif
174
175 MCFOLD ::ResourceLocation const& getLocation() const;
176
177 MCFOLD ::ManifestOrigin getManifestOrigin() const;
178
179#ifdef LL_PLAT_C
180 MCFOLD ::ManifestType getManifestType() const;
181#endif
182
183 MCFOLD ::ResourceMetadata const& getMetaData() const;
184
185 MCFOLD ::MinEngineVersion const& getMinEngineVersion() const;
186
187 MCFOLD ::std::vector<::ResourceInformation> const& getModules() const;
188
189 MCAPI ::std::string getName() const;
190
191 MCAPI ::std::string getNameForTelemetry() const;
192
193 MCAPI ::std::string getNameWithVersionForTelemetry() const;
194
195 MCFOLD ::std::vector<::SharedTypes::v3_0_0::PackManifestDefinition::NativeModuleDependency> const&
196 getNativeModuleDependencies() const;
197
198 MCFOLD ::SemVersion const& getOptimizationVersion() const;
199
200#ifdef LL_PLAT_C
201 MCFOLD ::TemplateLockState getOptionLockedState() const;
202#endif
203
204 MCAPI ::PackManifestFormat getOriginalFormatVersion() const;
205
206 MCFOLD ::PackCategory getPackCategory() const;
207
208#ifdef LL_PLAT_C
209 MCAPI ::std::unordered_map<::std::string, ::std::string> getPackNameLocalization() const;
210#endif
211
212 MCFOLD ::PackOrigin getPackOrigin() const;
213
214 MCFOLD ::PackScope getPackScope() const;
215
216#ifdef LL_PLAT_C
217 MCFOLD ::std::optional<::std::vector<::std::variant<
221 ::SharedTypes::v3_0_0::PackManifestDefinition::DropdownSetting>>> const& getPackSettingsDef() const;
222#endif
223
224 MCAPI ::std::optional<::std::vector<::std::string>> getPackSettingsLocKeys() const;
225
226 MCFOLD uint64 getPackSize() const;
227
228 MCAPI ::PackType getPackType() const;
229
230 MCAPI ::BaseGameVersion const& getRequiredBaseGameVersion() const;
231
232 MCFOLD ::ContentIdentity const& getSourceIdentity() const;
233
234 MCAPI ::std::vector<::std::string> getTrustedCapabilities() const;
235
236#ifdef LL_PLAT_C
237 MCAPI ::Core::PathBuffer<::std::string> getZipFolderPath() const;
238#endif
239
240 MCAPI bool hasClientScript() const;
241
242 MCAPI bool hasModule(::PackIdVersion const& moduleIdentity) const;
243
244 MCAPI bool hasPackCapability(::std::string_view capability) const;
245
246 MCFOLD bool hasPlugins() const;
247
248#ifdef LL_PLAT_C
249 MCAPI bool hasValidUUID() const;
250#endif
251
252 MCAPI bool isAddon() const;
253
254#ifdef LL_PLAT_C
255 MCAPI bool isBasePackCategory() const;
256#endif
257
258 MCAPI bool isHidden() const;
259
260 MCAPI bool isPlatformLocked() const;
261
262 MCAPI bool isPremium() const;
263
264#ifdef LL_PLAT_C
265 MCAPI bool isRandomSeedAllowed() const;
266#endif
267
268 MCAPI bool isRestrictedPack() const;
269
270#ifdef LL_PLAT_C
271 MCAPI bool isTitleLocked() const;
272
273 MCAPI bool isUsingPackNameKeyword() const;
274
275 MCAPI bool isValid() const;
276
277 MCAPI ::PackManifest& operator=(::PackManifest const&);
278#endif
279
280 MCAPI void serialize(::PackManifestFormat formatVersion, ::Json::Value& destination) const;
281
282 MCAPI void setCanBeRedownloaded(bool reDownloadable);
283
284#ifdef LL_PLAT_C
285 MCAPI void setContentIdentity(::ContentIdentity const& contentIdentity);
286#endif
287
288 MCAPI void setDescription(::std::string const& description);
289
290#ifdef LL_PLAT_C
291 MCAPI void setExpired(bool expired);
292#endif
293
294 MCAPI void setIdentity(::PackIdVersion const& identity);
295
296 MCAPI void setLastModifiedDate(int64 lastModifiedDate);
297
298 MCAPI void setLocalizedNameKeywords(::std::unordered_map<::std::string, ::std::string> const& localizationNameMap);
299
300 MCAPI void setManifestOrigin(::ManifestOrigin const& origin);
301
302 MCFOLD void setName(::std::string const& name);
303
304 MCAPI void setOptionLockedState(::TemplateLockState isWorldTemplateOptionLocked);
305
306 MCFOLD void setPackCategory(::PackCategory packCategory);
307
308#ifdef LL_PLAT_C
309 MCAPI void setPackIconLocation(::ResourceLocation const& location);
310#endif
311
312 MCAPI void setPackSettingsDef(
313 ::std::vector<::std::variant<
318 );
319
320 MCAPI void setPackType(::PackType packType);
321
322 MCAPI void setRequiredBaseGameVersion(::BaseGameVersion const& baseGameVersion);
323
324 MCAPI void setSourceIdentity(::ContentIdentity const& contentIdentity);
325
326#ifdef LL_PLAT_C
327 MCAPI bool supportsLocalizedSubpackNames() const;
328#endif
329 // NOLINTEND
330
331public:
332 // static functions
333 // NOLINTBEGIN
334 MCAPI static ::PackScope StringToPackScope(::std::string const& str);
335 // NOLINTEND
336
337public:
338 // static variables
339 // NOLINTBEGIN
340 MCAPI static ::std::string const& MarioPackId();
341 // NOLINTEND
342
343public:
344 // constructor thunks
345 // NOLINTBEGIN
346 MCAPI void* $ctor(::PackManifest const&);
347
348 MCAPI void* $ctor(::ManifestType type);
349 // NOLINTEND
350
351public:
352 // destructor thunk
353 // NOLINTBEGIN
354 MCFOLD void $dtor();
355 // NOLINTEND
356
357public:
358 // virtual function thunks
359 // NOLINTBEGIN
360 MCAPI ::std::unique_ptr<::PackManifest> $clone() const;
361
362
363 // NOLINTEND
364
365public:
366 // vftables
367 // NOLINTBEGIN
368 MCNAPI static void** $vftable();
369 // NOLINTEND
370};
Definition BaseGameVersion.h:13
Definition EnableNonOwnerReferences.h:7
Definition ContentIdentity.h:8
Definition Value.h:16
static MCAPI void ** $vftable()
Definition ResourceInformation.h:14
Definition ResourceLocation.h:15
Definition SemVersion.h:15
Definition LegacyPackIdVersion.h:10
Definition PackIdVersion.h:10