CLOUD: Add OneDriveTokenRefresher

OneDriveTokenRefresher is a CurlJsonRequest replacement for
OneDriveStorage methods. It behaves very similarly, but checks received
JSON before passing it to user. If it contains "error" key, it attempts
to refresh the token through OneDriveStorage, and then restarts the
original request, so user won't notice that there ever was an error.
This commit is contained in:
Alexander Tkachev 2016-05-26 21:40:01 +06:00
parent b246c17850
commit 8f6bcdf55d
10 changed files with 222 additions and 26 deletions

View file

@ -45,7 +45,8 @@ public:
CurlJsonRequest(JsonCallback cb, const char *url);
virtual ~CurlJsonRequest();
virtual void handle();
virtual void handle();
virtual void restart();
};
} //end of namespace Networking