~ci-train-bot/indicator-session/indicator-session-ubuntu-zesty-2188

« back to all changes in this revision

Viewing changes to src/backend-dbus/org.freedesktop.ConsoleKit.Manager.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
<?xml version="1.0" encoding="UTF-8"?>
 
2
<node name="/org/freedesktop/ConsoleKit/Manager"
 
3
  xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd"
 
4
>
 
5
 
 
6
  <interface name="org.freedesktop.ConsoleKit.Manager">
 
7
    <method name="Restart">
 
8
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
 
9
      <doc:doc>
 
10
        <doc:description>
 
11
          <doc:para>This method initiates a request to restart (ie. reboot) the computer system.</doc:para>
 
12
        </doc:description>
 
13
      </doc:doc>
 
14
    </method>
 
15
 
 
16
    <method name="CanRestart">
 
17
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
 
18
      <arg name="can_restart" type="b" direction="out"/>
 
19
    </method>
 
20
 
 
21
    <method name="Stop">
 
22
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
 
23
      <doc:doc>
 
24
        <doc:description>
 
25
          <doc:para>This method initiates a request to stop (ie. shutdown) the computer system.</doc:para>
 
26
        </doc:description>
 
27
      </doc:doc>
 
28
    </method>
 
29
 
 
30
    <method name="CanStop">
 
31
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
 
32
      <arg name="can_stop" type="b" direction="out"/>
 
33
    </method>
 
34
 
 
35
    <method name="OpenSession">
 
36
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
 
37
      <arg name="cookie" direction="out" type="s">
 
38
        <doc:doc>
 
39
          <doc:summary>The secret cookie that is used to identify the new session</doc:summary>
 
40
        </doc:doc>
 
41
      </arg>
 
42
      <doc:doc>
 
43
        <doc:description>
 
44
          <doc:para>This method requests that a new <doc:ref type="interface" to="Session">Session</doc:ref>
 
45
          be created for the calling process.  The properties of this new Session are set automatically
 
46
          from information collected about the calling process.
 
47
          </doc:para>
 
48
          <doc:para>This new session exists until the calling process disconnects from the system bus or
 
49
          calls <doc:ref type="method" to="Manager.CloseSession">CloseSession()</doc:ref>.
 
50
          </doc:para>
 
51
          <doc:para>It is the responsibility of the calling process to set the environment variable
 
52
          XDG_SESSION_COOKIE to the value of the returned cookie.  This cookie should only
 
53
          be made available to child processes of the caller so that they may be identified
 
54
          as members of this session.
 
55
          </doc:para>
 
56
          <doc:para>See this simple example:
 
57
          <doc:example language="c" title="simple example"><doc:code>
 
58
        DBusError       error;
 
59
        DBusMessage    *message;
 
60
        DBusMessage    *reply;
 
61
 
 
62
        message = dbus_message_new_method_call ("org.freedesktop.ConsoleKit",
 
63
                                                "/org/freedesktop/ConsoleKit/Manager",
 
64
                                                "org.freedesktop.ConsoleKit.Manager",
 
65
                                                "OpenSession");
 
66
        if (message == NULL) {
 
67
                goto out;
 
68
        }
 
69
 
 
70
        dbus_error_init (&amp;error);
 
71
        reply = dbus_connection_send_with_reply_and_block (connector->connection,
 
72
                                                           message,
 
73
                                                           -1,
 
74
                                                           &amp;error);
 
75
        if (reply == NULL) {
 
76
                goto out;
 
77
        }
 
78
 
 
79
        dbus_error_init (&amp;error);
 
80
        if (! dbus_message_get_args (reply,
 
81
                                     &amp;error,
 
82
                                     DBUS_TYPE_STRING, &amp;cookie,
 
83
                                     DBUS_TYPE_INVALID)) {
 
84
                goto out;
 
85
        }
 
86
 
 
87
          </doc:code></doc:example></doc:para>
 
88
        </doc:description>
 
89
        <doc:seealso><doc:ref type="method" to="Manager.OpenSessionWithParameters">OpenSessionWithParameters()</doc:ref></doc:seealso>
 
90
      </doc:doc>
 
91
    </method>
 
92
    <method name="OpenSessionWithParameters">
 
93
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
 
94
      <arg name="parameters" direction="in" type="a(sv)">
 
95
        <doc:doc>
 
96
          <doc:summary>An array of sets of property names and values</doc:summary>
 
97
        </doc:doc>
 
98
      </arg>
 
99
      <arg name="cookie" direction="out" type="s">
 
100
        <doc:doc>
 
101
          <doc:summary>The secret cookie that is used to identify the new session</doc:summary>
 
102
        </doc:doc>
 
103
      </arg>
 
104
      <doc:doc>
 
105
        <doc:description>
 
106
          <doc:para>This method requests that a new <doc:ref type="interface" to="Session">Session</doc:ref>
 
107
          be created for the calling process.  The properties of this new Session are from the
 
108
          parameters provided.
 
109
          </doc:para>
 
110
          <doc:para>This new session exists until the calling process disconnects from the system bus or
 
111
          calls <doc:ref type="method" to="Manager.CloseSession">CloseSession()</doc:ref>.
 
112
          </doc:para>
 
113
          <doc:para>It is the responsibility of the calling process to set the environment variable
 
114
          XDG_SESSION_COOKIE to the value of the returned cookie.  This cookie should only
 
115
          be made available to child processes of the caller so that they may be identified
 
116
          as members of this session.
 
117
          </doc:para>
 
118
          <doc:para>See the <doc:ref type="interface" to="Session">Session</doc:ref> properties for a list of valid parameters.</doc:para>
 
119
        </doc:description>
 
120
        <doc:seealso><doc:ref type="interface" to="Session">org.freedesktop.ConsoleKit.Session</doc:ref></doc:seealso>
 
121
        <doc:permission>This method is restricted to privileged users by D-Bus policy.</doc:permission>
 
122
      </doc:doc>
 
123
    </method>
 
124
    <method name="CloseSession">
 
125
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
 
126
      <arg name="cookie" direction="in" type="s">
 
127
        <doc:doc>
 
128
          <doc:summary>The secret cookie that is used to identify the session</doc:summary>
 
129
        </doc:doc>
 
130
      </arg>
 
131
      <arg name="result" direction="out" type="b">
 
132
        <doc:doc>
 
133
          <doc:summary>Whether the session was successfully closed</doc:summary>
 
134
        </doc:doc>
 
135
      </arg>
 
136
      <doc:doc>
 
137
        <doc:description>
 
138
          <doc:para>This method is used to close the session identified by the supplied cookie.
 
139
          </doc:para>
 
140
          <doc:para>The session can only be closed by the same process that opened the session.
 
141
          </doc:para>
 
142
        </doc:description>
 
143
      </doc:doc>
 
144
    </method>
 
145
 
 
146
    <method name="GetSeats">
 
147
      <arg name="seats" direction="out" type="ao">
 
148
        <doc:doc>
 
149
          <doc:summary>an array of Seat IDs</doc:summary>
 
150
        </doc:doc>
 
151
      </arg>
 
152
      <doc:doc>
 
153
        <doc:description>
 
154
          <doc:para>This gets a list of all the <doc:ref type="interface" to="Seat">Seats</doc:ref>
 
155
          that are currently present on the system.</doc:para>
 
156
          <doc:para>Each Seat ID is an D-Bus object path for the object that implements the
 
157
          <doc:ref type="interface" to="Seat">Seat</doc:ref> interface.</doc:para>
 
158
        </doc:description>
 
159
        <doc:seealso><doc:ref type="interface" to="Seat">org.freedesktop.ConsoleKit.Seat</doc:ref></doc:seealso>
 
160
      </doc:doc>
 
161
    </method>
 
162
 
 
163
    <method name="GetSessions">
 
164
      <arg name="sessions" direction="out" type="ao">
 
165
        <doc:doc>
 
166
          <doc:summary>an array of Session IDs</doc:summary>
 
167
        </doc:doc>
 
168
      </arg>
 
169
      <doc:doc>
 
170
        <doc:description>
 
171
          <doc:para>This gets a list of all the <doc:ref type="interface" to="Session">Sessions</doc:ref>
 
172
          that are currently present on the system.</doc:para>
 
173
          <doc:para>Each Session ID is an D-Bus object path for the object that implements the
 
174
          <doc:ref type="interface" to="Session">Session</doc:ref> interface.</doc:para>
 
175
        </doc:description>
 
176
        <doc:seealso><doc:ref type="interface" to="Session">org.freedesktop.ConsoleKit.Session</doc:ref></doc:seealso>
 
177
      </doc:doc>
 
178
    </method>
 
179
 
 
180
    <method name="GetSessionForCookie">
 
181
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
 
182
      <arg name="cookie" direction="in" type="s">
 
183
        <doc:doc>
 
184
          <doc:summary>The secret cookie that is used to identify the session</doc:summary>
 
185
        </doc:doc>
 
186
      </arg>
 
187
      <arg name="ssid" direction="out" type="o">
 
188
        <doc:doc>
 
189
          <doc:summary>The object identifier for the current session</doc:summary>
 
190
        </doc:doc>
 
191
      </arg>
 
192
      <doc:doc>
 
193
        <doc:description>
 
194
          <doc:para>Returns the session ID that is associated with the specified cookie.
 
195
          </doc:para>
 
196
        </doc:description>
 
197
      </doc:doc>
 
198
    </method>
 
199
    <method name="GetSessionForUnixProcess">
 
200
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
 
201
      <arg name="pid" direction="in" type="u">
 
202
        <doc:doc>
 
203
          <doc:summary>The POSIX process ID</doc:summary>
 
204
        </doc:doc>
 
205
      </arg>
 
206
      <arg name="ssid" direction="out" type="o">
 
207
        <doc:doc>
 
208
          <doc:summary>The object identifier for the current session</doc:summary>
 
209
        </doc:doc>
 
210
      </arg>
 
211
      <doc:doc>
 
212
        <doc:description>
 
213
          <doc:para>Attempts to determine the session ID for the specified
 
214
          POSIX process ID (pid).
 
215
          </doc:para>
 
216
        </doc:description>
 
217
      </doc:doc>
 
218
    </method>
 
219
    <method name="GetCurrentSession">
 
220
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
 
221
      <arg name="ssid" direction="out" type="o">
 
222
        <doc:doc>
 
223
          <doc:summary>The object identifier for the current session</doc:summary>
 
224
        </doc:doc>
 
225
      </arg>
 
226
      <doc:doc>
 
227
        <doc:description>
 
228
          <doc:para>Attempts to determine the session ID that the caller belongs to.
 
229
          </doc:para>
 
230
          <doc:para>See this example of using dbus-send:
 
231
          <doc:example language="shell" title="shell example"><doc:code>
 
232
  dbus-send --system --dest=org.freedesktop.ConsoleKit \
 
233
  --type=method_call --print-reply --reply-timeout=2000 \
 
234
  /org/freedesktop/ConsoleKit/Manager \
 
235
  org.freedesktop.ConsoleKit.Manager.GetCurrentSession
 
236
          </doc:code></doc:example></doc:para>
 
237
        </doc:description>
 
238
      </doc:doc>
 
239
    </method>
 
240
    <method name="GetSessionsForUnixUser">
 
241
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
 
242
      <arg name="uid" direction="in" type="u">
 
243
         <doc:doc>
 
244
          <doc:summary>POSIX User identification</doc:summary>
 
245
        </doc:doc>
 
246
     </arg>
 
247
      <arg name="sessions" direction="out" type="ao">
 
248
        <doc:doc>
 
249
          <doc:summary>an array of Session IDs</doc:summary>
 
250
        </doc:doc>
 
251
      </arg>
 
252
      <doc:doc>
 
253
        <doc:description>
 
254
          <doc:para>This gets a list of all the <doc:ref type="interface" to="Session">Sessions</doc:ref>
 
255
          that are currently open for the specified user.</doc:para>
 
256
          <doc:para>Each Session ID is an D-Bus object path for the object that implements the
 
257
          <doc:ref type="interface" to="Session">Session</doc:ref> interface.</doc:para>
 
258
        </doc:description>
 
259
      </doc:doc>
 
260
    </method>
 
261
    <method name="GetSessionsForUser">
 
262
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
 
263
      <arg name="uid" direction="in" type="u">
 
264
         <doc:doc>
 
265
          <doc:summary>User identification</doc:summary>
 
266
        </doc:doc>
 
267
     </arg>
 
268
      <arg name="sessions" direction="out" type="ao">
 
269
        <doc:doc>
 
270
          <doc:summary>an array of Session IDs</doc:summary>
 
271
        </doc:doc>
 
272
      </arg>
 
273
      <doc:doc>
 
274
        <doc:description>
 
275
          <doc:para>This gets a list of all the <doc:ref type="interface" to="Session">Sessions</doc:ref>
 
276
          that are currently open for the specified user.</doc:para>
 
277
          <doc:para>Each Session ID is an D-Bus object path for the object that implements the
 
278
          <doc:ref type="interface" to="Session">Session</doc:ref> interface.</doc:para>
 
279
        </doc:description>
 
280
        <doc:deprecated version="0.1.3" instead="GetSessionsForUnixUser"/>
 
281
      </doc:doc>
 
282
    </method>
 
283
 
 
284
    <method name="GetSystemIdleHint">
 
285
      <arg name="idle_hint" type="b" direction="out">
 
286
        <doc:doc>
 
287
          <doc:summary>The value of the system-idle-hint</doc:summary>
 
288
        </doc:doc>
 
289
      </arg>
 
290
      <doc:doc>
 
291
        <doc:description>
 
292
          <doc:para>Returns TRUE if the <doc:ref type="property" to="Session:idle-hint">idle-hint</doc:ref>
 
293
          property of every open session is TRUE or if there are no open sessions.
 
294
          </doc:para>
 
295
        </doc:description>
 
296
      </doc:doc>
 
297
    </method>
 
298
    <method name="GetSystemIdleSinceHint">
 
299
      <arg name="iso8601_datetime" type="s" direction="out">
 
300
        <doc:doc>
 
301
          <doc:summary>An ISO 8601 format date-type string</doc:summary>
 
302
        </doc:doc>
 
303
      </arg>
 
304
      <doc:doc>
 
305
        <doc:description>
 
306
          <doc:para>Returns an ISO 8601 date-time string that corresponds to
 
307
          the time of the last change of the system-idle-hint.
 
308
          </doc:para>
 
309
        </doc:description>
 
310
      </doc:doc>
 
311
    </method>
 
312
 
 
313
    <signal name="SeatAdded">
 
314
      <arg name="sid" type="o">
 
315
        <doc:doc>
 
316
          <doc:summary>The Seat ID for the added seat</doc:summary>
 
317
        </doc:doc>
 
318
      </arg>
 
319
      <doc:doc>
 
320
        <doc:description>
 
321
          <doc:para>Emitted when a Seat has been added to the system.
 
322
          </doc:para>
 
323
        </doc:description>
 
324
      </doc:doc>
 
325
    </signal>
 
326
    <signal name="SeatRemoved">
 
327
      <arg name="sid" type="o">
 
328
        <doc:doc>
 
329
          <doc:summary>The Seat ID for the removed seat</doc:summary>
 
330
        </doc:doc>
 
331
      </arg>
 
332
      <doc:doc>
 
333
        <doc:description>
 
334
          <doc:para>Emitted when a Seat has been removed from the system.
 
335
          </doc:para>
 
336
        </doc:description>
 
337
      </doc:doc>
 
338
    </signal>
 
339
    <signal name="SystemIdleHintChanged">
 
340
      <arg name="hint" type="b">
 
341
        <doc:doc>
 
342
          <doc:summary>The value of the system-idle-hint</doc:summary>
 
343
        </doc:doc>
 
344
      </arg>
 
345
      <doc:doc>
 
346
        <doc:description>
 
347
          <doc:para>Emitted when the value of the system-idle-hint has changed.
 
348
          </doc:para>
 
349
        </doc:description>
 
350
      </doc:doc>
 
351
    </signal>
 
352
  </interface>
 
353
</node>