3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/deps/core/file/PathBuffer.h"
7#include "mc/deps/core/minecraft/threading/EnableQueueForMainThread.h"
8#include "mc/deps/core/utility/NonOwnerPointer.h"
9#include "mc/deps/core/utility/UniqueOwnerPointer.h"
10#include "mc/platform/threading/LockGuard.h"
11#include "mc/world/level/storage/ILevelListCache.h"
29namespace Core {
class Path; }
59 virtual void addLevel(::std::string
const& levelId,
::LevelData&& levelData) ;
62 virtual void deleteLevel(::std::string
const& levelId) ;
65 virtual void refreshLevel(::std::string
const& levelId) ;
68 virtual void deleteLevelFiles(::std::string
const& levelId) ;
71 virtual void postDeleteLevel(::std::string
const& levelId) ;
74 virtual void renameLevel(::std::string
const& levelId, ::std::string
const& newLevelName) ;
77 virtual void renameAndSaveLevelData(
78 ::std::string
const& levelId,
79 ::std::string
const& newLevelName,
84 virtual void saveLevelData(::std::string
const& levelId,
::LevelData const& levelData) ;
87 virtual void createBackupCopyOfWorld(
88 ::std::string
const& levelId,
89 ::std::string
const& newLevelId,
90 ::std::string
const& newName
94 virtual bool hasLevelWithId(::std::string
const& levelId) ;
97 virtual bool checkIfLevelIsCorruptOrMissing(::std::string
const& levelId) ;
106 virtual ::Bedrock::UniqueOwnerPointer<::LevelStorage> createLevelStorage(
108 ::std::string
const& levelId,
110 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const>
const& keyProvider,
111 ::std::chrono::nanoseconds
const& writeFlushInterval,
112 ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv> levelDbEnv,
113 ::std::unique_ptr<::LevelStorageEventing> levelStorageEventing
117 virtual ::std::unique_ptr<::LevelLooseFileStorage> createLevelLooseStorage(
118 ::std::string
const& levelId,
120 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const>
const& keyProvider
124 virtual ::LevelSummary* getLevelSummary(::std::string
const& levelId) ;
127 virtual ::LevelSummary
const* getLevelSummaryByName(::std::string
const& levelName) ;
130 virtual ::LevelSummary* getOrCreateLevelSummary(
::Core::Path const& directory) ;
133 virtual ::LevelData* getLevelData(::std::string
const& levelId) ;
136 virtual ::Bedrock::NonOwnerPointer<::LevelData>
137 getLevelDataNonOwnerPointer(::std::string
const& levelId) ;
140 virtual ::LevelSummary* getShallowLevelSummary(::std::string
const& levelId) ;
143 virtual void getLevelList(
144 ::std::vector<::LevelSummary>& dest,
145 bool includeShallowSummaries,
146 bool includePartiallyCopiedLevels,
147 bool includeBetaRetailLevels
151 virtual bool hasCachedLevels(
bool includeShallowSummaries)
const ;
154 virtual void updateLevelCache(::std::string
const& levelId) ;
157 virtual ::std::unique_ptr<::LevelStorageObserver> createLevelStorageObserver() ;
160 virtual void onSave(::std::string
const& levelId) ;
163 virtual void onStorageChanged() ;
166 virtual ::Core::PathBuffer<::std::string>
const getBasePath()
const ;
174 ::Bedrock::NotNullNonOwnerPtr<::AppPlatform const> appPlatform,
175 ::std::function<
bool()>&& checkIsSafeToFlushCache
198 ::Bedrock::NotNullNonOwnerPtr<::AppPlatform const> appPlatform,
199 ::std::function<
bool()>&& checkIsSafeToFlushCache
222 MCNAPI
void $renameLevel(::std::string
const& levelId, ::std::string
const& newLevelName);
225 ::std::string
const& levelId,
226 ::std::string
const& newLevelName,
233 ::std::string
const& levelId,
234 ::std::string
const& newLevelId,
235 ::std::string
const& newName
248 ::std::string
const& levelId,
250 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const>
const& keyProvider,
251 ::std::chrono::nanoseconds
const& writeFlushInterval,
252 ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv> levelDbEnv,
253 ::std::unique_ptr<::LevelStorageEventing> levelStorageEventing
257 ::std::string
const& levelId,
259 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const>
const& keyProvider
275 ::std::vector<::LevelSummary>& dest,
276 bool includeShallowSummaries,
277 bool includePartiallyCopiedLevels,
278 bool includeBetaRetailLevels
287 MCNAPI
void $onSave(::std::string
const& levelId);
Definition EnableQueueForMainThread.h:10
Definition ContentIdentity.h:8
Definition IContentKeyProvider.h:13
Definition ILevelListCache.h:27
Definition LevelCache.h:5
Definition LevelData.h:49
Definition LevelDbEnv.h:8
Definition LevelListCacheObserver.h:13
Definition LevelListCache.h:32
static MCAPI void ** $vftableForEnableQueueForMainThread()
MCAPI void $deleteLevel(::std::string const &levelId)
MCAPI bool $hasLevelWithId(::std::string const &levelId)
MCAPI void $renameLevel(::std::string const &levelId, ::std::string const &newLevelName)
static MCAPI void ** $vftableForILevelListCache()
MCAPI void $removeObserver(::LevelListCacheObserver &observer)
MCAPI::LevelCache * _addOrReplaceCache(::Core::Path const &path)
MCAPI::LevelSummary const * $getLevelSummaryByName(::std::string const &levelName)
MCAPI void $onSave(::std::string const &levelId)
MCAPI::LevelSummary * $getLevelSummary(::std::string const &levelId)
MCAPI::LevelSummary * _getLevelSummary(::std::string const &levelId)
MCAPI void $refreshLevel(::std::string const &levelId)
MCAPI LevelListCache(::LevelStorageSource &levelStorageSource, ::Bedrock::NotNullNonOwnerPtr<::AppPlatform const > appPlatform, ::std::function< bool()> &&checkIsSafeToFlushCache)
MCAPI ::Bedrock::NonOwnerPointer<::LevelData > $getLevelDataNonOwnerPointer(::std::string const &levelId)
MCAPI ::Core::PathBuffer<::std::string > const $getBasePath() const
MCAPI::LevelCache * _createAndAddToCache(::std::string const &levelId, ::Core::Path const &directory)
MCAPI::LevelCache * _addToCache(::Core::Path const &path)
MCAPI bool $hasCachedLevels(bool includeShallowSummaries) const
MCAPI void $addLevel(::std::string const &levelId, ::LevelData &&levelData)
MCAPI::LevelCache * _addToCache(::std::string const &levelId, ::LevelCache &&levelCache)
MCAPI void $addObserver(::LevelListCacheObserver &observer)
MCAPI void $renameAndSaveLevelData(::std::string const &levelId, ::std::string const &newLevelName, ::LevelData const &levelData)
MCAPI void $deleteLevelFiles(::std::string const &levelId)
MCAPI void $saveLevelData(::std::string const &levelId, ::LevelData const &levelData)
MCAPI bool $checkIfLevelIsCorruptOrMissing(::std::string const &levelId)
MCAPI void $createBackupCopyOfWorld(::std::string const &levelId, ::std::string const &newLevelId, ::std::string const &newName)
MCAPI ::std::unique_ptr<::LevelLooseFileStorage > $createLevelLooseStorage(::std::string const &levelId, ::ContentIdentity const &contentIdentity, ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const > const &keyProvider)
MCAPI::LevelSummary * $getShallowLevelSummary(::std::string const &levelId)
MCAPI void $updateLevelCache(::std::string const &levelId)
MCAPI void $getLevelList(::std::vector<::LevelSummary > &dest, bool includeShallowSummaries, bool includePartiallyCopiedLevels, bool includeBetaRetailLevels)
MCAPI::LevelSummary * $getOrCreateLevelSummary(::Core::Path const &directory)
MCAPI void _refreshSummary(::std::string const &levelId, ::LevelCache &cache)
MCAPI void _notifyLevelUpdated(::std::string const &levelId)
MCAPI void * $ctor(::LevelStorageSource &levelStorageSource, ::Bedrock::NotNullNonOwnerPtr<::AppPlatform const > appPlatform, ::std::function< bool()> &&checkIsSafeToFlushCache)
MCAPI void $onStorageChanged()
MCAPI void $postDeleteLevel(::std::string const &levelId)
MCAPI::LevelData * $getLevelData(::std::string const &levelId)
MCAPI ::Bedrock::UniqueOwnerPointer<::LevelStorage > $createLevelStorage(::Scheduler &scheduler, ::std::string const &levelId, ::ContentIdentity const &contentIdentity, ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const > const &keyProvider, ::std::chrono::nanoseconds const &writeFlushInterval, ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv > levelDbEnv, ::std::unique_ptr<::LevelStorageEventing > levelStorageEventing)
MCAPI ::std::unique_ptr<::LevelStorageObserver > $createLevelStorageObserver()
Definition LevelLooseFileStorage.h:15
Definition LevelStorageEventing.h:15
Definition LevelStorageObserver.h:5
Definition LevelStorageSource.h:25
Definition LevelStorage.h:25
Definition Scheduler.h:13
Definition LevelSummary.h:27