mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-07 14:28:52 +00:00
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:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user