38 using LevelAddedType = ::LevelListCacheObserver::LevelAddedType;
45 ::ll::TypedStorage<8, 8, ::LevelStorageSource&> mLevelStorageSource;
46 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::LevelCache>> mCachedLevelData;
47 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::LevelSummary>> mCachedUnSyncedLevelData;
48 ::ll::TypedStorage<1, 1, bool> mDiscoverLevels;
49 ::ll::TypedStorage<8, 32, ::Core::Subject<::LevelListCacheObserver, ::Core::SingleThreadedLock>> mSubject;
50 ::ll::TypedStorage<8, 80, ::std::recursive_mutex> mCacheLock;
51 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::AppPlatform const>
const> mAppPlatform;
52 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mCheckIsSafeToFlushCache;
53 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mCheckIsCloudSyncAvailable;
58 LevelListCache& operator=(LevelListCache
const&);
59 LevelListCache(LevelListCache
const&);
65 virtual ~LevelListCache() =
default;
67 virtual void addLevel(::std::string
const& levelId,
::LevelData&& levelData) ;
69 virtual void deleteLevel(::std::string
const& levelId) ;
71 virtual void refreshLevel(::std::string
const& levelId) ;
73 virtual void ensureLevelInitialized(::std::string
const& levelId) ;
75 virtual void deleteLevelFiles(::std::string
const& levelId) ;
77 virtual void postDeleteLevel(::std::string
const& levelId) ;
79 virtual void renameLevel(::std::string
const& levelId, ::std::string
const& newLevelName) ;
81 virtual void renameAndSaveLevelData(
82 ::std::string
const& levelId,
83 ::std::string
const& newLevelName,
87 virtual void saveLevelData(::std::string
const& levelId,
::LevelData const& levelData) ;
89 virtual void createBackupCopyOfWorld(
90 ::std::string
const& levelId,
91 ::std::string
const& newLevelId,
92 ::std::string
const& newName
95 virtual bool hasLevelWithId(::std::string
const& levelId) ;
99 virtual bool checkIfLevelIsCorruptOrMissing(::std::string
const& levelId) ;
105 virtual ::Bedrock::UniqueOwnerPointer<::LevelStorage> createLevelStorage(
107 ::std::string
const& levelId,
109 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const>
const& keyProvider,
110 ::std::chrono::nanoseconds
const& writeFlushInterval,
111 ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv> levelDbEnv,
112 ::std::unique_ptr<::LevelStorageEventing> levelStorageEventing
115 virtual ::std::unique_ptr<::LevelLooseFileStorage> createLevelLooseStorage(
116 ::std::string
const& levelId,
118 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const>
const& keyProvider
121 virtual ::LevelSummary* getLevelSummary(::std::string
const& levelId) ;
123 virtual ::LevelSummary
const* getLevelSummaryByName(::std::string
const& levelName) ;
125 virtual ::LevelSummary* getOrCreateLevelSummary(
::Core::Path const& directory) ;
127 virtual ::LevelData* getLevelData(::std::string
const& levelId) ;
129 virtual ::Bedrock::NonOwnerPointer<::LevelData>
130 getLevelDataNonOwnerPointer(::std::string
const& levelId) ;
132 virtual ::LevelSummary* getShallowLevelSummary(::std::string
const& levelId) ;
134 virtual void getLevelList(
135 ::std::vector<::LevelSummary>& dest,
136 bool includeShallowSummaries,
137 bool includePartiallyCopiedLevels,
138 bool includeBetaRetailLevels,
139 bool includeInvalidLevelDataLevels
142 virtual bool hasCachedLevels(
bool includeShallowSummaries)
const ;
144 virtual void updateLevelCache(::std::string
const& levelId) ;
146 virtual ::std::unique_ptr<::LevelStorageObserver> createLevelStorageObserver() ;
148 virtual void onSave(::std::string
const& levelId) ;
150 virtual void onStorageChanged() ;
152 virtual ::Core::PathBuffer<::std::string>
const getBasePath()
const ;
154 virtual ::Core::PathBuffer<::std::string>
const getPathToLevel(::std::string
const& levelId)
const ;
162 ::Bedrock::NotNullNonOwnerPtr<::AppPlatform const> appPlatform,
163 ::std::function<
bool()>&& checkIsSafeToFlushCache,
164 ::std::function<
bool()>&& checkIsCloudSyncAvailable
170 ::std::string
const& levelId,
172 ::LevelListCacheObserver::LevelAddedType levelAddedType
176 ::std::string
const& levelId,
178 ::LevelListCacheObserver::LevelAddedType levelAddedType
197 ::Bedrock::NotNullNonOwnerPtr<::AppPlatform const> appPlatform,
198 ::std::function<
bool()>&& checkIsSafeToFlushCache,
199 ::std::function<
bool()>&& checkIsCloudSyncAvailable
218 MCNAPI
void $renameLevel(::std::string
const& levelId, ::std::string
const& newLevelName);
221 ::std::string
const& levelId,
222 ::std::string
const& newLevelName,
229 ::std::string
const& levelId,
230 ::std::string
const& newLevelId,
231 ::std::string
const& newName
246 ::std::string
const& levelId,
248 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const>
const& keyProvider,
249 ::std::chrono::nanoseconds
const& writeFlushInterval,
250 ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv> levelDbEnv,
251 ::std::unique_ptr<::LevelStorageEventing> levelStorageEventing
255 ::std::string
const& levelId,
257 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const>
const& keyProvider
273 ::std::vector<::LevelSummary>& dest,
274 bool includeShallowSummaries,
275 bool includePartiallyCopiedLevels,
276 bool includeBetaRetailLevels,
277 bool includeInvalidLevelDataLevels
286 MCNAPI
void $onSave(::std::string
const& levelId);
292 MCNAPI ::Core::PathBuffer<::std::string>
const $getPathToLevel(::std::string
const& levelId)
const;
Definition ContentIdentity.h:8
Definition IContentKeyProvider.h:13