LeviLamina
Loading...
Searching...
No Matches
FileArchiver.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/file/ZipProgress.h"
7#include "mc/deps/core/threading/IAsyncResult.h"
8#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
9#include "mc/deps/core/utility/NonOwnerPointer.h"
10#include "mc/world/level/FileArchiverOutcome.h"
11
12// auto generated forward declare list
13// clang-format off
16class ILevelListCache;
18class Level;
19class LevelData;
20class LevelDbEnv;
21class PackInstance;
22class Scheduler;
23namespace Core { class FilePathManager; }
24namespace Core { class Path; }
25// clang-format on
26
28public:
29 // FileArchiver inner types declare
30 // clang-format off
31 struct CopyWorldResult;
32 struct EduCloudImportInfo;
33 struct ExportData;
34 class IWorldConverter;
35 struct ImportWorldsResult;
36 class ProgressReporter;
37 struct Result;
38 // clang-format on
39
40 // FileArchiver inner types define
41 enum class State : int {
42 Idle = 0,
43 Importing = 1,
44 Exporting = 2,
45 };
46
47 enum class ExportType : int {
48 Level = 0,
49 Template = 1,
50 Project = 2,
51 PlayableEditorLevel = 3,
52 PackagedLevel = 4,
53 };
54
55 enum class ShowToast : int {
56 Enabled = 0,
57 Disabled = 1,
58 };
59
60 struct Result {
61 public:
62 // member variables
63 // NOLINTBEGIN
68 // NOLINTEND
69
70 public:
71 // prevent constructor by default
72 Result& operator=(Result const&);
73 Result(Result const&);
74 Result();
75
76 public:
77 // member functions
78 // NOLINTBEGIN
79 MCNAPI ~Result();
80 // NOLINTEND
81
82 public:
83 // destructor thunk
84 // NOLINTBEGIN
85 MCNAPI void $dtor();
86 // NOLINTEND
87 };
88
89 struct ExportData {
90 public:
91 // member variables
92 // NOLINTBEGIN
98 // NOLINTEND
99
100 public:
101 // prevent constructor by default
102 ExportData& operator=(ExportData const&);
103 ExportData(ExportData const&);
104
105 public:
106 // member functions
107 // NOLINTBEGIN
108 MCNAPI ExportData();
109 // NOLINTEND
110
111 public:
112 // constructor thunks
113 // NOLINTBEGIN
114 MCNAPI void* $ctor();
115 // NOLINTEND
116 };
117
119 public:
120 // member variables
121 // NOLINTBEGIN
125 // NOLINTEND
126
127 public:
128 // prevent constructor by default
129 CopyWorldResult& operator=(CopyWorldResult const&);
132 };
133
135 public:
136 // member variables
137 // NOLINTBEGIN
141 // NOLINTEND
142
143 public:
144 // prevent constructor by default
145 ProgressReporter& operator=(ProgressReporter const&);
148
149 public:
150 // virtual functions
151 // NOLINTBEGIN
152 // vIndex: 0
153 virtual ~ProgressReporter() /*override*/;
154
155 // vIndex: 1
156 virtual void clear() /*override*/;
157 // NOLINTEND
158
159 public:
160 // member functions
161 // NOLINTBEGIN
162 MCNAPI void setProgressMessage(::std::string const& message);
163 // NOLINTEND
164
165 public:
166 // destructor thunk
167 // NOLINTBEGIN
168 MCNAPI void $dtor();
169 // NOLINTEND
170
171 public:
172 // virtual function thunks
173 // NOLINTBEGIN
174 MCNAPI void $clear();
175 // NOLINTEND
176
177 public:
178 // vftables
179 // NOLINTBEGIN
180 MCNAPI static void** $vftableForZipProgress();
181
183 // NOLINTEND
184 };
185
187 public:
188 // virtual functions
189 // NOLINTBEGIN
190 // vIndex: 0
191 virtual ~IWorldConverter() = default;
192
193 // vIndex: 1
194 virtual void enqueueConvertImportingWorldTasks(
195 ::std::shared_ptr<::FileArchiver::Result>&,
196 ::Bedrock::NotNullNonOwnerPtr<::FileArchiver::ProgressReporter>,
198 ) = 0;
199
200 // vIndex: 2
201 virtual bool shouldCopyWorldForConversion(::std::string const&) const = 0;
202
203 // vIndex: 3
204 virtual void enqueueConvertExportingWorldTasks(
205 ::std::shared_ptr<::FileArchiver::ExportData>&,
206 ::Bedrock::NotNullNonOwnerPtr<::FileArchiver::ProgressReporter>,
208 ::std::function<void(::LevelData&)>
209 ) = 0;
210 // NOLINTEND
211
212 public:
213 // virtual function thunks
214 // NOLINTBEGIN
215
216 // NOLINTEND
217 };
218
220 public:
221 // ImportWorldsResult inner types declare
222 // clang-format off
223 struct ImportWorldResult;
224 // clang-format on
225
226 // ImportWorldsResult inner types define
228 public:
229 // member variables
230 // NOLINTBEGIN
233 // NOLINTEND
234
235 public:
236 // prevent constructor by default
237 ImportWorldResult& operator=(ImportWorldResult const&);
240 };
241
242 public:
243 // member variables
244 // NOLINTBEGIN
247 // NOLINTEND
248
249 public:
250 // prevent constructor by default
251 ImportWorldsResult& operator=(ImportWorldsResult const&);
254 };
255
257 public:
258 // member variables
259 // NOLINTBEGIN
265 // NOLINTEND
266
267 public:
268 // prevent constructor by default
269 EduCloudImportInfo& operator=(EduCloudImportInfo const&);
272
273 public:
274 // member functions
275 // NOLINTBEGIN
277 // NOLINTEND
278
279 public:
280 // destructor thunk
281 // NOLINTBEGIN
282 MCNAPI void $dtor();
283 // NOLINTEND
284 };
285
286public:
287 // member variables
288 // NOLINTBEGIN
303 // NOLINTEND
304
305public:
306 // prevent constructor by default
307 FileArchiver& operator=(FileArchiver const&);
309 FileArchiver();
310
311public:
312 // virtual functions
313 // NOLINTBEGIN
314 // vIndex: 0
315 virtual ~FileArchiver() /*override*/;
316
317 // vIndex: 1
318 virtual ::std::shared_ptr<::FilePickerSettings> generateFilePickerSettings(
319 ::std::vector<::FileArchiver::ExportType> const& types,
320 ::std::string const& worldId
321 ) const;
322 // NOLINTEND
323
324public:
325 // member functions
326 // NOLINTBEGIN
328 ::Scheduler& scheduler,
329 ::ILevelListCache& levelListCache,
330 ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager> const& pathManager,
331 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository> const& resourcePackRepository,
332 bool isEditorModeEnabled,
333 ::std::unique_ptr<::FileArchiver::IWorldConverter> worldConverter,
334 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> keyProvider,
335 ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv> levelDbEnv,
336 ::std::function<void(::std::string const&)> displayMessageFunction
337 );
338
339 MCNAPI void _clearArchiverState();
340
341 MCNAPI void
342 _copyPackToTemp(::PackInstance const& packInstance, ::Core::Path const& tempPath, ::FileArchiver::Result& result);
343
344 MCNAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::FileArchiver::Result>> _enqueueExportWorldTasks(
345 ::Core::Path const& outputFilePath,
346 ::std::string const& worldId,
347 bool isBundle,
348 ::FileArchiver::ExportType exportType,
349 ::FileArchiver::ShowToast showToast,
350 ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<void>> preTaskHandle,
351 ::std::function<void(::FileArchiver::Result&)> cleanupTask,
352 ::std::function<void(::LevelData&)> convertPreExportCallback
353 );
354
355 MCNAPI void _exportLevelFiles(
356 ::Core::Path const& outputFilePath,
357 bool isBundle,
358 ::std::shared_ptr<::FileArchiver::ExportData> exportData
359 );
360
362
364
365 MCNAPI void _printMessage(::std::string const& message);
366
367 MCNAPI ::FileArchiverOutcome
368 _processWorldForTemplate(::std::shared_ptr<::FileArchiver::ExportData> const& exportData);
369
370 MCNAPI void _revertPremiumUpgradePacks(::Core::Path const& filePath);
371
372 MCNAPI ::FileArchiver::Result _tryBeginExportLevel(
373 ::std::string const& levelId,
374 ::Core::Path const& exportFilePath,
375 ::FileArchiver::ShowToast showToast
376 );
377
378 MCNAPI bool _validatePremiumUpgradePacks(::Core::Path const& filePath);
379
380 MCNAPI ::std::string copyLevel(::std::string const& worldId);
381
382 MCNAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::FileArchiver::Result>> exportCurrentEditorLevel(
383 ::Level* level,
384 ::Core::Path const& exportFilePath,
385 ::std::function<void(::LevelData&)> preExportConvertedCallback,
386 ::FileArchiver::ExportType exportType,
387 ::FileArchiver::ShowToast toast
388 );
389
390 MCNAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::FileArchiver::Result>> exportCurrentLevel(
391 ::Level* level,
392 bool isBundle,
393 ::FileArchiver::ExportType exportType,
394 ::Core::Path const& exportFilePath
395 );
396
398 ::Level* level,
399 bool isBundle,
400 ::FileArchiver::ExportType exportType,
401 ::Core::Path const& exportFilePath,
402 ::std::function<void(::FileArchiver::Result&)> exportCallback
403 );
404
405 MCNAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::FileArchiver::Result>>
406 exportPack(::Core::Path const& path, ::Core::Path const& exportFilePath);
407
408 MCNAPI void exportPack(
409 ::Core::Path const& path,
410 ::Core::Path const& exportFilePath,
411 ::std::function<void(::FileArchiver::Result&)> exportCallback
412 );
413
414 MCNAPI ::FileArchiver::State getCurrentState();
415
416 MCNAPI ::Bedrock::NotNullNonOwnerPtr<::FileArchiver::ProgressReporter> getProgressReporter();
417
418 MCNAPI void setWorldConverter(::std::unique_ptr<::FileArchiver::IWorldConverter> worldConverter);
419 // NOLINTEND
420
421public:
422 // static variables
423 // NOLINTBEGIN
424 MCNAPI static ::std::string const& EXTENSION_ADDON();
425
426 MCNAPI static ::std::string const& EXTENSION_EDITOR_ADDON();
427
428 MCNAPI static ::std::string const& EXTENSION_PROJECT();
429
430 MCNAPI static ::std::string const& EXTENSION_RESOURCEPACK();
431
432 MCNAPI static ::std::string const& EXTENSION_TEMPLATE();
433
434 MCNAPI static ::std::string const& EXTENSION_VANILLA();
435
436 MCNAPI static ::std::string const& IMPORT_LOCK_FILE();
437 // NOLINTEND
438
439public:
440 // constructor thunks
441 // NOLINTBEGIN
442 MCNAPI void* $ctor(
443 ::Scheduler& scheduler,
444 ::ILevelListCache& levelListCache,
445 ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager> const& pathManager,
446 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository> const& resourcePackRepository,
447 bool isEditorModeEnabled,
448 ::std::unique_ptr<::FileArchiver::IWorldConverter> worldConverter,
449 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> keyProvider,
450 ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv> levelDbEnv,
451 ::std::function<void(::std::string const&)> displayMessageFunction
452 );
453 // NOLINTEND
454
455public:
456 // destructor thunk
457 // NOLINTBEGIN
458 MCNAPI void $dtor();
459 // NOLINTEND
460
461public:
462 // virtual function thunks
463 // NOLINTBEGIN
464 MCNAPI ::std::shared_ptr<::FilePickerSettings> $generateFilePickerSettings(
465 ::std::vector<::FileArchiver::ExportType> const& types,
466 ::std::string const& worldId
467 ) const;
468 // NOLINTEND
469
470public:
471 // vftables
472 // NOLINTBEGIN
473 MCNAPI static void** $vftable();
474 // NOLINTEND
475};
Definition EnableNonOwnerReferences.h:7
Definition IAsyncResult.h:10
Definition Path.h:17
Definition ZipProgress.h:7
Definition FileArchiver.h:186
Definition FileArchiver.h:134
MCAPI void setProgressMessage(::std::string const &message)
static MCAPI void ** $vftableForZipProgress()
static MCAPI void ** $vftableForEnableNonOwnerReferences()
Definition FileArchiver.h:27
MCAPI::FileArchiver::State getCurrentState()
MCAPI void _printLevelStartMessage()
MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::FileArchiver::Result > > exportCurrentEditorLevel(::Level *level, ::Core::Path const &exportFilePath, ::std::function< void(::LevelData &)> preExportConvertedCallback, ::FileArchiver::ExportType exportType, ::FileArchiver::ShowToast toast)
MCAPI::FileArchiver::Result _tryBeginExportLevel(::std::string const &levelId, ::Core::Path const &exportFilePath, ::FileArchiver::ShowToast showToast)
MCAPI void setWorldConverter(::std::unique_ptr<::FileArchiver::IWorldConverter > worldConverter)
MCAPI::std::string copyLevel(::std::string const &worldId)
MCAPI void _printMessage(::std::string const &message)
MCAPI void _revertPremiumUpgradePacks(::Core::Path const &filePath)
MCAPI FileArchiver(::Scheduler &scheduler, ::ILevelListCache &levelListCache, ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager > const &pathManager, ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository > const &resourcePackRepository, bool isEditorModeEnabled, ::std::unique_ptr<::FileArchiver::IWorldConverter > worldConverter, ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const > keyProvider, ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv > levelDbEnv, ::std::function< void(::std::string const &)> displayMessageFunction)
MCAPI void _printLevelResultMessage(::FileArchiver::Result const &result)
MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::FileArchiver::Result > > exportCurrentLevel(::Level *level, bool isBundle, ::FileArchiver::ExportType exportType, ::Core::Path const &exportFilePath)
MCAPI void _clearArchiverState()
MCAPI void * $ctor(::Scheduler &scheduler, ::ILevelListCache &levelListCache, ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager > const &pathManager, ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository > const &resourcePackRepository, bool isEditorModeEnabled, ::std::unique_ptr<::FileArchiver::IWorldConverter > worldConverter, ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const > keyProvider, ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv > levelDbEnv, ::std::function< void(::std::string const &)> displayMessageFunction)
MCAPI void exportPack(::Core::Path const &path, ::Core::Path const &exportFilePath, ::std::function< void(::FileArchiver::Result &)> exportCallback)
MCAPI::FileArchiverOutcome _processWorldForTemplate(::std::shared_ptr<::FileArchiver::ExportData > const &exportData)
static MCAPI ::std::string const & EXTENSION_TEMPLATE()
static MCAPI ::std::string const & EXTENSION_RESOURCEPACK()
static MCAPI ::std::string const & EXTENSION_PROJECT()
static MCAPI void ** $vftable()
MCAPI bool _validatePremiumUpgradePacks(::Core::Path const &filePath)
MCAPI void _copyPackToTemp(::PackInstance const &packInstance, ::Core::Path const &tempPath, ::FileArchiver::Result &result)
MCAPI void exportCurrentLevel(::Level *level, bool isBundle, ::FileArchiver::ExportType exportType, ::Core::Path const &exportFilePath, ::std::function< void(::FileArchiver::Result &)> exportCallback)
MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::FileArchiver::Result > > _enqueueExportWorldTasks(::Core::Path const &outputFilePath, ::std::string const &worldId, bool isBundle, ::FileArchiver::ExportType exportType, ::FileArchiver::ShowToast showToast, ::std::shared_ptr<::Bedrock::Threading::IAsyncResult< void > > preTaskHandle, ::std::function< void(::FileArchiver::Result &)> cleanupTask, ::std::function< void(::LevelData &)> convertPreExportCallback)
MCAPI ::Bedrock::NotNullNonOwnerPtr<::FileArchiver::ProgressReporter > getProgressReporter()
static MCAPI ::std::string const & EXTENSION_ADDON()
MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::FileArchiver::Result > > exportPack(::Core::Path const &path, ::Core::Path const &exportFilePath)
static MCAPI ::std::string const & EXTENSION_EDITOR_ADDON()
static MCAPI ::std::string const & IMPORT_LOCK_FILE()
MCAPI void _exportLevelFiles(::Core::Path const &outputFilePath, bool isBundle, ::std::shared_ptr<::FileArchiver::ExportData > exportData)
MCAPI ::std::shared_ptr<::FilePickerSettings > $generateFilePickerSettings(::std::vector<::FileArchiver::ExportType > const &types, ::std::string const &worldId) const
static MCAPI ::std::string const & EXTENSION_VANILLA()
MCAPI void $dtor()
Definition FilePickerSettings.h:5
Definition IContentKeyProvider.h:13
Definition ILevelListCache.h:27
Definition IResourcePackRepository.h:33
Definition LevelData.h:49
Definition LevelDbEnv.h:8
Definition Level.h:238
Definition PackInstance.h:23
Definition Path.h:16
Definition Scheduler.h:13
Definition FileArchiver.h:118
Definition FileArchiver.h:256
Definition FileArchiver.h:89
Definition FileArchiver.h:219
Definition FileArchiver.h:60
MCAPI void $dtor()
Definition Alias.h:14