From a534289f319a417733d3e07e21584b21215528fc Mon Sep 17 00:00:00 2001 From: helge Date: Mon, 16 Aug 2004 12:15:11 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/trunk@256 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/SoObjects/Appointments/ChangeLog | 3 ++ .../Appointments/SOGoAppointmentFolder.h | 3 ++ .../Appointments/SOGoAppointmentFolder.m | 29 ++++++++++++++++++- SOGo/SoObjects/Appointments/Version | 2 +- 4 files changed, 35 insertions(+), 2 deletions(-) diff --git a/SOGo/SoObjects/Appointments/ChangeLog b/SOGo/SoObjects/Appointments/ChangeLog index 099263e4..8fa21c22 100644 --- a/SOGo/SoObjects/Appointments/ChangeLog +++ b/SOGo/SoObjects/Appointments/ChangeLog @@ -1,5 +1,8 @@ 2004-08-16 Helge Hess + * SOGoAppointmentFolder.m: added method to create a group folder and + a group calendar for a set of IDs (for internal queries) (v0.9.10) + * SOGoAppointmentObject.m, SOGoAppointmentFolder.m: moved calendar folder lookup methods to folder class (the object uses its container to lookup the folder) (v0.9.9) diff --git a/SOGo/SoObjects/Appointments/SOGoAppointmentFolder.h b/SOGo/SoObjects/Appointments/SOGoAppointmentFolder.h index 3bd0874d..588bf666 100644 --- a/SOGo/SoObjects/Appointments/SOGoAppointmentFolder.h +++ b/SOGo/SoObjects/Appointments/SOGoAppointmentFolder.h @@ -70,6 +70,9 @@ - (NSArray *)lookupCalendarFoldersForICalPerson:(NSArray *)_persons inContext:(id)_ctx; +- (id)lookupGroupFolderForUIDs:(NSArray *)_uids inContext:(id)_ctx; +- (id)lookupGroupCalendarFolderForUIDs:(NSArray *)_uids inContext:(id)_ctx; + @end #endif /* __Appointments_SOGoAppointmentFolder_H__ */ diff --git a/SOGo/SoObjects/Appointments/SOGoAppointmentFolder.m b/SOGo/SoObjects/Appointments/SOGoAppointmentFolder.m index 24f7b923..4037c09d 100644 --- a/SOGo/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SOGo/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -21,6 +21,7 @@ // $Id$ #include "SOGoAppointmentFolder.h" +#include #include #include #include @@ -28,7 +29,6 @@ #include #include - @implementation SOGoAppointmentFolder static BOOL debugOn = NO; @@ -347,6 +347,33 @@ static NSTimeZone *MET = nil; return [self lookupCalendarFoldersForUIDs:uids inContext:_ctx]; } +- (id)lookupGroupFolderForUIDs:(NSArray *)_uids inContext:(id)_ctx { + SOGoCustomGroupFolder *folder; + + if (_uids == nil) + return nil; + + folder = [[SOGoCustomGroupFolder alloc] initWithUIDs:_uids inContainer:self]; + return [folder autorelease]; +} +- (id)lookupGroupCalendarFolderForUIDs:(NSArray *)_uids inContext:(id)_ctx { + SOGoCustomGroupFolder *folder; + + if ((folder = [self lookupGroupFolderForUIDs:_uids inContext:_ctx]) == nil) + return nil; + + folder = [folder lookupName:@"Calendar" inContext:_ctx acquire:NO]; + if (![folder isNotNull]) + return nil; + if ([folder isKindOfClass:[NSException class]]) { + [self debugWithFormat:@"Note: could not lookup 'Calendar' in folder: %@", + folder]; + return nil; + } + + return folder; +} + /* GET */ - (id)GETAction:(WOContext *)_ctx { diff --git a/SOGo/SoObjects/Appointments/Version b/SOGo/SoObjects/Appointments/Version index 5099e3e0..1fc0a7b2 100644 --- a/SOGo/SoObjects/Appointments/Version +++ b/SOGo/SoObjects/Appointments/Version @@ -1,3 +1,3 @@ # $Id: Version,v 1.9 2004/05/19 14:30:45 helge Exp $ -SUBMINOR_VERSION:=9 +SUBMINOR_VERSION:=10 -- 2.39.5