mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-02 21:56:23 +00:00
Monotone-Parent: 98084e25c04125bc23a53907661020b8ac004a5d
Monotone-Revision: da065094ec85a862e2b55a9d2a9344f023a1495d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-07-27T22:04:49 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#import <Foundation/NSData.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
|
||||
#import "MAPIStoreContext.h"
|
||||
#import "MAPIStorePropertySelectors.h"
|
||||
#import "MAPIStoreTypes.h"
|
||||
#import "NSObject+MAPIStore.h"
|
||||
@@ -33,6 +34,7 @@
|
||||
#import "MAPIStoreFSMessage.h"
|
||||
|
||||
#undef DEBUG
|
||||
#include <mapistore/mapistore.h>
|
||||
#include <mapistore/mapistore_errors.h>
|
||||
|
||||
@implementation MAPIStoreFSMessage
|
||||
@@ -72,6 +74,15 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (uint64_t) objectVersion
|
||||
{
|
||||
NSNumber *version;
|
||||
|
||||
version = [[sogoObject properties] objectForKey: @"version"];
|
||||
|
||||
return exchange_globcnt ([version unsignedLongLongValue]);
|
||||
}
|
||||
|
||||
- (int) getProperty: (void **) data
|
||||
withTag: (enum MAPITAGS) propTag
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
@@ -176,8 +187,14 @@
|
||||
|
||||
- (void) save
|
||||
{
|
||||
uint64_t newVersion;
|
||||
|
||||
if ([attachmentKeys count] > 0)
|
||||
[newProperties setObject: attachmentParts forKey: @"attachments"];
|
||||
|
||||
newVersion = exchange_globcnt ([[self context] getNewChangeNumber] >> 16);
|
||||
[newProperties setObject: [NSNumber numberWithUnsignedLongLong: newVersion]
|
||||
forKey: @"version"];
|
||||
[sogoObject appendProperties: newProperties];
|
||||
[sogoObject save];
|
||||
[self resetNewProperties];
|
||||
|
||||
Reference in New Issue
Block a user