From 0c9dd8ea102db49c9702d36d8a13c013d6e5df86 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Sun, 29 Mar 2015 04:41:17 +0300 Subject: api fixes implemented get_module_settings --- server/modules/metadata/flat_files/main.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'server/modules/metadata/flat_files/main.cpp') diff --git a/server/modules/metadata/flat_files/main.cpp b/server/modules/metadata/flat_files/main.cpp index 78b8a58..7fd197c 100644 --- a/server/modules/metadata/flat_files/main.cpp +++ b/server/modules/metadata/flat_files/main.cpp @@ -22,6 +22,13 @@ #include "main.h" #include +#include +#include + +void storage_impl::on_modules_loaded() +{ + settings = api->get_module_settings(this); +} void storage_impl::load(core_api *a) @@ -30,8 +37,9 @@ void storage_impl::load(core_api *a) info.name = "flat_files_metadata"; info.description = "this module provide metadata storage in flat files"; - info.version = "0.0.0.1"; + info.version = "0.0.0.1draft"; info.default_settings["data_path"] = "~/.local/share/udm/metadata"; + info.on_modules_loaded = boost::bind(&storage_impl::on_modules_loaded, this); std::cout<<"flat_files metadata module succesfully loaded\n"; } @@ -74,7 +82,7 @@ module_base::~module_base() } -extern "C" void* udm_metadata_module_load() +extern "C" module_metadata_storage* udm_metadata_module_load() { return new storage_impl; } -- cgit v1.2.3