Bindings V2: reintroduce field 'info' for verbs
[src/app-framework-binder.git] / src / genskel / genskel.c
index 58f7a2c..d3d121f 100644 (file)
@@ -72,7 +72,7 @@ const char *scope = NULL;
 const char *prefix = NULL;
 const char *postfix = NULL;
 int priv = -1;
-int conc = -1;
+int noconc = -1;
 
 /**
  * Search for a reference of type "#/a/b/c" int the
@@ -496,6 +496,7 @@ void print_struct_verb(const char *name, struct json_object *obj)
        printf(
                ",\n"
                "        .auth = %s,\n"
+               "        .info = NULL,\n"
                "        .session = "
                , p ? json_object_get_string(decl_perm(p)) : "NULL"
        );
@@ -594,7 +595,7 @@ void process(char *filename)
        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(&conc, "#/info/x-binding-c-generator/concurrent", 0);
+       getvarbool(&noconc, "#/info/x-binding-c-generator/noconcurrency", 0);
        getvar(&api, "#/info/title", "?");
 
        /* get the API name */
@@ -624,11 +625,12 @@ void process(char *filename)
                "%sconst struct afb_binding_v2 %s%s = {\n"
                "    .api = \"%s\",\n"
                "    .specification = _afb_description_v2_%s,\n"
+               "    .info = NULL,\n"
                "    .verbs = _afb_verbs_v2_%s,\n"
                "    .preinit = %s,\n"
                "    .init = %s,\n"
                "    .onevent = %s,\n"
-               "    .concurrent = %d\n"
+               "    .noconcurrency = %d\n"
                "};\n"
                "\n"
                , priv ? "static " : ""
@@ -640,7 +642,7 @@ void process(char *filename)
                , preinit ?: "NULL"
                , init ?: "NULL"
                , onevent ?: "NULL"
-               , !!conc
+               , !!noconc
        );
 
        /* clean up */