aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-util/cal-recur.h
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-08-02 09:08:52 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-08-02 09:08:52 +0800
commit4e5b1da82e7ada3667bfa47471defd5932afc405 (patch)
treea5405dd760a6fee1ce6edc7f3935b3ab38e47b3d /calendar/cal-util/cal-recur.h
parent3ce00eb40ede3898fda426b3e125139ab84242b4 (diff)
downloadgsoc2013-evolution-4e5b1da82e7ada3667bfa47471defd5932afc405.tar
gsoc2013-evolution-4e5b1da82e7ada3667bfa47471defd5932afc405.tar.gz
gsoc2013-evolution-4e5b1da82e7ada3667bfa47471defd5932afc405.tar.bz2
gsoc2013-evolution-4e5b1da82e7ada3667bfa47471defd5932afc405.tar.lz
gsoc2013-evolution-4e5b1da82e7ada3667bfa47471defd5932afc405.tar.xz
gsoc2013-evolution-4e5b1da82e7ada3667bfa47471defd5932afc405.tar.zst
gsoc2013-evolution-4e5b1da82e7ada3667bfa47471defd5932afc405.zip
Use CalComponent and the new property types instead of the old iCalObject
2000-07-31 Federico Mena Quintero <federico@helixcode.com> * cal-util/cal-recur.c (*): Use CalComponent and the new property types instead of the old iCalObject stuff. (cal_recur_generate_instances): Renamed from cal_object_generate_events(). Ensure that the component has the DTSTART property. (generate_instances_for_year): Renamed from cal_object_generate_events_for_year(). (cal_obj_expand_recurrence): Made static. (cal_recur_from_icalrecurrencetype): New function. We should really convert this whole file to use struct icalrecurrencetype instead. (cal_recur_free): New function. * cal-util/cal-recur.h (CalRecurType): Renamed from CalObjRecurType. (CalRecurrence): Renamed from CalObjRecurrence. * cal-util/timeutil.c (time_from_icaltimetype): New function. * cal-util/Makefile.am: Commented out the test-recur program. svn path=/trunk/; revision=4464
Diffstat (limited to 'calendar/cal-util/cal-recur.h')
-rw-r--r--calendar/cal-util/cal-recur.h40
1 files changed, 15 insertions, 25 deletions
diff --git a/calendar/cal-util/cal-recur.h b/calendar/cal-util/cal-recur.h
index 391fbfd491..621985b71b 100644
--- a/calendar/cal-util/cal-recur.h
+++ b/calendar/cal-util/cal-recur.h
@@ -26,15 +26,10 @@
#include <libgnome/gnome-defs.h>
#include <glib.h>
-#include "calobj.h"
+#include <cal-util/cal-component.h>
BEGIN_GNOME_DECLS
-
-/* FIXME: I've put modified versions of RecurType and Recurrence here, since
- the ones in calobj.h don't support all of iCalendar. Hopefully Seth will
- update those soon and these can be removed. */
-
typedef enum {
CAL_RECUR_YEARLY,
CAL_RECUR_MONTHLY,
@@ -43,10 +38,10 @@ typedef enum {
CAL_RECUR_HOURLY,
CAL_RECUR_MINUTELY,
CAL_RECUR_SECONDLY
-} CalObjRecurType;
+} CalRecurType;
typedef struct {
- CalObjRecurType type;
+ CalRecurType type;
int interval;
@@ -90,10 +85,7 @@ typedef struct {
/* For BYSETPOS modifier. A list of GINT_TO_POINTERs, +ve or -ve. */
GList *bysetpos;
-} CalObjRecurrence;
-
-
-
+} CalRecurrence;
/* This is what we use to represent a date & time. */
typedef struct _CalObjTime CalObjTime;
@@ -106,21 +98,19 @@ struct _CalObjTime {
guint8 second; /* 0 - 59 (maybe 60 for leap second) */
};
+typedef gboolean (* CalRecurInstanceFn) (CalComponent *comp,
+ time_t instance_start,
+ time_t instace_end,
+ gpointer data);
-/* This will eventually replace ical_object_generate_events(). */
-void cal_object_generate_events (iCalObject *ico,
- time_t start,
- time_t end,
- calendarfn cb,
- void *closure);
-
-
-/* This is an internal function, only here for testing. */
-GArray* cal_obj_expand_recurrence (CalObjTime *event_start,
- CalObjRecurrence *recur,
- CalObjTime *interval_start,
- CalObjTime *interval_end);
+void cal_recur_generate_instances (CalComponent *comp,
+ time_t start,
+ time_t end,
+ CalRecurInstanceFn cb,
+ gpointer cb_data);
+CalRecurrence *cal_recur_from_icalrecurrencetype (struct icalrecurrencetype *ir);
+void cal_recur_free (CalRecurrence *r);
END_GNOME_DECLS