+// IOPMPowerSource class descriptive strings
+// Power Source state is published as properties to the IORegistry under these
+// keys.
+#define kIOPMPSExternalConnectedKey "ExternalConnected"
+#define kIOPMPSExternalChargeCapableKey "ExternalChargeCapable"
+#define kIOPMPSBatteryInstalledKey "BatteryInstalled"
+#define kIOPMPSIsChargingKey "IsCharging"
+#define kIOPMFullyChargedKey "FullyCharged"
+#define kIOPMPSAtWarnLevelKey "AtWarnLevel"
+#define kIOPMPSAtCriticalLevelKey "AtCriticalLevel"
+#define kIOPMPSCurrentCapacityKey "CurrentCapacity"
+#define kIOPMPSMaxCapacityKey "MaxCapacity"
+#define kIOPMPSDesignCapacityKey "DesignCapacity"
+#define kIOPMPSTimeRemainingKey "TimeRemaining"
+#define kIOPMPSAmperageKey "Amperage"
+#define kIOPMPSVoltageKey "Voltage"
+#define kIOPMPSCycleCountKey "CycleCount"
+#define kIOPMPSMaxErrKey "MaxErr"
+#define kIOPMPSAdapterInfoKey "AdapterInfo"
+#define kIOPMPSLocationKey "Location"
+#define kIOPMPSErrorConditionKey "ErrorCondition"
+#define kIOPMPSManufacturerKey "Manufacturer"
+#define kIOPMPSManufactureDateKey "ManufactureDate"
+#define kIOPMPSModelKey "Model"
+#define kIOPMPSSerialKey "Serial"
+#define kIOPMDeviceNameKey "DeviceName"
+#define kIOPMPSLegacyBatteryInfoKey "LegacyBatteryInfo"
+#define kIOPMPSBatteryHealthKey "BatteryHealth"
+#define kIOPMPSHealthConfidenceKey "HealthConfidence"
+#define kIOPMPSCapacityEstimatedKey "CapacityEstimated"
+#define kIOPMPSBatteryChargeStatusKey "ChargeStatus"
+#define kIOPMPSBatteryTemperatureKey "Temperature"
+
+// kIOPMPSBatteryChargeStatusKey may have one of the following values, or may have
+// no value. If kIOPMBatteryChargeStatusKey has a NULL value (or no value) associated with it
+// then charge is proceeding normally. If one of these battery charge status reasons is listed,
+// then the charge may have been interrupted.
+#define kIOPMBatteryChargeStatusTooHot "HighTemperature"
+#define kIOPMBatteryChargeStatusTooCold "LowTemperature"
+#define kIOPMBatteryChargeStatusGradient "BatteryTemperatureGradient"
+
+// Definitions for battery location, in case of multiple batteries.
+// A location of 0 is unspecified
+// Location is undefined for single battery systems
+enum {
+ kIOPMPSLocationLeft = 1001,
+ kIOPMPSLocationRight = 1002
+};
+
+// Battery quality health types, specified by BatteryHealth and HealthConfidence
+// properties in an IOPMPowerSource battery kext.
+enum {
+ kIOPMUndefinedValue = 0,
+ kIOPMPoorValue = 1,
+ kIOPMFairValue = 2,
+ kIOPMGoodValue = 3
+};
+
+// Battery's time remaining estimate is invalid this long (seconds) after a wake
+#define kIOPMPSInvalidWakeSecondsKey "BatteryInvalidWakeSeconds"
+
+// Battery must wait this long (seconds) after being completely charged before
+// the battery is settled.
+#define kIOPMPSPostChargeWaitSecondsKey "PostChargeWaitSeconds"
+
+// Battery must wait this long (seconds) after being completely discharged
+// before the battery is settled.
+#define kIOPMPSPostDishargeWaitSecondsKey "PostDischargeWaitSeconds"
+
+
+/* CPU Power Management status keys
+ * Pass as arguments to IOPMrootDomain::systemPowerEventOccurred
+ * Or as arguments to IOPMSystemPowerEventOccurred()
+ * Or to decode the dictionary obtained from IOPMCopyCPUPowerStatus()
+ * These keys reflect restrictions placed on the CPU by the system
+ * to bring the CPU's power consumption within allowable thermal and
+ * power constraints.
+ */
+
+
+/* kIOPMGraphicsPowerLimitsKey
+ * The key representing the dictionary of graphics power limits.
+ * The dictionary contains the other kIOPMCPUPower keys & their associated
+ * values (e.g. Speed limit, Processor Count, and Schedule limits).
+ */
+#define kIOPMGraphicsPowerLimitsKey "Graphics_Power_Limits"
+
+/* kIOPMGraphicsPowerLimitPerformanceKey
+ * The key representing the percent of overall performance made available
+ * by the graphics chip as a percentage (integer 0 - 100).
+ */
+#define kIOPMGraphicsPowerLimitPerformanceKey "Graphics_Power_Performance"
+
+
+
+/* kIOPMCPUPowerLimitsKey
+ * The key representing the dictionary of CPU Power Limits.
+ * The dictionary contains the other kIOPMCPUPower keys & their associated
+ * values (e.g. Speed limit, Processor Count, and Schedule limits).
+ */
+#define kIOPMCPUPowerLimitsKey "CPU_Power_Limits"
+
+/* kIOPMCPUPowerLimitProcessorSpeedKey defines the speed & voltage limits placed
+ * on the CPU.
+ * Represented as a percentage (0-100) of maximum CPU speed.
+ */
+#define kIOPMCPUPowerLimitProcessorSpeedKey "CPU_Speed_Limit"
+
+/* kIOPMCPUPowerLimitProcessorCountKey reflects how many, if any, CPUs have been
+ * taken offline. Represented as an integer number of CPUs (0 - Max CPUs).
+ */
+#define kIOPMCPUPowerLimitProcessorCountKey "CPU_Available_CPUs"
+
+/* kIOPMCPUPowerLimitSchedulerTimeKey represents the percentage (0-100) of CPU time
+ * available. 100% at normal operation. The OS may limit this time for a percentage
+ * less than 100%.
+ */
+#define kIOPMCPUPowerLimitSchedulerTimeKey "CPU_Scheduler_Limit"
+
+
+/* Thermal Level Warning Key
+ * Indicates the thermal constraints placed on the system. This value may
+ * cause clients to action to consume fewer system resources.
+ * The value associated with this warning is defined by the platform.
+ */
+#define kIOPMThermalLevelWarningKey "Thermal_Level_Warning"
+
+/* Thermal Warning Level values
+ * kIOPMThermalWarningLevelNormal - under normal operating conditions
+ * kIOPMThermalWarningLevelDanger - thermal pressure may cause system slowdown
+ * kIOPMThermalWarningLevelCrisis - thermal conditions may cause imminent shutdown
+ *
+ * The platform may define additional thermal levels if necessary.
+ */
+enum {
+ kIOPMThermalWarningLevelNormal = 0,
+ kIOPMThermalWarningLevelDanger = 5,
+ kIOPMThermalWarningLevelCrisis = 10
+};
+
+
+// PM Settings Controller setting types
+// Settings types used primarily with:
+// IOPMrootDomain::registerPMSettingController
+// The values are identical to the similarly named keys for use in user space
+// PM settings work. Those keys are defined in IOPMLibPrivate.h.
+#define kIOPMSettingWakeOnRingKey "Wake On Modem Ring"
+#define kIOPMSettingRestartOnPowerLossKey "Automatic Restart On Power Loss"
+#define kIOPMSettingWakeOnACChangeKey "Wake On AC Change"
+#define kIOPMSettingSleepOnPowerButtonKey "Sleep On Power Button"
+#define kIOPMSettingWakeOnClamshellKey "Wake On Clamshell Open"
+#define kIOPMSettingReduceBrightnessKey "ReduceBrightness"
+#define kIOPMSettingDisplaySleepUsesDimKey "Display Sleep Uses Dim"
+#define kIOPMSettingTimeZoneOffsetKey "TimeZoneOffsetSeconds"
+#define kIOPMSettingMobileMotionModuleKey "MobileMotionModule"
+#define kIOPMSettingGraphicsSwitchKey "GPUSwitch"
+
+// Setting controlling drivers can register to receive scheduled wake data
+// Either in "CF seconds" type, or structured calendar data in a formatted
+// IOPMCalendarStruct defined below.
+#define kIOPMSettingAutoWakeSecondsKey "wake"
+#define kIOPMSettingAutoWakeCalendarKey "WakeByCalendarDate"
+#define kIOPMSettingAutoPowerSecondsKey "poweron"
+#define kIOPMSettingAutoPowerCalendarKey "PowerByCalendarDate"
+
+// Debug seconds auto wake
+// Used by sleep cycling debug tools
+#define kIOPMSettingDebugWakeRelativeKey "WakeRelativeToSleep"
+#define kIOPMSettingDebugPowerRelativeKey "PowerRelativeToShutdown"
+
+// Maintenance wake calendar.
+#define kIOPMSettingMaintenanceWakeCalendarKey "MaintenanceWakeCalendarDate"
+
+struct IOPMCalendarStruct {
+ UInt32 year;
+ UInt8 month;
+ UInt8 day;
+ UInt8 hour;
+ UInt8 minute;
+ UInt8 second;
+};
+typedef struct IOPMCalendarStruct IOPMCalendarStruct;
+
+// SetAggressiveness types