/*
Copyright 2015 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.
You may obtain a copy of the License at
#include <libxml/tree.h>
-#include "config.h"
struct filedesc;
extern const char *file_get_prop(struct filedesc *file, const char *name);
/**************************************************************/
-/* from wgtpkg-verbose */
-extern int verbosity;
-#define warning(...) do{if(verbosity)syslog(LOG_WARNING,__VA_ARGS__);}while(0)
-#define notice(...) do{if(verbosity)syslog(LOG_NOTICE,__VA_ARGS__);}while(0)
-#define info(...) do{if(verbosity)syslog(LOG_INFO,__VA_ARGS__);}while(0)
-#define debug(...) do{if(verbosity>1)syslog(LOG_DEBUG,__VA_ARGS__);}while(0)
-extern int verbose_scan_args(int argc, char **argv);
+/* from wgtpkg-permission */
+
+extern int is_standard_permission(const char *name);
+extern void reset_permissions();
+extern void crop_permissions(unsigned level);
+extern void grant_permission_list(const char *list);
+extern int permission_exists(const char *name);
+extern int request_permission(const char *name);
+extern const char *first_usable_permission();
+extern const char *next_usable_permission();
/**************************************************************/
/* from wgtpkg-workdir */
-extern int enter_workdir(int clean);
+extern char workdir[PATH_MAX];
+extern int workdirfd;
extern void remove_workdir();
-extern int make_workdir(int reuse);
extern int set_workdir(const char *name, int create);
+extern int make_workdir_base(const char *root, const char *prefix, int reuse);
+extern int make_workdir(int reuse);
+extern int move_workdir(const char *dest, int parents, int force);
/**************************************************************/
/* from wgtpkg-xmlsec */