This commit is contained in:
Matthias Clasen 2010-05-10 08:07:07 -04:00
parent 25a8aa5d88
commit 5d1135618e
2 changed files with 38 additions and 30 deletions

View File

@ -396,10 +396,10 @@ g_dbus_is_supported_address (const gchar *string,
} }
gboolean gboolean
_g_dbus_address_parse_entry (const gchar *address_entry, _g_dbus_address_parse_entry (const gchar *address_entry,
gchar **out_transport_name, gchar **out_transport_name,
GHashTable **out_key_value_pairs, GHashTable **out_key_value_pairs,
GError **error) GError **error)
{ {
gboolean ret; gboolean ret;
GHashTable *key_value_pairs; GHashTable *key_value_pairs;
@ -485,11 +485,11 @@ out:
* making libgio link to libX11... * making libgio link to libX11...
*/ */
static GIOStream * static GIOStream *
g_dbus_address_connect (const gchar *address_entry, g_dbus_address_connect (const gchar *address_entry,
const gchar *transport_name, const gchar *transport_name,
GHashTable *key_value_pairs, GHashTable *key_value_pairs,
GCancellable *cancellable, GCancellable *cancellable,
GError **error) GError **error)
{ {
GIOStream *ret; GIOStream *ret;
GSocketConnectable *connectable; GSocketConnectable *connectable;
@ -669,10 +669,10 @@ g_dbus_address_connect (const gchar *address_entry,
} }
static GIOStream * static GIOStream *
g_dbus_address_try_connect_one (const gchar *address_entry, g_dbus_address_try_connect_one (const gchar *address_entry,
gchar **out_guid, gchar **out_guid,
GCancellable *cancellable, GCancellable *cancellable,
GError **error) GError **error)
{ {
GIOStream *ret; GIOStream *ret;
GHashTable *key_value_pairs; GHashTable *key_value_pairs;
@ -856,10 +856,10 @@ g_dbus_address_get_stream_finish (GAsyncResult *res,
* Since: 2.26 * Since: 2.26
*/ */
GIOStream * GIOStream *
g_dbus_address_get_stream_sync (const gchar *address, g_dbus_address_get_stream_sync (const gchar *address,
gchar **out_guid, gchar **out_guid,
GCancellable *cancellable, GCancellable *cancellable,
GError **error) GError **error)
{ {
GIOStream *ret; GIOStream *ret;
gchar **addr_array; gchar **addr_array;

View File

@ -577,7 +577,7 @@ g_dbus_connection_class_init (GDBusConnectionClass *klass)
* If you are constructing a #GDBusConnection and pass * If you are constructing a #GDBusConnection and pass
* %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT in the * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT in the
* #GDBusConnection:flags property you will be able to read the GUID * #GDBusConnection:flags property you will be able to read the GUID
* of the other peer here after the connection has been succesfully * of the other peer here after the connection has been successfully
* initialized. * initialized.
* *
* Since: 2.26 * Since: 2.26
@ -779,6 +779,16 @@ g_dbus_connection_init (GDBusConnection *connection)
connection->priv->filters = g_ptr_array_new (); connection->priv->filters = g_ptr_array_new ();
} }
/**
* g_dbus_connection_get_stream:
* @connection: a #GDBusConnection
*
* Gets the underlying stream used for IO.
*
* Returns: the stream used for IO
*
* Since: 2.26
*/
GIOStream * GIOStream *
g_dbus_connection_get_stream (GDBusConnection *connection) g_dbus_connection_get_stream (GDBusConnection *connection)
{ {
@ -810,7 +820,7 @@ g_dbus_connection_is_closed (GDBusConnection *connection)
* *
* Gets the capabilities negotiated with the remote peer * Gets the capabilities negotiated with the remote peer
* *
* Returns: One or more flags from the #GDBusCapabilityFlags enumeration. * Returns: Zero or more flags from the #GDBusCapabilityFlags enumeration.
* *
* Since: 2.26 * Since: 2.26
*/ */
@ -1654,9 +1664,7 @@ get_offered_capabilities_max (GDBusConnection *connection)
ret = G_DBUS_CAPABILITY_FLAGS_NONE; ret = G_DBUS_CAPABILITY_FLAGS_NONE;
#ifdef G_OS_UNIX #ifdef G_OS_UNIX
if (G_IS_UNIX_CONNECTION (connection->priv->stream)) if (G_IS_UNIX_CONNECTION (connection->priv->stream))
{ ret |= G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING;
ret |= G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING;
}
#endif #endif
return ret; return ret;
} }
@ -1851,11 +1859,11 @@ async_init_thread (GSimpleAsyncResult *res,
} }
static void static void
async_initable_init_async (GAsyncInitable *initable, async_initable_init_async (GAsyncInitable *initable,
gint io_priority, gint io_priority,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data) gpointer user_data)
{ {
GSimpleAsyncResult *res; GSimpleAsyncResult *res;
@ -2586,7 +2594,7 @@ g_dbus_connection_signal_subscribe (GDBusConnection *connection,
/* Add the match rule to the bus... /* Add the match rule to the bus...
* *
* Avoid adding match rules for NameLost and NameAcquired messages - the bus will * Avoid adding match rules for NameLost and NameAcquired messages - the bus will
* always send such messages to to us. * always send such messages to us.
*/ */
if (connection->priv->flags & G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION) if (connection->priv->flags & G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION)
{ {
@ -2889,7 +2897,7 @@ distribute_signals (GDBusConnection *connection,
sender = g_dbus_message_get_sender (message); sender = g_dbus_message_get_sender (message);
/* collect subcsribers that match on sender */ /* collect subscribers that match on sender */
if (sender != NULL) if (sender != NULL)
{ {
signal_data_array = g_hash_table_lookup (connection->priv->map_sender_to_signal_data_array, sender); signal_data_array = g_hash_table_lookup (connection->priv->map_sender_to_signal_data_array, sender);
@ -2897,7 +2905,7 @@ distribute_signals (GDBusConnection *connection,
schedule_callbacks (connection, signal_data_array, message, sender); schedule_callbacks (connection, signal_data_array, message, sender);
} }
/* collect subcsribers not matching on sender */ /* collect subscribers not matching on sender */
signal_data_array = g_hash_table_lookup (connection->priv->map_sender_to_signal_data_array, ""); signal_data_array = g_hash_table_lookup (connection->priv->map_sender_to_signal_data_array, "");
if (signal_data_array != NULL) if (signal_data_array != NULL)
schedule_callbacks (connection, signal_data_array, message, sender); schedule_callbacks (connection, signal_data_array, message, sender);