Improve plugin logic, pass plugins count to session
[src/app-framework-binder.git] / include / local-def.h
index 961fdd2..22a3608 100644 (file)
@@ -107,6 +107,14 @@ typedef struct {
 
 typedef enum  {AFB_POST_NONE=0, AFB_POST_JSON, AFB_POST_FORM} AFB_PostType;
 
+// Post Upload File Handle
+typedef struct {
+   int   fd; 
+   char *path; 
+   int  errcode;
+   json_object* jresp;
+} AFB_PostCtx;
+
 typedef  struct {
     int  len;   // post element size
     char *data; // post data in raw format
@@ -253,6 +261,7 @@ typedef struct {
   int  fakemod;           // respond to GET/POST request without interacting with sndboard
   int  forceexit;         // when autoconfig from script force exit before starting server
   AFB_plugin **plugins;   // pointer to REST/API plugins 
+  int pluginCount;        // loaded plugins count
   magic_t  magic;         // Mime type file magic lib
   sigjmp_buf restartCkpt; // context save for restart set/longjmp
 } AFB_session;