CLOUD: Simplify OneDriveTokenRefresher
It now just extends CurlJsonRequest, not wraps one.
This commit is contained in:
parent
dcbaeb57c4
commit
6c01edc57a
3 changed files with 44 additions and 94 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue