aboutsummaryrefslogtreecommitdiff
path: root/backends
AgeCommit message (Collapse)Author
2016-08-24CLOUD: Remove BoxStorage::streamFileById debug() callAlexander Tkachev
2016-08-24CLOUD: Add IdDownloadRequest and IdStreamFileRequestAlexander Tkachev
Used for downloading files in Box.
2016-08-24CLOUD: Fix Storage::streamFile()Alexander Tkachev
2016-08-24CLOUD: Add IdCreateDirectoryRequestAlexander Tkachev
Box gets createDirectoryWithParentId(), so now creating directories works there.
2016-08-24CLOUD: Add IdStorageAlexander Tkachev
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-24CLOUD: Add BoxListDirectoryRequestAlexander Tkachev
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-24CLOUD: Add BoxListDirectoryByIdRequestAlexander Tkachev
Similarly to Google Drive, Box uses only ids of files. That means id resolving would be slow.
2016-08-24CLOUD: Add BoxTokenRefresher and BoxStorage::info()Alexander Tkachev
BoxTokenRefresher does refresh if HTTP 401 is returned by the server. To test refresher, BoxStorage::info() was added.
2016-08-24CLOUD: Redirect to "/files" from "/"Alexander Tkachev
"/" is used to receive "?code", but when there is no such parameter passed, it's safe to redirect user to the "/files".
2016-08-24CLOUD: Add BoxStorage sketchAlexander Tkachev
2016-08-24CLOUD: Add LocalWebserver::resolveAddress()Alexander Tkachev
Works on Linux too. And, well, I'm bad in adding backends, so it's just #ifdefed there.
2016-08-24CLOUD: Add "directory" form for webserver "/upload"Alexander Tkachev
The attribute is Chrome-only.
2016-08-24CLOUD: Update "/files" hardcoded response templateAlexander Tkachev
2016-08-24CLOUD: Switch to "multiple" files uploadingAlexander Tkachev
Still doesn't support directories uploading.
2016-08-24CLOUD: Fix gradient on LocalWebserver's pagesAlexander Tkachev
It was starting over every 100vh (each screen).
2016-08-24CLOUD: Fix '\' encoding backAlexander Tkachev
2016-08-24CLOUD: Fix Client's bufferAlexander Tkachev
2016-08-24CLOUD: Cleanup in HandlersAlexander Tkachev
Simplified some stuff here and there by using HandlerUtils static methods.
2016-08-24CLOUD: Cleanup in LocalWebserverAlexander Tkachev
2016-08-24CLOUD: More cleanup in ClientAlexander Tkachev
2016-08-24CLOUD: Cleanup in Reader and ClientAlexander Tkachev
2016-08-24CLOUD: Cleanup in UploadFileClientHandlerAlexander Tkachev
Adds Client::noMoreContent() and Reader::noMoreContent(), which return true when whole client's request was read.
2016-08-24CLOUD: Cleanup in UploadFileHandlerAlexander Tkachev
2016-08-24CLOUD: Add UploadFileClientHandlerAlexander Tkachev
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-24CLOUD: Fix quotes encodingAlexander Tkachev
2016-08-24CLOUD: Put "/upload" "path" parameter in the URLAlexander Tkachev
2016-08-24CLOUD: Add UploadFileHandlerAlexander Tkachev
2016-08-24CLOUD: Fix minor Reader-related bugsAlexander Tkachev
2016-08-24CLOUD: Update Reader to delete temp filesAlexander Tkachev
2016-08-24CLOUD: Save files fields into temp filesAlexander Tkachev
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-24CLOUD: Add Reader::readOneByteInStream()Alexander Tkachev
2016-08-24CLOUD: Determine file's name in POSTAlexander Tkachev
2016-08-24CLOUD: Move method/path/etc info in ReaderAlexander Tkachev
Query parameters are now parsed once and then just searched in the HashMap.
2016-08-24CLOUD: Use Reader in ClientAlexander Tkachev
Instead of copy-pasting it I'm just "integrating" it in.
2016-08-24CLOUD: Use "multipart/form-data" in upload formAlexander Tkachev
2016-08-24CLOUD: Update Reader to support pausingAlexander Tkachev
That means that if current buffer is over, reader will stop reading and it's safe to call readResponse() again, so it would continue from the place it left.
2016-08-24CLOUD: Add Reader sketchAlexander Tkachev
That should be part of the Client, I guess. Reader is not ready to continue reading from place it stopped, but it already works as it should for the case when whole content is available.
2016-08-24CLOUD: Add query parameters URL encodingAlexander Tkachev
In local webserver's links. Fixed URL decoding to understand '+', by the way. Firefox sends these instead of spaces and "%2B" instead of '+'.
2016-08-24CLOUD: Update GetClientHandler's bufferAlexander Tkachev
It's not static now and it's increased to 1 MB.
2016-08-24CLOUD: Add "/download" handlerAlexander Tkachev
Now one can download files from the device through browser!
2016-08-24CLOUD: Move "/create" to separate HandlerAlexander Tkachev
It does redirect to "/files" on success, so user doesn't even see the strange "/create" URL at all. This commit is for keeping these handlers small, not making one (FilesPageHandler in this case) do everything.
2016-08-24CLOUD: Make "/create" workAlexander Tkachev
One can now create directories through browser.
2016-08-24CLOUD: Refactor LocalWebserverAlexander Tkachev
Its handlers are now more compact. This commit moves Handler classes in handlers\ directory. ResourceHandler ignores "hidden" files in the archive, and these are used as markup templates in IndexPageHandler and FilesPageHandler.
2016-08-24COMMON: Add replace(String, String, String)Alexander Tkachev
Searches for a substring in the string and replaces it with the other string.
2016-08-24CLOUD: Make "/files" list directoriesAlexander Tkachev
Including both virtual "/root" and "/saves" ones.
2016-08-24CLOUD: Add "/files" handlerAlexander Tkachev
Shows the page with controls, but doesn't actually list the directories, create the specified ones or allows to upload files yet.
2016-08-24CLOUD: Resolve local machine's IPAlexander Tkachev
2016-08-24CLOUD: Make "Run server" button activeAlexander Tkachev
It should show the real server's IP over there, but that doesn't work yet.
2016-08-24CLOUD: Replace USE_CLOUD with USE_LIBCURLAlexander Tkachev
In most cases that's the right one to check. USE_CLOUD is defined when either USE_LIBCURL or USE_SDL_NET are, which means if there is no curl, USE_CLOUD still could be defined and linking errors would appear.
2016-08-24CLOUD: Fix FolderDownloadRequestAlexander Tkachev
Actually, I'm not completely sure, but this fixed the segfault when user closes ScummVM during the download. Even if that's not a fix, these lines must be in this method anyway.