mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-12 18:33:18 +00:00
Monotone-Parent: 10cd99d7bb60f6b8cd1fe6b59a1c9a647dd0ba3b
Monotone-Revision: dcb58071ad12a3e87d2a061647e9558e70bb9775 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-07-09T21:09:08 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -71,6 +71,64 @@ static BOOL kontactGroupDAV = YES;
|
||||
static BOOL sendACLAdvisories = NO;
|
||||
|
||||
static NSDictionary *reportMap = nil;
|
||||
static NSMutableDictionary *setterMap = nil;
|
||||
static NSMutableDictionary *getterMap = nil;
|
||||
|
||||
SEL SOGoSelectorForPropertyGetter (NSString *property)
|
||||
{
|
||||
SEL propSel;
|
||||
NSValue *propPtr;
|
||||
NSDictionary *map;
|
||||
NSString *methodName;
|
||||
|
||||
if (!getterMap)
|
||||
getterMap = [NSMutableDictionary new];
|
||||
propPtr = [getterMap objectForKey: property];
|
||||
if (propPtr)
|
||||
propSel = [propPtr pointerValue];
|
||||
else
|
||||
{
|
||||
map = [SOGoObject defaultWebDAVAttributeMap];
|
||||
methodName = [map objectForKey: property];
|
||||
if (methodName)
|
||||
{
|
||||
propSel = NSSelectorFromString (methodName);
|
||||
if (propSel)
|
||||
[getterMap setObject: [NSValue valueWithPointer: propSel]
|
||||
forKey: property];
|
||||
}
|
||||
}
|
||||
|
||||
return propSel;
|
||||
}
|
||||
|
||||
SEL SOGoSelectorForPropertySetter (NSString *property)
|
||||
{
|
||||
SEL propSel;
|
||||
NSValue *propPtr;
|
||||
NSDictionary *map;
|
||||
NSString *methodName;
|
||||
|
||||
if (!setterMap)
|
||||
setterMap = [NSMutableDictionary new];
|
||||
propPtr = [setterMap objectForKey: property];
|
||||
if (propPtr)
|
||||
propSel = [propPtr pointerValue];
|
||||
else
|
||||
{
|
||||
map = [SOGoObject defaultWebDAVAttributeMap];
|
||||
methodName = [map objectForKey: property];
|
||||
if (methodName)
|
||||
{
|
||||
propSel = NSSelectorFromString ([methodName davSetterName]);
|
||||
if (propSel)
|
||||
[setterMap setObject: [NSValue valueWithPointer: propSel]
|
||||
forKey: property];
|
||||
}
|
||||
}
|
||||
|
||||
return propSel;
|
||||
}
|
||||
|
||||
@implementation SOGoObject
|
||||
|
||||
|
||||
Reference in New Issue
Block a user