aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-04-10 23:04:45 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-05-10 15:51:57 +0800
commit049ba20e4c1579faaf999089a4a97674e3816a50 (patch)
tree41fcae75956027c563169c8691bebf3dd152674a /libempathy
parenta9e5357278f2320098e07dd97bcbffd192e83a38 (diff)
downloadgsoc2013-empathy-049ba20e4c1579faaf999089a4a97674e3816a50.tar
gsoc2013-empathy-049ba20e4c1579faaf999089a4a97674e3816a50.tar.gz
gsoc2013-empathy-049ba20e4c1579faaf999089a4a97674e3816a50.tar.bz2
gsoc2013-empathy-049ba20e4c1579faaf999089a4a97674e3816a50.tar.lz
gsoc2013-empathy-049ba20e4c1579faaf999089a4a97674e3816a50.tar.xz
gsoc2013-empathy-049ba20e4c1579faaf999089a4a97674e3816a50.tar.zst
gsoc2013-empathy-049ba20e4c1579faaf999089a4a97674e3816a50.zip
use tp_capabilities_supports_sms()
https://bugzilla.gnome.org/show_bug.cgi?id=673846
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-contact.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c
index b741210dd..97a49d1e7 100644
--- a/libempathy/empathy-contact.c
+++ b/libempathy/empathy-contact.c
@@ -1696,8 +1696,6 @@ static EmpathyCapabilities
tp_caps_to_capabilities (TpCapabilities *caps)
{
EmpathyCapabilities capabilities = 0;
- guint i;
- GPtrArray *classes;
if (tp_capabilities_supports_file_transfer (caps))
capabilities |= EMPATHY_CAPABILITIES_FT;
@@ -1716,36 +1714,8 @@ tp_caps_to_capabilities (TpCapabilities *caps)
capabilities |= EMPATHY_CAPABILITIES_AUDIO;
}
- classes = tp_capabilities_get_channel_classes (caps);
-
- for (i = 0; i < classes->len; i++)
- {
- GValueArray *class_struct;
- GHashTable *fixed_prop;
- GStrv allowed_prop;
- TpHandleType handle_type;
- const gchar *chan_type;
-
- class_struct = g_ptr_array_index (classes, i);
- tp_value_array_unpack (class_struct, 2,
- &fixed_prop,
- &allowed_prop);
-
- handle_type = tp_asv_get_uint32 (fixed_prop,
- TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL);
- if (handle_type != TP_HANDLE_TYPE_CONTACT)
- continue;
-
- chan_type = tp_asv_get_string (fixed_prop,
- TP_PROP_CHANNEL_CHANNEL_TYPE);
-
- if (!tp_strdiff (chan_type, TP_IFACE_CHANNEL_TYPE_TEXT))
- {
- if (tp_asv_get_boolean (fixed_prop,
- TP_PROP_CHANNEL_INTERFACE_SMS_SMS_CHANNEL, NULL))
- capabilities |= EMPATHY_CAPABILITIES_SMS;
- }
- }
+ if (tp_capabilities_supports_sms (caps))
+ capabilities |= EMPATHY_CAPABILITIES_SMS;
return capabilities;
}