From 12873bcf13c8163688065e514b271507dbec9bb7 Mon Sep 17 00:00:00 2001 From: Michael Hampton Date: Sat, 3 Feb 2001 08:21:00 +0000 Subject: [PATCH] * serv_ical.c and serv_ical.h added; skeleton code for now --- citadel/ChangeLog | 4 ++++ citadel/Makefile.in | 13 +++++++--- citadel/serv_ical.c | 58 +++++++++++++++++++++++++++++++++++++++++++++ citadel/serv_ical.h | 9 +++++++ 4 files changed, 81 insertions(+), 3 deletions(-) create mode 100644 citadel/serv_ical.c create mode 100644 citadel/serv_ical.h diff --git a/citadel/ChangeLog b/citadel/ChangeLog index af6cee301..b0d32514f 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -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 Fri Jul 10 1998 Art Cancro * Initial CVS import + diff --git a/citadel/Makefile.in b/citadel/Makefile.in index 508ba38b0..0453f82f9 100644 --- a/citadel/Makefile.in +++ b/citadel/Makefile.in @@ -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 index 000000000..170a2347b --- /dev/null +++ b/citadel/serv_ical.c @@ -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 +#include +#include +#include +#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 index 000000000..059ba2d0d --- /dev/null +++ b/citadel/serv_ical.h @@ -0,0 +1,9 @@ +/* + * $Id$ + * + * iCalendar implementation for Citadel/UX + * + */ + + +/* Hrm, we don't have anything to put here yet... */ -- 2.39.2