summaryrefslogtreecommitdiff
path: root/server/include/api_module_downloader.h
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2015-09-15 12:49:00 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2015-09-15 12:49:00 +0300
commitf4750dc7ca9ce56c54352c03bb40affe1a64c315 (patch)
treee5ff58ae92b0c49f5624644611ea05312eebe1ed /server/include/api_module_downloader.h
parent1d6ced38a89547aaf2cc3745876360f0e5086474 (diff)
client-qt:
implemented handler for SERVER_DOWNLOAD_INFO_REPLY server: api: removed core_id field from download_internal_s as it always used for index in download map some useful coments core: improoved signal handler a bit fiexd bug in core_api metadata related functions (metadata_set, metadata_get, metadata_remove), now thay returning correct data basic implementation of CLIENT_DOWNLOAD_ADD handler basic implementation of module unloading curl_downloader_module: implemented metadata storing some sanity checks curl_download structure refactored a bit (simplification)
Diffstat (limited to 'server/include/api_module_downloader.h')
-rw-r--r--server/include/api_module_downloader.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/include/api_module_downloader.h b/server/include/api_module_downloader.h
index 33a3fce..9e42715 100644
--- a/server/include/api_module_downloader.h
+++ b/server/include/api_module_downloader.h
@@ -83,14 +83,14 @@ struct download_s {
int64_t size, downloaded, download_speed; //download size and size of downloaded data, also download speed all vars in bytes
std::map<int, std::string> info_map; //any additional info provided by downloader module can be stored here
std::list<download_content_entry_s> content; //download content can be set for download, structure described above
- std::map<std::string, std::string> metadata;
+ std::map<std::string, std::string> metadata; //client defined metadata map
};
class module_downloader : public module_base
{
public:
//basic actions
- virtual int add_download(std::map<int, std::string> params) = 0; //add download, this function must return unique for current session and current downloader download id
+ virtual int add_download(std::map<int, std::string> params) = 0; //add download, this function must return unique for current session and current downloader download id, -1 on error
virtual bool stop_download(int download_id) = 0; //stop download by id received via add_download, return true on success, false otherwise
virtual bool start_download(int download_id) = 0; //start download by id received via add_download, return true on success, false otherwise
virtual bool delete_download(int download_id, bool delete_data = false) = 0; //delete download by id received via add_download, if "delete_data" is set, also remove all downloaded data from storage, return true on success, false otherwise