~larsu/indicator-session/glib-deadlock-workaround

« back to all changes in this revision

Viewing changes to src/upower.xml

  • Committer: Charles Kerr
  • Date: 2013-03-22 21:34:34 UTC
  • mto: (384.2.29 ng)
  • mto: This revision was merged to the branch mainline in revision 399.
  • Revision ID: charles.kerr@canonical.com-20130322213434-a85qbob8bi4fvfx2
port indicator-session to GMenu/cmake. Code coverage increased from 0% to 95.4%.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 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>.
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
 
    <!-- ************************************************************ -->
55
 
 
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>
59
 
      </arg>
60
 
 
61
 
      <doc:doc>
62
 
        <doc:description>
63
 
          <doc:para>
64
 
            Emitted when a device is added.
65
 
          </doc:para>
66
 
        </doc:description>
67
 
      </doc:doc>
68
 
    </signal>
69
 
 
70
 
    <!-- ************************************************************ -->
71
 
 
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>
75
 
      </arg>
76
 
 
77
 
      <doc:doc>
78
 
        <doc:description>
79
 
          <doc:para>
80
 
            Emitted when a device is removed.
81
 
          </doc:para>
82
 
        </doc:description>
83
 
      </doc:doc>
84
 
    </signal>
85
 
 
86
 
    <!-- ************************************************************ -->
87
 
 
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>
91
 
      </arg>
92
 
 
93
 
      <doc:doc>
94
 
        <doc:description>
95
 
          <doc:para>
96
 
            Emitted when a device changed.
97
 
          </doc:para>
98
 
        </doc:description>
99
 
      </doc:doc>
100
 
    </signal>
101
 
 
102
 
    <!-- ************************************************************ -->
103
 
 
104
 
    <signal name="Changed">
105
 
      <doc:doc>
106
 
        <doc:description>
107
 
          <doc:para>
108
 
            Emitted when one or more properties on the object changes.
109
 
          </doc:para>
110
 
        </doc:description>
111
 
      </doc:doc>
112
 
    </signal>
113
 
 
114
 
    <!-- ************************************************************ -->
115
 
 
116
 
    <signal name="Sleeping">
117
 
      <doc:doc>
118
 
        <doc:description>
119
 
          <doc:para>
120
 
            This signal is sent when the session is about to be suspended or
121
 
            hibernated.
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
124
 
            Jabber messages).
125
 
          </doc:para>
126
 
        </doc:description>
127
 
      </doc:doc>
128
 
    </signal>
129
 
 
130
 
    <!-- ************************************************************ -->
131
 
 
132
 
    <signal name="Resuming">
133
 
      <doc:doc>
134
 
        <doc:description>
135
 
          <doc:para>
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).
140
 
          </doc:para>
141
 
        </doc:description>
142
 
      </doc:doc>
143
 
    </signal>
144
 
 
145
 
    <!-- ************************************************************ -->
146
 
 
147
 
    <method name="AboutToSleep">
148
 
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
149
 
      <doc:doc>
150
 
        <doc:description>
151
 
          <doc:para>
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.
157
 
          </doc:para>
158
 
          <doc:para>
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.
164
 
          </doc:para>
165
 
          <doc:para>
166
 
            If this method is not called than nothing bad will happen and
167
 
            Suspend() or Hibernate() will block for the required second.
168
 
          </doc:para>
169
 
        </doc:description>
170
 
      </doc:doc>
171
 
    </method>
172
 
 
173
 
    <!-- ************************************************************ -->
174
 
 
175
 
    <method name="Suspend">
176
 
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
177
 
      <doc:doc>
178
 
        <doc:description>
179
 
          <doc:para>
180
 
            Suspends the computer into a low power state.
181
 
            System state is not preserved if the power is lost.
182
 
          </doc:para>
183
 
          <doc:para>
184
 
            If AboutToRequestSleep() has not been called then UPower will send
185
 
            the Sleeping() signal and block for one second.
186
 
          </doc:para>
187
 
          <doc:para>
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.
191
 
          </doc:para>
192
 
        </doc:description>
193
 
      </doc:doc>
194
 
    </method>
195
 
 
196
 
    <!-- ************************************************************ -->
197
 
 
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>
202
 
      </arg>
203
 
      <doc:doc>
204
 
        <doc:description>
205
 
          <doc:para>
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>.
208
 
          </doc:para>
209
 
        </doc:description>
210
 
      </doc:doc>
211
 
    </method>
212
 
 
213
 
    <!-- ************************************************************ -->
214
 
 
215
 
    <method name="Hibernate">
216
 
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
217
 
      <doc:doc>
218
 
        <doc:description>
219
 
          <doc:para>
220
 
            Hibernates the computer into a low power state.
221
 
            System state is preserved if the power is lost.
222
 
          </doc:para>
223
 
          <doc:para>
224
 
            If AboutToRequestSleep() has not been called then UPower will send
225
 
            the Sleeping() signal and block for one second.
226
 
          </doc:para>
227
 
          <doc:para>
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.
231
 
          </doc:para>
232
 
        </doc:description>
233
 
      </doc:doc>
234
 
    </method>
235
 
 
236
 
    <!-- ************************************************************ -->
237
 
 
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>
242
 
      </arg>
243
 
      <doc:doc>
244
 
        <doc:description>
245
 
          <doc:para>
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>.
248
 
          </doc:para>
249
 
        </doc:description>
250
 
      </doc:doc>
251
 
    </method>
252
 
 
253
 
    <!-- ************************************************************ -->
254
 
 
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>
259
 
    </property>
260
 
 
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>
265
 
    </property>
266
 
 
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>
271
 
    </property>
272
 
 
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>
278
 
    </property>
279
 
 
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>
285
 
    </property>
286
 
 
287
 
    <property name="LidIsClosed" type="b" access="read">
288
 
      <doc:doc>
289
 
        <doc:description>
290
 
          <doc:para>
291
 
            Indicates if the laptop lid is closed where the display cannot be seen.
292
 
          </doc:para>
293
 
        </doc:description>
294
 
      </doc:doc>
295
 
    </property>
296
 
 
297
 
    <property name="LidIsPresent" type="b" access="read">
298
 
      <doc:doc>
299
 
        <doc:description>
300
 
          <doc:para>
301
 
            If the system has a lid device.
302
 
          </doc:para>
303
 
        </doc:description>
304
 
      </doc:doc>
305
 
    </property>
306
 
 
307
 
  </interface>
308
 
 
309
 
</node>