summaryrefslogtreecommitdiff
path: root/mission-control-plugins
AgeCommit message (Collapse)AuthorFilesLines
2014-06-10Merge branch 'telepathy-mission-control-5.16'HEADmasterGuillaume Desmottes1-1/+1
Conflicts: src/mcd-account.c
2014-06-10use G_STRFUNC in mission-control-plugins's DEBUG macroGuillaume Desmottes1-1/+1
It's more useful when reading logs than G_STRLOC and that's what we already use in src/mcd-debug.h
2014-02-06update documentation for McpAcccountStorageIface membersSimon McVittie1-3/+11
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=74581 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2014-02-06McdStorage: watch and proxy plugins' change-notification signalsSimon McVittie2-62/+4
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>
2014-02-04_mcd_account_dup_parameters: try to get parameters' types from backendSimon McVittie1-1/+1
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>
2014-02-04mcp_account_storage_get_flags: addSimon McVittie2-0/+111
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>
2014-02-04Require account plugins to provide the ability to list parametersSimon McVittie2-6/+110
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71093 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2014-01-29McpParameterFlags, McpAttributeFlags: move to the right headerSimon McVittie2-8/+10
2014-01-29Define MCP_API_VERSION_5_18, so implementations can use #ifdefSimon McVittie2-0/+17
2014-01-29Be consistent in the constness of arguments in storage virtual methodsXavier Claessens2-74/+71
We usually don't pass const objects Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29Remove MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_KEYRINGXavier Claessens1-1/+0
I makes no sense now that MC stopped caring about secrets. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29mcp_account_storage_commit: guarantee that we commit one at a timeSimon McVittie1-4/+5
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29McpAccountStorage: more, and more informative, debug messagesSimon McVittie1-7/+27
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29fixup!Simon McVittie1-1/+1
2014-01-29mcp_account_storage_delete_async: be cancellable, at least in theorySimon McVittie2-0/+5
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29McpAccountStorage: update documentation for delete_asyncSimon McVittie1-1/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29McpAccountStorage: override neither or both of delete_async, delete_finishSimon McVittie1-0/+3
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29McpAccountStorage: overriding get_* and list is mandatorySimon McVittie1-35/+4
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29mcp_account_storage_get: replace with get_attribute, get_parameterSimon McVittie5-193/+120
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
2014-01-29mcp_account_manager_unescape_variant_from_keyfile: addSimon McVittie3-0/+39
I want to push responsibility for unescaping into storage plugins. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29mcp_account_storage_set_*: return whether anything changedSimon McVittie2-13/+26
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
2014-01-29McdStorage: remove "owns" methodSimon McVittie2-52/+0
We now know whose account it is, without having to do this. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29Make mcp_account_storage_create() mandatorySimon McVittie1-0/+4
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
2014-01-29Make account deletion async (sort of), and imply a selective commitSimon McVittie2-46/+70
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
2014-01-29Call set_attribute, set_parameter to delete themSimon McVittie1-2/+4
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
2014-01-29mcp_account_manager_list_keys: removeSimon McVittie3-29/+0
This is unused, and plugins don't have any good reason to call it. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29Remove unused codeXavier Claessens3-144/+0
[adjusted to apply at a different position in the branch -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29McpAccountStorage: have a default implementation for every methodSimon McVittie1-38/+123
Based on a patch by Xavier Claessens. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29mcp_account_storage_emit_created: fix doc-commentSimon McVittie1-1/+1
Originally part of a commit by Xavier Claessens. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29Remove mcp_account_storage_set()Simon McVittie2-85/+4
_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>
2014-01-29McpAccountStorage: merge commit and commit_one into one functionSimon McVittie2-77/+8
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>
2014-01-29Remove all notion of secret parameterXavier Claessens5-78/+1
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-12Revert "Simplify a bit storage API"Simon McVittie2-106/+163
This reverts commit 2da0807f7a4b6be29b980c95b888452f5a6ddc9b.
2013-11-12Revert "Rename commit_one() to commit()"Simon McVittie2-16/+16
This reverts commit b8617c51c1729e1579f9f066ead1fa80b0fd99a1.
2013-11-12Revert "Remove all notion of secret parameter"Simon McVittie5-1/+78
This reverts commit ae64063c953840f99b1204a222fabf5aa7a37b69.
2013-11-12Revert "Remove mcp_account_storage_set()"Simon McVittie2-5/+86
This reverts commit e9a9dd37bd193d8ac16729671d2296a4aa96139c.
2013-11-12Revert "Remove unused code"Simon McVittie3-0/+144
This reverts commit 8171d9e5bc8d4f47a36844afab0a6063b1958004.
2013-11-12Revert "Make sure to not delete() nor commit() and account deleted from storage"Simon McVittie1-4/+1
This reverts commit 6ebcb0f048fcf0107c6d7deb99a7f4717467561a.
2013-11-11Make sure to not delete() nor commit() and account deleted from storageXavier Claessens1-1/+4
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 Claessens3-144/+0
2013-11-11Remove mcp_account_storage_set()Xavier Claessens2-86/+5
_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 Claessens5-78/+1
We now depend on SASLAuthentication for handling secret, and MC does not have gnome-keyring anymore.
2013-11-08Rename commit_one() to commit()Xavier Claessens2-16/+16
account_name==NULL still means to commit all.
2013-11-08Simplify a bit storage APIXavier Claessens2-163/+106
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-10-29Call IdentifyAccount to get new accounts' namesSimon McVittie3-0/+64
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
2013-10-29Don't give storage plugins the full parameter set, just 'account'Simon McVittie5-13/+18
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
2013-10-02Use AM_CPPFLAGS instead of deprecated INCLUDESSimon McVittie1-2/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69885 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2013-09-20Fix a wrong deprecation annotationSimon McVittie1-1/+1
2013-09-12plugins: use a caller-supplied client factorySimon McVittie2-27/+30
https://bugs.freedesktop.org/show_bug.cgi?id=69176 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2013-09-12Remove old "D-Bus ACL" plugin APISimon McVittie6-572/+2
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>