From da3b7bd8d9f3d3828b8cea6dff60e5f43e7ad4b1 Mon Sep 17 00:00:00 2001 From: Alexander Tkachev Date: Fri, 3 Jun 2016 15:14:12 +0600 Subject: CLOUD: Add GoogleDriveStorage It has its own GoogleDriveTokenRefresher and knows how to do info(). This commit also contains JSON int -> long long int fix and CurlJsonRequest '\n' -> ' ' fix. --- common/json.cpp | 6 +++--- common/json.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'common') diff --git a/common/json.cpp b/common/json.cpp index 779f99aae0..5f63d3fe1f 100644 --- a/common/json.cpp +++ b/common/json.cpp @@ -300,7 +300,7 @@ JSONValue *JSONValue::parse(const char **data) { bool neg = **data == '-'; if (neg) (*data)++; - int integer = 0; + long long int integer = 0; double number = 0.0; bool onlyInteger = true; @@ -568,7 +568,7 @@ JSONValue::JSONValue(double numberValue) { * * @param int numberValue The number to use as the value */ -JSONValue::JSONValue(int numberValue) { +JSONValue::JSONValue(long long int numberValue) { _type = JSONType_IntegerNumber; _integerValue = numberValue; } @@ -794,7 +794,7 @@ double JSONValue::asNumber() const { * * @return int Returns the number value */ -int JSONValue::asIntegerNumber() const { +long long int JSONValue::asIntegerNumber() const { return _integerValue; } diff --git a/common/json.h b/common/json.h index 35571935ee..d9bbbdb77c 100644 --- a/common/json.h +++ b/common/json.h @@ -96,7 +96,7 @@ public: JSONValue(const String &stringValue); JSONValue(bool boolValue); JSONValue(double numberValue); - JSONValue(int numberValue); + JSONValue(long long int numberValue); JSONValue(const JSONArray &arrayValue); JSONValue(const JSONObject &objectValue); JSONValue(const JSONValue &source); @@ -113,7 +113,7 @@ public: const String &asString() const; bool asBool() const; double asNumber() const; - int asIntegerNumber() const; + long long int asIntegerNumber() const; const JSONArray &asArray() const; const JSONObject &asObject() const; @@ -138,7 +138,7 @@ private: union { bool _boolValue; double _numberValue; - int _integerValue; + long long int _integerValue; String *_stringValue; JSONArray *_arrayValue; JSONObject *_objectValue; -- cgit v1.2.3