ADC Home > Reference Library > Reference > Hardware & Drivers > I/O Kit Framework Reference
|
IOCDMedia |
Inherits from: | |
Declared In: |
The IOCDMedia class is a random-access disk device abstraction for CDs.
The IOCDMedia class is a random-access disk device abstraction for CDs. It extends the IOMedia class by implementing special CD APIs, such as readCD, and publishing the TOC as a property of the IOCDMedia object.
getSpeed |
public
virtual IOReturn getSpeed( UInt16 *kilobytesPerSecond);
kilobytesPerSecond
Returns the current speed used for data transfers, in kB/s.
kCDSpeedMin specifies the minimum speed for all CD media (1X). kCDSpeedMax specifies the maximum speed supported in hardware.
Returns the status of the operation.
Get the current speed used for data transfers.
getTOC |
public
virtual CDTOC * getTOC();
Returns a pointer to the TOC buffer (do not deallocate).
Get the full Table Of Contents.
All CDTOC fields passed across I/O Kit APIs are guaranteed to be binary-encoded (no BCD-encoded numbers are ever passed).
read |
public
virtual void read( IOService *client, UInt64 byteStart, IOMemoryDescriptor *buffer, IOStorageCompletion completion);
client
Client requesting the read.
byteStart
Starting byte offset for the data transfer.
buffer
Buffer for the data transfer. The size of the buffer implies the size of the data transfer.
completion
Completion routine to call once the data transfer is complete.
Read data from the storage object at the specified byte offset into the specified buffer, asynchronously. When the read completes, the caller will be notified via the specified completion action.
The buffer will be retained for the duration of the read.
readCD(IOService *, UInt64, IOMemoryDescriptor *, CDSectorArea, CDSectorType, IOStorageCompletion) |
public
virtual void readCD( IOService *client, UInt64 byteStart, IOMemoryDescriptor *buffer, CDSectorArea sectorArea, CDSectorType sectorType, IOStorageCompletion completion);
client
Client requesting the read.
byteStart
Starting byte offset for the data transfer (see sectorArea parameter).
buffer
Buffer for the data transfer. The size of the buffer implies the size of the data transfer.
sectorArea
Sector area(s) to read. The sum of each area's size defines the natural block size of the media for the call. This should be taken into account when computing the address of byteStart. See IOCDTypes.h.
sectorType
Sector type that is expected. The data transfer is terminated as soon as data is encountered that does not match the expected type.
completion
Completion routine to call once the data transfer is complete.
Read data from the CD media object at the specified byte offset into the specified buffer, asynchronously. Special areas of the CD sector can be read via this method, such as the header and subchannel data. When the read completes, the caller will be notified via the specified completion action.
The buffer will be retained for the duration of the read.
readCD(IOService *, UInt64, IOMemoryDescriptor *, CDSectorArea, CDSectorType, UInt64 *) |
public
virtual IOReturn readCD( IOService *client, UInt64 byteStart, IOMemoryDescriptor *buffer, CDSectorArea sectorArea, CDSectorType sectorType, UInt64 *actualByteCount = 0);
client
Client requesting the read.
byteStart
Starting byte offset for the data transfer (see sectorArea parameter).
buffer
Buffer for the data transfer. The size of the buffer implies the size of the data transfer.
sectorArea
Sector area(s) to read. The sum of each area's size defines the natural block size of the media for the call. This should be taken into account when computing the address of byteStart. See IOCDTypes.h.
sectorType
Sector type that is expected. The data transfer is terminated as soon as data is encountered that does not match the expected type.
actualByteCount
Returns the actual number of bytes transferred in the data transfer.
Returns the status of the data transfer.
Read data from the CD media object at the specified byte offset into the specified buffer, synchronously. Special areas of the CD sector can be read via this method, such as the header and subchannel data. When the read completes, this method will return to the caller. The actual byte count field is optional.
readDiscInfo |
public
virtual IOReturn readDiscInfo( IOMemoryDescriptor *buffer, UInt16 *actualByteCount);
buffer
Buffer for the data transfer. The size of the buffer implies the size of the data transfer.
actualByteCount
Returns the actual number of bytes transferred in the data transfer.
Returns the status of the data transfer.
Issue an MMC READ DISC INFORMATION command.
readISRC |
public
virtual IOReturn readISRC( UInt8 track, CDISRC isrc);
track
Track number from which to read the ISRC.
isrc
Buffer for the ISRC data. Buffer contents will be zero-terminated.
Returns the status of the operation.
Read the International Standard Recording Code for the specified track.
readMCN |
public
virtual IOReturn readMCN( CDMCN mcn);
mcn
Buffer for the MCN data. Buffer contents will be zero-terminated.
Returns the status of the operation.
Read the Media Catalog Number (also known as the Universal Product Code).
readTOC |
public
virtual IOReturn readTOC( IOMemoryDescriptor *buffer, CDTOCFormat format, UInt8 formatAsTime, UInt8 trackOrSessionNumber, UInt16 *actualByteCount);
buffer
Buffer for the data transfer. The size of the buffer implies the size of the data transfer.
format
As documented by MMC.
formatAsTime
As documented by MMC.
trackOrSessionNumber
As documented by MMC.
actualByteCount
Returns the actual number of bytes transferred in the data transfer.
Returns the status of the data transfer.
Issue an MMC READ TOC/PMA/ATIP command.
readTrackInfo |
public
virtual IOReturn readTrackInfo( IOMemoryDescriptor *buffer, UInt32 address, CDTrackInfoAddressType addressType, UInt16 *actualByteCount);
buffer
Buffer for the data transfer. The size of the buffer implies the size of the data transfer.
address
As documented by MMC.
addressType
As documented by MMC.
actualByteCount
Returns the actual number of bytes transferred in the data transfer.
Returns the status of the data transfer.
Issue an MMC READ TRACK INFORMATION command.
setSpeed |
public
virtual IOReturn setSpeed( UInt16 kilobytesPerSecond);
kilobytesPerSecond
Speed to be used for data transfers, in kB/s.
kCDSpeedMin specifies the minimum speed for all CD media (1X). kCDSpeedMax specifies the maximum speed supported in hardware.
Returns the status of the operation.
Set the speed to be used for data transfers.
|
Last Updated: 2009-02-23