3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/ProgressHandler.h"
7#include "mc/deps/core/file/PathBuffer.h"
8#include "mc/deps/core/string/BasicStackString.h"
9#include "mc/world/actor/player/LoadingState.h"
24 enum class StateBitField : uint {
27 UserCanCancel = 1u << 1,
28 TakingTooLong = 1u << 2,
36 ::ll::TypedStorage<8, 8, ::std::chrono::seconds const> mSecondsBeforeUserCanCancel;
37 ::ll::TypedStorage<8, 8, ::std::chrono::seconds const> mSecondsBeforeClientShouldCancel;
41 using OnCompleteCallback = ::std::function<void()>
const;
43 using DirectoryList = ::std::vector<::Core::PathBuffer<::std::string>>;
48 ::ll::TypedStorage<8, 24, ::std::vector<::Core::PathBuffer<::std::string>>> mDirectoryList;
49 ::ll::TypedStorage<8, 16, ::DeleteStorageAreaContentProgressHandler::CancelTimeInfo> mCancelTimeInfo;
50 ::ll::TypedStorage<8, 64, ::std::function<void()>
const> mOnCompleteCallback;
51 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mStartTimestamp;
52 ::ll::TypedStorage<4, 4, ::DeleteStorageAreaContentProgressHandler::StateBitField> mStates;
53 ::ll::TypedStorage<8, 32, ::std::string> mDeleteStorageAreaContentTitle;
59 virtual ~DeleteStorageAreaContentProgressHandler() ;
61 virtual void onStart(::MinecraftScreenModel&) ;
63 virtual void tick(::MinecraftScreenModel& minecraftScreenModel) ;
65 virtual void onCancel(::MinecraftScreenModel& minecraftScreenModel) ;
67 virtual void onExit(::MinecraftScreenModel&) ;
69 virtual ::LoadingState getLoadingState(::MinecraftScreenModel&)
const ;
71 virtual ::std::string getProgressMessage(::MinecraftScreenModel&)
const ;
73 virtual ::std::string getTitleText() const ;
75 virtual ::std::
string getName() const ;
81 MCAPI
void _evaluateLoadTime(
82 ::std::chrono::seconds const& loadTimeToEvaluate,
83 ::DeleteStorageAreaContentProgressHandler::StateBitField stateToAdd
86 MCAPI
void _onComplete(::MinecraftScreenModel& minecraftScreenModel);
88 MCAPI
void deleteDirectoryContentsRecursively(
89 ::Core::PathBuffer<::Core::BasicStackString<
char, 1024>>& rootPath,
90 ::std::
string const& dirToDelete
103 MCAPI
void $onStart(::MinecraftScreenModel&);
105 MCAPI
void $tick(::MinecraftScreenModel& minecraftScreenModel);
107 MCFOLD
void $onCancel(::MinecraftScreenModel& minecraftScreenModel);
109 MCFOLD
void $onExit(::MinecraftScreenModel&);
111 MCAPI ::LoadingState $getLoadingState(::MinecraftScreenModel&) const;
113 MCAPI ::std::
string $getProgressMessage(::MinecraftScreenModel&) const;
115 MCAPI ::std::
string $getTitleText() const;
117 MCAPI ::std::
string $getName() const;
Definition DeleteStorageAreaContentProgressHandler.h:5
static MCAPI void ** $vftable()
Definition MinecraftScreenModel.h:5
Definition ProgressHandler.h:5
Definition DeleteStorageAreaContentProgressHandler.h:15