Alarm trigger generation code
The main function to generate alarm trigger instances is
generate_alarms_for_comp() in
evolution/calendar/pcs/cal-backend-file.c.
This function calls compute_alarm_range()
to expand the specified range of time in the way described in
the previous section. It then generates the instances for
relative alarm triggers inside the
add_alarm_occurrences_cb() callback,
which is used by
cal_recur_generate_instances() with the
expanded range of time. The callback goes through all of the
calendar component's relative alarm triggers and adds the
trigger offsets to the occurrence's time; the results are
added as CalAlarmInstance structures
to the final list of trigger instances. Finally,
generate_alarms_for_comp() calls
generate_absolute_triggers(), which
simply adds the instances for absolute alarm triggers; these
are the absolute times that are within the time range that was
requested originally. In the very end, the list of instances
is sorted to produce nicer results.