org.gnome.SessionManager.xml 16.9 KB
Newer Older
1
2
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
William Jon McCann's avatar
William Jon McCann committed
3
<node xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
4
  <interface name="org.gnome.SessionManager">
William Jon McCann's avatar
William Jon McCann committed
5

6
7
8
    <!-- Initialization phase interfaces -->

    <method name="Setenv">
William Jon McCann's avatar
William Jon McCann committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
      <arg name="variable" type="s" direction="in">
        <doc:doc>
          <doc:summary>The variable name</doc:summary>
        </doc:doc>
      </arg>
      <arg name="value" type="s" direction="in">
        <doc:doc>
          <doc:summary>The value</doc:summary>
        </doc:doc>
      </arg>
      <doc:doc>
        <doc:description>
          <doc:para>Adds the variable name to the application launch environment with the specified value.  May only be used during the Session Manager initialization phase.</doc:para>
        </doc:description>
      </doc:doc>
24
25
    </method>

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
    <method name="GetLocale">
      <arg name="category" type="i" direction="in">
        <doc:doc>
          <doc:summary>The locale category</doc:summary>
        </doc:doc>
      </arg>
      <arg name="value" type="s" direction="out">
        <doc:doc>
          <doc:summary>The value</doc:summary>
        </doc:doc>
      </arg>
      <doc:doc>
        <doc:description>
          <doc:para>Reads the current state of the specific locale category.</doc:para>
        </doc:description>
      </doc:doc>
    </method>

44
    <method name="InitializationError">
William Jon McCann's avatar
William Jon McCann committed
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
      <arg name="message" type="s" direction="in">
        <doc:doc>
          <doc:summary>The error message</doc:summary>
        </doc:doc>
      </arg>
      <arg name="fatal" type="b" direction="in">
        <doc:doc>
          <doc:summary>Whether the error should be treated as fatal</doc:summary>
        </doc:doc>
      </arg>
      <doc:doc>
        <doc:description>
          <doc:para>May be used by applications launched during the Session Manager initialization phase to indicate there was a problem.</doc:para>
        </doc:description>
      </doc:doc>
60
61
    </method>

62
63
64
65
66
67
68
69
    <method name="Initialized">
      <doc:doc>
        <doc:description>
          <doc:para>Run from systemd to signal that gnome-session-initialized.target has been reached.</doc:para>
        </doc:description>
      </doc:doc>
    </method>

70
71
    <!-- Running phase interfaces -->

72
    <method name="RegisterClient">
William Jon McCann's avatar
William Jon McCann committed
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
      <arg type="s" name="app_id" direction="in">
        <doc:doc>
          <doc:summary>The application identifier</doc:summary>
        </doc:doc>
      </arg>
      <arg type="s" name="client_startup_id" direction="in">
        <doc:doc>
          <doc:summary>Client startup identifier</doc:summary>
        </doc:doc>
      </arg>
      <arg type="o" name="client_id" direction="out">
        <doc:doc>
          <doc:summary>The object path of the newly registered client</doc:summary>
        </doc:doc>
      </arg>
      <doc:doc>
        <doc:description>
          <doc:para>Register the caller as a Session Management client.</doc:para>
        </doc:description>
      </doc:doc>
93
    </method>
William Jon McCann's avatar
William Jon McCann committed
94

95
    <method name="UnregisterClient">
William Jon McCann's avatar
William Jon McCann committed
96
97
98
99
100
101
102
103
104
105
      <arg type="o" name="client_id" direction="in">
        <doc:doc>
          <doc:summary>The object path of the client</doc:summary>
        </doc:doc>
      </arg>
      <doc:doc>
        <doc:description>
          <doc:para>Unregister the specified client from Session Management.</doc:para>
        </doc:description>
      </doc:doc>
106
107
108
    </method>

    <method name="Inhibit">
William Jon McCann's avatar
William Jon McCann committed
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
      <arg type="s" name="app_id" direction="in">
        <doc:doc>
          <doc:summary>The application identifier</doc:summary>
        </doc:doc>
      </arg>
      <arg type="u" name="toplevel_xid" direction="in">
        <doc:doc>
          <doc:summary>The toplevel X window identifier</doc:summary>
        </doc:doc>
      </arg>
      <arg type="s" name="reason" direction="in">
        <doc:doc>
          <doc:summary>The reason for the inhibit</doc:summary>
        </doc:doc>
      </arg>
      <arg type="u" name="flags" direction="in">
        <doc:doc>
126
          <doc:summary>Flags that specify what should be inhibited</doc:summary>
William Jon McCann's avatar
William Jon McCann committed
127
128
129
130
131
132
133
134
        </doc:doc>
      </arg>
      <arg type="u" name="inhibit_cookie" direction="out">
        <doc:doc>
          <doc:summary>The cookie</doc:summary>
        </doc:doc>
      </arg>
      <doc:doc>
William Jon McCann's avatar
William Jon McCann committed
135
        <doc:summary>
136
          Proactively indicates that the calling application is performing an action that should not be interrupted and sets a reason to be displayed to the user when an interruption is about to take place.
William Jon McCann's avatar
William Jon McCann committed
137
        </doc:summary>
William Jon McCann's avatar
William Jon McCann committed
138
        <doc:description>
William Jon McCann's avatar
William Jon McCann committed
139
140
141
          <doc:para>Applications should invoke this method when they begin an operation that
            should not be interrupted, such as creating a CD or DVD.  The types of actions
            that may be blocked are specified by the flags parameter.  When the application
142
            completes the operation it should call <doc:ref type="method" to="org.gnome.SessionManager.Uninhibit">Uninhibit()</doc:ref>
143
            or disconnect from the session bus.
William Jon McCann's avatar
William Jon McCann committed
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
          </doc:para>
          <doc:para>
            Applications should not expect that they will always be able to block the
            action.  In most cases, users will be given the option to force the action
            to take place.
          </doc:para>
          <doc:para>
            Reasons should be short and to the point.
          </doc:para>
          <doc:para>
            The flags parameter must include at least one of the following:
            <doc:list>
              <doc:item>
                <doc:term>1</doc:term>
                <doc:definition>Inhibit logging out</doc:definition>
              </doc:item>
              <doc:item>
                <doc:term>2</doc:term>
                <doc:definition>Inhibit user switching</doc:definition>
              </doc:item>
              <doc:item>
                <doc:term>4</doc:term>
                <doc:definition>Inhibit suspending the session or computer</doc:definition>
              </doc:item>
168
169
170
171
              <doc:item>
                <doc:term>8</doc:term>
                <doc:definition>Inhibit the session being marked as idle</doc:definition>
              </doc:item>
Hans de Goede's avatar
Hans de Goede committed
172
173
174
175
              <doc:item>
                <doc:term>16</doc:term>
                <doc:definition>Inhibit auto-mounting removable media for the session</doc:definition>
              </doc:item>
William Jon McCann's avatar
William Jon McCann committed
176
177
178
179
180
            </doc:list>
            Values for flags may be bitwise or'ed together.
          </doc:para>
          <doc:para>
            The returned cookie is used to uniquely identify this request.  It should be used
181
            as an argument to <doc:ref type="method" to="org.gnome.SessionManager.Uninhibit">Uninhibit()</doc:ref> in
William Jon McCann's avatar
William Jon McCann committed
182
            order to remove the request.
William Jon McCann's avatar
William Jon McCann committed
183
184
185
          </doc:para>
        </doc:description>
      </doc:doc>
186
    </method>
William Jon McCann's avatar
William Jon McCann committed
187

188
    <method name="Uninhibit">
William Jon McCann's avatar
William Jon McCann committed
189
190
191
192
193
194
195
      <arg type="u" name="inhibit_cookie" direction="in">
        <doc:doc>
          <doc:summary>The cookie</doc:summary>
        </doc:doc>
      </arg>
      <doc:doc>
        <doc:description>
William Jon McCann's avatar
William Jon McCann committed
196
          <doc:para>Cancel a previous call to <doc:ref type="method" to="org.gnome.SessionManager.Inhibit">Inhibit()</doc:ref> identified by the cookie.</doc:para>
William Jon McCann's avatar
William Jon McCann committed
197
198
        </doc:description>
      </doc:doc>
199
200
    </method>

201
202
203
    <method name="IsInhibited">
      <arg type="u" name="flags" direction="in">
        <doc:doc>
204
          <doc:summary>Flags that specify what should be inhibited</doc:summary>
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
        </doc:doc>
      </arg>
      <arg type="b" name="is_inhibited" direction="out">
        <doc:doc>
          <doc:summary>Returns TRUE if any of the operations in the bitfield flags are inhibited</doc:summary>
        </doc:doc>
      </arg>
      <doc:doc>
        <doc:description>
          <doc:para>Determine if operation(s) specified by the flags
            are currently inhibited.  Flags are same as those accepted
            by the
            <doc:ref type="method" to="org.gnome.SessionManager.Inhibit">Inhibit()</doc:ref>
            method.</doc:para>
        </doc:description>
      </doc:doc>
    </method>

223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
    <method name="GetClients">
      <arg name="clients" direction="out" type="ao">
        <doc:doc>
          <doc:summary>an array of client IDs</doc:summary>
        </doc:doc>
      </arg>
      <doc:doc>
        <doc:description>
          <doc:para>This gets a list of all the <doc:ref type="interface" to="org.gnome.SessionManager.Client">Clients</doc:ref>
          that are currently known to the session manager.</doc:para>
          <doc:para>Each Client ID is an D-Bus object path for the object that implements the
          <doc:ref type="interface" to="org.gnome.SessionManager.Client">Client</doc:ref> interface.</doc:para>
        </doc:description>
        <doc:seealso><doc:ref type="interface" to="org.gnome.SessionManager.Client">org.gnome.SessionManager.Client</doc:ref></doc:seealso>
      </doc:doc>
    </method>

    <method name="GetInhibitors">
      <arg name="inhibitors" direction="out" type="ao">
        <doc:doc>
          <doc:summary>an array of inhibitor IDs</doc:summary>
        </doc:doc>
      </arg>
      <doc:doc>
        <doc:description>
          <doc:para>This gets a list of all the <doc:ref type="interface" to="org.gnome.SessionManager.Inhibitor">Inhibitors</doc:ref>
          that are currently known to the session manager.</doc:para>
          <doc:para>Each Inhibitor ID is an D-Bus object path for the object that implements the
          <doc:ref type="interface" to="org.gnome.SessionManager.Inhibitor">Inhibitor</doc:ref> interface.</doc:para>
        </doc:description>
        <doc:seealso><doc:ref type="interface" to="org.gnome.SessionManager.Inhibitor">org.gnome.SessionManager.Inhibitor</doc:ref></doc:seealso>
      </doc:doc>
    </method>

257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276

    <method name="IsAutostartConditionHandled">
      <arg name="condition" direction="in" type="s">
        <doc:doc>
          <doc:summary>The autostart condition string</doc:summary>
        </doc:doc>
      </arg>
      <arg name="handled" direction="out" type="b">
        <doc:doc>
          <doc:summary>True if condition is handled, false otherwise</doc:summary>
        </doc:doc>
      </arg>
      <doc:doc>
        <doc:description>
          <doc:para>Allows the caller to determine whether the session manager is
          handling changes to the specified autostart condition.</doc:para>
        </doc:description>
      </doc:doc>
    </method>

277
    <method name="Shutdown">
William Jon McCann's avatar
William Jon McCann committed
278
279
      <doc:doc>
        <doc:description>
280
281
282
283
284
285
286
287
288
          <doc:para>Request a shutdown dialog.</doc:para>
        </doc:description>
      </doc:doc>
    </method>

    <method name="Reboot">
      <doc:doc>
        <doc:description>
          <doc:para>Request a reboot dialog.</doc:para>
William Jon McCann's avatar
William Jon McCann committed
289
290
        </doc:description>
      </doc:doc>
291
292
    </method>

293
294
295
296
297
298
299
300
301
302
303
304
305
306
    <method name="CanShutdown">
      <arg name="is_available" direction="out" type="b">
        <doc:doc>
          <doc:summary>True if shutdown is available to the user, false otherwise</doc:summary>
        </doc:doc>
      </arg>
      <doc:doc>
        <doc:description>
          <doc:para>Allows the caller to determine whether or not it's okay to show
          a shutdown option in the UI</doc:para>
        </doc:description>
      </doc:doc>
    </method>

307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
    <method name="SetRebootToFirmwareSetup">
      <arg name="enable" direction="in" type="b">
        <doc:doc>
          <doc:summary>Whether we should reboot into setup</doc:summary>
        </doc:doc>
      </arg>
      <doc:doc>
        <doc:description>
          <doc:para>Allows the caller to indicate to the system's firmware to boot into setup mode</doc:para>
        </doc:description>
      </doc:doc>
    </method>

    <method name="CanRebootToFirmwareSetup">
      <arg name="is_available" direction="out" type="b">
        <doc:doc>
          <doc:summary>True if boot into setup mode is available to the user, false otherwise</doc:summary>
        </doc:doc>
      </arg>
      <doc:doc>
        <doc:description>
          <doc:para>Allows the caller to determine whether or not it's okay to show
          a reboot to firmware option in the UI</doc:para>
        </doc:description>
      </doc:doc>
    </method>

334
    <method name="Logout">
335
      <arg name="mode" type="u" direction="in">
William Jon McCann's avatar
William Jon McCann committed
336
        <doc:doc>
William Jon McCann's avatar
William Jon McCann committed
337
          <doc:summary>The type of logout that is being requested</doc:summary>
William Jon McCann's avatar
William Jon McCann committed
338
339
340
341
342
        </doc:doc>
      </arg>
      <doc:doc>
        <doc:description>
          <doc:para>Request a logout dialog</doc:para>
William Jon McCann's avatar
William Jon McCann committed
343
344
345
346
347
348
349
350
351
          <doc:para>
            Allowed values for the mode parameter are:
            <doc:list>
              <doc:item>
                <doc:term>0</doc:term>
                <doc:definition>Normal.</doc:definition>
              </doc:item>
              <doc:item>
                <doc:term>1</doc:term>
352
                <doc:definition>No confirmation interface should be shown.</doc:definition>
William Jon McCann's avatar
William Jon McCann committed
353
354
355
356
357
358
359
360
              </doc:item>
              <doc:item>
                <doc:term>2</doc:term>
                <doc:definition>Forcefully logout.  No confirmation will be shown and any inhibitors will be ignored.</doc:definition>
              </doc:item>
            </doc:list>
            Values for flags may be bitwise or'ed together.
          </doc:para>
William Jon McCann's avatar
William Jon McCann committed
361
362
        </doc:description>
      </doc:doc>
363
364
    </method>

365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
    <method name="IsSessionRunning">
      <arg name="running" direction="out" type="b">
        <doc:doc>
          <doc:summary>True if the session has entered the Running phase, false otherwise</doc:summary>
        </doc:doc>
      </arg>
      <doc:doc>
        <doc:description>
          <doc:para>Allows the caller to determine whether the session manager
          has entered the Running phase, in case the client missed the
          SessionRunning signal.</doc:para>
        </doc:description>
      </doc:doc>
    </method>

380
381
    <!-- Signals -->

382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
    <signal name="ClientAdded">
      <arg name="id" type="o">
        <doc:doc>
          <doc:summary>The object path for the added client</doc:summary>
        </doc:doc>
      </arg>
      <doc:doc>
        <doc:description>
          <doc:para>Emitted when a client has been added to the session manager.
          </doc:para>
        </doc:description>
      </doc:doc>
    </signal>
    <signal name="ClientRemoved">
      <arg name="id" type="o">
        <doc:doc>
          <doc:summary>The object path for the removed client</doc:summary>
        </doc:doc>
      </arg>
      <doc:doc>
        <doc:description>
          <doc:para>Emitted when a client has been removed from the session manager.
          </doc:para>
        </doc:description>
      </doc:doc>
    </signal>

    <signal name="InhibitorAdded">
      <arg name="id" type="o">
        <doc:doc>
          <doc:summary>The object path for the added inhibitor</doc:summary>
        </doc:doc>
      </arg>
      <doc:doc>
        <doc:description>
          <doc:para>Emitted when an inhibitor has been added to the session manager.
          </doc:para>
        </doc:description>
      </doc:doc>
    </signal>
    <signal name="InhibitorRemoved">
      <arg name="id" type="o">
        <doc:doc>
          <doc:summary>The object path for the removed inhibitor</doc:summary>
        </doc:doc>
      </arg>
      <doc:doc>
        <doc:description>
          <doc:para>Emitted when an inhibitor has been removed from the session manager.
          </doc:para>
        </doc:description>
      </doc:doc>
    </signal>

436
    <signal name="SessionRunning">
William Jon McCann's avatar
William Jon McCann committed
437
438
439
440
441
      <doc:doc>
        <doc:description>
          <doc:para>Indicates the session has entered the Running phase.</doc:para>
        </doc:description>
      </doc:doc>
442
443
    </signal>

444
    <signal name="SessionOver">
William Jon McCann's avatar
William Jon McCann committed
445
446
447
448
449
      <doc:doc>
        <doc:description>
          <doc:para>Indicates the session is about to end.</doc:para>
        </doc:description>
      </doc:doc>
450
451
    </signal>

452
453
    <!-- Properties -->

454
455
456
457
458
459
460
461
    <property name="SessionName" type="s" access="read">
      <doc:doc>
        <doc:description>
          <doc:para>The name of the session that has been loaded.</doc:para>
        </doc:description>
      </doc:doc>
    </property>

462
463
464
465
466
467
468
469
470
471
    <property name="Renderer" type="s" access="read">
      <doc:doc>
        <doc:description>
          <doc:para>The renderer for the session that has been loaded.
          At the moment this supports GL and GLES, and is only used for the
          X session.</doc:para>
        </doc:description>
      </doc:doc>
    </property>

472
473
474
475
476
477
478
479
480
    <property name="SessionIsActive" type="b" access="read">
      <doc:doc>
        <doc:description>
          <doc:para>If true, the session is currently in the
          foreground and available for user input.</doc:para>
        </doc:description>
      </doc:doc>
    </property>

481
482
483
484
485
486
487
488
489
490
    <property name="InhibitedActions" type="u" access="read">
      <doc:doc>
        <doc:description>
          <doc:para>A bitmask of flags to indicate which actions
          are inhibited. See the Inhibit() function's description
          for a list of possible values.</doc:para>
        </doc:description>
      </doc:doc>
    </property>

491
492
  </interface>
</node>