#include <battery.h>
Public Member Functions | |
Battery () | |
constructor | |
BATTERY_STATES | batteryState () |
get the current state the battery is in | |
int | updateBatteryState (int ac_state, EventManagement *eM) |
update the battery state | |
int | chargingState () |
get the current charging state | |
int | remainingTime () |
get remaining time until battery is empty | |
int | remainingPercent () |
get remaining percentage until battery is empty | |
int | remainingChargingTime () |
return remaining time until battery is fully charged | |
void | resetState () |
reset the battery state to BAT_NORM state | |
Private Attributes | |
BATTERY_STATES | _battery_state |
holds the current battery state | |
BatteryGeneral | _bg |
holds battery info for client requests | |
unsigned | _msecs_last_battery_read |
sums up time since battery was last polled |
|
constructor
|
|
get the current state the battery is in
|
|
get the current charging state
|
|
return remaining time until battery is fully charged
|
|
get remaining percentage until battery is empty
|
|
get remaining time until battery is empty
|
|
reset the battery state to BAT_NORM state I'm not exactly sure whether this is needed |
|
update the battery state
|
|
holds the current battery state
|
|
holds battery info for client requests
|
|
sums up time since battery was last polled not private, because it needs to be reset on ACPI event from outside. |