From: znek Date: Fri, 15 Jul 2005 09:59:52 +0000 (+0000) Subject: NSCopying support added X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9cd4a78304cae464310c6bcafb42df378ad631b8;p=sope NSCopying support added git-svn-id: http://svn.opengroupware.org/SOPE/trunk@906 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-ical/NGiCal/ChangeLog b/sope-ical/NGiCal/ChangeLog index 6dc41f03..7417bd40 100644 --- a/sope-ical/NGiCal/ChangeLog +++ b/sope-ical/NGiCal/ChangeLog @@ -1,3 +1,10 @@ +2005-07-15 Marcus Mueller + + * iCalObject.[hm], iCalEntityObject.m, iCalToDo.m, iCalAlarm.m, + iCalPerson.m, iCalCalendar.m, iCalEvent.m, iCalTrigger.m, + iCalObject.m, iCalFreeBusy.m, iCalRepeatableEntityObject.m: + added NSCopying (v4.5.54) + 2005-07-15 Helge Hess * v4.5.53 diff --git a/sope-ical/NGiCal/Version b/sope-ical/NGiCal/Version index d2b964f0..632bc18a 100644 --- a/sope-ical/NGiCal/Version +++ b/sope-ical/NGiCal/Version @@ -2,7 +2,7 @@ MAJOR_VERSION=4 MINOR_VERSION=5 -SUBMINOR_VERSION:=53 +SUBMINOR_VERSION:=54 # v4.5.40 requires NGExtensions v4.5.145 # v4.5.37 requires NGExtensions v4.5.140 diff --git a/sope-ical/NGiCal/iCalAlarm.m b/sope-ical/NGiCal/iCalAlarm.m index 151ffdfd..b7a20dd6 100644 --- a/sope-ical/NGiCal/iCalAlarm.m +++ b/sope-ical/NGiCal/iCalAlarm.m @@ -33,6 +33,22 @@ [super dealloc]; } +/* NSCopying */ + +- (id)copyWithZone:(NSZone *)_zone { + iCalAlarm *new; + + new = [super copyWithZone:_zone]; + + ASSIGNCOPY(new->trigger, self->trigger); + ASSIGNCOPY(new->comment, self->comment); + ASSIGNCOPY(new->action, self->action); + ASSIGNCOPY(new->attach, self->attach); + ASSIGNCOPY(new->recurrenceRule, self->recurrenceRule); + + return new; +} + /* accessors */ - (void)setTrigger:(id)_value { diff --git a/sope-ical/NGiCal/iCalCalendar.m b/sope-ical/NGiCal/iCalCalendar.m index 9bdddcba..d0664c77 100644 --- a/sope-ical/NGiCal/iCalCalendar.m +++ b/sope-ical/NGiCal/iCalCalendar.m @@ -124,6 +124,27 @@ static SaxObjectDecoder *sax = nil; // THREAD [super dealloc]; } +/* NSCopying */ + +- (id)copyWithZone:(NSZone *)_zone { + iCalCalendar *new; + + new = [super copyWithZone:_zone]; + + ASSIGNCOPY(new->version, self->version); + ASSIGNCOPY(new->calscale, self->calscale); + ASSIGNCOPY(new->prodId, self->prodId); + ASSIGNCOPY(new->method, self->method); + + ASSIGNCOPY(new->todos, self->todos); + ASSIGNCOPY(new->events, self->events); + ASSIGNCOPY(new->journals, self->journals); + ASSIGNCOPY(new->freeBusys, self->freeBusys); + ASSIGNCOPY(new->timezones, self->timezones); + + return new; +} + /* accessors */ - (void)setCalscale:(NSString *)_value { diff --git a/sope-ical/NGiCal/iCalEntityObject.m b/sope-ical/NGiCal/iCalEntityObject.m index d1e5ce50..f92ec060 100644 --- a/sope-ical/NGiCal/iCalEntityObject.m +++ b/sope-ical/NGiCal/iCalEntityObject.m @@ -49,6 +49,34 @@ [super dealloc]; } +/* NSCopying */ + +- (id)copyWithZone:(NSZone *)_zone { + iCalEntityObject *new; + + new = [super copyWithZone:_zone]; + + ASSIGNCOPY(new->uid, self->uid); + ASSIGNCOPY(new->summary, self->summary); + new->timestamp = self->timestamp; + ASSIGNCOPY(new->created, self->created); + ASSIGNCOPY(new->lastModified, self->lastModified); + ASSIGNCOPY(new->startDate, self->startDate); + ASSIGNCOPY(new->accessClass, self->accessClass); + ASSIGNCOPY(new->priority, self->priority); + ASSIGNCOPY(new->alarms, self->alarms); + ASSIGNCOPY(new->organizer, self->organizer); + ASSIGNCOPY(new->attendees, self->attendees); + ASSIGNCOPY(new->comment, self->comment); + ASSIGNCOPY(new->sequence, self->sequence); + ASSIGNCOPY(new->location, self->location); + ASSIGNCOPY(new->status, self->status); + ASSIGNCOPY(new->categories, self->categories); + ASSIGNCOPY(new->userComment, self->userComment); + + return new; +} + /* accessors */ - (void)setUid:(NSString *)_value { diff --git a/sope-ical/NGiCal/iCalEvent.m b/sope-ical/NGiCal/iCalEvent.m index a0b71d5f..94c4aebd 100644 --- a/sope-ical/NGiCal/iCalEvent.m +++ b/sope-ical/NGiCal/iCalEvent.m @@ -40,6 +40,20 @@ [super dealloc]; } +/* NSCopying */ + +- (id)copyWithZone:(NSZone *)_zone { + iCalEvent *new; + + new = [super copyWithZone:_zone]; + + ASSIGNCOPY(new->endDate, self->endDate); + ASSIGNCOPY(new->duration, self->duration); + ASSIGNCOPY(new->transparency, self->transparency); + + return new; +} + /* accessors */ - (void)setEndDate:(NSCalendarDate *)_date { diff --git a/sope-ical/NGiCal/iCalFreeBusy.m b/sope-ical/NGiCal/iCalFreeBusy.m index 60a6950e..4305a864 100644 --- a/sope-ical/NGiCal/iCalFreeBusy.m +++ b/sope-ical/NGiCal/iCalFreeBusy.m @@ -34,6 +34,22 @@ [super dealloc]; } +/* NSCopying */ + +- (id)copyWithZone:(NSZone *)_zone { + iCalFreeBusy *new; + + new = [super copyWithZone:_zone]; + + ASSIGNCOPY(new->entries, self->entries); + ASSIGNCOPY(new->organizer, self->organizer); + ASSIGNCOPY(new->startDate, self->startDate); + ASSIGNCOPY(new->endDate, self->endDate); + ASSIGNCOPY(new->url, self->url); + + return new; +} + /* accessors */ - (void)setUrl:(NSString *)_url { diff --git a/sope-ical/NGiCal/iCalObject.h b/sope-ical/NGiCal/iCalObject.h index 3cd26537..c2a442a8 100644 --- a/sope-ical/NGiCal/iCalObject.h +++ b/sope-ical/NGiCal/iCalObject.h @@ -34,7 +34,7 @@ @class NSTimeZone; -@interface iCalObject : NSObject +@interface iCalObject : NSObject { } diff --git a/sope-ical/NGiCal/iCalObject.m b/sope-ical/NGiCal/iCalObject.m index b8271acf..dae28d70 100644 --- a/sope-ical/NGiCal/iCalObject.m +++ b/sope-ical/NGiCal/iCalObject.m @@ -37,6 +37,15 @@ static NSTimeZone *defTZ = nil; [super dealloc]; } +/* NSCopying */ + +- (id)copyWithZone:(NSZone *)_zone { + iCalObject *new; + + new = [[iCalObject allocWithZone:_zone] init]; + return new; +} + /* KVC */ - (void)takeValue:(id)_value forXKey:(id)_key { diff --git a/sope-ical/NGiCal/iCalPerson.m b/sope-ical/NGiCal/iCalPerson.m index e4e99a04..12533d06 100644 --- a/sope-ical/NGiCal/iCalPerson.m +++ b/sope-ical/NGiCal/iCalPerson.m @@ -34,6 +34,23 @@ [super dealloc]; } +/* NSCopying */ + +- (id)copyWithZone:(NSZone *)_zone { + iCalPerson *new; + + new = [super copyWithZone:_zone]; + + ASSIGNCOPY(new->cn, self->cn); + ASSIGNCOPY(new->email, self->email); + ASSIGNCOPY(new->rsvp, self->rsvp); + ASSIGNCOPY(new->partStat, self->partStat); + ASSIGNCOPY(new->role, self->role); + ASSIGNCOPY(new->xuid, self->xuid); + + return new; +} + /* accessors */ - (void)setCn:(NSString *)_s { diff --git a/sope-ical/NGiCal/iCalRepeatableEntityObject.m b/sope-ical/NGiCal/iCalRepeatableEntityObject.m index 6d9a0ea8..a5fca2b6 100644 --- a/sope-ical/NGiCal/iCalRepeatableEntityObject.m +++ b/sope-ical/NGiCal/iCalRepeatableEntityObject.m @@ -34,6 +34,20 @@ [super dealloc]; } +/* NSCopying */ + +- (id)copyWithZone:(NSZone *)_zone { + iCalRepeatableEntityObject *new; + + new = [super copyWithZone:_zone]; + + ASSIGNCOPY(new->rRules, self->rRules); + ASSIGNCOPY(new->exRules, self->exRules); + ASSIGNCOPY(new->exDates, self->exDates); + + return new; +} + /* Accessors */ - (void)removeAllRecurrenceRules { diff --git a/sope-ical/NGiCal/iCalToDo.m b/sope-ical/NGiCal/iCalToDo.m index 13549b56..4859674e 100644 --- a/sope-ical/NGiCal/iCalToDo.m +++ b/sope-ical/NGiCal/iCalToDo.m @@ -32,6 +32,20 @@ [super dealloc]; } +/* NSCopying */ + +- (id)copyWithZone:(NSZone *)_zone { + iCalToDo *new; + + new = [super copyWithZone:_zone]; + + ASSIGNCOPY(new->due, self->due); + ASSIGNCOPY(new->percentComplete, self->percentComplete); + ASSIGNCOPY(new->completed, self->completed); + + return new; +} + /* accessors */ - (void)setPercentComplete:(NSString *)_value { diff --git a/sope-ical/NGiCal/iCalTrigger.m b/sope-ical/NGiCal/iCalTrigger.m index 4ba3aac9..21fe30ae 100644 --- a/sope-ical/NGiCal/iCalTrigger.m +++ b/sope-ical/NGiCal/iCalTrigger.m @@ -30,6 +30,19 @@ [super dealloc]; } +/* NSCopying */ + +- (id)copyWithZone:(NSZone *)_zone { + iCalTrigger *new; + + new = [super copyWithZone:_zone]; + + ASSIGNCOPY(new->valueType, self->valueType); + ASSIGNCOPY(new->value, self->value); + + return new; +} + /* accessors */ - (void)setValue:(NSString *)_value {