5 #include <CoreFoundation/CoreFoundation.h> 6 #include <IOKit/pwr_mgt/IOPMLib.h> 7 #include <IOKit/IOMessage.h> 27 static void PowerCallBack (
void *Reference, io_service_t Service,
28 natural_t Type,
void *Data);
32 CFRunLoopSourceRef m_powerRef;
33 io_connect_t m_rootPowerDomain;
34 io_object_t m_powerNotifier;
35 IONotificationPortRef m_powerNotifyPort;
38 #endif // TORCPOWEROSX_H A power monitoring class for OS X.
bool DoRestart(void) override
Restart the system.
bool DoShutdown(void) override
Shutdown the system.
bool DoHibernate(void) override
Hibernate the system.
static void PowerSourceCallBack(void *Reference)
Receive notification of changes to the power supply.
A generic power status class.
void Refresh(void)
Update the current power supply status.
bool DoSuspend(void) override
Suspend the system.
static void PowerCallBack(void *Reference, io_service_t Service, natural_t Type, void *Data)
Receive notification of power status changes.