X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=server%2Ffastcgi.h;h=8678a775908c4c07f2ef02496d0d14727617f377;hb=5d57467589ecefdf5bb5985005705a1c8460c623;hp=f0b8bd97f1c80aa13be009fb44348bc696213962;hpb=ef065a355c92c834adcfa49f866d23ef4153cf36;p=matches%2FMCTX3420.git diff --git a/server/fastcgi.h b/server/fastcgi.h index f0b8bd9..8678a77 100644 --- a/server/fastcgi.h +++ b/server/fastcgi.h @@ -17,7 +17,8 @@ typedef enum StatusCodes { STATUS_OK = 1, STATUS_ERROR = -1, STATUS_UNAUTHORIZED = -2, - STATUS_OUTOFRANGE = -3 + STATUS_NOTRUNNING = -3, + STATUS_ALREADYEXISTS = -4 } StatusCodes; #define FCGI_PARAM_REQUIRED (1 << 0) @@ -41,8 +42,8 @@ typedef struct FCGIValue { typedef struct FCGIContext FCGIContext; typedef void (*ModuleHandler) (FCGIContext *context, char *params); -extern void FCGI_BeginControl(FCGIContext *context, bool force); -extern void FCGI_EndControl(FCGIContext *context); +extern void FCGI_LockControl(FCGIContext *context, bool force); +extern void FCGI_ReleaseControl(FCGIContext *context); extern bool FCGI_HasControl(FCGIContext *context, const char *key); extern char *FCGI_KeyPair(char *in, const char **key, const char **value); extern bool FCGI_ParseRequest(FCGIContext *context, char *params, FCGIValue values[], size_t count); @@ -54,10 +55,12 @@ extern void FCGI_JSONBool(const char *key, bool value); extern void FCGI_JSONKey(const char *key); extern void FCGI_PrintRaw(const char *format, ...); extern void FCGI_EndJSON(); -extern char *FCGI_EscapeJSON(char *buf); extern void FCGI_RejectJSONEx(FCGIContext *context, StatusCodes status, const char *description); +extern char *FCGI_EscapeText(char *buf); extern void *FCGI_RequestLoop (void *data); +extern void FCGI_WriteBinary(void * data, size_t size, size_t num_elem); + /** * Shortcut to calling FCGI_RejectJSONEx. Sets the error code * to STATUS_ERROR.