|
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);
kilobytesPerSecondReturns 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);
clientClient requesting the read.
byteStartStarting byte offset for the data transfer.
bufferBuffer for the data transfer. The size of the buffer implies the size of the data transfer.
completionCompletion 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);
clientClient requesting the read.
byteStartStarting byte offset for the data transfer (see sectorArea parameter).
bufferBuffer for the data transfer. The size of the buffer implies the size of the data transfer.
sectorAreaSector 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.
sectorTypeSector type that is expected. The data transfer is terminated as soon as data is encountered that does not match the expected type.
completionCompletion 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);
clientClient requesting the read.
byteStartStarting byte offset for the data transfer (see sectorArea parameter).
bufferBuffer for the data transfer. The size of the buffer implies the size of the data transfer.
sectorAreaSector 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.
sectorTypeSector type that is expected. The data transfer is terminated as soon as data is encountered that does not match the expected type.
actualByteCountReturns 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);
bufferBuffer for the data transfer. The size of the buffer implies the size of the data transfer.
actualByteCountReturns 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);
trackTrack number from which to read the ISRC.
isrcBuffer 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);
mcnBuffer 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);
bufferBuffer for the data transfer. The size of the buffer implies the size of the data transfer.
formatAs documented by MMC.
formatAsTimeAs documented by MMC.
trackOrSessionNumberAs documented by MMC.
actualByteCountReturns 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);
bufferBuffer for the data transfer. The size of the buffer implies the size of the data transfer.
addressAs documented by MMC.
addressTypeAs documented by MMC.
actualByteCountReturns 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);
kilobytesPerSecondSpeed 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