[Kde-pim] Akonadi::ResourceSelectJob - why is it private?

Daniel Vrátil dvratil at redhat.com
Wed Mar 19 17:14:55 GMT 2014


On Wednesday 19 of March 2014 16:57:37 David Jarvie wrote:
> On Wednesday 19 Mar 2014 15:21:32 Daniel Vrátil wrote:
> > On Wednesday 19 of March 2014 14:26:36 David Jarvie wrote:
> > > Thanks. I would question the desirability of prohibiting clients from
> > > using
> > > RID operations, though. The RID is the only identifier in an event (to
> > > take
> > > one example) which is fixed, and won't change if the Akonadi database is
> > > rebuilt. I have a particular use case in KAlarm where the RID is needed.
> > > A
> > > KAlarm event can optionally be copied to KOrganizer's calendar. When
> > > that
> > > event is deleted in KAlarm, the KOrganizer copy is also deleted. The
> > > only
> > > way that KAlarm can identify KOrganizer's copy of the event is by the
> > > fact
> > > that its UID (which is used as the RID) has a known relationship to the
> > > UID
> > > of KAlarm's event. If RIDs are hidden from clients, this operation will
> > > as
> > > far as I can see become impossible.
> > 
> > Christian has added GID for exactly this purpose in KDE 4.12. In case of
> > events GID == RID (because both GID and RID are iCal UIDs), but in  emails
> > for example GID == Message-Id and RID == IMAP UID.
> 
> Yes, that would do the job. Are GIDs fully implemented yet? 

Yes, they are. Maybe they are just not documented that much.

> I can't find for example how to fetch items by GID (ItemFetchJob doesn't 
seem to have any GID options), 

Just use Item::setGid() to set the GID and pass the item to ItemFetchJob. Note 
that if you want the fetched items to have GID set too, you have to explicitly 
enable that in ItemFetchScope.

> and it doesn't look like many resources set GIDs yet.

GID is automatically extracted by Serializer when the item is being pushed to 
Akonadi for the first time. At least KMime, KCalCore and Adressee serializers 
have this implemented (didn't check others), see GidExtractorInterface.  No 
support for GIDs in Resources is needed.

Dan

-- 
Daniel Vrátil | dvratil at redhat.com | dvratil on #kde-devel, #kontact, #akonadi
KDE Desktop Team
Associate Software Engineer, Red Hat, Inc.

GPG Key: 0xC59D614F6F4AE348
Fingerprint: 4EC1 86E3 C54E 0B39 5FDD B5FB C59D 614F 6F4A E348
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20140319/afab4acf/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