LeviLamina
Loading...
Searching...
No Matches
LevelStorageSource.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#include "mc/platform/Result.h"
11
12// auto generated forward declare list
13// clang-format off
14class ContentIdentity;
16class LevelData;
17class LevelDbEnv;
19class LevelStorage;
21class Scheduler;
22namespace Core { class Path; }
23// clang-format on
24
26public:
27 // virtual functions
28 // NOLINTBEGIN
29 virtual ~LevelStorageSource() /*override*/;
30
31 virtual ::std::string const& getName() const = 0;
32
33 virtual ::Bedrock::Result<bool> getLevelData(::std::string const& levelId, ::LevelData& levelDataOut) const = 0;
34
35 virtual void saveLevelData(::std::string const& levelId, ::LevelData const& data) = 0;
36
37 virtual void getLevelList(::std::vector<::Core::PathBuffer<::std::string>>& paths) = 0;
38
39 virtual ::Bedrock::UniqueOwnerPointer<::LevelStorage> createLevelStorage(
40 ::Scheduler& scheduler,
41 ::std::string const& levelId,
42 ::ContentIdentity const& contentIdentity,
43 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> const& keyProvider,
44 ::std::chrono::nanoseconds const& writeFlushInterval,
45 ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv> levelDbEnv,
46 ::std::unique_ptr<::LevelStorageEventing> levelStorageEventing
47 ) = 0;
48
49 virtual ::std::unique_ptr<::LevelLooseFileStorage> createLevelLooseStorage(
50 ::std::string const& levelId,
51 ::ContentIdentity const& contentIdentity,
52 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> const& keyProvider
53 ) = 0;
54
55 virtual void deleteLevel(::std::string const& levelId) = 0;
56
57 virtual bool renameLevel(::std::string const& levelId, ::std::string const& newLevelName) = 0;
58
59 virtual void
60 renameLevel(::LevelData& levelData, ::Core::Path const& fullPath, ::std::string const& newLevelName) = 0;
61
62 virtual bool createBackupCopyOfWorld(
63 ::std::string const& levelId,
64 ::std::string const& newLeveId,
65 ::std::string const& newName
66 ) = 0;
67
68 virtual bool isLevelMarkedForSync(::Core::Path const& levelPath) const = 0;
69
70 virtual bool isLevelPartiallyCopied(::Core::Path const& levelPath) const = 0;
71
72 virtual ::Core::PathBuffer<::std::string> getLevelDatFoundPath(::Core::Path const& levelPath) const = 0;
73
74 virtual ::Core::PathBuffer<::std::string> const getBasePath() const = 0;
75
76 virtual ::Core::PathBuffer<::std::string> const getPathToLevel(::std::string const& levelId) const = 0;
77
78 virtual ::Core::PathBuffer<::std::string> const getPathToLevelInfo(::std::string const&, bool) const = 0;
79
80 virtual ::std::string getLevelIdFromPath(::Core::Path const& fullPath, ::Core::Path const& worldsPath) const = 0;
81
82 virtual bool isBetaRetailLevel(::std::string const&) const = 0;
83 // NOLINTEND
84
85public:
86 // static variables
87 // NOLINTBEGIN
88 MCNAPI static ::std::chrono::nanoseconds const& WORLD_SAVE_FLUSH_INTERVAL();
89
90 MCNAPI static ::std::chrono::nanoseconds const& WORLD_SAVE_MENU_FLUSH_INTERVAL();
91 // NOLINTEND
92
93public:
94 // destructor thunk
95 // NOLINTBEGIN
96 MCNAPI void $dtor();
97 // NOLINTEND
98
99public:
100 // virtual function thunks
101 // NOLINTBEGIN
102
103 // NOLINTEND
104};
Definition EnableNonOwnerReferences.h:7
Definition ContentIdentity.h:8
Definition PathBuffer.h:8
Definition Path.h:17
Definition IContentKeyProvider.h:13
Definition LevelData.h:52
Definition LevelDbEnv.h:8
Definition LevelLooseFileStorage.h:15
Definition LevelStorageEventing.h:15
Definition LevelStorageSource.h:25
static MCAPI ::std::chrono::nanoseconds const & WORLD_SAVE_FLUSH_INTERVAL()
static MCAPI ::std::chrono::nanoseconds const & WORLD_SAVE_MENU_FLUSH_INTERVAL()
MCAPI void $dtor()
Definition LevelStorage.h:25
Definition Scheduler.h:14