wmthrottle: Remove autogenerated autotools files from git.
[dockapps.git] / wmbattery / acpi.h
blobffe427868db061a955522d90112eecef44243f07
1 /*
2 * A not-yet-general-purpose ACPI library, by Joey Hess <joey@kitenet.net>
3 */
5 /* Define ACPI_THERMAL to make the library support finding info about thermal
6 * sources. */
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);
19 #ifdef ACPI_APM
20 int acpi_read(int battery, apm_info *info);
21 #endif
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];
40 #if ACPI_THERMAL
41 extern int acpi_thermal_count;
42 extern char acpi_thermal_info[ACPI_MAXITEM][128];
43 extern char acpi_thermal_status[ACPI_MAXITEM][128];
44 #endif
46 /* This enum is used to index into the acpi_labels */
47 enum acpi_labels_items {
48 label_info,
49 label_status,
50 label_battery,
51 label_ac_adapter,
52 label_capacity,
53 label_design_capacity,
54 label_present,
55 label_remaining_capacity,
56 label_present_rate,
57 label_charging_state,
58 #if ACPI_THERMAL
59 label_thermal,
60 #endif
61 label_ac_state,
62 label_last_full_capacity,
65 /* This is set to point to a list of strings used for the given acpi
66 * * version. */
67 extern char *acpi_labels[];