mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-18 05:03:20 +00:00
Monotone-Parent: 4198b7cec911933d302e467416f80df87577acdb
Monotone-Revision: a7a7371747e1185b197e3a0ea0c6d585bf7e0a46 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-07-22T20:40:34 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,13 @@
|
|||||||
2007-07-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2007-07-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* SoObjects/SOGo/SOGoFolder.m ([SOGoFolder -davNamespaces]): new
|
||||||
|
optional method for subclasses which handle specific extensions to
|
||||||
|
the DAV protocol: CardDAV or CalDAV.
|
||||||
|
([SOGoFolder
|
||||||
|
-lookupName:lookupNameinContext:localContextacquire:acquire]):
|
||||||
|
new overriden method that handles dav invocations for extensions
|
||||||
|
to DAV by returning an appropriate SoSelectorInvocation.
|
||||||
|
|
||||||
* SoObjects/SOGo/NSString+Utilities.m ([NSString
|
* SoObjects/SOGo/NSString+Utilities.m ([NSString
|
||||||
-asDavInvocation]): new method returning a dictionary with a "ns"
|
-asDavInvocation]): new method returning a dictionary with a "ns"
|
||||||
key representing the dav namespace and a "method" key representing
|
key representing the dav namespace and a "method" key representing
|
||||||
|
|||||||
@@ -73,6 +73,9 @@
|
|||||||
- (BOOL) create;
|
- (BOOL) create;
|
||||||
- (NSException *) delete;
|
- (NSException *) delete;
|
||||||
|
|
||||||
|
/* dav */
|
||||||
|
- (NSArray *) davNamespaces;
|
||||||
|
|
||||||
/* acls as a container */
|
/* acls as a container */
|
||||||
- (NSArray *) aclUsersForObjectAtPath: (NSArray *) objectPathArray;
|
- (NSArray *) aclUsersForObjectAtPath: (NSArray *) objectPathArray;
|
||||||
- (NSArray *) aclsForUser: (NSString *) uid
|
- (NSArray *) aclsForUser: (NSString *) uid
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
#import <Foundation/NSURL.h>
|
#import <Foundation/NSURL.h>
|
||||||
|
|
||||||
#import <NGObjWeb/SoObject.h>
|
#import <NGObjWeb/SoObject.h>
|
||||||
|
#import <NGObjWeb/SoObject+SoDAV.h>
|
||||||
|
#import <NGObjWeb/SoSelectorInvocation.h>
|
||||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||||
#import <NGExtensions/NSNull+misc.h>
|
#import <NGExtensions/NSNull+misc.h>
|
||||||
#import <NGExtensions/NSObject+Logs.h>
|
#import <NGExtensions/NSObject+Logs.h>
|
||||||
@@ -38,6 +40,8 @@
|
|||||||
#import <GDLContentStore/GCSFolderType.h>
|
#import <GDLContentStore/GCSFolderType.h>
|
||||||
#import <SaxObjC/XMLNamespaces.h>
|
#import <SaxObjC/XMLNamespaces.h>
|
||||||
|
|
||||||
|
#import "NSString+Utilities.h"
|
||||||
|
|
||||||
#import "SOGoPermissions.h"
|
#import "SOGoPermissions.h"
|
||||||
#import "SOGoUser.h"
|
#import "SOGoUser.h"
|
||||||
|
|
||||||
@@ -523,8 +527,48 @@ static NSString *defaultUserID = @"<default>";
|
|||||||
return [[self davURL] absoluteString];
|
return [[self davURL] absoluteString];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (id) lookupName: (NSString *) lookupName
|
||||||
|
inContext: (id) localContext
|
||||||
|
acquire: (BOOL) acquire
|
||||||
|
{
|
||||||
|
id obj;
|
||||||
|
NSArray *davNamespaces;
|
||||||
|
NSDictionary *davInvocation;
|
||||||
|
NSString *objcMethod;
|
||||||
|
|
||||||
|
obj = [super lookupName: lookupName inContext: localContext
|
||||||
|
acquire: acquire];
|
||||||
|
if (!obj)
|
||||||
|
{
|
||||||
|
davNamespaces = [self davNamespaces];
|
||||||
|
if ([davNamespaces count] > 0)
|
||||||
|
{
|
||||||
|
davInvocation = [lookupName asDavInvocation];
|
||||||
|
if (davInvocation
|
||||||
|
&& [davNamespaces
|
||||||
|
containsObject: [davInvocation objectForKey: @"ns"]])
|
||||||
|
{
|
||||||
|
objcMethod = [[davInvocation objectForKey: @"method"]
|
||||||
|
davMethodToObjC];
|
||||||
|
obj = [[SoSelectorInvocation alloc]
|
||||||
|
initWithSelectorNamed:
|
||||||
|
[NSString stringWithFormat: @"%@:", objcMethod]
|
||||||
|
addContextParameter: YES];
|
||||||
|
[obj autorelease];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
/* WebDAV */
|
/* WebDAV */
|
||||||
|
|
||||||
|
- (NSArray *) davNamespaces
|
||||||
|
{
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
- (BOOL) davIsCollection
|
- (BOOL) davIsCollection
|
||||||
{
|
{
|
||||||
return [self isFolderish];
|
return [self isFolderish];
|
||||||
|
|||||||
Reference in New Issue
Block a user