diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2015-08-31 20:56:45 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2015-08-31 20:56:45 +0300 |
commit | b5af51e358073145cdf66470cc890d98547a6dac (patch) | |
tree | df8520f32850ea87efcc616b978546daf201bc13 | |
parent | 4b4002115d6c7b5c5113d1e2e6e9025565e1c9bb (diff) |
server:
core:
another bit of api simplification
modules:
adapted to api changes
-rw-r--r-- | server/include/api_module_base.h | 6 | ||||
-rw-r--r-- | server/modules/downloaders/curl/main.h | 1 | ||||
-rw-r--r-- | server/modules/metadata/flat_files/main.h | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/server/include/api_module_base.h b/server/include/api_module_base.h index d8acf9b..6f01746 100644 --- a/server/include/api_module_base.h +++ b/server/include/api_module_base.h @@ -40,7 +40,10 @@ class module_base { public: virtual void load(core_api *a) = 0; - virtual const module_info_base &get_module_info() = 0; + virtual const module_info_base &get_module_info() + { + return info; + } virtual void set_module_settings(const std::map<std::string, setting_s> &settings) = 0; //will called with settings stored in config virtual std::map<std::string, setting_s> &get_runtime_module_settings() //get runtime module_settings, works faster than core_api function { @@ -49,6 +52,7 @@ class module_base virtual ~module_base() = 0; protected: std::map<std::string, setting_s> settings; + module_info_base info; core_api *api = nullptr; }; diff --git a/server/modules/downloaders/curl/main.h b/server/modules/downloaders/curl/main.h index 12d427a..4c4cbe9 100644 --- a/server/modules/downloaders/curl/main.h +++ b/server/modules/downloaders/curl/main.h @@ -50,7 +50,6 @@ public: download_s get_download(int download_id, std::map<int, std::string> params = std::map<int, std::string>()); //same as above, except this one is for single download, not a complete list private: void on_modules_loaded(); -// downloader_module_info info; std::map<int, my_download> downloads; //map of id, download }; diff --git a/server/modules/metadata/flat_files/main.h b/server/modules/metadata/flat_files/main.h index b315d62..3d228f4 100644 --- a/server/modules/metadata/flat_files/main.h +++ b/server/modules/metadata/flat_files/main.h @@ -41,7 +41,6 @@ class storage_impl: public module_metadata_storage private: void on_modules_loaded(); - module_info_base info; std::string parsed_data_path; }; |