Monotone-Parent: 66fe156475b1f789bc5d20c857350ca9afea9556

Monotone-Revision: a164259525f718f804b625a9f09b4c3b3c9e83f8

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-11-09T20:12:07
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-11-09 20:12:07 +00:00
parent 44190a2103
commit aebac17d01
6 changed files with 43 additions and 71 deletions

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -46,4 +46,10 @@
@end
@interface SOGoFolder (GroupDAVExtensions)
- (NSString *) groupDavResourceType;
@end
#endif /* SOGOFOLDER_H */

View File

@@ -26,6 +26,8 @@
#import <NGObjWeb/SoSelectorInvocation.h>
#import <SaxObjC/XMLNamespaces.h>
#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

View File

@@ -87,10 +87,4 @@
@end
@interface SOGoGCSFolder (GroupDAVExtensions)
- (NSString *) groupDavResourceType;
@end
#endif /* __SOGo_SOGoGCSFolder_H__ */

View File

@@ -381,24 +381,6 @@ static NSString *defaultUserID = @"<default>";
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 */