#include <device_management.h>
Public Member Functions | |
DeviceManagement () | |
constructor | |
void | init () |
init all devices | |
virtual | ~DeviceManagement () |
destructor resetting all devices to D0 | |
bool | suspend (DPM_DEVICE_CLASS device_class, int device_num=-1, bool force=false) |
suspend devices | |
bool | resume (DPM_DEVICE_CLASS device_class, int device_num=-1) |
resume devices | |
bool | update (std::list< DPM_DEVICE_CLASS > rpm_classes, bool force=false) |
updates the powerstate of all devices | |
int | getDevices (DPM_DEVICE_CLASS device_class, std::list< std::string > &udis, std::list< DPM_POWER_STATE > &power_states) |
get list of stored devices | |
void | addWlanDevice (const std::string &udi) |
add a wlan device | |
void | addUsbDevice (const std::string &udi) |
add a usb device | |
void | addSoundDevice (const std::string &udi) |
add a sound device | |
void | addLanDevice (const std::string &udi) |
add a lan device | |
bool | checkDeviceAdded (char *udi) |
check if an added device can be added to out device list | |
bool | checkDeviceRemoved (char *udi) |
check if a removed device was one of our stored devices | |
Private Attributes | |
std::list< Device * > | _devices |
list holding powermanagable devices |
|
constructor
|
|
destructor resetting all devices to D0
|
|
add a lan device
|
|
add a sound device
|
|
add a usb device
|
|
add a wlan device
|
|
check if an added device can be added to out device list
|
|
check if a removed device was one of our stored devices
|
|
get list of stored devices
|
|
init all devices
|
|
resume devices
|
|
suspend devices
|
|
updates the powerstate of all devices function suspends those devices whos DPM_DEVICE_CLASS can be found in the given list rpm_classes. Devices not found are resumed
|
|
list holding powermanagable devices
|