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 /tests | |
parent | 7290f4e00a5eb3cd155998d7a0a81a14028ced7c (diff) |
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 'tests')
-rw-r--r-- | tests/twisted/dbus-account-plugin.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/twisted/dbus-account-plugin.c b/tests/twisted/dbus-account-plugin.c index 36f78914..487d35d9 100644 --- a/tests/twisted/dbus-account-plugin.c +++ b/tests/twisted/dbus-account-plugin.c @@ -1543,6 +1543,13 @@ test_dbus_account_plugin_get_restrictions (McpAccountStorage *storage, return account->restrictions; } +static McpAccountStorageFlags +test_dbus_account_plugin_get_flags (McpAccountStorage *storage, + const gchar *account) +{ + return MCP_ACCOUNT_STORAGE_FLAG_STORES_TYPES; +} + static void account_storage_iface_init (McpAccountStorageIface *iface) { @@ -1551,6 +1558,7 @@ account_storage_iface_init (McpAccountStorageIface *iface) /* this should be higher priority than the diverted-keyfile one */ iface->priority = MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_NORMAL + 100; + iface->get_flags = test_dbus_account_plugin_get_flags; iface->get_attribute = test_dbus_account_plugin_get_attribute; iface->get_parameter = test_dbus_account_plugin_get_parameter; iface->list_typed_parameters = |