Template the last bits of the blog view.
[citadel.git] / webcit / webcit.h
index 0313da21e0d1c3367ba74162772b8fb3a5d5461f..624b1189383c2345f6c89a085cf0adcf30b9abba 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1987-2013 by the citadel.org team
+ * Copyright (c) 1987-2015 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License version 3.
@@ -25,9 +25,6 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/socket.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
 #include <sys/stat.h>
 #ifdef HAVE_LIMITS_H
 #include <limits.h>
@@ -64,8 +61,6 @@
 #define _(string)      (string)
 #endif
 
-#define IsEmptyStr(a) ((a)[0] == '\0')
-
 #define DO_DBG_QR 0
 #define DBG_QR(x) if(DO_DBG_QR) _DBG_QR(x)
 #define DBG_QR2(x) if(DO_DBG_QR) _DBG_QR2(x)
@@ -132,9 +127,9 @@ extern char *ssl_cipher_list;
 #define PORT_NUM               2000            /* port number to listen on */
 #define DEVELOPER_ID           0
 #define CLIENT_ID              4
-#define CLIENT_VERSION         821             /* This version of WebCit */
-#define MINIMUM_CIT_VERSION    821             /* Minimum required version of Citadel server */
-#define        LIBCITADEL_MIN          821             /* Minimum required version of libcitadel */
+#define CLIENT_VERSION         901             /* This version of WebCit */
+#define MINIMUM_CIT_VERSION    901             /* Minimum required version of Citadel server */
+#define        LIBCITADEL_MIN          901             /* Minimum required version of libcitadel */
 #define DEFAULT_HOST           "localhost"     /* Default Citadel server */
 #define DEFAULT_PORT           "504"
 #define TARGET                 "webcit01"      /* Window target for inline URL's */
@@ -219,7 +214,9 @@ void SaveExpirePolicyFromHTTP(GPEXWhichPolicy which);
 typedef struct urlcontent urlcontent;
 struct urlcontent {
        char url_key[32];               /* key */
+       long klen;
        StrBuf *url_data;               /* value */
+       HashList *sub;
 };
 
 /*
@@ -271,15 +268,6 @@ typedef struct _IcalMethodEnumMap {
         icalproperty_method map;
 } IcalMethodEnumMap;
 
-/*
- * Address book entry (keep it short and sweet, it's just a quickie lookup
- * which we can use to get to the real meat and bones later)
- */
-typedef struct _addrbookent {
-       char ab_name[64];       /* name string */
-       long ab_msgnum;         /* message number of address book entry */
-} addrbookent;
-
 
 #define AJAX (1<<0)
 #define ANONYMOUS (1<<1)
@@ -425,6 +413,7 @@ struct wcsession {
        int ctdl_pid;                           /* Session ID on the Citadel server */
        int nonce;                              /* session nonce (to prevent session riding) */
        int inuse;                              /* set to nonzero if bound to a running thread */
+       int isFailure;                          /* Http 2xx or 5xx? */
 
 /* Session local Members */
        int serv_sock;                          /* Client socket to Citadel server */
@@ -521,8 +510,6 @@ struct wcsession {
        HashList *InetCfg;                      /* Our inet server config for editing */
        ExpirePolicy Policy[maxpolicy];
 
-/* used by the blog viewer */
-       int bptlid;                             /* hash of thread currently being rendered */
 };
 
 
@@ -662,9 +649,6 @@ void cdataout(char *rawdata);
 void url(char *buf, size_t bufsize);
 void UrlizeText(StrBuf* Target, StrBuf *Source, StrBuf *WrkBuf);
 
-
-void display_vcard(StrBuf *Target, wc_mime_attachment *Mime, char alpha, int full, char **storename, long msgnum);
-
 void display_success(const char *successmessage);
 
 void shutdown_sessions(void);
@@ -695,13 +679,13 @@ extern char *days[];
 long locate_user_vcard_in_this_room(message_summary **VCMsg,
                                    wc_mime_attachment **VCAtt);
 void http_transmit_thing(const char *content_type, int is_static);
-void http_transmit_headers(const char *content_type, int is_static, long is_chunked);
+void http_transmit_headers(const char *content_type, int is_static, long is_chunked, int is_gzip);
 long unescape_input(char *buf);
 void check_thread_pool_size(void);
 void StrEndTab(StrBuf *Target, int tabnum, int num_tabs);
 void StrBeginTab(StrBuf *Target, int tabnum, int num_tabs, StrBuf **Names);
 void StrTabbedDialog(StrBuf *Target, int num_tabs, StrBuf *tabnames[]);
-void tabbed_dialog(int num_tabs, char *tabnames[]);
+void tabbed_dialog(int num_tabs, const char *tabnames[]);
 void begin_tab(int tabnum, int num_tabs);
 void end_tab(int tabnum, int num_tabs);
 
@@ -748,28 +732,6 @@ void http_datestring(char *buf, size_t n, time_t xtime);
 extern int time_to_die;                        /* Nonzero if server is shutting down */
 extern int DisableGzip;
 
-/* 
- * Array type for a blog post.  The first message is the post; the rest are comments
- */
-struct blogpost {
-       int top_level_id;
-       long *msgs;             /* Array of msgnums for messages we are displaying */
-       int num_msgs;           /* Number of msgnums stored in 'msgs' */
-       int alloc_msgs;         /* Currently allocated size of array */
-};
-
-
-/*
- * Data which gets returned from a call to blogview_learn_thread_references()
- */
-struct bltr {
-       int id;
-       int refs;
-};
-
-
-struct bltr blogview_learn_thread_references(long msgnum);
-void tmplput_blog_permalink(StrBuf *Target, WCTemplputParams *TP);
 void display_summary_page(void);
 
 HashList *GetValidDomainNames(StrBuf *Target, WCTemplputParams *TP);