From 1418ee5d3cfe825927d65f63d4cffe1b9f0564fd Mon Sep 17 00:00:00 2001 From: znek Date: Thu, 14 Jul 2005 17:44:47 +0000 Subject: [PATCH] added 'method', 'userComment' and fixed minor bugs git-svn-id: http://svn.opengroupware.org/SOPE/trunk@901 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-ical/NGiCal/ChangeLog | 14 +++++++++++ .../NGiCal/NGiCal.xcodeproj/project.pbxproj | 16 ++++++------- sope-ical/NGiCal/NGiCal.xmap | 2 ++ sope-ical/NGiCal/Version | 2 +- sope-ical/NGiCal/iCalCalendar.h | 2 ++ sope-ical/NGiCal/iCalCalendar.m | 9 +++++++- sope-ical/NGiCal/iCalEntityObject.h | 4 ++++ sope-ical/NGiCal/iCalEntityObject.m | 23 +++++++++++++++---- sope-ical/NGiCal/iCalEvent.h | 6 ++--- 9 files changed, 60 insertions(+), 18 deletions(-) diff --git a/sope-ical/NGiCal/ChangeLog b/sope-ical/NGiCal/ChangeLog index 0a896ae3..7026ef9e 100644 --- a/sope-ical/NGiCal/ChangeLog +++ b/sope-ical/NGiCal/ChangeLog @@ -1,3 +1,17 @@ +2005-07-14 Marcus Mueller + + * v4.5.49 + + * iCalCalendar.[hm]: added 'method' + + * iCalEntityObject.[hm]: added 'userComment', changed all email + related comparisons to lowercase all strings before comparison + + * iCalEvent.h: pretty printed iVars + + * NGiCal.xmap: added mapping for 'comment' -> 'userComment' and + 'method' -> 'method' + 2005-07-13 Helge Hess * v4.5.48 diff --git a/sope-ical/NGiCal/NGiCal.xcodeproj/project.pbxproj b/sope-ical/NGiCal/NGiCal.xcodeproj/project.pbxproj index 38d27d28..a3dda6ff 100644 --- a/sope-ical/NGiCal/NGiCal.xcodeproj/project.pbxproj +++ b/sope-ical/NGiCal/NGiCal.xcodeproj/project.pbxproj @@ -570,7 +570,7 @@ ); buildSettings = { DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 4.5.56; + DYLIB_CURRENT_VERSION = 4.5.49; FRAMEWORK_SEARCH_PATHS = "\"$(USER_LIBRARY_DIR)/EmbeddedFrameworks\""; FRAMEWORK_VERSION = A; GCC_PRECOMPILE_PREFIX_HEADER = NO; @@ -633,7 +633,7 @@ ); buildSettings = { DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 4.5.56; + DYLIB_CURRENT_VERSION = 4.5.49; FRAMEWORK_SEARCH_PATHS = "$(LOCAL_LIBRARY_DIR)/Frameworks"; FRAMEWORK_VERSION = A; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -805,7 +805,7 @@ buildSettings = { COPY_PHASE_STRIP = NO; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 4.5.56; + DYLIB_CURRENT_VERSION = 4.5.49; FRAMEWORK_SEARCH_PATHS = "$(LOCAL_LIBRARY_DIR)/Frameworks"; FRAMEWORK_VERSION = A; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; @@ -848,7 +848,7 @@ DEPLOYMENT_POSTPROCESSING = YES; DSTROOT = /; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 4.5.56; + DYLIB_CURRENT_VERSION = 4.5.49; DYLIB_INSTALL_NAME_BASE = "@executable_path/../Frameworks/"; FRAMEWORK_SEARCH_PATHS = "$(USER_LIBRARY_DIR)/EmbeddedFrameworks"; FRAMEWORK_VERSION = A; @@ -893,7 +893,7 @@ isa = XCBuildConfiguration; buildSettings = { DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 4.5.56; + DYLIB_CURRENT_VERSION = 4.5.49; FRAMEWORK_SEARCH_PATHS = "$(LOCAL_LIBRARY_DIR)/Frameworks"; FRAMEWORK_VERSION = A; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -923,7 +923,7 @@ buildSettings = { COPY_PHASE_STRIP = NO; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 4.5.56; + DYLIB_CURRENT_VERSION = 4.5.49; FRAMEWORK_SEARCH_PATHS = "\"$(USER_LIBRARY_DIR)/EmbeddedFrameworks\""; FRAMEWORK_VERSION = A; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; @@ -959,7 +959,7 @@ DEPLOYMENT_POSTPROCESSING = YES; DSTROOT = /; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 4.5.56; + DYLIB_CURRENT_VERSION = 4.5.49; DYLIB_INSTALL_NAME_BASE = "@executable_path/../Frameworks/"; FRAMEWORK_SEARCH_PATHS = "$(USER_LIBRARY_DIR)/EmbeddedFrameworks"; FRAMEWORK_VERSION = A; @@ -997,7 +997,7 @@ isa = XCBuildConfiguration; buildSettings = { DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 4.5.56; + DYLIB_CURRENT_VERSION = 4.5.49; FRAMEWORK_SEARCH_PATHS = "\"$(USER_LIBRARY_DIR)/EmbeddedFrameworks\""; FRAMEWORK_VERSION = A; GCC_PRECOMPILE_PREFIX_HEADER = NO; diff --git a/sope-ical/NGiCal/NGiCal.xmap b/sope-ical/NGiCal/NGiCal.xmap index a9a612da..6cb5df9a 100644 --- a/sope-ical/NGiCal/NGiCal.xmap +++ b/sope-ical/NGiCal/NGiCal.xmap @@ -177,11 +177,13 @@ summary = { class = NSString; }; description = { class = NSString; key = comment; }; + comment = { class = NSString; key = userComment; }; uid = { class = NSString; }; action = { class = NSString; }; priority = { class = NSString; }; status = { class = NSString; }; transp = { class = NSString; key = transparency; }; + method = { class = NSString; }; sequence = { class = NSString; }; categories = { class = NSString; }; class = { class = NSString; key = accessClass; }; diff --git a/sope-ical/NGiCal/Version b/sope-ical/NGiCal/Version index e3250f18..4d808abe 100644 --- a/sope-ical/NGiCal/Version +++ b/sope-ical/NGiCal/Version @@ -2,7 +2,7 @@ MAJOR_VERSION=4 MINOR_VERSION=5 -SUBMINOR_VERSION:=47 +SUBMINOR_VERSION:=49 # v4.5.40 requires NGExtensions v4.5.145 # v4.5.37 requires NGExtensions v4.5.140 diff --git a/sope-ical/NGiCal/iCalCalendar.h b/sope-ical/NGiCal/iCalCalendar.h index 0e1b57b3..0227c88b 100644 --- a/sope-ical/NGiCal/iCalCalendar.h +++ b/sope-ical/NGiCal/iCalCalendar.h @@ -32,6 +32,7 @@ NSString *version; NSString *calscale; NSString *prodId; + NSString *method; NSMutableArray *todos; NSMutableArray *events; @@ -45,6 +46,7 @@ - (NSString *)calscale; - (NSString *)version; - (NSString *)prodId; +- (NSString *)method; - (NSArray *)events; - (NSArray *)todos; diff --git a/sope-ical/NGiCal/iCalCalendar.m b/sope-ical/NGiCal/iCalCalendar.m index 30cc36d9..d6fa8c1c 100644 --- a/sope-ical/NGiCal/iCalCalendar.m +++ b/sope-ical/NGiCal/iCalCalendar.m @@ -28,7 +28,8 @@ [self->version release]; [self->calscale release]; [self->prodId release]; - + [self->method release]; + [self->todos release]; [self->events release]; [self->journals release]; @@ -57,6 +58,12 @@ - (NSString *)prodId { return self->prodId; } +- (void)setMethod:(NSString *)_method { + ASSIGN(self->method, _method); +} +- (NSString *)method { + return self->method; +} - (void)addToEvents:(iCalEvent *)_event { if (_event == nil) return; diff --git a/sope-ical/NGiCal/iCalEntityObject.h b/sope-ical/NGiCal/iCalEntityObject.h index 64a14ea4..139fa5c3 100644 --- a/sope-ical/NGiCal/iCalEntityObject.h +++ b/sope-ical/NGiCal/iCalEntityObject.h @@ -52,6 +52,7 @@ NSString *location; NSString *status; NSString *categories; + NSString *userComment; } /* accessors */ @@ -92,6 +93,9 @@ - (void)setSequence:(NSNumber *)_value; /* this is an int */ - (NSNumber *)sequence; +- (void)setUserComment:(NSString *)_userComment; +- (NSString *)userComment; + - (void)setOrganizer:(iCalPerson *)_organizer; - (iCalPerson *)organizer; - (BOOL)isOrganizer:(id)_email; diff --git a/sope-ical/NGiCal/iCalEntityObject.m b/sope-ical/NGiCal/iCalEntityObject.m index 313ab128..af9d2406 100644 --- a/sope-ical/NGiCal/iCalEntityObject.m +++ b/sope-ical/NGiCal/iCalEntityObject.m @@ -45,6 +45,7 @@ [self->location release]; [self->status release]; [self->categories release]; + [self->userComment release]; [super dealloc]; } @@ -213,6 +214,13 @@ return self->alarms; } +- (void)setUserComment:(NSString *)_userComment { + ASSIGN(self->userComment, _userComment); +} +- (NSString *)userComment { + return self->userComment; +} + /* stuff */ - (NSArray *)participants { @@ -249,13 +257,17 @@ } - (BOOL)isOrganizer:(id)_email { - return [[[self organizer] rfc822Email] isEqualToString:_email]; + _email = [_email lowercaseString]; + return [[[[self organizer] rfc822Email] lowercaseString] + isEqualToString:_email]; } - (BOOL)isParticipant:(id)_email { NSArray *partEmails; + _email = [_email lowercaseString]; partEmails = [[self participants] valueForKey:@"rfc822Email"]; + partEmails = [partEmails valueForKey:@"lowercaseString"]; return [partEmails containsObject:_email]; } @@ -263,14 +275,15 @@ NSArray *ps; unsigned i, count; - ps = [self participants]; - count = [ps count]; - + _email = [_email lowercaseString]; + ps = [self participants]; + count = [ps count]; + for (i = 0; i < count; i++) { iCalPerson *p; p = [ps objectAtIndex:i]; - if ([[p rfc822Email] isEqualToString:_email]) + if ([[[p rfc822Email] lowercaseString] isEqualToString:_email]) return p; } return nil; /* not found */ diff --git a/sope-ical/NGiCal/iCalEvent.h b/sope-ical/NGiCal/iCalEvent.h index 9e07b2c5..1405bbf7 100644 --- a/sope-ical/NGiCal/iCalEvent.h +++ b/sope-ical/NGiCal/iCalEvent.h @@ -37,9 +37,9 @@ @interface iCalEvent : iCalRepeatableEntityObject { - NSCalendarDate *endDate; - NSString *duration; - NSString *transparency; + NSCalendarDate *endDate; + NSString *duration; + NSString *transparency; } /* accessors */ -- 2.39.5