From ed76724cc5b8030e9d3883328f7ef62b4030df4a Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 9 Feb 2007 21:21:35 +0000 Subject: [PATCH] Monotone-Parent: c8aafc081b56ac07184d9161b10f7f392068fc71 Monotone-Revision: d7db5635191ba2f21ed857960885518d9ff22bc4 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-02-09T21:21:35 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 11 +++++++ .../Appointments/SOGoAppointmentFolder.m | 11 +++++-- SoObjects/Contacts/SOGoContactGCSFolder.m | 5 +++ SoObjects/SOGo/SOGoFolder.m | 31 +++++++++++++++---- 4 files changed, 50 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 796124ba8..4db575884 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2007-02-09 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoFolder.m ([SOGoFolder -create]): new method + that requests the folder manager to create a folder table with the + specified type at the specified path. The type is taken from [self + folderType]. + + * SoObjects/Contacts/SOGoContactGCSFolder.m ([SOGoContactGCSFolder + -folderType]): implemented. + + * SoObjects/Appointments/SOGoAppointmentFolder.m + ([SOGoAppointmentFolder -folderType]): implemented. + * SoObjects/Contacts/SOGoContactFolders.m ([SOGoContactFolders -appendPersonalSourcesInContext:context]): we now fetch all folders with type "Contact" that belong to the current user. diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index a85e2900a..9d4ceb742 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -23,9 +23,11 @@ #import #import #import +#import +#import #import -#import +// #import #import #import #import @@ -58,7 +60,7 @@ static NSNumber *sharedYes = nil; { NGLoggerManager *lm; static BOOL didInit = NO; - SoClassSecurityInfo *securityInfo; +// SoClassSecurityInfo *securityInfo; if (didInit) return; didInit = YES; @@ -1081,6 +1083,11 @@ static NSNumber *sharedYes = nil; /* folder type */ +- (NSString *) folderType +{ + return @"Appointment"; +} + - (NSString *) outlookFolderClass { return @"IPF.Appointment"; diff --git a/SoObjects/Contacts/SOGoContactGCSFolder.m b/SoObjects/Contacts/SOGoContactGCSFolder.m index 6dd136bb5..828be57a4 100644 --- a/SoObjects/Contacts/SOGoContactGCSFolder.m +++ b/SoObjects/Contacts/SOGoContactGCSFolder.m @@ -200,6 +200,11 @@ /* folder type */ +- (NSString *) folderType +{ + return @"Contact"; +} + - (NSString *)outlookFolderClass { return @"IPF.Contact"; } diff --git a/SoObjects/SOGo/SOGoFolder.m b/SoObjects/SOGo/SOGoFolder.m index d60a89815..27eabccae 100644 --- a/SoObjects/SOGo/SOGoFolder.m +++ b/SoObjects/SOGo/SOGoFolder.m @@ -20,13 +20,14 @@ */ #import +#import +#import +#import -#include "SOGoFolder.h" -#include "common.h" -#include -#include -#include -#include +#import "SOGoFolder.h" +#import "common.h" +#import +#import #import "SOGoAclsFolder.h" @@ -83,6 +84,7 @@ ASSIGNCOPY(self->ocsPath, _path); } + - (NSString *)ocsPath { return self->ocsPath; } @@ -109,6 +111,23 @@ return folder; } +- (NSString *) folderType +{ + return @""; +} + +- (BOOL) create +{ + NSException *result; + + [GCSFolderType setFolderNamePrefix: @"SOGo_"]; + + result = [[self folderManager] createFolderOfType: [self folderType] + atPath: ocsPath]; + + return (result == nil); +} + - (NSArray *)fetchContentObjectNames { NSArray *fields, *records;