Commit Graph
24 Commits
Author SHA1 Message Date
Eugene Sandulenko fab199d37e JANITORIAL: Make GPL headers uniform 2016-09-03 12:46:38 +02:00
Alexander Tkachev a381e06fda CLOUD: Update GoogleDriveStorage
More JSON checks in callbacks.
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
Eugene SandulenkoandAlexander Tkachev d57fca4665 CLOUD: JANITORIAL: Fix code formatting 2016-08-24 16:07:55 +06:00
Peter BozsóandAlexander Tkachev 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 f743b31963 CLOUD: Fix CloudManager::connectStorage() memory leak 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 5cbb3e8705 CLOUD: Add Storage::uploadStreamSupported()
Box uses POST multipart/form requests for uploading. Such requests could
be sent with libcurl if we either have a file available or a buffer with
this file's contents.

SavesSyncRequest was using Storage::upload(ReadStream *), which couldn't
be implemented in BoxStorage. Thus I've added a method to test whether
such upload is supported and, if it's not, SavesSyncRequest uses the
other.
2016-08-24 16:07:55 +06:00
Alexander Tkachev d96cdacb38 CLOUD: Add BoxUploadRequest 2016-08-24 16:07:55 +06:00
Alexander Tkachev 16ed625dfe CLOUD: Remove BoxStorage::streamFileById debug() call 2016-08-24 16:07:55 +06:00
Alexander Tkachev 19ae61dffc CLOUD: Add IdDownloadRequest and IdStreamFileRequest
Used for downloading files in Box.
2016-08-24 16:07:55 +06:00
Alexander Tkachev d943d7c3a8 CLOUD: Add IdCreateDirectoryRequest
Box gets createDirectoryWithParentId(), so now creating directories
works there.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 2b3caf1efa CLOUD: Add IdStorage
This is a special base class for Storages which are using ids instead of
paths in their APIs, like Box or Google Drive.

This commit makes Box derived from IdStorage.
2016-08-24 16:07:55 +06:00
Alexander Tkachev e0a6b2135d CLOUD: Add BoxListDirectoryRequest
And used in it BoxResolveIdRequest.

TODO: make some generic ResolveIdRequest and ListDirectoryRequest for
id-based storages. It's really similar, I just had to change a few
details in GoogleDrive ListDirectory and ResolveId requests.
2016-08-24 16:07:55 +06:00
Alexander Tkachev eb269e137f CLOUD: Add BoxListDirectoryByIdRequest
Similarly to Google Drive, Box uses only ids of files. That means id
resolving would be slow.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 85f1ce8ece CLOUD: Add BoxTokenRefresher and BoxStorage::info()
BoxTokenRefresher does refresh if HTTP 401 is returned by the server.

To test refresher, BoxStorage::info() was added.
2016-08-24 16:07:55 +06:00
Alexander Tkachev b37b392fa0 CLOUD: Add BoxStorage sketch 2016-08-24 16:07:55 +06:00