diff options
author | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2011-02-19 00:31:35 +0800 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2011-02-23 22:50:43 +0800 |
commit | f44380b57b8f1bdfe4b2de41445d21fe99f85c92 (patch) | |
tree | 621a49cbd34015d8e3b8f04c444b93083e09cc3d /libempathy | |
parent | 93bb7636ec40f000d7de9ae97fe888a9427b0868 (diff) | |
download | gsoc2013-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')
-rw-r--r-- | libempathy/Makefile.am | 2 | ||||
-rw-r--r-- | libempathy/empathy-channel-factory.c | 17 |
2 files changed, 19 insertions, 0 deletions
diff --git a/libempathy/Makefile.am b/libempathy/Makefile.am index 5336064d1..c184fde44 100644 --- a/libempathy/Makefile.am +++ b/libempathy/Makefile.am @@ -9,6 +9,7 @@ AM_CPPFLAGS = \ -DLOCALEDIR=\""$(datadir)/locale"\" \ -DG_LOG_DOMAIN=\"empathy\" \ $(EMPATHY_CFLAGS) \ + $(YELL_CFLAGS) \ $(GEOCLUE_CFLAGS) \ $(NETWORK_MANAGER_CFLAGS) \ $(CONNMAN_CFLAGS) \ @@ -109,6 +110,7 @@ nodist_libempathy_la_SOURCES =\ libempathy_la_LIBADD = \ $(top_builddir)/extensions/libemp-extensions.la \ $(EMPATHY_LIBS) \ + $(YELL_LIBS) \ $(GEOCLUE_LIBS) \ $(NETWORK_MANAGER_LIBS) \ $(CONNMAN_LIBS) 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); |