Debian Codegraph @

dbus/org.freedesktop.UPower.xml

raw
1 <!DOCTYPE node PUBLIC
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">
5
6 <interface name="org.freedesktop.UPower">
7 <doc:doc>
8 <doc:description>
9 <doc:para>
10 The UPower 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>.
16 </doc:para>
17 <doc:para>
18 <doc:example language="shell" title="simple example">
19 <doc:code>
20 $ dbus-send --print-reply \
21 --system \
22 --dest=org.freedesktop.UPower \
23 /org/freedesktop/UPower \
24 org.freedesktop.UPower.EnumerateDevices
25
26 method return sender=:1.386 -> dest=:1.451 reply_serial=2
27 array [
28 object path "/org/freedesktop/UPower/devices/line_power_AC"
29 object path "/org/freedesktop/UPower/devices/battery_BAT0"
30 ]
31 </doc:code>
32 </doc:example>
33 </doc:para>
34 </doc:description>
35 </doc:doc>
36
37 <!-- ************************************************************ -->
38
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>
43 </arg>
44
45 <doc:doc>
46 <doc:description>
47 <doc:para>
48 Enumerate all power objects on the system.
49 </doc:para>
50 </doc:description>
51 </doc:doc>
52 </method>
53
54 <method name="EnumerateKbdBacklights">
55 <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
56 <arg name="KbdBacklight" direction="out" type="ao">
57 <doc:doc><doc:summary>An array of object paths for keyboard backlight LEDs.</doc:summary></doc:doc>
58 </arg>
59
60 <doc:doc>
61 <doc:description>
62 <doc:para>
63 Enumerate all keyboard backlight LED objects on the system.
64 </doc:para>
65 </doc:description>
66 </doc:doc>
67 </method>
68
69 <method name="GetDisplayDevice">
70 <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
71 <arg name="device" direction="out" type="o">
72 <doc:doc><doc:summary>An object path for the "display device.</doc:summary></doc:doc>
73 </arg>
74
75 <doc:doc>
76 <doc:description>
77 <doc:para>
78 Get the object to the "display device", a composite device that represents the
79 status icon to show in desktop environments. You can also access the object directly
80 as its path is guaranteed to be /org/freedesktop/UPower/devices/DisplayDevice.
81 The following standard org.freedesktop.UPower.Device
82 properties will be defined (only <doc:ref type="property" to="Source:IsPresent">IsPresent</doc:ref> takes a special meaning):
83 <doc:list>
84 <doc:item>
85 <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>
86 </doc:item>
87 <doc:item>
88 <doc:term>State</doc:term><doc:definition>the power state of the display device, such as Charging or Discharging.</doc:definition>
89 </doc:item>
90 <doc:item>
91 <doc:term>Percentage</doc:term><doc:definition>the amount of energy left on the device.</doc:definition>
92 </doc:item>
93 <doc:item>
94 <doc:term>Energy</doc:term><doc:definition>Amount of energy (measured in Wh) currently available in the power source.</doc:definition>
95 </doc:item>
96 <doc:item>
97 <doc:term>EnergyFull</doc:term><doc:definition>Amount of energy (measured in Wh) in the power source when it's considered full.</doc:definition>
98 </doc:item>
99 <doc:item>
100 <doc:term>EnergyRate</doc:term><doc:definition>Discharging/charging rate of the source, measured in Watt.</doc:definition>
101 </doc:item>
102 <doc:item>
103 <doc:term>TimeToEmpty</doc:term><doc:definition>Number of seconds until the power source is considered empty.</doc:definition>
104 </doc:item>
105 <doc:item>
106 <doc:term>TimeToFull</doc:term><doc:definition>Number of seconds until the power source is considered full.</doc:definition>
107 </doc:item>
108 <doc:item>
109 <doc:term>IsPresent</doc:term><doc:definition>Whether a status icon using this information should be presented.</doc:definition>
110 </doc:item>
111 <doc:item>
112 <doc:term>IconName</doc:term><doc:definition>An icon name representing the device state.</doc:definition>
113 </doc:item>
114 <doc:item>
115 <doc:term>WarningLevel</doc:term><doc:definition>The same as the overall <doc:ref type="property" to="Source:WarningLevel">WarningLevel</doc:ref></doc:definition>
116 </doc:item>
117 </doc:list>
118 </doc:para>
119 </doc:description>
120 </doc:doc>
121 </method>
122
123 <method name="GetCriticalAction">
124 <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
125 <arg name="action" direction="out" type="s">
126 <doc:doc><doc:summary>A string representing the critical action configured and available.</doc:summary></doc:doc>
127 </arg>
128
129 <doc:doc>
130 <doc:description>
131 <doc:para>
132 When the system's power supply is critical (critically low batteries or UPS),
133 the system will take this action. Possible values are:
134 <doc:list>
135 <doc:item>
136 <doc:term>HybridSleep</doc:term>
137 </doc:item>
138 <doc:item>
139 <doc:term>Hibernate</doc:term>
140 </doc:item>
141 <doc:item>
142 <doc:term>PowerOff</doc:term>
143 </doc:item>
144 <doc:item>
145 <doc:term>Suspend</doc:term>
146 </doc:item>
147 <doc:item>
148 <doc:term>Ignore</doc:term>
149 </doc:item>
150 </doc:list>
151 </doc:para>
152 </doc:description>
153 </doc:doc>
154 </method>
155
156 <!-- ************************************************************ -->
157
158 <signal name="DeviceAdded">
159 <arg name="device" type="o">
160 <doc:doc><doc:summary>Object path of device that was added.</doc:summary></doc:doc>
161 </arg>
162
163 <doc:doc>
164 <doc:description>
165 <doc:para>
166 Emitted when a device is added.
167 </doc:para>
168 </doc:description>
169 </doc:doc>
170 </signal>
171
172 <!-- ************************************************************ -->
173
174 <signal name="DeviceRemoved">
175 <arg name="device" type="o">
176 <doc:doc><doc:summary>Object path of device that was removed.</doc:summary></doc:doc>
177 </arg>
178
179 <doc:doc>
180 <doc:description>
181 <doc:para>
182 Emitted when a device is removed.
183 </doc:para>
184 </doc:description>
185 </doc:doc>
186 </signal>
187
188 <!-- ************************************************************ -->
189
190 <property name="DaemonVersion" type="s" access="read">
191 <doc:doc><doc:description><doc:para>
192 Version of the running daemon, e.g. <doc:tt>002</doc:tt>.
193 </doc:para></doc:description></doc:doc>
194 </property>
195
196 <property name="OnBattery" type="b" access="read">
197 <doc:doc><doc:description><doc:para>
198 Indicates whether the system is running on battery power.
199 This property is provided for convenience.
200 </doc:para></doc:description></doc:doc>
201 </property>
202
203 <property name="LidIsClosed" type="b" access="read">
204 <doc:doc>
205 <doc:description>
206 <doc:para>
207 Indicates if the laptop lid is closed where the display cannot be seen.
208 </doc:para>
209 </doc:description>
210 </doc:doc>
211 </property>
212
213 <property name="LidIsPresent" type="b" access="read">
214 <doc:doc>
215 <doc:description>
216 <doc:para>
217 If the system has a lid device.
218 </doc:para>
219 </doc:description>
220 </doc:doc>
221 </property>
222
223 </interface>
224
225 </node>