[Telepathy-commits] [telepathy-salut/master] tube_closed_cb: fire Closed and ChannelClosed signals
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Wed Mar 11 09:15:28 PDT 2009
---
src/salut-tubes-channel.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/src/salut-tubes-channel.c b/src/salut-tubes-channel.c
index aeca446..51e7f6a 100644
--- a/src/salut-tubes-channel.c
+++ b/src/salut-tubes-channel.c
@@ -28,6 +28,7 @@
#include <dbus/dbus-glib.h>
#include <telepathy-glib/channel-iface.h>
+#include <telepathy-glib/channel-manager.h>
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/exportable-channel.h>
@@ -1208,6 +1209,29 @@ tube_closed_cb (SalutTubeIface *tube,
update_tubes_info (self);
tp_svc_channel_type_tubes_emit_tube_closed (self, tube_id);
+
+ /* FIXME: this is a workaround while new tube API is not implemented on
+ * D-Bus tubes */
+ if (SALUT_IS_TUBE_STREAM (tube))
+ {
+ TpChannelManager *mgr;
+
+ tp_svc_channel_emit_closed (tube);
+
+ if (priv->handle_type == TP_HANDLE_TYPE_CONTACT)
+ {
+ g_object_get (priv->conn, "tubes-manager", &mgr, NULL);
+ }
+ else
+ {
+ g_object_get (priv->conn, "muc-manager", &mgr, NULL);
+ }
+
+ tp_channel_manager_emit_channel_closed_for_object (mgr,
+ TP_EXPORTABLE_CHANNEL (tube));
+
+ g_object_unref (mgr);
+ }
}
static void
--
1.5.6.5
More information about the telepathy-commits
mailing list