aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-02-23 19:12:07 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-02-23 22:50:44 +0800
commit2f18a9a0364fa63dc21ec68fda25406303f58483 (patch)
tree32e3a8388b1a1732b3f5243cfee2dbcd80714d82 /libempathy
parent80e857fd3e975b1bd679dd9fc18ad7215ea322bc (diff)
downloadgsoc2013-empathy-2f18a9a0364fa63dc21ec68fda25406303f58483.tar
gsoc2013-empathy-2f18a9a0364fa63dc21ec68fda25406303f58483.tar.gz
gsoc2013-empathy-2f18a9a0364fa63dc21ec68fda25406303f58483.tar.bz2
gsoc2013-empathy-2f18a9a0364fa63dc21ec68fda25406303f58483.tar.lz
gsoc2013-empathy-2f18a9a0364fa63dc21ec68fda25406303f58483.tar.xz
gsoc2013-empathy-2f18a9a0364fa63dc21ec68fda25406303f58483.tar.zst
gsoc2013-empathy-2f18a9a0364fa63dc21ec68fda25406303f58483.zip
Recognize Call channel capabilities
Diffstat (limited to 'libempathy')
-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 d9ae5f649..5a074b53c 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>
@@ -1667,6 +1668,29 @@ tp_caps_to_capabilities (TpCapabilities *caps)
capabilities |= EMPATHY_CAPABILITIES_VIDEO;
}
}
+ 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;