* 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.
$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
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
-
* Handler stub for builds with no calendar library available
*/
void cal_process_attachment(char *part_source) {
+ icalcomponent *cal;
- wprintf("<B><I>This is a calendar object. "
- "Handler coming soon!</I></B><BR>");
+ wprintf("Processing calendar attachment<BR>\n");
+ cal = icalcomponent_new_from_string(part_source);
+ if (cal == NULL) {
+ wprintf("Error parsing calendar object: %s<BR>\n",
+ icalerror_strerror(icalerrno));
+ return;
+ }
+
+ wprintf("Parsing went well. Cool.<BR>\n");
+
+ /* Free the memory we obtained from libical's constructor */
+ icalcomponent_free(cal);
}
#endif /* HAVE_ICAL_H */