diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2015-08-25 15:16:12 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2015-08-25 15:16:12 +0300 |
commit | 3175fbe96c91a2de6f687d5c6bfe0fc7f02a34f4 (patch) | |
tree | 5ff277d4c7af8394b86d4d5a86916123eaabc632 /server/include/api_module_downloader.h | |
parent | f3d970520e0784a565e7c6ba0e97460440899f50 (diff) |
server:
use int for parameters id everywhere
Diffstat (limited to 'server/include/api_module_downloader.h')
-rw-r--r-- | server/include/api_module_downloader.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/include/api_module_downloader.h b/server/include/api_module_downloader.h index 4a31085..ae91943 100644 --- a/server/include/api_module_downloader.h +++ b/server/include/api_module_downloader.h @@ -79,20 +79,20 @@ struct download_s { int id; std::string name; //id generated via download_add or via session restore and it's unique for current session and current dowloader int64_t size, downloaded, download_speed; //download size and size of downloaded data, also download speed all vars in bytes - std::map<std::string, std::string> info_map; //any additional info provided by downloader module can be stored here + 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 }; class module_downloader : public module_base { public: - virtual int add_download(std::map<std::string, 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 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 - virtual bool execute_action_on_download(int download_id, std::string action_id) = 0; //execute module defined action on download, by id received via add_download - virtual std::list<download_s> get_downloads(std::map<std::string, std::string> params = std::map<std::string, std::string>()) = 0; //this function must return list of downloads, additional options may be passed via params map - virtual download_s get_download_info(int download_id, std::map<std::string, std::string> params = std::map<std::string, std::string>()) = 0; //same as above, except this one is for single download, not a complete list + virtual bool execute_action_on_download(int download_id, int action_id) = 0; //execute module defined action on download, by id received via add_download + virtual std::list<download_s> get_downloads(std::map<int, std::string> params = std::map<int, std::string>()) = 0; //this function must return list of downloads, additional options may be passed via params map + virtual download_s get_download_info(int download_id, std::map<int, std::string> params = std::map<int, std::string>()) = 0; //same as above, except this one is for single download, not a complete list }; |