]> code.citadel.org Git - citadel.git/blobdiff - webcit/webcit.h
Templatize sieve rules editor; return success/fail state of serverwrite
[citadel.git] / webcit / webcit.h
index 022ed2d83f145adbfb3d1bb183e87f799428cfaa..efb7f8242bd8e8b4b9df6c2a51af6bb406fcc7cb 100644 (file)
@@ -132,7 +132,7 @@ extern char *ssl_cipher_list;
 
 #define SIZ                    4096            /* generic buffer size */
 
-#define TRACE syslog(LOG_DEBUG, "CHECKPOINT: %s, %d", __FILE__, __LINE__)
+#define TRACE syslog(LOG_DEBUG, "\033[3%dmCHECKPOINT: %s:%d\033[0m", ((__LINE__%6)+1), __FILE__, __LINE__)
 
 #define SLEEPING               180             /* TCP connection timeout */
 #define WEBCIT_TIMEOUT         900             /* WebCit session timeout */
@@ -564,6 +564,9 @@ struct wcsession {
        int ib_wholist_expanded;
        int ib_roomlist_expanded;
 
+/* our known Sieve scripts; loaded by SIEVE:SCRIPTS iterator. */
+       HashList *KnownSieveScripts;
+
 /* Transcoding cache buffers; used to avoid to frequent realloc */
        StrBuf *ConvertBuf1;
        StrBuf *ConvertBuf2;
@@ -662,7 +665,7 @@ int tcp_connectsock(char *, char *);
 int serv_getln(char *strbuf, int bufsize);
 int StrBuf_ServGetln(StrBuf *buf);
 int GetServerStatus(StrBuf *Line, long* FullState);
-void serv_puts(const char *string);
+int serv_puts(const char *string);
 void who(void);
 void push_destination(void);
 void pop_destination(void);
@@ -734,11 +737,6 @@ long gotoroom(const StrBuf *gname);
 void remove_march(const StrBuf *aaa);
 void dotskip(void);
 void validate(void);
-void display_graphics_upload(char *, char *, char *);
-void do_graphics_upload(char *upl_cmd);
-void serv_write(const char *buf, int nbytes);
-void serv_putbuf(const StrBuf *string);
-void serv_printf(const char *format,...)__attribute__((__format__(__printf__,1,2)));
 void shutdown_sessions(void);
 void do_housekeeping(void);
 void smart_goto(const StrBuf *);
@@ -809,6 +807,11 @@ int ical_ctdl_is_overlap(
 
 extern char *months[];
 extern char *days[];
+void display_graphics_upload(char *, char *, char *);
+void do_graphics_upload(char *upl_cmd);
+int serv_write(const char *buf, int nbytes);
+int serv_putbuf(const StrBuf *string);
+int serv_printf(const char *format,...)__attribute__((__format__(__printf__,1,2)));
 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);
@@ -887,6 +890,9 @@ void http_datestring(char *buf, size_t n, time_t xtime);
 
 extern int time_to_die;                        /* Nonzero if server is shutting down */
 
+/* a nice consistent place to define how we turn a message id into a thread id hash */
+#define ThreadIdHash(Buf) abs(HashLittle(ChrPtr(Buf), StrLength(Buf)))
+
 /* 
  * Array type for a blog post.  The first message is the post; the rest are comments
  */
@@ -908,3 +914,4 @@ struct bltr {
 
 
 struct bltr blogview_learn_thread_references(long msgnum);
+void tmplput_blog_permalink(StrBuf *Target, WCTemplputParams *TP);