diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-10-15 18:05:45 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-10-29 11:27:25 +0000 |
commit | 62dda025c5961fc05705eccac7e753f730259f7b (patch) | |
tree | df6538179becdafb12b960da26818d7e5619d09d /mission-control-plugins | |
parent | afca9423aa40cfcb1c71de822345abbcb43981c5 (diff) |
Don't give storage plugins the full parameter set, just 'account'
We broke plugin API since the last release anyway, so this isn't
a new API break.
The doc-comments all claim that the string is the result of
IdentifyAccount, because that's about to be true. :-)
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34640
Diffstat (limited to 'mission-control-plugins')
-rw-r--r-- | mission-control-plugins/account-storage.c | 13 | ||||
-rw-r--r-- | mission-control-plugins/account-storage.h | 4 | ||||
-rw-r--r-- | mission-control-plugins/account.c | 10 | ||||
-rw-r--r-- | mission-control-plugins/account.h | 2 | ||||
-rw-r--r-- | mission-control-plugins/implementation.h | 2 |
5 files changed, 18 insertions, 13 deletions
diff --git a/mission-control-plugins/account-storage.c b/mission-control-plugins/account-storage.c index 159a9f4f..b51c1264 100644 --- a/mission-control-plugins/account-storage.c +++ b/mission-control-plugins/account-storage.c @@ -586,13 +586,14 @@ mcp_account_storage_set_parameter (McpAccountStorage *storage, * @am: an object which can be used to call back into the account manager * @manager: the name of the manager * @protocol: the name of the protocol - * @params: A gchar * / GValue * hash table of account parameters + * @identification: a normalized form of the account name, or "account" + * if nothing is suitable (e.g. for telepathy-salut) * @error: a GError to fill * * Inform the plugin that a new account is being created. @manager, @protocol - * and @params are given to help determining the account's unique name, but does - * not need to be stored on the account yet, mcp_account_storage_set() and - * mcp_account_storage_commit() will be called later. + * and @identification are given to help determining the account's unique name, + * but does not need to be stored on the account yet, mcp_account_storage_set() + * and mcp_account_storage_commit() will be called later. * * It is recommended to use mcp_account_manager_get_unique_name() to create the * unique name, but it's not mandatory. One could base the unique name on an @@ -611,7 +612,7 @@ mcp_account_storage_create (const McpAccountStorage *storage, const McpAccountManager *am, const gchar *manager, const gchar *protocol, - GHashTable *params, + const gchar *identification, GError **error) { McpAccountStorageIface *iface = MCP_ACCOUNT_STORAGE_GET_IFACE (storage); @@ -625,7 +626,7 @@ mcp_account_storage_create (const McpAccountStorage *storage, return NULL; } - return iface->create (storage, am, manager, protocol, params, error); + return iface->create (storage, am, manager, protocol, identification, error); } /** diff --git a/mission-control-plugins/account-storage.h b/mission-control-plugins/account-storage.h index e1af5060..5c111025 100644 --- a/mission-control-plugins/account-storage.h +++ b/mission-control-plugins/account-storage.h @@ -75,7 +75,7 @@ typedef gchar * (*McpAccountStorageCreate) ( const McpAccountManager *am, const gchar *manager, const gchar *protocol, - GHashTable *params, + const gchar *identification, GError **error); typedef gboolean (*McpAccountStorageDeleteFunc) ( const McpAccountStorage *storage, @@ -163,7 +163,7 @@ gchar * mcp_account_storage_create (const McpAccountStorage *storage, const McpAccountManager *am, const gchar *manager, const gchar *protocol, - GHashTable *params, + const gchar *identification, GError **error); gboolean mcp_account_storage_delete (const McpAccountStorage *storage, diff --git a/mission-control-plugins/account.c b/mission-control-plugins/account.c index e962857c..62318d44 100644 --- a/mission-control-plugins/account.c +++ b/mission-control-plugins/account.c @@ -279,7 +279,7 @@ mcp_account_manager_parameter_make_secret (const McpAccountManager *mcpa, * @mcpa: an #McpAccountManager instance * @manager: the name of the manager * @protocol: the name of the protocol - * @params: A gchar * / GValue * hash table of account parameters. + * @identification: the result of calling IdentifyAccount for this account * * Generate and return the canonical unique name of this [new] account. * Should not be called for accounts which have already had a name @@ -287,6 +287,10 @@ mcp_account_manager_parameter_make_secret (const McpAccountManager *mcpa, * MC has not previously seen before (ie one created by a 3rd party * in the back-end that the plugin in question provides an interface to). * + * Changed in 5.17: instead of a map from string to GValue, the last + * argument is the result of calling IdentifyAccount on the parameters, + * which normalizes the account's name in a protocol-dependent way. + * * Returns: the newly allocated account name, which should be freed * once the caller is done with it. */ @@ -294,14 +298,14 @@ gchar * mcp_account_manager_get_unique_name (McpAccountManager *mcpa, const gchar *manager, const gchar *protocol, - const GHashTable *params) + const gchar *identification) { McpAccountManagerIface *iface = MCP_ACCOUNT_MANAGER_GET_IFACE (mcpa); g_return_val_if_fail (iface != NULL, NULL); g_return_val_if_fail (iface->unique_name != NULL, NULL); - return iface->unique_name (mcpa, manager, protocol, params); + return iface->unique_name (mcpa, manager, protocol, identification); } /** diff --git a/mission-control-plugins/account.h b/mission-control-plugins/account.h index 69a33d56..a4763427 100644 --- a/mission-control-plugins/account.h +++ b/mission-control-plugins/account.h @@ -77,7 +77,7 @@ void mcp_account_manager_parameter_make_secret (const McpAccountManager *mcpa, gchar * mcp_account_manager_get_unique_name (McpAccountManager *mcpa, const gchar *manager, const gchar *protocol, - const GHashTable *params); + const gchar *identification); GStrv mcp_account_manager_list_keys (const McpAccountManager *mcpa, const gchar *account); diff --git a/mission-control-plugins/implementation.h b/mission-control-plugins/implementation.h index eaed4f78..29d29377 100644 --- a/mission-control-plugins/implementation.h +++ b/mission-control-plugins/implementation.h @@ -97,7 +97,7 @@ struct _McpAccountManagerIface { gchar * (* unique_name) (const McpAccountManager *ma, const gchar *manager, const gchar *protocol, - const GHashTable *params); + const gchar *identification); GStrv (* list_keys) (const McpAccountManager *ma, const gchar *acct); |