From fdb4f5cd91ab28a2216d14388e707ba61efab353 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Thu, 7 May 2009 15:19:20 +0100 Subject: Change empathy_tp_call_to to indicate with what media streams we want to start --- libempathy/empathy-tp-call.c | 14 ++++++++++++-- libempathy/empathy-tp-call.h | 3 ++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/libempathy/empathy-tp-call.c b/libempathy/empathy-tp-call.c index de88249c0..2971e0ffc 100644 --- a/libempathy/empathy-tp-call.c +++ b/libempathy/empathy-tp-call.c @@ -317,9 +317,13 @@ tp_call_update_status (EmpathyTpCall *call) } void -empathy_tp_call_to (EmpathyTpCall *call, EmpathyContact *contact) +empathy_tp_call_to (EmpathyTpCall *call, EmpathyContact *contact, + gboolean audio, gboolean video) { EmpathyTpCallPriv *priv = GET_PRIV (call); + EmpathyCapabilities capabilities = 0; + + g_assert (audio || video); priv->contact = g_object_ref (contact); priv->is_incoming = FALSE; @@ -327,7 +331,13 @@ empathy_tp_call_to (EmpathyTpCall *call, EmpathyContact *contact) 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); + + if (video) + capabilities |= EMPATHY_CAPABILITIES_VIDEO; + if (audio) + capabilities |= EMPATHY_CAPABILITIES_AUDIO; + + tp_call_request_streams_for_capabilities (call, capabilities); } static void diff --git a/libempathy/empathy-tp-call.h b/libempathy/empathy-tp-call.h index 081773423..406ed1c3f 100644 --- a/libempathy/empathy-tp-call.h +++ b/libempathy/empathy-tp-call.h @@ -76,7 +76,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_to (EmpathyTpCall *call, EmpathyContact *contact, + gboolean audio, gboolean video); void empathy_tp_call_accept_incoming_call (EmpathyTpCall *call); void empathy_tp_call_request_video_stream_direction (EmpathyTpCall *call, -- cgit v1.2.3