Monotone-Parent: e2fd5b7d6dbc16ef0f63bc708e3594f79cb126a0
Monotone-Revision: c719bad753884d3a6d304371bd3da1fe92ae26a9 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-12-14T20:55:53 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
d6e8ac4010
commit
b428b0a035
|
@ -1,5 +1,9 @@
|
|||
2010-12-14 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreMailContext.m
|
||||
(-evaluateContentRestriction:intoQualifier:): new overriden method
|
||||
handling tests on the PR_MESSAGE_CLASS_UNICODE property.
|
||||
|
||||
* OpenChange/EOQualifier+MAPIFS.m (-[EOBitmaskQualifier
|
||||
_evaluateMAPIFSMessageProperties:]): new method adapted to the new
|
||||
class below.
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#import <Foundation/NSCalendarDate.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSException.h>
|
||||
|
||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||
|
||||
|
@ -51,8 +52,16 @@
|
|||
#include <mapistore/mapistore.h>
|
||||
#include <mapistore/mapistore_errors.h>
|
||||
|
||||
static Class NSDataK, NSStringK;
|
||||
|
||||
@implementation MAPIStoreMailContext
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
NSDataK = [NSData class];
|
||||
NSStringK = [NSString class];
|
||||
}
|
||||
|
||||
+ (NSString *) MAPIModuleName
|
||||
{
|
||||
return @"mail";
|
||||
|
@ -588,6 +597,39 @@
|
|||
return rc;
|
||||
}
|
||||
|
||||
- (MAPIRestrictionState) evaluateContentRestriction: (struct mapi_SContentRestriction *) res
|
||||
intoQualifier: (EOQualifier **) qualifier
|
||||
{
|
||||
MAPIRestrictionState rc;
|
||||
id value;
|
||||
|
||||
value = NSObjectFromMAPISPropValue (&res->lpProp);
|
||||
if ([value isKindOfClass: NSDataK])
|
||||
{
|
||||
value = [[NSString alloc] initWithData: value
|
||||
encoding: NSUTF8StringEncoding];
|
||||
[value autorelease];
|
||||
}
|
||||
else if (![value isKindOfClass: NSStringK])
|
||||
[NSException raise: @"MAPIStoreTypeConversionException"
|
||||
format: @"unhandled content restriction for class '%@'",
|
||||
NSStringFromClass ([value class])];
|
||||
|
||||
switch (res->ulPropTag)
|
||||
{
|
||||
case PR_MESSAGE_CLASS_UNICODE:
|
||||
if ([value isEqualToString: @"IPM.Note"])
|
||||
rc = MAPIRestrictionStateAlwaysTrue;
|
||||
else
|
||||
rc = MAPIRestrictionStateAlwaysFalse;
|
||||
break;
|
||||
default:
|
||||
rc = [super evaluateContentRestriction: res intoQualifier: qualifier];
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (MAPIRestrictionState) evaluateExistRestriction: (struct mapi_SExistRestriction *) res
|
||||
intoQualifier: (EOQualifier **) qualifier
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue