D G Turner
32809534fd
CLOUD: Fix Remaining Shadowing Compiler Warnings.
2017-01-10 05:15:56 +00: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
Alexander Tkachev
37859a9203
CLOUD: Fix Requests
...
Remove unnecessary JSON warnings, fix a few places.
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
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
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
Alexander Tkachev
d57e0c89b5
CLOUD: #define all OAuth2/API-related URLs
2016-08-24 16:07:55 +06:00
Alexander Tkachev
f3959e1401
CLOUD: Upload ListDirectory Requests
...
Lots of checks to avoid JSON-related segfaults added.
2016-08-24 16:07:55 +06:00
Eugene Sandulenko
d57fca4665
CLOUD: JANITORIAL: Fix code formatting
2016-08-24 16:07:55 +06:00
Eugene Sandulenko
876b8616af
CLOUD: Fix format warning
2016-08-24 16:07:55 +06:00
Alexander Tkachev
5f9beb76cd
CLOUD: Fix HTTP response code TODOs
2016-08-24 16:07:55 +06:00
Peter Bozsó
9254df2d96
CLOUD: Fix code formatting
2016-08-24 16:07:55 +06:00
Alexander Tkachev
772d8ee42b
CLOUD: Fix redirect_uri selection code
...
Now it's not hardcoded based on USE_SDL_NET, but one or another value is
used depending on currently selected LocalWebserver's port.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
438ba985a4
JANITORIAL: Remove spaces at the end of the line
...
I knew there were some, but I wanted to fix them once, instead of doing
it all the time.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
b180c73675
CLOUD: Do some refactoring/cleanup
...
Nothing really major.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
a449ddce15
CLOUD: Fix Cppcheck warnings
2016-08-24 16:07:55 +06:00
Alexander Tkachev
f743b31963
CLOUD: Fix CloudManager::connectStorage() memory leak
2016-08-24 16:07:55 +06:00
Alexander Tkachev
1d78d20fcf
CLOUD: Fix Dropbox and Google Drive UploadRequests
...
Possible segfault there too.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
b4e9e35e07
CLOUD: Cleanup in Storages
2016-08-24 16:07:55 +06:00
Alexander Tkachev
0b5bd18d85
CLOUD: Update GoogleDriveStorage
...
It now derives from IdStorage, so lots of GoogleDrive*Request classes
are removed and replaced with generic IdStorage*Request ones.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
a37c639986
CLOUD: Make Google Drive sort files list
...
GoogleDriveListDirectoryByIdRequest now uses "orderBy" field to specify
that we want the commonly used "alphabetical, folders first" order.
That's mostly needed for RemoteBrowserDialog, because Requests don't
care about the order, and this one is more user-friendly.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
f3a392359b
CLOUD: Fix finishSuccess() warning
2016-08-24 16:07:55 +06:00
Alexander Tkachev
fa3ea83165
CLOUD: Fix some warnings
...
Mostly on format string
2016-08-24 16:07:55 +06:00
Alexander Tkachev
39eb76f8c2
CLOUD: Fix "zero-length format string" warning
2016-08-24 16:07:55 +06:00
Alexander Tkachev
1addefad7e
CLOUD: Use correct redirect_uris
...
Usage of #ifdef there (and in StorageWizardDialog) means that ScummVM
doesn't support both local webserver and scummvm.org paths at the same
time. It's either built with SDL_net (thus supporting localhost path) or
without it (thus using scummvm.org).
2016-08-24 16:07:55 +06:00
Peter Bozsó
a8eebbe851
CLOUD: Get rid of CloudConfigHelper, use kCloudDomain where approriate
2016-08-24 16:07:55 +06:00
Alexander Tkachev
8a84263d2b
CLOUD: Do saves sync on Storage connect
2016-08-24 16:07:55 +06:00
Peter Bozsó
219e565c32
CLOUD: Introduce CloudConfigHelper
2016-08-24 16:07:55 +06:00
Alexander Tkachev
dbafbf2569
CLOUD: Fix getAccessToken()
...
KEY and SECRET should now load before getAccessToken() uses them, so it
should work now.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
9ee2eb4e60
GUI: Add EditText in StorageWizardDialog
...
One can enter the code, press 'Connect' button and get a working
Storage!
2016-08-24 16:07:55 +06:00
Alexander Tkachev
3e6503743c
CLOUD: Add Request::date()
...
Used in SavesSyncRequest to update Storage's last sync date.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
6a93e8dd09
CLOUD: Add ConnMan::urlEncode()
...
Tried to use it everywhere I should've use it.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
c99b24c16d
COMMON: Add String::asUint64()
...
Instead of all these atoull() I've added everywhere.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e6242b0be8
GUI: Add Refresh button in Options Cloud tab
...
Commit changes CloudManager and Storages so they would automatically
refresh the fields when the could.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
9b15ec9989
CLOUD: Update CloudManager
...
It now has methods to update Storage's information.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
af9930482e
CLOUD: Update CloudManager
...
It now supports only one storage of each type. Only one Storage could be
loaded to the memory as well.
Options' Cloud tab now changes the Storage only when user pressed OK
button, giving the ability to look through the Storages without actually
changing them.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
870e96eb9c
CLOUD: Update CloudManager and Storage
...
* Storage::name();
* CloudManager::getStorageName();
* CloudManager::getStorageIndex();
* CloudManager::listStorages();
* CloudManager::switchStorage().
2016-08-24 16:07:55 +06:00
Alexander Tkachev
1479d12652
CLOUD: Minor GoogleDriveUploadRequest fix
...
Just checked that out on cloud sync: Google Drive is officially
supported!
2016-08-24 16:07:55 +06:00
Alexander Tkachev
b29497effe
CLOUD: Add GoogleDriveUploadRequest
...
Includes NetworkReadStream PATCH method and Headers remembering feature.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e273e3d6e8
CLOUD: Add GoogleDrive download-related requests
...
GoogleDriveDownloadRequest, which resolves file id and then downloads it
with GoogleDriveStorage::downloadById().
GoogleDriveStreamFileRequest, which resolves file id and then returns
file stream with GoogleDriveStorage::streamFileById().
This commit also adds GoogleDriveStorage::streamFileById() itself.
A minor GoogleDriveResolveIdRequest fix added.
With these one can download files from Google Drive.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
f0d61084da
CLOUD: Update downloading in Storages
...
Id should be used everywhere.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
7e6a89c141
CLOUD: Update GoogleDriveStorage and StorageFile
...
Because of the Google Drive StorageFile now contains yet another field,
`id`. For other storages `id` == `path`, and thus all common Requests
(such as SavesSyncRequest, DownloadFolderRequest, etc) must be using
id() instead of path(). That way these Requests won't cause id resolving
which could be quite slow (when you call it for all files in the folder,
for example).
2016-08-24 16:07:55 +06:00
Alexander Tkachev
bf71ba9a1c
CLOUD: Update GoogleDriveCreateDirectoryRequest
...
Now it also creates the "base" ScummVM directory if there is no such
directory yet. This way SavesSyncRequest works fine when no "ScummVM" or
"ScummVM/Saves" folder exist in the Google Drive.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
c968f0143c
CLOUD: Make GoogleDriveResolveIdRequest case-insensitive
2016-08-24 16:07:55 +06:00
Alexander Tkachev
505d3764cb
CLOUD: Fix GoogleDriveStorage to work with root folder
...
Now it needs another scope and uses "root" instead of "appDataFolder".
2016-08-24 16:07:55 +06:00