]> git.0d.be Git - empathy.git/commitdiff
Always build telepathy-yell and handle Call channels
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Wed, 23 Feb 2011 16:19:48 +0000 (16:19 +0000)
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Thu, 9 Jun 2011 09:20:05 +0000 (10:20 +0100)
Just keep empathy-call optional.

Conflicts:

libempathy-gtk/empathy-call-utils.c
libempathy/empathy-channel-factory.c

configure.ac
libempathy-gtk/empathy-call-utils.c
libempathy-gtk/empathy-new-call-dialog.c
libempathy/empathy-channel-factory.c
src/empathy.c

index 3d0437532bcade783e46d9ff9d815105fd61523b..1c87649bb70b7b151f2bbd8af21fe6a1eb05462d 100644 (file)
@@ -172,6 +172,8 @@ PKG_CHECK_MODULES(EMPATHY,
    gcr-3 >= $GCR_REQUIRED
 ])
 
+PKG_CHECK_MODULES(YELL, [telepathy-yell])
+
 PKG_CHECK_MODULES(EMPATHY_AV,
 [
    farsight2-0.10
@@ -185,13 +187,11 @@ AC_ARG_WITH(call,
             AC_HELP_STRING([--with-call], [build with Call interface support]),,
             [with_call=yes])
 if test "x$with_call" = "xyes" ; then
-   PKG_CHECK_MODULES(YELL, [telepathy-yell])
    PKG_CHECK_MODULES(EMPATHY_CALL,
    [
       farsight2-0.10
       telepathy-farstream
    ])
-   AC_DEFINE(HAVE_CALL, 1, [Define if we have Call interface support])
 fi
 AM_CONDITIONAL(HAVE_CALL, test "x$with_call" = "xyes")
 
index 5f821dd19fc56afede1e49f426508b549f23f0da..1f3a4fcc0e0d29ec7d97a5c91fa4ff7d5f6e0195 100644 (file)
@@ -26,9 +26,7 @@
 
 #include <telepathy-glib/telepathy-glib.h>
 
-#if HAVE_CALL
- #include <telepathy-yell/telepathy-yell.h>
-#endif
+#include <telepathy-yell/telepathy-yell.h>
 
 #include "empathy-call-utils.h"
 
@@ -53,7 +51,6 @@ show_call_error (GError *error)
   gtk_widget_show (dialog);
 }
 
-#if HAVE_CALL
 GHashTable *
 empathy_call_create_call_request (const gchar *contact,
     gboolean initial_audio,
@@ -72,7 +69,6 @@ empathy_call_create_call_request (const gchar *contact,
       initial_video,
     NULL);
 }
-#endif
 
 GHashTable *
 empathy_call_create_streamed_media_request (const gchar *contact,
@@ -111,7 +107,6 @@ create_streamed_media_channel_cb (GObject *source,
     }
 }
 
-#if HAVE_CALL
 static void
 create_call_channel_cb (GObject *source,
     GAsyncResult *result,
@@ -142,7 +137,6 @@ create_call_channel_cb (GObject *source,
       create_streamed_media_channel_cb,
       NULL);
 }
-#endif
 
 void
 empathy_call_new_with_streams (const gchar *contact,
@@ -151,7 +145,6 @@ empathy_call_new_with_streams (const gchar *contact,
     gboolean initial_video,
     gint64 timestamp)
 {
-#if HAVE_CALL
   GHashTable *call_request, *streamed_media_request;
   TpAccountChannelRequest *call_req, *streamed_media_req;
 
@@ -175,22 +168,4 @@ empathy_call_new_with_streams (const gchar *contact,
   g_hash_table_unref (call_request);
   g_hash_table_unref (streamed_media_request);
   g_object_unref (call_req);
-#else
-  GHashTable *request;
-  TpAccountChannelRequest *req;
-
-  request = empathy_call_create_streamed_media_request (contact,
-      initial_audio,
-      initial_video);
-
-  req = tp_account_channel_request_new (account, request, timestamp);
-
-  tp_account_channel_request_create_channel_async (req,
-      EMPATHY_AV_BUS_NAME, NULL,
-      create_streamed_media_channel_cb,
-      NULL);
-
-  g_hash_table_unref (request);
-  g_object_unref (req);
-#endif
 }
index 8fd273840af980471f0930dbf3ad69ff248a7130..139eb1de576ed80522bf656a7e8cb29c37f388b7 100644 (file)
@@ -28,9 +28,7 @@
 
 #include <telepathy-glib/interfaces.h>
 
-#if HAVE_CALL
 #include <telepathy-yell/telepathy-yell.h>
-#endif
 
 #include <libempathy/empathy-tp-contact-factory.h>
 #include <libempathy/empathy-contact-manager.h>
@@ -133,10 +131,7 @@ conn_prepared_cb (GObject *conn,
       chan_type = tp_asv_get_string (fixed, TP_PROP_CHANNEL_CHANNEL_TYPE);
 
       if (tp_strdiff (chan_type, TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA)
-#if HAVE_CALL
-          && tp_strdiff (chan_type, TPY_IFACE_CHANNEL_TYPE_CALL)
-#endif
-         )
+          && tp_strdiff (chan_type, TPY_IFACE_CHANNEL_TYPE_CALL))
         continue;
 
       if (tp_asv_get_uint32 (fixed, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL) !=
index b2a630ca135281cc793b5e62ed793ec8441ca805..d8b1cd941b3ce6f10c49f2e5b7b9c2e5e5a772ec 100644 (file)
@@ -28,9 +28,7 @@
 
 #include <telepathy-glib/telepathy-glib.h>
 
-#if HAVE_CALL
- #include <telepathy-yell/telepathy-yell.h>
-#endif
+#include <telepathy-yell/telepathy-yell.h>
 
 static void factory_iface_init (gpointer, gpointer);
 
@@ -119,13 +117,11 @@ empathy_channel_factory_create_channel (
 
       return TP_CHANNEL (empathy_tp_chat_new (account, conn, path, properties));
     }
-#if HAVE_CALL
   else 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);
index 4300485c92c69d2429aecf88ae5535f210c8a531..6e2b165dc436b8b98c13143379a70ba2fc01fe92 100644 (file)
@@ -44,9 +44,7 @@
 #include <telepathy-glib/connection-manager.h>
 #include <telepathy-glib/interfaces.h>
 
-#if HAVE_CALL
- #include <telepathy-yell/telepathy-yell.h>
-#endif
+#include <telepathy-yell/telepathy-yell.h>
 
 #include <telepathy-logger/log-manager.h>