]> git.0d.be Git - empathy.git/commitdiff
Merge remote-tracking branch 'origin/call1' into master+call
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 21 Feb 2012 07:26:19 +0000 (08:26 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 21 Feb 2012 07:26:19 +0000 (08:26 +0100)
Conflicts:
configure.ac
telepathy-yell

1  2 
configure.ac
libempathy/Makefile.am
src/Makefile.am
src/empathy-call-window.c
src/empathy-call.c

diff --combined configure.ac
index 32459f5432914cac8f7d669f56b457f29294c033,9392378006f548ffabb797b21e4c106258d509ce..68e50444b612d4b496b9980506a2e485f76b1133
@@@ -3,7 -3,7 +3,7 @@@ m4_define(empathy_released, 0
  
  m4_define([empathy_major_version], [3])
  m4_define([empathy_minor_version], [3])
 -m4_define([empathy_micro_version], [4])
 +m4_define([empathy_micro_version], [5])
  m4_define([empathy_nano_version], [0])
  
  dnl Display the nano_version only if it's not '0'
@@@ -44,7 -44,7 +44,7 @@@ GCR_REQUIRED=2.91.
  LIBCANBERRA_GTK_REQUIRED=0.25
  LIBNOTIFY_REQUIRED=0.7.0
  TELEPATHY_FARSIGHT_REQUIRED=0.0.18
 -TELEPATHY_GLIB_REQUIRED=0.17.3
 +TELEPATHY_GLIB_REQUIRED=0.17.5
  TELEPATHY_LOGGER=0.2.10
  WEBKIT_REQUIRED=1.3.13
  GOA_REQUIRED=3.3.0
@@@ -71,18 -71,6 +71,9 @@@ CHAMPLAIN_REQUIRED=0.12.
  # those warnings later during the cycle (bgo #662662)
  AC_DEFINE(GLIB_DISABLE_DEPRECATION_WARNINGS, 1, [Build with GLib deprecated])
  
- # telepathy-yell
- prev_top_build_prefix=$ac_top_build_prefix
- prev_ac_configure_args=$ac_configure_args
- ac_configure_args="$ac_configure_args --disable-shared-library"
- AX_CONFIG_DIR([telepathy-yell])
- ac_top_build_prefix=$prev_top_build_prefix
- ac_configure_args=$prev_ac_configure_args
- export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"$ac_top_build_prefix"telepathy-yell/telepathy-yell
 +# FIXME: bgo #669673
 +AC_DEFINE(CLUTTER_DISABLE_DEPRECATION_WARNINGS, 1, [Build with Clutter deprecated])
 +
  AC_CONFIG_MACRO_DIR([m4])
  AC_CONFIG_HEADERS([config.h])
  AC_CONFIG_SRCDIR([configure.ac])
@@@ -106,6 -94,7 +97,6 @@@ AC_PATH_XTR
  LT_PREREQ([2.2])
  LT_INIT
  
 -GNOME_DOC_INIT([0.17.3])
  AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
  GLIB_GSETTINGS
  GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
@@@ -206,8 -195,6 +197,6 @@@ PKG_CHECK_MODULES(EMPATHY
     libsoup-2.4
  ])
  
- PKG_CHECK_MODULES(YELL, [telepathy-yell])
  PKG_CHECK_MODULES(EMPATHY_AV,
  [
     farsight2-0.10
@@@ -227,8 -214,8 +216,8 @@@ AC_ARG_ENABLE(call
  if test "x$enable_call" != "xno" ; then
     PKG_CHECK_MODULES(EMPATHY_CALL,
     [
-       farsight2-0.10
-       telepathy-farstream >= 0.1.2
+       farstream-0.1
+       telepathy-farstream >= 0.2.0
        clutter-1.0 >= $CLUTTER_REQUIRED
        clutter-gtk-1.0
        clutter-gst-1.0
@@@ -645,8 -632,6 +634,8 @@@ els
  fi
  AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
  
 +# Help documentation
 +YELP_HELP_INIT
  
  # -----------------------------------------------------------
  # Coding style checks
diff --combined libempathy/Makefile.am
index 6a6e2ce7e517ddf3bb44b92896c0ba96dd66cdb0,ca02a18d36465ba43520a629a69f77c35a1b7f3e..cc288bfa853edee3d2732ce3bad1f1e1c754553f
@@@ -10,7 -10,6 +10,6 @@@ AM_CPPFLAGS 
        -DG_LOG_DOMAIN=\"empathy\"                      \
        -DGCR_API_SUBJECT_TO_CHANGE                     \
        $(EMPATHY_CFLAGS)                               \
-       $(YELL_CFLAGS)                                  \
        $(GEOCLUE_CFLAGS)                               \
        $(GEOCODE_CFLAGS)                               \
        $(NETWORK_MANAGER_CFLAGS)                       \
@@@ -52,7 -51,6 +51,7 @@@ libempathy_headers =                          
        empathy-keyring.h                       \
        empathy-location.h                      \
        empathy-message.h                       \
 +      empathy-pkg-kit.h               \
        empathy-request-util.h                  \
        empathy-server-sasl-handler.h           \
        empathy-server-tls-handler.h            \
@@@ -93,7 -91,6 +92,7 @@@ libempathy_handwritten_source =                               
        empathy-irc-server.c                            \
        empathy-keyring.c                               \
        empathy-message.c                               \
 +      empathy-pkg-kit.c               \
        empathy-request-util.c                          \
        empathy-server-sasl-handler.c                   \
        empathy-server-tls-handler.c                    \
@@@ -149,7 -146,6 +148,6 @@@ nodist_libempathy_la_SOURCES =
  
  libempathy_la_LIBADD =                \
        $(top_builddir)/extensions/libemp-extensions.la \
-       $(top_builddir)/telepathy-yell/telepathy-yell/libtelepathy-yell.la \
        $(GCR_LIBS) \
        $(EMPATHY_LIBS) \
        $(GEOCLUE_LIBS) \
diff --combined src/Makefile.am
index 8623ac2dda0074f68681a07fbe36758b717aaac8,4b42fd11d0b58566ab696edaf4a3983195a40580..a2aa31d5b53db43d427e628b64f2169e4368234f
@@@ -1,7 -1,6 +1,6 @@@
  include $(top_srcdir)/tools/flymake.mk
  
  CPPFLAGS_COMMON =                                     \
-       $(YELL_CFLAGS)                                  \
        $(EMPATHY_CFLAGS)                               \
        $(EDS_CFLAGS)                                   \
        $(ERROR_CFLAGS)                                 \
@@@ -24,7 -23,6 +23,6 @@@ LDADD =                                                               
        $(top_builddir)/extensions/libemp-extensions.la         \
        $(GCR_LIBS)                                             \
        $(EMPATHY_LIBS)                                         \
-       $(YELL_LIBS)                                            \
        $(LIBCHAMPLAIN_LIBS)                                    \
        $(NULL)
  
@@@ -32,7 -30,9 +30,7 @@@ noinst_LTLIBRARIES = libempathy-account
  
  libempathy_accounts_common_la_SOURCES =                                       \
        empathy-accounts-common.c empathy-accounts-common.h             \
 -      empathy-account-assistant.c empathy-account-assistant.h         \
        empathy-accounts-dialog.c empathy-accounts-dialog.h             \
 -      empathy-auto-salut-account-helper.c empathy-auto-salut-account-helper.h \
        empathy-import-dialog.c empathy-import-dialog.h                 \
        empathy-import-pidgin.c empathy-import-pidgin.h                 \
        empathy-import-widget.c empathy-import-widget.h                 \
index 451722839ae57f471c029de1ccac0086174e0d78,dc3c6535877e3d5254c0e0b7d46d7831870dc798..51732e0243ffa85983513f348941dc418d087c8c
@@@ -53,6 -53,7 +53,7 @@@
  #include <libempathy-gtk/empathy-sound-manager.h>
  #include <libempathy-gtk/empathy-geometry.h>
  #include <libempathy-gtk/empathy-images.h>
+ #include <libempathy-gtk/empathy-call-utils.h>
  
  #define DEBUG_FLAG EMPATHY_DEBUG_VOIP
  #include <libempathy/empathy-debug.h>
@@@ -194,17 -195,13 +195,13 @@@ struct _EmpathyCallWindowPri
    /* These are used to accept or reject an incoming call when the status
       is RINGING. */
    GtkWidget *incoming_call_dialog;
-   TpyCallChannel *pending_channel;
+   TpCallChannel *pending_channel;
    TpChannelDispatchOperation *pending_cdo;
    TpAddDispatchOperationContext *pending_context;
  
    gulong video_output_motion_handler_id;
    guint bus_message_source_id;
  
-   /* String that contains the queued tones to send after the current ones
-      are sent */
-   GString *tones;
-   gboolean sending_tones;
    GtkWidget *dtmf_panel;
  
    /* Details vbox */
@@@ -346,61 -343,21 +343,21 @@@ empathy_call_window_video_call_cb (GtkT
    empathy_call_window_restart_call (self);
  }
  
- static void
- empathy_call_window_emit_tones (EmpathyCallWindow *self)
- {
-   TpChannel *channel;
-   if (tp_str_empty (self->priv->tones->str))
-     return;
-   g_object_get (self->priv->handler, "call-channel", &channel, NULL);
-   DEBUG ("Emitting multiple tones: %s", self->priv->tones->str);
-   tp_cli_channel_interface_dtmf_call_multiple_tones (channel, -1,
-       self->priv->tones->str,
-       NULL, NULL, NULL, NULL);
-   self->priv->sending_tones = TRUE;
-   g_string_set_size (self->priv->tones, 0);
-   g_object_unref (channel);
- }
- static void
- empathy_call_window_maybe_emit_tones (EmpathyCallWindow *self)
- {
-   if (self->priv->sending_tones)
-     return;
-   empathy_call_window_emit_tones (self);
- }
- static void
- empathy_call_window_tones_stopped_cb (TpChannel *proxy,
-     gboolean arg_cancelled,
-     gpointer user_data,
-     GObject *weak_object)
- {
-   EmpathyCallWindow *self = EMPATHY_CALL_WINDOW (user_data);
-   self->priv->sending_tones = FALSE;
-   empathy_call_window_emit_tones (self);
- }
  static void
  dtmf_start_tone_cb (EmpathyDialpadWidget *dialpad,
      TpDTMFEvent event,
      EmpathyCallWindow *self)
  {
-   EmpathyCallWindowPriv *priv = GET_PRIV (self);
+   TpCallChannel *call;
+   gchar tones[2];
  
-   g_string_append_c (priv->tones, tp_dtmf_event_to_char (event));
+   g_object_get (self->priv->handler, "call-channel", &call, NULL);
  
-   empathy_call_window_maybe_emit_tones (self);
+   tones[0] = tp_dtmf_event_to_char (event);
+   tones[1] = '\0';
+   tp_call_channel_send_tones_async (call, tones, NULL, NULL, NULL);
+   g_object_unref (call);
  }
  
  static void
@@@ -439,11 -396,8 +396,11 @@@ create_video_output_widget (EmpathyCall
    clutter_texture_set_keep_aspect_ratio (CLUTTER_TEXTURE (priv->video_output),
        TRUE);
  
 -  priv->video_output_sink = clutter_gst_video_sink_new (
 -      CLUTTER_TEXTURE (priv->video_output));
 +  priv->video_output_sink = gst_element_factory_make ("cluttersink", NULL);
 +  if (priv->video_output_sink == NULL)
 +    g_error ("Missing cluttersink");
 +  else
 +    g_object_set (priv->video_output_sink, "texture", priv->video_output, NULL);
  
    clutter_container_add_actor (CLUTTER_CONTAINER (priv->video_box),
        priv->video_output);
@@@ -1116,12 -1070,8 +1073,12 @@@ create_video_preview (EmpathyCallWindo
    preview = empathy_rounded_texture_new ();
    clutter_actor_set_size (preview,
        SELF_VIDEO_SECTION_WIDTH, SELF_VIDEO_SECTION_HEIGHT);
 -  priv->video_preview_sink = clutter_gst_video_sink_new (
 -      CLUTTER_TEXTURE (preview));
 +
 +  priv->video_preview_sink = gst_element_factory_make ("cluttersink", NULL);
 +  if (priv->video_preview_sink == NULL)
 +    g_error ("Missing cluttersink");
 +  else
 +    g_object_set (priv->video_preview_sink, "texture", preview, NULL);
  
    /* Add a little offset to the video preview */
    layout = clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_CENTER,
@@@ -1557,7 -1507,7 +1514,7 @@@ empathy_call_window_set_state_ringing (
  
    g_assert (self->priv->call_state != CONNECTED);
  
-   video = tpy_call_channel_has_initial_video (self->priv->pending_channel);
+   video = tp_call_channel_has_initial_video (self->priv->pending_channel, NULL);
  
    empathy_call_window_status_message (self, _("Incoming call"));
    self->priv->call_state = RINGING;
@@@ -1601,7 -1551,7 +1558,7 @@@ empathy_call_window_cdo_invalidated_cb 
  
  void
  empathy_call_window_start_ringing (EmpathyCallWindow *self,
-     TpyCallChannel *channel,
+     TpCallChannel *channel,
      TpChannelDispatchOperation *dispatch_operation,
      TpAddDispatchOperationContext *context)
  {
@@@ -1825,8 -1775,6 +1782,6 @@@ empathy_call_window_init (EmpathyCallWi
    g_signal_connect (priv->dtmf_panel, "start-tone",
        G_CALLBACK (dtmf_start_tone_cb), self);
  
-   priv->tones = g_string_new ("");
    gtk_box_pack_start (GTK_BOX (priv->pane), priv->dtmf_panel,
        FALSE, FALSE, 6);
  
@@@ -2254,14 -2202,14 +2209,14 @@@ empathy_call_window_constructed (GObjec
  {
    EmpathyCallWindow *self = EMPATHY_CALL_WINDOW (object);
    EmpathyCallWindowPriv *priv = GET_PRIV (self);
-   TpyCallChannel *call;
-   TpyCallState state;
+   TpCallChannel *call;
+   TpCallState state;
  
    g_assert (priv->handler != NULL);
  
    g_object_get (priv->handler, "call-channel", &call, NULL);
-   state = tpy_call_channel_get_state (call, NULL, NULL);
-   priv->outgoing = (state == TPY_CALL_STATE_PENDING_INITIATOR);
+   state = tp_call_channel_get_state (call, NULL, NULL, NULL);
+   priv->outgoing = (state == TP_CALL_STATE_PENDING_INITIATOR);
    tp_clear_object (&call);
  
    g_object_get (priv->handler, "target-contact", &priv->contact, NULL);
@@@ -2451,8 -2399,6 +2406,6 @@@ empathy_call_window_finalize (GObject *
  
    g_timer_destroy (priv->timer);
  
-   g_string_free (priv->tones, TRUE);
    G_OBJECT_CLASS (empathy_call_window_parent_class)->finalize (object);
  }
  
@@@ -2604,9 -2550,6 +2557,6 @@@ empathy_call_window_disconnected (Empat
    gtk_action_set_sensitive (priv->menu_fullscreen, FALSE);
    gtk_widget_set_sensitive (priv->dtmf_panel, FALSE);
  
-   priv->sending_tones = FALSE;
-   g_string_set_size (priv->tones, 0);
    could_reset_pipeline = empathy_call_window_reset_pipeline (self);
  
    if (priv->call_state == CONNECTING)
@@@ -3062,7 -3005,7 +3012,7 @@@ display_error (EmpathyCallWindow *self
  #if 0
  static gchar *
  media_stream_error_to_txt (EmpathyCallWindow *self,
-     TpyCallChannel *call,
+     TpCallChannel *call,
      gboolean audio,
      TpMediaStreamError error)
  {
  
  static void
  empathy_call_window_stream_error (EmpathyCallWindow *self,
-     TpyCallChannel *call,
+     TpCallChannel *call,
      gboolean audio,
      guint code,
      const gchar *msg,
  }
  
  static void
- empathy_call_window_audio_stream_error (TpyCallChannel *call,
+ empathy_call_window_audio_stream_error (TpCallChannel *call,
      guint code,
      const gchar *msg,
      EmpathyCallWindow *self)
  }
  
  static void
- empathy_call_window_video_stream_error (TpyCallChannel *call,
+ empathy_call_window_video_stream_error (TpCallChannel *call,
      guint code,
      const gchar *msg,
      EmpathyCallWindow *self)
@@@ -3227,22 -3170,22 +3177,22 @@@ show_balance_error (EmpathyCallWindow *
  
  static void
  empathy_call_window_state_changed_cb (EmpathyCallHandler *handler,
-     TpyCallState state,
+     TpCallState state,
      gchar *reason,
      EmpathyCallWindow *self)
  {
    EmpathyCallWindowPriv *priv = GET_PRIV (self);
-   TpyCallChannel *call;
+   TpCallChannel *call;
    gboolean can_send_video;
  
-   if (state == TPY_CALL_STATE_ENDED &&
+   if (state == TP_CALL_STATE_ENDED &&
        !tp_strdiff (reason, TP_ERROR_STR_INSUFFICIENT_BALANCE))
      {
        show_balance_error (self);
        return;
      }
  
-   if (state != TPY_CALL_STATE_ACCEPTED)
+   if (state != TP_CALL_STATE_ACCEPTED)
      return;
  
    if (priv->call_state == CONNECTED)
  
    g_object_get (priv->handler, "call-channel", &call, NULL);
  
-   if (tpy_call_channel_has_dtmf (call))
+   if (tp_call_channel_has_dtmf (call))
      gtk_widget_set_sensitive (priv->dtmf_panel, TRUE);
  
    if (priv->video_input == NULL)
@@@ -3604,20 -3547,20 +3554,20 @@@ start_call (EmpathyCallWindow *self
  
    if (empathy_call_handler_has_initial_video (priv->handler))
      {
-       TpyCallChannel *call;
-       TpySendingState s;
+       TpCallChannel *call;
+       TpSendingState s;
  
        g_object_get (priv->handler, "call-channel", &call, NULL);
        /* If the call channel isn't set yet we're requesting it, if we're
         * requesting it with initial video it should be PENDING_SEND when we get
         * it */
        if (call == NULL)
-         s = TPY_SENDING_STATE_PENDING_SEND;
+         s = TP_SENDING_STATE_PENDING_SEND;
        else
-         s = tpy_call_channel_get_video_state (call);
+         s = empathy_call_channel_get_video_state (call);
  
-       if (s == TPY_SENDING_STATE_PENDING_SEND ||
-           s == TPY_SENDING_STATE_SENDING)
+       if (s == TP_SENDING_STATE_PENDING_SEND ||
+           s == TP_SENDING_STATE_SENDING)
          {
            /* Enable 'send video' buttons and display the preview */
            gtk_toggle_tool_button_set_active (
@@@ -3733,8 -3676,10 +3683,10 @@@ empathy_call_window_bus_message (GstBu
  }
  
  static void
- empathy_call_window_members_changed_cb (TpyCallChannel *call,
-     GHashTable *members,
+ empathy_call_window_members_changed_cb (TpCallChannel *call,
+     GHashTable *updates,
+     GPtrArray *removed,
+     TpCallStateReason *reason,
      EmpathyCallWindow *self)
  {
    EmpathyCallWindowPriv *priv = GET_PRIV (self);
    gpointer key, value;
    gboolean held = FALSE;
  
-   g_hash_table_iter_init (&iter, members);
+   g_hash_table_iter_init (&iter, updates);
    while (g_hash_table_iter_next (&iter, &key, &value))
      {
-       if (GPOINTER_TO_INT (value) & TPY_CALL_MEMBER_FLAG_HELD)
+       if (GPOINTER_TO_INT (value) & TP_CALL_MEMBER_FLAG_HELD)
          {
            /* This assumes this is a 1-1 call, otherwise one participant
             * putting the call on hold wouldn't mean the call is on hold
@@@ -3767,7 -3712,7 +3719,7 @@@ call_handler_notify_call_cb (EmpathyCal
      EmpathyCallWindow *self)
  {
    EmpathyCallWindowPriv *priv = GET_PRIV (self);
-   TpyCallChannel *call;
+   TpCallChannel *call;
  
    g_object_get (priv->handler, "call-channel", &call, NULL);
    if (call == NULL)
    tp_g_signal_connect_object (call, "members-changed",
        G_CALLBACK (empathy_call_window_members_changed_cb), self, 0);
  
-   tp_cli_channel_interface_dtmf_connect_to_stopped_tones (TP_CHANNEL (call),
-       empathy_call_window_tones_stopped_cb, self, NULL,
-       G_OBJECT (call), NULL);
    g_object_unref (call);
  }
  
@@@ -3794,7 -3735,7 +3742,7 @@@ static voi
  empathy_call_window_connect_handler (EmpathyCallWindow *self)
  {
    EmpathyCallWindowPriv *priv = GET_PRIV (self);
-   TpyCallChannel *call;
+   TpCallChannel *call;
  
    g_signal_connect (priv->handler, "state-changed",
      G_CALLBACK (empathy_call_window_state_changed_cb), self);
@@@ -4007,7 -3948,7 +3955,7 @@@ empathy_call_window_set_send_video (Emp
    CameraState state)
  {
    EmpathyCallWindowPriv *priv = GET_PRIV (window);
-   TpyCallChannel *call;
+   TpCallChannel *call;
  
    priv->sending_video = (state == CAMERA_STATE_ON);
  
  
    g_object_get (priv->handler, "call-channel", &call, NULL);
    DEBUG ("%s sending video", priv->sending_video ? "start": "stop");
-   tpy_call_channel_send_video (call, priv->sending_video);
+   empathy_call_channel_send_video (call, priv->sending_video);
    g_object_unref (call);
  }
  
diff --combined src/empathy-call.c
index 71d9db707ec3869ba00b0d827556baa8a4739d94,21b751df9cdaf3cbd09d3dda257dd97b482abfaa..5f45d1ee566b142b3f7df5faa03851179bbd9d0e
  #include <clutter-gtk/clutter-gtk.h>
  #include <clutter-gst/clutter-gst.h>
  
 +#ifdef CLUTTER_WINDOWING_X11
 +#include <X11/Xlib.h>
 +#endif
 +
  #include <telepathy-glib/debug-sender.h>
  
- #include <telepathy-yell/telepathy-yell.h>
  #include <libempathy/empathy-client-factory.h>
  
  #include <libempathy-gtk/empathy-ui-utils.h>
@@@ -91,7 -85,7 +89,7 @@@ find_window_for_handle (gpointer key
  static gboolean
  incoming_call_cb (EmpathyCallFactory *factory,
      guint handle,
-     TpyCallChannel *channel,
+     TpCallChannel *channel,
      TpChannelDispatchOperation *dispatch_operation,
      TpAddDispatchOperationContext *context,
      gpointer user_data)
@@@ -191,12 -185,6 +189,12 @@@ main (int argc
    /* Init */
    g_thread_init (NULL);
  
 +#ifdef GDK_WINDOWING_X11
 +  /* We can't call clutter_gst_init() before gtk_clutter_init(), so no choice
 +   * but to intiialise X11 threading ourself */
 +  XInitThreads ();
 +#endif
 +
    /* Clutter needs this */
    gdk_disable_multidevice ();
  
  
    g_option_context_free (optcontext);
  
-   tpy_cli_init ();
    gtk_clutter_init (&argc, &argv);
    clutter_gst_init (&argc, &argv);