]> git.0d.be Git - empathy.git/commitdiff
Add a function to explicitly close EmpathyTpCall
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Fri, 9 Jan 2009 16:13:55 +0000 (16:13 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Fri, 9 Jan 2009 16:13:55 +0000 (16:13 +0000)
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
svn path=/trunk/; revision=2160

libempathy/empathy-tp-call.c
libempathy/empathy-tp-call.h

index 7703aeffb5c96718d44f6ddd16f4fd8c3abdefb2..45aa22be14c83c44c05754e3f868e001a7be71b0 100644 (file)
@@ -503,10 +503,7 @@ tp_call_finalize (GObject *object)
 
   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)
@@ -665,6 +662,20 @@ empathy_tp_call_accept_incoming_call (EmpathyTpCall *call)
   g_object_unref (self_contact);
 }
 
+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)
index 5da79fa130a9725b0a45e2fb437dd3cd3f5a8573..29a79c64ec6e63998cd4c8bebba1ebcb05b8a910 100644 (file)
@@ -71,6 +71,7 @@ typedef struct
 
 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,