diff options
| author | Alexander Tkachev | 2016-07-20 18:47:34 +0600 |
|---|---|---|
| committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
| commit | b180c73675846f45abab2190b39e0b9d0d6addbf (patch) | |
| tree | 3bdd7dc9f23406220022e8b9261ae748362b4de1 /backends/cloud/box | |
| parent | a449ddce15c512e809b9aedad334db6b52628e61 (diff) | |
| download | scummvm-rg350-b180c73675846f45abab2190b39e0b9d0d6addbf.tar.gz scummvm-rg350-b180c73675846f45abab2190b39e0b9d0d6addbf.tar.bz2 scummvm-rg350-b180c73675846f45abab2190b39e0b9d0d6addbf.zip | |
CLOUD: Do some refactoring/cleanup
Nothing really major.
Diffstat (limited to 'backends/cloud/box')
| -rw-r--r-- | backends/cloud/box/boxstorage.cpp | 4 | ||||
| -rw-r--r-- | backends/cloud/box/boxstorage.h | 2 | ||||
| -rw-r--r-- | backends/cloud/box/boxtokenrefresher.cpp | 6 | ||||
| -rw-r--r-- | backends/cloud/box/boxuploadrequest.cpp | 1 |
4 files changed, 6 insertions, 7 deletions
diff --git a/backends/cloud/box/boxstorage.cpp b/backends/cloud/box/boxstorage.cpp index 8162af299c..c31c72b49f 100644 --- a/backends/cloud/box/boxstorage.cpp +++ b/backends/cloud/box/boxstorage.cpp @@ -278,12 +278,12 @@ BoxStorage *BoxStorage::loadFromConfig(Common::String keyPrefix) { if (!ConfMan.hasKey(keyPrefix + "access_token", ConfMan.kCloudDomain)) { warning("No access_token found"); - return 0; + return nullptr; } if (!ConfMan.hasKey(keyPrefix + "refresh_token", ConfMan.kCloudDomain)) { warning("No refresh_token found"); - return 0; + return nullptr; } Common::String accessToken = ConfMan.get(keyPrefix + "access_token", ConfMan.kCloudDomain); diff --git a/backends/cloud/box/boxstorage.h b/backends/cloud/box/boxstorage.h index 826d6bef4e..1373c2fbeb 100644 --- a/backends/cloud/box/boxstorage.h +++ b/backends/cloud/box/boxstorage.h @@ -111,7 +111,7 @@ public: */ void getAccessToken(BoolCallback callback, Networking::ErrorCallback errorCallback = nullptr, Common::String code = ""); - Common::String accessToken() { return _token; } + Common::String accessToken() const { return _token; } }; } // End of namespace Box diff --git a/backends/cloud/box/boxtokenrefresher.cpp b/backends/cloud/box/boxtokenrefresher.cpp index 9dfbef537f..f100e186be 100644 --- a/backends/cloud/box/boxtokenrefresher.cpp +++ b/backends/cloud/box/boxtokenrefresher.cpp @@ -69,7 +69,7 @@ void BoxTokenRefresher::finishJson(Common::JSONValue *json) { long httpCode = -1; if (_stream) { httpCode = _stream->httpResponseCode(); - debug("code %ld", httpCode); + debug(9, "code %ld", httpCode); } bool irrecoverable = true; @@ -77,12 +77,12 @@ void BoxTokenRefresher::finishJson(Common::JSONValue *json) { Common::String code, message; if (result.contains("code")) { code = result.getVal("code")->asString(); - debug("code = %s", code.c_str()); + debug(9, "code = %s", code.c_str()); } if (result.contains("message")) { message = result.getVal("message")->asString(); - debug("message = %s", message.c_str()); + debug(9, "message = %s", message.c_str()); } //TODO: decide when token refreshment will help diff --git a/backends/cloud/box/boxuploadrequest.cpp b/backends/cloud/box/boxuploadrequest.cpp index c94494efac..c81a3ab439 100644 --- a/backends/cloud/box/boxuploadrequest.cpp +++ b/backends/cloud/box/boxuploadrequest.cpp @@ -29,7 +29,6 @@ #include "backends/networking/curl/curljsonrequest.h" #include "backends/networking/curl/networkreadstream.h" #include "common/json.h" -#include "common/debug.h" namespace Cloud { namespace Box { |
