[empathy: 7/15] Add a convenience function to get the busname of a handler



commit eb8a6e36a56cbc3342368baf8190e0ef17e9a8f7
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date:   Wed Sep 2 18:29:32 2009 +0100

    Add a convenience function to get the busname of a handler

 libempathy/empathy-handler.c |   10 +++++++++-
 libempathy/empathy-handler.h |    2 ++
 2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/libempathy/empathy-handler.c b/libempathy/empathy-handler.c
index c11227f..8cfa419 100644
--- a/libempathy/empathy-handler.c
+++ b/libempathy/empathy-handler.c
@@ -102,7 +102,7 @@ handler_constructor (GType type,
 
   dbus = tp_dbus_daemon_dup (NULL);
 
-  DEBUG ("Registering at '%s'", object_path);
+  DEBUG ("Registering at %s, %s", priv->busname, object_path);
   g_assert (tp_dbus_daemon_request_name (dbus,
     priv->busname, TRUE, NULL));
   dbus_g_connection_register_g_object (tp_get_bus (),
@@ -374,6 +374,14 @@ error:
   g_error_free (error);
 }
 
+const gchar *
+empathy_handler_get_busname (EmpathyHandler *handler)
+{
+  EmpathyHandlerPriv *priv = GET_PRIV (handler);
+
+  return priv->busname;
+}
+
 static void
 empathy_handler_client_handler_iface_init (gpointer g_iface,
     gpointer g_iface_data)
diff --git a/libempathy/empathy-handler.h b/libempathy/empathy-handler.h
index 684ec0c..f6b894b 100644
--- a/libempathy/empathy-handler.h
+++ b/libempathy/empathy-handler.h
@@ -62,6 +62,8 @@ EmpathyHandler * empathy_handler_new (const gchar *name,
     GPtrArray *filters,
     GStrv capabilities);
 
+const gchar *empathy_handler_get_busname (EmpathyHandler *handler);
+
 typedef gboolean (EmpathyHandlerHandleChannelsFunc) (EmpathyHandler *handler,
     const gchar *account_path,
     const gchar *connection_path,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]