Monotone-Parent: 7717958c228c80920ba54d6300d040c7112bb646

Monotone-Revision: 1d682aef2107f2caaabd5b6b0afaf25a817fdaf9

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-11-23T14:50:25
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2010-11-23 14:50:25 +00:00
parent 5e8a31d900
commit 8b13fb5756
2 changed files with 12 additions and 1 deletions
+3
View File
@@ -1,5 +1,8 @@
2010-11-23 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/MAPIStoreTypes.m (NSObjectFromSPropValue): added
support for "PT_BINARY".
* OpenChange/NSData+MAPIStore.m (+dataWithBinary:): new
constructor for generating an NSData instance from a struct
Binary_r *.
+9 -1
View File
@@ -32,6 +32,7 @@
#import <Foundation/NSNull.h>
#import <Foundation/NSString.h>
#import "NSData+MAPIStore.h"
#import "NSCalendarDate+MAPIStore.h"
#import "MAPIStoreTypes.h"
@@ -102,6 +103,13 @@ NSObjectFromSPropValue (const struct SPropValue *value)
case PT_SYSTIME:
result = [NSCalendarDate dateFromFileTime: &(value->value.ft)];
break;
case PT_BINARY:
// lpProps->value.bin = *((const struct Binary_r *)data);
result
= [NSData dataWithBinary:
(const struct Binary_r *) &(value->value.bin)];
break;
default:
// #define PT_UNSPECIFIED 0x0
// #define PT_I2 0x2
@@ -116,7 +124,7 @@ NSObjectFromSPropValue (const struct SPropValue *value)
// #define PT_ACTIONS 0xFE
// #define PT_BINARY 0x102
result = [NSNull null];
NSLog (@"object type not handled: %d", valueType);
NSLog (@"object type not handled: %d (0x.4x)", valueType, valueType);
}
return result;