diff options
author | David Zeuthen <david@fubar.dk> | 2005-07-28 01:37:01 +0000 |
---|---|---|
committer | David Zeuthen <david@fubar.dk> | 2005-07-28 01:37:01 +0000 |
commit | f1df1df1361a03c8f24e59bdb65f6cb584f65f88 (patch) | |
tree | c792c2bf493945df6341013f4eeed39986755170 /hald/util.h | |
parent | 57a8245ba13213a70f0d4d4f3e24d16627456629 (diff) |
Patch from Richard Hughes <richard@hughsie.com>.
New function used to calculate the percentage charge, initially for ACPI
batteries, but could be used by all devices as contains lots of error
checks.
Call util_compute_percentage_charge so we can populate
battery.charge_level.percentage
Diffstat (limited to 'hald/util.h')
-rw-r--r-- | hald/util.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hald/util.h b/hald/util.h index 7621f3a5..8e3243fc 100644 --- a/hald/util.h +++ b/hald/util.h @@ -31,6 +31,8 @@ int util_compute_time_remaining (const char *id, int chargeRate, int chargeLevel, int chargeLastFull, gboolean isDischarging, gboolean isCharging); +int util_compute_percentage_charge (const char *id, int chargeLevel, int chargeLastFull); + gboolean hal_util_remove_trailing_slash (gchar *path); const gchar *hal_util_get_last_element (const gchar *s); |