27 enum class StatsType : uint {
42 virtual void addStorageObserver(::std::unique_ptr<::LevelStorageObserver>) = 0;
45 virtual bool loadedSuccessfully()
const;
48 virtual ::std::unique_ptr<::CompoundTag> getCompoundTag(::std::string
const&, ::DBHelpers::Category) = 0;
51 virtual bool hasKey(::std::string_view, ::DBHelpers::Category)
const = 0;
55 forEachKeyWithPrefix(::std::string_view, ::DBHelpers::Category, ::std::function<
void(::std::string_view, ::std::string_view)>
const&)
62 virtual ::std::unique_ptr<::ChunkSource> createChunkStorage(::std::unique_ptr<::ChunkSource>, ::StorageVersion) = 0;
68 virtual ::Core::PathBuffer<::std::string>
const& getFullPath()
const = 0;
71 virtual ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<void>>
72 saveData(::std::string
const&, ::std::string&&, ::DBHelpers::Category) = 0;
78 virtual ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<void>>
79 deleteData(::std::string
const&, ::DBHelpers::Category) = 0;
82 virtual void getStatistics(::std::string&, ::LevelStorage::StatsType)
const = 0;
85 virtual bool clonePlayerData(::std::string_view fromKey, ::std::string_view toKey);
88 virtual ::Core::LevelStorageResult getLevelStorageState()
const = 0;
91 virtual void startShutdown() = 0;
94 virtual bool isShuttingDown()
const = 0;
97 virtual bool checkShutdownDone() = 0;
100 virtual bool loadData(::std::string_view key, ::std::string&
buffer, ::DBHelpers::Category category)
const;
103 virtual ::Core::LevelStorageResult getState()
const = 0;
106 virtual ::std::vector<::SnapshotFilenameAndLength> createSnapshot(::std::string
const&,
bool) = 0;
109 virtual void releaseSnapshot() = 0;
112 virtual ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<void>> compactStorage() = 0;
115 virtual void syncAndSuspendStorage() = 0;
118 virtual void resumeStorage() = 0;
121 virtual void setFlushAllowed(
bool) = 0;
124 virtual void flushToPermanentStorage() = 0;
127 virtual void freeCaches();
130 virtual void setCompactionCallback(::std::function<
void(::CompactionStatus)>) = 0;
133 virtual void setCriticalSyncSaveCallback(::std::function<
void()>) = 0;
136 virtual void corruptLevel();
142 MCAPI ::std::string getServerId(
::Player const& client,
bool isXboxLive);
144 MCAPI ::std::vector<::std::string> loadAllPlayerIDs(
bool includeLocalPlayer)
const;
146 MCAPI ::std::unique_ptr<::CompoundTag> loadServerPlayerData(
::Player const& client,
bool isXboxLive);
150 MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<void>>
151 saveData(::std::string
const& key,
::CompoundTag const& tag, ::DBHelpers::Category category);
157 MCAPI static ::std::string
const& LEGACY_CONSOLE_PLAYER_PREFIX();
159 MCAPI static ::std::string
const& LOCAL_PLAYER_TAG();
171 MCFOLD
bool $loadedSuccessfully()
const;
173 MCAPI
bool $clonePlayerData(::std::string_view fromKey, ::std::string_view toKey);
175 MCFOLD
bool $loadData(::std::string_view key, ::std::string&
buffer, ::DBHelpers::Category category)
const;
177 MCFOLD
void $freeCaches();
179 MCFOLD
void $corruptLevel();
185 MCAPI
static void** $vftable();