Annotation of XNU/iokit/IOKit/cdb/IOCDBCommand.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:  *     IOCDBCommand.h
        !            25:  *
        !            26:  */
        !            27: #ifndef _IOCDBCOMMAND_H
        !            28: #define _IOCDBCOMMAND_H
        !            29: 
        !            30: typedef void (*CallbackFn)(void *target, void *refcon );
        !            31: 
        !            32: class IOCDBDevice;
        !            33: 
        !            34: class IOCDBCommand : public OSObject
        !            35: {
        !            36:     OSDeclareAbstractStructors(IOCDBCommand)
        !            37: 
        !            38: /*------------------Methods provided to IOCDBCommand users -------------------------*/
        !            39: public:  
        !            40:     /*
        !            41:      * Set/Get IOMemoryDescriptor object to I/O data buffer or sense data buffer.
        !            42:      */
        !            43:     virtual void               setPointers( IOMemoryDescriptor         *desc, 
        !            44:                                             UInt32                     transferCount, 
        !            45:                                              bool                      isWrite, 
        !            46:                                             bool                       isSense = false ) = 0;
        !            47: 
        !            48:     virtual void               getPointers( IOMemoryDescriptor         **desc, 
        !            49:                                             UInt32                     *transferCount, 
        !            50:                                             bool                       *isWrite, 
        !            51:                                             bool                       isSense = false ) = 0;
        !            52:     /*
        !            53:      * Set/Get command timeout (mS)
        !            54:      */                
        !            55:     virtual void               setTimeout( UInt32  timeoutmS ) = 0;            
        !            56:     virtual UInt32             getTimeout() = 0;
        !            57: 
        !            58:     /*
        !            59:      * Set async callback routine. Specifying no parameters indicates synchronous call.
        !            60:      */
        !            61:     virtual void               setCallback( void *target = 0, CallbackFn callback = 0, void *refcon = 0 ) = 0;
        !            62: 
        !            63:     /*
        !            64:      * Set/Get CDB information. (Generic CDB version)
        !            65:      */        
        !            66:     virtual void               setCDB( CDBInfo *cdbInfo ) = 0;
        !            67:     virtual void               getCDB( CDBInfo *cdbInfo ) = 0;
        !            68: 
        !            69:     /*
        !            70:      * Get CDB results. (Generic CDB version)
        !            71:      */      
        !            72:     virtual IOReturn           getResults( CDBResults *cdbResults ) = 0;
        !            73: 
        !            74:     /*
        !            75:      * Get CDB Device this command is directed to.
        !            76:      */
        !            77:     virtual IOCDBDevice        *getDevice( IOCDBDevice *deviceType ) = 0;
        !            78:     #define kIOCDBDevice       ((IOCDBDevice *)0)
        !            79: 
        !            80:     /*
        !            81:      * Command verbs
        !            82:      */ 
        !            83:     virtual bool               execute( UInt32 *sequenceNumber = 0 ) = 0;
        !            84:     virtual void               abort( UInt32 sequenceNumber ) = 0;
        !            85:     virtual void               complete() = 0;
        !            86: 
        !            87:     /*
        !            88:      * Get pointers to client and command data.
        !            89:      */
        !            90:     virtual void               *getCommandData() = 0;
        !            91:     virtual void               *getClientData() = 0;
        !            92: 
        !            93:     /*
        !            94:      * Get unique sequence number assigned to command.
        !            95:      */
        !            96:     virtual UInt32             getSequenceNumber() = 0;
        !            97: };
        !            98: 
        !            99: #endif

unix.superglobalmegacorp.com

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