/*
* Copyright (c) 2002-2010 Apple Computer, Inc. All rights reserved.
*
* @APPLE_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
* compliance with the License. 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,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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_LICENSE_HEADER_END@
*/
/*!
* @header IOPSKeys.h
*
* @discussion
* IOPSKeys.h defines C strings for use accessing power source data in IOPowerSource
* CFDictionaries, as returned by @link //apple_ref/c/func/IOPSGetPowerSourceDescription IOPSGetPowerSourceDescription @/link
* Note that all of these C strings must be converted to CFStrings before use. You can wrap
* them with the CFSTR() macro, or create a CFStringRef (that you must later CFRelease()) using CFStringCreateWithCString().
*/
#ifndef _IOPSKEYS_H_
#define _IOPSKEYS_H_
/*!
* @group IOPSPowerAdapter Keys
*
* @discussion
* Use these kIOPSPowerAdapter keys to decipher the dictionary returned
* by @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link
*/
/*!
* @define kIOPSPowerAdapterIDKey
*
* @abstract This key refers to the attached external AC power adapter's ID.
* The value associated with this key is a CFNumberRef kCFNumberIntType integer.
*
* @discussion This key may be present in the dictionary returned from
* @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link
* This key might not be defined in the adapter details dictionary.
*/
#define kIOPSPowerAdapterIDKey "AdapterID"
/*!
* @define kIOPSPowerAdapterWattsKey
*
* @abstract This key refers to the wattage of the external AC power adapter attached to a portable.
* The value associated with this key is a CFNumberRef kCFNumberIntType integer value, in units of watts.
*
* @discussion This key may be present in the dictionary returned from
* @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link
* This key might not be defined in the adapter details dictionary.
*/
#define kIOPSPowerAdapterWattsKey "Watts"
/*!
* @define kIOPSPowerAdapterRevisionKey
*
* @abstract The power adapter's revision.
* The value associated with this key is a CFNumberRef kCFNumberIntType integer value
*
* @discussion This key may be present in the dictionary returned from
* @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link
* This key might not be defined in the adapter details dictionary.
*/
#define kIOPSPowerAdapterRevisionKey "AdapterRevision"
/*!
* @define kIOPSPowerAdapterSerialNumberKey
*
* @abstract The power adapter's serial number.
* The value associated with this key is a CFNumberRef kCFNumberIntType integer value
*
* @discussion This key may be present in the dictionary returned from
* @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link
* This key might not be defined in the adapter details dictionary.
*/
#define kIOPSPowerAdapterSerialNumberKey "SerialNumber"
/*!
* @define kIOPSPowerAdapterFamilyKey
*
* @abstract The power adapter's family code.
* The value associated with this key is a CFNumberRef kCFNumberIntType integer value
*
* @discussion This key may be present in the dictionary returned from
* @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link
* This key might not be defined in the adapter details dictionary.
*/
#define kIOPSPowerAdapterFamilyKey "FamilyCode"
/*!
* @define kIOPSPowerAdapterCurrentKey
*
* @abstract This key refers to the current of the external AC power adapter attached to a portable.
* The value associated with this key is a CFNumberRef kCFNumberIntType integer value, in units of mAmps.
*
* @discussion This key may be present in the dictionary returned from
* @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link
* This key might not be defined in the adapter details dictionary.
*/
#define kIOPSPowerAdapterCurrentKey "Current"
/*!
* @define kIOPSPowerAdapterSourceKey
*
* @abstract This key refers to the source of the power.
* The value associated with this key is a CFNumberRef kCFNumberIntType integer value.
*
* @discussion This key may be present in the dictionary returned from
* @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link
* This key might not be defined in the adapter details dictionary.
*/
#define kIOPSPowerAdapterSourceKey "Source"
/*!
* @group Internal Keys
*
*/
/*!
* @define kIOPSUPSManagementClaimed
*
* @abstract Claims UPS management for a third-party driver.
* @discussion kIOPSUPSManagementClaimed is obsolete. Do not use.
* @deprecated Unsupported in OS X 10.5 and later.
*/
#define kIOPSUPSManagementClaimed "/IOKit/UPSPowerManagementClaimed"
/*!
* @define kIOPSLowWarnLevelKey
*
* @abstract Key for the "Warning" UPS low power trigger-level. Default is 50%.
*/
#define kIOPSLowWarnLevelKey "Low Warn Level"
/*!
* @define kIOPSDeadWarnLevelKey
*
* @abstract Key for the "Shutdown System" low power trigger-level. Default is 20%.
*/
#define kIOPSDeadWarnLevelKey "Shutdown Level"
/*!
* @define kIOPSDynamicStorePath
*
* @abstract This is only used for internal bookkeeping, and should be ignored.
*/
#define kIOPSDynamicStorePath "/IOKit/PowerSources"
/*!
* @group Power Source Commands (UPS)
*
*/
/*!
* @define kIOPSCommandDelayedRemovePowerKey
*
* @abstract Command to give a UPS when it should remove power from its AC plugs in a specified amount of time
* @discussion
*
@link //apple_ref/c/func/IOPSGetPowerSourceDescription IOPSGetPowerSourceDescription @/link
*
* Clients of @link //apple_ref/c/func/IOPSCreatePowerSource IOPSCreatePowerSource @/link
* must specify these keys in their power source dictionaries.
* Each key is labelled with one of these labels that indicate what information is REQUIRED. to
* represent a power source in OS X.
*
* @link kIOPSBatteryPowerValue @/link
indicates power source is drawing internal power;
* @link kIOPSACPowerValue@/link
indicates power source is connected to an external power source.
* @link kIOPSACPowerValue@/link
, @link kIOPSBatteryPowerValue@/link
, or @link kIOPSOffLineValue@/link
.
* @link kIOPSPowerSourceStateKey @/link
has value @link kIOPSBatteryPowerValue @/link
* and the value of @link kIOPSIsChargingKey @/link
is kCFBooleanFalse.
* @link kIOPSIsChargingKey @/link
is kCFBooleanTrue.
* @link kIOPSInternalType @/link
describes an internal power source.
* @link kIOPSUSBTransportType @/link
, @link kIOPSNetworkTransportType @/link
, and @link kIOPSSerialTransportType @/link
usually describe UPS's.
* @link kIOPSGoodValue @/link
to describe a well-performing power source,
* @link kIOPSFairValue @/link
to describe a functional power source with limited capacity
* @link kIOPSPoorValue @/link
to describe a power source that's not capable of Providing power.
* @link kIOPSTransportTypeKey @/link
*/
/*!
* @define kIOPSSerialTransportType
* @abstract Value for key @link kIOPSTransportTypeKey @/link
.
* @discussion Indicates the power source is a UPS attached over a serial connection.
*/
#define kIOPSSerialTransportType "Serial"
/*!
* @define kIOPSUSBTransportType
* @abstract Value for key @link kIOPSTransportTypeKey @/link
.
* @discussion Indicates the power source is a UPS attached over a USB connection.
*/
#define kIOPSUSBTransportType "USB"
/*!
* @define kIOPSNetworkTransportType
* @abstract Value for key @link kIOPSTransportTypeKey @/link
.
* @discussion Indicates the power source is a UPS attached over a network connection (and it may be managing several computers).
*/
#define kIOPSNetworkTransportType "Ethernet"
/*!
* @define kIOPSInternalType
* @abstract Value for key @link kIOPSTransportTypeKey @/link
. Indicates the power source is an internal battery.
*/
#define kIOPSInternalType "Internal"
/*
* @group PowerSource Types
* @discussion
* A string that broadly describes the type of power source. One of these strings must be passed
* as an argument to IOPSCreatePowerSource() when defining a new system power source.
*/
/*!
* @define kIOPSInternalBatteryType
*
* @abstract Represents a battery residing inside a Mac.
*/
#define kIOPSInternalBatteryType "InternalBattery"
/*!
* @define kIOPSUPSType
*
* @abstract Represents an external attached UPS.
*/
#define kIOPSUPSType "UPS"
/*
* PS state
*/
/*!
* @define kIOPSOffLineValue
* @abstract Value for key kIOPSPowerSourceStateKey. Power source is off-line or no longer connected.
*/
#define kIOPSOffLineValue "Off Line"
/*!
* @define kIOPSACPowerValue
* @abstract Value for key kIOPSPowerSourceStateKey. Power source is connected to external or AC power, and is not draining the internal battery.
*/
#define kIOPSACPowerValue "AC Power"
/*!
* @define kIOPSBatteryPowerValue
* @abstract Value for key kIOPSPowerSourceStateKey. Power source is currently using the internal battery.
*/
#define kIOPSBatteryPowerValue "Battery Power"
/*!
* @group Battery Health values
*/
/*!
* @define kIOPSPoorValue
* @abstract Value for key @link kIOPSBatteryHealthKey @/link
.
*/
#define kIOPSPoorValue "Poor"
/*!
* @define kIOPSFairValue
* @abstract Value for key @link kIOPSBatteryHealthKey @/link
.
*/
#define kIOPSFairValue "Fair"
/*!
* @define kIOPSGoodValue
* @abstract Value for key @link kIOPSBatteryHealthKey @/link
.
*/
#define kIOPSGoodValue "Good"
/*
* @group Battery Health Condition values
*/
/*!
* @define kIOPSCheckBatteryValue
*
* @abstract Value for key @link kIOPSBatteryHealthConditionKey @/link
*
* @discussion This value indicates that the battery should be checked out by a licensed Mac repair service.
*/
#define kIOPSCheckBatteryValue "Check Battery"
/*!
* @define kIOPSPermanentFailureValue
*
* @abstract Value for key @link kIOPSBatteryHealthConditionKey @/link
*
* @discussion Indicates the battery needs replacement.
*/
#define kIOPSPermanentFailureValue "Permanent Battery Failure"
/*!
* @group Battery Failure Mode values
*/
/*!
* @define kIOPSFailureExternalInput
*
* @abstract Value for key @link kIOPSBatteryFailureModesKey@/link
*/
#define kIOPSFailureExternalInput "Externally Indicated Failure"
/*!
* @define kIOPSFailureSafetyOverVoltage
*
* @abstract Potential value for key @link kIOPSBatteryFailureModesKey@/link
*/
#define kIOPSFailureSafetyOverVoltage "Safety Over-Voltage"
/*!
* @define kIOPSFailureChargeOverTemp
*
* @abstract Potential value for key @link kIOPSBatteryFailureModesKey@/link
*/
#define kIOPSFailureChargeOverTemp "Charge Over-Temperature"
/*!
* @define kIOPSFailureDischargeOverTemp
*
* @abstract Potential value for key @link kIOPSBatteryFailureModesKey@/link
*/
#define kIOPSFailureDischargeOverTemp "Discharge Over-Temperature"
/*!
* @define kIOPSFailureCellImbalance
*
* @abstract Potential value for key @link kIOPSBatteryFailureModesKey@/link
*/
#define kIOPSFailureCellImbalance "Cell Imbalance"
/*!
* @define kIOPSFailureChargeFET
*
* @abstract Potential value for key @link kIOPSBatteryFailureModesKey@/link
*/
#define kIOPSFailureChargeFET "Charge FET"
/*!
* @define kIOPSFailureDischargeFET
*
* @abstract Potential value for key @link kIOPSBatteryFailureModesKey@/link
*/
#define kIOPSFailureDischargeFET "Discharge FET"
/*!
* @define kIOPSFailureDataFlushFault
*
* @abstract Potential value for key @link kIOPSBatteryFailureModesKey@/link
*/
#define kIOPSFailureDataFlushFault "Data Flush Fault"
/*!
* @define kIOPSFailurePermanentAFEComms
*
* @abstract Potential value for key @link kIOPSBatteryFailureModesKey@/link
*/
#define kIOPSFailurePermanentAFEComms "Permanent AFE Comms"
/*!
* @define kIOPSFailurePeriodicAFEComms
*
* @abstract Potential value for key @link kIOPSBatteryFailureModesKey@/link
*/
#define kIOPSFailurePeriodicAFEComms "Periodic AFE Comms"
/*!
* @define kIOPSFailureChargeOverCurrent
*
* @abstract Potential value for key @link kIOPSBatteryFailureModesKey@/link
*/
#define kIOPSFailureChargeOverCurrent "Charge Over-Current"
/*!
* @define kIOPSFailureDischargeOverCurrent
*
* @abstract Potential value for key @link kIOPSBatteryFailureModesKey@/link
*/
#define kIOPSFailureDischargeOverCurrent "Discharge Over-Current"
/*!
* @define kIOPSFailureOpenThermistor
*
* @abstract Potential value for key @link kIOPSBatteryFailureModesKey@/link
*/
#define kIOPSFailureOpenThermistor "Open Thermistor"
/*!
* @define kIOPSFailureFuseBlown
*
* @abstract Potential value for key @link kIOPSBatteryFailureModesKey@/link
*/
#define kIOPSFailureFuseBlown "Fuse Blown"
#endif