empathy r2160 - trunk/libempathy



Author: xclaesse
Date: Fri Jan  9 16:13:55 2009
New Revision: 2160
URL: http://svn.gnome.org/viewvc/empathy?rev=2160&view=rev

Log:
Add a function to explicitly close EmpathyTpCall

Signed-off-by: Sjoerd Simons <sjoerd simons collabora co uk>

Modified:
   trunk/libempathy/empathy-tp-call.c
   trunk/libempathy/empathy-tp-call.h

Modified: trunk/libempathy/empathy-tp-call.c
==============================================================================
--- trunk/libempathy/empathy-tp-call.c	(original)
+++ trunk/libempathy/empathy-tp-call.c	Fri Jan  9 16:13:55 2009
@@ -503,10 +503,7 @@
 
   if (priv->channel != NULL)
     {
-      g_signal_handlers_disconnect_by_func (priv->channel,
-          tp_call_channel_invalidated_cb, object);
-      tp_call_close_channel (EMPATHY_TP_CALL (object));
-      g_object_unref (priv->channel);
+      empathy_tp_call_close (EMPATHY_TP_CALL (object));
     }
 
   if (priv->stream_engine != NULL)
@@ -666,6 +663,20 @@
 }
 
 void
+empathy_tp_call_close (EmpathyTpCall *call)
+{
+  EmpathyTpCallPriv *priv = GET_PRIV (call);
+
+  g_signal_handlers_disconnect_by_func (priv->channel,
+    tp_call_channel_invalidated_cb, call);
+
+  tp_call_close_channel (call);
+
+  g_object_unref (priv->channel);
+  priv->channel = NULL;
+}
+
+void
 empathy_tp_call_request_video_stream_direction (EmpathyTpCall *call,
                                                 gboolean is_sending)
 {

Modified: trunk/libempathy/empathy-tp-call.h
==============================================================================
--- trunk/libempathy/empathy-tp-call.h	(original)
+++ trunk/libempathy/empathy-tp-call.h	Fri Jan  9 16:13:55 2009
@@ -71,6 +71,7 @@
 
 GType empathy_tp_call_get_type (void) G_GNUC_CONST;
 EmpathyTpCall *empathy_tp_call_new (TpChannel *channel);
+void empathy_tp_call_close (EmpathyTpCall *call);
 
 void empathy_tp_call_accept_incoming_call (EmpathyTpCall *call);
 void empathy_tp_call_request_video_stream_direction (EmpathyTpCall *call,



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