aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-01-10 00:14:10 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-01-10 00:14:10 +0800
commita225d6d620e17306dbc5c1e7b7b886046e24c9db (patch)
tree535e018303a12848452434e69387f635d9a2c667
parent3fc0800fa97d410b2ce39ee5b61e1a49967d4b06 (diff)
downloadgsoc2013-empathy-a225d6d620e17306dbc5c1e7b7b886046e24c9db.tar
gsoc2013-empathy-a225d6d620e17306dbc5c1e7b7b886046e24c9db.tar.gz
gsoc2013-empathy-a225d6d620e17306dbc5c1e7b7b886046e24c9db.tar.bz2
gsoc2013-empathy-a225d6d620e17306dbc5c1e7b7b886046e24c9db.tar.lz
gsoc2013-empathy-a225d6d620e17306dbc5c1e7b7b886046e24c9db.tar.xz
gsoc2013-empathy-a225d6d620e17306dbc5c1e7b7b886046e24c9db.tar.zst
gsoc2013-empathy-a225d6d620e17306dbc5c1e7b7b886046e24c9db.zip
Add a function to explicitly set the remote candidate on outgoing calls instead of relying on the group interface
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> svn path=/trunk/; revision=2165
-rw-r--r--libempathy/empathy-tp-call.c34
-rw-r--r--libempathy/empathy-tp-call.h4
2 files changed, 15 insertions, 23 deletions
diff --git a/libempathy/empathy-tp-call.c b/libempathy/empathy-tp-call.c
index 45aa22be1..22c86232a 100644
--- a/libempathy/empathy-tp-call.c
+++ b/libempathy/empathy-tp-call.c
@@ -294,29 +294,19 @@ tp_call_member_added_cb (EmpathyTpGroup *group,
g_object_unref (call);
}
-static void
-tp_call_remote_pending_cb (EmpathyTpGroup *group,
- EmpathyContact *contact,
- EmpathyContact *actor,
- guint reason,
- const gchar *message,
- EmpathyTpCall *call)
+void
+empathy_tp_call_to (EmpathyTpCall *call, EmpathyContact *contact)
{
EmpathyTpCallPriv *priv = GET_PRIV (call);
- g_object_ref (call);
- if (!priv->contact && !empathy_contact_is_user (contact))
- {
- priv->contact = g_object_ref (contact);
- priv->is_incoming = FALSE;
- priv->status = EMPATHY_TP_CALL_STATUS_PENDING;
- g_object_notify (G_OBJECT (call), "is-incoming");
- g_object_notify (G_OBJECT (call), "contact");
- g_object_notify (G_OBJECT (call), "status");
- tp_call_request_streams_for_capabilities (call,
- EMPATHY_CAPABILITIES_AUDIO);
- }
- g_object_unref (call);
+ priv->contact = g_object_ref (contact);
+ priv->is_incoming = FALSE;
+ priv->status = EMPATHY_TP_CALL_STATUS_PENDING;
+ g_object_notify (G_OBJECT (call), "is-incoming");
+ g_object_notify (G_OBJECT (call), "contact");
+ g_object_notify (G_OBJECT (call), "status");
+ tp_call_request_streams_for_capabilities (call,
+ EMPATHY_CAPABILITIES_AUDIO);
}
static void
@@ -481,8 +471,6 @@ tp_call_constructor (GType type,
g_signal_connect (priv->group, "member-added",
G_CALLBACK (tp_call_member_added_cb), call);
- g_signal_connect (priv->group, "remote-pending",
- G_CALLBACK (tp_call_remote_pending_cb), call);
/* Start stream engine */
tp_call_stream_engine_handle_channel (call);
@@ -624,7 +612,7 @@ static void
empathy_tp_call_init (EmpathyTpCall *call)
{
EmpathyTpCallPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (call,
- EMPATHY_TYPE_TP_CALL, EmpathyTpCallPriv);
+ EMPATHY_TYPE_TP_CALL, EmpathyTpCallPriv);
call->priv = priv;
priv->status = EMPATHY_TP_CALL_STATUS_READYING;
diff --git a/libempathy/empathy-tp-call.h b/libempathy/empathy-tp-call.h
index 29a79c64e..5724963f7 100644
--- a/libempathy/empathy-tp-call.h
+++ b/libempathy/empathy-tp-call.h
@@ -27,6 +27,8 @@
#include <glib.h>
#include <telepathy-glib/channel.h>
+#include "empathy-contact.h"
+
G_BEGIN_DECLS
#define EMPATHY_TYPE_TP_CALL (empathy_tp_call_get_type ())
@@ -73,6 +75,8 @@ GType empathy_tp_call_get_type (void) G_GNUC_CONST;
EmpathyTpCall *empathy_tp_call_new (TpChannel *channel);
void empathy_tp_call_close (EmpathyTpCall *call);
+void empathy_tp_call_to (EmpathyTpCall *call, EmpathyContact *contact);
+
void empathy_tp_call_accept_incoming_call (EmpathyTpCall *call);
void empathy_tp_call_request_video_stream_direction (EmpathyTpCall *call,
gboolean is_sending);