* serv_ical.c and serv_ical.h added; skeleton code for now
authorMichael Hampton <io_error@uncensored.citadel.org>
Sat, 3 Feb 2001 08:21:00 +0000 (08:21 +0000)
committerMichael Hampton <io_error@uncensored.citadel.org>
Sat, 3 Feb 2001 08:21:00 +0000 (08:21 +0000)
citadel/ChangeLog
citadel/Makefile.in
citadel/serv_ical.c [new file with mode: 0644]
citadel/serv_ical.h [new file with mode: 0644]

index af6cee3015298bc370f4b4d7eb36949dff61b72e..b0d32514f1080eca36eb4e2b3e2b60420ba5a83c 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 573.78  2001/02/03 08:21:00  error
+ * serv_ical.c and serv_ical.h added; skeleton code for now
+
  Revision 573.77  2001/02/02 20:18:18  ajc
  * Changed the error message in cdb_delete() to actually *say* cdb_delete
    instead of cdb_store.  Useful to know which function failed...
@@ -2355,3 +2358,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import 
+
index 508ba38b036b7bd4eac7ee4609038b65e806df64..0453f82f995c90cdf46b3d07cbcad6b8d7cdf8c0 100644 (file)
@@ -37,7 +37,8 @@ SERV_MODULES=modules/serv_chat$(SO) modules/serv_vcard$(SO) \
        modules/serv_moderate$(SO) \
        modules/serv_bio$(SO) \
        modules/serv_expire$(SO) \
-       modules/serv_vandelay$(SO)
+       modules/serv_vandelay$(SO) \
+       modules/serv_ical$(SO)
 UTIL_TARGETS=aidepost netmailer netproc netsetup msgform readlog rcit \
        stats citmail netpoll mailinglist userlist sendcommand \
        base64 qpdecode
@@ -90,7 +91,7 @@ SOURCES=aidepost.c citadel.c citmail.c citserver.c client_chat.c commands.c \
        domain.c clientsocket.c serv_inetcfg.c serv_rwho.c serv_bio.c \
        serv_moderate.c client_passwords.c \
        serv_imap.c imap_tools.c imap_fetch.c imap_search.c \
-       serv_network.c serv_pas2.c md5.c
+       serv_network.c serv_pas2.c serv_ical.c md5.c
 
 DEP_FILES=$(SOURCES:.c=.d)
 
@@ -146,7 +147,7 @@ citserver: $(SERV_OBJS)
        $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(PTHREAD_DEFS) -c $< -o $@
 
 .c.mo:
-       @mkdir -p modules
+       @test -d modules || mkdir -p modules
        $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(PTHREAD_DEFS) $(PICFLAGS) -DPIC -c $< -o $@
 
 modules/serv_chat.so: serv_chat.mo
@@ -261,6 +262,12 @@ modules/serv_pas2.mo: serv_pas2.mo
 modules/md5.mo: md5.mo
        ln -f md5.mo modules
 
+modules/serv_ical.so: serv_ical.mo
+       $(LINK_SHARED) -o modules/serv_ical.so serv_ical.mo
+
+modules/serv_ical.mo: serv_ical.mo
+       ln -f serv_ical.mo modules
+
 
 
 #
diff --git a/citadel/serv_ical.c b/citadel/serv_ical.c
new file mode 100644 (file)
index 0000000..170a234
--- /dev/null
@@ -0,0 +1,58 @@
+/* 
+ * $Id$ 
+ *
+ * This module implements iCalendar object processing and the My Calendar>
+ * room on a Citadel/UX server.  It handles iCalendar objects using the
+ * iTIP protocol.  See RFCs 2445 and 2446.
+ *
+ */
+
+#include <unistd.h>
+#include <sys/types.h>
+#include <limits.h>
+#include <stdio.h>
+#include "sysdep.h"
+#include "serv_ical.h"
+#include "citadel.h"
+#include "server.h"
+#include "citserver.h"
+#include "sysdep_decls.h"
+#include "support.h"
+#include "config.h"
+#include "dynloader.h"
+
+
+/* Tell clients what level of support to expect */
+void cmd_ical(char *argbuf)
+{
+       /* argbuf is not used */
+       if (!(CC->logged_in)) {
+               cprintf("%d Not logged in.\n", ERROR+NOT_LOGGED_IN);
+               return;
+       }
+
+       cprintf("%d I (will) support|ICAL,ITIP\n", OK);
+       return;
+}
+
+
+int ical_obj_beforesave(struct CtdlMessage *msg)
+{
+       return 0;
+}
+
+
+int ical_obj_aftersave(struct CtdlMessage *msg)
+{
+       return 0;
+}
+
+
+/* Register this module with the Citadel server. */
+char *Dynamic_Module_Init(void)
+{
+       CtdlRegisterMessageHook(ical_obj_beforesave, EVT_BEFORESAVE);
+       CtdlRegisterMessageHook(ical_obj_aftersave, EVT_AFTERSAVE);
+       CtdlRegisterProtoHook(cmd_ical, "ICAL", "Register iCalendar support");
+       return "$Id$";
+}
diff --git a/citadel/serv_ical.h b/citadel/serv_ical.h
new file mode 100644 (file)
index 0000000..059ba2d
--- /dev/null
@@ -0,0 +1,9 @@
+/*
+ * $Id$
+ *
+ * iCalendar implementation for Citadel/UX
+ *
+ */
+
+
+/* Hrm, we don't have anything to put here yet... */