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/file/PathBuffer.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8#include "mc/platform/Result.h"
9
10// auto generated forward declare list
11// clang-format off
12class ContentIdentity;
15class LevelData;
17class TaskGroup;
18struct LevelSummary;
19namespace Core { class Path; }
20namespace Core { class Result; }
21// clang-format on
22
23namespace ExternalFileLevelStorage {
24// functions
25// NOLINTBEGIN
26MCNAPI ::Bedrock::Result<void>
27_readLevelDataFromFile(::Core::Path const& datFilename, ::std::string const& worldID, ::LevelData& 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_C ::Bedrock::Result<bool>
48readLevelDataFromFile(::Core::Path const& directory, ::std::string const& levelId, ::LevelData& levelData);
49
50MCNAPI ::Bedrock::Result<bool> readLevelDataFromFile(
51 ::Core::Path const& directory,
52 ::std::string const& levelId,
53 ::LevelData& levelData,
54 ::IMinecraftEventing* eventing
55);
56
57MCNAPI bool readShallowLevelSummaryFromSyncFile(
58 ::Core::Path const& directory,
59 ::std::string const& levelId,
60 ::LevelSummary& summary
61);
62
63MCNAPI void saveLevelData(
64 ::Core::Path const& levelPath,
65 ::std::string const& levelId,
66 ::LevelData const& levelData,
67 bool ignoreCache
68);
69
70MCNAPI void
71saveLevelDataToPath(::Core::Path const& fullPath, ::std::string const& levelId, ::LevelData const& levelData);
72
73MCNAPI void saveLevelDisplayDataToCache(
74 ::std::string const& levelId,
75 ::LevelData const& levelData,
76 ::gsl::not_null<::TaskGroup*> taskGroup
77);
78
79MCNAPI_C void syncLevelInfoCache(::std::unordered_set<::Core::PathBuffer<::std::string>> const& levelRootPaths);
80
81MCNAPI ::Core::Result validateLevelDat(::Core::Path filePath);
82// NOLINTEND
83
84// static variables
85// NOLINTBEGIN
86MCNAPI char const* const& CLOUD_SYNC_LOCK();
87
88MCNAPI char const* const& FN_CORRUPTED_WORLD_MARKER();
89
90MCNAPI char const* const& FN_LEVEL_DAT();
91
92MCNAPI ::std::atomic<bool>& writingToCache();
93// NOLINTEND
94
95} // namespace ExternalFileLevelStorage
Definition ContentIdentity.h:8
Definition Path.h:10
Definition Result.h:11
Definition IContentKeyProvider.h:13
Definition IMinecraftEventing.h:137
Definition LevelData.h:50
Definition PackAccessStrategy.h:21
Definition TaskGroup.h:53
Definition LevelSummary.h:30