From 0557f1946751d9fc7f4c894fa46b7fd791db0c73 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Wed, 19 Jul 2000 00:26:37 +0000 Subject: Free the icalcomponent if this is an unattached alarm. 2000-07-18 Federico Mena Quintero * cal-util/cal-component.c (cal_component_alarm_free): Free the icalcomponent if this is an unattached alarm. (scan_alarm_property): Handle the TRIGGER property. (cal_component_alarm_get_trigger): Ditto. Royal pain. (cal_component_alarm_set_trigger): Ditto. Less pain. svn path=/trunk/; revision=4216 --- calendar/cal-util/cal-component.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (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 d226940586..664599f9f6 100644 --- a/calendar/cal-util/cal-component.h +++ b/calendar/cal-util/cal-component.h @@ -182,6 +182,29 @@ typedef enum { CAL_COMPONENT_ALARM_UNKNOWN } CalComponentAlarmAction; +typedef enum { + CAL_COMPONENT_ALARM_TRIGGER_RELATIVE, + CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE +} CalComponentAlarmTriggerType; + +typedef enum { + CAL_COMPONENT_ALARM_TRIGGER_RELATED_START, + CAL_COMPONENT_ALARM_TRIGGER_RELATED_END +} CalComponentAlarmTriggerRelated; + +typedef struct { + CalComponentAlarmTriggerType type; + + union { + struct { + struct icaldurationtype duration; + CalComponentAlarmTriggerRelated related; + } relative; + + struct icaltimetype absolute; + } u; +} CalComponentAlarmTrigger; + CalComponentAlarm *cal_component_get_first_alarm (CalComponent *comp); CalComponentAlarm *cal_component_get_next_alarm (CalComponent *comp); @@ -190,6 +213,10 @@ void cal_component_alarm_free (CalComponentAlarm *alarm); void cal_component_alarm_get_action (CalComponentAlarm *alarm, CalComponentAlarmAction *action); void cal_component_alarm_set_action (CalComponentAlarm *alarm, CalComponentAlarmAction action); +void cal_component_alarm_get_trigger (CalComponentAlarm *alarm, CalComponentAlarmTrigger **trigger); +void cal_component_alarm_set_trigger (CalComponentAlarm *alarm, CalComponentAlarmTrigger *trigger); +void cal_component_alarm_free_trigger (CalComponentAlarmTrigger *trigger); + END_GNOME_DECLS -- cgit