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

Open of one memory-card file for writing, creating it when it is absent. More...

#include <openwriteop.h>

Inheritance diagram for OpenWriteOp:
Collaboration diagram for OpenWriteOp:

Public Member Functions

 OpenWriteOp (MemcardCBHandler *pHandler, int nPortSlot, const HxStr &path, int nCookie)
 Construct an open for writing.
virtual ~OpenWriteOp ()
virtual void Execute ()
virtual void NotifyDone ()
virtual void InterpretResult ()
 Record the descriptor, or map the failure through a jump table.
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 writing, creating it when it is absent.

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

Execute() passes sceMcFileCreateFile | sceMcFileAttrWriteable as the open mode, which is the one difference from OpenReadOp.

Constructor & Destructor Documentation

◆ OpenWriteOp()

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

Construct an open for writing.

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: 0x0055eb58
Ghidra address:
PAL: 0x0059fe28

◆ ~OpenWriteOp()

virtual OpenWriteOp::~OpenWriteOp ( )
virtual
Ghidra address:
NTSC-U/C: 0x0055dca0
Ghidra address:
PAL: 0x0059ef18

Member Function Documentation

◆ Execute()

virtual void OpenWriteOp::Execute ( )
virtual
Ghidra address:
NTSC-U/C: 0x0055ebe8
Ghidra address:
PAL: 0x0059feb8

Reimplemented from MemcardOp.

◆ NotifyDone()

virtual void OpenWriteOp::NotifyDone ( )
virtual
Ghidra address:
NTSC-U/C: 0x0055dd08
Ghidra address:
PAL: 0x0059ef90

Reimplemented from MemcardOp.

◆ InterpretResult()

virtual void OpenWriteOp::InterpretResult ( )
virtual

Record the descriptor, or map the failure through a jump table.

The table at 0x0082bff0 covers the six libmc codes from sceMcResUpLimitHandle up to sceMcResNoFormat, indexed by the result plus seven.

Ghidra address:
NTSC-U/C: 0x0055ec38
Ghidra address:
PAL: 0x0059ff08

Reimplemented from MemcardOp.

Member Data Documentation

◆ mPath

HxStr OpenWriteOp::mPath

The file to open.

+0x1c

◆ mFile

int OpenWriteOp::mFile

The descriptor, valid once mStatus is kMemcardStatusOk.

+0x24


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