◆ finishError()
virtual void Networking::Request::finishError |
( |
const ErrorResponse & |
error, |
|
|
RequestState |
state = FINISHED |
|
) |
| |
|
protectedvirtual |
◆ finishSuccess()
virtual void Networking::Request::finishSuccess |
( |
| ) |
|
|
protectedvirtual |
◆ handle()
virtual void Networking::Request::handle |
( |
| ) |
|
|
pure virtual |
Method, which does actual work. Depends on what this Request is doing.
Implemented in Networking::SessionRequest, Cloud::SavesSyncRequest, Cloud::GoogleDrive::GoogleDriveUploadRequest, Networking::CurlRequest, Cloud::Id::IdListDirectoryRequest, Cloud::OneDrive::OneDriveListDirectoryRequest, Cloud::Box::BoxUploadRequest, Cloud::Id::IdCreateDirectoryRequest, Networking::PostRequest, Cloud::FolderDownloadRequest, Cloud::Box::BoxListDirectoryByIdRequest, Cloud::DownloadRequest, Cloud::Dropbox::DropboxListDirectoryRequest, Cloud::Dropbox::DropboxUploadRequest, Cloud::GoogleDrive::GoogleDriveListDirectoryByIdRequest, Cloud::OneDrive::OneDriveUploadRequest, Cloud::Id::IdDownloadRequest, Cloud::Id::IdResolveIdRequest, Cloud::Id::IdStreamFileRequest, Cloud::Dropbox::DropboxCreateDirectoryRequest, Cloud::Dropbox::DropboxInfoRequest, Cloud::OneDrive::OneDriveCreateDirectoryRequest, and Networking::CurlJsonRequest.
◆ handleRetry()
virtual void Networking::Request::handleRetry |
( |
| ) |
|
|
virtual |
◆ restart()
virtual void Networking::Request::restart |
( |
| ) |
|
|
pure virtual |
Method, which is used to restart the Request.
Implemented in Networking::SessionRequest, Cloud::SavesSyncRequest, Cloud::GoogleDrive::GoogleDriveUploadRequest, Networking::CurlRequest, Cloud::Id::IdListDirectoryRequest, Cloud::OneDrive::OneDriveListDirectoryRequest, Cloud::Box::BoxUploadRequest, Cloud::Id::IdCreateDirectoryRequest, Networking::PostRequest, Cloud::FolderDownloadRequest, Cloud::Box::BoxListDirectoryByIdRequest, Cloud::DownloadRequest, Cloud::Dropbox::DropboxListDirectoryRequest, Cloud::Dropbox::DropboxUploadRequest, Cloud::GoogleDrive::GoogleDriveListDirectoryByIdRequest, Cloud::OneDrive::OneDriveUploadRequest, Cloud::Id::IdDownloadRequest, Cloud::Id::IdResolveIdRequest, Cloud::Id::IdStreamFileRequest, Cloud::Dropbox::DropboxCreateDirectoryRequest, Cloud::Dropbox::DropboxInfoRequest, Cloud::OneDrive::OneDriveCreateDirectoryRequest, and Networking::CurlJsonRequest.
◆ pause()
virtual void Networking::Request::pause |
( |
| ) |
|
|
virtual |
Method, which is called to pause the Request.
◆ finish()
virtual void Networking::Request::finish |
( |
| ) |
|
|
virtual |
Method, which is called to interrupt the Request. When it's called, Request must stop its work and call the failure callback to notify user.
◆ retry()
virtual void Networking::Request::retry |
( |
uint32 |
seconds | ) |
|
|
virtual |
Method, which is called to retry the Request.
◆ state()
RequestState Networking::Request::state |
( |
| ) |
const |
◆ date()
Return date this Request received from server. It could be extracted from "Date" header, which is kept in NetworkReadStream.
- Note
- not all Requests do that, so "" is returned to indicate the date is unknown. That's also true if no server response available or no "Date" header was passed.
- Returns
- date from "Date" response header.
Reimplemented in Networking::CurlRequest, Cloud::Id::IdListDirectoryRequest, Cloud::OneDrive::OneDriveListDirectoryRequest, Cloud::Id::IdCreateDirectoryRequest, Networking::PostRequest, Cloud::Box::BoxListDirectoryByIdRequest, Cloud::Dropbox::DropboxListDirectoryRequest, Cloud::GoogleDrive::GoogleDriveListDirectoryByIdRequest, Cloud::Dropbox::DropboxCreateDirectoryRequest, and Cloud::OneDrive::OneDriveCreateDirectoryRequest.
◆ _callback
Callback, which should be called when Request is finished. That's the way Requests pass the result to the code which asked to create this request.
- Note
- some Requests use their own callbacks to return something but void *.
-
callback must be called in finish() or similar method.
◆ _errorCallback
Callback, which should be called when Request is failed/interrupted. That's the way Requests pass error information to the code which asked to create this request.
- Note
- callback must be called in finish() or similar method.
◆ _state
RequestState Networking::Request::_state |
|
protected |
Request state, which is used by ConnectionManager to determine whether request might be deleted or it's still working.
State might be changed from outside with finish(), pause() or retry() methods. Override these if you want to react to these changes correctly.
◆ _retryInSeconds
uint32 Networking::Request::_retryInSeconds |
|
protected |
In RETRY state this indicates whether it's time to call restart().
The documentation for this class was generated from the following file: