From d236455ba4508a1b9c9f0f65878d0cf784c186b8 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 12 Nov 2002 04:48:18 +0000 Subject: [PATCH] * Polish up the meeting reply code. --- webcit/calendar.c | 47 ++++++++++++++++++++++++++++++++++++++--------- webcit/event.c | 4 +++- 2 files changed, 41 insertions(+), 10 deletions(-) diff --git a/webcit/calendar.c b/webcit/calendar.c index 90c3586a3..c95b02e10 100644 --- a/webcit/calendar.c +++ b/webcit/calendar.c @@ -125,18 +125,18 @@ void cal_process_object(icalcomponent *cal, } p = icalcomponent_get_first_property(cal, ICAL_SUMMARY_PROPERTY); - if (p != NULL) { + if (p != NULL) { wprintf("Summary:"); escputs((char *)icalproperty_get_comment(p)); wprintf("\n"); - } + } p = icalcomponent_get_first_property(cal, ICAL_LOCATION_PROPERTY); - if (p != NULL) { + if (p != NULL) { wprintf("Location:"); escputs((char *)icalproperty_get_comment(p)); wprintf("\n"); - } + } /* * Only show start/end times if we're actually looking at the VEVENT @@ -146,7 +146,7 @@ void cal_process_object(icalcomponent *cal, p = icalcomponent_get_first_property(cal, ICAL_DTSTART_PROPERTY); - if (p != NULL) { + if (p != NULL) { t = icalproperty_get_dtstart(p); tt = icaltime_as_timet(t); fmt_date(buf, tt); @@ -156,7 +156,7 @@ void cal_process_object(icalcomponent *cal, } p = icalcomponent_get_first_property(cal, ICAL_DTEND_PROPERTY); - if (p != NULL) { + if (p != NULL) { t = icalproperty_get_dtend(p); tt = icaltime_as_timet(t); fmt_date(buf, tt); @@ -168,11 +168,11 @@ void cal_process_object(icalcomponent *cal, } p = icalcomponent_get_first_property(cal, ICAL_DESCRIPTION_PROPERTY); - if (p != NULL) { + if (p != NULL) { wprintf("Description:"); escputs((char *)icalproperty_get_comment(p)); wprintf("\n"); - } + } /* If the component has subcomponents, recurse through them. */ for (c = icalcomponent_get_first_component(cal, ICAL_ANY_COMPONENT); @@ -290,7 +290,36 @@ void respond_to_request(void) { bstr("sc") ); serv_gets(buf); - escputs(buf); + + if (buf[0] == '2') { + wprintf("
" + "" + "" + ); + if (!strcasecmp(bstr("sc"), "accept")) { + wprintf("You have accepted this meeting invitation. " + "It has been entered into your calendar, " + ); + } else if (!strcasecmp(bstr("sc"), "tentative")) { + wprintf("You have tentatively accepted this meeting invitation. " + "It has been 'pencilled in' to your calendar, " + ); + } else if (!strcasecmp(bstr("sc"), "decline")) { + wprintf("You have declined this meeting invitation. " + "It has not been entered into your calendar, " + ); + } + wprintf("and a reply has been sent to the meeting organizer." + "
\n" + ); + } else { + wprintf("" + "%s\n", &buf[4]); + } + + wprintf("wc_roomname); + wprintf("\">Return to messages
\n"); wDumpContent(1); } diff --git a/webcit/event.c b/webcit/event.c index 93632f6a2..11ece5454 100644 --- a/webcit/event.c +++ b/webcit/event.c @@ -59,12 +59,14 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum) "
\n" ); + /************************************************************ + * Uncomment this to see the UID in calendar events for debugging wprintf("UID == "); p = icalcomponent_get_first_property(vevent, ICAL_UID_PROPERTY); if (p != NULL) { escputs((char *)icalproperty_get_comment(p)); } - wprintf(" (FIXME remove this when done)
\n"); + *************************************************************/ wprintf("
\n"); wprintf("\n", -- 2.39.2