2 * A not-yet-general-purpose ACPI library, by Joey Hess <joey@kitenet.net>
5 /* Define ACPI_THERMAL to make the library support finding info about thermal
7 /* #define ACPI_THERMAL 1 */
9 /* Define ACPI_APM to get the acpi_read function, which is like apm_read. */
10 /* #define ACPI_APM 1 */
12 /* The lowest version of ACPI proc files supported. */
13 #define ACPI_VERSION 20011018
15 /* The number of acpi items of each class supported. */
16 #define ACPI_MAXITEM 8
18 int acpi_supported(void);
20 int acpi_read(int battery
, apm_info
*info
);
22 char *get_acpi_file(const char *file
);
23 int scan_acpi_num(const char *buf
, const char *key
);
24 char *scan_acpi_value(const char *buf
, const char *key
);
25 char *get_acpi_value(const char *file
, const char *key
);
26 int get_acpi_batt_capacity(int battery
);
28 extern int acpi_batt_count
;
29 /* Filenames of the battery info files for each system battery. */
30 extern char acpi_batt_info
[ACPI_MAXITEM
][128];
31 /* Filenames of the battery status files for each system battery. */
32 extern char acpi_batt_status
[ACPI_MAXITEM
][128];
33 /* Stores battery capacity, or 0 if the battery is absent. */
34 extern int acpi_batt_capacity
[ACPI_MAXITEM
];
36 extern int acpi_ac_count
;
37 extern char acpi_ac_adapter_info
[ACPI_MAXITEM
][128];
38 extern char acpi_ac_adapter_status
[ACPI_MAXITEM
][128];
41 extern int acpi_thermal_count
;
42 extern char acpi_thermal_info
[ACPI_MAXITEM
][128];
43 extern char acpi_thermal_status
[ACPI_MAXITEM
][128];
46 /* This enum is used to index into the acpi_labels */
47 enum acpi_labels_items
{
53 label_design_capacity
,
55 label_remaining_capacity
,
62 label_last_full_capacity
,
65 /* This is set to point to a list of strings used for the given acpi
67 extern char *acpi_labels
[];