Annotation of XNU/iokit/IOKit/storage/ata/IOATAPICDDrive.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:  * IOATAPIHDDrive.h - Generic ATAPI CD-ROM driver.
                     26:  *
                     27:  * HISTORY
                     28:  * Sep 2, 1999 jliu - Ported from AppleATAPIDrive.
                     29:  */
                     30: 
                     31: #ifndef        _IOATAPICDDRIVE_H
                     32: #define        _IOATAPICDDRIVE_H
                     33: 
                     34: #include <IOKit/IOTypes.h>
                     35: #include <IOKit/storage/ata/IOATAPIHDDrive.h>
                     36: 
                     37: // ==========================================================================
                     38: // IOATAPICDDrive
                     39: // ==========================================================================
                     40: 
                     41: class IOATAPICDDrive : public IOATAPIHDDrive
                     42: {
                     43:     OSDeclareDefaultStructors(IOATAPICDDrive)
                     44: 
                     45: private:
                     46:     UInt32 fMSFStopAddress, fLBAStopAddress, fStatus;
                     47:  
                     48: 
                     49: protected:
                     50:        //-----------------------------------------------------------------------
                     51:        // Given the device type from the ATAPI Inquiry data, returns true if
                     52:        // the device type is supported by this driver.
                     53: 
                     54:        virtual bool           matchATAPIDeviceType(UInt8 type);
                     55: 
                     56:        //-----------------------------------------------------------------------
                     57:        // Overrides the method in IOATAPIHDDrive and returns an
                     58:        // IOATAPICDDriveNub instance.
                     59: 
                     60:     virtual IOService *           instantiateNub();
                     61: 
                     62: public:
                     63:        //-----------------------------------------------------------------------
                     64:        // IOATAHDDrive override. Returns the device type.
                     65: 
                     66:     virtual const char *   getDeviceTypeName();
                     67: 
                     68:        //-----------------------------------------------------------------------
                     69:        // IOATAPIHDDrive override. Reports whether media is write protected.
                     70: 
                     71:        virtual IOReturn       reportWriteProtection(bool * isWriteProtected);
                     72: 
                     73:        //-----------------------------------------------------------------------
                     74:        // Read the Table of Contents.
                     75: 
                     76:        virtual IOReturn       readTOC(struct rawToc * buffer,
                     77:                                    UInt32          length,
                     78:                                    tocFormat       format);
                     79: 
                     80:        // Play audio
                     81:         virtual IOReturn       setAudioStopAddress (positioningType addressType,
                     82:                                      cdAddress address);
                     83: 
                     84:        virtual IOReturn       audioPlay(positioningType addressType,
                     85:                                    cdAddress address,
                     86:                                    audioPlayMode mode);
                     87: 
                     88:        virtual IOReturn       playAudioMSF(UInt32 start_msf,
                     89:                                    UInt32 end_msf);
                     90: 
                     91:        virtual IOReturn       playAudio(UInt32 start_lba,
                     92:                                    UInt32 len_lba);
                     93: 
                     94:        virtual IOReturn       audioPause(bool pause);
                     95: 
                     96:        virtual IOReturn       readAudioVolume(UInt8 * leftVolume,
                     97:                                    UInt8 * rightVolume);
                     98: 
                     99:        virtual IOReturn       setVolume(UInt8 leftVolume, UInt8 rightVolume);
                    100: 
                    101:         virtual IOReturn       readModeSense(UInt8 * buffer,
                    102:                                    UInt32 length, UInt32 pageCode);
                    103: 
                    104:         virtual IOReturn       writeModeSelect(UInt8 * buffer,
                    105:                                    UInt32 length, UInt32 pageCode);
                    106: 
                    107:         virtual IOReturn       getAudioStatus(struct audioStatus *status);
                    108: 
                    109:         virtual IOReturn       readTheQSubcode(struct qSubcode *buffer);
                    110: 
                    111:         virtual IOReturn       readSubChannel(UInt8 * buffer,
                    112:                                    UInt32 length,
                    113:                                    UInt8 dataFormat,
                    114:                                    UInt8 trackNumber,
                    115:                                    bool subQ);
                    116: 
                    117:         virtual IOReturn       readMCN(UInt8 * buffer, bool * found);
                    118: 
                    119:         virtual IOReturn       readISRC(UInt32 track,
                    120:                                    UInt8 * buffer, bool * found);
                    121: 
                    122:         virtual IOReturn       readHeader(UInt32 blockAddress,
                    123:                                    struct headerInfo *buffer);
                    124: 
                    125: };
                    126: 
                    127: #endif /* !_IOATAPICDDRIVE_H */

unix.superglobalmegacorp.com

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