Class

AstalBatteryDevice

Description

class AstalBattery.Device : GObject.Object
{
  /* No available fields */
}

Client for a UPower device.

Ancestors

Constructors

astal_battery_device_new
No description available.

Functions

astal_battery_device_get_default

Get the DisplayDevice.

Instance methods

astal_battery_device_get_device_type
No description available.

astal_battery_device_get_native_path
No description available.

astal_battery_device_get_vendor
No description available.

astal_battery_device_get_model
No description available.

astal_battery_device_get_serial
No description available.

astal_battery_device_get_update_time
No description available.

astal_battery_device_get_power_supply
No description available.

astal_battery_device_get_online
No description available.

astal_battery_device_get_energy
No description available.

astal_battery_device_get_energy_empty
No description available.

astal_battery_device_get_energy_full
No description available.

astal_battery_device_get_energy_rate
No description available.

astal_battery_device_get_voltage
No description available.

astal_battery_device_get_charge_cycles
No description available.

astal_battery_device_get_luminosity
No description available.

astal_battery_device_get_time_to_empty
No description available.

astal_battery_device_get_time_to_full
No description available.

astal_battery_device_get_percentage
No description available.

astal_battery_device_get_temperature
No description available.

astal_battery_device_get_is_present
No description available.

astal_battery_device_get_state
No description available.

astal_battery_device_get_is_rechargable
No description available.

astal_battery_device_get_capacity
No description available.

astal_battery_device_get_technology
No description available.

astal_battery_device_get_warning_level
No description available.

astal_battery_device_get_battery_level
No description available.

astal_battery_device_get_icon_name
No description available.

astal_battery_device_get_charging
No description available.

astal_battery_device_get_is_battery
No description available.

astal_battery_device_get_battery_icon_name
No description available.

astal_battery_device_get_device_type_name
No description available.

astal_battery_device_get_device_type_icon
No description available.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

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:vendor

Name of the vendor of the battery.

AstalBattery.Device:model

Name of the model of this battery.

AstalBattery.Device:serial

Unique serial number of the battery.

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:voltage

Voltage in the Cell or being recorded by the meter.

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:luminosity

Luminosity being recorded by the meter.

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:warning-level

Warning level of the 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:charging

Indicates if AstalBatteryDevice:state is charging or fully charged.

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.

Class structure

struct AstalBatteryDeviceClass {
  /* no available fields */
}

No description available.