Alexander Tkachev
626d85ea49
CLOUD: Fix module.mk for openurl-default.o
...
It's now added to all the backends manually.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
1b56f59add
GUI: Update DownloadDialog
...
It now has download size and speed labels.
Commit also fixes minor mistake in ConnMan.
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
d8a43cf290
CLOUD: Add openUrl() for POSIX
2016-08-24 16:07:55 +06:00
Alexander Tkachev
990dee3c4f
CLOUD: Add Networking::Browser::openUrl() sketch
...
Only Windows' shellExecute() now.
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
e25338ec24
CLOUD: Update CurlJsonRequest
...
Uses dynamically allocated buffer now.
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
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
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
db72fa34d6
CLOUD: Update NetworkReadStream and CurlRequest
...
Now those support POST multipart/form upload.
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
34ee1d29d5
CLOUD: Fix Storage::streamFile()
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
0a43dad629
CLOUD: Redirect to "/files" from "/"
...
"/" is used to receive "?code", but when there is no such parameter
passed, it's safe to redirect user to the "/files".
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
5c60cd14c2
CLOUD: Add LocalWebserver::resolveAddress()
...
Works on Linux too. And, well, I'm bad in adding backends, so it's just
#ifdefed there.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
389c669a47
CLOUD: Add "directory" form for webserver "/upload"
...
The attribute is Chrome-only.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
29e6020574
CLOUD: Update "/files" hardcoded response template
2016-08-24 16:07:55 +06:00
Alexander Tkachev
3064b44b92
CLOUD: Switch to "multiple" files uploading
...
Still doesn't support directories uploading.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
12518ed0bf
CLOUD: Fix gradient on LocalWebserver's pages
...
It was starting over every 100vh (each screen).
2016-08-24 16:07:55 +06:00
Alexander Tkachev
35b2471290
CLOUD: Fix '\' encoding back
2016-08-24 16:07:55 +06:00
Alexander Tkachev
30430b379f
CLOUD: Fix Client's buffer
2016-08-24 16:07:55 +06:00
Alexander Tkachev
36b0069e95
CLOUD: Cleanup in Handlers
...
Simplified some stuff here and there by using HandlerUtils static
methods.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
f1830645d0
CLOUD: Cleanup in LocalWebserver
2016-08-24 16:07:55 +06:00
Alexander Tkachev
34dd84f429
CLOUD: More cleanup in Client
2016-08-24 16:07:55 +06:00
Alexander Tkachev
d1b5a64020
CLOUD: Cleanup in Reader and Client
2016-08-24 16:07:55 +06:00
Alexander Tkachev
7fcdcc10cb
CLOUD: Cleanup in UploadFileClientHandler
...
Adds Client::noMoreContent() and Reader::noMoreContent(), which return
true when whole client's request was read.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
abae5c4371
CLOUD: Cleanup in UploadFileHandler
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e4bb7c4e75
CLOUD: Add UploadFileClientHandler
...
Now Client reads the first headers block, then LocalWebserver decides
which Handler to use. In case of "/upload", UploadFileHandler is used.
But now it only knows the "path" parameter. If that's valid, actual
UploadFileClientHandler is created, which reads the contents of the
request and, when finds there an "upload_file" field, starts saving it
in the directory specified by "path".
With that we don't need temp files approach from Reader class.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
a424ebbc28
CLOUD: Fix quotes encoding
2016-08-24 16:07:55 +06:00
Alexander Tkachev
eaa5fb1759
CLOUD: Put "/upload" "path" parameter in the URL
2016-08-24 16:07:55 +06:00
Alexander Tkachev
f0fc18d2ee
CLOUD: Add UploadFileHandler
2016-08-24 16:07:55 +06:00
Alexander Tkachev
f3ee9e3272
CLOUD: Fix minor Reader-related bugs
2016-08-24 16:07:55 +06:00
Alexander Tkachev
b69cc3effb
CLOUD: Update Reader to delete temp files
2016-08-24 16:07:55 +06:00
Alexander Tkachev
bca05b2720
CLOUD: Save files fields into temp files
...
Instead of keeping them in memory. Temp file name is generated to point
into ScummVM's working directory. That means that if user wanted to
upload file to the place with sufficient size, it would instead be
uploaded to ScummVM's working directory. Yet it's too early to parse the
target directory, so there is no way to generate temp file name within
that directory.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
80cc3469e7
CLOUD: Add Reader::readOneByteInStream()
2016-08-24 16:07:55 +06:00