wavelength 1.0.0
Loading...
Searching...
No Matches
mcgetdirtask.h
Go to the documentation of this file.
1#pragma once
2
6#include "os/string.h"
7
15class MCGetDirTask : public MemcardTask {
16public:
23 ~MCGetDirTask() override = default;
24
36 void Set(MemcardSerialTask *pOwner, int nPort, const char *pszName, int nMaxEntries, int nMode);
37
46 void OnGetDir(int nResult, MemcardDirEntry *pEntries) override;
47
48private:
49 MemcardSerialTask *mOwner;
50 String mName;
51 int mMode;
52 int mMaxEntries;
53
54protected:
61 void OnStart() override;
62};
Task that lists the entries matching a name into MemcardTask::sDirEntries and MemcardTask::sDirCount.
Definition mcgetdirtask.h:15
void OnGetDir(int nResult, MemcardDirEntry *pEntries) override
Record the entries and the outcome, finish, and tell mOwner.
void OnStart() override
Issue the command.
void Set(MemcardSerialTask *pOwner, int nPort, const char *pszName, int nMaxEntries, int nMode)
Prepare the task.
~MCGetDirTask() override=default
Destroy the object.
Memory card work made of MemcardTask steps that run one after another.
Definition memcardserialtask.h:13
MemcardTask()
Construct an idle task for the first slot.
Definition memcardtask.h:41
Growable text buffer that is also a PrnStream.
Definition string.h:19
One entry of a memory card directory listing, as MemcardCBHandler::OnGetDir() receives it.
Definition memcarddirentry.h:13