From f0b4238b0e8cf1f676431510ea27571ee403a2f9 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sun, 15 Sep 2002 03:40:13 +0000 Subject: [PATCH] * calendar.c: added * When a text/calendar MIME type is discovered in a message, send it to the (currently skeleton) parser in calendar.c * calendar.c: skeleton parser for calendar objects which currently just creates an icalcomponent object and frees it. --- webcit/ChangeLog | 8 +++++++- webcit/calendar.c | 15 +++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index 9df2c45bc..83766613f 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,11 @@ $Log$ +Revision 400.12 2002/09/15 03:40:13 ajc +* calendar.c: added +* When a text/calendar MIME type is discovered in a message, send it to + the (currently skeleton) parser in calendar.c +* calendar.c: skeleton parser for calendar objects which currently just + creates an icalcomponent object and frees it. + Revision 400.11 2002/09/15 03:16:24 ajc * Changed decode_base64() to CtdlDecodeBase64() to avoid conflict with function namespace in libical @@ -974,4 +981,3 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix - diff --git a/webcit/calendar.c b/webcit/calendar.c index 795a0532f..b05e24f19 100644 --- a/webcit/calendar.c +++ b/webcit/calendar.c @@ -53,10 +53,21 @@ void cal_process_attachment(char *part_source) { * Handler stub for builds with no calendar library available */ void cal_process_attachment(char *part_source) { + icalcomponent *cal; - wprintf("This is a calendar object. " - "Handler coming soon!
"); + wprintf("Processing calendar attachment
\n"); + cal = icalcomponent_new_from_string(part_source); + if (cal == NULL) { + wprintf("Error parsing calendar object: %s
\n", + icalerror_strerror(icalerrno)); + return; + } + + wprintf("Parsing went well. Cool.
\n"); + + /* Free the memory we obtained from libical's constructor */ + icalcomponent_free(cal); } #endif /* HAVE_ICAL_H */ -- 2.39.2