Fixed most build warnings

pull/4/merge
Wolfgang Sourdeau 2012-10-22 10:09:13 -04:00
parent dac021799a
commit 6d8c328910
56 changed files with 238 additions and 210 deletions

View File

@ -33,6 +33,7 @@
#import <GDLContentStore/GCSChannelManager.h>
#import <GDLContentStore/GCSFolderManager.h>
#import <GDLContentStore/GCSAlarmsFolder.h>
#import <GDLContentStore/GCSSessionsFolder.h>
#import <NGObjWeb/SoClassSecurityInfo.h>
#import <NGObjWeb/WOContext.h>

View File

@ -1481,7 +1481,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
[filter setObject: textMatch forKey: propName];
}
- (NSDictionary *) _parseCalendarFilter: (DOMElement *) filterElement
- (NSDictionary *) _parseCalendarFilter: (id <DOMElement>) filterElement
{
NSMutableDictionary *filterData;
id <DOMElement> parentNode;
@ -1536,10 +1536,10 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
return rc;
}
- (NSArray *) _parseCalendarFilters: (DOMElement *) parentNode
- (NSArray *) _parseCalendarFilters: (id <DOMElement>) parentNode
{
id <DOMNodeList> children;
DOMElement *element;
id <DOMElement>element;
NSMutableArray *filters;
NSDictionary *filter;
unsigned int count, max;
@ -1794,7 +1794,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
{
WOResponse *r;
id <DOMDocument> document;
DOMElement *documentElement, *propElement;
id <DOMElement> documentElement, propElement;
r = [context response];
[r prepareDAVResponse];
@ -1802,9 +1802,9 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
@" xmlns:C=\"urn:ietf:params:xml:ns:caldav\">"];
document = [[context request] contentAsDOMDocument];
documentElement = (DOMElement *) [document documentElement];
propElement = [documentElement firstElementWithTag: @"prop"
inNamespace: XMLNS_WEBDAV];
documentElement = (id <DOMElement>) [document documentElement];
propElement = [(NGDOMNodeWithChildren *) documentElement
firstElementWithTag: @"prop" inNamespace: XMLNS_WEBDAV];
[self _appendComponentProperties: [self parseDAVRequestedProperties: propElement]
matchingFilters: [self _parseCalendarFilters: documentElement]

View File

@ -44,6 +44,7 @@
#import <SOGo/SOGoParentFolder.h>
#import <SOGo/SOGoPermissions.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserDefaults.h>
#import <SOGo/SOGoUserSettings.h>
#import <SOGo/SOGoWebDAVValue.h>
#import <SOGo/SOGoWebDAVAclManager.h>

View File

@ -19,6 +19,10 @@
02111-1307, USA.
*/
#import <Foundation/NSCharacterSet.h>
#import <NGObjWeb/WOResponse.h>
#import <SOGo/NSDictionary+Utilities.h>
#import <SOGo/NSObject+Utilities.h>

View File

@ -19,8 +19,11 @@
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#import <Foundation/NSCharacterSet.h>
#import <NGObjWeb/WOResponse.h>
#import <SOGo/NSDictionary+Utilities.h>
#import <SOGo/NSObject+Utilities.h>

View File

@ -19,9 +19,13 @@
02111-1307, USA.
*/
#import <NGCards/iCalEvent.h>
#import <Foundation/NSCharacterSet.h>
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGObjWeb/WOResponse.h>
#import <NGCards/iCalEvent.h>
#import <SOGo/NSDictionary+Utilities.h>
#import <SOGo/NSObject+Utilities.h>
#import <SOGo/SOGoUser.h>

View File

@ -20,8 +20,11 @@
*/
#import <Foundation/NSCalendarDate.h>
#import <Foundation/NSCharacterSet.h>
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGObjWeb/WOResponse.h>
#import <NGCards/iCalEvent.h>
#import <NGCards/iCalEventChanges.h>
@ -59,7 +62,7 @@
}
- (NSString *) valueForProperty: (NSString *) property
withDateFormatter: (SOGoDateFormatter *) dateFormatter
withDateFormatter: (SOGoDateFormatter *) _dateFormatter
{
static NSDictionary *valueTypes = nil;
NSString *valueType;
@ -86,9 +89,9 @@
{
[value setTimeZone: viewTZ];
if ([apt isAllDay])
value = [dateFormatter formattedDate: value];
value = [_dateFormatter formattedDate: value];
else
value = [dateFormatter formattedDateAndTime: value];
value = [_dateFormatter formattedDateAndTime: value];
}
}
else
@ -97,7 +100,7 @@
return value;
}
- (void) _setupBodyContentWithFormatter: (SOGoDateFormatter *) dateFormatter
- (void) _setupBodyContentWithFormatter: (SOGoDateFormatter *) _dateFormatter
{
NSString *property, *label, *value;
NSArray *updatedProperties;
@ -111,7 +114,7 @@
{
property = [updatedProperties objectAtIndex: count];
value = [self valueForProperty: property
withDateFormatter: dateFormatter];
withDateFormatter: _dateFormatter];
/* Unhandled properties will return nil */
if (value)
{
@ -157,21 +160,21 @@
- (void) setupValues
{
NSCalendarDate *date;
SOGoDateFormatter *dateFormatter;
SOGoDateFormatter *localDateFormatter;
[super setupValues];
dateFormatter = [[context activeUser] dateFormatterInContext: context];
localDateFormatter = [[context activeUser] dateFormatterInContext: context];
date = [self oldStartDate];
[values setObject: [dateFormatter shortFormattedDate: date]
[values setObject: [localDateFormatter shortFormattedDate: date]
forKey: @"OldStartDate"];
if (![apt isAllDay])
[values setObject: [dateFormatter formattedTime: date]
[values setObject: [localDateFormatter formattedTime: date]
forKey: @"OldStartTime"];
[self _setupBodyContentWithFormatter: dateFormatter];
[self _setupBodyContentWithFormatter: localDateFormatter];
}
- (NSString *) getSubject

View File

@ -28,6 +28,7 @@
#import <SaxObjC/XMLNamespaces.h>
#import <SOGo/NSArray+Utilities.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserFolder.h>
#import <SOGo/SOGoUserSettings.h>
#import <SOGo/NSObject+DAV.h>

View File

@ -27,6 +27,7 @@
#import <NGCards/iCalCalendar.h>
#import <NGCards/iCalDateTime.h>
#import <NGCards/iCalEvent.h>
#import <NGCards/iCalTimeZone.h>
#import <NGCards/iCalRepeatableEntityObject.h>

View File

@ -37,6 +37,7 @@
#import <SOGo/NSObject+DAV.h>
#import <SOGo/NSString+DAV.h>
#import <SOGo/NSObject+Utilities.h>
#import <SOGo/SOGoDomainDefaults.h>
#import <SOGo/SOGoGCSFolder.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserSettings.h>

View File

@ -1,4 +1,4 @@
/* iCalCalendar+SOGo.m - this file is part of $PROJECT_NAME_HERE$
/* iCalCalendar+SOGo.m - this file is part of SOGo
*
* Copyright (C) 2012 Inverse inc
*
@ -21,6 +21,7 @@
*/
#import <Foundation/NSArray.h>
#import <Foundation/NSCalendarDate.h>
#import <Foundation/NSString.h>
#import <NGCards/iCalRepeatableEntityObject.h>

View File

@ -21,9 +21,11 @@
* Boston, MA 02111-1307, USA.
*/
#import <Foundation/NSDictionary.h>
#import <Foundation/NSString.h>
#import <SOGo/SOGoUserManager.h>
#import <NGObjWeb/WOContext+SoObjects.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserManager.h>
#import "iCalPerson+SOGo.h"

View File

@ -21,6 +21,7 @@
*/
#import <Foundation/NSArray.h>
#import <Foundation/NSData.h>
#import <Foundation/NSString.h>
#import <NGObjWeb/WOContext.h>

View File

@ -311,7 +311,7 @@
{
SOGoUser *ownerUser;
NSMutableArray *categories;
DOMElement *documentElement, *catNode;
id <DOMElement> documentElement, catNode;
id <DOMDocument> document;
id <DOMNodeList> catNodes;
NSUInteger count, max;
@ -322,14 +322,14 @@
if ([newCategories length] > 0)
{
document = [[context request] contentAsDOMDocument];
documentElement = (DOMElement *) [document documentElement];
documentElement = [document documentElement];
catNodes = [documentElement getElementsByTagName: @"category"];
max = [catNodes length];
for (count = 0; count < max; count++)
{
catNode = [catNodes objectAtIndex: count];
if ([catNode hasChildNodes])
[categories addObject: [catNode textValue]];
[categories addObject: [(NGDOMNode *) catNode textValue]];
}
}

View File

@ -598,7 +598,7 @@
{
WOResponse *r;
id <DOMDocument> document;
DOMElement *documentElement, *propElement;
id <DOMElement> documentElement, propElement;
r = [context response];
[r prepareDAVResponse];
@ -606,10 +606,11 @@
[NSString stringWithFormat: @"<D:multistatus xmlns:D=\"DAV:\""
@" xmlns:C=\"%@\">", namespace]];
document = [[queryContext request] contentAsDOMDocument];
documentElement = (DOMElement *) [document documentElement];
propElement = [documentElement firstElementWithTag: @"prop"
inNamespace: @"DAV:"];
[self _appendComponentProperties: [propElement flatPropertyNameOfSubElements]
documentElement = [document documentElement];
propElement = [(NGDOMNodeWithChildren *) documentElement
firstElementWithTag: @"prop"
inNamespace: @"DAV:"];
[self _appendComponentProperties: [(NGDOMNodeWithChildren *) propElement flatPropertyNameOfSubElements]
matchingURLs: [documentElement getElementsByTagName: @"href"]
toResponse: r];
[r appendContentString:@"</D:multistatus>"];

View File

@ -30,7 +30,7 @@
@interface EOQualifier (SOGoMailDAVExtension)
+ (id) qualifierFromMailDAVMailFilters: (DOMElement *) mailFilters;
+ (id) qualifierFromMailDAVMailFilters: (id <DOMElement>) mailFilters;
@end

View File

@ -35,14 +35,14 @@
@implementation EOQualifier (SOGoMailDAVExtension)
+ (id) qualifierFromMailDAVMailFilters: (DOMElement *) mailFilters
+ (id) qualifierFromMailDAVMailFilters: (id <DOMElement>) mailFilters
{
EOQualifier *qualifier;
NSMutableArray *args, *formats;
NSArray *flags, *strings, *dates;
NSString *valueA, *valueB, *tagName, *format, *negate;
id <DOMNodeList> list;
DOMElement *current;
id <DOMElement> current;
NSCalendarDate *startDate, *endDate;
int count, max;
BOOL datesAreEqual;

View File

@ -43,6 +43,7 @@
#import <SOGo/SOGoDomainDefaults.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserDefaults.h>
#import <SOGo/SOGoUserSettings.h>
#import <SOGo/SOGoSieveManager.h>
#import "SOGoDraftsFolder.h"

View File

@ -25,12 +25,15 @@
#import <Foundation/NSDictionary.h>
#import <NGObjWeb/SoObject+SoDAV.h>
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGExtensions/NSNull+misc.h>
#import <NGExtensions/NSObject+Logs.h>
#import <NGExtensions/NSString+misc.h>
#import <NGExtensions/NSURL+misc.h>
#import <NGImap4/NGImap4Connection.h>
#import <SOGo/SOGoCache.h>
#import <SOGo/SOGoUser.h>
#import "SOGoMailAccount.h"
#import "SOGoMailManager.h"

View File

@ -23,6 +23,7 @@
#import <Foundation/NSDictionary.h>
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSString.h>
#import <Foundation/NSURL.h>
#import <NGObjWeb/NSException+HTTP.h>
#import <NGObjWeb/SoObject+SoDAV.h>

View File

@ -1494,7 +1494,7 @@ static NSString *defaultUserID = @"anyone";
return davIMAPFieldsTable;
}
- (BOOL) _sortElementIsAscending: (DOMElement *) sortElement
- (BOOL) _sortElementIsAscending: (NGDOMNodeWithChildren <DOMElement> *) sortElement
{
NSString *davReverseAttr;
BOOL orderIsAscending;
@ -1512,7 +1512,7 @@ static NSString *defaultUserID = @"anyone";
return orderIsAscending;
}
- (NSArray *) _sortOrderingsFromSortElement: (DOMElement *) sortElement
- (NSArray *) _sortOrderingsFromSortElement: (NGDOMNodeWithChildren *) sortElement
{
static NSMutableDictionary *criteriasMap = nil;
NSArray *davSortCriterias;
@ -1727,7 +1727,7 @@ static NSString *defaultUserID = @"anyone";
return davIMAPFields;
}
- (NSDictionary *) parseDAVRequestedProperties: (DOMElement *) propElement
- (NSDictionary *) parseDAVRequestedProperties: (NGDOMNodeWithChildren *) propElement
{
NSArray *properties;
NSDictionary *imapFieldsTable;
@ -1747,7 +1747,8 @@ static NSString *defaultUserID = @"anyone";
{
WOResponse *r;
id <DOMDocument> document;
DOMElement *documentElement, *propElement, *filterElement, *sortElement;
id <DOMElement> filterElement;
NGDOMNodeWithChildren *documentElement, *propElement, *sortElement;
NSDictionary *properties;
NSArray *messages, *sortOrderings;
EOQualifier *searchQualifier;
@ -1756,17 +1757,19 @@ static NSString *defaultUserID = @"anyone";
[r prepareDAVResponse];
document = [[context request] contentAsDOMDocument];
documentElement = (DOMElement *) [document documentElement];
documentElement = [document documentElement];
propElement = [documentElement firstElementWithTag: @"prop"
inNamespace: XMLNS_WEBDAV];
propElement = (NGDOMNodeWithChildren *) [documentElement
firstElementWithTag: @"prop"
inNamespace: XMLNS_WEBDAV];
properties = [self parseDAVRequestedProperties: propElement];
filterElement = [documentElement firstElementWithTag: @"mail-filters"
inNamespace: XMLNS_INVERSEDAV];
searchQualifier = [EOQualifier
qualifierFromMailDAVMailFilters: filterElement];
sortElement = [documentElement firstElementWithTag: @"sort"
inNamespace: XMLNS_INVERSEDAV];
sortElement = (NGDOMNodeWithChildren *) [documentElement
firstElementWithTag: @"sort"
inNamespace: XMLNS_INVERSEDAV];
sortOrderings = [self _sortOrderingsFromSortElement: sortElement];
messages = [self _fetchMessageProperties: [properties allKeys]

View File

@ -20,6 +20,7 @@
* Boston, MA 02111-1307, USA.
*/
#import <Foundation/NSDictionary.h>
#import <Foundation/NSString.h>
#import <SOGo/NSArray+Utilities.h>

View File

@ -41,9 +41,9 @@
- (id <DOMNodeList>) childElementsWithTag: (NSString *) tagName
inNamespace: (NSString *) namespace;
- (DOMElement *) firstElementWithTag: (NSString *) tagName;
- (DOMElement *) firstElementWithTag: (NSString *) tagName
inNamespace: (NSString *) namespace;
- (id <DOMElement>) firstElementWithTag: (NSString *) tagName;
- (id <DOMElement>) firstElementWithTag: (NSString *) tagName
inNamespace: (NSString *) namespace;
- (NSArray *) flatPropertyNameOfSubElements;

View File

@ -87,11 +87,11 @@
return [self childElementsWithTag: tagName inNamespace: nil];
}
- (DOMElement *) firstElementWithTag: (NSString *) tagName
inNamespace: (NSString *) namespace
- (id <DOMElement>) firstElementWithTag: (NSString *) tagName
inNamespace: (NSString *) namespace
{
id <DOMNodeList> nodes;
DOMElement *node, *currentElement;
id <DOMElement> node, currentElement;
unsigned int count, max;
node = nil;
@ -111,7 +111,7 @@
return node;
}
- (DOMElement *) firstElementWithTag: (NSString *) tagName
- (id <DOMElement>) firstElementWithTag: (NSString *) tagName
{
return [self firstElementWithTag: tagName inNamespace: nil];
}
@ -120,7 +120,7 @@
{
NSMutableArray *propertyNames;
id <DOMNodeList> children;
DOMElement *currentElement;
id <DOMElement> currentElement;
unsigned int count, max;
propertyNames = [NSMutableArray array];
@ -131,7 +131,8 @@
{
currentElement = [children objectAtIndex: count];
if ([currentElement nodeType] == DOM_ELEMENT_NODE)
[propertyNames addObject: [currentElement asPropertyName]];
[propertyNames
addObject: [(NGDOMElement *) currentElement asPropertyName]];
}
return propertyNames;

View File

@ -318,7 +318,7 @@ static Class NSStringKlass = Nil;
- (BOOL) migrateOldDefaultsWithDictionary: (NSDictionary *) migratedKeys
{
NSArray *allKeys;
id currentValue, existingValue;
id currentValue;
NSString *oldName, *newName;
int count, max;
BOOL requireSync;
@ -334,7 +334,6 @@ static Class NSStringKlass = Nil;
if (currentValue)
{
newName = [migratedKeys objectForKey: oldName];
existingValue = [source objectForKey: newName];
requireSync = YES;
[source setObject: currentValue forKey: newName];
[source removeObjectForKey: oldName];

View File

@ -34,10 +34,10 @@
@class WOContext;
@class WOResponse;
@class DOMElement;
@class SOGoUser;
@protocol DOMElement;
/*
SOGoGCSFolder
@ -121,7 +121,7 @@
- (NSURL *) realDavURL;
- (NSDictionary *) davSQLFieldsTable;
- (NSDictionary *) parseDAVRequestedProperties: (DOMElement *) propElement;
- (NSDictionary *) parseDAVRequestedProperties: (id <DOMElement>) propElement;
- (NSString *) davCollectionTag;

View File

@ -1041,12 +1041,12 @@ static NSArray *childRecordFields = nil;
return davSQLFields;
}
- (NSDictionary *) parseDAVRequestedProperties: (DOMElement *) propElement
- (NSDictionary *) parseDAVRequestedProperties: (id <DOMElement>) propElement
{
NSArray *properties;
NSDictionary *sqlFieldsTable;
properties = [propElement flatPropertyNameOfSubElements];
properties = [(NGDOMNodeWithChildren *) propElement flatPropertyNameOfSubElements];
sqlFieldsTable = [self _davSQLFieldsForProperties: properties];
return sqlFieldsTable;
@ -1331,7 +1331,7 @@ static NSArray *childRecordFields = nil;
{
WOResponse *r;
id <DOMDocument> document;
DOMElement *documentElement, *propElement;
id <DOMElement> documentElement, propElement;
NSString *syncToken;
NSDictionary *properties;
NSArray *records;
@ -1340,13 +1340,16 @@ static NSArray *childRecordFields = nil;
[r prepareDAVResponse];
document = [[context request] contentAsDOMDocument];
documentElement = (DOMElement *) [document documentElement];
syncToken = [[documentElement firstElementWithTag: @"sync-token"
inNamespace: XMLNS_WEBDAV] textValue];
documentElement = [document documentElement];
syncToken = [(NGDOMNode *)
[(NGDOMNodeWithChildren *)
documentElement firstElementWithTag: @"sync-token"
inNamespace: XMLNS_WEBDAV]
textValue];
if ([self _isValidSyncToken: syncToken])
{
propElement = [documentElement firstElementWithTag: @"prop"
inNamespace: XMLNS_WEBDAV];
propElement = [(NGDOMNodeWithChildren *) documentElement
firstElementWithTag: @"prop" inNamespace: XMLNS_WEBDAV];
properties = [self parseDAVRequestedProperties: propElement];
records = [self _fetchSyncTokenFields: properties
matchingSyncToken: syncToken];
@ -2089,7 +2092,7 @@ static NSArray *childRecordFields = nil;
{
WOResponse *r;
id <DOMDocument> document;
DOMElement *documentElement, *propElement;
id <DOMElement> documentElement, propElement;
r = [context response];
[r prepareDAVResponse];
@ -2097,9 +2100,10 @@ static NSArray *childRecordFields = nil;
[NSString stringWithFormat: @"<D:multistatus xmlns:D=\"DAV:\""
@" xmlns:C=\"%@\">", namespace]];
document = [[queryContext request] contentAsDOMDocument];
documentElement = (DOMElement *) [document documentElement];
propElement = [documentElement firstElementWithTag: @"prop"
inNamespace: @"DAV:"];
documentElement = [document documentElement];
propElement = [(NGDOMNodeWithChildren *)
documentElement firstElementWithTag: @"prop"
inNamespace: @"DAV:"];
[self _appendComponentProperties: [self parseDAVRequestedProperties: propElement]
matchingURLs: [documentElement getElementsByTagName: @"href"]
toResponse: r];

View File

@ -576,7 +576,7 @@ static SoSecurityManager *sm = nil;
{
NSMutableArray *supportedTypes;
id <DOMNodeList> children;
DOMElement *element;
id <DOMElement> element;
NSException *error;
NSArray *allTypes;
id o;
@ -616,7 +616,7 @@ static SoSecurityManager *sm = nil;
{
element = [children objectAtIndex: i];
if ([element nodeType] == DOM_ELEMENT_NODE &&
if ([element nodeType] == DOM_ELEMENT_NODE &&
![supportedTypes containsObject: [element nodeName]])
supported = NO;
}

View File

@ -23,6 +23,7 @@
#import <Foundation/NSString.h>
#import "SOGoUser.h"
#import "SOGoUserFolder.h"
#import "SOGoPublicBaseFolder.h"

View File

@ -170,12 +170,10 @@
cc = [self clientCapabilities];
b = [[cc userAgent] rangeOfString: @"CFNetwork"].location != NSNotFound
&& [[cc userAgent] rangeOfString: @"Darwin"].location != NSNotFound
|| ( [[cc userAgent] rangeOfString: @"CFNetwork"].location != NSNotFound
|| [[cc userAgent] rangeOfString: @"Mac OS X"].location != NSNotFound )
&& [[cc userAgent] rangeOfString: @"AddressBook"].location != NSNotFound;
b = ([[cc userAgent] rangeOfString: @"CFNetwork"].location != NSNotFound
&& ([[cc userAgent] rangeOfString: @"Darwin"].location != NSNotFound
|| [[cc userAgent] rangeOfString: @"Mac OS X"].location != NSNotFound)
&& [[cc userAgent] rangeOfString: @"AddressBook"].location != NSNotFound);
return b;
}

View File

@ -24,6 +24,7 @@
#import <Foundation/NSArray.h>
#import <Foundation/NSCalendarDate.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSProcessInfo.h>
#import <Foundation/NSString.h>

View File

@ -24,11 +24,10 @@
#define SOGOSOCKD_H
#import <Foundation/NSObject.h>
#import <Foundation/NSRunLoop.h>
@class NGPassiveSocket;
@protocol RunLoopEvents;
@interface SOGoSockD : NSObject <RunLoopEvents>
{
NGPassiveSocket *listeningSocket;

View File

@ -24,6 +24,7 @@
#import <Foundation/NSArray.h>
#import <Foundation/NSAutoreleasePool.h>
#import <Foundation/NSCalendarDate.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSException.h>
@ -511,7 +512,7 @@
rc = NO;
}
return NO;
return rc;
}
- (BOOL) processFolder: (NSString *) folderId

View File

@ -348,9 +348,8 @@ typedef enum SOGoToolRestoreMode {
{
NSDictionary *existingRecords, *currentRecord;
NSString *cName, *cContent;
NSException *ex;
int count, max, version;
int count, max;
unsigned int version;
BOOL rc;
if (records)
@ -367,8 +366,8 @@ typedef enum SOGoToolRestoreMode {
{
NSLog (@"restoring record '%@'", cName);
cContent = [currentRecord objectForKey: @"c_content"];
ex = [gcsFolder writeContent: cContent toName: cName
baseVersion: &version];
[gcsFolder writeContent: cContent toName: cName
baseVersion: &version];
}
}
}

View File

@ -244,11 +244,9 @@
SOGoGCSFolder *sourceFolder, *destinationFolder;
SOGoParentFolder *folders;
SoSecurityManager *sm;
WORequest *request;
unsigned int errorCount;
sm = [SoSecurityManager sharedSecurityManager];
request = [context request];
ex = nil;
errorCount = 0;

View File

@ -23,8 +23,10 @@
#import <Foundation/NSArray.h>
#import <Foundation/NSString.h>
#import <NGObjWeb/WOContext.h>
#import <NGObjWeb/WODirectAction.h>
#import <NGObjWeb/WORequest.h>
#import <NGObjWeb/WOResponse.h>
#import <NGCards/NGVCard.h>

View File

@ -27,14 +27,14 @@
@class NSString;
@class NSMutableDictionary;
@class SOGoContactFolder;
@protocol SOGoContactFolder;
@interface UIxContactEditor : UIxComponent
{
id addressBookItem;
NSString *item;
NSMutableDictionary *ldifRecord; /* contains the values for editing */
SOGoContactFolder *componentAddressBook;
id <SOGoContactFolder> componentAddressBook;
}
- (NSMutableDictionary *) ldifRecord;
@ -44,7 +44,7 @@
- (BOOL) isNew;
- (NSArray *) addressBooksList;
- (SOGoContactFolder *) componentAddressBook;
- (id <SOGoContactFolder>) componentAddressBook;
- (NSString *) addressBookDisplayName;
@end

View File

@ -185,7 +185,7 @@ static Class SOGoContactGCSEntryK = Nil;
NSMutableArray *addressBooksList;
SoSecurityManager *sm;
SOGoContactFolders *folderContainer;
SOGoContactFolder *folder, *currentFolder;
id <SOGoContactFolder> folder, currentFolder;
addressBooksList = [NSMutableArray array];
sm = [SoSecurityManager sharedSecurityManager];
@ -207,16 +207,12 @@ static Class SOGoContactGCSEntryK = Nil;
return addressBooksList;
}
- (SOGoContactFolder *) componentAddressBook
- (id <SOGoContactFolder>) componentAddressBook
{
SOGoContactFolder *folder;
folder = [[self clientObject] container];
return folder;
return [[self clientObject] container];
}
- (void) setComponentAddressBook: (SOGoContactFolder *) _componentAddressBook
- (void) setComponentAddressBook: (id <SOGoContactFolder>) _componentAddressBook
{
ASSIGN (componentAddressBook, _componentAddressBook);
}
@ -224,7 +220,7 @@ static Class SOGoContactGCSEntryK = Nil;
- (NSString *) addressBookDisplayName
{
NSString *fDisplayName;
SOGoContactFolder *folder;
SOGoObject <SOGoContactFolder> *folder;
SOGoContactFolders *parentFolder;
fDisplayName = [addressBookItem displayName];
@ -372,15 +368,19 @@ static Class SOGoContactGCSEntryK = Nil;
if (componentAddressBook && componentAddressBook != [self componentAddressBook])
{
sm = [SoSecurityManager sharedSecurityManager];
if (![sm validatePermission: SoPerm_DeleteObjects
onObject: componentAddressBook
inContext: context])
if ([contact isKindOfClass: SOGoContactGCSEntryK])
{
if (![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles
onObject: componentAddressBook
inContext: context])
[contact moveToFolder: (SOGoGCSFolder *)componentAddressBook]; // TODO: handle exception
sm = [SoSecurityManager sharedSecurityManager];
if (![sm validatePermission: SoPerm_DeleteObjects
onObject: componentAddressBook
inContext: context]
&& ![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles
onObject: componentAddressBook
inContext: context])
[(SOGoContactGCSEntry *) contact
moveToFolder: (SOGoGCSFolder *)componentAddressBook]; // TODO:
// handle
// exception
}
}

View File

@ -26,6 +26,7 @@
*/
#import <Foundation/NSDictionary.h>
#import <Foundation/NSException.h>
#import <Foundation/NSValue.h>
#import <NGObjWeb/WOResponse.h>

View File

@ -20,6 +20,7 @@
02111-1307, USA.
*/
#import <Foundation/NSDictionary.h>
#import <Foundation/NSString.h>
#import <NGObjWeb/WOComponent.h>

View File

@ -213,13 +213,6 @@ static NSArray *infoKeys = nil;
- (NSString *) localeCode
{
SOGoUserDefaults *ud;
NSDictionary *locale;
ud = [[context activeUser] userDefaults];
locale = [[self resourceManager]
localeForLanguageNamed: [ud language]];
// WARNING : NSLocaleCode is not defined in <Foundation/NSUserDefaults.h>
return [locale objectForKey: @"NSLocaleCode"];
}

View File

@ -19,6 +19,8 @@
02111-1307, USA.
*/
#import <Foundation/NSDictionary.h>
#import <NGObjWeb/WOContext.h>
#import <NGObjWeb/WORequest.h>
#import <EOControl/EOQualifier.h>

View File

@ -57,6 +57,7 @@
#import <SOGo/SOGoDateFormatter.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserDefaults.h>
#import <SOGo/SOGoUserSettings.h>
#import <UI/Common/WODirectAction+SOGo.h>

View File

@ -44,10 +44,12 @@
#import <Contacts/SOGoContactFolders.h>
#import <Contacts/SOGoContactLDIFEntry.h>
#import <Mailer/SOGoMailObject.h>
#import <Mailer/SOGoDraftsFolder.h>
#import <Mailer/SOGoMailAccount.h>
#import <Mailer/SOGoMailAccounts.h>
#import <Mailer/SOGoMailFolder.h>
#import <Mailer/SOGoMailObject.h>
#import <Mailer/SOGoSentFolder.h>
#import <SOGo/NSDictionary+URL.h>
#import <SOGo/NSArray+Utilities.h>
#import <SOGo/NSString+Utilities.h>

View File

@ -20,6 +20,8 @@
02111-1307, USA.
*/
#import <Foundation/NSDictionary.h>
#import <NGObjWeb/WOComponent.h>
@class NSString, NSMutableArray, NSDictionary;

View File

@ -19,6 +19,7 @@
02111-1307, USA.
*/
#import <Foundation/NSDictionary.h>
#import <Foundation/NSException.h>
#import <NGObjWeb/NSException+HTTP.h>
#import <NGObjWeb/WORequest.h>

View File

@ -46,6 +46,7 @@
#import <SOGo/SOGoUserFolder.h>
#import <SOGo/WOResourceManager+SOGo.h>
#import <Mailer/SOGoMailAccount.h>
#import <Mailer/SOGoMailAccounts.h>
#import "UIxPreferences.h"
@ -63,7 +64,6 @@
{
//NSDictionary *locale;
SOGoDomainDefaults *dd;
NSString *language;
if ((self = [super init]))
{
@ -71,7 +71,6 @@
#warning user should be the owner rather than the activeUser
ASSIGN (user, [context activeUser]);
ASSIGN (today, [NSCalendarDate date]);
language = [userDefaults language];
calendarCategories = nil;
calendarCategoriesColors = nil;

View File

@ -169,7 +169,7 @@
part = [NGMimeBodyPart bodyPartWithHeader: headerMap];
body = [[self body] dataUsingEncoding: NSUTF8StringEncoding];
[part setBody: [self body]];
[part setBody: body];
return part;
}

View File

@ -140,7 +140,7 @@
part = [NGMimeBodyPart bodyPartWithHeader: headerMap];
body = [[self body] dataUsingEncoding: NSUTF8StringEncoding];
[part setBody: [self body]];
[part setBody: body];
return part;
}

View File

@ -31,7 +31,6 @@
#import <NGObjWeb/SoHTTPAuthenticator.h>
#import <NGObjWeb/SoObjects.h>
#import <NGObjWeb/SoProduct.h>
#import <NGObjWeb/WOResourceManager.h>
#import <NGObjWeb/WORequest.h>
#import <NGObjWeb/WOResponse.h>
#import <NGObjWeb/WOContext+SoObjects.h>
@ -48,7 +47,9 @@
#import <SOGo/SOGoPermissions.h>
#import <SOGo/SOGoSystemDefaults.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserFolder.h>
#import <SOGo/SOGoUserDefaults.h>
#import <SOGo/WOResourceManager+SOGo.h>
#import "UIxJSClose.h"
@ -146,7 +147,8 @@ static SoProduct *commonProduct = nil;
queryParameters = nil;
ASSIGN (userDefaults, [[context activeUser] userDefaults]);
language = [userDefaults language];
ASSIGN (locale, [[self resourceManager] localeForLanguageNamed: language]);
ASSIGN (locale,
[[self resourceManager] localeForLanguageNamed: language]);
}
return self;

View File

@ -37,6 +37,7 @@
#import <SOGo/SOGoUserDefaults.h>
#import <Appointments/iCalEvent+SOGo.h>
#import <Appointments/SOGoAppointmentObject.h>
#import <Appointments/SOGoAppointmentFolder.h>
#import <Common/WODirectAction+SOGo.h>

View File

@ -45,8 +45,6 @@
- (id) init
{
NSDictionary *locale;
NSString *language;
SOGoUser *user;
SOGoUserDefaults *ud;
@ -55,8 +53,6 @@
user = [context activeUser];
ud = [user userDefaults];
ASSIGN (timeFormat, [ud timeFormat]);
language = [ud language];
locale = [[self resourceManager] localeForLanguageNamed: language];
daysToDisplay = nil;
hoursToDisplay = nil;

View File

@ -23,6 +23,9 @@
#import <Foundation/NSValue.h>
#import <NGObjWeb/NSException+HTTP.h>
#import <NGObjWeb/WORequest.h>
#import <NGObjWeb/WOResponse.h>
#import <NGCards/iCalCalendar.h>
#import <SOGo/NSDictionary+Utilities.h>

View File

@ -40,9 +40,6 @@
- (id) init
{
NSDictionary *locale;
SOGoUserDefaults *ud;
if ((self = [super init]))
{
// monthAptFormatter
@ -50,8 +47,6 @@
// [monthAptFormatter setShortMonthTitleOnly];
// dateFormatter = [[SOGoDateFormatter alloc]
// initWithLocale: [self locale]];
ud = [[context activeUser] userDefaults];
locale = [[self resourceManager] localeForLanguageNamed: [ud language]];
dayNames = [locale objectForKey: NSWeekDayNameArray];
[dayNames retain];
monthNames = [locale objectForKey: NSMonthNameArray];

View File

@ -43,6 +43,7 @@
#import <NGObjWeb/NSException+HTTP.h>
#import <NGObjWeb/WOApplication.h>
#import <NGObjWeb/WORequest.h>
#import <NGObjWeb/WOResponse.h>
#import <NGExtensions/NSCalendarDate+misc.h>
#import <NGExtensions/NSObject+Logs.h>
#import <NGExtensions/NSString+misc.h>
@ -766,6 +767,73 @@ iRANGE(2);
return attachUrl;
}
- (NSDictionary *) organizerProfile
{
NSMutableDictionary *profile;
NSDictionary *ownerIdentity;
NSString *uid, *name, *email, *partstat, *role;
SOGoUserManager *um;
SOGoCalendarComponent *co;
SOGoUser *ownerUser;
if (organizerProfile == nil)
{
profile = [NSMutableDictionary dictionary];
email = [organizer rfc822Email];
role = nil;
partstat = nil;
if ([email length])
{
um = [SOGoUserManager sharedUserManager];
name = [organizer cn];
uid = [um getUIDForEmail: email];
partstat = [[organizer partStat] lowercaseString];
role = [[organizer role] lowercaseString];
}
else
{
// No organizer defined in vEvent; use calendar owner
co = [self clientObject];
uid = [[co container] ownerInContext: context];
ownerUser = [SOGoUser userWithLogin: uid roles: nil];
ownerIdentity = [ownerUser defaultIdentity];
name = [ownerIdentity objectForKey: @"fullName"];
email = [ownerIdentity objectForKey: @"email"];
}
if (uid != nil)
[profile setObject: uid
forKey: @"uid"];
else
uid = email;
[profile setObject: name
forKey: @"name"];
[profile setObject: email
forKey: @"email"];
if (partstat == nil || ![partstat length])
partstat = @"accepted";
[profile setObject: partstat
forKey: @"partstat"];
if (role == nil || ![role length])
role = @"chair";
[profile setObject: role
forKey: @"role"];
organizerProfile = [NSDictionary dictionaryWithObject: profile forKey: uid];
[organizerProfile retain];
}
return organizerProfile;
}
- (NSString *) organizerName
{
NSDictionary *profile;
@ -775,6 +843,11 @@ iRANGE(2);
return [profile objectForKey: @"name"];
}
- (NSString *) jsonOrganizer
{
return [[[[self organizerProfile] allValues] lastObject] jsonRepresentation];
}
// - (BOOL) canBeOrganizer
// {
// NSString *owner;
@ -904,78 +977,6 @@ iRANGE(2);
return [jsonAttendees jsonRepresentation];
}
- (NSDictionary *) organizerProfile
{
NSMutableDictionary *profile;
NSDictionary *ownerIdentity;
NSString *uid, *name, *email, *partstat, *role;
SOGoUserManager *um;
SOGoCalendarComponent *co;
SOGoUser *ownerUser;
if (organizerProfile == nil)
{
profile = [NSMutableDictionary dictionary];
email = [organizer rfc822Email];
role = nil;
partstat = nil;
if ([email length])
{
um = [SOGoUserManager sharedUserManager];
name = [organizer cn];
uid = [um getUIDForEmail: email];
partstat = [[organizer partStat] lowercaseString];
role = [[organizer role] lowercaseString];
}
else
{
// No organizer defined in vEvent; use calendar owner
co = [self clientObject];
uid = [[co container] ownerInContext: context];
ownerUser = [SOGoUser userWithLogin: uid roles: nil];
ownerIdentity = [ownerUser defaultIdentity];
name = [ownerIdentity objectForKey: @"fullName"];
email = [ownerIdentity objectForKey: @"email"];
}
if (uid != nil)
[profile setObject: uid
forKey: @"uid"];
else
uid = email;
[profile setObject: name
forKey: @"name"];
[profile setObject: email
forKey: @"email"];
if (partstat == nil || ![partstat length])
partstat = @"accepted";
[profile setObject: partstat
forKey: @"partstat"];
if (role == nil || ![role length])
role = @"chair";
[profile setObject: role
forKey: @"role"];
organizerProfile = [NSDictionary dictionaryWithObject: profile forKey: uid];
[organizerProfile retain];
}
return organizerProfile;
}
- (NSString *) jsonOrganizer
{
return [[[[self organizerProfile] allValues] lastObject] jsonRepresentation];
}
- (void) setLocation: (NSString *) _value
{
ASSIGN (location, _value);
@ -1918,12 +1919,7 @@ RANGE(2);
else if (range == 2)
{
NSCalendarDate *date;
SOGoUserDefaults *ud;
NSDictionary *locale;
ud = [[context activeUser] userDefaults];
locale = [[self resourceManager]
localeForLanguageNamed: [ud language]];
date = [NSCalendarDate dateWithString: [self range2]
calendarFormat: dateFormat
locale: locale];

View File

@ -392,10 +392,8 @@
{
NSString *newCalendar;
SOGoAppointmentFolder *thisFolder, *newFolder;
SOGoAppointmentFolders *parentFolder;
SOGoTaskObject *co;
SoSecurityManager *sm;
NSException *ex;
co = [self clientObject];
[co saveComponent: todo];
@ -410,14 +408,13 @@
onObject: thisFolder
inContext: context])
{
parentFolder = [[self container] container];
newFolder = [[thisFolder container] lookupName: newCalendar
inContext: context
acquire: NO];
inContext: context
acquire: NO];
if (![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles
onObject: newFolder
inContext: context])
ex = [co moveToFolder: newFolder];
[co moveToFolder: newFolder];
}
}