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;
13class LevelData;
15class TaskGroup;
16struct LevelSummary;
17namespace Core { class Path; }
18namespace Core { class Result; }
19// clang-format on
20
21namespace ExternalFileLevelStorage {
22// functions
23// NOLINTBEGIN
24MCNAPI ::Core::Result
25_readLevelDataFromFile(::Core::Path const& datFilename, ::std::string const& worldID, ::LevelData& levelData);
26
27MCNAPI bool _writeLevelDat(::Core::Path const& datFilename, ::LevelData const& levelData);
28
29MCNAPI void copyLevelInfoToDiskCache(::Core::Path const& levelRootPath, bool onlyIfNotExisting);
30
31MCNAPI ::std::unique_ptr<::PackAccessStrategy> getAccessStrategy(
32 ::Core::Path const& levelDirectory,
33 ::ContentIdentity const& contentIdentity,
34 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> const& keyProvider
35);
36
37MCNAPI ::std::vector<::std::string> const getImportantFiles();
38
39MCNAPI ::std::string getLevelIDFromPath(::Core::Path const& levelRootPath, ::Core::Path const& worldsPath);
40
41MCNAPI bool isLevelMarkedForSync(::Core::Path const& directory);
42
43MCNAPI void makeReadableLevelnameFile(::Core::Path const& fullPath, ::std::string const& name);
44
45MCNAPI ::Core::Result readLevelDataFromData(::std::string const& dataStr, ::LevelData& levelData);
46
47MCNAPI ::Core::Result readLevelDataFromFile(
48 ::Core::Path const& directory,
49 ::std::string const& levelId,
50 ::LevelData& levelData,
51 ::IMinecraftEventing* eventing
52);
53
54MCNAPI bool readShallowLevelSummaryFromSyncFile(
55 ::Core::Path const& directory,
56 ::std::string const& levelId,
57 ::LevelSummary& summary
58);
59
60MCNAPI bool readSyncFileData(
61 ::Core::Path const& directory,
62 ::std::string& levelName,
63 int64& levelSize,
64 int64& remoteTimestamp,
65 bool& isSyncUsable
66);
67
68MCNAPI void saveLevelData(
69 ::Core::Path const& levelPath,
70 ::std::string const& levelId,
71 ::LevelData const& levelData,
72 bool ignoreCache
73);
74
75MCNAPI void
76saveLevelDataToPath(::Core::Path const& fullPath, ::std::string const& levelId, ::LevelData const& levelData);
77
78MCNAPI void saveLevelDisplayDataToCache(
79 ::std::string const& levelId,
80 ::LevelData const& levelData,
81 ::gsl::not_null<::TaskGroup*> taskGroup
82);
83
84MCNAPI ::Core::Result validateLevelDat(::Core::Path filePath);
85// NOLINTEND
86
87// static variables
88// NOLINTBEGIN
89MCNAPI char const* const& CLOUD_SYNC_LOCK();
90
91MCNAPI char const* const& FN_CORRUPTED_WORLD_MARKER();
92
93MCNAPI char const* const& FN_LEVEL_DAT();
94
95MCNAPI ::std::atomic<bool>& writingToCache();
96// NOLINTEND
97
98} // namespace ExternalFileLevelStorage
Definition ContentIdentity.h:8
Definition Path.h:11
Definition IContentKeyProvider.h:13
Definition IMinecraftEventing.h:147
Definition LevelData.h:49
Definition PackAccessStrategy.h:20
Definition Path.h:16
Definition TaskGroup.h:48
Definition LevelSummary.h:27