|
mcloud
1.0.0
MCloud API library for cmcc cloud service
|
DownloadTask is a task item that can be accessed from application layer to fetch basic download item information, also it's used for content download by sync manager. More...
#include <downloadtask.h>
Inheritance diagram for mcloud::api::DownloadTask:
Collaboration diagram for mcloud::api::DownloadTask:Public Types | |
| typedef std::shared_ptr< DownloadTask > | Ptr |
Public Types inherited from mcloud::api::Task | |
| enum | Status { Status::Unstart, Status::Running, Status::Canceled, Status::Paused, Status::Broken, Status::Complete } |
| The Status enum indicates current status of this task. More... | |
| typedef std::function< void(float)> | ProgressHandler |
| typedef std::function< void(Status)> | StatusHandler |
| typedef std::function< size_t(void *dest, size_t buf_size)> | Buffer_Callback |
Public Member Functions | |
| virtual | ~DownloadTask ()=default |
| DownloadTask (const DownloadTask &)=delete | |
| DownloadTask & | operator= (const DownloadTask &)=delete |
| const std::string & | task_id () const override |
| const std::string & | content_id () const override |
| Returns an unique id of cloud content on mcloud. More... | |
| const std::string & | content_name () const override |
| Returns a display name of cloud content on mcloud. More... | |
| const std::string & | file_path () const override |
| Returns cloud content local storage file path. More... | |
| const std::string & | task_url () const override |
| Returns download url assigned by mcloud for this task. More... | |
| const std::string & | error_string () const override |
| Contains the error string if an error occurs during content download. More... | |
| Task::Status | status () const override |
| Returns current sync-up status for this task. More... | |
| Task::ProgressHandler & | progress_changed () override |
| Handler for download progress of a task. More... | |
| Task::StatusHandler & | status_changed () override |
| Handler for download status of a task. More... | |
| void | cancel () override |
| cancel the task. More... | |
Public Member Functions inherited from mcloud::api::Task | |
| virtual | ~Task ()=default |
Friends | |
| class | SyncManagerPriv |
DownloadTask is a task item that can be accessed from application layer to fetch basic download item information, also it's used for content download by sync manager.
Definition at line 50 of file downloadtask.h.
| typedef std::shared_ptr<DownloadTask> mcloud::api::DownloadTask::Ptr |
Definition at line 52 of file downloadtask.h.
|
virtualdefault |
|
delete |
|
overridevirtual |
|
overridevirtual |
Returns an unique id of cloud content on mcloud.
Implements mcloud::api::Task.
|
overridevirtual |
Returns a display name of cloud content on mcloud.
Implements mcloud::api::Task.
|
overridevirtual |
Contains the error string if an error occurs during content download.
Implements mcloud::api::Task.
|
overridevirtual |
Returns cloud content local storage file path.
Implements mcloud::api::Task.
|
delete |
|
overridevirtual |
Handler for download progress of a task.
Implements mcloud::api::Task.
|
overridevirtual |
Returns current sync-up status for this task.
Implements mcloud::api::Task.
|
overridevirtual |
|
overridevirtual |
Returns an unique id of download task.
Implements mcloud::api::Task.
|
overridevirtual |
Returns download url assigned by mcloud for this task.
Implements mcloud::api::Task.
|
friend |
Definition at line 118 of file downloadtask.h.