summaryrefslogtreecommitdiff
path: root/src/mcd-account.c
AgeCommit message (Collapse)AuthorFilesLines
2014-03-27McdAccount: reinstate avatar-migration code, considerably simplifiedSimon McVittie1-120/+73
We no longer want to delete the directories containing old filenames (all old directories that we currently support are owned by Telepathy-0 and should not be deleted). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=70991
2014-03-27mcd_account_delete_async: remove #if 0 code to delete old account storageSimon McVittie1-30/+0
We're not going to delete Telepathy-0 account data in Telepathy-1. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=70991
2014-03-19Merge branch 'master' into nextSimon McVittie1-0/+10
Conflicts: src/mcd-storage.c
2014-03-19Merge commit '553acd80fac93fb21c28cb51f00c9c51045c9921' into nextSimon McVittie1-476/+322
Conflicts: configure.ac src/mcd-account-connection.c src/mcd-account-manager.c src/mcd-account.c src/mcd-account.h tools/glib-client-gen.py tools/glib-client-marshaller-gen.py tools/glib-ginterface-gen.py tools/glib-gtypes-generator.py tools/libglibcodegen.py tools/libtpcodegen.py xml/all.xml xml/telepathy-types.xml
2014-03-19Merge commit '79f0081b0a50ab59794827dd5af79f8671870fcd' into nextSimon McVittie1-129/+154
Modifications: * stub out 5-12 and 5-14 tests * replace Valid, Invalid with Usable, Unusable in new tests * replace AccountPropertiesChanged with PropertiesChanged in new tests * use telepathy-1 paths in new tests Conflicts: configure.ac src/mcd-account-manager.c src/mcd-storage.h tests/twisted/Makefile.am tests/twisted/account-manager/avatar-refresh.py tests/twisted/account-storage/default-keyring-storage.py util/mc-tool.c
2014-02-20tp_connection_get_detailed_error() has been renamedGuillaume Desmottes1-4/+15
2014-02-17McdAccount: Set "account-path-suffix" parameter on CMs that support itXavier Claessens1-0/+10
2014-02-11AccountPropertyChanged has been removedGuillaume Desmottes1-3/+6
2014-02-04Opportunistically migrate accounts from untyped to typed ParametersSimon McVittie1-3/+36
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 McVittie1-25/+75
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-03mcd_account_check_validity, mcd_account_check_parameters: be synchronousSimon McVittie1-81/+48
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 McVittie1-8/+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 McVittie1-23/+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 McVittie1-14/+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 McVittie1-4/+0
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 McVittie1-304/+0
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-01-29McdAccount: improve debug output for account validitySimon McVittie1-0/+33
2014-01-29McdAccount: don't delete from storage if already deletedSimon McVittie1-1/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29McdAccount: have a ref to the storage plugin from construct time onwardsSimon McVittie1-69/+30
This will make the account more self-contained. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29Thread expected GVariant types through to mcd_storage_get_*Simon McVittie1-14/+46
We're going to need this soon, in order to advise plugins how best to unescape the value. The result is still a GValue, for now. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29Make account deletion async (sort of), and imply a selective commitSimon McVittie1-2/+0
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-29fixup!Simon McVittie1-1/+1
2014-01-29mcd_account_delete: convert into mcd_account_delete_asyncSimon McVittie1-18/+35
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29mcd_account_delete: be primarily responsible for emitting RemovedSimon McVittie1-12/+9
We still don't get here if disposed early, though. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
2014-01-29Remove all notion of secret parameterXavier Claessens1-15/+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>
2014-01-14comment out code using the old file locationGuillaume Desmottes1-0/+12
2014-01-13Merge remote-tracking branch 'origin/master' into nextSimon McVittie1-70/+80
Conflicts: src/connectivity-monitor.c src/mcd-connection.c tests/twisted/account-storage/libaccounts-sso-storage.py
2013-11-12Revert "Remove all notion of secret parameter"Simon McVittie1-1/+15
This reverts commit ae64063c953840f99b1204a222fabf5aa7a37b69.
2013-11-12Revert "Make sure to not delete() nor commit() and account deleted from storage"Simon McVittie1-3/+2
This reverts commit 6ebcb0f048fcf0107c6d7deb99a7f4717467561a.
2013-11-11Make sure to not delete() nor commit() and account deleted from storageXavier Claessens1-2/+3
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-08Remove all notion of secret parameterXavier Claessens1-15/+1
We now depend on SASLAuthentication for handling secret, and MC does not have gnome-keyring anymore.
2013-11-08Allow backends, but not D-Bus clients, to delete restricted accountsSimon McVittie1-5/+24
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.
2013-11-08Replace McdAccount::always-on with the existing TpStorageRestrictionFlagsSimon McVittie1-68/+59
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
2013-10-31Store all files (accounts, etc) to ${XDG_DATA_DIRS}/telepathy-1/mission-controlGuillaume Desmottes1-2/+2
2013-10-25Adapt for ABI versions in telepathy-glib codegenSimon McVittie1-19/+19
2013-10-16Merge branch 'master' into nextSimon McVittie1-94/+0
Tests pass with telepathy-glib 0.99.2. Conflicts: src/Makefile.am src/mcd-account-manager-priv.h src/mcd-account-manager.c src/mcd-account-priv.h src/mcd-account.c src/mcd.xml tests/twisted/account-manager/hidden.py tests/twisted/constants.py tests/twisted/mctest.py xml/Account_Interface_Hidden1.xml xml/Account_Manager_Interface_Hidden1.xml xml/Makefile.am xml/nmc5.xml
2013-10-15Remove the A.I.Hidden, AM.I.Hidden interfacesSimon McVittie1-90/+0
They haven't been undrafted since they were added 2.5 years ago, and Will described them as "a bit sketchy" back then... which doesn't seem particularly compatible with consolidating and simplifying for 1.0. It's not clear to me that Telepathy is particularly appropriate for "non-user-facing" accounts. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33101 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2013-10-14Remove Conditions interfaceSimon McVittie1-4/+0
I was never sure about the design, and the supporting code was removed when I refactored connectivity for 5.16. If it's needed in future, we can bring it back, hopefully with a simpler design (fd.o #24896). Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69600
2013-10-04Upgrade to the Hidden1 interface from telepathy-spec 0.99.2Simon McVittie1-1/+1
In a future version we should make telepathy-glib generate this interface, but this will do for now. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54879 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2013-10-04Adjust contact features to Telepathy-1 API: quarks, not an enumSimon McVittie1-3/+3
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54879 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2013-10-04rename SimplePresence interface to Presence in MC itselfSimon McVittie1-1/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54879 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2013-10-04account: rename Valid to UsableSimon McVittie1-80/+80
Based on a patch by Jonny Lamb. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54879 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2013-10-02McdAccount: go back to using GetKnownAvatarTokensSimon McVittie1-21/+102
Sadly, contact attributes aren't enough to distinguish between "this protocol doesn't store avatars and you haven't re-sent your avatar since you last connected", "this protocol stores avatars but the CM hasn't checked for your current avatar yet", and "this protocol stores avatars, but there is no avatar on the server for you". GetKnownAvatarTokens specifically excludes the middle option (blocking on a server round-trip if it needs to), and uses "avatar token missing" for the first and "avatar token empty" for the last. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69885 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2013-09-19mcd_account_self_contact_upgraded_cb: don't crash on bad timingSimon McVittie1-0/+5
If the account is disconnecting, we might get the callback for upgrading after we've already NULLed out self->priv->self_contact. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69542 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2013-09-19Flag printf-ish functions with G_GNUC_PRINTF and fix resulting warningsSimon McVittie1-1/+1
In particular, mcd-account-manager-default could crash when migrating an account, since it would dereference arbitrary stack contents as a pointer-to-string. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69542 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2013-09-04Track presence via TpContact, not McdConnectionSimon McVittie1-39/+29
Now that McdAccount has a TpContact for the self-contact, this is really easy. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68905 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2013-09-04Listen to systemd sleep/shutdown signals, and inhibit until disconnectedSimon McVittie1-3/+5
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68758 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2013-09-04Remove unused signal McdAccount::connection-processSimon McVittie1-2/+0
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68712 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>