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

David Jarvie djarvie at kde.org
Wed May 26 13:58:47 BST 2010


On Wed, May 26, 2010 1:51 pm, Kevin Krammer wrote:
> 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).

That sounds entirely reasonable when an Akonadi resource is first
configured. But what happens at a later date when a new version of KAlarm
is installed and it uses an updated format? If the calendar is also
accessed by another computer with the original version of KAlarm, it can't
be automatically updated without asking the user.

Cheers,
-- 
David Jarvie.
KDE developer.
KAlarm author - http://www.astrojar.org.uk/kalarm

_______________________________________________
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