2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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.
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
20 * @APPLE_LICENSE_HEADER_END@
25 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
29 * 2001-01-18 gvdl Made the primary queue pointer public, to be used when
31 * 11/13/2000 CJS Created IOCommand class and implementation
38 * This header contains the IOCommand class definition.
41 #ifndef _IOKIT_IO_COMMAND_H_
42 #define _IOKIT_IO_COMMAND_H_
48 #if defined(KERNEL) && defined(__cplusplus)
50 #include <kern/queue.h>
51 #include <libkern/c++/OSObject.h>
56 * This class is an abstract class which represents an I/O command.
58 * This class is an abstract class which represents an I/O command passed
59 * from a device driver to a controller. All controller commands (e.g. IOATACommand)
60 * should inherit from this class.
63 class IOCommand
: public OSObject
65 OSDeclareDefaultStructors(IOCommand
)
68 virtual bool init(void);
70 /*! @var fCommandChain
71 This variable is used by the current 'owner' to queue the command. During the life cycle of a command it moves through a series of queues. This is the queue pointer for it. Only valid while 'ownership' is clear. For instance a IOCommandPool uses this pointer to maintain its list of free commands. May be manipulated using the kern/queue.h macros */
72 queue_chain_t fCommandChain
; /* used to queue commands */
75 #endif /* defined(KERNEL) && defined(__cplusplus) */
77 #endif /* _IOKIT_IO_COMMAND_H_ */