[Kde-pim] Re: akonadi items with ids
Tobias König
tokoe at kde.org
Mon Feb 14 18:06:37 GMT 2011
On Friday 11 February 2011 16:30:40 deloptes wrote:
> Thomas McGuire wrote:
Hej,
> I am trying (I have) to uplift a code for opensync and I noticed that in the
> old kdepim for kde3 it was actually checking if an item with the given id
> exists, if so it's updating the content if not creating with the given id,
> which seems to be not possible with akonadi, so I'm wondering how I can do
> it.
You are mixing up two things here, the Akonadi IDs and the object UIDs (e.g.
UID property of a vCard).
While the Akonadi item ID is unique inside an Akonadi system, the object UIDs
should be globally unique. So if you want to check if an item with a given
object UID is already in the Akonadi store, you have to search for it via
ItemSearchJob or its derived implementations
ContactSearchJob/IncidenceSearchJob.
They will return you the Akonadi item that contains an object (contact or
event) with a given UID.
Ciao,
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110214/719f20f7/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list