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
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
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
0ca7917093
CLOUD: Update FolderDownloadRequest
...
It now keeps track of downloaded bytes.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
b37b392fa0
CLOUD: Add BoxStorage sketch
2016-08-24 16:07:55 +06:00
Alexander Tkachev
ddb1a6ccb6
GUI: Upgrade DownloadDialog
...
It now shows the remote and local directories and a progress bar.
Storage now shows OSD messages on download success and failure.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
b8ee9d4e7d
CLOUD: Add FolderDownload-related methods in Storage
...
CloudManager's shortcuts are added too.
The idea is to keep FolderDownload request within Storage, and provide
necessary means to access it. The download is started and cancelled
through the DownloadDialog.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
10250af251
CLOUD: Fix CloudManager's methods
...
Were not returning created Request.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
dc0a956172
CLOUD: Add CloudManager::downloadFolder()
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
0af97e59bc
CLOUD: Add LocalWebserver
...
Available as LocalServer singleton. It's being started and stopped by
StorageWizardDialog. It doesn't handle clients yet, though.
2016-08-24 16:07:55 +06:00
Peter Bozsó
c1ffb09fb0
CLOUD: Fix configuration handling in CloudManager
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
Peter Bozsó
bfc5cab9e8
CLOUD: Fix end of namespace comment in CloudManager
2016-08-24 16:07:55 +06:00
Peter Bozsó
fc3e7dec1a
CLOUD: Introduce kStoragePrefix in CloudManager
2016-08-24 16:07:55 +06:00
Peter Bozsó
98788a5e7d
CLOUD: Remove unnecessary blank lines in switch statement
2016-08-24 16:07:55 +06:00
Peter Bozsó
1403cf006c
CLOUD: Make enum StorageIDs' name singular
2016-08-24 16:07:55 +06:00
Peter Bozsó
c068b74f30
CLOUD: Force handling of all StorageIDs values in CloudManager::getStorageConfigName()
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
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
4ff1ed5fe9
GUI: Add Cloud tab information labels
...
And corresponding stub implementations in CloudManager.
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
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
Alexander Tkachev
d1d71afb07
CLOUD: Add GoogleDriveListDirectoryRequest
...
When listing directories, you get a list of StorageFiles, which path()
is actually Google Drive id. Thus, if you list a directory recursively,
you won't be able to determine whether all files are within one
directory or have some hierarchy. I'd fix that as soon as it would be
needed.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
b4b6ee0186
CLOUD: Add GoogleDriveCreateDirectory
...
Now we can create directories in Google Drive by path, not parent id +
directory name!
2016-08-24 16:07:55 +06:00
Alexander Tkachev
bb207ae513
CLOUD: Add GoogleDriveResolveIdRequest
...
GoogleDriveResolveIdRequest gets a lowercase path and searches for the
specified file's id. To do that it lists path's subdirectories one by
one with GoogleDriveListDirectoryByIdRequest.
GoogleDriveListDirectoryByIdRequest gets a Google Drive id and lists
that directory (not recursively).
2016-08-24 16:07:55 +06:00
Alexander Tkachev
0ce7be17d3
CLOUD: Make ProgressDialog display downloading progress
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e9721976aa
GUI: Add SaveLoadCloudSyncProgressDialog
...
It's shown by SaveLoadChooserDialog when files are downloaded and some
save slots are locked. One can hide that dialog to interact with
non-locked slots or cancel saves sync completely. Dialog's label shows
current sync progress.
Dialog automatically hides itself when all files are downloaded.
WARNING: right now that results in a crash!
2016-08-24 16:07:55 +06:00
Alexander Tkachev
8de2862eaa
CLOUD: Update syncSaves() to return SavesSyncRequest *
...
So other classes could use that information without casting.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
69aed03c4f
CLOUD: Add new CloudManager shortcuts
...
CloudIcon can easily use CloudMan.isWorking()
2016-08-24 16:07:55 +06:00
Alexander Tkachev
da3b7bd8d9
CLOUD: Add GoogleDriveStorage
...
It has its own GoogleDriveTokenRefresher and knows how to do info().
This commit also contains JSON int -> long long int fix and
CurlJsonRequest '\n' -> ' ' fix.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
b3bf532211
CLOUD: Make CloudManager singleton
...
It's needed to ::destroy() it in main().
2016-08-24 16:07:55 +06:00