aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/calobj.h
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1998-04-18 03:35:43 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-04-18 03:35:43 +0800
commit55f88f14fed53f67e4b3cd5337cbe92aee0ec638 (patch)
treed783e0896a0649b70ec67c13073841c7f3fbd64f /calendar/calobj.h
parentad0347d16bfd10f5f6b0783d7030cac420c4362a (diff)
downloadgsoc2013-evolution-55f88f14fed53f67e4b3cd5337cbe92aee0ec638.tar
gsoc2013-evolution-55f88f14fed53f67e4b3cd5337cbe92aee0ec638.tar.gz
gsoc2013-evolution-55f88f14fed53f67e4b3cd5337cbe92aee0ec638.tar.bz2
gsoc2013-evolution-55f88f14fed53f67e4b3cd5337cbe92aee0ec638.tar.lz
gsoc2013-evolution-55f88f14fed53f67e4b3cd5337cbe92aee0ec638.tar.xz
gsoc2013-evolution-55f88f14fed53f67e4b3cd5337cbe92aee0ec638.tar.zst
gsoc2013-evolution-55f88f14fed53f67e4b3cd5337cbe92aee0ec638.zip
Large number of updates. Recurrence basically works now in most of its
Large number of updates. Recurrence basically works now in most of its forms (daily, weekly, month-by-position). Miguel. svn path=/trunk/; revision=148
Diffstat (limited to 'calendar/calobj.h')
-rw-r--r--calendar/calobj.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/calendar/calobj.h b/calendar/calobj.h
index ab9d061956..8cbdffa484 100644
--- a/calendar/calobj.h
+++ b/calendar/calobj.h
@@ -86,16 +86,26 @@ typedef struct {
enum RecurType type;
int interval;
- time_t enddate;
+
+ /* Used for recur computation */
+ time_t enddate; /* If the value is zero, it is an infinite event
+ * otherwise, it is either the _enddate value (if
+ * this is what got specified) or it is our computed
+ * ending date (computed from the duration item).
+ */
+
int weekday;
union {
int month_pos;
int month_day;
} u;
-
- int temp_duration; /* Used temporarly, we compute enddate */
+
+ int duration;
+ time_t _enddate; /* As found on the vCalendar file */
+ int __count;
} Recurrence;
+#define IS_INFINITE(r) (r->duration == 0)
/* Flags to indicate what has changed in an object */
typedef enum {
@@ -157,7 +167,7 @@ typedef struct {
} iCalObject;
/* The callback for the recurrence generator */
-typedef void (*calendarfn)(iCalObject *, time_t, time_t, void *);
+typedef int (*calendarfn)(iCalObject *, time_t, time_t, void *);
iCalObject *ical_new (char *comment, char *organizer, char *summary);
iCalObject *ical_object_new (void);