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

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


On Wednesday, 2010-05-26, David Jarvie wrote:
> On Wed, May 26, 2010 1:51 pm, Kevin Krammer wrote:
> > On Wednesday, 2010-05-26, David Jarvie wrote:

> >> 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.

Good point.
So there are a handful possible locations on when such a check might be 
necessary:
- when the config is changed to a different file
- when  the config is changed from read-only to read-write
- when the resource (re-)starts

and, theoretically,
- when the collection's ACL gets changed by another process, now allowing 
write access

Theoretical because your resource could just change it back if it is still 
read-only according to its config.

I think it would be sufficient to just acknowledge the read/write permission 
settings given to your resource through its config.
Well an obviously whether the file is writable :)

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/5ba4392f/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