1 /***************************************************************************
2 libacpi.h - description
5 copyright : (C) 2003 by Noberasco Michele
6 e-mail : 2001s098@educ.disi.unige.it
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 * This program is distributed in the hope that it will be useful, *
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
19 * GNU General Public License for more details. *
21 * You should have received a copy of the GNU General Public License *
22 * along with this program; if not, write to the *
23 * Free Software Foundation, Inc., *
24 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
26 ***************************************************************************/
28 /***************************************************************************
29 Originally written by Costantino Pistagna for his wmacpimon
30 ***************************************************************************/
37 POWER
, /* on AC, Battery charged */
38 DISCHARGING
, /* on Battery, Discharging */
39 CHARGING
, /* on AC, Charging */
47 int present
; /* 1 if present, 0 if no battery */
48 Charging state
; /* charging state enum */
49 int prate
; /* present rate */
50 int rcapacity
; /* rameining capacity */
51 int pvoltage
; /* present voltage */
52 /* not present in /proc */
53 int rtime
; /* remaining time */
54 int percentage
; /* battery percentage (-1 if no battery) */
60 int present
; /* 1 if present, 0 if no battery */
61 int design_capacity
; /* design capacity */
62 int last_full_capacity
; /* last_full_capacity */
63 int battery_technology
; /* 1 non-rechargeable, 0 rechargeable */
64 int design_voltage
; /* design voltage */
65 int design_capacity_warning
; /* design capacity warning (critical) */
66 int design_capacity_low
; /* design capacity low (low level) */
74 int state
; /* 1 if online, 0 if offline */
78 /* number of batteries detected */
81 int check_acpi (void);
82 void read_acad_state (ACADstate
*acadstate
);
83 void read_acpi_info (ACPIinfo
*acpiinfo
, int battery
);
84 void read_acpi_state (ACPIstate
*acpistate
, ACPIinfo
*acpiinfo
, int battery
);
85 void acpi_get_temperature(int *temperature
, int *temp_is_celsius
);
86 int acpi_get_fan_status(void);