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.
This commit is contained in:
Alexander Tkachev 2016-06-03 15:14:12 +06:00
parent b02b16ab98
commit da3b7bd8d9
10 changed files with 660 additions and 14 deletions

View file

@ -44,9 +44,11 @@ char *CurlJsonRequest::getPreparedContents() {
//replace all "bad" bytes with '.' character
byte *result = _contentsStream.getData();
uint32 size = _contentsStream.size();
for (uint32 i = 0; i < size; ++i)
if (result[i] < 0x20 || result[i] > 0x7f)
for (uint32 i = 0; i < size; ++i) {
if (result[i] == '\n') result[i] = ' '; //yeah, kinda stupid
else if (result[i] < 0x20 || result[i] > 0x7f)
result[i] = '.';
}
//make it zero-terminated string
result[size - 1] = '\0';