aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-util
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/cal-util')
-rw-r--r--calendar/cal-util/calobj.c8
-rw-r--r--calendar/cal-util/calobj.h9
2 files changed, 10 insertions, 7 deletions
diff --git a/calendar/cal-util/calobj.c b/calendar/cal-util/calobj.c
index 1634ec084e..f185c31952 100644
--- a/calendar/cal-util/calobj.c
+++ b/calendar/cal-util/calobj.c
@@ -25,7 +25,7 @@ static gint compare_exdates (gconstpointer a, gconstpointer b);
-static char *
+char *
ical_gen_uid (void)
{
static char *hostname;
@@ -541,7 +541,9 @@ setup_alarm_at (iCalObject *ico, CalendarAlarm *alarm, char *iso_time, VObject *
}
/*
- * Duplicates an iCalObject. Implementation is a grand hack
+ * Duplicates an iCalObject. Implementation is a grand hack.
+ * If you need the new ICalObject to have a new uid, free the current one,
+ * and call ical_gen_uid() to generate a new one.
*/
iCalObject *
ical_object_duplicate (iCalObject *o)
@@ -549,8 +551,6 @@ ical_object_duplicate (iCalObject *o)
VObject *vo;
iCalObject *new;
- /* FIXME!!!!! The UID needs to change!!! */
-
vo = ical_object_to_vobject (o);
switch (o->type){
case ICAL_EVENT:
diff --git a/calendar/cal-util/calobj.h b/calendar/cal-util/calobj.h
index 0fa82ee36e..25954b8098 100644
--- a/calendar/cal-util/calobj.h
+++ b/calendar/cal-util/calobj.h
@@ -247,13 +247,13 @@ typedef enum {
CalObjFindStatus ical_object_find_in_string (const char *uid, const char *vcalobj, iCalObject **ico);
-char *ical_object_to_string (iCalObject *ico);
+char *ical_object_to_string (iCalObject *ico);
/* Returns the first toggled day in a weekday mask -- we do this because we do not support multiple
* days on a monthly-by-pos recurrence. If no days are toggled, it returns -1.
*/
-int ical_object_get_first_weekday (int weekday_mask);
+int ical_object_get_first_weekday (int weekday_mask);
/* Returns the number of seconds configured to trigger the alarm in advance to an event */
int alarm_compute_offset (CalendarAlarm *a);
@@ -261,7 +261,10 @@ int alarm_compute_offset (CalendarAlarm *a);
/* Returns TRUE if the dates of both objects match, including any recurrence
rules. */
-gboolean ical_object_compare_dates (iCalObject *ico1, iCalObject *ico2);
+gboolean ical_object_compare_dates (iCalObject *ico1, iCalObject *ico2);
+
+/* Generates a new uid for a calendar object. Should be g_free'd eventually. */
+char *ical_gen_uid (void);
END_GNOME_DECLS