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