$Log$
+Revision 410.2 2003/03/13 05:20:23 ajc
+* Various changes to the calendar service to handle messages containing
+ fully encapsulated VCALENDAR components instead of only unencapsulated
+ VEVENT subcomponents. We have to move in this direction for compatibility
+ with other products.
+
Revision 410.1 2003/03/01 22:07:19 ajc
* New user registration, as well as existing user re-registration, now
uses the vCard editing screen.
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
-
-
/*
* 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,
/*
* 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;
/*
* Display a task by itself (for editing)
+ *
+ * ok for complete vcalendar objects
*/
void display_edit_individual_task(icalcomponent *supplied_vtodo, long msgnum) {
icalcomponent *vtodo;
if (supplied_vtodo != NULL) {
vtodo = supplied_vtodo;
+
+ /* If we're looking at a fully encapsulated VCALENDAR
+ * rather than a VTODO component, attempt to use the first
+ * relevant VTODO subcomponent. If there is none, the
+ * NULL returned by icalcomponent_get_first_component() will
+ * tell the next iteration of this function to create a
+ * new one.
+ */
+ if (icalcomponent_isa(vtodo) == ICAL_VCALENDAR_COMPONENT) {
+ display_edit_individual_task(
+ icalcomponent_get_first_component(
+ vtodo, ICAL_VTODO_COMPONENT
+ ), msgnum
+ );
+ return;
+ }
}
else {
vtodo = icalcomponent_new(ICAL_VTODO_COMPONENT);
/*
* Save an edited task
+ *
+ * ok
*/
void save_individual_task(icalcomponent *supplied_vtodo, long msgnum) {
char buf[SIZ];
if (supplied_vtodo != NULL) {
vtodo = supplied_vtodo;
+ /* If we're looking at a fully encapsulated VCALENDAR
+ * rather than a VTODO component, attempt to use the first
+ * relevant VTODO subcomponent. If there is none, the
+ * NULL returned by icalcomponent_get_first_component() will
+ * tell the next iteration of this function to create a
+ * new one.
+ */
+ if (icalcomponent_isa(vtodo) == ICAL_VCALENDAR_COMPONENT) {
+ save_individual_task(
+ icalcomponent_get_first_component(
+ vtodo, ICAL_VTODO_COMPONENT
+ ), msgnum
+ );
+ return;
+ }
}
else {
vtodo = icalcomponent_new(ICAL_VTODO_COMPONENT);
* type, we load the message and hunt for that MIME type. If found, we load
* 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,
/*
* Display an event by itself (for editing)
+ *
+ * ok
*/
void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum) {
icalcomponent *vevent;
if (supplied_vevent != NULL) {
vevent = supplied_vevent;
+ /* If we're looking at a fully encapsulated VCALENDAR
+ * rather than a VTODO component, attempt to use the first
+ * relevant VTODO subcomponent. If there is none, the
+ * NULL returned by icalcomponent_get_first_component() will
+ * tell the next iteration of this function to create a
+ * new one.
+ */
+ if (icalcomponent_isa(vevent) == ICAL_VCALENDAR_COMPONENT) {
+ display_edit_individual_event(
+ icalcomponent_get_first_component(
+ vevent, ICAL_VTODO_COMPONENT
+ ), msgnum
+ );
+ return;
+ }
}
else {
vevent = icalcomponent_new(ICAL_VEVENT_COMPONENT);
/*
* Save an edited event
+ *
+ * ok
*/
void save_individual_event(icalcomponent *supplied_vevent, long msgnum) {
char buf[SIZ];
if (supplied_vevent != NULL) {
vevent = supplied_vevent;
+ /* If we're looking at a fully encapsulated VCALENDAR
+ * rather than a VTODO component, attempt to use the first
+ * relevant VTODO subcomponent. If there is none, the
+ * NULL returned by icalcomponent_get_first_component() will
+ * tell the next iteration of this function to create a
+ * new one.
+ */
+ if (icalcomponent_isa(vevent) == ICAL_VCALENDAR_COMPONENT) {
+ save_individual_event(
+ icalcomponent_get_first_component(
+ vevent, ICAL_VTODO_COMPONENT
+ ), msgnum
+ );
+ return;
+ }
}
else {
vevent = icalcomponent_new(ICAL_VEVENT_COMPONENT);