Nugget
Loading...
Searching...
No Matches
Public Member Functions | List of all members
psyqo::CDRomPCDrv Class Referencefinal

#include <psyqo/cdrom-pcdrv.hh>

Inheritance diagram for psyqo::CDRomPCDrv:
Inheritance graph
[legend]
Collaboration diagram for psyqo::CDRomPCDrv:
Collaboration graph
[legend]

Public Member Functions

 CDRomPCDrv (const char *isoName)
 
bool ensureOpen ()
 
void readSectors (uint32_t sector, uint32_t count, void *buffer, eastl::function< void(bool)> &&callback) override
 Read a sector from the CDRom.
 
- Public Member Functions inherited from psyqo::CDRom
virtual ~CDRom ()
 
TaskQueue::Task scheduleReadSectors (uint32_t sector, uint32_t count, void *buffer)
 Schedule a read operation.
 
TaskQueue::Task scheduleReadRequest (const ReadRequest *request)
 Schedule a read operation.
 
ReadSectorsAwaiter readSectorsForCoroutine (uint32_t sector, uint32_t count, void *buffer)
 Wrapper around the readSectors method for coroutines.
 

Constructor & Destructor Documentation

◆ CDRomPCDrv()

psyqo::CDRomPCDrv::CDRomPCDrv ( const char *  isoName)
inline

Member Function Documentation

◆ ensureOpen()

bool psyqo::CDRomPCDrv::ensureOpen ( )
inline

◆ readSectors()

void psyqo::CDRomPCDrv::readSectors ( uint32_t  sector,
uint32_t  count,
void buffer,
eastl::function< void(bool)> &&  callback 
)
overridevirtual

Read a sector from the CDRom.

The function will make reasonable attempts at reading the disk, but it is not guaranteed to succeed. Failures may be caused by the disk being faulty, the lid being opened, or no valid disk being present. Only one operation can be in progress at a time.

Parameters
sectorThe sector to read.
bufferThe buffer to read into.
sizeThe size of the buffer.
callbackThe callback to call when the read is done. It will be called from the main thread when possible. Its one argument is a boolean indicating whether the read was successful.

Implements psyqo::CDRom.


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