roomops.o messages.o userlist.o paging.o sysmsgs.o useredit.o \
vcard.o vcard_edit.o preferences.o html2html.o listsub.o \
mime_parser.o graphics.o netconf.o siteconfig.o subst.o \
- calendar.o calendar_tools.o $(LIBOBJS)
+ calendar.o calendar_tools.o calendar_view.o $(LIBOBJS)
$(CC) webserver.o context_loop.o tools.o cookie_conversion.o \
webcit.o auth.o tcp_sockets.o mainmenu.o serv_func.o who.o listsub.o \
roomops.o messages.o userlist.o paging.o sysmsgs.o useredit.o \
locate_host.o siteconfig.o subst.o vcard.o vcard_edit.o floors.o \
mime_parser.o graphics.o netconf.o preferences.o html2html.o \
- summary.o calendar.o calendar_tools.o \
+ summary.o calendar.o calendar_tools.o calendar_view.o \
$(LIBOBJS) $(LIBS) -o webserver
.c.o:
--- /dev/null
+/*
+ * $Id$
+ *
+ *
+ */
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/socket.h>
+#include <limits.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#include <string.h>
+#include <pwd.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <pthread.h>
+#include <signal.h>
+#include <time.h>
+#include "webcit.h"
+#include "webserver.h"
+
+#ifndef HAVE_ICAL_H
+
+void do_calendar_view(void) { /* stub for non-libical builds */
+ wprintf("<CENTER><I>Calendar view not available</I></CENTER><BR>\n");
+}
+
+#else /* HAVE_ICAL_H */
+
+/****************************************************************************/
+
+/*
+ * We loaded calendar events into memory during a pass through the
+ * messages in this room ... now display them.
+ */
+void do_calendar_view(void) {
+ wprintf("<CENTER><I>Calendar view not available</I></CENTER><BR>\n");
+}
+
+
+#endif /* HAVE_ICAL_H */
}
if (is_tasks) {
- wprintf("</UL>\n"
- "<A HREF=\"/display_edit_task?msgnum=0\">"
- "Add new task</A>\n"
- );
+ wprintf("</UL>\n");
}
/* Bump these because although we're thinking in zero base, the user
}
if (is_summary) wprintf("</FORM>\n");
-DONE: wDumpContent(1);
+DONE:
+ if (is_tasks) {
+ wprintf("<A HREF=\"/display_edit_task?msgnum=0\">"
+ "Add new task</A>\n"
+ );
+ }
+
+ if (is_calendar) {
+ do_calendar_view();
+ }
+
+ wDumpContent(1);
}
void cal_process_attachment(char *part_source);
void display_calendar(long msgnum);
void display_task(long msgnum);
+void do_calendar_view(void);
#ifdef HAVE_ICAL_H
void display_edit_task(void);