wavelength 1.0.0
Loading...
Searching...
No Matches
mcchecksavespaceneededtask.h
Go to the documentation of this file.
1#pragma once
2
3#ifdef VIDEO_STANDARD_PAL
5#endif
10#include "os/string.h"
11
13constexpr int kSaveSpaceListingCount = 2;
14
26public:
33 ~MCCheckSaveSpaceNeededTask() override = default;
34
42
56 void Set(SaveSpaceUser *pUser,
57 int nPort,
58 const char *pszName,
59 const char *pszExt,
60 int nMaxFiles,
61 int nFileSize,
62 int nOverwrite);
63
70 void OnDirListed() override;
71
72private:
73 // The steps belong to the SerialTasks list.
74#ifdef VIDEO_STANDARD_PAL
75 MCCheckDirExistsTask *mCheckDir;
76#endif
77 MCGetInfoTask *mGetInfo;
79 SaveSpaceUser *mUser;
80 int mNeeded;
81 String mFileName;
82 int mFileSize;
83 int mOverwrite;
84 unsigned char mListing;
85 int mMaxFiles;
86
87protected:
94 void OnStop() override;
95};
void OnDirListed() override
Record whether the directory exists, then measure the space once the files are listed.
void OnStop() override
End with the outcome, and report it to mUser.
MCCheckSaveSpaceNeededTask()
Construct the steps.
~MCCheckSaveSpaceNeededTask() override=default
Destroy the object.
void Set(SaveSpaceUser *pUser, int nPort, const char *pszName, const char *pszExt, int nMaxFiles, int nFileSize, int nOverwrite)
Prepare the work, and make g_MemcardPath the Freq directory.
Task that lists the entries matching a name into MemcardTask::sDirEntries and MemcardTask::sDirCount.
Definition mcgetdirtask.h:15
Task that reads the type, the free space, and the format of a card.
Definition mcgetinfotask.h:11
Memory card work made of MemcardTask steps that run one after another.
Definition memcardserialtask.h:13
Receiver of the space a save needs, from the tasks that measure the space.
Definition savespaceuser.h:9
Growable text buffer that is also a PrnStream.
Definition string.h:19
constexpr int kSaveSpaceListingCount
The listings MCCheckSaveSpaceNeededTask makes: the Freq directory, then its files.
Definition mcchecksavespaceneededtask.h:13