Annotation of XNU/iokit/IOKit/storage/ata/IOATAPICDDriveNub.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: /*
                     23:  * Copyright (c) 1999 Apple Computer, Inc.  All rights reserved. 
                     24:  *
                     25:  * IOATAPICDDriveNub.h
                     26:  *
                     27:  * This subclass implements a relay to a protocol and device-specific
                     28:  * provider.
                     29:  *
                     30:  * HISTORY
                     31:  * 2-Sep-1999          Joe Liu (jliu) created.
                     32:  */
                     33: 
                     34: #ifndef        _IOATACDDRIVENUB_H
                     35: #define        _IOATACDDRIVENUB_H
                     36: 
                     37: #include <IOKit/IOTypes.h>
                     38: #include <IOKit/storage/IOCDDriveNub.h>
                     39: 
                     40: class IOATAPICDDrive;
                     41: 
                     42: class IOATAPICDDriveNub : public IOCDDriveNub 
                     43: {
                     44:     OSDeclareDefaultStructors(IOATAPICDDriveNub)
                     45: 
                     46: protected:
                     47:     IOATAPICDDrive *    _provider;
                     48: 
                     49: public:
                     50:     /*
                     51:      * Overrides from IOService.
                     52:      */
                     53:     virtual bool           attach(IOService * provider);
                     54:     virtual void           detach(IOService * provider);
                     55: 
                     56:     /*
                     57:      * Mandatory overrides from IOCDDriveNub.
                     58:      */
                     59:     virtual IOReturn   doAsyncReadWrite(IOMemoryDescriptor * buffer,
                     60:                                          UInt32               block,
                     61:                                                                                 UInt32               nblks,
                     62:                                          gdCompletionFunction action,
                     63:                                          IOService *          target,
                     64:                                                                                 void *               param);
                     65:     virtual IOReturn   doSyncReadWrite(IOMemoryDescriptor *buffer,
                     66:                                      UInt32 block,UInt32 nblks);
                     67: 
                     68:        /*
                     69:      * APIs used by the IOHDDrive portion of IOCDDriveNub.
                     70:      */        
                     71:     virtual IOReturn   doEjectMedia();
                     72:     virtual IOReturn   doLockUnlockMedia(bool doLock);
                     73:     virtual IOReturn   executeCdb(struct cdbParams *params);
                     74:     virtual char *      getVendorString();
                     75:     virtual char *      getProductString();
                     76:     virtual char *      getRevisionString();
                     77:     virtual char *      getAdditionalDeviceInfoString();
                     78:     virtual IOReturn   reportBlockSize(UInt64 * blockSize);
                     79:     virtual IOReturn   reportEjectability(bool * isEjectable);
                     80:     virtual IOReturn   reportLockability(bool * isLockable);
                     81:     virtual IOReturn   reportMediaState(bool * mediaPresent, bool * changed);    
                     82:     virtual IOReturn   reportPollRequirements(bool * pollIsRequired,
                     83:                                                bool * pollIsExpensive);
                     84:     virtual IOReturn   reportMaxReadTransfer (UInt64 blockSize,UInt64 * max);
                     85:     virtual IOReturn   reportMaxValidBlock(UInt64 * maxBlock);
                     86:     virtual IOReturn   reportRemovability(bool * isRemovable);
                     87: 
                     88:     /* ------------------------------------------------*/
                     89:     /* APIs that affect the entire media in the drive, */
                     90:     /* exported eventually by IOCDMedia:               */
                     91:     /* ------------------------------------------------*/
                     92: 
                     93:     virtual IOReturn   audioPause(bool pause);
                     94:     virtual IOReturn   audioScan(positioningType addressType, 
                     95:                                   cdAddress       address,
                     96:                                   bool            reverse);
                     97:     virtual IOReturn   readAudioData(positioningType addressType,
                     98:                                       cdAddress       address,
                     99:                                       UInt8           blockCount,
                    100:                                       UInt8 *         buffer);
                    101:     virtual IOReturn   readAudioSubcodes(positioningType addressType,
                    102:                                           cdAddress       address,
                    103:                                           UInt8           blockCount,
                    104:                                           UInt8 *         buffer);
                    105:     virtual IOReturn   readAudioWithQSubcode(positioningType addressType,
                    106:                                               cdAddress       address,
                    107:                                               UInt8           blockCount,
                    108:                                               UInt8 *         buffer);
                    109:     virtual IOReturn   readAudioWithAllSubcodes(positioningType addressType,
                    110:                                                  cdAddress       address,
                    111:                                                  UInt8           blockCount,
                    112:                                                  UInt8 *         buffer);
                    113:     virtual IOReturn   readHeader(UInt32              blockAddress,
                    114:                                    struct headerInfo * buffer);
                    115:     virtual IOReturn   readISRC(UInt32 track, UInt8 * buffer, bool * found);
                    116:     virtual IOReturn   readMCN(UInt8 * buffer,bool * found);
                    117:     virtual IOReturn   readQSubcodes(struct qSubcodeTocInfo * buffer,
                    118:                                       UInt32                   bufSize);
                    119:     virtual IOReturn   readSubcodeBuffer(UInt8 * buffer,
                    120:                                           bool    purge,
                    121:                                           UInt32  entryCount);
                    122:     virtual IOReturn   readTheQSubcode(struct qSubcode * buffer);
                    123:     virtual IOReturn   readTOC(struct rawToc * buffer,
                    124:                                 UInt32          length,
                    125:                                 tocFormat       format);
                    126:     virtual IOReturn   setAudioStopAddress(positioningType addressType,
                    127:                                             cdAddress       address);
                    128: 
                    129:     /* ---------------------------------------------------*/
                    130:     /*  APIs exported eventually by IOCDAudioNub:         */
                    131:     /* ---------------------------------------------------*/
                    132: 
                    133:     virtual IOReturn   audioPlay(positioningType addressType,
                    134:                                   cdAddress       address,
                    135:                                   audioPlayMode   mode);
                    136:     virtual IOReturn   audioTrackSearch(positioningType addressType,
                    137:                                          cdAddress       address,
                    138:                                          bool            startPlay,
                    139:                                          audioPlayMode   mode);
                    140:     virtual IOReturn   getAudioStatus(struct audioStatus * status);
                    141:     virtual IOReturn   readAudioVolume(UInt8 * leftVolume,
                    142:                                         UInt8 * rightVolume);
                    143:     virtual IOReturn   setVolume(UInt8 leftVolume, UInt8 rightVolume);
                    144: };
                    145: 
                    146: #endif /* !_IOATAPICDDRIVENUB_H */

unix.superglobalmegacorp.com

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