]> code.citadel.org Git - citadel.git/blobdiff - webcit/webcit.h
* Finished gzip compression of dynamic pages (when browser supports it)
[citadel.git] / webcit / webcit.h
index 62ed9e26e401e26bceb95c847c3e0fd9d64bc027..4aac82df13adc3984ea2b00c16c34bbf7ebd91f0 100644 (file)
@@ -1,5 +1,9 @@
 /* $Id$ */
 
+#ifdef WITH_ZLIB
+#include <zlib.h>
+#endif
+
 #define SIZ                    4096            /* generic buffer size */
 
 #define TRACE fprintf(stderr, "Checkpoint: %s, %d\n", __FILE__, __LINE__)
 #define SLEEPING               180             /* TCP connection timeout */
 #define WEBCIT_TIMEOUT         900             /* WebCit session timeout */
 #define PORT_NUM               2000            /* port number to listen on */
-#define SERVER                 "WebCit v3.23"  /* who's in da house */
+#define SERVER                 "WebCit v4.00"  /* who's in da house */
 #define DEVELOPER_ID           0
 #define CLIENT_ID              4
-#define CLIENT_VERSION         323
+#define CLIENT_VERSION         400
 #define DEFAULT_HOST           "localhost"     /* Default Citadel server */
 #define DEFAULT_PORT           "504"
 #define LB                     (1)             /* Internal escape chars */
@@ -164,6 +168,10 @@ struct wcsession {
        char this_page[SIZ];            /* address of current page */
        char http_host[SIZ];            /* HTTP Host: header */
        char *preferences;
+#ifdef WITH_ZLIB
+       int gzcompressed;               /* nonzero if compressed output */
+       gzFile gzfd;                    /* stream to send compressed */
+#endif
 };
 
 #define extract(dest,source,parmnum)   extract_token(dest,source,parmnum,'|')
@@ -285,7 +293,7 @@ void display_menubar(int);
 void embed_room_banner(char *);
 void smart_goto(char *);
 void worker_entry(void);
-void session_loop(struct httprequest *);
+void session_loop(struct httprequest *, int gzip);
 void fmt_date(char *buf, time_t thetime);
 void httpdate(char *buf, time_t thetime);
 void end_webcit_session(void);
@@ -331,3 +339,5 @@ void create_floor(void);
 void rename_floor(void);
 void do_listsub(void);
 void toggle_self_service(void);
+void summary(void);
+ssize_t write(int fd, const void *buf, size_t count);