From b7067eec65f0a719dea5a6f42f2ab268b2718dc0 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 20 Apr 2010 21:30:17 +0000 Subject: [PATCH] Monotone-Parent: 7b6ad79fde0791f201e8b98eb957ded1410de5c1 Monotone-Revision: 7576485920bab942eaccc45f2ab5b1914255643d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-04-20T21:30:17 Monotone-Branch: ca.inverse.sogo --- SoObjects/SOGo/LDAPSource.m | 6 ++++-- SoObjects/SOGo/NSObject+Utilities.m | 1 + SoObjects/SOGo/SOGoCASSession.m | 10 ++++------ SoObjects/SOGo/SOGoDefaultsSource.m | 1 + SoObjects/SOGo/SOGoFolder.m | 13 +++++++------ SoObjects/SOGo/SOGoGCSFolder.m | 13 +++++++------ SoObjects/SOGo/SOGoGroup.h | 4 +++- SoObjects/SOGo/SOGoObject.m | 2 +- SoObjects/SOGo/SOGoParentFolder.m | 3 +++ SoObjects/SOGo/SOGoUser.h | 3 --- SoObjects/SOGo/SOGoUser.m | 2 ++ SoObjects/SOGo/SOGoUserDefaults.m | 11 +++++------ SoObjects/SOGo/SOGoUserFolder.h | 2 -- SoObjects/SOGo/SOGoUserSettings.m | 1 + SoObjects/SOGo/SQLSource.m | 2 +- Tools/SOGoSockD.m | 6 +++--- Tools/SOGoSockDOperation.m | 5 +++-- Tools/SOGoTool.h | 4 ++-- Tools/SOGoTool.m | 9 +++++---- Tools/SOGoToolBackup.m | 8 ++------ UI/PreferencesUI/UIxFilterEditor.m | 1 + UI/Scheduler/UIxCalFilterPanel.m | 3 ++- UI/Scheduler/UIxCalMainView.m | 9 +++++---- UI/Scheduler/UIxCalUserRightsEditor.m | 1 + UI/Scheduler/UIxCalView.m | 7 ++++--- 25 files changed, 68 insertions(+), 59 deletions(-) diff --git a/SoObjects/SOGo/LDAPSource.m b/SoObjects/SOGo/LDAPSource.m index a4409bbbd..814913637 100644 --- a/SoObjects/SOGo/LDAPSource.m +++ b/SoObjects/SOGo/LDAPSource.m @@ -20,6 +20,8 @@ * Boston, MA 02111-1307, USA. */ +#include + #import #import #import @@ -123,12 +125,12 @@ static NSArray *commonSearchFields; } + (id) sourceFromUDSource: (NSDictionary *) udSource - inDomain: (NSString *) domain + inDomain: (NSString *) sourceDomain { id newSource; newSource = [[self alloc] initFromUDSource: udSource - inDomain: domain]; + inDomain: sourceDomain]; [newSource autorelease]; return newSource; diff --git a/SoObjects/SOGo/NSObject+Utilities.m b/SoObjects/SOGo/NSObject+Utilities.m index b6d9c00d3..2f9ed96cd 100644 --- a/SoObjects/SOGo/NSObject+Utilities.m +++ b/SoObjects/SOGo/NSObject+Utilities.m @@ -22,6 +22,7 @@ #import #import +#import #import #import diff --git a/SoObjects/SOGo/SOGoCASSession.m b/SoObjects/SOGo/SOGoCASSession.m index 6d6716454..d12d4795f 100644 --- a/SoObjects/SOGo/SOGoCASSession.m +++ b/SoObjects/SOGo/SOGoCASSession.m @@ -87,11 +87,11 @@ { SOGoCASSession *session; SOGoCache *cache; - NSString *ticket; + NSString *casTicket; cache = [SOGoCache sharedCache]; - ticket = [cache CASTicketFromIdentifier: identifier]; - session = [self CASSessionWithTicket: ticket]; + casTicket = [cache CASTicketFromIdentifier: identifier]; + session = [self CASSessionWithTicket: casTicket]; return session; } @@ -303,13 +303,11 @@ - (void) _parseDOMResponse: (NGDOMDocument *) response { - NGDOMElement *top; id nodes; NGDOMElement *currentNode; int count, max; - top = [response documentElement]; - nodes = [top childNodes]; + nodes = [[response documentElement] childNodes]; max = [nodes length]; for (count = 0; count < max; count++) { diff --git a/SoObjects/SOGo/SOGoDefaultsSource.m b/SoObjects/SOGo/SOGoDefaultsSource.m index e9d9f1035..3deaf51a0 100644 --- a/SoObjects/SOGo/SOGoDefaultsSource.m +++ b/SoObjects/SOGo/SOGoDefaultsSource.m @@ -21,6 +21,7 @@ */ #import +#import #import #import #import diff --git a/SoObjects/SOGo/SOGoFolder.m b/SoObjects/SOGo/SOGoFolder.m index b47a9fce2..787c963d7 100644 --- a/SoObjects/SOGo/SOGoFolder.m +++ b/SoObjects/SOGo/SOGoFolder.m @@ -28,6 +28,7 @@ #import #import +#import #import #import @@ -65,22 +66,22 @@ + (SOGoWebDAVAclManager *) webdavAclManager { - static SOGoWebDAVAclManager *webdavAclManager = nil; + static SOGoWebDAVAclManager *aclManager = nil; - if (!webdavAclManager) + if (!aclManager) { - webdavAclManager = [SOGoWebDAVAclManager new]; - [webdavAclManager registerDAVPermission: davElement (@"read", XMLNS_WEBDAV) + aclManager = [SOGoWebDAVAclManager new]; + [aclManager registerDAVPermission: davElement (@"read", XMLNS_WEBDAV) abstract: YES withEquivalent: SoPerm_WebDAVAccess asChildOf: davElement (@"all", XMLNS_WEBDAV)]; - [webdavAclManager registerDAVPermission: davElement (@"read-current-user-privilege-set", XMLNS_WEBDAV) + [aclManager registerDAVPermission: davElement (@"read-current-user-privilege-set", XMLNS_WEBDAV) abstract: YES withEquivalent: nil asChildOf: davElement (@"read", XMLNS_WEBDAV)]; } - return webdavAclManager; + return aclManager; } - (id) init diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index 57907f5c8..9e39d99b4 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -156,13 +156,13 @@ static NSArray *childRecordFields = nil; id newFolder; NSArray *elements, *pathElements; NSString *path, *objectPath, *login, *currentUser, *ocsName, *folderName; - WOContext *context; - BOOL isSubscription; + WOContext *localContext; + BOOL localIsSubscription; elements = [reference componentsSeparatedByString: @":"]; login = [elements objectAtIndex: 0]; - context = [[WOApplication application] context]; - currentUser = [[context activeUser] login]; + localContext = [[WOApplication application] context]; + currentUser = [[localContext activeUser] login]; objectPath = [elements objectAtIndex: 1]; pathElements = [objectPath componentsSeparatedByString: @"/"]; if ([pathElements count] > 1) @@ -177,8 +177,9 @@ static NSArray *childRecordFields = nil; newFolder = [self objectWithName: folderName inContainer: aContainer]; [newFolder setOCSPath: path]; [newFolder setOwner: login]; - isSubscription = ![login isEqualToString: [aContainer ownerInContext: context]]; - [newFolder setIsSubscription: isSubscription]; + localIsSubscription = ![login isEqualToString: + [aContainer ownerInContext: localContext]]; + [newFolder setIsSubscription: localIsSubscription]; if (![newFolder displayName]) newFolder = nil; diff --git a/SoObjects/SOGo/SOGoGroup.h b/SoObjects/SOGo/SOGoGroup.h index e8e5f4949..ba928712e 100644 --- a/SoObjects/SOGo/SOGoGroup.h +++ b/SoObjects/SOGo/SOGoGroup.h @@ -31,12 +31,14 @@ @class NSString; @class NGLdapEntry; +@protocol SOGoSource; + @interface SOGoGroup : NSObject { @private NSString *_identifier; NGLdapEntry *_entry; - LDAPSource *_source; + NSObject *_source; NSMutableArray *_members; } diff --git a/SoObjects/SOGo/SOGoObject.m b/SoObjects/SOGo/SOGoObject.m index c879a9a5c..06b4ce34f 100644 --- a/SoObjects/SOGo/SOGoObject.m +++ b/SoObjects/SOGo/SOGoObject.m @@ -1391,7 +1391,7 @@ } - (NSException *) davSetProperties: (NSDictionary *) setProps - removePropertiesNamed: (NSDictionary *) removedProps + removePropertiesNamed: (NSArray *) removedProps inContext: (WOContext *) localContext { NSString *currentProp; diff --git a/SoObjects/SOGo/SOGoParentFolder.m b/SoObjects/SOGo/SOGoParentFolder.m index 09d1f5ffe..0f31d89a0 100644 --- a/SoObjects/SOGo/SOGoParentFolder.m +++ b/SoObjects/SOGo/SOGoParentFolder.m @@ -35,9 +35,12 @@ #import #import #import +#import #import #import +#import + #import "NSObject+DAV.h" #import "SOGoGCSFolder.h" #import "SOGoPermissions.h" diff --git a/SoObjects/SOGo/SOGoUser.h b/SoObjects/SOGo/SOGoUser.h index 9f0083233..b196c3003 100644 --- a/SoObjects/SOGo/SOGoUser.h +++ b/SoObjects/SOGo/SOGoUser.h @@ -134,9 +134,6 @@ - (SOGoAppointmentFolder *) personalCalendarFolderInContext: (WOContext *) context; -- (NSArray *) rolesForObject: (NSObject *) object - inContext: (WOContext *) context; - @end #endif /* __SOGoUser_H__ */ diff --git a/SoObjects/SOGo/SOGoUser.m b/SoObjects/SOGo/SOGoUser.m index 4f2b57596..88be4c5b6 100644 --- a/SoObjects/SOGo/SOGoUser.m +++ b/SoObjects/SOGo/SOGoUser.m @@ -36,6 +36,8 @@ #import #import +#import + #import "NSArray+Utilities.h" #import "SOGoCache.h" #import "SOGoDateFormatter.h" diff --git a/SoObjects/SOGo/SOGoUserDefaults.m b/SoObjects/SOGo/SOGoUserDefaults.m index 35a75c3d3..92496a806 100644 --- a/SoObjects/SOGo/SOGoUserDefaults.m +++ b/SoObjects/SOGo/SOGoUserDefaults.m @@ -49,7 +49,7 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek"; { SOGoUserProfile *up; SOGoUserDefaults *ud; - SOGoDefaultsSource *parentSource; + SOGoDefaultsSource *parent; static Class SOGoUserProfileKlass = Nil; if (!SOGoUserProfileKlass) @@ -82,12 +82,11 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek"; // [self invalidateLanguage]; // } - parentSource = [SOGoDomainDefaults defaultsForDomain: domainId]; - if (!parentSource) - parentSource = [SOGoSystemDefaults sharedSystemDefaults]; + parent = [SOGoDomainDefaults defaultsForDomain: domainId]; + if (!parent) + parent = [SOGoSystemDefaults sharedSystemDefaults]; - ud = [self defaultsSourceWithSource: up - andParentSource: parentSource]; + ud = [self defaultsSourceWithSource: up andParentSource: parent]; return ud; } diff --git a/SoObjects/SOGo/SOGoUserFolder.h b/SoObjects/SOGo/SOGoUserFolder.h index f02379643..f4c64f79b 100644 --- a/SoObjects/SOGo/SOGoUserFolder.h +++ b/SoObjects/SOGo/SOGoUserFolder.h @@ -45,8 +45,6 @@ /* ownership */ -- (NSString *) ownerInContext: (WOContext *) _ctx; - - (NSArray *) foldersOfType: (NSString *) folderType forUID: (NSString *) uid; - (NSDictionary *) foldersOfType: (NSString *) type diff --git a/SoObjects/SOGo/SOGoUserSettings.m b/SoObjects/SOGo/SOGoUserSettings.m index 13f3d38da..701009e17 100644 --- a/SoObjects/SOGo/SOGoUserSettings.m +++ b/SoObjects/SOGo/SOGoUserSettings.m @@ -21,6 +21,7 @@ */ #import +#import #import #import "SOGoUserProfile.h" diff --git a/SoObjects/SOGo/SQLSource.m b/SoObjects/SOGo/SQLSource.m index 23172d282..251456e15 100644 --- a/SoObjects/SOGo/SQLSource.m +++ b/SoObjects/SOGo/SQLSource.m @@ -150,7 +150,7 @@ memset(md, 0, MD5_DIGEST_LENGTH); memset(buf, 0, 80); - EVP_Digest([plainPassword UTF8String], strlen([plainPassword UTF8String]), md, NULL, EVP_md5(), NULL); + EVP_Digest((const void *) [plainPassword UTF8String], strlen([plainPassword UTF8String]), md, NULL, EVP_md5(), NULL); for (i = 0; i < MD5_DIGEST_LENGTH; i++) sprintf(&(buf[i*2]), "%02x", md[i]); diff --git a/Tools/SOGoSockD.m b/Tools/SOGoSockD.m index c8b9bcee3..e3db2285c 100644 --- a/Tools/SOGoSockD.m +++ b/Tools/SOGoSockD.m @@ -93,7 +93,7 @@ } - (BOOL) _handleData: (NSData *) socketData - onSocket: (NGActiveSocket *) responseSocket + onSocket: (id ) responseSocket { NSString *stringData; SOGoSockDScanner *scanner; @@ -109,7 +109,7 @@ if (operation) { rc = YES; - [operation respondOnSocket: responseSocket]; + [operation respondOnSocket: (NGActiveSocket *) responseSocket]; } else rc = NO; @@ -122,7 +122,7 @@ - (void) _acceptAndHandle { - NGActiveSocket *socket; + id socket; char buffer[1024]; unsigned int count; NSMutableData *socketData; diff --git a/Tools/SOGoSockDOperation.m b/Tools/SOGoSockDOperation.m index b1bc9d930..85cbd6114 100644 --- a/Tools/SOGoSockDOperation.m +++ b/Tools/SOGoSockDOperation.m @@ -30,6 +30,7 @@ #import #import #import +#import #import #import @@ -50,7 +51,7 @@ } + (SOGoSockDOperation *) operationWithMethod: (NSString *) method - andParameters: (NSDictionary *) parameters + andParameters: (NSDictionary *) opParameters { static NSArray *operations = nil; NSString *className; @@ -66,7 +67,7 @@ [method capitalizedString]]; newOperation = [NSClassFromString (className) new]; [newOperation autorelease]; - [newOperation setParameters: parameters]; + [newOperation setParameters: opParameters]; } else newOperation = nil; diff --git a/Tools/SOGoTool.h b/Tools/SOGoTool.h index 2bb43eb1f..a714ac0e7 100644 --- a/Tools/SOGoTool.h +++ b/Tools/SOGoTool.h @@ -36,8 +36,8 @@ + (NSString *) command; + (NSString *) description; -+ (BOOL) runToolWithArguments: (NSArray *) arguments - verbose: (BOOL) verbose; ++ (BOOL) runToolWithArguments: (NSArray *) toolArguments + verbose: (BOOL) isVerbose; - (void) setArguments: (NSArray *) newArguments; - (void) setVerbose: (BOOL) newVerbose; diff --git a/Tools/SOGoTool.m b/Tools/SOGoTool.m index 4316eb650..f55bc2700 100644 --- a/Tools/SOGoTool.m +++ b/Tools/SOGoTool.m @@ -20,6 +20,7 @@ * Boston, MA 02111-1307, USA. */ +#import #import #import "SOGoTool.h" @@ -39,16 +40,16 @@ return nil; } -+ (BOOL) runToolWithArguments: (NSArray *) arguments - verbose: (BOOL) verbose ++ (BOOL) runToolWithArguments: (NSArray *) toolArguments + verbose: (BOOL) isVerbose { SOGoTool *instance; instance = [self new]; [instance autorelease]; - [instance setArguments: arguments]; - [instance setVerbose: verbose]; + [instance setArguments: toolArguments]; + [instance setVerbose: isVerbose]; return [instance run]; } diff --git a/Tools/SOGoToolBackup.m b/Tools/SOGoToolBackup.m index 81a68f1ce..8fcbef894 100644 --- a/Tools/SOGoToolBackup.m +++ b/Tools/SOGoToolBackup.m @@ -99,7 +99,6 @@ { NSFileManager *fm; BOOL exists, isDir, rc; - NSError *createError; fm = [NSFileManager defaultManager]; exists = [fm fileExistsAtPath: directory isDirectory: &isDir]; @@ -116,12 +115,9 @@ else { rc = [fm createDirectoryAtPath: directory - withIntermediateDirectories: YES - attributes: nil - error: &createError]; + attributes: nil]; if (!rc) - NSLog (@"an error occured during directory creation: %@", - createError); + NSLog (@"an error occured during directory creation"); } return rc; diff --git a/UI/PreferencesUI/UIxFilterEditor.m b/UI/PreferencesUI/UIxFilterEditor.m index 5ee488b9a..894728afe 100644 --- a/UI/PreferencesUI/UIxFilterEditor.m +++ b/UI/PreferencesUI/UIxFilterEditor.m @@ -21,6 +21,7 @@ */ #import +#import #import #import diff --git a/UI/Scheduler/UIxCalFilterPanel.m b/UI/Scheduler/UIxCalFilterPanel.m index 4d5cd0648..541ba2a13 100644 --- a/UI/Scheduler/UIxCalFilterPanel.m +++ b/UI/Scheduler/UIxCalFilterPanel.m @@ -27,7 +27,8 @@ #import -#import +#import +#import #import "UIxCalFilterPanel.h" diff --git a/UI/Scheduler/UIxCalMainView.m b/UI/Scheduler/UIxCalMainView.m index 05e247a45..455ca3c99 100644 --- a/UI/Scheduler/UIxCalMainView.m +++ b/UI/Scheduler/UIxCalMainView.m @@ -31,15 +31,16 @@ #import #import +#import #import #import #import - -#import - -#import "UIxCalMainView.h" +#import #import +#import + +#import "UIxCalMainView.h" @implementation UIxCalMainView diff --git a/UI/Scheduler/UIxCalUserRightsEditor.m b/UI/Scheduler/UIxCalUserRightsEditor.m index d678c17e6..5461c3cad 100644 --- a/UI/Scheduler/UIxCalUserRightsEditor.m +++ b/UI/Scheduler/UIxCalUserRightsEditor.m @@ -21,6 +21,7 @@ */ #import +#import #import #import #import diff --git a/UI/Scheduler/UIxCalView.m b/UI/Scheduler/UIxCalView.m index 382eba9bc..5b594dbce 100644 --- a/UI/Scheduler/UIxCalView.m +++ b/UI/Scheduler/UIxCalView.m @@ -21,9 +21,6 @@ */ #import -#import -#import -#import #import #import @@ -37,11 +34,15 @@ #import #import +#import #import #import +#import +#import #import #import #import +#import #import