ACPI_Interface Class Reference

#include <acpi.h>

Inheritance diagram for ACPI_Interface:

PM_Interface List of all members.

Public Member Functions

 ACPI_Interface ()
 default initialisation
virtual ~ACPI_Interface ()
 destructor
virtual int openHWEventFD ()
 opens the acpi event file
virtual int handleHWEventRequest (int fd=-1)
 Handles an event on the socket.
virtual int suspend_to_ram ()
 triggers execution of suspend_to_ram script
virtual int standby ()
 triggers execution of standby script
unsigned long getTimestamp ()
 get time in millisecs since 1970
virtual int openAcpidSocket ()
 opens the socket provided by acpid
virtual void activateSettings ()
 activates settings for specific scheme

Static Public Attributes

static string ACPI_EVENTFILE = "/proc/acpi/event"
 event file for acpi events

Private Member Functions

int setBatteryAlarm_ ()
 sets the battery alarm of the current scheme

Private Attributes

unsigned long _last_button_occurence
 workaround for buggy double button events

Static Private Attributes

static const unsigned int _button_time_window = 1000
 time window for ignoring double button events

Constructor & Destructor Documentation

ACPI_Interface::ACPI_Interface  ) 
 

default initialisation

ACPI_Interface::~ACPI_Interface  )  [virtual]
 

destructor


Member Function Documentation

void ACPI_Interface::activateSettings  )  [virtual]
 

activates settings for specific scheme

throttling and thermal control only in ACPI

Reimplemented from PM_Interface.

unsigned long ACPI_Interface::getTimestamp  ) 
 

get time in millisecs since 1970

Returns:
time in milliseconds since 1970

int ACPI_Interface::handleHWEventRequest int  fd = -1  )  [virtual]
 

Handles an event on the socket.

Returns:
integer value with result if handle event
Return values:
1 if an event has been generated
0 if no event has been generated
-1 on fatal errors
-2 if acpid shuts down/ socket is missing

Implements PM_Interface.

int ACPI_Interface::openAcpidSocket  )  [virtual]
 

opens the socket provided by acpid

Returns:
the filedescriptor or < 0 on error

Implements PM_Interface.

int ACPI_Interface::openHWEventFD  )  [virtual]
 

opens the acpi event file

Returns:
the filedescriptor or -1 on error
Return values:
< 0 on error
the filedesctiptor on success

Implements PM_Interface.

int ACPI_Interface::setBatteryAlarm_  )  [private]
 

sets the battery alarm of the current scheme

Returns:
integer value with the result of set batteryalarm. Also returns true if not supported
Return values:
- 1 on success
-1 if alarm could not be set or is not supported

int ACPI_Interface::standby  )  [virtual]
 

triggers execution of standby script

Returns:
true on success, false if not supported

Implements PM_Interface.

int ACPI_Interface::suspend_to_ram  )  [virtual]
 

triggers execution of suspend_to_ram script

Returns:
true on success, false if not supported

Implements PM_Interface.


Member Data Documentation

const unsigned int ACPI_Interface::_button_time_window = 1000 [static, private]
 

time window for ignoring double button events

unsigned long ACPI_Interface::_last_button_occurence [private]
 

workaround for buggy double button events

only allow one button event(sleep/power) inside the time window below (in millisecs)

string ACPI_Interface::ACPI_EVENTFILE = "/proc/acpi/event" [static]
 

event file for acpi events

this is now configurable via -f parameter it could be either the acpid socket or the kernel acpi event file


The documentation for this class was generated from the following files:
Generated on Mon Mar 27 09:27:19 2006 for Powersave Daemon by  doxygen 1.4.6