X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=bindings%2Fsamples%2Ftic-tac-toe.c;fp=plugins%2Fsamples%2Ftic-tac-toe.c;h=0100fc058fa4b5c178d8561b4b3241a51c7ca2bb;hb=7059e59cddc1c81321639875636e88895bc14309;hp=31682d941eb77631548eab03ae8bb239cf2eac46;hpb=ef908d903929988ad01f9df94415fc9c3ddebcac;p=src%2Fapp-framework-binder.git 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 }