diff options
author | José Bollo <jose.bollo@iot.bzh> | 2018-08-02 15:26:59 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2018-08-02 15:49:43 +0200 |
commit | de0527f7cf5b4a4278698ab034a332cf75723300 (patch) | |
tree | c62706f06e295e6e6f7650b1fe6df9c78aaeac27 /src/afb-api-v3.c | |
parent | 5ef271effacb83552f9ea56572c751c2f5a556b6 (diff) |
afb-export: Manage path of libraries
This change allows a binding to know its
installation path. This path is retrieved using
the api function 'afb_api_settings'.
The path is returned --if known-- as a string
of key "binding-path".
Change-Id: Ie1a349dc4936d4ccf173f1f77e118099f7f0599a
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-api-v3.c')
-rw-r--r-- | src/afb-api-v3.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/afb-api-v3.c b/src/afb-api-v3.c index 7f63b6eb..660fac11 100644 --- a/src/afb-api-v3.c +++ b/src/afb-api-v3.c @@ -179,16 +179,16 @@ struct json_object *afb_api_v3_make_description_openAPIv3(struct afb_api_v3 *api return r; } -struct afb_api_v3 *afb_api_v3_create( - struct afb_apiset *declare_set, +struct afb_api_v3 *afb_api_v3_create(struct afb_apiset *declare_set, struct afb_apiset *call_set, const char *apiname, const char *info, int noconcurrency, int (*preinit)(void*, struct afb_api_x3 *), void *closure, - int copy_info -) + int copy_info, + struct afb_export* creator, + const char* path) { struct afb_api_v3 *api; @@ -206,7 +206,7 @@ struct afb_api_v3 *afb_api_v3_create( else api->info = info; - api->export = afb_export_create_v3(declare_set, call_set, apiname, api); + api->export = afb_export_create_v3(declare_set, call_set, apiname, api, creator, path); if (!api->export) goto oom2; @@ -400,6 +400,6 @@ static int init_binding(void *closure, struct afb_api_x3 *api) struct afb_api_v3 *afb_api_v3_from_binding(const struct afb_binding_v3 *desc, struct afb_apiset *declare_set, struct afb_apiset * call_set) { - return afb_api_v3_create(declare_set, call_set, desc->api, desc->info, desc->noconcurrency, init_binding, (void*)desc, 0); + return afb_api_v3_create(declare_set, call_set, desc->api, desc->info, desc->noconcurrency, init_binding, (void*)desc, 0, NULL, NULL); } |