aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-util
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1998-04-04 11:43:48 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-04-04 11:43:48 +0800
commitc050cb45aa1eb2af7b53451334a4b979b27c5214 (patch)
tree6585e7ce32858b4473776d1d9472e7a977914996 /calendar/cal-util
parentbacbb085895ae69e7f443cc39e04b686128a63a3 (diff)
downloadgsoc2013-evolution-c050cb45aa1eb2af7b53451334a4b979b27c5214.tar
gsoc2013-evolution-c050cb45aa1eb2af7b53451334a4b979b27c5214.tar.gz
gsoc2013-evolution-c050cb45aa1eb2af7b53451334a4b979b27c5214.tar.bz2
gsoc2013-evolution-c050cb45aa1eb2af7b53451334a4b979b27c5214.tar.lz
gsoc2013-evolution-c050cb45aa1eb2af7b53451334a4b979b27c5214.tar.xz
gsoc2013-evolution-c050cb45aa1eb2af7b53451334a4b979b27c5214.tar.zst
gsoc2013-evolution-c050cb45aa1eb2af7b53451334a4b979b27c5214.zip
lots more -mig
svn path=/trunk/; revision=105
Diffstat (limited to 'calendar/cal-util')
-rw-r--r--calendar/cal-util/calobj.c35
1 files changed, 33 insertions, 2 deletions
diff --git a/calendar/cal-util/calobj.c b/calendar/cal-util/calobj.c
index 004ba7636d..6dd7fa98db 100644
--- a/calendar/cal-util/calobj.c
+++ b/calendar/cal-util/calobj.c
@@ -250,8 +250,17 @@ ical_object_create_from_vobject (VObject *o, const char *object_name)
return ical;
}
-void
-ical_object_save (iCalObject *ical)
+static char *
+to_str (int num)
+{
+ static char buf [40];
+
+ sprintf (buf, "%d", num);
+ return buf;
+}
+
+VObject *
+ical_object_to_vobject (iCalObject *ical)
{
VObject *o;
@@ -259,5 +268,27 @@ ical_object_save (iCalObject *ical)
o = newVObject (VCEventProp);
else
o = newVObject (VCTodoProp);
+
+ /* uid */
+ if (ical->uid)
+ addPropValue (o, VCUniqueStringProp, ical->uid);
+
+ /* seq */
+ addPropValue (o, VCSequenceProp, to_str (ical->seq));
+
+ /* dtstart */
+ addPropValue (o, VCDTstartProp, isodate_from_time_t (ical->dtstart));
+
+ /* dtend */
+ addPropValue (o, VCDTendProp, isodate_from_time_t (ical->dtend));
+
+ /* dcreated */
+ addPropValue (o, VCDTendProp, isodate_from_time_t (ical->created));
+
+ /* completed */
+ if (ical->completed)
+ addPropValue (o, VCDTendProp, isodate_from_time_t (ical->completed));
+
+ return o;
}