LeviLamina
Loading...
Searching...
No Matches
ExternalFileLevelStorage.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7
8// auto generated forward declare list
9// clang-format off
10class ContentIdentity;
12class LevelData;
14class TaskGroup;
15struct LevelSummary;
16namespace Core { class Path; }
17namespace Core { class Result; }
18// clang-format on
19
20namespace ExternalFileLevelStorage {
21// functions
22// NOLINTBEGIN
23MCAPI ::Core::Result
24_readLevelDataFromFile(::Core::Path const& datFilename, ::std::string const& worldID, ::LevelData& levelData);
25
26MCAPI bool _writeLevelDat(::Core::Path const& datFilename, ::LevelData const& levelData);
27
28MCAPI void copyLevelInfoToDiskCache(::Core::Path const& levelRootPath, bool onlyIfNotExisting);
29
30MCAPI ::std::unique_ptr<::PackAccessStrategy> getAccessStrategy(
31 ::Core::Path const& levelDirectory,
32 ::ContentIdentity const& contentIdentity,
33 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> const& keyProvider
34);
35
36MCAPI ::std::vector<::std::string> const getImportantFiles();
37
38MCAPI bool isLevelMarkedForSync(::Core::Path const& directory);
39
40MCAPI ::Core::Result readLevelDataFromData(::std::string const& dataStr, ::LevelData& levelData);
41
42MCAPI ::Core::Result
43readLevelDataFromFile(::Core::Path const& directory, ::std::string const& levelId, ::LevelData& levelData);
44
45MCAPI bool readShallowLevelSummaryFromSyncFile(
46 ::Core::Path const& directory,
47 ::std::string const& levelId,
48 ::LevelSummary& summary
49);
50
51MCAPI bool readSyncFileData(
52 ::Core::Path const& directory,
53 ::std::string& levelName,
54 int64& levelSize,
55 int64& remoteTimestamp,
56 bool& isSyncUsable
57);
58
59MCAPI void saveLevelData(
60 ::Core::Path const& levelPath,
61 ::std::string const& levelId,
62 ::LevelData const& levelData,
63 bool ignoreCache
64);
65
66MCAPI void
67saveLevelDataToPath(::Core::Path const& fullPath, ::std::string const& levelData, ::LevelData const& levelId);
68
69MCAPI void saveLevelDisplayDataToCache(
70 ::std::string const& levelId,
71 ::LevelData const& levelData,
72 ::gsl::not_null<::TaskGroup*> taskGroup
73);
74
75MCAPI ::Core::Result validateLevelDat(::Core::Path filePath);
76// NOLINTEND
77
78// static variables
79// NOLINTBEGIN
80MCAPI char const* const& CLOUD_SYNC_LOCK();
81
82MCAPI char const* const& FN_CORRUPTED_WORLD_MARKER();
83
84MCAPI char const* const& FN_LEVEL_DAT();
85
86MCAPI ::std::atomic<bool>& writingToCache();
87// NOLINTEND
88
89} // namespace ExternalFileLevelStorage
Definition ContentIdentity.h:10
Definition Path.h:15
Definition IContentKeyProvider.h:13
Definition LevelData.h:48
Definition PackAccessStrategy.h:20
Definition Path.h:16
Definition Result.h:6
Definition TaskGroup.h:22
Definition LevelSummary.h:27