aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar.h
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/calendar.h')
-rw-r--r--calendar/gui/calendar.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/calendar/gui/calendar.h b/calendar/gui/calendar.h
index a59fec7544..95c92e7fa8 100644
--- a/calendar/gui/calendar.h
+++ b/calendar/gui/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