aboutsummaryrefslogtreecommitdiff
path: root/backends/networking/curl
AgeCommit message (Collapse)Author
2019-08-25CLOUD: Make Network::ErrorResponse messages more verboseAlexander Tkachev
This commit updates all usages of Network::ErrorResponse to specify at least method name if not precise reason why operation failed.
2019-08-25CLOUD: Handle HTTP response headers case-insensitivelyAlexander Tkachev
RFC 2616 states that HTTP headers are not case-sensitive and also allows arbitrary number of whitespace characters around header value. Previous implementation was dependant on headers to be in "Title-Case" and to have only one space before header value. That has lead to cloud sync failure on Debian x64 (user's network environment was probably the reason though). This commit adds a new method, which parses headers name-value pairs into HashMap. To ensure case-insensitivity, all headers names are converted to lowercase, and thus code that uses this method should specify headers in lowercase. All usages of raw headers contents were updated to use this method.
2019-07-30CLOUD: Handle Cloud requests more frequentlyAlexander Tkachev
ConnectionManager used to poll Cloud requests every second, while curl requests were polled every 1/20th of a second. If curl request was over at, say, frame #21, corresponding Cloud request would've only work with that at frame #40 (950 ms later), which was making everything cloud-related slower than it could be. This commit fixes it by making Cloud polling period the same as curl polling period, and additionally raises FPS to 25.
2018-12-17WIN32: Fix libcurl redefining ARRAYSIZESupSuper
libcurl pulls in Windows headers, so let's include it first to avoid clashing with common headers
2017-09-24NETWORKING: Fix mismatched curl callback declaration and definitionBastien Bouclet
2017-09-22NETWORKING: Changed NetworkReadStream not to subclass MemoryReadWriteStreamBastien Bouclet
Also fix the MemoryReadWriteStream managed buffer being leaked. Fixes #9718.
2017-07-10Revert "COMMON: Change way the Singleton instances are instantiated"Eugene Sandulenko
This reverts commit eefa72afa1978a9dea10f5b1833fcc8f58a3468e. With this patch ConfigManager is broken.
2017-07-10COMMON: Change way the Singleton instances are instantiatedThierry Crozat
This fixes tons of warnings with clang from a recent xcode version on macOS (and possibly other systems) complaining that an instantiation of _singleton is required but no definition is available.
2017-04-29CLOUD: Fix compilation with old curl vesionsThierry Crozat
2017-01-10CLOUD: Fix Two Variable Shadowing Compiler Warnings.D G Turner
2016-09-18CLOUD: Change the cloud icon to be updated by the main threadBastien Bouclet
The cloud manager registers itself as an event source as a mean to be polled periodically by the GUI or engine code. The periodical polling is used to update the OSD icon indicating background sync activity. Also move the cloud icon from ConnectionManager to CloudManager, allowing to decouple icon handling from network connections updates.
2016-09-13CLOUD: Switch to the new OSD APIBastien Bouclet
2016-09-05CLOUD: Do not error out when loading icon if OSD format is not 2 or 4 BppThierry Crozat
Graphics::TransparentSurface::convertTo() errors out when the destination format is not 2 or 4 Bpp. But in the case of the cloud icon we can recover from it. So just print a warning and don't close the application.
2016-09-03JANITORIAL: Make GPL headers uniformEugene Sandulenko
2016-08-24CLOUD: Remove unused includesPeter Bozsó
2016-08-24CLOUD: Add custom User-AgentAlexander Tkachev
Full version is used like in Eugene's Google Analytics stub. Plus, on PS3 that string contains "PlayStation", and that would be cool to know that ScummVM+libcurl+PS3 work together.
2016-08-24CLOUD: Fix RequestsAlexander Tkachev
Remove unnecessary JSON warnings, fix a few places.
2016-08-24CLOUD: Update OneDriveAlexander Tkachev
Added JSON checks. New jsonContainsObject() method added to CurlJsonRequest.
2016-08-24CLOUD: Update NetworkReadStreamAlexander Tkachev
It now uses both CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION. The latter is available in new libcurl (>= 7.32.0) only, thus the former is added for older versions support.
2016-08-24ALL: Fix debug, warning and error usageAlexander Tkachev
Added prefixes, used debug(9).
2016-08-24CLOUD: Upload ListDirectory RequestsAlexander Tkachev
Lots of checks to avoid JSON-related segfaults added.
2016-08-24CLOUD: JANITORIAL: Fix code formattingEugene Sandulenko
2016-08-24CLOUD: Update BoxListDirectoryByIdRequestAlexander Tkachev
It now uses special CurlJsonRequest static methods to check whether JSON is an object, has a string or integer parameter.
2016-08-24CLOUD: Fix code formattingPeter Bozsó
2016-08-24JANITORIAL: Remove spaces at the end of the lineAlexander Tkachev
I knew there were some, but I wanted to fix them once, instead of doing it all the time.
2016-08-24CLOUD: Do some refactoring/cleanup in NetworkingAlexander Tkachev
2016-08-24GUI: Update DownloadDialogAlexander Tkachev
It now has download size and speed labels. Commit also fixes minor mistake in ConnMan.
2016-08-24CLOUD: Calculate FolderDownload download speedAlexander Tkachev
2016-08-24CLOUD: Upgrade FolderDownloadRequest::getProgress()Alexander Tkachev
Now NetworkReadStream, which is used in DownloadRequest, which is used in FolderDownloadRequest, returns progress information provided by libcurl.
2016-08-24CLOUD: Update CurlJsonRequestAlexander Tkachev
Uses dynamically allocated buffer now.
2016-08-24CLOUD: Update NetworkReadStream and CurlRequestAlexander Tkachev
Now those support POST multipart/form upload.
2016-08-24CLOUD: Fix finishSuccess() warningAlexander Tkachev
2016-08-24CLOUD: Fix crash on exiting ScummVM while ConnMan is activePeter Bozsó
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: Embed cloud icons as byte arraysAlexander Tkachev
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.