aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-06-23 20:49:28 +0200
committerjobol <jose.bollo@iot.bzh>2016-06-24 07:14:57 +0200
commitd432d8e6918e2e665f1c1179915fed3e0647380a (patch)
tree22bddf74dc824f251ea2471284825bdedd8d5e83
parentd08b0ecf6d5e0a1a46db5723fd473a391d0f001a (diff)
vocabulary: moving from 'plugin' to 'binding'
Change-Id: I89b7c0adc93ec6f9b97ee168b4a12651c72009ab Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/CMakeLists.txt26
-rw-r--r--src/afm-main-binding.c (renamed from src/afm-main-plugin.c)18
-rw-r--r--src/afm-main-binding.export-map1
-rw-r--r--src/afm-main-plugin.export-map1
4 files changed, 23 insertions, 23 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9f6a944..0f07059 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -139,28 +139,28 @@ target_link_libraries(afm-system-daemon wgtpkg afm secwrp wgt utils)
install(TARGETS afm-system-daemon DESTINATION ${CMAKE_INSTALL_BINDIR})
###########################################################################
-# the plugin for afb
+# the binding for afb
pkg_check_modules(afb afb-daemon)
if(afb_FOUND)
- message(STATUS "Creation afm-main-plugin for AFB-DAEMON")
+ message(STATUS "Creation afm-main-binding for AFB-DAEMON")
###############################################################
- #pkg_get_variable(afb_plugin_install_dir afb-daemon plugin_install_dir)
+ #pkg_get_variable(afb_binding_install_dir afb-daemon binding_install_dir)
execute_process(
- COMMAND pkg-config --variable plugin_install_dir afb-daemon
- OUTPUT_VARIABLE afb_plugin_install_dir OUTPUT_STRIP_TRAILING_WHITESPACE
+ COMMAND pkg-config --variable binding_install_dir afb-daemon
+ OUTPUT_VARIABLE afb_binding_install_dir OUTPUT_STRIP_TRAILING_WHITESPACE
)
###############################################################
- add_library(afm-main-plugin MODULE afm-main-plugin.c)
- target_compile_options(afm-main-plugin PRIVATE ${afb_CFLAGS})
- target_include_directories(afm-main-plugin PRIVATE ${afb_INCLUDE_DIRS})
- target_link_libraries(afm-main-plugin utils ${afb_LIBRARIES})
- set_target_properties(afm-main-plugin PROPERTIES
+ add_library(afm-main-binding MODULE afm-main-binding.c)
+ target_compile_options(afm-main-binding PRIVATE ${afb_CFLAGS})
+ target_include_directories(afm-main-binding PRIVATE ${afb_INCLUDE_DIRS})
+ target_link_libraries(afm-main-binding utils ${afb_LIBRARIES})
+ set_target_properties(afm-main-binding PROPERTIES
PREFIX ""
- LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/afm-main-plugin.export-map"
+ LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/afm-main-binding.export-map"
)
- install(TARGETS afm-main-plugin LIBRARY DESTINATION ${afb_plugin_install_dir})
+ install(TARGETS afm-main-binding LIBRARY DESTINATION ${afb_binding_install_dir})
else()
- message(STATUS "Not creating the plugin for AFB-DAEMON")
+ message(STATUS "Not creating the binding for AFB-DAEMON")
endif()
diff --git a/src/afm-main-plugin.c b/src/afm-main-binding.c
index fe0e8bd..1af3d8a 100644
--- a/src/afm-main-plugin.c
+++ b/src/afm-main-binding.c
@@ -21,7 +21,7 @@
#include <assert.h>
#include <json-c/json.h>
-#include <afb/afb-plugin.h>
+#include <afb/afb-binding.h>
#include "utils-jbus.h"
@@ -45,7 +45,7 @@ static const char _terminate_[] = "terminate";
static const char _uninstall_[] = "uninstall";
static const char _uri_[] = "uri";
-static const struct AFB_interface *binder;
+static const struct afb_binding_interface *binder;
static struct jbus *jbus;
@@ -138,7 +138,7 @@ static struct json_object *embed(const char *tag, struct json_object *obj)
*/
static void embed_call_void_callback(int status, struct json_object *obj, struct memo *memo)
{
- DEBUG(binder, "(afm-main-plugin) %s(true) -> %s\n", memo->method,
+ DEBUG(binder, "(afm-main-binding) %s(true) -> %s\n", memo->method,
obj ? json_object_to_json_string(obj) : "NULL");
if (obj == NULL) {
@@ -169,7 +169,7 @@ static void embed_call_void(struct afb_req request, const char *method)
*/
static void call_xxxid_callback(int status, struct json_object *obj, struct memo *memo)
{
- DEBUG(binder, "(afm-main-plugin) %s -> %s\n", memo->method,
+ DEBUG(binder, "(afm-main-binding) %s -> %s\n", memo->method,
obj ? json_object_to_json_string(obj) : "NULL");
if (obj == NULL) {
@@ -242,7 +242,7 @@ static void detail(struct afb_req request)
static void start_callback(int status, struct json_object *obj, struct memo *memo)
{
- DEBUG(binder, "(afm-main-plugin) %s -> %s\n", memo->method,
+ DEBUG(binder, "(afm-main-binding) %s -> %s\n", memo->method,
obj ? json_object_to_json_string(obj) : "NULL");
if (obj == NULL) {
@@ -369,7 +369,7 @@ static void uninstall(struct afb_req request)
call_appid(request, _uninstall_);
}
-static const struct AFB_verb_desc_v1 verbs[] =
+static const struct afb_verb_desc_v1 verbs[] =
{
{_runnables_, AFB_SESSION_CHECK, runnables, "Get list of runnable applications"},
{_detail_ , AFB_SESSION_CHECK, detail, "Get the details for one application"},
@@ -384,8 +384,8 @@ static const struct AFB_verb_desc_v1 verbs[] =
{ NULL, 0, NULL, NULL }
};
-static const struct AFB_plugin plug_desc = {
- .type = AFB_PLUGIN_VERSION_1,
+static const struct afb_binding plug_desc = {
+ .type = AFB_BINDING_VERSION_1,
.v1 = {
.info = "Application Framework Master Service",
.prefix = "afm-main",
@@ -393,7 +393,7 @@ static const struct AFB_plugin plug_desc = {
}
};
-const struct AFB_plugin *pluginAfbV1Register(const struct AFB_interface *itf)
+const struct afb_binding *afbBindingV1Register(const struct afb_binding_interface *itf)
{
int rc;
struct sd_bus *sbus;
diff --git a/src/afm-main-binding.export-map b/src/afm-main-binding.export-map
new file mode 100644
index 0000000..0ef1ac7
--- /dev/null
+++ b/src/afm-main-binding.export-map
@@ -0,0 +1 @@
+{ global: afbBindingV1Register; local: *; };
diff --git a/src/afm-main-plugin.export-map b/src/afm-main-plugin.export-map
deleted file mode 100644
index e2da85c..0000000
--- a/src/afm-main-plugin.export-map
+++ /dev/null
@@ -1 +0,0 @@
-{ global: pluginAfbV1Register; local: *; };