X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-api.h;h=60e95b11b814dfbeaa33e2be72607442d0cf9164;hb=cab05ba72abeb335b456b0820e053c94b91986e7;hp=6dfbf020180b35dd2b4dc5c44075bcc020feb63e;hpb=a8e971702f23ee67e02b4716ad4159f12cefdca6;p=src%2Fapp-framework-binder.git diff --git a/src/afb-api.h b/src/afb-api.h index 6dfbf020..60e95b11 100644 --- a/src/afb-api.h +++ b/src/afb-api.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016, 2017 "IoT.bzh" + * Copyright (C) 2016, 2017, 2018 "IoT.bzh" * Author: José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,6 +19,7 @@ struct afb_xreq; struct afb_apiset; +struct json_object; struct afb_api_itf { @@ -27,12 +28,19 @@ struct afb_api_itf void (*update_hooks)(void *closure); int (*get_verbosity)(void *closure); void (*set_verbosity)(void *closure, int level); + struct json_object *(*describe)(void *closure); }; struct afb_api { void *closure; struct afb_api_itf *itf; + const void *group; }; -extern int afb_api_is_valid_name(const char *name); +extern int afb_api_is_valid_name(const char *name, int hookable); + +#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) +