diff options
author | José Bollo <jose.bollo@iot.bzh> | 2018-04-09 18:16:07 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2018-06-15 17:57:36 +0200 |
commit | 4521c1e7ae5371ab9d639adc617d17fb4e8ded0c (patch) | |
tree | a8a1416a2d58c16ab3993c7e4dc405fc71daab6a /src/afb-api.h | |
parent | 63682b4da9d3e892d1d0a671de860adc43068142 (diff) |
api-v3: First draft
This commit introduces the bindings v3 API for bindings.
The documentation has still to be improved and will come
very soon.
Change-Id: I8f9007370e29f671fdfd1da87fff7372a17db7af
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-api.h')
-rw-r--r-- | src/afb-api.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/afb-api.h b/src/afb-api.h index 3f2e7f15..d03aaca5 100644 --- a/src/afb-api.h +++ b/src/afb-api.h @@ -24,24 +24,21 @@ struct json_object; struct afb_api_itf { void (*call)(void *closure, struct afb_xreq *xreq); - int (*service_start)(void *closure, int share_session, int onneed, struct afb_apiset *apiset); + int (*service_start)(void *closure, int share_session, int onneed); void (*update_hooks)(void *closure); - int (*get_verbosity)(void *closure); - void (*set_verbosity)(void *closure, int level); + int (*get_logmask)(void *closure); + void (*set_logmask)(void *closure, int level); struct json_object *(*describe)(void *closure); void (*unref)(void *closure); }; -struct afb_api +struct afb_api_item { void *closure; struct afb_api_itf *itf; const void *group; }; -extern int afb_api_is_valid_name(const char *name, int hookable); +extern int afb_api_is_valid_name(const char *name); -#define AFB_API_UNHOOKABLE_PREFIX_CHAR '$' -#define AFB_API_UNHOOKABLE_PREFIX_STRING "$" -#define afb_api_is_hookable(api) ((api)[0] != AFB_API_UNHOOKABLE_PREFIX_CHAR) |