|
Libical API Documentation 4.0 UNRELEASED Go to the stable 3.0 documentation
|
Code that supports collections of free/busy spans of time. More...
Go to the source code of this file.
Functions | |
| int * | icalspanlist_as_freebusy_matrix (icalspanlist *spanlist, int delta_t) |
| icalcomponent * | icalspanlist_as_vfreebusy (icalspanlist *sl, const char *organizer, const char *attendee) |
| void | icalspanlist_dump (icalspanlist *sl) |
| void | icalspanlist_free (icalspanlist *sl) |
| icalspanlist * | icalspanlist_from_vfreebusy (icalcomponent *comp) |
| icalspanlist * | icalspanlist_new (icalset *set, struct icaltimetype start, struct icaltimetype end) |
| struct icalperiodtype | icalspanlist_next_free_time (icalspanlist *sl, struct icaltimetype t) |
Code that supports collections of free/busy spans of time.
Definition in file icalspanlist.h.
| int * icalspanlist_as_freebusy_matrix | ( | icalspanlist * | spanlist, |
| int | delta_t ) |
Returns an hour-by-hour array of free/busy times over a given period.
| spanlist | a pointer to a valid icalspanlist |
| delta_t | the time slice to divide by, in seconds. Default 3600. |
This calculation is somewhat tricky. This is due to the fact that the time range contains the start time, but does not contain the end time. To perform a proper calculation we subtract one second off the end times to get a true containing time.
Also note that if you supplying a spanlist that does not start or end on a time boundary divisible by delta_t you may get results that are not quite what you expect.
Definition at line 280 of file icalspanlist.c.
| icalcomponent * icalspanlist_as_vfreebusy | ( | icalspanlist * | sl, |
| const char * | organizer, | ||
| const char * | attendee ) |
Returns a VFREEBUSY component for a spanlist.
| sl | a pointer to a valid icalspanlist, from icalspanlist_new() |
| organizer | the organizer specified as "MAILTO:user@domain" |
| attendee | the attendee specified as "MAILTO:user@domain" |
This function returns a VFREEBUSY component for the given spanlist. The start time is mapped to DTSTART, the end time to DTEND. Each busy span is represented as a separate FREEBUSY entry. An attendee parameter is required, and organizer parameter is optional.
Definition at line 343 of file icalspanlist.c.
| void icalspanlist_dump | ( | icalspanlist * | sl | ) |
(Debug) print out spanlist to STDOUT.
| sl | a pointer to a valid icalspanlist. |
Definition at line 202 of file icalspanlist.c.
| void icalspanlist_free | ( | icalspanlist * | sl | ) |
Destructor.
| sl | A valid icalspanlist |
Frees the memory associated with the spanlist.
Definition at line 183 of file icalspanlist.c.
| icalspanlist * icalspanlist_from_vfreebusy | ( | icalcomponent * | comp | ) |
Constructs an icalspanlist from the VFREEBUSY component of an icalcomponent.
| comp | a pointer to a valid icalcomponent |
Definition at line 389 of file icalspanlist.c.
| icalspanlist * icalspanlist_new | ( | icalset * | set, |
| struct icaltimetype | start, | ||
| struct icaltimetype | end ) |
Makes a free list from a set of VEVENT components.
| set | a pointer to valid icalset containing VEVENTS |
| start | the free list starts at this date/time |
| end | the free list ends at this date/time |
Given a set of components, a start time and an end time return a spanlist that contains the free/busy times. start and end should be in UTC.
Definition at line 81 of file icalspanlist.c.
| struct icalperiodtype icalspanlist_next_free_time | ( | icalspanlist * | sl, |
| struct icaltimetype | t ) |
Finds the next free time span in a spanlist.
| sl | a pointer to a valid icalspanlist to search |
| t | the time to start looking. |
Given a spanlist and a time, finds the next period of free time.
Definition at line 216 of file icalspanlist.c.