[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE/kdepim/akonadi/libakonadi
From:       Volker Krause <vkrause () kde ! org>
Date:       2008-02-09 16:42:06
Message-ID: 200802091742.10170.vkrause () kde ! org
[Download RAW message or body]


On Saturday 09 February 2008 17:15:35 Kevin Krammer wrote:
> On Saturday 09 February 2008, Volker Krause wrote:
> > On Friday 08 February 2008 22:14:50 Kevin Krammer wrote:
> > > SVN commit 772470 by krake:
> > >
> > > Make ItemSync available as public API:
> > > - change id -> item mapping from usage of remoteId() to id() so clients
> > > can use ItemSync to create new items in Akonadi without having to fake
> > > a remoteId - install the header
> >
> > This seems to break resources. There, items don't have ids yet when they
> > are delivered from the resource and thus need to be compared by their
> > remoteids to see if they already exist in Akonadi. Without that I get a
> > new set of duplicated items per sync. So, we probably need both modes,
> > either available as an option in the API, or (if that's possible) by
> > autodetecting if items need to be compared by id or remoteid.
>
> You mean around line 117?

yes

> Maybe first try a lookup based in the local ID and if this fails based on
> the remote ID?

Checking if the delivered item has an invalid local id and a non-empty 
remoteId might work. This will always be the case for items provided by 
resources. In your case items will have a local id, unless they have been 
newly added. Since only resources are allowed to set remote ids (although we 
currently don't enforce that), this is distinct from the resource case.

> > > - remove the API dox declaring it as internal, also remove the comment
> > > about transactions since it is back to being a transaction.
> > >
> > > @Volker: "local" and "remote" should probably be renamed
> >
> > Right, that has the inverse meaning in your use-case.
>
> Yes, not that important though.

regards
Volker

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic