X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fapp-framework-binder.git;a=blobdiff_plain;f=src%2Fafb-api.h;h=70bf3c3431e9e7ac2e8148251b5e51e4f86c4904;hp=6dfbf020180b35dd2b4dc5c44075bcc020feb63e;hb=65353dce81a629e042800bb7b86fcd869a76727e;hpb=a8e971702f23ee67e02b4716ad4159f12cefdca6 diff --git a/src/afb-api.h b/src/afb-api.h index 6dfbf020..70bf3c34 100644 --- a/src/afb-api.h +++ b/src/afb-api.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016, 2017 "IoT.bzh" + * Copyright (C) 2015-2020 "IoT.bzh" * Author: José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,20 +19,33 @@ struct afb_xreq; struct afb_apiset; +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); +#if WITH_AFB_HOOK void (*update_hooks)(void *closure); - int (*get_verbosity)(void *closure); - void (*set_verbosity)(void *closure, int level); +#endif + int (*get_logmask)(void *closure); + void (*set_logmask)(void *closure, int level); + void (*describe)(void *closure, void (*describecb)(void *, struct json_object *), void *clocb); + 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); + +static inline int afb_api_is_public(const char *name) +{ + return *name != '.'; +} + +