Commit Graph
234 Commits
Author SHA1 Message Date
Alexander TkachevandMatan Bareket f6a17e679f CLOUD: Ask user to manually enable Storage
For more security, newly connected Storage only gets username/used space
information and is disabled until user manually presses the button.
2019-07-30 14:51:41 -04:00
Alexander TkachevandMatan Bareket 85431c39bf CLOUD: Change interaction with /refresh endpoint
Refresh token is now passed as custom HTTP header, not in GET parameter,
to prevent them being written into server logs.
2019-07-30 14:51:41 -04:00
Alexander TkachevandMatan Bareket e7ca2b8db0 CLOUD: Ignore hidden files in sync/download
In PR#1754 we've discussed and decided to ignore hidden (having a name
starting with '.') files while syncing saves or downloading game files.
This commit adds a CloudManager method to test whether file should be
ignored, and this method could be extended later if we need to ignore
some other specific file names.
2019-07-30 14:51:41 -04:00
Alexander TkachevandMatan Bareket 16d97b6948 CLOUD: Minor fixes for the PR#1754
- added missing 'd' in "%d" in SavesSyncRequest;
- removed trailing ',' in enum in gui/options.h;
- fixed #endif to have // before USE_LIBCURL in gui/options.h.
2019-07-30 14:51:41 -04:00
Alexander TkachevandMatan Bareket 99c2418d1a GUI: Rewrite Cloud tab
- StorageWizardDialog is removed, along with bmps it was using;
- EditTextWidget now accepts custom font in constructor;
- ScrollContainer scrollbar now jumps to top when content height changes
so it's "overscrolled";
- IndexPageHandler now does not awaits for `code` GET-parameter, as
local webserver is no longer used to connect Storages;
- CloudManager and all corresponding Storages are updated to support
disconnecting and to notify about successful connection.
2019-07-30 14:51:41 -04:00
Alexander TkachevandMatan Bareket 31628d6428 CLOUD: Refactor BaseStorage largest methods
Not sure if that's really better, but it was really annoying to
copy-paste `delete a; delete b; return;` in every error-handling
section.
2019-07-30 14:51:41 -04:00
Alexander TkachevandMatan Bareket 72c7f8226c CLOUD: Minor cleanup in OneDriveTokenRefresher 2019-07-30 14:51:41 -04:00
Alexander TkachevandMatan Bareket 1e92e7b9f3 CLOUD: Fix saves syncing
This mostly affects OneDrive saves syncing, because it is the only cloud
provider to return 0 as timestamp of (non-)created file. 0 is treated as
EOF in /saves/timestamps file, thus all timestamps after such 0
timestamps were ignored and files were reuploaded as being "new". This
commit also adds more verbose debug information on SavesSyncRequest
decisions making for easier debugging.
2019-07-30 14:51:41 -04:00
Alexander TkachevandMatan Bareket edbea10c2e CLOUD: Fix OneDriveStorage API interaction
Something changed and old API endpoint "api.onedrive.com" now does not
work. The other one, "graph.microsoft.com", does, but there were some
other changes in JSON it returns. These changes are also in this commit.
2019-07-30 14:51:41 -04:00
Alexander TkachevandMatan Bareket e8669f693c CLOUD: Update BaseStorage to expect no refresh_token
While refreshing access_token, some cloud providers also pass a new
refresh_token. Google Drive does not, and accepts the same refresh_token
next time. These changes allow this to happen.
2019-07-30 14:51:41 -04:00
Alexander TkachevandMatan Bareket 60504dce75 CLOUD: Update storages to refresh token via cloud.scummvm.org 2019-07-30 14:51:41 -04:00
Alexander TkachevandMatan Bareket 4a427faf9c CLOUD: Get rid of 'dists/clouds/cloud_keys.h' 2019-07-30 14:51:41 -04:00
Alexander TkachevandMatan Bareket 0ee0e2d537 CLOUD: Update GoogleDriveStorage and BoxStorage to auth via cloud.scummvm.org 2019-07-30 14:51:41 -04:00
Alexander TkachevandMatan Bareket 8333cce498 CLOUD: Update OneDriveStorage to work via cloud.scummvm.org 2019-07-30 14:51:41 -04:00
Alexander TkachevandMatan Bareket 64fd116092 CLOUD: Add BaseStorage, which does auth via cloud.scummvm.org 2019-07-30 14:51:41 -04:00
Alexander TkachevandMatan Bareket faa19c7bf0 CLOUD: Cleanup a little bit - remove unused config keys usage 2019-07-30 14:51:41 -04:00
Alexander TkachevandMatan Bareket 2a56328d35 CLOUD: Update DropboxStorage to work with cloud.scummvm.org 2019-07-30 14:51:41 -04:00
Alexander TkachevandMatan Bareket ddcfcc18b2 CLOUD: Update DropboxStorage to work via scummvm.org & StorageWizardDialog correspondingly 2019-07-30 14:51:41 -04:00
SupSuperandPaul Gilbert 03c43f0588 CLOUD: Fix MSVC warnings
Fixes warning C4305: truncation from 'double' to 'float'
2019-05-09 18:13:10 +10:00
SupSuperandFilippos Karapetis 272d4105b2 WIN32: Fix libcurl redefining ARRAYSIZE
libcurl pulls in Windows headers, so let's include it first to avoid clashing with common headers
2018-12-17 12:28:33 +02:00
Eugene Sandulenko 940b2a20f1 Revert "COMMON: Change way the Singleton instances are instantiated"
This reverts commit eefa72afa1.

With this patch ConfigManager is broken.
2017-07-10 21:17:41 +02:00
Thierry CrozatandEugene Sandulenko eefa72afa1 COMMON: Change way the Singleton instances are instantiated
This fixes tons of warnings with clang from a recent xcode version on
macOS (and possibly other systems) complaining that an instantiation
of _singleton is required but no definition is available.
2017-07-10 21:11:20 +02:00
D G Turner b779f20502 CLOUD: Fix GCC Unused Variable Warning.
This variable is not used as the constructors for the storage type
classes store the resulting objects into the Cloud Manager using
replaceStorage(this) instead.
2017-02-28 20:42:17 +00:00
D G Turner df84aee6a3 CLOUD: Add FIXME comment.
This is generating a compiler warning for set-but-unused, but it looks
as if this is meant to be used in some way i.e. code is unfinished or
orphaned.
2017-01-10 05:19:13 +00:00
D G Turner 32809534fd CLOUD: Fix Remaining Shadowing Compiler Warnings. 2017-01-10 05:15:56 +00:00
D G Turner ace486cef4 CLOUD: Fix Various Shadowing Compiler Warnings from errorCallback. 2017-01-10 04:45:22 +00:00
Thierry Crozat 8906868ee0 CLOUD: Use OSDMessageQueue to post OSD messages from the cloud thread 2016-10-29 15:13:32 +01:00
Bastien Bouclet c1070e6929 CLOUD: Don't error out when PNG support is not enabled 2016-10-20 19:21:56 +02:00
Bastien Bouclet 1a1a5b5f69 CLOUD: Change the cloud icon to be updated by the main thread
The cloud manager registers itself as an event source as a mean to be polled
periodically by the GUI or engine code. The periodical polling is used to
update the OSD icon indicating background sync activity.

Also move the cloud icon from ConnectionManager to CloudManager,
allowing to decouple icon handling from network connections updates.
2016-09-18 17:54:12 +02:00
Thierry Crozat a87a702eb2 ALL: Homogeneize use of 'saved game' in messages 2016-09-18 16:40:34 +01:00
Thierry Crozat 973df9d2fd CLOUD: Fix compilation for integer constant too large for 'long' type
Hopefully all ports we have support LL constants. Otherwise we will
have to find a different way to fix this.
2016-09-17 21:45:46 +01:00
Bastien Bouclet 4d68b93aba CLOUD: Switch to the new OSD API 2016-09-13 20:29:09 +02:00
Eugene Sandulenko fab199d37e JANITORIAL: Make GPL headers uniform 2016-09-03 12:46:38 +02:00
Peter BozsóandAlexander Tkachev 02a997e468 CLOUD: Remove unused includes 2016-08-24 16:07:55 +06:00
Eugene SandulenkoandAlexander Tkachev 0558ba423c CLOUD: Fix warnings 2016-08-24 16:07:55 +06:00
Alexander Tkachev 37859a9203 CLOUD: Fix Requests
Remove unnecessary JSON warnings, fix a few places.
2016-08-24 16:07:55 +06:00
Alexander Tkachev bb529e6fd0 CLOUD: Update SavesSyncRequest
Add JSON checks in the callback.
2016-08-24 16:07:55 +06:00
Alexander Tkachev d5aca1f4fa CLOUD: Update OneDriveUploadRequest
More JSON checks.
2016-08-24 16:07:55 +06:00
Alexander Tkachev fc8e29d583 CLOUD: Update OneDrive
Added JSON checks.

New jsonContainsObject() method added to CurlJsonRequest.
2016-08-24 16:07:55 +06:00
Alexander Tkachev d34b9b91ad CLOUD: Update GoogleDriveUploadRequest
JSON checks in callback.
2016-08-24 16:07:55 +06:00
Alexander Tkachev a381e06fda CLOUD: Update GoogleDriveStorage
More JSON checks in callbacks.
2016-08-24 16:07:55 +06:00
Alexander Tkachev b3aa9f663f CLOUD: Update DropboxUploadRequest
JSON checks.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 364c74df93 CLOUD: Update DropboxStorage
JSON checks added.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 6be736b5ed CLOUD: Update Dropbox Requests
Adding more JSON checks there.
2016-08-24 16:07:55 +06:00
Alexander Tkachev a2e0199727 CLOUD: Update BoxUploadRequest
More JSON checks there.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 166d1121e5 CLOUD: Update TokenRefreshers
Box's, Google Drive's and OneDrive's token refreshing requests have more
JSON checks now.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 9d96d40b3d CLOUD: Add JSON-related checks in BoxStorage 2016-08-24 16:07:55 +06:00
Alexander Tkachev 0b97aff866 CLOUD: Minor TODO fix 2016-08-24 16:07:55 +06:00
Alexander Tkachev 6dd10f3a68 CLOUD: Add KEY/SECRET override code
The following constants must be defined if ENABLE_RELEASE is:
* RELEASE_DROPBOX_KEY,
* RELEASE_DROPBOX_SECRET,
* RELEASE_ONEDRIVE_KEY,
* RELEASE_ONEDRIVE_SECRET,
* RELEASE_GOOGLE_DRIVE_KEY,
* RELEASE_GOOGLE_DRIVE_SECRET,
* RELEASE_BOX_KEY,
* RELEASE_BOX_SECRET.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 15c6772ff7 ALL: Fix debug, warning and error usage
Added prefixes, used debug(9).
2016-08-24 16:07:55 +06:00