Open tobixen opened 3 years ago
will this include setting new alarms?
Setting new alarms is possible through the library today. It's part of the icalendar data sent to the server, generation of this data is outside the scope of the caldav library.
generation of this data is outside the scope of the caldav library.
I have reconsidered this a bit.
So, to fully support alarms, I think we may need to support ...
It's always possible to add alarms by editing the raw icalendar, or editing it via the vobject_instance
or icalendar_instance
properties. However, recently we've started adding multiple "high level" convenience methods and parameters for editing and generating icalendar code, so we may as well add explicit support for alarms. So it's needed with:
save_*
-methods.Event
/Todo
-objectsearch
-method (introduced in the upcoming v0.10 version) should be fixed to allow searching for alarms by a time range searchfind_upcoming_alarm(after=now, cnt=1)
for finding upcoming alarm(s).The RFC defines four kind of alarm actions, it's sound, display, email and procedure. This library is definitively not going to play and sounds or display something for the end user. This library could theoretically send emails or launch procedures. However, since this library does not have any kind of event loop or other means of getting the timing correct, I feel that all kind of processing is out of the scope for this library and should be taken care of by the caller.
If anyone has a great needs for alarms, I will prioritize this and get it merged, testing it towards a calendar server that supports searching for alarms. It seems like neither radicale nor xandikos supports searching for alarms yet, and those two are my primary test servers.
So I basically wrote some code (but no documentation) for adding alarms easily to new events long long time ago, but got busy with other things. I will try to prioritize to get it merged in, problem is that I have no idea when I will get time to do any work towards the caldav library next time. Perhaps tomorrow, perhaps next week, perhaps next month ...
The processing of alarms as described in https://tools.ietf.org/html/rfc4791#section-8.6 is outside the scope of the caldav library, possibly with the exception of sending emails. Anyway, the library should support methods for alarm discovery.