Annotation of XNU/iokit/IOKit/storage/scsi/IOSCSICDDriveNub.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
                      3:  *
                      4:  * @APPLE_LICENSE_HEADER_START@
                      5:  * 
                      6:  * The contents of this file constitute Original Code as defined in and
                      7:  * are subject to the Apple Public Source License Version 1.1 (the
                      8:  * "License").  You may not use this file except in compliance with the
                      9:  * License.  Please obtain a copy of the License at
                     10:  * http://www.apple.com/publicsource and read it before using this file.
                     11:  * 
                     12:  * This Original Code and all software distributed under the License are
                     13:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
                     14:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
                     15:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
                     16:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
                     17:  * License for the specific language governing rights and limitations
                     18:  * under the License.
                     19:  * 
                     20:  * @APPLE_LICENSE_HEADER_END@
                     21:  */
                     22: /* IOSCSICDDriveNub.h created by rick on Wed 07-Apr-1999 */
                     23: 
                     24: /* This subclass implements a relay to a protocol- and device-specific provider. */
                     25: 
                     26: #ifndef        _IOSCSICDDRIVENUB_H
                     27: #define        _IOSCSICDDRIVENUB_H
                     28: 
                     29: #include <IOKit/IOTypes.h>
                     30: #include <IOKit/storage/IOCDDriveNub.h>
                     31: 
                     32: class IOSCSICDDrive;
                     33: 
                     34: class IOSCSICDDriveNub : public IOCDDriveNub {
                     35: 
                     36:     OSDeclareDefaultStructors(IOSCSICDDriveNub)
                     37: 
                     38: public:
                     39: 
                     40:     /* Overrides from IOService */
                     41: 
                     42:     virtual bool       attach(IOService * provider);
                     43: 
                     44:     /* Overrides from IOCDDriveNub: */
                     45:     
                     46:     virtual IOReturn   doAsyncReadWrite(IOMemoryDescriptor *buffer,
                     47:                                             UInt32 block,UInt32 nblks,
                     48:                                             gdCompletionFunction action,
                     49:                                             IOService *target,void *param);
                     50:     virtual IOReturn   doSyncReadWrite(IOMemoryDescriptor *buffer,UInt32 block,UInt32 nblks);
                     51:     
                     52:     /* --------------------------------------------------------------------------*/
                     53:     /* Serrvice APIs used by the IOHDDrive portion of IOCDDriveNub: */
                     54:     /* --------------------------------------------------------------------------*/
                     55: 
                     56:     virtual IOReturn   doEjectMedia(void);
                     57:     virtual IOReturn   doLockUnlockMedia(bool doLock);
                     58:     virtual IOReturn   executeCdb(struct cdbParams *params);
                     59:     virtual char *     getVendorString(void);
                     60:     virtual char *     getProductString(void);
                     61:     virtual char *     getRevisionString(void);
                     62:     virtual char *     getAdditionalDeviceInfoString(void);
                     63:     virtual IOReturn   reportBlockSize(UInt64 *blockSize);
                     64:     virtual IOReturn   reportEjectability(bool *isEjectable);
                     65:     virtual IOReturn   reportLockability(bool *isLockable);
                     66:     virtual IOReturn   reportPollRequirements(bool *pollIsRequired,bool *pollIsExpensive);
                     67:     virtual IOReturn   reportMaxReadTransfer(UInt64 blockSize,UInt64 *max);
                     68:     virtual IOReturn   reportMaxValidBlock(UInt64 *maxBlock);
                     69:     virtual IOReturn   reportMediaState(bool *mediaPresent,bool *changed);    
                     70:     virtual IOReturn   reportRemovability(bool *isRemovable);
                     71: 
                     72:     /* ------------------------------------------------*/
                     73:     /* APIs that affect the entire media in the drive, */
                     74:     /* exported eventually by IOCDMedia:               */
                     75:     /* ------------------------------------------------*/
                     76: 
                     77:     virtual IOReturn   audioPause(bool pause);
                     78:     virtual IOReturn   audioScan(positioningType addressType,cdAddress address,
                     79:                                                bool reverse);
                     80:     virtual IOReturn   readAudioData(positioningType addressType,cdAddress address,
                     81:                                        UInt8 blockCount,UInt8 *buffer);
                     82:     virtual IOReturn   readAudioSubcodes(positioningType addressType,cdAddress address,
                     83:                                        UInt8 blockCount,UInt8 *buffer);
                     84:     virtual IOReturn   readAudioWithQSubcode(positioningType addressType,cdAddress address,
                     85:                                        UInt8 blockCount,UInt8 *buffer);
                     86:     virtual IOReturn   readAudioWithAllSubcodes(positioningType addressType,cdAddress address,
                     87:                                        UInt8 blockCount,UInt8 *buffer);
                     88:     virtual IOReturn   readHeader(UInt32 blockAddress,struct headerInfo *buffer);
                     89:     virtual IOReturn   readISRC(UInt32 track,UInt8 *buffer,bool *found);
                     90:     virtual IOReturn   readMCN(UInt8 *buffer,bool *found);
                     91:     virtual IOReturn   readQSubcodes(struct qSubcodeTocInfo *buffer,UInt32 bufSize);
                     92:     virtual IOReturn   readSubcodeBuffer(UInt8 *buffer,bool purge,UInt32 entryCount);
                     93:     virtual IOReturn   readTheQSubcode(struct qSubcode *buffer);
                     94:     virtual IOReturn   readTOC(struct rawToc *buffer,UInt32 length,tocFormat format);
                     95:     virtual IOReturn   setAudioStopAddress(positioningType addressType,cdAddress address);
                     96: 
                     97:     /* ---------------------------------------------------*/
                     98:     /*  APIs exported eventually by IOCDAudioNub:         */
                     99:     /* ---------------------------------------------------*/
                    100: 
                    101:     virtual IOReturn   audioPlay(positioningType addressType,cdAddress address,
                    102:                                                audioPlayMode mode);
                    103:     virtual IOReturn   audioTrackSearch(positioningType addressType,cdAddress address,
                    104:                                                bool startPlay,audioPlayMode mode);
                    105:     virtual IOReturn   getAudioStatus(struct audioStatus *status);
                    106:     virtual IOReturn   readAudioVolume(UInt8 *leftVolume,UInt8 *rightVolume);
                    107:     virtual IOReturn   setVolume(UInt8 leftVolume,UInt8 rightVolume);
                    108: 
                    109: protected:
                    110: 
                    111:     virtual void       dump(char *buf,int count);
                    112:     
                    113:     IOSCSICDDrive *    _provider;
                    114: };
                    115: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.