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

Open of one memory-card file for reading. More...

#include <openreadop.h>

Inheritance diagram for OpenReadOp:
Collaboration diagram for OpenReadOp:

Public Member Functions

 OpenReadOp (MemcardCBHandler *pHandler, int nPortSlot, const HxStr &path, int nCookie)
 Construct an open for reading.
virtual ~OpenReadOp ()
virtual void Execute ()
virtual void NotifyDone ()
virtual void InterpretResult ()
 Record the descriptor, or map the failure.
Public Member Functions inherited from MemcardOp
 MemcardOp (MemcardCBHandler *pHandler, int nPortSlot, int nCookie)
 Construct an operation against one card slot, with no libmc call issued yet.
 MemcardOp (MemcardCBHandler *pHandler, int nCookie)
 Construct an operation against an open descriptor alone.
virtual ~MemcardOp ()
 Release the operation.

Public Attributes

HxStr mPath
 The file to open.
int mFile
 The descriptor, valid once mStatus is kMemcardStatusOk.
Public Attributes inherited from MemcardOp
int mCookie
 Ticket number Memcard::Cancel() matches on.
int mIssued
 Zero until Execute() has run, then 1 while libmc is servicing the call.
int mResult
 The libmc result, as sceMcSync() delivered it.
int mStatus
 One of MemcardStatus, written by InterpretResult().

Additional Inherited Members

Protected Attributes inherited from MemcardOp
int mPortSlot
MemcardCBHandler * mHandler

Detailed Description

Open of one memory-card file for reading.

Its RTTI descriptor is at 0x008efb40. It has single inheritance from MemcardOp at offset 0. An instance is 0x28 bytes and the vtable is at 0x0082bca0.

Execute() passes sceMcFileAttrReadable as the open mode, which is the one difference from OpenWriteOp.

Constructor & Destructor Documentation

◆ OpenReadOp()

OpenReadOp::OpenReadOp ( MemcardCBHandler * pHandler,
int nPortSlot,
const HxStr & path,
int nCookie )

Construct an open for reading.

Parameters
pHandlerThe receiver NotifyDone() reports to.
nPortSlotThe packed port and slot.
pathThe file to open.
nCookieThe tag Memcard::Cancel() matches on.
Ghidra address:
NTSC-U/C: 0x0055ecc0
Ghidra address:
PAL: 0x0059ff90

◆ ~OpenReadOp()

virtual OpenReadOp::~OpenReadOp ( )
virtual
Ghidra address:
NTSC-U/C: 0x0055ddd0
Ghidra address:
PAL: 0x0059f058

Member Function Documentation

◆ Execute()

virtual void OpenReadOp::Execute ( )
virtual
Ghidra address:
NTSC-U/C: 0x0055ed50
Ghidra address:
PAL: 0x005a0020

Reimplemented from MemcardOp.

◆ NotifyDone()

virtual void OpenReadOp::NotifyDone ( )
virtual
Ghidra address:
NTSC-U/C: 0x0055de38
Ghidra address:
PAL: 0x0059f0d0

Reimplemented from MemcardOp.

◆ InterpretResult()

virtual void OpenReadOp::InterpretResult ( )
virtual

Record the descriptor, or map the failure.

The body writes mFile from the result before it tests the sign. A failed open therefore stores the libmc error code in mFile as well as in MemcardOp::mResult. The behaviour matches the binary.

Ghidra address:
NTSC-U/C: 0x0055eda0
Ghidra address:
PAL: 0x005a0070

Reimplemented from MemcardOp.

Member Data Documentation

◆ mPath

HxStr OpenReadOp::mPath

The file to open.

+0x1c

◆ mFile

int OpenReadOp::mFile

The descriptor, valid once mStatus is kMemcardStatusOk.

+0x24


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