aboutsummaryrefslogtreecommitdiff
path: root/backends/cloud/downloadrequest.h
AgeCommit message (Collapse)Author
2016-09-03JANITORIAL: Make GPL headers uniformEugene Sandulenko
2016-08-24JANITORIAL: Remove spaces at the end of the lineAlexander Tkachev
I knew there were some, but I wanted to fix them once, instead of doing it all the time.
2016-08-24CLOUD: Upgrade FolderDownloadRequest::getProgress()Alexander Tkachev
Now NetworkReadStream, which is used in DownloadRequest, which is used in FolderDownloadRequest, returns progress information provided by libcurl.
2016-08-24CLOUD: Update DownloadRequestAlexander Tkachev
It now uses a dynamically allocated 1 MB buffer.
2016-08-24CLOUD: Fix finishSuccess() warningAlexander Tkachev
2016-08-24CLOUD: Delete the incomplete file (when downloading)Alexander Tkachev
2016-08-24CLOUD: Update downloading in StoragesAlexander Tkachev
Id should be used everywhere.
2016-08-24CLOUD: Refactor RequestAlexander Tkachev
Added ErrorResponse and ErrorCallback. Each Request now has an ErrorCallback, which should be called instead of usual callback in case of failure.
2016-08-24Fix comment formattingPeter Bozsó
2016-08-24CLOUD: Fix Requests destructorsAlexander Tkachev
I forgot to delete callbacks!
2016-08-24CLOUD: Refactor ConnectionManager/Requests systemAlexander Tkachev
ConnectionManager now storages Request * (not generates ids for it), Requests have control on their RequestState, RequestIdPair is now called Response and storages Request * with some response together. All related classes are changed to use it in more clean and understandable way. Request, RequestState and Response are carefully commented/documented.
2016-08-24CLOUD: Make OneDriveStorage::download() work fineAlexander Tkachev
Well, it takes two API calls instead of one now, but there are no problems with expired token because of it. This commit changes Storage::streamFile() to pass NetworkReadStream * through callback.
2016-08-24CLOUD: Change Request::handle()Alexander Tkachev
With new ConnectionManager upgrade Requests indicate that they are finished with RequestInfo.state. No need to use handle() return value anymore.
2016-08-24CLOUD: Add RequestInfo structAlexander Tkachev
ConnectionManager upgrade: it now contains a special struct for each request, so you can access request status and data by request id.
2016-08-24CLOUD: Make DownloadRequest write to local fileAlexander Tkachev
Tested with .jpg file. Transfer complete, CRC-32 is the same.
2016-08-24CLOUD: Add DownloadRequest stubAlexander Tkachev
It reads the passed NetworkReadStream and prints its contents onto console (for now). It would be writing contents into file. To simplify work with raw NetworkReadStream there is a new CurlRequest. It basically does nothing, but as ConnMan handles transfers only if there is an active Request, you need some Request to get NetworkReadStream working. Thus, there is a CurlRequest, which is active until NetworkReadStream is completely read. CurlRequest also has useful addHeader() and addPostField() methods in order to customize the request easily. Use execute() method to get its NetworkReadStream. DropboxStorage implements streamFile() and download() API methods. As DownloadRequest is incomplete, it is not actually downloading a file, though.