aboutsummaryrefslogtreecommitdiff
path: root/backends/cloud
AgeCommit message (Collapse)Author
2016-08-24CLOUD: Fix include in CloudManagerPeter Bozsó
2016-08-24CLOUD: Introduce kStoragePrefix in CloudManagerPeter Bozsó
2016-08-24CLOUD: Remove unnecessary blank lines in switch statementPeter Bozsó
2016-08-24CLOUD: Make enum StorageIDs' name singularPeter Bozsó
2016-08-24CLOUD: Force handling of all StorageIDs values in ↵Peter Bozsó
CloudManager::getStorageConfigName()
2016-08-24CLOUD: Fix getAccessToken()Alexander Tkachev
KEY and SECRET should now load before getAccessToken() uses them, so it should work now.
2016-08-24Fix DropboxStorage::codeFlowComplete()Peter Bozsó
2016-08-24CLOUD: Fix compilation error in savesyncrequest.hPeter Bozsó
"savessyncrequest.h:35:35: error: use of undeclared identifier 'UINT_MAX'"
2016-08-24GUI: Add EditText in StorageWizardDialogAlexander Tkachev
One can enter the code, press 'Connect' button and get a working Storage!
2016-08-24CLOUD: Add Request::date()Alexander Tkachev
Used in SavesSyncRequest to update Storage's last sync date.
2016-08-24CLOUD: Add ConnMan::urlEncode()Alexander Tkachev
Tried to use it everywhere I should've use it.
2016-08-24COMMON: Add String::asUint64()Alexander Tkachev
Instead of all these atoull() I've added everywhere.
2016-08-24GUI: Add Refresh button in Options Cloud tabAlexander Tkachev
Commit changes CloudManager and Storages so they would automatically refresh the fields when the could.
2016-08-24CLOUD: Update CloudManagerAlexander Tkachev
It now has methods to update Storage's information.
2016-08-24CLOUD: Update CloudManagerAlexander Tkachev
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-24GUI: Add Cloud tab information labelsAlexander Tkachev
And corresponding stub implementations in CloudManager.
2016-08-24CLOUD: Update CloudManager and StorageAlexander Tkachev
* Storage::name(); * CloudManager::getStorageName(); * CloudManager::getStorageIndex(); * CloudManager::listStorages(); * CloudManager::switchStorage().
2016-08-24CLOUD: Minor GoogleDriveUploadRequest fixAlexander Tkachev
Just checked that out on cloud sync: Google Drive is officially supported!
2016-08-24CLOUD: Add GoogleDriveUploadRequestAlexander Tkachev
Includes NetworkReadStream PATCH method and Headers remembering feature.
2016-08-24CLOUD: Add GoogleDrive download-related requestsAlexander Tkachev
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-24CLOUD: Update downloading in StoragesAlexander Tkachev
Id should be used everywhere.
2016-08-24CLOUD: Update Requests to use StorageFile::id()Alexander Tkachev
Only two places to update, as others still require id resolving.
2016-08-24CLOUD: Update GoogleDriveStorage and StorageFileAlexander Tkachev
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-24CLOUD: Update GoogleDriveCreateDirectoryRequestAlexander Tkachev
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-24CLOUD: Make GoogleDriveResolveIdRequest case-insensitiveAlexander Tkachev
2016-08-24CLOUD: Fix GoogleDriveStorage to work with root folderAlexander Tkachev
Now it needs another scope and uses "root" instead of "appDataFolder".
2016-08-24CLOUD: Add GoogleDriveListDirectoryRequestAlexander Tkachev
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-24CLOUD: Add GoogleDriveCreateDirectoryAlexander Tkachev
Now we can create directories in Google Drive by path, not parent id + directory name!
2016-08-24CLOUD: Add GoogleDriveResolveIdRequestAlexander Tkachev
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-24CLOUD: Minor fixesAlexander Tkachev
2016-08-24CLOUD: Add SaveLoadCloudSyncProgress enumAlexander Tkachev
It's common for Save/Load dialogs and SavesSyncRequest.
2016-08-24CLOUD: Make DefaultSaveFileManager ignore syncing filesAlexander Tkachev
MetaEngines don't get "locked" files in the list, so won't try to open these. Save/Load dialog updates save list every time SavesSyncRequest tells it to.
2016-08-24CLOUD: Make ProgressDialog display downloading progressAlexander Tkachev
2016-08-24GUI: Add SaveLoadCloudSyncProgressDialogAlexander Tkachev
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-24CLOUD: Make Save/Load dialog start saves syncAlexander Tkachev
It also shows a "sync disabled" icon in case it has a savepath override.
2016-08-24CLOUD: Update syncSaves() to return SavesSyncRequest *Alexander Tkachev
So other classes could use that information without casting.
2016-08-24CLOUD: Add new CloudManager shortcutsAlexander Tkachev
CloudIcon can easily use CloudMan.isWorking()
2016-08-24CLOUD: Fix SavesSyncRequest to return right filesAlexander Tkachev
Files we need are files to be downloaded, because that's what blocks us from reading/writing in those.
2016-08-24CLOUD: Extend Storage & SavesSyncRequestAlexander Tkachev
Now one can learn whether SavesSyncRequest is running, its progress and which files are being synced.
2016-08-24CLOUD: Fix SavesSyncRequestAlexander Tkachev
Now it would finish with error if spawned Request is nullptr.
2016-08-24CLOUD: Add GoogleDriveStorageAlexander Tkachev
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-24CLOUD: Add mutexes in StorageAlexander Tkachev
2016-08-24CLOUD: Make CloudManager singletonAlexander Tkachev
It's needed to ::destroy() it in main().
2016-08-24CLOUD: Implement Storage's isWorking()Alexander Tkachev
It now keeps track of how many Requests are running. To achieve that, we had to pass a callback to ConnectionManager, so each Request has a callback paired with it. If that's one of Storage's Requests, it has a callback, which would decrease a counter. When Storage adds a Request, it also increases a counter and passes that callback. Callback is called by ConnMan when Request is deleted. isWorking() returns true if there is at least one Request running.
2016-08-24CLOUD: Shorten Cloud APIAlexander Tkachev
touch() and isSyncing() are not needed. remove() is not needed too, but it could be used in the future.
2016-08-24CLOUD: Fix SavesSyncRequest to create saves folderAlexander Tkachev
2016-08-24CLOUD: Add OneDriveCreateDirectoryRequestAlexander Tkachev
2016-08-24CLOUD: Add DropboxCreateDirectoryRequestAlexander Tkachev
Also add CloudManager::testFeature(), because syncSaves() now works fine and I don't want to break it again and again with my testing requests.
2016-08-24CLOUD: Move download methods into StorageAlexander Tkachev
DownloadRequest and FolderDownloadRequest are using other Storage's methods. Thus, download() and downloadFolder() could be implemented in base Storage class.
2016-08-24CLOUD: Use uint64 in StorageInfoAlexander Tkachev
There was a warning regarding 25 GB constant. By the way, I'm not sure how to print uint64 (%llu is available in C99 only, and gcc produces a warning about that).