Changeset View
Changeset View
Standalone View
Standalone View
src/solid/devices/backends/upower/dbus/org.freedesktop.UPower.xml
- This file was added.
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="GetDisplayDevice"> | ||||
55 | <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> | ||||
56 | <arg name="device" direction="out" type="o"> | ||||
57 | <doc:doc><doc:summary>An object path for the "display device.</doc:summary></doc:doc> | ||||
58 | </arg> | ||||
59 | | ||||
60 | <doc:doc> | ||||
61 | <doc:description> | ||||
62 | <doc:para> | ||||
63 | Get the object to the "display device", a composite device that represents the | ||||
64 | status icon to show in desktop environments. You can also access the object directly | ||||
65 | as its path is guaranteed to be /org/freedesktop/UPower/devices/DisplayDevice. | ||||
66 | The following standard org.freedesktop.UPower.Device | ||||
67 | properties will be defined (only <doc:ref type="property" to="Source:IsPresent">IsPresent</doc:ref> takes a special meaning): | ||||
68 | <doc:list> | ||||
69 | <doc:item> | ||||
70 | <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> | ||||
71 | </doc:item> | ||||
72 | <doc:item> | ||||
73 | <doc:term>State</doc:term><doc:definition>the power state of the display device, such as Charging or Discharging.</doc:definition> | ||||
74 | </doc:item> | ||||
75 | <doc:item> | ||||
76 | <doc:term>Percentage</doc:term><doc:definition>the amount of energy left on the device.</doc:definition> | ||||
77 | </doc:item> | ||||
78 | <doc:item> | ||||
79 | <doc:term>Energy</doc:term><doc:definition>Amount of energy (measured in Wh) currently available in the power source.</doc:definition> | ||||
80 | </doc:item> | ||||
81 | <doc:item> | ||||
82 | <doc:term>EnergyFull</doc:term><doc:definition>Amount of energy (measured in Wh) in the power source when it's considered full.</doc:definition> | ||||
83 | </doc:item> | ||||
84 | <doc:item> | ||||
85 | <doc:term>EnergyRate</doc:term><doc:definition>Amount of energy being drained from the source, measured in W. If positive, the source is being discharged, if negative it's being charged.</doc:definition> | ||||
86 | </doc:item> | ||||
87 | <doc:item> | ||||
88 | <doc:term>TimeToEmpty</doc:term><doc:definition>Number of seconds until the power source is considered empty.</doc:definition> | ||||
89 | </doc:item> | ||||
90 | <doc:item> | ||||
91 | <doc:term>TimeToFull</doc:term><doc:definition>Number of seconds until the power source is considered full.</doc:definition> | ||||
92 | </doc:item> | ||||
93 | <doc:item> | ||||
94 | <doc:term>IsPresent</doc:term><doc:definition>Whether a status icon using this information should be presented.</doc:definition> | ||||
95 | </doc:item> | ||||
96 | <doc:item> | ||||
97 | <doc:term>IconName</doc:term><doc:definition>An icon name representing the device state.</doc:definition> | ||||
98 | </doc:item> | ||||
99 | <doc:item> | ||||
100 | <doc:term>WarningLevel</doc:term><doc:definition>The same as the overall <doc:ref type="property" to="Source:WarningLevel">WarningLevel</doc:ref></doc:definition> | ||||
101 | </doc:item> | ||||
102 | </doc:list> | ||||
103 | </doc:para> | ||||
104 | </doc:description> | ||||
105 | </doc:doc> | ||||
106 | </method> | ||||
107 | | ||||
108 | <method name="GetCriticalAction"> | ||||
109 | <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> | ||||
110 | <arg name="action" direction="out" type="s"> | ||||
111 | <doc:doc><doc:summary>A string representing the critical action configured and available.</doc:summary></doc:doc> | ||||
112 | </arg> | ||||
113 | | ||||
114 | <doc:doc> | ||||
115 | <doc:description> | ||||
116 | <doc:para> | ||||
117 | When the system's power supply is critical (critically low batteries or UPS), | ||||
118 | the system will take this action. Possible values are: | ||||
119 | <doc:list> | ||||
120 | <doc:item> | ||||
121 | <doc:term>HybridSleep</doc:term> | ||||
122 | </doc:item> | ||||
123 | <doc:item> | ||||
124 | <doc:term>Hibernate</doc:term> | ||||
125 | </doc:item> | ||||
126 | <doc:item> | ||||
127 | <doc:term>PowerOff</doc:term> | ||||
128 | </doc:item> | ||||
129 | </doc:list> | ||||
130 | </doc:para> | ||||
131 | </doc:description> | ||||
132 | </doc:doc> | ||||
133 | </method> | ||||
134 | | ||||
135 | <!-- ************************************************************ --> | ||||
136 | | ||||
137 | <signal name="DeviceAdded"> | ||||
138 | <arg name="device" type="o"> | ||||
139 | <doc:doc><doc:summary>Object path of device that was added.</doc:summary></doc:doc> | ||||
140 | </arg> | ||||
141 | | ||||
142 | <doc:doc> | ||||
143 | <doc:description> | ||||
144 | <doc:para> | ||||
145 | Emitted when a device is added. | ||||
146 | </doc:para> | ||||
147 | </doc:description> | ||||
148 | </doc:doc> | ||||
149 | </signal> | ||||
150 | | ||||
151 | <!-- ************************************************************ --> | ||||
152 | | ||||
153 | <signal name="DeviceRemoved"> | ||||
154 | <arg name="device" type="o"> | ||||
155 | <doc:doc><doc:summary>Object path of device that was removed.</doc:summary></doc:doc> | ||||
156 | </arg> | ||||
157 | | ||||
158 | <doc:doc> | ||||
159 | <doc:description> | ||||
160 | <doc:para> | ||||
161 | Emitted when a device is removed. | ||||
162 | </doc:para> | ||||
163 | </doc:description> | ||||
164 | </doc:doc> | ||||
165 | </signal> | ||||
166 | | ||||
167 | <!-- ************************************************************ --> | ||||
168 | | ||||
169 | <property name="DaemonVersion" type="s" access="read"> | ||||
170 | <doc:doc><doc:description><doc:para> | ||||
171 | Version of the running daemon, e.g. <doc:tt>002</doc:tt>. | ||||
172 | </doc:para></doc:description></doc:doc> | ||||
173 | </property> | ||||
174 | | ||||
175 | <property name="OnBattery" type="b" access="read"> | ||||
176 | <doc:doc><doc:description><doc:para> | ||||
177 | Indicates whether the system is running on battery power. | ||||
178 | This property is provided for convenience. | ||||
179 | </doc:para></doc:description></doc:doc> | ||||
180 | </property> | ||||
181 | | ||||
182 | <property name="LidIsClosed" type="b" access="read"> | ||||
183 | <doc:doc> | ||||
184 | <doc:description> | ||||
185 | <doc:para> | ||||
186 | Indicates if the laptop lid is closed where the display cannot be seen. | ||||
187 | </doc:para> | ||||
188 | </doc:description> | ||||
189 | </doc:doc> | ||||
190 | </property> | ||||
191 | | ||||
192 | <property name="LidIsPresent" type="b" access="read"> | ||||
193 | <doc:doc> | ||||
194 | <doc:description> | ||||
195 | <doc:para> | ||||
196 | If the system has a lid device. | ||||
197 | </doc:para> | ||||
198 | </doc:description> | ||||
199 | </doc:doc> | ||||
200 | </property> | ||||
201 | | ||||
202 | </interface> | ||||
203 | | ||||
204 | </node> |