diff --git a/ChangeLog b/ChangeLog index 923e478b4..18126fe70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-01 Ludovic Marcotte + + * Dropped worthless tools + * Fixed tons of compiler warnings + 2009-03-31 Francis Lachapelle * UI/Scheduler/UIxCalListingActions.m ([UIxCalListingActions diff --git a/OGoContentStore/GNUmakefile b/OGoContentStore/GNUmakefile index 4de3724b8..3b7a48a62 100644 --- a/OGoContentStore/GNUmakefile +++ b/OGoContentStore/GNUmakefile @@ -5,7 +5,6 @@ include $(GNUSTEP_MAKEFILES)/common.make include ./Version LIBRARY_NAME = libOGoContentStore -TOOL_NAME = test_quick_extract TYPEMODELS_DIR = $(SOGO_TYPEMODELS) @@ -26,9 +25,6 @@ libOGoContentStore_TYPEMODELS += \ appointment-oracle.ocs \ contact-oracle.ocs -test_quick_extract_OBJC_FILES += \ - test_quick_extract.m - -include GNUmakefile.preamble ifneq ($(FHS_INSTALL_ROOT),) GNUSTEP_HEADERS=$(DESTDIR)$(FHS_INSTALL_ROOT)/include diff --git a/OGoContentStore/test_quick_extract.m b/OGoContentStore/test_quick_extract.m deleted file mode 100644 index 8032b7b66..000000000 --- a/OGoContentStore/test_quick_extract.m +++ /dev/null @@ -1,127 +0,0 @@ -/* - Copyright (C) 2005 SKYRIX Software AG - - This file is part of SOGo. - - SOGo is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - SOGo is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with SOGo; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. -*/ - - -#import -#import -#import -#import -#import -#import - -#import - -#import - -@interface TestQuickExtract : NSObject - -- (int)runWithArguments:(NSArray *)_args; - -@end - -@implementation TestQuickExtract - -- (int)usage:(NSArray *)_args { - fprintf(stderr, "usage: %s \n", - [[_args objectAtIndex:0] cString]); - return 1; -} - -- (void)extractQuickInfoFromFileAtPath:(NSString *)_path - usingExtractorClass:(Class)_clazz -{ - GCSFieldExtractor *extractor; - NSString *content; - NSDictionary *quickInfo; - - if ((content = [NSString stringWithContentsOfFile:_path]) == nil) { - fprintf(stderr, "ERROR: could not open file: %s\n", [_path cString]); - return; - } - - extractor = [[_clazz alloc] init]; - quickInfo = [[extractor extractQuickFieldsFromContent:content] retain]; - [extractor release]; extractor = nil; - - if ([quickInfo count] == 0) { - fprintf(stderr, "ERROR: could not extract quickfields from file: %s\n", - [_path cString]); - return; - } - - printf("File: %s\n", [_path cString]); - printf("**************************************************\n"); - printf("%s\n", [[quickInfo description] cString]); - - [quickInfo release]; -} - -- (void)extractQuickInfoFromFiles:(NSEnumerator *)_pathes - usingExtractorClass:(Class)_clazz -{ - NSString *path; - - while ((path = [_pathes nextObject]) != nil) - [self extractQuickInfoFromFileAtPath:path usingExtractorClass:_clazz]; -} - -- (int)runWithArguments:(NSArray *)_args { - NSEnumerator *e; - Class clazz; - - if ([_args count] < 3) - return [self usage:_args]; - - if ((clazz = NSClassFromString([_args objectAtIndex:1])) == Nil) { - fprintf(stderr, "ERROR: did not find extractor class: %s\n", - [[_args objectAtIndex:1] cString]); - return 2; - } - - e = [_args objectEnumerator]; - [e nextObject]; // skip toolname - [e nextObject]; // skip classname - - [self extractQuickInfoFromFiles:e usingExtractorClass:clazz]; - - return 0; -} - -@end /* TestQuickExtract */ - - -int main(int argc, char **argv, char **env) { - NSAutoreleasePool *pool; - TestQuickExtract *tool; - int rc; - - pool = [[NSAutoreleasePool alloc] init]; -#if LIB_FOUNDATION_LIBRARY - [NSProcessInfo initializeWithArguments:argv count:argc environment:env]; -#endif - - tool = [[TestQuickExtract alloc] init]; - rc = [tool runWithArguments: - [[NSProcessInfo processInfo] argumentsWithoutDefaults]]; - [tool release]; - [pool release]; - return rc; -} diff --git a/SOPE/GDLContentStore/GNUmakefile b/SOPE/GDLContentStore/GNUmakefile index ca90d7836..48730f644 100644 --- a/SOPE/GDLContentStore/GNUmakefile +++ b/SOPE/GDLContentStore/GNUmakefile @@ -16,8 +16,6 @@ libGDLContentStore_PCH_FILE = common.h libGDLContentStore_INTERFACE_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION) libGDLContentStore_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBMINOR_VERSION) -TOOL_NAME = gcs_ls gcs_mkdir gcs_cat gcs_recreatequick gcs_gensql - libGDLContentStore_HEADER_FILES_DIR = . libGDLContentStore_HEADER_FILES_INSTALL_DIR = /GDLContentStore FHS_HEADER_FILES_INSTALL_DIR = $(libGDLContentStore_HEADER_FILES_INSTALL_DIR) @@ -49,13 +47,6 @@ libGDLContentStore_OBJC_FILES += \ GCSFieldExtractor.m \ GCSStringFormatter.m \ -gcs_ls_OBJC_FILES += gcs_ls.m -gcs_mkdir_OBJC_FILES += gcs_mkdir.m -gcs_cat_OBJC_FILES += gcs_cat.m -gcs_gensql_OBJC_FILES += gcs_gensql.m -gcs_recreatequick_OBJC_FILES += gcs_recreatequick.m - - # framework support GDLContentStore_PCH_FILE = $(libGDLContentStore_PCH_FILE) diff --git a/SOPE/GDLContentStore/gcs_cat.m b/SOPE/GDLContentStore/gcs_cat.m deleted file mode 100644 index 0145769e1..000000000 --- a/SOPE/GDLContentStore/gcs_cat.m +++ /dev/null @@ -1,128 +0,0 @@ -/* - Copyright (C) 2004-2005 SKYRIX Software AG - - This file is part of OpenGroupware.org. - - OGo is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - OGo is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with OGo; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. -*/ - -#import -#import -#import -#import - -#import -#import -#import - -#import -#import - -@class NSUserDefaults, NSArray; -@class GCSFolderManager; - -@interface Tool : NSObject -{ - NSUserDefaults *ud; - GCSFolderManager *folderManager; -} - -+ (int)runWithArgs:(NSArray *)_args; -- (int)run; - -@end - -@implementation Tool - -- (id)init { - if ((self = [super init])) { - self->ud = [[NSUserDefaults standardUserDefaults] retain]; - self->folderManager = [[GCSFolderManager defaultFolderManager] retain]; - } - return self; -} -- (void)dealloc { - [self->ud release]; - [self->folderManager release]; - [super dealloc]; -} - -/* operation */ - -- (int)runOnPath:(NSString *)_path { - GCSFolder *folder; - NSString *dirname, *filename; - NSString *content; - - dirname = [_path stringByDeletingLastPathComponent]; - filename = [_path lastPathComponent]; - - if ((folder = [self->folderManager folderAtPath:dirname]) == nil) { - [self logWithFormat:@"did not find folder for file: '%@'", dirname]; - return 1; - } - - if ((content = [folder fetchContentWithName:filename]) == nil) { - [self logWithFormat:@"did not find file: '%@'", _path]; - return 1; - } - - printf("%s\n", [content cString]); - - return 0; -} - -- (int)run { - NSEnumerator *e; - NSString *path; - - [self logWithFormat:@"manager: %@", self->folderManager]; - - if (![self->folderManager canConnect]) { - [self logWithFormat:@"cannot connect folder-info database!"]; - return 1; - } - - e = [[[NSProcessInfo processInfo] argumentsWithoutDefaults] - objectEnumerator]; - [e nextObject]; // skip tool name - - while ((path = [e nextObject])) - [self runOnPath:path]; - - return 0; -} -+ (int)runWithArgs:(NSArray *)_args { - return [(Tool *)[[[self alloc] init] autorelease] run]; -} - -@end /* Tool */ - -int main(int argc, char **argv, char **env) { - NSAutoreleasePool *pool; - int rc; - - pool = [[NSAutoreleasePool alloc] init]; -#if LIB_FOUNDATION_LIBRARY - [NSProcessInfo initializeWithArguments:argv count:argc environment:env]; -#endif - - rc = [Tool runWithArgs: - [[NSProcessInfo processInfo] argumentsWithoutDefaults]]; - - [pool release]; - return rc; -} diff --git a/SOPE/GDLContentStore/gcs_gensql.m b/SOPE/GDLContentStore/gcs_gensql.m deleted file mode 100644 index d518cef0a..000000000 --- a/SOPE/GDLContentStore/gcs_gensql.m +++ /dev/null @@ -1,121 +0,0 @@ -/* - Copyright (C) 2005 SKYRIX Software AG - - This file is part of OpenGroupware.org. - - OGo is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - OGo is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with OGo; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. -*/ - -#import -#import -#import -#import - -#import -#import -#import - -#import - - -@class NSUserDefaults, NSArray; -@class GCSFolderManager; - -@interface Tool : NSObject -{ - NSUserDefaults *ud; -} - -+ (int)runWithArgs:(NSArray *)_args; -- (int)run; - -@end - -@implementation Tool - -- (id)init { - if ((self = [super init])) { - self->ud = [[NSUserDefaults standardUserDefaults] retain]; - } - return self; -} -- (void)dealloc { - [self->ud release]; - [super dealloc]; -} - -/* operation */ - -- (int)runOnTable:(NSString *)_tableName typeName:(NSString *)_typeName { - GCSFolderType *folderType; - - if ((folderType = [GCSFolderType folderTypeWithName:_typeName]) != nil) { - NSString *s; - - s = [folderType sqlQuickCreateWithTableName:_tableName]; - - fwrite([s cString], 1, [s cStringLength], stdout); - printf("\n"); - } - else { - fprintf(stderr, "ERROR: did not find GCS type: '%s'\n", - [_typeName cString]); - } - - return 0; -} - -- (int)run { - NSEnumerator *e; - NSString *tableName, *typeName; - - e = [[[NSProcessInfo processInfo] argumentsWithoutDefaults] - objectEnumerator]; - [e nextObject]; // skip tool name - - while ((tableName = [e nextObject]) != nil) { - typeName = [e nextObject]; - if (typeName == nil) { - [self logWithFormat:@"got tablename '%@' but no type?!", tableName]; - break; - } - - [self runOnTable:tableName typeName:typeName]; - } - - return 0; -} -+ (int)runWithArgs:(NSArray *)_args { - return [(Tool *)[[[self alloc] init] autorelease] run]; -} - -@end /* Tool */ - -int main(int argc, char **argv, char **env) { - NSAutoreleasePool *pool; - int rc; - - pool = [[NSAutoreleasePool alloc] init]; -#if LIB_FOUNDATION_LIBRARY - [NSProcessInfo initializeWithArguments:argv count:argc environment:env]; -#endif - - rc = [Tool runWithArgs: - [[NSProcessInfo processInfo] argumentsWithoutDefaults]]; - - [pool release]; - return rc; -} diff --git a/SOPE/GDLContentStore/gcs_ls.m b/SOPE/GDLContentStore/gcs_ls.m deleted file mode 100644 index 49045abaf..000000000 --- a/SOPE/GDLContentStore/gcs_ls.m +++ /dev/null @@ -1,149 +0,0 @@ -/* - Copyright (C) 2004-2005 SKYRIX Software AG - - This file is part of OpenGroupware.org. - - OGo is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - OGo is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with OGo; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. -*/ - -#import -#import -#import -#import -#import -#import -#import - -#import -#import -#import - -#import -#import - -@class NSUserDefaults, NSArray; -@class GCSFolderManager; - -@interface Tool : NSObject -{ - NSUserDefaults *ud; - GCSFolderManager *folderManager; -} - -+ (int)runWithArgs:(NSArray *)_args; -- (int)run; - -@end - -@implementation Tool - -- (id)init { - if ((self = [super init])) { - self->ud = [[NSUserDefaults standardUserDefaults] retain]; - self->folderManager = [[GCSFolderManager defaultFolderManager] retain]; - } - return self; -} -- (void)dealloc { - [self->ud release]; - [self->folderManager release]; - [super dealloc]; -} - -/* operation */ - -- (int)runOnPath:(NSString *)_path { - NSArray *subfolders; - unsigned i, count; - GCSFolder *folder; - - [self logWithFormat:@"ls path: '%@'", _path]; - -#if 0 // we do not necessarily need the whole hierarchy - if (![self->folderManager folderExistsAtPath:_path]) - [self logWithFormat:@"folder does not exist: '%@'", _path]; -#endif - - subfolders = [self->folderManager - listSubFoldersAtPath:_path - recursive:[ud boolForKey:@"r"]]; - if (subfolders == nil) { - [self logWithFormat:@"cannot list folder: '%@'", _path]; - return 1; - } - - for (i = 0, count = [subfolders count]; i < count; i++) { - printf("%s\n", [[subfolders objectAtIndex:i] cString]); - } - - folder = [self->folderManager folderAtPath:_path]; - - if ([folder isNotNull]) { - NSLog(@"folder: %@", folder); - - NSLog(@" can%s connect store: %@", [folder canConnectStore] ? "" : "not", - [[folder location] absoluteString]); - NSLog(@" can%s connect quick: %@", [folder canConnectQuick] ? "" : "not", - [[folder quickLocation] absoluteString]); - } - else { - NSLog(@"ERROR: could not create folder object for path: '%@'", _path); - } - - return 0; -} - -- (int)run { - NSEnumerator *e; - NSString *path; - - [self logWithFormat:@"manager: %@", self->folderManager]; - - if (![self->folderManager canConnect]) { - [self logWithFormat:@"cannot connect folder-info database!"]; - return 1; - } - - e = [[[NSProcessInfo processInfo] argumentsWithoutDefaults] - objectEnumerator]; - [e nextObject]; // skip tool name - - while ((path = [e nextObject]) != nil) - [self runOnPath:path]; - - return 0; -} -+ (int)runWithArgs:(NSArray *)_args { - return [(Tool *)[[[self alloc] init] autorelease] run]; -} - -@end /* Tool */ - -int main(int argc, char **argv, char **env) { - NSAutoreleasePool *pool; - int rc; - - pool = [[NSAutoreleasePool alloc] init]; -#if LIB_FOUNDATION_LIBRARY - [NSProcessInfo initializeWithArguments:argv count:argc environment:env]; -#endif - - rc = [Tool runWithArgs: - [[NSProcessInfo processInfo] argumentsWithoutDefaults]]; - - [pool release]; - return rc; -} diff --git a/SOPE/GDLContentStore/gcs_mkdir.m b/SOPE/GDLContentStore/gcs_mkdir.m deleted file mode 100644 index dc2a82aff..000000000 --- a/SOPE/GDLContentStore/gcs_mkdir.m +++ /dev/null @@ -1,134 +0,0 @@ -/* - Copyright (C) 2004-2005 SKYRIX Software AG - - This file is part of OpenGroupware.org. - - OGo is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - OGo is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with OGo; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. -*/ - -#import -#import -#import -#import - -#import -#import -#import - -#import -#import - -@class NSUserDefaults, NSArray; -@class GCSFolderManager; - -@interface Tool : NSObject -{ - NSUserDefaults *ud; - GCSFolderManager *folderManager; -} - -+ (int)runWithArgs:(NSArray *)_args; -- (int)run; - -@end - -@implementation Tool - -- (id)init { - if ((self = [super init])) { - self->ud = [[NSUserDefaults standardUserDefaults] retain]; - self->folderManager = [[GCSFolderManager defaultFolderManager] retain]; - } - return self; -} -- (void)dealloc { - [self->ud release]; - [self->folderManager release]; - [super dealloc]; -} - -/* operation */ - -- (int)runOnPath:(NSString *)_path type:(NSString *)_type { - NSException *error; - - [self logWithFormat:@"mkdir %@ at path: '%@'", _type, _path]; - - if ([self->folderManager folderExistsAtPath:_path]) { - [self logWithFormat:@"folder already exist at path: '%@'", _path]; - return 1; - } - - if ((error = [self->folderManager createFolderOfType:_type - withName: @"testFolder" - atPath:_path])) { - [self logWithFormat:@"creation of folder %@ at %@ failed: %@", - _type, _path, error]; - return 1; - } - - if ([self->folderManager folderExistsAtPath:_path]) - [self logWithFormat:@"CREATED."]; - else - [self logWithFormat:@"cannot find fresh folder?"]; - - return 0; -} - -- (int)run { - NSEnumerator *e; - NSString *type; - NSString *path; - - [self logWithFormat:@"manager: %@", self->folderManager]; - - if (![self->folderManager canConnect]) { - [self logWithFormat:@"cannot connect folder-info database!"]; - return 1; - } - - e = [[[NSProcessInfo processInfo] argumentsWithoutDefaults] - objectEnumerator]; - [e nextObject]; // skip tool name - - type = [[[e nextObject] copy] autorelease]; - - while ((path = [e nextObject])) - [self runOnPath:path type:type]; - - return 0; -} -+ (int)runWithArgs:(NSArray *)_args { - return [(Tool *)[[[self alloc] init] autorelease] run]; -} - -@end /* Tool */ - -int main(int argc, char **argv, char **env) { - NSAutoreleasePool *pool; - int rc; - - pool = [[NSAutoreleasePool alloc] init]; -#if LIB_FOUNDATION_LIBRARY - [NSProcessInfo initializeWithArguments:argv count:argc environment:env]; -#endif - - rc = [Tool runWithArgs: - [[NSProcessInfo processInfo] argumentsWithoutDefaults]]; - - [pool release]; - return rc; -} diff --git a/SOPE/GDLContentStore/gcs_recreatequick.m b/SOPE/GDLContentStore/gcs_recreatequick.m deleted file mode 100644 index 2dcaedff0..000000000 --- a/SOPE/GDLContentStore/gcs_recreatequick.m +++ /dev/null @@ -1,127 +0,0 @@ -/* - Copyright (C) 2004-2005 SKYRIX Software AG - - This file is part of OpenGroupware.org. - - OGo is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - OGo is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with OGo; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. -*/ - -#import -#import -#import -#import - -#import -#import -#import - -#import -#import - -@class NSUserDefaults, NSArray; -@class GCSFolderManager; - -@interface Tool : NSObject -{ - NSUserDefaults *ud; - GCSFolderManager *folderManager; -} - -+ (int)runWithArgs:(NSArray *)_args; -- (int)run; - -@end - -@implementation Tool - -- (id)init { - if ((self = [super init])) { - self->ud = [[NSUserDefaults standardUserDefaults] retain]; - self->folderManager = [[GCSFolderManager defaultFolderManager] retain]; - } - return self; -} -- (void)dealloc { - [self->ud release]; - [self->folderManager release]; - [super dealloc]; -} - -/* operation */ - -- (int)runOnPath:(NSString *)_path { - GCSFolder *folder; - - [self logWithFormat:@"update quick from store at path: '%@'", _path]; - - if (![self->folderManager folderExistsAtPath:_path]) { - [self logWithFormat:@"no folder exist at path: '%@'", _path]; - return 1; - } - - if ((folder = [self->folderManager folderAtPath:_path]) == nil) { - [self logWithFormat:@"got no folder object for path: '%@'", _path]; - return 2; - } - [self logWithFormat:@" folder: %@", folder]; - - // TODO: - [self logWithFormat:@" should recreate folder .."]; - - return 0; -} - -- (int)run { - NSEnumerator *e; - NSString *path; - - [self logWithFormat:@"manager: %@", self->folderManager]; - - if (![self->folderManager canConnect]) { - [self logWithFormat:@"cannot connect folder-info database!"]; - return 1; - } - - e = [[[NSProcessInfo processInfo] argumentsWithoutDefaults] - objectEnumerator]; - [e nextObject]; // skip tool name - - while ((path = [e nextObject])) - [self runOnPath:path]; - - return 0; -} -+ (int)runWithArgs:(NSArray *)_args { - return [(Tool *)[[[self alloc] init] autorelease] run]; -} - -@end /* Tool */ - -int main(int argc, char **argv, char **env) { - NSAutoreleasePool *pool; - int rc; - - pool = [[NSAutoreleasePool alloc] init]; -#if LIB_FOUNDATION_LIBRARY - [NSProcessInfo initializeWithArguments:argv count:argc environment:env]; -#endif - - rc = [Tool runWithArgs: - [[NSProcessInfo processInfo] argumentsWithoutDefaults]]; - - [pool release]; - return rc; -} diff --git a/SOPE/NGCards/iCalWeeklyRecurrenceCalculator.m b/SOPE/NGCards/iCalWeeklyRecurrenceCalculator.m index 6b673464e..a714520f7 100644 --- a/SOPE/NGCards/iCalWeeklyRecurrenceCalculator.m +++ b/SOPE/NGCards/iCalWeeklyRecurrenceCalculator.m @@ -124,9 +124,9 @@ if ([startDate compare: currentStartDate] == NSOrderedAscending || [startDate compare: currentStartDate] == NSOrderedSame) { - unsigned int days, week; + int days, week; - [currentStartDate years:NULL months:NULL days:&days hours:NULL + [currentStartDate years:NULL months:NULL days:(int *)&days hours:NULL minutes:NULL seconds:NULL sinceDate:firStart]; week = days / 7; diff --git a/SoObjects/Appointments/SOGoAppointmentObject.h b/SoObjects/Appointments/SOGoAppointmentObject.h index a7ed90600..ac5630d35 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.h +++ b/SoObjects/Appointments/SOGoAppointmentObject.h @@ -52,7 +52,7 @@ forRecurrenceId: (NSCalendarDate *) _recurrenceId; - (void) takeAttendeeStatus: (iCalPerson *) attendee - from: (NSString *) originator + from: (SOGoUser *) originator withRecurrenceId: (NSCalendarDate*) recurrenceId; - (NSArray *) postCalDAVEventRequestTo: (NSArray *) recipients from: (NSString *) originator; diff --git a/SoObjects/Appointments/SOGoAppointmentObject.m b/SoObjects/Appointments/SOGoAppointmentObject.m index 457e22dc2..a840390b3 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SoObjects/Appointments/SOGoAppointmentObject.m @@ -285,9 +285,9 @@ iCalEntityObject *currentOccurence; iCalRepeatableEntityObject *event; iCalCalendar *calendar; - NSMutableArray *occurences; NSCalendarDate *currentId; NSString *calendarContent; + NSArray *occurences; int max, count; // Invitations are always written to the personal folder; it's not necessay @@ -835,7 +835,7 @@ { // If no occurence found, create one. recurrenceTime = [NSString stringWithFormat: @"%f", [recurrenceId timeIntervalSince1970]]; - oldEvent = [oldEventObject newOccurenceWithID: recurrenceTime]; + oldEvent = (iCalEvent *)[oldEventObject newOccurenceWithID: recurrenceTime]; } // Add the event as a new occurrence, without the organizer. @@ -958,13 +958,13 @@ // Mozilla Lightning. We assume the SENT-BY has // already been added, if required. // -// It is used to updated the status of an attendee. +// It is used to update the status of an attendee. // The originator is the actualy owner of the calendar // where the update took place. The status must then // be propagated to the organizer and the other attendees. // - (void) takeAttendeeStatus: (iCalPerson *) attendee - from: (NSString *) ownerUser + from: (SOGoUser *) ownerUser withRecurrenceId: (NSCalendarDate*) recurrenceId { iCalPerson *localAttendee; diff --git a/SoObjects/Appointments/SOGoAptMailICalReply.m b/SoObjects/Appointments/SOGoAptMailICalReply.m index 45e9d1784..79f7175a5 100644 --- a/SoObjects/Appointments/SOGoAptMailICalReply.m +++ b/SoObjects/Appointments/SOGoAptMailICalReply.m @@ -1,6 +1,6 @@ /* SOGoAptMailICalReply - this file is part of SOGo * - * Copyright (C) 2007 Inverse inc. + * Copyright (C) 2007-2009 Inverse inc. * * Author: Wolfgang Sourdeau * @@ -35,6 +35,7 @@ #import #import +#import "iCalPerson+SOGo.h" #import "SOGoAptMailICalReply.h" @interface SOGoAptMailICalReply (PrivateAPI) diff --git a/SoObjects/Appointments/SOGoAptMailNotification.m b/SoObjects/Appointments/SOGoAptMailNotification.m index 7f1615beb..e111b5555 100644 --- a/SoObjects/Appointments/SOGoAptMailNotification.m +++ b/SoObjects/Appointments/SOGoAptMailNotification.m @@ -1,15 +1,15 @@ /* Copyright (C) 2000-2005 SKYRIX Software AG - Copyright (C) 2006-2008 Inverse inc. + Copyright (C) 2006-2009 Inverse inc. - This file is part of OpenGroupware.org. + This file is part of SOGo. - OGo is free software; you can redistribute it and/or modify it under + SOGo is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - OGo is distributed in the hope that it will be useful, but WITHOUT ANY + SOGo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. @@ -32,6 +32,7 @@ #import +#import "iCalPerson+SOGo.h" #import "SOGoAptMailNotification.h" @interface SOGoAptMailNotification (PrivateAPI) diff --git a/SoObjects/Appointments/SOGoCalendarComponent.h b/SoObjects/Appointments/SOGoCalendarComponent.h index 1292647ff..3acf79ca8 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.h +++ b/SoObjects/Appointments/SOGoCalendarComponent.h @@ -1,6 +1,6 @@ /* SOGoCalendarComponent.h - this file is part of SOGo * - * Copyright (C) 2006-2008 Inverse inc. + * Copyright (C) 2006-2009 Inverse inc. * * Author: Wolfgang Sourdeau * diff --git a/SoObjects/Appointments/SOGoComponentOccurence.m b/SoObjects/Appointments/SOGoComponentOccurence.m index 27ff7cce5..eb93b0331 100644 --- a/SoObjects/Appointments/SOGoComponentOccurence.m +++ b/SoObjects/Appointments/SOGoComponentOccurence.m @@ -140,7 +140,7 @@ - (NSException *) prepareDelete; { - NSMutableArray *occurences; + NSArray *occurences; NSCalendarDate *recurrenceId, *currentId; NSException *error; NSString *newContent; diff --git a/SoObjects/Contacts/SOGoFolder+CardDAV.m b/SoObjects/Contacts/SOGoFolder+CardDAV.m index b40319039..f77898301 100644 --- a/SoObjects/Contacts/SOGoFolder+CardDAV.m +++ b/SoObjects/Contacts/SOGoFolder+CardDAV.m @@ -1,6 +1,6 @@ /* NSObject+CardDAV.m - this file is part of SOGo * - * Copyright (C) 2007 Inverse inc. + * Copyright (C) 2007-2009 Inverse inc. * * Author: Ludovic Marcotte * @@ -52,15 +52,15 @@ for (count = 0; count < max; count++) { currentFilter = [filters objectAtIndex: count]; - contacts = [[self lookupContactsWithFilter: [[currentFilter allValues] lastObject] - sortBy: @"c_givenname" - ordering: NSOrderedDescending] + contacts = [[(id)self lookupContactsWithFilter: [[currentFilter allValues] lastObject] + sortBy: @"c_givenname" + ordering: NSOrderedDescending] objectEnumerator]; while ((contact = [contacts nextObject])) - [self appendObject: contact - withBaseURL: baseURL - toREPORTResponse: response]; + [(id)self appendObject: contact + withBaseURL: baseURL + toREPORTResponse: response]; } } @@ -86,7 +86,7 @@ parentNode = [filterElement parentNode]; - if ([[parentNode tagName] isEqualToString: @"filter"] + if ([[(id)parentNode tagName] isEqualToString: @"filter"] && [self _isValidFilter: [filterElement attribute: @"name"]]) { ranges = [filterElement getElementsByTagName: @"text-match"]; @@ -113,8 +113,8 @@ filters = [NSMutableArray array]; - children = [[parentNode getElementsByTagName: @"prop-filter"] - objectEnumerator]; + children = [(NSArray *)[parentNode getElementsByTagName: @"prop-filter"] + objectEnumerator]; while ((node = [children nextObject])) { filter = [self _parseContactFilter: node]; diff --git a/SoObjects/Contacts/SOGoUserFolder+Contacts.m b/SoObjects/Contacts/SOGoUserFolder+Contacts.m index 51621b08e..87f3bb7e1 100644 --- a/SoObjects/Contacts/SOGoUserFolder+Contacts.m +++ b/SoObjects/Contacts/SOGoUserFolder+Contacts.m @@ -1,6 +1,6 @@ /* SOGoUserFolder+Contacts.m - this file is part of SOGo * - * Copyright (C) 2008 Inverse inc. + * Copyright (C) 2008-2009 Inverse inc. * * Author: Francis Lachapelle * @@ -37,7 +37,7 @@ @interface SOGoUserFolder (private) - (SOGoAppointmentFolders *) privateContacts: (NSString *) key - inContext: (WOContext *) localContext; + inContext: (WOContext *) localContext; @end diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m index 67f52bf9c..b9b713aaf 100644 --- a/SoObjects/Mailer/SOGoDraftObject.m +++ b/SoObjects/Mailer/SOGoDraftObject.m @@ -1,14 +1,15 @@ /* + Copyright (C) 2007-2009 Inverse inc. Copyright (C) 2004-2005 SKYRIX Software AG - This file is part of OpenGroupware.org. + This file is part of SOGo. - OGo is free software; you can redistribute it and/or modify it under + SOGo is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - OGo is distributed in the hope that it will be useful, but WITHOUT ANY + SOGo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. diff --git a/SoObjects/Mailer/SOGoMailBodyPart.m b/SoObjects/Mailer/SOGoMailBodyPart.m index eb91cdea8..c874d41a4 100644 --- a/SoObjects/Mailer/SOGoMailBodyPart.m +++ b/SoObjects/Mailer/SOGoMailBodyPart.m @@ -112,7 +112,7 @@ static BOOL debugOn = NO; id obj; if (pathToPart != nil) - return [pathToPart isNotNull] ? pathToPart : nil; + return ([pathToPart isNotNull] ? (id)pathToPart : nil); p = [[NSMutableArray alloc] initWithCapacity:8]; for (obj = self; [obj isKindOfClass:[SOGoMailBodyPart class]]; @@ -128,7 +128,7 @@ static BOOL debugOn = NO; - (NSString *) bodyPartIdentifier { if (identifier != nil) - return [identifier isNotNull] ? identifier : nil; + return ([identifier isNotNull] ? (id)identifier : nil); identifier = [[[self bodyPartPath] componentsJoinedByString:@"."] copy]; diff --git a/SoObjects/Mailer/SOGoMailObject.h b/SoObjects/Mailer/SOGoMailObject.h index 2c5b6cf34..535d11ca2 100644 --- a/SoObjects/Mailer/SOGoMailObject.h +++ b/SoObjects/Mailer/SOGoMailObject.h @@ -104,6 +104,11 @@ - (NSException *) moveToFolderNamed: (NSString *) folderName inContext: (id)_ctx; +- (void) addRequiredKeysOfStructure: (NSDictionary *) info + path: (NSString *) p + toArray: (NSMutableArray *) keys + acceptedTypes: (NSArray *) types; + @end #endif /* __Mailer_SOGoMailObject_H__ */ diff --git a/SoObjects/Mailer/SOGoMailObject.m b/SoObjects/Mailer/SOGoMailObject.m index 598fc38eb..60d798509 100644 --- a/SoObjects/Mailer/SOGoMailObject.m +++ b/SoObjects/Mailer/SOGoMailObject.m @@ -1,14 +1,15 @@ /* + Copyright (C) 2007-2009 Inverse inc. Copyright (C) 2004-2005 SKYRIX Software AG - This file is part of OpenGroupware.org. + This file is part of SOGo. - OGo is free software; you can redistribute it and/or modify it under + SOGo is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - OGo is distributed in the hope that it will be useful, but WITHOUT ANY + SOGo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. @@ -179,7 +180,7 @@ static BOOL debugSoParts = NO; ma = [NSMutableArray arrayWithCapacity:count - i]; ext = [self keyExtensionForPart:part]; - key = [[NSString alloc] initWithFormat: @"%d%@", i + 1, ext?ext: @""]; + key = [[NSString alloc] initWithFormat: @"%d%@", i + 1, ((id)ext?(id)ext: (id)@"")]; [ma addObject:key]; [key release]; } @@ -552,8 +553,8 @@ static BOOL debugSoParts = NO; for (i = 0; i < count; i++) { sp = (([p length] > 0) - ? [p stringByAppendingFormat: @".%d", i + 1] - : [NSString stringWithFormat: @"%d", i + 1]); + ? (id)[p stringByAppendingFormat: @".%d", i + 1] + : (id)[NSString stringWithFormat: @"%d", i + 1]); childInfo = [parts objectAtIndex: i]; @@ -570,7 +571,7 @@ static BOOL debugSoParts = NO; if ([sp isEqualToString: @"multipart"]) sp = p; else - sp = [p length] > 0 ? [p stringByAppendingString: @".1"] : @"1"; + sp = [p length] > 0 ? (id)[p stringByAppendingString: @".1"] : (id)@"1"; [self addRequiredKeysOfStructure: body path: sp toArray: keys acceptedTypes: types]; diff --git a/SoObjects/Mailer/SOGoMailReply.h b/SoObjects/Mailer/SOGoMailReply.h index 9b06d6767..1c396aee0 100644 --- a/SoObjects/Mailer/SOGoMailReply.h +++ b/SoObjects/Mailer/SOGoMailReply.h @@ -1,6 +1,6 @@ /* SOGoMailReply.h - this file is part of SOGo * - * Copyright (C) 2007 Inverse inc. + * Copyright (C) 2007-2009 Inverse inc. * * Author: Wolfgang Sourdeau * @@ -38,6 +38,9 @@ - (BOOL) outlookMode; - (void) setReplyPlacement: (NSString *) newPlacement; - (BOOL) replyPlacementOnTop; +- (void) setSignaturePlacement: (NSString *) newPlacement; +- (BOOL) signaturePlacementOnTop; +- (NSString *) messageBody; @end diff --git a/SoObjects/Mailer/SOGoMailReply.m b/SoObjects/Mailer/SOGoMailReply.m index 13576d846..c63bc24b9 100644 --- a/SoObjects/Mailer/SOGoMailReply.m +++ b/SoObjects/Mailer/SOGoMailReply.m @@ -1,6 +1,6 @@ /* SOGoMailReply.m - this file is part of SOGo * - * Copyright (C) 2007 Inverse inc. + * Copyright (C) 2007-2009 Inverse inc. * * Author: Wolfgang Sourdeau * diff --git a/SoObjects/SOGo/GNUmakefile b/SoObjects/SOGo/GNUmakefile index a03a9a439..2bcc855d6 100644 --- a/SoObjects/SOGo/GNUmakefile +++ b/SoObjects/SOGo/GNUmakefile @@ -9,12 +9,6 @@ FRAMEWORK_NAME = SOGo SOGo_INSTALL_DIR = $(SOGO_LIBDIR) -TOOL_NAME = \ -# sogo_email2uid \ -# sogo_shares4uid \ -# sogo_emails4uid \ -# sogo_defaults - SOGo_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION) # SOGoCustomGroupFolder.h \ @@ -125,13 +119,6 @@ SOGoNSUserDefaults_OBJC_FILES = \ endif -# tools - -sogo_email2uid_OBJC_FILES += sogo_email2uid.m -sogo_shares4uid_OBJC_FILES += sogo_shares4uid.m -sogo_emails4uid_OBJC_FILES += sogo_emails4uid.m -sogo_defaults_OBJC_FILES += sogo_defaults.m - ADDITIONAL_TOOL_LIBS += -Lobj -lSOGo$(LIBRARY_NAME_SUFFIX) ADDITIONAL_INCLUDE_DIRS += -I../../SOPE/ ADDITIONAL_LIB_DIRS += -L../../SOPE/GDLContentStore/obj/ diff --git a/SoObjects/SOGo/LDAPUserManager.m b/SoObjects/SOGo/LDAPUserManager.m index 1ccf830b8..72f79182f 100644 --- a/SoObjects/SOGo/LDAPUserManager.m +++ b/SoObjects/SOGo/LDAPUserManager.m @@ -19,7 +19,6 @@ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ - #import #import #import @@ -430,7 +429,7 @@ static NSLock *lock = nil; [d setObject: [newUser objectForKey: @"c_uid"] forKey: @"uid"]; - [[NSDistributedNotificationCenter defaultCenter] + [(NSDistributedNotificationCenter *)[NSDistributedNotificationCenter defaultCenter] postNotificationName: @"SOGoUserAttributesHaveLoaded" object: nil userInfo: d diff --git a/SoObjects/SOGo/NSString+Utilities.m b/SoObjects/SOGo/NSString+Utilities.m index f26d0e5aa..66fdbafba 100644 --- a/SoObjects/SOGo/NSString+Utilities.m +++ b/SoObjects/SOGo/NSString+Utilities.m @@ -374,7 +374,7 @@ static NSMutableCharacterSet *urlStartChars = nil; match]; sq = [EOQualifier qualifierWithQualifierFormat: format]; - return [sq evaluateWithObject: self]; + return [(id)sq evaluateWithObject: self]; } #if LIB_FOUNDATION_LIBRARY diff --git a/SoObjects/SOGo/SOGoFolder.m b/SoObjects/SOGo/SOGoFolder.m index 7c4bb6063..ddec5b493 100644 --- a/SoObjects/SOGo/SOGoFolder.m +++ b/SoObjects/SOGo/SOGoFolder.m @@ -88,7 +88,7 @@ - (NSString *) displayName { - return ((displayName) ? displayName : nameInContainer); + return ((id)displayName ? (id)displayName : (id)nameInContainer); } - (void) setIsSubscription: (BOOL) newIsSubscription diff --git a/SoObjects/SOGo/SOGoUser.m b/SoObjects/SOGo/SOGoUser.m index abcd0499b..2461f0c48 100644 --- a/SoObjects/SOGo/SOGoUser.m +++ b/SoObjects/SOGo/SOGoUser.m @@ -47,6 +47,8 @@ #import "SOGoUserDefaults.h" #import "SOGoUserFolder.h" +#import "../../Main/SOGo.h" + #import "SOGoUser.h" static NSTimeZone *serverTimeZone = nil; @@ -490,7 +492,7 @@ _timeValue (NSString *key) [[SOGoCache sharedCache] setDefaults: defaults forLogin: login key: @"defaults"]; - [[NSDistributedNotificationCenter defaultCenter] + [(NSDistributedNotificationCenter *)[NSDistributedNotificationCenter defaultCenter] postNotificationName: @"SOGoUserDefaultsHaveLoaded" object: nil userInfo: d @@ -535,7 +537,7 @@ _timeValue (NSString *key) [[SOGoCache sharedCache] setDefaults: settings forLogin: login key: @"settings"]; - [[NSDistributedNotificationCenter defaultCenter] + [(NSDistributedNotificationCenter *)[NSDistributedNotificationCenter defaultCenter] postNotificationName: @"SOGoUserSettingsHaveLoaded" object: nil userInfo: d diff --git a/SoObjects/SOGo/SOGoUserDefaults.h b/SoObjects/SOGo/SOGoUserDefaults.h index 92e5c3f8b..dd7e520d2 100644 --- a/SoObjects/SOGo/SOGoUserDefaults.h +++ b/SoObjects/SOGo/SOGoUserDefaults.h @@ -83,6 +83,8 @@ - (NSString *) jsonRepresentation; +- (BOOL) fetchProfile; + /* saving changes */ - (BOOL) synchronize; diff --git a/SoObjects/SOGo/SOGoUserDefaults.m b/SoObjects/SOGo/SOGoUserDefaults.m index d7f916d2d..7bed3eac3 100644 --- a/SoObjects/SOGo/SOGoUserDefaults.m +++ b/SoObjects/SOGo/SOGoUserDefaults.m @@ -304,7 +304,7 @@ static NSString *uidColumnName = @"c_uid"; forLogin: uid key: ([fieldName isEqualToString: @"c_defaults"] ? @"defaults" : @"settings")]; - [[NSDistributedNotificationCenter defaultCenter] + [(NSDistributedNotificationCenter *)[NSDistributedNotificationCenter defaultCenter] postNotificationName: ([fieldName isEqualToString: @"c_defaults"] ? @"SOGoUserDefaultsHaveChanged" : @"SOGoUserSettingsHaveChanged") diff --git a/SoObjects/SOGo/SOGoUserFolder.m b/SoObjects/SOGo/SOGoUserFolder.m index 115d18baa..2f9505dfc 100644 --- a/SoObjects/SOGo/SOGoUserFolder.m +++ b/SoObjects/SOGo/SOGoUserFolder.m @@ -125,11 +125,11 @@ static NSString *LDAPContactInfoAttribute = nil; filter = [NSMutableDictionary dictionaryWithCapacity: 2]; children = [parentNode getElementsByTagName: @"prop-match"]; - max = [children count]; + max = [(NSArray *)children count]; for (count = 0; count < max; count++) { node = [children objectAtIndex: count]; - componentName = [[node attribute: @"name"] lowercaseString]; + componentName = [[(id)node attribute: @"name"] lowercaseString]; [filter setObject: [node textValue] forKey: componentName]; } diff --git a/SoObjects/SOGo/sogo_defaults.m b/SoObjects/SOGo/sogo_defaults.m deleted file mode 100644 index 58550fd46..000000000 --- a/SoObjects/SOGo/sogo_defaults.m +++ /dev/null @@ -1,134 +0,0 @@ -/* - Copyright (C) 2005 SKYRIX Software AG - - This file is part of OpenGroupware.org. - - OGo is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - OGo is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with OGo; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. -*/ - -#include "LDAPUserManager.h" -#include "common.h" - -static void usage(NSArray *args) { - fprintf(stderr, "usage: %s read|write|info [] []\n", - [[args objectAtIndex:0] cString]); -} - -static void doInfo(NSUserDefaults *defaults) { - printf("defaults for: '%s'\n", [[defaults valueForKey:@"uid"] cString]); - printf(" profile table: '%s'\n", - [[[defaults valueForKey:@"tableURL"] absoluteString] cString]); -} - -static void doRead(NSUserDefaults *defaults, NSString *key) { - id value; - - if (key == nil) { - NSArray *defNames; - unsigned i, count; - - defNames = [defaults valueForKey:@"primaryDefaultNames"]; - if ((count = [defNames count]) == 0) { - fprintf(stderr, "There are no keys in the SOGo profile!\n"); - return; - } - - for (i = 0; i < count; i++) { - printf("%s: %s\n", - [[defNames objectAtIndex:i] cString], - [[[defaults objectForKey:[defNames objectAtIndex:i]] - description] cString]); - } - } - else if ((value = [defaults objectForKey:key]) == nil) { - fprintf(stderr, "There is no key '%s' in the SOGo profile!\n", - [key cString]); - } - else - printf("%s\n", [[value description] cString]); -} - -static void doWrite(NSUserDefaults *defaults, NSString *key, NSString *value) { - [defaults setObject:value forKey:key]; - - if (![defaults synchronize]) { - fprintf(stderr, "Failed to synchronize defaults with profile!\n"); - return; - } -} - -static void doIt(NSArray *args) { - LDAPUserManager *userManager; - NSUserDefaults *defaults; - NSString *uid, *op, *key, *value; - - /* extract arguments */ - - if ([args count] < 3) { - usage(args); - return; - } - - uid = [args objectAtIndex:1]; - op = [args objectAtIndex:2]; - key = nil; - value = nil; - - if ([args count] > 3) - key = [args objectAtIndex:3]; - - if ([op isEqualToString:@"write"]) { - if ([args count] < 5) { - usage(args); - return; - } - value = [args objectAtIndex:4]; - } - - /* run */ - - userManager = [LDAPUserManager sharedUserManager]; - defaults = [userManager getUserDefaultsForUID:uid]; - - if (![defaults isNotNull]) { - fprintf(stderr, "Error: found no userdefaults for UID: '%s'\n", - [uid cString]); - exit(1); - } - - if ([op isEqualToString:@"read"]) - doRead(defaults, key); - else if ([op isEqualToString:@"write"]) - doWrite(defaults, key, value); - else if ([op isEqualToString:@"info"]) - doInfo(defaults); - else - usage(args); -} - -int main(int argc, char **argv, char **env) { - NSAutoreleasePool *pool; - - pool = [[NSAutoreleasePool alloc] init]; -#if LIB_FOUNDATION_LIBRARY - [NSProcessInfo initializeWithArguments:argv count:argc environment:env]; -#endif - - doIt([[NSProcessInfo processInfo] argumentsWithoutDefaults]); - - [pool release]; - return 0; -} diff --git a/SoObjects/SOGo/sogo_email2uid.m b/SoObjects/SOGo/sogo_email2uid.m deleted file mode 100644 index 7ba6bde66..000000000 --- a/SoObjects/SOGo/sogo_email2uid.m +++ /dev/null @@ -1,71 +0,0 @@ -/* - Copyright (C) 2005 SKYRIX Software AG - - This file is part of OpenGroupware.org. - - OGo is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - OGo is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with OGo; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. -*/ - -#include "LDAPUserManager.h" -#include "common.h" - -static void usage(NSArray *args) { - fprintf(stderr, "usage: %s \n", - [[args objectAtIndex:0] cString]); -} - -static void doIt(NSArray *args) { - LDAPUserManager *userManager; - NSEnumerator *e; - NSString *email; - - if ([args count] < 2) { - usage(args); - return; - } - - userManager = [LDAPUserManager sharedUserManager]; - - e = [args objectEnumerator]; - [e nextObject]; /* consume the command name */ - - while ((email = [e nextObject]) != nil) { - NSString *uid; - - uid = [userManager getUIDForEmail:email]; - - if ([uid isNotNull]) - printf("%s: %s\n", [email cString], [uid cString]); - else { - fprintf(stderr, "ERROR: did not find uid for email: '%s'\n", - [email cString]); - } - } -} - -int main(int argc, char **argv, char **env) { - NSAutoreleasePool *pool; - - pool = [[NSAutoreleasePool alloc] init]; -#if LIB_FOUNDATION_LIBRARY - [NSProcessInfo initializeWithArguments:argv count:argc environment:env]; -#endif - - doIt([[NSProcessInfo processInfo] argumentsWithoutDefaults]); - - [pool release]; - return 0; -} diff --git a/SoObjects/SOGo/sogo_emails4uid.m b/SoObjects/SOGo/sogo_emails4uid.m deleted file mode 100644 index 9d91fd20e..000000000 --- a/SoObjects/SOGo/sogo_emails4uid.m +++ /dev/null @@ -1,85 +0,0 @@ -/* - Copyright (C) 2005 SKYRIX Software AG - - This file is part of OpenGroupware.org. - - OGo is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - OGo is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with OGo; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. -*/ - -#include "LDAPUserManager.h" -#include "common.h" - -static void usage(NSArray *args) { - fprintf(stderr, "usage: %s \n", - [[args objectAtIndex:0] cString]); -} - -static void handleUID(NSString *uid, LDAPUserManager *userManager) { - NSArray *emails; - NSString *primary; - unsigned i, count; - - primary = [userManager getEmailForUID:uid]; - emails = [userManager getSharedMailboxEMailsForUID:uid]; - - printf("%s:", [uid cString]); - - if ([primary length] > 0) - printf(" %s\n", [primary cString]); - else - printf(" \n"); - - if ((count = [emails count]) == 0) { - printf(" \n"); - return; - } - - for (i = 0; i < count; i++) - printf(" %s\n", [[emails objectAtIndex:i] cString]); -} - -static void doIt(NSArray *args) { - LDAPUserManager *userManager; - NSEnumerator *e; - NSString *uid; - - if ([args count] < 2) { - usage(args); - return; - } - - userManager = [LDAPUserManager sharedUserManager]; - - e = [args objectEnumerator]; - [e nextObject]; /* consume the command name */ - - while ((uid = [e nextObject]) != nil) - handleUID(uid, userManager); -} - -int main(int argc, char **argv, char **env) { - NSAutoreleasePool *pool; - - pool = [[NSAutoreleasePool alloc] init]; -#if LIB_FOUNDATION_LIBRARY - [NSProcessInfo initializeWithArguments:argv count:argc environment:env]; -#endif - - doIt([[NSProcessInfo processInfo] argumentsWithoutDefaults]); - - [pool release]; - return 0; -} diff --git a/SoObjects/SOGo/sogo_shares4uid.m b/SoObjects/SOGo/sogo_shares4uid.m deleted file mode 100644 index ceb9c747f..000000000 --- a/SoObjects/SOGo/sogo_shares4uid.m +++ /dev/null @@ -1,79 +0,0 @@ -/* - Copyright (C) 2005 SKYRIX Software AG - - This file is part of OpenGroupware.org. - - OGo is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - OGo is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with OGo; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. -*/ - -#include "LDAPUserManager.h" -#include "common.h" - -static void usage(NSArray *args) { - fprintf(stderr, "usage: %s \n", - [[args objectAtIndex:0] cString]); -} - -static void handleUID(NSString *uid, LDAPUserManager *userManager) { - NSArray *shares; - unsigned i, count; - - shares = [userManager getSharedMailboxAccountStringsForUID:uid]; - - printf("%s:", [uid cString]); - - if ((count = [shares count]) == 0) { - printf(" \n"); - return; - } - - puts(""); - for (i = 0; i < count; i++) - printf(" %s\n", [[shares objectAtIndex:i] cString]); -} - -static void doIt(NSArray *args) { - LDAPUserManager *userManager; - NSEnumerator *e; - NSString *uid; - - if ([args count] < 2) { - usage(args); - return; - } - - userManager = [LDAPUserManager sharedUserManager]; - - e = [args objectEnumerator]; - [e nextObject]; /* consume the command name */ - - while ((uid = [e nextObject]) != nil) - handleUID(uid, userManager); -} - -int main(int argc, char **argv, char **env) { - NSAutoreleasePool *pool; - - pool = [[NSAutoreleasePool alloc] init]; -#if LIB_FOUNDATION_LIBRARY - [NSProcessInfo initializeWithArguments:argv count:argc environment:env]; -#endif - - doIt([[NSProcessInfo processInfo] argumentsWithoutDefaults]); - - [pool release]; - return 0; -} diff --git a/UI/Common/UIxPageFrame.m b/UI/Common/UIxPageFrame.m index 2175f07f7..aa4b8508c 100644 --- a/UI/Common/UIxPageFrame.m +++ b/UI/Common/UIxPageFrame.m @@ -26,6 +26,7 @@ #import #import +#import #import #import
@@ -416,10 +417,10 @@ static NSString *siteFavicon = nil; - (NSString *) userSettings { - NSUserDefaults *userSettings; + SOGoUserDefaults *userSettings; NSString *jsonResult; - userSettings = [[context activeUser] userSettings]; + userSettings = (SOGoUserDefaults *)[[context activeUser] userSettings]; if (userSettings) jsonResult = [userSettings jsonRepresentation]; else @@ -430,10 +431,10 @@ static NSString *siteFavicon = nil; - (NSString *) userDefaults { - NSUserDefaults *userDefaults; + SOGoUserDefaults *userDefaults; NSString *jsonResult; - userDefaults = [[context activeUser] userDefaults]; + userDefaults = (SOGoUserDefaults *)[[context activeUser] userDefaults]; if (userDefaults) jsonResult = [userDefaults jsonRepresentation]; else diff --git a/UI/Common/UIxToolbar.m b/UI/Common/UIxToolbar.m index 1959aaac6..941600a3e 100644 --- a/UI/Common/UIxToolbar.m +++ b/UI/Common/UIxToolbar.m @@ -1,14 +1,15 @@ /* + Copyright (C) 2007-2009 Inverse inc. Copyright (C) 2004-2005 SKYRIX Software AG - This file is part of OpenGroupware.org. + This file is part of SOGo. - OGo is free software; you can redistribute it and/or modify it under + SOGo is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - OGo is distributed in the hope that it will be useful, but WITHOUT ANY + SOGo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. @@ -146,14 +147,14 @@ } if ((tb = [pathToConfig objectForKey:path]) != nil) - return [tb isNotNull] ? tb : nil; + return [tb isNotNull] ? (id)tb : nil; if ((tb = [NSArray arrayWithContentsOfFile:path]) == nil) [self errorWithFormat:@"Could not load toolbar resource: %@", _name]; if (pathToConfig == nil) pathToConfig = [[NSMutableDictionary alloc] initWithCapacity:32]; - [pathToConfig setObject:(tb ? tb : (id)[NSNull null]) forKey:path]; + [pathToConfig setObject:(tb ? (id)tb : (id)[NSNull null]) forKey:path]; return tb; } @@ -163,7 +164,7 @@ id tb; if (toolbarConfig != nil) - return [toolbarConfig isNotNull] ? toolbarConfig : nil; + return [toolbarConfig isNotNull] ? (id)toolbarConfig : nil; if (toolbar) tb = toolbar; diff --git a/UI/Contacts/UIxContactEditor.m b/UI/Contacts/UIxContactEditor.m index e7a56e1a6..e03b307d1 100644 --- a/UI/Contacts/UIxContactEditor.m +++ b/UI/Contacts/UIxContactEditor.m @@ -626,7 +626,7 @@ if (![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles onObject: componentAddressBook inContext: context]) - ex = [contact moveToFolder: componentAddressBook]; // TODO: handle exception + ex = [contact moveToFolder: (SOGoGCSFolder *)componentAddressBook]; // TODO: handle exception } } diff --git a/UI/Contacts/UIxContactsListViewContainer.m b/UI/Contacts/UIxContactsListViewContainer.m index f60e081cc..0beb302a8 100644 --- a/UI/Contacts/UIxContactsListViewContainer.m +++ b/UI/Contacts/UIxContactsListViewContainer.m @@ -1,6 +1,6 @@ /* UIxContactsListViewContainer.m - this file is part of SOGo * - * Copyright (C) 2006 Inverse inc. + * Copyright (C) 2006-2009 Inverse inc. * * Author: Wolfgang Sourdeau * @@ -147,7 +147,7 @@ [self _setupContext]; vertical = [moduleSettings objectForKey: @"DragHandleVertical"]; - return ((vertical && [vertical intValue] > 0) ? [vertical stringByAppendingFormat: @"px"] : nil); + return ((vertical && [vertical intValue] > 0) ? (id)[vertical stringByAppendingFormat: @"px"] : nil); } - (NSString *) horizontalDragHandleStyle @@ -157,7 +157,7 @@ [self _setupContext]; horizontal = [moduleSettings objectForKey: @"DragHandleHorizontal"]; - return ((horizontal && [horizontal intValue] > 0) ? [horizontal stringByAppendingFormat: @"px"] : nil); + return ((horizontal && [horizontal intValue] > 0) ? (id)[horizontal stringByAppendingFormat: @"px"] : nil); } - (NSString *) contactsListContentStyle @@ -167,7 +167,7 @@ [self _setupContext]; height = [moduleSettings objectForKey: @"DragHandleVertical"]; - return ((height && [height intValue] > 0) ? [NSString stringWithFormat: @"%ipx", ([height intValue] - 27)] : nil); + return ((height && [height intValue] > 0) ? (id)[NSString stringWithFormat: @"%ipx", ([height intValue] - 27)] : nil); } @end diff --git a/UI/MailPartViewers/UIxMailPartAlternativeViewer.m b/UI/MailPartViewers/UIxMailPartAlternativeViewer.m index b2819eca2..9174a205c 100644 --- a/UI/MailPartViewers/UIxMailPartAlternativeViewer.m +++ b/UI/MailPartViewers/UIxMailPartAlternativeViewer.m @@ -1,14 +1,15 @@ /* + Copyright (C) 2007-2009 Inverse inc. Copyright (C) 2004 SKYRIX Software AG - This file is part of OpenGroupware.org. + This file is part of SOGo. - OGo is free software; you can redistribute it and/or modify it under + SOGo is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - OGo is distributed in the hope that it will be useful, but WITHOUT ANY + SOGo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. @@ -83,7 +84,7 @@ st = [[[childParts objectAtIndex:i] valueForKey:@"subtype"] lowercaseString]; mt = [[mt stringByAppendingString:@"/"] stringByAppendingString:st]; - [types addObject:mt ? mt : (id)[NSNull null]]; + [types addObject:mt ? (id)mt : (id)[NSNull null]]; } return types; } @@ -186,8 +187,8 @@ pp = [self partPath]; return [pp count] > 0 - ? [pp arrayByAddingObject:[self childPartName]] - : [NSArray arrayWithObject:[self childPartName]]; + ? (id)[pp arrayByAddingObject:[self childPartName]] + : (id)[NSArray arrayWithObject:[self childPartName]]; } /* nested viewers */ diff --git a/UI/MailPartViewers/UIxMailPartHTMLViewer.m b/UI/MailPartViewers/UIxMailPartHTMLViewer.m index 4942a9dca..79ac48ea6 100644 --- a/UI/MailPartViewers/UIxMailPartHTMLViewer.m +++ b/UI/MailPartViewers/UIxMailPartHTMLViewer.m @@ -1,6 +1,6 @@ /* UIxMailPartHTMLViewer.m - this file is part of SOGo * - * Copyright (C) 2007, 2008 Inverse inc. + * Copyright (C) 2007-2009 Inverse inc. * * Author: Wolfgang Sourdeau * @@ -142,7 +142,7 @@ _xmlCharsetForCharset (NSString *charset) return hasExternalImages; } -- (BOOL) setUnsafe: (BOOL) b +- (void) setUnsafe: (BOOL) b { unsafe = b; } diff --git a/UI/MailPartViewers/UIxMailPartICalActions.m b/UI/MailPartViewers/UIxMailPartICalActions.m index a58978018..984384a26 100644 --- a/UI/MailPartViewers/UIxMailPartICalActions.m +++ b/UI/MailPartViewers/UIxMailPartICalActions.m @@ -166,7 +166,7 @@ recurrenceTime = [NSString stringWithFormat: @"%f", [[emailEvent recurrenceId] timeIntervalSince1970]]; - calendarEvent = [*eventObject lookupOccurence: recurrenceTime]; + calendarEvent = (iCalEvent *)[*eventObject lookupOccurence: recurrenceTime]; } else calendarEvent = (iCalEvent *) [*eventObject component: NO @@ -223,7 +223,7 @@ { // We must update main event and all its occurences (if any). calendar = [eventObject calendar: NO secure: NO]; - event = [calendar firstChildWithTag: [eventObject componentTag]]; + event = (iCalEvent *)[calendar firstChildWithTag: [eventObject componentTag]]; events = [calendar allObjects]; } else @@ -231,11 +231,11 @@ // If recurrenceId is defined, find the specified occurence // within the repeating vEvent. recurrenceTime = [NSString stringWithFormat: @"%f", [recurrenceId timeIntervalSince1970]]; - event = [eventObject lookupOccurence: recurrenceTime]; + event = (iCalEvent *)[eventObject lookupOccurence: recurrenceTime]; if (event == nil) // If no occurence found, create one - event = [eventObject newOccurenceWithID: recurrenceTime]; + event = (iCalEvent *)[eventObject newOccurenceWithID: recurrenceTime]; events = [NSArray arrayWithObject: event]; } diff --git a/UI/MailPartViewers/UIxMailPartICalViewer.m b/UI/MailPartViewers/UIxMailPartICalViewer.m index 69916a243..9ac3fc026 100644 --- a/UI/MailPartViewers/UIxMailPartICalViewer.m +++ b/UI/MailPartViewers/UIxMailPartICalViewer.m @@ -329,7 +329,7 @@ organizer = [storedEvent organizer]; if (organizer == nil || [organizer isVoid]) { - organizer = [[[storedEvent parent] firstChildWithTag: [storedEventObject componentTag]] organizer]; + organizer = [(iCalEntityObject *)[[storedEvent parent] firstChildWithTag: [storedEventObject componentTag]] organizer]; [storedEvent setOrganizer: organizer]; } } diff --git a/UI/MailPartViewers/UIxMailPartMessageViewer.m b/UI/MailPartViewers/UIxMailPartMessageViewer.m index c30f19908..f80da7e78 100644 --- a/UI/MailPartViewers/UIxMailPartMessageViewer.m +++ b/UI/MailPartViewers/UIxMailPartMessageViewer.m @@ -1,14 +1,15 @@ /* + Copyright (C) 2007-2009 Inverse inc. Copyright (C) 2004-2005 SKYRIX Software AG - This file is part of OpenGroupware.org. + This file is part of SOGo. - OGo is free software; you can redistribute it and/or modify it under + SOGo is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - OGo is distributed in the hope that it will be useful, but WITHOUT ANY + SOGo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. @@ -108,8 +109,8 @@ pp = [self partPath]; return (([pp count] > 0) - ? [pp arrayByAddingObject: @"1"] - : [NSArray arrayWithObject: @"1"]); + ? (id)[pp arrayByAddingObject: @"1"] + : (id)[NSArray arrayWithObject: @"1"]); } - (id) contentViewerComponent diff --git a/UI/MailPartViewers/UIxMailPartMixedViewer.m b/UI/MailPartViewers/UIxMailPartMixedViewer.m index 457c5d2be..08b20c64f 100644 --- a/UI/MailPartViewers/UIxMailPartMixedViewer.m +++ b/UI/MailPartViewers/UIxMailPartMixedViewer.m @@ -1,14 +1,15 @@ /* + Copyright (C) 2007-2009 Inverse inc. Copyright (C) 2004-2005 SKYRIX Software AG - This file is part of OpenGroupware.org. + This file is part of SOGo. - OGo is free software; you can redistribute it and/or modify it under + SOGo is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - OGo is distributed in the hope that it will be useful, but WITHOUT ANY + SOGo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. @@ -74,8 +75,8 @@ pp = [self partPath]; return [pp count] > 0 - ? [pp arrayByAddingObject:[self childPartName]] - : [NSArray arrayWithObject:[self childPartName]]; + ? (id)[pp arrayByAddingObject:[self childPartName]] + : (id)[NSArray arrayWithObject:[self childPartName]]; } /* nested viewers */ diff --git a/UI/MailPartViewers/UIxMailPartViewer.m b/UI/MailPartViewers/UIxMailPartViewer.m index a7a8953fc..ee388b018 100644 --- a/UI/MailPartViewers/UIxMailPartViewer.m +++ b/UI/MailPartViewers/UIxMailPartViewer.m @@ -1,14 +1,15 @@ /* + Copyright (C) 2007-2009 Inverse inc. Copyright (C) 2004-2005 SKYRIX Software AG - This file is part of OpenGroupware.org. + This file is part of SOGo. - OGo is free software; you can redistribute it and/or modify it under + SOGo is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - OGo is distributed in the hope that it will be useful, but WITHOUT ANY + SOGo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. @@ -105,7 +106,7 @@ - (NSData *) flatContent { if (flatContent != nil) - return [flatContent isNotNull] ? flatContent : nil; + return [flatContent isNotNull] ? (id)flatContent : nil; flatContent = [[[context mailRenderingContext] flatContentForPartPath: @@ -284,8 +285,8 @@ s = [partPath componentsJoinedByString:@"-"]; return ([s length] > 0) - ? [@"untitled-" stringByAppendingString:s] - : @"untitled"; + ? (id)[@"untitled-" stringByAppendingString:s] + : (id)@"untitled"; } - (NSFormatter *) sizeFormatter diff --git a/UI/MailPartViewers/UIxMailRenderingContext.m b/UI/MailPartViewers/UIxMailRenderingContext.m index b52596d46..c527efc57 100644 --- a/UI/MailPartViewers/UIxMailRenderingContext.m +++ b/UI/MailPartViewers/UIxMailRenderingContext.m @@ -1,14 +1,15 @@ /* + Copyright (C) 2007-2009 Inverse inc. Copyright (C) 2004-2005 SKYRIX Software AG - This file is part of OpenGroupware.org. + This file is part of SOGo. - OGo is free software; you can redistribute it and/or modify it under + SOGo is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - OGo is distributed in the hope that it will be useful, but WITHOUT ANY + SOGo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. @@ -110,7 +111,7 @@ static BOOL showNamedTextAttachmentsInline = NO; NSString *pid; NSData *content; - pid = _partPath ? [_partPath componentsJoinedByString: @"."] : @""; + pid = _partPath ? (id)[_partPath componentsJoinedByString: @"."] : (id)@""; content = [[self flatContents] objectForKey: pid]; if (!content && ![pid intValue]) content = [flatContents objectForKey: @""]; diff --git a/UI/MailerUI/UIxMailEditor.m b/UI/MailerUI/UIxMailEditor.m index dd7ae83ae..1b55cc3de 100644 --- a/UI/MailerUI/UIxMailEditor.m +++ b/UI/MailerUI/UIxMailEditor.m @@ -1,16 +1,15 @@ /* Copyright (C) 2004-2005 SKYRIX Software AG + Copyright (C) 2008-2009 Inverse inc. - Copyright (C) 2008 Inverse inc. + This file is part of SOGo. - This file is part of OpenGroupware.org. - - OGo is free software; you can redistribute it and/or modify it under + SOGo is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - OGo is distributed in the hope that it will be useful, but WITHOUT ANY + SOGo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. @@ -52,7 +51,7 @@ /* UIxMailEditor - An mail editor component which works on SOGoDraftObject's. + A mail editor component which works on SOGoDraftObject's. */ @interface UIxMailEditor : UIxComponent diff --git a/UI/MailerUI/UIxMailMainFrame.m b/UI/MailerUI/UIxMailMainFrame.m index 43c39e447..86710fbde 100644 --- a/UI/MailerUI/UIxMailMainFrame.m +++ b/UI/MailerUI/UIxMailMainFrame.m @@ -1,14 +1,15 @@ /* + Copyright (C) 2007-2009 Inverse inc. Copyright (C) 2004-2005 SKYRIX Software AG - This file is part of OpenGroupware.org. + This file is part of SOGo. - OGo is free software; you can redistribute it and/or modify it under + SOGo is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - OGo is distributed in the hope that it will be useful, but WITHOUT ANY + SOGo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. @@ -44,6 +45,15 @@ #import "UIxMailMainFrame.h" +// Avoid compilation warnings +@interface SOGoUserFolder (private) + +- (SOGoAppointmentFolders *) privateContacts: (NSString *) key + inContext: (WOContext *) localContext; + +@end + + @implementation UIxMailMainFrame - (void) _setupContext @@ -171,8 +181,8 @@ { // Retrieve the email addresses from the specified address book // and contact IDs - folders = [[[self clientObject] container] privateContacts: @"Contacts" - inContext: nil]; + folders = (SOGoContactFolders *)[[[self clientObject] container] privateContacts: @"Contacts" + inContext: nil]; folder = [folders lookupName: folderId inContext: nil acquire: NO]; @@ -266,7 +276,7 @@ [self _setupContext]; vertical = [moduleSettings objectForKey: @"DragHandleVertical"]; - return ((vertical && [vertical intValue] > 0) ? [vertical stringByAppendingFormat: @"px"] : nil); + return ((vertical && [vertical intValue] > 0) ? (id)[vertical stringByAppendingFormat: @"px"] : nil); } - (NSString *) horizontalDragHandleStyle @@ -276,7 +286,7 @@ [self _setupContext]; horizontal = [moduleSettings objectForKey: @"DragHandleHorizontal"]; - return ((horizontal && [horizontal intValue] > 0) ? [horizontal stringByAppendingFormat: @"px"] : nil); + return ((horizontal && [horizontal intValue] > 0) ? (id)[horizontal stringByAppendingFormat: @"px"] : nil); } - (NSString *) mailboxContentStyle @@ -286,7 +296,7 @@ [self _setupContext]; height = [moduleSettings objectForKey: @"DragHandleVertical"]; - return ((height && [height intValue] > 0) ? [NSString stringWithFormat: @"%ipx", ([height intValue] - 27)] : nil); + return ((height && [height intValue] > 0) ? (id)[NSString stringWithFormat: @"%ipx", ([height intValue] - 27)] : nil); } - (WOResponse *) saveDragHandleStateAction diff --git a/UI/MailerUI/UIxMailMoveToPopUp.m b/UI/MailerUI/UIxMailMoveToPopUp.m index 3a19ee86e..4dbe418de 100644 --- a/UI/MailerUI/UIxMailMoveToPopUp.m +++ b/UI/MailerUI/UIxMailMoveToPopUp.m @@ -1,14 +1,15 @@ /* + Copyright (C) 2007-2009 Inverse inc. Copyright (C) 2000-2005 SKYRIX Software AG - This file is part of OpenGroupware.org. + This file is part of SOGo. - OGo is free software; you can redistribute it and/or modify it under + SOGo is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - OGo is distributed in the hope that it will be useful, but WITHOUT ANY + SOGo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. @@ -106,8 +107,8 @@ e = [[NSMutableDictionary alloc] initWithCapacity:2]; _pathPrefix = (_pathPrefix == nil) - ? title - : [NSString stringWithFormat:@"%@.%@", _pathPrefix, title]; + ? (id)title + : (id)[NSString stringWithFormat:@"%@.%@", _pathPrefix, title]; [e setObject:_pathPrefix forKey:@"title"]; [e setObject:link forKey:@"link"]; [_list addObject:e]; diff --git a/UI/PreferencesUI/UIxPreferences.m b/UI/PreferencesUI/UIxPreferences.m index d7aadb460..2be3d112f 100644 --- a/UI/PreferencesUI/UIxPreferences.m +++ b/UI/PreferencesUI/UIxPreferences.m @@ -1,6 +1,6 @@ /* UIxPreferences.m - this file is part of SOGo * - * Copyright (C) 2007 Inverse inc. + * Copyright (C) 2007-2009 Inverse inc. * * Author: Wolfgang Sourdeau * @@ -31,6 +31,7 @@ #import #import #import +#import "../../Main/SOGo.h" #import "UIxPreferences.h" diff --git a/UI/SOGoUI/SOGoACLAdvisory.m b/UI/SOGoUI/SOGoACLAdvisory.m index 5d41104cb..3637ca137 100644 --- a/UI/SOGoUI/SOGoACLAdvisory.m +++ b/UI/SOGoUI/SOGoACLAdvisory.m @@ -1,6 +1,6 @@ /* SOGoACLAdvisory.m - this file is part of SOGo * - * Copyright (C) 2007 Inverse inc. + * Copyright (C) 2007-2009 Inverse inc. * * Author: Wolfgang Sourdeau * diff --git a/UI/Scheduler/UIxCalDayTable.m b/UI/Scheduler/UIxCalDayTable.m index 097182540..b1ff678d0 100644 --- a/UI/Scheduler/UIxCalDayTable.m +++ b/UI/Scheduler/UIxCalDayTable.m @@ -34,6 +34,8 @@ #import #import +#import "../../Main/SOGo.h" + #import "UIxCalDayTable.h" @class SOGoAppointment; diff --git a/UI/Scheduler/UIxCalMainView.m b/UI/Scheduler/UIxCalMainView.m index f1c56ee87..b3fb8aee1 100644 --- a/UI/Scheduler/UIxCalMainView.m +++ b/UI/Scheduler/UIxCalMainView.m @@ -1,6 +1,6 @@ /* UIxCalMainView.m - this file is part of SOGo * - * Copyright (C) 2006 Inverse inc. + * Copyright (C) 2006-2009 Inverse inc. * * Author: Wolfgang Sourdeau * @@ -22,6 +22,7 @@ #import #import +#import #import #import #import @@ -126,7 +127,7 @@ [self _setupContext]; vertical = [moduleSettings objectForKey: @"DragHandleVertical"]; - return ((vertical && [vertical intValue] > 0) ? [vertical stringByAppendingFormat: @"px"] : nil); + return ((vertical && [vertical intValue] > 0) ? (id)[vertical stringByAppendingFormat: @"px"] : nil); } - (NSString *) horizontalDragHandleStyle @@ -136,7 +137,7 @@ [self _setupContext]; horizontal = [moduleSettings objectForKey: @"DragHandleHorizontal"]; - return ((horizontal && [horizontal intValue] > 0) ? [horizontal stringByAppendingFormat: @"px"] : nil); + return ((horizontal && [horizontal intValue] > 0) ? (id)[horizontal stringByAppendingFormat: @"px"] : nil); } - (NSString *) eventsListViewStyle diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index 8ffe9460a..09dc7eedb 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -56,6 +56,8 @@ #import #import +#import "../../Main/SOGo.h" + #import "UIxComponentEditor.h" #import "UIxDatePicker.h"