Class
AstalBatteryDevice
Description
class AstalBattery.Device : GObject.Object
{
/* No available fields */
}
Client for a UPower device.
Properties
AstalBattery.Device:device-type
If it is ASTAL_BATTERY_TYPE_BATTERY
, you will need to verify that the property power-supply has the value true
before
considering it as a laptop battery. Otherwise it will likely be the battery for a device of an unknown type.
AstalBattery.Device:native-path
Native path of the power source. This is the sysfs path, for example /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0. It is blank if the device is being driven by a user space driver.
AstalBattery.Device:update-time
The point in time (seconds since the Epoch) that data was read from the power source.
AstalBattery.Device:power-supply
If the power device is used to supply the system. This would be set true
for laptop batteries and UPS devices, but set to false
for
wireless mice or PDAs.
AstalBattery.Device:online
Whether power is currently being provided through line power.
This property is only valid if AstalBatteryDevice:device-type
is ASTAL_BATTERY_TYPE_LINE_POWER
.
AstalBattery.Device:energy
Amount of energy (measured in Wh) currently available in the power source.
This property is only valid if AstalBatteryDevice:device-type
is ASTAL_BATTERY_TYPE_BATTERY
.
AstalBattery.Device:energy-empty
Amount of energy (measured in Wh) in the power source when it’s considered to be empty.
This property is only valid if AstalBatteryDevice:device-type
is ASTAL_BATTERY_TYPE_BATTERY
.
AstalBattery.Device:energy-full
Amount of energy (measured in Wh) in the power source when it’s considered full.
This property is only valid if AstalBatteryDevice:device-type
is ASTAL_BATTERY_TYPE_BATTERY
.
AstalBattery.Device:energy-full-design
Amount of energy (measured in Wh) the power source is designed to hold when it’s considered full.
This property is only valid if AstalBatteryDevice:device-type
is ASTAL_BATTERY_TYPE_BATTERY
.
AstalBattery.Device:energy-rate
Amount of energy being drained from the source, measured in W. If positive, the source is being discharged, if negative it’s being charged.
AstalBattery.Device:charge-cycles
The number of charge cycles as defined by the TCO certification, or -1 if that value is unknown or not applicable.
AstalBattery.Device:time-to-empty
Number of seconds until the power source is considered empty. Is set to 0 if unknown.
This property is only valid if AstalBatteryDevice:device-type
is ASTAL_BATTERY_TYPE_BATTERY
.
AstalBattery.Device:time-to-full
Number of seconds until the power source is considered full. Is set to 0 if unknown.
This property is only valid if AstalBatteryDevice:device-type
is ASTAL_BATTERY_TYPE_BATTERY
.
AstalBattery.Device:percentage
The amount of energy left in the power source expressed as a percentage between 0 and 1.
This property is only valid if AstalBatteryDevice:device-type
is ASTAL_BATTERY_TYPE_BATTERY
. The percentage
will be an approximation if AstalBatteryDevice:battery-level
is set to something other than None.
AstalBattery.Device:temperature
The temperature of the device in degrees Celsius.
This property is only valid if AstalBatteryDevice:device-type
is ASTAL_BATTERY_TYPE_BATTERY
.
AstalBattery.Device:is-present
If the power source is present in the bay.
This property is only valid if AstalBatteryDevice:device-type
is ASTAL_BATTERY_TYPE_BATTERY
.
AstalBattery.Device:state
The battery power state.
This property is only valid if AstalBatteryDevice:device-type
is ASTAL_BATTERY_TYPE_BATTERY
.
AstalBattery.Device:is-rechargable
If the power source is rechargeable.
This property is only valid if AstalBatteryDevice:device-type
is ASTAL_BATTERY_TYPE_BATTERY
.
AstalBattery.Device:capacity
The capacity of the power source expressed as a percentage between 0 and 1.
This property is only valid if AstalBatteryDevice:device-type
is ASTAL_BATTERY_TYPE_BATTERY
.
AstalBattery.Device:technology
Technology used in the battery:
This property is only valid if AstalBatteryDevice:device-type
is ASTAL_BATTERY_TYPE_BATTERY
.
AstalBattery.Device:battery-level
The level of the battery for devices which do not report a percentage but rather a coarse battery level. If the value is None. then the device
does not support coarse battery reporting, and the AstalBatteryDevice:percentage
should be used instead.
AstalBattery.Device:icon-name
An icon name representing this Device.
NOTE: AstalBatteryDevice:battery-icon-name
might be a better fit as it is calculated from percentage.
AstalBattery.Device:is-battery
Indicates if AstalBatteryDevice:device-type
is not line power or unknown.
AstalBattery.Device:battery-icon-name
An icon name in the form of “battery-level-$percentage-$state-symbolic”.
AstalBattery.Device:device-type-name
A string representation of this device’s AstalBatteryDevice:device-type
.
AstalBattery.Device:device-type-icon
An icon name that can be used to represent this device’s AstalBatteryDevice:device-type
.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.