Age | Commit message (Collapse) | Author | Files | Lines |
|
Now that the account knows its own storage plugin, this is pretty easy.
|
|
This will make the account more self-contained.
|
|
|
|
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.
|
|
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.
|
|
I want to push responsibility for unescaping into storage plugins.
|
|
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.
|
|
The plugins are better-placed to do this than McdStorage: they know
their own storage format, after all.
|
|
We now know whose account it is, without having to do this.
|
|
This means we can (finally) track which plugin "owns" which account
in a reliable way.
|
|
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.
|
|
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.
|
|
McdAccount (via mcd_account_delete_async) is responsible for deleting
itself from storage if necessary. McdAccountManager shouldn't
second-guess it.
|
|
|
|
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.
|
|
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.
|
|
|
|
We still don't get here if disposed early, though.
|
|
Nothing calls it, and getting rid of it is a step towards having
McdStorage just be a "view".
|
|
This is unused, and plugins don't have any good reason to call it.
|
|
[adjusted to apply at a different position in the branch -smcv]
|
|
Based on a patch by Xavier Claessens.
|
|
Originally part of a commit by Xavier Claessens.
|
|
_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>
|
|
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>
|
|
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>
|
|
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
|
|
This reverts commit 2da0807f7a4b6be29b980c95b888452f5a6ddc9b.
|
|
This reverts commit b8617c51c1729e1579f9f066ead1fa80b0fd99a1.
|
|
This reverts commit ae64063c953840f99b1204a222fabf5aa7a37b69.
|
|
This reverts commit e9a9dd37bd193d8ac16729671d2296a4aa96139c.
|
|
This reverts commit 8171d9e5bc8d4f47a36844afab0a6063b1958004.
|
|
This reverts commit 6ebcb0f048fcf0107c6d7deb99a7f4717467561a.
|
|
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.
|
|
|
|
_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.
|
|
We now depend on SASLAuthentication for handling secret, and MC
does not have gnome-keyring anymore.
|
|
account_name==NULL still means to commit all.
|
|
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.
|
|
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.
|
|
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
|
|
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71230
Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71230
Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71230
Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
|
|
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>
|
|
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>
|
|
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37380
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37380
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
|