LeviLamina
Loading...
Searching...
No Matches
ILevelListCache.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/EnableNonOwnerReferences.h"
8#include "mc/deps/core/utility/NonOwnerPointer.h"
9#include "mc/deps/core/utility/UniqueOwnerPointer.h"
10
11// auto generated forward declare list
12// clang-format off
13class ContentIdentity;
15class LevelData;
16class LevelDbEnv;
19class LevelStorage;
22class Scheduler;
23struct LevelSummary;
24namespace Core { class Path; }
25// clang-format on
26
28public:
29 // virtual functions
30 // NOLINTBEGIN
31 virtual ~ILevelListCache() /*override*/ = default;
32
33 virtual void addLevel(::std::string const& levelId, ::LevelData&& levelData) = 0;
34
35 virtual void deleteLevel(::std::string const& levelId) = 0;
36
37 virtual void refreshLevel(::std::string const& levelId) = 0;
38
39 virtual void ensureLevelInitialized(::std::string const& levelId) = 0;
40
41 virtual void deleteLevelFiles(::std::string const& levelId) = 0;
42
43 virtual void postDeleteLevel(::std::string const& levelId) = 0;
44
45 virtual void renameLevel(::std::string const& levelId, ::std::string const& newLevelName) = 0;
46
47 virtual void renameAndSaveLevelData(
48 ::std::string const& levelId,
49 ::std::string const& newLevelName,
50 ::LevelData const& levelData
51 ) = 0;
52
53 virtual void saveLevelData(::std::string const& levelId, ::LevelData const& levelData) = 0;
54
55 virtual void createBackupCopyOfWorld(
56 ::std::string const& levelId,
57 ::std::string const& newLevelId,
58 ::std::string const& newName
59 ) = 0;
60
61 virtual bool hasLevelWithId(::std::string const& levelId) = 0;
62
63 virtual ::std::string getLevelIdFromPath(::Core::Path const& fullPath, ::Core::Path const& worldsPath) = 0;
64
65 virtual bool checkIfLevelIsCorruptOrMissing(::std::string const& levelId) = 0;
66
67 virtual void addObserver(::LevelListCacheObserver& observer) = 0;
68
69 virtual void removeObserver(::LevelListCacheObserver& observer) = 0;
70
71 virtual ::Bedrock::UniqueOwnerPointer<::LevelStorage> createLevelStorage(
72 ::Scheduler& scheduler,
73 ::std::string const& levelId,
74 ::ContentIdentity const& contentIdentity,
75 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> const& keyProvider,
76 ::std::chrono::nanoseconds const& writeFlushInterval,
77 ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv> levelDbEnv,
78 ::std::unique_ptr<::LevelStorageEventing> levelStorageEventing
79 ) = 0;
80
81 virtual ::std::unique_ptr<::LevelLooseFileStorage> createLevelLooseStorage(
82 ::std::string const& levelId,
83 ::ContentIdentity const& contentIdentity,
84 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> const& keyProvider
85 ) = 0;
86
87 virtual ::LevelSummary* getLevelSummary(::std::string const& levelId) = 0;
88
89 virtual ::LevelSummary const* getLevelSummaryByName(::std::string const& levelName) = 0;
90
91 virtual ::LevelSummary* getOrCreateLevelSummary(::Core::Path const& directory) = 0;
92
93 virtual ::LevelData* getLevelData(::std::string const& levelId) = 0;
94
95 virtual ::Bedrock::NonOwnerPointer<::LevelData> getLevelDataNonOwnerPointer(::std::string const& levelId) = 0;
96
97 virtual ::LevelSummary* getShallowLevelSummary(::std::string const& levelId) = 0;
98
99 virtual void getLevelList(
100 ::std::vector<::LevelSummary>& dest,
101 bool includeShallowSummaries,
102 bool includePartiallyCopiedLevels,
103 bool includeBetaRetailLevels,
104 bool includeInvalidLevelDataLevels
105 ) = 0;
106
107 virtual bool hasCachedLevels(bool includeShallowSummaries) const = 0;
108
109 virtual void updateLevelCache(::std::string const& levelId) = 0;
110
111 virtual ::std::unique_ptr<::LevelStorageObserver> createLevelStorageObserver() = 0;
112
113 virtual void onSave(::std::string const& levelId) = 0;
114
115 virtual void onStorageChanged() = 0;
116
117 virtual ::Core::PathBuffer<::std::string> const getBasePath() const = 0;
118
119 virtual ::Core::PathBuffer<::std::string> const getPathToLevel(::std::string const& levelId) const = 0;
120 // NOLINTEND
121};
Definition EnableNonOwnerReferences.h:7
Definition ContentIdentity.h:8
Definition Path.h:11
Definition IContentKeyProvider.h:13
Definition ILevelListCache.h:27
Definition LevelData.h:55
Definition LevelDbEnv.h:8
Definition LevelListCacheObserver.h:13
Definition LevelLooseFileStorage.h:15
Definition LevelStorageEventing.h:16
Definition LevelStorageObserver.h:5
Definition LevelStorage.h:25
Definition Scheduler.h:14
Definition LevelSummary.h:30