Monotone-Parent: 34a0500cef031e53eda3a1a6c3b2f626ce8f76dc
Monotone-Revision: f4e8a715d67a12fea729843b1401f636ce05ed66 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-03-16T21:05:41 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
a8cc7409a1
commit
26701b7c71
10
ChangeLog
10
ChangeLog
|
@ -1,5 +1,15 @@
|
|||
2012-03-16 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreGCSFolder.m
|
||||
(-updateVersionsForMessageWithKey:withChangeKey:): new method,
|
||||
common to all GCS messages, that updates the folder cache and
|
||||
insert the PidTagChangeKey provided by the client during the save
|
||||
operations.
|
||||
|
||||
* OpenChange/MAPIStoreGCSMessage.m (-updateVersions): new proxy
|
||||
method for -[MAPIStoreGCSFolder
|
||||
updateVersionsForMessageWithKey:withChangeKey:].
|
||||
|
||||
* OpenChange/MAPIStoreGCSBaseContext.m
|
||||
(+createRootSecondaryFolderWithFID:andName:forUser:): setup the
|
||||
userContext in the MAPIApp object.
|
||||
|
|
|
@ -1064,12 +1064,7 @@
|
|||
if (newParticipationStatus)
|
||||
[sogoObject changeParticipationStatus: newParticipationStatus
|
||||
withDelegate: nil];
|
||||
|
||||
[(MAPIStoreCalendarFolder *) container synchroniseCache];
|
||||
value = [properties objectForKey: MAPIPropertyKey (PR_CHANGE_KEY)];
|
||||
if (value)
|
||||
[(MAPIStoreCalendarFolder *) container
|
||||
setChangeKey: value forMessageWithKey: [self nameInContainer]];
|
||||
[self updateVersions];
|
||||
}
|
||||
|
||||
- (id) lookupAttachment: (NSString *) childKey
|
||||
|
|
|
@ -1157,11 +1157,8 @@ fromProperties: (NSDictionary *) attachmentProps
|
|||
// we save the new/modified card
|
||||
//
|
||||
[sogoObject saveContentString: [newCard versitString]];
|
||||
[(MAPIStoreContactsFolder *) container synchroniseCache];
|
||||
value = [properties objectForKey: MAPIPropertyKey (PR_CHANGE_KEY)];
|
||||
if (value)
|
||||
[(MAPIStoreContactsFolder *) container
|
||||
setChangeKey: value forMessageWithKey: [self nameInContainer]];
|
||||
|
||||
[self updateVersions];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -41,6 +41,8 @@
|
|||
|
||||
/* synchronisation */
|
||||
- (BOOL) synchroniseCache;
|
||||
- (void) updateVersionsForMessageWithKey: (NSString *) messageKey
|
||||
withChangeKey: (NSData *) newChangeKey;
|
||||
- (NSNumber *) lastModifiedFromMessageChangeNumber: (NSNumber *) changeNum;
|
||||
- (NSNumber *) changeNumberForMessageWithKey: (NSString *) messageKey;
|
||||
|
||||
|
|
|
@ -252,7 +252,7 @@ static Class NSNumberK;
|
|||
...
|
||||
};
|
||||
VersionMapping = {
|
||||
Version = MessageKey;
|
||||
Version = last-modified;
|
||||
...
|
||||
}
|
||||
}
|
||||
|
@ -458,6 +458,15 @@ static Class NSNumberK;
|
|||
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (void) updateVersionsForMessageWithKey: (NSString *) messageKey
|
||||
withChangeKey: (NSData *) newChangeKey
|
||||
{
|
||||
[self synchroniseCache];
|
||||
|
||||
if (newChangeKey)
|
||||
[self setChangeKey: newChangeKey forMessageWithKey: messageKey];
|
||||
}
|
||||
|
||||
- (NSNumber *) lastModifiedFromMessageChangeNumber: (NSNumber *) changeNum
|
||||
{
|
||||
|
|
|
@ -29,6 +29,9 @@
|
|||
{
|
||||
}
|
||||
|
||||
/* subclass helpers */
|
||||
- (void) updateVersions;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* MAPISTOREGCSMESSAGE_H */
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
*/
|
||||
|
||||
#import <Foundation/NSCalendarDate.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
#import <NGObjWeb/SoSecurityManager.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
|
@ -204,4 +205,15 @@
|
|||
return version;
|
||||
}
|
||||
|
||||
- (void) updateVersions
|
||||
{
|
||||
NSData *newChangeKey;
|
||||
|
||||
newChangeKey = [properties objectForKey: MAPIPropertyKey (PR_CHANGE_KEY)];
|
||||
|
||||
[(MAPIStoreGCSFolder *) container
|
||||
updateVersionsForMessageWithKey: [self nameInContainer]
|
||||
withChangeKey: newChangeKey];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -462,11 +462,8 @@
|
|||
[vToDo setTimeStampAsDate: now];
|
||||
|
||||
[sogoObject saveContentString: [vCalendar versitString]];
|
||||
[(MAPIStoreTasksFolder *) container synchroniseCache];
|
||||
value = [properties objectForKey: MAPIPropertyKey (PR_CHANGE_KEY)];
|
||||
if (value)
|
||||
[(MAPIStoreTasksFolder *) container
|
||||
setChangeKey: value forMessageWithKey: [self nameInContainer]];
|
||||
|
||||
[self updateVersions];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue