Age | Commit message (Collapse) | Author | Files | Lines |
|
See:
https://wiki.gnome.org/action/show/Initiatives/GnomeGoals/InstalledTests
https://en.wikipedia.org/wiki/Test_Anything_Protocol
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=74626
Reviewed-by: Guillaume Desmottes
|
|
This lets us get rid of the "ready" vfunc on plugins: we now
connect to each plugin's signals only after we have called
mcp_account_storage_list(), so we won't get double-notification for
accounts that are both present in the initial list and signalled.
This means we can remove a queue of delayed signal emissions from the
test D-Bus plugin (and when it's ported to this API, from Empathy's
libaccounts/UOA plugin). As far as I can see, list() and ready() happen
within the same main-loop iteration anyway, so I don't think it was
even possible to receive notification of a new account in that window.
Empathy's GNOME Online Accounts plugin never really implemented this:
in theory, it was incorrect, since any account that happened to be
added between list() and ready() would be lost altogether. However,
list() and ready() seem to happen in the same main-loop iteration,
so this might never have been a practical concern.
Rather than "fixing" Empathy's GOA plugin, it seems better to remove
the difficult case altogether.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=74581
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71093
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
[also depend on new tp-glib for
tp_connection_manager_param_dup_variant_type -smcv]
|
|
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>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71093
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33485
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=44512
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69600
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
|
|
|
|
|
|
Otherwise, it will reduce test coverage while porting to Telepathy 1.0:
all the tests dealing with old locations need to be disabled until we
implement 0.x -> 1.0 migration.
|
|
This test hasn't dealt with a keyring for a while, and now only covers
"variant files". Split it into two: one deals with creating an account
at runtime in the default backend, and one deals with loading files
from disk.
|
|
These are impossible to test without restarting Mission Control, because
we only read from one such location at a time; so there's no point in
trying to bundle them into one test.
|
|
We usually don't pass const objects
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
|
|
Methods that act on a single account should always be called on an
account that exists (if it doesn't, where did you get its name from?),
so treat it as an error if they are called with a nonexistent account.
commit() has a dual role here: the method that takes a non-NULL account
(which acts on a single account, as described), and the method that
takes a NULL account name (which is OK to call at any time, to commit
all of our 0-or-more accounts).
While we are not active, we don't claim to have any accounts at all,
so treat it as an error if any method is called with a non-NULL account
name while inactive.
I've temporarily made an exception for delete_async(), although that
exception is removed in a later patch on this branch. It's less bad
if delete_async() is called on an account that doesn't exist, because
if you do, the desired state ("account X doesn't exist") has already
been reached.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
|
|
We know the regression tests are going to provide fake system and
session buses.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
|
|
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.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
|
|
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.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
|
|
The plugins are better-placed to do this than McdStorage: they know
their own storage format, after all.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
|
|
We now know whose account it is, without having to do this.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
|
|
This means we can (finally) track which plugin "owns" which account
in a reliable way.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
|
|
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.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
|
|
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.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
|
|
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.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
|
|
_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>
|
|
It wasn't implemented correctly (see bug #40305) and I wasn't convinced
by the design (see bug #30043). Let's think about it more before we
bring it back.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=30043
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=40305
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@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.
|
|
_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>
|
|
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=54875
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54875
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
|
|
Now that we can load individual accounts from any of several directories,
we should test that precedence and deletion behave correctly.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54875
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54875
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
|