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
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
f95073f008
CLOUD: JANITORIAL: More whitespace fixes
2016-08-24 16:07:55 +06:00
Eugene Sandulenko
eb268cd14f
CLOUD: Fix warning
2016-08-24 16:07:55 +06:00
Eugene Sandulenko
d57fca4665
CLOUD: JANITORIAL: Fix code formatting
2016-08-24 16:07:55 +06:00
Alexander Tkachev
cccfe7c247
CLOUD: Update BoxListDirectoryByIdRequest
...
It now uses special CurlJsonRequest static methods to check whether JSON
is an object, has a string or integer parameter.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
43c940c985
CLOUD: Updated BoxListDirectoryByIdRequest
...
It now checks for all keys in JSON to avoid segfaults and prints
warnings if passed keys are missing or have wrong types.
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
758f46ddf0
CLOUD: Fix FolderDownloadRequest TODO
2016-08-24 16:07:55 +06:00
Alexander Tkachev
a30d0d1994
CLOUD: Update DownloadRequest's TODO
...
We need a way to reopen DumpFile if we want DownloadRequest to support
restarting.
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
Alexander Tkachev
bd8f2ed825
CLOUD: Fix some TODOs in CloudManager
...
"No Storage connected!" error message is passed to the error callback
now when there is no Storage connected to the CloudManager.
2016-08-24 16:07:55 +06:00
Peter Bozsó
8c62993769
CLOUD: Remove remove() from BoxStorage
2016-08-24 16:07:55 +06:00
Alexander Tkachev
efebb5b90d
CLOUD: Remove DropboxStorage::remove()
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
b1264df120
CLOUD: Check whether Storage is working when replacing it
...
We do that in CloudManager::replaceStorage(), but I've tried to
eliminate such possibility by adding a check in the StorageWizardDialog.
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
ab0f2d1a03
CLOUD: Fix OneDriveUploadRequest
...
Segfault when given stream is nullptr.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
6753c18d6f
CLOUD: Add default SavesSync callbacks
...
With OSD messages indicating whether saves sync is complete, cancelled
or failed.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
0c1c274abd
CLOUD: Fix OneDriveUploadRequest
...
OneDrive doesn't accept empty files, so UploadRequest just skips such.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
d0c54cdd64
CLOUD: Fix DropboxCreateDirectoryRequest
...
It now calls success callback with `false` on Dropbox's
"path/conflict/folder", indicating that the directory already exists.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
55568d757c
CLOUD: Move Dropbox to API v2
...
We had a few places where their deprecated API v1 was used.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
c431ae6d84
CLOUD: Calculate FolderDownload download speed
2016-08-24 16:07:55 +06:00
Alexander Tkachev
85adefdb86
CLOUD: Update FolderDownloadRequest::getProgress()
...
It now is based on downloaded size, not number of files.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
479c76bbd2
CLOUD: Fix IdDownloadRequest
...
Wrong value was returned in getProgress() on nullptr there.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
0ca7917093
CLOUD: Update FolderDownloadRequest
...
It now keeps track of downloaded bytes.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
ca33c0a0a8
CLOUD: Fix FolderDownloadRequest
...
It now sends kDownloadEndedCmd on success without waiting to be
destructed.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
d863dad055
CLOUD: Fix FolderDownloadRequest::getProgress()
...
Now it doesn't stop on 100 % on last file and it ignores the
directories, so it doesn't "jump" suddenly as there are no directories
to skip.
2016-08-24 16:07:55 +06:00
Peter Bozsó
7951a2ea16
CLOUD: Rename _files to _pendingFiles in FolderDownloadRequest
2016-08-24 16:07:55 +06:00
Alexander Tkachev
dfd68306de
CLOUD: Upgrade FolderDownloadRequest::getProgress()
...
Now NetworkReadStream, which is used in DownloadRequest, which is used
in FolderDownloadRequest, returns progress information provided by
libcurl.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
1a53dccf51
CLOUD: Update DownloadRequest
...
It now uses a dynamically allocated 1 MB buffer.
2016-08-24 16:07:55 +06:00