From: Art Cancro Date: Sat, 7 Dec 2002 22:12:59 +0000 (+0000) Subject: * Handle incoming RSVP's for meetings. (Note: this will not actually work X-Git-Tag: v7.86~6090 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=b380bed437e330924421de4c02a7f7a74bd34743;p=citadel.git * Handle incoming RSVP's for meetings. (Note: this will not actually work until I implement the Citadel server function which it calls.) --- diff --git a/webcit/ChangeLog b/webcit/ChangeLog index 53850d394..b88f0b2eb 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,8 @@ $Log$ +Revision 400.61 2002/12/07 22:12:59 ajc +* Handle incoming RSVP's for meetings. (Note: this will not actually work + until I implement the Citadel server function which it calls.) + Revision 400.60 2002/11/30 21:34:51 ajc * Submit organizer in a hidden field, in case the server needs it @@ -1157,3 +1161,4 @@ 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 7c436ccad..c6950e8b4 100644 --- a/webcit/calendar.c +++ b/webcit/calendar.c @@ -107,6 +107,15 @@ void cal_process_object(icalcomponent *cal, \n" ); break; + case ICAL_METHOD_REPLY: + wprintf("\n" + "" + "  " + "Attendee's reply to your invitation + \n" + ); + break; case ICAL_METHOD_PUBLISH: wprintf("\n" "\n"); } + /* If the component has attendees, iterate through them. */ + for (p = icalcomponent_get_first_property(cal, ICAL_ATTENDEE_PROPERTY); (p != NULL); p = icalcomponent_get_next_property(cal, ICAL_ATTENDEE_PROPERTY)) { + wprintf("Attendee:"); + escputs("FIXME display attendee"); + wprintf("\n"); + } + /* If the component has subcomponents, recurse through them. */ for (c = icalcomponent_get_first_component(cal, ICAL_ANY_COMPONENT); (c != 0); @@ -250,6 +266,39 @@ void cal_process_object(icalcomponent *cal, } + /* If this is a REPLY, display update button */ + if (the_method == ICAL_METHOD_REPLY) { + + /*********** + * In the future, if we want to validate this object before + * continuing, we can do it this way: + serv_printf("ICAL whatever|%ld|%s|", msgnum, cal_partnum); + serv_gets(buf); + } + ***********/ + + /* Display the update buttons */ + wprintf("" + "Click Update to accept this reply and " + "update your calendar." + "
\n" + "\n" + "  " + "\n" + "" + "" + "
" + "\n", + msgnum, cal_partnum + ); + + } + /* Trailing HTML for the display of this object */ if (recursion_level == 0) { @@ -331,7 +380,58 @@ void respond_to_request(void) { wprintf("wc_roomname); - wprintf("\">Return to messages
\n"); + wprintf("\">
Return to messages
\n"); + + wDumpContent(1); +} + + + +/* + * Handle an incoming RSVP + */ +void handle_rsvp(void) { + char buf[SIZ]; + + output_headers(3); + + wprintf("
" + "Update your calendar with this RSVP" + "

\n" + ); + + serv_printf("ICAL handle_rsvp|%s|%s|%s|", + bstr("msgnum"), + bstr("cal_partnum"), + bstr("sc") + ); + serv_gets(buf); + + if (buf[0] == '2') { + wprintf("
" + "" + "" + ); + if (!strcasecmp(bstr("sc"), "update")) { + wprintf("Your calendar has been updated " + "to reflect this RSVP." + ); + } else if (!strcasecmp(bstr("sc"), "ignore")) { + wprintf("You have chosen to ignore this RSVP. " + "Your calendar has not been updated." + ); + } + wprintf("
\n" + ); + } else { + wprintf("" + "%s\n", &buf[4]); + } + + wprintf("wc_roomname); + wprintf("\">
Return to messages

\n"); wDumpContent(1); } diff --git a/webcit/webcit.c b/webcit/webcit.c index 481a1fbb4..d1927a4a2 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -1161,6 +1161,8 @@ void session_loop(struct httprequest *req) save_event(); } else if (!strcasecmp(action, "respond_to_request")) { respond_to_request(); + } else if (!strcasecmp(action, "handle_rsvp")) { + handle_rsvp(); #endif } else if (!strcasecmp(action, "summary")) { summary(); diff --git a/webcit/webcit.h b/webcit/webcit.h index e2c6ff1b9..da4f078f7 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -365,6 +365,7 @@ void display_edit_individual_event(icalcomponent *supplied_vtodo, long msgnum); void save_individual_event(icalcomponent *supplied_vtodo, long msgnum); void generate_new_uid(char *); void respond_to_request(void); +void handle_rsvp(void); #endif extern char *months[];