ADC Home > Reference Library > Reference > Darwin > Kernel Framework Reference

 


RootDomain.h

Includes:

Overview



Functions

acknowledgeSystemWillShutdown

Handle callbacks from IOService::systemWillShutdown().

copyPMSetting

Copy the current value for a PM setting. Returns OSNumber or OSData depending on the setting.

handlePlatformHaltRestart

Handle platform halt and restart notifications.

registerPMSettingController(const OSSymbol *, IOPMSettingControllerCallback, OSObject *, uintptr_t, OSObject **)

Register for callbacks on changes to certain PM settings.

registerPMSettingController(const OSSymbol *, uint32_t, IOPMSettingControllerCallback, OSObject *, uintptr_t, OSObject **)

Register for callbacks on changes to certain PM settings.


acknowledgeSystemWillShutdown


Handle callbacks from IOService::systemWillShutdown().

void acknowledgeSystemWillShutdown(
    IOService *from );  
Parameters
The

IOService sender of the callback.


copyPMSetting


Copy the current value for a PM setting. Returns OSNumber or OSData depending on the setting.

OSObject *copyPMSetting(
    OSSymbol *whichSetting);  
Parameters
whichSetting

Name of the desired setting.

Return Value

OSObject *value if valid, NULL otherwise.


handlePlatformHaltRestart


Handle platform halt and restart notifications.

void handlePlatformHaltRestart(
    UInt32 pe_type );  
Parameters
kPEHaltCPU

or kPERestartCPU.


registerPMSettingController(const OSSymbol *, IOPMSettingControllerCallback, OSObject *, uintptr_t, OSObject **)


Register for callbacks on changes to certain PM settings.

IOReturn registerPMSettingController( 
    const OSSymbol *settings[], 
    IOPMSettingControllerCallback callout, 
    OSObject *target, 
    uintptr_t refcon, 
    OSObject **handle);  // out param 
Parameters
settings

NULL terminated array of C strings, each string for a PM setting that the caller is interested in and wants to get callbacks for.

callout

C function ptr or member function cast as such.

target

The target of the callback, usually 'this'

refcon

Will be passed to caller in callback; for caller's use.

handle

Caller should keep the OSObject * returned here. If non-NULL, handle will have a retain count of 1 on return. To deregister, pass to unregisterPMSettingController()

Return Value

kIOReturnSuccess on success.


registerPMSettingController(const OSSymbol *, uint32_t, IOPMSettingControllerCallback, OSObject *, uintptr_t, OSObject **)


Register for callbacks on changes to certain PM settings.

IOReturn registerPMSettingController( 
    const OSSymbol *settings[], 
    uint32_t supportedPowerSources, 
    IOPMSettingControllerCallback callout, 
    OSObject *target, 
    uintptr_t refcon, 
    OSObject **handle);  // out param 
Parameters
settings

NULL terminated array of C strings, each string for a PM setting that the caller is interested in and wants to get callbacks for.

supportedPowerSources

bitfield indicating which power sources these settings are supported for (kIOPMSupportedOnAC, etc.)

callout

C function ptr or member function cast as such.

target

The target of the callback, usually 'this'

refcon

Will be passed to caller in callback; for caller's use.

handle

Caller should keep the OSObject * returned here. If non-NULL, handle will have a retain count of 1 on return. To deregister, pass to unregisterPMSettingController()

Return Value

kIOReturnSuccess on success.


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.

 

Last Updated: 2008-12-19