* general way to do retrieve / save autopurger data
[citadel.git] / webcit / webcit.h
index 8d919464dc239841234e448fcea3d70712fc01c5..134fb032684b414f6dc0e0e6686ed9e4ad66f882 100644 (file)
@@ -202,6 +202,8 @@ extern char *ssl_cipher_list;
                        US_FLOORS | US_COLOR | US_PROMPTCTL )
 
 
+
+
 #define MAJORCODE(a) (((int)(a / 100) ) * 100)
 
 #define LISTING_FOLLOWS        100
@@ -243,6 +245,20 @@ extern char *ssl_cipher_list;
  */
 #define NLI    "(not logged in)"
 
+/*
+ * Expiry policy for the autopurger
+ */
+#define EXPIRE_NEXTLEVEL        0       /* Inherit expiration policy    */
+#define EXPIRE_MANUAL           1       /* Don't expire messages at all */
+#define EXPIRE_NUMMSGS          2       /* Keep only latest n messages  */
+#define EXPIRE_AGE              3       /* Expire messages after n days */
+typedef struct __ExpirePolicy {
+       int loaded; /* has this been loaded from the server? */
+        int expire_mode;
+        int expire_value;
+}ExpirePolicy;
+void LoadExpirePolicy(GPEXWhichPolicy which);
+void SaveExpirePolicyFromHTTP(GPEXWhichPolicy which);
 
 /*
  * Linked list of session variables encoded in an x-www-urlencoded content type
@@ -533,7 +549,7 @@ struct wcsession {
 /* cache stuff for templates. TODO: find a smartrer way */
        HashList *ServCfg;                      /* cache our server config for editing */
        HashList *InetCfg;                      /* Our inet server config for editing */
-
+       ExpirePolicy Policy[maxpolicy];
 };
 
 
@@ -600,7 +616,7 @@ void cookie_to_stuff(StrBuf *cookie,
 void locate_host(StrBuf *TBuf, int);
 void become_logged_in(const StrBuf *user, const StrBuf *pass, StrBuf *serv_response);
 void openid_manual_create(void);
-void display_login();
+void display_login(void);
 void display_openids(void);
 void do_welcome(void);
 void do_logout(void);
@@ -645,7 +661,14 @@ void output_headers(    int do_httpheaders,
                        int suppress_check,
                        int cache);
 void output_custom_content_header(const char *ctype);
+
+#ifdef UBER_VERBOSE_DEBUGGING
+#define wc_printf(...) wcc_printf(__FILE__, __FUNCTION__, __LINE__, __VA_ARGS__)
+void wcc_printf(const char *FILE, const char *FUNCTION, long LINE, const char *format, ...);
+#else 
 void wc_printf(const char *format,...)__attribute__((__format__(__printf__,1,2)));
+#endif
+
 void hprintf(const char *format,...)__attribute__((__format__(__printf__,1,2)));
 void output_static(const char* What);
 
@@ -706,8 +729,6 @@ void clear_local_substs(void);
 
 
 int lingering_close(int fd);
-char *memreadline(char *start, char *buf, int maxlen);
-char *memreadlinelen(char *start, char *buf, int maxlen, int *retlen);
 long extract_token(char *dest, const char *source, int parmnum, char separator, int maxlen);
 void remove_token(char *source, int parmnum, char separator);
 StrBuf *load_mimepart(long msgnum, char *partnum);
@@ -769,7 +790,7 @@ int ical_ctdl_is_overlap(
 
 extern char *months[];
 extern char *days[];
-int read_server_binary(StrBuf *Ret, size_t total_len, StrBuf *Buf);
+int serv_read_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);