From 094deb7bca96f1dcf97952b93a7c4745cd799ebc Mon Sep 17 00:00:00 2001 From: Arturo Espinosa Date: Thu, 29 Jul 1999 00:26:11 +0000 Subject: 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 --- calendar/gui/calendar.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) (limited to 'calendar/gui/calendar.c') 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) { -- cgit v1.2.3