diff options
author | Arturo Espinosa <unammx@src.gnome.org> | 1998-04-17 12:49:37 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1998-04-17 12:49:37 +0800 |
commit | 541c3a7a73e084b5ebd82aae7c3fc1f3ba4f0b72 (patch) | |
tree | a1eee2c2ff904bb8244e2a3645ecd4027615fde8 /calendar/calendar.h | |
parent | fe09695939f1d4bcf08b297cf4ade552944514ab (diff) | |
download | gsoc2013-evolution-541c3a7a73e084b5ebd82aae7c3fc1f3ba4f0b72.tar.gz gsoc2013-evolution-541c3a7a73e084b5ebd82aae7c3fc1f3ba4f0b72.tar.zst gsoc2013-evolution-541c3a7a73e084b5ebd82aae7c3fc1f3ba4f0b72.zip |
New event generation api in place -miguel
svn path=/trunk/; revision=146
Diffstat (limited to 'calendar/calendar.h')
-rw-r--r-- | calendar/calendar.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/calendar/calendar.h b/calendar/calendar.h index a59fec7544..95c92e7fa8 100644 --- a/calendar/calendar.h +++ b/calendar/calendar.h @@ -28,17 +28,36 @@ typedef struct { void *temp; } Calendar; +/* This is only used by the calendar_get_events_in_range routine to get + * a list of objects that recur on a specific date + */ +typedef struct { + time_t ev_start; + time_t ev_end; + iCalObject *ico; +} CalendarObject; + +typedef void (*calendarfn)(iCalObject *obj, time_t start, time_t end, void *closure); + Calendar *calendar_new (char *title); void calendar_load (Calendar *cal, char *fname); void calendar_add_object (Calendar *cal, iCalObject *obj); void calendar_remove_object (Calendar *cal, iCalObject *obj); void calendar_destroy (Calendar *cal); -GList *calendar_get_events_in_range (Calendar *cal, time_t start, time_t end, GCompareFunc sort_func); GList *calendar_get_objects_in_range (GList *objects, time_t start, time_t end, GCompareFunc sort_func); GList *calendar_get_todo_in_range (Calendar *cal, time_t start, time_t end, GCompareFunc sort_func); GList *calendar_get_journal_in_range (Calendar *cal, time_t start, time_t end, GCompareFunc sort_func); gint calendar_compare_by_dtstart (gpointer a, gpointer b); +void calendar_iterate_on_objects (GList *objects, time_t start, time_t end, calendarfn cb, void *closure); +void calendar_iterate (Calendar *cal, time_t start, time_t end, calendarfn cb, void *closure); + +/* Note this routine returns a GList with CalendarObjects */ +GList *calendar_get_events_in_range (Calendar *cal, time_t start, time_t end); + +/* Destroy the above list with this method */ +void calendar_destroy_event_list (GList *l); + END_GNOME_DECLS #endif |