Monotone-Parent: 7a12a4fc3471976029528f54b57e6999eff2b3aa

Monotone-Revision: f43939c9f93e2ae0c474453779ec04d06a04dd8a

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-07-19T19:06:46
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2012-07-19 19:06:46 +00:00
parent 2de531a6cb
commit 4c86e1b09b
5 changed files with 88 additions and 60 deletions

View File

@@ -68,35 +68,6 @@ static Class NSExceptionK, MAPIStoreFolderK;
return newObject;
}
+ (int) getAvailableProperties: (struct SPropTagArray **) propertiesP
inMemCtx: (TALLOC_CTX *) memCtx
{
struct SPropTagArray *properties;
const MAPIStorePropertyGetter *classGetters;
NSUInteger count;
enum MAPITAGS propTag;
uint16_t propValue;
properties = talloc_zero (memCtx, struct SPropTagArray);
properties->aulPropTag = talloc_array (properties, enum MAPITAGS,
MAPIStoreSupportedPropertiesCount);
classGetters = MAPIStorePropertyGettersForClass (self);
for (count = 0; count < MAPIStoreSupportedPropertiesCount; count++)
{
propTag = MAPIStoreSupportedProperties[count];
propValue = (propTag & 0xffff0000) >> 16;
if (classGetters[propValue])
{
properties->aulPropTag[properties->cValues] = propTag;
properties->cValues++;
}
}
*propertiesP = properties;
return MAPISTORE_SUCCESS;
}
- (id) init
{
if ((self = [super init]))
@@ -204,31 +175,6 @@ static Class NSExceptionK, MAPIStoreFolderK;
return MAPISTORE_SUCCESS;
}
- (int) getAvailableProperties: (struct SPropTagArray **) propertiesP
inMemCtx: (TALLOC_CTX *) memCtx
{
NSUInteger count;
struct SPropTagArray *availableProps;
enum MAPITAGS propTag;
availableProps = talloc_zero (memCtx, struct SPropTagArray);
availableProps->aulPropTag = talloc_array (availableProps, enum MAPITAGS,
MAPIStoreSupportedPropertiesCount);
for (count = 0; count < MAPIStoreSupportedPropertiesCount; count++)
{
propTag = MAPIStoreSupportedProperties[count];
if ([self canGetProperty: propTag])
{
availableProps->aulPropTag[availableProps->cValues] = propTag;
availableProps->cValues++;
}
}
*propertiesP = availableProps;
return MAPISTORE_SUCCESS;
}
- (BOOL) canGetProperty: (enum MAPITAGS) propTag
{
uint16_t propValue;