X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=include%2Flocal-def.h;h=d8010c1c587f62975f20a931aae544783b262705;hb=446e0a75684131f2f2fec251775db9ee450003ec;hp=8fe87d0cc7bce3dfac7fc33b6d5cbef196218a07;hpb=4db4634b28378379bce04f4073c2a511b92b1ee6;p=src%2Fapp-framework-binder.git diff --git a/include/local-def.h b/include/local-def.h index 8fe87d0c..d8010c1c 100644 --- a/include/local-def.h +++ b/include/local-def.h @@ -64,7 +64,7 @@ typedef int BOOL; #define FAILED -1 // prebuild json error are constructed in config.c -typedef enum { AFB_FALSE, AFB_TRUE, AFB_FATAL, AFB_FAIL, AFB_WARNING, AFB_EMPTY, AFB_SUCCESS} AFB_error; +typedef enum { AFB_FALSE, AFB_TRUE, AFB_FATAL, AFB_FAIL, AFB_WARNING, AFB_EMPTY, AFB_SUCCESS, AFB_DONE} AFB_error; extern char *ERROR_LABEL[]; #define ERROR_LABEL_DEF {"false", "true","fatal", "fail", "warning", "empty", "success"} @@ -110,6 +110,7 @@ typedef struct { char *plugin; char *api; char *post; + json_object *jresp; struct MHD_Connection *connection; sigjmp_buf checkPluginCall; // context save for timeout set/longjmp } AFB_request; @@ -147,6 +148,11 @@ typedef struct { char *help; // help text } AFB_options; +typedef struct { + int len; // command number within application + json_object *jtype; +} AFB_privateApi; + typedef json_object* (*AFB_apiCB)(); // API definition @@ -155,6 +161,7 @@ typedef struct { AFB_apiCB callback; char *info; void * handle; + AFB_privateApi *private; } AFB_restapi; // Plugin definition