From 4db6783e78972a35a1f66ed0311cf8080a1b63e1 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Fri, 8 Nov 2013 13:17:10 -0500 Subject: Remove all notion of secret parameter We now depend on SASLAuthentication for handling secret, and MC does not have gnome-keyring anymore. [Adjusted to apply before other storage API changes -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71384 Signed-off-by: Simon McVittie --- mission-control-plugins/account-storage.c | 3 +- mission-control-plugins/account.c | 59 ----------------------- mission-control-plugins/account.h | 8 --- mission-control-plugins/implementation.h | 8 --- mission-control-plugins/mission-control-plugins.h | 1 - 5 files changed, 1 insertion(+), 78 deletions(-) (limited to 'mission-control-plugins') diff --git a/mission-control-plugins/account-storage.c b/mission-control-plugins/account-storage.c index b51c1264..14f4f6d5 100644 --- a/mission-control-plugins/account-storage.c +++ b/mission-control-plugins/account-storage.c @@ -395,8 +395,7 @@ mcp_account_storage_priority (const McpAccountStorage *storage) * Before emitting this signal, the plugin must call * either mcp_account_manager_set_attribute(), * mcp_account_manager_set_parameter(), - * or mcp_account_manager_set_value() and (if appropriate) - * mcp_account_manager_parameter_make_secret() + * or mcp_account_manager_set_value() * before returning from this method call. * * Note that mcp_account_manager_set_parameter() does not use the diff --git a/mission-control-plugins/account.c b/mission-control-plugins/account.c index 1744ef6a..493a34c0 100644 --- a/mission-control-plugins/account.c +++ b/mission-control-plugins/account.c @@ -215,65 +215,6 @@ mcp_account_manager_get_value (const McpAccountManager *mcpa, return iface->get_value (mcpa, account, key); } -/** - * mcp_account_manager_parameter_is_secret: - * @mcpa: an #McpAccountManager instance - * @account: the unique name of an account - * @key: the constant string "param-", plus a parameter name like - * "account" or "password" - * - * Determine whether a given account parameter is secret. - * Generally this is determined by MC and passed down to plugins, - * but any #McpAccountStorage plugin may decide a parameter is - * secret, in which case the return value for this call will - * indicate that fact too. - * - * For historical reasons, this function only operates on parameters, - * but requires its argument to be prefixed with "param-". - * - * Returns: %TRUE for secret settings, %FALSE otherwise - */ -gboolean -mcp_account_manager_parameter_is_secret (const McpAccountManager *mcpa, - const gchar *account, - const gchar *key) -{ - McpAccountManagerIface *iface = MCP_ACCOUNT_MANAGER_GET_IFACE (mcpa); - - g_return_val_if_fail (iface != NULL, FALSE); - g_return_val_if_fail (iface->is_secret != NULL, FALSE); - - return iface->is_secret (mcpa, account, key); -} - -/** - * mcp_account_manager_parameter_make_secret: - * @mcpa: an #McpAccountManager instance - * @account: the unique name of an account - * @key: the constant string "param-", plus a parameter name like - * "account" or "password" - * - * Flag an account setting as secret for the lifetime of this - * #McpAccountManager. For instance, this should be called if - * @key has been retrieved from gnome-keyring. - * - * For historical reasons, this function only operates on parameters, - * but requires its argument to be prefixed with "param-". - */ -void -mcp_account_manager_parameter_make_secret (const McpAccountManager *mcpa, - const gchar *account, - const gchar *key) -{ - McpAccountManagerIface *iface = MCP_ACCOUNT_MANAGER_GET_IFACE (mcpa); - - g_return_if_fail (iface != NULL); - g_return_if_fail (iface->make_secret != NULL); - - g_debug ("%s.%s should be secret", account, key); - iface->make_secret (mcpa, account, key); -} - /** * mcp_account_manager_get_unique_name: * @mcpa: an #McpAccountManager instance diff --git a/mission-control-plugins/account.h b/mission-control-plugins/account.h index 4015457b..c283ef99 100644 --- a/mission-control-plugins/account.h +++ b/mission-control-plugins/account.h @@ -66,14 +66,6 @@ gchar * mcp_account_manager_get_value (const McpAccountManager *mcpa, const gchar *account, const gchar *key); -gboolean mcp_account_manager_parameter_is_secret (const McpAccountManager *mcpa, - const gchar *account, - const gchar *key); - -void mcp_account_manager_parameter_make_secret (const McpAccountManager *mcpa, - const gchar *account, - const gchar *key); - gchar * mcp_account_manager_get_unique_name (McpAccountManager *mcpa, const gchar *manager, const gchar *protocol, diff --git a/mission-control-plugins/implementation.h b/mission-control-plugins/implementation.h index 2ad28938..9cc04b4e 100644 --- a/mission-control-plugins/implementation.h +++ b/mission-control-plugins/implementation.h @@ -86,14 +86,6 @@ struct _McpAccountManagerIface { const gchar *acct, const gchar *key); - gboolean (*is_secret) (const McpAccountManager *ma, - const gchar *acct, - const gchar *key); - - void (* make_secret) (const McpAccountManager *ma, - const gchar *acct, - const gchar *key); - gchar * (* unique_name) (const McpAccountManager *ma, const gchar *manager, const gchar *protocol, diff --git a/mission-control-plugins/mission-control-plugins.h b/mission-control-plugins/mission-control-plugins.h index 13d87e6f..806f472a 100644 --- a/mission-control-plugins/mission-control-plugins.h +++ b/mission-control-plugins/mission-control-plugins.h @@ -27,7 +27,6 @@ typedef enum { MCP_PARAMETER_FLAG_NONE = 0, - MCP_PARAMETER_FLAG_SECRET = TP_CONN_MGR_PARAM_FLAG_SECRET } McpParameterFlags; typedef enum { -- cgit v1.2.1