* don't nail upload hellos to .gif as we don't need that anymore
[citadel.git] / webcit / webcit.h
index 1c8397df9bf91796629f300b76bb2ca0b1692468..a616dc89b908c70f4d038a66fd2440f33623ddf3 100644 (file)
@@ -100,7 +100,7 @@ extern locale_t wc_locales[];
 #undef PACKAGE_BUGREPORT
 #include "sysdep.h"
 
-
+////////#include "hash.h"
 
 #ifdef HAVE_OPENSSL
 /* Work around RedHat's b0rken OpenSSL includes */
@@ -122,8 +122,9 @@ extern locale_t wc_locales[];
 #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          104             /* min required libcitadel ver */
 #define DEFAULT_HOST           "localhost"     /* Default Citadel server */
 #define DEFAULT_PORT           "504"
 #define LB                     (1)             /* Internal escape chars */
@@ -139,6 +140,13 @@ extern locale_t wc_locales[];
 #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)
  *
@@ -326,15 +334,6 @@ struct folder {
        int num_rooms;  /**< If this is a floor, how many rooms does it have */
 };
 
-
-/* Linked list member for a list of webcit preferences for a user
- */
-struct wcpref {
-       struct wcpref *next;
-       char *pref_key;
-       char *pref_value;
-};
-
 /**
  * \brief One of these is kept for each active Citadel session.
  * HTTP transactions are bound to on e at a time.
@@ -384,6 +383,7 @@ struct wcsession {
        struct wcsubst *vars;                   /**< HTTP variable substitutions for this page */
        char this_page[512];                    /**< URL of current page */
        char http_host[512];                    /**< HTTP Host: header */
+       HashList *hash_prefs;                   /**< WebCit preferences for this user */
 #ifdef WEBCIT_WITH_CALENDAR_SERVICE            
        /** \brief ical???? */                          
        struct disp_cal {                                       
@@ -413,7 +413,6 @@ struct wcsession {
        time_t last_pager_check;                /**< last time we polled for instant msgs */
        int nonce;                              /**< session nonce (to prevent session riding) */
        int time_format_cache;                  /**< which timeformat does our user like? */
-       struct wcpref *first_pref;              /* linked list of preferences */
 };
 
 /** values for WC->current_iconbar */
@@ -511,6 +510,7 @@ void output_headers(    int do_httpheaders,
                        int cache);
 void wprintf(const char *format,...);
 void output_static(char *what);
+void display_mime_icon(void);
 void print_menu_box(char* Title, char *Class, int nLines, ...);
 long stresc(char *target, long tSize, char *strbuf, int nbsp, int nolinebreaks);
 void escputs(char *strbuf);
@@ -727,7 +727,7 @@ char *read_server_text(void);
 int goto_config_room(void);
 long locate_user_vcard(char *username, long usernum);
 void sleeeeeeeeeep(int);
-void http_transmit_thing(char *thing, size_t length, char *content_type,
+void http_transmit_thing(char *thing, size_t length, const char *content_type,
                         int is_static);
 void unescape_input(char *buf);
 void do_iconbar(void);
@@ -743,6 +743,7 @@ void offer_languages(void);
 void set_selected_language(char *);
 void go_selected_language(void);
 void stop_selected_language(void);
+void preset_locale(void);
 void httplang_to_locale(char *LocaleString);
 void tabbed_dialog(int num_tabs, char *tabnames[]);
 void begin_tab(int tabnum, int num_tabs);