libedata-cal: Purge deprecated APIs.
[platform/upstream/evolution-data-server.git] / calendar / libedata-cal / e-cal-backend.c
index fee91d8..2a88f80 100644 (file)
@@ -1617,236 +1617,6 @@ e_cal_backend_notify_component_removed (ECalBackend *backend,
        e_cal_backend_foreach_view (backend, component_removed_cb, &cd);
 }
 
-static gboolean
-object_created_cb (EDataCalView *view,
-                   gpointer data)
-{
-       const gchar *calobj = data;
-
-       if (e_data_cal_view_object_matches (view, calobj))
-               e_data_cal_view_notify_objects_added_1 (view, calobj);
-
-       return TRUE;
-}
-
-/**
- * e_cal_backend_notify_object_created:
- * @backend: an #ECalBackend
- * @calobj: the newly created object
- *
- * Notifies each of the backend's listeners about a new object.
- *
- * #e_data_cal_notify_object_created() calls this for you. You only need to
- * call e_cal_backend_notify_object_created() yourself to report objects
- * created by non-EDS clients.
- *
- * Deprecated: 3.4: Use e_cal_backend_notify_component_created() instead.
- **/
-void
-e_cal_backend_notify_object_created (ECalBackend *backend,
-                                     const gchar *calobj)
-{
-       ECalBackendPrivate *priv;
-
-       priv = backend->priv;
-
-       if (priv->notification_proxy) {
-               e_cal_backend_notify_object_created (priv->notification_proxy, calobj);
-               return;
-       }
-
-       e_cal_backend_foreach_view (backend, object_created_cb, (gpointer) calobj);
-}
-
-/**
- * e_cal_backend_notify_objects_added:
- *
- * Since: 2.24
- *
- * Deprecated: 3.4: Use e_data_cal_view_notify_objects_added() instead.
- **/
-void
-e_cal_backend_notify_objects_added (ECalBackend *backend,
-                                    EDataCalView *view,
-                                    const GSList *objects)
-{
-       e_data_cal_view_notify_objects_added (view, objects);
-}
-
-static void
-match_view_and_notify_object (EDataCalView *view,
-                              const gchar *old_object,
-                              const gchar *object)
-{
-       gboolean old_match = FALSE, new_match = FALSE;
-
-       if (old_object)
-               old_match = e_data_cal_view_object_matches (view, old_object);
-
-       new_match = e_data_cal_view_object_matches (view, object);
-       if (old_match && new_match)
-               e_data_cal_view_notify_objects_modified_1 (view, object);
-       else if (new_match)
-               e_data_cal_view_notify_objects_added_1 (view, object);
-       else if (old_match) {
-               ECalComponent *comp = NULL;
-
-               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 (view, id);
-
-                       e_cal_component_free_id (id);
-                       g_object_unref (comp);
-               }
-       }
-}
-
-struct object_call_data {
-       const gchar *old_object;
-       const gchar *object;
-       const ECalComponentId *id;
-};
-
-static gboolean
-call_match_and_notify_object (EDataCalView *view,
-                              gpointer user_data)
-{
-       struct object_call_data *cd = user_data;
-
-       g_return_val_if_fail (user_data != NULL, FALSE);
-
-       match_view_and_notify_object (view, cd->old_object, cd->object);
-
-       return TRUE;
-}
-
-/**
- * e_cal_backend_notify_object_modified:
- * @backend: an #ECalBackend
- * @old_object: iCalendar representation of the original form of the object
- * @object: iCalendar representation of the new form of the object
- *
- * Notifies each of the backend's listeners about a modified object.
- *
- * #e_data_cal_notify_object_modified() calls this for you. You only need to
- * call e_cal_backend_notify_object_modified() yourself to report objects
- * modified by non-EDS clients.
- *
- * Deprecated: 3.4: Use e_cal_backend_notify_component_modified() instead.
- **/
-void
-e_cal_backend_notify_object_modified (ECalBackend *backend,
-                                      const gchar *old_object,
-                                      const gchar *object)
-{
-       ECalBackendPrivate *priv;
-       struct object_call_data cd;
-
-       priv = backend->priv;
-
-       if (priv->notification_proxy) {
-               e_cal_backend_notify_object_modified (priv->notification_proxy, old_object, object);
-               return;
-       }
-
-       cd.old_object = old_object;
-       cd.object = object;
-       cd.id = NULL;
-
-       e_cal_backend_foreach_view (backend, call_match_and_notify_object, &cd);
-}
-
-/**
- * e_cal_backend_notify_objects_modified:
- *
- * Since: 2.24
- *
- * Deprecated: 3.4: Use e_data_cal_view_notify_objects_modified() instead.
- **/
-void
-e_cal_backend_notify_objects_modified (ECalBackend *backend,
-                                       EDataCalView *view,
-                                       const GSList *objects)
-{
-       e_data_cal_view_notify_objects_modified (view, objects);
-}
-
-static gboolean
-object_removed_cb (EDataCalView *view,
-                   gpointer user_data)
-{
-       struct object_call_data *cd = user_data;
-
-       g_return_val_if_fail (user_data != NULL, FALSE);
-
-       if (cd->object == NULL) {
-               /* if object == NULL, it means the object has been completely
-                * removed from the backend */
-               if (!cd->old_object || e_data_cal_view_object_matches (view, cd->old_object))
-                       e_data_cal_view_notify_objects_removed_1 (view, cd->id);
-       } else
-               match_view_and_notify_object (view, cd->old_object, cd->object);
-
-       return TRUE;
-}
-
-/**
- * e_cal_backend_notify_object_removed:
- * @backend: an #ECalBackend
- * @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
- * case, this function notifies a modification instead of a removal.
- *
- * Notifies each of the backend's listeners about a removed object.
- *
- * e_data_cal_notify_object_removed() calls this for you. You only need to
- * call e_cal_backend_notify_object_removed() yourself to report objects
- * removed by non-EDS clients.
- *
- * Deprecated: 3.4: Use e_cal_backend_notify_component_removed() instead.
- **/
-void
-e_cal_backend_notify_object_removed (ECalBackend *backend,
-                                     const ECalComponentId *id,
-                                     const gchar *old_object,
-                                     const gchar *new_object)
-{
-       ECalBackendPrivate *priv;
-       struct object_call_data cd;
-
-       priv = backend->priv;
-
-       if (priv->notification_proxy) {
-               e_cal_backend_notify_object_removed (priv->notification_proxy, id, old_object, new_object);
-               return;
-       }
-
-       cd.old_object = old_object;
-       cd.object = new_object;
-       cd.id = id;
-
-       e_cal_backend_foreach_view (backend, object_removed_cb, &cd);
-}
-
-/**
- * e_cal_backend_notify_objects_removed:
- *
- * Since: 2.24
- *
- * Deprecated: 3.4: Use e_data_cal_view_notify_objects_removed() instead.
- **/
-void
-e_cal_backend_notify_objects_removed (ECalBackend *backend,
-                                      EDataCalView *view,
-                                      const GSList *ids)
-{
-       e_data_cal_view_notify_objects_removed (view, ids);
-}
-
 /**
  * e_cal_backend_notify_error:
  * @backend: an #ECalBackend