diff options
Diffstat (limited to 'calendar/cal-util')
-rw-r--r-- | calendar/cal-util/cal-util.c | 25 | ||||
-rw-r--r-- | calendar/cal-util/cal-util.h | 14 |
2 files changed, 39 insertions, 0 deletions
diff --git a/calendar/cal-util/cal-util.c b/calendar/cal-util/cal-util.c index 092fd79889..bfb9c88fff 100644 --- a/calendar/cal-util/cal-util.c +++ b/calendar/cal-util/cal-util.c @@ -51,6 +51,31 @@ cal_obj_instance_list_free (GList *list) } /** + * cal_obj_change_list_free: + * @list: List of #CalObjChange structures. + * + * Frees a list of #CalObjChange structures. + **/ +void +cal_obj_change_list_free (GList *list) +{ + CalObjChange *c; + GList *l; + + for (l = list; l; l = l->next) { + c = l->data; + + g_assert (c != NULL); + g_assert (c->uid != NULL); + + g_free (c->uid); + g_free (c); + } + + g_list_free (list); +} + +/** * cal_alarm_instance_list_free: * @list: List of #CalAlarmInstance structures. * diff --git a/calendar/cal-util/cal-util.h b/calendar/cal-util/cal-util.h index 154f4c2ad5..243cc34105 100644 --- a/calendar/cal-util/cal-util.h +++ b/calendar/cal-util/cal-util.h @@ -41,6 +41,19 @@ typedef struct { void cal_obj_instance_list_free (GList *list); +typedef enum { + CALOBJ_UPDATED = 1 << 0, + CALOBJ_REMOVED = 1 << 1 +} CalObjChangeType; + +typedef struct +{ + char *uid; + CalObjChangeType type; +} CalObjChange; + +void cal_obj_change_list_free (GList *list); + /* Instance of an alarm trigger */ typedef struct { char *uid; /* UID of object */ @@ -66,3 +79,4 @@ void cal_obj_uid_list_free (GList *list); END_GNOME_DECLS #endif + |