+ virtual IONotifier * registerInterest(
+ const OSSymbol * typeOfInterest,
+ IOServiceInterestHandler handler,
+ void * target, void * ref = 0 );
+
+ void pmStatsRecordEvent(
+ int eventIndex,
+ AbsoluteTime timestamp);
+
+ void pmStatsRecordApplicationResponse(
+ const OSSymbol *response,
+ const char *name,
+ int messageType,
+ uint32_t delay_ms,
+ int app_pid);
+
+ virtual IOReturn callPlatformFunction(
+ const OSSymbol *functionName,
+ bool waitForFunction,
+ void *param1, void *param2,
+ void *param3, void *param4 );
+
+/*! @function createPMAssertion
+ @abstract Creates an assertion to influence system power behavior.
+ @param whichAssertionBits A bitfield specify the assertion that the caller requests.
+ @param assertionLevel An integer detailing the initial assertion level, kIOPMDriverAssertionLevelOn
+ or kIOPMDriverAssertionLevelOff.
+ @param ownerService A pointer to the caller's IOService class, for tracking.
+ @param ownerDescription A reverse-DNS string describing the caller's identity and reason.
+ @result On success, returns a new assertion of type IOPMDriverAssertionID
+*/
+ IOPMDriverAssertionID createPMAssertion(
+ IOPMDriverAssertionType whichAssertionsBits,
+ IOPMDriverAssertionLevel assertionLevel,
+ IOService *ownerService,
+ const char *ownerDescription);
+
+/* @function setPMAssertionLevel
+ @abstract Modify the level of a pre-existing assertion.
+ @discussion Change the value of a PM assertion to influence system behavior,
+ without undergoing the work required to create or destroy an assertion. Suggested
+ for clients who will assert and de-assert needs for PM behavior several times over
+ their lifespan.
+ @param assertionID An assertion ID previously returned by <link>createPMAssertion</link>
+ @param assertionLevel The new assertion level.
+ @result kIOReturnSuccess if it worked; kIOReturnNotFound or other IOReturn error on failure.
+*/
+ IOReturn setPMAssertionLevel(IOPMDriverAssertionID assertionID, IOPMDriverAssertionLevel assertionLevel);
+
+/*! @function getPMAssertionLevel
+ @absract Returns the active level of the specified assertion(s).
+ @discussion Returns <link>kIOPMDriverAssertionLevelOff</link> or
+ <link>kIOPMDriverAssertionLevelOn</link>. If multiple assertions are specified
+ in the bitfield, only returns <link>kIOPMDriverAssertionLevelOn</link>
+ if all assertions are active.
+ @param whichAssertionBits Bits defining the assertion or assertions the caller is interested in
+ the level of. If in doubt, pass <link>kIOPMDriverAssertionCPUBit</link> as the argument.
+ @result Returns <link>kIOPMDriverAssertionLevelOff</link> or
+ <link>kIOPMDriverAssertionLevelOn</link> indicating the specified assertion's levels, if available.
+ If the assertions aren't supported on this machine, or aren't recognized by the OS, the
+ result is undefined.
+*/
+ IOPMDriverAssertionLevel getPMAssertionLevel(IOPMDriverAssertionType whichAssertionBits);
+
+/*! @function releasePMAssertion
+ @abstract Removes an assertion to influence system power behavior.
+ @result On success, returns a new assertion of type IOPMDriverAssertionID *
+*/
+ IOReturn releasePMAssertion(IOPMDriverAssertionID releaseAssertion);
+
+private:
+ virtual IOReturn changePowerStateTo( unsigned long ordinal );
+ virtual IOReturn changePowerStateToPriv( unsigned long ordinal );
+ virtual IOReturn requestPowerDomainState( IOPMPowerFlags, IOPowerConnection *, unsigned long );
+ virtual void powerChangeDone( unsigned long );
+ virtual bool tellChangeDown( unsigned long );
+ virtual bool askChangeDown( unsigned long );
+ virtual void tellChangeUp( unsigned long );
+ virtual void tellNoChangeDown( unsigned long );
+#ifdef XNU_KERNEL_PRIVATE
+ /* Root Domain internals */
+public:
+
+#if HIBERNATION
+ bool getHibernateSettings(
+ uint32_t * hibernateMode,
+ uint32_t * hibernateFreeRatio,
+ uint32_t * hibernateFreeTime );
+#endif
+
+#if ROOT_DOMAIN_RUN_STATES
+ void tagPowerPlaneService(
+ IOService * service,
+ uint32_t * rdFlags );
+
+ void handleActivityTickleForService( IOService * service,
+ unsigned long type,
+ unsigned long currentPowerState,
+ uint32_t activityTickleCount );
+
+ void handlePowerChangeStartForService(
+ IOService * service,
+ uint32_t * rootDomainFlags,
+ uint32_t newPowerState,
+ uint32_t changeFlags );
+
+ void handlePowerChangeDoneForService(
+ IOService * service,
+ uint32_t * rootDomainFlags,
+ uint32_t newPowerState,
+ uint32_t changeFlags );
+
+ void overridePowerStateForService(
+ IOService * service,
+ uint32_t * rdFlags,
+ unsigned long * powerState,
+ uint32_t changeFlags );
+
+ IOReturn setMaintenanceWakeCalendar(
+ const IOPMCalendarStruct * calendar );
+#endif /* ROOT_DOMAIN_RUN_STATES */
+
+ // Handle callbacks from IOService::systemWillShutdown()