summaryrefslogtreecommitdiffstats
path: root/include/local-def.h
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2015-12-09 15:47:22 +0100
committerFulup Ar Foll <fulup@iot.bzh>2015-12-09 15:47:22 +0100
commitf51e658a95edeb35b7b3027f7f066d3af0de04c7 (patch)
treec3f1e246a9da867c6fec7d355c86cd903f73d65a /include/local-def.h
parentb55efc33fb8df8b0518570b2584b6da9abb3221b (diff)
Implemented --alias and made timeout reentrant
Diffstat (limited to 'include/local-def.h')
-rw-r--r--include/local-def.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/local-def.h b/include/local-def.h
index 72c51dea..70d7762c 100644
--- a/include/local-def.h
+++ b/include/local-def.h
@@ -35,6 +35,10 @@
#include <json.h>
#include <microhttpd.h>
#include <magic.h>
+#include <setjmp.h>
+#include <signal.h>
+
+
#define AJQ_VERSION "0.1"
@@ -43,6 +47,7 @@
// Note: because of a bug in libmagic MAGIC_DB NULL should not be used for default
#define MAGIC_DB "/usr/share/misc/magic.mgc"
#define OPA_INDEX "index.html"
+#define MAX_ALIAS 10 // max number of aliases
typedef int BOOL;
#ifndef FALSE
@@ -88,6 +93,12 @@ typedef struct {
int fd;
} AFB_staticfile;
+typedef struct {
+ char *url;
+ char *path;
+ size_t len;
+} AFB_aliasdir;
+
// some usefull static object initialized when entering listen loop.
extern int verbose;
@@ -98,6 +109,7 @@ typedef struct {
char *api;
char *post;
struct MHD_Connection *connection;
+ sigjmp_buf checkPluginCall; // context save for timeout set/longjmp
} AFB_request;
typedef struct {
@@ -122,6 +134,7 @@ typedef struct {
uid_t setuid;
int cacheTimeout;
int apiTimeout;
+ AFB_aliasdir *aliasdir; // alias mapping for icons,apps,...
} AFB_config;
// Command line structure hold cli --command + help text