Imported Upstream version 2.50.2
[platform/upstream/glib.git] / docs / reference / gio / html / GDBusConnection.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GDBusConnection: GIO Reference Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="index.html" title="GIO Reference Manual">
8 <link rel="up" href="gdbus-lowlevel.html" title="Low-level D-Bus Support">
9 <link rel="prev" href="GDBusMessage.html" title="GDBusMessage">
10 <link rel="next" href="GDBusMethodInvocation.html" title="GDBusMethodInvocation">
11 <meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
18                   <a href="#GDBusConnection.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
19                   <a href="#GDBusConnection.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces">  <span class="dim">|</span> 
20                   <a href="#GDBusConnection.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties">  <span class="dim">|</span> 
21                   <a href="#GDBusConnection.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
22                   <a href="#GDBusConnection.signals" class="shortcut">Signals</a></span>
23 </td>
24 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
25 <td><a accesskey="u" href="gdbus-lowlevel.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
26 <td><a accesskey="p" href="GDBusMessage.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
27 <td><a accesskey="n" href="GDBusMethodInvocation.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
28 </tr></table>
29 <div class="refentry">
30 <a name="GDBusConnection"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
32 <td valign="top">
33 <h2><span class="refentrytitle"><a name="GDBusConnection.top_of_page"></a>GDBusConnection</span></h2>
34 <p>GDBusConnection — D-Bus Connections</p>
35 </td>
36 <td class="gallery_image" valign="top" align="right"></td>
37 </tr></table></div>
38 <div class="refsect1">
39 <a name="GDBusConnection.functions"></a><h2>Functions</h2>
40 <div class="informaltable"><table class="informaltable" width="100%" border="0">
41 <colgroup>
42 <col width="150px" class="functions_return">
43 <col class="functions_name">
44 </colgroup>
45 <tbody>
46 <tr>
47 <td class="function_type">
48 <span class="returnvalue">void</span>
49 </td>
50 <td class="function_name">
51 <a class="link" href="GDBusConnection.html#g-bus-get" title="g_bus_get ()">g_bus_get</a> <span class="c_punctuation">()</span>
52 </td>
53 </tr>
54 <tr>
55 <td class="function_type">
56 <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
57 </td>
58 <td class="function_name">
59 <a class="link" href="GDBusConnection.html#g-bus-get-finish" title="g_bus_get_finish ()">g_bus_get_finish</a> <span class="c_punctuation">()</span>
60 </td>
61 </tr>
62 <tr>
63 <td class="function_type">
64 <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
65 </td>
66 <td class="function_name">
67 <a class="link" href="GDBusConnection.html#g-bus-get-sync" title="g_bus_get_sync ()">g_bus_get_sync</a> <span class="c_punctuation">()</span>
68 </td>
69 </tr>
70 <tr>
71 <td class="function_type">
72 <span class="returnvalue">void</span>
73 </td>
74 <td class="function_name">
75 <a class="link" href="GDBusConnection.html#g-dbus-connection-new" title="g_dbus_connection_new ()">g_dbus_connection_new</a> <span class="c_punctuation">()</span>
76 </td>
77 </tr>
78 <tr>
79 <td class="function_type">
80 <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
81 </td>
82 <td class="function_name">
83 <a class="link" href="GDBusConnection.html#g-dbus-connection-new-finish" title="g_dbus_connection_new_finish ()">g_dbus_connection_new_finish</a> <span class="c_punctuation">()</span>
84 </td>
85 </tr>
86 <tr>
87 <td class="function_type">
88 <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
89 </td>
90 <td class="function_name">
91 <a class="link" href="GDBusConnection.html#g-dbus-connection-new-sync" title="g_dbus_connection_new_sync ()">g_dbus_connection_new_sync</a> <span class="c_punctuation">()</span>
92 </td>
93 </tr>
94 <tr>
95 <td class="function_type">
96 <span class="returnvalue">void</span>
97 </td>
98 <td class="function_name">
99 <a class="link" href="GDBusConnection.html#g-dbus-connection-new-for-address" title="g_dbus_connection_new_for_address ()">g_dbus_connection_new_for_address</a> <span class="c_punctuation">()</span>
100 </td>
101 </tr>
102 <tr>
103 <td class="function_type">
104 <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
105 </td>
106 <td class="function_name">
107 <a class="link" href="GDBusConnection.html#g-dbus-connection-new-for-address-finish" title="g_dbus_connection_new_for_address_finish ()">g_dbus_connection_new_for_address_finish</a> <span class="c_punctuation">()</span>
108 </td>
109 </tr>
110 <tr>
111 <td class="function_type">
112 <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
113 </td>
114 <td class="function_name">
115 <a class="link" href="GDBusConnection.html#g-dbus-connection-new-for-address-sync" title="g_dbus_connection_new_for_address_sync ()">g_dbus_connection_new_for_address_sync</a> <span class="c_punctuation">()</span>
116 </td>
117 </tr>
118 <tr>
119 <td class="function_type">
120 <span class="returnvalue">void</span>
121 </td>
122 <td class="function_name">
123 <a class="link" href="GDBusConnection.html#g-dbus-connection-start-message-processing" title="g_dbus_connection_start_message_processing ()">g_dbus_connection_start_message_processing</a> <span class="c_punctuation">()</span>
124 </td>
125 </tr>
126 <tr>
127 <td class="function_type">
128 <span class="returnvalue">void</span>
129 </td>
130 <td class="function_name">
131 <a class="link" href="GDBusConnection.html#g-dbus-connection-close" title="g_dbus_connection_close ()">g_dbus_connection_close</a> <span class="c_punctuation">()</span>
132 </td>
133 </tr>
134 <tr>
135 <td class="function_type">
136 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
137 </td>
138 <td class="function_name">
139 <a class="link" href="GDBusConnection.html#g-dbus-connection-close-finish" title="g_dbus_connection_close_finish ()">g_dbus_connection_close_finish</a> <span class="c_punctuation">()</span>
140 </td>
141 </tr>
142 <tr>
143 <td class="function_type">
144 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
145 </td>
146 <td class="function_name">
147 <a class="link" href="GDBusConnection.html#g-dbus-connection-close-sync" title="g_dbus_connection_close_sync ()">g_dbus_connection_close_sync</a> <span class="c_punctuation">()</span>
148 </td>
149 </tr>
150 <tr>
151 <td class="function_type">
152 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
153 </td>
154 <td class="function_name">
155 <a class="link" href="GDBusConnection.html#g-dbus-connection-is-closed" title="g_dbus_connection_is_closed ()">g_dbus_connection_is_closed</a> <span class="c_punctuation">()</span>
156 </td>
157 </tr>
158 <tr>
159 <td class="function_type">
160 <span class="returnvalue">void</span>
161 </td>
162 <td class="function_name">
163 <a class="link" href="GDBusConnection.html#g-dbus-connection-flush" title="g_dbus_connection_flush ()">g_dbus_connection_flush</a> <span class="c_punctuation">()</span>
164 </td>
165 </tr>
166 <tr>
167 <td class="function_type">
168 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
169 </td>
170 <td class="function_name">
171 <a class="link" href="GDBusConnection.html#g-dbus-connection-flush-finish" title="g_dbus_connection_flush_finish ()">g_dbus_connection_flush_finish</a> <span class="c_punctuation">()</span>
172 </td>
173 </tr>
174 <tr>
175 <td class="function_type">
176 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
177 </td>
178 <td class="function_name">
179 <a class="link" href="GDBusConnection.html#g-dbus-connection-flush-sync" title="g_dbus_connection_flush_sync ()">g_dbus_connection_flush_sync</a> <span class="c_punctuation">()</span>
180 </td>
181 </tr>
182 <tr>
183 <td class="function_type">
184 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
185 </td>
186 <td class="function_name">
187 <a class="link" href="GDBusConnection.html#g-dbus-connection-get-exit-on-close" title="g_dbus_connection_get_exit_on_close ()">g_dbus_connection_get_exit_on_close</a> <span class="c_punctuation">()</span>
188 </td>
189 </tr>
190 <tr>
191 <td class="function_type">
192 <span class="returnvalue">void</span>
193 </td>
194 <td class="function_name">
195 <a class="link" href="GDBusConnection.html#g-dbus-connection-set-exit-on-close" title="g_dbus_connection_set_exit_on_close ()">g_dbus_connection_set_exit_on_close</a> <span class="c_punctuation">()</span>
196 </td>
197 </tr>
198 <tr>
199 <td class="function_type">
200 <a class="link" href="GIOStream.html" title="GIOStream"><span class="returnvalue">GIOStream</span></a> *
201 </td>
202 <td class="function_name">
203 <a class="link" href="GDBusConnection.html#g-dbus-connection-get-stream" title="g_dbus_connection_get_stream ()">g_dbus_connection_get_stream</a> <span class="c_punctuation">()</span>
204 </td>
205 </tr>
206 <tr>
207 <td class="function_type">const <a href="../glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
208 </td>
209 <td class="function_name">
210 <a class="link" href="GDBusConnection.html#g-dbus-connection-get-guid" title="g_dbus_connection_get_guid ()">g_dbus_connection_get_guid</a> <span class="c_punctuation">()</span>
211 </td>
212 </tr>
213 <tr>
214 <td class="function_type">const <a href="../glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
215 </td>
216 <td class="function_name">
217 <a class="link" href="GDBusConnection.html#g-dbus-connection-get-unique-name" title="g_dbus_connection_get_unique_name ()">g_dbus_connection_get_unique_name</a> <span class="c_punctuation">()</span>
218 </td>
219 </tr>
220 <tr>
221 <td class="function_type">
222 <a class="link" href="GDBusConnection.html#GDBusCapabilityFlags" title="enum GDBusCapabilityFlags"><span class="returnvalue">GDBusCapabilityFlags</span></a>
223 </td>
224 <td class="function_name">
225 <a class="link" href="GDBusConnection.html#g-dbus-connection-get-capabilities" title="g_dbus_connection_get_capabilities ()">g_dbus_connection_get_capabilities</a> <span class="c_punctuation">()</span>
226 </td>
227 </tr>
228 <tr>
229 <td class="function_type">
230 <a class="link" href="GCredentials.html" title="GCredentials"><span class="returnvalue">GCredentials</span></a> *
231 </td>
232 <td class="function_name">
233 <a class="link" href="GDBusConnection.html#g-dbus-connection-get-peer-credentials" title="g_dbus_connection_get_peer_credentials ()">g_dbus_connection_get_peer_credentials</a> <span class="c_punctuation">()</span>
234 </td>
235 </tr>
236 <tr>
237 <td class="function_type">
238 <a href="../glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>
239 </td>
240 <td class="function_name">
241 <a class="link" href="GDBusConnection.html#g-dbus-connection-get-last-serial" title="g_dbus_connection_get_last_serial ()">g_dbus_connection_get_last_serial</a> <span class="c_punctuation">()</span>
242 </td>
243 </tr>
244 <tr>
245 <td class="function_type">
246 <span class="returnvalue">void</span>
247 </td>
248 <td class="function_name">
249 <a class="link" href="GDBusConnection.html#g-dbus-connection-call" title="g_dbus_connection_call ()">g_dbus_connection_call</a> <span class="c_punctuation">()</span>
250 </td>
251 </tr>
252 <tr>
253 <td class="function_type">
254 <a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
255 </td>
256 <td class="function_name">
257 <a class="link" href="GDBusConnection.html#g-dbus-connection-call-finish" title="g_dbus_connection_call_finish ()">g_dbus_connection_call_finish</a> <span class="c_punctuation">()</span>
258 </td>
259 </tr>
260 <tr>
261 <td class="function_type">
262 <a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
263 </td>
264 <td class="function_name">
265 <a class="link" href="GDBusConnection.html#g-dbus-connection-call-sync" title="g_dbus_connection_call_sync ()">g_dbus_connection_call_sync</a> <span class="c_punctuation">()</span>
266 </td>
267 </tr>
268 <tr>
269 <td class="function_type">
270 <span class="returnvalue">void</span>
271 </td>
272 <td class="function_name">
273 <a class="link" href="GDBusConnection.html#g-dbus-connection-call-with-unix-fd-list" title="g_dbus_connection_call_with_unix_fd_list ()">g_dbus_connection_call_with_unix_fd_list</a> <span class="c_punctuation">()</span>
274 </td>
275 </tr>
276 <tr>
277 <td class="function_type">
278 <a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
279 </td>
280 <td class="function_name">
281 <a class="link" href="GDBusConnection.html#g-dbus-connection-call-with-unix-fd-list-finish" title="g_dbus_connection_call_with_unix_fd_list_finish ()">g_dbus_connection_call_with_unix_fd_list_finish</a> <span class="c_punctuation">()</span>
282 </td>
283 </tr>
284 <tr>
285 <td class="function_type">
286 <a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
287 </td>
288 <td class="function_name">
289 <a class="link" href="GDBusConnection.html#g-dbus-connection-call-with-unix-fd-list-sync" title="g_dbus_connection_call_with_unix_fd_list_sync ()">g_dbus_connection_call_with_unix_fd_list_sync</a> <span class="c_punctuation">()</span>
290 </td>
291 </tr>
292 <tr>
293 <td class="function_type">
294 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
295 </td>
296 <td class="function_name">
297 <a class="link" href="GDBusConnection.html#g-dbus-connection-emit-signal" title="g_dbus_connection_emit_signal ()">g_dbus_connection_emit_signal</a> <span class="c_punctuation">()</span>
298 </td>
299 </tr>
300 <tr>
301 <td class="function_type">
302 <span class="returnvalue">void</span>
303 </td>
304 <td class="function_name">
305 <span class="c_punctuation">(</span><a class="link" href="GDBusConnection.html#GDBusSignalCallback" title="GDBusSignalCallback ()">*GDBusSignalCallback</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
306 </td>
307 </tr>
308 <tr>
309 <td class="function_type">
310 <a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
311 </td>
312 <td class="function_name">
313 <a class="link" href="GDBusConnection.html#g-dbus-connection-signal-subscribe" title="g_dbus_connection_signal_subscribe ()">g_dbus_connection_signal_subscribe</a> <span class="c_punctuation">()</span>
314 </td>
315 </tr>
316 <tr>
317 <td class="function_type">
318 <span class="returnvalue">void</span>
319 </td>
320 <td class="function_name">
321 <a class="link" href="GDBusConnection.html#g-dbus-connection-signal-unsubscribe" title="g_dbus_connection_signal_unsubscribe ()">g_dbus_connection_signal_unsubscribe</a> <span class="c_punctuation">()</span>
322 </td>
323 </tr>
324 <tr>
325 <td class="function_type">
326 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
327 </td>
328 <td class="function_name">
329 <a class="link" href="GDBusConnection.html#g-dbus-connection-send-message" title="g_dbus_connection_send_message ()">g_dbus_connection_send_message</a> <span class="c_punctuation">()</span>
330 </td>
331 </tr>
332 <tr>
333 <td class="function_type">
334 <span class="returnvalue">void</span>
335 </td>
336 <td class="function_name">
337 <a class="link" href="GDBusConnection.html#g-dbus-connection-send-message-with-reply" title="g_dbus_connection_send_message_with_reply ()">g_dbus_connection_send_message_with_reply</a> <span class="c_punctuation">()</span>
338 </td>
339 </tr>
340 <tr>
341 <td class="function_type">
342 <a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="returnvalue">GDBusMessage</span></a> *
343 </td>
344 <td class="function_name">
345 <a class="link" href="GDBusConnection.html#g-dbus-connection-send-message-with-reply-finish" title="g_dbus_connection_send_message_with_reply_finish ()">g_dbus_connection_send_message_with_reply_finish</a> <span class="c_punctuation">()</span>
346 </td>
347 </tr>
348 <tr>
349 <td class="function_type">
350 <a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="returnvalue">GDBusMessage</span></a> *
351 </td>
352 <td class="function_name">
353 <a class="link" href="GDBusConnection.html#g-dbus-connection-send-message-with-reply-sync" title="g_dbus_connection_send_message_with_reply_sync ()">g_dbus_connection_send_message_with_reply_sync</a> <span class="c_punctuation">()</span>
354 </td>
355 </tr>
356 <tr>
357 <td class="function_type">
358 <a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="returnvalue">GDBusMessage</span></a> *
359 </td>
360 <td class="function_name">
361 <span class="c_punctuation">(</span><a class="link" href="GDBusConnection.html#GDBusMessageFilterFunction" title="GDBusMessageFilterFunction ()">*GDBusMessageFilterFunction</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
362 </td>
363 </tr>
364 <tr>
365 <td class="function_type">
366 <a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
367 </td>
368 <td class="function_name">
369 <a class="link" href="GDBusConnection.html#g-dbus-connection-add-filter" title="g_dbus_connection_add_filter ()">g_dbus_connection_add_filter</a> <span class="c_punctuation">()</span>
370 </td>
371 </tr>
372 <tr>
373 <td class="function_type">
374 <span class="returnvalue">void</span>
375 </td>
376 <td class="function_name">
377 <a class="link" href="GDBusConnection.html#g-dbus-connection-remove-filter" title="g_dbus_connection_remove_filter ()">g_dbus_connection_remove_filter</a> <span class="c_punctuation">()</span>
378 </td>
379 </tr>
380 <tr>
381 <td class="function_type">
382 <span class="returnvalue">void</span>
383 </td>
384 <td class="function_name">
385 <span class="c_punctuation">(</span><a class="link" href="GDBusConnection.html#GDBusInterfaceMethodCallFunc" title="GDBusInterfaceMethodCallFunc ()">*GDBusInterfaceMethodCallFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
386 </td>
387 </tr>
388 <tr>
389 <td class="function_type">
390 <a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
391 </td>
392 <td class="function_name">
393 <span class="c_punctuation">(</span><a class="link" href="GDBusConnection.html#GDBusInterfaceGetPropertyFunc" title="GDBusInterfaceGetPropertyFunc ()">*GDBusInterfaceGetPropertyFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
394 </td>
395 </tr>
396 <tr>
397 <td class="function_type">
398 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
399 </td>
400 <td class="function_name">
401 <span class="c_punctuation">(</span><a class="link" href="GDBusConnection.html#GDBusInterfaceSetPropertyFunc" title="GDBusInterfaceSetPropertyFunc ()">*GDBusInterfaceSetPropertyFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
402 </td>
403 </tr>
404 <tr>
405 <td class="function_type">
406 <a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
407 </td>
408 <td class="function_name">
409 <a class="link" href="GDBusConnection.html#g-dbus-connection-register-object" title="g_dbus_connection_register_object ()">g_dbus_connection_register_object</a> <span class="c_punctuation">()</span>
410 </td>
411 </tr>
412 <tr>
413 <td class="function_type">
414 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
415 </td>
416 <td class="function_name">
417 <a class="link" href="GDBusConnection.html#g-dbus-connection-unregister-object" title="g_dbus_connection_unregister_object ()">g_dbus_connection_unregister_object</a> <span class="c_punctuation">()</span>
418 </td>
419 </tr>
420 <tr>
421 <td class="function_type">
422 <a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
423 </td>
424 <td class="function_name">
425 <a class="link" href="GDBusConnection.html#g-dbus-connection-register-object-with-closures" title="g_dbus_connection_register_object_with_closures ()">g_dbus_connection_register_object_with_closures</a> <span class="c_punctuation">()</span>
426 </td>
427 </tr>
428 <tr>
429 <td class="function_type">
430 <a href="../glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **
431 </td>
432 <td class="function_name">
433 <span class="c_punctuation">(</span><a class="link" href="GDBusConnection.html#GDBusSubtreeEnumerateFunc" title="GDBusSubtreeEnumerateFunc ()">*GDBusSubtreeEnumerateFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
434 </td>
435 </tr>
436 <tr>
437 <td class="function_type">
438 <a class="link" href="gio-D-Bus-Introspection-Data.html#GDBusInterfaceInfo"><span class="returnvalue">GDBusInterfaceInfo</span></a> **
439 </td>
440 <td class="function_name">
441 <span class="c_punctuation">(</span><a class="link" href="GDBusConnection.html#GDBusSubtreeIntrospectFunc" title="GDBusSubtreeIntrospectFunc ()">*GDBusSubtreeIntrospectFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
442 </td>
443 </tr>
444 <tr>
445 <td class="function_type">const <a class="link" href="GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="returnvalue">GDBusInterfaceVTable</span></a> *
446 </td>
447 <td class="function_name">
448 <span class="c_punctuation">(</span><a class="link" href="GDBusConnection.html#GDBusSubtreeDispatchFunc" title="GDBusSubtreeDispatchFunc ()">*GDBusSubtreeDispatchFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
449 </td>
450 </tr>
451 <tr>
452 <td class="function_type">
453 <a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
454 </td>
455 <td class="function_name">
456 <a class="link" href="GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()">g_dbus_connection_register_subtree</a> <span class="c_punctuation">()</span>
457 </td>
458 </tr>
459 <tr>
460 <td class="function_type">
461 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
462 </td>
463 <td class="function_name">
464 <a class="link" href="GDBusConnection.html#g-dbus-connection-unregister-subtree" title="g_dbus_connection_unregister_subtree ()">g_dbus_connection_unregister_subtree</a> <span class="c_punctuation">()</span>
465 </td>
466 </tr>
467 </tbody>
468 </table></div>
469 </div>
470 <div class="refsect1">
471 <a name="GDBusConnection.properties"></a><h2>Properties</h2>
472 <div class="informaltable"><table class="informaltable" border="0">
473 <colgroup>
474 <col width="150px" class="properties_type">
475 <col width="300px" class="properties_name">
476 <col width="200px" class="properties_flags">
477 </colgroup>
478 <tbody>
479 <tr>
480 <td class="property_type">
481 <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
482 <td class="property_name"><a class="link" href="GDBusConnection.html#GDBusConnection--address" title="The “address” property">address</a></td>
483 <td class="property_flags">Write / Construct Only</td>
484 </tr>
485 <tr>
486 <td class="property_type">
487 <a class="link" href="GDBusAuthObserver.html" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> *</td>
488 <td class="property_name"><a class="link" href="GDBusConnection.html#GDBusConnection--authentication-observer" title="The “authentication-observer” property">authentication-observer</a></td>
489 <td class="property_flags">Write / Construct Only</td>
490 </tr>
491 <tr>
492 <td class="property_type"><a class="link" href="GDBusConnection.html#GDBusCapabilityFlags" title="enum GDBusCapabilityFlags"><span class="type">GDBusCapabilityFlags</span></a></td>
493 <td class="property_name"><a class="link" href="GDBusConnection.html#GDBusConnection--capabilities" title="The “capabilities” property">capabilities</a></td>
494 <td class="property_flags">Read</td>
495 </tr>
496 <tr>
497 <td class="property_type"><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
498 <td class="property_name"><a class="link" href="GDBusConnection.html#GDBusConnection--closed" title="The “closed” property">closed</a></td>
499 <td class="property_flags">Read</td>
500 </tr>
501 <tr>
502 <td class="property_type"><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
503 <td class="property_name"><a class="link" href="GDBusConnection.html#GDBusConnection--exit-on-close" title="The “exit-on-close” property">exit-on-close</a></td>
504 <td class="property_flags">Read / Write</td>
505 </tr>
506 <tr>
507 <td class="property_type"><a class="link" href="GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags"><span class="type">GDBusConnectionFlags</span></a></td>
508 <td class="property_name"><a class="link" href="GDBusConnection.html#GDBusConnection--flags" title="The “flags” property">flags</a></td>
509 <td class="property_flags">Write / Construct Only</td>
510 </tr>
511 <tr>
512 <td class="property_type">
513 <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
514 <td class="property_name"><a class="link" href="GDBusConnection.html#GDBusConnection--guid" title="The “guid” property">guid</a></td>
515 <td class="property_flags">Read / Write / Construct Only</td>
516 </tr>
517 <tr>
518 <td class="property_type">
519 <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *</td>
520 <td class="property_name"><a class="link" href="GDBusConnection.html#GDBusConnection--stream" title="The “stream” property">stream</a></td>
521 <td class="property_flags">Read / Write / Construct Only</td>
522 </tr>
523 <tr>
524 <td class="property_type">
525 <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
526 <td class="property_name"><a class="link" href="GDBusConnection.html#GDBusConnection--unique-name" title="The “unique-name” property">unique-name</a></td>
527 <td class="property_flags">Read</td>
528 </tr>
529 </tbody>
530 </table></div>
531 </div>
532 <div class="refsect1">
533 <a name="GDBusConnection.signals"></a><h2>Signals</h2>
534 <div class="informaltable"><table class="informaltable" border="0">
535 <colgroup>
536 <col width="150px" class="signals_return">
537 <col width="300px" class="signals_name">
538 <col width="200px" class="signals_flags">
539 </colgroup>
540 <tbody><tr>
541 <td class="signal_type"><span class="returnvalue">void</span></td>
542 <td class="signal_name"><a class="link" href="GDBusConnection.html#GDBusConnection-closed" title="The “closed” signal">closed</a></td>
543 <td class="signal_flags"><a href="../gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
544 </tr></tbody>
545 </table></div>
546 </div>
547 <div class="refsect1">
548 <a name="GDBusConnection.other"></a><h2>Types and Values</h2>
549 <div class="informaltable"><table class="informaltable" width="100%" border="0">
550 <colgroup>
551 <col width="150px" class="name">
552 <col class="description">
553 </colgroup>
554 <tbody>
555 <tr>
556 <td class="datatype_keyword">enum</td>
557 <td class="function_name"><a class="link" href="GDBusConnection.html#GBusType" title="enum GBusType">GBusType</a></td>
558 </tr>
559 <tr>
560 <td class="datatype_keyword"> </td>
561 <td class="function_name"><a class="link" href="GDBusConnection.html#GDBusConnection-struct" title="GDBusConnection">GDBusConnection</a></td>
562 </tr>
563 <tr>
564 <td class="datatype_keyword">enum</td>
565 <td class="function_name"><a class="link" href="GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags">GDBusConnectionFlags</a></td>
566 </tr>
567 <tr>
568 <td class="datatype_keyword">enum</td>
569 <td class="function_name"><a class="link" href="GDBusConnection.html#GDBusCapabilityFlags" title="enum GDBusCapabilityFlags">GDBusCapabilityFlags</a></td>
570 </tr>
571 <tr>
572 <td class="datatype_keyword">enum</td>
573 <td class="function_name"><a class="link" href="GDBusConnection.html#GDBusCallFlags" title="enum GDBusCallFlags">GDBusCallFlags</a></td>
574 </tr>
575 <tr>
576 <td class="datatype_keyword">enum</td>
577 <td class="function_name"><a class="link" href="GDBusConnection.html#GDBusSignalFlags" title="enum GDBusSignalFlags">GDBusSignalFlags</a></td>
578 </tr>
579 <tr>
580 <td class="datatype_keyword">enum</td>
581 <td class="function_name"><a class="link" href="GDBusConnection.html#GDBusSendMessageFlags" title="enum GDBusSendMessageFlags">GDBusSendMessageFlags</a></td>
582 </tr>
583 <tr>
584 <td class="datatype_keyword"> </td>
585 <td class="function_name"><a class="link" href="GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable">GDBusInterfaceVTable</a></td>
586 </tr>
587 <tr>
588 <td class="datatype_keyword"> </td>
589 <td class="function_name"><a class="link" href="GDBusConnection.html#GDBusSubtreeVTable" title="GDBusSubtreeVTable">GDBusSubtreeVTable</a></td>
590 </tr>
591 <tr>
592 <td class="datatype_keyword">enum</td>
593 <td class="function_name"><a class="link" href="GDBusConnection.html#GDBusSubtreeFlags" title="enum GDBusSubtreeFlags">GDBusSubtreeFlags</a></td>
594 </tr>
595 </tbody>
596 </table></div>
597 </div>
598 <div class="refsect1">
599 <a name="GDBusConnection.object-hierarchy"></a><h2>Object Hierarchy</h2>
600 <pre class="screen">    <a href="../gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
601     <span class="lineart">╰──</span> GDBusConnection
602 </pre>
603 </div>
604 <div class="refsect1">
605 <a name="GDBusConnection.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
606 <p>
607 GDBusConnection implements
608  <a class="link" href="GInitable.html" title="GInitable">GInitable</a> and  <a class="link" href="GAsyncInitable.html" title="GAsyncInitable">GAsyncInitable</a>.</p>
609 </div>
610 <div class="refsect1">
611 <a name="GDBusConnection.includes"></a><h2>Includes</h2>
612 <pre class="synopsis">#include &lt;gio/gio.h&gt;
613 </pre>
614 </div>
615 <div class="refsect1">
616 <a name="GDBusConnection.description"></a><h2>Description</h2>
617 <p>The <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> type is used for D-Bus connections to remote
618 peers such as a message buses. It is a low-level API that offers a
619 lot of flexibility. For instance, it lets you establish a connection
620 over any transport that can by represented as an <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a>.</p>
621 <p>This class is rarely used directly in D-Bus clients. If you are writing
622 a D-Bus client, it is often easier to use the <a class="link" href="gio-Owning-Bus-Names.html#g-bus-own-name" title="g_bus_own_name ()"><code class="function">g_bus_own_name()</code></a>,
623 <a class="link" href="gio-Watching-Bus-Names.html#g-bus-watch-name" title="g_bus_watch_name ()"><code class="function">g_bus_watch_name()</code></a> or <a class="link" href="GDBusProxy.html#g-dbus-proxy-new-for-bus" title="g_dbus_proxy_new_for_bus ()"><code class="function">g_dbus_proxy_new_for_bus()</code></a> APIs.</p>
624 <p>As an exception to the usual GLib rule that a particular object must not
625 be used by two threads at the same time, <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a>'s methods may be
626 called from any thread. This is so that <a class="link" href="GDBusConnection.html#g-bus-get" title="g_bus_get ()"><code class="function">g_bus_get()</code></a> and <a class="link" href="GDBusConnection.html#g-bus-get-sync" title="g_bus_get_sync ()"><code class="function">g_bus_get_sync()</code></a>
627 can safely return the same <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> when called from any thread.</p>
628 <p>Most of the ways to obtain a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> automatically initialize it
629 (i.e. connect to D-Bus): for instance, <a class="link" href="GDBusConnection.html#g-dbus-connection-new" title="g_dbus_connection_new ()"><code class="function">g_dbus_connection_new()</code></a> and
630 <a class="link" href="GDBusConnection.html#g-bus-get" title="g_bus_get ()"><code class="function">g_bus_get()</code></a>, and the synchronous versions of those methods, give you an
631 initialized connection. Language bindings for GIO should use
632 <a class="link" href="GInitable.html#g-initable-new" title="g_initable_new ()"><code class="function">g_initable_new()</code></a> or <a class="link" href="GAsyncInitable.html#g-async-initable-new-async" title="g_async_initable_new_async ()"><code class="function">g_async_initable_new_async()</code></a>, which also initialize the
633 connection.</p>
634 <p>If you construct an uninitialized <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a>, such as via
635 <a href="../gobject-The-Base-Object-Type.html#g-object-new"><code class="function">g_object_new()</code></a>, you must initialize it via <a class="link" href="GInitable.html#g-initable-init" title="g_initable_init ()"><code class="function">g_initable_init()</code></a> or
636 <a class="link" href="GAsyncInitable.html#g-async-initable-init-async" title="g_async_initable_init_async ()"><code class="function">g_async_initable_init_async()</code></a> before using its methods or properties.
637 Calling methods or accessing properties on a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> that has not
638 completed initialization successfully is considered to be invalid, and leads
639 to undefined behaviour. In particular, if initialization fails with a
640 <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, the only valid thing you can do with that <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> is to
641 free it with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
642 <div class="refsect3">
643 <a name="gdbus-server"></a><h4>An example D-Bus server</h4>
644 <p>Here is an example for a D-Bus server:
645 <a class="ulink" href="https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-server.c" target="_top">gdbus-example-server.c</a></p>
646 </div>
647 <div class="refsect3">
648 <a name="gdbus-subtree-server"></a><h4>An example for exporting a subtree</h4>
649 <p>Here is an example for exporting a subtree:
650 <a class="ulink" href="https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-subtree.c" target="_top">gdbus-example-subtree.c</a></p>
651 </div>
652 <div class="refsect3">
653 <a name="gdbus-unix-fd-client"></a><h4>An example for file descriptor passing</h4>
654 <p>Here is an example for passing UNIX file descriptors:
655 <a class="ulink" href="https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-unix-fd-client.c" target="_top">gdbus-unix-fd-client.c</a></p>
656 </div>
657 <div class="refsect3">
658 <a name="gdbus-export"></a><h4>An example for exporting a GObject</h4>
659 <p>Here is an example for exporting a <a href="../gobject-The-Base-Object-Type.html#GObject-struct"><span class="type">GObject</span></a>:
660 <a class="ulink" href="https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-export.c" target="_top">gdbus-example-export.c</a></p>
661 </div>
662 </div>
663 <div class="refsect1">
664 <a name="GDBusConnection.functions_details"></a><h2>Functions</h2>
665 <div class="refsect2">
666 <a name="g-bus-get"></a><h3>g_bus_get ()</h3>
667 <pre class="programlisting"><span class="returnvalue">void</span>
668 g_bus_get (<em class="parameter"><code><a class="link" href="GDBusConnection.html#GBusType" title="enum GBusType"><span class="type">GBusType</span></a> bus_type</code></em>,
669            <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
670            <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
671            <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
672 <p>Asynchronously connects to the message bus specified by <em class="parameter"><code>bus_type</code></em>
673 .</p>
674 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
675  will be invoked. You can
676 then call <a class="link" href="GDBusConnection.html#g-bus-get-finish" title="g_bus_get_finish ()"><code class="function">g_bus_get_finish()</code></a> to get the result of the operation.</p>
677 <p>This is a asynchronous failable function. See <a class="link" href="GDBusConnection.html#g-bus-get-sync" title="g_bus_get_sync ()"><code class="function">g_bus_get_sync()</code></a> for
678 the synchronous version.</p>
679 <div class="refsect3">
680 <a name="g-bus-get.parameters"></a><h4>Parameters</h4>
681 <div class="informaltable"><table class="informaltable" width="100%" border="0">
682 <colgroup>
683 <col width="150px" class="parameters_name">
684 <col class="parameters_description">
685 <col width="200px" class="parameters_annotations">
686 </colgroup>
687 <tbody>
688 <tr>
689 <td class="parameter_name"><p>bus_type</p></td>
690 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html#GBusType" title="enum GBusType"><span class="type">GBusType</span></a></p></td>
691 <td class="parameter_annotations"> </td>
692 </tr>
693 <tr>
694 <td class="parameter_name"><p>cancellable</p></td>
695 <td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
696 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
697 </tr>
698 <tr>
699 <td class="parameter_name"><p>callback</p></td>
700 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is satisfied</p></td>
701 <td class="parameter_annotations"> </td>
702 </tr>
703 <tr>
704 <td class="parameter_name"><p>user_data</p></td>
705 <td class="parameter_description"><p>the data to pass to <em class="parameter"><code>callback</code></em>
706 </p></td>
707 <td class="parameter_annotations"> </td>
708 </tr>
709 </tbody>
710 </table></div>
711 </div>
712 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
713 </div>
714 <hr>
715 <div class="refsect2">
716 <a name="g-bus-get-finish"></a><h3>g_bus_get_finish ()</h3>
717 <pre class="programlisting"><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
718 g_bus_get_finish (<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
719                   <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
720 <p>Finishes an operation started with <a class="link" href="GDBusConnection.html#g-bus-get" title="g_bus_get ()"><code class="function">g_bus_get()</code></a>.</p>
721 <p>The returned object is a singleton, that is, shared with other
722 callers of <a class="link" href="GDBusConnection.html#g-bus-get" title="g_bus_get ()"><code class="function">g_bus_get()</code></a> and <a class="link" href="GDBusConnection.html#g-bus-get-sync" title="g_bus_get_sync ()"><code class="function">g_bus_get_sync()</code></a> for <em class="parameter"><code>bus_type</code></em>
723 . In the
724 event that you need a private message bus connection, use
725 <a class="link" href="gio-D-Bus-Addresses.html#g-dbus-address-get-for-bus-sync" title="g_dbus_address_get_for_bus_sync ()"><code class="function">g_dbus_address_get_for_bus_sync()</code></a> and
726 <a class="link" href="GDBusConnection.html#g-dbus-connection-new-for-address" title="g_dbus_connection_new_for_address ()"><code class="function">g_dbus_connection_new_for_address()</code></a>.</p>
727 <p>Note that the returned <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> object will (usually) have
728 the <a class="link" href="GDBusConnection.html#GDBusConnection--exit-on-close" title="The “exit-on-close” property"><span class="type">“exit-on-close”</span></a> property set to <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.</p>
729 <div class="refsect3">
730 <a name="g-bus-get-finish.parameters"></a><h4>Parameters</h4>
731 <div class="informaltable"><table class="informaltable" width="100%" border="0">
732 <colgroup>
733 <col width="150px" class="parameters_name">
734 <col class="parameters_description">
735 <col width="200px" class="parameters_annotations">
736 </colgroup>
737 <tbody>
738 <tr>
739 <td class="parameter_name"><p>res</p></td>
740 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> obtained from the <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> passed
741 to <a class="link" href="GDBusConnection.html#g-bus-get" title="g_bus_get ()"><code class="function">g_bus_get()</code></a></p></td>
742 <td class="parameter_annotations"> </td>
743 </tr>
744 <tr>
745 <td class="parameter_name"><p>error</p></td>
746 <td class="parameter_description"><p>return location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
747 <td class="parameter_annotations"> </td>
748 </tr>
749 </tbody>
750 </table></div>
751 </div>
752 <div class="refsect3">
753 <a name="g-bus-get-finish.returns"></a><h4>Returns</h4>
754 <p> a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em>
755 is set.
756 Free with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
757 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
758 </div>
759 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
760 </div>
761 <hr>
762 <div class="refsect2">
763 <a name="g-bus-get-sync"></a><h3>g_bus_get_sync ()</h3>
764 <pre class="programlisting"><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
765 g_bus_get_sync (<em class="parameter"><code><a class="link" href="GDBusConnection.html#GBusType" title="enum GBusType"><span class="type">GBusType</span></a> bus_type</code></em>,
766                 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
767                 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
768 <p>Synchronously connects to the message bus specified by <em class="parameter"><code>bus_type</code></em>
769 .
770 Note that the returned object may shared with other callers,
771 e.g. if two separate parts of a process calls this function with
772 the same <em class="parameter"><code>bus_type</code></em>
773 , they will share the same object.</p>
774 <p>This is a synchronous failable function. See <a class="link" href="GDBusConnection.html#g-bus-get" title="g_bus_get ()"><code class="function">g_bus_get()</code></a> and
775 <a class="link" href="GDBusConnection.html#g-bus-get-finish" title="g_bus_get_finish ()"><code class="function">g_bus_get_finish()</code></a> for the asynchronous version.</p>
776 <p>The returned object is a singleton, that is, shared with other
777 callers of <a class="link" href="GDBusConnection.html#g-bus-get" title="g_bus_get ()"><code class="function">g_bus_get()</code></a> and <a class="link" href="GDBusConnection.html#g-bus-get-sync" title="g_bus_get_sync ()"><code class="function">g_bus_get_sync()</code></a> for <em class="parameter"><code>bus_type</code></em>
778 . In the
779 event that you need a private message bus connection, use
780 <a class="link" href="gio-D-Bus-Addresses.html#g-dbus-address-get-for-bus-sync" title="g_dbus_address_get_for_bus_sync ()"><code class="function">g_dbus_address_get_for_bus_sync()</code></a> and
781 <a class="link" href="GDBusConnection.html#g-dbus-connection-new-for-address" title="g_dbus_connection_new_for_address ()"><code class="function">g_dbus_connection_new_for_address()</code></a>.</p>
782 <p>Note that the returned <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> object will (usually) have
783 the <a class="link" href="GDBusConnection.html#GDBusConnection--exit-on-close" title="The “exit-on-close” property"><span class="type">“exit-on-close”</span></a> property set to <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.</p>
784 <div class="refsect3">
785 <a name="g-bus-get-sync.parameters"></a><h4>Parameters</h4>
786 <div class="informaltable"><table class="informaltable" width="100%" border="0">
787 <colgroup>
788 <col width="150px" class="parameters_name">
789 <col class="parameters_description">
790 <col width="200px" class="parameters_annotations">
791 </colgroup>
792 <tbody>
793 <tr>
794 <td class="parameter_name"><p>bus_type</p></td>
795 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html#GBusType" title="enum GBusType"><span class="type">GBusType</span></a></p></td>
796 <td class="parameter_annotations"> </td>
797 </tr>
798 <tr>
799 <td class="parameter_name"><p>cancellable</p></td>
800 <td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
801 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
802 </tr>
803 <tr>
804 <td class="parameter_name"><p>error</p></td>
805 <td class="parameter_description"><p>return location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
806 <td class="parameter_annotations"> </td>
807 </tr>
808 </tbody>
809 </table></div>
810 </div>
811 <div class="refsect3">
812 <a name="g-bus-get-sync.returns"></a><h4>Returns</h4>
813 <p> a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em>
814 is set.
815 Free with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
816 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
817 </div>
818 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
819 </div>
820 <hr>
821 <div class="refsect2">
822 <a name="g-dbus-connection-new"></a><h3>g_dbus_connection_new ()</h3>
823 <pre class="programlisting"><span class="returnvalue">void</span>
824 g_dbus_connection_new (<em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>,
825                        <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *guid</code></em>,
826                        <em class="parameter"><code><a class="link" href="GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags"><span class="type">GDBusConnectionFlags</span></a> flags</code></em>,
827                        <em class="parameter"><code><a class="link" href="GDBusAuthObserver.html" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> *observer</code></em>,
828                        <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
829                        <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
830                        <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
831 <p>Asynchronously sets up a D-Bus connection for exchanging D-Bus messages
832 with the end represented by <em class="parameter"><code>stream</code></em>
833 .</p>
834 <p>If <em class="parameter"><code>stream</code></em>
835  is a <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a>, then the corresponding <a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a>
836 will be put into non-blocking mode.</p>
837 <p>The D-Bus connection will interact with <em class="parameter"><code>stream</code></em>
838  from a worker thread.
839 As a result, the caller should not interact with <em class="parameter"><code>stream</code></em>
840  after this
841 method has been called, except by calling <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> on it.</p>
842 <p>If <em class="parameter"><code>observer</code></em>
843  is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> it may be used to control the
844 authentication process.</p>
845 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
846  will be invoked. You can
847 then call <a class="link" href="GDBusConnection.html#g-dbus-connection-new-finish" title="g_dbus_connection_new_finish ()"><code class="function">g_dbus_connection_new_finish()</code></a> to get the result of the
848 operation.</p>
849 <p>This is a asynchronous failable constructor. See
850 <a class="link" href="GDBusConnection.html#g-dbus-connection-new-sync" title="g_dbus_connection_new_sync ()"><code class="function">g_dbus_connection_new_sync()</code></a> for the synchronous
851 version.</p>
852 <div class="refsect3">
853 <a name="g-dbus-connection-new.parameters"></a><h4>Parameters</h4>
854 <div class="informaltable"><table class="informaltable" width="100%" border="0">
855 <colgroup>
856 <col width="150px" class="parameters_name">
857 <col class="parameters_description">
858 <col width="200px" class="parameters_annotations">
859 </colgroup>
860 <tbody>
861 <tr>
862 <td class="parameter_name"><p>stream</p></td>
863 <td class="parameter_description"><p>a <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a></p></td>
864 <td class="parameter_annotations"> </td>
865 </tr>
866 <tr>
867 <td class="parameter_name"><p>guid</p></td>
868 <td class="parameter_description"><p> the GUID to use if a authenticating as a server or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
869 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
870 </tr>
871 <tr>
872 <td class="parameter_name"><p>flags</p></td>
873 <td class="parameter_description"><p>flags describing how to make the connection</p></td>
874 <td class="parameter_annotations"> </td>
875 </tr>
876 <tr>
877 <td class="parameter_name"><p>observer</p></td>
878 <td class="parameter_description"><p> a <a class="link" href="GDBusAuthObserver.html" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
879 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
880 </tr>
881 <tr>
882 <td class="parameter_name"><p>cancellable</p></td>
883 <td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
884 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
885 </tr>
886 <tr>
887 <td class="parameter_name"><p>callback</p></td>
888 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is satisfied</p></td>
889 <td class="parameter_annotations"> </td>
890 </tr>
891 <tr>
892 <td class="parameter_name"><p>user_data</p></td>
893 <td class="parameter_description"><p>the data to pass to <em class="parameter"><code>callback</code></em>
894 </p></td>
895 <td class="parameter_annotations"> </td>
896 </tr>
897 </tbody>
898 </table></div>
899 </div>
900 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
901 </div>
902 <hr>
903 <div class="refsect2">
904 <a name="g-dbus-connection-new-finish"></a><h3>g_dbus_connection_new_finish ()</h3>
905 <pre class="programlisting"><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
906 g_dbus_connection_new_finish (<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
907                               <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
908 <p>Finishes an operation started with <a class="link" href="GDBusConnection.html#g-dbus-connection-new" title="g_dbus_connection_new ()"><code class="function">g_dbus_connection_new()</code></a>.</p>
909 <div class="refsect3">
910 <a name="g-dbus-connection-new-finish.parameters"></a><h4>Parameters</h4>
911 <div class="informaltable"><table class="informaltable" width="100%" border="0">
912 <colgroup>
913 <col width="150px" class="parameters_name">
914 <col class="parameters_description">
915 <col width="200px" class="parameters_annotations">
916 </colgroup>
917 <tbody>
918 <tr>
919 <td class="parameter_name"><p>res</p></td>
920 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> obtained from the <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>
921 passed to <a class="link" href="GDBusConnection.html#g-dbus-connection-new" title="g_dbus_connection_new ()"><code class="function">g_dbus_connection_new()</code></a>.</p></td>
922 <td class="parameter_annotations"> </td>
923 </tr>
924 <tr>
925 <td class="parameter_name"><p>error</p></td>
926 <td class="parameter_description"><p>return location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
927 <td class="parameter_annotations"> </td>
928 </tr>
929 </tbody>
930 </table></div>
931 </div>
932 <div class="refsect3">
933 <a name="g-dbus-connection-new-finish.returns"></a><h4>Returns</h4>
934 <p> a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em>
935 is set. Free
936 with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
937 </div>
938 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
939 </div>
940 <hr>
941 <div class="refsect2">
942 <a name="g-dbus-connection-new-sync"></a><h3>g_dbus_connection_new_sync ()</h3>
943 <pre class="programlisting"><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
944 g_dbus_connection_new_sync (<em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>,
945                             <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *guid</code></em>,
946                             <em class="parameter"><code><a class="link" href="GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags"><span class="type">GDBusConnectionFlags</span></a> flags</code></em>,
947                             <em class="parameter"><code><a class="link" href="GDBusAuthObserver.html" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> *observer</code></em>,
948                             <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
949                             <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
950 <p>Synchronously sets up a D-Bus connection for exchanging D-Bus messages
951 with the end represented by <em class="parameter"><code>stream</code></em>
952 .</p>
953 <p>If <em class="parameter"><code>stream</code></em>
954  is a <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a>, then the corresponding <a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a>
955 will be put into non-blocking mode.</p>
956 <p>The D-Bus connection will interact with <em class="parameter"><code>stream</code></em>
957  from a worker thread.
958 As a result, the caller should not interact with <em class="parameter"><code>stream</code></em>
959  after this
960 method has been called, except by calling <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> on it.</p>
961 <p>If <em class="parameter"><code>observer</code></em>
962  is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> it may be used to control the
963 authentication process.</p>
964 <p>This is a synchronous failable constructor. See
965 <a class="link" href="GDBusConnection.html#g-dbus-connection-new" title="g_dbus_connection_new ()"><code class="function">g_dbus_connection_new()</code></a> for the asynchronous version.</p>
966 <div class="refsect3">
967 <a name="g-dbus-connection-new-sync.parameters"></a><h4>Parameters</h4>
968 <div class="informaltable"><table class="informaltable" width="100%" border="0">
969 <colgroup>
970 <col width="150px" class="parameters_name">
971 <col class="parameters_description">
972 <col width="200px" class="parameters_annotations">
973 </colgroup>
974 <tbody>
975 <tr>
976 <td class="parameter_name"><p>stream</p></td>
977 <td class="parameter_description"><p>a <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a></p></td>
978 <td class="parameter_annotations"> </td>
979 </tr>
980 <tr>
981 <td class="parameter_name"><p>guid</p></td>
982 <td class="parameter_description"><p> the GUID to use if a authenticating as a server or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
983 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
984 </tr>
985 <tr>
986 <td class="parameter_name"><p>flags</p></td>
987 <td class="parameter_description"><p>flags describing how to make the connection</p></td>
988 <td class="parameter_annotations"> </td>
989 </tr>
990 <tr>
991 <td class="parameter_name"><p>observer</p></td>
992 <td class="parameter_description"><p> a <a class="link" href="GDBusAuthObserver.html" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
993 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
994 </tr>
995 <tr>
996 <td class="parameter_name"><p>cancellable</p></td>
997 <td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
998 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
999 </tr>
1000 <tr>
1001 <td class="parameter_name"><p>error</p></td>
1002 <td class="parameter_description"><p>return location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
1003 <td class="parameter_annotations"> </td>
1004 </tr>
1005 </tbody>
1006 </table></div>
1007 </div>
1008 <div class="refsect3">
1009 <a name="g-dbus-connection-new-sync.returns"></a><h4>Returns</h4>
1010 <p> a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em>
1011 is set. Free with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
1012 </div>
1013 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
1014 </div>
1015 <hr>
1016 <div class="refsect2">
1017 <a name="g-dbus-connection-new-for-address"></a><h3>g_dbus_connection_new_for_address ()</h3>
1018 <pre class="programlisting"><span class="returnvalue">void</span>
1019 g_dbus_connection_new_for_address (<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *address</code></em>,
1020                                    <em class="parameter"><code><a class="link" href="GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags"><span class="type">GDBusConnectionFlags</span></a> flags</code></em>,
1021                                    <em class="parameter"><code><a class="link" href="GDBusAuthObserver.html" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> *observer</code></em>,
1022                                    <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
1023                                    <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
1024                                    <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
1025 <p>Asynchronously connects and sets up a D-Bus client connection for
1026 exchanging D-Bus messages with an endpoint specified by <em class="parameter"><code>address</code></em>
1027
1028 which must be in the D-Bus address format.</p>
1029 <p>This constructor can only be used to initiate client-side
1030 connections - use <a class="link" href="GDBusConnection.html#g-dbus-connection-new" title="g_dbus_connection_new ()"><code class="function">g_dbus_connection_new()</code></a> if you need to act as the
1031 server. In particular, <em class="parameter"><code>flags</code></em>
1032  cannot contain the
1033 <a class="link" href="GDBusConnection.html#G-DBUS-CONNECTION-FLAGS-AUTHENTICATION-SERVER:CAPS"><code class="literal">G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER</code></a> or
1034 <a class="link" href="GDBusConnection.html#G-DBUS-CONNECTION-FLAGS-AUTHENTICATION-ALLOW-ANONYMOUS:CAPS"><code class="literal">G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS</code></a> flags.</p>
1035 <p>When the operation is finished, <em class="parameter"><code>callback</code></em>
1036  will be invoked. You can
1037 then call <a class="link" href="GDBusConnection.html#g-dbus-connection-new-finish" title="g_dbus_connection_new_finish ()"><code class="function">g_dbus_connection_new_finish()</code></a> to get the result of the
1038 operation.</p>
1039 <p>If <em class="parameter"><code>observer</code></em>
1040  is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> it may be used to control the
1041 authentication process.</p>
1042 <p>This is a asynchronous failable constructor. See
1043 <a class="link" href="GDBusConnection.html#g-dbus-connection-new-for-address-sync" title="g_dbus_connection_new_for_address_sync ()"><code class="function">g_dbus_connection_new_for_address_sync()</code></a> for the synchronous
1044 version.</p>
1045 <div class="refsect3">
1046 <a name="g-dbus-connection-new-for-address.parameters"></a><h4>Parameters</h4>
1047 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1048 <colgroup>
1049 <col width="150px" class="parameters_name">
1050 <col class="parameters_description">
1051 <col width="200px" class="parameters_annotations">
1052 </colgroup>
1053 <tbody>
1054 <tr>
1055 <td class="parameter_name"><p>address</p></td>
1056 <td class="parameter_description"><p>a D-Bus address</p></td>
1057 <td class="parameter_annotations"> </td>
1058 </tr>
1059 <tr>
1060 <td class="parameter_name"><p>flags</p></td>
1061 <td class="parameter_description"><p>flags describing how to make the connection</p></td>
1062 <td class="parameter_annotations"> </td>
1063 </tr>
1064 <tr>
1065 <td class="parameter_name"><p>observer</p></td>
1066 <td class="parameter_description"><p> a <a class="link" href="GDBusAuthObserver.html" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1067 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1068 </tr>
1069 <tr>
1070 <td class="parameter_name"><p>cancellable</p></td>
1071 <td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1072 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1073 </tr>
1074 <tr>
1075 <td class="parameter_name"><p>callback</p></td>
1076 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is satisfied</p></td>
1077 <td class="parameter_annotations"> </td>
1078 </tr>
1079 <tr>
1080 <td class="parameter_name"><p>user_data</p></td>
1081 <td class="parameter_description"><p>the data to pass to <em class="parameter"><code>callback</code></em>
1082 </p></td>
1083 <td class="parameter_annotations"> </td>
1084 </tr>
1085 </tbody>
1086 </table></div>
1087 </div>
1088 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
1089 </div>
1090 <hr>
1091 <div class="refsect2">
1092 <a name="g-dbus-connection-new-for-address-finish"></a><h3>g_dbus_connection_new_for_address_finish ()</h3>
1093 <pre class="programlisting"><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
1094 g_dbus_connection_new_for_address_finish
1095                                (<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
1096                                 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1097 <p>Finishes an operation started with <a class="link" href="GDBusConnection.html#g-dbus-connection-new-for-address" title="g_dbus_connection_new_for_address ()"><code class="function">g_dbus_connection_new_for_address()</code></a>.</p>
1098 <div class="refsect3">
1099 <a name="g-dbus-connection-new-for-address-finish.parameters"></a><h4>Parameters</h4>
1100 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1101 <colgroup>
1102 <col width="150px" class="parameters_name">
1103 <col class="parameters_description">
1104 <col width="200px" class="parameters_annotations">
1105 </colgroup>
1106 <tbody>
1107 <tr>
1108 <td class="parameter_name"><p>res</p></td>
1109 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> obtained from the <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> passed
1110 to <a class="link" href="GDBusConnection.html#g-dbus-connection-new" title="g_dbus_connection_new ()"><code class="function">g_dbus_connection_new()</code></a></p></td>
1111 <td class="parameter_annotations"> </td>
1112 </tr>
1113 <tr>
1114 <td class="parameter_name"><p>error</p></td>
1115 <td class="parameter_description"><p>return location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
1116 <td class="parameter_annotations"> </td>
1117 </tr>
1118 </tbody>
1119 </table></div>
1120 </div>
1121 <div class="refsect3">
1122 <a name="g-dbus-connection-new-for-address-finish.returns"></a><h4>Returns</h4>
1123 <p> a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em>
1124 is set. Free with
1125 <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
1126 </div>
1127 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
1128 </div>
1129 <hr>
1130 <div class="refsect2">
1131 <a name="g-dbus-connection-new-for-address-sync"></a><h3>g_dbus_connection_new_for_address_sync ()</h3>
1132 <pre class="programlisting"><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
1133 g_dbus_connection_new_for_address_sync
1134                                (<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *address</code></em>,
1135                                 <em class="parameter"><code><a class="link" href="GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags"><span class="type">GDBusConnectionFlags</span></a> flags</code></em>,
1136                                 <em class="parameter"><code><a class="link" href="GDBusAuthObserver.html" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> *observer</code></em>,
1137                                 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
1138                                 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1139 <p>Synchronously connects and sets up a D-Bus client connection for
1140 exchanging D-Bus messages with an endpoint specified by <em class="parameter"><code>address</code></em>
1141
1142 which must be in the D-Bus address format.</p>
1143 <p>This constructor can only be used to initiate client-side
1144 connections - use <a class="link" href="GDBusConnection.html#g-dbus-connection-new-sync" title="g_dbus_connection_new_sync ()"><code class="function">g_dbus_connection_new_sync()</code></a> if you need to act
1145 as the server. In particular, <em class="parameter"><code>flags</code></em>
1146  cannot contain the
1147 <a class="link" href="GDBusConnection.html#G-DBUS-CONNECTION-FLAGS-AUTHENTICATION-SERVER:CAPS"><code class="literal">G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER</code></a> or
1148 <a class="link" href="GDBusConnection.html#G-DBUS-CONNECTION-FLAGS-AUTHENTICATION-ALLOW-ANONYMOUS:CAPS"><code class="literal">G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS</code></a> flags.</p>
1149 <p>This is a synchronous failable constructor. See
1150 <a class="link" href="GDBusConnection.html#g-dbus-connection-new-for-address" title="g_dbus_connection_new_for_address ()"><code class="function">g_dbus_connection_new_for_address()</code></a> for the asynchronous version.</p>
1151 <p>If <em class="parameter"><code>observer</code></em>
1152  is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> it may be used to control the
1153 authentication process.</p>
1154 <div class="refsect3">
1155 <a name="g-dbus-connection-new-for-address-sync.parameters"></a><h4>Parameters</h4>
1156 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1157 <colgroup>
1158 <col width="150px" class="parameters_name">
1159 <col class="parameters_description">
1160 <col width="200px" class="parameters_annotations">
1161 </colgroup>
1162 <tbody>
1163 <tr>
1164 <td class="parameter_name"><p>address</p></td>
1165 <td class="parameter_description"><p>a D-Bus address</p></td>
1166 <td class="parameter_annotations"> </td>
1167 </tr>
1168 <tr>
1169 <td class="parameter_name"><p>flags</p></td>
1170 <td class="parameter_description"><p>flags describing how to make the connection</p></td>
1171 <td class="parameter_annotations"> </td>
1172 </tr>
1173 <tr>
1174 <td class="parameter_name"><p>observer</p></td>
1175 <td class="parameter_description"><p> a <a class="link" href="GDBusAuthObserver.html" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1176 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1177 </tr>
1178 <tr>
1179 <td class="parameter_name"><p>cancellable</p></td>
1180 <td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1181 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1182 </tr>
1183 <tr>
1184 <td class="parameter_name"><p>error</p></td>
1185 <td class="parameter_description"><p>return location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
1186 <td class="parameter_annotations"> </td>
1187 </tr>
1188 </tbody>
1189 </table></div>
1190 </div>
1191 <div class="refsect3">
1192 <a name="g-dbus-connection-new-for-address-sync.returns"></a><h4>Returns</h4>
1193 <p> a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em>
1194 is set. Free with
1195 <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
1196 </div>
1197 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
1198 </div>
1199 <hr>
1200 <div class="refsect2">
1201 <a name="g-dbus-connection-start-message-processing"></a><h3>g_dbus_connection_start_message_processing ()</h3>
1202 <pre class="programlisting"><span class="returnvalue">void</span>
1203 g_dbus_connection_start_message_processing
1204                                (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);</pre>
1205 <p>If <em class="parameter"><code>connection</code></em>
1206  was created with
1207 <a class="link" href="GDBusConnection.html#G-DBUS-CONNECTION-FLAGS-DELAY-MESSAGE-PROCESSING:CAPS"><code class="literal">G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING</code></a>, this method
1208 starts processing messages. Does nothing on if <em class="parameter"><code>connection</code></em>
1209  wasn't
1210 created with this flag or if the method has already been called.</p>
1211 <div class="refsect3">
1212 <a name="g-dbus-connection-start-message-processing.parameters"></a><h4>Parameters</h4>
1213 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1214 <colgroup>
1215 <col width="150px" class="parameters_name">
1216 <col class="parameters_description">
1217 <col width="200px" class="parameters_annotations">
1218 </colgroup>
1219 <tbody><tr>
1220 <td class="parameter_name"><p>connection</p></td>
1221 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
1222 <td class="parameter_annotations"> </td>
1223 </tr></tbody>
1224 </table></div>
1225 </div>
1226 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
1227 </div>
1228 <hr>
1229 <div class="refsect2">
1230 <a name="g-dbus-connection-close"></a><h3>g_dbus_connection_close ()</h3>
1231 <pre class="programlisting"><span class="returnvalue">void</span>
1232 g_dbus_connection_close (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
1233                          <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
1234                          <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
1235                          <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
1236 <p>Closes <em class="parameter"><code>connection</code></em>
1237 . Note that this never causes the process to
1238 exit (this might only happen if the other end of a shared message
1239 bus connection disconnects, see <a class="link" href="GDBusConnection.html#GDBusConnection--exit-on-close" title="The “exit-on-close” property"><span class="type">“exit-on-close”</span></a>).</p>
1240 <p>Once the connection is closed, operations such as sending a message
1241 will return with the error <a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a>. Closing a connection
1242 will not automatically flush the connection so queued messages may
1243 be lost. Use <a class="link" href="GDBusConnection.html#g-dbus-connection-flush" title="g_dbus_connection_flush ()"><code class="function">g_dbus_connection_flush()</code></a> if you need such guarantees.</p>
1244 <p>If <em class="parameter"><code>connection</code></em>
1245  is already closed, this method fails with
1246 <a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a>.</p>
1247 <p>When <em class="parameter"><code>connection</code></em>
1248  has been closed, the <a class="link" href="GDBusConnection.html#GDBusConnection-closed" title="The “closed” signal"><span class="type">“closed”</span></a>
1249 signal is emitted in the
1250 <a href="../glib-The-Main-Event-Loop.html#g-main-context-push-thread-default">thread-default main context</a>
1251 of the thread that <em class="parameter"><code>connection</code></em>
1252  was constructed in.</p>
1253 <p>This is an asynchronous method. When the operation is finished,
1254 <em class="parameter"><code>callback</code></em>
1255  will be invoked in the 
1256 <a href="../glib-The-Main-Event-Loop.html#g-main-context-push-thread-default">thread-default main context</a>
1257 of the thread you are calling this method from. You can
1258 then call <a class="link" href="GDBusConnection.html#g-dbus-connection-close-finish" title="g_dbus_connection_close_finish ()"><code class="function">g_dbus_connection_close_finish()</code></a> to get the result of the
1259 operation. See <a class="link" href="GDBusConnection.html#g-dbus-connection-close-sync" title="g_dbus_connection_close_sync ()"><code class="function">g_dbus_connection_close_sync()</code></a> for the synchronous
1260 version.</p>
1261 <div class="refsect3">
1262 <a name="g-dbus-connection-close.parameters"></a><h4>Parameters</h4>
1263 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1264 <colgroup>
1265 <col width="150px" class="parameters_name">
1266 <col class="parameters_description">
1267 <col width="200px" class="parameters_annotations">
1268 </colgroup>
1269 <tbody>
1270 <tr>
1271 <td class="parameter_name"><p>connection</p></td>
1272 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
1273 <td class="parameter_annotations"> </td>
1274 </tr>
1275 <tr>
1276 <td class="parameter_name"><p>cancellable</p></td>
1277 <td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1278 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1279 </tr>
1280 <tr>
1281 <td class="parameter_name"><p>callback</p></td>
1282 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is
1283 satisfied or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you don't care about the result. </p></td>
1284 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1285 </tr>
1286 <tr>
1287 <td class="parameter_name"><p>user_data</p></td>
1288 <td class="parameter_description"><p>The data to pass to <em class="parameter"><code>callback</code></em>
1289 </p></td>
1290 <td class="parameter_annotations"> </td>
1291 </tr>
1292 </tbody>
1293 </table></div>
1294 </div>
1295 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
1296 </div>
1297 <hr>
1298 <div class="refsect2">
1299 <a name="g-dbus-connection-close-finish"></a><h3>g_dbus_connection_close_finish ()</h3>
1300 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1301 g_dbus_connection_close_finish (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
1302                                 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
1303                                 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1304 <p>Finishes an operation started with <a class="link" href="GDBusConnection.html#g-dbus-connection-close" title="g_dbus_connection_close ()"><code class="function">g_dbus_connection_close()</code></a>.</p>
1305 <div class="refsect3">
1306 <a name="g-dbus-connection-close-finish.parameters"></a><h4>Parameters</h4>
1307 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1308 <colgroup>
1309 <col width="150px" class="parameters_name">
1310 <col class="parameters_description">
1311 <col width="200px" class="parameters_annotations">
1312 </colgroup>
1313 <tbody>
1314 <tr>
1315 <td class="parameter_name"><p>connection</p></td>
1316 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
1317 <td class="parameter_annotations"> </td>
1318 </tr>
1319 <tr>
1320 <td class="parameter_name"><p>res</p></td>
1321 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> obtained from the <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> passed
1322 to <a class="link" href="GDBusConnection.html#g-dbus-connection-close" title="g_dbus_connection_close ()"><code class="function">g_dbus_connection_close()</code></a></p></td>
1323 <td class="parameter_annotations"> </td>
1324 </tr>
1325 <tr>
1326 <td class="parameter_name"><p>error</p></td>
1327 <td class="parameter_description"><p>return location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
1328 <td class="parameter_annotations"> </td>
1329 </tr>
1330 </tbody>
1331 </table></div>
1332 </div>
1333 <div class="refsect3">
1334 <a name="g-dbus-connection-close-finish.returns"></a><h4>Returns</h4>
1335 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the operation succeeded, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if <em class="parameter"><code>error</code></em>
1336 is set</p>
1337 </div>
1338 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
1339 </div>
1340 <hr>
1341 <div class="refsect2">
1342 <a name="g-dbus-connection-close-sync"></a><h3>g_dbus_connection_close_sync ()</h3>
1343 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1344 g_dbus_connection_close_sync (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
1345                               <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
1346                               <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1347 <p>Synchronously closees <em class="parameter"><code>connection</code></em>
1348 . The calling thread is blocked
1349 until this is done. See <a class="link" href="GDBusConnection.html#g-dbus-connection-close" title="g_dbus_connection_close ()"><code class="function">g_dbus_connection_close()</code></a> for the
1350 asynchronous version of this method and more details about what it
1351 does.</p>
1352 <div class="refsect3">
1353 <a name="g-dbus-connection-close-sync.parameters"></a><h4>Parameters</h4>
1354 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1355 <colgroup>
1356 <col width="150px" class="parameters_name">
1357 <col class="parameters_description">
1358 <col width="200px" class="parameters_annotations">
1359 </colgroup>
1360 <tbody>
1361 <tr>
1362 <td class="parameter_name"><p>connection</p></td>
1363 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
1364 <td class="parameter_annotations"> </td>
1365 </tr>
1366 <tr>
1367 <td class="parameter_name"><p>cancellable</p></td>
1368 <td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1369 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1370 </tr>
1371 <tr>
1372 <td class="parameter_name"><p>error</p></td>
1373 <td class="parameter_description"><p>return location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
1374 <td class="parameter_annotations"> </td>
1375 </tr>
1376 </tbody>
1377 </table></div>
1378 </div>
1379 <div class="refsect3">
1380 <a name="g-dbus-connection-close-sync.returns"></a><h4>Returns</h4>
1381 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the operation succeeded, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if <em class="parameter"><code>error</code></em>
1382 is set</p>
1383 </div>
1384 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
1385 </div>
1386 <hr>
1387 <div class="refsect2">
1388 <a name="g-dbus-connection-is-closed"></a><h3>g_dbus_connection_is_closed ()</h3>
1389 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1390 g_dbus_connection_is_closed (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);</pre>
1391 <p>Gets whether <em class="parameter"><code>connection</code></em>
1392  is closed.</p>
1393 <div class="refsect3">
1394 <a name="g-dbus-connection-is-closed.parameters"></a><h4>Parameters</h4>
1395 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1396 <colgroup>
1397 <col width="150px" class="parameters_name">
1398 <col class="parameters_description">
1399 <col width="200px" class="parameters_annotations">
1400 </colgroup>
1401 <tbody><tr>
1402 <td class="parameter_name"><p>connection</p></td>
1403 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
1404 <td class="parameter_annotations"> </td>
1405 </tr></tbody>
1406 </table></div>
1407 </div>
1408 <div class="refsect3">
1409 <a name="g-dbus-connection-is-closed.returns"></a><h4>Returns</h4>
1410 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the connection is closed, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
1411 </div>
1412 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
1413 </div>
1414 <hr>
1415 <div class="refsect2">
1416 <a name="g-dbus-connection-flush"></a><h3>g_dbus_connection_flush ()</h3>
1417 <pre class="programlisting"><span class="returnvalue">void</span>
1418 g_dbus_connection_flush (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
1419                          <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
1420                          <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
1421                          <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
1422 <p>Asynchronously flushes <em class="parameter"><code>connection</code></em>
1423 , that is, writes all queued
1424 outgoing message to the transport and then flushes the transport
1425 (using <a class="link" href="GOutputStream.html#g-output-stream-flush-async" title="g_output_stream_flush_async ()"><code class="function">g_output_stream_flush_async()</code></a>). This is useful in programs
1426 that wants to emit a D-Bus signal and then exit immediately. Without
1427 flushing the connection, there is no guaranteed that the message has
1428 been sent to the networking buffers in the OS kernel.</p>
1429 <p>This is an asynchronous method. When the operation is finished,
1430 <em class="parameter"><code>callback</code></em>
1431  will be invoked in the
1432 <a href="../glib-The-Main-Event-Loop.html#g-main-context-push-thread-default">thread-default main context</a>
1433 of the thread you are calling this method from. You can
1434 then call <a class="link" href="GDBusConnection.html#g-dbus-connection-flush-finish" title="g_dbus_connection_flush_finish ()"><code class="function">g_dbus_connection_flush_finish()</code></a> to get the result of the
1435 operation. See <a class="link" href="GDBusConnection.html#g-dbus-connection-flush-sync" title="g_dbus_connection_flush_sync ()"><code class="function">g_dbus_connection_flush_sync()</code></a> for the synchronous
1436 version.</p>
1437 <div class="refsect3">
1438 <a name="g-dbus-connection-flush.parameters"></a><h4>Parameters</h4>
1439 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1440 <colgroup>
1441 <col width="150px" class="parameters_name">
1442 <col class="parameters_description">
1443 <col width="200px" class="parameters_annotations">
1444 </colgroup>
1445 <tbody>
1446 <tr>
1447 <td class="parameter_name"><p>connection</p></td>
1448 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
1449 <td class="parameter_annotations"> </td>
1450 </tr>
1451 <tr>
1452 <td class="parameter_name"><p>cancellable</p></td>
1453 <td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1454 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1455 </tr>
1456 <tr>
1457 <td class="parameter_name"><p>callback</p></td>
1458 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the
1459 request is satisfied or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you don't care about the result. </p></td>
1460 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1461 </tr>
1462 <tr>
1463 <td class="parameter_name"><p>user_data</p></td>
1464 <td class="parameter_description"><p>The data to pass to <em class="parameter"><code>callback</code></em>
1465 </p></td>
1466 <td class="parameter_annotations"> </td>
1467 </tr>
1468 </tbody>
1469 </table></div>
1470 </div>
1471 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
1472 </div>
1473 <hr>
1474 <div class="refsect2">
1475 <a name="g-dbus-connection-flush-finish"></a><h3>g_dbus_connection_flush_finish ()</h3>
1476 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1477 g_dbus_connection_flush_finish (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
1478                                 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
1479                                 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1480 <p>Finishes an operation started with <a class="link" href="GDBusConnection.html#g-dbus-connection-flush" title="g_dbus_connection_flush ()"><code class="function">g_dbus_connection_flush()</code></a>.</p>
1481 <div class="refsect3">
1482 <a name="g-dbus-connection-flush-finish.parameters"></a><h4>Parameters</h4>
1483 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1484 <colgroup>
1485 <col width="150px" class="parameters_name">
1486 <col class="parameters_description">
1487 <col width="200px" class="parameters_annotations">
1488 </colgroup>
1489 <tbody>
1490 <tr>
1491 <td class="parameter_name"><p>connection</p></td>
1492 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
1493 <td class="parameter_annotations"> </td>
1494 </tr>
1495 <tr>
1496 <td class="parameter_name"><p>res</p></td>
1497 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> obtained from the <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> passed
1498 to <a class="link" href="GDBusConnection.html#g-dbus-connection-flush" title="g_dbus_connection_flush ()"><code class="function">g_dbus_connection_flush()</code></a></p></td>
1499 <td class="parameter_annotations"> </td>
1500 </tr>
1501 <tr>
1502 <td class="parameter_name"><p>error</p></td>
1503 <td class="parameter_description"><p>return location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
1504 <td class="parameter_annotations"> </td>
1505 </tr>
1506 </tbody>
1507 </table></div>
1508 </div>
1509 <div class="refsect3">
1510 <a name="g-dbus-connection-flush-finish.returns"></a><h4>Returns</h4>
1511 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the operation succeeded, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if <em class="parameter"><code>error</code></em>
1512 is set</p>
1513 </div>
1514 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
1515 </div>
1516 <hr>
1517 <div class="refsect2">
1518 <a name="g-dbus-connection-flush-sync"></a><h3>g_dbus_connection_flush_sync ()</h3>
1519 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1520 g_dbus_connection_flush_sync (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
1521                               <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
1522                               <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1523 <p>Synchronously flushes <em class="parameter"><code>connection</code></em>
1524 . The calling thread is blocked
1525 until this is done. See <a class="link" href="GDBusConnection.html#g-dbus-connection-flush" title="g_dbus_connection_flush ()"><code class="function">g_dbus_connection_flush()</code></a> for the
1526 asynchronous version of this method and more details about what it
1527 does.</p>
1528 <div class="refsect3">
1529 <a name="g-dbus-connection-flush-sync.parameters"></a><h4>Parameters</h4>
1530 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1531 <colgroup>
1532 <col width="150px" class="parameters_name">
1533 <col class="parameters_description">
1534 <col width="200px" class="parameters_annotations">
1535 </colgroup>
1536 <tbody>
1537 <tr>
1538 <td class="parameter_name"><p>connection</p></td>
1539 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
1540 <td class="parameter_annotations"> </td>
1541 </tr>
1542 <tr>
1543 <td class="parameter_name"><p>cancellable</p></td>
1544 <td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1545 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1546 </tr>
1547 <tr>
1548 <td class="parameter_name"><p>error</p></td>
1549 <td class="parameter_description"><p>return location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
1550 <td class="parameter_annotations"> </td>
1551 </tr>
1552 </tbody>
1553 </table></div>
1554 </div>
1555 <div class="refsect3">
1556 <a name="g-dbus-connection-flush-sync.returns"></a><h4>Returns</h4>
1557 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the operation succeeded, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if <em class="parameter"><code>error</code></em>
1558 is set</p>
1559 </div>
1560 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
1561 </div>
1562 <hr>
1563 <div class="refsect2">
1564 <a name="g-dbus-connection-get-exit-on-close"></a><h3>g_dbus_connection_get_exit_on_close ()</h3>
1565 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1566 g_dbus_connection_get_exit_on_close (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);</pre>
1567 <p>Gets whether the process is terminated when <em class="parameter"><code>connection</code></em>
1568  is
1569 closed by the remote peer. See
1570 <a class="link" href="GDBusConnection.html#GDBusConnection--exit-on-close" title="The “exit-on-close” property"><span class="type">“exit-on-close”</span></a> for more details.</p>
1571 <div class="refsect3">
1572 <a name="g-dbus-connection-get-exit-on-close.parameters"></a><h4>Parameters</h4>
1573 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1574 <colgroup>
1575 <col width="150px" class="parameters_name">
1576 <col class="parameters_description">
1577 <col width="200px" class="parameters_annotations">
1578 </colgroup>
1579 <tbody><tr>
1580 <td class="parameter_name"><p>connection</p></td>
1581 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
1582 <td class="parameter_annotations"> </td>
1583 </tr></tbody>
1584 </table></div>
1585 </div>
1586 <div class="refsect3">
1587 <a name="g-dbus-connection-get-exit-on-close.returns"></a><h4>Returns</h4>
1588 <p> whether the process is terminated when <em class="parameter"><code>connection</code></em>
1589 is
1590 closed by the remote peer</p>
1591 </div>
1592 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
1593 </div>
1594 <hr>
1595 <div class="refsect2">
1596 <a name="g-dbus-connection-set-exit-on-close"></a><h3>g_dbus_connection_set_exit_on_close ()</h3>
1597 <pre class="programlisting"><span class="returnvalue">void</span>
1598 g_dbus_connection_set_exit_on_close (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
1599                                      <em class="parameter"><code><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> exit_on_close</code></em>);</pre>
1600 <p>Sets whether the process should be terminated when <em class="parameter"><code>connection</code></em>
1601  is
1602 closed by the remote peer. See <a class="link" href="GDBusConnection.html#GDBusConnection--exit-on-close" title="The “exit-on-close” property"><span class="type">“exit-on-close”</span></a> for
1603 more details.</p>
1604 <p>Note that this function should be used with care. Most modern UNIX
1605 desktops tie the notion of a user session the session bus, and expect
1606 all of a users applications to quit when their bus connection goes away.
1607 If you are setting <em class="parameter"><code>exit_on_close</code></em>
1608  to <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> for the shared session
1609 bus connection, you should make sure that your application exits
1610 when the user session ends.</p>
1611 <div class="refsect3">
1612 <a name="g-dbus-connection-set-exit-on-close.parameters"></a><h4>Parameters</h4>
1613 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1614 <colgroup>
1615 <col width="150px" class="parameters_name">
1616 <col class="parameters_description">
1617 <col width="200px" class="parameters_annotations">
1618 </colgroup>
1619 <tbody>
1620 <tr>
1621 <td class="parameter_name"><p>connection</p></td>
1622 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
1623 <td class="parameter_annotations"> </td>
1624 </tr>
1625 <tr>
1626 <td class="parameter_name"><p>exit_on_close</p></td>
1627 <td class="parameter_description"><p>whether the process should be terminated
1628 when <em class="parameter"><code>connection</code></em>
1629 is closed by the remote peer</p></td>
1630 <td class="parameter_annotations"> </td>
1631 </tr>
1632 </tbody>
1633 </table></div>
1634 </div>
1635 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
1636 </div>
1637 <hr>
1638 <div class="refsect2">
1639 <a name="g-dbus-connection-get-stream"></a><h3>g_dbus_connection_get_stream ()</h3>
1640 <pre class="programlisting"><a class="link" href="GIOStream.html" title="GIOStream"><span class="returnvalue">GIOStream</span></a> *
1641 g_dbus_connection_get_stream (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);</pre>
1642 <p>Gets the underlying stream used for IO.</p>
1643 <p>While the <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> is active, it will interact with this
1644 stream from a worker thread, so it is not safe to interact with
1645 the stream directly.</p>
1646 <div class="refsect3">
1647 <a name="g-dbus-connection-get-stream.parameters"></a><h4>Parameters</h4>
1648 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1649 <colgroup>
1650 <col width="150px" class="parameters_name">
1651 <col class="parameters_description">
1652 <col width="200px" class="parameters_annotations">
1653 </colgroup>
1654 <tbody><tr>
1655 <td class="parameter_name"><p>connection</p></td>
1656 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
1657 <td class="parameter_annotations"> </td>
1658 </tr></tbody>
1659 </table></div>
1660 </div>
1661 <div class="refsect3">
1662 <a name="g-dbus-connection-get-stream.returns"></a><h4>Returns</h4>
1663 <p> the stream used for IO. </p>
1664 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
1665 </div>
1666 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
1667 </div>
1668 <hr>
1669 <div class="refsect2">
1670 <a name="g-dbus-connection-get-guid"></a><h3>g_dbus_connection_get_guid ()</h3>
1671 <pre class="programlisting">const <a href="../glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
1672 g_dbus_connection_get_guid (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);</pre>
1673 <p>The GUID of the peer performing the role of server when
1674 authenticating. See <a class="link" href="GDBusConnection.html#GDBusConnection--guid" title="The “guid” property"><span class="type">“guid”</span></a> for more details.</p>
1675 <div class="refsect3">
1676 <a name="g-dbus-connection-get-guid.parameters"></a><h4>Parameters</h4>
1677 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1678 <colgroup>
1679 <col width="150px" class="parameters_name">
1680 <col class="parameters_description">
1681 <col width="200px" class="parameters_annotations">
1682 </colgroup>
1683 <tbody><tr>
1684 <td class="parameter_name"><p>connection</p></td>
1685 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
1686 <td class="parameter_annotations"> </td>
1687 </tr></tbody>
1688 </table></div>
1689 </div>
1690 <div class="refsect3">
1691 <a name="g-dbus-connection-get-guid.returns"></a><h4>Returns</h4>
1692 <p> The GUID. Do not free this string, it is owned by
1693 <em class="parameter"><code>connection</code></em>
1694 .</p>
1695 </div>
1696 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
1697 </div>
1698 <hr>
1699 <div class="refsect2">
1700 <a name="g-dbus-connection-get-unique-name"></a><h3>g_dbus_connection_get_unique_name ()</h3>
1701 <pre class="programlisting">const <a href="../glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
1702 g_dbus_connection_get_unique_name (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);</pre>
1703 <p>Gets the unique name of <em class="parameter"><code>connection</code></em>
1704  as assigned by the message
1705 bus. This can also be used to figure out if <em class="parameter"><code>connection</code></em>
1706  is a
1707 message bus connection.</p>
1708 <div class="refsect3">
1709 <a name="g-dbus-connection-get-unique-name.parameters"></a><h4>Parameters</h4>
1710 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1711 <colgroup>
1712 <col width="150px" class="parameters_name">
1713 <col class="parameters_description">
1714 <col width="200px" class="parameters_annotations">
1715 </colgroup>
1716 <tbody><tr>
1717 <td class="parameter_name"><p>connection</p></td>
1718 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
1719 <td class="parameter_annotations"> </td>
1720 </tr></tbody>
1721 </table></div>
1722 </div>
1723 <div class="refsect3">
1724 <a name="g-dbus-connection-get-unique-name.returns"></a><h4>Returns</h4>
1725 <p> the unique name or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>connection</code></em>
1726 is not a message
1727 bus connection. Do not free this string, it is owned by
1728 <em class="parameter"><code>connection</code></em>
1729 .</p>
1730 </div>
1731 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
1732 </div>
1733 <hr>
1734 <div class="refsect2">
1735 <a name="g-dbus-connection-get-capabilities"></a><h3>g_dbus_connection_get_capabilities ()</h3>
1736 <pre class="programlisting"><a class="link" href="GDBusConnection.html#GDBusCapabilityFlags" title="enum GDBusCapabilityFlags"><span class="returnvalue">GDBusCapabilityFlags</span></a>
1737 g_dbus_connection_get_capabilities (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);</pre>
1738 <p>Gets the capabilities negotiated with the remote peer</p>
1739 <div class="refsect3">
1740 <a name="g-dbus-connection-get-capabilities.parameters"></a><h4>Parameters</h4>
1741 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1742 <colgroup>
1743 <col width="150px" class="parameters_name">
1744 <col class="parameters_description">
1745 <col width="200px" class="parameters_annotations">
1746 </colgroup>
1747 <tbody><tr>
1748 <td class="parameter_name"><p>connection</p></td>
1749 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
1750 <td class="parameter_annotations"> </td>
1751 </tr></tbody>
1752 </table></div>
1753 </div>
1754 <div class="refsect3">
1755 <a name="g-dbus-connection-get-capabilities.returns"></a><h4>Returns</h4>
1756 <p> zero or more flags from the <a class="link" href="GDBusConnection.html#GDBusCapabilityFlags" title="enum GDBusCapabilityFlags"><span class="type">GDBusCapabilityFlags</span></a> enumeration</p>
1757 </div>
1758 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
1759 </div>
1760 <hr>
1761 <div class="refsect2">
1762 <a name="g-dbus-connection-get-peer-credentials"></a><h3>g_dbus_connection_get_peer_credentials ()</h3>
1763 <pre class="programlisting"><a class="link" href="GCredentials.html" title="GCredentials"><span class="returnvalue">GCredentials</span></a> *
1764 g_dbus_connection_get_peer_credentials
1765                                (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);</pre>
1766 <p>Gets the credentials of the authenticated peer. This will always
1767 return <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> unless <em class="parameter"><code>connection</code></em>
1768  acted as a server
1769 (e.g. <a class="link" href="GDBusConnection.html#G-DBUS-CONNECTION-FLAGS-AUTHENTICATION-SERVER:CAPS"><code class="literal">G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER</code></a> was passed)
1770 when set up and the client passed credentials as part of the
1771 authentication process.</p>
1772 <p>In a message bus setup, the message bus is always the server and
1773 each application is a client. So this method will always return
1774 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for message bus clients.</p>
1775 <div class="refsect3">
1776 <a name="g-dbus-connection-get-peer-credentials.parameters"></a><h4>Parameters</h4>
1777 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1778 <colgroup>
1779 <col width="150px" class="parameters_name">
1780 <col class="parameters_description">
1781 <col width="200px" class="parameters_annotations">
1782 </colgroup>
1783 <tbody><tr>
1784 <td class="parameter_name"><p>connection</p></td>
1785 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
1786 <td class="parameter_annotations"> </td>
1787 </tr></tbody>
1788 </table></div>
1789 </div>
1790 <div class="refsect3">
1791 <a name="g-dbus-connection-get-peer-credentials.returns"></a><h4>Returns</h4>
1792 <p> a <a class="link" href="GCredentials.html" title="GCredentials"><span class="type">GCredentials</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not
1793 available. Do not free this object, it is owned by <em class="parameter"><code>connection</code></em>
1794 . </p>
1795 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
1796 </div>
1797 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
1798 </div>
1799 <hr>
1800 <div class="refsect2">
1801 <a name="g-dbus-connection-get-last-serial"></a><h3>g_dbus_connection_get_last_serial ()</h3>
1802 <pre class="programlisting"><a href="../glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>
1803 g_dbus_connection_get_last_serial (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);</pre>
1804 <p>Retrieves the last serial number assigned to a <a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="type">GDBusMessage</span></a> on
1805 the current thread. This includes messages sent via both low-level
1806 API such as <a class="link" href="GDBusConnection.html#g-dbus-connection-send-message" title="g_dbus_connection_send_message ()"><code class="function">g_dbus_connection_send_message()</code></a> as well as
1807 high-level API such as <a class="link" href="GDBusConnection.html#g-dbus-connection-emit-signal" title="g_dbus_connection_emit_signal ()"><code class="function">g_dbus_connection_emit_signal()</code></a>,
1808 <a class="link" href="GDBusConnection.html#g-dbus-connection-call" title="g_dbus_connection_call ()"><code class="function">g_dbus_connection_call()</code></a> or <a class="link" href="GDBusProxy.html#g-dbus-proxy-call" title="g_dbus_proxy_call ()"><code class="function">g_dbus_proxy_call()</code></a>.</p>
1809 <div class="refsect3">
1810 <a name="g-dbus-connection-get-last-serial.parameters"></a><h4>Parameters</h4>
1811 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1812 <colgroup>
1813 <col width="150px" class="parameters_name">
1814 <col class="parameters_description">
1815 <col width="200px" class="parameters_annotations">
1816 </colgroup>
1817 <tbody><tr>
1818 <td class="parameter_name"><p>connection</p></td>
1819 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
1820 <td class="parameter_annotations"> </td>
1821 </tr></tbody>
1822 </table></div>
1823 </div>
1824 <div class="refsect3">
1825 <a name="g-dbus-connection-get-last-serial.returns"></a><h4>Returns</h4>
1826 <p> the last used serial or zero when no message has been sent
1827 within the current thread</p>
1828 </div>
1829 <p class="since">Since: <a class="link" href="api-index-2-34.html#api-index-2.34">2.34</a></p>
1830 </div>
1831 <hr>
1832 <div class="refsect2">
1833 <a name="g-dbus-connection-call"></a><h3>g_dbus_connection_call ()</h3>
1834 <pre class="programlisting"><span class="returnvalue">void</span>
1835 g_dbus_connection_call (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
1836                         <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *bus_name</code></em>,
1837                         <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
1838                         <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
1839                         <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *method_name</code></em>,
1840                         <em class="parameter"><code><a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameters</code></em>,
1841                         <em class="parameter"><code>const <a href="../glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> *reply_type</code></em>,
1842                         <em class="parameter"><code><a class="link" href="GDBusConnection.html#GDBusCallFlags" title="enum GDBusCallFlags"><span class="type">GDBusCallFlags</span></a> flags</code></em>,
1843                         <em class="parameter"><code><a href="../glib-Basic-Types.html#gint"><span class="type">gint</span></a> timeout_msec</code></em>,
1844                         <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
1845                         <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
1846                         <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
1847 <p>Asynchronously invokes the <em class="parameter"><code>method_name</code></em>
1848  method on the
1849 <em class="parameter"><code>interface_name</code></em>
1850  D-Bus interface on the remote object at
1851 <em class="parameter"><code>object_path</code></em>
1852  owned by <em class="parameter"><code>bus_name</code></em>
1853 .</p>
1854 <p>If <em class="parameter"><code>connection</code></em>
1855  is closed then the operation will fail with
1856 <a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a>. If <em class="parameter"><code>cancellable</code></em>
1857  is canceled, the operation will
1858 fail with <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a>. If <em class="parameter"><code>parameters</code></em>
1859  contains a value
1860 not compatible with the D-Bus protocol, the operation fails with
1861 <a class="link" href="gio-GIOError.html#G-IO-ERROR-INVALID-ARGUMENT:CAPS"><code class="literal">G_IO_ERROR_INVALID_ARGUMENT</code></a>.</p>
1862 <p>If <em class="parameter"><code>reply_type</code></em>
1863  is non-<a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then the reply will be checked for having this type and an
1864 error will be raised if it does not match.  Said another way, if you give a <em class="parameter"><code>reply_type</code></em>
1865
1866 then any non-<a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> return value will be of this type.</p>
1867 <p>If the <em class="parameter"><code>parameters</code></em>
1868  <a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> is floating, it is consumed. This allows
1869 convenient 'inline' use of <a href="../glib-GVariant.html#g-variant-new"><code class="function">g_variant_new()</code></a>, e.g.:</p>
1870 <div class="informalexample">
1871   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
1872     <tbody>
1873       <tr>
1874         <td class="listing_lines" align="right"><pre>1
1875 2
1876 3
1877 4
1878 5
1879 6
1880 7
1881 8
1882 9
1883 10
1884 11
1885 12
1886 13
1887 14</pre></td>
1888         <td class="listing_code"><pre class="programlisting"><span class="function"><a href="GDBusConnection.html#g-dbus-connection-call">g_dbus_connection_call</a></span> <span class="gtkdoc opt">(</span>connection<span class="gtkdoc opt">,</span>
1889                         <span class="string">&quot;org.freedesktop.StringThings&quot;</span><span class="gtkdoc opt">,</span>
1890                         <span class="string">&quot;/org/freedesktop/StringThings&quot;</span><span class="gtkdoc opt">,</span>
1891                         <span class="string">&quot;org.freedesktop.StringThings&quot;</span><span class="gtkdoc opt">,</span>
1892                         <span class="string">&quot;TwoStrings&quot;</span><span class="gtkdoc opt">,</span>
1893                         <span class="function"><a href="../glib-GVariant.html#g-variant-new">g_variant_new</a></span> <span class="gtkdoc opt">(</span><span class="string">&quot;(ss)&quot;</span><span class="gtkdoc opt">,</span>
1894                                        <span class="string">&quot;Thing One&quot;</span><span class="gtkdoc opt">,</span>
1895                                        <span class="string">&quot;Thing Two&quot;</span><span class="gtkdoc opt">),</span>
1896                         NULL<span class="gtkdoc opt">,</span>
1897                         G_DBUS_CALL_FLAGS_NONE<span class="gtkdoc opt">,</span>
1898                         <span class="gtkdoc opt">-</span><span class="number">1</span><span class="gtkdoc opt">,</span>
1899                         NULL<span class="gtkdoc opt">,</span>
1900                         <span class="gtkdoc opt">(</span>GAsyncReadyCallback<span class="gtkdoc opt">)</span> two_strings_done<span class="gtkdoc opt">,</span>
1901                         NULL<span class="gtkdoc opt">);</span></pre></td>
1902       </tr>
1903     </tbody>
1904   </table>
1905 </div>
1906
1907 <p></p>
1908 <p>This is an asynchronous method. When the operation is finished,
1909 <em class="parameter"><code>callback</code></em>
1910  will be invoked in the
1911 <a href="../glib-The-Main-Event-Loop.html#g-main-context-push-thread-default">thread-default main context</a>
1912 of the thread you are calling this method from. You can then call
1913 <a class="link" href="GDBusConnection.html#g-dbus-connection-call-finish" title="g_dbus_connection_call_finish ()"><code class="function">g_dbus_connection_call_finish()</code></a> to get the result of the operation.
1914 See <a class="link" href="GDBusConnection.html#g-dbus-connection-call-sync" title="g_dbus_connection_call_sync ()"><code class="function">g_dbus_connection_call_sync()</code></a> for the synchronous version of this
1915 function.</p>
1916 <p>If <em class="parameter"><code>callback</code></em>
1917  is <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then the D-Bus method call message will be sent with
1918 the <a class="link" href="GDBusMessage.html#G-DBUS-MESSAGE-FLAGS-NO-REPLY-EXPECTED:CAPS"><code class="literal">G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED</code></a> flag set.</p>
1919 <div class="refsect3">
1920 <a name="g-dbus-connection-call.parameters"></a><h4>Parameters</h4>
1921 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1922 <colgroup>
1923 <col width="150px" class="parameters_name">
1924 <col class="parameters_description">
1925 <col width="200px" class="parameters_annotations">
1926 </colgroup>
1927 <tbody>
1928 <tr>
1929 <td class="parameter_name"><p>connection</p></td>
1930 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
1931 <td class="parameter_annotations"> </td>
1932 </tr>
1933 <tr>
1934 <td class="parameter_name"><p>bus_name</p></td>
1935 <td class="parameter_description"><p> a unique or well-known bus name or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
1936 <em class="parameter"><code>connection</code></em>
1937 is not a message bus connection. </p></td>
1938 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1939 </tr>
1940 <tr>
1941 <td class="parameter_name"><p>object_path</p></td>
1942 <td class="parameter_description"><p>path of remote object</p></td>
1943 <td class="parameter_annotations"> </td>
1944 </tr>
1945 <tr>
1946 <td class="parameter_name"><p>interface_name</p></td>
1947 <td class="parameter_description"><p>D-Bus interface to invoke method on</p></td>
1948 <td class="parameter_annotations"> </td>
1949 </tr>
1950 <tr>
1951 <td class="parameter_name"><p>method_name</p></td>
1952 <td class="parameter_description"><p>the name of the method to invoke</p></td>
1953 <td class="parameter_annotations"> </td>
1954 </tr>
1955 <tr>
1956 <td class="parameter_name"><p>parameters</p></td>
1957 <td class="parameter_description"><p> a <a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple with parameters for the method
1958 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not passing parameters. </p></td>
1959 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1960 </tr>
1961 <tr>
1962 <td class="parameter_name"><p>reply_type</p></td>
1963 <td class="parameter_description"><p> the expected type of the reply, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1964 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1965 </tr>
1966 <tr>
1967 <td class="parameter_name"><p>flags</p></td>
1968 <td class="parameter_description"><p>flags from the <a class="link" href="GDBusConnection.html#GDBusCallFlags" title="enum GDBusCallFlags"><span class="type">GDBusCallFlags</span></a> enumeration</p></td>
1969 <td class="parameter_annotations"> </td>
1970 </tr>
1971 <tr>
1972 <td class="parameter_name"><p>timeout_msec</p></td>
1973 <td class="parameter_description"><p>the timeout in milliseconds, -1 to use the default
1974 timeout or <a href="../glib-Basic-Types.html#G-MAXINT:CAPS"><code class="literal">G_MAXINT</code></a> for no timeout</p></td>
1975 <td class="parameter_annotations"> </td>
1976 </tr>
1977 <tr>
1978 <td class="parameter_name"><p>cancellable</p></td>
1979 <td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1980 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1981 </tr>
1982 <tr>
1983 <td class="parameter_name"><p>callback</p></td>
1984 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request
1985 is satisfied or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you don't care about the result of the
1986 method invocation. </p></td>
1987 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1988 </tr>
1989 <tr>
1990 <td class="parameter_name"><p>user_data</p></td>
1991 <td class="parameter_description"><p>the data to pass to <em class="parameter"><code>callback</code></em>
1992 </p></td>
1993 <td class="parameter_annotations"> </td>
1994 </tr>
1995 </tbody>
1996 </table></div>
1997 </div>
1998 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
1999 </div>
2000 <hr>
2001 <div class="refsect2">
2002 <a name="g-dbus-connection-call-finish"></a><h3>g_dbus_connection_call_finish ()</h3>
2003 <pre class="programlisting"><a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
2004 g_dbus_connection_call_finish (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
2005                                <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
2006                                <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2007 <p>Finishes an operation started with <a class="link" href="GDBusConnection.html#g-dbus-connection-call" title="g_dbus_connection_call ()"><code class="function">g_dbus_connection_call()</code></a>.</p>
2008 <div class="refsect3">
2009 <a name="g-dbus-connection-call-finish.parameters"></a><h4>Parameters</h4>
2010 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2011 <colgroup>
2012 <col width="150px" class="parameters_name">
2013 <col class="parameters_description">
2014 <col width="200px" class="parameters_annotations">
2015 </colgroup>
2016 <tbody>
2017 <tr>
2018 <td class="parameter_name"><p>connection</p></td>
2019 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
2020 <td class="parameter_annotations"> </td>
2021 </tr>
2022 <tr>
2023 <td class="parameter_name"><p>res</p></td>
2024 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> obtained from the <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> passed to <a class="link" href="GDBusConnection.html#g-dbus-connection-call" title="g_dbus_connection_call ()"><code class="function">g_dbus_connection_call()</code></a></p></td>
2025 <td class="parameter_annotations"> </td>
2026 </tr>
2027 <tr>
2028 <td class="parameter_name"><p>error</p></td>
2029 <td class="parameter_description"><p>return location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2030 <td class="parameter_annotations"> </td>
2031 </tr>
2032 </tbody>
2033 </table></div>
2034 </div>
2035 <div class="refsect3">
2036 <a name="g-dbus-connection-call-finish.returns"></a><h4>Returns</h4>
2037 <p> <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em>
2038 is set. Otherwise a <a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple with
2039 return values. Free with <a href="../glib-GVariant.html#g-variant-unref"><code class="function">g_variant_unref()</code></a>.</p>
2040 </div>
2041 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
2042 </div>
2043 <hr>
2044 <div class="refsect2">
2045 <a name="g-dbus-connection-call-sync"></a><h3>g_dbus_connection_call_sync ()</h3>
2046 <pre class="programlisting"><a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
2047 g_dbus_connection_call_sync (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
2048                              <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *bus_name</code></em>,
2049                              <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
2050                              <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
2051                              <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *method_name</code></em>,
2052                              <em class="parameter"><code><a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameters</code></em>,
2053                              <em class="parameter"><code>const <a href="../glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> *reply_type</code></em>,
2054                              <em class="parameter"><code><a class="link" href="GDBusConnection.html#GDBusCallFlags" title="enum GDBusCallFlags"><span class="type">GDBusCallFlags</span></a> flags</code></em>,
2055                              <em class="parameter"><code><a href="../glib-Basic-Types.html#gint"><span class="type">gint</span></a> timeout_msec</code></em>,
2056                              <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
2057                              <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2058 <p>Synchronously invokes the <em class="parameter"><code>method_name</code></em>
2059  method on the
2060 <em class="parameter"><code>interface_name</code></em>
2061  D-Bus interface on the remote object at
2062 <em class="parameter"><code>object_path</code></em>
2063  owned by <em class="parameter"><code>bus_name</code></em>
2064 .</p>
2065 <p>If <em class="parameter"><code>connection</code></em>
2066  is closed then the operation will fail with
2067 <a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a>. If <em class="parameter"><code>cancellable</code></em>
2068  is canceled, the
2069 operation will fail with <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a>. If <em class="parameter"><code>parameters</code></em>
2070
2071 contains a value not compatible with the D-Bus protocol, the operation
2072 fails with <a class="link" href="gio-GIOError.html#G-IO-ERROR-INVALID-ARGUMENT:CAPS"><code class="literal">G_IO_ERROR_INVALID_ARGUMENT</code></a>.</p>
2073 <p>If <em class="parameter"><code>reply_type</code></em>
2074  is non-<a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then the reply will be checked for having
2075 this type and an error will be raised if it does not match.  Said
2076 another way, if you give a <em class="parameter"><code>reply_type</code></em>
2077  then any non-<a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> return
2078 value will be of this type.</p>
2079 <p>If the <em class="parameter"><code>parameters</code></em>
2080  <a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> is floating, it is consumed.
2081 This allows convenient 'inline' use of <a href="../glib-GVariant.html#g-variant-new"><code class="function">g_variant_new()</code></a>, e.g.:</p>
2082 <div class="informalexample">
2083   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
2084     <tbody>
2085       <tr>
2086         <td class="listing_lines" align="right"><pre>1
2087 2
2088 3
2089 4
2090 5
2091 6
2092 7
2093 8
2094 9
2095 10
2096 11
2097 12
2098 13</pre></td>
2099         <td class="listing_code"><pre class="programlisting"><span class="function"><a href="GDBusConnection.html#g-dbus-connection-call-sync">g_dbus_connection_call_sync</a></span> <span class="gtkdoc opt">(</span>connection<span class="gtkdoc opt">,</span>
2100                              <span class="string">&quot;org.freedesktop.StringThings&quot;</span><span class="gtkdoc opt">,</span>
2101                              <span class="string">&quot;/org/freedesktop/StringThings&quot;</span><span class="gtkdoc opt">,</span>
2102                              <span class="string">&quot;org.freedesktop.StringThings&quot;</span><span class="gtkdoc opt">,</span>
2103                              <span class="string">&quot;TwoStrings&quot;</span><span class="gtkdoc opt">,</span>
2104                              <span class="function"><a href="../glib-GVariant.html#g-variant-new">g_variant_new</a></span> <span class="gtkdoc opt">(</span><span class="string">&quot;(ss)&quot;</span><span class="gtkdoc opt">,</span>
2105                                             <span class="string">&quot;Thing One&quot;</span><span class="gtkdoc opt">,</span>
2106                                             <span class="string">&quot;Thing Two&quot;</span><span class="gtkdoc opt">),</span>
2107                              NULL<span class="gtkdoc opt">,</span>
2108                              G_DBUS_CALL_FLAGS_NONE<span class="gtkdoc opt">,</span>
2109                              <span class="gtkdoc opt">-</span><span class="number">1</span><span class="gtkdoc opt">,</span>
2110                              NULL<span class="gtkdoc opt">,</span>
2111                              <span class="gtkdoc opt">&amp;</span>error<span class="gtkdoc opt">);</span></pre></td>
2112       </tr>
2113     </tbody>
2114   </table>
2115 </div>
2116
2117 <p></p>
2118 <p>The calling thread is blocked until a reply is received. See
2119 <a class="link" href="GDBusConnection.html#g-dbus-connection-call" title="g_dbus_connection_call ()"><code class="function">g_dbus_connection_call()</code></a> for the asynchronous version of
2120 this method.</p>
2121 <div class="refsect3">
2122 <a name="g-dbus-connection-call-sync.parameters"></a><h4>Parameters</h4>
2123 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2124 <colgroup>
2125 <col width="150px" class="parameters_name">
2126 <col class="parameters_description">
2127 <col width="200px" class="parameters_annotations">
2128 </colgroup>
2129 <tbody>
2130 <tr>
2131 <td class="parameter_name"><p>connection</p></td>
2132 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
2133 <td class="parameter_annotations"> </td>
2134 </tr>
2135 <tr>
2136 <td class="parameter_name"><p>bus_name</p></td>
2137 <td class="parameter_description"><p> a unique or well-known bus name or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
2138 <em class="parameter"><code>connection</code></em>
2139 is not a message bus connection. </p></td>
2140 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2141 </tr>
2142 <tr>
2143 <td class="parameter_name"><p>object_path</p></td>
2144 <td class="parameter_description"><p>path of remote object</p></td>
2145 <td class="parameter_annotations"> </td>
2146 </tr>
2147 <tr>
2148 <td class="parameter_name"><p>interface_name</p></td>
2149 <td class="parameter_description"><p>D-Bus interface to invoke method on</p></td>
2150 <td class="parameter_annotations"> </td>
2151 </tr>
2152 <tr>
2153 <td class="parameter_name"><p>method_name</p></td>
2154 <td class="parameter_description"><p>the name of the method to invoke</p></td>
2155 <td class="parameter_annotations"> </td>
2156 </tr>
2157 <tr>
2158 <td class="parameter_name"><p>parameters</p></td>
2159 <td class="parameter_description"><p> a <a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple with parameters for the method
2160 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not passing parameters. </p></td>
2161 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2162 </tr>
2163 <tr>
2164 <td class="parameter_name"><p>reply_type</p></td>
2165 <td class="parameter_description"><p> the expected type of the reply, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2166 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2167 </tr>
2168 <tr>
2169 <td class="parameter_name"><p>flags</p></td>
2170 <td class="parameter_description"><p>flags from the <a class="link" href="GDBusConnection.html#GDBusCallFlags" title="enum GDBusCallFlags"><span class="type">GDBusCallFlags</span></a> enumeration</p></td>
2171 <td class="parameter_annotations"> </td>
2172 </tr>
2173 <tr>
2174 <td class="parameter_name"><p>timeout_msec</p></td>
2175 <td class="parameter_description"><p>the timeout in milliseconds, -1 to use the default
2176 timeout or <a href="../glib-Basic-Types.html#G-MAXINT:CAPS"><code class="literal">G_MAXINT</code></a> for no timeout</p></td>
2177 <td class="parameter_annotations"> </td>
2178 </tr>
2179 <tr>
2180 <td class="parameter_name"><p>cancellable</p></td>
2181 <td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2182 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2183 </tr>
2184 <tr>
2185 <td class="parameter_name"><p>error</p></td>
2186 <td class="parameter_description"><p>return location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2187 <td class="parameter_annotations"> </td>
2188 </tr>
2189 </tbody>
2190 </table></div>
2191 </div>
2192 <div class="refsect3">
2193 <a name="g-dbus-connection-call-sync.returns"></a><h4>Returns</h4>
2194 <p> <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em>
2195 is set. Otherwise a <a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple with
2196 return values. Free with <a href="../glib-GVariant.html#g-variant-unref"><code class="function">g_variant_unref()</code></a>.</p>
2197 </div>
2198 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
2199 </div>
2200 <hr>
2201 <div class="refsect2">
2202 <a name="g-dbus-connection-call-with-unix-fd-list"></a><h3>g_dbus_connection_call_with_unix_fd_list ()</h3>
2203 <pre class="programlisting"><span class="returnvalue">void</span>
2204 g_dbus_connection_call_with_unix_fd_list
2205                                (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
2206                                 <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *bus_name</code></em>,
2207                                 <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
2208                                 <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
2209                                 <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *method_name</code></em>,
2210                                 <em class="parameter"><code><a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameters</code></em>,
2211                                 <em class="parameter"><code>const <a href="../glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> *reply_type</code></em>,
2212                                 <em class="parameter"><code><a class="link" href="GDBusConnection.html#GDBusCallFlags" title="enum GDBusCallFlags"><span class="type">GDBusCallFlags</span></a> flags</code></em>,
2213                                 <em class="parameter"><code><a href="../glib-Basic-Types.html#gint"><span class="type">gint</span></a> timeout_msec</code></em>,
2214                                 <em class="parameter"><code><a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> *fd_list</code></em>,
2215                                 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
2216                                 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
2217                                 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
2218 <p>Like <a class="link" href="GDBusConnection.html#g-dbus-connection-call" title="g_dbus_connection_call ()"><code class="function">g_dbus_connection_call()</code></a> but also takes a <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> object.</p>
2219 <p>This method is only available on UNIX.</p>
2220 <div class="refsect3">
2221 <a name="g-dbus-connection-call-with-unix-fd-list.parameters"></a><h4>Parameters</h4>
2222 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2223 <colgroup>
2224 <col width="150px" class="parameters_name">
2225 <col class="parameters_description">
2226 <col width="200px" class="parameters_annotations">
2227 </colgroup>
2228 <tbody>
2229 <tr>
2230 <td class="parameter_name"><p>connection</p></td>
2231 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
2232 <td class="parameter_annotations"> </td>
2233 </tr>
2234 <tr>
2235 <td class="parameter_name"><p>bus_name</p></td>
2236 <td class="parameter_description"><p> a unique or well-known bus name or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
2237 <em class="parameter"><code>connection</code></em>
2238 is not a message bus connection. </p></td>
2239 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2240 </tr>
2241 <tr>
2242 <td class="parameter_name"><p>object_path</p></td>
2243 <td class="parameter_description"><p>path of remote object</p></td>
2244 <td class="parameter_annotations"> </td>
2245 </tr>
2246 <tr>
2247 <td class="parameter_name"><p>interface_name</p></td>
2248 <td class="parameter_description"><p>D-Bus interface to invoke method on</p></td>
2249 <td class="parameter_annotations"> </td>
2250 </tr>
2251 <tr>
2252 <td class="parameter_name"><p>method_name</p></td>
2253 <td class="parameter_description"><p>the name of the method to invoke</p></td>
2254 <td class="parameter_annotations"> </td>
2255 </tr>
2256 <tr>
2257 <td class="parameter_name"><p>parameters</p></td>
2258 <td class="parameter_description"><p> a <a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple with parameters for the method
2259 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not passing parameters. </p></td>
2260 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2261 </tr>
2262 <tr>
2263 <td class="parameter_name"><p>reply_type</p></td>
2264 <td class="parameter_description"><p> the expected type of the reply, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2265 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2266 </tr>
2267 <tr>
2268 <td class="parameter_name"><p>flags</p></td>
2269 <td class="parameter_description"><p>flags from the <a class="link" href="GDBusConnection.html#GDBusCallFlags" title="enum GDBusCallFlags"><span class="type">GDBusCallFlags</span></a> enumeration</p></td>
2270 <td class="parameter_annotations"> </td>
2271 </tr>
2272 <tr>
2273 <td class="parameter_name"><p>timeout_msec</p></td>
2274 <td class="parameter_description"><p>the timeout in milliseconds, -1 to use the default
2275 timeout or <a href="../glib-Basic-Types.html#G-MAXINT:CAPS"><code class="literal">G_MAXINT</code></a> for no timeout</p></td>
2276 <td class="parameter_annotations"> </td>
2277 </tr>
2278 <tr>
2279 <td class="parameter_name"><p>fd_list</p></td>
2280 <td class="parameter_description"><p> a <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2281 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2282 </tr>
2283 <tr>
2284 <td class="parameter_name"><p>cancellable</p></td>
2285 <td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2286 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2287 </tr>
2288 <tr>
2289 <td class="parameter_name"><p>callback</p></td>
2290 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is
2291 satisfied or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you don't * care about the result of the
2292 method invocation. </p></td>
2293 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2294 </tr>
2295 <tr>
2296 <td class="parameter_name"><p>user_data</p></td>
2297 <td class="parameter_description"><p>The data to pass to <em class="parameter"><code>callback</code></em>
2298 .</p></td>
2299 <td class="parameter_annotations"> </td>
2300 </tr>
2301 </tbody>
2302 </table></div>
2303 </div>
2304 <p class="since">Since: <a class="link" href="api-index-2-30.html#api-index-2.30">2.30</a></p>
2305 </div>
2306 <hr>
2307 <div class="refsect2">
2308 <a name="g-dbus-connection-call-with-unix-fd-list-finish"></a><h3>g_dbus_connection_call_with_unix_fd_list_finish ()</h3>
2309 <pre class="programlisting"><a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
2310 g_dbus_connection_call_with_unix_fd_list_finish
2311                                (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
2312                                 <em class="parameter"><code><a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> **out_fd_list</code></em>,
2313                                 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
2314                                 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2315 <p>Finishes an operation started with <a class="link" href="GDBusConnection.html#g-dbus-connection-call-with-unix-fd-list" title="g_dbus_connection_call_with_unix_fd_list ()"><code class="function">g_dbus_connection_call_with_unix_fd_list()</code></a>.</p>
2316 <div class="refsect3">
2317 <a name="g-dbus-connection-call-with-unix-fd-list-finish.parameters"></a><h4>Parameters</h4>
2318 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2319 <colgroup>
2320 <col width="150px" class="parameters_name">
2321 <col class="parameters_description">
2322 <col width="200px" class="parameters_annotations">
2323 </colgroup>
2324 <tbody>
2325 <tr>
2326 <td class="parameter_name"><p>connection</p></td>
2327 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
2328 <td class="parameter_annotations"> </td>
2329 </tr>
2330 <tr>
2331 <td class="parameter_name"><p>out_fd_list</p></td>
2332 <td class="parameter_description"><p> return location for a <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2333 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2334 </tr>
2335 <tr>
2336 <td class="parameter_name"><p>res</p></td>
2337 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> obtained from the <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> passed to
2338 <a class="link" href="GDBusConnection.html#g-dbus-connection-call-with-unix-fd-list" title="g_dbus_connection_call_with_unix_fd_list ()"><code class="function">g_dbus_connection_call_with_unix_fd_list()</code></a></p></td>
2339 <td class="parameter_annotations"> </td>
2340 </tr>
2341 <tr>
2342 <td class="parameter_name"><p>error</p></td>
2343 <td class="parameter_description"><p>return location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2344 <td class="parameter_annotations"> </td>
2345 </tr>
2346 </tbody>
2347 </table></div>
2348 </div>
2349 <div class="refsect3">
2350 <a name="g-dbus-connection-call-with-unix-fd-list-finish.returns"></a><h4>Returns</h4>
2351 <p> <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em>
2352 is set. Otherwise a <a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple with
2353 return values. Free with <a href="../glib-GVariant.html#g-variant-unref"><code class="function">g_variant_unref()</code></a>.</p>
2354 </div>
2355 <p class="since">Since: <a class="link" href="api-index-2-30.html#api-index-2.30">2.30</a></p>
2356 </div>
2357 <hr>
2358 <div class="refsect2">
2359 <a name="g-dbus-connection-call-with-unix-fd-list-sync"></a><h3>g_dbus_connection_call_with_unix_fd_list_sync ()</h3>
2360 <pre class="programlisting"><a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
2361 g_dbus_connection_call_with_unix_fd_list_sync
2362                                (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
2363                                 <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *bus_name</code></em>,
2364                                 <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
2365                                 <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
2366                                 <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *method_name</code></em>,
2367                                 <em class="parameter"><code><a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameters</code></em>,
2368                                 <em class="parameter"><code>const <a href="../glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> *reply_type</code></em>,
2369                                 <em class="parameter"><code><a class="link" href="GDBusConnection.html#GDBusCallFlags" title="enum GDBusCallFlags"><span class="type">GDBusCallFlags</span></a> flags</code></em>,
2370                                 <em class="parameter"><code><a href="../glib-Basic-Types.html#gint"><span class="type">gint</span></a> timeout_msec</code></em>,
2371                                 <em class="parameter"><code><a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> *fd_list</code></em>,
2372                                 <em class="parameter"><code><a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> **out_fd_list</code></em>,
2373                                 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
2374                                 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2375 <p>Like <a class="link" href="GDBusConnection.html#g-dbus-connection-call-sync" title="g_dbus_connection_call_sync ()"><code class="function">g_dbus_connection_call_sync()</code></a> but also takes and returns <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> objects.</p>
2376 <p>This method is only available on UNIX.</p>
2377 <div class="refsect3">
2378 <a name="g-dbus-connection-call-with-unix-fd-list-sync.parameters"></a><h4>Parameters</h4>
2379 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2380 <colgroup>
2381 <col width="150px" class="parameters_name">
2382 <col class="parameters_description">
2383 <col width="200px" class="parameters_annotations">
2384 </colgroup>
2385 <tbody>
2386 <tr>
2387 <td class="parameter_name"><p>connection</p></td>
2388 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
2389 <td class="parameter_annotations"> </td>
2390 </tr>
2391 <tr>
2392 <td class="parameter_name"><p>bus_name</p></td>
2393 <td class="parameter_description"><p> a unique or well-known bus name or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
2394 if <em class="parameter"><code>connection</code></em>
2395 is not a message bus connection. </p></td>
2396 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2397 </tr>
2398 <tr>
2399 <td class="parameter_name"><p>object_path</p></td>
2400 <td class="parameter_description"><p>path of remote object</p></td>
2401 <td class="parameter_annotations"> </td>
2402 </tr>
2403 <tr>
2404 <td class="parameter_name"><p>interface_name</p></td>
2405 <td class="parameter_description"><p>D-Bus interface to invoke method on</p></td>
2406 <td class="parameter_annotations"> </td>
2407 </tr>
2408 <tr>
2409 <td class="parameter_name"><p>method_name</p></td>
2410 <td class="parameter_description"><p>the name of the method to invoke</p></td>
2411 <td class="parameter_annotations"> </td>
2412 </tr>
2413 <tr>
2414 <td class="parameter_name"><p>parameters</p></td>
2415 <td class="parameter_description"><p> a <a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple with parameters for
2416 the method or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not passing parameters. </p></td>
2417 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2418 </tr>
2419 <tr>
2420 <td class="parameter_name"><p>reply_type</p></td>
2421 <td class="parameter_description"><p> the expected type of the reply, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2422 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2423 </tr>
2424 <tr>
2425 <td class="parameter_name"><p>flags</p></td>
2426 <td class="parameter_description"><p>flags from the <a class="link" href="GDBusConnection.html#GDBusCallFlags" title="enum GDBusCallFlags"><span class="type">GDBusCallFlags</span></a> enumeration</p></td>
2427 <td class="parameter_annotations"> </td>
2428 </tr>
2429 <tr>
2430 <td class="parameter_name"><p>timeout_msec</p></td>
2431 <td class="parameter_description"><p>the timeout in milliseconds, -1 to use the default
2432 timeout or <a href="../glib-Basic-Types.html#G-MAXINT:CAPS"><code class="literal">G_MAXINT</code></a> for no timeout</p></td>
2433 <td class="parameter_annotations"> </td>
2434 </tr>
2435 <tr>
2436 <td class="parameter_name"><p>fd_list</p></td>
2437 <td class="parameter_description"><p> a <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2438 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2439 </tr>
2440 <tr>
2441 <td class="parameter_name"><p>out_fd_list</p></td>
2442 <td class="parameter_description"><p> return location for a <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2443 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2444 </tr>
2445 <tr>
2446 <td class="parameter_name"><p>cancellable</p></td>
2447 <td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2448 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2449 </tr>
2450 <tr>
2451 <td class="parameter_name"><p>error</p></td>
2452 <td class="parameter_description"><p>return location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2453 <td class="parameter_annotations"> </td>
2454 </tr>
2455 </tbody>
2456 </table></div>
2457 </div>
2458 <div class="refsect3">
2459 <a name="g-dbus-connection-call-with-unix-fd-list-sync.returns"></a><h4>Returns</h4>
2460 <p> <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em>
2461 is set. Otherwise a <a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple with
2462 return values. Free with <a href="../glib-GVariant.html#g-variant-unref"><code class="function">g_variant_unref()</code></a>.</p>
2463 </div>
2464 <p class="since">Since: <a class="link" href="api-index-2-30.html#api-index-2.30">2.30</a></p>
2465 </div>
2466 <hr>
2467 <div class="refsect2">
2468 <a name="g-dbus-connection-emit-signal"></a><h3>g_dbus_connection_emit_signal ()</h3>
2469 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2470 g_dbus_connection_emit_signal (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
2471                                <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *destination_bus_name</code></em>,
2472                                <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
2473                                <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
2474                                <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signal_name</code></em>,
2475                                <em class="parameter"><code><a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameters</code></em>,
2476                                <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2477 <p>Emits a signal.</p>
2478 <p>If the parameters GVariant is floating, it is consumed.</p>
2479 <p>This can only fail if <em class="parameter"><code>parameters</code></em>
2480  is not compatible with the D-Bus protocol.</p>
2481 <div class="refsect3">
2482 <a name="g-dbus-connection-emit-signal.parameters"></a><h4>Parameters</h4>
2483 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2484 <colgroup>
2485 <col width="150px" class="parameters_name">
2486 <col class="parameters_description">
2487 <col width="200px" class="parameters_annotations">
2488 </colgroup>
2489 <tbody>
2490 <tr>
2491 <td class="parameter_name"><p>connection</p></td>
2492 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
2493 <td class="parameter_annotations"> </td>
2494 </tr>
2495 <tr>
2496 <td class="parameter_name"><p>destination_bus_name</p></td>
2497 <td class="parameter_description"><p> the unique bus name for the destination
2498 for the signal or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to emit to all listeners. </p></td>
2499 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2500 </tr>
2501 <tr>
2502 <td class="parameter_name"><p>object_path</p></td>
2503 <td class="parameter_description"><p>path of remote object</p></td>
2504 <td class="parameter_annotations"> </td>
2505 </tr>
2506 <tr>
2507 <td class="parameter_name"><p>interface_name</p></td>
2508 <td class="parameter_description"><p>D-Bus interface to emit a signal on</p></td>
2509 <td class="parameter_annotations"> </td>
2510 </tr>
2511 <tr>
2512 <td class="parameter_name"><p>signal_name</p></td>
2513 <td class="parameter_description"><p>the name of the signal to emit</p></td>
2514 <td class="parameter_annotations"> </td>
2515 </tr>
2516 <tr>
2517 <td class="parameter_name"><p>parameters</p></td>
2518 <td class="parameter_description"><p> a <a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple with parameters for the signal
2519 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not passing parameters. </p></td>
2520 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2521 </tr>
2522 <tr>
2523 <td class="parameter_name"><p>error</p></td>
2524 <td class="parameter_description"><p>Return location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2525 <td class="parameter_annotations"> </td>
2526 </tr>
2527 </tbody>
2528 </table></div>
2529 </div>
2530 <div class="refsect3">
2531 <a name="g-dbus-connection-emit-signal.returns"></a><h4>Returns</h4>
2532 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> unless <em class="parameter"><code>error</code></em>
2533 is set</p>
2534 </div>
2535 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
2536 </div>
2537 <hr>
2538 <div class="refsect2">
2539 <a name="GDBusSignalCallback"></a><h3>GDBusSignalCallback ()</h3>
2540 <pre class="programlisting"><span class="returnvalue">void</span>
2541 <span class="c_punctuation">(</span>*GDBusSignalCallback<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
2542                         <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender_name</code></em>,
2543                         <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
2544                         <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
2545                         <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signal_name</code></em>,
2546                         <em class="parameter"><code><a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameters</code></em>,
2547                         <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
2548 <p>Signature for callback function used in <a class="link" href="GDBusConnection.html#g-dbus-connection-signal-subscribe" title="g_dbus_connection_signal_subscribe ()"><code class="function">g_dbus_connection_signal_subscribe()</code></a>.</p>
2549 <div class="refsect3">
2550 <a name="GDBusSignalCallback.parameters"></a><h4>Parameters</h4>
2551 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2552 <colgroup>
2553 <col width="150px" class="parameters_name">
2554 <col class="parameters_description">
2555 <col width="200px" class="parameters_annotations">
2556 </colgroup>
2557 <tbody>
2558 <tr>
2559 <td class="parameter_name"><p>connection</p></td>
2560 <td class="parameter_description"><p>A <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</p></td>
2561 <td class="parameter_annotations"> </td>
2562 </tr>
2563 <tr>
2564 <td class="parameter_name"><p>sender_name</p></td>
2565 <td class="parameter_description"><p>The unique bus name of the sender of the signal.</p></td>
2566 <td class="parameter_annotations"> </td>
2567 </tr>
2568 <tr>
2569 <td class="parameter_name"><p>object_path</p></td>
2570 <td class="parameter_description"><p>The object path that the signal was emitted on.</p></td>
2571 <td class="parameter_annotations"> </td>
2572 </tr>
2573 <tr>
2574 <td class="parameter_name"><p>interface_name</p></td>
2575 <td class="parameter_description"><p>The name of the interface.</p></td>
2576 <td class="parameter_annotations"> </td>
2577 </tr>
2578 <tr>
2579 <td class="parameter_name"><p>signal_name</p></td>
2580 <td class="parameter_description"><p>The name of the signal.</p></td>
2581 <td class="parameter_annotations"> </td>
2582 </tr>
2583 <tr>
2584 <td class="parameter_name"><p>parameters</p></td>
2585 <td class="parameter_description"><p>A <a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple with parameters for the signal.</p></td>
2586 <td class="parameter_annotations"> </td>
2587 </tr>
2588 <tr>
2589 <td class="parameter_name"><p>user_data</p></td>
2590 <td class="parameter_description"><p>User data passed when subscribing to the signal.</p></td>
2591 <td class="parameter_annotations"> </td>
2592 </tr>
2593 </tbody>
2594 </table></div>
2595 </div>
2596 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
2597 </div>
2598 <hr>
2599 <div class="refsect2">
2600 <a name="g-dbus-connection-signal-subscribe"></a><h3>g_dbus_connection_signal_subscribe ()</h3>
2601 <pre class="programlisting"><a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
2602 g_dbus_connection_signal_subscribe (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
2603                                     <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
2604                                     <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
2605                                     <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *member</code></em>,
2606                                     <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
2607                                     <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *arg0</code></em>,
2608                                     <em class="parameter"><code><a class="link" href="GDBusConnection.html#GDBusSignalFlags" title="enum GDBusSignalFlags"><span class="type">GDBusSignalFlags</span></a> flags</code></em>,
2609                                     <em class="parameter"><code><a class="link" href="GDBusConnection.html#GDBusSignalCallback" title="GDBusSignalCallback ()"><span class="type">GDBusSignalCallback</span></a> callback</code></em>,
2610                                     <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
2611                                     <em class="parameter"><code><a href="../glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> user_data_free_func</code></em>);</pre>
2612 <p>Subscribes to signals on <em class="parameter"><code>connection</code></em>
2613  and invokes <em class="parameter"><code>callback</code></em>
2614  with a whenever
2615 the signal is received. Note that <em class="parameter"><code>callback</code></em>
2616  will be invoked in the 
2617 <a href="../glib-The-Main-Event-Loop.html#g-main-context-push-thread-default">thread-default main context</a>
2618 of the thread you are calling this method from.</p>
2619 <p>If <em class="parameter"><code>connection</code></em>
2620  is not a message bus connection, <em class="parameter"><code>sender</code></em>
2621  must be
2622 <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
2623 <p>If <em class="parameter"><code>sender</code></em>
2624  is a well-known name note that <em class="parameter"><code>callback</code></em>
2625  is invoked with
2626 the unique name for the owner of <em class="parameter"><code>sender</code></em>
2627 , not the well-known name
2628 as one would expect. This is because the message bus rewrites the
2629 name. As such, to avoid certain race conditions, users should be
2630 tracking the name owner of the well-known name and use that when
2631 processing the received signal.</p>
2632 <p>If one of <a class="link" href="GDBusConnection.html#G-DBUS-SIGNAL-FLAGS-MATCH-ARG0-NAMESPACE:CAPS"><code class="literal">G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE</code></a> or
2633 <a class="link" href="GDBusConnection.html#G-DBUS-SIGNAL-FLAGS-MATCH-ARG0-PATH:CAPS"><code class="literal">G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_PATH</code></a> are given, <em class="parameter"><code>arg0</code></em>
2634  is
2635 interpreted as part of a namespace or path.  The first argument
2636 of a signal is matched against that part as specified by D-Bus.</p>
2637 <p>If <em class="parameter"><code>user_data_free_func</code></em>
2638  is non-<a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, it will be called (in the
2639 thread-default main context of the thread you are calling this
2640 method from) at some point after <em class="parameter"><code>user_data</code></em>
2641  is no longer
2642 needed. (It is not guaranteed to be called synchronously when the
2643 signal is unsubscribed from, and may be called after <em class="parameter"><code>connection</code></em>
2644
2645 has been destroyed.)</p>
2646 <div class="refsect3">
2647 <a name="g-dbus-connection-signal-subscribe.parameters"></a><h4>Parameters</h4>
2648 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2649 <colgroup>
2650 <col width="150px" class="parameters_name">
2651 <col class="parameters_description">
2652 <col width="200px" class="parameters_annotations">
2653 </colgroup>
2654 <tbody>
2655 <tr>
2656 <td class="parameter_name"><p>connection</p></td>
2657 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
2658 <td class="parameter_annotations"> </td>
2659 </tr>
2660 <tr>
2661 <td class="parameter_name"><p>sender</p></td>
2662 <td class="parameter_description"><p> sender name to match on (unique or well-known name)
2663 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to listen from all senders. </p></td>
2664 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2665 </tr>
2666 <tr>
2667 <td class="parameter_name"><p>interface_name</p></td>
2668 <td class="parameter_description"><p> D-Bus interface name to match on or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to
2669 match on all interfaces. </p></td>
2670 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2671 </tr>
2672 <tr>
2673 <td class="parameter_name"><p>member</p></td>
2674 <td class="parameter_description"><p> D-Bus signal name to match on or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to match on
2675 all signals. </p></td>
2676 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2677 </tr>
2678 <tr>
2679 <td class="parameter_name"><p>object_path</p></td>
2680 <td class="parameter_description"><p> object path to match on or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to match on
2681 all object paths. </p></td>
2682 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2683 </tr>
2684 <tr>
2685 <td class="parameter_name"><p>arg0</p></td>
2686 <td class="parameter_description"><p> contents of first string argument to match on or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
2687 to match on all kinds of arguments. </p></td>
2688 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2689 </tr>
2690 <tr>
2691 <td class="parameter_name"><p>flags</p></td>
2692 <td class="parameter_description"><p><a class="link" href="GDBusConnection.html#GDBusSignalFlags" title="enum GDBusSignalFlags"><span class="type">GDBusSignalFlags</span></a> describing how arg0 is used in subscribing to the
2693 signal</p></td>
2694 <td class="parameter_annotations"> </td>
2695 </tr>
2696 <tr>
2697 <td class="parameter_name"><p>callback</p></td>
2698 <td class="parameter_description"><p>callback to invoke when there is a signal matching the requested data</p></td>
2699 <td class="parameter_annotations"> </td>
2700 </tr>
2701 <tr>
2702 <td class="parameter_name"><p>user_data</p></td>
2703 <td class="parameter_description"><p>user data to pass to <em class="parameter"><code>callback</code></em>
2704 </p></td>
2705 <td class="parameter_annotations"> </td>
2706 </tr>
2707 <tr>
2708 <td class="parameter_name"><p>user_data_free_func</p></td>
2709 <td class="parameter_description"><p> function to free <em class="parameter"><code>user_data</code></em>
2710 with when
2711 subscription is removed or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2712 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2713 </tr>
2714 </tbody>
2715 </table></div>
2716 </div>
2717 <div class="refsect3">
2718 <a name="g-dbus-connection-signal-subscribe.returns"></a><h4>Returns</h4>
2719 <p> a subscription identifier that can be used with <a class="link" href="GDBusConnection.html#g-dbus-connection-signal-unsubscribe" title="g_dbus_connection_signal_unsubscribe ()"><code class="function">g_dbus_connection_signal_unsubscribe()</code></a></p>
2720 </div>
2721 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
2722 </div>
2723 <hr>
2724 <div class="refsect2">
2725 <a name="g-dbus-connection-signal-unsubscribe"></a><h3>g_dbus_connection_signal_unsubscribe ()</h3>
2726 <pre class="programlisting"><span class="returnvalue">void</span>
2727 g_dbus_connection_signal_unsubscribe (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
2728                                       <em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> subscription_id</code></em>);</pre>
2729 <p>Unsubscribes from signals.</p>
2730 <div class="refsect3">
2731 <a name="g-dbus-connection-signal-unsubscribe.parameters"></a><h4>Parameters</h4>
2732 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2733 <colgroup>
2734 <col width="150px" class="parameters_name">
2735 <col class="parameters_description">
2736 <col width="200px" class="parameters_annotations">
2737 </colgroup>
2738 <tbody>
2739 <tr>
2740 <td class="parameter_name"><p>connection</p></td>
2741 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
2742 <td class="parameter_annotations"> </td>
2743 </tr>
2744 <tr>
2745 <td class="parameter_name"><p>subscription_id</p></td>
2746 <td class="parameter_description"><p>a subscription id obtained from
2747 <a class="link" href="GDBusConnection.html#g-dbus-connection-signal-subscribe" title="g_dbus_connection_signal_subscribe ()"><code class="function">g_dbus_connection_signal_subscribe()</code></a></p></td>
2748 <td class="parameter_annotations"> </td>
2749 </tr>
2750 </tbody>
2751 </table></div>
2752 </div>
2753 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
2754 </div>
2755 <hr>
2756 <div class="refsect2">
2757 <a name="g-dbus-connection-send-message"></a><h3>g_dbus_connection_send_message ()</h3>
2758 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2759 g_dbus_connection_send_message (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
2760                                 <em class="parameter"><code><a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="type">GDBusMessage</span></a> *message</code></em>,
2761                                 <em class="parameter"><code><a class="link" href="GDBusConnection.html#GDBusSendMessageFlags" title="enum GDBusSendMessageFlags"><span class="type">GDBusSendMessageFlags</span></a> flags</code></em>,
2762                                 <em class="parameter"><code>volatile <a href="../glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *out_serial</code></em>,
2763                                 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2764 <p>Asynchronously sends <em class="parameter"><code>message</code></em>
2765  to the peer represented by <em class="parameter"><code>connection</code></em>
2766 .</p>
2767 <p>Unless <em class="parameter"><code>flags</code></em>
2768  contain the
2769 <a class="link" href="GDBusConnection.html#G-DBUS-SEND-MESSAGE-FLAGS-PRESERVE-SERIAL:CAPS"><code class="literal">G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL</code></a> flag, the serial number
2770 will be assigned by <em class="parameter"><code>connection</code></em>
2771  and set on <em class="parameter"><code>message</code></em>
2772  via
2773 <a class="link" href="GDBusMessage.html#g-dbus-message-set-serial" title="g_dbus_message_set_serial ()"><code class="function">g_dbus_message_set_serial()</code></a>. If <em class="parameter"><code>out_serial</code></em>
2774  is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the
2775 serial number used will be written to this location prior to
2776 submitting the message to the underlying transport.</p>
2777 <p>If <em class="parameter"><code>connection</code></em>
2778  is closed then the operation will fail with
2779 <a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a>. If <em class="parameter"><code>message</code></em>
2780  is not well-formed,
2781 the operation fails with <a class="link" href="gio-GIOError.html#G-IO-ERROR-INVALID-ARGUMENT:CAPS"><code class="literal">G_IO_ERROR_INVALID_ARGUMENT</code></a>.</p>
2782 <p>See this <a class="link" href="GDBusConnection.html#gdbus-server" title="An example D-Bus server">server</a> and <a class="link" href="GDBusConnection.html#gdbus-unix-fd-client" title="An example for file descriptor passing">client</a>
2783 for an example of how to use this low-level API to send and receive
2784 UNIX file descriptors.</p>
2785 <p>Note that <em class="parameter"><code>message</code></em>
2786  must be unlocked, unless <em class="parameter"><code>flags</code></em>
2787  contain the
2788 <a class="link" href="GDBusConnection.html#G-DBUS-SEND-MESSAGE-FLAGS-PRESERVE-SERIAL:CAPS"><code class="literal">G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL</code></a> flag.</p>
2789 <div class="refsect3">
2790 <a name="g-dbus-connection-send-message.parameters"></a><h4>Parameters</h4>
2791 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2792 <colgroup>
2793 <col width="150px" class="parameters_name">
2794 <col class="parameters_description">
2795 <col width="200px" class="parameters_annotations">
2796 </colgroup>
2797 <tbody>
2798 <tr>
2799 <td class="parameter_name"><p>connection</p></td>
2800 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
2801 <td class="parameter_annotations"> </td>
2802 </tr>
2803 <tr>
2804 <td class="parameter_name"><p>message</p></td>
2805 <td class="parameter_description"><p>a <a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="type">GDBusMessage</span></a></p></td>
2806 <td class="parameter_annotations"> </td>
2807 </tr>
2808 <tr>
2809 <td class="parameter_name"><p>flags</p></td>
2810 <td class="parameter_description"><p>flags affecting how the message is sent</p></td>
2811 <td class="parameter_annotations"> </td>
2812 </tr>
2813 <tr>
2814 <td class="parameter_name"><p>out_serial</p></td>
2815 <td class="parameter_description"><p> return location for serial number assigned
2816 to <em class="parameter"><code>message</code></em>
2817 when sending it or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2818 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2819 </tr>
2820 <tr>
2821 <td class="parameter_name"><p>error</p></td>
2822 <td class="parameter_description"><p>Return location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2823 <td class="parameter_annotations"> </td>
2824 </tr>
2825 </tbody>
2826 </table></div>
2827 </div>
2828 <div class="refsect3">
2829 <a name="g-dbus-connection-send-message.returns"></a><h4>Returns</h4>
2830 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the message was well-formed and queued for
2831 transmission, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if <em class="parameter"><code>error</code></em>
2832 is set</p>
2833 </div>
2834 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
2835 </div>
2836 <hr>
2837 <div class="refsect2">
2838 <a name="g-dbus-connection-send-message-with-reply"></a><h3>g_dbus_connection_send_message_with_reply ()</h3>
2839 <pre class="programlisting"><span class="returnvalue">void</span>
2840 g_dbus_connection_send_message_with_reply
2841                                (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
2842                                 <em class="parameter"><code><a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="type">GDBusMessage</span></a> *message</code></em>,
2843                                 <em class="parameter"><code><a class="link" href="GDBusConnection.html#GDBusSendMessageFlags" title="enum GDBusSendMessageFlags"><span class="type">GDBusSendMessageFlags</span></a> flags</code></em>,
2844                                 <em class="parameter"><code><a href="../glib-Basic-Types.html#gint"><span class="type">gint</span></a> timeout_msec</code></em>,
2845                                 <em class="parameter"><code>volatile <a href="../glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *out_serial</code></em>,
2846                                 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
2847                                 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
2848                                 <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
2849 <p>Asynchronously sends <em class="parameter"><code>message</code></em>
2850  to the peer represented by <em class="parameter"><code>connection</code></em>
2851 .</p>
2852 <p>Unless <em class="parameter"><code>flags</code></em>
2853  contain the
2854 <a class="link" href="GDBusConnection.html#G-DBUS-SEND-MESSAGE-FLAGS-PRESERVE-SERIAL:CAPS"><code class="literal">G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL</code></a> flag, the serial number
2855 will be assigned by <em class="parameter"><code>connection</code></em>
2856  and set on <em class="parameter"><code>message</code></em>
2857  via
2858 <a class="link" href="GDBusMessage.html#g-dbus-message-set-serial" title="g_dbus_message_set_serial ()"><code class="function">g_dbus_message_set_serial()</code></a>. If <em class="parameter"><code>out_serial</code></em>
2859  is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the
2860 serial number used will be written to this location prior to
2861 submitting the message to the underlying transport.</p>
2862 <p>If <em class="parameter"><code>connection</code></em>
2863  is closed then the operation will fail with
2864 <a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a>. If <em class="parameter"><code>cancellable</code></em>
2865  is canceled, the operation will
2866 fail with <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a>. If <em class="parameter"><code>message</code></em>
2867  is not well-formed,
2868 the operation fails with <a class="link" href="gio-GIOError.html#G-IO-ERROR-INVALID-ARGUMENT:CAPS"><code class="literal">G_IO_ERROR_INVALID_ARGUMENT</code></a>.</p>
2869 <p>This is an asynchronous method. When the operation is finished, <em class="parameter"><code>callback</code></em>
2870
2871 will be invoked in the 
2872 <a href="../glib-The-Main-Event-Loop.html#g-main-context-push-thread-default">thread-default main context</a>
2873 of the thread you are calling this method from. You can then call
2874 <a class="link" href="GDBusConnection.html#g-dbus-connection-send-message-with-reply-finish" title="g_dbus_connection_send_message_with_reply_finish ()"><code class="function">g_dbus_connection_send_message_with_reply_finish()</code></a> to get the result of the operation.
2875 See <a class="link" href="GDBusConnection.html#g-dbus-connection-send-message-with-reply-sync" title="g_dbus_connection_send_message_with_reply_sync ()"><code class="function">g_dbus_connection_send_message_with_reply_sync()</code></a> for the synchronous version.</p>
2876 <p>Note that <em class="parameter"><code>message</code></em>
2877  must be unlocked, unless <em class="parameter"><code>flags</code></em>
2878  contain the
2879 <a class="link" href="GDBusConnection.html#G-DBUS-SEND-MESSAGE-FLAGS-PRESERVE-SERIAL:CAPS"><code class="literal">G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL</code></a> flag.</p>
2880 <p>See this <a class="link" href="GDBusConnection.html#gdbus-server" title="An example D-Bus server">server</a> and <a class="link" href="GDBusConnection.html#gdbus-unix-fd-client" title="An example for file descriptor passing">client</a>
2881 for an example of how to use this low-level API to send and receive
2882 UNIX file descriptors.</p>
2883 <div class="refsect3">
2884 <a name="g-dbus-connection-send-message-with-reply.parameters"></a><h4>Parameters</h4>
2885 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2886 <colgroup>
2887 <col width="150px" class="parameters_name">
2888 <col class="parameters_description">
2889 <col width="200px" class="parameters_annotations">
2890 </colgroup>
2891 <tbody>
2892 <tr>
2893 <td class="parameter_name"><p>connection</p></td>
2894 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
2895 <td class="parameter_annotations"> </td>
2896 </tr>
2897 <tr>
2898 <td class="parameter_name"><p>message</p></td>
2899 <td class="parameter_description"><p>a <a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="type">GDBusMessage</span></a></p></td>
2900 <td class="parameter_annotations"> </td>
2901 </tr>
2902 <tr>
2903 <td class="parameter_name"><p>flags</p></td>
2904 <td class="parameter_description"><p>flags affecting how the message is sent</p></td>
2905 <td class="parameter_annotations"> </td>
2906 </tr>
2907 <tr>
2908 <td class="parameter_name"><p>timeout_msec</p></td>
2909 <td class="parameter_description"><p>the timeout in milliseconds, -1 to use the default
2910 timeout or <a href="../glib-Basic-Types.html#G-MAXINT:CAPS"><code class="literal">G_MAXINT</code></a> for no timeout</p></td>
2911 <td class="parameter_annotations"> </td>
2912 </tr>
2913 <tr>
2914 <td class="parameter_name"><p>out_serial</p></td>
2915 <td class="parameter_description"><p> return location for serial number assigned
2916 to <em class="parameter"><code>message</code></em>
2917 when sending it or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2918 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2919 </tr>
2920 <tr>
2921 <td class="parameter_name"><p>cancellable</p></td>
2922 <td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2923 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2924 </tr>
2925 <tr>
2926 <td class="parameter_name"><p>callback</p></td>
2927 <td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request
2928 is satisfied or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you don't care about the result. </p></td>
2929 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2930 </tr>
2931 <tr>
2932 <td class="parameter_name"><p>user_data</p></td>
2933 <td class="parameter_description"><p>The data to pass to <em class="parameter"><code>callback</code></em>
2934 </p></td>
2935 <td class="parameter_annotations"> </td>
2936 </tr>
2937 </tbody>
2938 </table></div>
2939 </div>
2940 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
2941 </div>
2942 <hr>
2943 <div class="refsect2">
2944 <a name="g-dbus-connection-send-message-with-reply-finish"></a><h3>g_dbus_connection_send_message_with_reply_finish ()</h3>
2945 <pre class="programlisting"><a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="returnvalue">GDBusMessage</span></a> *
2946 g_dbus_connection_send_message_with_reply_finish
2947                                (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
2948                                 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
2949                                 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2950 <p>Finishes an operation started with <a class="link" href="GDBusConnection.html#g-dbus-connection-send-message-with-reply" title="g_dbus_connection_send_message_with_reply ()"><code class="function">g_dbus_connection_send_message_with_reply()</code></a>.</p>
2951 <p>Note that <em class="parameter"><code>error</code></em>
2952  is only set if a local in-process error
2953 occurred. That is to say that the returned <a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="type">GDBusMessage</span></a> object may
2954 be of type <a class="link" href="GDBusMessage.html#G-DBUS-MESSAGE-TYPE-ERROR:CAPS"><code class="literal">G_DBUS_MESSAGE_TYPE_ERROR</code></a>. Use
2955 <a class="link" href="GDBusMessage.html#g-dbus-message-to-gerror" title="g_dbus_message_to_gerror ()"><code class="function">g_dbus_message_to_gerror()</code></a> to transcode this to a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</p>
2956 <p>See this <a class="link" href="GDBusConnection.html#gdbus-server" title="An example D-Bus server">server</a> and <a class="link" href="GDBusConnection.html#gdbus-unix-fd-client" title="An example for file descriptor passing">client</a>
2957 for an example of how to use this low-level API to send and receive
2958 UNIX file descriptors.</p>
2959 <div class="refsect3">
2960 <a name="g-dbus-connection-send-message-with-reply-finish.parameters"></a><h4>Parameters</h4>
2961 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2962 <colgroup>
2963 <col width="150px" class="parameters_name">
2964 <col class="parameters_description">
2965 <col width="200px" class="parameters_annotations">
2966 </colgroup>
2967 <tbody>
2968 <tr>
2969 <td class="parameter_name"><p>connection</p></td>
2970 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
2971 <td class="parameter_annotations"> </td>
2972 </tr>
2973 <tr>
2974 <td class="parameter_name"><p>res</p></td>
2975 <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> obtained from the <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> passed to
2976 <a class="link" href="GDBusConnection.html#g-dbus-connection-send-message-with-reply" title="g_dbus_connection_send_message_with_reply ()"><code class="function">g_dbus_connection_send_message_with_reply()</code></a></p></td>
2977 <td class="parameter_annotations"> </td>
2978 </tr>
2979 <tr>
2980 <td class="parameter_name"><p>error</p></td>
2981 <td class="parameter_description"><p>teturn location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2982 <td class="parameter_annotations"> </td>
2983 </tr>
2984 </tbody>
2985 </table></div>
2986 </div>
2987 <div class="refsect3">
2988 <a name="g-dbus-connection-send-message-with-reply-finish.returns"></a><h4>Returns</h4>
2989 <p> a locked <a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="type">GDBusMessage</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em>
2990 is set. </p>
2991 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
2992 </div>
2993 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
2994 </div>
2995 <hr>
2996 <div class="refsect2">
2997 <a name="g-dbus-connection-send-message-with-reply-sync"></a><h3>g_dbus_connection_send_message_with_reply_sync ()</h3>
2998 <pre class="programlisting"><a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="returnvalue">GDBusMessage</span></a> *
2999 g_dbus_connection_send_message_with_reply_sync
3000                                (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
3001                                 <em class="parameter"><code><a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="type">GDBusMessage</span></a> *message</code></em>,
3002                                 <em class="parameter"><code><a class="link" href="GDBusConnection.html#GDBusSendMessageFlags" title="enum GDBusSendMessageFlags"><span class="type">GDBusSendMessageFlags</span></a> flags</code></em>,
3003                                 <em class="parameter"><code><a href="../glib-Basic-Types.html#gint"><span class="type">gint</span></a> timeout_msec</code></em>,
3004                                 <em class="parameter"><code>volatile <a href="../glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *out_serial</code></em>,
3005                                 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
3006                                 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
3007 <p>Synchronously sends <em class="parameter"><code>message</code></em>
3008  to the peer represented by <em class="parameter"><code>connection</code></em>
3009
3010 and blocks the calling thread until a reply is received or the
3011 timeout is reached. See <a class="link" href="GDBusConnection.html#g-dbus-connection-send-message-with-reply" title="g_dbus_connection_send_message_with_reply ()"><code class="function">g_dbus_connection_send_message_with_reply()</code></a>
3012 for the asynchronous version of this method.</p>
3013 <p>Unless <em class="parameter"><code>flags</code></em>
3014  contain the
3015 <a class="link" href="GDBusConnection.html#G-DBUS-SEND-MESSAGE-FLAGS-PRESERVE-SERIAL:CAPS"><code class="literal">G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL</code></a> flag, the serial number
3016 will be assigned by <em class="parameter"><code>connection</code></em>
3017  and set on <em class="parameter"><code>message</code></em>
3018  via
3019 <a class="link" href="GDBusMessage.html#g-dbus-message-set-serial" title="g_dbus_message_set_serial ()"><code class="function">g_dbus_message_set_serial()</code></a>. If <em class="parameter"><code>out_serial</code></em>
3020  is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the
3021 serial number used will be written to this location prior to
3022 submitting the message to the underlying transport.</p>
3023 <p>If <em class="parameter"><code>connection</code></em>
3024  is closed then the operation will fail with
3025 <a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a>. If <em class="parameter"><code>cancellable</code></em>
3026  is canceled, the operation will
3027 fail with <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a>. If <em class="parameter"><code>message</code></em>
3028  is not well-formed,
3029 the operation fails with <a class="link" href="gio-GIOError.html#G-IO-ERROR-INVALID-ARGUMENT:CAPS"><code class="literal">G_IO_ERROR_INVALID_ARGUMENT</code></a>.</p>
3030 <p>Note that <em class="parameter"><code>error</code></em>
3031  is only set if a local in-process error
3032 occurred. That is to say that the returned <a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="type">GDBusMessage</span></a> object may
3033 be of type <a class="link" href="GDBusMessage.html#G-DBUS-MESSAGE-TYPE-ERROR:CAPS"><code class="literal">G_DBUS_MESSAGE_TYPE_ERROR</code></a>. Use
3034 <a class="link" href="GDBusMessage.html#g-dbus-message-to-gerror" title="g_dbus_message_to_gerror ()"><code class="function">g_dbus_message_to_gerror()</code></a> to transcode this to a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</p>
3035 <p>See this <a class="link" href="GDBusConnection.html#gdbus-server" title="An example D-Bus server">server</a> and <a class="link" href="GDBusConnection.html#gdbus-unix-fd-client" title="An example for file descriptor passing">client</a>
3036 for an example of how to use this low-level API to send and receive
3037 UNIX file descriptors.</p>
3038 <p>Note that <em class="parameter"><code>message</code></em>
3039  must be unlocked, unless <em class="parameter"><code>flags</code></em>
3040  contain the
3041 <a class="link" href="GDBusConnection.html#G-DBUS-SEND-MESSAGE-FLAGS-PRESERVE-SERIAL:CAPS"><code class="literal">G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL</code></a> flag.</p>
3042 <div class="refsect3">
3043 <a name="g-dbus-connection-send-message-with-reply-sync.parameters"></a><h4>Parameters</h4>
3044 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3045 <colgroup>
3046 <col width="150px" class="parameters_name">
3047 <col class="parameters_description">
3048 <col width="200px" class="parameters_annotations">
3049 </colgroup>
3050 <tbody>
3051 <tr>
3052 <td class="parameter_name"><p>connection</p></td>
3053 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
3054 <td class="parameter_annotations"> </td>
3055 </tr>
3056 <tr>
3057 <td class="parameter_name"><p>message</p></td>
3058 <td class="parameter_description"><p>a <a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="type">GDBusMessage</span></a></p></td>
3059 <td class="parameter_annotations"> </td>
3060 </tr>
3061 <tr>
3062 <td class="parameter_name"><p>flags</p></td>
3063 <td class="parameter_description"><p>flags affecting how the message is sent.</p></td>
3064 <td class="parameter_annotations"> </td>
3065 </tr>
3066 <tr>
3067 <td class="parameter_name"><p>timeout_msec</p></td>
3068 <td class="parameter_description"><p>the timeout in milliseconds, -1 to use the default
3069 timeout or <a href="../glib-Basic-Types.html#G-MAXINT:CAPS"><code class="literal">G_MAXINT</code></a> for no timeout</p></td>
3070 <td class="parameter_annotations"> </td>
3071 </tr>
3072 <tr>
3073 <td class="parameter_name"><p>out_serial</p></td>
3074 <td class="parameter_description"><p> return location for serial number
3075 assigned to <em class="parameter"><code>message</code></em>
3076 when sending it or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
3077 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
3078 </tr>
3079 <tr>
3080 <td class="parameter_name"><p>cancellable</p></td>
3081 <td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
3082 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
3083 </tr>
3084 <tr>
3085 <td class="parameter_name"><p>error</p></td>
3086 <td class="parameter_description"><p>return location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
3087 <td class="parameter_annotations"> </td>
3088 </tr>
3089 </tbody>
3090 </table></div>
3091 </div>
3092 <div class="refsect3">
3093 <a name="g-dbus-connection-send-message-with-reply-sync.returns"></a><h4>Returns</h4>
3094 <p> a locked <a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="type">GDBusMessage</span></a> that is the reply
3095 to <em class="parameter"><code>message</code></em>
3096 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em>
3097 is set. </p>
3098 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
3099 </div>
3100 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
3101 </div>
3102 <hr>
3103 <div class="refsect2">
3104 <a name="GDBusMessageFilterFunction"></a><h3>GDBusMessageFilterFunction ()</h3>
3105 <pre class="programlisting"><a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="returnvalue">GDBusMessage</span></a> *
3106 <span class="c_punctuation">(</span>*GDBusMessageFilterFunction<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
3107                                <em class="parameter"><code><a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="type">GDBusMessage</span></a> *message</code></em>,
3108                                <em class="parameter"><code><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> incoming</code></em>,
3109                                <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
3110 <p>Signature for function used in <a class="link" href="GDBusConnection.html#g-dbus-connection-add-filter" title="g_dbus_connection_add_filter ()"><code class="function">g_dbus_connection_add_filter()</code></a>.</p>
3111 <p>A filter function is passed a <a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="type">GDBusMessage</span></a> and expected to return
3112 a <a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="type">GDBusMessage</span></a> too. Passive filter functions that don't modify the
3113 message can simply return the <em class="parameter"><code>message</code></em>
3114  object:</p>
3115 <div class="informalexample">
3116   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
3117     <tbody>
3118       <tr>
3119         <td class="listing_lines" align="right"><pre>1
3120 2
3121 3
3122 4
3123 5
3124 6
3125 7
3126 8
3127 9</pre></td>
3128         <td class="listing_code"><pre class="programlisting"><span class="gtkdoc kwb">static</span> GDBusMessage <span class="gtkdoc opt">*</span>
3129 <span class="function">passive_filter</span> <span class="gtkdoc opt">(</span>GDBusConnection <span class="gtkdoc opt">*</span>connection
3130                 GDBusMessage    <span class="gtkdoc opt">*</span>message<span class="gtkdoc opt">,</span>
3131                 gboolean         incoming<span class="gtkdoc opt">,</span>
3132                 gpointer         user_data<span class="gtkdoc opt">)</span>
3133 <span class="gtkdoc opt">{</span>
3134   <span class="gtkdoc opt">/&lt;!-- --&gt;*</span> inspect &#64;message <span class="gtkdoc opt">*&lt;!-- --&gt;/</span>
3135   <span class="keyword">return</span> message<span class="gtkdoc opt">;</span>
3136 <span class="gtkdoc opt">}</span></pre></td>
3137       </tr>
3138     </tbody>
3139   </table>
3140 </div>
3141
3142 <p>
3143 Filter functions that wants to drop a message can simply return <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>:</p>
3144 <div class="informalexample">
3145   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
3146     <tbody>
3147       <tr>
3148         <td class="listing_lines" align="right"><pre>1
3149 2
3150 3
3151 4
3152 5
3153 6
3154 7
3155 8
3156 9
3157 10
3158 11
3159 12
3160 13</pre></td>
3161         <td class="listing_code"><pre class="programlisting"><span class="gtkdoc kwb">static</span> GDBusMessage <span class="gtkdoc opt">*</span>
3162 <span class="function">drop_filter</span> <span class="gtkdoc opt">(</span>GDBusConnection <span class="gtkdoc opt">*</span>connection
3163              GDBusMessage    <span class="gtkdoc opt">*</span>message<span class="gtkdoc opt">,</span>
3164              gboolean         incoming<span class="gtkdoc opt">,</span>
3165              gpointer         user_data<span class="gtkdoc opt">)</span>
3166 <span class="gtkdoc opt">{</span>
3167   <span class="keyword">if</span> <span class="gtkdoc opt">(</span>should_drop_message<span class="gtkdoc opt">)</span>
3168     <span class="gtkdoc opt">{</span>
3169       <span class="function"><a href="../gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> <span class="gtkdoc opt">(</span>message<span class="gtkdoc opt">);</span>
3170       message <span class="gtkdoc opt">=</span> NULL<span class="gtkdoc opt">;</span>
3171     <span class="gtkdoc opt">}</span>
3172   <span class="keyword">return</span> message<span class="gtkdoc opt">;</span>
3173 <span class="gtkdoc opt">}</span></pre></td>
3174       </tr>
3175     </tbody>
3176   </table>
3177 </div>
3178
3179 <p>
3180 Finally, a filter function may modify a message by copying it:</p>
3181 <div class="informalexample">
3182   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
3183     <tbody>
3184       <tr>
3185         <td class="listing_lines" align="right"><pre>1
3186 2
3187 3
3188 4
3189 5
3190 6
3191 7
3192 8
3193 9
3194 10
3195 11
3196 12
3197 13
3198 14
3199 15
3200 16
3201 17
3202 18</pre></td>
3203         <td class="listing_code"><pre class="programlisting"><span class="gtkdoc kwb">static</span> GDBusMessage <span class="gtkdoc opt">*</span>
3204 <span class="function">modifying_filter</span> <span class="gtkdoc opt">(</span>GDBusConnection <span class="gtkdoc opt">*</span>connection
3205                   GDBusMessage    <span class="gtkdoc opt">*</span>message<span class="gtkdoc opt">,</span>
3206                   gboolean         incoming<span class="gtkdoc opt">,</span>
3207                   gpointer         user_data<span class="gtkdoc opt">)</span>
3208 <span class="gtkdoc opt">{</span>
3209   GDBusMessage <span class="gtkdoc opt">*</span>copy<span class="gtkdoc opt">;</span>
3210   GError <span class="gtkdoc opt">*</span>error<span class="gtkdoc opt">;</span>
3211
3212   error <span class="gtkdoc opt">=</span> NULL<span class="gtkdoc opt">;</span>
3213   copy <span class="gtkdoc opt">=</span> <span class="function"><a href="GDBusMessage.html#g-dbus-message-copy">g_dbus_message_copy</a></span> <span class="gtkdoc opt">(</span>message<span class="gtkdoc opt">, &amp;</span>error<span class="gtkdoc opt">);</span>
3214   <span class="gtkdoc opt">/&lt;!-- --&gt;*</span> handle &#64;error being is set <span class="gtkdoc opt">*&lt;!-- --&gt;/</span>
3215   <span class="function"><a href="../gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> <span class="gtkdoc opt">(</span>message<span class="gtkdoc opt">);</span>
3216
3217   <span class="gtkdoc opt">/&lt;!-- --&gt;*</span> modify &#64;copy <span class="gtkdoc opt">*&lt;!-- --&gt;/</span>
3218
3219   <span class="keyword">return</span> copy<span class="gtkdoc opt">;</span>
3220 <span class="gtkdoc opt">}</span></pre></td>
3221       </tr>
3222     </tbody>
3223   </table>
3224 </div>
3225
3226 <p>
3227 If the returned <a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="type">GDBusMessage</span></a> is different from <em class="parameter"><code>message</code></em>
3228  and cannot
3229 be sent on <em class="parameter"><code>connection</code></em>
3230  (it could use features, such as file
3231 descriptors, not compatible with <em class="parameter"><code>connection</code></em>
3232 ), then a warning is
3233 logged to &lt;emphasis&gt;standard error&lt;/emphasis&gt;. Applications can
3234 check this ahead of time using <a class="link" href="GDBusMessage.html#g-dbus-message-to-blob" title="g_dbus_message_to_blob ()"><code class="function">g_dbus_message_to_blob()</code></a> passing a
3235 <a class="link" href="GDBusConnection.html#GDBusCapabilityFlags" title="enum GDBusCapabilityFlags"><span class="type">GDBusCapabilityFlags</span></a> value obtained from <em class="parameter"><code>connection</code></em>
3236 .</p>
3237 <div class="refsect3">
3238 <a name="GDBusMessageFilterFunction.parameters"></a><h4>Parameters</h4>
3239 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3240 <colgroup>
3241 <col width="150px" class="parameters_name">
3242 <col class="parameters_description">
3243 <col width="200px" class="parameters_annotations">
3244 </colgroup>
3245 <tbody>
3246 <tr>
3247 <td class="parameter_name"><p>connection</p></td>
3248 <td class="parameter_description"><p> A <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a>. </p></td>
3249 <td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td>
3250 </tr>
3251 <tr>
3252 <td class="parameter_name"><p>message</p></td>
3253 <td class="parameter_description"><p> A locked <a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="type">GDBusMessage</span></a> that the filter function takes ownership of. </p></td>
3254 <td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
3255 </tr>
3256 <tr>
3257 <td class="parameter_name"><p>incoming</p></td>
3258 <td class="parameter_description"><p><a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if it is a message received from the other peer, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it is
3259 a message to be sent to the other peer.</p></td>
3260 <td class="parameter_annotations"> </td>
3261 </tr>
3262 <tr>
3263 <td class="parameter_name"><p>user_data</p></td>
3264 <td class="parameter_description"><p>User data passed when adding the filter.</p></td>
3265 <td class="parameter_annotations"> </td>
3266 </tr>
3267 </tbody>
3268 </table></div>
3269 </div>
3270 <div class="refsect3">
3271 <a name="GDBusMessageFilterFunction.returns"></a><h4>Returns</h4>
3272 <p> A <a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="type">GDBusMessage</span></a> that will be freed with
3273 <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to drop the message. Passive filter
3274 functions can simply return the passed <em class="parameter"><code>message</code></em>
3275 object. </p>
3276 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></p>
3277 </div>
3278 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
3279 </div>
3280 <hr>
3281 <div class="refsect2">
3282 <a name="g-dbus-connection-add-filter"></a><h3>g_dbus_connection_add_filter ()</h3>
3283 <pre class="programlisting"><a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
3284 g_dbus_connection_add_filter (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
3285                               <em class="parameter"><code><a class="link" href="GDBusConnection.html#GDBusMessageFilterFunction" title="GDBusMessageFilterFunction ()"><span class="type">GDBusMessageFilterFunction</span></a> filter_function</code></em>,
3286                               <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
3287                               <em class="parameter"><code><a href="../glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> user_data_free_func</code></em>);</pre>
3288 <p>Adds a message filter. Filters are handlers that are run on all
3289 incoming and outgoing messages, prior to standard dispatch. Filters
3290 are run in the order that they were added.  The same handler can be
3291 added as a filter more than once, in which case it will be run more
3292 than once.  Filters added during a filter callback won't be run on
3293 the message being processed. Filter functions are allowed to modify
3294 and even drop messages.</p>
3295 <p>Note that filters are run in a dedicated message handling thread so
3296 they can't block and, generally, can't do anything but signal a
3297 worker thread. Also note that filters are rarely needed - use API
3298 such as <a class="link" href="GDBusConnection.html#g-dbus-connection-send-message-with-reply" title="g_dbus_connection_send_message_with_reply ()"><code class="function">g_dbus_connection_send_message_with_reply()</code></a>,
3299 <a class="link" href="GDBusConnection.html#g-dbus-connection-signal-subscribe" title="g_dbus_connection_signal_subscribe ()"><code class="function">g_dbus_connection_signal_subscribe()</code></a> or <a class="link" href="GDBusConnection.html#g-dbus-connection-call" title="g_dbus_connection_call ()"><code class="function">g_dbus_connection_call()</code></a> instead.</p>
3300 <p>If a filter consumes an incoming message the message is not
3301 dispatched anywhere else - not even the standard dispatch machinery
3302 (that API such as <a class="link" href="GDBusConnection.html#g-dbus-connection-signal-subscribe" title="g_dbus_connection_signal_subscribe ()"><code class="function">g_dbus_connection_signal_subscribe()</code></a> and
3303 <a class="link" href="GDBusConnection.html#g-dbus-connection-send-message-with-reply" title="g_dbus_connection_send_message_with_reply ()"><code class="function">g_dbus_connection_send_message_with_reply()</code></a> relies on) will see the
3304 message. Similary, if a filter consumes an outgoing message, the
3305 message will not be sent to the other peer.</p>
3306 <p>If <em class="parameter"><code>user_data_free_func</code></em>
3307  is non-<a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, it will be called (in the
3308 thread-default main context of the thread you are calling this
3309 method from) at some point after <em class="parameter"><code>user_data</code></em>
3310  is no longer
3311 needed. (It is not guaranteed to be called synchronously when the
3312 filter is removed, and may be called after <em class="parameter"><code>connection</code></em>
3313  has been
3314 destroyed.)</p>
3315 <div class="refsect3">
3316 <a name="g-dbus-connection-add-filter.parameters"></a><h4>Parameters</h4>
3317 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3318 <colgroup>
3319 <col width="150px" class="parameters_name">
3320 <col class="parameters_description">
3321 <col width="200px" class="parameters_annotations">
3322 </colgroup>
3323 <tbody>
3324 <tr>
3325 <td class="parameter_name"><p>connection</p></td>
3326 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
3327 <td class="parameter_annotations"> </td>
3328 </tr>
3329 <tr>
3330 <td class="parameter_name"><p>filter_function</p></td>
3331 <td class="parameter_description"><p>a filter function</p></td>
3332 <td class="parameter_annotations"> </td>
3333 </tr>
3334 <tr>
3335 <td class="parameter_name"><p>user_data</p></td>
3336 <td class="parameter_description"><p>user data to pass to <em class="parameter"><code>filter_function</code></em>
3337 </p></td>
3338 <td class="parameter_annotations"> </td>
3339 </tr>
3340 <tr>
3341 <td class="parameter_name"><p>user_data_free_func</p></td>
3342 <td class="parameter_description"><p>function to free <em class="parameter"><code>user_data</code></em>
3343 with when filter
3344 is removed or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
3345 <td class="parameter_annotations"> </td>
3346 </tr>
3347 </tbody>
3348 </table></div>
3349 </div>
3350 <div class="refsect3">
3351 <a name="g-dbus-connection-add-filter.returns"></a><h4>Returns</h4>
3352 <p> a filter identifier that can be used with
3353 <a class="link" href="GDBusConnection.html#g-dbus-connection-remove-filter" title="g_dbus_connection_remove_filter ()"><code class="function">g_dbus_connection_remove_filter()</code></a></p>
3354 </div>
3355 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
3356 </div>
3357 <hr>
3358 <div class="refsect2">
3359 <a name="g-dbus-connection-remove-filter"></a><h3>g_dbus_connection_remove_filter ()</h3>
3360 <pre class="programlisting"><span class="returnvalue">void</span>
3361 g_dbus_connection_remove_filter (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
3362                                  <em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> filter_id</code></em>);</pre>
3363 <p>Removes a filter.</p>
3364 <p>Note that since filters run in a different thread, there is a race
3365 condition where it is possible that the filter will be running even
3366 after calling <a class="link" href="GDBusConnection.html#g-dbus-connection-remove-filter" title="g_dbus_connection_remove_filter ()"><code class="function">g_dbus_connection_remove_filter()</code></a>, so you cannot just
3367 free data that the filter might be using. Instead, you should pass
3368 a <a href="../glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> to <a class="link" href="GDBusConnection.html#g-dbus-connection-add-filter" title="g_dbus_connection_add_filter ()"><code class="function">g_dbus_connection_add_filter()</code></a>, which will be
3369 called when it is guaranteed that the data is no longer needed.</p>
3370 <div class="refsect3">
3371 <a name="g-dbus-connection-remove-filter.parameters"></a><h4>Parameters</h4>
3372 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3373 <colgroup>
3374 <col width="150px" class="parameters_name">
3375 <col class="parameters_description">
3376 <col width="200px" class="parameters_annotations">
3377 </colgroup>
3378 <tbody>
3379 <tr>
3380 <td class="parameter_name"><p>connection</p></td>
3381 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
3382 <td class="parameter_annotations"> </td>
3383 </tr>
3384 <tr>
3385 <td class="parameter_name"><p>filter_id</p></td>
3386 <td class="parameter_description"><p>an identifier obtained from <a class="link" href="GDBusConnection.html#g-dbus-connection-add-filter" title="g_dbus_connection_add_filter ()"><code class="function">g_dbus_connection_add_filter()</code></a></p></td>
3387 <td class="parameter_annotations"> </td>
3388 </tr>
3389 </tbody>
3390 </table></div>
3391 </div>
3392 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
3393 </div>
3394 <hr>
3395 <div class="refsect2">
3396 <a name="GDBusInterfaceMethodCallFunc"></a><h3>GDBusInterfaceMethodCallFunc ()</h3>
3397 <pre class="programlisting"><span class="returnvalue">void</span>
3398 <span class="c_punctuation">(</span>*GDBusInterfaceMethodCallFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
3399                                  <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
3400                                  <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
3401                                  <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
3402                                  <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *method_name</code></em>,
3403                                  <em class="parameter"><code><a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameters</code></em>,
3404                                  <em class="parameter"><code><a class="link" href="GDBusMethodInvocation.html" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>,
3405                                  <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
3406 <p>The type of the <em class="parameter"><code>method_call</code></em>
3407  function in <a class="link" href="GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="type">GDBusInterfaceVTable</span></a>.</p>
3408 <div class="refsect3">
3409 <a name="GDBusInterfaceMethodCallFunc.parameters"></a><h4>Parameters</h4>
3410 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3411 <colgroup>
3412 <col width="150px" class="parameters_name">
3413 <col class="parameters_description">
3414 <col width="200px" class="parameters_annotations">
3415 </colgroup>
3416 <tbody>
3417 <tr>
3418 <td class="parameter_name"><p>connection</p></td>
3419 <td class="parameter_description"><p>A <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</p></td>
3420 <td class="parameter_annotations"> </td>
3421 </tr>
3422 <tr>
3423 <td class="parameter_name"><p>sender</p></td>
3424 <td class="parameter_description"><p>The unique bus name of the remote caller.</p></td>
3425 <td class="parameter_annotations"> </td>
3426 </tr>
3427 <tr>
3428 <td class="parameter_name"><p>object_path</p></td>
3429 <td class="parameter_description"><p>The object path that the method was invoked on.</p></td>
3430 <td class="parameter_annotations"> </td>
3431 </tr>
3432 <tr>
3433 <td class="parameter_name"><p>interface_name</p></td>
3434 <td class="parameter_description"><p>The D-Bus interface name the method was invoked on.</p></td>
3435 <td class="parameter_annotations"> </td>
3436 </tr>
3437 <tr>
3438 <td class="parameter_name"><p>method_name</p></td>
3439 <td class="parameter_description"><p>The name of the method that was invoked.</p></td>
3440 <td class="parameter_annotations"> </td>
3441 </tr>
3442 <tr>
3443 <td class="parameter_name"><p>parameters</p></td>
3444 <td class="parameter_description"><p>A <a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple with parameters.</p></td>
3445 <td class="parameter_annotations"> </td>
3446 </tr>
3447 <tr>
3448 <td class="parameter_name"><p>invocation</p></td>
3449 <td class="parameter_description"><p> A <a class="link" href="GDBusMethodInvocation.html" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> object that must be used to return a value or error. </p></td>
3450 <td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
3451 </tr>
3452 <tr>
3453 <td class="parameter_name"><p>user_data</p></td>
3454 <td class="parameter_description"><p>The <em class="parameter"><code>user_data</code></em>
3455 <a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> passed to <a class="link" href="GDBusConnection.html#g-dbus-connection-register-object" title="g_dbus_connection_register_object ()"><code class="function">g_dbus_connection_register_object()</code></a>.</p></td>
3456 <td class="parameter_annotations"> </td>
3457 </tr>
3458 </tbody>
3459 </table></div>
3460 </div>
3461 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
3462 </div>
3463 <hr>
3464 <div class="refsect2">
3465 <a name="GDBusInterfaceGetPropertyFunc"></a><h3>GDBusInterfaceGetPropertyFunc ()</h3>
3466 <pre class="programlisting"><a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
3467 <span class="c_punctuation">(</span>*GDBusInterfaceGetPropertyFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
3468                                   <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
3469                                   <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
3470                                   <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
3471                                   <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>,
3472                                   <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>,
3473                                   <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
3474 <p>The type of the <em class="parameter"><code>get_property</code></em>
3475  function in <a class="link" href="GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="type">GDBusInterfaceVTable</span></a>.</p>
3476 <div class="refsect3">
3477 <a name="GDBusInterfaceGetPropertyFunc.parameters"></a><h4>Parameters</h4>
3478 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3479 <colgroup>
3480 <col width="150px" class="parameters_name">
3481 <col class="parameters_description">
3482 <col width="200px" class="parameters_annotations">
3483 </colgroup>
3484 <tbody>
3485 <tr>
3486 <td class="parameter_name"><p>connection</p></td>
3487 <td class="parameter_description"><p>A <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</p></td>
3488 <td class="parameter_annotations"> </td>
3489 </tr>
3490 <tr>
3491 <td class="parameter_name"><p>sender</p></td>
3492 <td class="parameter_description"><p>The unique bus name of the remote caller.</p></td>
3493 <td class="parameter_annotations"> </td>
3494 </tr>
3495 <tr>
3496 <td class="parameter_name"><p>object_path</p></td>
3497 <td class="parameter_description"><p>The object path that the method was invoked on.</p></td>
3498 <td class="parameter_annotations"> </td>
3499 </tr>
3500 <tr>
3501 <td class="parameter_name"><p>interface_name</p></td>
3502 <td class="parameter_description"><p>The D-Bus interface name for the property.</p></td>
3503 <td class="parameter_annotations"> </td>
3504 </tr>
3505 <tr>
3506 <td class="parameter_name"><p>property_name</p></td>
3507 <td class="parameter_description"><p>The name of the property to get the value of.</p></td>
3508 <td class="parameter_annotations"> </td>
3509 </tr>
3510 <tr>
3511 <td class="parameter_name"><p>error</p></td>
3512 <td class="parameter_description"><p>Return location for error.</p></td>
3513 <td class="parameter_annotations"> </td>
3514 </tr>
3515 <tr>
3516 <td class="parameter_name"><p>user_data</p></td>
3517 <td class="parameter_description"><p>The <em class="parameter"><code>user_data</code></em>
3518 <a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> passed to <a class="link" href="GDBusConnection.html#g-dbus-connection-register-object" title="g_dbus_connection_register_object ()"><code class="function">g_dbus_connection_register_object()</code></a>.</p></td>
3519 <td class="parameter_annotations"> </td>
3520 </tr>
3521 </tbody>
3522 </table></div>
3523 </div>
3524 <div class="refsect3">
3525 <a name="GDBusInterfaceGetPropertyFunc.returns"></a><h4>Returns</h4>
3526 <p> A <a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> with the value for <em class="parameter"><code>property_name</code></em>
3527 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
3528 <em class="parameter"><code>error</code></em>
3529 is set. If the returned <a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> is floating, it is
3530 consumed - otherwise its reference count is decreased by one.</p>
3531 </div>
3532 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
3533 </div>
3534 <hr>
3535 <div class="refsect2">
3536 <a name="GDBusInterfaceSetPropertyFunc"></a><h3>GDBusInterfaceSetPropertyFunc ()</h3>
3537 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
3538 <span class="c_punctuation">(</span>*GDBusInterfaceSetPropertyFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
3539                                   <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
3540                                   <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
3541                                   <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
3542                                   <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>,
3543                                   <em class="parameter"><code><a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>,
3544                                   <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>,
3545                                   <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
3546 <p>The type of the <em class="parameter"><code>set_property</code></em>
3547  function in <a class="link" href="GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="type">GDBusInterfaceVTable</span></a>.</p>
3548 <div class="refsect3">
3549 <a name="GDBusInterfaceSetPropertyFunc.parameters"></a><h4>Parameters</h4>
3550 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3551 <colgroup>
3552 <col width="150px" class="parameters_name">
3553 <col class="parameters_description">
3554 <col width="200px" class="parameters_annotations">
3555 </colgroup>
3556 <tbody>
3557 <tr>
3558 <td class="parameter_name"><p>connection</p></td>
3559 <td class="parameter_description"><p>A <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</p></td>
3560 <td class="parameter_annotations"> </td>
3561 </tr>
3562 <tr>
3563 <td class="parameter_name"><p>sender</p></td>
3564 <td class="parameter_description"><p>The unique bus name of the remote caller.</p></td>
3565 <td class="parameter_annotations"> </td>
3566 </tr>
3567 <tr>
3568 <td class="parameter_name"><p>object_path</p></td>
3569 <td class="parameter_description"><p>The object path that the method was invoked on.</p></td>
3570 <td class="parameter_annotations"> </td>
3571 </tr>
3572 <tr>
3573 <td class="parameter_name"><p>interface_name</p></td>
3574 <td class="parameter_description"><p>The D-Bus interface name for the property.</p></td>
3575 <td class="parameter_annotations"> </td>
3576 </tr>
3577 <tr>
3578 <td class="parameter_name"><p>property_name</p></td>
3579 <td class="parameter_description"><p>The name of the property to get the value of.</p></td>
3580 <td class="parameter_annotations"> </td>
3581 </tr>
3582 <tr>
3583 <td class="parameter_name"><p>value</p></td>
3584 <td class="parameter_description"><p>The value to set the property to.</p></td>
3585 <td class="parameter_annotations"> </td>
3586 </tr>
3587 <tr>
3588 <td class="parameter_name"><p>error</p></td>
3589 <td class="parameter_description"><p>Return location for error.</p></td>
3590 <td class="parameter_annotations"> </td>
3591 </tr>
3592 <tr>
3593 <td class="parameter_name"><p>user_data</p></td>
3594 <td class="parameter_description"><p>The <em class="parameter"><code>user_data</code></em>
3595 <a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> passed to <a class="link" href="GDBusConnection.html#g-dbus-connection-register-object" title="g_dbus_connection_register_object ()"><code class="function">g_dbus_connection_register_object()</code></a>.</p></td>
3596 <td class="parameter_annotations"> </td>
3597 </tr>
3598 </tbody>
3599 </table></div>
3600 </div>
3601 <div class="refsect3">
3602 <a name="GDBusInterfaceSetPropertyFunc.returns"></a><h4>Returns</h4>
3603 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the property was set to <em class="parameter"><code>value</code></em>
3604 , <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if <em class="parameter"><code>error</code></em>
3605 is set.</p>
3606 </div>
3607 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
3608 </div>
3609 <hr>
3610 <div class="refsect2">
3611 <a name="g-dbus-connection-register-object"></a><h3>g_dbus_connection_register_object ()</h3>
3612 <pre class="programlisting"><a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
3613 g_dbus_connection_register_object (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
3614                                    <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
3615                                    <em class="parameter"><code><a class="link" href="gio-D-Bus-Introspection-Data.html#GDBusInterfaceInfo"><span class="type">GDBusInterfaceInfo</span></a> *interface_info</code></em>,
3616                                    <em class="parameter"><code>const <a class="link" href="GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="type">GDBusInterfaceVTable</span></a> *vtable</code></em>,
3617                                    <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
3618                                    <em class="parameter"><code><a href="../glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> user_data_free_func</code></em>,
3619                                    <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
3620 <p>Registers callbacks for exported objects at <em class="parameter"><code>object_path</code></em>
3621  with the
3622 D-Bus interface that is described in <em class="parameter"><code>interface_info</code></em>
3623 .</p>
3624 <p>Calls to functions in <em class="parameter"><code>vtable</code></em>
3625  (and <em class="parameter"><code>user_data_free_func</code></em>
3626 ) will happen
3627 in the 
3628 <a href="../glib-The-Main-Event-Loop.html#g-main-context-push-thread-default">thread-default main context</a>
3629 of the thread you are calling this method from.</p>
3630 <p>Note that all <a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> values passed to functions in <em class="parameter"><code>vtable</code></em>
3631  will match
3632 the signature given in <em class="parameter"><code>interface_info</code></em>
3633  - if a remote caller passes
3634 incorrect values, the <code class="literal">org.freedesktop.DBus.Error.InvalidArgs</code>
3635 is returned to the remote caller.</p>
3636 <p>Additionally, if the remote caller attempts to invoke methods or
3637 access properties not mentioned in <em class="parameter"><code>interface_info</code></em>
3638  the
3639 <code class="literal">org.freedesktop.DBus.Error.UnknownMethod</code> resp.
3640 <code class="literal">org.freedesktop.DBus.Error.InvalidArgs</code> errors
3641 are returned to the caller.</p>
3642 <p>It is considered a programming error if the
3643 <a class="link" href="GDBusConnection.html#GDBusInterfaceGetPropertyFunc" title="GDBusInterfaceGetPropertyFunc ()"><span class="type">GDBusInterfaceGetPropertyFunc</span></a> function in <em class="parameter"><code>vtable</code></em>
3644  returns a
3645 <a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of incorrect type.</p>
3646 <p>If an existing callback is already registered at <em class="parameter"><code>object_path</code></em>
3647  and
3648 <em class="parameter"><code>interface_name</code></em>
3649 , then <em class="parameter"><code>error</code></em>
3650  is set to <a class="link" href="gio-GIOError.html#G-IO-ERROR-EXISTS:CAPS"><span class="type">G_IO_ERROR_EXISTS</span></a>.</p>
3651 <p>GDBus automatically implements the standard D-Bus interfaces
3652 org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable
3653 and org.freedesktop.Peer, so you don't have to implement those for the
3654 objects you export. You can implement org.freedesktop.DBus.Properties
3655 yourself, e.g. to handle getting and setting of properties asynchronously.</p>
3656 <p>Note that the reference count on <em class="parameter"><code>interface_info</code></em>
3657  will be
3658 incremented by 1 (unless allocated statically, e.g. if the
3659 reference count is -1, see <a class="link" href="gio-D-Bus-Introspection-Data.html#g-dbus-interface-info-ref" title="g_dbus_interface_info_ref ()"><code class="function">g_dbus_interface_info_ref()</code></a>) for as long
3660 as the object is exported. Also note that <em class="parameter"><code>vtable</code></em>
3661  will be copied.</p>
3662 <p>See this <a class="link" href="GDBusConnection.html#gdbus-server" title="An example D-Bus server">server</a> for an example of how to use this method.</p>
3663 <div class="refsect3">
3664 <a name="g-dbus-connection-register-object.parameters"></a><h4>Parameters</h4>
3665 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3666 <colgroup>
3667 <col width="150px" class="parameters_name">
3668 <col class="parameters_description">
3669 <col width="200px" class="parameters_annotations">
3670 </colgroup>
3671 <tbody>
3672 <tr>
3673 <td class="parameter_name"><p>connection</p></td>
3674 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
3675 <td class="parameter_annotations"> </td>
3676 </tr>
3677 <tr>
3678 <td class="parameter_name"><p>object_path</p></td>
3679 <td class="parameter_description"><p>the object path to register at</p></td>
3680 <td class="parameter_annotations"> </td>
3681 </tr>
3682 <tr>
3683 <td class="parameter_name"><p>interface_info</p></td>
3684 <td class="parameter_description"><p>introspection data for the interface</p></td>
3685 <td class="parameter_annotations"> </td>
3686 </tr>
3687 <tr>
3688 <td class="parameter_name"><p>vtable</p></td>
3689 <td class="parameter_description"><p> a <a class="link" href="GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="type">GDBusInterfaceVTable</span></a> to call into or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
3690 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
3691 </tr>
3692 <tr>
3693 <td class="parameter_name"><p>user_data</p></td>
3694 <td class="parameter_description"><p> data to pass to functions in <em class="parameter"><code>vtable</code></em>
3695 . </p></td>
3696 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
3697 </tr>
3698 <tr>
3699 <td class="parameter_name"><p>user_data_free_func</p></td>
3700 <td class="parameter_description"><p>function to call when the object path is unregistered</p></td>
3701 <td class="parameter_annotations"> </td>
3702 </tr>
3703 <tr>
3704 <td class="parameter_name"><p>error</p></td>
3705 <td class="parameter_description"><p>return location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
3706 <td class="parameter_annotations"> </td>
3707 </tr>
3708 </tbody>
3709 </table></div>
3710 </div>
3711 <div class="refsect3">
3712 <a name="g-dbus-connection-register-object.returns"></a><h4>Returns</h4>
3713 <p> 0 if <em class="parameter"><code>error</code></em>
3714 is set, otherwise a registration id (never 0)
3715 that can be used with <a class="link" href="GDBusConnection.html#g-dbus-connection-unregister-object" title="g_dbus_connection_unregister_object ()"><code class="function">g_dbus_connection_unregister_object()</code></a></p>
3716 </div>
3717 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
3718 </div>
3719 <hr>
3720 <div class="refsect2">
3721 <a name="g-dbus-connection-unregister-object"></a><h3>g_dbus_connection_unregister_object ()</h3>
3722 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
3723 g_dbus_connection_unregister_object (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
3724                                      <em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> registration_id</code></em>);</pre>
3725 <p>Unregisters an object.</p>
3726 <div class="refsect3">
3727 <a name="g-dbus-connection-unregister-object.parameters"></a><h4>Parameters</h4>
3728 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3729 <colgroup>
3730 <col width="150px" class="parameters_name">
3731 <col class="parameters_description">
3732 <col width="200px" class="parameters_annotations">
3733 </colgroup>
3734 <tbody>
3735 <tr>
3736 <td class="parameter_name"><p>connection</p></td>
3737 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
3738 <td class="parameter_annotations"> </td>
3739 </tr>
3740 <tr>
3741 <td class="parameter_name"><p>registration_id</p></td>
3742 <td class="parameter_description"><p>a registration id obtained from
3743 <a class="link" href="GDBusConnection.html#g-dbus-connection-register-object" title="g_dbus_connection_register_object ()"><code class="function">g_dbus_connection_register_object()</code></a></p></td>
3744 <td class="parameter_annotations"> </td>
3745 </tr>
3746 </tbody>
3747 </table></div>
3748 </div>
3749 <div class="refsect3">
3750 <a name="g-dbus-connection-unregister-object.returns"></a><h4>Returns</h4>
3751 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the object was unregistered, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
3752 </div>
3753 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
3754 </div>
3755 <hr>
3756 <div class="refsect2">
3757 <a name="g-dbus-connection-register-object-with-closures"></a><h3>g_dbus_connection_register_object_with_closures ()</h3>
3758 <pre class="programlisting"><a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
3759 g_dbus_connection_register_object_with_closures
3760                                (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
3761                                 <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
3762                                 <em class="parameter"><code><a class="link" href="gio-D-Bus-Introspection-Data.html#GDBusInterfaceInfo"><span class="type">GDBusInterfaceInfo</span></a> *interface_info</code></em>,
3763                                 <em class="parameter"><code><a href="../gobject-Closures.html#GClosure"><span class="type">GClosure</span></a> *method_call_closure</code></em>,
3764                                 <em class="parameter"><code><a href="../gobject-Closures.html#GClosure"><span class="type">GClosure</span></a> *get_property_closure</code></em>,
3765                                 <em class="parameter"><code><a href="../gobject-Closures.html#GClosure"><span class="type">GClosure</span></a> *set_property_closure</code></em>,
3766                                 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
3767 <p>Version of <a class="link" href="GDBusConnection.html#g-dbus-connection-register-object" title="g_dbus_connection_register_object ()"><code class="function">g_dbus_connection_register_object()</code></a> using closures instead of a
3768 <a class="link" href="GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="type">GDBusInterfaceVTable</span></a> for easier binding in other languages.</p>
3769 <p><span class="annotation">[<acronym title="Rename the original symbol's name to SYMBOL."><span class="acronym">rename-to</span></acronym> g_dbus_connection_register_object]</span></p>
3770 <div class="refsect3">
3771 <a name="g-dbus-connection-register-object-with-closures.parameters"></a><h4>Parameters</h4>
3772 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3773 <colgroup>
3774 <col width="150px" class="parameters_name">
3775 <col class="parameters_description">
3776 <col width="200px" class="parameters_annotations">
3777 </colgroup>
3778 <tbody>
3779 <tr>
3780 <td class="parameter_name"><p>connection</p></td>
3781 <td class="parameter_description"><p>A <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</p></td>
3782 <td class="parameter_annotations"> </td>
3783 </tr>
3784 <tr>
3785 <td class="parameter_name"><p>object_path</p></td>
3786 <td class="parameter_description"><p>The object path to register at.</p></td>
3787 <td class="parameter_annotations"> </td>
3788 </tr>
3789 <tr>
3790 <td class="parameter_name"><p>interface_info</p></td>
3791 <td class="parameter_description"><p>Introspection data for the interface.</p></td>
3792 <td class="parameter_annotations"> </td>
3793 </tr>
3794 <tr>
3795 <td class="parameter_name"><p>method_call_closure</p></td>
3796 <td class="parameter_description"><p> <a href="../gobject-Closures.html#GClosure"><span class="type">GClosure</span></a> for handling incoming method calls. </p></td>
3797 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3798 </tr>
3799 <tr>
3800 <td class="parameter_name"><p>get_property_closure</p></td>
3801 <td class="parameter_description"><p> <a href="../gobject-Closures.html#GClosure"><span class="type">GClosure</span></a> for getting a property. </p></td>
3802 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3803 </tr>
3804 <tr>
3805 <td class="parameter_name"><p>set_property_closure</p></td>
3806 <td class="parameter_description"><p> <a href="../gobject-Closures.html#GClosure"><span class="type">GClosure</span></a> for setting a property. </p></td>
3807 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3808 </tr>
3809 <tr>
3810 <td class="parameter_name"><p>error</p></td>
3811 <td class="parameter_description"><p>Return location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
3812 <td class="parameter_annotations"> </td>
3813 </tr>
3814 </tbody>
3815 </table></div>
3816 </div>
3817 <div class="refsect3">
3818 <a name="g-dbus-connection-register-object-with-closures.returns"></a><h4>Returns</h4>
3819 <p> 0 if <em class="parameter"><code>error</code></em>
3820 is set, otherwise a registration id (never 0)
3821 that can be used with <a class="link" href="GDBusConnection.html#g-dbus-connection-unregister-object" title="g_dbus_connection_unregister_object ()"><code class="function">g_dbus_connection_unregister_object()</code></a> .</p>
3822 </div>
3823 <p class="since">Since: <a class="link" href="api-index-2-46.html#api-index-2.46">2.46</a></p>
3824 </div>
3825 <hr>
3826 <div class="refsect2">
3827 <a name="GDBusSubtreeEnumerateFunc"></a><h3>GDBusSubtreeEnumerateFunc ()</h3>
3828 <pre class="programlisting"><a href="../glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **
3829 <span class="c_punctuation">(</span>*GDBusSubtreeEnumerateFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
3830                               <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
3831                               <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
3832                               <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
3833 <p>The type of the <em class="parameter"><code>enumerate</code></em>
3834  function in <a class="link" href="GDBusConnection.html#GDBusSubtreeVTable" title="GDBusSubtreeVTable"><span class="type">GDBusSubtreeVTable</span></a>.</p>
3835 <p>This function is called when generating introspection data and also
3836 when preparing to dispatch incoming messages in the event that the
3837 <a class="link" href="GDBusConnection.html#G-DBUS-SUBTREE-FLAGS-DISPATCH-TO-UNENUMERATED-NODES:CAPS"><code class="literal">G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES</code></a> flag is not
3838 specified (ie: to verify that the object path is valid).</p>
3839 <p>Hierarchies are not supported; the items that you return should not
3840 contain the '/' character.</p>
3841 <p>The return value will be freed with <a href="../glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a>.</p>
3842 <div class="refsect3">
3843 <a name="GDBusSubtreeEnumerateFunc.parameters"></a><h4>Parameters</h4>
3844 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3845 <colgroup>
3846 <col width="150px" class="parameters_name">
3847 <col class="parameters_description">
3848 <col width="200px" class="parameters_annotations">
3849 </colgroup>
3850 <tbody>
3851 <tr>
3852 <td class="parameter_name"><p>connection</p></td>
3853 <td class="parameter_description"><p>A <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</p></td>
3854 <td class="parameter_annotations"> </td>
3855 </tr>
3856 <tr>
3857 <td class="parameter_name"><p>sender</p></td>
3858 <td class="parameter_description"><p>The unique bus name of the remote caller.</p></td>
3859 <td class="parameter_annotations"> </td>
3860 </tr>
3861 <tr>
3862 <td class="parameter_name"><p>object_path</p></td>
3863 <td class="parameter_description"><p>The object path that was registered with <a class="link" href="GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()"><code class="function">g_dbus_connection_register_subtree()</code></a>.</p></td>
3864 <td class="parameter_annotations"> </td>
3865 </tr>
3866 <tr>
3867 <td class="parameter_name"><p>user_data</p></td>
3868 <td class="parameter_description"><p>The <em class="parameter"><code>user_data</code></em>
3869 <a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> passed to <a class="link" href="GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()"><code class="function">g_dbus_connection_register_subtree()</code></a>.</p></td>
3870 <td class="parameter_annotations"> </td>
3871 </tr>
3872 </tbody>
3873 </table></div>
3874 </div>
3875 <div class="refsect3">
3876 <a name="GDBusSubtreeEnumerateFunc.returns"></a><h4>Returns</h4>
3877 <p> A newly allocated array of strings for node names that are children of <em class="parameter"><code>object_path</code></em>
3878 .</p>
3879 </div>
3880 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
3881 </div>
3882 <hr>
3883 <div class="refsect2">
3884 <a name="GDBusSubtreeIntrospectFunc"></a><h3>GDBusSubtreeIntrospectFunc ()</h3>
3885 <pre class="programlisting"><a class="link" href="gio-D-Bus-Introspection-Data.html#GDBusInterfaceInfo"><span class="returnvalue">GDBusInterfaceInfo</span></a> **
3886 <span class="c_punctuation">(</span>*GDBusSubtreeIntrospectFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
3887                                <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
3888                                <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
3889                                <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *node</code></em>,
3890                                <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
3891 <p>The type of the <em class="parameter"><code>introspect</code></em>
3892  function in <a class="link" href="GDBusConnection.html#GDBusSubtreeVTable" title="GDBusSubtreeVTable"><span class="type">GDBusSubtreeVTable</span></a>.</p>
3893 <p>Subtrees are flat.  <em class="parameter"><code>node</code></em>
3894 , if non-<a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, is always exactly one
3895 segment of the object path (ie: it never contains a slash).</p>
3896 <p>This function should return <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to indicate that there is no object
3897 at this node.</p>
3898 <p>If this function returns non-<a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the return value is expected to
3899 be a <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of pointers to <a class="link" href="gio-D-Bus-Introspection-Data.html#GDBusInterfaceInfo"><span class="type">GDBusInterfaceInfo</span></a>
3900 structures describing the interfaces implemented by <em class="parameter"><code>node</code></em>
3901 .  This
3902 array will have <a class="link" href="gio-D-Bus-Introspection-Data.html#g-dbus-interface-info-unref" title="g_dbus_interface_info_unref ()"><code class="function">g_dbus_interface_info_unref()</code></a> called on each item
3903 before being freed with <a href="../glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</p>
3904 <p>The difference between returning <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> and an array containing zero
3905 items is that the standard DBus interfaces will returned to the
3906 remote introspector in the empty array case, but not in the <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
3907 case.</p>
3908 <div class="refsect3">
3909 <a name="GDBusSubtreeIntrospectFunc.parameters"></a><h4>Parameters</h4>
3910 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3911 <colgroup>
3912 <col width="150px" class="parameters_name">
3913 <col class="parameters_description">
3914 <col width="200px" class="parameters_annotations">
3915 </colgroup>
3916 <tbody>
3917 <tr>
3918 <td class="parameter_name"><p>connection</p></td>
3919 <td class="parameter_description"><p>A <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</p></td>
3920 <td class="parameter_annotations"> </td>
3921 </tr>
3922 <tr>
3923 <td class="parameter_name"><p>sender</p></td>
3924 <td class="parameter_description"><p>The unique bus name of the remote caller.</p></td>
3925 <td class="parameter_annotations"> </td>
3926 </tr>
3927 <tr>
3928 <td class="parameter_name"><p>object_path</p></td>
3929 <td class="parameter_description"><p>The object path that was registered with <a class="link" href="GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()"><code class="function">g_dbus_connection_register_subtree()</code></a>.</p></td>
3930 <td class="parameter_annotations"> </td>
3931 </tr>
3932 <tr>
3933 <td class="parameter_name"><p>node</p></td>
3934 <td class="parameter_description"><p>A node that is a child of <em class="parameter"><code>object_path</code></em>
3935 (relative to <em class="parameter"><code>object_path</code></em>
3936 ) or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for the root of the subtree.</p></td>
3937 <td class="parameter_annotations"> </td>
3938 </tr>
3939 <tr>
3940 <td class="parameter_name"><p>user_data</p></td>
3941 <td class="parameter_description"><p>The <em class="parameter"><code>user_data</code></em>
3942 <a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> passed to <a class="link" href="GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()"><code class="function">g_dbus_connection_register_subtree()</code></a>.</p></td>
3943 <td class="parameter_annotations"> </td>
3944 </tr>
3945 </tbody>
3946 </table></div>
3947 </div>
3948 <div class="refsect3">
3949 <a name="GDBusSubtreeIntrospectFunc.returns"></a><h4>Returns</h4>
3950 <p> A <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of pointers to <a class="link" href="gio-D-Bus-Introspection-Data.html#GDBusInterfaceInfo"><span class="type">GDBusInterfaceInfo</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
3951 </div>
3952 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
3953 </div>
3954 <hr>
3955 <div class="refsect2">
3956 <a name="GDBusSubtreeDispatchFunc"></a><h3>GDBusSubtreeDispatchFunc ()</h3>
3957 <pre class="programlisting">const <a class="link" href="GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="returnvalue">GDBusInterfaceVTable</span></a> *
3958 <span class="c_punctuation">(</span>*GDBusSubtreeDispatchFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
3959                              <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sender</code></em>,
3960                              <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
3961                              <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
3962                              <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *node</code></em>,
3963                              <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> *out_user_data</code></em>,
3964                              <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
3965 <p>The type of the <em class="parameter"><code>dispatch</code></em>
3966  function in <a class="link" href="GDBusConnection.html#GDBusSubtreeVTable" title="GDBusSubtreeVTable"><span class="type">GDBusSubtreeVTable</span></a>.</p>
3967 <p>Subtrees are flat.  <em class="parameter"><code>node</code></em>
3968 , if non-<a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, is always exactly one
3969 segment of the object path (ie: it never contains a slash).</p>
3970 <div class="refsect3">
3971 <a name="GDBusSubtreeDispatchFunc.parameters"></a><h4>Parameters</h4>
3972 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3973 <colgroup>
3974 <col width="150px" class="parameters_name">
3975 <col class="parameters_description">
3976 <col width="200px" class="parameters_annotations">
3977 </colgroup>
3978 <tbody>
3979 <tr>
3980 <td class="parameter_name"><p>connection</p></td>
3981 <td class="parameter_description"><p>A <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</p></td>
3982 <td class="parameter_annotations"> </td>
3983 </tr>
3984 <tr>
3985 <td class="parameter_name"><p>sender</p></td>
3986 <td class="parameter_description"><p>The unique bus name of the remote caller.</p></td>
3987 <td class="parameter_annotations"> </td>
3988 </tr>
3989 <tr>
3990 <td class="parameter_name"><p>object_path</p></td>
3991 <td class="parameter_description"><p>The object path that was registered with <a class="link" href="GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()"><code class="function">g_dbus_connection_register_subtree()</code></a>.</p></td>
3992 <td class="parameter_annotations"> </td>
3993 </tr>
3994 <tr>
3995 <td class="parameter_name"><p>interface_name</p></td>
3996 <td class="parameter_description"><p>The D-Bus interface name that the method call or property access is for.</p></td>
3997 <td class="parameter_annotations"> </td>
3998 </tr>
3999 <tr>
4000 <td class="parameter_name"><p>node</p></td>
4001 <td class="parameter_description"><p>A node that is a child of <em class="parameter"><code>object_path</code></em>
4002 (relative to <em class="parameter"><code>object_path</code></em>
4003 ) or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for the root of the subtree.</p></td>
4004 <td class="parameter_annotations"> </td>
4005 </tr>
4006 <tr>
4007 <td class="parameter_name"><p>out_user_data</p></td>
4008 <td class="parameter_description"><p> Return location for user data to pass to functions in the returned <a class="link" href="GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="type">GDBusInterfaceVTable</span></a> (never <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>). </p></td>
4009 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][not optional]</span></td>
4010 </tr>
4011 <tr>
4012 <td class="parameter_name"><p>user_data</p></td>
4013 <td class="parameter_description"><p>The <em class="parameter"><code>user_data</code></em>
4014 <a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> passed to <a class="link" href="GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()"><code class="function">g_dbus_connection_register_subtree()</code></a>.</p></td>
4015 <td class="parameter_annotations"> </td>
4016 </tr>
4017 </tbody>
4018 </table></div>
4019 </div>
4020 <div class="refsect3">
4021 <a name="GDBusSubtreeDispatchFunc.returns"></a><h4>Returns</h4>
4022 <p> A <a class="link" href="GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="type">GDBusInterfaceVTable</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you don't want to handle the methods.</p>
4023 </div>
4024 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4025 </div>
4026 <hr>
4027 <div class="refsect2">
4028 <a name="g-dbus-connection-register-subtree"></a><h3>g_dbus_connection_register_subtree ()</h3>
4029 <pre class="programlisting"><a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
4030 g_dbus_connection_register_subtree (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
4031                                     <em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
4032                                     <em class="parameter"><code>const <a class="link" href="GDBusConnection.html#GDBusSubtreeVTable" title="GDBusSubtreeVTable"><span class="type">GDBusSubtreeVTable</span></a> *vtable</code></em>,
4033                                     <em class="parameter"><code><a class="link" href="GDBusConnection.html#GDBusSubtreeFlags" title="enum GDBusSubtreeFlags"><span class="type">GDBusSubtreeFlags</span></a> flags</code></em>,
4034                                     <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
4035                                     <em class="parameter"><code><a href="../glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> user_data_free_func</code></em>,
4036                                     <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
4037 <p>Registers a whole subtree of dynamic objects.</p>
4038 <p>The <em class="parameter"><code>enumerate</code></em>
4039  and <em class="parameter"><code>introspection</code></em>
4040  functions in <em class="parameter"><code>vtable</code></em>
4041  are used to
4042 convey, to remote callers, what nodes exist in the subtree rooted
4043 by <em class="parameter"><code>object_path</code></em>
4044 .</p>
4045 <p>When handling remote calls into any node in the subtree, first the
4046 <em class="parameter"><code>enumerate</code></em>
4047  function is used to check if the node exists. If the node exists
4048 or the <a class="link" href="GDBusConnection.html#G-DBUS-SUBTREE-FLAGS-DISPATCH-TO-UNENUMERATED-NODES:CAPS"><span class="type">G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES</span></a> flag is set
4049 the <em class="parameter"><code>introspection</code></em>
4050  function is used to check if the node supports the
4051 requested method. If so, the <em class="parameter"><code>dispatch</code></em>
4052  function is used to determine
4053 where to dispatch the call. The collected <a class="link" href="GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="type">GDBusInterfaceVTable</span></a> and
4054 <a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> will be used to call into the interface vtable for processing
4055 the request.</p>
4056 <p>All calls into user-provided code will be invoked in the
4057 <a href="../glib-The-Main-Event-Loop.html#g-main-context-push-thread-default">thread-default main context</a>
4058 of the thread you are calling this method from.</p>
4059 <p>If an existing subtree is already registered at <em class="parameter"><code>object_path</code></em>
4060  or
4061 then <em class="parameter"><code>error</code></em>
4062  is set to <a class="link" href="gio-GIOError.html#G-IO-ERROR-EXISTS:CAPS"><span class="type">G_IO_ERROR_EXISTS</span></a>.</p>
4063 <p>Note that it is valid to register regular objects (using
4064 <a class="link" href="GDBusConnection.html#g-dbus-connection-register-object" title="g_dbus_connection_register_object ()"><code class="function">g_dbus_connection_register_object()</code></a>) in a subtree registered with
4065 <a class="link" href="GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()"><code class="function">g_dbus_connection_register_subtree()</code></a> - if so, the subtree handler
4066 is tried as the last resort. One way to think about a subtree
4067 handler is to consider it a fallback handler for object paths not
4068 registered via <a class="link" href="GDBusConnection.html#g-dbus-connection-register-object" title="g_dbus_connection_register_object ()"><code class="function">g_dbus_connection_register_object()</code></a> or other bindings.</p>
4069 <p>Note that <em class="parameter"><code>vtable</code></em>
4070  will be copied so you cannot change it after
4071 registration.</p>
4072 <p>See this <a class="link" href="GDBusConnection.html#gdbus-subtree-server" title="An example for exporting a subtree">server</a> for an example of how to use
4073 this method.</p>
4074 <div class="refsect3">
4075 <a name="g-dbus-connection-register-subtree.parameters"></a><h4>Parameters</h4>
4076 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4077 <colgroup>
4078 <col width="150px" class="parameters_name">
4079 <col class="parameters_description">
4080 <col width="200px" class="parameters_annotations">
4081 </colgroup>
4082 <tbody>
4083 <tr>
4084 <td class="parameter_name"><p>connection</p></td>
4085 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
4086 <td class="parameter_annotations"> </td>
4087 </tr>
4088 <tr>
4089 <td class="parameter_name"><p>object_path</p></td>
4090 <td class="parameter_description"><p>the object path to register the subtree at</p></td>
4091 <td class="parameter_annotations"> </td>
4092 </tr>
4093 <tr>
4094 <td class="parameter_name"><p>vtable</p></td>
4095 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html#GDBusSubtreeVTable" title="GDBusSubtreeVTable"><span class="type">GDBusSubtreeVTable</span></a> to enumerate, introspect and
4096 dispatch nodes in the subtree</p></td>
4097 <td class="parameter_annotations"> </td>
4098 </tr>
4099 <tr>
4100 <td class="parameter_name"><p>flags</p></td>
4101 <td class="parameter_description"><p>flags used to fine tune the behavior of the subtree</p></td>
4102 <td class="parameter_annotations"> </td>
4103 </tr>
4104 <tr>
4105 <td class="parameter_name"><p>user_data</p></td>
4106 <td class="parameter_description"><p>data to pass to functions in <em class="parameter"><code>vtable</code></em>
4107 </p></td>
4108 <td class="parameter_annotations"> </td>
4109 </tr>
4110 <tr>
4111 <td class="parameter_name"><p>user_data_free_func</p></td>
4112 <td class="parameter_description"><p>function to call when the subtree is unregistered</p></td>
4113 <td class="parameter_annotations"> </td>
4114 </tr>
4115 <tr>
4116 <td class="parameter_name"><p>error</p></td>
4117 <td class="parameter_description"><p>return location for error or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
4118 <td class="parameter_annotations"> </td>
4119 </tr>
4120 </tbody>
4121 </table></div>
4122 </div>
4123 <div class="refsect3">
4124 <a name="g-dbus-connection-register-subtree.returns"></a><h4>Returns</h4>
4125 <p> 0 if <em class="parameter"><code>error</code></em>
4126 is set, otherwise a subtree registration id (never 0)
4127 that can be used with <a class="link" href="GDBusConnection.html#g-dbus-connection-unregister-subtree" title="g_dbus_connection_unregister_subtree ()"><code class="function">g_dbus_connection_unregister_subtree()</code></a> .</p>
4128 </div>
4129 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4130 </div>
4131 <hr>
4132 <div class="refsect2">
4133 <a name="g-dbus-connection-unregister-subtree"></a><h3>g_dbus_connection_unregister_subtree ()</h3>
4134 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
4135 g_dbus_connection_unregister_subtree (<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>,
4136                                       <em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> registration_id</code></em>);</pre>
4137 <p>Unregisters a subtree.</p>
4138 <div class="refsect3">
4139 <a name="g-dbus-connection-unregister-subtree.parameters"></a><h4>Parameters</h4>
4140 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4141 <colgroup>
4142 <col width="150px" class="parameters_name">
4143 <col class="parameters_description">
4144 <col width="200px" class="parameters_annotations">
4145 </colgroup>
4146 <tbody>
4147 <tr>
4148 <td class="parameter_name"><p>connection</p></td>
4149 <td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
4150 <td class="parameter_annotations"> </td>
4151 </tr>
4152 <tr>
4153 <td class="parameter_name"><p>registration_id</p></td>
4154 <td class="parameter_description"><p>a subtree registration id obtained from
4155 <a class="link" href="GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()"><code class="function">g_dbus_connection_register_subtree()</code></a></p></td>
4156 <td class="parameter_annotations"> </td>
4157 </tr>
4158 </tbody>
4159 </table></div>
4160 </div>
4161 <div class="refsect3">
4162 <a name="g-dbus-connection-unregister-subtree.returns"></a><h4>Returns</h4>
4163 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the subtree was unregistered, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
4164 </div>
4165 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4166 </div>
4167 </div>
4168 <div class="refsect1">
4169 <a name="GDBusConnection.other_details"></a><h2>Types and Values</h2>
4170 <div class="refsect2">
4171 <a name="GBusType"></a><h3>enum GBusType</h3>
4172 <p>An enumeration for well-known message buses.</p>
4173 <div class="refsect3">
4174 <a name="GBusType.members"></a><h4>Members</h4>
4175 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4176 <colgroup>
4177 <col width="300px" class="enum_members_name">
4178 <col class="enum_members_description">
4179 <col width="200px" class="enum_members_annotations">
4180 </colgroup>
4181 <tbody>
4182 <tr>
4183 <td class="enum_member_name"><p><a name="G-BUS-TYPE-STARTER:CAPS"></a>G_BUS_TYPE_STARTER</p></td>
4184 <td class="enum_member_description">
4185 <p>An alias for the message bus that activated the process, if any.</p>
4186 </td>
4187 <td class="enum_member_annotations"> </td>
4188 </tr>
4189 <tr>
4190 <td class="enum_member_name"><p><a name="G-BUS-TYPE-NONE:CAPS"></a>G_BUS_TYPE_NONE</p></td>
4191 <td class="enum_member_description">
4192 <p>Not a message bus.</p>
4193 </td>
4194 <td class="enum_member_annotations"> </td>
4195 </tr>
4196 <tr>
4197 <td class="enum_member_name"><p><a name="G-BUS-TYPE-SYSTEM:CAPS"></a>G_BUS_TYPE_SYSTEM</p></td>
4198 <td class="enum_member_description">
4199 <p>The system-wide message bus.</p>
4200 </td>
4201 <td class="enum_member_annotations"> </td>
4202 </tr>
4203 <tr>
4204 <td class="enum_member_name"><p><a name="G-BUS-TYPE-SESSION:CAPS"></a>G_BUS_TYPE_SESSION</p></td>
4205 <td class="enum_member_description">
4206 <p>The login session message bus.</p>
4207 </td>
4208 <td class="enum_member_annotations"> </td>
4209 </tr>
4210 </tbody>
4211 </table></div>
4212 </div>
4213 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4214 </div>
4215 <hr>
4216 <div class="refsect2">
4217 <a name="GDBusConnection-struct"></a><h3>GDBusConnection</h3>
4218 <pre class="programlisting">typedef struct _GDBusConnection GDBusConnection;</pre>
4219 <p>The <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> structure contains only private data and
4220 should only be accessed using the provided API.</p>
4221 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4222 </div>
4223 <hr>
4224 <div class="refsect2">
4225 <a name="GDBusConnectionFlags"></a><h3>enum GDBusConnectionFlags</h3>
4226 <p>Flags used when creating a new <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</p>
4227 <div class="refsect3">
4228 <a name="GDBusConnectionFlags.members"></a><h4>Members</h4>
4229 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4230 <colgroup>
4231 <col width="300px" class="enum_members_name">
4232 <col class="enum_members_description">
4233 <col width="200px" class="enum_members_annotations">
4234 </colgroup>
4235 <tbody>
4236 <tr>
4237 <td class="enum_member_name"><p><a name="G-DBUS-CONNECTION-FLAGS-NONE:CAPS"></a>G_DBUS_CONNECTION_FLAGS_NONE</p></td>
4238 <td class="enum_member_description">
4239 <p>No flags set.</p>
4240 </td>
4241 <td class="enum_member_annotations"> </td>
4242 </tr>
4243 <tr>
4244 <td class="enum_member_name"><p><a name="G-DBUS-CONNECTION-FLAGS-AUTHENTICATION-CLIENT:CAPS"></a>G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT</p></td>
4245 <td class="enum_member_description">
4246 <p>Perform authentication against server.</p>
4247 </td>
4248 <td class="enum_member_annotations"> </td>
4249 </tr>
4250 <tr>
4251 <td class="enum_member_name"><p><a name="G-DBUS-CONNECTION-FLAGS-AUTHENTICATION-SERVER:CAPS"></a>G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER</p></td>
4252 <td class="enum_member_description">
4253 <p>Perform authentication against client.</p>
4254 </td>
4255 <td class="enum_member_annotations"> </td>
4256 </tr>
4257 <tr>
4258 <td class="enum_member_name"><p><a name="G-DBUS-CONNECTION-FLAGS-AUTHENTICATION-ALLOW-ANONYMOUS:CAPS"></a>G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS</p></td>
4259 <td class="enum_member_description">
4260 <p>When
4261 authenticating as a server, allow the anonymous authentication
4262 method.</p>
4263 </td>
4264 <td class="enum_member_annotations"> </td>
4265 </tr>
4266 <tr>
4267 <td class="enum_member_name"><p><a name="G-DBUS-CONNECTION-FLAGS-MESSAGE-BUS-CONNECTION:CAPS"></a>G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION</p></td>
4268 <td class="enum_member_description">
4269 <p>Pass this flag if connecting to a peer that is a
4270 message bus. This means that the <code class="function">Hello()</code> method will be invoked as part of the connection setup.</p>
4271 </td>
4272 <td class="enum_member_annotations"> </td>
4273 </tr>
4274 <tr>
4275 <td class="enum_member_name"><p><a name="G-DBUS-CONNECTION-FLAGS-DELAY-MESSAGE-PROCESSING:CAPS"></a>G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING</p></td>
4276 <td class="enum_member_description">
4277 <p>If set, processing of D-Bus messages is
4278 delayed until <a class="link" href="GDBusConnection.html#g-dbus-connection-start-message-processing" title="g_dbus_connection_start_message_processing ()"><code class="function">g_dbus_connection_start_message_processing()</code></a> is called.</p>
4279 </td>
4280 <td class="enum_member_annotations"> </td>
4281 </tr>
4282 </tbody>
4283 </table></div>
4284 </div>
4285 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4286 </div>
4287 <hr>
4288 <div class="refsect2">
4289 <a name="GDBusCapabilityFlags"></a><h3>enum GDBusCapabilityFlags</h3>
4290 <p>Capabilities negotiated with the remote peer.</p>
4291 <div class="refsect3">
4292 <a name="GDBusCapabilityFlags.members"></a><h4>Members</h4>
4293 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4294 <colgroup>
4295 <col width="300px" class="enum_members_name">
4296 <col class="enum_members_description">
4297 <col width="200px" class="enum_members_annotations">
4298 </colgroup>
4299 <tbody>
4300 <tr>
4301 <td class="enum_member_name"><p><a name="G-DBUS-CAPABILITY-FLAGS-NONE:CAPS"></a>G_DBUS_CAPABILITY_FLAGS_NONE</p></td>
4302 <td class="enum_member_description">
4303 <p>No flags set.</p>
4304 </td>
4305 <td class="enum_member_annotations"> </td>
4306 </tr>
4307 <tr>
4308 <td class="enum_member_name"><p><a name="G-DBUS-CAPABILITY-FLAGS-UNIX-FD-PASSING:CAPS"></a>G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING</p></td>
4309 <td class="enum_member_description">
4310 <p>The connection
4311 supports exchanging UNIX file descriptors with the remote peer.</p>
4312 </td>
4313 <td class="enum_member_annotations"> </td>
4314 </tr>
4315 </tbody>
4316 </table></div>
4317 </div>
4318 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4319 </div>
4320 <hr>
4321 <div class="refsect2">
4322 <a name="GDBusCallFlags"></a><h3>enum GDBusCallFlags</h3>
4323 <p>Flags used in <a class="link" href="GDBusConnection.html#g-dbus-connection-call" title="g_dbus_connection_call ()"><code class="function">g_dbus_connection_call()</code></a> and similar APIs.</p>
4324 <div class="refsect3">
4325 <a name="GDBusCallFlags.members"></a><h4>Members</h4>
4326 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4327 <colgroup>
4328 <col width="300px" class="enum_members_name">
4329 <col class="enum_members_description">
4330 <col width="200px" class="enum_members_annotations">
4331 </colgroup>
4332 <tbody>
4333 <tr>
4334 <td class="enum_member_name"><p><a name="G-DBUS-CALL-FLAGS-NONE:CAPS"></a>G_DBUS_CALL_FLAGS_NONE</p></td>
4335 <td class="enum_member_description">
4336 <p>No flags set.</p>
4337 </td>
4338 <td class="enum_member_annotations"> </td>
4339 </tr>
4340 <tr>
4341 <td class="enum_member_name"><p><a name="G-DBUS-CALL-FLAGS-NO-AUTO-START:CAPS"></a>G_DBUS_CALL_FLAGS_NO_AUTO_START</p></td>
4342 <td class="enum_member_description">
4343 <p>The bus must not launch
4344 an owner for the destination name in response to this method
4345 invocation.</p>
4346 </td>
4347 <td class="enum_member_annotations"> </td>
4348 </tr>
4349 <tr>
4350 <td class="enum_member_name"><p><a name="G-DBUS-CALL-FLAGS-ALLOW-INTERACTIVE-AUTHORIZATION:CAPS"></a>G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION</p></td>
4351 <td class="enum_member_description">
4352 <p>the caller is prepared to
4353 wait for interactive authorization. Since 2.46.</p>
4354 </td>
4355 <td class="enum_member_annotations"> </td>
4356 </tr>
4357 </tbody>
4358 </table></div>
4359 </div>
4360 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4361 </div>
4362 <hr>
4363 <div class="refsect2">
4364 <a name="GDBusSignalFlags"></a><h3>enum GDBusSignalFlags</h3>
4365 <p>Flags used when subscribing to signals via <a class="link" href="GDBusConnection.html#g-dbus-connection-signal-subscribe" title="g_dbus_connection_signal_subscribe ()"><code class="function">g_dbus_connection_signal_subscribe()</code></a>.</p>
4366 <div class="refsect3">
4367 <a name="GDBusSignalFlags.members"></a><h4>Members</h4>
4368 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4369 <colgroup>
4370 <col width="300px" class="enum_members_name">
4371 <col class="enum_members_description">
4372 <col width="200px" class="enum_members_annotations">
4373 </colgroup>
4374 <tbody>
4375 <tr>
4376 <td class="enum_member_name"><p><a name="G-DBUS-SIGNAL-FLAGS-NONE:CAPS"></a>G_DBUS_SIGNAL_FLAGS_NONE</p></td>
4377 <td class="enum_member_description">
4378 <p>No flags set.</p>
4379 </td>
4380 <td class="enum_member_annotations"> </td>
4381 </tr>
4382 <tr>
4383 <td class="enum_member_name"><p><a name="G-DBUS-SIGNAL-FLAGS-NO-MATCH-RULE:CAPS"></a>G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE</p></td>
4384 <td class="enum_member_description">
4385 <p>Don't actually send the AddMatch
4386 D-Bus call for this signal subscription.  This gives you more control
4387 over which match rules you add (but you must add them manually).</p>
4388 </td>
4389 <td class="enum_member_annotations"> </td>
4390 </tr>
4391 <tr>
4392 <td class="enum_member_name"><p><a name="G-DBUS-SIGNAL-FLAGS-MATCH-ARG0-NAMESPACE:CAPS"></a>G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE</p></td>
4393 <td class="enum_member_description">
4394 <p>Match first arguments that
4395 contain a bus or interface name with the given namespace.</p>
4396 </td>
4397 <td class="enum_member_annotations"> </td>
4398 </tr>
4399 <tr>
4400 <td class="enum_member_name"><p><a name="G-DBUS-SIGNAL-FLAGS-MATCH-ARG0-PATH:CAPS"></a>G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_PATH</p></td>
4401 <td class="enum_member_description">
4402 <p>Match first arguments that
4403 contain an object path that is either equivalent to the given path,
4404 or one of the paths is a subpath of the other.</p>
4405 </td>
4406 <td class="enum_member_annotations"> </td>
4407 </tr>
4408 </tbody>
4409 </table></div>
4410 </div>
4411 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4412 </div>
4413 <hr>
4414 <div class="refsect2">
4415 <a name="GDBusSendMessageFlags"></a><h3>enum GDBusSendMessageFlags</h3>
4416 <p>Flags used when sending <a href="GDBusMessage.html#GDBusMessage-struct"><span class="type">GDBusMessages</span></a> on a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a>.</p>
4417 <div class="refsect3">
4418 <a name="GDBusSendMessageFlags.members"></a><h4>Members</h4>
4419 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4420 <colgroup>
4421 <col width="300px" class="enum_members_name">
4422 <col class="enum_members_description">
4423 <col width="200px" class="enum_members_annotations">
4424 </colgroup>
4425 <tbody>
4426 <tr>
4427 <td class="enum_member_name"><p><a name="G-DBUS-SEND-MESSAGE-FLAGS-NONE:CAPS"></a>G_DBUS_SEND_MESSAGE_FLAGS_NONE</p></td>
4428 <td class="enum_member_description">
4429 <p>No flags set.</p>
4430 </td>
4431 <td class="enum_member_annotations"> </td>
4432 </tr>
4433 <tr>
4434 <td class="enum_member_name"><p><a name="G-DBUS-SEND-MESSAGE-FLAGS-PRESERVE-SERIAL:CAPS"></a>G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL</p></td>
4435 <td class="enum_member_description">
4436 <p>Do not automatically
4437 assign a serial number from the <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> object when
4438 sending a message.</p>
4439 </td>
4440 <td class="enum_member_annotations"> </td>
4441 </tr>
4442 </tbody>
4443 </table></div>
4444 </div>
4445 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4446 </div>
4447 <hr>
4448 <div class="refsect2">
4449 <a name="GDBusInterfaceVTable"></a><h3>GDBusInterfaceVTable</h3>
4450 <pre class="programlisting">typedef struct {
4451   GDBusInterfaceMethodCallFunc  method_call;
4452   GDBusInterfaceGetPropertyFunc get_property;
4453   GDBusInterfaceSetPropertyFunc set_property;
4454 } GDBusInterfaceVTable;
4455 </pre>
4456 <p>Virtual table for handling properties and method calls for a D-Bus
4457 interface.</p>
4458 <p>Since 2.38, if you want to handle getting/setting D-Bus properties
4459 asynchronously, give <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> as your <code class="function">get_property()</code> or <code class="function">set_property()</code>
4460 function. The D-Bus call will be directed to your <em class="parameter"><code>method_call</code></em>
4461  function,
4462 with the provided <em class="parameter"><code>interface_name</code></em>
4463  set to "org.freedesktop.DBus.Properties".</p>
4464 <p>Ownership of the <a class="link" href="GDBusMethodInvocation.html" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> object passed to the
4465 <code class="function">method_call()</code> function is transferred to your handler; you must
4466 call one of the methods of <a class="link" href="GDBusMethodInvocation.html" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> to return a reply
4467 (possibly empty), or an error. These functions also take ownership
4468 of the passed-in invocation object, so unless the invocation
4469 object has otherwise been referenced, it will be then be freed.
4470 Calling one of these functions may be done within your
4471 <code class="function">method_call()</code> implementation but it also can be done at a later
4472 point to handle the method asynchronously.</p>
4473 <p>The usual checks on the validity of the calls is performed. For
4474 <code class="literal">Get</code> calls, an error is automatically returned if the property does
4475 not exist or the permissions do not allow access. The same checks are
4476 performed for <code class="literal">Set</code> calls, and the provided value is also checked for
4477 being the correct type.</p>
4478 <p>For both <code class="literal">Get</code> and <code class="literal">Set</code> calls, the <a class="link" href="GDBusMethodInvocation.html" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a>
4479 passed to the <em class="parameter"><code>method_call</code></em>
4480  handler can be queried with
4481 <a class="link" href="GDBusMethodInvocation.html#g-dbus-method-invocation-get-property-info" title="g_dbus_method_invocation_get_property_info ()"><code class="function">g_dbus_method_invocation_get_property_info()</code></a> to get a pointer
4482 to the <a class="link" href="gio-D-Bus-Introspection-Data.html#GDBusPropertyInfo"><span class="type">GDBusPropertyInfo</span></a> of the property.</p>
4483 <p>If you have readable properties specified in your interface info,
4484 you must ensure that you either provide a non-<a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> <em class="parameter"><code><code class="function">get_property()</code></code></em>
4485
4486 function or provide implementations of both the <code class="literal">Get</code> and <code class="literal">GetAll</code>
4487 methods on org.freedesktop.DBus.Properties interface in your <em class="parameter"><code>method_call</code></em>
4488
4489 function. Note that the required return type of the <code class="literal">Get</code> call is
4490 <code class="literal">(v)</code>, not the type of the property. <code class="literal">GetAll</code> expects a return value
4491 of type <code class="literal">a{sv}</code>.</p>
4492 <p>If you have writable properties specified in your interface info,
4493 you must ensure that you either provide a non-<a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> <em class="parameter"><code><code class="function">set_property()</code></code></em>
4494
4495 function or provide an implementation of the <code class="literal">Set</code> call. If implementing
4496 the call, you must return the value of type <a href="../glib-GVariantType.html#G-VARIANT-TYPE-UNIT:CAPS"><code class="literal">G_VARIANT_TYPE_UNIT</code></a>.</p>
4497 <div class="refsect3">
4498 <a name="GDBusInterfaceVTable.members"></a><h4>Members</h4>
4499 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4500 <colgroup>
4501 <col width="300px" class="struct_members_name">
4502 <col class="struct_members_description">
4503 <col width="200px" class="struct_members_annotations">
4504 </colgroup>
4505 <tbody>
4506 <tr>
4507 <td class="struct_member_name"><p><a class="link" href="GDBusConnection.html#GDBusInterfaceMethodCallFunc" title="GDBusInterfaceMethodCallFunc ()"><span class="type">GDBusInterfaceMethodCallFunc</span></a> <em class="structfield"><code><a name="GDBusInterfaceVTable.method-call"></a>method_call</code></em>;</p></td>
4508 <td class="struct_member_description"><p>Function for handling incoming method calls.</p></td>
4509 <td class="struct_member_annotations"> </td>
4510 </tr>
4511 <tr>
4512 <td class="struct_member_name"><p><a class="link" href="GDBusConnection.html#GDBusInterfaceGetPropertyFunc" title="GDBusInterfaceGetPropertyFunc ()"><span class="type">GDBusInterfaceGetPropertyFunc</span></a> <em class="structfield"><code><a name="GDBusInterfaceVTable.get-property"></a>get_property</code></em>;</p></td>
4513 <td class="struct_member_description"><p>Function for getting a property.</p></td>
4514 <td class="struct_member_annotations"> </td>
4515 </tr>
4516 <tr>
4517 <td class="struct_member_name"><p><a class="link" href="GDBusConnection.html#GDBusInterfaceSetPropertyFunc" title="GDBusInterfaceSetPropertyFunc ()"><span class="type">GDBusInterfaceSetPropertyFunc</span></a> <em class="structfield"><code><a name="GDBusInterfaceVTable.set-property"></a>set_property</code></em>;</p></td>
4518 <td class="struct_member_description"><p>Function for setting a property.</p></td>
4519 <td class="struct_member_annotations"> </td>
4520 </tr>
4521 </tbody>
4522 </table></div>
4523 </div>
4524 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4525 </div>
4526 <hr>
4527 <div class="refsect2">
4528 <a name="GDBusSubtreeVTable"></a><h3>GDBusSubtreeVTable</h3>
4529 <pre class="programlisting">typedef struct {
4530   GDBusSubtreeEnumerateFunc  enumerate;
4531   GDBusSubtreeIntrospectFunc introspect;
4532   GDBusSubtreeDispatchFunc   dispatch;
4533 } GDBusSubtreeVTable;
4534 </pre>
4535 <p>Virtual table for handling subtrees registered with <a class="link" href="GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()"><code class="function">g_dbus_connection_register_subtree()</code></a>.</p>
4536 <div class="refsect3">
4537 <a name="GDBusSubtreeVTable.members"></a><h4>Members</h4>
4538 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4539 <colgroup>
4540 <col width="300px" class="struct_members_name">
4541 <col class="struct_members_description">
4542 <col width="200px" class="struct_members_annotations">
4543 </colgroup>
4544 <tbody>
4545 <tr>
4546 <td class="struct_member_name"><p><a class="link" href="GDBusConnection.html#GDBusSubtreeEnumerateFunc" title="GDBusSubtreeEnumerateFunc ()"><span class="type">GDBusSubtreeEnumerateFunc</span></a> <em class="structfield"><code><a name="GDBusSubtreeVTable.enumerate"></a>enumerate</code></em>;</p></td>
4547 <td class="struct_member_description"><p>Function for enumerating child nodes.</p></td>
4548 <td class="struct_member_annotations"> </td>
4549 </tr>
4550 <tr>
4551 <td class="struct_member_name"><p><a class="link" href="GDBusConnection.html#GDBusSubtreeIntrospectFunc" title="GDBusSubtreeIntrospectFunc ()"><span class="type">GDBusSubtreeIntrospectFunc</span></a> <em class="structfield"><code><a name="GDBusSubtreeVTable.introspect"></a>introspect</code></em>;</p></td>
4552 <td class="struct_member_description"><p>Function for introspecting a child node.</p></td>
4553 <td class="struct_member_annotations"> </td>
4554 </tr>
4555 <tr>
4556 <td class="struct_member_name"><p><a class="link" href="GDBusConnection.html#GDBusSubtreeDispatchFunc" title="GDBusSubtreeDispatchFunc ()"><span class="type">GDBusSubtreeDispatchFunc</span></a> <em class="structfield"><code><a name="GDBusSubtreeVTable.dispatch"></a>dispatch</code></em>;</p></td>
4557 <td class="struct_member_description"><p>Function for dispatching a remote call on a child node.</p></td>
4558 <td class="struct_member_annotations"> </td>
4559 </tr>
4560 </tbody>
4561 </table></div>
4562 </div>
4563 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4564 </div>
4565 <hr>
4566 <div class="refsect2">
4567 <a name="GDBusSubtreeFlags"></a><h3>enum GDBusSubtreeFlags</h3>
4568 <p>Flags passed to <a class="link" href="GDBusConnection.html#g-dbus-connection-register-subtree" title="g_dbus_connection_register_subtree ()"><code class="function">g_dbus_connection_register_subtree()</code></a>.</p>
4569 <div class="refsect3">
4570 <a name="GDBusSubtreeFlags.members"></a><h4>Members</h4>
4571 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4572 <colgroup>
4573 <col width="300px" class="enum_members_name">
4574 <col class="enum_members_description">
4575 <col width="200px" class="enum_members_annotations">
4576 </colgroup>
4577 <tbody>
4578 <tr>
4579 <td class="enum_member_name"><p><a name="G-DBUS-SUBTREE-FLAGS-NONE:CAPS"></a>G_DBUS_SUBTREE_FLAGS_NONE</p></td>
4580 <td class="enum_member_description">
4581 <p>No flags set.</p>
4582 </td>
4583 <td class="enum_member_annotations"> </td>
4584 </tr>
4585 <tr>
4586 <td class="enum_member_name"><p><a name="G-DBUS-SUBTREE-FLAGS-DISPATCH-TO-UNENUMERATED-NODES:CAPS"></a>G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES</p></td>
4587 <td class="enum_member_description">
4588 <p>Method calls to objects not in the enumerated range
4589                                                       will still be dispatched. This is useful if you want
4590                                                       to dynamically spawn objects in the subtree.</p>
4591 </td>
4592 <td class="enum_member_annotations"> </td>
4593 </tr>
4594 </tbody>
4595 </table></div>
4596 </div>
4597 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4598 </div>
4599 </div>
4600 <div class="refsect1">
4601 <a name="GDBusConnection.property-details"></a><h2>Property Details</h2>
4602 <div class="refsect2">
4603 <a name="GDBusConnection--address"></a><h3>The <code class="literal">“address”</code> property</h3>
4604 <pre class="programlisting">  “address”                  <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
4605 <p>A D-Bus address specifying potential endpoints that can be used
4606 when establishing the connection.</p>
4607 <p>Flags: Write / Construct Only</p>
4608 <p>Default value: NULL</p>
4609 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4610 </div>
4611 <hr>
4612 <div class="refsect2">
4613 <a name="GDBusConnection--authentication-observer"></a><h3>The <code class="literal">“authentication-observer”</code> property</h3>
4614 <pre class="programlisting">  “authentication-observer”  <a class="link" href="GDBusAuthObserver.html" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> *</pre>
4615 <p>A <a class="link" href="GDBusAuthObserver.html" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> object to assist in the authentication process or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
4616 <p>Flags: Write / Construct Only</p>
4617 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4618 </div>
4619 <hr>
4620 <div class="refsect2">
4621 <a name="GDBusConnection--capabilities"></a><h3>The <code class="literal">“capabilities”</code> property</h3>
4622 <pre class="programlisting">  “capabilities”             <a class="link" href="GDBusConnection.html#GDBusCapabilityFlags" title="enum GDBusCapabilityFlags"><span class="type">GDBusCapabilityFlags</span></a></pre>
4623 <p>Flags from the <a class="link" href="GDBusConnection.html#GDBusCapabilityFlags" title="enum GDBusCapabilityFlags"><span class="type">GDBusCapabilityFlags</span></a> enumeration
4624 representing connection features negotiated with the other peer.</p>
4625 <p>Flags: Read</p>
4626 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4627 </div>
4628 <hr>
4629 <div class="refsect2">
4630 <a name="GDBusConnection--closed"></a><h3>The <code class="literal">“closed”</code> property</h3>
4631 <pre class="programlisting">  “closed”                   <a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
4632 <p>A boolean specifying whether the connection has been closed.</p>
4633 <p>Flags: Read</p>
4634 <p>Default value: FALSE</p>
4635 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4636 </div>
4637 <hr>
4638 <div class="refsect2">
4639 <a name="GDBusConnection--exit-on-close"></a><h3>The <code class="literal">“exit-on-close”</code> property</h3>
4640 <pre class="programlisting">  “exit-on-close”            <a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
4641 <p>A boolean specifying whether the process will be terminated (by
4642 calling <code class="literal">raise(SIGTERM)</code>) if the connection is closed by the
4643 remote peer.</p>
4644 <p>Note that <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> objects returned by <a class="link" href="GDBusConnection.html#g-bus-get-finish" title="g_bus_get_finish ()"><code class="function">g_bus_get_finish()</code></a>
4645 and <a class="link" href="GDBusConnection.html#g-bus-get-sync" title="g_bus_get_sync ()"><code class="function">g_bus_get_sync()</code></a> will (usually) have this property set to <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.</p>
4646 <p>Flags: Read / Write</p>
4647 <p>Default value: FALSE</p>
4648 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4649 </div>
4650 <hr>
4651 <div class="refsect2">
4652 <a name="GDBusConnection--flags"></a><h3>The <code class="literal">“flags”</code> property</h3>
4653 <pre class="programlisting">  “flags”                    <a class="link" href="GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags"><span class="type">GDBusConnectionFlags</span></a></pre>
4654 <p>Flags from the <a class="link" href="GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags"><span class="type">GDBusConnectionFlags</span></a> enumeration.</p>
4655 <p>Flags: Write / Construct Only</p>
4656 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4657 </div>
4658 <hr>
4659 <div class="refsect2">
4660 <a name="GDBusConnection--guid"></a><h3>The <code class="literal">“guid”</code> property</h3>
4661 <pre class="programlisting">  “guid”                     <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
4662 <p>The GUID of the peer performing the role of server when
4663 authenticating.</p>
4664 <p>If you are constructing a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> and pass
4665 <a class="link" href="GDBusConnection.html#G-DBUS-CONNECTION-FLAGS-AUTHENTICATION-SERVER:CAPS"><code class="literal">G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER</code></a> in the
4666 <a class="link" href="GDBusConnection.html#GDBusConnection--flags" title="The “flags” property"><span class="type">“flags”</span></a> property then you MUST also set this
4667 property to a valid guid.</p>
4668 <p>If you are constructing a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> and pass
4669 <a class="link" href="GDBusConnection.html#G-DBUS-CONNECTION-FLAGS-AUTHENTICATION-CLIENT:CAPS"><code class="literal">G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT</code></a> in the
4670 <a class="link" href="GDBusConnection.html#GDBusConnection--flags" title="The “flags” property"><span class="type">“flags”</span></a> property you will be able to read the GUID
4671 of the other peer here after the connection has been successfully
4672 initialized.</p>
4673 <p>Flags: Read / Write / Construct Only</p>
4674 <p>Default value: NULL</p>
4675 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4676 </div>
4677 <hr>
4678 <div class="refsect2">
4679 <a name="GDBusConnection--stream"></a><h3>The <code class="literal">“stream”</code> property</h3>
4680 <pre class="programlisting">  “stream”                   <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *</pre>
4681 <p>The underlying <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> used for I/O.</p>
4682 <p>If this is passed on construction and is a <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a>,
4683 then the corresponding <a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> will be put into non-blocking mode.</p>
4684 <p>While the <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> is active, it will interact with this
4685 stream from a worker thread, so it is not safe to interact with
4686 the stream directly.</p>
4687 <p>Flags: Read / Write / Construct Only</p>
4688 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4689 </div>
4690 <hr>
4691 <div class="refsect2">
4692 <a name="GDBusConnection--unique-name"></a><h3>The <code class="literal">“unique-name”</code> property</h3>
4693 <pre class="programlisting">  “unique-name”              <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
4694 <p>The unique name as assigned by the message bus or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the
4695 connection is not open or not a message bus connection.</p>
4696 <p>Flags: Read</p>
4697 <p>Default value: NULL</p>
4698 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4699 </div>
4700 </div>
4701 <div class="refsect1">
4702 <a name="GDBusConnection.signal-details"></a><h2>Signal Details</h2>
4703 <div class="refsect2">
4704 <a name="GDBusConnection-closed"></a><h3>The <code class="literal">“closed”</code> signal</h3>
4705 <pre class="programlisting"><span class="returnvalue">void</span>
4706 user_function (<a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection,
4707                <a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>         remote_peer_vanished,
4708                <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>          *error,
4709                <a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>         user_data)</pre>
4710 <p>Emitted when the connection is closed.</p>
4711 <p>The cause of this event can be</p>
4712 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
4713 <li class="listitem"><p>If <a class="link" href="GDBusConnection.html#g-dbus-connection-close" title="g_dbus_connection_close ()"><code class="function">g_dbus_connection_close()</code></a> is called. In this case
4714 <em class="parameter"><code>remote_peer_vanished</code></em>
4715  is set to <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> and <em class="parameter"><code>error</code></em>
4716  is <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></li>
4717 <li class="listitem"><p>If the remote peer closes the connection. In this case
4718 <em class="parameter"><code>remote_peer_vanished</code></em>
4719  is set to <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> and <em class="parameter"><code>error</code></em>
4720  is set.</p></li>
4721 <li class="listitem"><p>If the remote peer sends invalid or malformed data. In this
4722 case <em class="parameter"><code>remote_peer_vanished</code></em>
4723  is set to <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> and <em class="parameter"><code>error</code></em>
4724  is set.</p></li>
4725 </ul></div>
4726 <p>Upon receiving this signal, you should give up your reference to
4727 <em class="parameter"><code>connection</code></em>
4728 . You are guaranteed that this signal is emitted only
4729 once.</p>
4730 <div class="refsect3">
4731 <a name="GDBusConnection-closed.parameters"></a><h4>Parameters</h4>
4732 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4733 <colgroup>
4734 <col width="150px" class="parameters_name">
4735 <col class="parameters_description">
4736 <col width="200px" class="parameters_annotations">
4737 </colgroup>
4738 <tbody>
4739 <tr>
4740 <td class="parameter_name"><p>connection</p></td>
4741 <td class="parameter_description"><p>the <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> emitting the signal</p></td>
4742 <td class="parameter_annotations"> </td>
4743 </tr>
4744 <tr>
4745 <td class="parameter_name"><p>remote_peer_vanished</p></td>
4746 <td class="parameter_description"><p><a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>connection</code></em>
4747 is closed because the
4748 remote peer closed its end of the connection</p></td>
4749 <td class="parameter_annotations"> </td>
4750 </tr>
4751 <tr>
4752 <td class="parameter_name"><p>error</p></td>
4753 <td class="parameter_description"><p> a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> with more details about the event or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
4754 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
4755 </tr>
4756 <tr>
4757 <td class="parameter_name"><p>user_data</p></td>
4758 <td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
4759 <td class="parameter_annotations"> </td>
4760 </tr>
4761 </tbody>
4762 </table></div>
4763 </div>
4764 <p>Flags: <a href="../gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
4765 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
4766 </div>
4767 </div>
4768 </div>
4769 <div class="footer">
4770 <hr>Generated by GTK-Doc V1.25.1</div>
4771 </body>
4772 </html>