resonance 1.0.1
Loading...
Searching...
No Matches
listremixesmct.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
8#include "os/hxstr.h"
10
11struct MetRemixRecord;
12
34class ListRemixesMCT : public MemcardTask, public MemcardUser {
35public:
50 Memcard *pCard,
51 int nPortSlot,
52 int nCookie,
53 std::vector<MetRemixRecord> *pRecords);
54
59 virtual ~ListRemixesMCT();
60
72
77 virtual void OnCheckInfo(CheckInfoOp *pOp);
78
91 virtual void OnListDir(ListDirOp *pOp);
92
99 virtual void Finish();
100
107 virtual void Execute();
108
120 virtual void OnFileLoaded(int nStatus);
121
122private:
123 // Selects the step OnListDir() and OnFileLoaded() run next. ListRemixDir() clears it and the
124 // constructor does not write it. +0x20
125 int mStep;
126
127 // The inner read of the current directory's index. OnListDir() and OnFileLoaded() delete the
128 // previous one before creating the next, and the destructor does not release it. +0x24
129 LoadFileMCT *mLoadTask;
130
131 // The directory the index is being read out of. +0x28
132 HxStr mCurrentDir;
133
134 // Every remix save directory the listing found, consumed one per step. +0x30
135 std::vector<HxStr> mDirNames;
136
137 // The collection the parse fills, received as the constructor's last argument. OnFileLoaded()
138 // copy-constructs each element through MetRemixRecord's copy constructor at 0x00184130 and
139 // steps by 0x38, MetRemixRecord's size. Borrowed, not owned. +0x3c
140 std::vector<MetRemixRecord> *mRecords;
141
142 // One index file is read into this stream's buffer at a time. +0x40
143 IOBPreallocMemStream mStream;
144
145 // mStream.mBuffer, cached by the constructor. +0x60
146 char *mBuffer;
147};
Enquiry about the card in one slot.
Definition checkinfoop.h:13
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Bidirectional stream over a caller-supplied byte buffer.
Definition iobpreallocmemstream.h:32
Listing of one directory on a card.
Definition listdirop.h:20
virtual void Finish()
Report the finished listing through MemcardUser::OnRemixesListed().
virtual void OnFileLoaded(int nStatus)
Collect the records of one directory's index and read the next directory's.
virtual void OnListDir(ListDirOp *pOp)
Collect the listed directories and read the first one's index.
virtual void Execute()
Enquire about the card and start the listing.
virtual void OnCheckInfo(CheckInfoOp *pOp)
void ListRemixDir()
List every remix save directory on the card.
virtual ~ListRemixesMCT()
ListRemixesMCT(MemcardUser *pUser, Memcard *pCard, int nPortSlot, int nCookie, std::vector< MetRemixRecord > *pRecords)
Construct an idle listing.
Read one file from a card into a caller-supplied buffer.
Definition loadfilemct.h:40
MemcardTask(MemcardUser *pUser, Memcard *pCard, int nPortSlot, int nCookie)
Construct an idle task against one card slot.
Receiver notified once a memory-card task has finished.
Definition memcarduser.h:24
Queue of memory-card operations, with one entry point per libmc call.
Definition memcard.h:29
One remix in the catalogue, with the appearances of the players who recorded it.
Definition metremixrecord.h:36