* Process a calendar object
* ...at this point it's already been deserialized by cal_process_attachment()
*
- * ok for complete vcalendar objects
- *
*/
void cal_process_object(icalcomponent *cal,
int recursion_level,
"<IMG ALIGN=CENTER "
"SRC=\"/static/vcalendar.gif\">"
" "
- "<B>Meeting invitation</B>
- </TD></TR>\n"
+ "<B>Meeting invitation</B>"
+ "</TD></TR>\n"
);
break;
case ICAL_METHOD_REPLY:
"<IMG ALIGN=CENTER "
"SRC=\"/static/vcalendar.gif\">"
" "
- "<B>Attendee's reply to your invitation</B>
- </TD></TR>\n"
+ "<B>Attendee's reply to your invitation</B>"
+ "</TD></TR>\n"
);
break;
case ICAL_METHOD_PUBLISH:
"<IMG ALIGN=CENTER "
"SRC=\"/static/vcalendar.gif\">"
" "
- "<B>Published event</B>
- </TD></TR>\n"
+ "<B>Published event</B>"
+ "</TD></TR>\n"
);
break;
default:
/*
* Deserialize a calendar object in a message so it can be processed.
* (This is the main entry point for these things)
- * ok for complete vcalendar objects
*/
void cal_process_attachment(char *part_source, long msgnum, char *cal_partnum) {
icalcomponent *cal;
output_headers(3);
- wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#007700\"><TR><TD>"
+ wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">Respond to meeting request</SPAN>"
"</TD></TR></TABLE><BR>\n"
);
output_headers(3);
- wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#007700\"><TR><TD>"
+ wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">"
"Update your calendar with this RSVP</SPAN>"
"</TD></TR></TABLE><BR>\n"
/*
* Display a task by itself (for editing)
*
- * ok for complete vcalendar objects
*/
void display_edit_individual_task(icalcomponent *supplied_vtodo, long msgnum) {
icalcomponent *vtodo;
}
output_headers(3);
- wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#007700\"><TR><TD>"
+ wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>"
"<SPAN CLASS=\"titlebar\">Edit task</SPAN>"
"</TD></TR></TABLE><BR>\n"
);
/*
* Save an edited task
*
- * ok
*/
void save_individual_task(icalcomponent *supplied_vtodo, long msgnum) {
char buf[SIZ];
* the relevant part, deserialize it into a libical component, filter it for
* the requested object type, and feed it to the specified handler.
*
- * ok
*/
void display_using_handler(long msgnum,
char *mimetype,
}
}
+
+
+
+
+/*
+ * freebusy display (for client software)
+ */
+void do_freebusy(char *req) {
+ char who[SIZ];
+ char buf[SIZ];
+ char *fb;
+
+ extract_token(who, req, 1, ' ');
+ if (!strncasecmp(who, "/freebusy/", 10)) {
+ strcpy(who, &who[10]);
+ }
+ unescape_input(who);
+
+ if ( (!strcasecmp(&who[strlen(who)-4], ".vcf"))
+ || (!strcasecmp(&who[strlen(who)-4], ".vfb")) ) {
+ who[strlen(who)-4] = 0;
+ }
+
+ lprintf(9, "freebusy requested for <%s>\n", who);
+ serv_printf("ICAL freebusy|%s", who);
+ serv_gets(buf);
+
+ if (buf[0] != '1') {
+ wprintf("HTTP/1.0 404 %s\n", &buf[4]);
+ output_headers(0);
+ wprintf("Content-Type: text/plain\n");
+ wprintf("\n");
+ wprintf("%s\n", &buf[4]);
+ return;
+ }
+
+ fb = read_server_text();
+ http_transmit_thing(fb, strlen(fb), "text/calendar", 0);
+ free(fb);
+}
+
+
+
#endif /* WEBCIT_WITH_CALENDAR_SERVICE */