52 enum class ExportType :
int {
56 PlayableEditorLevel = 3,
60 enum class ShowToast :
int {
65 enum class State :
int {
75 ::ll::TypedStorage<4, 4, ::FileArchiverOutcome> outcome;
76 ::ll::TypedStorage<8, 32, ::std::string> copiedLevelId;
77 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> copiedLevelPath;
97 struct EduCloudImportInfo {
101 ::ll::TypedStorage<1, 1, bool> isCloudImport;
102 ::ll::TypedStorage<1, 1, bool> allowMultiplayer;
103 ::ll::TypedStorage<8, 32, ::std::string> educationOid;
104 ::ll::TypedStorage<8, 32, ::std::string> cTag;
105 ::ll::TypedStorage<8, 32, ::std::string> name;
112 EduCloudImportInfo(EduCloudImportInfo
const&);
113 EduCloudImportInfo();
125 MCAPI ~EduCloudImportInfo();
147 ::ll::TypedStorage<4, 4, ::FileArchiverOutcome> outcome;
148 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> path;
155 ::ll::TypedStorage<4, 4, ::FileArchiverOutcome> outcome;
156 ::ll::TypedStorage<8, 24, ::std::vector<::FileArchiver::ImportWorldsResult::ImportWorldResult>> worlds;
164 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mProgressLock;
165 ::ll::TypedStorage<8, 32, ::std::string> mProgressTitle;
166 ::ll::TypedStorage<8, 32, ::std::string> mProgressMessage;
174 virtual void clear() ;
204 ::ll::TypedStorage<4, 4, ::FileArchiverOutcome> outcome;
205 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> fileName;
206 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> levelId;
207 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> originalLevelId;
227 ::ll::TypedStorage<4, 4, ::FileArchiver::ExportType> mExportType;
228 ::ll::TypedStorage<8, 32, ::std::string> mLevelId;
229 ::ll::TypedStorage<8, 8, uint64> mTotalFileCount;
230 ::ll::TypedStorage<8, 104, ::FileArchiver::Result> mResult;
231 ::ll::TypedStorage<8, 16, ::Bedrock::UniqueOwnerPointer<::LevelStorage>> mLevelStorage;
232 ::ll::TypedStorage<8, 8, ::LevelData*> mLevelData;
252 ::ll::TypedStorage<1, 2, ::std::optional<bool>> mKeepPlayerData;
262 virtual void enqueueConvertImportingWorldTasks(
263 ::std::shared_ptr<::FileArchiver::Result>& sharedResult,
264 ::Bedrock::NotNullNonOwnerPtr<::FileArchiver::ProgressReporter> progress,
268 virtual bool shouldCopyWorldForConversion(::std::string
const& levelId)
const = 0;
270 virtual void enqueueConvertExportingWorldTasks(
271 ::std::shared_ptr<::FileArchiver::ExportData>& exportData,
272 ::Bedrock::NotNullNonOwnerPtr<::FileArchiver::ProgressReporter> progress,
274 ::gsl::not_null<::std::shared_ptr<::FileArchiver::InterventionPublishers>> interventionPublishers,
275 ::std::optional<::FileArchiver::WorldConverterExportSettings>
const exportSetting
286 struct InterventionPublishers {
289 using BeginSignature = void(::FileArchiver::ExportType, ::std::string
const&,
::Core::Path const&);
291 using CleanupSignature = void(::FileArchiver::ExportType);
293 using CopyCompleteSignature =
296 using LevelDataFinalizeSignature = void(::FileArchiver::ExportType,
::LevelData&);
298 using LevelDataMutationSignature = void(::FileArchiver::ExportType,
::LevelData&);
300 using PreFileRemovalSignature =
303 using PrePackageSignature =
313 void(::FileArchiver::ExportType, ::std::string
const&,
::Core::Path const&),
368 MCAPI InterventionPublishers();
383 ::ll::TypedStorage<8, 192, ::FileArchiver::ProgressReporter> mProgress;
384 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mStateLock;
385 ::ll::TypedStorage<4, 4, ::FileArchiver::State> mCurrentState;
386 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager>> mFilePathManager;
387 ::ll::TypedStorage<8, 64, ::std::function<void(::std::string
const&)>> mDisplayMessageCallback;
388 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository>> mResourcePackRepository;
389 ::ll::TypedStorage<8, 8, ::ILevelListCache&> mLevelListCache;
390 ::ll::TypedStorage<8, 8, ::LevelStorageSource&> mLevelStorageSource;
391 ::ll::TypedStorage<8, 24, ::std::vector<::Core::PathBuffer<::std::string>>> mSuccessfullyFiledArchives;
392 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mIOTaskGroup;
393 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::FileArchiver::IWorldConverter>> mWorldConverter;
394 ::ll::TypedStorage<1, 1, bool> mIsEditorModeEnabled;
395 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const>> mKeyProvider;
396 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv>> mLevelDbEnv;
397 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::FileArchiver::EduCloudImportInfo>>
403 FileArchiver& operator=(FileArchiver
const&);
404 FileArchiver(FileArchiver
const&);
410 virtual ~FileArchiver() ;
412 virtual ::std::shared_ptr<::FilePickerSettings>
413 generateFilePickerSettings(::std::vector<::FileArchiver::ExportType>
const& types, ::std::string
const&)
const;
423 ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager>
const& pathManager,
424 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository>
const& resourcePackRepository,
425 bool isEditorModeEnabled,
426 ::std::unique_ptr<::FileArchiver::IWorldConverter> worldConverter,
427 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> keyProvider,
428 ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv> levelDbEnv,
429 ::std::function<
void(::std::string
const&)> displayMessageFunction
432 MCAPI
void _clearArchiverState();
437 MCAPI ::Bedrock::Threading::Async<::FileArchiver::Result> _enqueueExportWorldTasks(
439 ::std::string
const& worldId,
441 ::FileArchiver::ExportType exportType,
442 ::FileArchiver::ShowToast showToast,
444 ::gsl::not_null<::std::shared_ptr<::FileArchiver::InterventionPublishers>> interventionPublishers,
446 ::std::optional<::FileArchiver::WorldConverterExportSettings> exportSetting
449 MCAPI
void _exportLevelFiles(
452 ::std::shared_ptr<::FileArchiver::ExportData> exportData
458 MCAPI
bool _importWorld(
461 ::std::string
const& importLevelId
467 MCAPI
void _printLevelStartMessage();
469 MCAPI
void _printMessage(::std::string
const& message);
471 MCAPI ::FileArchiverOutcome
472 _processWorldForTemplate(::std::shared_ptr<::FileArchiver::ExportData>
const& exportData);
474 MCAPI
void _revertPremiumUpgradePacks(
::Core::Path const& filePath);
477 MCAPI
void _sanitizeWorld(
::Core::Path const& newWorldPath);
480 MCAPI ::FileArchiver::Result _tryBeginExportLevel(
481 ::std::string
const& levelId,
483 ::FileArchiver::ShowToast showToast
486 MCAPI
bool _validatePremiumUpgradePacks(
::Core::Path const& filePath);
488 MCAPI ::std::string copyLevel(::std::string
const& worldId);
491 MCAPI ::Bedrock::Threading::Async<::FileArchiver::CopyWorldResult> copyLevelAsync(::std::string
const& worldId);
494 MCAPI ::Bedrock::Threading::Async<::FileArchiver::Result> exportCurrentEditorLevel(
497 ::gsl::not_null<::std::shared_ptr<::FileArchiver::InterventionPublishers>> interventionPublishers,
498 ::std::optional<::FileArchiver::WorldConverterExportSettings> exportSetting,
499 ::FileArchiver::ExportType exportType,
500 ::FileArchiver::ShowToast toast
503 MCAPI ::Bedrock::Threading::Async<::FileArchiver::Result> exportCurrentLevel(
506 ::FileArchiver::ExportType exportType,
508 ::gsl::not_null<::std::shared_ptr<::FileArchiver::InterventionPublishers>> interventionPublishers
511 MCAPI
void exportCurrentLevel(
514 ::FileArchiver::ExportType exportType,
517 ::gsl::not_null<::std::shared_ptr<::FileArchiver::InterventionPublishers>> interventionPublishers
521 MCAPI ::Bedrock::Threading::Async<::FileArchiver::Result> exportLevel(
522 ::std::string
const& worldId,
524 ::FileArchiver::ExportType exportType,
525 ::FileArchiver::ShowToast showToast,
527 ::gsl::not_null<::std::shared_ptr<::FileArchiver::InterventionPublishers>> interventionPublishers
530 MCAPI
void exportLevel(
531 ::std::string
const& worldId,
533 ::FileArchiver::ExportType exportType,
536 ::FileArchiver::ShowToast showToast,
537 ::gsl::not_null<::std::shared_ptr<::FileArchiver::InterventionPublishers>> interventionPublishers
541 MCAPI ::Bedrock::Threading::Async<::FileArchiver::Result>
544 MCAPI
void exportPack(
550 MCAPI ::FileArchiver::State getCurrentState();
552 MCAPI ::Bedrock::NotNullNonOwnerPtr<::FileArchiver::ProgressReporter> getProgressReporter();
555 MCAPI ::Bedrock::Threading::Async<::FileArchiver::Result> importLevel(
557 bool suppressStartMessage,
558 bool suppressEndMessage,
559 ::std::string
const& levelId
562 MCAPI
void importLevel(
565 bool suppressStartMessage,
566 bool suppressEndMessage,
567 ::std::string
const& levelId
572 MCAPI
void setWorldConverter(::std::unique_ptr<::FileArchiver::IWorldConverter> worldConverter);
579 MCAPI static ::std::string
const& EXTENSION_ADDON();
581 MCAPI static ::std::string
const& EXTENSION_EDITOR_ADDON();
583 MCAPI static ::std::string
const& EXTENSION_PROJECT();
585 MCAPI static ::std::string
const& EXTENSION_RESOURCEPACK();
587 MCAPI static ::std::string
const& EXTENSION_TEMPLATE();
589 MCAPI static ::std::string
const& EXTENSION_VANILLA();
591 MCAPI static ::std::string
const& IMPORT_LOCK_FILE();
601 ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager>
const& pathManager,
602 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository>
const& resourcePackRepository,
603 bool isEditorModeEnabled,
604 ::std::unique_ptr<::FileArchiver::IWorldConverter> worldConverter,
605 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> keyProvider,
606 ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv> levelDbEnv,
607 ::std::function<
void(::std::string
const&)> displayMessageFunction
620 MCAPI ::std::shared_ptr<::FilePickerSettings>
621 $generateFilePickerSettings(::std::vector<::FileArchiver::ExportType>
const& types, ::std::string
const&)
const;