Monotone-Parent: 674dec9c0680a0ce5418d7dc05b15bc69a65f379

Monotone-Revision: 5cdce5bcdd485012bf16a49a2dd5dfddaae270c0

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-10-27T16:01:51
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2011-10-27 16:01:51 +00:00
parent 14eaf1f7fa
commit e06056d625
5 changed files with 50 additions and 43 deletions

View File

@@ -64,11 +64,22 @@ Class NSNumberK;
- (id) init
{
if ((self = [super init]))
fetchedAttachments = NO;
{
fetchedAttachments = NO;
ASSIGN (creationTime, [NSDate date]);
lastModificationTime = [creationTime copy];
}
return self;
}
- (void) dealloc
{
[creationTime release];
[lastModificationTime release];
[super dealloc];
}
- (int) addPropertiesFromRow: (struct SRow *) aRow
{
int rc;
@@ -78,6 +89,7 @@ Class NSNumberK;
{
[sogoObject appendProperties: properties];
[properties removeAllObjects];
ASSIGN (lastModificationTime, [NSDate date]);
}
return rc;
@@ -88,6 +100,7 @@ Class NSNumberK;
[super addProperties: newProperties];
[sogoObject appendProperties: newProperties];
[properties removeAllObjects];
ASSIGN (lastModificationTime, [NSDate date]);
}
- (uint64_t) objectVersion
@@ -149,38 +162,6 @@ Class NSNumberK;
return rc;
}
- (int) getAvailableProperties: (struct SPropTagArray **) propertiesP
inMemCtx: (TALLOC_CTX *) memCtx
{
NSArray *keys;
NSUInteger count, max;
NSString *key;
struct SPropTagArray *availableProps;
keys = [[sogoObject properties] allKeys];
max = [keys count];
availableProps = talloc_zero (NULL, struct SPropTagArray);
availableProps->cValues = max;
availableProps->aulPropTag = talloc_array (availableProps, enum MAPITAGS, max);
for (count = 0; count < max; count++)
{
key = [keys objectAtIndex: count];
if ([key isKindOfClass: NSNumberK])
{
#if (GS_SIZEOF_LONG == 4)
availableProps->aulPropTag[count] = [[keys objectAtIndex: count] unsignedLongValue];
#elif (GS_SIZEOF_INT == 4)
availableProps->aulPropTag[count] = [[keys objectAtIndex: count] unsignedIntValue];
#endif
}
}
*propertiesP = availableProps;
return MAPISTORE_SUCCESS;
}
- (NSArray *) attachmentsKeysMatchingQualifier: (EOQualifier *) qualifier
andSortOrderings: (NSArray *) sortOrderings
{
@@ -213,6 +194,21 @@ Class NSNumberK;
andSortOrderings: sortOrderings];
}
- (NSDate *) creationTime
{
return creationTime;
}
- (NSDate *) lastModificationTime
{
return lastModificationTime;
}
- (id) lookupAttachment: (NSString *) childKey
{
return [attachmentParts objectForKey: childKey];
}
- (void) save
{
[self subclassResponsibility: _cmd];