Classes | |
| struct | apm_info |
| apm related header holding apm information More... | |
| struct | capacity_snapshot |
| An array of this one is used to estimate the remaining battery capacity in minutes. More... | |
Functions | |
| int | getDevicesNum (const char *dir_name) |
| get amount of entries in a directory | |
| int | getColonValue (FILE *file, char *value, const size_t value_size, char *def, const size_t def_size) |
| get next value which is seperated by a colon | |
| int | getDirEntry (const int num, char *file, const size_t size_file, const char *dir_in) |
| get a directory entry | |
| int | _write_line (const char *filename, const char *fmt,...) |
| write a line to a file | |
| int | read_apm_info (apm_info *i) |
| reads out information from /proc/apm | |
| int | check_ACPI_dir (const char *dir) |
| check whether module has been loaded and device is available | |
|
||||||||||||||||
|
write a line to a file (e.g.: write "3\n" to /acpi/sleep)
|
|
|
check whether module has been loaded and device is available
|
|
||||||||||||||||||||||||
|
get next value which is seperated by a colon reads a line and parsed it according to:
"def[spaces]*:[spaces]*value[spaces]* e.g.: var: 56 mWh returns 56 mWh in value and var in def
|
|
|
get amount of entries in a directory use this to determine available devices
|
|
||||||||||||||||||||
|
get a directory entry file: directory entry searched, e.g.: BAT0 give directory and position of the searched file position is determined by just looping over the directory directory . and .. are not counted.
|
|
|
reads out information from /proc/apm
|
1.4.6