X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=include%2Flocal-def.h;h=2deb8c043060c12eb8e83cb9a2449a0a6d2d35ab;hb=c2560bd51498fb38e645b60ae638e2e888c74b65;hp=f7ddeeb4892af3f55eb3cb4e13530b1b5ed5c075;hpb=1329992e8d922a55d5b55039ba8c700e7801dab5;p=src%2Fapp-framework-binder.git diff --git a/include/local-def.h b/include/local-def.h index f7ddeeb4..2deb8c04 100644 --- a/include/local-def.h +++ b/include/local-def.h @@ -54,7 +54,7 @@ #define MAGIC_DB "/usr/share/misc/magic.mgc" #define OPA_INDEX "index.html" #define MAX_ALIAS 10 // max number of aliases -#define COOKIE_NAME "AJB_session" +#define COOKIE_NAME "afb-session" #define DEFLT_CNTX_TIMEOUT 3600 // default Client Connection Timeout @@ -108,6 +108,7 @@ typedef struct { } AFB_errorT; typedef enum {AFB_POST_NONE=0, AFB_POST_JSON, AFB_POST_FORM, AFB_POST_EMPTY} AFB_PostType; +typedef enum {AFB_MODE_LOCAL=0, AFB_MODE_REMOTE, AFB_MODE_GLOBAL} AFB_Mode; // Post Upload File Handle typedef struct { @@ -183,15 +184,10 @@ typedef struct { int apiTimeout; int cntxTimeout; // Client Session Context timeout int pluginCount; // loaded plugins count + AFB_Mode mode; // mode of listening AFB_aliasdir *aliasdir; // alias mapping for icons,apps,... } AFB_config; -typedef struct { - int len; // command number within application - json_object *jtype; -} AFB_privateApi; - - typedef struct { char *msg; size_t len; @@ -206,7 +202,6 @@ typedef struct { AFB_sessionE session; AFB_apiCB callback; char *info; - AFB_privateApi *privateapi; } AFB_restapi; // Plugin definition @@ -263,6 +258,7 @@ typedef struct { void *httpd; // anonymous structure for httpd handler int fakemod; // respond to GET/POST request without interacting with sndboard int forceexit; // when autoconfig from script force exit before starting server + int readyfd; // a #fd to signal when ready to serve AFB_plugin **plugins; // pointer to REST/API plugins magic_t magic; // Mime type file magic lib sigjmp_buf restartCkpt; // context save for restart set/longjmp