|
Libical API Documentation
3.0
|
Code that supports collections of free/busy spans of time. More...
Go to the source code of this file.
Typedefs | |
| typedef struct icalspanlist_impl | icalspanlist |
Functions | |
| int * | icalspanlist_as_freebusy_matrix (icalspanlist *span, int delta_t) |
| Return an integer matrix of total events per delta_t timespan. More... | |
| icalcomponent * | icalspanlist_as_vfreebusy (icalspanlist *sl, const char *organizer, const char *attendee) |
| Return a valid VFREEBUSY component for this span. More... | |
| void | icalspanlist_dump (icalspanlist *s) |
| (Debug) print out spanlist to stdout. More... | |
| void | icalspanlist_free (icalspanlist *spl) |
| Destructor. More... | |
| icalspanlist * | icalspanlist_from_vfreebusy (icalcomponent *comp) |
| Construct an icalspanlist from a VFREEBUSY component. More... | |
| icalspanlist * | icalspanlist_new (icalset *set, struct icaltimetype start, struct icaltimetype end) |
| Constructor Make a free list from a set of component. Start and end should be in UTC. More... | |
| struct icalperiodtype | icalspanlist_next_free_time (icalspanlist *sl, struct icaltimetype t) |
| Find next free time span in a spanlist. More... | |
Code that supports collections of free/busy spans of time.
| int* icalspanlist_as_freebusy_matrix | ( | icalspanlist * | sl, |
| int | delta_t | ||
| ) |
Return an integer matrix of total events per delta_t timespan.
Return an integer matrix of total events per delta_t timespan.
| sl | 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.
calculate the start and end time as time_t
insure that the time period falls on a time boundary divisable by delta_t
find the duration of this spanlist
malloc our matrix, add one extra slot for a final -1
| icalcomponent* icalspanlist_as_vfreebusy | ( | icalspanlist * | sl, |
| const char * | organizer, | ||
| const char * | attendee | ||
| ) |
Return a valid VFREEBUSY component for this span.
Return a valid VFREEBUSY component for this span.
| sl | 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.
| void icalspanlist_dump | ( | icalspanlist * | sl | ) |
(Debug) print out spanlist to stdout.
| sl | A valid icalspanlist. |
| void icalspanlist_free | ( | icalspanlist * | s | ) |
Destructor.
| s | A valid icalspanlist |
Free memory associated with the spanlist
| icalspanlist* icalspanlist_from_vfreebusy | ( | icalcomponent * | comp | ) |
Construct an icalspanlist from a VFREEBUSY component.
Construct an icalspanlist from a VFREEBUSY component.
| comp | A valid icalcomponent. |
| icalspanlist* icalspanlist_new | ( | icalset * | set, |
| struct icaltimetype | start, | ||
| struct icaltimetype | end | ||
| ) |
Constructor Make a free list from a set of component. Start and end should be in UTC.
Constructor Make a free list from a set of component. Start and end should be in UTC.
| set | A 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.
| struct icalperiodtype icalspanlist_next_free_time | ( | icalspanlist * | sl, |
| struct icaltimetype | t | ||
| ) |
Find next free time span in a spanlist.
Get first next free time after time t. all times are in UTC.
| sl | The spanlist to search. |
| t | The time to start looking. |
Given a spanlist and a time, find the next period of time that is free
1.8.14