From f1c596bdd13c27318841d971d443e1da44add9db Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 12 Nov 2013 19:36:56 +0000 Subject: [PATCH 07/26] mcp_account_manager_list_keys: remove This is unused, and plugins don't have any good reason to call it. --- mission-control-plugins/account.c | 23 ----------------------- mission-control-plugins/account.h | 3 --- mission-control-plugins/implementation.h | 3 --- src/mcd-storage.c | 29 ----------------------------- 4 files changed, 58 deletions(-) diff --git a/mission-control-plugins/account.c b/mission-control-plugins/account.c index c9859d7..fecd3d8 100644 --- a/mission-control-plugins/account.c +++ b/mission-control-plugins/account.c @@ -168,29 +168,6 @@ mcp_account_manager_set_parameter (const McpAccountManager *mcpa, } /** - * mcp_account_manage_list_keys: - * @mcpa: a #McpAccountManager instance - * @account: the unique name of an account - * - * - * - * Returns: (transfer full): a list of all keys (attributes and - * "param-"-prefixed parameters) stored for @account by any plugin - */ -GStrv -mcp_account_manager_list_keys (const McpAccountManager *mcpa, - const gchar *account) -{ - McpAccountManagerIface *iface = MCP_ACCOUNT_MANAGER_GET_IFACE (mcpa); - - g_return_val_if_fail (iface != NULL, NULL); - g_return_val_if_fail (iface->list_keys != NULL, NULL); - g_return_val_if_fail (account != NULL, NULL); - - return iface->list_keys (mcpa, account); -} - -/** * mcp_account_manager_get_unique_name: * @mcpa: an #McpAccountManager instance * @manager: the name of the manager diff --git a/mission-control-plugins/account.h b/mission-control-plugins/account.h index 4356b3c..788813f 100644 --- a/mission-control-plugins/account.h +++ b/mission-control-plugins/account.h @@ -67,9 +67,6 @@ gchar * mcp_account_manager_get_unique_name (McpAccountManager *mcpa, const gchar *protocol, const gchar *identification); -GStrv mcp_account_manager_list_keys (const McpAccountManager *mcpa, - const gchar *account); - gchar *mcp_account_manager_escape_variant_for_keyfile ( const McpAccountManager *mcpa, GVariant *variant); diff --git a/mission-control-plugins/implementation.h b/mission-control-plugins/implementation.h index 9d44b3b..7d95146 100644 --- a/mission-control-plugins/implementation.h +++ b/mission-control-plugins/implementation.h @@ -87,9 +87,6 @@ struct _McpAccountManagerIface { const gchar *protocol, const gchar *identification); - GStrv (* list_keys) (const McpAccountManager *ma, - const gchar *acct); - gchar * (* escape_variant_for_keyfile) (const McpAccountManager *mcpa, GVariant *variant); diff --git a/src/mcd-storage.c b/src/mcd-storage.c index 47822a8..b8f5ffc 100644 --- a/src/mcd-storage.c +++ b/src/mcd-storage.c @@ -423,34 +423,6 @@ set_value (const McpAccountManager *ma, } } -static GStrv -list_keys (const McpAccountManager *ma, - const gchar * account) -{ - McdStorage *self = MCD_STORAGE (ma); - GPtrArray *ret = g_ptr_array_new (); - McdStorageAccount *sa = lookup_account (self, account); - - if (sa != NULL) - { - GHashTableIter iter; - gpointer k; - - g_hash_table_iter_init (&iter, sa->attributes); - - while (g_hash_table_iter_next (&iter, &k, NULL)) - g_ptr_array_add (ret, g_strdup (k)); - - g_hash_table_iter_init (&iter, sa->parameters); - - while (g_hash_table_iter_next (&iter, &k, NULL)) - g_ptr_array_add (ret, g_strdup_printf ("param-%s", (gchar *) k)); - } - - g_ptr_array_add (ret, NULL); - return (GStrv) g_ptr_array_free (ret, FALSE); -} - static gchar * unique_name (const McpAccountManager *ma, const gchar *manager, @@ -2134,7 +2106,6 @@ plugin_iface_init (McpAccountManagerIface *iface, iface->unique_name = unique_name; iface->identify_account_async = identify_account_async; iface->identify_account_finish = identify_account_finish; - iface->list_keys = list_keys; iface->escape_variant_for_keyfile = mcpa_escape_variant_for_keyfile; } -- 1.8.4.3