diff options
author | Arturo Espinosa <unammx@src.gnome.org> | 1998-04-04 11:43:48 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1998-04-04 11:43:48 +0800 |
commit | c050cb45aa1eb2af7b53451334a4b979b27c5214 (patch) | |
tree | 6585e7ce32858b4473776d1d9472e7a977914996 /calendar/calobj.c | |
parent | bacbb085895ae69e7f443cc39e04b686128a63a3 (diff) | |
download | gsoc2013-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/calobj.c')
-rw-r--r-- | calendar/calobj.c | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/calendar/calobj.c b/calendar/calobj.c index 004ba7636d..6dd7fa98db 100644 --- a/calendar/calobj.c +++ b/calendar/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; } |