From 8fe7c7a2348dcfc1f7833eb84264e9437d5795e8 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 11 Sep 2012 14:10:22 +0200 Subject: use tp_channel_dup_immutable_properties() tp_channel_borrow_immutable_properties() has been deprecated. --- libempathy/empathy-sasl-mechanisms.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'libempathy/empathy-sasl-mechanisms.c') diff --git a/libempathy/empathy-sasl-mechanisms.c b/libempathy/empathy-sasl-mechanisms.c index b900fa5da..3eaa0108d 100644 --- a/libempathy/empathy-sasl-mechanisms.c +++ b/libempathy/empathy-sasl-mechanisms.c @@ -344,15 +344,22 @@ gboolean empathy_sasl_channel_supports_mechanism (TpChannel *channel, const gchar *mechanism) { - GHashTable *props; - const gchar * const *available_mechanisms; + GVariant *props; + GStrv available_mechanisms; + gboolean result; - props = tp_channel_borrow_immutable_properties (channel); - available_mechanisms = tp_asv_get_boxed (props, + props = tp_channel_dup_immutable_properties (channel); + + g_variant_lookup (props, TP_PROP_CHANNEL_INTERFACE_SASL_AUTHENTICATION_AVAILABLE_MECHANISMS, - G_TYPE_STRV); + "^as", &available_mechanisms); + + result = tp_strv_contains ((const gchar * const *) available_mechanisms, + mechanism); - return tp_strv_contains (available_mechanisms, mechanism); + g_variant_unref (props); + g_strfreev (available_mechanisms); + return result; } EmpathySaslMechanism -- cgit v1.2.3