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/deps/core/file/PathBuffer.h"
7#include "mc/deps/core/resource/ContentIdentity.h"
8#include "mc/deps/core/resource/PackCategory.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/resources/ManifestOrigin.h"
17#include "mc/resources/ManifestType.h"
18#include "mc/resources/MinEngineVersion.h"
19#include "mc/resources/PackCapability.h"
20#include "mc/resources/PackManifestFormat.h"
21#include "mc/resources/PackScope.h"
22#include "mc/resources/TemplateLockState.h"
23#include "mc/util/BaseGameVersion.h"
24
25// auto generated forward declare list
26// clang-format off
29namespace Json { class Value; }
30namespace SharedTypes::v3_0_0::PackManifestDefinition { struct DropdownSetting; }
31namespace SharedTypes::v3_0_0::PackManifestDefinition { struct LabelSetting; }
32namespace SharedTypes::v3_0_0::PackManifestDefinition { struct NativeModuleDependency; }
33namespace SharedTypes::v3_0_0::PackManifestDefinition { struct SliderSetting; }
34namespace SharedTypes::v3_0_0::PackManifestDefinition { struct ToggleSetting; }
35// clang-format on
36
37class PackManifest : public ::Bedrock::EnableNonOwnerReferences {
38public:
39 // PackManifest inner types define
40 enum class PackRedownloadableState : int {
41 Redownloadable = 0,
42 NotRedownloadable = 1,
43 Unknown = 2,
44 };
45
46public:
47 // member variables
48 // NOLINTBEGIN
49 ::ll::TypedStorage<1, 1, ::ManifestType> mManifestType;
50 ::ll::TypedStorage<1, 1, ::ManifestOrigin> mManifestOrigin;
51 ::ll::TypedStorage<8, 56, ::ResourceLocation> mLocation;
52 ::ll::TypedStorage<8, 56, ::ResourceLocation> mPackIconLocation;
53 ::ll::TypedStorage<8, 24, ::ContentIdentity> mContentIdentity;
54 ::ll::TypedStorage<8, 24, ::ContentIdentity> mSourceIdentity;
55 ::ll::TypedStorage<4, 4, ::PackCategory> mPackCategory;
56 ::ll::TypedStorage<1, 1, ::PackOrigin> mPackOrigin;
57 ::ll::TypedStorage<1, 1, bool> mIsTitleLocked;
58 ::ll::TypedStorage<1, 1, bool> mExpired;
59 ::ll::TypedStorage<8, 8, uint64> mSize;
60 ::ll::TypedStorage<8, 32, ::std::string> mLastModifiedDate;
61 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mLanguageCodesForPackKeywords;
62 ::ll::TypedStorage<1, 1, bool> mFailsGameVersionMatch;
63 ::ll::TypedStorage<1, 1, ::PackManifestFormat> mFormatVersion;
64 ::ll::TypedStorage<1, 1, ::PackManifestFormat> mOriginalFormatVersion;
65 ::ll::TypedStorage<8, 32, ::std::string> mName;
66 ::ll::TypedStorage<8, 32, ::std::string> mDescription;
67 ::ll::TypedStorage<8, 48, ::PackIdVersion> mIdentity;
68 ::ll::TypedStorage<1, 1, ::PackScope> mPackScope;
69 ::ll::TypedStorage<1, 1, ::PackType> mPackType;
70 ::ll::TypedStorage<8, 32, ::BaseGameVersion> mRequiredBaseGameVersion;
71 ::ll::TypedStorage<8, 32, ::MinEngineVersion> mMinEngineVersion;
72 ::ll::TypedStorage<1, 1, ::TemplateLockState> mTemplateOptionLockState;
73 ::ll::TypedStorage<4, 4, ::PackManifest::PackRedownloadableState> mPackReDownloadableState;
74 ::ll::TypedStorage<4, 4, ::PackCapability::TrustLevel> mMaximumAllowedTrustLevel;
75 ::ll::TypedStorage<1, 1, bool> mIsHidden;
76 ::ll::TypedStorage<1, 1, bool> mIsPlatformLocked;
77 ::ll::TypedStorage<1, 1, bool> mIsRandomSeedAllowed;
78 ::ll::TypedStorage<1, 1, bool> mHasClientScript;
79 ::ll::TypedStorage<1, 1, bool> mHasEducationMetadata;
80 ::ll::TypedStorage<1, 1, bool> mHasPlugins;
81 ::ll::TypedStorage<1, 1, bool> mHasValidUUID;
82 ::ll::TypedStorage<8, 24, ::std::vector<::ResourceInformation>> mModules;
83 ::ll::TypedStorage<8, 24, ::std::vector<::LegacyPackIdVersion>> mLegacyModuleDependencies;
84 ::ll::TypedStorage<8, 24, ::std::vector<::PackIdVersion>> mPackDependencies;
85 ::ll::TypedStorage<8, 24, ::std::vector<::SharedTypes::v3_0_0::PackManifestDefinition::NativeModuleDependency>>
86 mNativeModuleDependencies;
87 ::ll::TypedStorage<
88 8,
89 32,
90 ::std::optional<::std::vector<::std::variant<
95 mPackSettingsDef;
96 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::PackCapability::TrustLevel>> mCapabilities;
97 ::ll::TypedStorage<8, 136, ::ResourceMetadata> mMetadata;
98 ::ll::TypedStorage<8, 24, ::SemVersion> mOptimizationVersion;
99 // NOLINTEND
100
101public:
102 // prevent constructor by default
103 PackManifest& operator=(PackManifest const&);
104 PackManifest();
105
106public:
107 // virtual functions
108 // NOLINTBEGIN
109 virtual ~PackManifest() /*override*/;
110
111 virtual ::std::unique_ptr<::PackManifest> clone() const;
112 // NOLINTEND
113
114public:
115 // member functions
116 // NOLINTBEGIN
117 MCAPI PackManifest(::PackManifest const&);
118
119 MCAPI explicit PackManifest(::ManifestType type);
120
121 MCAPI void _serializeDependencies(::Json::Value& destination) const;
122
123 MCAPI void _serializeHeader(::Json::Value& destination) const;
124
125 MCAPI void _serializeModules(::Json::Value& destination) const;
126
127 MCAPI void addModule(::ResourceInformation const& resourceInfo);
128
129 MCAPI void
130 addNativeModuleDependency(::SharedTypes::v3_0_0::PackManifestDefinition::NativeModuleDependency const& moduleId);
131
132 MCAPI void addPackDependency(::PackIdVersion const& packId);
133
134 MCAPI_C ::Core::PathBuffer<::std::string> generateBaseIconPath() const;
135
136 MCAPI_C ::Core::PathBuffer<::std::string> generateIconPath() const;
137
138 MCAPI ::std::string getDescription() const;
139
140 MCAPI ::std::string getName() const;
141
142 MCAPI ::std::string getNameForTelemetry() const;
143
144 MCAPI ::std::string getNameWithVersionForTelemetry() const;
145
146 MCAPI_C ::std::unordered_map<::std::string, ::std::string> getPackNameLocalization() const;
147
148 MCAPI ::std::optional<::std::vector<::std::string>> getPackSettingsLocKeys() const;
149
150 MCAPI bool hasPackCapability(::std::string_view capability) const;
151
152 MCAPI_C bool isRestrictedPack() const;
153
154 MCAPI_C bool isUsingPackNameKeyword() const;
155
156 MCAPI void serialize(::PackManifestFormat formatVersion, ::Json::Value& destination) const;
157
158 MCAPI void setDescription(::std::string const& description);
159
160 MCAPI void setIdentity(::PackIdVersion const& identity);
161
162 MCAPI void setLastModifiedDate(int64 lastModifiedDate);
163
164 MCAPI void setLocalizedNameKeywords(::std::unordered_map<::std::string, ::std::string> const& localizationNameMap);
165
166 MCAPI void setMinEngineVersion(::MinEngineVersion const& engineVersion);
167
168 MCFOLD void setName(::std::string const& name);
169
170 MCAPI void setOptimizationVersion(::SemVersion const& optimizationVersion);
171
172 MCAPI void setPackSettingsDef(
173 ::std::vector<::std::variant<
178 );
179 // NOLINTEND
180
181public:
182 // static functions
183 // NOLINTBEGIN
184 MCAPI static ::PackScope StringToPackScope(::std::string const& str);
185 // NOLINTEND
186
187public:
188 // static variables
189 // NOLINTBEGIN
190 MCAPI static ::std::string const& MarioPackId();
191 // NOLINTEND
192
193public:
194 // constructor thunks
195 // NOLINTBEGIN
196 MCAPI void* $ctor(::PackManifest const&);
197
198 MCAPI void* $ctor(::ManifestType type);
199 // NOLINTEND
200
201public:
202 // destructor thunk
203 // NOLINTBEGIN
204 MCAPI void $dtor();
205 // NOLINTEND
206
207public:
208 // virtual function thunks
209 // NOLINTBEGIN
210 MCAPI ::std::unique_ptr<::PackManifest> $clone() const;
211
212
213 // NOLINTEND
214
215public:
216 // vftables
217 // NOLINTBEGIN
218 MCNAPI static void** $vftable();
219 // NOLINTEND
220};
Definition EnableNonOwnerReferences.h:7
Definition Value.h:16
Definition MinEngineVersion.h:10
static MCAPI void ** $vftable()
Definition ResourceInformation.h:9
Definition SemVersion.h:15
Definition LegacyPackIdVersion.h:10
Definition PackIdVersion.h:10