|
From: deloptes <del...@ya...> - 2011-01-16 17:16:24
|
Chris Frey wrote: > On Thu, Oct 28, 2010 at 10:46:36PM +0200, deloptes wrote: >> I'll probably have to upload to svn my current version, but let me know >> first if there is a theoretical background. If I solve this I think it >> will be almost perfectly working. The other thing I want to implement is >> (in the manner of barry sync) using the id or remoteId of an item + >> revision to do the checking/finding etc of items. originally the author >> was using the id, which made it impossible to correlate by uid ... or was >> id intended to be "fake" id in the barry code? > > > Not sure I understand the question. The "fake hash" logic of the > Barry plugin only works because the BlackBerry keeps dirty flags of its > own for the database records. So if a record is dirty in the BlackBerry, > then I just increment the "hash", which makes it appear dirty to > OpenSync as well. > I think I've solved this with satisfactory results. I was confused by the "slow-sync" behavior, which I understood later and by the way the plugin handles the dirty flags (barry specific). The question was how to implement the check in akonadi because akonadi has a revision number which is incremented internally every time you edit the record. It has ID and RemoteID, so I was not sure what I should check. I'm still not sure the way I've implemented it is the best one, but for the time and stage of development it is also satisfactory. The current solution uses RemoteID for change-id and the Revision for the hash (hash = RemoteID+"-"+Revision. I am not sure if I need to keep a tack of the akonadiId. However I think this is only a problem when syncing akonadi with akonadi, because each of them increments Revision by 1 and on the next sync it reports change, but the content is the same. I don't know how it can be solved better. I was also not sure if revision can be handled as state in the statedb or anchor ... no sure right now (I've forgotten some of the details already :-) ) But if someone (or you want to discuss it I could have a look again. regards |