]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
2d21ac55 | 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ |
1c79356b | 5 | * |
2d21ac55 A |
6 | * This file contains Original Code and/or Modifications of Original Code |
7 | * as defined in and that are subject to the Apple Public Source License | |
8 | * Version 2.0 (the 'License'). You may not use this file except in | |
9 | * compliance with the License. The rights granted to you under the License | |
fe8ab488 | 10 | * may not be used to create, or enable the creation or redistribution of, |
2d21ac55 A |
11 | * unlawful or unlicensed copies of an Apple operating system, or to |
12 | * circumvent, violate, or enable the circumvention or violation of, any | |
13 | * terms of an Apple operating system software license agreement. | |
8f6c56a5 | 14 | * |
2d21ac55 A |
15 | * Please obtain a copy of the License at |
16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | |
17 | * | |
18 | * The Original Code and all software distributed under the License are | |
19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
8f6c56a5 A |
20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
2d21ac55 A |
22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. |
23 | * Please see the License for the specific language governing rights and | |
24 | * limitations under the License. | |
8f6c56a5 | 25 | * |
2d21ac55 | 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ |
1c79356b A |
27 | */ |
28 | ||
29 | #ifndef __IOKIT_IOMESSAGE_H | |
30 | #define __IOKIT_IOMESSAGE_H | |
31 | ||
32 | #include <IOKit/IOReturn.h> | |
33 | #include <IOKit/IOTypes.h> | |
34 | ||
6d2010ae A |
35 | /*! |
36 | * @header IOMessage.h | |
37 | * | |
38 | * Defines message type constants for several IOKit messaging API's. | |
39 | * | |
40 | */ | |
41 | ||
1c79356b A |
42 | typedef UInt32 IOMessage; |
43 | ||
91447636 A |
44 | #define iokit_common_msg(message) (UInt32)(sys_iokit|sub_iokit_common|message) |
45 | #define iokit_family_msg(sub,message) (UInt32)(sys_iokit|sub|message) | |
46 | ||
6d2010ae A |
47 | /*! |
48 | * @defined iokit_vendor_specific_msg | |
49 | * @discussion iokit_vendor_specific_msg passes messages in the sub_iokit_vendor_specific | |
50 | * subsystem. It can be used to generate messages that are used for private | |
51 | * communication between vendor specific code with the IOService::message() etc. APIs. | |
52 | */ | |
91447636 | 53 | #define iokit_vendor_specific_msg(message) (UInt32)(sys_iokit|sub_iokit_vendor_specific|message) |
1c79356b A |
54 | |
55 | #define kIOMessageServiceIsTerminated iokit_common_msg(0x010) | |
56 | #define kIOMessageServiceIsSuspended iokit_common_msg(0x020) | |
57 | #define kIOMessageServiceIsResumed iokit_common_msg(0x030) | |
58 | ||
59 | #define kIOMessageServiceIsRequestingClose iokit_common_msg(0x100) | |
0b4e3aa0 | 60 | #define kIOMessageServiceIsAttemptingOpen iokit_common_msg(0x101) |
1c79356b A |
61 | #define kIOMessageServiceWasClosed iokit_common_msg(0x110) |
62 | ||
63 | #define kIOMessageServiceBusyStateChange iokit_common_msg(0x120) | |
64 | ||
6d2010ae A |
65 | #define kIOMessageConsoleSecurityChange iokit_common_msg(0x128) |
66 | ||
55e303ae A |
67 | #define kIOMessageServicePropertyChange iokit_common_msg(0x130) |
68 | ||
6d2010ae A |
69 | #define kIOMessageCopyClientID iokit_common_msg(0x330) |
70 | ||
71 | #define kIOMessageSystemCapabilityChange iokit_common_msg(0x340) | |
72 | #define kIOMessageDeviceSignaledWakeup iokit_common_msg(0x350) | |
73 | ||
74 | ||
75 | /*! | |
76 | * @defined kIOMessageDeviceWillPowerOff | |
77 | * @discussion Indicates the device is about to move to a lower power state. | |
78 | * Sent to IOKit interest notification clients of type <code>kIOAppPowerStateInterest</code> | |
79 | * and <code>kIOGeneralInterest</code>. | |
80 | */ | |
1c79356b | 81 | #define kIOMessageDeviceWillPowerOff iokit_common_msg(0x210) |
6d2010ae A |
82 | |
83 | /*! | |
84 | * @defined kIOMessageDeviceHasPoweredOn | |
85 | * @discussion Indicates the device has just moved to a higher power state. | |
86 | * Sent to IOKit interest notification clients of type <code>kIOAppPowerStateInterest</code> | |
87 | * and <code>kIOGeneralInterest</code>. | |
88 | */ | |
1c79356b | 89 | #define kIOMessageDeviceHasPoweredOn iokit_common_msg(0x230) |
0b4c1975 | 90 | |
6d2010ae A |
91 | /*! @group In-kernel system shutdown and restart notifications |
92 | */ | |
0b4c1975 | 93 | |
6d2010ae A |
94 | /*! |
95 | * @defined kIOMessageSystemWillPowerOff | |
96 | * @discussion Indicates an imminent system shutdown. Recipients have a limited | |
97 | * amount of time to respond, otherwise the system will timeout and | |
98 | * shutdown even without a response. | |
99 | * Delivered to in-kernel IOKit drivers via <code>IOService::systemWillShutdown()</code>, | |
100 | * and to clients of <code>registerPrioritySleepWakeInterest()</code>. | |
101 | * Never delivered to user space notification clients. | |
102 | */ | |
1c79356b | 103 | #define kIOMessageSystemWillPowerOff iokit_common_msg(0x250) |
6d2010ae A |
104 | |
105 | /*! | |
106 | * @defined kIOMessageSystemWillRestart | |
107 | * @discussion Indicates an imminent system restart. Recipients have a limited | |
108 | * amount of time to respond, otherwise the system will timeout and | |
109 | * restart even without a response. | |
110 | * Delivered to in-kernel IOKit drivers via <code>IOService::systemWillShutdown()</code>, | |
111 | * and to clients of <code>registerPrioritySleepWakeInterest()</code>. | |
112 | * Never delivered to user space notification clients. | |
113 | */ | |
114 | #define kIOMessageSystemWillRestart iokit_common_msg(0x310) | |
115 | ||
116 | /*! | |
117 | * @defined kIOMessageSystemPagingOff | |
118 | * @discussion Indicates an imminent system shutdown, paging device now unavailable. | |
119 | * Recipients have a limited amount of time to respond, otherwise the | |
120 | * system will timeout and shutdown even without a response. | |
121 | * Delivered to clients of <code>registerPrioritySleepWakeInterest()</code>. | |
122 | * Never delivered to user space notification clients. | |
123 | */ | |
124 | #define kIOMessageSystemPagingOff iokit_common_msg(0x255) | |
125 | ||
126 | ||
127 | /*! @group System sleep and wake notifications | |
128 | */ | |
129 | ||
130 | /*! | |
131 | * @defined kIOMessageCanSystemSleep | |
132 | * @discussion Announces/Requests permission to proceed to system sleep. | |
133 | * Delivered to in-kernel IOKit drivers via <code>kIOGeneralInterest</code> | |
134 | * and <code>kIOPriorityPowerStateInterest</code>. | |
135 | * Delivered to user clients of <code>IORegisterForSystemPower</code>. | |
136 | */ | |
1c79356b | 137 | #define kIOMessageCanSystemSleep iokit_common_msg(0x270) |
6d2010ae A |
138 | |
139 | /*! | |
140 | * @defined kIOMessageSystemWillNotSleep | |
141 | * @discussion Announces that the system has retracted a previous attempt to sleep; | |
142 | * it follows <code>kIOMessageCanSystemSleep</code>. | |
143 | * Delivered to in-kernel IOKit drivers via <code>kIOGeneralInterest</code> | |
144 | * and <code>kIOPriorityPowerStateInterest</code>. | |
145 | * Delivered to user clients of <code>IORegisterForSystemPower</code>. | |
146 | */ | |
1c79356b | 147 | #define kIOMessageSystemWillNotSleep iokit_common_msg(0x290) |
6d2010ae A |
148 | |
149 | /*! | |
150 | * @defined kIOMessageSystemWillSleep | |
151 | * @discussion Announces that sleep is beginning. | |
152 | * Delivered to in-kernel IOKit drivers via <code>kIOGeneralInterest</code> | |
153 | * and <code>kIOPriorityPowerStateInterest</code>. | |
154 | * Delivered to user clients of <code>IORegisterForSystemPower</code>. | |
155 | */ | |
156 | #define kIOMessageSystemWillSleep iokit_common_msg(0x280) | |
157 | ||
158 | /*! | |
159 | * @defined kIOMessageSystemWillPowerOn | |
160 | * @discussion Announces that the system is beginning to power the device tree; most | |
161 | * devices are unavailable at this point.. | |
162 | * Delivered to in-kernel IOKit drivers via <code>kIOGeneralInterest</code> | |
163 | * and <code>kIOPriorityPowerStateInterest</code>. | |
164 | * Delivered to user clients of <code>IORegisterForSystemPower</code>. | |
165 | */ | |
55e303ae | 166 | #define kIOMessageSystemWillPowerOn iokit_common_msg(0x320) |
1c79356b | 167 | |
6d2010ae A |
168 | /*! |
169 | * @defined kIOMessageSystemHasPoweredOn | |
170 | * @discussion Announces that the system and its devices have woken up. | |
171 | * Delivered to in-kernel IOKit drivers via <code>kIOGeneralInterest</code> | |
172 | * and <code>kIOPriorityPowerStateInterest</code>. | |
173 | * Delivered to user clients of <code>IORegisterForSystemPower</code>. | |
174 | */ | |
175 | #define kIOMessageSystemHasPoweredOn iokit_common_msg(0x300) | |
176 | ||
177 | /*! @group Unused and deprecated notifications | |
178 | */ | |
179 | ||
180 | /*! | |
181 | * @defined kIOMessageCanDevicePowerOff | |
182 | * @discussion Delivered to <code>kIOAppPowerStateInterest</code> clients of | |
183 | * devices that implement their own idle timeouts. | |
184 | * This message type is almost never used. | |
185 | */ | |
186 | #define kIOMessageCanDevicePowerOff iokit_common_msg(0x200) | |
187 | ||
188 | /*! | |
189 | * @defined kIOMessageDeviceWillNotPowerOff | |
190 | * @discussion This IOKit interest notification is largely unused; | |
191 | * it's not very interesting. | |
192 | */ | |
193 | #define kIOMessageDeviceWillNotPowerOff iokit_common_msg(0x220) | |
194 | ||
195 | /*! | |
196 | * @defined kIOMessageSystemWillNotPowerOff | |
197 | * @deprecated This IOKit message is unused. | |
198 | */ | |
199 | #define kIOMessageSystemWillNotPowerOff iokit_common_msg(0x260) | |
200 | ||
201 | /*! | |
202 | * @defined kIOMessageCanSystemPowerOff | |
203 | * @deprecated This IOKit message is unused. | |
204 | */ | |
205 | #define kIOMessageCanSystemPowerOff iokit_common_msg(0x240) | |
206 | ||
207 | /*! | |
208 | * @defined kIOMessageDeviceWillPowerOn | |
209 | * @discussion IOService power mgt does not send kIOMessageDeviceWillPowerOn. | |
210 | */ | |
211 | #define kIOMessageDeviceWillPowerOn iokit_common_msg(0x215) | |
212 | ||
213 | /*! | |
214 | * @defined kIOMessageDeviceHasPoweredOff | |
215 | * @discussion IOService power mgt does not send kIOMessageDeviceHasPoweredOff. | |
216 | */ | |
217 | #define kIOMessageDeviceHasPoweredOff iokit_common_msg(0x225) | |
218 | ||
2d21ac55 | 219 | |
1c79356b | 220 | #endif /* ! __IOKIT_IOMESSAGE_H */ |