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