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_APM_H 00026 #define POWERSAVE_APM_H 00027 00028 #define APM_BIOS_DEV "/dev/apm_bios" 00029 #define MAX_EVENTS 8 00030 00031 #include "pm_interface.h" 00032 00033 class APM_Interface : public PM_Interface { 00034 public: 00036 APM_Interface(); 00037 00039 virtual ~ APM_Interface(); 00040 00047 virtual int openHWEventFD(); 00048 00050 virtual int openAcpidSocket(); 00051 00056 virtual int handleHWEventRequest(int fd = -1); 00057 00062 virtual int suspend_to_ram(); 00063 00068 virtual int standby(); 00069 00074 virtual void activateSettings(); 00075 00076 private: 00078 int _hwEvent_fd; 00079 }; 00080 00081 #endif // POWERSAVE_APM_H