acpi.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *                                                                         *
00003  *                         Powersave Daemon                                *
00004  *                                                                         *
00005  *          Copyright (C) 2004,2005 SUSE Linux Products GmbH               *
00006  *                                                                         *
00007  *               Author(s): Holger Macht <hmacht@suse.de>                  *
00008  *                                                                         *
00009  * This program is free software; you can redistribute it and/or modify it *
00010  * under the terms of the GNU General Public License as published by the   *
00011  * Free Software Foundation; either version 2 of the License, or (at you   *
00012  * option) any later version.                                              *
00013  *                                                                         *
00014  * This program is distributed in the hope that it will be useful, but     *
00015  * WITHOUT ANY WARRANTY; without even the implied warranty of              *
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       *
00017  * General Public License for more details.                                *
00018  *                                                                         *
00019  * You should have received a copy of the GNU General Public License along *
00020  * with this program; if not, write to the Free Software Foundation, Inc., *
00021  * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA                  *
00022  *                                                                         *
00023  ***************************************************************************/
00024 
00025 #ifndef POWERSAVE_ACPI_H
00026 #define POWERSAVE_ACPI_H
00027 
00028 #define ACPI_SLEEPFILE "/proc/acpi/sleep"
00029 
00030 #include "pm_interface.h"
00031 
00032 class ACPI_Interface : public PM_Interface {
00033 public:
00035          ACPI_Interface();
00036 
00038          virtual ~ ACPI_Interface();
00039 
00046         virtual int openHWEventFD();
00047 
00056         virtual int handleHWEventRequest(int fd = -1);
00057 
00062         virtual int suspend_to_ram();
00063 
00068         virtual int standby();
00069 
00074         unsigned long getTimestamp();
00075 
00080         virtual int openAcpidSocket();
00081 
00086         virtual void activateSettings();
00087 
00093         static string ACPI_EVENTFILE;
00094 
00095 private:
00104         int setBatteryAlarm_();
00105 
00111         unsigned long _last_button_occurence;
00112 
00114         const static unsigned int _button_time_window = 1000;
00115 };
00116 
00117 #endif // POWERSAVE_ACPI_H

Generated on Mon Mar 27 09:27:19 2006 for Powersave Daemon by  doxygen 1.4.6