aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-util
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/cal-util')
-rw-r--r--calendar/cal-util/cal-util.c29
-rw-r--r--calendar/cal-util/cal-util.h10
2 files changed, 37 insertions, 2 deletions
diff --git a/calendar/cal-util/cal-util.c b/calendar/cal-util/cal-util.c
index fc5a22dae9..40c4fe5bfe 100644
--- a/calendar/cal-util/cal-util.c
+++ b/calendar/cal-util/cal-util.c
@@ -28,9 +28,9 @@
/**
* cal_obj_instance_list_free:
- * @list: List of CalObjInstance structures.
+ * @list: List of #CalObjInstance structures.
*
- * Frees a list of CalObjInstance structures.
+ * Frees a list of #CalObjInstance structures.
**/
void
cal_obj_instance_list_free (GList *list)
@@ -52,6 +52,31 @@ cal_obj_instance_list_free (GList *list)
}
/**
+ * cal_alarm_instance_list_free:
+ * @list: List of #CalAlarmInstance structures.
+ *
+ * Frees a list of #CalAlarmInstance structures.
+ **/
+void
+cal_alarm_instance_list_free (GList *list)
+{
+ CalAlarmInstance *i;
+ GList *l;
+
+ for (l = list; l; l = l->next) {
+ i = l->data;
+
+ g_assert (i != NULL);
+ g_assert (i->uid != NULL);
+
+ g_free (i->uid);
+ g_free (i);
+ }
+
+ g_list_free (list);
+}
+
+/**
* cal_obj_uid_list_free:
* @list: List of strings with unique identifiers.
*
diff --git a/calendar/cal-util/cal-util.h b/calendar/cal-util/cal-util.h
index 7821ce8ca4..b222ea8cba 100644
--- a/calendar/cal-util/cal-util.h
+++ b/calendar/cal-util/cal-util.h
@@ -42,6 +42,16 @@ typedef struct {
void cal_obj_instance_list_free (GList *list);
+/* Instance of an alarm trigger */
+typedef struct {
+ char *uid; /* UID of object */
+ enum AlarmType type; /* Type of alarm */
+ time_t trigger; /* Alarm trigger time */
+ time_t occur; /* Occurrence time */
+} CalAlarmInstance;
+
+void cal_alarm_instance_list_free (GList *list);
+
/* Used for multiple UID queries */
typedef enum {
CALOBJ_TYPE_EVENT = 1 << 0,