2
"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
3
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
4
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
6
<interface name="org.freedesktop.UPower">
10
The DeviceKit-power service is available via the system message
11
bus. To access the service, use
12
the <doc:tt>org.freedesktop.UPower</doc:tt> interface on
13
the <doc:tt>/org/freedesktop/UPower</doc:tt> object on
14
the D-Bus system bus service with the well-known
15
name <doc:tt>org.freedesktop.UPower</doc:tt>.
18
<doc:example language="shell" title="simple example">
20
$ dbus-send --print-reply \
22
--dest=org.freedesktop.UPower \
23
/org/freedesktop/UPower \
24
org.freedesktop.UPower.EnumerateDevices
26
method return sender=:1.386 -> dest=:1.451 reply_serial=2
28
object path "/org/freedesktop/UPower/devices/line_power_AC"
29
object path "/org/freedesktop/UPower/devices/battery_BAT0"
37
<!-- ************************************************************ -->
39
<method name="EnumerateDevices">
40
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
41
<arg name="devices" direction="out" type="ao">
42
<doc:doc><doc:summary>An array of object paths for devices.</doc:summary></doc:doc>
48
Enumerate all power objects on the system.
54
<!-- ************************************************************ -->
56
<signal name="DeviceAdded">
57
<arg name="device" type="o">
58
<doc:doc><doc:summary>Object path of device that was added.</doc:summary></doc:doc>
64
Emitted when a device is added.
70
<!-- ************************************************************ -->
72
<signal name="DeviceRemoved">
73
<arg name="device" type="o">
74
<doc:doc><doc:summary>Object path of device that was removed.</doc:summary></doc:doc>
80
Emitted when a device is removed.
86
<!-- ************************************************************ -->
88
<signal name="DeviceChanged">
89
<arg name="device" type="s">
90
<doc:doc><doc:summary>Object path of device that was changed.</doc:summary></doc:doc>
96
Emitted when a device changed.
102
<!-- ************************************************************ -->
104
<signal name="Changed">
108
Emitted when one or more properties on the object changes.
114
<!-- ************************************************************ -->
116
<signal name="Sleeping">
120
This signal is sent when the session is about to be suspended or
122
Session and system programs have one second to do anything required
123
before the sleep action is taken (such as sending out Avahi or
130
<!-- ************************************************************ -->
132
<signal name="Resuming">
136
This signal is sent when the session has just returned from
137
Suspend() or Hibernate().
138
Session and system programs can then do anything required (such as
139
sending out Avahi or Jabber messages).
145
<!-- ************************************************************ -->
147
<method name="AboutToSleep">
148
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
152
This method tells UPower that the Suspend() or Hibernate() method
153
is about to be called.
154
This allows UPower to emit the Suspending signal whilst
155
session activities are happening that have to be done before the
156
suspend process is started.
159
This method would typically be called by the session power
160
management daemon, before it locks the screen and waits for the
161
screen to fade to black.
162
The session power management component would then call Suspend() or
163
Hibernate() when these syncronous tasks have completed.
166
If this method is not called than nothing bad will happen and
167
Suspend() or Hibernate() will block for the required second.
173
<!-- ************************************************************ -->
175
<method name="Suspend">
176
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
180
Suspends the computer into a low power state.
181
System state is not preserved if the power is lost.
184
If AboutToRequestSleep() has not been called then UPower will send
185
the Sleeping() signal and block for one second.
188
If AboutToRequestSleep() has been called less than one second
189
before this method is called then UPower will block for the
190
remaining time to complete one second of delay.
196
<!-- ************************************************************ -->
198
<method name="SuspendAllowed">
199
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
200
<arg name="allowed" direction="out" type="b">
201
<doc:doc><doc:summary>TRUE if allowed, otherwise FALSE</doc:summary></doc:doc>
206
Check if the caller has (or can get) the PolicyKit privilege to call
207
<doc:ref type="method" to="Power.Suspend">Suspend</doc:ref>.
213
<!-- ************************************************************ -->
215
<method name="Hibernate">
216
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
220
Hibernates the computer into a low power state.
221
System state is preserved if the power is lost.
224
If AboutToRequestSleep() has not been called then UPower will send
225
the Sleeping() signal and block for one second.
228
If AboutToRequestSleep() has been called less than one second
229
before this method is called then UPower will block for the
230
remaining time to complete one second of delay.
236
<!-- ************************************************************ -->
238
<method name="HibernateAllowed">
239
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
240
<arg name="allowed" direction="out" type="b">
241
<doc:doc><doc:summary>TRUE if allowed, otherwise FALSE</doc:summary></doc:doc>
246
Check if the caller has (or can get) the PolicyKit privilege to call
247
<doc:ref type="method" to="Power.Hibernate">Hibernate</doc:ref>.
253
<!-- ************************************************************ -->
255
<property name="DaemonVersion" type="s" access="read">
256
<doc:doc><doc:description><doc:para>
257
Version of the running daemon, e.g. <doc:tt>002</doc:tt>.
258
</doc:para></doc:description></doc:doc>
261
<property name="CanSuspend" type="b" access="read">
262
<doc:doc><doc:description><doc:para>
263
Whether the system is able to suspend.
264
</doc:para></doc:description></doc:doc>
267
<property name="CanHibernate" type="b" access="read">
268
<doc:doc><doc:description><doc:para>
269
Whether the system is able to hibernate.
270
</doc:para></doc:description></doc:doc>
273
<property name="OnBattery" type="b" access="read">
274
<doc:doc><doc:description><doc:para>
275
Indicates whether the system is running on battery power.
276
This property is provided for convenience.
277
</doc:para></doc:description></doc:doc>
280
<property name="OnLowBattery" type="b" access="read">
281
<doc:doc><doc:description><doc:para>
282
Indicates whether the system is running on battery power and if the battery is critically low.
283
This property is provided for convenience.
284
</doc:para></doc:description></doc:doc>
287
<property name="LidIsClosed" type="b" access="read">
291
Indicates if the laptop lid is closed where the display cannot be seen.
297
<property name="LidIsPresent" type="b" access="read">
301
If the system has a lid device.