[Kde-pim] Does an Akonadi resource know what Collection it's handling?

Kevin Krammer kevin.krammer at gmx.at
Wed May 26 13:51:26 BST 2010


On Wednesday, 2010-05-26, David Jarvie wrote:
> Hi Tobias,
> 
> On Wed, May 26, 2010 9:34 am, Tobias Koenig wrote:
> > On Tue, May 25, 2010 at 11:50:48PM +0100, David Jarvie wrote:
> > Hej David,
> > 
> >> In the implementation of a resource (specifically KAlarmResource,
> >> inherited from ICalResourceBase),
> >> is it possible for it to know which Collection its calendar data belongs
> >> to?
> > 
> > Akonadi::Item has a parentCollection() method to access the collection it
> > belongs to.
> > 
> >> I need to know in the resource whether the Collection is read-only or
> >> not.
> > 
> > Where do you need to know it? And why?
> 
> If the calendar file being represented by the Collection is in an old
> KAlarm format, the user should be offered the option of updating it to the
> current format (although I haven't yet worked out how this option should
> be offered for an Akonadi resource). But if the Collection is read-only,
> this option should not be available.

You can probably offer this as part of the resource configuration, i.e. when 
the user has selected a file to work on in the config UI.

At this point you usually also know whether the user wants this to be read-
only (a common setting in resources).

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/20100526/9b414045/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