[empathy: 80/99] Implement empathy_call_handler_start_call() for redialing
- From: Emilio Pozuelo Monfort <epm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 80/99] Implement empathy_call_handler_start_call() for redialing
- Date: Thu, 9 Jun 2011 09:56:04 +0000 (UTC)
commit e77ec8904ba6c4372c978ac51ce67d79dd90b869
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date: Mon May 16 16:43:59 2011 +0100
Implement empathy_call_handler_start_call() for redialing
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 cf9c1b0..18d0d1f 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
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]