1/* 2 * Copyright (c) 1998-2012 Apple Inc. All rights reserved. 3 * 4 * @APPLE_LICENSE_HEADER_START@ 5 * 6 * This file contains Original Code and/or Modifications of Original Code 7 * as defined in and that are subject to the Apple Public Source License 8 * Version 2.0 (the 'License'). You may not use this file except in 9 * compliance with the License. Please obtain a copy of the License at 10 * http://www.opensource.apple.com/apsl/ and read it before using this 11 * file. 12 * 13 * The Original Code and all software distributed under the License are 14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 * Please see the License for the specific language governing rights and 19 * limitations under the License. 20 * 21 * @APPLE_LICENSE_HEADER_END@ 22 */ 23#include <IOKit/storage/IOCDBlockStorageDevice.h> 24 25#define super IOBlockStorageDevice 26OSDefineMetaClassAndAbstractStructors(IOCDBlockStorageDevice,IOBlockStorageDevice) 27 28bool 29IOCDBlockStorageDevice::init(OSDictionary * properties) 30{ 31 bool result; 32 33 result = super::init(properties); 34 if (result) { 35 setProperty(kIOBlockStorageDeviceTypeKey, 36 kIOBlockStorageDeviceTypeCDROM); 37 } 38 39 return(result); 40} 41 42#ifndef __LP64__ 43IOReturn 44IOCDBlockStorageDevice::audioPause(bool pause) 45{ 46 return(kIOReturnUnsupported); 47} 48 49IOReturn 50IOCDBlockStorageDevice::audioPlay(CDMSF timeStart,CDMSF timeStop) 51{ 52 return(kIOReturnUnsupported); 53} 54 55IOReturn 56IOCDBlockStorageDevice::audioScan(CDMSF timeStart,bool reverse) 57{ 58 return(kIOReturnUnsupported); 59} 60 61IOReturn 62IOCDBlockStorageDevice::audioStop() 63{ 64 return(kIOReturnUnsupported); 65} 66 67IOReturn 68IOCDBlockStorageDevice::getAudioStatus(CDAudioStatus *status) 69{ 70 return(kIOReturnUnsupported); 71} 72 73IOReturn 74IOCDBlockStorageDevice::getAudioVolume(UInt8 *leftVolume,UInt8 *rightVolume) 75{ 76 return(kIOReturnUnsupported); 77} 78 79IOReturn 80IOCDBlockStorageDevice::setAudioVolume(UInt8 leftVolume,UInt8 rightVolume) 81{ 82 return(kIOReturnUnsupported); 83} 84 85IOReturn 86IOCDBlockStorageDevice::getSpeed(UInt16 * kilobytesPerSecond) 87{ 88 return(kIOReturnUnsupported); 89} 90 91IOReturn 92IOCDBlockStorageDevice::setSpeed(UInt16 kilobytesPerSecond) 93{ 94 return(kIOReturnUnsupported); 95} 96 97IOReturn 98IOCDBlockStorageDevice::readTOC(IOMemoryDescriptor *buffer,CDTOCFormat format, 99 UInt8 msf,UInt8 trackSessionNumber, 100 UInt16 *actualByteCount) 101{ 102 if (actualByteCount) { 103 *actualByteCount = 0; 104 } 105 return(kIOReturnUnsupported); 106} 107 108IOReturn 109IOCDBlockStorageDevice::readDiscInfo(IOMemoryDescriptor *buffer, 110 UInt16 *actualByteCount) 111{ 112 if (actualByteCount) { 113 *actualByteCount = 0; 114 } 115 return(kIOReturnUnsupported); 116} 117 118IOReturn 119IOCDBlockStorageDevice::readTrackInfo(IOMemoryDescriptor *buffer,UInt32 address, 120 CDTrackInfoAddressType addressType, 121 UInt16 *actualByteCount) 122{ 123 if (actualByteCount) { 124 *actualByteCount = 0; 125 } 126 return(kIOReturnUnsupported); 127} 128#endif /* !__LP64__ */ 129 130#ifdef __LP64__ 131OSMetaClassDefineReservedUnused(IOCDBlockStorageDevice, 0); 132OSMetaClassDefineReservedUnused(IOCDBlockStorageDevice, 1); 133OSMetaClassDefineReservedUnused(IOCDBlockStorageDevice, 2); 134OSMetaClassDefineReservedUnused(IOCDBlockStorageDevice, 3); 135OSMetaClassDefineReservedUnused(IOCDBlockStorageDevice, 4); 136#else /* !__LP64__ */ 137OSMetaClassDefineReservedUsed(IOCDBlockStorageDevice, 0); 138OSMetaClassDefineReservedUsed(IOCDBlockStorageDevice, 1); 139OSMetaClassDefineReservedUsed(IOCDBlockStorageDevice, 2); 140OSMetaClassDefineReservedUsed(IOCDBlockStorageDevice, 3); 141OSMetaClassDefineReservedUsed(IOCDBlockStorageDevice, 4); 142#endif /* !__LP64__ */ 143OSMetaClassDefineReservedUnused(IOCDBlockStorageDevice, 5); 144OSMetaClassDefineReservedUnused(IOCDBlockStorageDevice, 6); 145OSMetaClassDefineReservedUnused(IOCDBlockStorageDevice, 7); 146OSMetaClassDefineReservedUnused(IOCDBlockStorageDevice, 8); 147OSMetaClassDefineReservedUnused(IOCDBlockStorageDevice, 9); 148OSMetaClassDefineReservedUnused(IOCDBlockStorageDevice, 10); 149OSMetaClassDefineReservedUnused(IOCDBlockStorageDevice, 11); 150OSMetaClassDefineReservedUnused(IOCDBlockStorageDevice, 12); 151OSMetaClassDefineReservedUnused(IOCDBlockStorageDevice, 13); 152OSMetaClassDefineReservedUnused(IOCDBlockStorageDevice, 14); 153OSMetaClassDefineReservedUnused(IOCDBlockStorageDevice, 15); 154