From 38168a2e40c23292e6e9ac8472f06a754e7981e4 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Tue, 25 Jul 2000 22:01:22 +0000 Subject: New function. (scan_property): Handle the RDATE property. (scan_period): 2000-07-25 Federico Mena Quintero * cal-util/cal-component.c (cal_component_free_period_list): New function. (scan_property): Handle the RDATE property. (scan_period): Likewise. (free_icalcomponent): Likewise. (get_period_list): Likewise. (set_period_list): Likewise. (cal_component_get_rdate_list): Likewise. (cal_component_set_rdate_list): Likewise. (scan_text): Simplify a bit since we only handle the ALTREP parameter; there is no need to iterate over all parameters. (scan_datetime): Simplify; just handle the TZID parameter. (scan_summary): Simplify; just handle the ALTREP parameter. (cal_component_get_as_string): New function. * idl/evolution-calendar.idl (CalObjType): Removed the TYPE_OTHER; now we only expose the types of objects we know about. * cal-util/cal-util.h (CalObjType): Likewise. * cal-client/cal-client.c (cal_client_get_n_objects): Likewise. (cal_client_get_uids): Likewise. * conduits/calendar/calendar-conduit.c (get_calendar_objects): Likewise. (check_for_slow_setting): Likewise. * pcs/cal-backend-imc.c (count_objects): Likewise. (build_uids_list): Likewise. * pcs/cal.c (Cal_get_uids): Likewise. (Cal_get_n_objects): Likewise. svn path=/trunk/; revision=4336 --- calendar/cal-util/cal-component.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'calendar/cal-util/cal-component.h') diff --git a/calendar/cal-util/cal-component.h b/calendar/cal-util/cal-component.h index 664599f9f6..2d47746eda 100644 --- a/calendar/cal-util/cal-component.h +++ b/calendar/cal-util/cal-component.h @@ -69,6 +69,22 @@ typedef struct { const char *tzid; } CalComponentDateTime; +typedef enum { + CAL_COMPONENT_PERIOD_DATETIME, + CAL_COMPONENT_PERIOD_DURATION +} CalComponentPeriodType; + +typedef struct { + CalComponentPeriodType type; + + struct icaltimetype start; + + union { + struct icaltimetype end; + struct icaldurationtype duration; + } u; +} CalComponentPeriod; + typedef struct { /* Description string */ const char *value; @@ -89,11 +105,13 @@ typedef struct _CalComponentAlarm CalComponentAlarm; typedef struct _CalComponent CalComponent; typedef struct _CalComponentClass CalComponentClass; +typedef struct _CalComponentPrivate CalComponentPrivate; + struct _CalComponent { GtkObject object; /* Private data */ - gpointer priv; + CalComponentPrivate *priv; }; struct _CalComponentClass { @@ -115,6 +133,8 @@ icalcomponent *cal_component_get_icalcomponent (CalComponent *comp); CalComponentVType cal_component_get_vtype (CalComponent *comp); +char *cal_component_get_as_string (CalComponent *comp); + void cal_component_get_uid (CalComponent *comp, const char **uid); void cal_component_set_uid (CalComponent *comp, const char *uid); @@ -158,6 +178,11 @@ void cal_component_set_due (CalComponent *comp, CalComponentDateTime *dt); void cal_component_get_last_modified (CalComponent *comp, struct icaltimetype **t); void cal_component_set_last_modified (CalComponent *comp, struct icaltimetype *t); +void cal_component_free_period_list (GSList *period_list); + +void cal_component_get_rdate_list (CalComponent *comp, GSList **period_list); +void cal_component_set_rdate_list (CalComponent *comp, GSList *period_list); + void cal_component_get_sequence (CalComponent *comp, int **sequence); void cal_component_set_sequence (CalComponent *comp, int *sequence); void cal_component_free_sequence (int *sequence); -- cgit