Monotone-Parent: f097a1cc5cb254dca09ba971f32de7339f109a97
Monotone-Revision: e356443889853160f98a31849aede88bc4bac6bd Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-12-30T14:49:54 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
4e60090b52
commit
a18e6f3dbf
|
@ -1,5 +1,13 @@
|
||||||
2010-12-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2010-12-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreTypes.m (MAPIDoubleValue): new wrapper
|
||||||
|
methods for generating data of "double" type.
|
||||||
|
(NSObjectFromMAPISPropValue, NSObjectFromSPropValue): now handle
|
||||||
|
the PT_CLSID mapi type.
|
||||||
|
(
|
||||||
|
(MAPIStoreDumpMessageProperties): enhanced logging of property
|
||||||
|
keys.
|
||||||
|
|
||||||
* OpenChange/NSData+MAPIStore.m (+dataWithFlatUID)
|
* OpenChange/NSData+MAPIStore.m (+dataWithFlatUID)
|
||||||
(-asFlatUIDInMemCtx:, +dataWithGUID:, asGUIDInMemCtx:): new
|
(-asFlatUIDInMemCtx:, +dataWithGUID:, asGUIDInMemCtx:): new
|
||||||
methods for handling the two GUID mapistore types.
|
methods for handling the two GUID mapistore types.
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
uint8_t *MAPIBoolValue (void *memCtx, BOOL value);
|
uint8_t *MAPIBoolValue (void *memCtx, BOOL value);
|
||||||
uint32_t *MAPILongValue (void *memCtx, uint32_t value);
|
uint32_t *MAPILongValue (void *memCtx, uint32_t value);
|
||||||
uint64_t *MAPILongLongValue (void *memCtx, uint64_t value);
|
uint64_t *MAPILongLongValue (void *memCtx, uint64_t value);
|
||||||
|
double *MAPIDoubleValue (void *memCtx, double value);
|
||||||
|
|
||||||
id NSObjectFromSPropValue (const struct SPropValue *);
|
id NSObjectFromSPropValue (const struct SPropValue *);
|
||||||
id NSObjectFromMAPISPropValue (const struct mapi_SPropValue *);
|
id NSObjectFromMAPISPropValue (const struct mapi_SPropValue *);
|
||||||
|
|
|
@ -71,6 +71,17 @@ MAPILongLongValue (void *memCtx, uint64_t value)
|
||||||
return llongValue;
|
return llongValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double *
|
||||||
|
MAPIDoubleValue (void *memCtx, double value)
|
||||||
|
{
|
||||||
|
double *doubleValue;
|
||||||
|
|
||||||
|
doubleValue = talloc_zero (memCtx, double);
|
||||||
|
*doubleValue = value;
|
||||||
|
|
||||||
|
return doubleValue;
|
||||||
|
}
|
||||||
|
|
||||||
id
|
id
|
||||||
NSObjectFromMAPISPropValue (const struct mapi_SPropValue *value)
|
NSObjectFromMAPISPropValue (const struct mapi_SPropValue *value)
|
||||||
{
|
{
|
||||||
|
@ -105,10 +116,12 @@ NSObjectFromMAPISPropValue (const struct mapi_SPropValue *value)
|
||||||
result = [NSCalendarDate dateFromFileTime: &(value->value.ft)];
|
result = [NSCalendarDate dateFromFileTime: &(value->value.ft)];
|
||||||
break;
|
break;
|
||||||
case PT_BINARY:
|
case PT_BINARY:
|
||||||
// lpProps->value.bin = *((const struct Binary_r *)data);
|
|
||||||
|
|
||||||
result = [NSData dataWithShortBinary: &value->value.bin];
|
result = [NSData dataWithShortBinary: &value->value.bin];
|
||||||
break;
|
break;
|
||||||
|
case PT_CLSID:
|
||||||
|
result = [NSData dataWithGUID: &value->value.lpguid];
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// #define PT_UNSPECIFIED 0x0
|
// #define PT_UNSPECIFIED 0x0
|
||||||
// #define PT_I2 0x2
|
// #define PT_I2 0x2
|
||||||
|
@ -117,7 +130,6 @@ NSObjectFromMAPISPropValue (const struct mapi_SPropValue *value)
|
||||||
// #define PT_ERROR 0xa
|
// #define PT_ERROR 0xa
|
||||||
// #define PT_OBJECT 0xd
|
// #define PT_OBJECT 0xd
|
||||||
// #define PT_I8 0x14
|
// #define PT_I8 0x14
|
||||||
// #define PT_CLSID 0x48
|
|
||||||
// #define PT_SVREID 0xFB
|
// #define PT_SVREID 0xFB
|
||||||
// #define PT_SRESTRICT 0xFD
|
// #define PT_SRESTRICT 0xFD
|
||||||
// #define PT_ACTIONS 0xFE
|
// #define PT_ACTIONS 0xFE
|
||||||
|
@ -169,6 +181,10 @@ NSObjectFromSPropValue (const struct SPropValue *value)
|
||||||
= [NSData dataWithBinary:
|
= [NSData dataWithBinary:
|
||||||
(const struct Binary_r *) &(value->value.bin)];
|
(const struct Binary_r *) &(value->value.bin)];
|
||||||
break;
|
break;
|
||||||
|
case PT_CLSID:
|
||||||
|
result = [NSData dataWithFlatUID: value->value.lpguid];
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// #define PT_UNSPECIFIED 0x0
|
// #define PT_UNSPECIFIED 0x0
|
||||||
// #define PT_I2 0x2
|
// #define PT_I2 0x2
|
||||||
|
@ -177,7 +193,6 @@ NSObjectFromSPropValue (const struct SPropValue *value)
|
||||||
// #define PT_ERROR 0xa
|
// #define PT_ERROR 0xa
|
||||||
// #define PT_OBJECT 0xd
|
// #define PT_OBJECT 0xd
|
||||||
// #define PT_I8 0x14
|
// #define PT_I8 0x14
|
||||||
// #define PT_CLSID 0x48
|
|
||||||
// #define PT_SVREID 0xFB
|
// #define PT_SVREID 0xFB
|
||||||
// #define PT_SRESTRICT 0xFD
|
// #define PT_SRESTRICT 0xFD
|
||||||
// #define PT_ACTIONS 0xFE
|
// #define PT_ACTIONS 0xFE
|
||||||
|
@ -224,7 +239,6 @@ MAPIStoreDumpMessageProperties (NSDictionary *properties)
|
||||||
NSNumber *key;
|
NSNumber *key;
|
||||||
NSArray *allKeys;
|
NSArray *allKeys;
|
||||||
NSUInteger keyAsInt, count, max;
|
NSUInteger keyAsInt, count, max;
|
||||||
const char *name;
|
|
||||||
id value;
|
id value;
|
||||||
|
|
||||||
allKeys = [properties allKeys];
|
allKeys = [properties allKeys];
|
||||||
|
@ -243,12 +257,9 @@ MAPIStoreDumpMessageProperties (NSDictionary *properties)
|
||||||
{
|
{
|
||||||
keyAsInt = [key intValue];
|
keyAsInt = [key intValue];
|
||||||
value = [properties objectForKey: key];
|
value = [properties objectForKey: key];
|
||||||
name = get_proptag_name (keyAsInt);
|
NSLog (@" 0x%.4x: %@ (%@)",
|
||||||
if (!name)
|
keyAsInt, value,
|
||||||
name = "unknown";
|
NSStringFromClass ([value class]));
|
||||||
NSLog (@" 0x%.8x (%s): %@ (%@)",
|
|
||||||
keyAsInt, name,
|
|
||||||
value, NSStringFromClass ([value class]));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue