summaryrefslogtreecommitdiffstats
path: root/plugins/session
diff options
context:
space:
mode:
authorManuel Bachmann <manuel.bachmann@iot.bzh>2015-12-21 06:57:05 +0100
committerManuel Bachmann <manuel.bachmann@iot.bzh>2015-12-21 07:00:46 +0100
commit98f5843474dcec55827279b6f42007341c171ae0 (patch)
tree010c6328cda7ef2b2577eb00ffca14c931dfbc3b /plugins/session
parent03bebc12f0fd5006a72e430084146a36d2db7c8d (diff)
Switch to a plugin model
Each API now compiles to a ".so" file, which gets searched for in the "${libdir}/afb" directory at startup. We can now load an arbitrary number of plugins (> 10). Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
Diffstat (limited to 'plugins/session')
-rw-r--r--plugins/session/CMakeLists.txt6
-rw-r--r--plugins/session/token-api.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/plugins/session/CMakeLists.txt b/plugins/session/CMakeLists.txt
new file mode 100644
index 00000000..ddd185df
--- /dev/null
+++ b/plugins/session/CMakeLists.txt
@@ -0,0 +1,6 @@
+INCLUDE_DIRECTORIES(${include_dirs})
+
+ADD_LIBRARY(token-api MODULE token-api.c)
+SET_TARGET_PROPERTIES(token-api PROPERTIES PREFIX "")
+INSTALL(TARGETS token-api
+ LIBRARY DESTINATION ${plugin_install_dir})
diff --git a/plugins/session/token-api.c b/plugins/session/token-api.c
index b6ebb8ad..ba6d2761 100644
--- a/plugins/session/token-api.c
+++ b/plugins/session/token-api.c
@@ -94,7 +94,7 @@ STATIC AFB_restapi pluginApis[]= {
{NULL}
};
-PUBLIC AFB_plugin *tokenRegister () {
+PUBLIC AFB_plugin *pluginRegister () {
AFB_plugin *plugin = malloc (sizeof (AFB_plugin));
plugin->type = AFB_PLUGIN_JSON;
plugin->info = "Application Framework Binder Service";
@@ -104,4 +104,4 @@ PUBLIC AFB_plugin *tokenRegister () {
plugin->freeCtxCB= (void*) clientContextFree;
return (plugin);
-}; \ No newline at end of file
+};