diff options
author | Alexander Tkachev | 2016-05-18 15:21:09 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 0a947618fb1faa023df03d355e9749905424dd58 (patch) | |
tree | db663626a23c333da1f9279cd6f92e8ce9c6e610 /backends/networking/curl/curljsonrequest.cpp | |
parent | e743a65636a674def45e955cb7a5632aead2a033 (diff) | |
download | scummvm-rg350-0a947618fb1faa023df03d355e9749905424dd58.tar.gz scummvm-rg350-0a947618fb1faa023df03d355e9749905424dd58.tar.bz2 scummvm-rg350-0a947618fb1faa023df03d355e9749905424dd58.zip |
CLOUD: Make ConnectionManager singleton
With ConnectionManager singleton one can start their Requests without
creating Storage instance. Moreover, Storage instance should contain
cloud API, not Requests-related handling and timer starting methods.
Thus, these methods were moved into ConnectionManager itself.
Diffstat (limited to 'backends/networking/curl/curljsonrequest.cpp')
-rw-r--r-- | backends/networking/curl/curljsonrequest.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/backends/networking/curl/curljsonrequest.cpp b/backends/networking/curl/curljsonrequest.cpp index 0c6363467a..59bc830692 100644 --- a/backends/networking/curl/curljsonrequest.cpp +++ b/backends/networking/curl/curljsonrequest.cpp @@ -23,6 +23,7 @@ #define FORBIDDEN_SYMBOL_ALLOW_ALL #include "backends/networking/curl/curljsonrequest.h" +#include "backends/networking/curl/connectionmanager.h" #include "backends/networking/curl/networkreadstream.h" #include "common/debug.h" #include "common/json.h" @@ -56,8 +57,8 @@ char *CurlJsonRequest::getPreparedContents() { return (char *)result; } -bool CurlJsonRequest::handle(ConnectionManager &manager) { - if (!_stream) _stream = manager.makeRequest(_url, _headersList, _postFields); +bool CurlJsonRequest::handle() { + if (!_stream) _stream = new NetworkReadStream(_url, _headersList, _postFields); if (_stream) { const int kBufSize = 16*1024; |