#include <device.h>
Inheritance diagram for Device:

Public Member Functions | |
| Device (const std::string &udi) | |
| constructor   | |
| virtual | ~Device () | 
| destructor   | |
| virtual bool | suspend (DPM_POWER_STATE state=DPM_STATE_D3, bool force=false) | 
| Set device into powersave state.   | |
| virtual bool | resume () | 
| resumes a device from a powersave state   | |
| virtual bool | isActive ()=0 | 
| check whether device is currently busy   | |
| virtual DPM_DEVICE_CLASS | deviceClass () | 
| get the DPM_DEVICE_CLASS of the device   | |
| virtual std::string | udi () | 
| get the udi assigned by hal of the device   | |
| virtual DPM_POWER_STATE | updateState () | 
| get the current DPM_POWER_STATE of the device   | |
| DPM_POWER_STATE | readState (const std::string &state_file) | 
| read out current power state from file   | |
Protected Attributes | |
| std::string | _udi | 
| holding the udi assigned by hal   | |
| DPM_DEVICE_CLASS | _device_class | 
| the device class (DPM_DEVICE_CLASS)   | |
| std::string | _device_path | 
| the device path in system   | |
| std::string | _state_file | 
| the full path of the power state file   | |
Private Attributes | |
| DPM_POWER_STATE | _current_state | 
| the current power state the device is in   | |
      
  | 
  
| 
 constructor 
 
  | 
  
      
  | 
  
| 
 destructor 
  | 
  
      
  | 
  
| 
 get the DPM_DEVICE_CLASS of the device 
 
  | 
  
      
  | 
  
| 
 check whether device is currently busy pure virtual 
 
 Implemented in UsbDevice, WlanDevice, SoundDevice, and LanDevice.  | 
  
      
  | 
  
| 
 read out current power state from file 
 
 
  | 
  
      
  | 
  
| 
 resumes a device from a powersave state 
 
  | 
  
      
  | 
  ||||||||||||
| 
 Set device into powersave state. 
 
 
  | 
  
      
  | 
  
| 
 get the udi assigned by hal of the device 
 
  | 
  
      
  | 
  
| 
 get the current DPM_POWER_STATE of the device reads out current power state from state file and updates local _current_state variable 
 
  | 
  
      
  | 
  
| 
 the current power state the device is in 
  | 
  
      
  | 
  
| 
 the device class (DPM_DEVICE_CLASS) 
  | 
  
      
  | 
  
| 
 the device path in system returned by linux.sysfs_path capability  | 
  
      
  | 
  
| 
 the full path of the power state file e.g. _device_path + /device/power/state  | 
  
      
  | 
  
| 
 holding the udi assigned by hal 
  | 
  
 1.4.6