Monotone-Parent: b8881b30a3439916d39b400a9de1a5565d442b45

Monotone-Revision: 469e9b126515b386d9640628549236a84910376f

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-12-13T16:51:48
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2010-12-13 16:51:48 +00:00
parent feeb211abd
commit 55dc8abff8
3 changed files with 15 additions and 8 deletions

View File

@ -1,5 +1,9 @@
2010-12-13 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/MAPIStoreTypes.h (MAPIPropertyKey): renamed from
MAPIPropertyNumber, changed behaviour to only take the 2 msb into
account to generate a value key.
* OpenChange/NSData+MAPIStore.m (-asShortBinaryInMemCtx:): new
corrolary method to +dataWithShortBinary:.

View File

@ -6,7 +6,7 @@
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
@ -40,12 +40,12 @@ id NSObjectFromMAPISPropValue (const struct mapi_SPropValue *);
id NSObjectFromStreamData (enum MAPITAGS property, NSData *streamData);
static inline NSNumber *
MAPIPropertyNumber (enum MAPITAGS propTag)
MAPIPropertyKey (enum MAPITAGS propTag)
{
#if (GS_SIZEOF_LONG == 4)
return [NSNumber numberWithUnsignedLong: propTag];
return [NSNumber numberWithUnsignedLong: (propTag & 0xffff0000) >> 16];
#elif (GS_SIZEOF_INT == 4)
return [NSNumber numberWithUnsignedInt: propTag];
return [NSNumber numberWithUnsignedInt: (propTag & 0xffff0000) >> 16];
#else
#error No suitable type for 4 bytes integers
#endif

View File

@ -6,7 +6,7 @@
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
@ -122,7 +122,8 @@ NSObjectFromMAPISPropValue (const struct mapi_SPropValue *value)
// #define PT_SRESTRICT 0xFD
// #define PT_ACTIONS 0xFE
result = [NSNull null];
NSLog (@"object type not handled: %d (0x.4x)", valueType, valueType);
NSLog (@"%s: object type not handled: %d (0x%.4x)",
__PRETTY_FUNCTION__, valueType, valueType);
}
return result;
@ -181,7 +182,8 @@ NSObjectFromSPropValue (const struct SPropValue *value)
// #define PT_SRESTRICT 0xFD
// #define PT_ACTIONS 0xFE
result = [NSNull null];
NSLog (@"object type not handled: %d (0x.4x)", valueType, valueType);
NSLog (@"%s: object type not handled: %d (0x%.4x)",
__PRETTY_FUNCTION__, valueType, valueType);
}
return result;
@ -204,7 +206,8 @@ id NSObjectFromStreamData (enum MAPITAGS property, NSData* streamData)
break;
case PT_OBJECT:
result = [NSNull null];
NSLog (@"object type not handled: %d (0x.4x)", valueType, valueType);
NSLog (@"%s: object type not handled: %d (0x%.4x)",
__PRETTY_FUNCTION__, valueType, valueType);
break;
default:
[NSException raise: @"MAPIStoreStreamTypeException"