| Framework | CoreServices/CoreServices.h |
| Declared in | Power.h |
The Power Manager controls power to the internal hardware devices of battery-powered Macintosh computers (such PowerBook computers). The Power Manager automatically shuts off power to internal devices to conserve power whenever the computer has not been used for a predetermined amount of time. In addition, the Power Manager allows your application or other software to
install a procedure that is executed when power to internal devices is about to be shut off or when power has just been restored
set a timer to wake up the computer at some time in the future
set or disable the wakeup timer and read its current setting
enable, disable, or delay the CPU idle feature
read the current CPU clock speed
control power to the internal modem and serial ports
read the status of the internal modem
read the state of the battery charge and the status of the battery charger
Most applications do not need to know whether they are executing on a battery-powered Macintosh computer because the transition between power states is largely invisible. As a result, most applications do not need to use Power Manager routines. You need Power Manager only if you are writing a program--such as a device driver--that must control power to some subsystem of a battery-powered Macintosh computer or that might be affected by the idle or sleep state.
Carbon supports Power Manager functions prior to Power Manager 2.0. However, many of these functions do nothing on Mac OS X; these calls have been retained in Carbon as the only means for implementing power management on Mac OS 8 and 9. Before using any of the Power Manager API, you should call the PMFeatures function to check the availability of the feature you wish to use. On Mac OS X, use the functions provided in IOKit for power management. For more information on IOKit, see I/O Kit Fundamentals.
Function descriptions are grouped by the tasks for which you use the functions. For an alphabetical list of functions, go to the API index at the end of the document.
CurrentProcessorSpeed
DisableIdle Deprecated in Mac OS X v10.0
EnableIdle Deprecated in Mac OS X v10.0
IdleUpdate Deprecated in Mac OS X v10.0
DisableWUTime Deprecated in Mac OS X v10.0
GetWUTime Deprecated in Mac OS X v10.0
SetWUTime Deprecated in Mac OS X v10.0
AOff Deprecated in Mac OS X v10.0
AOn Deprecated in Mac OS X v10.0
AOnIgnoreModem Deprecated in Mac OS X v10.0
BOff Deprecated in Mac OS X v10.0
BOn Deprecated in Mac OS X v10.0
ModemStatus Deprecated in Mac OS X v10.0
BatteryStatus Deprecated in Mac OS X v10.0
BatteryCount
DisposeHDSpindownUPP
DisposePMgrStateChangeUPP
DisposeSleepQUPP
GetCPUSpeed
InvokeHDSpindownUPP
InvokePMgrStateChangeUPP
InvokeSleepQUPP
MaximumProcessorSpeed
MinimumProcessorSpeed
NewHDSpindownUPP
NewPMgrStateChangeUPP
NewSleepQUPP
UpdateSystemActivity
FullProcessorSpeed Deprecated in Mac OS X v10.5
PMFeatures Deprecated in Mac OS X v10.5
PMSelectorCount Deprecated in Mac OS X v10.5
SetProcessorSpeed Deprecated in Mac OS X v10.5
SetSpindownDisable Deprecated in Mac OS X v10.5
AutoSleepControl Deprecated in Mac OS X v10.0
DelaySystemIdle Deprecated in Mac OS X v10.0
DimmingControl Deprecated in Mac OS X v10.0
EnableProcessorCycling Deprecated in Mac OS X v10.0
GetBatteryTimes Deprecated in Mac OS X v10.0
GetBatteryVoltage Deprecated in Mac OS X v10.0
GetDimmingTimeout Deprecated in Mac OS X v10.0
GetDimSuspendState Deprecated in Mac OS X v10.0
GetHardDiskTimeout Deprecated in Mac OS X v10.0
GetIntModemInfo Deprecated in Mac OS X v10.0
GetLastActivity Deprecated in Mac OS X v10.0
GetScaledBatteryInfo Deprecated in Mac OS X v10.0
GetSCSIDiskModeAddress Deprecated in Mac OS X v10.0
GetSleepTimeout Deprecated in Mac OS X v10.0
GetSoundMixerState Deprecated in Mac OS X v10.0
GetStartupTimer Deprecated in Mac OS X v10.0
GetWakeupTimer Deprecated in Mac OS X v10.0
HardDiskPowered Deprecated in Mac OS X v10.0
HardDiskQInstall Deprecated in Mac OS X v10.0
HardDiskQRemove Deprecated in Mac OS X v10.0
IsAutoSlpControlDisabled Deprecated in Mac OS X v10.0
IsDimmingControlDisabled Deprecated in Mac OS X v10.0
IsProcessorCyclingEnabled Deprecated in Mac OS X v10.0
IsSpindownDisabled Deprecated in Mac OS X v10.0
PMgrStateQInstall Deprecated in Mac OS X v10.0
PMgrStateQRemove Deprecated in Mac OS X v10.0
SetDimmingTimeout Deprecated in Mac OS X v10.0
SetDimSuspendState Deprecated in Mac OS X v10.0
SetHardDiskTimeout Deprecated in Mac OS X v10.0
SetIntModemState Deprecated in Mac OS X v10.0
SetSCSIDiskModeAddress Deprecated in Mac OS X v10.0
SetSleepTimeout Deprecated in Mac OS X v10.0
SetSoundMixerState Deprecated in Mac OS X v10.0
SetStartupTimer Deprecated in Mac OS X v10.0
SetWakeupTimer Deprecated in Mac OS X v10.0
SpinDownHardDisk Deprecated in Mac OS X v10.0
short BatteryCount ( void );
Power.h
Returns the current effective clock speed of the CPU in megahertz.
short CurrentProcessorSpeed ( void );
The clock speed of the CPU in megahertz (MHz). One MHz represents one million cycles per second.
Prior to Mac OS X 10.4, this function returns the maximum clock speed, not the current effective clock speed.
Power.h
Unimplemented.
void DisposeHDSpindownUPP ( HDSpindownUPP userUPP );
Power.h
Unimplemented
void DisposePMgrStateChangeUPP ( PMgrStateChangeUPP userUPP );
The I/O Kit Framework header file IOPMLib.h (in I/O Kit Framework Reference) provides access to common power management facilites, such as initiating system sleep, getting current idle timer values, registering for sleep/wake notifications, and preventing system sleep. For additional information about power management for device drivers, see I/O Kit Fundamentals and I/O Kit Device Driver Design Guidelines.
Power.h
void DisposeSleepQUPP ( SleepQUPP userUPP );
Power.h
Returns the current effective clock speed of the CPU in megahertz.
long GetCPUSpeed ( void );
The clock speed of the CPU in megahertz.
For more information, see CurrentProcessorSpeed.
Power.h
Unimplemented.
void InvokeHDSpindownUPP ( HDQueueElement *theElement, HDSpindownUPP userUPP );
Power.h
Unimplemented.
void InvokePMgrStateChangeUPP ( PMgrQueueElement *theElement, long stateBits, PMgrStateChangeUPP userUPP );
Power.h
long InvokeSleepQUPP ( long message, SleepQRecPtr qRecPtr, SleepQUPP userUPP );
Power.h
short MaximumProcessorSpeed ( void );
MaximumProcessorSpeed is unimplemented on versions of Mac OS X prior to Mac OS X 10.1.
Power.h
short MinimumProcessorSpeed ( void );
MinimumProcessorSpeed is unimplemented on versions of Mac OS X prior to Mac OS X v10.1.
Power.h
Unimplemented.
HDSpindownUPP NewHDSpindownUPP ( HDSpindownProcPtr userRoutine );
See the description of the HDSpindownUPP data type.
See the callback HDSpindownProcPtr for more information.
The I/O Kit Framework header file IOPMLib.h (in I/O Kit Framework Reference) provides access to common power management facilites, such as initiating system sleep, getting current idle timer values, registering for sleep/wake notifications, and preventing system sleep. For additional information about power management for device drivers, see I/O Kit Fundamentals and I/O Kit Device Driver Design Guidelines.
Power.h
Unimplemented.
PMgrStateChangeUPP NewPMgrStateChangeUPP ( PMgrStateChangeProcPtr userRoutine );
See the description of the PMgrStateChangeUPP data type.
Power.h
SleepQUPP NewSleepQUPP ( SleepQProcPtr userRoutine );
See the description of the SleepQUPP data type.
See the callback SleepQProcPtr for more information.
Power.h
Adds an entry to the sleep queue.
void SleepQInstall ( SleepQRecPtr qRecPtr );
A pointer to a sleep queue record that you must provide.
Power.h
Removes an entry from the sleep queue.
void SleepQRemove ( SleepQRecPtr qRecPtr );
A pointer to a sleep queue record that you provided when you added your routine to the sleep queue.
Power.h
OSErr UpdateSystemActivity ( UInt8 activity );
A result code. See “Power Manager Result Codes.”
Power.htypedef void (*HDSpindownProcPtr) ( HDQueueElement * theElement );
If you name your function MyHDSpindownCallback, you would declare it like this:
void MyHDSpindownCallback ( HDQueueElement * theElement );
Power.htypedef void (*PMgrStateChangeProcPtr) ( PMgrQueueElement * theElement, long stateBits );
If you name your function MyPMgrStateChangeCallback, you would declare it like this:
void MyPMgrStateChangeCallback ( PMgrQueueElement * theElement, long stateBits );
Power.htypedef OSStatus (*PowerHandlerProcPtr) ( UInt32 message, void * param, UInt32 refCon, RegEntryID * regEntryID );
If you name your function MyPowerHandlerCallback, you would declare it like this:
OSStatus MyPowerHandlerCallback ( UInt32 message, void * param, UInt32 refCon, RegEntryID * regEntryID );
A result code. See “Power Manager Result Codes.”
Power.htypedef long (*SleepQProcPtr) ( long message, SleepQRecPtr qRecPtr );
If you name your function MySleepQProc, you would declare it like this:
long MySleepQProc ( long message, SleepQRecPtr qRecPtr );
Power.h
struct ActivityInfo {
short ActivityType;
unsigned long ActivityTime;
};
typedef struct ActivityInfo ActivityInfo;
ActivityTypeA short representing the type of activity to fetch.
ActivityTimeAn unsigned long representing the time of the last activity in ticks.
Power.h
typedef SInt8 BatteryByte;
Power.h
struct BatteryInfo {
UInt8 flags;
UInt8 warningLevel;
UInt8 reserved;
UInt8 batteryLevel;
};
typedef struct BatteryInfo BatteryInfo;
flagsAn unsigned, 8-bit integer representing battery state information.
warningLevelAn unsigned, 8-bit integer representing a scaled warning level. The value of this field is in the range of 0-255.
reservedThis field is reserved for internal use.
batteryLevelAn unsigned, 8-bit integer representing a scaled battery level. The value for this field is in the range of 0-255.
Power.h
struct BatteryTimeRec {
unsigned long expectedBatteryTime;
unsigned long minimumBatteryTime;
unsigned long maximumBatteryTime;
unsigned long timeUntilCharged;
};
typedef struct BatteryTimeRec BatteryTimeRec;
expectedBatteryTimeAn unsigned long representing in seconds, the estimated battery time remaining.
minimumBatteryTimeAn unsigned long representing in seconds, the minimum battery time remaining.
maximumBatteryTimeAn unsigned long representing in seconds, the maximum battery time remaining.
timeUntilChargedAn unsigned long representing in seconds, the time remaining until the battery is fully charged.
Power.h
struct DevicePowerInfo {
UInt32 version;
RegEntryID regID;
OptionBits flags;
UInt32 minimumWakeTime;
UInt32 sleepPowerNeeded;
};
typedef struct DevicePowerInfo DevicePowerInfo;
versionThe version of this structure.
regIDThe Registry Entry ID for the device.
flagsA value of type OptionBits representing device power information.
minimumWakeTimeThe minimum number of seconds before the device sleeps again.
sleepPowerNeededThe milliwatts the device requires in the sleep state.
Power.h
struct HDQueueElement {
struct HDQueueElement * hdQLink;
short hdQType;
short hdFlags;
HDSpindownUPP hdProc;
long hdUser;
};
typedef struct HDQueueElement HDQueueElement;
hdQLinkA pointer to the next queue element.
hdQTypeA value of type short representing the queue element type.
hdFlagsA value of type short representing flags.
hdProcA pointer to the hard drive spindown routine to call.
hdUserA user-defined value.
Power.h
typedef HDSpindownProcPtr HDSpindownUPP;
Power.h
typedef SInt8 ModemByte;
Power.h
struct PMgrQueueElement {
struct PMgrQueueElement * pmQLink;
short pmQType;
short pmFlags;
long pmNotifyBits;
PMgrStateChangeUPP pmProc;
long pmUser;
};
typedef struct PMgrQueueElement PMgrQueueElement;
pmQLinkA pointer to the next queue element.
pmQTypeA value of type short representing the queue element type.
pmFlagsA value of type short representing flags.
pmNotifyBitsA bitmap representing the changes of which you wish to be notified.
pmProcA pointer to the routine to call.
pmUserA user-defined value.
Power.h
typedef PMgrStateChangeProcPtr PMgrStateChangeUPP;
Power.h
typedef long PMResultCode;
Power.h
typedef UInt32 PowerLevel;
Power.h
typedef SInt16 PowerSourceID;
Power.h
struct PowerSourceParamBlock {
PowerSourceID sourceID;
UInt16 sourceCapacityUsage;
UInt32 sourceVersion;
OptionBits sourceAttr;
OptionBits sourceState;
UInt32 currentCapacity;
UInt32 maxCapacity;
UInt32 timeRemaining;
UInt32 timeToFullCharge;
UInt32 voltage;
SInt32 current;
UInt32 lowWarnLevel;
UInt32 deadWarnLevel;
UInt32 reserved[16];
};
typedef struct PowerSourceParamBlock PowerSourceParamBlock;
typedef PowerSourceParamBlock * PowerSourceParamBlockPtr;
sourceIDA unique ID assigned by the Power Manager.
sourceCapacityUsageAn unsigned, 16-bit integer representing current capacity usage.
sourceVersionAn unsigned, 32-bit integer indicating the version of this record.
sourceAttrA value of type OptionBits representing power source attributes.
sourceStateA value of type OptionBits representing power source states.
currentCapacityThe current capacity represented in milliwatts or percentage.
maxCapacityThe full capacity represented in milliwatts.
timeRemainingThe time remaining represented in milliwatt-hours.
timeToFullChargeThe time required to charge represented in milliwatt-hours.
voltageThe voltage represented in millivolts.
currentThe current represented in milliamperes. This value may be negative if the power source is consuming.
lowWarnLevelThe low warning level represented in milliwatts, or percentage depending on the representation of sourceCapacityUsage.
deadWarnLevelThe dead warming level represented in milliwatts, or percentage depending on the representation of sourceCapacityUsage.
reservedThis field is reserved for future expansion.
Power.h
typedef PowerSourceParamBlock* PowerSourceParamBlockPtr;
Power.h
struct PowerSummary {
UInt32 version;
OptionBits flags;
UInt32 sleepPowerAvailable;
UInt32 sleepPowerNeeded;
UInt32 minimumWakeTime;
ItemCount deviceCount;
DevicePowerInfo devices[1];
};
typedef struct PowerSummary PowerSummary;
versionAn unsigned, 32-bit integer indicating the version of this record.
flagsA value of type OptionBits representing power summary information.
sleepPowerAvailableAn unsigned, 32-bit integer indicating the milliwatts available during sleep.
sleepPowerNeededAn unsigned, 32-bit integer indicating the milliwatts needed during sleep.
minimumWakeTimeAn unsigned, 32-bit integer indicating the minimum number of seconds required before sleeping again.
deviceCountThe number of device power info records.
devicesAn array of device power info records.
Power.h
struct SleepQRec {
SleepQRecPtr sleepQLink;
short sleepQType;
SleepQUPP sleepQProc;
short sleepQFlags;
};
typedef struct SleepQRec SleepQRec;
typedef SleepQRec * SleepQRecPtr;
sleepQLinkA pointer to the next element in the queue. This pointer is maintained by the Power Manager; your application should not modify this field.
sleepQTypeA short indicating the type of the queue, which must be the constant sleepQType (16).
sleepQProcA pointer to the routine that you provide.
sleepQFlagsA short containing flags which is reserved for use by Apple Computer, Inc.
Power.h
typedef SleepQRec *SleepQRecPtr;
Power.h
typedef SleepQProcPtr SleepQUPP;
Power.h
typedef SInt8 SoundMixerByte;
Power.h
struct StartupTime {
unsigned long startTime;
Boolean startEnabled;
SInt8 filler;
};
typedef struct StartupTime StartupTime;
Power.h
struct WakeupTime {
unsigned long wakeTime;
Boolean wakeEnabled;
SInt8 filler;
};
typedef struct WakeupTime WakeupTime;
Power.h
enum {
kAEMacPowerMgtEvt = 'pmgt',
kAEMacToWake = 'wake',
kAEMacLowPowerSaveData = 'pmsd',
kAEMacEmergencySleep = 'emsl',
kAEMacEmergencyShutdown = 'emsd'
};
enum {
chargerConnBit = 0,
hiChargeBit = 1,
chargeOverFlowBit = 2,
batteryDeadBit = 3,
batteryLowBit = 4,
connChangedBit = 5
};
chargerConnBitWhen this bit is set, it indicates the charger is connected.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
hiChargeBitWhen this bit is set, it indicates charging at fastest rate.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
chargeOverFlowBitWhen this bit is set, it indicates the hicharge counter has overflowed.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
batteryDeadBitAlways 0.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
batteryLowBitWhen this bit is set, it indicates the battery is low.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
connChangedBitWhen this bit is set, it indicates the charger connection has changed.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
enum {
chargerConnMask = 0x01,
hiChargeMask = 0x02,
chargeOverFlowMask = 0x04,
batteryDeadMask = 0x08,
batteryLowMask = 0x10,
connChangedMask = 0x20
};
chargerConnMaskThe charger is connected.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
hiChargeMaskCharging at fastest rate.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
chargeOverFlowMaskThe hicharge counter has overflowed.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
batteryDeadMaskThe battery is dead.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
batteryLowMaskThe battery is low.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
connChangedMaskThe connection has changed.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
enum {
batteryInstalled = 7,
batteryCharging = 6,
chargerConnected = 5,
upsConnected = 4,
upsIsPowerSource = 3
};
batteryInstalledWhen this bit is set, it indicates the battery is currently connected.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
batteryChargingWhen this bit is set, it indicates the battery is being charged.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
chargerConnectedWhen this bit is set, it indicates the charger is connected.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
upsConnectedWhen this bit is set, it indicates there is an uninterruptable power source (UPS) connected.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
upsIsPowerSourceWhen this bit is set, it indicates the UPS is the source of power.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
enum {
pmSleepTimeoutChanged = 0,
pmSleepEnableChanged = 1,
pmHardDiskTimeoutChanged = 2,
pmHardDiskSpindownChanged = 3,
pmDimmingTimeoutChanged = 4,
pmDimmingEnableChanged = 5,
pmDiskModeAddressChanged = 6,
pmProcessorCyclingChanged = 7,
pmProcessorSpeedChanged = 8,
pmWakeupTimerChanged = 9,
pmStartupTimerChanged = 10,
pmHardDiskPowerRemovedbyUser = 11,
pmChargeStatusChanged = 12,
pmPowerLevelChanged = 13,
pmWakeOnNetActivityChanged = 14
};
enum {
pmSleepTimeoutChangedMask = (1 << pmSleepTimeoutChanged),
pmSleepEnableChangedMask = (1 << pmSleepEnableChanged),
pmHardDiskTimeoutChangedMask = (1 << pmHardDiskTimeoutChanged),
pmHardDiskSpindownChangedMask = (1 << pmHardDiskSpindownChanged),
pmDimmingTimeoutChangedMask = (1 << pmDimmingTimeoutChanged),
pmDimmingEnableChangedMask = (1 << pmDimmingEnableChanged),
pmDiskModeAddressChangedMask = (1 << pmDiskModeAddressChanged),
pmProcessorCyclingChangedMask = (1 << pmProcessorCyclingChanged),
pmProcessorSpeedChangedMask = (1 << pmProcessorSpeedChanged),
pmWakeupTimerChangedMask = (1 << pmWakeupTimerChanged),
pmStartupTimerChangedMask = (1 << pmStartupTimerChanged),
pmHardDiskPowerRemovedbyUserMask = (1 << pmHardDiskPowerRemovedbyUser),
pmChargeStatusChangedMask = (1 << pmChargeStatusChanged),
pmPowerLevelChangedMask = (1 << pmPowerLevelChanged),
pmWakeOnNetActivityChangedMask = (1 << pmWakeOnNetActivityChanged)
};
enum {
kDevicePCIPowerOffAllowed = (1L << 0),
kDeviceSupportsPMIS = (1L << 1),
kDeviceCanAssertPMEDuringSleep = (1L << 2),
kDeviceUsesCommonLogicPower = (1L << 3),
kDeviceDriverPresent = (1L << 4),
kDeviceDriverSupportsPowerMgt = (1L << 5)
};
kDevicePCIPowerOffAllowedIf the bit specified by this mask is set, PCI power off is allowed for this device.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
kDeviceSupportsPMISIf the bit specified by this mask is set, the device supports Power Manager Interface Specifications.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
kDeviceCanAssertPMEDuringSleepIf the bit specified by this mask is set, the device can assert the PME# line during sleep.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
kDeviceUsesCommonLogicPowerIf the bit specified by this mask is set, the device uses common-logic power.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
kDeviceDriverPresentIf the bit specified by this mask is set, the device driver is present.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
kDeviceDriverSupportsPowerMgtIf the bit specified by this mask is set, the device driver installed a power handler.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
enum {
HDPwrQType = 0x4844,
PMgrStateQType = 0x504D
};
HDPwrQTypeThe hard disk spindown queue element type.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
PMgrStateQTypeThe Power Manager state queue element type.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
enum {
kHDQueuePostBit = 0,
kHDQueuePostMask = (1 << kHDQueuePostBit)
};
kHDQueuePostBitWhen this bit is set, it indicates the routine will be called on the second pass.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
kHDQueuePostMaskIf the bit specified by this mask is set, it indicates the routine will be called on the second pass.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
enum {
kMediaPowerCSCode = 70
};
enum {
kUseDefaultMinimumWakeTime = 0,
kPowerSummaryVersion = 1,
kDevicePowerInfoVersion = 1
};
kUseDefaultMinimumWakeTimeDefaults to 5 minutes.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
kPowerSummaryVersionVersion of PowerSummary structure.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
kDevicePowerInfoVersionVersion of DevicePowerInfo structure
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
enum {
hasInternalModem = 0,
intModemRingDetect = 1,
intModemOffHook = 2,
intModemRingWakeEnb = 3,
extModemSelected = 4,
modemSetBit = 15
};
hasInternalModemWhen this bit is set, it indicates an internal modem is installed.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
intModemRingDetectWhen this bit is set, it indicates the internal modem has detected a ring.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
intModemOffHookWhen this bit is set, it indicates the internal modem is off the hook.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
intModemRingWakeEnbWhen this bit is set, it indicates wakeup on ring is enabled.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
extModemSelectedWhen this bit is set, it indicates external modem is selected.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
modemSetBitWhen this bit is set, it indicates set bit. If 0, clear bit.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
These bits are in the bit field returned by the GetIntModemInfo function and set by the SetIntModemState function.
enum {
modemOnBit = 0,
ringWakeUpBit = 2,
modemInstalledBit = 3,
ringDetectBit = 4,
modemOnHookBit = 5
};
modemOnBitWhen this bit is set, it indicates the modem is on.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
ringWakeUpBitWhen this bit is set, it indicates ring wakeup is enabled.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
modemInstalledBitWhen this bit is set, it indicates an internal modem is installed.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
ringDetectBitWhen this bit is set, it indicates an incoming call is detected.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
modemOnHookBitWhen this bit is set, it indicates the modem is off the hook.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in Power.h
enum {
modemOnMask = 0x01,
ringWakeUpMask = 0x04,
modemInstalledMask = 0x08,
ringDetectMask = 0x10,
modemOnHookMask = 0x20
};