LeviLamina
Loading...
Searching...
No Matches
ExternalFileLevelStorageSource.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/deps/core/utility/UniqueOwnerPointer.h"
9#include "mc/platform/Result.h"
10#include "mc/world/level/storage/LevelStorageSource.h"
11
12// auto generated forward declare list
13// clang-format off
14class ContentIdentity;
16class LevelData;
17class LevelDbEnv;
19class LevelStorage;
22class Scheduler;
23namespace Core { class FilePathManager; }
24namespace Core { class Path; }
25// clang-format on
26
27class ExternalFileLevelStorageSource : public ::LevelStorageSource {
28public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::SaveTransactionManager>> mSaveTransactionManager;
32 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager>> mFilePathManager;
33 // NOLINTEND
34
35public:
36 // prevent constructor by default
37 ExternalFileLevelStorageSource();
38
39public:
40 // virtual functions
41 // NOLINTBEGIN
42 virtual ~ExternalFileLevelStorageSource() /*override*/;
43
44 virtual ::std::string const& getName() const /*override*/;
45
46 virtual ::Bedrock::UniqueOwnerPointer<::LevelStorage> createLevelStorage(
47 ::Scheduler& scheduler,
48 ::std::string const& levelId,
49 ::ContentIdentity const& contentIdentity,
50 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> const& keyProvider,
51 ::std::chrono::nanoseconds const& writeFlushInterval,
52 ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv> levelDbEnv,
53 ::std::unique_ptr<::LevelStorageEventing> levelStorageEventing
54 ) /*override*/;
55
56 virtual ::std::unique_ptr<::LevelLooseFileStorage> createLevelLooseStorage(
57 ::std::string const& levelId,
58 ::ContentIdentity const& contentIdentity,
59 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> const& keyProvider
60 ) /*override*/;
61
62 virtual ::Bedrock::Result<bool> getLevelData(::std::string const& levelId, ::LevelData& levelDataOut) const
63 /*override*/;
64
65 virtual void saveLevelData(::std::string const& levelId, ::LevelData const& data) /*override*/;
66
67 virtual void getLevelList(::std::vector<::Core::PathBuffer<::std::string>>& paths) /*override*/;
68
69 virtual void deleteLevel(::std::string const& levelId) /*override*/;
70
71 virtual bool renameLevel(::std::string const& levelId, ::std::string const& newLevelName) /*override*/;
72
73 virtual void
74 renameLevel(::LevelData& levelData, ::Core::Path const& fullPath, ::std::string const& newLevelName) /*override*/;
75
76 virtual bool createBackupCopyOfWorld(
77 ::std::string const& levelId,
78 ::std::string const& newLeveId,
79 ::std::string const& newName
80 ) /*override*/;
81
82 virtual bool isLevelMarkedForSync(::Core::Path const& levelPath) const /*override*/;
83
84 virtual bool isLevelPartiallyCopied(::Core::Path const& levelPath) const /*override*/;
85
86 virtual ::Core::PathBuffer<::std::string> getLevelDatFoundPath(::Core::Path const& levelPath) const /*override*/;
87
88 virtual ::Core::PathBuffer<::std::string> const getBasePath() const /*override*/;
89
90 virtual ::Core::PathBuffer<::std::string> const getPathToLevel(::std::string const& levelId) const /*override*/;
91
92 virtual ::Core::PathBuffer<::std::string> const getPathToLevelInfo(::std::string const& levelId, bool) const
93 /*override*/;
94
95 virtual ::std::string getLevelIdFromPath(::Core::Path const& fullPath, ::Core::Path const& worldsPath) const
96 /*override*/;
97
98 virtual bool isBetaRetailLevel(::std::string const&) const /*override*/;
99 // NOLINTEND
100
101public:
102 // member functions
103 // NOLINTBEGIN
104 MCAPI ExternalFileLevelStorageSource(
105 ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager> const& pathManager,
106 ::Bedrock::NotNullNonOwnerPtr<::SaveTransactionManager> const& saveTransactionManager
107 );
108
109 MCAPI void _getLevelList(::std::vector<::Core::PathBuffer<::std::string>>& paths) const;
110 // NOLINTEND
111
112public:
113 // constructor thunks
114 // NOLINTBEGIN
115 MCAPI void* $ctor(
116 ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager> const& pathManager,
117 ::Bedrock::NotNullNonOwnerPtr<::SaveTransactionManager> const& saveTransactionManager
118 );
119 // NOLINTEND
120
121public:
122 // destructor thunk
123 // NOLINTBEGIN
124 MCAPI void $dtor();
125 // NOLINTEND
126
127public:
128 // virtual function thunks
129 // NOLINTBEGIN
130 MCAPI ::std::string const& $getName() const;
131
132 MCAPI ::Bedrock::UniqueOwnerPointer<::LevelStorage> $createLevelStorage(
133 ::Scheduler& scheduler,
134 ::std::string const& levelId,
135 ::ContentIdentity const& contentIdentity,
136 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> const& keyProvider,
137 ::std::chrono::nanoseconds const& writeFlushInterval,
138 ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv> levelDbEnv,
139 ::std::unique_ptr<::LevelStorageEventing> levelStorageEventing
140 );
141
142 MCAPI ::std::unique_ptr<::LevelLooseFileStorage> $createLevelLooseStorage(
143 ::std::string const& levelId,
144 ::ContentIdentity const& contentIdentity,
145 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> const& keyProvider
146 );
147
148 MCAPI ::Bedrock::Result<bool> $getLevelData(::std::string const& levelId, ::LevelData& levelDataOut) const;
149
150 MCAPI void $saveLevelData(::std::string const& levelId, ::LevelData const& data);
151
152 MCAPI void $getLevelList(::std::vector<::Core::PathBuffer<::std::string>>& paths);
153
154 MCAPI void $deleteLevel(::std::string const& levelId);
155
156 MCAPI bool $renameLevel(::std::string const& levelId, ::std::string const& newLevelName);
157
158 MCAPI void $renameLevel(::LevelData& levelData, ::Core::Path const& fullPath, ::std::string const& newLevelName);
159
160 MCAPI bool $createBackupCopyOfWorld(
161 ::std::string const& levelId,
162 ::std::string const& newLeveId,
163 ::std::string const& newName
164 );
165
166 MCAPI bool $isLevelMarkedForSync(::Core::Path const& levelPath) const;
167
168 MCAPI bool $isLevelPartiallyCopied(::Core::Path const& levelPath) const;
169
170 MCAPI ::Core::PathBuffer<::std::string> $getLevelDatFoundPath(::Core::Path const& levelPath) const;
171
172 MCAPI ::Core::PathBuffer<::std::string> const $getBasePath() const;
173
174 MCAPI ::Core::PathBuffer<::std::string> const $getPathToLevel(::std::string const& levelId) const;
175
176 MCFOLD ::Core::PathBuffer<::std::string> const $getPathToLevelInfo(::std::string const& levelId, bool) const;
177
178 MCAPI ::std::string $getLevelIdFromPath(::Core::Path const& fullPath, ::Core::Path const& worldsPath) const;
179
180 MCFOLD bool $isBetaRetailLevel(::std::string const&) const;
181
182
183 // NOLINTEND
184
185public:
186 // vftables
187 // NOLINTBEGIN
188 MCNAPI static void** $vftable();
189 // NOLINTEND
190};
Definition ContentIdentity.h:8
Definition FilePathManager.h:18
Definition PathBuffer.h:8
Definition Path.h:12
static MCAPI void ** $vftable()
Definition IContentKeyProvider.h:13
Definition LevelData.h:55
Definition LevelDbEnv.h:8
Definition LevelLooseFileStorage.h:16
Definition LevelStorageEventing.h:17
Definition LevelStorageSource.h:25
Definition LevelStorage.h:26
Definition SaveTransactionManager.h:14
Definition Scheduler.h:15