summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-11-14McdAccountManager: ignore altered-one, deleted, toggled from wrong pluginaccount-rework-27727Simon McVittie1-1/+39
Now that the account knows its own storage plugin, this is pretty easy.
2013-11-14McdAccount: have a ref to the storage plugin from construct time onwardsSimon McVittie5-119/+98
This will make the account more self-contained.
2013-11-14McdStorage: when acting on one account, only store it in its pluginSimon McVittie1-27/+41
2013-11-14mcp_account_storage_get: replace with get_attribute, get_parameterSimon McVittie10-642/+300
The old API in which plugins poked new values into the McdStorage was non-obvious, and also fundamentally incompatible with the idea that each account is owned by at most one plugin: if an account in a high-priority plugin is masked by one in a low-priority plugin, the McdStorage can't prevent the low-priority plugin from changing its effective attribute and parameter values.
2013-11-14dbus-account-plugin: update internal cache correctlySimon McVittie1-0/+1
The backend-makes-changes test replaces an typed parameter with an untyped parameter. We correctly signalled the change to MC, but didn't update the internal cache; the rather strange way in which MC receives attributes/parameters masked this bug.
2013-11-14mcp_account_manager_unescape_variant_from_keyfile: addSimon McVittie4-0/+71
I want to push responsibility for unescaping into storage plugins.
2013-11-14Thread expected GVariant types through to mcd_storage_get_*Simon McVittie7-33/+82
We're going to need this soon, in order to advise plugins how best to unescape the value. The result is still a GValue, for now.
2013-11-14mcp_account_storage_set_*: return whether anything changedSimon McVittie6-105/+204
The plugins are better-placed to do this than McdStorage: they know their own storage format, after all.
2013-11-14McdStorage: remove "owns" methodSimon McVittie4-80/+4
We now know whose account it is, without having to do this.
2013-11-14Make mcp_account_storage_create() mandatorySimon McVittie6-67/+127
This means we can (finally) track which plugin "owns" which account in a reliable way.
2013-11-13Make account deletion async (sort of), and imply a selective commitSimon McVittie7-216/+275
This means we don't need to commit separately after each deletion, and means account plugins don't have to have the concept of flagging an account for "delete this later" - much rejoicing. It also has the incidental benefit that we no longer use the C++ reserved word 'delete' in a header file.
2013-11-13Call set_attribute, set_parameter to delete themSimon McVittie5-78/+63
It really doesn't make a great deal of sense to use the same callback to delete individual keys, and to delete accounts. McdAccountManagerDefault already dealt with that case, but the two test plugins didn't.
2013-11-13McdAccountManager: don't double-delete accounts from storageSimon McVittie1-5/+0
McdAccount (via mcd_account_delete_async) is responsible for deleting itself from storage if necessary. McdAccountManager shouldn't second-guess it.
2013-11-13Add some missing test coverage: IdentifyAccount failing hardSimon McVittie2-10/+39
2013-11-13McdStorage: adjust IdentifyAccount error behaviourSimon McVittie1-5/+14
We were ignoring failures if they were NotImplemented or ServiceUnknown, but thinking about it more, we should probably ignore "most" errors here: the only errors that should abort the account-creation attempt are those that indicate that the intended parameters are unusable, namely InvalidArgument and InvalidHandle (in its secondary role as "invalid identifier-that-corresponds-to-a-handle"). Also add more debug messages here.
2013-11-13mc-debug-server: don't exit when disconnected from system busSimon McVittie1-0/+14
The session bus is our fake system bus, too. We exit when libdbus tells us we have disconnected, and ignore both the possible ways in which GDBus can kill us, in order to get coverage stats.
2013-11-13mcd_account_delete: convert into mcd_account_delete_asyncSimon McVittie3-39/+77
2013-11-13mcd_account_delete: be primarily responsible for emitting RemovedSimon McVittie1-12/+9
We still don't get here if disposed early, though.
2013-11-13mcd_storage_dup_attributes: removeSimon McVittie2-37/+0
Nothing calls it, and getting rid of it is a step towards having McdStorage just be a "view".
2013-11-13mcp_account_manager_list_keys: removeSimon McVittie4-58/+0
This is unused, and plugins don't have any good reason to call it.
2013-11-13Remove unused codeXavier Claessens4-220/+0
[adjusted to apply at a different position in the branch -smcv]
2013-11-13McpAccountStorage: have a default implementation for every methodSimon McVittie1-38/+123
Based on a patch by Xavier Claessens.
2013-11-13mcp_account_storage_emit_created: fix doc-commentSimon McVittie1-1/+1
Originally part of a commit by Xavier Claessens.
2013-11-13Remove mcp_account_storage_set()Simon McVittie6-137/+52
_set_attribute() and _set_parameter() are now mandatory for writable storage plugins. Note that most of the keyfile escaping code is still needed to help plugins to read their old keyfile values. [adjusted to apply earlier in the branch; left in the code that detects whether mcd_storage_set_parameter() is a no-op for an escaped parameter; took out mcp_account_storage_emit_created documentation fix -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71384 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-11-13McpAccountStorage: merge commit and commit_one into one functionSimon McVittie6-89/+24
Based on part of a patch by Xavier Claessens. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71384 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-11-13Remove all notion of secret parameterXavier Claessens10-187/+8
We now depend on SASLAuthentication for handling secret, and MC does not have gnome-keyring anymore. [Adjusted to apply before other storage API changes -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71384 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-11-13Fix addition of restrictions to test accountsSimon McVittie1-1/+1
Account.restrictions wasn't initialized properly, so it would sometimes be nonzero, leading to mysterious test failures. Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71390
2013-11-12Revert "Simplify a bit storage API"Simon McVittie7-229/+342
This reverts commit 2da0807f7a4b6be29b980c95b888452f5a6ddc9b.
2013-11-12Revert "Rename commit_one() to commit()"Simon McVittie6-58/+58
This reverts commit b8617c51c1729e1579f9f066ead1fa80b0fd99a1.
2013-11-12Revert "Remove all notion of secret parameter"Simon McVittie10-8/+189
This reverts commit ae64063c953840f99b1204a222fabf5aa7a37b69.
2013-11-12Revert "Remove mcp_account_storage_set()"Simon McVittie6-57/+152
This reverts commit e9a9dd37bd193d8ac16729671d2296a4aa96139c.
2013-11-12Revert "Remove unused code"Simon McVittie4-0/+220
This reverts commit 8171d9e5bc8d4f47a36844afab0a6063b1958004.
2013-11-12Revert "Make sure to not delete() nor commit() and account deleted from storage"Simon McVittie5-18/+7
This reverts commit 6ebcb0f048fcf0107c6d7deb99a7f4717467561a.
2013-11-11Make sure to not delete() nor commit() and account deleted from storageXavier Claessens5-7/+18
If it is the storage plugin informing MC that the account has been deleted, we can assume that the storage will already take care of removing all information.
2013-11-11Remove unused codeXavier Claessens4-220/+0
2013-11-11Remove mcp_account_storage_set()Xavier Claessens6-152/+57
_set_attribute() and _set_parameter() are now mandatory for writable storage plugins. Note that most of the keyfile escaping code is still needed to help plugins to read their old keyfile values.
2013-11-08Remove all notion of secret parameterXavier Claessens10-189/+8
We now depend on SASLAuthentication for handling secret, and MC does not have gnome-keyring anymore.
2013-11-08Rename commit_one() to commit()Xavier Claessens6-58/+58
account_name==NULL still means to commit all.
2013-11-08Simplify a bit storage APIXavier Claessens7-342/+229
This is an API break, but we already did some since last release. This removes mcp_account_storage_commit() because it is redundant with mcp_account_storage_commit_one (plugin, am, NULL); This removes mcp_account_storage_owns() because an account is now owned by one and only one storage plugin and MC now keeps track of which storage plugin each account comes from. Finally this adds default implementation on most iface methods to make read-only plugins easier to implement. Only _get() and _list() and mandatory.
2013-11-08Allow backends, but not D-Bus clients, to delete restricted accountsSimon McVittie4-10/+56
I assumed that if TP_STORAGE_RESTRICTION_FLAG_CANNOT_SET_ENABLED or TP_STORAGE_RESTRICTION_FLAG_CANNOT_SET_PRESENCE, then a hypothetical CANNOT_DELETE flag would also have been present.
2013-11-08Replace McdAccount::always-on with the existing TpStorageRestrictionFlagsSimon McVittie9-86/+257
I used CANNOT_SET_PRESENCE to control access to ConnectAutomatically as well as the obvious AutomaticPresence and RequestedPresence, because RequestedPresence is not under the storage plugin's control - it is derived from ConnectAutomatically and AutomaticPresence at runtime. Use MCD_DBUS_PROP_SET_FLAG_ALREADY_IN_STORAGE as a way to bypass the storage restriction flags, so that storage plugins themselves can alter enabledness etc. even if they don't allow MC to change it. The regression test for this initially failed, because toggled_cb() did not pass that flag to the McdAccount: fix that too. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71390
2013-11-08fakeaccountsservice: be a bit more object-orientedSimon McVittie2-45/+61
2013-11-07Remove disabled regression test for the old libaccounts pluginSimon McVittie1-89/+0
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71230 Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
2013-11-07Remove remnants of ConnMan integration, we now use GLib-NetworkingSimon McVittie2-3/+0
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71230 Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
2013-11-07Remove remnants of integration with Maemo MCESimon McVittie3-17/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71230 Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
2013-11-07Remove what's left of Nokia's "Aegis" APISimon McVittie4-78/+0
We already deleted the actual plugin. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71230 Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
2013-11-07Remove the Maemo libaccounts-sso pseudo-pluginSimon McVittie10-2615/+0
The major user of libaccounts is Ubuntu Online Accounts, and we have a proper plugin for that in Empathy (with an Ubuntu-specific D-Bus API to fill in some gaps in the libaccounts API) and a request to merge that instead. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32904 Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71230 Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
2013-10-31NEWSSimon McVittie1-0/+16
2013-10-31Add CD.I.Messages1 to InterfacesSimon McVittie1-0/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37380 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2013-10-31Remove unused constantsSimon McVittie1-5/+0
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37380 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>