[telepathy-glib/master] Add tp_dbus_daemon_get_unique_name (convenience API for dbus_bus_get_unique_name)

Simon McVittie simon.mcvittie at collabora.co.uk
Mon Aug 17 04:48:57 PDT 2009


---
 docs/reference/telepathy-glib-sections.txt |    1 +
 telepathy-glib/dbus.c                      |   17 +++++++++++++++++
 telepathy-glib/dbus.h                      |    2 ++
 3 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/docs/reference/telepathy-glib-sections.txt b/docs/reference/telepathy-glib-sections.txt
index 6951efd..9cbcb83 100644
--- a/docs/reference/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib-sections.txt
@@ -1586,6 +1586,7 @@ TpDBusDaemon
 TpDBusDaemonClass
 tp_dbus_daemon_dup
 tp_dbus_daemon_new
+tp_dbus_daemon_get_unique_name
 TpDBusDaemonNameOwnerChangedCb
 tp_dbus_daemon_cancel_name_owner_watch
 tp_dbus_daemon_release_name
diff --git a/telepathy-glib/dbus.c b/telepathy-glib/dbus.c
index ce68fc7..d833509 100644
--- a/telepathy-glib/dbus.c
+++ b/telepathy-glib/dbus.c
@@ -1456,6 +1456,23 @@ tp_dbus_daemon_release_name (TpDBusDaemon *self,
     }
 }
 
+/**
+ * tp_dbus_daemon_get_unique_name:
+ *
+ * <!-- Returns: is enough -->
+ *
+ * Returns: the unique name of this connection to the bus, which is valid for
+ *  as long as this #TpDBusDaemon is
+ * Since: 0.7.UNRELEASED
+ */
+const gchar *
+tp_dbus_daemon_get_unique_name (TpDBusDaemon *self)
+{
+  g_return_val_if_fail (TP_IS_DBUS_DAEMON (self), NULL);
+
+  return dbus_bus_get_unique_name (self->priv->libdbus);
+}
+
 static void
 free_daemon_list (gpointer p)
 {
diff --git a/telepathy-glib/dbus.h b/telepathy-glib/dbus.h
index 702e660..54195b5 100644
--- a/telepathy-glib/dbus.h
+++ b/telepathy-glib/dbus.h
@@ -72,6 +72,8 @@ gboolean tp_dbus_daemon_request_name (TpDBusDaemon *self,
 gboolean tp_dbus_daemon_release_name (TpDBusDaemon *self,
     const gchar *well_known_name, GError **error);
 
+const gchar *tp_dbus_daemon_get_unique_name (TpDBusDaemon *self);
+
 typedef enum
 {
   TP_DBUS_NAME_TYPE_UNIQUE = 1,
-- 
1.5.6.5




More information about the telepathy-commits mailing list