Monotone-Parent: 56370c6160c963011c084c7793dbe96aef748e92
Monotone-Revision: 3a115c300e05230d3e0392a7aa86ccee296f50cc Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-11-22T19:43:46 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
bbc52412ef
commit
5c7d7aa062
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
* OpenChange/NSArray+MAPIStore.m (-asMVUnicodeInMemCtx:) renamed
|
* OpenChange/NSArray+MAPIStore.m (-asMVUnicodeInMemCtx:) renamed
|
||||||
from "asArrayOfUnicodeStringsInCtx".
|
from "asArrayOfUnicodeStringsInCtx".
|
||||||
|
(-asMVUnicodeInMemCtx:): new conversion method.
|
||||||
|
|
||||||
* OpenChange/MAPIStoreTypes.m (NSObjectFromValuePointer):
|
* OpenChange/MAPIStoreTypes.m (NSObjectFromValuePointer):
|
||||||
simplified method by using set_SPropValue_proptag and
|
simplified method by using set_SPropValue_proptag and
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
+ (id) arrayFromMVUnicode: (const struct WStringArray_r *) mvUnicode;
|
+ (id) arrayFromMVUnicode: (const struct WStringArray_r *) mvUnicode;
|
||||||
- (struct WStringArray_r *) asMVUnicodeInMemCtx: (void *) memCtx;
|
- (struct WStringArray_r *) asMVUnicodeInMemCtx: (void *) memCtx;
|
||||||
+ (id) arrayFromMVBinary: (const struct BinaryArray_r *) mvBinary;
|
+ (id) arrayFromMVBinary: (const struct BinaryArray_r *) mvBinary;
|
||||||
|
- (struct BinaryArray_r *) asMVBinaryInMemCtx: (void *) memCtx;
|
||||||
+ (id) arrayFromMVGuid: (const struct FlatUIDArray_r *) mvGuid;
|
+ (id) arrayFromMVGuid: (const struct FlatUIDArray_r *) mvGuid;
|
||||||
+ (id) arrayFromMVFileTime: (const struct DateTimeArray_r *) mvGuid;
|
+ (id) arrayFromMVFileTime: (const struct DateTimeArray_r *) mvGuid;
|
||||||
|
|
||||||
|
|
|
@ -230,6 +230,28 @@
|
||||||
return mvResult;
|
return mvResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (struct BinaryArray_r *) asMVBinaryInMemCtx: (void *) memCtx
|
||||||
|
{
|
||||||
|
struct BinaryArray_r *list;
|
||||||
|
NSData *data;
|
||||||
|
NSInteger count, max;
|
||||||
|
|
||||||
|
max = [self count];
|
||||||
|
|
||||||
|
list = talloc_zero(memCtx,struct BinaryArray_r);
|
||||||
|
list->cValues = max;
|
||||||
|
list->lpbin = talloc_array(list, struct Binary_r, max);
|
||||||
|
|
||||||
|
for (count = 0; count < max; count++)
|
||||||
|
{
|
||||||
|
data = [self objectAtIndex: count];
|
||||||
|
list->lpbin[count].cb = [data length];
|
||||||
|
list->lpbin[count].lpb = talloc_memdup (list->lpbin, [data bytes], list->lpbin[count].cb);
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
+ (id) arrayFromMVGuid: (const struct FlatUIDArray_r *) mvGuid
|
+ (id) arrayFromMVGuid: (const struct FlatUIDArray_r *) mvGuid
|
||||||
{
|
{
|
||||||
NSUInteger count;
|
NSUInteger count;
|
||||||
|
|
|
@ -115,6 +115,9 @@ static int MAPIStoreTallocWrapperDestroy (void *data)
|
||||||
case PT_MV_UNICODE:
|
case PT_MV_UNICODE:
|
||||||
*data = [(NSArray *) self asMVUnicodeInMemCtx: memCtx];
|
*data = [(NSArray *) self asMVUnicodeInMemCtx: memCtx];
|
||||||
break;
|
break;
|
||||||
|
case PT_MV_BINARY:
|
||||||
|
*data = [(NSArray *) self asMVBinaryInMemCtx: memCtx];
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
[self errorWithFormat: @"object type not handled: %d (0x%.4x)",
|
[self errorWithFormat: @"object type not handled: %d (0x%.4x)",
|
||||||
|
|
Loading…
Reference in a new issue