From: Alberto Mardegan Date: Fri, 13 Apr 2012 06:52:29 +0000 (+0300) Subject: Remove support for old D-Bus API X-Git-Tag: 1.2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2fdb5c78b400c6150e98ddaa9619d5f0d97a700a;p=platform%2Fupstream%2Flibgsignon-glib.git Remove support for old D-Bus API --- diff --git a/libsignon-glib/signon-identity-info.c b/libsignon-glib/signon-identity-info.c index c0996f7..2a16381 100644 --- a/libsignon-glib/signon-identity-info.c +++ b/libsignon-glib/signon-identity-info.c @@ -80,14 +80,6 @@ void signon_identity_info_set_methods (SignonIdentityInfo *info, g_hash_table_foreach ((GHashTable *)methods, identity_methods_copy, info); } -static void -identity_value_to_stringarray (gpointer key, gpointer value, gpointer user_data) -{ - gchar **stringarray = (gchar **)g_value_get_boxed ((const GValue *)value); - g_hash_table_insert ((GHashTable *)user_data, g_strdup((gchar *)key), - g_strdupv (stringarray)); -} - static void add_method (gpointer key, gpointer value, gpointer user_data) { @@ -163,27 +155,14 @@ signon_identity_info_new_from_hash_table (GHashTable *map) if (value != NULL) { g_assert (G_VALUE_HOLDS_BOXED (value)); + g_assert (G_VALUE_TYPE (value) == + dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_STRV)); info->methods = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify)g_strfreev); - /* TODO: this check is needed only for a (hopefully short) transitional period, - * until signond has been updated to remove the unnecessary wrapping of the - * mechanisms into a D-Bus variant. - * Once that is done, the else branch can be removed. - */ - if (G_VALUE_TYPE (value) == dbus_g_type_get_map ("GHashTable", - G_TYPE_STRING, G_TYPE_STRV)) - { - g_hash_table_foreach ((GHashTable *)g_value_get_boxed(value), - add_method, - info->methods); - } - else - { - g_hash_table_foreach ((GHashTable *)g_value_get_boxed(value), - identity_value_to_stringarray, - info->methods); - } + g_hash_table_foreach ((GHashTable *)g_value_get_boxed(value), + add_method, + info->methods); } /* get the accessControlList (gchar**) */