#define PRODID "-//Citadel//NONSGML Citadel Calendar//EN"
#include "ctdl_module.h"
-
#include <libical/ical.h>
-
#include "msgbase.h"
#include "internet_addressing.h"
#include "serv_calendar.h"
#include "default_timezone.h"
#include "config.h"
-
struct ical_respond_data {
char desired_partnum[SIZ];
icalcomponent *cal;
}
-
/*
* Callback function for mime parser that hunts for calendar content types
* and turns them into calendar objects. If something is found, it is placed
}
-
-
/*
* Handle an incoming RSVP (object with method==ICAL_METHOD_REPLY) for a
* calendar event. The object has already been deserialized for us; all
return(1);
}
+
/*
* Phase 6 of "hunt for conflicts"
* called by ical_conflicts_phase5()
}
-
/*
* Phase 5 of "hunt for conflicts"
* Called by ical_conflicts_phase4()
}
-
-
/*
* Phase 4 of "hunt for conflicts"
* Called by ical_hunt_for_conflicts_backend()
}
-
/*
* Phase 3 of "hunt for conflicts"
* Called by ical_hunt_for_conflicts()
}
-
/*
* Phase 2 of "hunt for conflicts" operation.
* At this point we have a calendar object which represents the VEVENT that
}
-
/*
* Hunt for conflicts (Phase 1 -- retrieve the object and call Phase 2)
*/
}
-
/*
* Look for busy time in a VEVENT and add it to the supplied VFREEBUSY.
*
}
-
/*
* Backend for ical_freebusy()
*
}
-
/*
* Grab another user's free/busy times
*/
}
-
/*
* Backend for ical_getics()
*
}
-
/*
* Retrieve all of the calendar items in the current room, and output them
* as a single icalendar object.
}
if (!strcasecmp(subcmd, "sgi")) {
- CIT_ICAL->server_generated_invitations =
- (extract_int(argbuf, 1) ? 1 : 0) ;
- cprintf("%d %d\n",
- CIT_OK, CIT_ICAL->server_generated_invitations);
+ CIT_ICAL->server_generated_invitations = (extract_int(argbuf, 1) ? 1 : 0) ;
+ cprintf("%d %d\n", CIT_OK, CIT_ICAL->server_generated_invitations);
return;
}
}
-
/*
* We don't know if the calendar room exists so we just create it at login
*/
return;
}
-
/* If this is a VCALENDAR component, look for a VEVENT subcomponent. */
if (icalcomponent_isa(cal) == ICAL_VCALENDAR_COMPONENT) {
ical_send_out_invitations(top_level_cal,
attached_zones[num_zones_attached++] = z;
}
- icalproperty_set_parameter(p,
- icalparameter_new_tzid(icaltimezone_get_tzid(z))
+ icalproperty_set_parameter(p, icalparameter_new_tzid(icaltimezone_get_tzid(z))
);
}
}
}
-
/*
* Back end for ical_obj_beforesave()
* This hunts for the UID of the calendar event (becomes Citadel msg EUID),
}
-
-
/*
* See if we need to prevent the object from being saved (we don't allow
* MIME types other than text/calendar in "calendar" or "tasks" rooms).
memset(CIT_ICAL, 0, sizeof(struct cit_ical));
}
+
void ical_session_shutdown(void) {
free(CIT_ICAL);
}
/*
* Back end for ical_fixed_output()
*/
-void ical_fixed_output_backend(icalcomponent *cal,
- int recursion_level
-) {
+void ical_fixed_output_backend(icalcomponent *cal, int recursion_level) {
icalcomponent *c;
icalproperty *p;
char buf[256];
}
-
/*
* Function to output iCalendar data as plain text. Nobody uses MSG0
* anymore, so really this is just so we expose the vCard data to the full
}
-void serv_calendar_destroy(void)
-{
+void serv_calendar_destroy(void) {
icaltimezone_free_builtin_timezones();
}
CtdlRegisterMessageHook(ical_obj_beforesave, EVT_BEFORESAVE);
CtdlRegisterMessageHook(ical_obj_aftersave, EVT_AFTERSAVE);
CtdlRegisterSessionHook(ical_CtdlCreateRoom, EVT_LOGIN, PRIO_LOGIN + 1);
- CtdlRegisterProtoHook(cmd_ical, "ICAL", "Citadel iCal commands");
+ CtdlRegisterProtoHook(cmd_ical, "ICAL", "Citadel iCalendar commands");
CtdlRegisterSessionHook(ical_session_startup, EVT_START, PRIO_START + 1);
CtdlRegisterSessionHook(ical_session_shutdown, EVT_STOP, PRIO_STOP + 80);
CtdlRegisterFixedOutputHook("text/calendar", ical_fixed_output);