/* GDBus - GLib D-Bus Library
*
- * Copyright (C) 2008-2009 Red Hat, Inc.
+ * Copyright (C) 2008-2010 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#include "config.h"
#include <stdlib.h>
-
-#include <glib/gi18n.h>
+#include <string.h>
#include "gdbusutils.h"
#include "gdbusaddress.h"
#include <gio/gunixsocketaddress.h>
#endif
+#include "glibintl.h"
+#include "gioalias.h"
+
/**
* SECTION:gdbusaddress
* @title: D-Bus Addresses
* @short_description: D-Bus connection endpoints
* @include: gio/gio.h
*
- * Routines for working with D-Bus addresses.
+ * Routines for working with D-Bus addresses. A D-Bus address is a string
+ * like "unix:tmpdir=/tmp/my-app-name". The exact format of addresses
+ * is explained in detail in the <link linkend="http://dbus.freedesktop.org/doc/dbus-specification.html#addresses">D-Bus specification</link>.
*/
/* ---------------------------------------------------------------------------------------------------- */
* checks.
*
* Returns: %TRUE if @string is a valid D-Bus address, %FALSE otherwise.
+ *
+ * Since: 2.26
*/
gboolean
g_dbus_is_address (const gchar *string)
*
* Returns: %TRUE if @string is a valid D-Bus address that is
* supported by this library, %FALSE if @error is set.
+ *
+ * Since: 2.26
*/
gboolean
g_dbus_is_supported_address (const gchar *string,
}
gboolean
-_g_dbus_address_parse_entry (const gchar *address_entry,
- gchar **out_transport_name,
- GHashTable **out_key_value_pairs,
- GError **error)
+_g_dbus_address_parse_entry (const gchar *address_entry,
+ gchar **out_transport_name,
+ GHashTable **out_key_value_pairs,
+ GError **error)
{
gboolean ret;
GHashTable *key_value_pairs;
* making libgio link to libX11...
*/
static GIOStream *
-g_dbus_address_connect (const gchar *address_entry,
- const gchar *transport_name,
- GHashTable *key_value_pairs,
- GCancellable *cancellable,
- GError **error)
+g_dbus_address_connect (const gchar *address_entry,
+ const gchar *transport_name,
+ GHashTable *key_value_pairs,
+ GCancellable *cancellable,
+ GError **error)
{
GIOStream *ret;
GSocketConnectable *connectable;
}
static GIOStream *
-g_dbus_address_try_connect_one (const gchar *address_entry,
- gchar **out_guid,
- GCancellable *cancellable,
- GError **error)
+g_dbus_address_try_connect_one (const gchar *address_entry,
+ gchar **out_guid,
+ GCancellable *cancellable,
+ GError **error)
{
GIOStream *ret;
GHashTable *key_value_pairs;
*
* This is an asynchronous failable function. See
* g_dbus_address_get_stream_sync() for the synchronous version.
+ *
+ * Since: 2.26
*/
void
g_dbus_address_get_stream (const gchar *address,
* Finishes an operation started with g_dbus_address_get_stream().
*
* Returns: A #GIOStream or %NULL if @error is set.
+ *
+ * Since: 2.26
*/
GIOStream *
g_dbus_address_get_stream_finish (GAsyncResult *res,
* g_dbus_address_get_stream() for the asynchronous version.
*
* Returns: A #GIOStream or %NULL if @error is set.
+ *
+ * Since: 2.26
*/
GIOStream *
-g_dbus_address_get_stream_sync (const gchar *address,
- gchar **out_guid,
- GCancellable *cancellable,
- GError **error)
+g_dbus_address_get_stream_sync (const gchar *address,
+ gchar **out_guid,
+ GCancellable *cancellable,
+ GError **error)
{
GIOStream *ret;
gchar **addr_array;
g_assert (last_error != NULL);
g_propagate_error (error, last_error);
}
+
+ g_strfreev (addr_array);
return ret;
}
* platform specific mechanisms.
*
* Returns: A valid D-Bus address string for @bus_type or %NULL if @error is set.
+ *
+ * Since: 2.26
*/
gchar *
g_dbus_address_get_for_bus_sync (GBusType bus_type,
out:
return ret;
}
+
+#define __G_DBUS_ADDRESS_C__
+#include "gioaliasdef.c"