CLOUD: Simplify OneDriveTokenRefresher

It now just extends CurlJsonRequest, not wraps one.
This commit is contained in:
Alexander Tkachev 2016-05-27 19:32:35 +06:00
parent dcbaeb57c4
commit 6c01edc57a
3 changed files with 44 additions and 94 deletions

View file

@ -33,13 +33,13 @@ typedef Response<Common::JSONValue *> JsonResponse;
typedef Common::BaseCallback<JsonResponse> *JsonCallback;
class CurlJsonRequest: public CurlRequest {
protected:
JsonCallback _jsonCallback;
Common::MemoryWriteStreamDynamic _contentsStream;
/** Prepares raw bytes from _contentsStream to be parsed with Common::JSON::parse(). */
char *getPreparedContents();
protected:
/** Sets FINISHED state and passes the JSONValue * into user's callback in JsonResponse. */
virtual void finishJson(Common::JSONValue *json);