]> code.citadel.org Git - citadel.git/commitdiff
* Dabbled in handling incoming meeting requests
authorArt Cancro <ajc@citadel.org>
Mon, 30 Sep 2002 03:58:35 +0000 (03:58 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 30 Sep 2002 03:58:35 +0000 (03:58 +0000)
webcit/ChangeLog
webcit/calendar.c

index a0b996785ce4012e7fe2f9df66dad67ab9f45d04..4c0592dcbf256ec3158c925a7dbd834fa2907b88 100644 (file)
@@ -1,4 +1,7 @@
 $Log$
+Revision 400.32  2002/09/30 03:58:35  ajc
+* Dabbled in handling incoming meeting requests
+
 Revision 400.31  2002/09/29 20:15:43  ajc
 * Completed the calendar day view
 
@@ -1046,4 +1049,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 a18d6b908b93b6235cd9625b49423d31418bcf3c..c1ed94ec40daa16c8a996315fbecd3704e23ed10 100644 (file)
@@ -71,16 +71,35 @@ void display_task(long msgnum) {
  * Process a calendar object
  * ...at this point it's already been deserialized by cal_process_attachment()
  */
-void cal_process_object(icalcomponent *cal) {
+void cal_process_object(icalcomponent *cal,
+                       int recursion_level
+) {
        icalcomponent *c;
+       icalproperty *method = NULL;
+       icalproperty_method the_method;
+
+       /* Look for a method */
+       method = icalcomponent_get_first_property(cal, ICAL_METHOD_PROPERTY);
+
+       /* See what we need to do with this */
+       if (method != NULL) {
+               the_method = icalproperty_get_method(method);
+               switch(the_method) {
+                   case ICAL_METHOD_REQUEST:
+                       wprintf("This is a request.<BR>\n");
+                       break;
+                   default:
+                       wprintf("I don't know what to do with this.<BR>\n");
+                       break;
+               }
+       }
 
-       /* Iterate through all subcomponents */
-       wprintf("Iterating through all sub-components<BR>\n");
+       /* If the component has subcomponents, recurse through them. */
        for (c = icalcomponent_get_first_component(cal, ICAL_ANY_COMPONENT);
            (c != 0);
            c = icalcomponent_get_next_component(cal, ICAL_ANY_COMPONENT)) {
                /* Recursively process subcomponent */
-               cal_process_object(c);
+               cal_process_object(c, recursion_level+1);
        }
 
 }
@@ -102,7 +121,7 @@ void cal_process_attachment(char *part_source) {
                return;
        }
 
-       cal_process_object(cal);
+       cal_process_object(cal, 0);
 
        /* Free the memory we obtained from libical's constructor */
        icalcomponent_free(cal);