From da12dd29a85fae5e4ebaffcfb9c40fa6068ec55d Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Sat, 26 Apr 2003 16:44:49 +0000 Subject: Fixes #41661 2003-04-24 Rodrigo Moya Fixes #41661 * idl/evolution-calendar.idl: added discardAlarm method to GNOME:Evolution:Calendar:Cal interface. * pcs/cal.c (cal_class_init): set new epv's method. (impl_Cal_discardAlarm): implementation of new CORBA method. * pcs/cal-backend.[ch]: added 'discard_alarm' virtual method, and CAL_BACKEND_RESULT_NOT_IMPLEMENTED to CalBackendResult enum. (cal_backend_class_init): initialize new class method. (cal_backend_discard_alarm): new method. (cal_backend_update_objects, cal_backend_remove_object): return proper CalBackendResult values. * pcs/cal-backend-file.c (cal_backend_file_class_init): initialize new class method. (cal_backend_file_discard_alarm): implementation of new method. * pcs/cal-client.[ch] (cal_client_discard_alarm): new function. * gui/alarm-notify/alarm-queue.c (remove_qeueud_alarm): don't remove the alarm directly from the component, call cal_client_discard_alarm and let the backend deal with it. svn path=/trunk/; revision=20973 --- calendar/pcs/cal-backend-file.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'calendar/pcs/cal-backend-file.c') diff --git a/calendar/pcs/cal-backend-file.c b/calendar/pcs/cal-backend-file.c index 103d2a70c2..81697602d4 100644 --- a/calendar/pcs/cal-backend-file.c +++ b/calendar/pcs/cal-backend-file.c @@ -112,6 +112,10 @@ static GNOME_Evolution_Calendar_CalComponentAlarms *cal_backend_file_get_alarms_ CalBackend *backend, const char *uid, time_t start, time_t end, gboolean *object_found); +static CalBackendResult cal_backend_file_discard_alarm (CalBackend *backend, + const char *uid, + const char *auid); + static CalBackendResult cal_backend_file_update_objects (CalBackend *backend, const char *calobj, CalObjModType mod); @@ -199,6 +203,7 @@ cal_backend_file_class_init (CalBackendFileClass *class) backend_class->get_changes = cal_backend_file_get_changes; backend_class->get_alarms_in_range = cal_backend_file_get_alarms_in_range; backend_class->get_alarms_for_object = cal_backend_file_get_alarms_for_object; + backend_class->discard_alarm = cal_backend_file_discard_alarm; backend_class->update_objects = cal_backend_file_update_objects; backend_class->remove_object = cal_backend_file_remove_object; backend_class->send_object = cal_backend_file_send_object; @@ -1520,6 +1525,14 @@ cal_backend_file_get_alarms_for_object (CalBackend *backend, const char *uid, return corba_alarms; } +/* Discard_alarm handler for the file backend */ +static CalBackendResult +cal_backend_file_discard_alarm (CalBackend *backend, const char *uid, const char *auid) +{ + /* we just do nothing with the alarm */ + return CAL_BACKEND_RESULT_SUCCESS; +} + /* Creates a CalComponent for the given icalcomponent and adds it to our cache. Note that the icalcomponent is not added to the toplevel icalcomponent here. That needs to be done elsewhere. It returns the uid -- cgit v1.2.3