Update copyright dates
[src/app-framework-binder.git] / src / afb-perm.h
index e6df93c..0be0004 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Copyright (C) 2017 "IoT.bzh"
- * Author José Bollo <jose.bollo@iot.bzh>
+ * Copyright (C) 2015-2020 "IoT.bzh"
+ * Author: José Bollo <jose.bollo@iot.bzh>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 #pragma once
 
-struct afb_perm;
+#include <sys/types.h>
 
-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
+);