mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-12 23:37:15 +00:00
Monotone-Parent: 5db95c823716f08780a1e57b51f753d465c61194
Monotone-Revision: 2af1a4a61509de5048a17987479e677756dc2134 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-06-18T20:58:46 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
1 parent
a4f46a1205
commit
1e49373ab9
8 files changed
+158
-86
No files matched your search
@@ -40,6 +40,7 @@
|
||||
#import <NGExtensions/NSString+misc.h>
|
||||
#import <NGExtensions/NSNull+misc.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
#import <DOM/DOMElement.h>
|
||||
#import <DOM/DOMProtocols.h>
|
||||
#import <EOControl/EOFetchSpecification.h>
|
||||
#import <EOControl/EOQualifier.h>
|
||||
@@ -58,6 +59,7 @@
|
||||
#import "NSObject+DAV.h"
|
||||
#import "NSString+Utilities.h"
|
||||
|
||||
#import "DOMNode+SOGo.h"
|
||||
#import "SOGoContentObject.h"
|
||||
#import "SOGoGroup.h"
|
||||
#import "SOGoParentFolder.h"
|
||||
@@ -791,6 +793,55 @@ static NSArray *childRecordFields = nil;
|
||||
inContext: queryContext];
|
||||
}
|
||||
|
||||
- (NSDictionary *) davSQLFieldsTable
|
||||
{
|
||||
static NSMutableDictionary *davSQLFieldsTable = nil;
|
||||
|
||||
if (!davSQLFieldsTable)
|
||||
{
|
||||
davSQLFieldsTable = [NSMutableDictionary new];
|
||||
[davSQLFieldsTable setObject: @"c_version" forKey: @"{DAV:}getetag"];
|
||||
}
|
||||
|
||||
return davSQLFieldsTable;
|
||||
}
|
||||
|
||||
- (NSDictionary *) _davSQLFieldsForProperties: (NSArray *) properties
|
||||
{
|
||||
NSMutableDictionary *davSQLFields;
|
||||
NSDictionary *davSQLFieldsTable;
|
||||
NSString *sqlField, *property;
|
||||
unsigned int count, max;
|
||||
|
||||
davSQLFieldsTable = [self davSQLFieldsTable];
|
||||
|
||||
max = [properties count];
|
||||
davSQLFields = [NSMutableDictionary dictionaryWithCapacity: max];
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
property = [properties objectAtIndex: count];
|
||||
sqlField = [davSQLFieldsTable objectForKey: property];
|
||||
if (sqlField)
|
||||
[davSQLFields setObject: sqlField forKey: property];
|
||||
else
|
||||
[self errorWithFormat: @"DAV property '%@' has no matching SQL field,"
|
||||
@" response will be incomplete", property];
|
||||
}
|
||||
|
||||
return davSQLFields;
|
||||
}
|
||||
|
||||
- (NSDictionary *) parseDAVRequestedProperties: (DOMElement *) propElement
|
||||
{
|
||||
NSArray *properties;
|
||||
NSDictionary *sqlFieldsTable;
|
||||
|
||||
properties = [propElement flatPropertyNameOfSubElements];
|
||||
sqlFieldsTable = [self _davSQLFieldsForProperties: properties];
|
||||
|
||||
return sqlFieldsTable;
|
||||
}
|
||||
|
||||
/* handling acls from quick tables */
|
||||
- (void) initializeQuickTablesAclsInContext: (WOContext *) localContext
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user