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/ResourceLocation.h"
13#include "mc/deps/core/resource/ResourceMetadata.h"
14#include "mc/deps/core/sem_ver/SemVersion.h"
15#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
16#include "mc/deps/shared_types/v3_0_0/pack_manifest/DropdownSetting.h"
17#include "mc/deps/shared_types/v3_0_0/pack_manifest/LabelSetting.h"
18#include "mc/deps/shared_types/v3_0_0/pack_manifest/SliderSetting.h"
19#include "mc/deps/shared_types/v3_0_0/pack_manifest/ToggleSetting.h"
20#include "mc/resources/ManifestOrigin.h"
21#include "mc/resources/ManifestType.h"
22#include "mc/resources/MinEngineVersion.h"
23#include "mc/resources/PackCapabilityTrustLevel.h"
24#include "mc/resources/PackManifestFormat.h"
25#include "mc/resources/PackScope.h"
26#include "mc/resources/TemplateLockState.h"
27#include "mc/util/BaseGameVersion.h"
28
29// auto generated forward declare list
30// clang-format off
31class I18n;
34namespace Json { class Value; }
35namespace SharedTypes::v3_0_0::PackManifestDefinition { struct NativeModuleDependency; }
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, ::PackCapabilityTrustLevel> 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, ::PackCapabilityTrustLevel>> mCapabilities;
98 ::ll::TypedStorage<8, 136, ::ResourceMetadata> mMetadata;
99 ::ll::TypedStorage<8, 24, ::SemVersion> mOptimizationVersion;
100 // NOLINTEND
101
102public:
103 // prevent constructor by default
104 PackManifest& operator=(PackManifest const&);
105 PackManifest();
106
107public:
108 // virtual functions
109 // NOLINTBEGIN
110 virtual ~PackManifest() /*override*/;
111
112 virtual ::std::unique_ptr<::PackManifest> clone() const;
113 // NOLINTEND
114
115public:
116 // member functions
117 // NOLINTBEGIN
118 MCAPI PackManifest(::PackManifest const&);
119
120 MCAPI explicit PackManifest(::ManifestType type);
121
122 MCAPI void _serializeDependencies(::Json::Value& destination) const;
123
124 MCAPI void _serializeHeader(::Json::Value& destination) const;
125
126 MCAPI void _serializeLegacyModuleDependencies(::Json::Value& destination) const;
127
128 MCAPI void _serializeMeta(::Json::Value& destination) const;
129
130 MCAPI void _serializeModules(::Json::Value& destination) const;
131
132 MCAPI void addModule(::ResourceInformation const& resourceInfo);
133
134 MCAPI void addPackCapability(::std::string_view capability, ::PackCapabilityTrustLevel trustLevel);
135
136 MCAPI void addPackDependency(::PackIdVersion const& packId);
137
138#ifdef LL_PLAT_C
139 MCAPI ::Core::PathBuffer<::std::string> generateBaseIconPath() const;
140
141 MCAPI ::Core::PathBuffer<::std::string> generateIconPath() const;
142#endif
143
144 MCAPI ::std::string getDescription(::I18n& loc) const;
145
146 MCAPI ::std::string getName(::I18n& loc) const;
147
148 MCAPI ::std::string getNameForTelemetry(::I18n& loc) const;
149
150 MCAPI ::std::string getNameWithVersionForTelemetry(::I18n& loc) const;
151
152 MCAPI ::std::optional<::std::vector<::std::string>> getPackSettingsLocKeys() const;
153
154 MCAPI bool hasPackCapability(::std::string_view capability) const;
155
156#ifdef LL_PLAT_C
157 MCAPI ::PackManifest& operator=(::PackManifest&&);
158#endif
159
160 MCAPI void serialize(::PackManifestFormat formatVersion, ::Json::Value& destination) const;
161
162 MCAPI void setIdentity(::PackIdVersion const& identity);
163
164 MCAPI void setLastModifiedDate(int64 lastModifiedDate);
165
166 MCAPI void setLocalizedNameKeywords(
167 ::std::unordered_map<::std::string, ::std::string> const& localizationNameMap,
168 ::I18n& loc
169 );
170
171 MCAPI void setMinEngineVersion(::MinEngineVersion const& engineVersion);
172
173 MCAPI void setOptimizationVersion(::SemVersion const& optimizationVersion);
174
175 MCAPI void setPackSettingsDef(
176 ::std::vector<::std::variant<
181 );
182
183 MCAPI void setRequiredBaseGameVersion(::BaseGameVersion const& baseGameVersion);
184 // NOLINTEND
185
186public:
187 // static functions
188 // NOLINTBEGIN
189 MCAPI static ::PackScope StringToPackScope(::std::string const& str);
190
191 MCAPI static void _serializeVersion(::Json::Value& destination, ::SemVersion const& version);
192 // NOLINTEND
193
194public:
195 // static variables
196 // NOLINTBEGIN
197 MCAPI static ::std::string const& MarioPackId();
198 // NOLINTEND
199
200public:
201 // constructor thunks
202 // NOLINTBEGIN
203 MCAPI void* $ctor(::PackManifest const&);
204
205 MCAPI void* $ctor(::ManifestType type);
206 // NOLINTEND
207
208public:
209 // destructor thunk
210 // NOLINTBEGIN
211 MCFOLD void $dtor();
212 // NOLINTEND
213
214public:
215 // virtual function thunks
216 // NOLINTBEGIN
217 MCAPI ::std::unique_ptr<::PackManifest> $clone() const;
218
219
220 // NOLINTEND
221};
Definition BaseGameVersion.h:8
Definition EnableNonOwnerReferences.h:7
Definition I18n.h:19
Definition Value.h:16
Definition MinEngineVersion.h:15
Definition ResourceInformation.h:9
Definition SemVersion.h:15
Definition LegacyPackIdVersion.h:10
Definition PackIdVersion.h:10