* add more module handlers:
[citadel.git] / webcit / webcit.h
index f0e19f6ddaf077d2fb9b403a39a4c47baeefa715..1efdeec091589fb36e8cb1f3a598f78508486306 100644 (file)
@@ -347,6 +347,7 @@ struct wcsession {
        int http_sock;                          /**< HTTP server socket */
        int serv_sock;                          /**< Client socket to Citadel server */
        StrBuf *ReadBuf;                        /**< here we keep our stuff while reading linebuffered from the server. */
+       StrBuf *MigrateReadLineBuf;             /**< here we buffer legacy server read stuff */
        const char *ReadPos;                    /**< whats our read position in ReadBuf? */
        int chat_sock;                          /**< Client socket to Citadel server - for chat */
        time_t lastreq;                         /**< Timestamp of most recent HTTP */
@@ -363,6 +364,7 @@ struct wcsession {
        StrBuf *this_page;                      /**< URL of current page */
        HashList *urlstrings;                   /**< variables passed to webcit in a URL */
        HashList *vars;                         /**< HTTP variable substitutions for this page */
+       HashList *headers;                      /**< the headers the client sent us */
        StrBuf *http_host;                      /**< HTTP Host: header */
        int is_ajax;                            /** < are we doing an ajax request? */
        int gzip_ok;                            /**< Nonzero if Accept-encoding: gzip */
@@ -370,6 +372,7 @@ struct wcsession {
 
        StrBuf *trailing_javascript;            /**< extra javascript to be appended to page */
        char ImportantMessage[SIZ];             /**< ??? todo */
+       StrBuf *ImportantMsg;
 
 /* accounting */
        StrBuf *wc_username;                    /**< login name of current user */
@@ -386,7 +389,7 @@ struct wcsession {
        int need_vali;                          /**< New users require validation. */
 
 /* Preferences */
-       char cs_inet_email[256];                /**< User's preferred Internet addr. */
+       StrBuf *cs_inet_email;                  /**< User's preferred Internet addr. */
        char reply_to[512];                     /**< reply-to address */
        HashList *hash_prefs;                   /**< WebCit preferences for this user */
        StrBuf *DefaultCharset;                 /**< Charset the user preferes */
@@ -508,10 +511,6 @@ extern int setup_wizard;
 extern char wizard_filename[];
 extern time_t if_modified_since;
 extern int follow_xff;
-extern HashList *HandlerHash;
-extern HashList *PreferenceHooks;
-extern HashList *ZoneHash;
-extern HashList *SortHash;
 
 void InitialiseSemaphores(void);
 void begin_critical_section(int which_one);
@@ -541,7 +540,6 @@ int uds_connectsock(char *);
 int tcp_connectsock(char *, char *);
 int serv_getln(char *strbuf, int bufsize);
 int StrBuf_ServGetln(StrBuf *buf);
-int StrBuf_ServGetlnBuffered(StrBuf *buf);
 int GetServerStatus(StrBuf *Line, long* FullState);
 void serv_puts(const char *string);
 void who(void);
@@ -615,13 +613,12 @@ void serv_gets(char *strbuf);
 void serv_write(const char *buf, int nbytes);
 void serv_putbuf(const StrBuf *string);
 void serv_printf(const char *format,...)__attribute__((__format__(__printf__,1,2)));
-void load_floorlist(void);
+void load_floorlist(StrBuf *Buf);
 void shutdown_sessions(void);
 void do_housekeeping(void);
 void smart_goto(const StrBuf *);
 void worker_entry(void);
-void session_loop(HashList *HTTPHeaders, 
-                 StrBuf *ReqLine, 
+void session_loop(StrBuf *ReqLine, 
                  StrBuf *ReqType, 
                  StrBuf *ReadBuf, 
                  const char **Pos);
@@ -645,8 +642,13 @@ void remove_token(char *source, int parmnum, char separator);
 StrBuf *load_mimepart(long msgnum, char *partnum);
 void MimeLoadData(wc_mime_attachment *Mime);
 int pattern2(char *search, char *patn);
-void do_edit_vcard(long, char *, char *, const char *);
-void select_user_to_edit(char *message, char *preselect);
+void do_edit_vcard(long msgnum, char *partnum, 
+                  message_summary *VCMsg,
+                  wc_mime_attachment *VCAtt,
+                  char *return_to, 
+                  const char *force_room);
+
+void select_user_to_edit(const char *preselect);
 void delete_user(char *);
 void do_change_view(int);
 void folders(void);
@@ -711,8 +713,9 @@ int read_server_binary(StrBuf *Ret, size_t total_len, StrBuf *Buf);
 int StrBuf_ServGetBLOB(StrBuf *buf, long BlobSize);
 int StrBuf_ServGetBLOBBuffered(StrBuf *buf, long BlobSize);
 int read_server_text(StrBuf *Buf, long *nLines);
-int goto_config_room(void);
-long locate_user_vcard_in_this_room(void);
+int goto_config_room(StrBuf *Buf);
+long locate_user_vcard_in_this_room(message_summary **VCMsg,
+                                   wc_mime_attachment **VCAtt);
 void sleeeeeeeeeep(int);
 void http_transmit_thing(const char *content_type, int is_static);
 long unescape_input(char *buf);