1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
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">
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>
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>
29 <div class="refentry">
30 <a name="GDBusConnection"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
33 <h2><span class="refentrytitle"><a name="GDBusConnection.top_of_page"></a>GDBusConnection</span></h2>
34 <p>GDBusConnection — D-Bus Connections</p>
36 <td class="gallery_image" valign="top" align="right"></td>
38 <div class="refsect1">
39 <a name="GDBusConnection.functions"></a><h2>Functions</h2>
40 <div class="informaltable"><table class="informaltable" width="100%" border="0">
42 <col width="150px" class="functions_return">
43 <col class="functions_name">
47 <td class="function_type">
48 <span class="returnvalue">void</span>
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>
55 <td class="function_type">
56 <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
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>
63 <td class="function_type">
64 <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
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>
71 <td class="function_type">
72 <span class="returnvalue">void</span>
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>
79 <td class="function_type">
80 <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
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>
87 <td class="function_type">
88 <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
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>
95 <td class="function_type">
96 <span class="returnvalue">void</span>
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>
103 <td class="function_type">
104 <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
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>
111 <td class="function_type">
112 <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
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>
119 <td class="function_type">
120 <span class="returnvalue">void</span>
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>
127 <td class="function_type">
128 <span class="returnvalue">void</span>
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>
135 <td class="function_type">
136 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
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>
143 <td class="function_type">
144 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
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>
151 <td class="function_type">
152 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
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>
159 <td class="function_type">
160 <span class="returnvalue">void</span>
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>
167 <td class="function_type">
168 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
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>
175 <td class="function_type">
176 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
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>
183 <td class="function_type">
184 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
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>
191 <td class="function_type">
192 <span class="returnvalue">void</span>
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>
199 <td class="function_type">
200 <a class="link" href="GIOStream.html" title="GIOStream"><span class="returnvalue">GIOStream</span></a> *
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>
207 <td class="function_type">const <a href="../glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
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>
214 <td class="function_type">const <a href="../glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
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>
221 <td class="function_type">
222 <a class="link" href="GDBusConnection.html#GDBusCapabilityFlags" title="enum GDBusCapabilityFlags"><span class="returnvalue">GDBusCapabilityFlags</span></a>
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>
229 <td class="function_type">
230 <a class="link" href="GCredentials.html" title="GCredentials"><span class="returnvalue">GCredentials</span></a> *
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>
237 <td class="function_type">
238 <a href="../glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>
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>
245 <td class="function_type">
246 <span class="returnvalue">void</span>
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>
253 <td class="function_type">
254 <a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
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>
261 <td class="function_type">
262 <a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
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>
269 <td class="function_type">
270 <span class="returnvalue">void</span>
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>
277 <td class="function_type">
278 <a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
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>
285 <td class="function_type">
286 <a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
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>
293 <td class="function_type">
294 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
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>
301 <td class="function_type">
302 <span class="returnvalue">void</span>
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>
309 <td class="function_type">
310 <a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
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>
317 <td class="function_type">
318 <span class="returnvalue">void</span>
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>
325 <td class="function_type">
326 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
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>
333 <td class="function_type">
334 <span class="returnvalue">void</span>
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>
341 <td class="function_type">
342 <a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="returnvalue">GDBusMessage</span></a> *
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>
349 <td class="function_type">
350 <a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="returnvalue">GDBusMessage</span></a> *
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>
357 <td class="function_type">
358 <a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="returnvalue">GDBusMessage</span></a> *
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>
365 <td class="function_type">
366 <a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
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>
373 <td class="function_type">
374 <span class="returnvalue">void</span>
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>
381 <td class="function_type">
382 <span class="returnvalue">void</span>
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>
389 <td class="function_type">
390 <a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
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>
397 <td class="function_type">
398 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
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>
405 <td class="function_type">
406 <a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
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>
413 <td class="function_type">
414 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
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>
421 <td class="function_type">
422 <a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
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>
429 <td class="function_type">
430 <a href="../glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **
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>
437 <td class="function_type">
438 <a class="link" href="gio-D-Bus-Introspection-Data.html#GDBusInterfaceInfo"><span class="returnvalue">GDBusInterfaceInfo</span></a> **
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>
445 <td class="function_type">const <a class="link" href="GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="returnvalue">GDBusInterfaceVTable</span></a> *
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>
452 <td class="function_type">
453 <a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
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>
460 <td class="function_type">
461 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
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>
470 <div class="refsect1">
471 <a name="GDBusConnection.properties"></a><h2>Properties</h2>
472 <div class="informaltable"><table class="informaltable" border="0">
474 <col width="150px" class="properties_type">
475 <col width="300px" class="properties_name">
476 <col width="200px" class="properties_flags">
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>
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>
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>
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>
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>
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>
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>
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>
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>
532 <div class="refsect1">
533 <a name="GDBusConnection.signals"></a><h2>Signals</h2>
534 <div class="informaltable"><table class="informaltable" border="0">
536 <col width="150px" class="signals_return">
537 <col width="300px" class="signals_name">
538 <col width="200px" class="signals_flags">
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>
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">
551 <col width="150px" class="name">
552 <col class="description">
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>
560 <td class="datatype_keyword"> </td>
561 <td class="function_name"><a class="link" href="GDBusConnection.html#GDBusConnection-struct" title="GDBusConnection">GDBusConnection</a></td>
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>
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>
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>
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>
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>
584 <td class="datatype_keyword"> </td>
585 <td class="function_name"><a class="link" href="GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable">GDBusInterfaceVTable</a></td>
588 <td class="datatype_keyword"> </td>
589 <td class="function_name"><a class="link" href="GDBusConnection.html#GDBusSubtreeVTable" title="GDBusSubtreeVTable">GDBusSubtreeVTable</a></td>
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>
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
604 <div class="refsect1">
605 <a name="GDBusConnection.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
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>
610 <div class="refsect1">
611 <a name="GDBusConnection.includes"></a><h2>Includes</h2>
612 <pre class="synopsis">#include <gio/gio.h>
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
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>
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>
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>
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>
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>
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">
683 <col width="150px" class="parameters_name">
684 <col class="parameters_description">
685 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
707 <td class="parameter_annotations"> </td>
712 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
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">
733 <col width="150px" class="parameters_name">
734 <col class="parameters_description">
735 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
759 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
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>
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">
788 <col width="150px" class="parameters_name">
789 <col class="parameters_description">
790 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
818 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
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>
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
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
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">
856 <col width="150px" class="parameters_name">
857 <col class="parameters_description">
858 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
895 <td class="parameter_annotations"> </td>
900 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
913 <col width="150px" class="parameters_name">
914 <col class="parameters_description">
915 <col width="200px" class="parameters_annotations">
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>
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>
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>
936 with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
938 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
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>
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">
970 <col width="150px" class="parameters_name">
971 <col class="parameters_description">
972 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
1013 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
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>
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
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
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">
1049 <col width="150px" class="parameters_name">
1050 <col class="parameters_description">
1051 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
1083 <td class="parameter_annotations"> </td>
1088 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
1102 <col width="150px" class="parameters_name">
1103 <col class="parameters_description">
1104 <col width="200px" class="parameters_annotations">
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>
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>
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>
1125 <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
1127 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
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>
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">
1158 <col width="150px" class="parameters_name">
1159 <col class="parameters_description">
1160 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
1195 <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
1197 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
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>
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">
1215 <col width="150px" class="parameters_name">
1216 <col class="parameters_description">
1217 <col width="200px" class="parameters_annotations">
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>
1226 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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
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">
1265 <col width="150px" class="parameters_name">
1266 <col class="parameters_description">
1267 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
1290 <td class="parameter_annotations"> </td>
1295 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
1309 <col width="150px" class="parameters_name">
1310 <col class="parameters_description">
1311 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
1338 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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
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">
1356 <col width="150px" class="parameters_name">
1357 <col class="parameters_description">
1358 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
1384 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
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">
1397 <col width="150px" class="parameters_name">
1398 <col class="parameters_description">
1399 <col width="200px" class="parameters_annotations">
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>
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>
1412 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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
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">
1441 <col width="150px" class="parameters_name">
1442 <col class="parameters_description">
1443 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
1466 <td class="parameter_annotations"> </td>
1471 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
1485 <col width="150px" class="parameters_name">
1486 <col class="parameters_description">
1487 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
1514 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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
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">
1532 <col width="150px" class="parameters_name">
1533 <col class="parameters_description">
1534 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
1560 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
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">
1575 <col width="150px" class="parameters_name">
1576 <col class="parameters_description">
1577 <col width="200px" class="parameters_annotations">
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>
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>
1590 closed by the remote peer</p>
1592 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
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
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">
1615 <col width="150px" class="parameters_name">
1616 <col class="parameters_description">
1617 <col width="200px" class="parameters_annotations">
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>
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>
1635 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
1650 <col width="150px" class="parameters_name">
1651 <col class="parameters_description">
1652 <col width="200px" class="parameters_annotations">
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>
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>
1666 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
1679 <col width="150px" class="parameters_name">
1680 <col class="parameters_description">
1681 <col width="200px" class="parameters_annotations">
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>
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>
1696 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
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">
1712 <col width="150px" class="parameters_name">
1713 <col class="parameters_description">
1714 <col width="200px" class="parameters_annotations">
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>
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>
1727 bus connection. Do not free this string, it is owned by
1728 <em class="parameter"><code>connection</code></em>
1731 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
1743 <col width="150px" class="parameters_name">
1744 <col class="parameters_description">
1745 <col width="200px" class="parameters_annotations">
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>
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>
1758 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
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">
1779 <col width="150px" class="parameters_name">
1780 <col class="parameters_description">
1781 <col width="200px" class="parameters_annotations">
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>
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>
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>
1797 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
1813 <col width="150px" class="parameters_name">
1814 <col class="parameters_description">
1815 <col width="200px" class="parameters_annotations">
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>
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>
1829 <p class="since">Since: <a class="link" href="api-index-2-34.html#api-index-2.34">2.34</a></p>
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>
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>
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>
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>
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">
1874 <td class="listing_lines" align="right"><pre>1
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">"org.freedesktop.StringThings"</span><span class="gtkdoc opt">,</span>
1890 <span class="string">"/org/freedesktop/StringThings"</span><span class="gtkdoc opt">,</span>
1891 <span class="string">"org.freedesktop.StringThings"</span><span class="gtkdoc opt">,</span>
1892 <span class="string">"TwoStrings"</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">"(ss)"</span><span class="gtkdoc opt">,</span>
1894 <span class="string">"Thing One"</span><span class="gtkdoc opt">,</span>
1895 <span class="string">"Thing Two"</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>
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
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">
1923 <col width="150px" class="parameters_name">
1924 <col class="parameters_description">
1925 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
1993 <td class="parameter_annotations"> </td>
1998 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
2012 <col width="150px" class="parameters_name">
2013 <col class="parameters_description">
2014 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
2041 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
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>
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>
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>
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">
2086 <td class="listing_lines" align="right"><pre>1
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">"org.freedesktop.StringThings"</span><span class="gtkdoc opt">,</span>
2101 <span class="string">"/org/freedesktop/StringThings"</span><span class="gtkdoc opt">,</span>
2102 <span class="string">"org.freedesktop.StringThings"</span><span class="gtkdoc opt">,</span>
2103 <span class="string">"TwoStrings"</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">"(ss)"</span><span class="gtkdoc opt">,</span>
2105 <span class="string">"Thing One"</span><span class="gtkdoc opt">,</span>
2106 <span class="string">"Thing Two"</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">&</span>error<span class="gtkdoc opt">);</span></pre></td>
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
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">
2125 <col width="150px" class="parameters_name">
2126 <col class="parameters_description">
2127 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
2198 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
2224 <col width="150px" class="parameters_name">
2225 <col class="parameters_description">
2226 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
2299 <td class="parameter_annotations"> </td>
2304 <p class="since">Since: <a class="link" href="api-index-2-30.html#api-index-2.30">2.30</a></p>
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">
2320 <col width="150px" class="parameters_name">
2321 <col class="parameters_description">
2322 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
2355 <p class="since">Since: <a class="link" href="api-index-2-30.html#api-index-2.30">2.30</a></p>
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">
2381 <col width="150px" class="parameters_name">
2382 <col class="parameters_description">
2383 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
2464 <p class="since">Since: <a class="link" href="api-index-2-30.html#api-index-2.30">2.30</a></p>
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">
2485 <col width="150px" class="parameters_name">
2486 <col class="parameters_description">
2487 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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>
2535 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
2553 <col width="150px" class="parameters_name">
2554 <col class="parameters_description">
2555 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
2596 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
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>
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>
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>
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>
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>
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">
2650 <col width="150px" class="parameters_name">
2651 <col class="parameters_description">
2652 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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
2694 <td class="parameter_annotations"> </td>
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>
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>
2705 <td class="parameter_annotations"> </td>
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>
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>
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>
2721 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
2734 <col width="150px" class="parameters_name">
2735 <col class="parameters_description">
2736 <col width="200px" class="parameters_annotations">
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>
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>
2753 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
2767 <p>Unless <em class="parameter"><code>flags</code></em>
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>
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>
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>
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">
2793 <col width="150px" class="parameters_name">
2794 <col class="parameters_description">
2795 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
2834 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
2852 <p>Unless <em class="parameter"><code>flags</code></em>
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>
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>
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>
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>
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">
2887 <col width="150px" class="parameters_name">
2888 <col class="parameters_description">
2889 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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>
2935 <td class="parameter_annotations"> </td>
2940 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
2963 <col width="150px" class="parameters_name">
2964 <col class="parameters_description">
2965 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
2991 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
2993 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
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>
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>
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>
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>
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">
3046 <col width="150px" class="parameters_name">
3047 <col class="parameters_description">
3048 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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>
3098 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
3100 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
3115 <div class="informalexample">
3116 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
3119 <td class="listing_lines" align="right"><pre>1
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">/<!-- -->*</span> inspect @message <span class="gtkdoc opt">*<!-- -->/</span>
3135 <span class="keyword">return</span> message<span class="gtkdoc opt">;</span>
3136 <span class="gtkdoc opt">}</span></pre></td>
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">
3148 <td class="listing_lines" align="right"><pre>1
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>
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">
3185 <td class="listing_lines" align="right"><pre>1
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>
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">, &</span>error<span class="gtkdoc opt">);</span>
3214 <span class="gtkdoc opt">/<!-- -->*</span> handle @error being is set <span class="gtkdoc opt">*<!-- -->/</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>
3217 <span class="gtkdoc opt">/<!-- -->*</span> modify @copy <span class="gtkdoc opt">*<!-- -->/</span>
3219 <span class="keyword">return</span> copy<span class="gtkdoc opt">;</span>
3220 <span class="gtkdoc opt">}</span></pre></td>
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>
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 <emphasis>standard error</emphasis>. 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>
3237 <div class="refsect3">
3238 <a name="GDBusMessageFilterFunction.parameters"></a><h4>Parameters</h4>
3239 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3241 <col width="150px" class="parameters_name">
3242 <col class="parameters_description">
3243 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
3278 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
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>
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">
3319 <col width="150px" class="parameters_name">
3320 <col class="parameters_description">
3321 <col width="200px" class="parameters_annotations">
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>
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>
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>
3338 <td class="parameter_annotations"> </td>
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>
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>
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>
3355 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
3374 <col width="150px" class="parameters_name">
3375 <col class="parameters_description">
3376 <col width="200px" class="parameters_annotations">
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>
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>
3392 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
3412 <col width="150px" class="parameters_name">
3413 <col class="parameters_description">
3414 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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>
3461 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
3480 <col width="150px" class="parameters_name">
3481 <col class="parameters_description">
3482 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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>
3532 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
3552 <col width="150px" class="parameters_name">
3553 <col class="parameters_description">
3554 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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>
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>
3607 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
3622 D-Bus interface that is described in <em class="parameter"><code>interface_info</code></em>
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>
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>
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>
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>
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>
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>
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>
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">
3667 <col width="150px" class="parameters_name">
3668 <col class="parameters_description">
3669 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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>
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>
3717 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
3730 <col width="150px" class="parameters_name">
3731 <col class="parameters_description">
3732 <col width="200px" class="parameters_annotations">
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>
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>
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>
3753 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
3774 <col width="150px" class="parameters_name">
3775 <col class="parameters_description">
3776 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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>
3823 <p class="since">Since: <a class="link" href="api-index-2-46.html#api-index-2.46">2.46</a></p>
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">
3846 <col width="150px" class="parameters_name">
3847 <col class="parameters_description">
3848 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
3880 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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
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>
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>
3908 <div class="refsect3">
3909 <a name="GDBusSubtreeIntrospectFunc.parameters"></a><h4>Parameters</h4>
3910 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3912 <col width="150px" class="parameters_name">
3913 <col class="parameters_description">
3914 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
3952 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
3974 <col width="150px" class="parameters_name">
3975 <col class="parameters_description">
3976 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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>
4024 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
4042 convey, to remote callers, what nodes exist in the subtree rooted
4043 by <em class="parameter"><code>object_path</code></em>
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
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>
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
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
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">
4078 <col width="150px" class="parameters_name">
4079 <col class="parameters_description">
4080 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
4108 <td class="parameter_annotations"> </td>
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>
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>
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>
4129 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
4142 <col width="150px" class="parameters_name">
4143 <col class="parameters_description">
4144 <col width="200px" class="parameters_annotations">
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>
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>
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>
4165 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
4177 <col width="300px" class="enum_members_name">
4178 <col class="enum_members_description">
4179 <col width="200px" class="enum_members_annotations">
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>
4187 <td class="enum_member_annotations"> </td>
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>
4194 <td class="enum_member_annotations"> </td>
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>
4201 <td class="enum_member_annotations"> </td>
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>
4208 <td class="enum_member_annotations"> </td>
4213 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
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">
4231 <col width="300px" class="enum_members_name">
4232 <col class="enum_members_description">
4233 <col width="200px" class="enum_members_annotations">
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>
4241 <td class="enum_member_annotations"> </td>
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>
4248 <td class="enum_member_annotations"> </td>
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>
4255 <td class="enum_member_annotations"> </td>
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">
4261 authenticating as a server, allow the anonymous authentication
4264 <td class="enum_member_annotations"> </td>
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>
4272 <td class="enum_member_annotations"> </td>
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>
4280 <td class="enum_member_annotations"> </td>
4285 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
4295 <col width="300px" class="enum_members_name">
4296 <col class="enum_members_description">
4297 <col width="200px" class="enum_members_annotations">
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>
4305 <td class="enum_member_annotations"> </td>
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">
4311 supports exchanging UNIX file descriptors with the remote peer.</p>
4313 <td class="enum_member_annotations"> </td>
4318 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
4328 <col width="300px" class="enum_members_name">
4329 <col class="enum_members_description">
4330 <col width="200px" class="enum_members_annotations">
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>
4338 <td class="enum_member_annotations"> </td>
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
4347 <td class="enum_member_annotations"> </td>
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>
4355 <td class="enum_member_annotations"> </td>
4360 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
4370 <col width="300px" class="enum_members_name">
4371 <col class="enum_members_description">
4372 <col width="200px" class="enum_members_annotations">
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>
4380 <td class="enum_member_annotations"> </td>
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>
4389 <td class="enum_member_annotations"> </td>
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>
4397 <td class="enum_member_annotations"> </td>
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>
4406 <td class="enum_member_annotations"> </td>
4411 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
4421 <col width="300px" class="enum_members_name">
4422 <col class="enum_members_description">
4423 <col width="200px" class="enum_members_annotations">
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>
4431 <td class="enum_member_annotations"> </td>
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>
4440 <td class="enum_member_annotations"> </td>
4445 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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;
4456 <p>Virtual table for handling properties and method calls for a D-Bus
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>
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>
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>
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>
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">
4501 <col width="300px" class="struct_members_name">
4502 <col class="struct_members_description">
4503 <col width="200px" class="struct_members_annotations">
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>
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>
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>
4524 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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;
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">
4540 <col width="300px" class="struct_members_name">
4541 <col class="struct_members_description">
4542 <col width="200px" class="struct_members_annotations">
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>
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>
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>
4563 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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">
4573 <col width="300px" class="enum_members_name">
4574 <col class="enum_members_description">
4575 <col width="200px" class="enum_members_annotations">
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>
4583 <td class="enum_member_annotations"> </td>
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>
4592 <td class="enum_member_annotations"> </td>
4597 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
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>
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>
4626 <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
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>
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>
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
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>
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>
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
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
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>
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>
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>
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>
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>
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>
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
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">
4734 <col width="150px" class="parameters_name">
4735 <col class="parameters_description">
4736 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
4769 <div class="footer">
4770 <hr>Generated by GTK-Doc V1.25.1</div>