]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
6601e61a | 4 | * @APPLE_LICENSE_HEADER_START@ |
1c79356b | 5 | * |
6601e61a A |
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. | |
8f6c56a5 | 11 | * |
6601e61a A |
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 | |
8f6c56a5 A |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
6601e61a A |
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. | |
8f6c56a5 | 19 | * |
6601e61a | 20 | * @APPLE_LICENSE_HEADER_END@ |
1c79356b A |
21 | */ |
22 | ||
23 | /* | |
24 | * | |
25 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
26 | * | |
27 | * HISTORY | |
28 | * | |
29 | * 2001-01-18 gvdl Made the primary queue pointer public, to be used when | |
30 | * Ownership is clear. | |
31 | * 11/13/2000 CJS Created IOCommand class and implementation | |
32 | * | |
33 | */ | |
34 | ||
35 | /*! | |
36 | * @header IOCommand | |
37 | * @abstract | |
38 | * This header contains the IOCommand class definition. | |
39 | */ | |
40 | ||
41 | #ifndef _IOKIT_IO_COMMAND_H_ | |
42 | #define _IOKIT_IO_COMMAND_H_ | |
43 | ||
44 | /* | |
45 | * Kernel | |
46 | */ | |
47 | ||
48 | #if defined(KERNEL) && defined(__cplusplus) | |
49 | ||
50 | #include <kern/queue.h> | |
51 | #include <libkern/c++/OSObject.h> | |
52 | ||
1c79356b A |
53 | /*! |
54 | * @class IOCommand | |
55 | * @abstract | |
56 | * This class is an abstract class which represents an I/O command. | |
57 | * @discussion | |
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. | |
61 | */ | |
62 | ||
63 | class IOCommand : public OSObject | |
64 | { | |
91447636 | 65 | OSDeclareDefaultStructors(IOCommand) |
1c79356b | 66 | |
91447636 | 67 | public: |
1c79356b A |
68 | virtual bool init(void); |
69 | ||
1c79356b A |
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 */ | |
73 | }; | |
74 | ||
75 | #endif /* defined(KERNEL) && defined(__cplusplus) */ | |
76 | ||
77 | #endif /* _IOKIT_IO_COMMAND_H_ */ |