X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=include%2Flocal-def.h;h=22a3608b5b3e37c65ebd8788e1ece2d03170184e;hb=02492357cce066201a11993255120119c2703af1;hp=cbbef0f96d976e59000fbbbd5401fa62bc424a8c;hpb=4e43e3b53482bff8cb835271eb3207aeaf593812;p=src%2Fapp-framework-binder.git diff --git a/include/local-def.h b/include/local-def.h index cbbef0f9..22a3608b 100644 --- a/include/local-def.h +++ b/include/local-def.h @@ -18,6 +18,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifndef LOCAL_DEF_H +#define LOCAL_DEF_H #ifndef _GNU_SOURCE #define _GNU_SOURCE @@ -74,6 +76,8 @@ typedef int BOOL; #define STATIC static #define FAILED -1 +#define AUDIO_BUFFER "/tmp/buf" + extern int verbose; // this is the only global variable // Plugin Type @@ -103,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 @@ -249,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; @@ -256,3 +269,5 @@ typedef struct { #include "proto-def.h" + +#endif /* LOCAL_DEF_H */