resonance 1.0.1
Loading...
Searching...
No Matches
SaveJukeboxPlayListMCT Class Reference

Save one jukebox playlist to a card. More...

#include <savejukeboxplaylistmct.h>

Inheritance diagram for SaveJukeboxPlayListMCT:
Collaboration diagram for SaveJukeboxPlayListMCT:

Public Member Functions

 SaveJukeboxPlayListMCT (MemcardUser *pUser, Memcard *pCard, int nPortSlot, int nCookie, JukeboxPlayList *pPlayList, int nIndex)
 Construct an idle save and serialise the playlist through JukeboxPlayList::save().
virtual ~SaveJukeboxPlayListMCT ()
virtual void OnCheckInfo (CheckInfoOp *pOp)
 Start the save sequence once the card enquiry succeeds.
virtual void Finish ()
 Report the result through MemcardUser::OnJukeboxPlayListSaved().
virtual void Execute ()
 Aim the save at the playlist directory and at <g_jukeboxFileName><mIndex>.dat, and enquire about the card.
Public Member Functions inherited from SaveFileMCT
 SaveFileMCT (MemcardUser *pUser, Memcard *pCard, int nPortSlot, int nCookie)
 Construct an idle save task.
virtual ~SaveFileMCT ()
void Save (const HxStr &dirName, const HxStr &fileName, const HxStr &iconTitle, const void *pData, int nLength, int bSkipIconFiles)
 Record what to write and start the sequence.
void RunStep ()
 Run the step mStep selects and advance to the step after it.
void BuildIconSys (const char *pszTitle)
 Fill mIconSys with the browser icon header.
virtual void OnCreateDir (CreateDirOp *pOp)
virtual void OnWrite (WriteOp *pOp)
virtual void OnOpenWrite (OpenWriteOp *pOp)
virtual void OnClose (CloseOp *pOp)
Public Member Functions inherited from MemcardTask
 MemcardTask (MemcardUser *pUser, Memcard *pCard, int nPortSlot, int nCookie)
 Construct an idle task against one card slot.
 MemcardTask (MemcardUser *pUser, Memcard *pCard, int nCookie)
 Construct an idle task that does not address a single card slot.
virtual void UnusedHook ()
 Do nothing.
Public Member Functions inherited from MemcardCBHandler
virtual ~MemcardCBHandler ()
 Release the receiver.
virtual void OnEntSpace (EntSpaceOp *pOp)
 Report a finished free-entry enquiry.
virtual void OnFormat (FormatOp *pOp)
 Report a finished format.
virtual void OnUnformat (UnformatOp *pOp)
 Report a finished unformat.
virtual void OnListDir (ListDirOp *pOp)
 Report a finished directory listing.
virtual void OnRead (ReadOp *pOp)
 Report a finished read.
virtual void OnOpenRead (OpenReadOp *pOp)
 Report a finished open for reading.
virtual void OnSeek (SeekOp *pOp)
 Report a finished seek.
virtual void OnDeleteFile (DeleteFileOp *pOp)
 Report a finished file deletion.
virtual void OnRenameFile (RenameFileOp *pOp)
 Report a finished rename.

Additional Inherited Members

Protected Member Functions inherited from MemcardTask
void HandleError ()
 Abandon the task when the last operation reported a failure.
Protected Attributes inherited from SaveFileMCT
int mFile
sceMcIconSys mIconSys
HxStr mDirName
HxStr mFileName
HxStr mIconTitle
int mStep
const void * mData
int mDataLength
int mSkipIconFiles
Protected Attributes inherited from MemcardTask
MemcardUser * mUser
Memcard * mCard
int mCookie
int mPortSlot
int mState
int mStatus

Detailed Description

Save one jukebox playlist to a card.

It has single inheritance from SaveFileMCT at offset 0. An instance is 0x430 bytes, from MemcardManager::CreateSaveJukeboxPlayListTask()'s allocation, and the vtable is at 0x007da9d8.

The constructor serialises the playlist into g_abRemixStagingBuffer through mStream at once. Execute() then points the inherited save sequence at that buffer, under a file name that includes mIndex, and starts it with a card enquiry.

Constructor & Destructor Documentation

◆ SaveJukeboxPlayListMCT()

SaveJukeboxPlayListMCT::SaveJukeboxPlayListMCT ( MemcardUser * pUser,
Memcard * pCard,
int nPortSlot,
int nCookie,
JukeboxPlayList * pPlayList,
int nIndex )

Construct an idle save and serialise the playlist through JukeboxPlayList::save().

Parameters
pUserThe receiver Finish() reports to.
pCardThe queue the task submits operations to.
nPortSlotThe packed port and slot.
nCookieThe tag that abandons exactly this task's operations.
pPlayListThe playlist to save.
nIndexThe playlist number in the file name.
Ghidra address:
NTSC-U/C: 0x00178d58
Ghidra address:
PAL: 0x0017c7c8

◆ ~SaveJukeboxPlayListMCT()

virtual SaveJukeboxPlayListMCT::~SaveJukeboxPlayListMCT ( )
virtual
Ghidra address:
NTSC-U/C: 0x00184ee8
Ghidra address:
PAL: 0x0018a5e8

Member Function Documentation

◆ OnCheckInfo()

virtual void SaveJukeboxPlayListMCT::OnCheckInfo ( CheckInfoOp * pOp)
virtual

Start the save sequence once the card enquiry succeeds.

The body is instruction for instruction SavePersonasMCT::OnCheckInfo(). The European release inherits SaveFileMCT::OnCheckInfo() instead.

Parameters
pOpThe finished enquiry.
Ghidra address:
NTSC-U/C: 0x00186650

Reimplemented from MemcardCBHandler.

◆ Finish()

virtual void SaveJukeboxPlayListMCT::Finish ( )
virtual

Report the result through MemcardUser::OnJukeboxPlayListSaved().

Ghidra address:
NTSC-U/C: 0x001866e8
Ghidra address:
PAL: 0x0018bfe0

Reimplemented from SaveFileMCT.

◆ Execute()

virtual void SaveJukeboxPlayListMCT::Execute ( )
virtual

Aim the save at the playlist directory and at <g_jukeboxFileName><mIndex>.dat, and enquire about the card.

The European release adds the playlist to SaveFileMCT::mFiles and runs SaveFileMCT::Execute().

Ghidra address:
NTSC-U/C: 0x00178ec0
Ghidra address:
PAL: 0x0017ca28

Reimplemented from SaveFileMCT.


The documentation for this class was generated from the following file: