McpAccountStorage

McpAccountStorage — Account Storage object, implemented by plugins

Synopsis

#include <mission-control-plugins/mission-control-plugins.h>

#define             MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_DEFAULT
#define             MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_KEYRING
#define             MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_NORMAL
#define             MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_READONLY
gboolean            (*McpAccountStorageCommitFunc)      (const McpAccountStorage *storage,
                                                         const McpAccountManager *am);
gboolean            (*McpAccountStorageCommitOneFunc)   (const McpAccountStorage *storage,
                                                         const McpAccountManager *am,
                                                         const gchar *account);
gchar *             (*McpAccountStorageCreate)          (const McpAccountStorage *storage,
                                                         const McpAccountManager *am,
                                                         const gchar *manager,
                                                         const gchar *protocol,
                                                         GHashTable *params,
                                                         GError **error);
gboolean            (*McpAccountStorageDeleteFunc)      (const McpAccountStorage *storage,
                                                         const McpAccountManager *am,
                                                         const gchar *account,
                                                         const gchar *key);
GHashTable *        (*McpAccountStorageGetAdditionalInfoFunc)
                                                        (const McpAccountStorage *storage,
                                                         const gchar *account);
gboolean            (*McpAccountStorageGetFunc)         (const McpAccountStorage *storage,
                                                         const McpAccountManager *am,
                                                         const gchar *account,
                                                         const gchar *key);
void                (*McpAccountStorageGetIdentifierFunc)
                                                        (const McpAccountStorage *storage,
                                                         const gchar *account,
                                                         GValue *identifier);
guint               (*McpAccountStorageGetRestrictionsFunc)
                                                        (const McpAccountStorage *storage,
                                                         const gchar *account);
struct              McpAccountStorageIface;
GList *             (*McpAccountStorageListFunc)        (const McpAccountStorage *storage,
                                                         const McpAccountManager *am);
void                (*McpAccountStorageReadyFunc)       (const McpAccountStorage *storage,
                                                         const McpAccountManager *am);
gboolean            (*McpAccountStorageSetFunc)         (const McpAccountStorage *storage,
                                                         const McpAccountManager *am,
                                                         const gchar *account,
                                                         const gchar *key,
                                                         const gchar *val);
gboolean            mcp_account_storage_commit          (const McpAccountStorage *storage,
                                                         const McpAccountManager *am);
gboolean            mcp_account_storage_commit_one      (const McpAccountStorage *storage,
                                                         const McpAccountManager *am,
                                                         const gchar *account);
gchar *             mcp_account_storage_create          (const McpAccountStorage *storage,
                                                         const McpAccountManager *am,
                                                         const gchar *manager,
                                                         const gchar *protocol,
                                                         GHashTable *params,
                                                         GError **error);
gboolean            mcp_account_storage_delete          (const McpAccountStorage *storage,
                                                         const McpAccountManager *am,
                                                         const gchar *account,
                                                         const gchar *key);
const gchar *       mcp_account_storage_description     (const McpAccountStorage *storage);
void                mcp_account_storage_emit_altered    (McpAccountStorage *storage,
                                                         const gchar *account);
void                mcp_account_storage_emit_altered_one
                                                        (McpAccountStorage *storage,
                                                         const gchar *account,
                                                         const gchar *key);
void                mcp_account_storage_emit_created    (McpAccountStorage *storage,
                                                         const gchar *account);
void                mcp_account_storage_emit_deleted    (McpAccountStorage *storage,
                                                         const gchar *account);
void                mcp_account_storage_emit_reconnect  (McpAccountStorage *storage,
                                                         const gchar *account);
void                mcp_account_storage_emit_toggled    (McpAccountStorage *storage,
                                                         const gchar *account,
                                                         gboolean enabled);
gboolean            mcp_account_storage_get             (const McpAccountStorage *storage,
                                                         McpAccountManager *am,
                                                         const gchar *account,
                                                         const gchar *key);
GHashTable *        mcp_account_storage_get_additional_info
                                                        (const McpAccountStorage *storage,
                                                         const gchar *account);
void                mcp_account_storage_get_identifier  (const McpAccountStorage *storage,
                                                         const gchar *account,
                                                         GValue *identifier);
guint               mcp_account_storage_get_restrictions
                                                        (const McpAccountStorage *storage,
                                                         const gchar *account);
void                mcp_account_storage_iface_implement_commit
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageCommitFunc method);
void                mcp_account_storage_iface_implement_commit_one
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageCommitOneFunc method);
void                mcp_account_storage_iface_implement_create
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageCreate method);
void                mcp_account_storage_iface_implement_delete
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageDeleteFunc method);
void                mcp_account_storage_iface_implement_get
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageGetFunc method);
void                mcp_account_storage_iface_implement_get_additional_info
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageGetAdditionalInfoFunc method);
void                mcp_account_storage_iface_implement_get_identifier
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageGetIdentifierFunc method);
void                mcp_account_storage_iface_implement_get_restrictions
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageGetRestrictionsFunc method);
void                mcp_account_storage_iface_implement_list
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageListFunc method);
void                mcp_account_storage_iface_implement_ready
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageReadyFunc method);
void                mcp_account_storage_iface_implement_set
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageSetFunc method);
void                mcp_account_storage_iface_set_desc  (McpAccountStorageIface *iface,
                                                         const gchar *desc);
void                mcp_account_storage_iface_set_name  (McpAccountStorageIface *iface,
                                                         const gchar *name);
void                mcp_account_storage_iface_set_priority
                                                        (McpAccountStorageIface *iface,
                                                         guint prio);
void                mcp_account_storage_iface_set_provider
                                                        (McpAccountStorageIface *iface,
                                                         const gchar *provider);
GList *             mcp_account_storage_list            (const McpAccountStorage *storage,
                                                         const McpAccountManager *am);
const gchar *       mcp_account_storage_name            (const McpAccountStorage *storage);
gint                mcp_account_storage_priority        (const McpAccountStorage *storage);
const gchar *       mcp_account_storage_provider        (const McpAccountStorage *storage);
void                mcp_account_storage_ready           (const McpAccountStorage *storage,
                                                         const McpAccountManager *am);
gboolean            mcp_account_storage_set             (const McpAccountStorage *storage,
                                                         const McpAccountManager *am,
                                                         const gchar *account,
                                                         const gchar *key,
                                                         const gchar *value);

Description

Plugins may implement McpAccountStorage in order to provide account parameter storage backends to the AccountManager object.

To do so, the plugin must implement a GObject subclass that implements McpAccountStorage, then return an instance of that subclass from mcp_plugin_ref_nth_object().

The contents of the McpAccountStorage struct are not public, so to provide an implementation of the virtual methods, plugins should call mcp_account_operation_iface_implement_*() from the interface initialization function, like this:

Example 1. 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
G_DEFINE_TYPE_WITH_CODE (APlugin, a_plugin,
   G_TYPE_OBJECT,
   G_IMPLEMENT_INTERFACE (...);
   G_IMPLEMENT_INTERFACE (MCP_TYPE_ACCOUNT_STORAGE,
     account_storage_iface_init));
/* ... */
static void
account_storage_iface_init (McpAccountStorageIface *iface,
    gpointer unused G_GNUC_UNUSED)
{
  mcp_account_storage_iface_set_priority (iface, 0);
  mcp_account_storage_iface_set_name (iface, "foo")
  mcp_account_storage_iface_set_desc (iface, "The FOO storage backend");
  mcp_account_storage_iface_set_provider (iface,
    "org.freedesktop.Telepathy.MissionControl5.FooStorage");
  mcp_account_storage_iface_implement_get    (iface, _plugin_getval);
  mcp_account_storage_iface_implement_set    (iface, _plugin_setval);
  mcp_account_storage_iface_implement_delete (iface, _plugin_delete);
  mcp_account_storage_iface_implement_commit (iface, _plugin_commit);
  mcp_account_storage_iface_implement_commit_one (iface, _plugin_commit_one);
  mcp_account_storage_iface_implement_list   (iface, _plugin_list);
  mcp_account_storage_iface_implement_ready  (iface, _plugin_ready);
  mcp_account_storage_iface_implement_get_identifier (iface,
    _plugin_get_identifier);
  mcp_account_storage_iface_implement_get_additional_info (iface,
    _plugin_get_additional_info);
  mcp_account_storage_iface_implement_get_restrictions (iface,
    _plugin_get_restrictions);
/* ... */
}


A single object can implement more than one interface; It is currently unlikely that you would find it useful to implement anything other than an account storage plugin in an account storage object, though.

Details

MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_DEFAULT

#define MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_DEFAULT   0

MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_KEYRING

#define MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_KEYRING   10000

MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_NORMAL

#define MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_NORMAL    100

MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_READONLY

#define MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_READONLY -1

McpAccountStorageCommitFunc ()

gboolean            (*McpAccountStorageCommitFunc)      (const McpAccountStorage *storage,
                                                         const McpAccountManager *am);

McpAccountStorageCommitOneFunc ()

gboolean            (*McpAccountStorageCommitOneFunc)   (const McpAccountStorage *storage,
                                                         const McpAccountManager *am,
                                                         const gchar *account);

McpAccountStorageCreate ()

gchar *             (*McpAccountStorageCreate)          (const McpAccountStorage *storage,
                                                         const McpAccountManager *am,
                                                         const gchar *manager,
                                                         const gchar *protocol,
                                                         GHashTable *params,
                                                         GError **error);

McpAccountStorageDeleteFunc ()

gboolean            (*McpAccountStorageDeleteFunc)      (const McpAccountStorage *storage,
                                                         const McpAccountManager *am,
                                                         const gchar *account,
                                                         const gchar *key);

McpAccountStorageGetAdditionalInfoFunc ()

GHashTable *        (*McpAccountStorageGetAdditionalInfoFunc)
                                                        (const McpAccountStorage *storage,
                                                         const gchar *account);

McpAccountStorageGetFunc ()

gboolean            (*McpAccountStorageGetFunc)         (const McpAccountStorage *storage,
                                                         const McpAccountManager *am,
                                                         const gchar *account,
                                                         const gchar *key);

McpAccountStorageGetIdentifierFunc ()

void                (*McpAccountStorageGetIdentifierFunc)
                                                        (const McpAccountStorage *storage,
                                                         const gchar *account,
                                                         GValue *identifier);

McpAccountStorageGetRestrictionsFunc ()

guint               (*McpAccountStorageGetRestrictionsFunc)
                                                        (const McpAccountStorage *storage,
                                                         const gchar *account);

struct McpAccountStorageIface

struct McpAccountStorageIface {
  GTypeInterface parent;

  gint priority;
  const gchar *name;
  const gchar *desc;
  const gchar *provider;

  McpAccountStorageSetFunc set;
  McpAccountStorageGetFunc get;
  McpAccountStorageDeleteFunc delete;
  McpAccountStorageCommitFunc commit;
  McpAccountStorageListFunc list;
  McpAccountStorageReadyFunc ready;
  McpAccountStorageCommitOneFunc commit_one;
  McpAccountStorageGetIdentifierFunc get_identifier;
  McpAccountStorageGetAdditionalInfoFunc get_additional_info;
  McpAccountStorageGetRestrictionsFunc get_restrictions;
  McpAccountStorageCreate create;
};

McpAccountStorageListFunc ()

GList *             (*McpAccountStorageListFunc)        (const McpAccountStorage *storage,
                                                         const McpAccountManager *am);

McpAccountStorageReadyFunc ()

void                (*McpAccountStorageReadyFunc)       (const McpAccountStorage *storage,
                                                         const McpAccountManager *am);

McpAccountStorageSetFunc ()

gboolean            (*McpAccountStorageSetFunc)         (const McpAccountStorage *storage,
                                                         const McpAccountManager *am,
                                                         const gchar *account,
                                                         const gchar *key,
                                                         const gchar *val);

mcp_account_storage_commit ()

gboolean            mcp_account_storage_commit          (const McpAccountStorage *storage,
                                                         const McpAccountManager *am);

The plugin is expected to write its cache to long term storage, deleting, adding or updating entries in said storage as needed.

This call is expected to return promptly, but the plugin is not required to have finished its commit operation when it returns, merely to have started the operation.

If the commit_one method is implemented, it will be called preferentially if only one account is to be committed. If the commit_one method is implemented but commit is not, commit_one will be called with account_name = NULL to commit all accounts.

storage :

an McpAccountStorage instance

am :

an McpAccountManager instance

Returns :

TRUE if the commit process was started (but not necessarily completed) successfully; FALSE if there was a problem that was immediately obvious.

mcp_account_storage_commit_one ()

gboolean            mcp_account_storage_commit_one      (const McpAccountStorage *storage,
                                                         const McpAccountManager *am,
                                                         const gchar *account);

The same as mcp_account_storage_commit(), but only commit the given account. This is optional to implement; the default implementation is to call commit.

storage :

an McpAccountStorage instance

am :

an McpAccountManager instance

account :

the unique suffix of an account's object path, or NULL if all accounts are to be committed

Returns :

TRUE if the commit process was started (but not necessarily completed) successfully; FALSE if there was a problem that was immediately obvious.

mcp_account_storage_create ()

gchar *             mcp_account_storage_create          (const McpAccountStorage *storage,
                                                         const McpAccountManager *am,
                                                         const gchar *manager,
                                                         const gchar *protocol,
                                                         GHashTable *params,
                                                         GError **error);

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.

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 internal storage identifier, prefixed with the provider's name (e.g. goa__1234).

"created" signal should not be emitted for this account, not even when mcp_account_storage_commit() will be called.

storage :

an McpAccountStorage instance

manager :

the name of the manager

protocol :

the name of the protocol

params :

A gchar * / GValue * hash table of account parameters

error :

a GError to fill

Returns :

the newly allocated account name, which should be freed once the caller is done with it, or NULL if that couldn't be done.

mcp_account_storage_delete ()

gboolean            mcp_account_storage_delete          (const McpAccountStorage *storage,
                                                         const McpAccountManager *am,
                                                         const gchar *account,
                                                         const gchar *key);

The plugin is expected to remove the setting for key from its internal cache and to remember that its state has changed, so that it can delete said setting from its long term storage if its long term storage method makes this necessary.

If key is NULL, the plugin should forget all its settings for account (and remember to delete account from its storage later)

The plugin is not expected to update its long term storage at this point.

storage :

an McpAccountStorage instance

am :

an McpAccountManager instance

account :

the unique name of the account

key :

the setting whose value we wish to fetch

Returns :

TRUE if the setting or settings are not the plugin's cache after this operation, FALSE otherwise. This is very unlikely to ever be FALSE, as a plugin is always expected to be able to manipulate its own cache.

mcp_account_storage_description ()

const gchar *       mcp_account_storage_description     (const McpAccountStorage *storage);

storage :

an McpAccountStorage instance

Returns :

the plugin's description (for logging etc)

mcp_account_storage_emit_altered ()

void                mcp_account_storage_emit_altered    (McpAccountStorage *storage,
                                                         const gchar *account);

Emits ::altered signal

storage :

an McpAccountStorage instance

account :

the unique name of the altered account

mcp_account_storage_emit_altered_one ()

void                mcp_account_storage_emit_altered_one
                                                        (McpAccountStorage *storage,
                                                         const gchar *account,
                                                         const gchar *key);

Emits ::created-one signal

storage :

an McpAccountStorage instance

account :

the unique name of the altered account

key :

the key of the altered property

mcp_account_storage_emit_created ()

void                mcp_account_storage_emit_created    (McpAccountStorage *storage,
                                                         const gchar *account);

mcp_account_storage_emit_deleted ()

void                mcp_account_storage_emit_deleted    (McpAccountStorage *storage,
                                                         const gchar *account);

Emits ::deleted signal

storage :

an McpAccountStorage instance

account :

the unique name of the deleted account

mcp_account_storage_emit_reconnect ()

void                mcp_account_storage_emit_reconnect  (McpAccountStorage *storage,
                                                         const gchar *account);

Emits ::reconnect signal

storage :

an McpAccountStorage instance

account :

the unique name of the account to reconnect

mcp_account_storage_emit_toggled ()

void                mcp_account_storage_emit_toggled    (McpAccountStorage *storage,
                                                         const gchar *account,
                                                         gboolean enabled);

Emits ::toggled signal

storage :

an McpAccountStorage instance

account :

the unique name of the account

mcp_account_storage_get ()

gboolean            mcp_account_storage_get             (const McpAccountStorage *storage,
                                                         McpAccountManager *am,
                                                         const gchar *account,
                                                         const gchar *key);

The plugin is expected to quickly and synchronously update the value associated with key using calls to am.

The plugin is not required to consult whatever long term storage it uses, and may fetch said value from its internal cache, if any.

If key is NULL the plugin should write all its settings for account into the account manager via am. The return value in this case should be TRUE if any settings were found.

storage :

an McpAccountStorage instance

am :

an McpAccountManager instance

account :

the unique name of the account

key :

the setting whose value we wish to fetch

Returns :

TRUE if a value was found and FALSE otherwise

mcp_account_storage_get_additional_info ()

GHashTable *        mcp_account_storage_get_additional_info
                                                        (const McpAccountStorage *storage,
                                                         const gchar *account);

Return additional storage-specific information about this account, which is made available on D-Bus but not otherwise interpreted by Mission Control.

storage :

an McpAccountStorage instance

account :

the unique name of the account

Returns :

a mapping from strings to GValues, which must be freed by the caller.

mcp_account_storage_get_identifier ()

void                mcp_account_storage_get_identifier  (const McpAccountStorage *storage,
                                                         const gchar *account,
                                                         GValue *identifier);

Get the storage-specific identifier for this account. The type is variant, hence the GValue.

storage :

an McpAccountStorage instance

account :

the unique name of the account

identifier :

a zero-filled GValue whose type can be sent over D-Bus by dbus-glib to hold the identifier.

mcp_account_storage_get_restrictions ()

guint               mcp_account_storage_get_restrictions
                                                        (const McpAccountStorage *storage,
                                                         const gchar *account);

storage :

an McpAccountStorage instance

account :

the unique name of the account

Returns :

a bitmask of TpStorageRestrictionFlags with the restrictions to account storage.

mcp_account_storage_iface_implement_commit ()

void                mcp_account_storage_iface_implement_commit
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageCommitFunc method);

mcp_account_storage_iface_implement_commit_one ()

void                mcp_account_storage_iface_implement_commit_one
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageCommitOneFunc method);

mcp_account_storage_iface_implement_create ()

void                mcp_account_storage_iface_implement_create
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageCreate method);

mcp_account_storage_iface_implement_delete ()

void                mcp_account_storage_iface_implement_delete
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageDeleteFunc method);

mcp_account_storage_iface_implement_get ()

void                mcp_account_storage_iface_implement_get
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageGetFunc method);

mcp_account_storage_iface_implement_get_additional_info ()

void                mcp_account_storage_iface_implement_get_additional_info
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageGetAdditionalInfoFunc method);

mcp_account_storage_iface_implement_get_identifier ()

void                mcp_account_storage_iface_implement_get_identifier
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageGetIdentifierFunc method);

mcp_account_storage_iface_implement_get_restrictions ()

void                mcp_account_storage_iface_implement_get_restrictions
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageGetRestrictionsFunc method);

mcp_account_storage_iface_implement_list ()

void                mcp_account_storage_iface_implement_list
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageListFunc method);

mcp_account_storage_iface_implement_ready ()

void                mcp_account_storage_iface_implement_ready
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageReadyFunc method);

mcp_account_storage_iface_implement_set ()

void                mcp_account_storage_iface_implement_set
                                                        (McpAccountStorageIface *iface,
                                                         McpAccountStorageSetFunc method);

mcp_account_storage_iface_set_desc ()

void                mcp_account_storage_iface_set_desc  (McpAccountStorageIface *iface,
                                                         const gchar *desc);

mcp_account_storage_iface_set_name ()

void                mcp_account_storage_iface_set_name  (McpAccountStorageIface *iface,
                                                         const gchar *name);

mcp_account_storage_iface_set_priority ()

void                mcp_account_storage_iface_set_priority
                                                        (McpAccountStorageIface *iface,
                                                         guint prio);

mcp_account_storage_iface_set_provider ()

void                mcp_account_storage_iface_set_provider
                                                        (McpAccountStorageIface *iface,
                                                         const gchar *provider);

mcp_account_storage_list ()

GList *             mcp_account_storage_list            (const McpAccountStorage *storage,
                                                         const McpAccountManager *am);

This method is called only at initialisation time, before the dbus name has been claimed, and is the only one permitted to block.

storage :

an McpAccountStorage instance

am :

an McpAccountManager instance

Returns :

a list of account names that the plugin has settings for. The account names should be freed with g_free(), and the list with g_list_free(), when the caller is done with them. [element-type utf8][transfer full]

mcp_account_storage_name ()

const gchar *       mcp_account_storage_name            (const McpAccountStorage *storage);

storage :

an McpAccountStorage instance

Returns :

the plugin's name (for logging etc)

mcp_account_storage_priority ()

gint                mcp_account_storage_priority        (const McpAccountStorage *storage);

Gets the priority for this plugin.

Priorities currently run from MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_DEFAULT (the default storage plugin priority) upwards.

Plugins at a higher priority then MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_KEYRING will have the opportunity to "steal" passwords from the gnome keyring: Plugins at a lower priority than this will not receive secret parameters from MC as the keyring plugin will already have claimed them.

Plugins at a lower priority than the default plugin will never be asked to store any details, although they may still be asked to list them at startup time, and may asynchronously notify MC of accounts via the signals above.

When loading accounts at startup, plugins are consulted in order from lowest to highest, so that higher priority plugins may overrule settings from lower priority plugins.

Loading all the accounts is only done at startup, before the dbus name is claimed, and is therefore the only time plugins are allowed to indulge in blocking calls (indeed, they are expected to carry out this operation, and ONLY this operation, synchronously).

When values are being set, the plugins are invoked from highest priority to lowest, with the first plugin that claims a setting being assigned ownership, and all lower priority plugins being asked to delete the setting in question.

storage :

an McpAccountStorage instance

Returns :

the priority of this plugin

mcp_account_storage_provider ()

const gchar *       mcp_account_storage_provider        (const McpAccountStorage *storage);

storage :

an McpAccountStorage instance

Returns :

a DBus namespaced name for this plugin.

mcp_account_storage_ready ()

void                mcp_account_storage_ready           (const McpAccountStorage *storage,
                                                         const McpAccountManager *am);

Informs the plugin that it is now permitted to create new accounts, ie it can now fire its "created", "altered", "toggled" and "deleted" signals.

storage :

an McpAccountStorage instance

am :

an McpAccountManager instance

mcp_account_storage_set ()

gboolean            mcp_account_storage_set             (const McpAccountStorage *storage,
                                                         const McpAccountManager *am,
                                                         const gchar *account,
                                                         const gchar *key,
                                                         const gchar *value);

The plugin is expected to either quickly and synchronously update its internal cache of values with value, or to decline to store the setting.

The plugin is not expected to write to its long term storage at this point.

storage :

an McpAccountStorage instance

am :

an McpAccountManager instance

account :

the unique name of the account

key :

the setting whose value we wish to fetch

value :

a value to associate with key

Returns :

TRUE if the setting was claimed, FALSE otherwise