summaryrefslogtreecommitdiffabout
path: root/libical/src/libicalss/icalspanlist.h
Unidiff
Diffstat (limited to 'libical/src/libicalss/icalspanlist.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libical/src/libicalss/icalspanlist.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/libical/src/libicalss/icalspanlist.h b/libical/src/libicalss/icalspanlist.h
index 83cb1c8..91f0acb 100644
--- a/libical/src/libicalss/icalspanlist.h
+++ b/libical/src/libicalss/icalspanlist.h
@@ -28,26 +28,49 @@
28#include "ical.h" 28#include "ical.h"
29#include "icalset.h" 29#include "icalset.h"
30 30
31typedef void icalspanlist; 31/** @file icalspanlist.h
32 * @brief Code that supports collections of free/busy spans of time
33 */
34
35typedef struct icalspanlist_impl icalspanlist;
36
37
38/** @brief Constructor
39 * Make a free list from a set of component. Start and end should be in UTC
40 */
32 41
33/* Make a free list from a set of component. Start and end should be in UTC */
34icalspanlist* icalspanlist_new(icalset *set, 42icalspanlist* icalspanlist_new(icalset *set,
35 struct icaltimetype start, 43 struct icaltimetype start,
36 struct icaltimetype end); 44 struct icaltimetype end);
37 45
46/** @brief Destructor
47 */
38void icalspanlist_free(icalspanlist* spl); 48void icalspanlist_free(icalspanlist* spl);
39 49
50/* Unimplemented functions */
40icalcomponent* icalspanlist_make_free_list(icalspanlist* sl); 51icalcomponent* icalspanlist_make_free_list(icalspanlist* sl);
41icalcomponent* icalspanlist_make_busy_list(icalspanlist* sl); 52icalcomponent* icalspanlist_make_busy_list(icalspanlist* sl);
42 53
43/* Get first free or busy time after time t. all times are in UTC */ 54/** Get first next free time after time t. all times are in UTC. */
44struct icalperiodtype icalspanlist_next_free_time(icalspanlist* sl, 55struct icalperiodtype icalspanlist_next_free_time(icalspanlist* sl,
45 struct icaltimetype t); 56 struct icaltimetype t);
57/** Get first next busy time after time t. all times are in UTC. */
46struct icalperiodtype icalspanlist_next_busy_time(icalspanlist* sl, 58struct icalperiodtype icalspanlist_next_busy_time(icalspanlist* sl,
47 struct icaltimetype t); 59 struct icaltimetype t);
48 60
49void icalspanlist_dump(icalspanlist* s); 61void icalspanlist_dump(icalspanlist* s);
50 62
63/** @brief Return a valid VFREEBUSY component for this span */
64icalcomponent *icalspanlist_as_vfreebusy(icalspanlist* s_in,
65 const char* organizer,
66 const char* attendee);
67
68/** @brief Return an integer matrix of total events per delta_t timespan */
69int *icalspanlist_as_freebusy_matrix(icalspanlist* span, int delta_t);
70
71/** @brief Construct an icalspanlist from a VFREEBUSY component */
72icalspanlist *icalspanlist_from_vfreebusy(icalcomponent* c);
73
51#endif 74#endif
52 75
53 76