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