[Kde-pim] Re: Handling external updates for an Akonadi resource

Kevin Krammer kevin.krammer at gmx.at
Mon Feb 28 09:42:02 GMT 2011


On Monday, 2011-02-28, David Jarvie wrote:
> Can somebody tell me how an Akonadi resource can notify the server that
> unsolicited updates have occurred. In writing the KAlarm directory
> resource (1 file per alarm), I want the resource to update whenever
> externally triggered changes occur to files in the directory
> (creations/changes/deletions). The resource sees these via KDirWatch
> signals, but I can't find a way of telling the server about the changes
> (via synchronize(), itemsRetrievedIncremental() etc) which doesn't result
> in either no update occurring or a full resynchronisation. In these cases,
> only the single file/alarm affected should be updated in the server - it
> shouldn't result in a complete reload of all files.

I think you can use an ItemModifyJob for that, just like any application would 
modify an item in Akonadi.
As a resource you don't have to get the item from Akonadi first, you can 
address it using remoteId for item the item's parent collection.

Do you have a collection hierachy or only one top level collection containing 
the items?

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/20110228/40268598/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