+/*******************************************************************************
+ *
+ * Root Domain property keys of interest
+ *
+ ******************************************************************************/
+
+/* AppleClamshellState
+ * reflects the state of the clamshell (lid) on a portable.
+ * It has a boolean value.
+ * true == clamshell is closed
+ * false == clamshell is open
+ * not present == no clamshell on this hardware
+ */
+#define kAppleClamshellStateKey "AppleClamshellState"
+
+/* AppleClamshellCausesSleep
+ * reflects the clamshell close behavior on a portable.
+ * It has a boolean value.
+ * true == system will sleep when clamshell is closed
+ * false == system will not sleep on clamshell close
+ * (typically external display mode)
+ * not present == no clamshell on this hardware
+ */
+#define kAppleClamshellCausesSleepKey "AppleClamshellCausesSleep"
+
+/*******************************************************************************
+ *
+ * Root Domain general interest messages
+ *
+ ******************************************************************************/
+
+/* kIOPMMessageClamshellStateChange
+ * Delivered as a general interest notification on the IOPMrootDomain
+ * IOPMrootDomain sends this message when state of either AppleClamshellState
+ * or AppleClamshellCausesSleep changes. If this clamshell change results in
+ * a sleep, the sleep will initiate soon AFTER delivery of this message.
+ * The state of both variables is encoded in a bitfield argument sent with
+ * the message. Check bits 0 and 1 using kClamshellStateBit & kClamshellSleepBit
+ */
+enum {
+ kClamshellStateBit = (1 << 0),
+ kClamshellSleepBit = (1 << 1)
+};
+
+#define kIOPMMessageClamshellStateChange \
+ iokit_family_msg(sub_iokit_powermanagement, 0x100)
+
+/* kIOPMMessageFeatureChange
+ * Delivered when the set of supported features ("Supported Features" dictionary
+ * under IOPMrootDomain registry) changes in some way. Typically addition or
+ * removal of a supported feature.
+ * RootDomain passes no argument with this message.
+ */
+#define kIOPMMessageFeatureChange \
+ iokit_family_msg(sub_iokit_powermanagement, 0x110)
+
+/* kIOPMMessageInflowDisableCancelled
+ * The battery has drained completely to its "Fully Discharged" state.
+ * If a user process has disabled battery inflow for battery
+ * calibration, we forcibly re-enable Inflow at this point.
+ * If inflow HAS been forcibly re-enabled, bit 0
+ * (kInflowForciblyEnabledBit) will be set.
+ */
+enum {
+ kInflowForciblyEnabledBit = (1 << 0)
+};
+
+/* kIOPMMessageInternalBatteryFullyDischarged
+ * The battery has drained completely to its "Fully Discharged" state.
+ */
+#define kIOPMMessageInternalBatteryFullyDischarged \
+ iokit_family_msg(sub_iokit_powermanagement, 0x120)
+
+/* kIOPMMessageSystemPowerEventOccurred
+ * Some major system thermal property has changed, and interested clients may
+ * modify their behavior.
+ */
+#define kIOPMMessageSystemPowerEventOccurred \
+ iokit_family_msg(sub_iokit_powermanagement, 0x130)
+
+
+/*******************************************************************************
+ *
+ * Power commands issued to root domain
+ * Use with IOPMrootDomain::receivePowerNotification()
+ *
+ * These commands are issued from system drivers only:
+ * ApplePMU, AppleSMU, IOGraphics, AppleACPIFamily
+ *
+ ******************************************************************************/