52 enum class ExportType :
int {
56 PlayableEditorLevel = 3,
60 enum class ShowToast :
int {
65 enum class State :
int {
71 struct CopyWorldResult {
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;
84 CopyWorldResult& operator=(CopyWorldResult
const&);
94 MCAPI ~CopyWorldResult();
115 struct EduCloudImportInfo {
119 ::ll::TypedStorage<1, 1, bool> isCloudImport;
120 ::ll::TypedStorage<1, 1, bool> allowMultiplayer;
121 ::ll::TypedStorage<8, 32, ::std::string> educationOid;
122 ::ll::TypedStorage<8, 32, ::std::string> cTag;
123 ::ll::TypedStorage<8, 32, ::std::string> name;
130 EduCloudImportInfo(EduCloudImportInfo
const&);
137 MCAPI EduCloudImportInfo();
144 MCAPI ~EduCloudImportInfo();
174 ::ll::TypedStorage<4, 4, ::FileArchiverOutcome> outcome;
175 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> path;
198 ::ll::TypedStorage<4, 4, ::FileArchiverOutcome> outcome;
199 ::ll::TypedStorage<8, 24, ::std::vector<::FileArchiver::ImportWorldsResult::ImportWorldResult>> worlds;
207 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mProgressLock;
208 ::ll::TypedStorage<8, 32, ::std::string> mProgressTitle;
209 ::ll::TypedStorage<8, 32, ::std::string> mProgressMessage;
215 virtual ~ProgressReporter() ;
217 virtual void clear() ;
223 MCAPI ProgressReporter();
226 MCAPI ::std::string getProgressMessage();
228 MCAPI
float getProgressPercentage()
const;
230 MCAPI ::std::string getProgressTitle();
233 MCAPI
void setProgressMessage(::std::string
const& message);
235 MCAPI
void setProgressTitle(::std::string
const& title);
271 ::ll::TypedStorage<4, 4, ::FileArchiverOutcome> outcome;
272 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> fileName;
273 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> levelId;
274 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> originalLevelId;
279 Result& operator=(Result
const&);
307 ::ll::TypedStorage<4, 4, ::FileArchiver::ExportType> mExportType;
308 ::ll::TypedStorage<8, 32, ::std::string> mLevelId;
309 ::ll::TypedStorage<8, 8, uint64> mTotalFileCount;
310 ::ll::TypedStorage<8, 104, ::FileArchiver::Result> mResult;
311 ::ll::TypedStorage<8, 16, ::Bedrock::UniqueOwnerPointer<::LevelStorage>> mLevelStorage;
312 ::ll::TypedStorage<8, 8, ::LevelData*> mLevelData;
320 ::ll::TypedStorage<1, 2, ::std::optional<bool>> mKeepPlayerData;
330 virtual void enqueueConvertImportingWorldTasks(
331 ::std::shared_ptr<::FileArchiver::Result>& sharedResult,
332 ::Bedrock::NotNullNonOwnerPtr<::FileArchiver::ProgressReporter> progress,
336 virtual bool shouldCopyWorldForConversion(::std::string
const& levelId)
const = 0;
338 virtual void enqueueConvertExportingWorldTasks(
339 ::std::shared_ptr<::FileArchiver::ExportData>& exportData,
340 ::Bedrock::NotNullNonOwnerPtr<::FileArchiver::ProgressReporter> progress,
342 ::gsl::not_null<::std::shared_ptr<::FileArchiver::InterventionPublishers>> interventionPublishers,
343 ::std::optional<::FileArchiver::WorldConverterExportSettings>
const exportSetting
354 struct InterventionPublishers {
357 using BeginSignature = void(::FileArchiver::ExportType, ::std::string
const&,
::Core::Path const&);
359 using CleanupSignature = void(::FileArchiver::ExportType);
361 using CopyCompleteSignature =
364 using LevelDataFinalizeSignature = void(::FileArchiver::ExportType,
::LevelData&);
366 using LevelDataMutationSignature = void(::FileArchiver::ExportType,
::LevelData&);
368 using PreFileRemovalSignature =
371 using PrePackageSignature =
381 void(::FileArchiver::ExportType, ::std::string
const&,
::Core::Path const&),
436 MCAPI InterventionPublishers();
451 ::ll::TypedStorage<8, 192, ::FileArchiver::ProgressReporter> mProgress;
452 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mStateLock;
453 ::ll::TypedStorage<4, 4, ::FileArchiver::State> mCurrentState;
454 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager>> mFilePathManager;
455 ::ll::TypedStorage<8, 64, ::std::function<void(::std::string
const&)>> mDisplayMessageCallback;
456 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository>> mResourcePackRepository;
457 ::ll::TypedStorage<8, 8, ::ILevelListCache&> mLevelListCache;
458 ::ll::TypedStorage<8, 8, ::LevelStorageSource&> mLevelStorageSource;
459 ::ll::TypedStorage<8, 24, ::std::vector<::Core::PathBuffer<::std::string>>> mSuccessfullyFiledArchives;
460 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mIOTaskGroup;
461 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::FileArchiver::IWorldConverter>> mWorldConverter;
462 ::ll::TypedStorage<1, 1, bool> mIsEditorModeEnabled;
463 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const>> mKeyProvider;
464 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv>> mLevelDbEnv;
465 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::FileArchiver::EduCloudImportInfo>>
471 FileArchiver& operator=(FileArchiver
const&);
472 FileArchiver(FileArchiver
const&);
478 virtual ~FileArchiver() ;
480 virtual ::std::shared_ptr<::FilePickerSettings>
481 generateFilePickerSettings(::std::vector<::FileArchiver::ExportType>
const& types, ::std::string
const&)
const;
491 ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager>
const& pathManager,
492 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository>
const& resourcePackRepository,
493 bool isEditorModeEnabled,
494 ::std::unique_ptr<::FileArchiver::IWorldConverter> worldConverter,
495 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> keyProvider,
496 ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv> levelDbEnv,
497 ::std::function<
void(::std::string
const&)> displayMessageFunction
500 MCAPI
void _clearArchiverState();
505 MCAPI ::Bedrock::Threading::Async<::FileArchiver::Result> _enqueueExportWorldTasks(
507 ::std::string
const& worldId,
509 ::FileArchiver::ExportType exportType,
510 ::FileArchiver::ShowToast showToast,
512 ::gsl::not_null<::std::shared_ptr<::FileArchiver::InterventionPublishers>> interventionPublishers,
514 ::std::optional<::FileArchiver::WorldConverterExportSettings> exportSetting
517 MCAPI
void _exportLevelFiles(
520 ::std::shared_ptr<::FileArchiver::ExportData> exportData
526 MCAPI
bool _importWorld(
529 ::std::string
const& importLevelId
535 MCAPI
void _printLevelStartMessage();
537 MCAPI
void _printMessage(::std::string
const& message);
539 MCAPI ::FileArchiverOutcome
540 _processWorldForTemplate(::std::shared_ptr<::FileArchiver::ExportData>
const& exportData);
542 MCAPI
void _revertPremiumUpgradePacks(
::Core::Path const& filePath);
545 MCAPI
void _sanitizeWorld(
::Core::Path const& newWorldPath);
548 MCAPI ::FileArchiver::Result _tryBeginExportLevel(
549 ::std::string
const& levelId,
551 ::FileArchiver::ShowToast showToast
554 MCAPI
bool _validatePremiumUpgradePacks(
::Core::Path const& filePath);
556 MCAPI ::std::string copyLevel(::std::string
const& worldId);
559 MCAPI ::Bedrock::Threading::Async<::FileArchiver::CopyWorldResult> copyLevelAsync(::std::string
const& worldId);
561 MCAPI
void eraseEduCloudImportInfo(::std::string
const& worldId);
564 MCAPI ::Bedrock::Threading::Async<::FileArchiver::Result> exportCurrentEditorLevel(
567 ::gsl::not_null<::std::shared_ptr<::FileArchiver::InterventionPublishers>> interventionPublishers,
568 ::std::optional<::FileArchiver::WorldConverterExportSettings> exportSetting,
569 ::FileArchiver::ExportType exportType,
570 ::FileArchiver::ShowToast toast
573 MCAPI ::Bedrock::Threading::Async<::FileArchiver::Result> exportCurrentLevel(
576 ::FileArchiver::ExportType exportType,
578 ::gsl::not_null<::std::shared_ptr<::FileArchiver::InterventionPublishers>> interventionPublishers
581 MCAPI
void exportCurrentLevel(
584 ::FileArchiver::ExportType exportType,
587 ::gsl::not_null<::std::shared_ptr<::FileArchiver::InterventionPublishers>> interventionPublishers
591 MCAPI ::Bedrock::Threading::Async<::FileArchiver::Result> exportLevel(
592 ::std::string
const& worldId,
594 ::FileArchiver::ExportType exportType,
595 ::FileArchiver::ShowToast showToast,
597 ::gsl::not_null<::std::shared_ptr<::FileArchiver::InterventionPublishers>> interventionPublishers
600 MCAPI
void exportLevel(
601 ::std::string
const& worldId,
603 ::FileArchiver::ExportType exportType,
606 ::FileArchiver::ShowToast showToast,
607 ::gsl::not_null<::std::shared_ptr<::FileArchiver::InterventionPublishers>> interventionPublishers
611 MCAPI ::Bedrock::Threading::Async<::FileArchiver::Result>
614 MCAPI
void exportPack(
620 MCAPI ::FileArchiver::State getCurrentState();
623 MCAPI ::Bedrock::NotNullNonOwnerPtr<::FileArchiver::ProgressReporter> getProgressReporter();
625 MCAPI ::Bedrock::Threading::Async<::FileArchiver::Result> importLevel(
627 bool suppressStartMessage,
628 bool suppressEndMessage,
629 ::std::string
const& levelId
632 MCAPI
void importLevel(
635 bool suppressStartMessage,
636 bool suppressEndMessage,
637 ::std::string
const& levelId
640 MCAPI ::Bedrock::Threading::Async<::FileArchiver::ImportWorldsResult>
643 MCAPI
void setEduCloudImportInfo(
644 ::std::string
const& worldId,
645 ::std::string
const& cTag,
646 ::std::string
const& name,
647 ::std::string
const& oid,
648 bool allowMultiplayer
657 MCAPI static ::std::error_code make_error_code(::FileArchiverOutcome error);
664 MCAPI static ::std::string
const& EXTENSION_ADDON();
666 MCAPI static ::std::string
const& EXTENSION_PROJECT();
668 MCAPI static ::std::string
const& EXTENSION_RESOURCEPACK();
670 MCAPI static ::std::string
const& EXTENSION_TEMPLATE();
672 MCAPI static ::std::string
const& EXTENSION_VANILLA();
674 MCAPI static ::std::string
const& IMPORT_LOCK_FILE();
684 ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager>
const& pathManager,
685 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository>
const& resourcePackRepository,
686 bool isEditorModeEnabled,
687 ::std::unique_ptr<::FileArchiver::IWorldConverter> worldConverter,
688 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> keyProvider,
689 ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv> levelDbEnv,
690 ::std::function<
void(::std::string
const&)> displayMessageFunction
703 MCAPI ::std::shared_ptr<::FilePickerSettings>
704 $generateFilePickerSettings(::std::vector<::FileArchiver::ExportType>
const& types, ::std::string
const&)
const;