Monotone-Parent: 674dec9c0680a0ce5418d7dc05b15bc69a65f379
Monotone-Revision: 5cdce5bcdd485012bf16a49a2dd5dfddaae270c0 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-10-27T16:01:51 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
14eaf1f7fa
commit
e06056d625
|
@ -16,6 +16,9 @@
|
|||
|
||||
* OpenChange/MAPIStoreVolatileMessage.m: MAPIStoreMemMessage renamed
|
||||
to MAPIStoreVolatileMessage.
|
||||
(-getAvailableProperties:inMemCtx:) removed obsolete method.
|
||||
(-init): creationTime and lastModificationTime are now ivars.
|
||||
(-lookupAttachment:): implemented manadatory method.
|
||||
|
||||
* OpenChange/SOGoMAPIVolatileMessage.m: SOGoMAPIMemMessage renamed
|
||||
to SOGoMAPIVolatileMessage.
|
||||
|
|
|
@ -120,6 +120,22 @@
|
|||
return (attMessage ? MAPISTORE_SUCCESS : MAPISTORE_ERROR);
|
||||
}
|
||||
|
||||
- (NSDate *) creationTime
|
||||
{
|
||||
return [container creationTime];
|
||||
}
|
||||
|
||||
- (NSDate *) lastModificationTime
|
||||
{
|
||||
return [container lastModificationTime];
|
||||
}
|
||||
|
||||
- (uint64_t) objectVersion
|
||||
{
|
||||
/* attachments have no version number */
|
||||
return ULLONG_MAX;
|
||||
}
|
||||
|
||||
/* subclasses */
|
||||
- (MAPIStoreAttachmentMessage *) openEmbeddedMessage
|
||||
{
|
||||
|
|
|
@ -192,14 +192,4 @@
|
|||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (NSDate *) creationTime
|
||||
{
|
||||
return [[container sogoObject] date];
|
||||
}
|
||||
|
||||
- (NSDate *) lastModificationTime
|
||||
{
|
||||
return [[container sogoObject] date];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
@interface MAPIStoreVolatileMessage : MAPIStoreMessage
|
||||
{
|
||||
BOOL fetchedAttachments;
|
||||
NSDate *creationTime;
|
||||
NSDate *lastModificationTime;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -64,11 +64,22 @@ Class NSNumberK;
|
|||
- (id) init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
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];
|
||||
|
|
Loading…
Reference in New Issue