aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-channel-factory.c
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-02-19 00:31:35 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-02-23 22:50:43 +0800
commitf44380b57b8f1bdfe4b2de41445d21fe99f85c92 (patch)
tree621a49cbd34015d8e3b8f04c444b93083e09cc3d /libempathy/empathy-channel-factory.c
parent93bb7636ec40f000d7de9ae97fe888a9427b0868 (diff)
downloadgsoc2013-empathy-f44380b57b8f1bdfe4b2de41445d21fe99f85c92.tar
gsoc2013-empathy-f44380b57b8f1bdfe4b2de41445d21fe99f85c92.tar.gz
gsoc2013-empathy-f44380b57b8f1bdfe4b2de41445d21fe99f85c92.tar.bz2
gsoc2013-empathy-f44380b57b8f1bdfe4b2de41445d21fe99f85c92.tar.lz
gsoc2013-empathy-f44380b57b8f1bdfe4b2de41445d21fe99f85c92.tar.xz
gsoc2013-empathy-f44380b57b8f1bdfe4b2de41445d21fe99f85c92.tar.zst
gsoc2013-empathy-f44380b57b8f1bdfe4b2de41445d21fe99f85c92.zip
Teach EmpathyChannelFactory how to create Call channels
Diffstat (limited to 'libempathy/empathy-channel-factory.c')
-rw-r--r--libempathy/empathy-channel-factory.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libempathy/empathy-channel-factory.c b/libempathy/empathy-channel-factory.c
index bbe0cb0ba..87cdf7af7 100644
--- a/libempathy/empathy-channel-factory.c
+++ b/libempathy/empathy-channel-factory.c
@@ -19,10 +19,16 @@
* Authors: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
*/
+#include <config.h>
+
#include "empathy-channel-factory.h"
#include <telepathy-glib/telepathy-glib.h>
+#if HAVE_CALL
+ #include <telepathy-yell/telepathy-yell.h>
+#endif
+
static void factory_iface_init (gpointer, gpointer);
G_DEFINE_TYPE_WITH_CODE (EmpathyChannelFactory, empathy_channel_factory,
@@ -98,6 +104,17 @@ empathy_channel_factory_create_channel (
GError **error)
{
EmpathyChannelFactory *self = (EmpathyChannelFactory *) factory;
+ const gchar *chan_type;
+
+ chan_type = tp_asv_get_string (properties, TP_PROP_CHANNEL_CHANNEL_TYPE);
+
+#if HAVE_CALL
+ if (!tp_strdiff (chan_type, TPY_IFACE_CHANNEL_TYPE_CALL))
+ {
+ return TP_CHANNEL (tpy_call_channel_new (conn, path, properties,
+ error));
+ }
+#endif
return tp_client_channel_factory_create_channel (
self->priv->automatic_factory, conn, path, properties, error);