From: Chenthill Palanisamy Date: Tue, 11 Oct 2005 07:56:21 +0000 (+0000) Subject: fixes #266144, #317575. X-Git-Tag: upstream/3.7.4~6849 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c7bfca5543c3431392eb0b7a5c0fa69fd3872a60;p=platform%2Fupstream%2Fevolution-data-server.git fixes #266144, #317575. --- diff --git a/calendar/ChangeLog b/calendar/ChangeLog index af599d6..229fac8 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,50 @@ +2005-10-10 Chenthill Palanisamy + + Fixes #266144 + * backends/contacts/e-cal-backend-contacts.c: + (contact_record_free): + * backends/http/e-cal-backend-http.c: + (notify_and_remove_from_cache): + * backends/weather/e-cal-backend-weather.c: + (finished_retrieval_cb): + * backends/file/e-cal-backend-file.c: (notify_removals_cb), + (e_cal_backend_file_receive_objects): Use ECalComponentId. + * backends/groupwise/e-cal-backend-groupwise-utils.[ch]: + (e_gw_item_to_cal_component): Store the recurrence id in + utc. + (e_gw_connection_send_appointment): Get the component while + accepting/declining from mail component and pass all_instances + and get the partstat. + the + * backends/groupwise/e-cal-backend-groupwise.c: + (e_cal_backend_groupwise_remove_object), (change_status), + (receive_object): Change the status of all recurring appointments + if all_instances is set true. + * idl/Evolution-DataServer-Calendar.idl: Added a structure + to hold the recurrence id and uid to notify the component + removed. + * libecal/e-cal-component.c: (e_cal_component_get_id), + (e_cal_component_free_id): Added new API's for getting + the recurrence id and uid of a component. + * libecal/e-cal-component.h: Added a structure of holding + both the recurrence id and the uid. + * libecal/e-cal-view-listener.c: (build_id_list), + (impl_notifyObjectsRemoved): + * libecal/e-cal-view.c: (objects_removed_cb): + * libedata-cal/e-cal-backend-sync.c: + (_e_cal_backend_remove_object): + * libedata-cal/e-cal-backend.c: (match_query_and_notify), + (e_cal_backend_notify_object_removed): + * libedata-cal/e-cal-backend.h: + * libedata-cal/e-data-cal-view.c: (uncache_with_id_cb), + (remove_object_from_cache): + (e_data_cal_view_notify_objects_removed), + (e_data_cal_view_notify_objects_removed_1): + * libedata-cal/e-data-cal-view.h: + * libedata-cal/e-data-cal.c: (e_data_cal_notify_object_removed): + * libedata-cal/e-data-cal.h: Changed the API's to use the + ECalComponentId structure instead of uid. + 2005-10-07 Arunprakash * libedata-cal/e-data-cal-factory.c (backend_last_client_gone_cb) : diff --git a/calendar/backends/contacts/e-cal-backend-contacts.c b/calendar/backends/contacts/e-cal-backend-contacts.c index 7453dae..6ca3015 100644 --- a/calendar/backends/contacts/e-cal-backend-contacts.c +++ b/calendar/backends/contacts/e-cal-backend-contacts.c @@ -168,15 +168,17 @@ static void contact_record_free (ContactRecord *cr) { char *comp_str; - const char *uid; + ECalComponentId *id; g_object_unref (G_OBJECT (cr->contact)); /* Remove the birthday event */ if (cr->comp_birthday) { comp_str = e_cal_component_get_as_string (cr->comp_birthday); - e_cal_component_get_uid (cr->comp_birthday, &uid); - e_cal_backend_notify_object_removed (E_CAL_BACKEND (cr->cbc), uid, comp_str, NULL); + id = e_cal_component_get_id (cr->comp_birthday); + e_cal_backend_notify_object_removed (E_CAL_BACKEND (cr->cbc), id, comp_str, NULL); + + e_cal_component_free_id (id); g_free (comp_str); g_object_unref (G_OBJECT (cr->comp_birthday)); } @@ -184,8 +186,11 @@ contact_record_free (ContactRecord *cr) /* Remove the anniversary event */ if (cr->comp_anniversary) { comp_str = e_cal_component_get_as_string (cr->comp_anniversary); - e_cal_component_get_uid (cr->comp_anniversary, &uid); - e_cal_backend_notify_object_removed (E_CAL_BACKEND (cr->cbc), uid, comp_str, NULL); + id = e_cal_component_get_id (cr->comp_birthday); + + e_cal_backend_notify_object_removed (E_CAL_BACKEND (cr->cbc), id, comp_str, NULL); + + e_cal_component_free_id (id); g_free (comp_str); g_object_unref (G_OBJECT (cr->comp_anniversary)); } diff --git a/calendar/backends/file/e-cal-backend-file.c b/calendar/backends/file/e-cal-backend-file.c index cdbf37f..e7a7529 100644 --- a/calendar/backends/file/e-cal-backend-file.c +++ b/calendar/backends/file/e-cal-backend-file.c @@ -689,6 +689,8 @@ notify_removals_cb (gpointer key, gpointer value, gpointer data) if (!g_hash_table_lookup (context->new_uid_hash, uid)) { icalcomponent *old_icomp; gchar *old_obj_str; + ECalComponent *comp; + ECalComponentId *id; /* Object was removed */ @@ -699,8 +701,15 @@ notify_removals_cb (gpointer key, gpointer value, gpointer data) old_obj_str = icalcomponent_as_ical_string (old_icomp); if (!old_obj_str) return; + + comp = e_cal_component_new_from_string (old_obj_str); + id = e_cal_component_get_id (comp); + - e_cal_backend_notify_object_removed (context->backend, uid, old_obj_str, NULL); + e_cal_backend_notify_object_removed (context->backend, id, old_obj_str, NULL); + + e_cal_component_free_id (id); + g_object_unref (comp); } } @@ -2382,6 +2391,7 @@ e_cal_backend_file_receive_objects (ECalBackendSync *backend, EDataCal *cal, con break; case ICAL_METHOD_CANCEL: if (cancel_received_object (cbfile, subcomp)) { + ECalComponentId *id; object = (char *) icalcomponent_as_ical_string (subcomp); obj_data = g_hash_table_lookup (priv->comp_uid_hash, uid); if (obj_data) @@ -2389,11 +2399,14 @@ e_cal_backend_file_receive_objects (ECalBackendSync *backend, EDataCal *cal, con else old_object = NULL; - e_cal_backend_notify_object_removed (E_CAL_BACKEND (backend), uid, old_object, object); + id = e_cal_component_get_id (comp); + + e_cal_backend_notify_object_removed (E_CAL_BACKEND (backend), id, old_object, object); /* remove the component from the toplevel VCALENDAR */ icalcomponent_remove_component (toplevel_comp, subcomp); icalcomponent_free (subcomp); + e_cal_component_free_id (id); g_free (old_object); } diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c index 1ddbe4e..c4cf80c 100644 --- a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c +++ b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c @@ -977,7 +977,6 @@ e_gw_item_to_cal_component (EGwItem *item, ECalBackendGroupwise *cbgw) } e_cal_component_set_dtstart (comp, &dt); - g_free (t); } else return NULL; @@ -996,7 +995,6 @@ e_gw_item_to_cal_component (EGwItem *item, ECalBackendGroupwise *cbgw) recur_id->type = E_CAL_COMPONENT_RANGE_SINGLE; recur_id->datetime = dt; e_cal_component_set_recurid (comp, recur_id); - } else { uid = e_gw_item_get_icalid (item); @@ -1007,6 +1005,8 @@ e_gw_item_to_cal_component (EGwItem *item, ECalBackendGroupwise *cbgw) return NULL; } } + + g_free (t); /* classification */ description = e_gw_item_get_classification (item); @@ -1203,60 +1203,41 @@ e_gw_item_to_cal_component (EGwItem *item, ECalBackendGroupwise *cbgw) } EGwConnectionStatus -e_gw_connection_send_appointment (ECalBackendGroupwise *cbgw, const char *container, ECalComponent *comp, icalproperty_method method, gboolean *remove, ECalComponent **created_comp) +e_gw_connection_send_appointment (ECalBackendGroupwise *cbgw, const char *container, ECalComponent *comp, icalproperty_method method, gboolean all_instances, ECalComponent **created_comp, icalparameter_partstat *pstatus) { EGwConnection *cnc; EGwConnectionStatus status; icalparameter_partstat partstat; char *item_id = NULL; const char *gw_id; - gboolean all_instances = FALSE; - icalproperty *icalprop; - icalcomponent *icalcomp; const char *recurrence_key = NULL; + gboolean need_to_get = FALSE; cnc = e_cal_backend_groupwise_get_connection (cbgw); g_return_val_if_fail (E_IS_GW_CONNECTION (cnc), E_GW_CONNECTION_STATUS_INVALID_CONNECTION); g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), E_GW_CONNECTION_STATUS_INVALID_OBJECT); e_cal_component_commit_sequence (comp); - /* When the icalcomponent is obtained through the itip message rather - * than from the SOAP protocol, the container id has to be explicitly - * added to the xgwrecordid inorder to obtain the item id. */ - - /* handle recurrences - All */ - icalcomp = e_cal_component_get_icalcomponent (comp); - - icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY); - while (icalprop) { - const char *x_name; - x_name = icalproperty_get_x_name (icalprop); - if (!strcmp (x_name, "X-GW-RECUR-INSTANCES-MOD-TYPE")) { - if (!strcmp (icalproperty_get_x (icalprop), "All")) - all_instances = TRUE; - if (recurrence_key) - break; - } - if (!strcmp (x_name, "X-GW-RECURRENCE-KEY")) { - e_cal_component_get_uid (comp, &recurrence_key); - } - icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY); - } - gw_id = e_cal_component_get_gw_id (comp); switch (e_cal_component_get_vtype (comp)) { case E_CAL_COMPONENT_EVENT: - if (!g_str_has_suffix (gw_id, container)) + if (!g_str_has_suffix (gw_id, container)) { item_id = g_strconcat (e_cal_component_get_gw_id (comp), GW_EVENT_TYPE_ID, container, NULL); + need_to_get = TRUE; + + } else item_id = g_strdup (gw_id); break; case E_CAL_COMPONENT_TODO: - if (!g_str_has_suffix (gw_id, container)) + if (!g_str_has_suffix (gw_id, container)) { item_id = g_strconcat (e_cal_component_get_gw_id (comp), GW_TODO_TYPE_ID, container, NULL); + need_to_get = TRUE; + + } else item_id = g_strdup (gw_id); break; @@ -1264,6 +1245,21 @@ e_gw_connection_send_appointment (ECalBackendGroupwise *cbgw, const char *contai return E_GW_CONNECTION_STATUS_INVALID_OBJECT; } + if (all_instances) + e_cal_component_get_uid (comp, &recurrence_key); + + /*FIXME - remove this once the server returns us the same iCalid in both interfaces */ + + if (need_to_get) { + EGwItem *item = NULL; + + status = e_gw_connection_get_item (cnc, container, item_id, "recipients message recipientStatus attachments default", &item); + if (status == E_GW_CONNECTION_STATUS_OK) + *created_comp = e_gw_item_to_cal_component (item, cbgw); + + g_object_unref (item); + } + switch (method) { case ICAL_METHOD_REQUEST: /* get attendee here and add the list along. */ @@ -1301,6 +1297,7 @@ e_gw_connection_send_appointment (ECalBackendGroupwise *cbgw, const char *contai status = E_GW_CONNECTION_STATUS_INVALID_OBJECT; break; } + *pstatus = partstat; switch (partstat) { ECalComponentTransparency transp; @@ -1325,7 +1322,6 @@ e_gw_connection_send_appointment (ECalBackendGroupwise *cbgw, const char *contai else status = e_gw_connection_decline_request (cnc, item_id, NULL, NULL); - *remove = TRUE; break; case ICAL_PARTSTAT_TENTATIVE: if (all_instances) @@ -1345,25 +1341,11 @@ e_gw_connection_send_appointment (ECalBackendGroupwise *cbgw, const char *contai case ICAL_METHOD_CANCEL: status = e_gw_connection_retract_request (cnc, item_id, NULL, FALSE, FALSE); - *remove = TRUE; break; default: return E_GW_CONNECTION_STATUS_INVALID_OBJECT; } - if (status == E_GW_CONNECTION_STATUS_ITEM_ALREADY_ACCEPTED) - return status; - - /*FIXME - handling recurrence items */ - if (!*remove && status == E_GW_CONNECTION_STATUS_OK) { - EGwItem *item = NULL; - EGwConnectionStatus stat; - - stat = e_gw_connection_get_item (cnc, container, item_id, "recipients message recipientStatus attachments default", &item); - if (stat == E_GW_CONNECTION_STATUS_OK) - *created_comp = e_gw_item_to_cal_component (item, cbgw); - } - return status; } diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.h b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.h index eacbd5d..2eb4d05 100644 --- a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.h +++ b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.h @@ -44,7 +44,7 @@ void e_gw_item_set_changes (EGwItem *item, EGwItem *cached_item); * Connection-related utility functions */ EGwConnectionStatus e_gw_connection_create_appointment (EGwConnection *cnc, const char *container, ECalBackendGroupwise *cbgw, ECalComponent *comp, GSList **id_list); -EGwConnectionStatus e_gw_connection_send_appointment (ECalBackendGroupwise *cbgw, const char *container, ECalComponent *comp, icalproperty_method method, gboolean *remove, ECalComponent **created_comp); +EGwConnectionStatus e_gw_connection_send_appointment (ECalBackendGroupwise *cbgw, const char *container, ECalComponent *comp, icalproperty_method method, gboolean all_instances, ECalComponent **created_comp, icalparameter_partstat *pstatus); EGwConnectionStatus e_gw_connection_get_freebusy_info (EGwConnection *cnc, GList *users, time_t start, time_t end, GList **freebusy, icaltimezone *default_zone); void e_cal_backend_groupwise_store_settings (EGwSendOptions *opts, ECalBackendGroupwise *cbgw); EGwItem * e_gw_item_new_for_delegate_from_cal (ECalBackendGroupwise *cbgw, ECalComponent *comp); diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise.c b/calendar/backends/groupwise/e-cal-backend-groupwise.c index 10d027c..6a0b021 100644 --- a/calendar/backends/groupwise/e-cal-backend-groupwise.c +++ b/calendar/backends/groupwise/e-cal-backend-groupwise.c @@ -1942,21 +1942,19 @@ e_cal_backend_groupwise_remove_object (ECalBackendSync *backend, EDataCal *cal, ECalBackendSyncStatus status; const char *id_to_remove = NULL; icalcomponent *icalcomp; + + status = e_cal_backend_groupwise_get_object (backend, cal, uid, rid, &calobj); + if (status != GNOME_Evolution_Calendar_Success) + return status; + g_message ("object found \n"); - if (mod == CALOBJ_MOD_THIS) { - - status = e_cal_backend_groupwise_get_object (backend, cal, uid, rid, &calobj); - if (status != GNOME_Evolution_Calendar_Success) - return status; - - *old_object = strdup (calobj); + icalcomp = icalparser_parse_string (calobj); + if (!icalcomp) { + g_free (calobj); + return GNOME_Evolution_Calendar_InvalidObject; + } - icalcomp = icalparser_parse_string (calobj); - if (!icalcomp) { - g_free (calobj); - return GNOME_Evolution_Calendar_InvalidObject; - } - + if (mod == CALOBJ_MOD_THIS) { id_to_remove = get_gw_item_id (icalcomp); if (!id_to_remove) { /* use the iCalId to remove the object */ @@ -1977,6 +1975,7 @@ e_cal_backend_groupwise_remove_object (ECalBackendSync *backend, EDataCal *cal, return GNOME_Evolution_Calendar_ObjectNotFound; } *object = NULL; + *old_object = strdup (calobj); g_free (calobj); return GNOME_Evolution_Calendar_Success; } else { @@ -1996,6 +1995,7 @@ e_cal_backend_groupwise_remove_object (ECalBackendSync *backend, EDataCal *cal, status = e_gw_connection_decline_request (priv->cnc, id_to_remove, NULL, uid); } else { GList *item_ids = NULL; + for (l = comp_list; l; l = l->next) { ECalComponent *comp = E_CAL_COMPONENT (l->data); @@ -2012,18 +2012,26 @@ e_cal_backend_groupwise_remove_object (ECalBackendSync *backend, EDataCal *cal, for (l = comp_list; l; l = l->next) { ECalComponent *comp = E_CAL_COMPONENT (l->data); - e_cal_backend_cache_remove_component (priv->cache, uid, - e_cal_component_get_recurid_as_string (comp)); - e_cal_backend_notify_object_removed (E_CAL_BACKEND (cbgw), - uid, e_cal_component_get_as_string (comp), NULL); + ECalComponentId *id = e_cal_component_get_id (comp); + + e_cal_backend_cache_remove_component (priv->cache, id->uid, + id->rid); + if (!g_str_equal (id->rid, rid)) + e_cal_backend_notify_object_removed (E_CAL_BACKEND (cbgw), id, e_cal_component_get_as_string (comp), NULL); + e_cal_component_free_id (id); + g_object_unref (comp); } /* Setting NULL would trigger another signal. * We do not set the *object to NULL */ g_slist_free (comp_list); + *old_object = strdup (calobj); + *object = NULL; + g_free (calobj); return GNOME_Evolution_Calendar_Success; } else { + g_free (calobj); return GNOME_Evolution_Calendar_OtherError; } } else @@ -2110,6 +2118,54 @@ fetch_attachments (ECalBackendGroupwise *cbgw, ECalComponent *comp) e_cal_component_set_attachment_list (comp, new_attach_list); } +static void +change_status (ECalComponent *comp, icalparameter_partstat status, const char *email) +{ + icalproperty *prop; + icalparameter *param; + gboolean found = FALSE; + icalcomponent *icalcomp = e_cal_component_get_icalcomponent (comp); + + + for (prop = icalcomponent_get_first_property (icalcomp, ICAL_ATTENDEE_PROPERTY); + prop; + prop = icalcomponent_get_next_property (icalcomp, ICAL_ATTENDEE_PROPERTY)) { + const char *attendee = icalproperty_get_attendee (prop); + + if (!g_strncasecmp (attendee, "mailto:", 7)) + attendee += 7; + + if (!g_ascii_strcasecmp (attendee, email)) { + found = TRUE; + param = icalparameter_new_partstat (status); + icalproperty_set_parameter (prop, param); + break; + } + } + + /* We couldn find the attendee in the component, so add a new attendee */ + if (!found) { + char *temp = g_strdup_printf ("MAILTO:%s", email); + + prop = icalproperty_new_attendee ((const char *) temp); + icalcomponent_add_property (icalcomp, prop); + + param = icalparameter_new_partstat (ICAL_PARTSTAT_DELEGATED); + icalproperty_add_parameter (prop, param); + + param = icalparameter_new_role (ICAL_ROLE_NONPARTICIPANT); + icalproperty_add_parameter (prop, param); + + param = icalparameter_new_cutype (ICAL_CUTYPE_INDIVIDUAL); + icalproperty_add_parameter (prop, param); + + param = icalparameter_new_rsvp (ICAL_RSVP_TRUE); + icalproperty_add_parameter (prop, param); + + g_free (temp); + } +} + static ECalBackendSyncStatus receive_object (ECalBackendGroupwise *cbgw, EDataCal *cal, icalcomponent *icalcomp) { @@ -2117,10 +2173,31 @@ receive_object (ECalBackendGroupwise *cbgw, EDataCal *cal, icalcomponent *icalco ECalBackendGroupwisePrivate *priv; icalproperty_method method; EGwConnectionStatus status; - gboolean remove = FALSE; + gboolean all_instances = FALSE; + icalparameter_partstat pstatus; + icalproperty *icalprop; priv = cbgw->priv; + /* When the icalcomponent is obtained through the itip message rather + * than from the SOAP protocol, the container id has to be explicitly + * added to the xgwrecordid inorder to obtain the item id. */ + icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY); + while (icalprop) { + const char *x_name; + + x_name = icalproperty_get_x_name (icalprop); + if (!strcmp (x_name, "X-GW-RECUR-INSTANCES-MOD-TYPE")) { + if (!strcmp (icalproperty_get_x (icalprop), "All")) { + all_instances = TRUE; + icalcomponent_remove_property (icalcomp, icalprop); + break; + } + } + + icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY); + } + comp = e_cal_component_new (); e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (icalcomp)); method = icalcomponent_get_method (icalcomp); @@ -2129,56 +2206,80 @@ receive_object (ECalBackendGroupwise *cbgw, EDataCal *cal, icalcomponent *icalco if (e_cal_component_has_attachments (comp)) fetch_attachments (cbgw, comp); - status = e_gw_connection_send_appointment (cbgw, priv->container_id, comp, method, &remove, &modif_comp); + status = e_gw_connection_send_appointment (cbgw, priv->container_id, comp, method, all_instances, &modif_comp, &pstatus); if (status == E_GW_CONNECTION_STATUS_INVALID_CONNECTION) - status = e_gw_connection_send_appointment (cbgw, priv->container_id, comp, method, &remove, &modif_comp); + status = e_gw_connection_send_appointment (cbgw, priv->container_id, comp, method, all_instances, &modif_comp, &pstatus); - if (status == E_GW_CONNECTION_STATUS_ITEM_ALREADY_ACCEPTED) { - g_object_unref (comp); - return GNOME_Evolution_Calendar_Success; - } + if (!modif_comp) + modif_comp = g_object_ref (comp); /* update the cache */ - if (status == E_GW_CONNECTION_STATUS_OK) { - if (remove) { + if (status == E_GW_CONNECTION_STATUS_OK || status == E_GW_CONNECTION_STATUS_ITEM_ALREADY_ACCEPTED) { + GSList *comps = NULL, *l; + gboolean found = FALSE; + + if (all_instances) { const char *uid; - - e_cal_component_get_uid (comp, (const char **) &uid); - if (e_cal_backend_cache_remove_component (priv->cache, uid, NULL)) - e_cal_backend_notify_object_removed (E_CAL_BACKEND (cbgw), uid, e_cal_component_get_as_string (comp), NULL); - } - else { - char *cache_comp = NULL, *uid, *new_comp = NULL; - ECalComponent *cache_component; - - if (!modif_comp) - modif_comp = g_object_ref (comp); + + e_cal_component_get_uid (modif_comp, (const char **) &uid); + comps = e_cal_backend_cache_get_components_by_uid (priv->cache, uid); + + if (!comps) + comps = g_slist_append (comps, g_object_ref (modif_comp)); else - e_cal_component_commit_sequence (modif_comp); + found = TRUE; + } else { + ECalComponentId *id = e_cal_component_get_id (modif_comp); + ECalComponent *comp = NULL; - e_cal_component_get_uid (modif_comp, (const char **) &uid); - cache_component = e_cal_backend_cache_get_component (priv->cache, uid, NULL); - - if (cache_component) { - e_cal_component_commit_sequence (cache_component); - cache_comp = e_cal_component_get_as_string (cache_component); - } + comp = e_cal_backend_cache_get_component (priv->cache, id->uid, id->rid); + + if (!comp) + comps = g_slist_append (comps, g_object_ref (modif_comp)); + else { + comps = g_slist_append (comps, comp); + found = TRUE; + } + + e_cal_component_free_id (id); + } + + for (l = comps; l != NULL; l = l->next) { + ECalComponent *comp = E_CAL_COMPONENT (l->data); - e_cal_backend_cache_put_component (priv->cache, modif_comp); - new_comp = e_cal_component_get_as_string (modif_comp); + if (pstatus == ICAL_PARTSTAT_DECLINED) { + ECalComponentId *id = e_cal_component_get_id (comp); - if (cache_comp) - e_cal_backend_notify_object_modified (E_CAL_BACKEND (cbgw), cache_comp, new_comp); - else - e_cal_backend_notify_object_created (E_CAL_BACKEND (cbgw), new_comp); + if (e_cal_backend_cache_remove_component (priv->cache, id->uid, id->rid)) { + + e_cal_backend_notify_object_removed (E_CAL_BACKEND (cbgw), id, e_cal_component_get_as_string (comp), NULL); + e_cal_component_free_id (id); + + } + + } else { + char *comp_str = NULL; + + change_status (comp, pstatus, e_gw_connection_get_user_email (priv->cnc)); + e_cal_backend_cache_put_component (priv->cache, comp); + comp_str = e_cal_component_get_as_string (comp); - g_free (cache_comp); - g_free (new_comp); - g_object_unref (modif_comp); - } + if (found) + e_cal_backend_notify_object_modified (E_CAL_BACKEND (cbgw), comp_str, comp_str); + else + e_cal_backend_notify_object_created (E_CAL_BACKEND (cbgw), comp_str); + + g_free (comp_str); + } + } + + g_slist_foreach (comps, (GFunc) g_object_unref, NULL); + g_slist_free (comps); g_object_unref (comp); - return GNOME_Evolution_Calendar_Success; + g_object_unref (modif_comp); + return GNOME_Evolution_Calendar_Success; + } if (status == E_GW_CONNECTION_STATUS_INVALID_OBJECT) { diff --git a/calendar/backends/http/e-cal-backend-http.c b/calendar/backends/http/e-cal-backend-http.c index 1fad363..16b1fdb 100644 --- a/calendar/backends/http/e-cal-backend-http.c +++ b/calendar/backends/http/e-cal-backend-http.c @@ -200,8 +200,13 @@ notify_and_remove_from_cache (gpointer key, gpointer value, gpointer user_data) const char *uid = key; const char *calobj = value; ECalBackendHttp *cbhttp = E_CAL_BACKEND_HTTP (user_data); + ECalComponent *comp = e_cal_component_new_from_string (calobj); + ECalComponentId *id = e_cal_component_get_id (comp); - e_cal_backend_notify_object_removed (E_CAL_BACKEND (cbhttp), uid, calobj, NULL); + e_cal_backend_notify_object_removed (E_CAL_BACKEND (cbhttp), id, calobj, NULL); + + e_cal_component_free_id (comp); + g_object_unref (comp); return TRUE; } diff --git a/calendar/backends/weather/e-cal-backend-weather.c b/calendar/backends/weather/e-cal-backend-weather.c index 5ab16e7..1e61ae1 100644 --- a/calendar/backends/weather/e-cal-backend-weather.c +++ b/calendar/backends/weather/e-cal-backend-weather.c @@ -145,10 +145,14 @@ finished_retrieval_cb (GList *forecasts, ECalBackendWeather *cbw) l = e_cal_backend_cache_get_components (priv->cache); for (; l != NULL; l = g_list_next (l)) { icomp = e_cal_component_get_icalcomponent (E_CAL_COMPONENT (l->data)); + ECalComponentId *id = e_cal_component_get_id (E_CAL_COMPONENT (l->data)); + e_cal_backend_notify_object_removed (E_CAL_BACKEND (cbw), - icalcomponent_get_uid (icomp), + id, icalcomponent_as_ical_string (icomp), NULL); + + e_cal_component_free_id (id); g_object_unref (G_OBJECT (l->data)); } g_list_free (l); diff --git a/calendar/idl/Evolution-DataServer-Calendar.idl b/calendar/idl/Evolution-DataServer-Calendar.idl index b9fb4e3..14741dd 100644 --- a/calendar/idl/Evolution-DataServer-Calendar.idl +++ b/calendar/idl/Evolution-DataServer-Calendar.idl @@ -28,7 +28,7 @@ module Calendar { /* A unique identifier for a calendar component */ typedef string CalObjUID; - /* A unique identified for an event recurrence */ + /* A unique identifier for an event recurrence */ typedef string CalRecurID; /* Simple sequence of strings */ @@ -37,6 +37,15 @@ module Calendar { /* Sequence of unique identifiers */ typedef sequence CalObjUIDSeq; + /* A unique identifier and the recurrence id for calendar components */ + struct CalObjID { + CalObjUID uid; + CalRecurID rid; + }; + + /* sequence of ids of calendar components */ + typedef sequence CalObjIDSeq; + /* A VTIMEZONE component, represented as an iCalendar string. */ typedef string CalTimezoneObj; @@ -145,7 +154,7 @@ module Calendar { interface CalViewListener : Bonobo::Unknown { oneway void notifyObjectsAdded (in stringlist objects); oneway void notifyObjectsModified (in stringlist objects); - oneway void notifyObjectsRemoved (in CalObjUIDSeq uids); + oneway void notifyObjectsRemoved (in CalObjIDSeq ids); oneway void notifyQueryProgress (in string message, in short percent); oneway void notifyQueryDone (in CallStatus status); }; diff --git a/calendar/libecal/e-cal-component.c b/calendar/libecal/e-cal-component.c index 03467ab..85bffce 100644 --- a/calendar/libecal/e-cal-component.c +++ b/calendar/libecal/e-cal-component.c @@ -1136,7 +1136,6 @@ e_cal_component_get_icalcomponent (ECalComponent *comp) g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), NULL); priv = comp->priv; - g_return_val_if_fail (priv->need_sequence_inc == FALSE, NULL); return priv->icalcomp; } @@ -1419,6 +1418,31 @@ e_cal_component_abort_sequence (ECalComponent *comp) } /** + * e_cal_component_get_id: + * @comp: A calendar component object. + * + * Return value: the id of the component + * */ +ECalComponentId * +e_cal_component_get_id (ECalComponent *comp) +{ + ECalComponentPrivate *priv; + ECalComponentId *id = NULL; + + g_return_if_fail (comp != NULL); + g_return_if_fail (E_IS_CAL_COMPONENT (comp)); + + priv = comp->priv; + g_return_if_fail (priv->icalcomp != NULL); + + id = g_new0 (ECalComponentId, 1); + id->uid = g_strdup (icalproperty_get_uid (priv->uid)); + id->rid = g_strdup (e_cal_component_get_recurid_as_string (comp)); + + return id; +} + +/** * e_cal_component_get_uid: * @comp: A calendar component object. * @uid: Return value for the UID string. @@ -4845,6 +4869,30 @@ e_cal_component_free_sequence (int *sequence) } /** + * e_cal_component_free_id: + * @id Component Id. + * + * Frees the id. + **/ +void +e_cal_component_free_id (ECalComponentId *id) +{ + g_return_if_fail (id != NULL); + + if (id->uid) { + g_free (id->uid); + id->uid = NULL; + } + + if (id->rid) { + g_free (id->rid); + id->rid = NULL; + } + + g_free (id); +} + +/** * e_cal_component_free_text_list: * @text_list: List of #ECalComponentText structures. * diff --git a/calendar/libecal/e-cal-component.h b/calendar/libecal/e-cal-component.h index ca545fc..31ebc7a 100644 --- a/calendar/libecal/e-cal-component.h +++ b/calendar/libecal/e-cal-component.h @@ -38,6 +38,11 @@ G_BEGIN_DECLS #define E_IS_CAL_COMPONENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CAL_COMPONENT)) #define E_IS_CAL_COMPONENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_CAL_COMPONENT)) +typedef struct { + char *uid; + char *rid; +} ECalComponentId; + /* Types of calendar components to be stored by a ECalComponent, as per RFC 2445. * We don't put the alarm component type here since we store alarms as separate * structures inside the other "real" components. @@ -221,6 +226,9 @@ void e_cal_component_abort_sequence (ECalComponent *comp); void e_cal_component_get_uid (ECalComponent *comp, const char **uid); void e_cal_component_set_uid (ECalComponent *comp, const char *uid); +ECalComponentId *e_cal_component_get_id (ECalComponent *comp); +void e_cal_component_free_id (ECalComponentId *id); + void e_cal_component_get_categories (ECalComponent *comp, const char **categories); void e_cal_component_set_categories (ECalComponent *comp, const char *categories); void e_cal_component_get_categories_list (ECalComponent *comp, GSList **categ_list); diff --git a/calendar/libecal/e-cal-view-listener.c b/calendar/libecal/e-cal-view-listener.c index e960f1c..bce8e78 100644 --- a/calendar/libecal/e-cal-view-listener.c +++ b/calendar/libecal/e-cal-view-listener.c @@ -97,14 +97,24 @@ build_object_list (const GNOME_Evolution_Calendar_stringlist *seq) } static GList * -build_uid_list (const GNOME_Evolution_Calendar_CalObjUIDSeq *seq) +build_id_list (const GNOME_Evolution_Calendar_CalObjUIDSeq *seq) { GList *list; int i; list = NULL; - for (i = 0; i < seq->_length; i++) - list = g_list_prepend (list, g_strdup (seq->_buffer[i])); + for (i = 0; i < seq->_length; i++) { + GNOME_Evolution_Calendar_CalObjID *corba_id; + ECalComponentId *id; + + corba_id = &seq->_buffer[i]; + id = g_new (ECalComponentId, 1); + + id->uid = g_strdup (corba_id->uid); + id->rid = g_strdup (corba_id->rid); + + list = g_list_prepend (list, id); + } return list; } @@ -153,23 +163,23 @@ impl_notifyObjectsModified (PortableServer_Servant servant, static void impl_notifyObjectsRemoved (PortableServer_Servant servant, - const GNOME_Evolution_Calendar_CalObjUIDSeq *uids, + const GNOME_Evolution_Calendar_CalObjIDSeq *ids, CORBA_Environment *ev) { ECalViewListener *ql; ECalViewListenerPrivate *priv; - GList *uid_list, *l; + GList *id_list, *l; ql = E_CAL_VIEW_LISTENER (bonobo_object_from_servant (servant)); priv = ql->priv; - uid_list = build_uid_list (uids); + id_list = build_id_list (ids); - g_signal_emit (G_OBJECT (ql), signals[OBJECTS_REMOVED], 0, uid_list); + g_signal_emit (G_OBJECT (ql), signals[OBJECTS_REMOVED], 0, id_list); - for (l = uid_list; l; l = l->next) - g_free (l->data); - g_list_free (uid_list); + for (l = id_list; l; l = l->next) + e_cal_component_free_id (l->data); + g_list_free (id_list); } static void diff --git a/calendar/libecal/e-cal-view.c b/calendar/libecal/e-cal-view.c index 680d6b7..3aece8e 100644 --- a/calendar/libecal/e-cal-view.c +++ b/calendar/libecal/e-cal-view.c @@ -92,14 +92,14 @@ objects_modified_cb (ECalViewListener *listener, GList *objects, gpointer data) } static void -objects_removed_cb (ECalViewListener *listener, GList *uids, gpointer data) +objects_removed_cb (ECalViewListener *listener, GList *ids, gpointer data) { ECalView *view; view = E_CAL_VIEW (data); g_object_ref (view); - g_signal_emit (G_OBJECT (view), signals[OBJECTS_REMOVED], 0, uids); + g_signal_emit (G_OBJECT (view), signals[OBJECTS_REMOVED], 0, ids); g_object_unref (view); } diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c index 1d0547a..f6dafb2 100644 --- a/calendar/libecal/e-cal.c +++ b/calendar/libecal/e-cal.c @@ -3912,7 +3912,7 @@ e_cal_free_alarms (GSList *comp_alarms) * Return value: TRUE on success, FALSE if the object was not found. **/ gboolean -e_cal_get_alarms_for_object (ECal *ecal, const char *uid, +e_cal_get_alarms_for_object (ECal *ecal, const ECalComponentId *id, time_t start, time_t end, ECalComponentAlarms **alarms) { @@ -3927,14 +3927,14 @@ e_cal_get_alarms_for_object (ECal *ecal, const char *uid, priv = ecal->priv; g_return_val_if_fail (priv->load_state == E_CAL_LOAD_LOADED, FALSE); - g_return_val_if_fail (uid != NULL, FALSE); + g_return_val_if_fail (id != NULL, FALSE); g_return_val_if_fail (start >= 0 && end >= 0, FALSE); g_return_val_if_fail (start <= end, FALSE); g_return_val_if_fail (alarms != NULL, FALSE); *alarms = NULL; - if (!e_cal_get_object (ecal, uid, NULL, &icalcomp, NULL)) + if (!e_cal_get_object (ecal, id->uid, id->rid, &icalcomp, NULL)) return FALSE; if (!icalcomp) return FALSE; diff --git a/calendar/libecal/e-cal.h b/calendar/libecal/e-cal.h index 10c7f77..876c91f 100644 --- a/calendar/libecal/e-cal.h +++ b/calendar/libecal/e-cal.h @@ -165,7 +165,7 @@ GSList *e_cal_get_alarms_in_range (ECal *ecal, time_t start, time_t end); void e_cal_free_alarms (GSList *comp_alarms); -gboolean e_cal_get_alarms_for_object (ECal *ecal, const char *uid, +gboolean e_cal_get_alarms_for_object (ECal *ecal, const ECalComponentId *id, time_t start, time_t end, ECalComponentAlarms **alarms); diff --git a/calendar/libedata-cal/e-cal-backend-sync.c b/calendar/libedata-cal/e-cal-backend-sync.c index b4f85d9..d400e27 100644 --- a/calendar/libedata-cal/e-cal-backend-sync.c +++ b/calendar/libedata-cal/e-cal-backend-sync.c @@ -723,10 +723,20 @@ _e_cal_backend_remove_object (ECalBackend *backend, EDataCal *cal, const char *u == GNOME_Evolution_Calendar_Success) { e_data_cal_notify_object_modified (cal, status, old_object, calobj); g_free (calobj); - } else - e_data_cal_notify_object_removed (cal, status, uid, old_object, object); + } else { + ECalComponentId *id = g_new0 (ECalComponentId, 1); + id->uid = g_strdup (uid); + + if (mod == CALOBJ_MOD_THIS) + id->rid = g_strdup (rid); + + e_data_cal_notify_object_removed (cal, status, id, old_object, object); + + e_cal_component_free_id (id); + + } } else - e_data_cal_notify_object_removed (cal, status, uid, old_object, object); + e_data_cal_notify_object_removed (cal, status, NULL, old_object, object); g_free (object); } diff --git a/calendar/libedata-cal/e-cal-backend.c b/calendar/libedata-cal/e-cal-backend.c index b2ddd8c..3d65832 100644 --- a/calendar/libedata-cal/e-cal-backend.c +++ b/calendar/libedata-cal/e-cal-backend.c @@ -1130,21 +1130,27 @@ e_cal_backend_notify_object_created (ECalBackend *backend, const char *calobj) static void match_query_and_notify (EDataCalView *query, const char *old_object, const char *object) { - gboolean old_match, new_match; + gboolean old_match = FALSE, new_match = FALSE; + + if (old_object) + old_match = e_data_cal_view_object_matches (query, old_object); - old_match = e_data_cal_view_object_matches (query, old_object); new_match = e_data_cal_view_object_matches (query, object); if (old_match && new_match) e_data_cal_view_notify_objects_modified_1 (query, object); else if (new_match) e_data_cal_view_notify_objects_added_1 (query, object); else if (old_match) { - icalcomponent *icalcomp; + ECalComponent *comp = NULL; - icalcomp = icalcomponent_new_from_string ((char *) old_object); - if (icalcomp) { - e_data_cal_view_notify_objects_removed_1 (query, icalcomponent_get_uid (icalcomp)); - icalcomponent_free (icalcomp); + comp = e_cal_component_new_from_string (old_object); + if (comp) { + ECalComponentId *id = e_cal_component_get_id (comp); + + e_data_cal_view_notify_objects_removed_1 (query, id); + + e_cal_component_free_id (id); + g_object_unref (comp); } } } @@ -1274,7 +1280,7 @@ e_cal_backend_notify_object_modified (ECalBackend *backend, /** * e_cal_backend_notify_object_removed: * @backend: A calendar backend. - * @uid: the UID of the removed object + * @id: the Id of the removed object * @old_object: iCalendar representation of the removed object * @new_object: iCalendar representation of the object after the removal. This * only applies to recurrent appointments that had an instance removed. In that @@ -1287,7 +1293,7 @@ e_cal_backend_notify_object_modified (ECalBackend *backend, * removed by non-EDS clients. **/ void -e_cal_backend_notify_object_removed (ECalBackend *backend, const char *uid, +e_cal_backend_notify_object_removed (ECalBackend *backend, const ECalComponentId *id, const char *old_object, const char *object) { ECalBackendPrivate *priv; @@ -1298,7 +1304,7 @@ e_cal_backend_notify_object_removed (ECalBackend *backend, const char *uid, priv = backend->priv; if (priv->notification_proxy) { - e_cal_backend_notify_object_removed (priv->notification_proxy, uid, old_object, object); + e_cal_backend_notify_object_removed (priv->notification_proxy, id, old_object, object); return; } @@ -1314,7 +1320,7 @@ e_cal_backend_notify_object_removed (ECalBackend *backend, const char *uid, /* if object == NULL, it means the object has been completely removed from the backend */ if (e_data_cal_view_object_matches (query, old_object)) - e_data_cal_view_notify_objects_removed_1 (query, uid); + e_data_cal_view_notify_objects_removed_1 (query, id); } else match_query_and_notify (query, old_object, object); diff --git a/calendar/libedata-cal/e-cal-backend.h b/calendar/libedata-cal/e-cal-backend.h index c97bf8c..f83de05 100644 --- a/calendar/libedata-cal/e-cal-backend.h +++ b/calendar/libedata-cal/e-cal-backend.h @@ -169,7 +169,7 @@ void e_cal_backend_last_client_gone (ECalBackend *backend); void e_cal_backend_set_notification_proxy (ECalBackend *backend, ECalBackend *proxy); void e_cal_backend_notify_object_created (ECalBackend *backend, const char *calobj); void e_cal_backend_notify_object_modified (ECalBackend *backend, const char *old_object, const char *object); -void e_cal_backend_notify_object_removed (ECalBackend *backend, const char *uid, const char *old_object, const char *object); +void e_cal_backend_notify_object_removed (ECalBackend *backend, const ECalComponentId *id, const char *old_object, const char *object); void e_cal_backend_notify_mode (ECalBackend *backend, GNOME_Evolution_Calendar_CalListener_SetModeStatus status, diff --git a/calendar/libedata-cal/e-data-cal-view.c b/calendar/libedata-cal/e-data-cal-view.c index d6ccc2c..3f972a3 100644 --- a/calendar/libedata-cal/e-data-cal-view.c +++ b/calendar/libedata-cal/e-data-cal-view.c @@ -117,37 +117,44 @@ add_object_to_cache (EDataCalView *query, const char *calobj) } static gboolean -uncache_with_uid_cb (gpointer key, gpointer value, gpointer user_data) +uncache_with_id_cb (gpointer key, gpointer value, gpointer user_data) { ECalComponent *comp; + ECalComponentId *id; const char *this_uid; - char *uid, *object; + char *object; + gboolean remove = FALSE; - uid = user_data; + id = user_data; object = value; comp = e_cal_component_new_from_string (object); if (comp) { e_cal_component_get_uid (comp, &this_uid); - if (this_uid && *this_uid && !strcmp (uid, this_uid)) { - g_object_unref (comp); - return TRUE; + if (this_uid && !strcmp (id->uid, this_uid)) { + if (id->rid && *id->rid) { + const char *rid = e_cal_component_get_recurid_as_string (comp); + + if (rid && !strcmp (id->rid, rid)) + remove = TRUE; + } else + remove = TRUE; } g_object_unref (comp); } - return FALSE; + return remove; } static void -remove_object_from_cache (EDataCalView *query, const char *uid) +remove_object_from_cache (EDataCalView *query, const ECalComponentId *id) { EDataCalViewPrivate *priv; priv = query->priv; - g_hash_table_foreach_remove (priv->matched_objects, (GHRFunc) uncache_with_uid_cb, (gpointer) uid); + g_hash_table_foreach_remove (priv->matched_objects, (GHRFunc) uncache_with_id_cb, (gpointer) id); } static void @@ -766,18 +773,18 @@ e_data_cal_view_notify_objects_modified_1 (EDataCalView *query, const char *obje /** * e_data_cal_view_notify_objects_removed: * @query: A query object. - * @uids: List of UIDs for the objects that have been removed. + * @ids: List of IDs for the objects that have been removed. * * Notifies all query listener of the removal of a list of objects. */ void -e_data_cal_view_notify_objects_removed (EDataCalView *query, const GList *uids) +e_data_cal_view_notify_objects_removed (EDataCalView *query, const GList *ids) { EDataCalViewPrivate *priv; - GNOME_Evolution_Calendar_CalObjUIDSeq uid_list; + GNOME_Evolution_Calendar_CalObjIDSeq id_list; CORBA_Environment ev; const GList *l; - int num_uids, i; + int num_ids, i; g_return_if_fail (query != NULL); g_return_if_fail (IS_QUERY (query)); @@ -785,60 +792,69 @@ e_data_cal_view_notify_objects_removed (EDataCalView *query, const GList *uids) priv = query->priv; g_return_if_fail (priv->listeners != CORBA_OBJECT_NIL); - num_uids = g_list_length ((GList*)uids); - if (num_uids <= 0) + num_ids = g_list_length ((GList*)ids); + if (num_ids <= 0) return; - - uid_list._buffer = GNOME_Evolution_Calendar_CalObjUIDSeq_allocbuf (num_uids); - uid_list._maximum = num_uids; - uid_list._length = num_uids; - - for (l = uids, i = 0; l; l = l->next, i ++) { - uid_list._buffer[i] = CORBA_string_dup (l->data); + + id_list._buffer = GNOME_Evolution_Calendar_CalObjIDSeq_allocbuf (num_ids); + id_list._maximum = num_ids; + id_list._length = num_ids; + + i = 0; + for (l = ids; l; l = l->next, i++) { + ECalComponentId *id = l->data; + GNOME_Evolution_Calendar_CalObjID *c_id = &id_list._buffer[i]; + + c_id->uid = CORBA_string_dup (id->uid); + + if (id->rid) + c_id->rid = CORBA_string_dup (id->rid); + else + c_id->rid = CORBA_string_dup (""); /* update our cache */ remove_object_from_cache (query, l->data); } - + for (l = priv->listeners; l != NULL; l = l->next) { ListenerData *ld = l->data; CORBA_exception_init (&ev); - GNOME_Evolution_Calendar_CalViewListener_notifyObjectsRemoved (ld->listener, &uid_list, &ev); + GNOME_Evolution_Calendar_CalViewListener_notifyObjectsRemoved (ld->listener, &id_list, &ev); if (BONOBO_EX (&ev)) g_warning (G_STRLOC ": could not notify the listener of object removal"); CORBA_exception_free (&ev); } - CORBA_free (uid_list._buffer); + CORBA_free (id_list._buffer); } /** * e_data_cal_view_notify_objects_removed: * @query: A query object. - * @uid: UID of the removed object. + * @id: Id of the removed object. * * Notifies all query listener of the removal of a single object. */ void -e_data_cal_view_notify_objects_removed_1 (EDataCalView *query, const char *uid) +e_data_cal_view_notify_objects_removed_1 (EDataCalView *query, const ECalComponentId *id) { EDataCalViewPrivate *priv; - GList uids; + GList ids; g_return_if_fail (query != NULL); g_return_if_fail (IS_QUERY (query)); - g_return_if_fail (uid != NULL); + g_return_if_fail (id != NULL); priv = query->priv; g_return_if_fail (priv->listeners != CORBA_OBJECT_NIL); - uids.next = uids.prev = NULL; - uids.data = (gpointer)uid; + ids.next = ids.prev = NULL; + ids.data = (gpointer)id; - e_data_cal_view_notify_objects_removed (query, &uids); + e_data_cal_view_notify_objects_removed (query, &ids); } /** diff --git a/calendar/libedata-cal/e-data-cal-view.h b/calendar/libedata-cal/e-data-cal-view.h index 195d0e2..9ac6b64 100644 --- a/calendar/libedata-cal/e-data-cal-view.h +++ b/calendar/libedata-cal/e-data-cal-view.h @@ -74,9 +74,9 @@ void e_data_cal_view_notify_objects_modified (EDataCalView void e_data_cal_view_notify_objects_modified_1 (EDataCalView *query, const char *object); void e_data_cal_view_notify_objects_removed (EDataCalView *query, - const GList *uids); + const GList *ids); void e_data_cal_view_notify_objects_removed_1 (EDataCalView *query, - const char *uid); + const ECalComponentId *id); void e_data_cal_view_notify_progress (EDataCalView *query, const char *message, int percent); diff --git a/calendar/libedata-cal/e-data-cal.c b/calendar/libedata-cal/e-data-cal.c index 9c70a53..1b5649f 100644 --- a/calendar/libedata-cal/e-data-cal.c +++ b/calendar/libedata-cal/e-data-cal.c @@ -966,7 +966,7 @@ e_data_cal_notify_object_modified (EDataCal *cal, GNOME_Evolution_Calendar_CallS */ void e_data_cal_notify_object_removed (EDataCal *cal, GNOME_Evolution_Calendar_CallStatus status, - const char *uid, const char *old_object, const char *object) + const ECalComponentId *id, const char *old_object, const char *object) { EDataCalPrivate *priv; CORBA_Environment ev; @@ -978,7 +978,7 @@ e_data_cal_notify_object_removed (EDataCal *cal, GNOME_Evolution_Calendar_CallSt g_return_if_fail (priv->listener != CORBA_OBJECT_NIL); if (status == GNOME_Evolution_Calendar_Success) - e_cal_backend_notify_object_removed (priv->backend, uid, old_object, object); + e_cal_backend_notify_object_removed (priv->backend, id, old_object, object); CORBA_exception_init (&ev); GNOME_Evolution_Calendar_CalListener_notifyObjectRemoved (priv->listener, status, &ev); diff --git a/calendar/libedata-cal/e-data-cal.h b/calendar/libedata-cal/e-data-cal.h index 3e55aea..5132299 100644 --- a/calendar/libedata-cal/e-data-cal.h +++ b/calendar/libedata-cal/e-data-cal.h @@ -83,7 +83,7 @@ void e_data_cal_notify_object_created (EDataCal *cal, GNOME_Evolution_Calendar_ void e_data_cal_notify_object_modified (EDataCal *cal, GNOME_Evolution_Calendar_CallStatus status, const char *old_object, const char *object); void e_data_cal_notify_object_removed (EDataCal *cal, GNOME_Evolution_Calendar_CallStatus status, - const char *uid, const char *old_object, const char *object); + const ECalComponentId *id, const char *old_object, const char *object); void e_data_cal_notify_alarm_discarded (EDataCal *cal, GNOME_Evolution_Calendar_CallStatus status); void e_data_cal_notify_objects_received (EDataCal *cal, GNOME_Evolution_Calendar_CallStatus status);