Check attendee availability for scheduling a meeting.
[Calendaring background]


Functions

icalcomponent * get_freebusy_for_user (char *who)
 verify users avaiability Utility function to fetch a VFREEBUSY type of thing for any specified user.
int ical_ctdl_is_overlap (struct icaltimetype t1start, struct icaltimetype t1end, struct icaltimetype t2start, struct icaltimetype t2end)
 Check if dates are overlapping Check to see if two events overlap. (This function is used in both Citadel and WebCit. If you change it in one place, change it in the other. Better yet, put it in a library.).
void check_individual_attendee (char *attendee_string, struct icaltimetype event_start, struct icaltimetype event_end, char *annotation)
void check_attendee_availability (icalcomponent *vevent)
 check attendees availability Check the availability of all attendees for an event (when possible) and annotate accordingly.

Function Documentation

icalcomponent* get_freebusy_for_user ( char *  who  ) 

verify users avaiability Utility function to fetch a VFREEBUSY type of thing for any specified user.

Parameters:
who string of the user to search

Definition at line 26 of file availability.c.

References read_server_text(), serv_getln(), and serv_printf().

Referenced by check_individual_attendee().

int ical_ctdl_is_overlap ( struct icaltimetype  t1start,
struct icaltimetype  t1end,
struct icaltimetype  t2start,
struct icaltimetype  t2end 
)

Check if dates are overlapping Check to see if two events overlap. (This function is used in both Citadel and WebCit. If you change it in one place, change it in the other. Better yet, put it in a library.).

Parameters:
t1start date one start
t1end date one end
t2start date one start
t2end date two end
Returns:
nonzero if they do.

First, check for all-day events

Now check for overlaps using date *and* time.

First, bail out if either event 1 or event 2 is missing end time.

If event 1 ends before event 2 starts, we're in the clear.

If event 2 ends before event 1 starts, we're also ok.

Otherwise, they overlap.

Definition at line 64 of file availability.c.

Referenced by check_individual_attendee().

void check_individual_attendee ( char *  attendee_string,
struct icaltimetype  event_start,
struct icaltimetype  event_end,
char *  annotation 
)

Set to 'unknown' right from the beginning. Unless we learn something else, that's what we'll go with.

Make sure we're looking at a VFREEBUSY by itself. What we're probably looking at initially is a VFREEBUSY encapsulated in a VCALENDAR.

Iterate through all FREEBUSY's looking for conflicts.

Do the check

Definition at line 126 of file availability.c.

References get_freebusy_for_user(), and ical_ctdl_is_overlap().

Referenced by check_attendee_availability().

void check_attendee_availability ( icalcomponent *  vevent  ) 

check attendees availability Check the availability of all attendees for an event (when possible) and annotate accordingly.

Parameters:
vevent the event which should be compared with attendees calendar

If we're looking at a fully encapsulated VCALENDAR rather than a VEVENT component, attempt to use the first relevant VEVENT 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.

< Convert everything to UTC

Learn the start and end times.

Iterate through attendees.

screen name or email address

Replace the attendee name with an annotated one.

Definition at line 189 of file availability.c.

References check_attendee_availability(), check_individual_attendee(), ical_dezonify(), snprintf(), and striplt().

Referenced by check_attendee_availability(), and save_individual_event().


Generated on Wed Jun 20 23:13:12 2007 for webcit by  doxygen 1.5.2