[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-pim
Subject: Re: [Kde-pim] Akonadi ids (was: Re: Data loss: kmail2 must not use
From: Shaheed Haque <srhaque () theiet ! org>
Date: 2011-12-16 10:28:51
Message-ID: CAHAc2jdjAP0V-2L_0FX=KSFWMnDDfRKuBRxtS9Bzsov7t4v9qw () mail ! gmail ! com
[Download RAW message or body]
For the record, I now see that my understanding of this was sorely lacking.
The resource does not allocate any internal ids at all, which pretty much
invalidates everything else I inferred.
On 13 December 2011 10:21, Shaheed <srhaque@theiet.org> wrote:
>
> In the above referenced thread, Georg seemed to be saying something about
> Akonadi ids which I'd like to get some clarity on. (I'll happily update the
> docs once I know what the answers are, since I think this is affecting some
> resource code I am working on).
>
> This is what I infer so far:
>
> 1. When I create an Akonadi::Item, the id I provide in the
> constructor can
> be whatever I choose, but it clearly needs to be unique amongst the
> set
> of ids I am using.
>
> 2. This set of ids is associated with the current resource.
>
> 3. If I enable hierarchical ids, then the the id only needs to be
> unique
> within the parent collection's set.
>
> Is that correct? Assuming so, I have some questions:
>
> a. When I set the resource for an Item, I presume I should set it
> to the
> identifier() of the resource, not the name(), right?
>
> b. since the resource for an Item should be immutable, would it not
> be
> better passed in via the Item constructor?
>
> c. When I create a new Item locally, when offline, and which I will
> later
> send to the backend, how should such ids be generated? I obviously
> cannot
> invent one from the above number space because when the item is
> eventually
> given to the backend, it will no doubt allocate one itself.
>
> Thanks, Shaheed
>
>
>
_______________________________________________
KDE PIM mailing list kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic