empathy r2478 - in trunk: libempathy src



Author: xclaesse
Date: Mon Feb 16 21:24:38 2009
New Revision: 2478
URL: http://svn.gnome.org/viewvc/empathy?rev=2478&view=rev

Log:
Signal closed from the call-handler

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

Modified:
   trunk/libempathy/empathy-call-handler.c
   trunk/src/empathy-call-window.c

Modified: trunk/libempathy/empathy-call-handler.c
==============================================================================
--- trunk/libempathy/empathy-call-handler.c	(original)
+++ trunk/libempathy/empathy-call-handler.c	Mon Feb 16 21:24:38 2009
@@ -39,6 +39,7 @@
   CONFERENCE_ADDED,
   SRC_PAD_ADDED,
   SINK_PAD_ADDED,
+  CLOSED,
   LAST_SIGNAL
 };
 
@@ -208,6 +209,13 @@
       _empathy_marshal_VOID__OBJECT_UINT,
       G_TYPE_NONE,
       2, GST_TYPE_PAD, G_TYPE_UINT);
+
+  signals[CLOSED] =
+    g_signal_new ("closed", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL,
+      g_cclosure_marshal_VOID__VOID,
+      G_TYPE_NONE,
+      0);
 }
 
 EmpathyCallHandler *
@@ -294,6 +302,13 @@
 }
 
 static void
+empathy_call_handler_tf_channel_closed_cb (TfChannel *tfchannel,
+  EmpathyCallHandler *handler)
+{
+  g_signal_emit (G_OBJECT (handler), signals[CLOSED], 0);
+}
+
+static void
 empathy_call_handler_start_tpfs (EmpathyCallHandler *self)
 {
   EmpathyCallHandlerPriv *priv = GET_PRIV (self);
@@ -310,6 +325,8 @@
       G_CALLBACK (empathy_call_handler_tf_channel_session_created_cb), self);
   g_signal_connect (priv->tfchannel, "stream-created",
       G_CALLBACK (empathy_call_handler_tf_channel_stream_created_cb), self);
+  g_signal_connect (priv->tfchannel, "closed",
+      G_CALLBACK (empathy_call_handler_tf_channel_closed_cb), self);
 
   g_object_unref (channel);
 }

Modified: trunk/src/empathy-call-window.c
==============================================================================
--- trunk/src/empathy-call-window.c	(original)
+++ trunk/src/empathy-call-window.c	Mon Feb 16 21:24:38 2009
@@ -104,11 +104,6 @@
   gchar *message);
 
 static void
-empathy_call_window_session_created_cb (TfChannel *tfchannel,
-  FsConference  *conference, FsParticipant *participant,
-  gpointer user_data);
-
-static void
 empathy_call_window_setup_menubar (EmpathyCallWindow *self)
 {
   EmpathyCallWindowPriv *priv = GET_PRIV (self);
@@ -468,15 +463,6 @@
 }
 
 static void
-empathy_call_window_session_created_cb (TfChannel *tfchannel,
-  FsConference  *conference, FsParticipant *participant,
-  gpointer user_data)
-{
-  g_signal_connect (G_OBJECT (tfchannel), "closed",
-    G_CALLBACK (empathy_call_window_channel_closed_cb), user_data);
-}
-
-static void
 empathy_call_window_src_added_cb (EmpathyCallHandler *handler,
   GstPad *src, guint media_type, gpointer user_data)
 {
@@ -552,8 +538,8 @@
 
   g_signal_connect (priv->handler, "conference-added",
     G_CALLBACK (empathy_call_window_conference_added_cb), window);
-  g_signal_connect (priv->handler, "session-created",
-    G_CALLBACK (empathy_call_window_session_created_cb), window);
+  g_signal_connect (priv->handler, "closed",
+    G_CALLBACK (empathy_call_window_channel_closed_cb), window);
   g_signal_connect (priv->handler, "src-pad-added",
     G_CALLBACK (empathy_call_window_src_added_cb), window);
   g_signal_connect (priv->handler, "sink-pad-added",



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