summaryrefslogtreecommitdiff
path: root/xfce4-session/xfsm-client-dbus.xml
blob: f15d09e4111f715b48718f0fd457db737a922957 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<?xml version="1.0" encoding="UTF-8"?>

<node name="/org/xfce/SessionClients">
    <interface name="org.xfce.Session.Client">
        <annotation name="org.freedesktop.DBus.GLib.CSymbol"
                    value="xfsm_client_dbus"/>
        <annotation name="org.freedesktop.DBus.GLib.ClientCSymbol"
                    value="xfsm_client_dbus_client"/>

        <!--
             String org.xfce.Session.Client.GetID()

             Retrieves the client's SM client ID.
        -->
        <method name="GetID">
            <arg direction="out" name="id" type="s"/>
        </method>

        <!--
             Unsigned Int org.xfce.Session.Client.GetState()

             Queries the session manager for a client's state.
             Valid states are:
                 0  Idle: the client is operating normally.
                 1  Interacting: the client is interacting with the
                    user as part of the shutdown process.
                 2  Save Done: the client has finished saving its state.
                 3  Saving: the client is saving its state.
                 4  Saving Local: the client is saving its local state
                    (as opposed to global state).
                 5  Wait for Interact: the client is waiting for the
                    session manager to allow it to interact with the
                    user.
                 6  Wait for Phase 2: the client is waiting for the
                    session manager to enter Phase 2 so it can continue
                    saving its state.
                 7  Disconnected: the client has disconnected from the
                    session mananger (depending on its restart style,
                    it may still remain in the session after
                    disconnecting).
        -->
        <method name="GetState">
            <arg direction="out" name="state" type="u"/>
        </method>

        <!--
             Dict[] org.xfce.Session.Client.GetAllSmProperties()

             Retrieves all session management properties set on
             the client.
        -->
        <method name="GetAllSmProperties">
            <arg direction="out" name="properties" type="a{sv}"/>
        </method>

        <!--
             Dict[] org.xfce.Session.Client.GetSmProperties(String[] names)

             @names: A string array of property names to fetch.

             Retrieves the values of one or more SM propertis as an
             array of variants.
        -->
        <method name="GetSmProperties">
            <arg direction="in" name="names" type="as"/>
            <arg direction="out" name="values" type="a{sv}"/>
        </method>

        <!--
             void org.xfce.Session.Client.SetSmProperties(HashArray properties)

             @properties: A hash array of properties, with string
                          keys and variant values.

             Sets properties specified in the hash array.  Other
             properties are not affected.

             Implementation note: properties may be validated in
             sequence, so an error return from this method may
             indicate that some properties have been set, but
             others have not.
        -->
        <method name="SetSmProperties">
            <arg direction="in" name="properties" type="a{sv}"/>
        </method>

        <!--
             void org.xfce.Session.Client.DeleteSmProperties(String[] names)

             @names: An string array of property names.

             Deletes one or more SM properties.
             
             Implementation note: Some properties defined in the
             XSMP spec have defined semantics and default values.
             This properties may not actually be deleted, but simply
             reset to their default values.
        -->
        <method name="DeleteSmProperties">
            <arg direction="in" name="names" type="as"/>
        </method>

        <!--
             void org.xfce.Session.Client.Terminate()

             Instructs the client to exit.  Whether or not the client
             remains in the session depends on its restart hint
             SM property.  If the restart hint is RestartImmediately,
             the client will likely indeed be restarted immediately.

             To actually remove a running client from the running
             session, it's best to set the restart hint SM property
             to RestartIfRunning before calling Terminate.
        -->
        <method name="Terminate"/>

        <!--
             void org.xfce.Session.Client.EndSessionResponse(Boolean is_ok,
                                                             String  reason)

             @is_ok: Whether or not it is OK to proceed. If not, the client
                     may want to inhibit session logout.
             @reason: The reason it's not OK to proceed. This string will be
                      shown to the user.

             This method is how the client communicates with the session
             manager (and user) in response to QueryEndSession and EndSession
             when the session is about to end.
        -->
        <method name="EndSessionResponse">
            <arg direction="in" name="is_ok" type="b" />
            <arg direction="in" name="reason" type="s" />
        </method>

        <!--
             void org.xfce.Session.Client.StateChanged(Unsigned Int old_state,
                                                       Unsigned Int new_state)

             @old_state: The client's previous state.
             @new_state: The client's new (current) state.

             Emitted when a client changes state.  See GetState() above
             for valid state values.
        -->
        <signal name="StateChanged">
            <arg name="old_state" type="u"/>
            <arg name="new_state" type="u"/>
        </signal>

        <!--
             void org.xfce.Session.Client.SmPropertyChanged(String name,
                                                            Variant value)

             @name: The name of a property.
             @value: the value of the named property.

             Emitted when a property changes.  The new value is included
             in the message for convenience.
        -->
        <signal name="SmPropertyChanged">
            <arg name="name" type="s"/>
            <arg name="value" type="v"/>
        </signal>

        <!--
             void org.xfce.Session.Client.SmPropertyDeleted(String name)

             @name: The name of a property.

             Emitted when a property is deleted.
             
             Implementation note: this message should be rare;
             most SM properties are defined with default values and
             will merely be reset to their default upon deletion
             (resulting in a SmPropertyChanged signal instead).
        -->
        <signal name="SmPropertyDeleted">
            <arg name="name" type="s"/>
        </signal>

        <!--
             void org.xfce.Session.Client.QueryEndSession(Unsigned Int flags)

             @flags: 0 = a forceful quit.
                     1 = a normal save and quit.

             Emitted when the session is about to end. The client should
             respond by calling EndSessionResponse. The client may interact
             with the user during this time. The client should not begin
             shutting down until the EndSession signal happens.
        -->
        <signal name="QueryEndSession">
            <arg name="flags" type="u" />
        </signal>

        <!--
             void org.xfce.Session.Client.EndSession(Unsigned Int flags)

             @flags: 0 = a forceful quit.
                     1 = a normal save and quit.

             The client should save any work and then respond by
             calling EndSessionResponse. The client must not interact with
             the user, that should already have happened during the
             QueryEndSession.
        -->
        <signal name="EndSession">
            <arg name="flags" type="u" />
        </signal>

        <!--
             void org.xfce.Session.Client.CancelEndSession(void)

             Emitted when QueryEndSession has been canceled. Resume normal
             operation.
        -->
        <signal name="CancelEndSession">
        </signal>

        <!--
             void org.xfce.Session.Client.Stop(void)

             Emitted when the client should terminate, this is the friendly
             version giving the client time to save and exit gracefully before
             it is forcefully killed.
        -->
        <signal name="Stop">
        </signal>
    </interface>
</node>