19 #ifndef MCLOUD_API_DOWNLOADTASK_H_ 20 #define MCLOUD_API_DOWNLOADTASK_H_ 42 class DownloadTaskPriv;
43 class SyncManagerPriv;
52 typedef std::shared_ptr<DownloadTask>
Ptr;
63 const std::string & task_id()
const override;
68 const std::string & content_id()
const override;
73 const std::string & content_name()
const override;
78 const std::string & file_path()
const override;
84 const std::string & task_url()
const override;
89 const std::string & error_string()
const override;
113 void cancel()
override;
118 friend class SyncManagerPriv;
120 std::shared_ptr<DownloadTaskPriv> p_;
126 #endif // MCLOUD_API_DOWNLOADTASK_H_ DownloadBufferCb is a download request object which consists of a content id and writing callback fun...
Task is an abstract class that defines common interfaces for upload and download task.
std::shared_ptr< DownloadTask > Ptr
Task::Buffer_Callback write_cb
std::function< void(Status)> StatusHandler
DownloadTask is a task item that can be accessed from application layer to fetch basic download item ...
std::function< void(float)> ProgressHandler
std::function< size_t(void *dest, size_t buf_size)> Buffer_Callback
#define MCLOUD_API_DLL_PUBLIC
Status
The Status enum indicates current status of this task.