From c3da9385d91037c73cef4665889f9edade9117f7 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 16 Feb 2009 21:25:18 +0000 Subject: empathy-tube-dispatch: add debug messages From: Guillaume Desmottes svn path=/trunk/; revision=2488 --- src/empathy-tube-dispatch.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/empathy-tube-dispatch.c b/src/empathy-tube-dispatch.c index 7ffe5f0ea..c051dec2f 100644 --- a/src/empathy-tube-dispatch.c +++ b/src/empathy-tube-dispatch.c @@ -37,6 +37,8 @@ #include "empathy-tube-dispatch.h" #include "empathy-tube-dispatch-enumtypes.h" +#define DEBUG_FLAG EMPATHY_DEBUG_DISPATCHER +#include G_DEFINE_TYPE(EmpathyTubeDispatch, empathy_tube_dispatch, G_TYPE_OBJECT) @@ -93,12 +95,14 @@ empathy_tube_dispatch_list_activatable_names_cb (TpDBusDaemon *proxy, { if (!tp_strdiff (*name, priv->bus_name)) { + DEBUG ("Found tube handler. Can dispatch it"); empathy_tube_dispatch_set_ability (self, EMPATHY_TUBE_DISPATCHABILITY_POSSIBLE); return; } } + DEBUG ("Didn't find tube handler. Can't dispatch it"); empathy_tube_dispatch_set_ability (self, EMPATHY_TUBE_DISPATCHABILITY_IMPOSSIBLE); } @@ -113,6 +117,7 @@ empathy_tube_dispatch_name_has_owner_cb (TpDBusDaemon *proxy, if (error != NULL) { + DEBUG ("NameHasOwner failed. Can't dispatch tube"); empathy_tube_dispatch_set_ability (self, EMPATHY_TUBE_DISPATCHABILITY_IMPOSSIBLE); return; @@ -120,11 +125,13 @@ empathy_tube_dispatch_name_has_owner_cb (TpDBusDaemon *proxy, if (has_owner) { + DEBUG ("Tube handler is running. Can dispatch it"); empathy_tube_dispatch_set_ability (self, EMPATHY_TUBE_DISPATCHABILITY_POSSIBLE); } else { + DEBUG ("Tube handler is not running. Calling ListActivatableNames"); tp_cli_dbus_daemon_call_list_activatable_names (priv->dbus, -1, empathy_tube_dispatch_list_activatable_names_cb, NULL, NULL, G_OBJECT (self)); @@ -178,6 +185,7 @@ empathy_tube_dispatch_constructed (GObject *object) priv->service = g_strdup (service); + DEBUG ("Look for tube handler %s\n", priv->bus_name); tp_cli_dbus_daemon_call_name_has_owner (priv->dbus, -1, priv->bus_name, empathy_tube_dispatch_name_has_owner_cb, NULL, NULL, G_OBJECT (self)); -- cgit v1.2.3