[Kde-pim] Re: akonadi items with ids
Thomas McGuire
mcguire at kde.org
Sat Feb 12 00:29:26 GMT 2011
Hi,
On Friday 11 February 2011 15:30:40 deloptes wrote:
> Thomas McGuire wrote:
> > If you are developing a resource, what you probably want is setting the
> > "remote ID". That remote ID can be assigned by the resource which creates
> > the item, and is used as an unique resource-internal identifier.
> >
> > qint is just a typedef for a normal int.
>
> thank you, so it's absolutely impossible?!
Yes.
> 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.
> The thing is that I'm getting an uid like '123', which is not as unique as
> expected, but I'll discuss this in the other group.
> My current solution is to use the remoteId as you mentioned above, but
> something is not working as expected. I'll double-check.
Remote ids are not globally unique, they are only unique within a resource,
and there items in different collections may even have the same remote ID. It
is purely an implementation detail of the resource, I don't think normal
clients should use it.
If you really need opensync-specific information for each Item, add an
Attribute to it when you create it. You can put any data you want into an
Attribute, including an opensync-specific ID.
Regards,
Thomas
-------------- 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/20110212/2fded665/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