aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-05-07 22:19:20 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-05-18 23:17:27 +0800
commitfdb4f5cd91ab28a2216d14388e707ba61efab353 (patch)
tree8af5619fb27851dffa4e91f491ce422866896975 /libempathy
parentd16f5ff7b8ab7b3325401e13987cebeba87044d8 (diff)
downloadgsoc2013-empathy-fdb4f5cd91ab28a2216d14388e707ba61efab353.tar
gsoc2013-empathy-fdb4f5cd91ab28a2216d14388e707ba61efab353.tar.gz
gsoc2013-empathy-fdb4f5cd91ab28a2216d14388e707ba61efab353.tar.bz2
gsoc2013-empathy-fdb4f5cd91ab28a2216d14388e707ba61efab353.tar.lz
gsoc2013-empathy-fdb4f5cd91ab28a2216d14388e707ba61efab353.tar.xz
gsoc2013-empathy-fdb4f5cd91ab28a2216d14388e707ba61efab353.tar.zst
gsoc2013-empathy-fdb4f5cd91ab28a2216d14388e707ba61efab353.zip
Change empathy_tp_call_to to indicate with what media streams we want to start
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-tp-call.c14
-rw-r--r--libempathy/empathy-tp-call.h3
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,