Age | Commit message (Collapse) | Author | Files | Lines |
|
Conflicts:
src/mcd-account.c
|
|
It's more useful when reading logs than G_STRLOC and that's what we already
use in src/mcd-debug.h
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=74581
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
|
|
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>
|
|
Now that I've deleted ExternalAccountStorage support, we have two
uses for this function:
* get the parameters to be passed to RequestConnection
* get the parameters for our own D-Bus API (PropertiesChanged,
GetAll, etc.)
For the former, we should know the types already, because we should
already have a concrete CM/protocol in mind by the time we get here.
For the latter, ideally we shouldn't need the CM's types at all: if
the backend is storing parameters with types, it's arguably more
correct for Parameters to contain what the user stored, even if that
isn't an exact match for what the CM wants.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71093
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
|
|
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>
|
|
|
|
|
|
We usually don't pass const objects
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
|
|
I makes no sense now that MC stopped caring about secrets.
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
|
|
|
|
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
|
|
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
|
|
I want to push responsibility for unescaping into storage plugins.
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
|
|
This is unused, and plugins don't have any good reason to call it.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
|
|
[adjusted to apply at a different position in the branch -smcv]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
|
|
Based on a patch by Xavier Claessens.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
|
|
Originally part of a commit by Xavier Claessens.
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>
|
|
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.
|
|
It's exposed through the plugin API so that exemplary plugins can
use the same utility functions to decide how to name accounts for
the ::created signal, if they want to.
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34640
|
|
We broke plugin API since the last release anyway, so this isn't
a new API break.
The doc-comments all claim that the string is the result of
IdentifyAccount, because that's about to be true. :-)
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34640
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69885
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
|
|
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=69176
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
|
|
It was last used in Maemo 6. Mainstream Linux doesn't treat the
session bus as a security boundary, and if it did, we could do this
a lot better (with GAsyncResult, for a start).
Also, McpRequestPolicy does this in a much less
speculatively-general way.
https://bugs.freedesktop.org/show_bug.cgi?id=69176
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
|