Annotation of XNU/iokit/IOKit/storage/ata/IOATAPIHDDriveNub.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:  * IOATAPIHDDriveNub.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        _IOATAPIHDDRIVENUB_H
                     35: #define        _IOATAPIHDDRIVENUB_H
                     36: 
                     37: #include <IOKit/IOTypes.h>
                     38: #include <IOKit/storage/IOHDDriveNub.h>
                     39: 
                     40: class IOATAPIHDDrive;
                     41: 
                     42: class IOATAPIHDDriveNub : public IOHDDriveNub
                     43: {
                     44:     OSDeclareDefaultStructors(IOATAPIHDDriveNub)
                     45: 
                     46: protected:
                     47:     IOATAPIHDDrive *    _provider;
                     48:        
                     49: public:
                     50:     /* Overrides from IOService */
                     51: 
                     52:     virtual bool           attach(IOService * provider);
                     53:     virtual void           detach(IOService * provider);
                     54: 
                     55:     /* Mandatory overrides from IOHDDriveNub */
                     56: 
                     57:     virtual IOReturn   doAsyncReadWrite(IOMemoryDescriptor * buffer,
                     58:                                          UInt32               block,
                     59:                                                                                 UInt32               nblks,
                     60:                                          gdCompletionFunction action,
                     61:                                          IOService *          target,
                     62:                                                                                 void *               param);
                     63:     virtual IOReturn   doSyncReadWrite(IOMemoryDescriptor *buffer,
                     64:                                      UInt32 block,UInt32 nblks);
                     65:     virtual IOReturn   doEjectMedia();
                     66:     virtual IOReturn   doFormatMedia(UInt64 byteCapacity);  
                     67:     virtual UInt32      doGetFormatCapacities(UInt64 * capacities,
                     68:                                               UInt32   capacitiesMaxCount) 
                     69:                                                                                          const;
                     70:     virtual IOReturn   doLockUnlockMedia(bool doLock);
                     71:     virtual IOReturn   doSynchronizeCache();
                     72:     virtual IOReturn   executeCdb(struct cdbParams *params);
                     73:     virtual char *      getVendorString();
                     74:     virtual char *      getProductString();
                     75:     virtual char *      getRevisionString();
                     76:     virtual char *      getAdditionalDeviceInfoString();
                     77:     virtual IOReturn   reportBlockSize(UInt64 * blockSize);
                     78:     virtual IOReturn   reportEjectability(bool * isEjectable);
                     79:     virtual IOReturn   reportLockability(bool * isLockable);
                     80:     virtual IOReturn   reportMediaState(bool * mediaPresent, bool * changed);    
                     81:     virtual IOReturn   reportPollRequirements(bool * pollIsRequired,
                     82:                                                bool * pollIsExpensive);
                     83:     virtual IOReturn   reportMaxReadTransfer (UInt64 blockSize,UInt64 * max);
                     84:     virtual IOReturn   reportMaxValidBlock(UInt64 * maxBlock);
                     85:     virtual IOReturn   reportMaxWriteTransfer(UInt64 blockSize,UInt64 * max);
                     86:     virtual IOReturn   reportRemovability(bool * isRemovable);
                     87:     virtual IOReturn   reportWriteProtection(bool * isWriteProtected);
                     88: };
                     89: 
                     90: #endif /* !_IOATAPIHDDRIVENUB_H */

unix.superglobalmegacorp.com

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