]>
git.saurik.com Git - apple/xnu.git/blob - iokit/IOKit/IOMessage.h
2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
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
10 * may not be used to create, or enable the creation or redistribution of,
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.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
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
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
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.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
29 #ifndef __IOKIT_IOMESSAGE_H
30 #define __IOKIT_IOMESSAGE_H
32 #include <IOKit/IOReturn.h>
33 #include <IOKit/IOTypes.h>
38 * Defines message type constants for several IOKit messaging API's.
42 typedef UInt32 IOMessage
;
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)
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.
53 #define iokit_vendor_specific_msg(message) (UInt32)(sys_iokit|sub_iokit_vendor_specific|message)
55 #define kIOMessageServiceIsTerminated iokit_common_msg(0x010)
56 #define kIOMessageServiceIsSuspended iokit_common_msg(0x020)
57 #define kIOMessageServiceIsResumed iokit_common_msg(0x030)
59 #define kIOMessageServiceIsRequestingClose iokit_common_msg(0x100)
60 #define kIOMessageServiceIsAttemptingOpen iokit_common_msg(0x101)
61 #define kIOMessageServiceWasClosed iokit_common_msg(0x110)
63 #define kIOMessageServiceBusyStateChange iokit_common_msg(0x120)
65 #define kIOMessageConsoleSecurityChange iokit_common_msg(0x128)
67 #define kIOMessageServicePropertyChange iokit_common_msg(0x130)
69 #define kIOMessageCopyClientID iokit_common_msg(0x330)
71 #define kIOMessageSystemCapabilityChange iokit_common_msg(0x340)
72 #define kIOMessageDeviceSignaledWakeup iokit_common_msg(0x350)
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>.
81 #define kIOMessageDeviceWillPowerOff iokit_common_msg(0x210)
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>.
89 #define kIOMessageDeviceHasPoweredOn iokit_common_msg(0x230)
91 /*! @group In-kernel system shutdown and restart notifications
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.
103 #define kIOMessageSystemWillPowerOff iokit_common_msg(0x250)
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.
114 #define kIOMessageSystemWillRestart iokit_common_msg(0x310)
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.
124 #define kIOMessageSystemPagingOff iokit_common_msg(0x255)
127 /*! @group System sleep and wake notifications
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>.
137 #define kIOMessageCanSystemSleep iokit_common_msg(0x270)
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>.
147 #define kIOMessageSystemWillNotSleep iokit_common_msg(0x290)
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>.
156 #define kIOMessageSystemWillSleep iokit_common_msg(0x280)
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>.
166 #define kIOMessageSystemWillPowerOn iokit_common_msg(0x320)
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>.
175 #define kIOMessageSystemHasPoweredOn iokit_common_msg(0x300)
177 /*! @group Unused and deprecated notifications
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.
186 #define kIOMessageCanDevicePowerOff iokit_common_msg(0x200)
189 * @defined kIOMessageDeviceWillNotPowerOff
190 * @discussion This IOKit interest notification is largely unused;
191 * it's not very interesting.
193 #define kIOMessageDeviceWillNotPowerOff iokit_common_msg(0x220)
196 * @defined kIOMessageSystemWillNotPowerOff
197 * @deprecated This IOKit message is unused.
199 #define kIOMessageSystemWillNotPowerOff iokit_common_msg(0x260)
202 * @defined kIOMessageCanSystemPowerOff
203 * @deprecated This IOKit message is unused.
205 #define kIOMessageCanSystemPowerOff iokit_common_msg(0x240)
208 * @defined kIOMessageDeviceWillPowerOn
209 * @discussion IOService power mgt does not send kIOMessageDeviceWillPowerOn.
211 #define kIOMessageDeviceWillPowerOn iokit_common_msg(0x215)
214 * @defined kIOMessageDeviceHasPoweredOff
215 * @discussion IOService power mgt does not send kIOMessageDeviceHasPoweredOff.
217 #define kIOMessageDeviceHasPoweredOff iokit_common_msg(0x225)
220 #endif /* ! __IOKIT_IOMESSAGE_H */