account

## account account |

## Synopsis

                        McpAccountManager;
                        McpAccountManagerIface;
    void                mcp_account_manager_set_value       (const McpAccountManager *mcpa,
                                                             const gchar *account,
                                                             const gchar *key,
                                                             const gchar *value);
    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,
                                                             const GHashTable *params);
    GStrv               mcp_account_manager_list_keys       (const McpAccountManager *mcpa,
                                                             const gchar *account);

## Object Hierarchy

      GInterface
       +----McpAccountManager

## Prerequisites

McpAccountManager requires GObject.

## Description

## Details

### McpAccountManager

    typedef struct _McpAccountManager McpAccountManager;

### McpAccountManagerIface

    typedef struct _McpAccountManagerIface McpAccountManagerIface;

### mcp_account_manager_set_value ()

    void                mcp_account_manager_set_value       (const McpAccountManager *mcpa,
                                                             const gchar *account,
                                                             const gchar *key,
                                                             const gchar *value);

`mcpa` : |
`account` : |
`key` : |
`value` : |

### mcp_account_manager_get_value ()

    gchar *             mcp_account_manager_get_value       (const McpAccountManager *mcpa,
                                                             const gchar *account,
                                                             const gchar *key);

Fetch a copy of the current value of an account setting held by the McdAccountManager.

`mcpa` : | an McpAccountManager instance
`account` : | the unique name of an account
`key` : | the setting whose value we want to retrieve
Returns : | a gchar* which should be freed when the caller is done with it.

### mcp_account_manager_parameter_is_secret ()

    gboolean            mcp_account_manager_parameter_is_secret
                                                            (const McpAccountManager *mcpa,
                                                             const gchar *account,
                                                             const gchar *key);

Determine whether a given account parameter is secret. generally this is determined by MC and passed down to us, but any McpAccountStorage plugin may decide a setting is secret, in which case the return value for this call will indicate that fact.

`mcpa` : | an McpAccountManager instance
`account` : | the unique name of an account
`key` : | the setting whose value we want to retrieve
Returns : | a gboolean, `TRUE` for secret settings, `FALSE` otherwise

### mcp_account_manager_parameter_make_secret ()

    void                mcp_account_manager_parameter_make_secret
                                                            (const McpAccountManager *mcpa,
                                                             const gchar *account,
                                                             const gchar *key);

Flag an account setting as secret for the lifetime of this McpAccountManager and its corresponding McdAccountManager

`mcpa` : | an McpAccountManager instance
`account` : | the unique name of an account
`key` : | the setting whose value we want to retrieve

### mcp_account_manager_get_unique_name ()

    gchar *             mcp_account_manager_get_unique_name (McpAccountManager *mcpa,
                                                             const gchar *manager,
                                                             const gchar *protocol,
                                                             const GHashTable *params);

Generate and return the canonical unique name of this [new] account. Should not be called for accounts which have already had a name assigned: Intended for use when a plugin encounters an account which 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).

`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.
Returns : | the newly allocated account name, which should be freed once the caller is done with it.

### mcp_account_manager_list_keys ()

    GStrv               mcp_account_manager_list_keys       (const McpAccountManager *mcpa,
                                                             const gchar *account);

`mcpa` : |
`account` : |
Returns : |