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

Enquire about every slot a multi-tap makes available and collect the answers. More...

#include <getallconnectstatesmct.h>

Inheritance diagram for GetAllConnectStatesMCT:
Collaboration diagram for GetAllConnectStatesMCT:

Public Member Functions

 GetAllConnectStatesMCT (MemcardUser *pUser, Memcard *pCard, int nCookie, std::vector< MemcardConnectState > *pStates)
 Construct an idle enquiry.
virtual ~GetAllConnectStatesMCT ()
 Release the task.
virtual void OnCheckInfo (CheckInfoOp *pOp)
 Append one slot's state to mStates and finish once every enquiry has reported.
virtual void Finish ()
virtual void Execute ()
 Queue one enquiry per available slot.
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 OnCreateDir (CreateDirOp *pOp)
 Report a finished directory creation.
virtual void OnListDir (ListDirOp *pOp)
 Report a finished directory listing.
virtual void OnRead (ReadOp *pOp)
 Report a finished read.
virtual void OnWrite (WriteOp *pOp)
 Report a finished write.
virtual void OnOpenWrite (OpenWriteOp *pOp)
 Report a finished open for writing.
virtual void OnOpenRead (OpenReadOp *pOp)
 Report a finished open for reading.
virtual void OnClose (CloseOp *pOp)
 Report a finished close.
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 MemcardTask
MemcardUser * mUser
Memcard * mCard
int mCookie
int mPortSlot
int mState
int mStatus

Detailed Description

Enquire about every slot a multi-tap makes available and collect the answers.

Its RTTI descriptor is at 0x008ef6b0. It has single inheritance from MemcardTask at offset 0. An instance is 0x48 bytes and the vtable is at 0x007dacf8.

Execute() queues one CheckInfo per slot, decides how many from sceMtapGetConnection(), and records the expected count. Each report appends one MemcardConnectState to the vector the task was given and increments the completed count, and the last of them finishes the task. The MemcardTask::mPortSlot the task was constructed with is not used, because the slots come from the tables instead.

Two faithful oddities. A multi-tap on port 1 yields four enquiries, and the same tap on port 2 yields none at all rather than four, which leaves the last four entries of both slot tables unreferenced by any code path. And the vector is borrowed rather than owned, which the destructor confirms by releasing nothing.

Constructor & Destructor Documentation

◆ GetAllConnectStatesMCT()

GetAllConnectStatesMCT::GetAllConnectStatesMCT ( MemcardUser * pUser,
Memcard * pCard,
int nCookie,
std::vector< MemcardConnectState > * pStates )

Construct an idle enquiry.

The constructor is inlined into MemcardManager::CreateGetAllConnectStatesTask() at 0x001f2c70, its one site, and no address of its own survives. The site writes no port slot and clears mExpected and mCompleted.

Parameters
pUserThe receiver Finish() reports to.
pCardThe queue the task submits operations to.
nCookieThe tag that abandons exactly this task's operations.
pStatesWhere the answers are appended. Borrowed, not owned.

◆ ~GetAllConnectStatesMCT()

virtual GetAllConnectStatesMCT::~GetAllConnectStatesMCT ( )
virtual

Release the task.

The body releases nothing, which is what establishes that mStates is borrowed.

Ghidra address:
NTSC-U/C: 0x00184b08
Ghidra address:
PAL: 0x0018a020

Member Function Documentation

◆ OnCheckInfo()

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

Append one slot's state to mStates and finish once every enquiry has reported.

kMemcardStatusUnknown skips the append but still counts toward the total, so a missing card does not stall the task.

Ghidra address:
NTSC-U/C: 0x00178138
Ghidra address:
PAL: 0x0017b508

Reimplemented from MemcardCBHandler.

◆ Finish()

virtual void GetAllConnectStatesMCT::Finish ( )
virtual
Ghidra address:
NTSC-U/C: 0x001860a0
Ghidra address:
PAL: 0x0018bb58

Implements MemcardTask.

◆ Execute()

virtual void GetAllConnectStatesMCT::Execute ( )
virtual

Queue one enquiry per available slot.

Ghidra address:
NTSC-U/C: 0x001860d8
Ghidra address:
PAL: 0x0018bb90

Implements MemcardTask.


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