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

Read from an open memory-card file. More...

#include <readop.h>

Inheritance diagram for ReadOp:
Collaboration diagram for ReadOp:

Public Member Functions

 ReadOp (MemcardCBHandler *pHandler, int nPortSlot, int nFile, void *pBuffer, int nLength, int nCookie)
 Construct a read against an open descriptor.
virtual ~ReadOp ()
virtual void Execute ()
virtual void NotifyDone ()
virtual void InterpretResult ()
 Record the transferred byte count, 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

int mBytesTransferred
 Bytes transferred, valid once mStatus is kMemcardStatusOk.
int mFile
 The descriptor to read from.
void * mBuffer
 The destination.
int mLength
 The number of bytes to read.
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

Read from an open memory-card file.

Its RTTI descriptor is at 0x008ee7c8. It has single inheritance from MemcardOp at offset 0. An instance is 0x2c bytes and the vtable is at 0x0082bd60.

Execute() addresses the descriptor rather than the card. MemcardOp::mPortSlot is therefore recorded and never read.

Constructor & Destructor Documentation

◆ ReadOp()

ReadOp::ReadOp ( MemcardCBHandler * pHandler,
int nPortSlot,
int nFile,
void * pBuffer,
int nLength,
int nCookie )

Construct a read against an open descriptor.

Parameters
pHandlerThe receiver NotifyDone() reports to.
nPortSlotThe packed port and slot, which Execute() does not use.
nFileThe descriptor OpenReadOp delivered.
pBufferThe destination.
nLengthThe number of bytes to read.
nCookieThe tag Memcard::Cancel() matches on.
Ghidra address:
NTSC-U/C: 0x0055e8e0
Ghidra address:
PAL: 0x0059fbb0

◆ ~ReadOp()

virtual ReadOp::~ReadOp ( )
virtual
Ghidra address:
NTSC-U/C: 0x0055d9b8
Ghidra address:
PAL: 0x0059ec30

Member Function Documentation

◆ Execute()

virtual void ReadOp::Execute ( )
virtual
Ghidra address:
NTSC-U/C: 0x0055e910
Ghidra address:
PAL: 0x0059fbe0

Reimplemented from MemcardOp.

◆ NotifyDone()

virtual void ReadOp::NotifyDone ( )
virtual
Ghidra address:
NTSC-U/C: 0x0055d9e8
Ghidra address:
PAL: 0x0059ec60

Reimplemented from MemcardOp.

◆ InterpretResult()

virtual void ReadOp::InterpretResult ( )
virtual

Record the transferred byte count, or map the failure.

sceMcResNoEntry becomes kMemcardStatusBadFile and sceMcResDeniedPermit becomes kMemcardStatusNoEntry, which is the reverse of the pairing the open operations use.

Ghidra address:
NTSC-U/C: 0x0055e948
Ghidra address:
PAL: 0x0059fc18

Reimplemented from MemcardOp.

Member Data Documentation

◆ mBytesTransferred

int ReadOp::mBytesTransferred

Bytes transferred, valid once mStatus is kMemcardStatusOk.

+0x1c

◆ mFile

int ReadOp::mFile

The descriptor to read from.

+0x20

◆ mBuffer

void* ReadOp::mBuffer

The destination.

+0x24

◆ mLength

int ReadOp::mLength

The number of bytes to read.

+0x28


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