aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs/cal-backend-file.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2003-10-28 21:32:55 +0800
committerDan Winship <danw@src.gnome.org>2003-10-28 21:32:55 +0800
commit179cdf36868b8702b3bc7a78201f6d70142a6a6d (patch)
treed36c7facd86131b3d6037022a6d21551b0685a86 /calendar/pcs/cal-backend-file.c
parent196efb7acc28bd33d576a84feebf0b5c608825cf (diff)
downloadgsoc2013-evolution-179cdf36868b8702b3bc7a78201f6d70142a6a6d.tar
gsoc2013-evolution-179cdf36868b8702b3bc7a78201f6d70142a6a6d.tar.gz
gsoc2013-evolution-179cdf36868b8702b3bc7a78201f6d70142a6a6d.tar.bz2
gsoc2013-evolution-179cdf36868b8702b3bc7a78201f6d70142a6a6d.tar.lz
gsoc2013-evolution-179cdf36868b8702b3bc7a78201f6d70142a6a6d.tar.xz
gsoc2013-evolution-179cdf36868b8702b3bc7a78201f6d70142a6a6d.tar.zst
gsoc2013-evolution-179cdf36868b8702b3bc7a78201f6d70142a6a6d.zip
New; tell each query about a created/modified/removed object.
* pcs/cal-backend.c (cal_backend_notify_object_created, cal_backend_notify_object_modified, cal_backend_notify_object_removed): New; tell each query about a created/modified/removed object. * pcs/cal.c (cal_notify_object_created): Use cal_backend_notify_object_created. (cal_notify_object_modified, cal_notify_object_removed): Likewise for modified/removed (cal_notify_objects_received): we need both the before and after forms for the modified objects so they can be resolved as adds/modifies/removes per-query. But the caller can just call the cal_backend_* routines for each object anyway, so just remove the created/modified/removed lists. * pcs/cal-backend-sync.c (cal_backend_sync_receive_objects): Remove created/modified/removed list arguments. (_cal_backend_receive_objects): Likewise. * pcs/cal-backend-file.c (cal_backend_file_receive_objects): Remove created/modified/removed list arguments. Replace the one use of *removed with a call to cal_backend_notify_object_removed. svn path=/trunk/; revision=23102
Diffstat (limited to 'calendar/pcs/cal-backend-file.c')
-rw-r--r--calendar/pcs/cal-backend-file.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/calendar/pcs/cal-backend-file.c b/calendar/pcs/cal-backend-file.c
index d99b80a0b7..58429ecbe6 100644
--- a/calendar/pcs/cal-backend-file.c
+++ b/calendar/pcs/cal-backend-file.c
@@ -1579,8 +1579,7 @@ check_tzids (icalparameter *param, void *data)
/* Update_objects handler for the file backend. */
static CalBackendSyncStatus
-cal_backend_file_receive_objects (CalBackendSync *backend, Cal *cal, const char *calobj,
- GList **created, GList **modified, GList **removed)
+cal_backend_file_receive_objects (CalBackendSync *backend, Cal *cal, const char *calobj)
{
CalBackendFile *cbfile;
CalBackendFilePrivate *priv;
@@ -1613,8 +1612,6 @@ cal_backend_file_receive_objects (CalBackendSync *backend, Cal *cal, const char
method = icalcomponent_get_method (toplevel_comp);
- *created = *modified = *removed = NULL;
-
/* Build a list of timezones so we can make sure all the objects have valid info */
tzdata.zones = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
@@ -1689,8 +1686,10 @@ cal_backend_file_receive_objects (CalBackendSync *backend, Cal *cal, const char
break;
case ICAL_METHOD_CANCEL:
/* FIXME Do we need to remove the subcomp so it isn't merged? */
- if (cancel_received_object (cbfile, subcomp))
- *removed = g_list_prepend (*removed, g_strdup (icalcomponent_get_uid (subcomp)));
+ if (cancel_received_object (cbfile, subcomp)) {
+ const char *calobj = icalcomponent_as_ical_string (subcomp);
+ cal_backend_notify_object_removed (CAL_BACKEND (backend), icalcomponent_get_uid (subcomp), calobj);
+ }
break;
default:
status = GNOME_Evolution_Calendar_UnsupportedMethod;