resonance 1.0.1
Loading...
Searching...
No Matches
memcardop.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  MemcardOp
 One queued memory-card operation. More...

Enumerations

enum  MemcardStatus {
  kMemcardStatusOk = 0 , kMemcardStatusNotFormatted = 1 , kMemcardStatusCardFull = 2 , kMemcardStatusNoEntry = 3 ,
  kMemcardStatusBadFile = 4 , kMemcardStatusDenied = 5 , kMemcardStatusTooManyOpen = 6 , kMemcardStatusWriteDenied = 7 ,
  kMemcardStatusNoDirectory = 10 , kMemcardStatusNoFile = 11 , kMemcardStatusFailed = 14 , kMemcardStatusUnknown = 15
}
 Abstract result a memory-card operation reports through MemcardOp::mStatus. More...

Variables

constexpr int kMemcardPortShift = 8
 Bits MemcardOp::mPortSlot shifts the controller port up by.
constexpr int kMemcardSlotMask = 0xff
 Bits of MemcardOp::mPortSlot that store the slot inside the port.
constexpr int kMemcardOpNotIssued = 0
 MemcardOp::mIssued before the libmc call has been started.
constexpr int kMemcardOpInFlight = 1
 MemcardOp::mIssued while libmc is servicing the call.

Enumeration Type Documentation

◆ MemcardStatus

Abstract result a memory-card operation reports through MemcardOp::mStatus.

Each operation maps the libmc result code to one of these values in its own InterpretResult() body, and the mapping differs per operation. The same libmc code therefore arrives as different values from different operations, which is why the enumeration is semantic rather than a translation of sceMcRes*.

Only kMemcardStatusOk, kMemcardStatusNotFormatted, kMemcardStatusCardFull and kMemcardStatusUnknown are established, because those three error values arise from exactly one libmc code across every operation. Every other member's title is inferred from the libmc code that the operations map into it, and no string in the image identifies any of them. The values 8, 9, 12 and 13 are produced by no operation in the image and are therefore absent.

Enumerator
kMemcardStatusOk 

The operation succeeded.

kMemcardStatusNotFormatted 

Always from sceMcResNoFormat.

kMemcardStatusCardFull 

Always from sceMcResFullDevice.

kMemcardStatusNoEntry 

Inferred. sceMcResNoEntry on a path operation.

kMemcardStatusBadFile 

Inferred. sceMcResNoEntry on a descriptor operation.

kMemcardStatusDenied 

Inferred. sceMcResDeniedPermit on open and delete.

kMemcardStatusTooManyOpen 

Inferred. sceMcResUpLimitHandle on open.

kMemcardStatusWriteDenied 

Inferred. sceMcResDeniedPermit on write.

kMemcardStatusNoDirectory 

Inferred. sceMcResNoEntry on a directory listing.

kMemcardStatusNoFile 

Inferred. sceMcResNoEntry on delete.

kMemcardStatusFailed 

Inferred. Replace failure on write, non-empty on delete.

kMemcardStatusUnknown 

Every libmc code an operation does not map.

Variable Documentation

◆ kMemcardPortShift

int kMemcardPortShift = 8
constexpr

Bits MemcardOp::mPortSlot shifts the controller port up by.

◆ kMemcardSlotMask

int kMemcardSlotMask = 0xff
constexpr

Bits of MemcardOp::mPortSlot that store the slot inside the port.

◆ kMemcardOpNotIssued

int kMemcardOpNotIssued = 0
constexpr

MemcardOp::mIssued before the libmc call has been started.

◆ kMemcardOpInFlight

int kMemcardOpInFlight = 1
constexpr

MemcardOp::mIssued while libmc is servicing the call.