X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fgenskel%2Fgenskel.c;h=8afb70b624908a8f09018ae1b88af95ba73d4bb4;hb=02f7d876553d278f73e5d57603d1d20a11cd16ea;hp=7b7dafac6e5e6459e0d572b340373e6796b4f2fb;hpb=ae6f684d830871e81b0b4168424f6a4873eabbff;p=src%2Fapp-framework-binder.git diff --git a/src/genskel/genskel.c b/src/genskel/genskel.c index 7b7dafac..8afb70b6 100644 --- a/src/genskel/genskel.c +++ b/src/genskel/genskel.c @@ -64,14 +64,15 @@ struct path struct json_object *root = NULL; struct json_object *d_perms = NULL; struct json_object *a_perms = NULL; +const char *preinit = NULL; const char *init = NULL; -const char *start = NULL; const char *onevent = NULL; const char *api = NULL; const char *scope = NULL; const char *prefix = NULL; const char *postfix = NULL; int priv = -1; +int noconc = -1; /** * Search for a reference of type "#/a/b/c" int the @@ -441,7 +442,7 @@ void print_session(struct json_object *p) s = p ? get_session(p) : 0; c = 1; if (s & SESSION_CHECK) { - printf("%s", "|AFB_SESSION_CHECK" + c); + printf("%s", "|AFB_SESSION_CHECK_V2" + c); c = 0; } if (s & SESSION_LOA_3 & ~SESSION_LOA_2) @@ -453,19 +454,19 @@ void print_session(struct json_object *p) else l = 0; if (l) { - printf("%s%d", "|AFB_SESSION_LOA_GE_" + c, l); + printf("%s%d_V2", "|AFB_SESSION_LOA_" + c, l); c = 0; } if (s & SESSION_CLOSE) { - printf("%s", "|AFB_SESSION_CLOSE" + c); + printf("%s", "|AFB_SESSION_CLOSE_V2" + c); c = 0; } if (s & SESSION_RENEW) { - printf("%s", "|AFB_SESSION_RENEW" + c); + printf("%s", "|AFB_SESSION_REFRESH_V2" + c); c = 0; } if (c) - printf("AFB_SESSION_NONE"); + printf("AFB_SESSION_NONE_V2"); } void print_verb(const char *name) @@ -586,13 +587,14 @@ void process(char *filename) /* get some names */ getvar(&api, "#/info/x-binding-c-generator/api", NULL); + getvar(&preinit, "#/info/x-binding-c-generator/preinit", NULL); getvar(&init, "#/info/x-binding-c-generator/init", NULL); - getvar(&start, "#/info/x-binding-c-generator/start", NULL); getvar(&onevent, "#/info/x-binding-c-generator/onevent", NULL); getvar(&scope, "#/info/x-binding-c-generator/scope", "static"); getvar(&prefix, "#/info/x-binding-c-generator/prefix", "afb_verb_"); getvar(&postfix, "#/info/x-binding-c-generator/postfix", "_cb"); getvarbool(&priv, "#/info/x-binding-c-generator/private", 0); + getvarbool(&noconc, "#/info/x-binding-c-generator/noconcurrency", 0); getvar(&api, "#/info/title", "?"); /* get the API name */ @@ -623,9 +625,10 @@ void process(char *filename) " .api = \"%s\",\n" " .specification = _afb_description_v2_%s,\n" " .verbs = _afb_verbs_v2_%s,\n" + " .preinit = %s,\n" " .init = %s,\n" - " .start = %s,\n" " .onevent = %s,\n" + " .noconcurrency = %d\n" "};\n" "\n" , priv ? "static " : "" @@ -634,9 +637,10 @@ void process(char *filename) , api , api , api + , preinit ?: "NULL" , init ?: "NULL" - , start ?: "NULL" , onevent ?: "NULL" + , !!noconc ); /* clean up */