]> code.citadel.org Git - citadel.git/blobdiff - webcit/webcit.h
* Moved the definition of INADDR_NONE to webcit.h, where it will be effective
[citadel.git] / webcit / webcit.h
index 23d5574b5d32509f604463caf36e051c33ede22d..97ed8524583543c2a531a8a279a6d529d8d0d641 100644 (file)
 #include <signal.h>
 #include <sys/utsname.h>
 
+#ifndef INADDR_NONE
+#define INADDR_NONE 0xffffffff
+#endif
+
 #ifdef HAVE_ICONV
 #include <iconv.h>
 #endif
 #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 v6.21"  /* who's in da house */
+#define SERVER                 "WebCit v6.31"  /* who's in da house */
 #define DEVELOPER_ID           0
 #define CLIENT_ID              4
-#define CLIENT_VERSION         621             /* This version of WebCit */
-#define MINIMUM_CIT_VERSION    654             /* min required Citadel vers */
+#define CLIENT_VERSION         631             /* This version of WebCit */
+#define MINIMUM_CIT_VERSION    661             /* min required Citadel ver. */
 #define DEFAULT_HOST           "localhost"     /* Default Citadel server */
 #define DEFAULT_PORT           "504"
 #define LB                     (1)             /* Internal escape chars */
 #define UA_ZAPPED             16
 
 
+/*
+ * User flags (from Citadel)
+ */
+#define US_NEEDVALID   1               /* User needs to be validated       */
+#define US_PERM                4               /* Permanent user                   */
+#define US_LASTOLD     16              /* Print last old message with new  */
+#define US_EXPERT      32              /* Experienced user                 */
+#define US_UNLISTED    64              /* Unlisted userlog entry           */
+#define US_NOPROMPT    128             /* Don't prompt after each message  */
+#define US_PROMPTCTL   256             /* <N>ext & <S>top work at prompt   */
+#define US_DISAPPEAR   512             /* Use "disappearing msg prompts"   */
+#define US_REGIS       1024            /* Registered user                  */
+#define US_PAGINATOR   2048            /* Pause after each screen of text  */
+#define US_INTERNET    4096            /* Internet mail privileges         */
+#define US_FLOORS      8192            /* User wants to see floors         */
+#define US_COLOR       16384           /* User wants ANSI color support    */
+#define US_USER_SET    (US_LASTOLD | US_EXPERT | US_UNLISTED | \
+                       US_NOPROMPT | US_DISAPPEAR | US_PAGINATOR | \
+                       US_FLOORS | US_COLOR | US_PROMPTCTL )
 
 
 
@@ -304,6 +327,7 @@ struct wcsession {
        size_t burst_len;
        char *burst;
        int gzip_ok;                    /* Nonzero if Accept-encoding: gzip */
+       int is_mailbox;                 /* the current room is a private mailbox */
 };
 
 #define num_parms(source)              num_tokens(source, '|')
@@ -324,10 +348,10 @@ extern char *axdefs[];
 extern char *ctdlhost, *ctdlport;
 extern char *server_cookie;
 extern int is_https;
-extern char request_method[];
 extern int setup_wizard;
 extern char wizard_filename[];
 extern time_t if_modified_since;
+extern int follow_xff;
 void do_setup_wizard(void);
 
 void stuff_to_cookie(char *cookie, int session,
@@ -336,8 +360,6 @@ void cookie_to_stuff(char *cookie, int *session,
                 char *user, size_t user_len,
                 char *pass, size_t pass_len,
                 char *room, size_t room_len);
-char *bmstrstr(char *text, char *pattern,
-        int (*cmpfunc)(const char *, const char *, size_t) );
 void locate_host(char *, int);
 void become_logged_in(char *, char *, char *);
 void do_login(void);
@@ -356,8 +378,9 @@ int tcp_connectsock(char *, char *);
 void serv_getln(char *strbuf, int bufsize);
 void serv_puts(char *string);
 void who(void);
-void who_inner_html(void);
-void fmout(FILE *fp, char *align);
+void who_inner_div(void);
+void fmout(char *align);
+void pullquote_fmout(void);
 void wDumpContent(int);
 void serv_printf(const char *format,...);
 char *bstr(char *key);
@@ -369,7 +392,6 @@ void output_headers(    int do_httpheaders,
                        int do_htmlhead,
                        int do_room_banner,
                        int unset_cookies,
-                       int refresh30,
                        int suppress_check,
                        int cache);
 void wprintf(const char *format,...);
@@ -388,7 +410,8 @@ void embed_main_menu(void);
 void serv_read(char *buf, int bytes);
 int haschar(char *, char);
 void readloop(char *oper);
-void embed_message(void);
+void embed_message(char *msgnum_as_string);
+void print_message(char *msgnum_as_string);
 void text_to_server(char *ptr, int convert_to_html);
 void display_enter(void);
 void post_message(void);
@@ -447,6 +470,7 @@ void display_siteconfig(void);
 void siteconfig(void);
 void display_generic(void);
 void do_generic(void);
+void ajax_servcmd(void);
 void display_menubar(int);
 void smart_goto(char *);
 void worker_entry(void);
@@ -483,7 +507,6 @@ void edituser(void);
 void do_change_view(int);
 void change_view(void);
 void folders(void);
-void do_stuff_to_msgs(void);
 void load_preferences(void);
 void save_preferences(void);
 void get_preference(char *key, char *value, size_t value_len);
@@ -503,6 +526,7 @@ void rename_floor(void);
 void do_listsub(void);
 void toggle_self_service(void);
 void summary(void);
+void summary_inner_div(void);
 ssize_t write(int fd, const void *buf, size_t count);
 void cal_process_attachment(char *part_source, long msgnum, char *cal_partnum);
 void display_calendar(long msgnum);
@@ -522,6 +546,10 @@ void save_inetconf(void);
 void generate_uuid(char *);
 void display_preferences(void);
 void set_preferences(void);
+void recp_autocomplete(char *);
+void begin_ajax_response(void);
+void end_ajax_response(void);
+void initialize_viewdefs(void);
 
 #ifdef WEBCIT_WITH_CALENDAR_SERVICE
 void display_edit_task(void);
@@ -557,7 +585,7 @@ void display_customize_iconbar(void);
 void commit_iconbar(void);
 int CtdlDecodeQuotedPrintable(char *decoded, char *encoded, int sourcelen);
 void spawn_another_worker_thread(void);
-void display_rss(const char *roomname);
+void display_rss(char *roomname, char *request_method);
 
 void embed_room_banner(char *, int);
 /* navbar types that can be passed to embed_room_banner */
@@ -583,11 +611,15 @@ int ZEXPORT compress_gzip(Bytef * dest, uLongf * destLen,
                           const Bytef * source, uLong sourceLen, int level);
 #endif
 
+#ifdef HAVE_ICONV
+void utf8ify_rfc822_string(char *buf);
+#endif
 
 void begin_burst(void);
 void end_burst(void);
 
 extern char *ascmonths[];
+extern char *hourname[];
 void http_datestring(char *buf, size_t n, time_t xtime);
 
 /* Views (from citadel.h) */
@@ -602,3 +634,4 @@ void http_datestring(char *buf, size_t n, time_t xtime);
 /* These should be empty, but we have them for testing */
 #define DEFAULT_HTTPAUTH_USER  ""
 #define DEFAULT_HTTPAUTH_PASS  ""
+