summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org.freedesktop.DeviceKit.Power.Device.xml126
-rw-r--r--src/org.freedesktop.DeviceKit.Power.xml29
2 files changed, 150 insertions, 5 deletions
diff --git a/src/org.freedesktop.DeviceKit.Power.Device.xml b/src/org.freedesktop.DeviceKit.Power.Device.xml
index 8148665..92beb57 100644
--- a/src/org.freedesktop.DeviceKit.Power.Device.xml
+++ b/src/org.freedesktop.DeviceKit.Power.Device.xml
@@ -8,14 +8,130 @@
<doc:doc>
<doc:description>
<doc:para>
- TODO: some explanatory text etc. etc. Mention that we
- collect history to provide more precise values of
- time-to-empty, time-to-full. Go into detail
- with the algorithms.
+ Objects implementing this interface are usually discovered through
+ the <doc:tt>org.freedesktop.DeviceKit.Power</doc:tt> interface on
+ the <doc:tt>/org/freedesktop/DeviceKit/Power</doc:tt> object on
+ the D-Bus system bus service with the well-known
+ name <doc:tt>org.freedesktop.DeviceKit.Power</doc:tt> using
+ the
+ <doc:ref type="method" to="Power.EnumerateDevices">EnumerateDevices</doc:ref>
+ method.
+ </doc:para>
+ <doc:para>
+ <doc:example language="shell" title="simple example">
+ <doc:code>
+$ dbus-send --print-reply \
+ --system \
+ --dest=org.freedesktop.DeviceKit.Power \
+ /org/freedesktop/DeviceKit/Power/devices/battery_BAT0 \
+ org.freedesktop.DBus.Properties.GetAll \
+ string:org.freedesktop.DeviceKit.Power.Device
+
+method return sender=:1.386 -> dest=:1.477 reply_serial=2
+ array [
+ dict entry(
+ string "native-path"
+ variant string "/sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/device:01/PNP0C09:00/PNP0C0A:00/power_supply/BAT0"
+ )
+ dict entry(
+ string "vendor"
+ variant string "SONY"
+ )
+ dict entry(
+ string "model"
+ variant string "42T4568"
+ )
+ dict entry(
+ string "serial"
+ variant string "4179"
+ )
+ dict entry(
+ string "update-time"
+ variant uint64 1226417875
+ )
+ dict entry(
+ string "type"
+ variant string "battery"
+ )
+ dict entry(
+ string "power-supply"
+ variant boolean true
+ )
+ dict entry(
+ string "has-history"
+ variant boolean true
+ )
+ dict entry(
+ string "has-statistics"
+ variant boolean true
+ )
+ dict entry(
+ string "online"
+ variant boolean false
+ )
+ dict entry(
+ string "energy"
+ variant double 72.85
+ )
+ dict entry(
+ string "energy-empty"
+ variant double 0
+ )
+ dict entry(
+ string "energy-full"
+ variant double 74.55
+ )
+ dict entry(
+ string "energy-full-design"
+ variant double 74.88
+ )
+ dict entry(
+ string "energy-rate"
+ variant double 0
+ )
+ dict entry(
+ string "voltage"
+ variant double 16.415
+ )
+ dict entry(
+ string "time-to-empty"
+ variant int64 0
+ )
+ dict entry(
+ string "time-to-full"
+ variant int64 0
+ )
+ dict entry(
+ string "percentage"
+ variant double 97.7197
+ )
+ dict entry(
+ string "is-present"
+ variant boolean true
+ )
+ dict entry(
+ string "state"
+ variant string "fully-charged"
+ )
+ dict entry(
+ string "is-rechargeable"
+ variant boolean true
+ )
+ dict entry(
+ string "capacity"
+ variant double 100
+ )
+ dict entry(
+ string "technology"
+ variant string "lithium-ion"
+ )
+ ]
+ </doc:code>
+ </doc:example>
</doc:para>
<doc:para>
Unless otherwise noted, an empty string or the value 0 in a
- property means not set.
+ property on this interface means not set.
</doc:para>
</doc:description>
</doc:doc>
diff --git a/src/org.freedesktop.DeviceKit.Power.xml b/src/org.freedesktop.DeviceKit.Power.xml
index ee29b45..3070c30 100644
--- a/src/org.freedesktop.DeviceKit.Power.xml
+++ b/src/org.freedesktop.DeviceKit.Power.xml
@@ -4,6 +4,35 @@
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<interface name="org.freedesktop.DeviceKit.Power">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ The DeviceKit-power service is available via the system message
+ bus. To access the service, use
+ the <doc:tt>org.freedesktop.DeviceKit.Power</doc:tt> interface on
+ the <doc:tt>/org/freedesktop/DeviceKit/Power</doc:tt> object on
+ the D-Bus system bus service with the well-known
+ name <doc:tt>org.freedesktop.DeviceKit.Power</doc:tt>.
+ </doc:para>
+ <doc:para>
+ <doc:example language="shell" title="simple example">
+ <doc:code>
+$ dbus-send --print-reply \
+ --system \
+ --dest=org.freedesktop.DeviceKit.Power \
+ /org/freedesktop/DeviceKit/Power \
+ org.freedesktop.DeviceKit.Power.EnumerateDevices
+
+method return sender=:1.386 -> dest=:1.451 reply_serial=2
+ array [
+ object path "/org/freedesktop/DeviceKit/Power/devices/line_power_AC"
+ object path "/org/freedesktop/DeviceKit/Power/devices/battery_BAT0"
+ ]
+ </doc:code>
+ </doc:example>
+ </doc:para>
+ </doc:description>
+ </doc:doc>
<!-- ************************************************************ -->