diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2011-02-23 19:12:07 +0800 |
---|---|---|
committer | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2011-06-09 17:20:06 +0800 |
commit | a6b59ff12bf5563ad4db0427c0c9e41bd8842c25 (patch) | |
tree | a4859acc9a7ee9aca82ea128b9c2a89b7ec4d74c /libempathy | |
parent | 15bc6e462986ae39f8a2880b60274be9b8d45114 (diff) | |
download | gsoc2013-empathy-a6b59ff12bf5563ad4db0427c0c9e41bd8842c25.tar gsoc2013-empathy-a6b59ff12bf5563ad4db0427c0c9e41bd8842c25.tar.gz gsoc2013-empathy-a6b59ff12bf5563ad4db0427c0c9e41bd8842c25.tar.bz2 gsoc2013-empathy-a6b59ff12bf5563ad4db0427c0c9e41bd8842c25.tar.lz gsoc2013-empathy-a6b59ff12bf5563ad4db0427c0c9e41bd8842c25.tar.xz gsoc2013-empathy-a6b59ff12bf5563ad4db0427c0c9e41bd8842c25.tar.zst gsoc2013-empathy-a6b59ff12bf5563ad4db0427c0c9e41bd8842c25.zip |
Recognize Call channel capabilities
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-contact.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c index 831be25fc..6cdb3b6d9 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> @@ -1750,6 +1751,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; |