diff options
author | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2011-05-16 23:43:59 +0800 |
---|---|---|
committer | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2011-06-09 17:20:08 +0800 |
commit | e77ec8904ba6c4372c978ac51ce67d79dd90b869 (patch) | |
tree | bc6f69a3923d6de11ac9d566fb15597ceeda33a2 | |
parent | 039a108f7cc13f6fd587cf505cd43552e1a2a392 (diff) | |
download | gsoc2013-empathy-e77ec8904ba6c4372c978ac51ce67d79dd90b869.tar gsoc2013-empathy-e77ec8904ba6c4372c978ac51ce67d79dd90b869.tar.gz gsoc2013-empathy-e77ec8904ba6c4372c978ac51ce67d79dd90b869.tar.bz2 gsoc2013-empathy-e77ec8904ba6c4372c978ac51ce67d79dd90b869.tar.lz gsoc2013-empathy-e77ec8904ba6c4372c978ac51ce67d79dd90b869.tar.xz gsoc2013-empathy-e77ec8904ba6c4372c978ac51ce67d79dd90b869.tar.zst gsoc2013-empathy-e77ec8904ba6c4372c978ac51ce67d79dd90b869.zip |
Implement empathy_call_handler_start_call() for redialing
-rw-r--r-- | src/empathy-call-handler.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/empathy-call-handler.c b/src/empathy-call-handler.c index cf9c1b03e..18d0d1f9e 100644 --- a/src/empathy-call-handler.c +++ b/src/empathy-call-handler.c @@ -30,11 +30,13 @@ #include <telepathy-farstream/telepathy-farstream.h> +#include <libempathy/empathy-channel-factory.h> #include <libempathy/empathy-utils.h> #include <libempathy/empathy-tp-contact-factory.h> +#include <libempathy-gtk/empathy-call-utils.h> + #include "empathy-call-handler.h" -#include "empathy-call-factory.h" #include "src-marshal.h" #define DEBUG_FLAG EMPATHY_DEBUG_VOIP @@ -899,7 +901,6 @@ on_call_accepted_cb (GObject *source_object, } } -#if 0 static void empathy_call_handler_request_cb (GObject *source, GAsyncResult *result, @@ -927,21 +928,26 @@ empathy_call_handler_request_cb (GObject *source, } priv->call = TPY_CALL_CHANNEL (channel); + tp_g_signal_connect_object (priv->call, "state-changed", + G_CALLBACK (on_call_state_changed_cb), self, 0); + tp_g_signal_connect_object (priv->call, "invalidated", + G_CALLBACK (on_call_invalidated_cb), self, 0); g_object_notify (G_OBJECT (self), "call-channel"); empathy_call_handler_start_tpfs (self); + tpy_call_channel_accept_async (priv->call, on_call_accepted_cb, NULL); } -#endif void empathy_call_handler_start_call (EmpathyCallHandler *handler, gint64 timestamp) { EmpathyCallHandlerPriv *priv = GET_PRIV (handler); -/*TpAccountChannelRequest *req; + EmpathyChannelFactory *channel_factory; + TpAccountChannelRequest *req; TpAccount *account; - GHashTable *request;*/ + GHashTable *request; if (priv->call != NULL) { @@ -949,27 +955,27 @@ empathy_call_handler_start_call (EmpathyCallHandler *handler, tpy_call_channel_accept_async (priv->call, on_call_accepted_cb, NULL); return; } - else - { - g_warning ("No Call channel!"); - } -#if 0 /* No TpyCallChannel (we are redialing). Request a new call channel */ g_assert (priv->contact != NULL); account = empathy_contact_get_account (priv->contact); - request = empathy_call_create_call_request (priv->contact, + request = empathy_call_create_call_request ( + empathy_contact_get_id (priv->contact), priv->initial_audio, priv->initial_video); req = tp_account_channel_request_new (account, request, timestamp); + channel_factory = empathy_channel_factory_dup (); + tp_account_channel_request_set_channel_factory (req, + TP_CLIENT_CHANNEL_FACTORY (channel_factory)); + g_object_unref (channel_factory); + tp_account_channel_request_create_and_handle_channel_async (req, NULL, empathy_call_handler_request_cb, handler); g_object_unref (req); g_hash_table_unref (request); -#endif } /** |