Annotation of XNU/iokit/IOKit/scsi/scsi-device/IOSCSIDevice.h, revision 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:  *
        !            24:  *     IOSCSIDevice.h
        !            25:  *
        !            26:  *
        !            27:  *     Methods in this header provide information about the SCSI device 
        !            28:  *      the device client driver is submitting the SCSICommand(s) to.
        !            29:  *
        !            30:  *     Note: SCSICommand(s) are allocated and freed by methods in this class. 
        !            31:  *            The remaining methods to setup and submit SCSICommands are defined in
        !            32:  *            IOSCSICommand.h
        !            33:  */
        !            34: 
        !            35: #ifndef _IOSCSIDEVICE_H
        !            36: #define _IOSCSIDEVICE_H
        !            37: 
        !            38: class IOSCSICommand;
        !            39: 
        !            40: class IOSCSIDevice : public IOCDBDevice
        !            41: {
        !            42:     OSDeclareAbstractStructors(IOSCSIDevice)
        !            43: 
        !            44: /*------------------Methods provided to IOCDBDevice clients-----------------------*/
        !            45: public:
        !            46: 
        !            47:     /*
        !            48:      * Allocate a CDB Command
        !            49:      */
        !            50:     virtual IOCDBCommand       *allocCommand( IOCDBDevice *cdbDevice, UInt32 clientDataSize = 0 ) = 0;
        !            51: 
        !            52:     /*
        !            53:      * Abort all outstanding commands on this device
        !            54:      */
        !            55:     virtual void               abort() = 0;
        !            56:     
        !            57:     /*
        !            58:      * Reset device (also aborts all outstanding commands)
        !            59:      */
        !            60:     virtual void               reset() = 0;
        !            61: 
        !            62:     /*
        !            63:      * Obtain information about this device
        !            64:      */
        !            65:     virtual void               getInquiryData( void    *inquiryBuffer, 
        !            66:                                                 UInt32  inquiryBufSize, 
        !            67:                                                 UInt32  *inquiryDataSize ) = 0;
        !            68: 
        !            69: /*------------------Additional methods provided to IOSCSIDevice clients-----------------------*/
        !            70: public:
        !            71:     /*
        !            72:      * Allocate a SCSICommand
        !            73:      */
        !            74:     virtual IOSCSICommand      *allocCommand( IOSCSIDevice *scsiDevice, UInt32 clientDataSize = 0 ) = 0;
        !            75: 
        !            76:     /*
        !            77:      * Target management commands
        !            78:      */
        !            79:     virtual bool                setTargetParms( SCSITargetParms *targetParms ) = 0;
        !            80:     virtual void                getTargetParms( SCSITargetParms *targetParms ) = 0;
        !            81: 
        !            82:     /* 
        !            83:      * Lun management commands
        !            84:      */
        !            85:     virtual bool               setLunParms( SCSILunParms *lunParms ) = 0;
        !            86:     virtual void               getLunParms( SCSILunParms *lunParms ) = 0;
        !            87: 
        !            88:     /* 
        !            89:      * Queue management commands
        !            90:      */
        !            91:     virtual void               holdQueue( UInt32 queueType )    = 0;
        !            92:     virtual void               releaseQueue( UInt32 queueType ) = 0;
        !            93:     virtual void               flushQueue( UInt32 queueType, IOReturn rc ) = 0;
        !            94:     virtual void               notifyIdle(  void *target = 0, CallbackFn callback = 0, void *refcon = 0 ) = 0;
        !            95: 
        !            96: };
        !            97: 
        !            98: #define kIOSCSIDevice          ((IOSCSIDevice *)0)
        !            99: 
        !           100: #endif

unix.superglobalmegacorp.com

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