Age | Commit message (Collapse) | Author |
|
This commit updates all usages of Network::ErrorResponse to specify at
least method name if not precise reason why operation failed.
|
|
|
|
|
|
|
|
Lots of checks to avoid JSON-related segfaults added.
|
|
|
|
I knew there were some, but I wanted to fix them once, instead of doing
it all the time.
|
|
|
|
Used in SavesSyncRequest to update Storage's last sync date.
|
|
Added ErrorResponse and ErrorCallback. Each Request now has an
ErrorCallback, which should be called instead of usual callback in case
of failure.
|
|
It contains flags to indicate whether Request was interrupted or failed,
so dependent Requests may see that list is incomplete.
|
|
It contains not just "success" flag, but also "file" struct, so the
caller can find out some information about uploaded file - like
timestamp.
|
|
|
|
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.
|
|
Type safety first.
|
|
With new ConnectionManager upgrade Requests indicate that they are
finished with RequestInfo.state. No need to use handle() return value
anymore.
|
|
Can be used with Callback<T> (means it's still type safe). It's used to
pass not only Request id to user's callback, but also a value user
wanted.
void *data field is removed from RequestInfo.
|
|
ConnectionManager upgrade: it now contains a special struct for each
request, so you can access request status and data by request id.
|
|
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.
|
|
Does multiple CurlJsonRequests while Dropbox returns "has_more" = true.
|