From 438ba985a4a97a8695a6e6fdda6930694976c07b Mon Sep 17 00:00:00 2001 From: Alexander Tkachev Date: Thu, 21 Jul 2016 11:44:36 +0600 Subject: JANITORIAL: Remove spaces at the end of the line I knew there were some, but I wanted to fix them once, instead of doing it all the time. --- backends/cloud/box/boxlistdirectorybyidrequest.cpp | 6 +++--- backends/cloud/box/boxlistdirectorybyidrequest.h | 4 ++-- backends/cloud/box/boxstorage.cpp | 6 +++--- backends/cloud/box/boxstorage.h | 4 ++-- backends/cloud/box/boxtokenrefresher.cpp | 10 +++++----- backends/cloud/box/boxtokenrefresher.h | 6 +++--- backends/cloud/box/boxuploadrequest.cpp | 8 ++++---- backends/cloud/box/boxuploadrequest.h | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) (limited to 'backends/cloud/box') diff --git a/backends/cloud/box/boxlistdirectorybyidrequest.cpp b/backends/cloud/box/boxlistdirectorybyidrequest.cpp index d4606b1851..537666bc52 100644 --- a/backends/cloud/box/boxlistdirectorybyidrequest.cpp +++ b/backends/cloud/box/boxlistdirectorybyidrequest.cpp @@ -87,7 +87,7 @@ void BoxListDirectoryByIdRequest::responseCallback(Networking::JsonResponse resp Common::JSONObject responseObject = json->asObject(); //debug("%s", json->stringify(true).c_str()); - + //TODO: check that error is returned the right way /* if (responseObject.contains("error") || responseObject.contains("error_summary")) { @@ -100,7 +100,7 @@ void BoxListDirectoryByIdRequest::responseCallback(Networking::JsonResponse resp } */ - //TODO: check that ALL keys exist AND HAVE RIGHT TYPE to avoid segfaults + //TODO: check that ALL keys exist AND HAVE RIGHT TYPE to avoid segfaults if (responseObject.contains("entries") && responseObject.getVal("entries")->isArray()) { Common::JSONArray items = responseObject.getVal("entries")->asArray(); @@ -160,7 +160,7 @@ void BoxListDirectoryByIdRequest::restart() { start(); } Common::String BoxListDirectoryByIdRequest::date() const { return _date; } -void BoxListDirectoryByIdRequest::finishListing(Common::Array &files) { +void BoxListDirectoryByIdRequest::finishListing(Common::Array &files) { Request::finishSuccess(); if (_listDirectoryCallback) (*_listDirectoryCallback)(Storage::ListDirectoryResponse(this, files)); } diff --git a/backends/cloud/box/boxlistdirectorybyidrequest.h b/backends/cloud/box/boxlistdirectorybyidrequest.h index ccf8d2e342..13f1ba056c 100644 --- a/backends/cloud/box/boxlistdirectorybyidrequest.h +++ b/backends/cloud/box/boxlistdirectorybyidrequest.h @@ -34,7 +34,7 @@ namespace Box { class BoxStorage; class BoxListDirectoryByIdRequest: public Networking::Request { - Common::String _requestedId; + Common::String _requestedId; BoxStorage *_storage; Storage::ListDirectoryCallback _listDirectoryCallback; @@ -42,7 +42,7 @@ class BoxListDirectoryByIdRequest: public Networking::Request { Request *_workingRequest; bool _ignoreCallback; Common::String _date; - + void start(); void makeRequest(uint32 offset); void responseCallback(Networking::JsonResponse response); diff --git a/backends/cloud/box/boxstorage.cpp b/backends/cloud/box/boxstorage.cpp index c31c72b49f..6d4b5efd8e 100644 --- a/backends/cloud/box/boxstorage.cpp +++ b/backends/cloud/box/boxstorage.cpp @@ -152,7 +152,7 @@ void BoxStorage::infoInnerCallback(StorageInfoCallback outerCallback, Networking delete outerCallback; return; } - + Common::JSONObject info = json->asObject(); Common::String uid, name, email; @@ -224,7 +224,7 @@ Networking::Request *BoxStorage::createDirectoryWithParentId(Common::String pare Common::JSONObject parentObject; parentObject.setVal("id", new Common::JSONValue(parentId)); - Common::JSONObject jsonRequestParameters; + Common::JSONObject jsonRequestParameters; jsonRequestParameters.setVal("name", new Common::JSONValue(name)); jsonRequestParameters.setVal("parent", new Common::JSONValue(parentObject)); @@ -248,7 +248,7 @@ Networking::Request *BoxStorage::upload(Common::String path, Common::SeekableRea } bool BoxStorage::uploadStreamSupported() { - return false; + return false; } Networking::Request *BoxStorage::streamFileById(Common::String id, Networking::NetworkReadStreamCallback callback, Networking::ErrorCallback errorCallback) { diff --git a/backends/cloud/box/boxstorage.h b/backends/cloud/box/boxstorage.h index 1373c2fbeb..89bc470a26 100644 --- a/backends/cloud/box/boxstorage.h +++ b/backends/cloud/box/boxstorage.h @@ -48,7 +48,7 @@ class BoxStorage: public Id::IdStorage { void infoInnerCallback(StorageInfoCallback outerCallback, Networking::JsonResponse json); void createDirectoryInnerCallback(BoolCallback outerCallback, Networking::JsonResponse response); -public: +public: /** This constructor uses OAuth code flow to get tokens. */ BoxStorage(Common::String code); virtual ~BoxStorage(); @@ -97,7 +97,7 @@ public: virtual Common::String savesDirectoryPath(); /** - * Load token and user id from configs and return BoxStorage for those. + * Load token and user id from configs and return BoxStorage for those. * @return pointer to the newly created BoxStorage or 0 if some problem occured. */ static BoxStorage *loadFromConfig(Common::String keyPrefix); diff --git a/backends/cloud/box/boxtokenrefresher.cpp b/backends/cloud/box/boxtokenrefresher.cpp index f100e186be..65964f3010 100644 --- a/backends/cloud/box/boxtokenrefresher.cpp +++ b/backends/cloud/box/boxtokenrefresher.cpp @@ -52,7 +52,7 @@ void BoxTokenRefresher::tokenRefreshed(Storage::BoolResponse response) { } setHeaders(_headers); - //successfully received refreshed token, can restart the original request now + //successfully received refreshed token, can restart the original request now retry(0); } @@ -77,7 +77,7 @@ void BoxTokenRefresher::finishJson(Common::JSONValue *json) { Common::String code, message; if (result.contains("code")) { code = result.getVal("code")->asString(); - debug(9, "code = %s", code.c_str()); + debug(9, "code = %s", code.c_str()); } if (result.contains("message")) { @@ -88,13 +88,13 @@ void BoxTokenRefresher::finishJson(Common::JSONValue *json) { //TODO: decide when token refreshment will help //if (code == "unauthenticated") irrecoverable = false; - if (irrecoverable) { + if (irrecoverable) { finishError(Networking::ErrorResponse(this, false, true, json->stringify(true), httpCode)); delete json; return; } - pause(); + pause(); delete json; _parentStorage->getAccessToken(new Common::Callback(this, &BoxTokenRefresher::tokenRefreshed)); return; @@ -117,7 +117,7 @@ void BoxTokenRefresher::finishError(Networking::ErrorResponse error) { Request::finishError(error); } -void BoxTokenRefresher::setHeaders(Common::Array &headers) { +void BoxTokenRefresher::setHeaders(Common::Array &headers) { _headers = headers; curl_slist_free_all(_headersList); _headersList = 0; diff --git a/backends/cloud/box/boxtokenrefresher.h b/backends/cloud/box/boxtokenrefresher.h index 7dedefdbe5..c08e8468c3 100644 --- a/backends/cloud/box/boxtokenrefresher.h +++ b/backends/cloud/box/boxtokenrefresher.h @@ -33,13 +33,13 @@ class BoxStorage; class BoxTokenRefresher: public Networking::CurlJsonRequest { BoxStorage *_parentStorage; - Common::Array _headers; - + Common::Array _headers; + void tokenRefreshed(Storage::BoolResponse response); virtual void finishJson(Common::JSONValue *json); virtual void finishError(Networking::ErrorResponse error); -public: +public: BoxTokenRefresher(BoxStorage *parent, Networking::JsonCallback callback, Networking::ErrorCallback ecb, const char *url); virtual ~BoxTokenRefresher(); diff --git a/backends/cloud/box/boxuploadrequest.cpp b/backends/cloud/box/boxuploadrequest.cpp index c81a3ab439..d1f68f1d24 100644 --- a/backends/cloud/box/boxuploadrequest.cpp +++ b/backends/cloud/box/boxuploadrequest.cpp @@ -123,12 +123,12 @@ void BoxUploadRequest::upload() { _workingRequest = ConnMan.addRequest(request); } -void BoxUploadRequest::uploadedCallback(Networking::JsonResponse response) { +void BoxUploadRequest::uploadedCallback(Networking::JsonResponse response) { _workingRequest = nullptr; if (_ignoreCallback) return; - + Networking::ErrorResponse error(this, false, true, "", -1); - Networking::CurlJsonRequest *rq = (Networking::CurlJsonRequest *)response.request; + Networking::CurlJsonRequest *rq = (Networking::CurlJsonRequest *)response.request; if (rq) { const Networking::NetworkReadStream *stream = rq->getNetworkReadStream(); if (stream) { @@ -193,7 +193,7 @@ void BoxUploadRequest::uploadedCallback(Networking::JsonResponse response) { delete json; } -void BoxUploadRequest::notUploadedCallback(Networking::ErrorResponse error) { +void BoxUploadRequest::notUploadedCallback(Networking::ErrorResponse error) { _workingRequest = nullptr; if (_ignoreCallback) return; finishError(error); diff --git a/backends/cloud/box/boxuploadrequest.h b/backends/cloud/box/boxuploadrequest.h index 3d15aa70b3..1bc8690210 100644 --- a/backends/cloud/box/boxuploadrequest.h +++ b/backends/cloud/box/boxuploadrequest.h @@ -39,7 +39,7 @@ class BoxUploadRequest: public Networking::Request { Request *_workingRequest; bool _ignoreCallback; Common::String _resolvedId, _parentId; - + void start(); void resolveId(); void idResolvedCallback(Storage::UploadResponse response); -- cgit v1.2.3