]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/IOKit/IOMessage.h
xnu-6153.11.26.tar.gz
[apple/xnu.git] / iokit / IOKit / IOMessage.h
index 38808ebcc121eb6f2ba53b2a58e07c4c88cd2c25..1560b3305687ab2aa17f1c22617b105980f7fb09 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
- * 
+ *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
  * unlawful or unlicensed copies of an Apple operating system, or to
  * circumvent, violate, or enable the circumvention or violation of, any
  * terms of an Apple operating system software license agreement.
- * 
+ *
  * Please obtain a copy of the License at
  * http://www.opensource.apple.com/apsl/ and read it before using this file.
- * 
+ *
  * The Original Code and all software distributed under the License are
  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
@@ -22,7 +22,7 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
- * 
+ *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  */
 
 typedef UInt32 IOMessage;
 
 #define iokit_common_msg(message)          (UInt32)(sys_iokit|sub_iokit_common|message)
-#define iokit_family_msg(sub,message)      (UInt32)(sys_iokit|sub|message)
+#define iokit_family_msg(sub, message)      (UInt32)(sys_iokit|sub|message)
 
-/*! 
+/*!
  * @defined         iokit_vendor_specific_msg
  * @discussion      iokit_vendor_specific_msg passes messages in the sub_iokit_vendor_specific
- *                  subsystem. It can be used to generate messages that are used for private 
+ *                  subsystem. It can be used to generate messages that are used for private
  *                  communication between vendor specific code with the IOService::message() etc. APIs.
  */
 #define iokit_vendor_specific_msg(message) (UInt32)(sys_iokit|sub_iokit_vendor_specific|message)
@@ -71,6 +71,12 @@ typedef UInt32 IOMessage;
 #define kIOMessageSystemCapabilityChange   iokit_common_msg(0x340)
 #define kIOMessageDeviceSignaledWakeup     iokit_common_msg(0x350)
 
+#ifdef KERNEL_PRIVATE
+// sent to IOUserClients with the property kIOUserClientMessageAppSuspendedKey
+// when their task's app suspend state changes;
+// use task_is_app_suspended() to retrieve the owning task's current state
+#define kIOMessageTaskAppSuspendedChange   iokit_common_msg(0x800)
+#endif
 
 /*!
  * @defined         kIOMessageDeviceWillPowerOff
@@ -93,10 +99,10 @@ typedef UInt32 IOMessage;
 
 /*!
  * @defined         kIOMessageSystemWillPowerOff
- * @discussion      Indicates an imminent system shutdown. Recipients have a limited 
- *                  amount of time to respond, otherwise the system will timeout and 
+ * @discussion      Indicates an imminent system shutdown. Recipients have a limited
+ *                  amount of time to respond, otherwise the system will timeout and
  *                  shutdown even without a response.
- *                  Delivered to in-kernel IOKit drivers via <code>IOService::systemWillShutdown()</code>, 
+ *                  Delivered to in-kernel IOKit drivers via <code>IOService::systemWillShutdown()</code>,
  *                  and to clients of <code>registerPrioritySleepWakeInterest()</code>.
  *                  Never delivered to user space notification clients.
  */
@@ -104,10 +110,10 @@ typedef UInt32 IOMessage;
 
 /*!
  * @defined         kIOMessageSystemWillRestart
- * @discussion      Indicates an imminent system restart. Recipients have a limited 
- *                  amount of time to respond, otherwise the system will timeout and 
+ * @discussion      Indicates an imminent system restart. Recipients have a limited
+ *                  amount of time to respond, otherwise the system will timeout and
  *                  restart even without a response.
- *                  Delivered to in-kernel IOKit drivers via <code>IOService::systemWillShutdown()</code>, 
+ *                  Delivered to in-kernel IOKit drivers via <code>IOService::systemWillShutdown()</code>,
  *                  and to clients of <code>registerPrioritySleepWakeInterest()</code>.
  *                  Never delivered to user space notification clients.
  */
@@ -138,7 +144,7 @@ typedef UInt32 IOMessage;
 
 /*!
  * @defined         kIOMessageSystemWillNotSleep
- * @discussion      Announces that the system has retracted a previous attempt to sleep; 
+ * @discussion      Announces that the system has retracted a previous attempt to sleep;
  *                  it follows <code>kIOMessageCanSystemSleep</code>.
  *                  Delivered to in-kernel IOKit drivers via <code>kIOGeneralInterest</code>
  *                  and <code>kIOPriorityPowerStateInterest</code>.
@@ -157,7 +163,7 @@ typedef UInt32 IOMessage;
 
 /*!
  * @defined         kIOMessageSystemWillPowerOn
- * @discussion      Announces that the system is beginning to power the device tree; most 
+ * @discussion      Announces that the system is beginning to power the device tree; most
  *                  devices are unavailable at this point..
  *                  Delivered to in-kernel IOKit drivers via <code>kIOGeneralInterest</code>
  *                  and <code>kIOPriorityPowerStateInterest</code>.
@@ -177,22 +183,22 @@ typedef UInt32 IOMessage;
 /*! @group          Unused and deprecated notifications
  */
 
-/*! 
+/*!
  * @defined         kIOMessageCanDevicePowerOff
- * @discussion      Delivered to <code>kIOAppPowerStateInterest</code> clients of 
+ * @discussion      Delivered to <code>kIOAppPowerStateInterest</code> clients of
  *                  devices that implement their own idle timeouts.
  *                  This message type is almost never used.
  */
 #define kIOMessageCanDevicePowerOff        iokit_common_msg(0x200)
 
-/*! 
+/*!
  * @defined         kIOMessageDeviceWillNotPowerOff
- * @discussion      This IOKit interest notification is largely unused; 
+ * @discussion      This IOKit interest notification is largely unused;
  *                  it's not very interesting.
  */
 #define kIOMessageDeviceWillNotPowerOff    iokit_common_msg(0x220)
 
-/*! 
+/*!
  * @defined         kIOMessageSystemWillNotPowerOff
  * @deprecated      This IOKit message is unused.
  */