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