diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-06-14 13:50:13 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-14 14:06:28 -0700 |
commit | b5eb66545b4c28809610d0778b9a797da9dda002 (patch) | |
tree | efd7b4c175a7dc5f3454078fe668b85baecf1d6e /pref.h | |
parent | 8f7a4a1a97629f29e054a9a2204bfffa558e1121 (diff) | |
download | subsurface-b5eb66545b4c28809610d0778b9a797da9dda002.tar.gz |
Cloud storage: clean up handling of cloud storage account
Correctly tracking the status of our authentication with the cloud service
is non-trivial, especially since the user may quit Subsurface between
registering and verifying an account, they might even register on one
machine and verify on another.
This tries to make sure that when in doubt we check with the cloud service
backend. And we show errors in the UI.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'pref.h')
-rw-r--r-- | pref.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -95,7 +95,7 @@ struct preferences { char *cloud_storage_email; char *cloud_storage_email_encoded; bool save_password_local; - bool show_cloud_pin; + short cloud_verification_status; bool cloud_background_sync; }; enum unit_system_values { @@ -111,6 +111,13 @@ enum def_file_behavior { CLOUD_DEFAULT_FILE }; +enum cloud_status { + CS_UNKNOWN, + CS_INCORRECT_USER_PASSWD, + CS_NEED_TO_VERIFY, + CS_VERIFIED +}; + extern struct preferences prefs, default_prefs; #define PP_GRAPHS_ENABLED (prefs.pp_graphs.po2 || prefs.pp_graphs.pn2 || prefs.pp_graphs.phe) |