2008-05-08 22:29:38 -04:00
< !DOCTYPE node PUBLIC
"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name= "/" xmlns:doc= "http://www.freedesktop.org/dbus/1.0/doc.dtd" >
2010-01-18 16:53:12 +00:00
<interface name= "org.freedesktop.UPower" >
2008-11-11 11:36:25 -05:00
<doc:doc >
<doc:description >
<doc:para >
2010-05-28 15:00:07 +01:00
The UPower service is available via the system message
2008-11-11 11:36:25 -05:00
bus. To access the service, use
2010-01-18 16:53:12 +00:00
the <doc:tt > org.freedesktop.UPower</doc:tt> interface on
the <doc:tt > /org/freedesktop/UPower</doc:tt> object on
2008-11-11 11:36:25 -05:00
the D-Bus system bus service with the well-known
2010-01-18 16:53:12 +00:00
name <doc:tt > org.freedesktop.UPower</doc:tt> .
2008-11-11 11:36:25 -05:00
</doc:para>
<doc:para >
<doc:example language= "shell" title= "simple example" >
<doc:code >
$ dbus-send --print-reply \
--system \
2010-01-18 16:53:12 +00:00
--dest=org.freedesktop.UPower \
/org/freedesktop/UPower \
org.freedesktop.UPower.EnumerateDevices
2008-11-11 11:36:25 -05:00
method return sender=:1.386 -> dest=:1.451 reply_serial=2
array [
2010-01-18 16:53:12 +00:00
object path "/org/freedesktop/UPower/devices/line_power_AC"
object path "/org/freedesktop/UPower/devices/battery_BAT0"
2008-11-11 11:36:25 -05:00
]
</doc:code>
</doc:example>
</doc:para>
</doc:description>
</doc:doc>
2008-05-08 22:29:38 -04:00
<!-- ************************************************************ -->
<method name= "EnumerateDevices" >
<annotation name= "org.freedesktop.DBus.GLib.Async" value= "" />
<arg name= "devices" direction= "out" type= "ao" >
<doc:doc > <doc:summary > An array of object paths for devices.</doc:summary> </doc:doc>
</arg>
<doc:doc >
<doc:description >
<doc:para >
2008-07-24 17:39:00 +01:00
Enumerate all power objects on the system.
2008-05-08 22:29:38 -04:00
</doc:para>
</doc:description>
</doc:doc>
</method>
2025-03-13 13:39:21 +08:00
<method name= "EnumerateKbdBacklights" >
<annotation name= "org.freedesktop.DBus.GLib.Async" value= "" />
<arg name= "KbdBacklight" direction= "out" type= "ao" >
<doc:doc > <doc:summary > An array of object paths for keyboard backlight LEDs.</doc:summary> </doc:doc>
</arg>
<doc:doc >
<doc:description >
<doc:para >
Enumerate all keyboard backlight LED objects on the system.
</doc:para>
</doc:description>
</doc:doc>
</method>
2013-10-16 13:42:34 +02:00
<method name= "GetDisplayDevice" >
<annotation name= "org.freedesktop.DBus.GLib.Async" value= "" />
<arg name= "device" direction= "out" type= "o" >
<doc:doc > <doc:summary > An object path for the "display device.</doc:summary> </doc:doc>
</arg>
<doc:doc >
<doc:description >
<doc:para >
Get the object to the "display device", a composite device that represents the
2013-10-16 15:58:13 +02:00
status icon to show in desktop environments. You can also access the object directly
as its path is guaranteed to be /org/freedesktop/UPower/devices/DisplayDevice.
The following standard org.freedesktop.UPower.Device
2013-10-16 13:42:34 +02:00
properties will be defined (only <doc:ref type= "property" to= "Source:IsPresent" > IsPresent</doc:ref> takes a special meaning):
<doc:list >
<doc:item >
<doc:term > Type</doc:term> <doc:definition > the type of the display device, UPS or Battery. Note that this value can change, as opposed to real devices.</doc:definition>
</doc:item>
<doc:item >
<doc:term > State</doc:term> <doc:definition > the power state of the display device, such as Charging or Discharging.</doc:definition>
</doc:item>
<doc:item >
<doc:term > Percentage</doc:term> <doc:definition > the amount of energy left on the device.</doc:definition>
</doc:item>
<doc:item >
<doc:term > Energy</doc:term> <doc:definition > Amount of energy (measured in Wh) currently available in the power source.</doc:definition>
</doc:item>
<doc:item >
<doc:term > EnergyFull</doc:term> <doc:definition > Amount of energy (measured in Wh) in the power source when it's considered full.</doc:definition>
</doc:item>
<doc:item >
2023-12-18 14:52:25 +08:00
<doc:term > EnergyRate</doc:term> <doc:definition > Discharging/charging rate of the source, measured in Watt.</doc:definition>
2013-10-16 13:42:34 +02:00
</doc:item>
<doc:item >
<doc:term > TimeToEmpty</doc:term> <doc:definition > Number of seconds until the power source is considered empty.</doc:definition>
</doc:item>
<doc:item >
<doc:term > TimeToFull</doc:term> <doc:definition > Number of seconds until the power source is considered full.</doc:definition>
</doc:item>
<doc:item >
<doc:term > IsPresent</doc:term> <doc:definition > Whether a status icon using this information should be presented.</doc:definition>
</doc:item>
2013-10-16 15:58:39 +02:00
<doc:item >
<doc:term > IconName</doc:term> <doc:definition > An icon name representing the device state.</doc:definition>
</doc:item>
<doc:item >
<doc:term > WarningLevel</doc:term> <doc:definition > The same as the overall <doc:ref type= "property" to= "Source:WarningLevel" > WarningLevel</doc:ref> </doc:definition>
</doc:item>
2013-10-16 13:42:34 +02:00
</doc:list>
</doc:para>
</doc:description>
</doc:doc>
</method>
2013-10-17 09:04:03 +02:00
<method name= "GetCriticalAction" >
<annotation name= "org.freedesktop.DBus.GLib.Async" value= "" />
<arg name= "action" direction= "out" type= "s" >
<doc:doc > <doc:summary > A string representing the critical action configured and available.</doc:summary> </doc:doc>
</arg>
<doc:doc >
<doc:description >
<doc:para >
When the system's power supply is critical (critically low batteries or UPS),
the system will take this action. Possible values are:
<doc:list >
<doc:item >
<doc:term > HybridSleep</doc:term>
</doc:item>
<doc:item >
<doc:term > Hibernate</doc:term>
</doc:item>
<doc:item >
<doc:term > PowerOff</doc:term>
</doc:item>
2025-02-06 10:46:33 +02:00
<doc:item >
<doc:term > Suspend</doc:term>
</doc:item>
<doc:item >
<doc:term > Ignore</doc:term>
</doc:item>
2013-10-17 09:04:03 +02:00
</doc:list>
</doc:para>
</doc:description>
</doc:doc>
</method>
2008-05-08 22:29:38 -04:00
<!-- ************************************************************ -->
<signal name= "DeviceAdded" >
<arg name= "device" type= "o" >
<doc:doc > <doc:summary > Object path of device that was added.</doc:summary> </doc:doc>
</arg>
<doc:doc >
<doc:description >
<doc:para >
Emitted when a device is added.
</doc:para>
</doc:description>
</doc:doc>
</signal>
<!-- ************************************************************ -->
<signal name= "DeviceRemoved" >
<arg name= "device" type= "o" >
<doc:doc > <doc:summary > Object path of device that was removed.</doc:summary> </doc:doc>
</arg>
<doc:doc >
<doc:description >
<doc:para >
Emitted when a device is removed.
</doc:para>
</doc:description>
</doc:doc>
</signal>
<!-- ************************************************************ -->
2009-09-18 18:28:53 +01:00
<property name= "DaemonVersion" type= "s" access= "read" >
2008-11-11 13:58:26 -05:00
<doc:doc > <doc:description > <doc:para >
Version of the running daemon, e.g. <doc:tt > 002</doc:tt> .
</doc:para> </doc:description> </doc:doc>
</property>
2009-09-18 18:28:53 +01:00
<property name= "OnBattery" type= "b" access= "read" >
2008-11-11 13:58:26 -05:00
<doc:doc > <doc:description > <doc:para >
Indicates whether the system is running on battery power.
This property is provided for convenience.
</doc:para> </doc:description> </doc:doc>
</property>
2024-01-17 16:17:08 +01:00
<property name= "LidIsClosed" type= "b" access= "read" >
<doc:doc >
<doc:description >
<doc:para >
Indicates if the laptop lid is closed where the display cannot be seen.
</doc:para>
</doc:description>
</doc:doc>
</property>
<property name= "LidIsPresent" type= "b" access= "read" >
<doc:doc >
<doc:description >
<doc:para >
If the system has a lid device.
</doc:para>
</doc:description>
</doc:doc>
</property>
2008-05-08 22:29:38 -04:00
</interface>
</node>