From cbd4bd907ae597885c5980d1a850454cf59f0113 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 13 Jul 2012 20:36:19 +0000 Subject: [PATCH] Monotone-Parent: 7fb9c9db1f708e5ebd59004e2cd37cf85e5d94d6 Monotone-Revision: 61a57c3431ce88c941b644d5a0ce21abb1f82f8c Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-07-13T20:36:19 --- ChangeLog | 2 ++ SoObjects/Appointments/SOGoCalendarComponent.h | 1 + SoObjects/Appointments/SOGoCalendarComponent.m | 13 +++++++------ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 24061285d..df985f619 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,8 @@ * SoObjects/Appointments/SOGoCalendarComponent.m (-lookupOccurrence:): now a virtual method forcing the use by subclasses of the new methods below. + (-saveCalendar:): new method that enables the saving of an + iCalendar object. * SoObjects/Appointments/iCalCalendar+SOGo.m: new category module. (-eventWithRecurrenceId, -todoWithRecurrenceId): new method that diff --git a/SoObjects/Appointments/SOGoCalendarComponent.h b/SoObjects/Appointments/SOGoCalendarComponent.h index 25b381582..3512339c2 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.h +++ b/SoObjects/Appointments/SOGoCalendarComponent.h @@ -62,6 +62,7 @@ toFolder: (SOGoGCSFolder *) newFolder; - (void) updateComponent: (iCalRepeatableEntityObject *) newObject; +- (NSException *) saveCalendar: (iCalCalendar *) newCalendar; - (NSException *) saveComponent: (iCalRepeatableEntityObject *) newObject; /* mail notifications */ diff --git a/SoObjects/Appointments/SOGoCalendarComponent.m b/SoObjects/Appointments/SOGoCalendarComponent.m index eb25f9876..20b0ea0e4 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.m +++ b/SoObjects/Appointments/SOGoCalendarComponent.m @@ -645,17 +645,18 @@ } } -- (NSException *) saveComponent: (iCalRepeatableEntityObject *) newObject +- (NSException *) saveCalendar: (iCalCalendar *) newCalendar { - NSString *newiCalString; - - newiCalString = [[newObject parent] versitString]; - - [self saveContentString: newiCalString]; + [self saveContentString: [newCalendar versitString]]; return nil; } +- (NSException *) saveComponent: (iCalRepeatableEntityObject *) newObject +{ + return [self saveCalendar: [newObject parent]]; +} + /* raw saving */ /* EMail Notifications */