/* $Id$ */
-#ifdef WITH_ZLIB
+#ifdef HAVE_ZLIB_H
#include <zlib.h>
#endif
+#ifdef HAVE_ICAL_H
+#include <ical.h>
+#endif
+
+#define CALENDAR_ROOM_NAME "Calendar"
+
#define SIZ 4096 /* generic buffer size */
#define TRACE fprintf(stderr, "Checkpoint: %s, %d\n", __FILE__, __LINE__)
char *upload;
int new_mail;
int remember_new_mail;
- int need_vali;
+ int need_regi; /* This user needs to register. */
+ int need_vali; /* New users require validation. */
+ char cs_inet_email[SIZ]; /* User's preferred Internet addr. */
pthread_mutex_t SessionMutex; /* mutex for exclusive access */
time_t lastreq; /* Timestamp of most recent HTTP */
int killthis; /* Nonzero == purge this session */
struct march *march; /* march mode room list */
char reply_to[SIZ]; /* reply-to address */
- long msgarr[1024]; /* for read operations */
+ long msgarr[4096]; /* for read operations */
int fake_frames;
int is_wap; /* Client is a WAP gateway */
struct urlcontent *urlstrings;
char this_page[SIZ]; /* address of current page */
char http_host[SIZ]; /* HTTP Host: header */
char *preferences;
-#ifdef WITH_ZLIB
- int gzcompressed; /* nonzero if compressed output */
- gzFile gzfd; /* stream to send compressed */
+#ifdef HAVE_ICAL_H
+ icalcomponent **disp_cal; /* store calendar items for display */
+ long *cal_msgnum; /* store calendar msgids for display */
+ int num_cal;
#endif
};
void escputs1(char *strbuf, int nbsp);
long extract_long(char *source, long int parmnum);
int extract_int(char *source, int parmnum);
+void stripout(char *str, char leftboundary, char rightboundary);
void dump_vars(void);
void embed_main_menu(void);
void serv_read(char *buf, int bytes);
void embed_room_banner(char *);
void smart_goto(char *);
void worker_entry(void);
-void session_loop(struct httprequest *, int gzip);
+void session_loop(struct httprequest *);
void fmt_date(char *buf, time_t thetime);
+void fmt_time(char *buf, time_t thetime);
void httpdate(char *buf, time_t thetime);
void end_webcit_session(void);
void page_popup(void);
int num_tokens (char *source, char tok);
void extract_token(char *dest, char *source, int parmnum, char separator);
void remove_token(char *source, int parmnum, char separator);
-int decode_base64(char *dest, char *source, size_t length);
+int CtdlDecodeBase64(char *dest, char *source, size_t length);
char *load_mimepart(long msgnum, char *partnum);
int pattern2(char *search, char *patn);
void do_edit_vcard(long, char *, char *);
void toggle_self_service(void);
void summary(void);
ssize_t write(int fd, const void *buf, size_t count);
+void cal_process_attachment(char *part_source, long msgnum, char *cal_partnum);
+void display_calendar(long msgnum);
+void display_task(long msgnum);
+void do_calendar_view(void);
+void free_calendar_buffer(void);
+void calendar_summary_view(void);
+int load_msg_ptrs(char *servcmd);
+
+#ifdef HAVE_ICAL_H
+void display_edit_task(void);
+void save_task(void);
+void display_edit_event(void);
+void save_event(void);
+void display_icaltimetype_as_webform(struct icaltimetype *, char *);
+struct icaltimetype icaltime_from_webform(char *prefix);
+void display_edit_individual_event(icalcomponent *supplied_vtodo, long msgnum);
+void save_individual_event(icalcomponent *supplied_vtodo, long msgnum);
+void generate_new_uid(char *);
+void respond_to_request(void);
+void handle_rsvp(void);
+void ical_dezonify(icalcomponent *cal);
+void partstat_as_string(char *buf, icalproperty *attendee);
+#endif
+
+extern char *months[];
+extern char *days[];
+void read_server_binary(char *buffer, size_t total_len);