4 * Functions which handle calendar objects and their processing/display.
14 #include <sys/types.h>
16 #include <sys/socket.h>
18 #include <netinet/in.h>
28 #include "webserver.h"
30 #ifndef WEBCIT_WITH_CALENDAR_SERVICE
33 * Handler stubs for builds with no calendar library available
35 void cal_process_attachment(char *part_source, long msgnum, char *cal_partnum) {
37 wprintf("<I>This message contains calendaring/scheduling information,"
38 " but support for calendars is not available on this "
39 "particular system. Please ask your system administrator to "
40 "install a new version of the Citadel web service with "
41 "calendaring enabled.</I><br />\n"
46 void display_calendar(long msgnum) {
48 "Cannot display calendar item. You are seeing this error "
49 "because your WebCit service has not been installed with "
50 "calendar support. Please contact your system administrator."
54 void display_task(long msgnum) {
56 "Cannot display to-do item. You are seeing this error "
57 "because your WebCit service has not been installed with "
58 "calendar support. Please contact your system administrator."
62 #else /* WEBCIT_WITH_CALENDAR_SERVICE */
65 /****** End of handler stubs. Everything below this line is real. ******/
71 * Process a calendar object
72 * ...at this point it's already been deserialized by cal_process_attachment()
75 void cal_process_object(icalcomponent *cal,
81 icalproperty *method = NULL;
82 icalproperty_method the_method = ICAL_METHOD_NONE;
84 struct icaltimetype t;
87 char conflict_name[SIZ];
90 /* Leading HTML for the display of this object */
91 if (recursion_level == 0) {
92 wprintf("<CENTER><TABLE border=0>\n");
95 /* Look for a method */
96 method = icalcomponent_get_first_property(cal, ICAL_METHOD_PROPERTY);
98 /* See what we need to do with this */
100 the_method = icalproperty_get_method(method);
102 case ICAL_METHOD_REQUEST:
103 wprintf("<TR><TD COLSPAN=2>\n"
105 "SRC=\"/static/calarea_48x.gif\">"
107 "<B>Meeting invitation</B>"
111 case ICAL_METHOD_REPLY:
112 wprintf("<TR><TD COLSPAN=2>\n"
114 "SRC=\"/static/calarea_48x.gif\">"
116 "<B>Attendee's reply to your invitation</B>"
120 case ICAL_METHOD_PUBLISH:
121 wprintf("<TR><TD COLSPAN=2>\n"
123 "SRC=\"/static/calarea_48x.gif\">"
125 "<B>Published event</B>"
130 wprintf("<TR><TD COLSPAN=2>"
131 "I don't know what to do with this.</TD></TR>"
137 p = icalcomponent_get_first_property(cal, ICAL_SUMMARY_PROPERTY);
139 wprintf("<TR><TD><B>Summary:</B></TD><TD>");
140 escputs((char *)icalproperty_get_comment(p));
141 wprintf("</TD></TR>\n");
144 p = icalcomponent_get_first_property(cal, ICAL_LOCATION_PROPERTY);
146 wprintf("<TR><TD><B>Location:</B></TD><TD>");
147 escputs((char *)icalproperty_get_comment(p));
148 wprintf("</TD></TR>\n");
152 * Only show start/end times if we're actually looking at the VEVENT
153 * component. Otherwise it shows bogus dates for things like timezone.
155 if (icalcomponent_isa(cal) == ICAL_VEVENT_COMPONENT) {
157 p = icalcomponent_get_first_property(cal,
158 ICAL_DTSTART_PROPERTY);
160 t = icalproperty_get_dtstart(p);
163 wprintf("<TR><TD><B>Date:"
165 "%s %d, %d</TD></TR>",
171 tt = icaltime_as_timet(t);
172 fmt_date(buf, tt, 0);
173 wprintf("<TR><TD><B>Starting date/time:"
180 p = icalcomponent_get_first_property(cal, ICAL_DTEND_PROPERTY);
182 t = icalproperty_get_dtend(p);
183 tt = icaltime_as_timet(t);
184 fmt_date(buf, tt, 0);
185 wprintf("<TR><TD><B>Ending date/time:</B></TD><TD>"
192 p = icalcomponent_get_first_property(cal, ICAL_DESCRIPTION_PROPERTY);
194 wprintf("<TR><TD><B>Description:</B></TD><TD>");
195 escputs((char *)icalproperty_get_comment(p));
196 wprintf("</TD></TR>\n");
199 /* If the component has attendees, iterate through them. */
200 for (p = icalcomponent_get_first_property(cal, ICAL_ATTENDEE_PROPERTY); (p != NULL); p = icalcomponent_get_next_property(cal, ICAL_ATTENDEE_PROPERTY)) {
201 wprintf("<TR><TD><B>Attendee:</B></TD><TD>");
202 strcpy(buf, icalproperty_get_attendee(p));
203 if (!strncasecmp(buf, "MAILTO:", 7)) {
205 /* screen name or email address */
206 strcpy(buf, &buf[7]);
211 /* participant status */
212 partstat_as_string(buf, p);
215 wprintf("</TD></TR>\n");
218 /* If the component has subcomponents, recurse through them. */
219 for (c = icalcomponent_get_first_component(cal, ICAL_ANY_COMPONENT);
221 c = icalcomponent_get_next_component(cal, ICAL_ANY_COMPONENT)) {
222 /* Recursively process subcomponent */
223 cal_process_object(c, recursion_level+1, msgnum, cal_partnum);
226 /* If this is a REQUEST, display conflicts and buttons */
227 if (the_method == ICAL_METHOD_REQUEST) {
229 /* Check for conflicts */
230 lprintf(9, "Checking server calendar for conflicts...\n");
231 serv_printf("ICAL conflicts|%ld|%s|", msgnum, cal_partnum);
232 serv_getln(buf, sizeof buf);
234 while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
235 extract_token(conflict_name, buf, 3, '|', sizeof conflict_name);
236 is_update = extract_int(buf, 4);
237 wprintf("<TR><TD><B><I>%s</I></B></TD>"
248 "This is an update of" :
249 "This event would conflict with"
253 escputs(conflict_name);
254 wprintf(""</I> "
255 "which is already in your calendar."
259 lprintf(9, "...done.\n");
261 /* Display the Accept/Decline buttons */
262 wprintf("<TR><TD>How would you like to respond to this invitation?</td>"
264 "<A HREF=\"/respond_to_request?msgnum=%ld&cal_partnum=%s&sc=Accept\">Accept</a>"
266 "<A HREF=\"/respond_to_request?msgnum=%ld&cal_partnum=%s&sc=Tentative\">Tentative</a>"
268 "<A HREF=\"/respond_to_request?msgnum=%ld&cal_partnum=%s&sc=Decline\">Decline</a>"
269 "</FONT></TD></TR>\n",
277 /* If this is a REPLY, display update button */
278 if (the_method == ICAL_METHOD_REPLY) {
281 * In the future, if we want to validate this object before
282 * continuing, we can do it this way:
283 serv_printf("ICAL whatever|%ld|%s|", msgnum, cal_partnum);
284 serv_getln(buf, sizeof buf);
288 /* Display the update buttons */
290 "Click <i>Update</i> to accept this reply and "
291 "update your calendar."
292 "</td><td><font size=+1>"
293 "<a href=\"/handle_rsvp?msgnum=%ld&cal_partnum=%s&sc=Update\">Update</a>"
295 "<a href=\"/handle_rsvp?msgnum=%ld&cal_partnum=%s&sc=Ignore\">Ignore</a>"
304 /* Trailing HTML for the display of this object */
305 if (recursion_level == 0) {
307 wprintf("</TR></TABLE></CENTER>\n");
313 * Deserialize a calendar object in a message so it can be processed.
314 * (This is the main entry point for these things)
316 void cal_process_attachment(char *part_source, long msgnum, char *cal_partnum) {
319 cal = icalcomponent_new_from_string(part_source);
322 wprintf("Error parsing calendar object<br />\n");
327 cal_process_object(cal, 0, msgnum, cal_partnum);
329 /* Free the memory we obtained from libical's constructor */
330 icalcomponent_free(cal);
337 * Respond to a meeting request
339 void respond_to_request(void) {
342 output_headers(1, 1, 2, 0, 0, 0, 0);
344 wprintf("<div id=\"banner\">\n");
345 wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
346 "<SPAN CLASS=\"titlebar\">Respond to meeting request</SPAN>"
347 "</TD></TR></TABLE>\n"
349 wprintf("</div>\n<div id=\"content\">\n");
351 serv_printf("ICAL respond|%s|%s|%s|",
356 serv_getln(buf, sizeof buf);
359 wprintf("<TABLE BORDER=0><TR><TD>"
360 "<IMG SRC=\"static/calarea_48x.gif\" ALIGN=CENTER>"
363 if (!strcasecmp(bstr("sc"), "accept")) {
364 wprintf("You have accepted this meeting invitation. "
365 "It has been entered into your calendar, "
367 } else if (!strcasecmp(bstr("sc"), "tentative")) {
368 wprintf("You have tentatively accepted this meeting invitation. "
369 "It has been 'pencilled in' to your calendar, "
371 } else if (!strcasecmp(bstr("sc"), "decline")) {
372 wprintf("You have declined this meeting invitation. "
373 "It has <b>not</b> been entered into your calendar, "
376 wprintf("and a reply has been sent to the meeting organizer."
377 "</TD></TR></TABLE>\n"
380 wprintf("<IMG SRC=\"static/error.gif\" ALIGN=CENTER>"
384 wprintf("<A HREF=\"/dotskip?room=");
385 urlescputs(WC->wc_roomname);
386 wprintf("\"><br />Return to messages</A><br />\n");
394 * Handle an incoming RSVP
396 void handle_rsvp(void) {
399 output_headers(1, 1, 2, 0, 0, 0, 0);
401 wprintf("<div id=\"banner\">\n");
402 wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
403 "<SPAN CLASS=\"titlebar\">"
404 "Update your calendar with this RSVP</SPAN>"
405 "</TD></TR></TABLE>\n"
406 "</div>\n<div id=\"content\">\n"
409 serv_printf("ICAL handle_rsvp|%s|%s|%s|",
414 serv_getln(buf, sizeof buf);
417 wprintf("<TABLE BORDER=0><TR><TD>"
418 "<IMG SRC=\"static/calarea_48x.gif\" ALIGN=CENTER>"
421 if (!strcasecmp(bstr("sc"), "update")) {
422 wprintf("Your calendar has been updated "
423 "to reflect this RSVP."
425 } else if (!strcasecmp(bstr("sc"), "ignore")) {
426 wprintf("You have chosen to ignore this RSVP. "
427 "Your calendar has <b>not</b> been updated."
430 wprintf("</TD></TR></TABLE>\n"
433 wprintf("<IMG SRC=\"static/error.gif\" ALIGN=CENTER>"
437 wprintf("<A HREF=\"/dotskip?room=");
438 urlescputs(WC->wc_roomname);
439 wprintf("\"><br />Return to messages</A><br />\n");
447 /*****************************************************************************/
452 * Display handlers for message reading
458 * If we're reading calendar items, just store them for now. We have to
459 * sort and re-output them later when we draw the calendar.
461 void display_individual_cal(icalcomponent *cal, long msgnum) {
465 WC->disp_cal = realloc(WC->disp_cal,
466 (sizeof(struct disp_cal) * WC->num_cal) );
467 WC->disp_cal[WC->num_cal - 1].cal = icalcomponent_new_clone(cal);
469 WC->disp_cal[WC->num_cal - 1].cal_msgnum = msgnum;
475 * Display a task by itself (for editing)
478 void display_edit_individual_task(icalcomponent *supplied_vtodo, long msgnum) {
479 icalcomponent *vtodo;
481 struct icaltimetype t;
483 int created_new_vtodo = 0;
487 if (supplied_vtodo != NULL) {
488 vtodo = supplied_vtodo;
490 /* If we're looking at a fully encapsulated VCALENDAR
491 * rather than a VTODO component, attempt to use the first
492 * relevant VTODO subcomponent. If there is none, the
493 * NULL returned by icalcomponent_get_first_component() will
494 * tell the next iteration of this function to create a
497 if (icalcomponent_isa(vtodo) == ICAL_VCALENDAR_COMPONENT) {
498 display_edit_individual_task(
499 icalcomponent_get_first_component(
500 vtodo, ICAL_VTODO_COMPONENT
507 vtodo = icalcomponent_new(ICAL_VTODO_COMPONENT);
508 created_new_vtodo = 1;
511 output_headers(1, 1, 2, 0, 0, 0, 0);
512 wprintf("<div id=\"banner\">\n"
513 "<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR>"
514 "<TD><IMG SRC=\"/static/taskmanag_48x.gif\"></TD>"
515 "<td><SPAN CLASS=\"titlebar\">Edit task</SPAN>"
516 "</TD></TR></TABLE>\n"
517 "</div>\n<div id=\"content\">\n"
520 wprintf("<div id=\"fix_scrollbar_bug\">"
521 "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>");
523 wprintf("<FORM METHOD=\"POST\" ACTION=\"/save_task\">\n");
524 wprintf("<INPUT TYPE=\"hidden\" NAME=\"msgnum\" VALUE=\"%ld\">\n",
527 wprintf("<TABLE border=0>\n");
529 wprintf("<TR><TD>Summary:</TD><TD>"
530 "<INPUT TYPE=\"text\" NAME=\"summary\" "
531 "MAXLENGTH=\"64\" SIZE=\"64\" VALUE=\"");
532 p = icalcomponent_get_first_property(vtodo, ICAL_SUMMARY_PROPERTY);
534 escputs((char *)icalproperty_get_comment(p));
536 wprintf("\"></TD></TR>\n");
538 wprintf("<TR><TD>Start date:</TD><TD>");
539 p = icalcomponent_get_first_property(vtodo, ICAL_DTSTART_PROPERTY);
541 t = icalproperty_get_dtstart(p);
544 t = icaltime_from_timet(now, 0);
546 display_icaltimetype_as_webform(&t, "dtstart");
547 wprintf("</TD></TR>\n");
549 wprintf("<TR><TD>Due date:</TD><TD>");
550 p = icalcomponent_get_first_property(vtodo, ICAL_DUE_PROPERTY);
552 t = icalproperty_get_due(p);
555 t = icaltime_from_timet(now, 0);
557 display_icaltimetype_as_webform(&t, "due");
558 wprintf("</TD></TR>\n");
559 wprintf("<TR><TD>Description:</TD><TD>");
560 wprintf("<TEXTAREA NAME=\"description\" wrap=soft "
561 "ROWS=10 COLS=80 WIDTH=80>\n"
563 p = icalcomponent_get_first_property(vtodo, ICAL_DESCRIPTION_PROPERTY);
565 escputs((char *)icalproperty_get_comment(p));
567 wprintf("</TEXTAREA></TD></TR></TABLE>\n");
570 "<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Save\">"
572 "<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Delete\">\n"
574 "<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Cancel\">\n"
578 wprintf("</FORM>\n");
580 wprintf("</td></tr></table></div>\n");
583 if (created_new_vtodo) {
584 icalcomponent_free(vtodo);
589 * Save an edited task
592 void save_individual_task(icalcomponent *supplied_vtodo, long msgnum) {
594 int delete_existing = 0;
596 icalcomponent *vtodo, *encaps;
597 int created_new_vtodo = 0;
600 struct icaltimetype t;
602 if (supplied_vtodo != NULL) {
603 vtodo = supplied_vtodo;
604 /* If we're looking at a fully encapsulated VCALENDAR
605 * rather than a VTODO component, attempt to use the first
606 * relevant VTODO subcomponent. If there is none, the
607 * NULL returned by icalcomponent_get_first_component() will
608 * tell the next iteration of this function to create a
611 if (icalcomponent_isa(vtodo) == ICAL_VCALENDAR_COMPONENT) {
612 save_individual_task(
613 icalcomponent_get_first_component(
614 vtodo, ICAL_VTODO_COMPONENT
621 vtodo = icalcomponent_new(ICAL_VTODO_COMPONENT);
622 created_new_vtodo = 1;
625 if (!strcasecmp(bstr("sc"), "Save")) {
627 /* Replace values in the component with ones from the form */
629 while (prop = icalcomponent_get_first_property(vtodo,
630 ICAL_SUMMARY_PROPERTY), prop != NULL) {
631 icalcomponent_remove_property(vtodo, prop);
632 icalproperty_free(prop);
634 icalcomponent_add_property(vtodo,
635 icalproperty_new_summary(bstr("summary")));
637 while (prop = icalcomponent_get_first_property(vtodo,
638 ICAL_DESCRIPTION_PROPERTY), prop != NULL) {
639 icalcomponent_remove_property(vtodo, prop);
640 icalproperty_free(prop);
642 icalcomponent_add_property(vtodo,
643 icalproperty_new_description(bstr("description")));
645 while (prop = icalcomponent_get_first_property(vtodo,
646 ICAL_DTSTART_PROPERTY), prop != NULL) {
647 icalcomponent_remove_property(vtodo, prop);
648 icalproperty_free(prop);
650 icaltime_from_webform(&t, "dtstart");
651 icalcomponent_add_property(vtodo,
652 icalproperty_new_dtstart(t)
655 while (prop = icalcomponent_get_first_property(vtodo,
656 ICAL_DUE_PROPERTY), prop != NULL) {
657 icalcomponent_remove_property(vtodo, prop);
658 icalproperty_free(prop);
660 icaltime_from_webform(&t, "due");
661 icalcomponent_add_property(vtodo,
662 icalproperty_new_due(t)
665 /* Give this task a UID if it doesn't have one. */
666 lprintf(9, "Give this task a UID if it doesn't have one.\n");
667 if (icalcomponent_get_first_property(vtodo,
668 ICAL_UID_PROPERTY) == NULL) {
670 icalcomponent_add_property(vtodo,
671 icalproperty_new_uid(buf)
675 /* Increment the sequence ID */
676 lprintf(9, "Increment the sequence ID\n");
677 while (prop = icalcomponent_get_first_property(vtodo,
678 ICAL_SEQUENCE_PROPERTY), (prop != NULL) ) {
679 i = icalproperty_get_sequence(prop);
680 lprintf(9, "Sequence was %d\n", i);
681 if (i > sequence) sequence = i;
682 icalcomponent_remove_property(vtodo, prop);
683 icalproperty_free(prop);
686 lprintf(9, "New sequence is %d. Adding...\n", sequence);
687 icalcomponent_add_property(vtodo,
688 icalproperty_new_sequence(sequence)
692 * Encapsulate event into full VCALENDAR component. Clone it first,
693 * for two reasons: one, it's easier to just free the whole thing
694 * when we're done instead of unbundling, but more importantly, we
695 * can't encapsulate something that may already be encapsulated
698 lprintf(9, "Encapsulating into full VCALENDAR component\n");
699 encaps = ical_encapsulate_subcomponent(icalcomponent_new_clone(vtodo));
701 /* Serialize it and save it to the message base */
702 serv_puts("ENT0 1|||4");
703 serv_getln(buf, sizeof buf);
705 serv_puts("Content-type: text/calendar");
707 serv_puts(icalcomponent_as_ical_string(encaps));
710 /* Probably not necessary; the server will see the UID
711 * of the object and delete the old one anyway, but
716 icalcomponent_free(encaps);
720 * If the user clicked 'Delete' then explicitly delete the message.
722 if (!strcasecmp(bstr("sc"), "Delete")) {
726 if ( (delete_existing) && (msgnum > 0L) ) {
727 serv_printf("DELE %ld", atol(bstr("msgnum")));
728 serv_getln(buf, sizeof buf);
731 if (created_new_vtodo) {
732 icalcomponent_free(vtodo);
735 /* Go back to the task list */
742 * Code common to all display handlers. Given a message number and a MIME
743 * type, we load the message and hunt for that MIME type. If found, we load
744 * the relevant part, deserialize it into a libical component, filter it for
745 * the requested object type, and feed it to the specified handler.
748 void display_using_handler(long msgnum,
750 icalcomponent_kind which_kind,
751 void (*callback)(icalcomponent *, long)
754 char mime_partnum[SIZ];
755 char mime_filename[SIZ];
756 char mime_content_type[SIZ];
757 char mime_disposition[SIZ];
759 char relevant_partnum[SIZ];
760 char *relevant_source = NULL;
761 icalcomponent *cal, *c;
763 sprintf(buf, "MSG0 %ld|1", msgnum); /* ask for headers only */
765 serv_getln(buf, sizeof buf);
766 if (buf[0] != '1') return;
768 while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
769 if (!strncasecmp(buf, "part=", 5)) {
770 extract_token(mime_filename, &buf[5], 1, '|', sizeof mime_filename);
771 extract_token(mime_partnum, &buf[5], 2, '|', sizeof mime_partnum);
772 extract_token(mime_disposition, &buf[5], 3, '|', sizeof mime_disposition);
773 extract_token(mime_content_type, &buf[5], 4, '|', sizeof mime_content_type);
774 mime_length = extract_int(&buf[5], 5);
776 if (!strcasecmp(mime_content_type, "text/calendar")) {
777 strcpy(relevant_partnum, mime_partnum);
783 if (strlen(relevant_partnum) > 0) {
784 relevant_source = load_mimepart(msgnum, relevant_partnum);
785 if (relevant_source != NULL) {
787 cal = icalcomponent_new_from_string(relevant_source);
792 /* Simple components of desired type */
793 if (icalcomponent_isa(cal) == which_kind) {
794 callback(cal, msgnum);
797 /* Subcomponents of desired type */
798 for (c = icalcomponent_get_first_component(cal,
801 c = icalcomponent_get_next_component(cal,
805 icalcomponent_free(cal);
807 free(relevant_source);
813 void display_calendar(long msgnum) {
814 display_using_handler(msgnum, "text/calendar",
815 ICAL_VEVENT_COMPONENT,
816 display_individual_cal);
819 void display_task(long msgnum) {
820 display_using_handler(msgnum, "text/calendar",
821 ICAL_VTODO_COMPONENT,
822 display_individual_cal);
825 void display_edit_task(void) {
828 /* Force change the room if we have to */
829 if (strlen(bstr("taskrm")) > 0) {
830 gotoroom(bstr("taskrm"));
833 msgnum = atol(bstr("msgnum"));
836 display_using_handler(msgnum, "text/calendar",
837 ICAL_VTODO_COMPONENT,
838 display_edit_individual_task);
842 display_edit_individual_task(NULL, 0L);
846 void save_task(void) {
849 msgnum = atol(bstr("msgnum"));
851 display_using_handler(msgnum, "text/calendar",
852 ICAL_VTODO_COMPONENT,
853 save_individual_task);
856 save_individual_task(NULL, 0L);
860 void display_edit_event(void) {
863 msgnum = atol(bstr("msgnum"));
866 display_using_handler(msgnum, "text/calendar",
867 ICAL_VEVENT_COMPONENT,
868 display_edit_individual_event);
872 display_edit_individual_event(NULL, 0L);
876 void save_event(void) {
879 msgnum = atol(bstr("msgnum"));
882 display_using_handler(msgnum, "text/calendar",
883 ICAL_VEVENT_COMPONENT,
884 save_individual_event);
887 save_individual_event(NULL, 0L);
896 * freebusy display (for client software)
898 void do_freebusy(char *req) {
903 extract_token(who, req, 1, ' ', sizeof who);
904 if (!strncasecmp(who, "/freebusy/", 10)) {
905 strcpy(who, &who[10]);
909 if ( (!strcasecmp(&who[strlen(who)-4], ".vcf"))
910 || (!strcasecmp(&who[strlen(who)-4], ".ifb"))
911 || (!strcasecmp(&who[strlen(who)-4], ".vfb")) ) {
912 who[strlen(who)-4] = 0;
915 lprintf(9, "freebusy requested for <%s>\n", who);
916 serv_printf("ICAL freebusy|%s", who);
917 serv_getln(buf, sizeof buf);
920 wprintf("HTTP/1.0 404 %s\n", &buf[4]);
921 output_headers(0, 0, 0, 0, 0, 0, 0);
922 wprintf("Content-Type: text/plain\r\n");
924 wprintf("%s\n", &buf[4]);
928 fb = read_server_text();
929 http_transmit_thing(fb, strlen(fb), "text/calendar", 0);
935 #endif /* WEBCIT_WITH_CALENDAR_SERVICE */