diff options
author | Alexander Tkachev | 2016-05-16 01:05:40 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 9c22b7cc64a3bd074f7cec012bd2f29f210d4ccf (patch) | |
tree | acadc794ca373710e6e6a69d23867feb03f19c50 /backends/cloud/dropbox | |
parent | 01abba4f1dc9febbe99a4af6af19eb2afa3f618a (diff) | |
download | scummvm-rg350-9c22b7cc64a3bd074f7cec012bd2f29f210d4ccf.tar.gz scummvm-rg350-9c22b7cc64a3bd074f7cec012bd2f29f210d4ccf.tar.bz2 scummvm-rg350-9c22b7cc64a3bd074f7cec012bd2f29f210d4ccf.zip |
CLOUD: Rewrite NetworkReadStream
Now it is based on MemoryReadWriteStream, which is introduced by this
commit. This stream is using ring buffer and is dynamically increasing
its size when necessary.
Diffstat (limited to 'backends/cloud/dropbox')
-rw-r--r-- | backends/cloud/dropbox/curlrequest.cpp | 4 | ||||
-rw-r--r-- | backends/cloud/dropbox/curlrequest.h | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/backends/cloud/dropbox/curlrequest.cpp b/backends/cloud/dropbox/curlrequest.cpp index 1dfdd9e25f..ecc868cb51 100644 --- a/backends/cloud/dropbox/curlrequest.cpp +++ b/backends/cloud/dropbox/curlrequest.cpp @@ -23,7 +23,7 @@ #define FORBIDDEN_SYMBOL_ALLOW_ALL #include "backends/cloud/dropbox/curlrequest.h" -#include "backends/cloud/curl/networkreadstream.h" +#include "backends/networking/curl/networkreadstream.h" #include "common/debug.h" #include <curl/curl.h> @@ -38,7 +38,7 @@ CurlRequest::~CurlRequest() { if (_stream) delete _stream; } -bool CurlRequest::handle(ConnectionManager& manager) { +bool CurlRequest::handle(Networking::ConnectionManager &manager) { if (_firstTime) { _stream = manager.makeRequest(_url); _firstTime = false; diff --git a/backends/cloud/dropbox/curlrequest.h b/backends/cloud/dropbox/curlrequest.h index 2c8ab6b8f8..3d5d4adb72 100644 --- a/backends/cloud/dropbox/curlrequest.h +++ b/backends/cloud/dropbox/curlrequest.h @@ -25,22 +25,23 @@ #include "backends/cloud/request.h" -namespace Cloud { - +namespace Networking { class NetworkReadStream; +} +namespace Cloud { namespace Dropbox { class CurlRequest : public Cloud::Request { bool _firstTime; const char *_url; - NetworkReadStream *_stream; + Networking::NetworkReadStream *_stream; public: CurlRequest(Callback cb, const char *url); virtual ~CurlRequest(); - virtual bool handle(ConnectionManager& manager); + virtual bool handle(Networking::ConnectionManager &manager); }; } //end of namespace Dropbox |