empathy r2563 - trunk/libempathy
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r2563 - trunk/libempathy
- Date: Tue, 3 Mar 2009 17:34:47 +0000 (UTC)
Author: xclaesse
Date: Tue Mar 3 17:34:47 2009
New Revision: 2563
URL: http://svn.gnome.org/viewvc/empathy?rev=2563&view=rev
Log:
Let the UI call the handler for bus messages
Signed-off-by: Sjoerd Simons <sjoerd simons collabora co uk>
Modified:
trunk/libempathy/empathy-call-handler.c
trunk/libempathy/empathy-call-handler.h
Modified: trunk/libempathy/empathy-call-handler.c
==============================================================================
--- trunk/libempathy/empathy-call-handler.c (original)
+++ trunk/libempathy/empathy-call-handler.c Tue Mar 3 17:34:47 2009
@@ -58,7 +58,6 @@
EmpathyTpCall *call;
EmpathyContact *contact;
TfChannel *tfchannel;
- GstBus *bus;
} EmpathyCallHandlerPriv;
#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyCallHandler)
@@ -127,9 +126,6 @@
case PROP_TP_CALL:
priv->call = g_value_dup_object (value);
break;
- case PROP_GST_BUS:
- priv->bus = g_value_dup_object (value);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
@@ -149,9 +145,6 @@
case PROP_TP_CALL:
g_value_set_object (value, priv->call);
break;
- case PROP_GST_BUS:
- g_value_set_object (value, priv->bus);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
@@ -177,12 +170,6 @@
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_CONTACT, param_spec);
- param_spec = g_param_spec_object ("gst-bus",
- "gst-bus", "The gstreamer bus",
- GST_TYPE_BUS,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_GST_BUS, param_spec);
-
param_spec = g_param_spec_object ("tp-call",
"tp-call", "The calls channel wrapper",
EMPATHY_TYPE_TP_CALL,
@@ -232,18 +219,16 @@
"tp-call", call, NULL));
}
-static gboolean
-empathy_call_handler_pipeline_bus_watch (GstBus *bus, GstMessage *message,
- gpointer user_data)
+void
+empathy_call_handler_bus_message (EmpathyCallHandler *handler,
+ GstBus *bus, GstMessage *message)
{
- EmpathyCallHandler *handler = EMPATHY_CALL_HANDLER (user_data);
EmpathyCallHandlerPriv *priv = GET_PRIV (handler);
- g_assert (priv->tfchannel != NULL);
+ if (priv->tfchannel == NULL)
+ return;
tf_channel_bus_message (priv->tfchannel, message);
-
- return TRUE;
}
static void
@@ -251,10 +236,6 @@
FsConference *conference, FsParticipant *participant,
EmpathyCallHandler *self)
{
- EmpathyCallHandlerPriv *priv = GET_PRIV (self);
-
- gst_bus_add_watch (priv->bus, empathy_call_handler_pipeline_bus_watch, self);
-
g_signal_emit (G_OBJECT (self), signals[CONFERENCE_ADDED], 0,
GST_ELEMENT (conference));
}
@@ -416,14 +397,3 @@
empathy_tp_call_accept_incoming_call (priv->call);
}
}
-
-void
-empathy_call_handler_set_bus (EmpathyCallHandler *handler, GstBus *bus)
-{
- EmpathyCallHandlerPriv *priv = GET_PRIV (handler);
-
- g_assert (priv->bus == NULL);
-
- priv->bus = g_object_ref (bus);
-}
-
Modified: trunk/libempathy/empathy-call-handler.h
==============================================================================
--- trunk/libempathy/empathy-call-handler.h (original)
+++ trunk/libempathy/empathy-call-handler.h Tue Mar 3 17:34:47 2009
@@ -68,8 +68,9 @@
EmpathyTpCall *call);
void empathy_call_handler_start_call (EmpathyCallHandler *handler);
-void empathy_call_handler_set_bus (EmpathyCallHandler *handler,
- GstBus *bus);
+
+void empathy_call_handler_bus_message (EmpathyCallHandler *handler,
+ GstBus *bus, GstMessage *message);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]