From: José Bollo Date: Thu, 23 Jun 2016 18:34:57 +0000 (+0200) Subject: vocabulary: moving from 'plugin' to 'binding' X-Git-Tag: blowfish_2.0.1~17 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fapp-framework-binder.git;a=commitdiff_plain;h=7059e59cddc1c81321639875636e88895bc14309 vocabulary: moving from 'plugin' to 'binding' Change-Id: Ic9e118df2bede1fefbb591f8ae7887266b7324ca Signed-off-by: José Bollo --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 955eb20a..3ec58293 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,11 +63,11 @@ SET(link_libraries ${json-c_LIBRARIES} ) -SET(plugin_install_dir ${CMAKE_INSTALL_FULL_LIBDIR}/afb) +SET(binding_install_dir ${CMAKE_INSTALL_FULL_LIBDIR}/afb) ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(include) -ADD_SUBDIRECTORY(plugins) +ADD_SUBDIRECTORY(bindings) ############################################################ # installs the pkgconfig files diff --git a/afb-daemon.pc.in b/afb-daemon.pc.in index 23075eb9..34a470a3 100644 --- a/afb-daemon.pc.in +++ b/afb-daemon.pc.in @@ -18,7 +18,7 @@ ## includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ -plugin_install_dir=@plugin_install_dir@ +binding_install_dir=@binding_install_dir@ Name: @PROJECT_PRETTY_NAME@ Description: @PROJECT_DESCRIPTION@ diff --git a/plugins/CMakeLists.txt b/bindings/CMakeLists.txt similarity index 100% rename from plugins/CMakeLists.txt rename to bindings/CMakeLists.txt diff --git a/plugins/audio/CMakeLists.txt b/bindings/audio/CMakeLists.txt similarity index 77% rename from plugins/audio/CMakeLists.txt rename to bindings/audio/CMakeLists.txt index 2d74fd62..11da28e1 100644 --- a/plugins/audio/CMakeLists.txt +++ b/bindings/audio/CMakeLists.txt @@ -6,10 +6,10 @@ FIND_PACKAGE(Threads) IF(alsa_FOUND) - MESSAGE(STATUS "ALSA found ; will compile Audio plugin... (PLUGIN)") + MESSAGE(STATUS "ALSA found ; will compile Audio binding... (BINDING)") IF(pulseaudio_FOUND) - MESSAGE(STATUS "PulseAudio found ; Audio plugin will have PulseAudio support") + MESSAGE(STATUS "PulseAudio found ; Audio binding will have PulseAudio support") ADD_DEFINITIONS(-DHAVE_PULSE=1) SET(pulse_sources audio-pulse.c) ENDIF(pulseaudio_FOUND) @@ -22,6 +22,6 @@ IF(alsa_FOUND) ) TARGET_LINK_LIBRARIES(audio-api ${link_libraries} ${alsa_LIBRARIES} ${pulseaudio_LIBRARIES}) INSTALL(TARGETS audio-api - LIBRARY DESTINATION ${plugin_install_dir}) + LIBRARY DESTINATION ${binding_install_dir}) ENDIF(alsa_FOUND) diff --git a/plugins/audio/audio-alsa.c b/bindings/audio/audio-alsa.c similarity index 100% rename from plugins/audio/audio-alsa.c rename to bindings/audio/audio-alsa.c diff --git a/plugins/audio/audio-alsa.h b/bindings/audio/audio-alsa.h similarity index 100% rename from plugins/audio/audio-alsa.h rename to bindings/audio/audio-alsa.h diff --git a/plugins/audio/audio-api.c b/bindings/audio/audio-api.c similarity index 100% rename from plugins/audio/audio-api.c rename to bindings/audio/audio-api.c diff --git a/plugins/audio/audio-api.h b/bindings/audio/audio-api.h similarity index 100% rename from plugins/audio/audio-api.h rename to bindings/audio/audio-api.h diff --git a/plugins/audio/audio-pulse.c b/bindings/audio/audio-pulse.c similarity index 100% rename from plugins/audio/audio-pulse.c rename to bindings/audio/audio-pulse.c diff --git a/plugins/audio/audio-pulse.h b/bindings/audio/audio-pulse.h similarity index 100% rename from plugins/audio/audio-pulse.h rename to bindings/audio/audio-pulse.h diff --git a/bindings/audio/export.map b/bindings/audio/export.map new file mode 100644 index 00000000..0ef1ac79 --- /dev/null +++ b/bindings/audio/export.map @@ -0,0 +1 @@ +{ global: afbBindingV1Register; local: *; }; diff --git a/plugins/intrinsics/CMakeLists.txt b/bindings/intrinsics/CMakeLists.txt similarity index 89% rename from plugins/intrinsics/CMakeLists.txt rename to bindings/intrinsics/CMakeLists.txt index b9bd638a..c6ff8ef4 100644 --- a/plugins/intrinsics/CMakeLists.txt +++ b/bindings/intrinsics/CMakeLists.txt @@ -11,5 +11,5 @@ SET_TARGET_PROPERTIES(afb-dbus-binding PROPERTIES ) TARGET_LINK_LIBRARIES(afb-dbus-binding ${link_libraries}) INSTALL(TARGETS afb-dbus-binding - LIBRARY DESTINATION ${plugin_install_dir}) + LIBRARY DESTINATION ${binding_install_dir}) diff --git a/plugins/intrinsics/afb-dbus-binding.c b/bindings/intrinsics/afb-dbus-binding.c similarity index 94% rename from plugins/intrinsics/afb-dbus-binding.c rename to bindings/intrinsics/afb-dbus-binding.c index 37988559..59fe78d6 100644 --- a/plugins/intrinsics/afb-dbus-binding.c +++ b/bindings/intrinsics/afb-dbus-binding.c @@ -23,14 +23,12 @@ #include #include -#include -#include -#include +#include /* * the interface to afb-daemon */ -const struct AFB_interface *afbitf; +const struct afb_binding_interface *afbitf; /* * union of possible dbus values @@ -602,32 +600,32 @@ cleanup: /* * array of the verbs exported to afb-daemon */ -static const struct AFB_verb_desc_v1 plugin_verbs[] = { +static const struct afb_verb_desc_v1 binding_verbs[] = { /* VERB'S NAME SESSION MANAGEMENT FUNCTION TO CALL SHORT DESCRIPTION */ { .name= "rawcall", .session= AFB_SESSION_NONE, .callback= rawcall, .info= "raw call to dbus method" }, { .name= NULL } /* marker for end of the array */ }; /* - * description of the plugin for afb-daemon + * description of the binding for afb-daemon */ -static const struct AFB_plugin plugin_description = +static const struct afb_binding binding_description = { /* description conforms to VERSION 1 */ - .type= AFB_PLUGIN_VERSION_1, - .v1= { /* fills the v1 field of the union when AFB_PLUGIN_VERSION_1 */ - .prefix= "dbus", /* the API name (or plugin name or prefix) */ - .info= "raw dbus binding", /* short description of of the plugin */ - .verbs = plugin_verbs /* the array describing the verbs of the API */ + .type= AFB_BINDING_VERSION_1, + .v1= { /* fills the v1 field of the union when AFB_BINDING_VERSION_1 */ + .prefix= "dbus", /* the API name (or binding name or prefix) */ + .info= "raw dbus binding", /* short description of of the binding */ + .verbs = binding_verbs /* the array describing the verbs of the API */ } }; /* - * activation function for registering the plugin called by afb-daemon + * activation function for registering the binding called by afb-daemon */ -const struct AFB_plugin *pluginAfbV1Register(const struct AFB_interface *itf) +const struct afb_binding *afbBindingV1Register(const struct afb_binding_interface *itf) { afbitf = itf; /* records the interface for accessing afb-daemon */ - return &plugin_description; /* returns the description of the plugin */ + return &binding_description; /* returns the description of the binding */ } diff --git a/bindings/intrinsics/export.map b/bindings/intrinsics/export.map new file mode 100644 index 00000000..0ef1ac79 --- /dev/null +++ b/bindings/intrinsics/export.map @@ -0,0 +1 @@ +{ global: afbBindingV1Register; local: *; }; diff --git a/plugins/media/CMakeLists.txt b/bindings/media/CMakeLists.txt similarity index 79% rename from plugins/media/CMakeLists.txt rename to bindings/media/CMakeLists.txt index 5febc02d..2866dfbc 100644 --- a/plugins/media/CMakeLists.txt +++ b/bindings/media/CMakeLists.txt @@ -3,7 +3,7 @@ PKG_CHECK_MODULES(gupnp gupnp-1.0 gupnp-av-1.0 gssdp-1.0 gobject-2.0 gio-2.0) IF(gupnp_FOUND) - MESSAGE(STATUS "gupnp found ; will compile Media plugin... (PLUGIN)") + MESSAGE(STATUS "gupnp found ; will compile Media binding... (binding)") INCLUDE_DIRECTORIES( ${include_dirs} ${gupnp_INCLUDE_DIRS}) ADD_LIBRARY(media-api MODULE media-api.c media-rygel.c) @@ -13,6 +13,6 @@ IF(gupnp_FOUND) ) TARGET_LINK_LIBRARIES(media-api ${link_libraries} ${gupnp_LIBRARIES}) INSTALL(TARGETS media-api - LIBRARY DESTINATION ${plugin_install_dir}) + LIBRARY DESTINATION ${binding_install_dir}) ENDIF(gupnp_FOUND) diff --git a/bindings/media/export.map b/bindings/media/export.map new file mode 100644 index 00000000..0ef1ac79 --- /dev/null +++ b/bindings/media/export.map @@ -0,0 +1 @@ +{ global: afbBindingV1Register; local: *; }; diff --git a/plugins/media/media-api.c b/bindings/media/media-api.c similarity index 100% rename from plugins/media/media-api.c rename to bindings/media/media-api.c diff --git a/plugins/media/media-api.h b/bindings/media/media-api.h similarity index 100% rename from plugins/media/media-api.h rename to bindings/media/media-api.h diff --git a/plugins/media/media-rygel.c b/bindings/media/media-rygel.c similarity index 100% rename from plugins/media/media-rygel.c rename to bindings/media/media-rygel.c diff --git a/plugins/media/media-rygel.h b/bindings/media/media-rygel.h similarity index 100% rename from plugins/media/media-rygel.h rename to bindings/media/media-rygel.h diff --git a/plugins/radio/CMakeLists.txt b/bindings/radio/CMakeLists.txt similarity index 78% rename from plugins/radio/CMakeLists.txt rename to bindings/radio/CMakeLists.txt index 2aa765da..4df7adb2 100644 --- a/plugins/radio/CMakeLists.txt +++ b/bindings/radio/CMakeLists.txt @@ -3,7 +3,7 @@ PKG_CHECK_MODULES(librtlsdr librtlsdr>=0.5.0) IF(librtlsdr_FOUND) - MESSAGE(STATUS "librtlsdr found ; will compile Radio plugin... (PLUGIN)") + MESSAGE(STATUS "librtlsdr found ; will compile Radio binding... (binding)") INCLUDE_DIRECTORIES(${include_dirs} ${librtlsdr_INCLUDE_DIRS}) ADD_LIBRARY(radio-api MODULE radio-api.c radio-rtlsdr.c) SET_TARGET_PROPERTIES(radio-api PROPERTIES @@ -12,6 +12,6 @@ IF(librtlsdr_FOUND) ) TARGET_LINK_LIBRARIES(radio-api ${link_libraries} ${librtlsdr_LIBRARIES} -lm) INSTALL(TARGETS radio-api - LIBRARY DESTINATION ${plugin_install_dir}) + LIBRARY DESTINATION ${binding_install_dir}) ENDIF(librtlsdr_FOUND) diff --git a/bindings/radio/export.map b/bindings/radio/export.map new file mode 100644 index 00000000..0ef1ac79 --- /dev/null +++ b/bindings/radio/export.map @@ -0,0 +1 @@ +{ global: afbBindingV1Register; local: *; }; diff --git a/plugins/radio/radio-api.c b/bindings/radio/radio-api.c similarity index 100% rename from plugins/radio/radio-api.c rename to bindings/radio/radio-api.c diff --git a/plugins/radio/radio-api.h b/bindings/radio/radio-api.h similarity index 100% rename from plugins/radio/radio-api.h rename to bindings/radio/radio-api.h diff --git a/plugins/radio/radio-rtlsdr.c b/bindings/radio/radio-rtlsdr.c similarity index 100% rename from plugins/radio/radio-rtlsdr.c rename to bindings/radio/radio-rtlsdr.c diff --git a/plugins/radio/radio-rtlsdr.h b/bindings/radio/radio-rtlsdr.h similarity index 100% rename from plugins/radio/radio-rtlsdr.h rename to bindings/radio/radio-rtlsdr.h diff --git a/plugins/samples/AuthLogin.c b/bindings/samples/AuthLogin.c similarity index 100% rename from plugins/samples/AuthLogin.c rename to bindings/samples/AuthLogin.c diff --git a/plugins/samples/CMakeLists.txt b/bindings/samples/CMakeLists.txt similarity index 87% rename from plugins/samples/CMakeLists.txt rename to bindings/samples/CMakeLists.txt index eb6e0112..59a9a449 100644 --- a/plugins/samples/CMakeLists.txt +++ b/bindings/samples/CMakeLists.txt @@ -11,7 +11,7 @@ SET_TARGET_PROPERTIES(authLogin PROPERTIES ) TARGET_LINK_LIBRARIES(authLogin ${link_libraries}) INSTALL(TARGETS authLogin - LIBRARY DESTINATION ${plugin_install_dir}) + LIBRARY DESTINATION ${binding_install_dir}) ################################################## # DemoContext @@ -23,7 +23,7 @@ SET_TARGET_PROPERTIES(demoContext PROPERTIES ) TARGET_LINK_LIBRARIES(demoContext ${link_libraries}) INSTALL(TARGETS demoContext - LIBRARY DESTINATION ${plugin_install_dir}) + LIBRARY DESTINATION ${binding_install_dir}) ################################################## # DemoPost @@ -35,7 +35,7 @@ SET_TARGET_PROPERTIES(demoPost PROPERTIES ) TARGET_LINK_LIBRARIES(demoPost ${link_libraries}) INSTALL(TARGETS demoPost - LIBRARY DESTINATION ${plugin_install_dir}) + LIBRARY DESTINATION ${binding_install_dir}) ################################################## # HelloWorld @@ -47,7 +47,7 @@ SET_TARGET_PROPERTIES(helloWorld PROPERTIES ) TARGET_LINK_LIBRARIES(helloWorld ${link_libraries}) INSTALL(TARGETS helloWorld - LIBRARY DESTINATION ${plugin_install_dir}) + LIBRARY DESTINATION ${binding_install_dir}) ################################################## # tic-tac-toe @@ -59,5 +59,5 @@ SET_TARGET_PROPERTIES(tic-tac-toe PROPERTIES ) TARGET_LINK_LIBRARIES(tic-tac-toe ${link_libraries}) INSTALL(TARGETS tic-tac-toe - LIBRARY DESTINATION ${plugin_install_dir}) + LIBRARY DESTINATION ${binding_install_dir}) diff --git a/plugins/samples/DemoContext.c b/bindings/samples/DemoContext.c similarity index 100% rename from plugins/samples/DemoContext.c rename to bindings/samples/DemoContext.c diff --git a/plugins/samples/DemoPost.c b/bindings/samples/DemoPost.c similarity index 100% rename from plugins/samples/DemoPost.c rename to bindings/samples/DemoPost.c diff --git a/plugins/samples/HelloWorld.c b/bindings/samples/HelloWorld.c similarity index 100% rename from plugins/samples/HelloWorld.c rename to bindings/samples/HelloWorld.c diff --git a/bindings/samples/export.map b/bindings/samples/export.map new file mode 100644 index 00000000..0ef1ac79 --- /dev/null +++ b/bindings/samples/export.map @@ -0,0 +1 @@ +{ global: afbBindingV1Register; local: *; }; diff --git a/plugins/samples/tic-tac-toe.c b/bindings/samples/tic-tac-toe.c similarity index 94% rename from plugins/samples/tic-tac-toe.c rename to bindings/samples/tic-tac-toe.c index 31682d94..0100fc05 100644 --- a/plugins/samples/tic-tac-toe.c +++ b/bindings/samples/tic-tac-toe.c @@ -20,12 +20,12 @@ #include #include -#include +#include /* * the interface to afb-daemon */ -const struct AFB_interface *afbitf; +const struct afb_binding_interface *afbitf; /* * definition of waiters @@ -567,7 +567,7 @@ static void wait(struct afb_req req) /* * array of the verbs exported to afb-daemon */ -static const struct AFB_verb_desc_v1 plugin_verbs[] = { +static const struct afb_verb_desc_v1 binding_verbs[] = { /* VERB'S NAME SESSION MANAGEMENT FUNCTION TO CALL SHORT DESCRIPTION */ { .name= "new", .session= AFB_SESSION_NONE, .callback= new, .info= "Starts a new game" }, { .name= "play", .session= AFB_SESSION_NONE, .callback= play, .info= "Asks the server to play" }, @@ -581,25 +581,25 @@ static const struct AFB_verb_desc_v1 plugin_verbs[] = { }; /* - * description of the plugin for afb-daemon + * description of the binding for afb-daemon */ -static const struct AFB_plugin plugin_description = +static const struct afb_binding binding_description = { /* description conforms to VERSION 1 */ - .type= AFB_PLUGIN_VERSION_1, - .v1= { /* fills the v1 field of the union when AFB_PLUGIN_VERSION_1 */ - .prefix= "tictactoe", /* the API name (or plugin name or prefix) */ - .info= "Sample tac-tac-toe game", /* short description of of the plugin */ - .verbs = plugin_verbs /* the array describing the verbs of the API */ + .type= AFB_BINDING_VERSION_1, + .v1= { /* fills the v1 field of the union when AFB_BINDING_VERSION_1 */ + .prefix= "tictactoe", /* the API name (or binding name or prefix) */ + .info= "Sample tac-tac-toe game", /* short description of of the binding */ + .verbs = binding_verbs /* the array describing the verbs of the API */ } }; /* - * activation function for registering the plugin called by afb-daemon + * activation function for registering the binding called by afb-daemon */ -const struct AFB_plugin *pluginAfbV1Register(const struct AFB_interface *itf) +const struct afb_binding *afbBindingV1Register(const struct afb_binding_interface *itf) { afbitf = itf; // records the interface for accessing afb-daemon - return &plugin_description; // returns the description of the plugin + return &binding_description; // returns the description of the binding } diff --git a/doc/FAQ.html b/doc/FAQ.html index 0cad0b5b..e5f64273 100644 --- a/doc/FAQ.html +++ b/doc/FAQ.html @@ -16,7 +16,7 @@

Frequently Asked Question about AFB-DAEMON

José Bollo

-

27 mai 2016

+

10 juin 2016