summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-06-10Merge branch 'telepathy-mission-control-5.16'HEADmasterGuillaume Desmottes2-5/+27
Conflicts: src/mcd-account.c
2014-06-10mcd-account: unregister the account once we're done deleting itGuillaume Desmottes1-4/+26
The McdAccount object may still be alive for a short while because of pending async operations. We want to get rid of the D-Bus object as soon as possible and so, for example, a new Account object replacing the deleted one can be created. Fix https://bugs.freedesktop.org/show_bug.cgi?id=79827
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-06-09mcd-storage: actually remove deleted accountsGuillaume Desmottes1-2/+6
https://bugs.freedesktop.org/show_bug.cgi?id=79832
2014-03-19Zero-initialize McdLoadAccountsDataSimon McVittie1-1/+1
Otherwise, holds_setup_lock is sometimes initially nonzero, making us think we have the setup lock when really we don't, and leading to an assertion failure when we try to release it. For some reason I could only reproduce this during distcheck... Reviewed-by: Xavier Claessens (cherry picked from commit 6a073b02dbfda060142f7d47426fec55c7caba0d)
2014-03-19run-test.sh: output in TAP format, and install an installed-tests wrapperSimon McVittie2-14/+33
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
2014-02-17McdAccount: Set "account-path-suffix" parameter on CMs that support itXavier Claessens1-0/+10
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 McVittie5-349/+246
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-06McdAccountManager: if an account is async-added during setup, wait for itSimon McVittie1-0/+10
Previously, we'd only wait for accounts added in mcd_storage_load() to become ready. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=74581 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2014-02-06McdAccountManager: ref the objects in McdLoadAccountsDataSimon McVittie1-3/+7
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=74581 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2014-02-06mcd_keyfile_get_variant: add support for int16, uint16Simon McVittie1-0/+45
If we're opportunistically migrating parameters according to CM-specified types, we need to cope with uint16 ('q') for port numbers. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71093 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2014-02-06mcd_storage_maybe_migrate_parameters: fix error handlingSimon McVittie1-5/+1
mcp_account_storage_get_parameter() doesn't raise a GError. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71093 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2014-02-04NEWSSimon McVittie1-1/+7
2014-02-04Opportunistically migrate accounts from untyped to typed ParametersSimon McVittie6-19/+186
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]
2014-02-04_mcd_account_reconnect: if the account isn't valid, just disconnectSimon McVittie1-20/+16
It is not valid to call _mcd_account_connection_begin() unless the account has a TpProtocol; in particular, if the account is "valid", then we know it does have a TpProtocol. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71093 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2014-02-04_mcd_account_dup_parameters: try to get parameters' types from backendSimon McVittie4-26/+133
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 McVittie4-0/+127
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 McVittie6-7/+317
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71093 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2014-02-03Merge branch 'telepathy-mission-control-5.16'Simon McVittie0-0/+0
Conflicts: src/Makefile.am
2014-02-03codegen: avoid generating more than one thing in the same commandSimon McVittie1-3/+21
As with telepathy-glib commit 36c2a545c9, a rule like this: _gen/x.c _gen/x.h: prerequisites $(AM_V_GEN)x-generator doesn't consider x.c and x.h together. Instead, it expands to two rules, one to generate x.c and one to generate x.h, which happen to run the same commands. This means that in the worst case, you can end up running x-generator twice in parallel, and they'll race with each other and overwrite or delete each other's output. Updated version of a patch from Ross Burton, taking into account that we now generate a separate header for the gtk-doc. I use the gtk-doc header as the one that "matters", because it's the last to be generated. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69446 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2014-02-03mcd_account_check_validity, mcd_account_check_parameters: be synchronousSimon McVittie3-121/+63
There isn't actually anything in these functions that needs to be async. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71093 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2014-02-03Simplify the account connection pipeline, and make it privateSimon McVittie2-12/+6
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71093 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2014-02-03Squash mcd-account-connection.c into mcd-account.cSimon McVittie4-152/+118
There's hardly anything there any more anyway. Take the opportunity to replace _mcd_account_set_connection_context and _mcd_account_get_connection_context with simple access to the priv struct. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71093 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2014-02-03mcd_account_dup_protocol: factor outSimon McVittie1-17/+34
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71093 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2014-02-03mcd_account_get_parameter: take a TpConnectionManagerParamSimon McVittie2-18/+12
We never call this function without a TpConnectionManagerParam readily available - which is just as well, because it looks as though it would crash if mcd_manager_get_protocol_param() failed. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71093 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2014-02-03Remove code-generation machinerySimon McVittie36-6380/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69600 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2014-02-03Remove A.I.ExternalPasswordStorage, CM.I.AccountStorageSimon McVittie9-512/+2
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>
2014-02-03codegen: avoid generating more than one thing in the same commandSimon McVittie1-3/+21
As with telepathy-glib commit 36c2a545c9, a rule like this: _gen/x.c _gen/x.h: prerequisites $(AM_V_GEN)x-generator doesn't consider x.c and x.h together. Instead, it expands to two rules, one to generate x.c and one to generate x.h, which happen to run the same commands. This means that in the worst case, you can end up running x-generator twice in parallel, and they'll race with each other and overwrite or delete each other's output. Updated version of a patch from Ross Burton, taking into account that we now generate a separate header for the gtk-doc. I use the gtk-doc header as the one that "matters", because it's the last to be generated. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69446 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2014-01-30Merge branch 'account-rework-27727-round4'Simon McVittie31-2686/+2341
Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29McpParameterFlags, McpAttributeFlags: move to the right headerSimon McVittie2-8/+10
2014-01-29Test that we add types to accounts' parameters when setSimon McVittie1-3/+75
2014-01-29McdAccountManagerDefault: opportunistically save parameters' typesSimon McVittie2-21/+10
2014-01-29Only exercise old avatar storage locations in 5-12 and 5-14 testsSimon McVittie3-23/+33
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.
2014-01-29Chop up the increasingly inaccurately-named default-keyring-storage testSimon McVittie4-266/+340
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.
2014-01-29McdAccount: improve debug output for account validitySimon McVittie1-0/+33
2014-01-29Add dedicated tests for keyfile-based storageSimon McVittie5-54/+213
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.
2014-01-29Define MCP_API_VERSION_5_18, so implementations can use #ifdefSimon McVittie2-0/+17
2014-01-29Make MCP_API_VERSION less misleadingSimon McVittie1-1/+1
We didn't release this in 5.15, so it'll be the 5.18 API instead.
2014-01-29_mcd_account_manager_setup: simplify a loopSimon McVittie1-3/+2
As per Xavier's review, we don't need to call mcd_account_get_unique_name(), because account unique names (object path tails) are the keys in this map anyway. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29Be consistent in the constness of arguments in storage virtual methodsXavier Claessens6-101/+98
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 McVittie4-78/+36
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29mcd_storage_commit: rely on never being called with account == NULLSimon McVittie1-19/+7
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29McdAccountManager: commit accounts one at a timeSimon McVittie2-71/+17
In the process, inline mcd_account_manager_write_conf_async and uncork_storage_plugins into their callers, with considerable simplification because the async API isn't actually used any more. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29McdAccountManager: remove unused timed account storage commitSimon McVittie1-22/+0
Nothing ever sets write_conf_id nonzero, so this can never be called any more. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29delete_async: being asked to delete a nonexistent account is an errorSimon McVittie2-15/+4
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29mcd_storage_delete_account: don't tolerate deletion of unknown accountsSimon McVittie1-7/+1
We should always know what we're deleting, now. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29McdStorage: don't forget accounts until the McpAccountStorage says soSimon McVittie1-4/+0
We shouldn't remove it from the hash table until the storage plugin says ::deleted: until then, deletion could fail. This will become significant when we start considering deletion of a deleted account to be an error. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29McdAccount: don't delete from storage if already deletedSimon McVittie1-1/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727