blob: e20d7e0ff89b936e6e68d6810cb6c00117a340c4 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GDBusConnection: GIO Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GIO Reference Manual">
<link rel="up" href="gdbus-lowlevel.html" title="Low-level D-Bus Support">
<link rel="prev" href="GDBusMessage.html" title="GDBusMessage">
<link rel="next" href="GDBusMethodInvocation.html" title="GDBusMethodInvocation">
<meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
<a href="#GDBusConnection.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#GDBusConnection.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces">  <span class="dim">|</span> 
<a href="#GDBusConnection.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties">  <span class="dim">|</span> 
<a href="#GDBusConnection.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
<a href="#GDBusConnection.signals" class="shortcut">Signals</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="gdbus-lowlevel.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GDBusMessage.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GDBusMethodInvocation.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GDBusConnection"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GDBusConnection.top_of_page"></a>GDBusConnection</span></h2>
<p>GDBusConnection — D-Bus Connections</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GDBusConnection.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GDBusConnection.html#g-bus-get" title="g_bus_get ()">g_bus_get</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GIOStream.html" title="GIOStream"><span class="returnvalue">GIOStream</span></a> *
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GDBusConnection.html#GDBusCapabilityFlags" title="enum GDBusCapabilityFlags"><span class="returnvalue">GDBusCapabilityFlags</span></a>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GCredentials.html" title="GCredentials"><span class="returnvalue">GCredentials</span></a> *
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="returnvalue">GDBusMessage</span></a> *
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="returnvalue">GDBusMessage</span></a> *
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="returnvalue">GDBusMessage</span></a> *
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gio-D-Bus-Introspection-Data.html#GDBusInterfaceInfo"><span class="returnvalue">GDBusInterfaceInfo</span></a> **
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="returnvalue">GDBusInterfaceVTable</span></a> *
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<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>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<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>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GDBusConnection.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type">
<a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="GDBusConnection.html#GDBusConnection--address" title="The “address” property">address</a></td>
<td class="property_flags">Write / Construct Only</td>
</tr>
<tr>
<td class="property_type">
<a class="link" href="GDBusAuthObserver.html" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> *</td>
<td class="property_name"><a class="link" href="GDBusConnection.html#GDBusConnection--authentication-observer" title="The “authentication-observer” property">authentication-observer</a></td>
<td class="property_flags">Write / Construct Only</td>
</tr>
<tr>
<td class="property_type"><a class="link" href="GDBusConnection.html#GDBusCapabilityFlags" title="enum GDBusCapabilityFlags"><span class="type">GDBusCapabilityFlags</span></a></td>
<td class="property_name"><a class="link" href="GDBusConnection.html#GDBusConnection--capabilities" title="The “capabilities” property">capabilities</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type"><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="GDBusConnection.html#GDBusConnection--closed" title="The “closed” property">closed</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type"><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<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>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a class="link" href="GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags"><span class="type">GDBusConnectionFlags</span></a></td>
<td class="property_name"><a class="link" href="GDBusConnection.html#GDBusConnection--flags" title="The “flags” property">flags</a></td>
<td class="property_flags">Write / Construct Only</td>
</tr>
<tr>
<td class="property_type">
<a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="GDBusConnection.html#GDBusConnection--guid" title="The “guid” property">guid</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
<tr>
<td class="property_type">
<a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *</td>
<td class="property_name"><a class="link" href="GDBusConnection.html#GDBusConnection--stream" title="The “stream” property">stream</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
<tr>
<td class="property_type">
<a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="GDBusConnection.html#GDBusConnection--unique-name" title="The “unique-name” property">unique-name</a></td>
<td class="property_flags">Read</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GDBusConnection.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signals_return">
<col width="300px" class="signals_name">
<col width="200px" class="signals_flags">
</colgroup>
<tbody><tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GDBusConnection.html#GDBusConnection-closed" title="The “closed” signal">closed</a></td>
<td class="signal_flags"><a href="../gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GDBusConnection.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GDBusConnection.html#GBusType" title="enum GBusType">GBusType</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GDBusConnection.html#GDBusConnection-struct" title="GDBusConnection">GDBusConnection</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags">GDBusConnectionFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GDBusConnection.html#GDBusCapabilityFlags" title="enum GDBusCapabilityFlags">GDBusCapabilityFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GDBusConnection.html#GDBusCallFlags" title="enum GDBusCallFlags">GDBusCallFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GDBusConnection.html#GDBusSignalFlags" title="enum GDBusSignalFlags">GDBusSignalFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GDBusConnection.html#GDBusSendMessageFlags" title="enum GDBusSendMessageFlags">GDBusSendMessageFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable">GDBusInterfaceVTable</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GDBusConnection.html#GDBusSubtreeVTable" title="GDBusSubtreeVTable">GDBusSubtreeVTable</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GDBusConnection.html#GDBusSubtreeFlags" title="enum GDBusSubtreeFlags">GDBusSubtreeFlags</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GDBusConnection.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="../gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
<span class="lineart">╰──</span> GDBusConnection
</pre>
</div>
<div class="refsect1">
<a name="GDBusConnection.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GDBusConnection implements
<a class="link" href="GInitable.html" title="GInitable">GInitable</a> and <a class="link" href="GAsyncInitable.html" title="GAsyncInitable">GAsyncInitable</a>.</p>
</div>
<div class="refsect1">
<a name="GDBusConnection.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gio/gio.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GDBusConnection.description"></a><h2>Description</h2>
<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
peers such as a message buses. It is a low-level API that offers a
lot of flexibility. For instance, it lets you establish a connection
over any transport that can by represented as an <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a>.</p>
<p>This class is rarely used directly in D-Bus clients. If you are writing
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>,
<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>
<p>As an exception to the usual GLib rule that a particular object must not
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
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>
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>
<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
(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
<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
initialized connection. Language bindings for GIO should use
<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
connection.</p>
<p>If you construct an uninitialized <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a>, such as via
<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
<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.
Calling methods or accessing properties on a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> that has not
completed initialization successfully is considered to be invalid, and leads
to undefined behaviour. In particular, if initialization fails with a
<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
free it with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
<div class="refsect3">
<a name="gdbus-server"></a><h4>An example D-Bus server</h4>
<p>Here is an example for a D-Bus server:
<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>
</div>
<div class="refsect3">
<a name="gdbus-subtree-server"></a><h4>An example for exporting a subtree</h4>
<p>Here is an example for exporting a subtree:
<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>
</div>
<div class="refsect3">
<a name="gdbus-unix-fd-client"></a><h4>An example for file descriptor passing</h4>
<p>Here is an example for passing UNIX file descriptors:
<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>
</div>
<div class="refsect3">
<a name="gdbus-export"></a><h4>An example for exporting a GObject</h4>
<p>Here is an example for exporting a <a href="../gobject-The-Base-Object-Type.html#GObject-struct"><span class="type">GObject</span></a>:
<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>
</div>
</div>
<div class="refsect1">
<a name="GDBusConnection.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="g-bus-get"></a><h3>g_bus_get ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
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>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>Asynchronously connects to the message bus specified by <em class="parameter"><code>bus_type</code></em>
.</p>
<p>When the operation is finished, <em class="parameter"><code>callback</code></em>
will be invoked. You can
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>
<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
the synchronous version.</p>
<div class="refsect3">
<a name="g-bus-get.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bus_type</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html#GBusType" title="enum GBusType"><span class="type">GBusType</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<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>
<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>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<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>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>the data to pass to <em class="parameter"><code>callback</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-bus-get-finish"></a><h3>g_bus_get_finish ()</h3>
<pre class="programlisting"><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
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>,
<em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<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>
<p>The returned object is a singleton, that is, shared with other
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>
. In the
event that you need a private message bus connection, use
<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
<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>
<p>Note that the returned <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> object will (usually) have
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>
<div class="refsect3">
<a name="g-bus-get-finish.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>res</p></td>
<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-bus-get" title="g_bus_get ()"><code class="function">g_bus_get()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<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>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-bus-get-finish.returns"></a><h4>Returns</h4>
<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>
is set.
Free with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-bus-get-sync"></a><h3>g_bus_get_sync ()</h3>
<pre class="programlisting"><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
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>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Synchronously connects to the message bus specified by <em class="parameter"><code>bus_type</code></em>
.
Note that the returned object may shared with other callers,
e.g. if two separate parts of a process calls this function with
the same <em class="parameter"><code>bus_type</code></em>
, they will share the same object.</p>
<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
<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>
<p>The returned object is a singleton, that is, shared with other
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>
. In the
event that you need a private message bus connection, use
<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
<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>
<p>Note that the returned <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> object will (usually) have
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>
<div class="refsect3">
<a name="g-bus-get-sync.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bus_type</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html#GBusType" title="enum GBusType"><span class="type">GBusType</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<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>
<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>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<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>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-bus-get-sync.returns"></a><h4>Returns</h4>
<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>
is set.
Free with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-new"></a><h3>g_dbus_connection_new ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
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>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *guid</code></em>,
<em class="parameter"><code><a class="link" href="GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags"><span class="type">GDBusConnectionFlags</span></a> flags</code></em>,
<em class="parameter"><code><a class="link" href="GDBusAuthObserver.html" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> *observer</code></em>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>Asynchronously sets up a D-Bus connection for exchanging D-Bus messages
with the end represented by <em class="parameter"><code>stream</code></em>
.</p>
<p>If <em class="parameter"><code>stream</code></em>
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>
will be put into non-blocking mode.</p>
<p>The D-Bus connection will interact with <em class="parameter"><code>stream</code></em>
from a worker thread.
As a result, the caller should not interact with <em class="parameter"><code>stream</code></em>
after this
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>
<p>If <em class="parameter"><code>observer</code></em>
is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> it may be used to control the
authentication process.</p>
<p>When the operation is finished, <em class="parameter"><code>callback</code></em>
will be invoked. You can
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
operation.</p>
<p>This is a asynchronous failable constructor. See
<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
version.</p>
<div class="refsect3">
<a name="g-dbus-connection-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>stream</p></td>
<td class="parameter_description"><p>a <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>guid</p></td>
<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>
<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>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags describing how to make the connection</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>observer</p></td>
<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>
<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>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<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>
<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>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<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>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>the data to pass to <em class="parameter"><code>callback</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-new-finish"></a><h3>g_dbus_connection_new_finish ()</h3>
<pre class="programlisting"><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
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>,
<em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<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>
<div class="refsect3">
<a name="g-dbus-connection-new-finish.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>res</p></td>
<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-new" title="g_dbus_connection_new ()"><code class="function">g_dbus_connection_new()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<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>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-dbus-connection-new-finish.returns"></a><h4>Returns</h4>
<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>
is set. Free
with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-new-sync"></a><h3>g_dbus_connection_new_sync ()</h3>
<pre class="programlisting"><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
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>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *guid</code></em>,
<em class="parameter"><code><a class="link" href="GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags"><span class="type">GDBusConnectionFlags</span></a> flags</code></em>,
<em class="parameter"><code><a class="link" href="GDBusAuthObserver.html" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> *observer</code></em>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Synchronously sets up a D-Bus connection for exchanging D-Bus messages
with the end represented by <em class="parameter"><code>stream</code></em>
.</p>
<p>If <em class="parameter"><code>stream</code></em>
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>
will be put into non-blocking mode.</p>
<p>The D-Bus connection will interact with <em class="parameter"><code>stream</code></em>
from a worker thread.
As a result, the caller should not interact with <em class="parameter"><code>stream</code></em>
after this
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>
<p>If <em class="parameter"><code>observer</code></em>
is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> it may be used to control the
authentication process.</p>
<p>This is a synchronous failable constructor. See
<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>
<div class="refsect3">
<a name="g-dbus-connection-new-sync.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>stream</p></td>
<td class="parameter_description"><p>a <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>guid</p></td>
<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>
<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>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags describing how to make the connection</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>observer</p></td>
<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>
<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>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<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>
<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>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<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>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-dbus-connection-new-sync.returns"></a><h4>Returns</h4>
<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>
is set. Free with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-new-for-address"></a><h3>g_dbus_connection_new_for_address ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
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>,
<em class="parameter"><code><a class="link" href="GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags"><span class="type">GDBusConnectionFlags</span></a> flags</code></em>,
<em class="parameter"><code><a class="link" href="GDBusAuthObserver.html" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> *observer</code></em>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>Asynchronously connects and sets up a D-Bus client connection for
exchanging D-Bus messages with an endpoint specified by <em class="parameter"><code>address</code></em>
which must be in the D-Bus address format.</p>
<p>This constructor can only be used to initiate client-side
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
server. In particular, <em class="parameter"><code>flags</code></em>
cannot contain the
<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
<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>
<p>When the operation is finished, <em class="parameter"><code>callback</code></em>
will be invoked. You can
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
operation.</p>
<p>If <em class="parameter"><code>observer</code></em>
is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> it may be used to control the
authentication process.</p>
<p>This is a asynchronous failable constructor. See
<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
version.</p>
<div class="refsect3">
<a name="g-dbus-connection-new-for-address.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>address</p></td>
<td class="parameter_description"><p>a D-Bus address</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags describing how to make the connection</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>observer</p></td>
<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>
<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>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<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>
<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>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<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>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>the data to pass to <em class="parameter"><code>callback</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-new-for-address-finish"></a><h3>g_dbus_connection_new_for_address_finish ()</h3>
<pre class="programlisting"><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
g_dbus_connection_new_for_address_finish
(<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
<em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<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>
<div class="refsect3">
<a name="g-dbus-connection-new-for-address-finish.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>res</p></td>
<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-new" title="g_dbus_connection_new ()"><code class="function">g_dbus_connection_new()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<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>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-dbus-connection-new-for-address-finish.returns"></a><h4>Returns</h4>
<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>
is set. Free with
<a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-new-for-address-sync"></a><h3>g_dbus_connection_new_for_address_sync ()</h3>
<pre class="programlisting"><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
g_dbus_connection_new_for_address_sync
(<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *address</code></em>,
<em class="parameter"><code><a class="link" href="GDBusConnection.html#GDBusConnectionFlags" title="enum GDBusConnectionFlags"><span class="type">GDBusConnectionFlags</span></a> flags</code></em>,
<em class="parameter"><code><a class="link" href="GDBusAuthObserver.html" title="GDBusAuthObserver"><span class="type">GDBusAuthObserver</span></a> *observer</code></em>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Synchronously connects and sets up a D-Bus client connection for
exchanging D-Bus messages with an endpoint specified by <em class="parameter"><code>address</code></em>
which must be in the D-Bus address format.</p>
<p>This constructor can only be used to initiate client-side
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
as the server. In particular, <em class="parameter"><code>flags</code></em>
cannot contain the
<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
<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>
<p>This is a synchronous failable constructor. See
<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>
<p>If <em class="parameter"><code>observer</code></em>
is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> it may be used to control the
authentication process.</p>
<div class="refsect3">
<a name="g-dbus-connection-new-for-address-sync.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>address</p></td>
<td class="parameter_description"><p>a D-Bus address</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags describing how to make the connection</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>observer</p></td>
<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>
<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>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<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>
<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>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<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>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-dbus-connection-new-for-address-sync.returns"></a><h4>Returns</h4>
<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>
is set. Free with
<a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-start-message-processing"></a><h3>g_dbus_connection_start_message_processing ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_dbus_connection_start_message_processing
(<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);</pre>
<p>If <em class="parameter"><code>connection</code></em>
was created with
<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
starts processing messages. Does nothing on if <em class="parameter"><code>connection</code></em>
wasn't
created with this flag or if the method has already been called.</p>
<div class="refsect3">
<a name="g-dbus-connection-start-message-processing.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-close"></a><h3>g_dbus_connection_close ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
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>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>Closes <em class="parameter"><code>connection</code></em>
. Note that this never causes the process to
exit (this might only happen if the other end of a shared message
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>
<p>Once the connection is closed, operations such as sending a message
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
will not automatically flush the connection so queued messages may
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>
<p>If <em class="parameter"><code>connection</code></em>
is already closed, this method fails with
<a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a>.</p>
<p>When <em class="parameter"><code>connection</code></em>
has been closed, the <a class="link" href="GDBusConnection.html#GDBusConnection-closed" title="The “closed” signal"><span class="type">“closed”</span></a>
signal is emitted in the
<a href="../glib-The-Main-Event-Loop.html#g-main-context-push-thread-default">thread-default main context</a>
of the thread that <em class="parameter"><code>connection</code></em>
was constructed in.</p>
<p>This is an asynchronous method. When the operation is finished,
<em class="parameter"><code>callback</code></em>
will be invoked in the
<a href="../glib-The-Main-Event-Loop.html#g-main-context-push-thread-default">thread-default main context</a>
of the thread you are calling this method from. You can
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
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
version.</p>
<div class="refsect3">
<a name="g-dbus-connection-close.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<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>
<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>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<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 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>
<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>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>The data to pass to <em class="parameter"><code>callback</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-close-finish"></a><h3>g_dbus_connection_close_finish ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
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>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
<em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<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>
<div class="refsect3">
<a name="g-dbus-connection-close-finish.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<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-close" title="g_dbus_connection_close ()"><code class="function">g_dbus_connection_close()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<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>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-dbus-connection-close-finish.returns"></a><h4>Returns</h4>
<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>
is set</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-close-sync"></a><h3>g_dbus_connection_close_sync ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
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>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Synchronously closees <em class="parameter"><code>connection</code></em>
. The calling thread is blocked
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
asynchronous version of this method and more details about what it
does.</p>
<div class="refsect3">
<a name="g-dbus-connection-close-sync.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<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>
<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>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<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>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-dbus-connection-close-sync.returns"></a><h4>Returns</h4>
<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>
is set</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-is-closed"></a><h3>g_dbus_connection_is_closed ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
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>
<p>Gets whether <em class="parameter"><code>connection</code></em>
is closed.</p>
<div class="refsect3">
<a name="g-dbus-connection-is-closed.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-dbus-connection-is-closed.returns"></a><h4>Returns</h4>
<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>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-flush"></a><h3>g_dbus_connection_flush ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
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>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>Asynchronously flushes <em class="parameter"><code>connection</code></em>
, that is, writes all queued
outgoing message to the transport and then flushes the transport
(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
that wants to emit a D-Bus signal and then exit immediately. Without
flushing the connection, there is no guaranteed that the message has
been sent to the networking buffers in the OS kernel.</p>
<p>This is an asynchronous method. When the operation is finished,
<em class="parameter"><code>callback</code></em>
will be invoked in the
<a href="../glib-The-Main-Event-Loop.html#g-main-context-push-thread-default">thread-default main context</a>
of the thread you are calling this method from. You can
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
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
version.</p>
<div class="refsect3">
<a name="g-dbus-connection-flush.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<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>
<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>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<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 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>
<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>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>The data to pass to <em class="parameter"><code>callback</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-flush-finish"></a><h3>g_dbus_connection_flush_finish ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
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>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
<em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<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>
<div class="refsect3">
<a name="g-dbus-connection-flush-finish.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<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-flush" title="g_dbus_connection_flush ()"><code class="function">g_dbus_connection_flush()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<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>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-dbus-connection-flush-finish.returns"></a><h4>Returns</h4>
<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>
is set</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-flush-sync"></a><h3>g_dbus_connection_flush_sync ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
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>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Synchronously flushes <em class="parameter"><code>connection</code></em>
. The calling thread is blocked
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
asynchronous version of this method and more details about what it
does.</p>
<div class="refsect3">
<a name="g-dbus-connection-flush-sync.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<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>
<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>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<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>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-dbus-connection-flush-sync.returns"></a><h4>Returns</h4>
<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>
is set</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-get-exit-on-close"></a><h3>g_dbus_connection_get_exit_on_close ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
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>
<p>Gets whether the process is terminated when <em class="parameter"><code>connection</code></em>
is
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 more details.</p>
<div class="refsect3">
<a name="g-dbus-connection-get-exit-on-close.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-dbus-connection-get-exit-on-close.returns"></a><h4>Returns</h4>
<p> whether the process is terminated when <em class="parameter"><code>connection</code></em>
is
closed by the remote peer</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-set-exit-on-close"></a><h3>g_dbus_connection_set_exit_on_close ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
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>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> exit_on_close</code></em>);</pre>
<p>Sets whether the process should be terminated when <em class="parameter"><code>connection</code></em>
is
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
more details.</p>
<p>Note that this function should be used with care. Most modern UNIX
desktops tie the notion of a user session the session bus, and expect
all of a users applications to quit when their bus connection goes away.
If you are setting <em class="parameter"><code>exit_on_close</code></em>
to <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> for the shared session
bus connection, you should make sure that your application exits
when the user session ends.</p>
<div class="refsect3">
<a name="g-dbus-connection-set-exit-on-close.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>exit_on_close</p></td>
<td class="parameter_description"><p>whether the process should be terminated
when <em class="parameter"><code>connection</code></em>
is closed by the remote peer</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-get-stream"></a><h3>g_dbus_connection_get_stream ()</h3>
<pre class="programlisting"><a class="link" href="GIOStream.html" title="GIOStream"><span class="returnvalue">GIOStream</span></a> *
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>
<p>Gets the underlying stream used for IO.</p>
<p>While the <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> is active, it will interact with this
stream from a worker thread, so it is not safe to interact with
the stream directly.</p>
<div class="refsect3">
<a name="g-dbus-connection-get-stream.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-dbus-connection-get-stream.returns"></a><h4>Returns</h4>
<p> the stream used for IO. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-get-guid"></a><h3>g_dbus_connection_get_guid ()</h3>
<pre class="programlisting">const <a href="../glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
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>
<p>The GUID of the peer performing the role of server when
authenticating. See <a class="link" href="GDBusConnection.html#GDBusConnection--guid" title="The “guid” property"><span class="type">“guid”</span></a> for more details.</p>
<div class="refsect3">
<a name="g-dbus-connection-get-guid.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-dbus-connection-get-guid.returns"></a><h4>Returns</h4>
<p> The GUID. Do not free this string, it is owned by
<em class="parameter"><code>connection</code></em>
.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-get-unique-name"></a><h3>g_dbus_connection_get_unique_name ()</h3>
<pre class="programlisting">const <a href="../glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
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>
<p>Gets the unique name of <em class="parameter"><code>connection</code></em>
as assigned by the message
bus. This can also be used to figure out if <em class="parameter"><code>connection</code></em>
is a
message bus connection.</p>
<div class="refsect3">
<a name="g-dbus-connection-get-unique-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-dbus-connection-get-unique-name.returns"></a><h4>Returns</h4>
<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>
is not a message
bus connection. Do not free this string, it is owned by
<em class="parameter"><code>connection</code></em>
.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-get-capabilities"></a><h3>g_dbus_connection_get_capabilities ()</h3>
<pre class="programlisting"><a class="link" href="GDBusConnection.html#GDBusCapabilityFlags" title="enum GDBusCapabilityFlags"><span class="returnvalue">GDBusCapabilityFlags</span></a>
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>
<p>Gets the capabilities negotiated with the remote peer</p>
<div class="refsect3">
<a name="g-dbus-connection-get-capabilities.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-dbus-connection-get-capabilities.returns"></a><h4>Returns</h4>
<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>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-get-peer-credentials"></a><h3>g_dbus_connection_get_peer_credentials ()</h3>
<pre class="programlisting"><a class="link" href="GCredentials.html" title="GCredentials"><span class="returnvalue">GCredentials</span></a> *
g_dbus_connection_get_peer_credentials
(<em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);</pre>
<p>Gets the credentials of the authenticated peer. This will always
return <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> unless <em class="parameter"><code>connection</code></em>
acted as a server
(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)
when set up and the client passed credentials as part of the
authentication process.</p>
<p>In a message bus setup, the message bus is always the server and
each application is a client. So this method will always return
<a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for message bus clients.</p>
<div class="refsect3">
<a name="g-dbus-connection-get-peer-credentials.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-dbus-connection-get-peer-credentials.returns"></a><h4>Returns</h4>
<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
available. Do not free this object, it is owned by <em class="parameter"><code>connection</code></em>
. </p>
<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>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-get-last-serial"></a><h3>g_dbus_connection_get_last_serial ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>
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>
<p>Retrieves the last serial number assigned to a <a class="link" href="GDBusMessage.html" title="GDBusMessage"><span class="type">GDBusMessage</span></a> on
the current thread. This includes messages sent via both low-level
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
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>,
<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>
<div class="refsect3">
<a name="g-dbus-connection-get-last-serial.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-dbus-connection-get-last-serial.returns"></a><h4>Returns</h4>
<p> the last used serial or zero when no message has been sent
within the current thread</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-34.html#api-index-2.34">2.34</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-call"></a><h3>g_dbus_connection_call ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
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>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *bus_name</code></em>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *method_name</code></em>,
<em class="parameter"><code><a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameters</code></em>,
<em class="parameter"><code>const <a href="../glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> *reply_type</code></em>,
<em class="parameter"><code><a class="link" href="GDBusConnection.html#GDBusCallFlags" title="enum GDBusCallFlags"><span class="type">GDBusCallFlags</span></a> flags</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gint"><span class="type">gint</span></a> timeout_msec</code></em>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>Asynchronously invokes the <em class="parameter"><code>method_name</code></em>
method on the
<em class="parameter"><code>interface_name</code></em>
D-Bus interface on the remote object at
<em class="parameter"><code>object_path</code></em>
owned by <em class="parameter"><code>bus_name</code></em>
.</p>
<p>If <em class="parameter"><code>connection</code></em>
is closed then the operation will fail with
<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>
is canceled, the 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>
contains a value
not compatible with the D-Bus protocol, 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>
<p>If <em class="parameter"><code>reply_type</code></em>
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
error will be raised if it does not match. Said another way, if you give a <em class="parameter"><code>reply_type</code></em>
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>
<p>If the <em class="parameter"><code>parameters</code></em>
<a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> is floating, it is consumed. 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>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14</pre></td>
<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="normal"> </span><span class="symbol">(</span><span class="normal">connection</span><span class="symbol">,</span>
<span class="normal"> </span><span class="string">"org.freedesktop.StringThings"</span><span class="symbol">,</span>
<span class="normal"> </span><span class="string">"/org/freedesktop/StringThings"</span><span class="symbol">,</span>
<span class="normal"> </span><span class="string">"org.freedesktop.StringThings"</span><span class="symbol">,</span>
<span class="normal"> </span><span class="string">"TwoStrings"</span><span class="symbol">,</span>
<span class="normal"> </span><span class="function"><a href="../glib-GVariant.html#g-variant-new">g_variant_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"(ss)"</span><span class="symbol">,</span>
<span class="normal"> </span><span class="string">"Thing One"</span><span class="symbol">,</span>
<span class="normal"> </span><span class="string">"Thing Two"</span><span class="symbol">),</span>
<span class="normal"> <a href="../glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span>
<span class="normal"> <a href="GDBusConnection.html#G-DBUS-CALL-FLAGS-NONE:CAPS">G_DBUS_CALL_FLAGS_NONE</a></span><span class="symbol">,</span>
<span class="normal"> </span><span class="symbol">-</span><span class="number">1</span><span class="symbol">,</span>
<span class="normal"> <a href="../glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span>
<span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="GAsyncResult.html#GAsyncReadyCallback">GAsyncReadyCallback</a></span><span class="symbol">)</span><span class="normal"> two_strings_done</span><span class="symbol">,</span>
<span class="normal"> <a href="../glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<p>This is an asynchronous method. When the operation is finished,
<em class="parameter"><code>callback</code></em>
will be invoked in the
<a href="../glib-The-Main-Event-Loop.html#g-main-context-push-thread-default">thread-default main context</a>
of the thread you are calling this method from. You can then call
<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.
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
function.</p>
<p>If <em class="parameter"><code>callback</code></em>
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
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>
<div class="refsect3">
<a name="g-dbus-connection-call.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>bus_name</p></td>
<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
<em class="parameter"><code>connection</code></em>
is not a message bus connection. </p></td>
<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>
</tr>
<tr>
<td class="parameter_name"><p>object_path</p></td>
<td class="parameter_description"><p>path of remote object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>interface_name</p></td>
<td class="parameter_description"><p>D-Bus interface to invoke method on</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>method_name</p></td>
<td class="parameter_description"><p>the name of the method to invoke</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>parameters</p></td>
<td class="parameter_description"><p> a <a href="../glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple with parameters for the method
or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not passing parameters. </p></td>
<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>
</tr>
<tr>
<td class="parameter_name"><p>reply_type</p></td>
<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>
<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>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<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>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>timeout_msec</p></td>
<td class="parameter_description"><p>the timeout in milliseconds, -1 to use the default
timeout or <a href="../glib-Basic-Types.html#G-MAXINT:CAPS"><code class="literal">G_MAXINT</code></a> for no timeout</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<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>
<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>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<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 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
method invocation. </p></td>
<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>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>the data to pass to <em class="parameter"><code>callback</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-connection-call-finish"></a><h3>g_dbus_connection_call_finish ()</h3>
<pre class="programlisting"><a href="../glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
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>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
<em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<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>
<div class="refsect3">