diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-02-03 20:24:57 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-02-04 13:57:38 +0000 |
commit | 33d38beed46dcc491759b70784b8a8c3b8c747e2 (patch) | |
tree | c16529a8ac9023d5977185c8aa9c4c1576da36d5 /src | |
parent | 7290f4e00a5eb3cd155998d7a0a81a14028ced7c (diff) | |
download | telepathy-mission-control-33d38beed46dcc491759b70784b8a8c3b8c747e2.tar.gz |
mcp_account_storage_get_flags: add
The initial flag is STORES_TYPES, which can be used to decide whether
to try to attach types to untyped parameters. Of our built-in plugins,
the default keyfile/variant-file storage and the D-Bus test plugin
have STORES_TYPES, but the "diversion" plugin does not.
Flags are account-specific in case they ever need to vary per-account
(e.g. a FROM_TELEPATHY_0 flag might be one way to deal with migration
from Telepathy 0.x to 1.0).
Also add some convenience API (has_all_flags, has_any_flag) to make
code that uses these flags easier to understand.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71093
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/mcd-account-manager-default.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mcd-account-manager-default.c b/src/mcd-account-manager-default.c index f4abd844..e6fc14fc 100644 --- a/src/mcd-account-manager-default.c +++ b/src/mcd-account-manager-default.c @@ -1026,6 +1026,13 @@ _list (McpAccountStorage *self, return rval; } +static McpAccountStorageFlags +get_flags (McpAccountStorage *storage, + const gchar *account) +{ + return MCP_ACCOUNT_STORAGE_FLAG_STORES_TYPES; +} + static void account_storage_iface_init (McpAccountStorageIface *iface, gpointer unused G_GNUC_UNUSED) @@ -1034,6 +1041,7 @@ account_storage_iface_init (McpAccountStorageIface *iface, iface->desc = PLUGIN_DESCRIPTION; iface->priority = PLUGIN_PRIORITY; + iface->get_flags = get_flags; iface->get_attribute = get_attribute; iface->get_parameter = get_parameter; iface->list_typed_parameters = list_typed_parameters; |