diff options
author | Arturo Espinosa <unammx@src.gnome.org> | 1999-07-29 08:26:11 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1999-07-29 08:26:11 +0800 |
commit | 094deb7bca96f1dcf97952b93a7c4745cd799ebc (patch) | |
tree | f69e8fa8355218e37d08f0914f353a96da0b84fd /calendar/gui/calendar.c | |
parent | c2c3a8ce6a51126ce0a5f368801b9af33372fb79 (diff) | |
download | gsoc2013-evolution-094deb7bca96f1dcf97952b93a7c4745cd799ebc.tar gsoc2013-evolution-094deb7bca96f1dcf97952b93a7c4745cd799ebc.tar.gz gsoc2013-evolution-094deb7bca96f1dcf97952b93a7c4745cd799ebc.tar.bz2 gsoc2013-evolution-094deb7bca96f1dcf97952b93a7c4745cd799ebc.tar.lz gsoc2013-evolution-094deb7bca96f1dcf97952b93a7c4745cd799ebc.tar.xz gsoc2013-evolution-094deb7bca96f1dcf97952b93a7c4745cd799ebc.tar.zst gsoc2013-evolution-094deb7bca96f1dcf97952b93a7c4745cd799ebc.zip |
Lots of more work on the sync stuff. It works pretty well now.
Lots of more work on the sync stuff. It works pretty well now.
I dont know why my pilot is not accepting the events I send to it though
Miguel.
svn path=/trunk/; revision=1040
Diffstat (limited to 'calendar/gui/calendar.c')
-rw-r--r-- | calendar/gui/calendar.c | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/calendar/gui/calendar.c b/calendar/gui/calendar.c index b67f875fdc..30e4e0168c 100644 --- a/calendar/gui/calendar.c +++ b/calendar/gui/calendar.c @@ -72,7 +72,7 @@ add_object_alarms (iCalObject *obj, time_t start, time_t end, void *closure) #define max(a,b) ((a > b) ? a : b) -void +static void ical_object_try_alarms (iCalObject *obj) { int ao, po, od, mo; @@ -169,7 +169,7 @@ calendar_destroy (Calendar *cal) g_free (cal); } -char * +static char * ice (time_t t) { static char buffer [100]; @@ -323,6 +323,34 @@ calendar_load (Calendar *cal, char *fname) return NULL; } +/* + * calendar_load_from_memory: + * @cal: calendar on which we load the information + * @buffer: A buffer that contains a vCalendar file + * + * Loads the information from the vCalendar information in @buffer + * into the Calendar + */ +char * +calendar_load_from_memory (Calendar *cal, const char *buffer) +{ + VObject *vcal; + + g_return_val_if_fail (buffer != NULL, NULL); + + cal->filename = g_strdup ("memory-based-calendar"); + vcal = Parse_MIME (buffer, strlen (buffer)); + if (!vcal) + return "Could not load the calendar"; + + cal->file_time = time (NULL); + calendar_load_from_vobject (cal, vcal); + cleanVObject (vcal); + cleanStrTbl (); + + return NULL; +} + static VObject * vcalendar_create_from_calendar (Calendar *cal) { |