summaryrefslogtreecommitdiff
path: root/server/modules
diff options
context:
space:
mode:
Diffstat (limited to 'server/modules')
-rw-r--r--server/modules/metadata/flat_files/flat_files.cbp4
-rw-r--r--server/modules/metadata/flat_files/main.cpp39
-rw-r--r--server/modules/metadata/flat_files/main.h15
3 files changed, 54 insertions, 4 deletions
diff --git a/server/modules/metadata/flat_files/flat_files.cbp b/server/modules/metadata/flat_files/flat_files.cbp
index dad2ece..e297909 100644
--- a/server/modules/metadata/flat_files/flat_files.cbp
+++ b/server/modules/metadata/flat_files/flat_files.cbp
@@ -7,7 +7,7 @@
<Option compiler="gcc" />
<Build>
<Target title="Debug">
- <Option output="bin/Debug/flat_files" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="1" extension_auto="1" />
+ <Option output="../../../bin/Debug/modules/metadata/flat_files" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="3" />
<Option compiler="gcc" />
@@ -18,7 +18,7 @@
</Compiler>
</Target>
<Target title="Release">
- <Option output="bin/Release/flat_files" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="1" extension_auto="1" />
+ <Option output="../../../bin/Release/modules/metadata/flat_files" imp_lib="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).a" def_file="$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).def" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="3" />
<Option compiler="gcc" />
diff --git a/server/modules/metadata/flat_files/main.cpp b/server/modules/metadata/flat_files/main.cpp
index 6696a76..3015cd5 100644
--- a/server/modules/metadata/flat_files/main.cpp
+++ b/server/modules/metadata/flat_files/main.cpp
@@ -21,15 +21,52 @@
#include "main.h"
+#include <iostream>
-core_api *api = nullptr;
void storage_impl::load(core_api *a)
{
api = a;
+ std::cout<<"flat_files metadata module succesfully loaded\n";
+ //TODO: set module_info
}
+
+const module_info &storage_impl::get_module_info()
+{
+ return info;
+}
+
+
+bool storage_impl::set(const std::string &module_name, const std::string &setting_name, const std::vector<char> &data)
+{
+ //TODO
+ return true;
+}
+
+bool storage_impl::get(const std::string &module_name, const std::string &setting_name, std::vector<char> &data)
+{
+ //TODO
+ return true;
+}
+
+bool storage_impl::remove(const std::string &module_name, const std::string &setting_name)
+{
+ //TODO
+ return true;
+}
+
+storage_impl::storage_impl()
+{
+}
+
+module_base::~module_base()
+{
+}
+
+
extern "C" void* load()
{
return new storage_impl;
}
+
diff --git a/server/modules/metadata/flat_files/main.h b/server/modules/metadata/flat_files/main.h
index bdcf9e0..706e21d 100644
--- a/server/modules/metadata/flat_files/main.h
+++ b/server/modules/metadata/flat_files/main.h
@@ -28,7 +28,20 @@
class storage_impl: public module_metadata_storage
{
- void load(core_api *a);
+ public:
+ storage_impl();
+ //module base
+ void load(core_api *a);
+ const module_info &get_module_info();
+ //metadata module
+ bool set(const std::string &module_name, const std::string &setting_name, const std::vector<char> &data);
+ bool get(const std::string &module_name, const std::string &setting_name, std::vector<char> &data);
+ bool remove(const std::string &module_name, const std::string &setting_name);
+
+ private:
+ module_info info;
+ core_api *api = nullptr;
+
};