|
From: deloptes <del...@ya...> - 2011-01-19 21:49:16
|
Chris Frey wrote:
> On Sun, Jan 16, 2011 at 06:15:57PM +0100, deloptes wrote:
>> 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.
What I mean is exactly the example below. Notice the UID entry. I think I
need to do a mapping between the IDs of the devices or setting the RemoteID
to the UID when the former is missing. It is getting a bit complicated.
However the only difference is the UID, which is used in the hash.
I think I had the check for RemoteId in the code (and removed it for some
reason ... ). I need to code some better solution.
This behavior also depends in the way one syncs first. Is there data on the
phone or not and vice versa.
Member: 2 (akonadi-sync)
UID: dmY7a5NAzE
<?xml version="1.0"?>
<contact>
<EMail>
<Content>xxxxxxxxxxxxxx</Content>
</EMail>
<Name>
<LastName>xxxxxxxxxxxxxx</LastName>
<FirstName>xxxxxxxxxxxxxx</FirstName>
<Additional></Additional>
<Prefix></Prefix>
<Suffix></Suffix>
</Name>
<Revision>
<Content>20100723T191711Z</Content>
</Revision>
<Telephone Type="Cellular">
<Content>xxxxxxxxxxxxxx</Content>
</Telephone>
</contact>
Entry 2:
Member: 1 (syncml-obex-client)
UID: 48
<?xml version="1.0"?>
<contact>
<EMail Type="Internet">
<Content>xxxxxxxxxxxxxx</Content>
</EMail>
<Name>
<LastName>xxxxxxxxxxxxxx</LastName>
<FirstName>xxxxxxxxxxxxxx</FirstName>
<Additional></Additional>
<Prefix></Prefix>
<Suffix></Suffix>
</Name>
<Revision>
<Content>20100723T191711Z</Content>
</Revision>
<Telephone Type="Cellular">
<Content>xxxxxxxxxxxxxx</Content>
</Telephone>
</contact>
|