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
|
* OpenChange/MAPIStoreVolatileMessage.m: MAPIStoreMemMessage renamed
|
||||||
to MAPIStoreVolatileMessage.
|
to MAPIStoreVolatileMessage.
|
||||||
|
(-getAvailableProperties:inMemCtx:) removed obsolete method.
|
||||||
|
(-init): creationTime and lastModificationTime are now ivars.
|
||||||
|
(-lookupAttachment:): implemented manadatory method.
|
||||||
|
|
||||||
* OpenChange/SOGoMAPIVolatileMessage.m: SOGoMAPIMemMessage renamed
|
* OpenChange/SOGoMAPIVolatileMessage.m: SOGoMAPIMemMessage renamed
|
||||||
to SOGoMAPIVolatileMessage.
|
to SOGoMAPIVolatileMessage.
|
||||||
|
|
|
@ -120,6 +120,22 @@
|
||||||
return (attMessage ? MAPISTORE_SUCCESS : MAPISTORE_ERROR);
|
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 */
|
/* subclasses */
|
||||||
- (MAPIStoreAttachmentMessage *) openEmbeddedMessage
|
- (MAPIStoreAttachmentMessage *) openEmbeddedMessage
|
||||||
{
|
{
|
||||||
|
|
|
@ -192,14 +192,4 @@
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSDate *) creationTime
|
|
||||||
{
|
|
||||||
return [[container sogoObject] date];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSDate *) lastModificationTime
|
|
||||||
{
|
|
||||||
return [[container sogoObject] date];
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
@interface MAPIStoreVolatileMessage : MAPIStoreMessage
|
@interface MAPIStoreVolatileMessage : MAPIStoreMessage
|
||||||
{
|
{
|
||||||
BOOL fetchedAttachments;
|
BOOL fetchedAttachments;
|
||||||
|
NSDate *creationTime;
|
||||||
|
NSDate *lastModificationTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -64,11 +64,22 @@ Class NSNumberK;
|
||||||
- (id) init
|
- (id) init
|
||||||
{
|
{
|
||||||
if ((self = [super init]))
|
if ((self = [super init]))
|
||||||
fetchedAttachments = NO;
|
{
|
||||||
|
fetchedAttachments = NO;
|
||||||
|
ASSIGN (creationTime, [NSDate date]);
|
||||||
|
lastModificationTime = [creationTime copy];
|
||||||
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) dealloc
|
||||||
|
{
|
||||||
|
[creationTime release];
|
||||||
|
[lastModificationTime release];
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
- (int) addPropertiesFromRow: (struct SRow *) aRow
|
- (int) addPropertiesFromRow: (struct SRow *) aRow
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
@ -78,6 +89,7 @@ Class NSNumberK;
|
||||||
{
|
{
|
||||||
[sogoObject appendProperties: properties];
|
[sogoObject appendProperties: properties];
|
||||||
[properties removeAllObjects];
|
[properties removeAllObjects];
|
||||||
|
ASSIGN (lastModificationTime, [NSDate date]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -88,6 +100,7 @@ Class NSNumberK;
|
||||||
[super addProperties: newProperties];
|
[super addProperties: newProperties];
|
||||||
[sogoObject appendProperties: newProperties];
|
[sogoObject appendProperties: newProperties];
|
||||||
[properties removeAllObjects];
|
[properties removeAllObjects];
|
||||||
|
ASSIGN (lastModificationTime, [NSDate date]);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (uint64_t) objectVersion
|
- (uint64_t) objectVersion
|
||||||
|
@ -149,38 +162,6 @@ Class NSNumberK;
|
||||||
return rc;
|
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
|
- (NSArray *) attachmentsKeysMatchingQualifier: (EOQualifier *) qualifier
|
||||||
andSortOrderings: (NSArray *) sortOrderings
|
andSortOrderings: (NSArray *) sortOrderings
|
||||||
{
|
{
|
||||||
|
@ -213,6 +194,21 @@ Class NSNumberK;
|
||||||
andSortOrderings: sortOrderings];
|
andSortOrderings: sortOrderings];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSDate *) creationTime
|
||||||
|
{
|
||||||
|
return creationTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSDate *) lastModificationTime
|
||||||
|
{
|
||||||
|
return lastModificationTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (id) lookupAttachment: (NSString *) childKey
|
||||||
|
{
|
||||||
|
return [attachmentParts objectForKey: childKey];
|
||||||
|
}
|
||||||
|
|
||||||
- (void) save
|
- (void) save
|
||||||
{
|
{
|
||||||
[self subclassResponsibility: _cmd];
|
[self subclassResponsibility: _cmd];
|
||||||
|
|
Loading…
Reference in New Issue