aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-contact.c
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-06-09 17:28:44 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-06-09 17:28:44 +0800
commit8944f13286ba5293781f2d57980da284cb2aa29d (patch)
tree91aa682420a072399f03ac7fb456f62c13064add /libempathy/empathy-contact.c
parent981a1377f660a9d1e3660dc66613b993b78486fc (diff)
parent3f52e59aa058c16a9ba115398681a16b1e289cd1 (diff)
downloadgsoc2013-empathy-8944f13286ba5293781f2d57980da284cb2aa29d.tar
gsoc2013-empathy-8944f13286ba5293781f2d57980da284cb2aa29d.tar.gz
gsoc2013-empathy-8944f13286ba5293781f2d57980da284cb2aa29d.tar.bz2
gsoc2013-empathy-8944f13286ba5293781f2d57980da284cb2aa29d.tar.lz
gsoc2013-empathy-8944f13286ba5293781f2d57980da284cb2aa29d.tar.xz
gsoc2013-empathy-8944f13286ba5293781f2d57980da284cb2aa29d.tar.zst
gsoc2013-empathy-8944f13286ba5293781f2d57980da284cb2aa29d.zip
Merge branch 'call'
Diffstat (limited to 'libempathy/empathy-contact.c')
-rw-r--r--libempathy/empathy-contact.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c
index a90b20ece..55bc40bdd 100644
--- a/libempathy/empathy-contact.c
+++ b/libempathy/empathy-contact.c
@@ -28,6 +28,7 @@
#include <telepathy-glib/account-manager.h>
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/util.h>
+#include <telepathy-yell/telepathy-yell.h>
#include <telepathy-logger/log-manager.h>
@@ -1660,6 +1661,29 @@ tp_caps_to_capabilities (TpCapabilities *caps)
TP_PROP_CHANNEL_INTERFACE_SMS_SMS_CHANNEL, NULL))
capabilities |= EMPATHY_CAPABILITIES_SMS;
}
+ else if (!tp_strdiff (chan_type,
+ TPY_IFACE_CHANNEL_TYPE_CALL))
+ {
+ guint j;
+
+ if (tp_asv_get_boolean (fixed_prop,
+ TPY_PROP_CHANNEL_TYPE_CALL_INITIAL_AUDIO, NULL))
+ capabilities |= EMPATHY_CAPABILITIES_AUDIO;
+
+ if (tp_asv_get_boolean (fixed_prop,
+ TPY_PROP_CHANNEL_TYPE_CALL_INITIAL_VIDEO, NULL))
+ capabilities |= EMPATHY_CAPABILITIES_VIDEO;
+
+ for (j = 0; allowed_prop[j] != NULL; j++)
+ {
+ if (!tp_strdiff (allowed_prop[j],
+ TPY_PROP_CHANNEL_TYPE_CALL_INITIAL_AUDIO))
+ capabilities |= EMPATHY_CAPABILITIES_AUDIO;
+ else if (!tp_strdiff (allowed_prop[j],
+ TPY_PROP_CHANNEL_TYPE_CALL_INITIAL_VIDEO))
+ capabilities |= EMPATHY_CAPABILITIES_VIDEO;
+ }
+ }
}
return capabilities;