]> code.citadel.org Git - citadel.git/blobdiff - webcit/webcit.h
* made *bstr things const
[citadel.git] / webcit / webcit.h
index 2db42708fe08861d7628970253cad69d325b70bf..83f404ac659e87f6d993520797893439ce48497b 100644 (file)
@@ -74,24 +74,7 @@ extern locale_t wc_locales[];
 #include <zlib.h>
 #endif
 
-
-/* Work around PACKAGE/VERSION defs that are (not supposed to be?) in ical.h */
-#ifdef PACKAGE
-# define CTDL_PACKAGE PACKAGE
-# undef PACKAGE
-#endif
-
-#ifdef PACKAGE_STRING
-# define CTDL_PACKAGE_STRING PACKAGE_STRING
-//# undef PACKAGE_STRING
-#endif
-
-#ifdef VERSION
-# define CTDL_VERSION VERSION
-# undef VERSION
-#endif
-
-#include <ical.h>
+#include <libical/ical.h>
 
 #undef PACKAGE
 #undef VERSION
@@ -282,9 +265,9 @@ struct roomlisting {
  * \brief Dynamic content for variable substitution in templates
  */
 typedef struct _wcsubst {
-       int wcs_type;                       /**< which type of ??? */
-       char wcs_key[32];                   /**< ??? what?*/
-       void *wcs_value;                    /**< ???? what?*/
+       int wcs_type;                       /**< which type of Substitution are we */
+       char wcs_key[32];                   /**< copy of our hashkey for debugging */
+       StrBuf *wcs_value;                  /**< if we're a string, keep it here */
        long lvalue;                        /**< type long? keep data here */
        void (*wcs_function)(void); /**< funcion hook ???*/
 } wcsubst;
@@ -485,6 +468,8 @@ struct wcsession {
        StrBuf *UrlFragment2;                   /**< second urlfragment, if NEED_URL is specified by the handler*/
        StrBuf *WBuf;                           /**< Our output buffer */
        StrBuf *HBuf;                           /**< Our HeaderBuffer */
+
+       HashList *ServCfg;                      /**< cache our server config for editing */
 };
 
 /** values for WC->current_iconbar */
@@ -575,36 +560,35 @@ void _fmout(StrBuf *Targt, char *align);
 void pullquote_fmout(void);
 void wDumpContent(int);
 
-
 /* These may return NULL if not foud */
 #define sbstr(a) SBstr(a, sizeof(a) - 1)
 const StrBuf *SBSTR(const char *key);
 const StrBuf *SBstr(const char *key, size_t keylen);
 
 #define xbstr(a, b) (char*) XBstr(a, sizeof(a) - 1, b)
-const char *XBstr(char *key, size_t keylen, size_t *len);
-const char *XBSTR(char *key, size_t *len);
+const char *XBstr(const char *key, size_t keylen, size_t *len);
+const char *XBSTR(const char *key, size_t *len);
 
 #define lbstr(a) LBstr(a, sizeof(a) - 1)
-long LBstr(char *key, size_t keylen);
-long LBSTR(char *key);
+long LBstr(const char *key, size_t keylen);
+long LBSTR(const char *key);
 
 #define ibstr(a) IBstr(a, sizeof(a) - 1)
-int IBstr(char *key, size_t keylen);
-int IBSTR(char *key);
+int IBstr(const char *key, size_t keylen);
+int IBSTR(const char *key);
 
 #define havebstr(a) HaveBstr(a, sizeof(a) - 1)
-int HaveBstr(char *key, size_t keylen);
-int HAVEBSTR(char *key);
+int HaveBstr(const char *key, size_t keylen);
+int HAVEBSTR(const char *key);
 
 #define yesbstr(a) YesBstr(a, sizeof(a) - 1)
-int YesBstr(char *key, size_t keylen);
-int YESBSTR(char *key);
+int YesBstr(const char *key, size_t keylen);
+int YESBSTR(const char *key);
 
 /* TODO: get rid of the non-const-typecast */
 #define bstr(a) (char*) Bstr(a, sizeof(a) - 1)
-const char *BSTR(char *key);
-const char *Bstr(char *key, size_t keylen);
+const char *BSTR(const char *key);
+const char *Bstr(const char *key, size_t keylen);
 
 
 
@@ -658,6 +642,7 @@ void serv_read(char *buf, int bytes);
 void serv_gets(char *strbuf);
 void serv_write(const char *buf, int nbytes);
 void serv_puts(const char *string);
+void serv_putbuf(const StrBuf *string);
 void serv_printf(const char *format,...)__attribute__((__format__(__printf__,1,2)));
 void load_floorlist(void);
 void shutdown_sessions(void);
@@ -694,6 +679,7 @@ void SVPUTBuf(const char *keyname, int keylen, StrBuf *Buf, int ref);
 
 void DoTemplate(const char *templatename, long len, void *Context, StrBuf *Target);
 #define do_template(a, b) DoTemplate(a, sizeof(a) -1, b, NULL);
+void url_do_template(void);
 
 
 int lingering_close(int fd);
@@ -814,6 +800,9 @@ void go_selected_language(void);
 void stop_selected_language(void);
 void preset_locale(void);
 void httplang_to_locale(char *LocaleString);
+void StrEndTab(StrBuf *Target, int tabnum, int num_tabs);
+void StrBeginTab(StrBuf *Target, int tabnum, int num_tabs);
+void StrTabbedDialog(StrBuf *Target, int num_tabs, StrBuf *tabnames[]);
 void tabbed_dialog(int num_tabs, char *tabnames[]);
 void begin_tab(int tabnum, int num_tabs);
 void end_tab(int tabnum, int num_tabs);