summaryrefslogtreecommitdiff
path: root/server/src/modules_handler.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2015-03-29 19:19:37 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2015-03-29 19:19:37 +0300
commitc8a7af2c1813cd0ae22d4015c8a9f4ee4859bf56 (patch)
tree56ceef4e1a6d7338af2cbf8b3ca406021f0205a9 /server/src/modules_handler.cpp
parent0c9dd8ea102db49c9702d36d8a13c013d6e5df86 (diff)
module settings auto loading
Diffstat (limited to 'server/src/modules_handler.cpp')
-rw-r--r--server/src/modules_handler.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/src/modules_handler.cpp b/server/src/modules_handler.cpp
index 7a17ec7..2c708b9 100644
--- a/server/src/modules_handler.cpp
+++ b/server/src/modules_handler.cpp
@@ -175,6 +175,7 @@ void modules_handler::load_modules()
load_downloader_modules(replace_home_var("~/.share/udm/modules/downloader"));
load_downloader_modules("/usr/lib/udm/modules/downloader");
on_modules_loaded();
+ load_module_settings();
}
void modules_handler::on_modules_loaded()
@@ -191,6 +192,14 @@ void modules_handler::on_modules_loaded()
}
}
+void modules_handler::load_module_settings()
+{
+ for(auto i = metadata_modules.begin(), end = metadata_modules.end(); i != end; ++i)
+ (*i)->set_module_settings(module_api->get_module_settings(*i));
+ for(auto i = downloader_modules.begin(), end = downloader_modules.end(); i != end; ++i)
+ (*i)->set_module_settings(module_api->get_module_settings(*i));
+}
+
modules_handler::~modules_handler()
{
//dtor