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