diff options
author | Alexander Tkachev | 2016-05-18 14:08:05 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | e743a65636a674def45e955cb7a5632aead2a033 (patch) | |
tree | df7e6a3d3ea4e612e9810693349bffadbbc2c399 /backends/networking/curl/curljsonrequest.h | |
parent | 5df8c5140292520bafe92efa94935a776d63d108 (diff) | |
download | scummvm-rg350-e743a65636a674def45e955cb7a5632aead2a033.tar.gz scummvm-rg350-e743a65636a674def45e955cb7a5632aead2a033.tar.bz2 scummvm-rg350-e743a65636a674def45e955cb7a5632aead2a033.zip |
CLOUD: Add Dropbox into CloudManager's configs
This commit adds:
* ConfMan's new "cloud" domain;
* CloudManager's init() method, where it loads keys from "cloud" configs
domain;
* CurlJsonRequest's addHeader() and addPostField() methods;
* temporary Storage's printInfo() method;
* DropboxStorage's implementation of printInfo(), which is using access
token and user id;
* DropboxStorage's loadFromConfig() static method to load access token
and user id from configs and create a Storage instance with those;
* temporary DropboxStorage's authThroughConsole() static method, which
guides user through auth process from the console.
So, in CloudManager's init() implementation ScummVM checks that there is
"current_storage_type" key in "cloud" domain of configs, and loads
corresponding storage if there is such key.
If there is no such key, ScummVM offers user to auth with Dropbox.
That's done through console, and thus it's temporary (it also requires
restarting ScummVM twice and manually editing config.ini file).
Diffstat (limited to 'backends/networking/curl/curljsonrequest.h')
-rw-r--r-- | backends/networking/curl/curljsonrequest.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/backends/networking/curl/curljsonrequest.h b/backends/networking/curl/curljsonrequest.h index e9634393dc..17df9693f2 100644 --- a/backends/networking/curl/curljsonrequest.h +++ b/backends/networking/curl/curljsonrequest.h @@ -26,6 +26,8 @@ #include "backends/cloud/request.h" #include "common/memstream.h" +struct curl_slist; + namespace Networking { class NetworkReadStream; @@ -33,6 +35,8 @@ class NetworkReadStream; class CurlJsonRequest : public Cloud::Request { const char *_url; NetworkReadStream *_stream; + curl_slist *_headersList; + Common::String _postFields; Common::MemoryWriteStreamDynamic _contentsStream; /** Prepares raw bytes from _contentsStream to be parsed with Common::JSON::parse(). */ @@ -43,6 +47,10 @@ public: virtual ~CurlJsonRequest(); virtual bool handle(ConnectionManager &manager); + + void addHeader(Common::String header); + + void addPostField(Common::String header); }; } //end of namespace Networking |