diff options
Diffstat (limited to 'server/include/api_module_downloader.h')
-rw-r--r-- | server/include/api_module_downloader.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/server/include/api_module_downloader.h b/server/include/api_module_downloader.h index ba6cb6a..6445772 100644 --- a/server/include/api_module_downloader.h +++ b/server/include/api_module_downloader.h @@ -57,7 +57,8 @@ struct downloader_module_info : public module_info_base //downloader_module_info { std::list<module_download_menu_element_info_s> download_root_menu, download_content_menu; //downloader module can add additional menu entries for download root and download content if content management supported by protocol std::list<module_download_ui_element_info_s> download_info_ui, download_creation_ui; //downloader module should set all data fields required for download creation, also may set data fields for info in ui in client - std::map<std::string, std::string> get_downloads_parameters_info; //any supported parameters of get_downloads(), get_download_info() must be described here + std::map<std::string, std::string> get_downloads_parameters_info; //module defined parameters of get_downloads(), get_download_info() must be described here + std::map<int, std::string> download_state_names; //module defined download states }; enum DOWNLOAD_CONTENT_ENTRY_TYPE_s { @@ -75,15 +76,20 @@ struct download_content_entry_s { //here is basic content entry description, thi std::map<std::string, std::string> info_map; //any additional info }; +enum download_state_e { + stoppped = 0, + running = 1 +}; struct download_s { int id = -1; //id generated via download_add or via session restore and it's unique for current session and current dowloader - std::string name; - int64_t size = 0, downloaded = 0, download_speed = 0; //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; //client defined metadata map + std::string name; + int64_t size = 0, downloaded = 0, download_speed = 0; //download size and size of downloaded data, also download speed all vars in bytes + download_state_e state = download_state_e::stoppped; //download state can be module defined + 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; //client defined metadata map }; class module_downloader : public module_base |