http.h
changeset 27 1e79b4cc8f1b
parent 10 9daa832ab9c4
--- a/http.h	Sun Jul 06 23:33:24 2008 +0300
+++ b/http.h	Mon Jul 07 04:36:03 2008 +0300
@@ -10,11 +10,16 @@
 enum http_qarg_type {
     QARG_INVALID,   // hqa_addr is NULL, abort parsing
     QARG_INT,       // hqa_addr is a `signed long int`
-    QARG_UINT,      // hqa_addr is an `unsigned long int`
+    QARG_UINT16,    // hqa_addr is an `unsigned short int`
+    QARG_UINT32,    // hqa_addr is an `unsigned int`
+    QARG_UINT64,    // hqa_addr is an `unsigned long long int`
 
     QARG_END,       // last item in the qarg_spec
 };
 
+#define QARG_OPTIONAL 0x00
+#define QARG_REQUIRED 0x01
+
 struct http_qarg {
     // the key to look for
     const char          *hqa_key;
@@ -22,8 +27,11 @@
     // the type of value
     enum http_qarg_type  hqa_type;
 
-    // where to store the value, left unchanged if not found
+    // where to store the value, left unchanged if not specified in the request
     void                *hqa_addr;
+
+    // flags
+    int                  hqa_flags;
 };
 
 /*