Monotone-Parent: bde45b38158c1c9e5e5c05c00ef16e0ceb81c789

Monotone-Revision: 6cff836762bb35cb6c26ae5eb215e6ff131d480d

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-12-03T22:31:56
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2010-12-03 22:31:56 +00:00
parent b00c13ccde
commit ea8e2574a6
8 changed files with 995 additions and 186 deletions

View File

@@ -20,6 +20,8 @@
* Boston, MA 02111-1307, USA.
*/
#import <Foundation/NSDictionary.h>
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGCards/iCalToDo.h>
@@ -176,4 +178,42 @@
return newEntry;
}
- (NSString *) backendIdentifierForProperty: (enum MAPITAGS) property
{
static NSMutableDictionary *knownProperties = nil;
if (!knownProperties)
{
knownProperties = [NSMutableDictionary new];
}
return [knownProperties objectForKey: MAPIPropertyNumber (property)];
}
/* restrictions */
- (MAPIRestrictionState) evaluatePropertyRestriction: (struct mapi_SPropertyRestriction *) res
intoQualifier: (EOQualifier **) qualifier
{
MAPIRestrictionState rc;
id value;
value = NSObjectFromMAPISPropValue (&res->lpProp);
switch (res->ulPropTag)
{
case PR_MESSAGE_CLASS_UNICODE:
if ([value isKindOfClass: [NSString class]]
&& [value isEqualToString: @"IPM.Task"])
rc = MAPIRestrictionStateAlwaysTrue;
else
rc = MAPIRestrictionStateAlwaysFalse;
break;
default:
rc = [super evaluatePropertyRestriction: res intoQualifier: qualifier];
}
return rc;
}
@end