X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-perm.h;h=0be000417d92c8d0a6d370c9cbc8cfca87343316;hb=65353dce81a629e042800bb7b86fcd869a76727e;hp=e6df93c39f1cf61c8b2c45854b9feddf9a001b11;hpb=5200d7022b34c0be646ae92de8c638c9437c7072;p=src%2Fapp-framework-binder.git diff --git a/src/afb-perm.h b/src/afb-perm.h index e6df93c3..0be00041 100644 --- a/src/afb-perm.h +++ b/src/afb-perm.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2017 "IoT.bzh" - * Author José Bollo + * Copyright (C) 2015-2020 "IoT.bzh" + * Author: José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,10 +17,15 @@ #pragma once -struct afb_perm; +#include -extern struct afb_perm *afb_perm_parse(const char *desc); -extern void afb_perm_addref(struct afb_perm *perm); -extern void afb_perm_unref(struct afb_perm *perm); -extern int afb_perm_check(struct afb_perm *perm, int (*check)(void *closure, const char *name), void *closure); +struct afb_context; +extern int afb_perm_check(struct afb_context *context, const char *permission); + +extern void afb_perm_check_async( + struct afb_context *context, + const char *permission, + void (*callback)(void *closure, int status), + void *closure +);