From 117eb758e89862ae70bcf2662dfca26f9167224c Mon Sep 17 00:00:00 2001 From: znek Date: Sun, 31 Oct 2004 17:46:23 +0000 Subject: [PATCH] recurrenceRule added to alarm, event, todo. git-svn-id: http://svn.opengroupware.org/SOPE/trunk@329 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-ical/NGiCal/ChangeLog | 5 ++++ sope-ical/NGiCal/NGiCal.xcode/project.pbxproj | 2 +- sope-ical/NGiCal/NGiCal.xmap | 16 ++++++++-- sope-ical/NGiCal/Version | 2 +- sope-ical/NGiCal/iCalAlarm.h | 5 +++- sope-ical/NGiCal/iCalAlarm.m | 20 +++++++++---- sope-ical/NGiCal/iCalEvent.h | 4 +++ sope-ical/NGiCal/iCalEvent.m | 15 ++++++++-- sope-ical/NGiCal/iCalToDo.h | 6 +++- sope-ical/NGiCal/iCalToDo.m | 29 +++++++++++++------ 10 files changed, 82 insertions(+), 22 deletions(-) diff --git a/sope-ical/NGiCal/ChangeLog b/sope-ical/NGiCal/ChangeLog index 10c4019e..8509a88f 100644 --- a/sope-ical/NGiCal/ChangeLog +++ b/sope-ical/NGiCal/ChangeLog @@ -1,3 +1,8 @@ +2004-10-31 Marcus Mueller + + * iCalAlarm.[hm], iCalEvent.[hm], iCalToDo.[hm], + NGiCal.xmap: added recurrenceRule (v4.3.34) + 2004-10-20 Marcus Mueller * NGiCal.xcode: added iCalRenderer.[hm], bumped framework version diff --git a/sope-ical/NGiCal/NGiCal.xcode/project.pbxproj b/sope-ical/NGiCal/NGiCal.xcode/project.pbxproj index ba59b408..150c52a7 100644 --- a/sope-ical/NGiCal/NGiCal.xcode/project.pbxproj +++ b/sope-ical/NGiCal/NGiCal.xcode/project.pbxproj @@ -248,7 +248,7 @@ ); buildSettings = { DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 4.3.33; + DYLIB_CURRENT_VERSION = 4.3.34; FRAMEWORK_SEARCH_PATHS = "$(LOCAL_LIBRARY_DIR)/Frameworks"; FRAMEWORK_VERSION = A; GCC_PRECOMPILE_PREFIX_HEADER = YES; diff --git a/sope-ical/NGiCal/NGiCal.xmap b/sope-ical/NGiCal/NGiCal.xmap index 1473190c..0f605543 100644 --- a/sope-ical/NGiCal/NGiCal.xmap +++ b/sope-ical/NGiCal/NGiCal.xmap @@ -32,7 +32,11 @@ vevent = { class = iCalEvent; - + + attributes = { + rrule = recurrenceRule; + }; + ToManyRelationships = { "alarms" = ( valarm ); "attendees" = ( attendee ); @@ -41,7 +45,11 @@ vtodo = { class = "iCalToDo"; - + + attributes = { + rrule = recurrenceRule; + }; + ToManyRelationships = { "alarms" = ( valarm ); "attendees" = ( attendee ); @@ -50,6 +58,10 @@ valarm = { class = "iCalAlarm"; + + attributes = { + rrule = recurrenceRule; + }; }; vfreebusy = { diff --git a/sope-ical/NGiCal/Version b/sope-ical/NGiCal/Version index 0a1e54b3..723fa868 100644 --- a/sope-ical/NGiCal/Version +++ b/sope-ical/NGiCal/Version @@ -2,4 +2,4 @@ MAJOR_VERSION=4 MINOR_VERSION=3 -SUBMINOR_VERSION:=33 +SUBMINOR_VERSION:=34 diff --git a/sope-ical/NGiCal/iCalAlarm.h b/sope-ical/NGiCal/iCalAlarm.h index 766b0217..058febf0 100644 --- a/sope-ical/NGiCal/iCalAlarm.h +++ b/sope-ical/NGiCal/iCalAlarm.h @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: iCalAlarm.h 1 2004-08-20 10:08:27Z znek $ #ifndef __NGiCal_iCalAlarm_H__ #define __NGiCal_iCalAlarm_H__ @@ -33,6 +33,7 @@ NSString *comment; NSString *action; id attach; + NSString *recurrenceRule; } /* accessors */ @@ -41,6 +42,8 @@ - (id)attach; - (NSString *)comment; - (NSString *)action; +- (void)setRecurrenceRule:(NSString *)_recurrenceRule; +- (NSString *)recurrenceRule; @end diff --git a/sope-ical/NGiCal/iCalAlarm.m b/sope-ical/NGiCal/iCalAlarm.m index 6cf095b4..fee72b63 100644 --- a/sope-ical/NGiCal/iCalAlarm.m +++ b/sope-ical/NGiCal/iCalAlarm.m @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: iCalAlarm.m 1 2004-08-20 10:08:27Z znek $ #include "iCalAlarm.h" #include "common.h" @@ -26,10 +26,11 @@ @implementation iCalAlarm - (void)dealloc { - [self->trigger release]; - [self->comment release]; - [self->action release]; - [self->attach release]; + [self->trigger release]; + [self->comment release]; + [self->action release]; + [self->attach release]; + [self->recurrenceRule release]; [super dealloc]; } @@ -63,6 +64,13 @@ return self->action; } +- (void)setRecurrenceRule:(NSString *)_recurrenceRule { + ASSIGN(self->recurrenceRule, _recurrenceRule); +} +- (NSString *)recurrenceRule { + return self->recurrenceRule; +} + /* descriptions */ - (NSString *)description { @@ -77,6 +85,8 @@ [ms appendFormat:@" comment=%@", self->comment]; if (self->trigger) [ms appendFormat:@" trigger=%@", self->trigger]; + if (self->recurrenceRule) + [ms appendFormat:@" recurrenceRule=%@", self->recurrenceRule]; [ms appendString:@">"]; return ms; diff --git a/sope-ical/NGiCal/iCalEvent.h b/sope-ical/NGiCal/iCalEvent.h index b6bfa955..63e9d0e0 100644 --- a/sope-ical/NGiCal/iCalEvent.h +++ b/sope-ical/NGiCal/iCalEvent.h @@ -39,6 +39,7 @@ { NSCalendarDate *endDate; NSString *duration; + NSString *recurrenceRule; } /* accessors */ @@ -52,6 +53,9 @@ - (BOOL)hasDuration; - (NSTimeInterval)durationAsTimeInterval; +- (void)setRecurrenceRule:(NSString *)_recurrenceRule; +- (NSString *)recurrenceRule; + /* calculating changes */ - (iCalEventChanges *)getChangesRelativeToEvent:(iCalEvent *)_event; diff --git a/sope-ical/NGiCal/iCalEvent.m b/sope-ical/NGiCal/iCalEvent.m index 72fb3a95..dcfbf754 100644 --- a/sope-ical/NGiCal/iCalEvent.m +++ b/sope-ical/NGiCal/iCalEvent.m @@ -32,8 +32,9 @@ @implementation iCalEvent - (void)dealloc { - [self->duration release]; - [self->endDate release]; + [self->duration release]; + [self->endDate release]; + [self->recurrenceRule release]; [super dealloc]; } @@ -106,6 +107,13 @@ return 0.0; } +- (void)setRecurrenceRule:(NSString *)_recurrenceRule { + ASSIGN(self->recurrenceRule, _recurrenceRule); +} +- (NSString *)recurrenceRule { + return self->recurrenceRule; +} + /* ical typing */ - (NSString *)entityName { @@ -133,6 +141,9 @@ if ([self hasAlarms]) [ms appendFormat:@" alarms=%@", self->alarms]; + if (self->recurrenceRule) + [ms appendFormat:@" recurrenceRule=%@", self->recurrenceRule]; + [ms appendString:@">"]; return ms; } diff --git a/sope-ical/NGiCal/iCalToDo.h b/sope-ical/NGiCal/iCalToDo.h index 8d54e116..606ec155 100644 --- a/sope-ical/NGiCal/iCalToDo.h +++ b/sope-ical/NGiCal/iCalToDo.h @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: iCalToDo.h 1 2004-08-20 10:08:27Z znek $ #ifndef __NGiCal_iCalToDo_H__ #define __NGiCal_iCalToDo_H__ @@ -38,6 +38,7 @@ NSCalendarDate *due; NSString *percentComplete; NSCalendarDate *completed; + NSString *recurrenceRule; } - (void)setPercentComplete:(NSString *)_value; @@ -49,6 +50,9 @@ - (void)setCompleted:(NSCalendarDate *)_date; - (NSCalendarDate *)completed; +- (void)setRecurrenceRule:(NSString *)_recurrenceRule; +- (NSString *)recurrenceRule; + @end #endif /* __NGiCal_iCalToDo_H__ */ diff --git a/sope-ical/NGiCal/iCalToDo.m b/sope-ical/NGiCal/iCalToDo.m index 7fb58bbb..b9e2f84f 100644 --- a/sope-ical/NGiCal/iCalToDo.m +++ b/sope-ical/NGiCal/iCalToDo.m @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: iCalToDo.m 1 2004-08-20 10:08:27Z znek $ #include "iCalToDo.h" #include "common.h" @@ -28,13 +28,14 @@ - (void)dealloc { [self->accessClass release]; [self->percentComplete release]; - [self->completed release]; - [self->sequence release]; - [self->uid release]; - [self->summary release]; - [self->startDate release]; - [self->due release]; - [self->priority release]; + [self->completed release]; + [self->sequence release]; + [self->uid release]; + [self->summary release]; + [self->startDate release]; + [self->due release]; + [self->priority release]; + [self->recurrenceRule release]; [super dealloc]; } @@ -61,6 +62,13 @@ return self->completed; } +- (void)setRecurrenceRule:(NSString *)_recurrenceRule { + ASSIGN(self->recurrenceRule, _recurrenceRule); +} +- (NSString *)recurrenceRule { + return self->recurrenceRule; +} + /* ical typing */ - (NSString *)entityName { @@ -89,7 +97,10 @@ if (self->summary) [ms appendFormat:@" summary=%@", self->summary]; - + + if (self->recurrenceRule) + [ms appendFormat:@" recurrenceRule=%@", self->recurrenceRule]; + [ms appendString:@">"]; return ms; } -- 2.39.5