diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2015-08-22 05:27:36 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2015-08-22 05:27:36 +0300 |
commit | c77cb85e69a830d3b41ba1d55fdc7ff69d330491 (patch) | |
tree | e66a625b8ba7011e1b8032b202ae909aac8391bd /server/include/api_module_base.h | |
parent | 29e018ac3c35aa904b37330f467d7299b559acbb (diff) |
protocol:
minor corrections
few missed fields
server:
started module api designing
fixed typo in modules loader code
Diffstat (limited to 'server/include/api_module_base.h')
-rw-r--r-- | server/include/api_module_base.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/include/api_module_base.h b/server/include/api_module_base.h index 1a9fc4f..89fc4dd 100644 --- a/server/include/api_module_base.h +++ b/server/include/api_module_base.h @@ -26,9 +26,9 @@ struct module_info { - std::string name, description, version; - std::map<std::string, std::string> default_settings; //to save in config file - boost::function<void()> on_modules_loaded; + std::string name, description, version; //module name must be set and must be unique, description and version is optional + std::map<std::string, std::string> default_settings; //set all settings supported by module here with default values to save in config for editing later + boost::function<void()> on_modules_loaded; //if set, this function will be called after basic initialization of all installed modules, so installed modules can be partially used here, for example metadata storage will be available }; class module_base @@ -36,7 +36,7 @@ class module_base public: virtual void load(core_api *a) = 0; virtual const module_info &get_module_info() = 0; - virtual void set_module_settings(const std::map<std::string, std::string> &settings) = 0; + virtual void set_module_settings(const std::map<std::string, std::string> &settings) = 0; //will called with settings stored in config virtual ~module_base() = 0; protected: std::map<std::string, std::string> settings; |