Monotone-Parent: 2434c6ad1961a254ac8fb9c01f787ace6e863ae3

Monotone-Revision: 42c7ffe1a106a44025c36523e969a629541821f7

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-02-14T23:44:47
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2011-02-14 23:44:47 +00:00
parent 1b3dbb4be0
commit 86f3455070
5 changed files with 138 additions and 49 deletions

View File

@@ -27,14 +27,11 @@
#import "EOQualifier+MAPIFS.h"
#import "MAPIStoreTypes.h"
#import "NSObject+MAPIStore.h"
#import "SOGoMAPIFSFolder.h"
#import "SOGoMAPIFSMessage.h"
#import "MAPIStoreFSMessageTable.h"
#import "NSCalendarDate+MAPIStore.h"
#import "NSData+MAPIStore.h"
#import "NSString+MAPIStore.h"
#import "NSValue+MAPIStore.h"
#undef DEBUG
#include <mapistore/mapistore.h>
@@ -47,57 +44,14 @@
{
NSDictionary *properties;
SOGoMAPIFSMessage *child;
uint16_t valueType;
id value;
int rc;
rc = MAPI_E_SUCCESS;
enum MAPISTATUS rc;
child = [self lookupChild: childKey];
properties = [child properties];
value = [properties objectForKey: MAPIPropertyKey (propTag)];
if (value)
{
// [self logWithFormat: @"property %.8x found", propTag];
valueType = (propTag & 0xffff);
switch (valueType)
{
case PT_NULL:
*data = NULL;
break;
case PT_SHORT:
*data = [value asShortInMemCtx: memCtx];
break;
case PT_LONG:
*data = [value asLongInMemCtx: memCtx];
break;
case PT_BOOLEAN:
*data = [value asBooleanInMemCtx: memCtx];
break;
case PT_DOUBLE:
*data = [value asDoubleInMemCtx: memCtx];
break;
case PT_UNICODE:
case PT_STRING8:
*data = [value asUnicodeInMemCtx: memCtx];
break;
case PT_SYSTIME:
*data = [value asFileTimeInMemCtx: memCtx];
break;
case PT_BINARY:
*data = [value asShortBinaryInMemCtx: memCtx];
break;
case PT_CLSID:
*data = [value asGUIDInMemCtx: memCtx];
break;
default:
[self errorWithFormat: @"object type not handled: %d (0x%.4x)",
valueType, valueType];
*data = NULL;
rc = MAPI_E_NO_SUPPORT;
}
}
rc = [value getMAPIValue: data forTag: propTag inMemCtx: memCtx];
else
rc = [super getChildProperty: data forKey: childKey withTag: propTag];