#undef PACKAGE_BUGREPORT
#include "sysdep.h"
-
+////////#include "hash.h"
#ifdef HAVE_OPENSSL
/* Work around RedHat's b0rken OpenSSL includes */
#define PORT_NUM 2000 /* port number to listen on */
#define DEVELOPER_ID 0
#define CLIENT_ID 4
-#define CLIENT_VERSION 723 /* This version of WebCit */
-#define MINIMUM_CIT_VERSION 723 /* min required Citadel ver. */
+#define CLIENT_VERSION 730 /* This version of WebCit */
+#define MINIMUM_CIT_VERSION 730 /* min required Citadel ver */
+#define LIBCITADEL_MIN 103 /* min required libcitadel ver */
#define DEFAULT_HOST "localhost" /* Default Citadel server */
#define DEFAULT_PORT "504"
#define LB (1) /* Internal escape chars */
#define DEFAULT_MAXMSGS 20
+#ifdef LIBCITADEL_VERSION_NUMBER
+#if LIBCITADEL_VERSION_NUMBER < LIBCITADEL_MIN
+#error libcitadel is too old. Please upgrade it before continuing.
+#endif
+#endif
+
+
/*
* Room flags (from Citadel)
*
#define QR2_SYSTEM 1 /**< System room; hide by default */
#define QR2_SELFLIST 2 /**< Self-service mailing list mgmt */
#define QR2_COLLABDEL 4 /**< Anyone who can post can also delete*/
-#define QR2_SUBJECTREQ 8 /**< Subject strongly recommended */
+#define QR2_SUBJECTREQ 8 /**< Subject strongly recommended */
+#define QR2_SMTP_PUBLIC 16 /* smtp public postable room */
+#define QR2_MODERATED 32 /* Listservice aide has to permit posts */
/**
* user/room access
* \brief information about us ???
*/
struct serv_info {
- int serv_pid; /**< Process ID of the Citadel server */
- char serv_nodename[32]; /**< Node name of the Citadel server */
- char serv_humannode[64]; /**< human readable node name of the Citadel server */
- char serv_fqdn[64]; /**< fully quallified Domain Name (such as uncensored.citadel.org) */
- char serv_software[64]; /**< What version does our connected citadel server use */
- int serv_rev_level; /**< Whats the citadel server revision */
- char serv_bbs_city[64]; /**< Geographic location of the Citadel server */
- char serv_sysadm[64]; /**< Name of system administrator */
- char serv_moreprompt[256]; /**< Whats the commandline textprompt */
- int serv_ok_floors; /**< nonzero == server supports floors */
- int serv_supports_ldap; /**< is the server linked against an ldap tree for adresses? */
- int serv_newuser_disabled; /**< Has the server disabled self-service new user creation? */
- char serv_default_cal_zone[128];/**< Default timezone for unspecified calendar items */
+ int serv_pid; /* Process ID of the Citadel server */
+ char serv_nodename[32]; /* Node name of the Citadel server */
+ char serv_humannode[64]; /* human readable node name of the Citadel server */
+ char serv_fqdn[64]; /* fully quallified Domain Name (such as uncensored.citadel.org) */
+ char serv_software[64]; /* What version does our connected citadel server use */
+ int serv_rev_level; /* Whats the citadel server revision */
+ char serv_bbs_city[64]; /* Geographic location of the Citadel server */
+ char serv_sysadm[64]; /* Name of system administrator */
+ char serv_moreprompt[256]; /* Whats the commandline textprompt */
+ int serv_ok_floors; /* nonzero == server supports floors */
+ int serv_supports_ldap; /* is the server linked against an ldap tree for adresses? */
+ int serv_newuser_disabled; /* Has the server disabled self-service new user creation? */
+ char serv_default_cal_zone[128];/* Default timezone for unspecified calendar items */
+ int serv_supports_sieve; /* Does the server support Sieve mail filtering? */
};
struct wcsubst *vars; /**< HTTP variable substitutions for this page */
char this_page[512]; /**< URL of current page */
char http_host[512]; /**< HTTP Host: header */
- char *preferences; /**< WebCit preferences for this user */
+ HashList *hash_prefs; /**< WebCit preferences for this user */
#ifdef WEBCIT_WITH_CALENDAR_SERVICE
/** \brief ical???? */
struct disp_cal {
void end_critical_section(int which_one);
-void stuff_to_cookie(char *cookie, int session,
+void stuff_to_cookie(char *cookie, size_t clen, int session,
char *user, char *pass, char *room);
void cookie_to_stuff(char *cookie, int *session,
char *user, size_t user_len,
void wDumpContent(int);
void serv_printf(const char *format,...);
char *bstr(char *key);
-void urlesc(char *, char *);
void urlescputs(char *);
-void jsesc(char *, char *);
+void jsesc(char *, size_t, char *);
void jsescputs(char *);
void output_headers( int do_httpheaders,
int do_htmlhead,
void escputs(char *strbuf);
void url(char *buf);
void escputs1(char *strbuf, int nbsp, int nolinebreaks);
-void msgesc(char *target, char *strbuf);
+void msgesc(char *target, size_t tlen, char *strbuf);
void msgescputs(char *strbuf);
void msgescputs1(char *strbuf);
void stripout(char *str, char leftboundary, char rightboundary);
void end_ajax_response(void);
void initialize_viewdefs(void);
void initialize_axdefs(void);
+void burn_folder_cache(time_t age);
void list_all_rooms_by_floor(char *viewpref);
void display_room_directory(void);
void download_file(char *);
#ifdef HAVE_ZLIB
#include <zlib.h>
-int ZEXPORT compress_gzip(Bytef * dest, uLongf * destLen,
+int ZEXPORT compress_gzip(Bytef * dest, size_t * destLen,
const Bytef * source, uLong sourceLen, int level);
#endif
void http_datestring(char *buf, size_t n, time_t xtime);
-/** Views (from citadel.h) */
-#define VIEW_BBS 0 /**< Traditional Citadel BBS view */
-#define VIEW_MAILBOX 1 /**< Mailbox summary */
-#define VIEW_ADDRESSBOOK 2 /**< Address book view */
-#define VIEW_CALENDAR 3 /**< Calendar view */
-#define VIEW_TASKS 4 /**< Tasks view */
-#define VIEW_NOTES 5 /**< Notes view */
-#define VIEW_WIKI 6 /**< Wiki view */
-#define VIEW_CALBRIEF 7 /**< Brief Calendar view */
-#define VIEW_JOURNAL 8 /**< Journal view (not yet implemented in webcit) */
-
/* These should be empty, but we have them for testing */
#define DEFAULT_HTTPAUTH_USER ""
#define DEFAULT_HTTPAUTH_PASS ""