LeviLamina
Loading...
Searching...
No Matches
StorageAreaState.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/file/LevelStorageState.h"
7
8// auto generated forward declare list
9// clang-format off
10namespace Core { class FileStorageArea; }
11namespace Core { class PathView; }
12namespace Core { class StorageAreaStateListener; }
13// clang-format on
14
15namespace Core {
16
17class StorageAreaState {
18public:
19 // member variables
20 // NOLINTBEGIN
28 // NOLINTEND
29
30public:
31 // prevent constructor by default
32 StorageAreaState& operator=(StorageAreaState const&);
33 StorageAreaState(StorageAreaState const&);
34 StorageAreaState();
35
36public:
37 // member functions
38 // NOLINTBEGIN
39 MCNAPI explicit StorageAreaState(::Core::PathView storageAreaRootPath);
40
41#ifdef LL_PLAT_C
42 MCNAPI void _clearCriticalDiskError();
43
44 MCNAPI void _clearLowDiskSpaceWarning();
45
46 MCNAPI void _clearOutOfSpaceError();
47
48 MCNAPI void _fireExtendDiskSpaceEvent(
49 bool bSet,
50 ::std::weak_ptr<::Core::FileStorageArea> const& fileStorageAreaWeakPtr,
51 uint64 freeSpace,
52 ::std::function<void()> onHandledEventCallback
53 );
54
55 MCNAPI void _notifyLowDiskSpaceWarning();
56
57 MCNAPI void _notifyOutOfDiskSpaceError();
58#endif
59
61
62 MCNAPI void checkUserStorage(
63 ::std::shared_ptr<::Core::FileStorageArea> const& fileStorageArea,
64 uint64 freeSpace,
65 uint64 usedSpace,
66 uint64 totalCapacity,
67 bool canExtendSize
68 );
69
70 MCNAPI bool isCriticalDiskError() const;
71
72#ifdef LL_PLAT_C
73 MCNAPI bool isLowDiskSpaceWarning() const;
74#endif
75
76 MCNAPI bool isOutOfDiskSpaceError() const;
77
78 MCNAPI void notifyCriticalDiskError(::Core::LevelStorageState const& errorCode);
79
80#ifdef LL_PLAT_C
81 MCNAPI void removeListener(::Core::StorageAreaStateListener* l);
82#endif
83
85 // NOLINTEND
86
87public:
88 // constructor thunks
89 // NOLINTBEGIN
90 MCNAPI void* $ctor(::Core::PathView storageAreaRootPath);
91 // NOLINTEND
92
93public:
94 // destructor thunk
95 // NOLINTBEGIN
96 MCNAPI void $dtor();
97 // NOLINTEND
98};
99
100} // namespace Core
Definition FileStorageArea.h:31
Definition PathView.h:19
Definition StorageAreaStateListener.h:16
MCAPI void addListener(::Core::StorageAreaStateListener *l)
MCAPI void notifyCriticalDiskError(::Core::LevelStorageState const &errorCode)
MCAPI StorageAreaState(::Core::PathView storageAreaRootPath)
MCAPI bool isCriticalDiskError() const
MCAPI void * $ctor(::Core::PathView storageAreaRootPath)
MCAPI bool isOutOfDiskSpaceError() const
MCAPI void checkUserStorage(::std::shared_ptr<::Core::FileStorageArea > const &fileStorageArea, uint64 freeSpace, uint64 usedSpace, uint64 totalCapacity, bool canExtendSize)
Definition Alias.h:14