[mkcal] Add time span to retrieve incidence list for sync process, contributes to MER#1835.
The issue of MER#1835 is the fact that incidences out of sync window are locally deleted at each sync cycle. It was also reported on TJC a while ago. This is due to the fact that we fetch etags for a restricted time period but we compare this list with all local incidences, because mkcal is lacking any other methods.
This MR is adding optional time span when calling
extendedstorage::allIncidences(). Like that, one can retrieve the list of local incidences on a time span that is matching the one of the list of etags. It is better to do this at mkcal level than sorting out the full list at caldav level because it is saving (time and) memory. Indeed, calendars after years can host a lot of incidences.
The modifications are quite small. The biggest part is the transformation of a nested set of
ifs into a nicer
switch case. @chriadam or @pvuorela what is your opinion ? I'll submit the corresponding caldav MR after buteo-sync-plugin-caldav!32 (merged) will be accepted because one can like that refine a bit the test (I found this issue with this specific test indeed reporting spurious remote deletion for out of sync window incidences that are currently ignored in its current version).