Provide a device-independent interface to an audio CD player. More...
Publicly inherits QObject.
Cdrom | ( ); | |
bool | eject | ( ); |
CompactDiscID* | id | ( ); |
bool | pause | ( ); |
bool | play | ( int track ); |
bool | resume | ( ); |
bool | status | ( CdromStatus& status, int& absTime, int& volume ); |
bool | stop | ( ); |
const char* | typeConstant | ( int i ); |
const char* | typeName | ( int i ); |
bool | volume | ( int vol ); |
~Cdrom | ( ); |
void | changePath | ( ); |
void | changeType | ( ); |
CdromBase* | _cdrom; |
int | _fd; |
QString | _typeConstants[]; |
QString | _typeNames[]; |
Provide a device-independent interface to an audio CD player.
This class is used to indirectly control a CDROM device. Only a subset of the available audio commands are provided, so that compatibility can be maintained across several different drive types. The interface is the same for both IDE and SCSI drives.Initialize the Cdrom object.
There should be only one instance of this object, mainly because there is a global pointer to it. It would not be difficult to modify this class to support multiple instances (read: multiple devices) within the same application.
Command the CDROM to eject/retract the tray.
Query the table of contents from the CDROM.
If successful, this function returns the number of tracks on the disc, along with their absolute start times (in frames). This information can be used to (hopefully) uniquely identify the disc. If any error occurs, this function returns 0.
Command the CDROM to pause the playing disc.
Command the CDROM to play a single track, from start to finish.
Command the CDROM to resume playing the disc.
Query the current audio status of the CDROM, including the current play time, and volume setting.
Command the CDROM to stop any active play/pause operation.
Return the constant string for the given CdromType.
This is the string that is used on the command line and in the $HOME/.xcdrc file to select the CDROM device driver class.
Return the name string for the given CdromType.
This is the string that is displayed on the Preferences window.
Command the CDROM to change the volume setting.
Cleanup the device driver object that we created.
Process a change in the CDROM device path.
The open device (if any) is closed, and the new device is opened.
Process a change in the CDROM device driver.
This function destroys the old driver object (if any), and creates a new driver object of the desired type. Once created, the driver object is used to initialized the CDROM drive.