[Kde-pim] Akonadi GroupDAV Resource

Kevin Krammer kevin.krammer at gmx.at
Fri Oct 23 18:01:58 BST 2009


Hi Marco,

On Friday, 2009-10-23, Marco Nelles wrote:
> Hi Kevin,

> I've created a class called KGroupDAVProxy. This class contains a QTimer
> syncing internal items (in a "QThreaded" syncing process) with an external
> groupdav server. Every time item modifications detected a corresponding
>  signal (add,mod,del) is emitted.

Ah, in this case it probably makes sense to keep it that way, at least for 
now.

> My idea was just to use an object of this class in my Akonadi resource.
> Beyond the documentation I've really wondered how to inform Akonadi about
> changes in KGroupDAVProxy. I've solved this by starting
> ResourceBase::synchronize() on a detected item modification after a
> synchronization in a KGroupDAVProxy object. This is a "naive" implementaion
> and not very effective, I know.

You can use ItemCreateJob for added items, ItemDeleteJobs for deleted items 
and ItemModifyJob for changed items.

> So, the cache policies could help me?

I think cache policies (ones with interval checking) will basically make 
Akonadi call your retrieveItems() method, so it will be a bit like a partial 
synchronize().

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20091023/6829821f/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