5 #include "config_manager.h"
7 static void *lib_handle;
9 PluginTizenConfig* (*config_manager(char* plugin_path, char* plugin_name))()
11 PluginTizenConfig* (*fn)();
13 lib_handle = dlopen(plugin_path, RTLD_LAZY);
16 fprintf(stderr, "%s\n", dlerror());
20 fn = dlsym(lib_handle, plugin_name);
21 if ((error = dlerror()) != NULL)
23 fprintf(stderr, "%s\n", error);
31 char* config_manager_get(PluginTizenConfig* (*fn)(),char* key)
33 PluginTizenConfig* pt_table = (*fn)();
35 char* str = pt_table->get_config_str(key);
41 int config_manager_set(PluginTizenConfig* (*fn)(),char* key, char* value)
43 PluginTizenConfig* pt_table = (*fn)();
45 pt_table->set_config_str(key, value);
51 int config_manager_get_int(PluginTizenConfig* (*fn)(),char* key)
53 PluginTizenConfig* pt_table = (*fn)();
55 int val = pt_table->get_config_int(key);
61 int config_manager_set_int(PluginTizenConfig* (*fn)(),char* key, int value)
63 PluginTizenConfig* pt_table = (*fn)();
65 pt_table->set_config_int(key, value);
71 bool config_manager_get_bool(PluginTizenConfig* (*fn)(),char* key)
73 PluginTizenConfig* pt_table = (*fn)();
75 bool val = pt_table->get_config_bool(key);
81 int config_manager_set_bool(PluginTizenConfig* (*fn)(),char* key, bool value)
83 PluginTizenConfig* pt_table = (*fn)();
85 pt_table->set_config_bool(key, value);
91 float config_manager_get_float(PluginTizenConfig* (*fn)(),char* key)
93 PluginTizenConfig* pt_table = (*fn)();
95 float val = pt_table->get_config_float(key);
101 int config_manager_set_float(PluginTizenConfig* (*fn)(),char* key, float value)
103 PluginTizenConfig* pt_table = (*fn)();
105 pt_table->set_config_float(key, value);
112 int config_manager_get_list(PluginTizenConfig* (*fn)(),char* key, void tcf_iterator(void (*callback)(int,void*, void*)), void* data)
114 PluginTizenConfig* pt_table = (*fn)();
116 int val = pt_table->get_config_list(key, tcf_iterator, data);
123 int config_manager_set_float(PluginTizenConfig* (*fn)(),char* key, float value)
125 PluginTizenConfig* pt_table = (*fn)();
127 pt_table->set_config_float(key, value);
137 void config_manager_close()