]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * Copyright (c) 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 | * | |
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 | ||
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 | { | |
65 | OSDeclareDefaultStructors(IOCommand) | |
66 | ||
67 | public: | |
68 | virtual bool init(void); | |
69 | ||
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_ */ |