Merge pull request #49 from RowanHeinrich/patch-5
[matches/MCTX3420.git] / server / fastcgi.h
index af56301..74468ae 100644 (file)
@@ -39,7 +39,19 @@ typedef struct FCGIValue {
        unsigned flags;
 } FCGIValue;
 
-typedef struct FCGIContext FCGIContext;
+/**Contextual information related to FCGI requests*/
+typedef struct  
+{
+       /**The time of last valid user access possessing the control key*/
+       time_t control_timestamp;
+       char control_key[41];
+       char control_ip[16];
+       /**The name of the current module**/
+       const char *current_module;
+       /**For debugging purposes?**/
+       int response_number;
+} FCGIContext;
+
 typedef void (*ModuleHandler) (FCGIContext *context, char *params);
 
 extern void FCGI_LockControl(FCGIContext *context, bool force);
@@ -59,6 +71,8 @@ extern void FCGI_RejectJSONEx(FCGIContext *context, StatusCodes status, const ch
 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.

UCC git Repository :: git.ucc.asn.au