diff --git a/SoObjects/Contacts/SOGoContactGCSFolder.m b/SoObjects/Contacts/SOGoContactGCSFolder.m index f8a7b4a24..7fd56ba8d 100644 --- a/SoObjects/Contacts/SOGoContactGCSFolder.m +++ b/SoObjects/Contacts/SOGoContactGCSFolder.m @@ -267,25 +267,6 @@ return @"vcard-collection"; } -// /* GET */ - -// - (id) GETAction: (id)_ctx -// { -// // TODO: I guess this should really be done by SOPE (redirect to -// // default method) -// WOResponse *r; -// NSString *uri; - -// uri = [[_ctx request] uri]; -// if (![uri hasSuffix:@"/"]) uri = [uri stringByAppendingString:@"/"]; -// uri = [uri stringByAppendingString:@"view"]; - -// r = [_ctx response]; -// [r setStatus:302 /* moved */]; -// [r setHeader:uri forKey:@"location"]; -// return r; -// } - /* sorting */ - (NSComparisonResult) compare: (id) otherFolder { diff --git a/SoObjects/Contacts/SOGoContactLDAPFolder.m b/SoObjects/Contacts/SOGoContactLDAPFolder.m index 7345c9c5a..b35f0d0d7 100644 --- a/SoObjects/Contacts/SOGoContactLDAPFolder.m +++ b/SoObjects/Contacts/SOGoContactLDAPFolder.m @@ -98,7 +98,6 @@ { if ((self = [super init])) { - displayName = nil; entries = nil; ldapSource = nil; } @@ -121,7 +120,6 @@ - (void) dealloc { - [displayName release]; [entries release]; [ldapSource release]; [super dealloc]; @@ -132,16 +130,16 @@ ASSIGN (ldapSource, newLDAPSource); } -- (NSString *) displayName -{ - return displayName; -} - - (NSArray *) davNamespaces { return [NSArray arrayWithObject: @"urn:ietf:params:xml:ns:carddav"]; } +- (NSString *) groupDavResourceType +{ + return @"vcard-collection"; +} + - (id) lookupName: (NSString *) objectName inContext: (WOContext *) lookupContext acquire: (BOOL) acquire @@ -261,27 +259,6 @@ return result; } -- (NSArray *) davResourceType -{ - NSArray *rType, *groupDavCollection; - - groupDavCollection = [NSArray arrayWithObjects: @"vcard-collection", - XMLNS_GROUPDAV, nil]; - rType = [NSArray arrayWithObjects: @"collection", groupDavCollection, nil]; - - return rType; -} - -- (NSString *) davContentType -{ - return @"httpd/unix-directory"; -} - -- (BOOL) davIsCollection -{ - return YES; -} - - (NSString *) davDisplayName { return displayName; @@ -292,6 +269,18 @@ return YES; } +/* folder type */ + +- (NSString *) folderType +{ + return @"Contact"; +} + +- (NSString *) outlookFolderClass +{ + return @"IPF.Contact"; +} + /* sorting */ - (NSComparisonResult) compare: (id) otherFolder { diff --git a/SoObjects/SOGo/SOGoFolder.h b/SoObjects/SOGo/SOGoFolder.h index 1292b96e3..afb55cfc5 100644 --- a/SoObjects/SOGo/SOGoFolder.h +++ b/SoObjects/SOGo/SOGoFolder.h @@ -46,4 +46,10 @@ @end +@interface SOGoFolder (GroupDAVExtensions) + +- (NSString *) groupDavResourceType; + +@end + #endif /* SOGOFOLDER_H */ diff --git a/SoObjects/SOGo/SOGoFolder.m b/SoObjects/SOGo/SOGoFolder.m index 3f49d254f..aae0a632b 100644 --- a/SoObjects/SOGo/SOGoFolder.m +++ b/SoObjects/SOGo/SOGoFolder.m @@ -26,6 +26,8 @@ #import +#import + #import "NSString+Utilities.h" #import "SOGoFolder.h" @@ -202,6 +204,24 @@ return @"httpd/unix-directory"; } +- (NSArray *) davResourceType +{ + NSArray *rType, *groupDavCollection; + + if ([self respondsToSelector: @selector (groupDavResourceType)]) + { + groupDavCollection + = [NSArray arrayWithObjects: [self groupDavResourceType], + XMLNS_GROUPDAV, nil]; + rType = [NSArray arrayWithObjects: @"collection", groupDavCollection, + nil]; + } + else + rType = [NSArray arrayWithObject: @"collection"]; + + return rType; +} + /* folder type */ - (NSString *) outlookFolderClass diff --git a/SoObjects/SOGo/SOGoGCSFolder.h b/SoObjects/SOGo/SOGoGCSFolder.h index 21fb8934a..6a89dd4b2 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.h +++ b/SoObjects/SOGo/SOGoGCSFolder.h @@ -87,10 +87,4 @@ @end -@interface SOGoGCSFolder (GroupDAVExtensions) - -- (NSString *) groupDavResourceType; - -@end - #endif /* __SOGo_SOGoGCSFolder_H__ */ diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index a5118ea82..5b938f091 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -381,24 +381,6 @@ static NSString *defaultUserID = @""; return nil; } -- (NSArray *) davResourceType -{ - NSArray *rType, *groupDavCollection; - - if ([self respondsToSelector: @selector (groupDavResourceType)]) - { - groupDavCollection - = [NSArray arrayWithObjects: [self groupDavResourceType], - XMLNS_GROUPDAV, nil]; - rType = [NSArray arrayWithObjects: @"collection", groupDavCollection, - nil]; - } - else - rType = [NSArray arrayWithObject: @"collection"]; - - return rType; -} - - (NSArray *) toOneRelationshipKeys { /* toOneRelationshipKeys are the 'files' contained in a folder */