From f4750dc7ca9ce56c54352c03bb40affe1a64c315 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Tue, 15 Sep 2015 12:49:00 +0300 Subject: 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) --- server/include/api_module_downloader.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/include/api_module_downloader.h') 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 info_map; //any additional info provided by downloader module can be stored here std::list content; //download content can be set for download, structure described above - std::map metadata; + std::map metadata; //client defined metadata map }; class module_downloader : public module_base { public: //basic actions - virtual int add_download(std::map params) = 0; //add download, this function must return unique for current session and current downloader download id + virtual int add_download(std::map 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 -- cgit v1.2.3