aboutsummaryrefslogtreecommitdiff
path: root/backends/networking
AgeCommit message (Collapse)Author
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: Fix finishSuccess() warningAlexander Tkachev
2016-08-24CLOUD: Fix some warningsAlexander Tkachev
Mostly on format string
2016-08-24CLOUD: Fix crash on exiting ScummVM while ConnMan is activePeter Bozsó
2016-08-24CLOUD: Update local server's style.cssAlexander Tkachev
2016-08-24CLOUD: Fix "-Wcast-qual"Alexander Tkachev
The passed buffer is not changed, so could be `const`. You might see that `postFields.c_str()` is `buffer`. Yet, as it's `postFields`, it's used for POST in curl_easy_setopt(), which copies the passed buffer. When `buffer` is used for upload, it's an actual bytes buffer, kept in CurlRequest.
2016-08-24CLOUD: Fix "-Wconversion-null"Alexander Tkachev
That `false` came from TranslationManager's function, which was returning bool, not a pointer. Somehow missed that line.
2016-08-24CLOUD: Fix "type qualifiers ignored" warningAlexander Tkachev
2016-08-24CLOUD: Add some mutexes in LocalWebserverAlexander Tkachev
2016-08-24CLOUD: Embed cloud icons as byte arraysAlexander Tkachev
2016-08-24CLOUD: Update IndexPageHandler to search wwwroot.zipAlexander Tkachev
Now it also searches for that in themepath, not with SearchMan only.
2016-08-24GUI: Hide StorageWizardDialog fields if server presentAlexander Tkachev
2016-08-24CLOUD: Add wwwrootAlexander Tkachev
wwwroot.zip contains ScummVM local webserver's resources, such as template html pages, styles and images. One can make it from wwwroot directory contents by running make_archive.py script. It's added to scummvm.rc, so it's included in the executable (it works with MinGW, but I was unable to do that in VS yet). IndexPageHandler is the one who returns these resources. It uses index.html for "/". I'm replacing "{message}" with translated message, so that's the way I thought the templates should work.
2016-08-24CLOUD: Update LocalWebserverAlexander Tkachev
* fix handling connections; * fix idling strategy; * add setClientGetHandler() for SeekableReadStream; * add determineMimeType().
2016-08-24CLOUD: Fix ClientAlexander Tkachev
Cleanup in open()
2016-08-24CLOUD: Add IndexPageHandlerAlexander Tkachev
This commit also adds LocalWebserver's stopOnIdle(). That means server is not stopped immediately, but only when all clients are served.
2016-08-24CLOUD: Minor Client fixAlexander Tkachev
2016-08-24CLOUD: Prepare code for path handlersAlexander Tkachev
LocalWebserver would storage the handlers. Client now has methods like path() or query() to access different parts of the request.
2016-08-24CLOUD: Add HTTP response codes in GetClientHandlerAlexander Tkachev
2016-08-24CLOUD: Minor Client fixAlexander Tkachev
2016-08-24CLOUD: Add GetClientHandlerAlexander Tkachev
That ClientHandler is made for responding GET requests. It calculates stream's length, it allows to specify response code and headers, it can be used to transfer any ReadStream.
2016-08-24CLOUD: Add ClientState::BAD_REQUESTAlexander Tkachev
2016-08-24CLOUD: Add Networking::ClientAlexander Tkachev
Keeps current client's state
2016-08-24CLOUD: Add LocalWebserverAlexander Tkachev
Available as LocalServer singleton. It's being started and stopped by StorageWizardDialog. It doesn't handle clients yet, though.
2016-08-24CLOUD: Fix initialization of NetworkReadStreamPeter Bozsó
"networkreadstream.cpp:51:2: error: delegating constructors are permitted only in C++11"
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-24CLOUD: Add GoogleDriveUploadRequestAlexander Tkachev
Includes NetworkReadStream PATCH method and Headers remembering feature.
2016-08-24CLOUD: Fix ConnectionManagerAlexander Tkachev
It now keeps newly added Requests in separate array, so iterators don't break when one adds a Request while ConnMan iterates its array. The array is also shielded with mutex.
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: Add new CloudManager shortcutsAlexander Tkachev
CloudIcon can easily use CloudMan.isWorking()
2016-08-24CLOUD: Add new cloudicon.pngAlexander Tkachev
2016-08-24CLOUD: Document CloudIcon::draw() more preciselyAlexander Tkachev
2016-08-24CLOUD: Fix CloudIconAlexander Tkachev
It's not a Request again, but still it controls ConnMan's timer.
2016-08-24CLOUD: Make CloudIcon switch ConnMan's timer offAlexander Tkachev
CloudIcon is now a Request which is automatically added once first Request is added to ConnMan. When icon decides it should disappear, it gets FINISHED, so ConnMan would switch off the timer if it was the last Request.
2016-08-24CLOUD: Make CloudIcon pulsate, fade in and fade outAlexander Tkachev
That required ConnMan's timer stopping. Would be fixed in the next commit.
2016-08-24CLOUD: Fix CloudIconAlexander Tkachev
Now it loads the surface once.
2016-08-24CLOUD: Fix ConnectionManager a littleAlexander Tkachev
I didn't like how FINISHED Requests were waiting until the next interateRequests() call to be removed when we could easily remove those after they changed their state in their handle().
2016-08-24CLOUD: Fix CloudIcon to use clearOSD()Alexander Tkachev
Now only icon is shown.
2016-08-24CLOUD: Add CloudIconAlexander Tkachev
To achieve smoother animation, ConnectionManager's timer now is 20 times more frequent. I'm encountering some strange libcurl.dll segfault problem when I close the application while some Requests are active. It's not CloudIcon-related, so it's more likely related to this 20 FPS timer. This problem shows up only in Visual Studio for me.
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: Document ConnectionManager's onDeleteCallbackAlexander Tkachev
2016-08-24CLOUD: Fix ConnectionManager's destructorAlexander Tkachev
It now terminates active Requests.
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: Add OneDriveUploadRequestAlexander Tkachev
Doesn't support server's requested ranges yet. Commit also adds some PUT-related code in NetworkReadStream and CurlRequest.
2016-08-24CLOUD: Refactor RequestAlexander Tkachev
Added ErrorResponse and ErrorCallback. Each Request now has an ErrorCallback, which should be called instead of usual callback in case of failure.
2016-08-24CLOUD: Add DropboxUploadRequestAlexander Tkachev