[Kde-pim] Kcal and RecurrenceID

Álvaro Manera alvaro.manera at nokia.com
Tue Aug 4 09:06:53 BST 2009


Hi again,

I continue with this topic to see if I get ideas from somebody. I tried 
yesterday again in IRC, so maybe here there is a wider audience.

To implement the RecurrenceID inside Kcal I have a couple of ideas on how to 
do it, but I would like to hear if any one finds problems with them or even a 
better one.

The option one as I said yesterday (and my preferred one) would be to store 
all the Events that have the ID (the modifications of the rule) inside the 
"parent" event. So when querying for the event you will get only one instance 
of it, but when you are going to access some detail, lets say the summary you 
can specify an exact date or if you don't you get the general summary for the 
whole recurrence. 

With this solution, some of the API of the Event has to be changed, and the 
implementation of it. To support this embedded events (the ones changing the 
rule). Of course the loading of the events in memory has to be changed also to 
embedded this new Events under the parent. 

The option two would be to store the Events with ID as an independent Event. 
This would mean that when we query the events for the next month we will need 
to return something like QList <Event*> Each of the pointers will point to the 
original event of the recurrence unless there is a RecurrID. So it will mean 
that it will return the "exploded" list of the recurrences with the changes 
already applied.

This solution requires that there will be more than one element with the same 
UID, so the QHash has to be changed to a QMultiHash. On the first solution this 
is not needed as a new UID can be generated concatenating the RecurrID to the 
current UID.

Of course all these changes require modification in icalformat plus the Storage 
layers.

I am more in favor of the first solution, as I think is more elegant and keeps 
the API very close to what it is now. If you don't ask for an specific date you 
will always get the general rule. Of course the UI has to be adapted to this 
change (any of the two).

I am also curious how this will influence your work with akonadi. So please 
express your feelings and ideas. I hope I was able to explain clear enough.

Álvaro
_______________________________________________
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