]> code.citadel.org Git - citadel.git/commitdiff
* calendar.c: added
authorArt Cancro <ajc@citadel.org>
Sun, 15 Sep 2002 03:40:13 +0000 (03:40 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 15 Sep 2002 03:40:13 +0000 (03:40 +0000)
* 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
webcit/calendar.c

index 9df2c45bca4066c888930662f95358e83bad3174..83766613f8d650dedadc0bec6590565a0687bcae 100644 (file)
@@ -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 <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
-
index 795a0532f2fab11f06b4f65d013462b36cfedaae..b05e24f190a11c98706b575ff51d8d6c8e22c1c4 100644 (file)
@@ -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("<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 */