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();
104
105public:
106 // virtual functions
107 // NOLINTBEGIN
108 virtual ~PackManifest() /*override*/;
109
110 virtual ::std::unique_ptr<::PackManifest> clone() const;
111 // NOLINTEND
112
113public:
114 // member functions
115 // NOLINTBEGIN
116 MCAPI PackManifest(::PackManifest const&);
117
118 MCAPI explicit PackManifest(::ManifestType type);
119
120 MCAPI void _serializeDependencies(::Json::Value& destination) const;
121
122 MCAPI void _serializeHeader(::Json::Value& destination) const;
123
124 MCAPI void _serializeModules(::Json::Value& destination) const;
125
126 MCAPI void addModule(::ResourceInformation const& resourceInfo);
127
128 MCAPI void
129 addNativeModuleDependency(::SharedTypes::v3_0_0::PackManifestDefinition::NativeModuleDependency const& moduleId);
130
131 MCAPI void addPackDependency(::PackIdVersion const& packId);
132
133 MCAPI_C ::Core::PathBuffer<::std::string> generateBaseIconPath() const;
134
135 MCAPI_C ::Core::PathBuffer<::std::string> generateIconPath() const;
136
137 MCAPI ::std::string getDescription() const;
138
139 MCAPI ::std::string getName() const;
140
141 MCAPI ::std::string getNameForTelemetry() const;
142
143 MCAPI ::std::string getNameWithVersionForTelemetry() const;
144
145 MCAPI_C ::std::unordered_map<::std::string, ::std::string> getPackNameLocalization() const;
146
147 MCAPI ::std::optional<::std::vector<::std::string>> getPackSettingsLocKeys() const;
148
149 MCAPI bool hasPackCapability(::std::string_view capability) const;
150
151 MCAPI_C bool isRestrictedPack() const;
152
153 MCAPI_C bool isUsingPackNameKeyword() const;
154
155 MCAPI_C ::PackManifest& operator=(::PackManifest const&);
156
157 MCAPI void serialize(::PackManifestFormat formatVersion, ::Json::Value& destination) const;
158
159 MCAPI void setDescription(::std::string const& description);
160
161 MCAPI void setIdentity(::PackIdVersion const& identity);
162
163 MCAPI void setLastModifiedDate(int64 lastModifiedDate);
164
165 MCAPI void setLocalizedNameKeywords(::std::unordered_map<::std::string, ::std::string> const& localizationNameMap);
166
167 MCAPI void setMinEngineVersion(::MinEngineVersion const& engineVersion);
168
169 MCFOLD void setName(::std::string const& name);
170
171 MCAPI void setOptimizationVersion(::SemVersion const& optimizationVersion);
172
173 MCAPI void setPackSettingsDef(
174 ::std::vector<::std::variant<
179 );
180 // NOLINTEND
181
182public:
183 // static functions
184 // NOLINTBEGIN
185 MCAPI static ::PackScope StringToPackScope(::std::string const& str);
186 // NOLINTEND
187
188public:
189 // static variables
190 // NOLINTBEGIN
191 MCAPI static ::std::string const& MarioPackId();
192 // NOLINTEND
193
194public:
195 // constructor thunks
196 // NOLINTBEGIN
197 MCAPI void* $ctor(::PackManifest const&);
198
199 MCAPI void* $ctor(::ManifestType type);
200 // NOLINTEND
201
202public:
203 // destructor thunk
204 // NOLINTBEGIN
205 MCAPI void $dtor();
206 // NOLINTEND
207
208public:
209 // virtual function thunks
210 // NOLINTBEGIN
211 MCAPI ::std::unique_ptr<::PackManifest> $clone() const;
212
213
214 // NOLINTEND
215
216public:
217 // vftables
218 // NOLINTBEGIN
219 MCNAPI static void** $vftable();
220 // NOLINTEND
221};
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