summaryrefslogtreecommitdiff
path: root/dbus
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2017-04-04 18:20:27 +0200
committerBastien Nocera <hadess@hadess.net>2017-04-06 16:33:38 +0200
commit499d05b8370324f319933558bac590e98ad55927 (patch)
treefa8b7fdbd6f829d06ae695405976ce84fe8e2976 /dbus
parent4f9230900bdf2ff4fc22373a3a84f10146b9c1a8 (diff)
downloadupower-499d05b8370324f319933558bac590e98ad55927.tar.gz
all: Add BatteryLevel property
Export approximate battery levels that devices can use, exported by the kernel as POWER_SUPPLY_CAPACITY_LEVEL_* values. This avoids bizarrely accurate values showing up in UIs when we only have ok/warning levels of accuracy in some cases. https://bugs.freedesktop.org/show_bug.cgi?id=100359
Diffstat (limited to 'dbus')
-rw-r--r--dbus/org.freedesktop.UPower.Device.xml33
1 files changed, 33 insertions, 0 deletions
diff --git a/dbus/org.freedesktop.UPower.Device.xml b/dbus/org.freedesktop.UPower.Device.xml
index 8ce9c15..4852ab0 100644
--- a/dbus/org.freedesktop.UPower.Device.xml
+++ b/dbus/org.freedesktop.UPower.Device.xml
@@ -703,6 +703,39 @@ method return sender=:1.386 -> dest=:1.477 reply_serial=2
</doc:doc>
</property>
+ <property name="BatteryLevel" type="u" access="read">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Level of the battery:
+ </doc:para>
+ <doc:list>
+ <doc:item>
+ <doc:term>0</doc:term><doc:definition>Unknown</doc:definition>
+ </doc:item>
+ <doc:item>
+ <doc:term>1</doc:term><doc:definition>None (the battery does not use a coarse level of battery reporting)</doc:definition>
+ </doc:item>
+ <doc:item>
+ <doc:term>3</doc:term><doc:definition>Low</doc:definition>
+ </doc:item>
+ <doc:item>
+ <doc:term>4</doc:term><doc:definition>Critical</doc:definition>
+ </doc:item>
+ <doc:item>
+ <doc:term>6</doc:term><doc:definition>Normal</doc:definition>
+ </doc:item>
+ <doc:item>
+ <doc:term>7</doc:term><doc:definition>High</doc:definition>
+ </doc:item>
+ <doc:item>
+ <doc:term>8</doc:term><doc:definition>Full</doc:definition>
+ </doc:item>
+ </doc:list>
+ </doc:description>
+ </doc:doc>
+ </property>
+
<property name="IconName" type="s" access="read">
<doc:doc>
<doc:description>