mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-12 10:21:22 +00:00
oc-db: Store version number instead of CN
To be able to search in this for every kind of operator. As we cannot do a migration, we have to add a new key to the property dictionary (@"version_number") which stores the version: version = exchange_globcnt(CN >> 16) Instead of the CN structure which is stored in @"version" key. This way we can do searches for CN to download only missing data from the given state of the client for this kind of messages.
This commit is contained in:
@@ -61,14 +61,15 @@ static Class MAPIStoreDBMessageK = Nil;
|
||||
|
||||
if ((uint32_t) res->ulPropTag == PidTagChangeNumber)
|
||||
{
|
||||
SEL operator;
|
||||
|
||||
value = NSObjectFromMAPISPropValue (&res->lpProp);
|
||||
cVersion = exchange_globcnt (([value unsignedLongLongValue] >> 16)
|
||||
& 0x0000ffffffffffffLL);
|
||||
version = [NSNumber numberWithUnsignedLongLong: cVersion];
|
||||
//[self logWithFormat: @"change number from oxcfxics: %.16lx", [value unsignedLongLongValue]];
|
||||
[self logWithFormat: @" version: %.16lx", cVersion];
|
||||
*qualifier = [[EOKeyValueQualifier alloc] initWithKey: @"version"
|
||||
operatorSelector: EOQualifierOperatorGreaterThanOrEqualTo
|
||||
operator = [self operatorFromRestrictionOperator: res->relop];
|
||||
*qualifier = [[EOKeyValueQualifier alloc] initWithKey: @"version_number"
|
||||
operatorSelector: operator
|
||||
value: version];
|
||||
[*qualifier autorelease];
|
||||
rc = MAPIRestrictionStateNeedsEval;
|
||||
|
||||
Reference in New Issue
Block a user