EGdbusCal: Remove the remove() method.
authorMatthew Barnes <mbarnes@redhat.com>
Sun, 7 Oct 2012 03:48:36 +0000 (23:48 -0400)
committerMatthew Barnes <mbarnes@redhat.com>
Sun, 7 Oct 2012 22:27:20 +0000 (18:27 -0400)
Not used anymore.  Remove the ESource instead.

This also takes out the following backend functions:

    e_cal_backend_remove()
    e_cal_backend_sync_remove()
    e_data_cal_respond_remove()

calendar/libedata-cal/e-cal-backend-sync.c
calendar/libedata-cal/e-cal-backend-sync.h
calendar/libedata-cal/e-cal-backend.c
calendar/libedata-cal/e-cal-backend.h
calendar/libedata-cal/e-data-cal.c
calendar/libedata-cal/e-data-cal.h
calendar/libegdbus/e-gdbus-cal.c
calendar/libegdbus/e-gdbus-cal.h
docs/reference/calendar/libedata-cal/libedata-cal-sections.txt

index 1a0ad95..a3ef565 100644 (file)
@@ -90,26 +90,6 @@ e_cal_backend_sync_open (ECalBackendSync *backend,
 }
 
 /**
- * e_cal_backend_sync_remove:
- * @backend: An ECalBackendSync object.
- * @cal: An EDataCal object.
- * @cancellable: a #GCancellable for the operation
- * @error: Out parameter for a #GError.
- *
- * Calls the remove_sync method on the given backend.
- */
-void
-e_cal_backend_sync_remove (ECalBackendSync *backend,
-                           EDataCal *cal,
-                           GCancellable *cancellable,
-                           GError **error)
-{
-       e_return_data_cal_error_if_fail (backend && E_IS_CAL_BACKEND_SYNC (backend), InvalidArg);
-
-       LOCK_WRAPPER (remove_sync, (backend, cal, cancellable, error));
-}
-
-/**
  * e_cal_backend_sync_refresh:
  * @backend: An ECalBackendSync object.
  * @cal: An EDataCal object.
@@ -581,19 +561,6 @@ cal_backend_open (ECalBackend *backend,
 }
 
 static void
-cal_backend_remove (ECalBackend *backend,
-                    EDataCal *cal,
-                    guint32 opid,
-                    GCancellable *cancellable)
-{
-       GError *error = NULL;
-
-       e_cal_backend_sync_remove (E_CAL_BACKEND_SYNC (backend), cal, cancellable, &error);
-
-       e_data_cal_respond_remove (cal, opid, error);
-}
-
-static void
 cal_backend_refresh (ECalBackend *backend,
                      EDataCal *cal,
                      guint32 opid,
@@ -1012,7 +979,6 @@ e_cal_backend_sync_class_init (ECalBackendSyncClass *class)
 
        backend_class = E_CAL_BACKEND_CLASS (class);
        backend_class->open                     = cal_backend_open;
-       backend_class->remove                   = cal_backend_remove;
        backend_class->refresh                  = cal_backend_refresh;
        backend_class->get_backend_property     = cal_backend_get_backend_property;
        backend_class->set_backend_property     = cal_backend_set_backend_property;
index 56badd1..f2d22ce 100644 (file)
@@ -50,10 +50,6 @@ struct _ECalBackendSyncClass {
                                                 GCancellable *cancellable,
                                                 gboolean only_if_exists,
                                                 GError **error);
-       void            (*remove_sync)          (ECalBackendSync *backend,
-                                                EDataCal *cal,
-                                                GCancellable *cancellable,
-                                                GError **error);
        void            (*refresh_sync)         (ECalBackendSync *backend,
                                                 EDataCal *cal,
                                                 GCancellable *cancellable,
@@ -164,10 +160,6 @@ void               e_cal_backend_sync_open         (ECalBackendSync *backend,
                                                 GCancellable *cancellable,
                                                 gboolean only_if_exists,
                                                 GError **error);
-void           e_cal_backend_sync_remove       (ECalBackendSync *backend,
-                                                EDataCal *cal,
-                                                GCancellable *cancellable,
-                                                GError **error);
 void           e_cal_backend_sync_refresh      (ECalBackendSync *backend,
                                                 EDataCal *cal,
                                                 GCancellable *cancellable,
index 2a88f80..0415daf 100644 (file)
@@ -906,32 +906,6 @@ e_cal_backend_open (ECalBackend *backend,
 }
 
 /**
- * e_cal_backend_remove:
- * @backend: an #ECalBackend
- * @cal: an #EDataCal
- * @opid: the ID to use for this operation
- * @cancellable: a #GCancellable for the operation
- *
- * Removes the calendar being accessed by the given backend.
- * This might be finished with e_data_cal_respond_remove().
- **/
-void
-e_cal_backend_remove (ECalBackend *backend,
-                      EDataCal *cal,
-                      guint32 opid,
-                      GCancellable *cancellable)
-{
-       g_return_if_fail (backend != NULL);
-       g_return_if_fail (E_IS_CAL_BACKEND (backend));
-       g_return_if_fail (E_CAL_BACKEND_GET_CLASS (backend)->remove != NULL);
-
-       if (e_cal_backend_is_opening (backend))
-               e_data_cal_respond_remove (cal, opid, EDC_OPENING_ERROR);
-       else
-               (* E_CAL_BACKEND_GET_CLASS (backend)->remove) (backend, cal, opid, cancellable);
-}
-
-/**
  * e_cal_backend_refresh:
  * @backend: an #ECalBackend
  * @cal: an #EDataCal
index 44bff89..8aa5dcf 100644 (file)
@@ -177,10 +177,6 @@ struct _ECalBackendClass {
                                                 guint32 opid,
                                                 GCancellable *cancellable,
                                                 gboolean only_if_exists);
-       void            (*remove)               (ECalBackend *backend,
-                                                EDataCal *cal,
-                                                guint32 opid,
-                                                GCancellable *cancellable);
 
        void            (*refresh)              (ECalBackend *backend,
                                                 EDataCal *cal,
@@ -322,10 +318,6 @@ void               e_cal_backend_open              (ECalBackend *backend,
                                                 guint32 opid,
                                                 GCancellable *cancellable,
                                                 gboolean only_if_exists);
-void           e_cal_backend_remove            (ECalBackend *backend,
-                                                EDataCal *cal,
-                                                guint32 opid,
-                                                GCancellable *cancellable);
 void           e_cal_backend_refresh           (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 guint32 opid,
index 896285a..5e6accb 100644 (file)
@@ -62,7 +62,6 @@ static EOperationPool *ops_pool = NULL;
 
 typedef enum {
        OP_OPEN,
-       OP_REMOVE,
        OP_REFRESH,
        OP_GET_BACKEND_PROPERTY,
        OP_SET_BACKEND_PROPERTY,
@@ -144,7 +143,6 @@ typedef struct {
                        gchar *prop_value;
                } sbp;
 
-               /* OP_REMOVE */
                /* OP_REFRESH */
                /* OP_CANCEL_ALL */
                /* OP_CLOSE */
@@ -184,9 +182,6 @@ operation_thread (gpointer data,
        case OP_OPEN:
                e_cal_backend_open (backend, op->cal, op->id, op->cancellable, op->d.only_if_exists);
                break;
-       case OP_REMOVE:
-               e_cal_backend_remove (backend, op->cal, op->id, op->cancellable);
-               break;
        case OP_REFRESH:
                e_cal_backend_refresh (backend, op->cal, op->id, op->cancellable);
                break;
@@ -544,21 +539,6 @@ impl_Cal_open (EGdbusCal *object,
 }
 
 static gboolean
-impl_Cal_remove (EGdbusCal *object,
-                 GDBusMethodInvocation *invocation,
-                 EDataCal *cal)
-{
-       OperationData *op;
-
-       op = op_new (OP_REMOVE, cal);
-
-       e_gdbus_cal_complete_remove (cal->priv->gdbus_object, invocation, op->id);
-       e_operation_pool_push (ops_pool, op);
-
-       return TRUE;
-}
-
-static gboolean
 impl_Cal_refresh (EGdbusCal *object,
                   GDBusMethodInvocation *invocation,
                   EDataCal *cal)
@@ -927,33 +907,6 @@ e_data_cal_respond_open (EDataCal *cal,
 }
 
 /**
- * e_data_cal_respond_remove:
- * @cal: A calendar client interface.
- * @error: Operation error, if any, automatically freed if passed it.
- *
- * Notifies listeners of the completion of the remove method call.
- *
- * Since: 3.2
- */
-void
-e_data_cal_respond_remove (EDataCal *cal,
-                           guint32 opid,
-                           GError *error)
-{
-       op_complete (cal, opid);
-
-       /* Translators: This is prefix to a detailed error message */
-       g_prefix_error (&error, "%s", _("Cannot remove calendar: "));
-
-       e_gdbus_cal_emit_remove_done (cal->priv->gdbus_object, opid, error);
-
-       if (error)
-               g_error_free (error);
-       else
-               e_cal_backend_set_is_removed (cal->priv->backend, TRUE);
-}
-
-/**
  * e_data_cal_respond_refresh:
  * @cal: A calendar client interface.
  * @error: Operation error, if any, automatically freed if passed it.
@@ -1698,9 +1651,6 @@ e_data_cal_init (EDataCal *ecal)
                gdbus_object, "handle-open",
                G_CALLBACK (impl_Cal_open), ecal);
        g_signal_connect (
-               gdbus_object, "handle-remove",
-               G_CALLBACK (impl_Cal_remove), ecal);
-       g_signal_connect (
                gdbus_object, "handle-refresh",
                G_CALLBACK (impl_Cal_refresh), ecal);
        g_signal_connect (
index 9414248..b8ad92e 100644 (file)
@@ -135,9 +135,6 @@ guint               e_data_cal_register_gdbus_object
 void           e_data_cal_respond_open         (EDataCal *cal,
                                                 guint32 opid,
                                                 GError *error);
-void           e_data_cal_respond_remove       (EDataCal *cal,
-                                                guint32 opid,
-                                                GError *error);
 void           e_data_cal_respond_refresh      (EDataCal *cal,
                                                 guint32 opid,
                                                 GError *error);
index dbd0b96..0f59375 100644 (file)
@@ -45,8 +45,6 @@ enum
        __BACKEND_PROPERTY_CHANGED_SIGNAL,
        __OPEN_METHOD,
        __OPEN_DONE_SIGNAL,
-       __REMOVE_METHOD,
-       __REMOVE_DONE_SIGNAL,
        __REFRESH_METHOD,
        __REFRESH_DONE_SIGNAL,
        __GET_BACKEND_PROPERTY_METHOD,
@@ -149,8 +147,6 @@ E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_CAL_INTERFACE_NAME,
 E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME,
                                                       open)
 E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME,
-                                                      remove)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME,
                                                       refresh)
 E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRING (GDBUS_CAL_INTERFACE_NAME,
                                                         get_backend_property)
@@ -233,12 +229,6 @@ e_gdbus_cal_default_init (EGdbusCalIface *iface)
                __OPEN_DONE_SIGNAL)
        E_INIT_GDBUS_METHOD_ASYNC_VOID__VOID (
                EGdbusCalIface,
-               "remove",
-               remove,
-               __REMOVE_METHOD,
-               __REMOVE_DONE_SIGNAL)
-       E_INIT_GDBUS_METHOD_ASYNC_VOID__VOID (
-               EGdbusCalIface,
                "refresh",
                refresh,
                __REFRESH_METHOD,
@@ -380,33 +370,6 @@ e_gdbus_cal_call_open_sync (GDBusProxy *proxy,
 }
 
 void
-e_gdbus_cal_call_remove (GDBusProxy *proxy,
-                         GCancellable *cancellable,
-                         GAsyncReadyCallback callback,
-                         gpointer user_data)
-{
-       e_gdbus_proxy_call_void ("remove", e_gdbus_cal_call_remove, E_GDBUS_ASYNC_OP_KEEPER (proxy), cancellable, callback, user_data);
-}
-
-gboolean
-e_gdbus_cal_call_remove_finish (GDBusProxy *proxy,
-                                GAsyncResult *result,
-                                GError **error)
-{
-       return e_gdbus_proxy_finish_call_void (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, error, e_gdbus_cal_call_remove);
-}
-
-gboolean
-e_gdbus_cal_call_remove_sync (GDBusProxy *proxy,
-                              GCancellable *cancellable,
-                              GError **error)
-{
-       return e_gdbus_proxy_call_sync_void__void (proxy, cancellable, error,
-               e_gdbus_cal_call_remove,
-               e_gdbus_cal_call_remove_finish);
-}
-
-void
 e_gdbus_cal_call_refresh (GDBusProxy *proxy,
                           GCancellable *cancellable,
                           GAsyncReadyCallback callback,
@@ -1271,8 +1234,6 @@ e_gdbus_cal_emit_ ## _mname ## _done (EGdbusCal *object, guint arg_opid, const G
 
 DECLARE_EMIT_DONE_SIGNAL_0 (open,
                             __OPEN_DONE_SIGNAL)
-DECLARE_EMIT_DONE_SIGNAL_0 (remove,
-                            __REMOVE_DONE_SIGNAL)
 DECLARE_EMIT_DONE_SIGNAL_0 (refresh,
                             __REFRESH_DONE_SIGNAL)
 DECLARE_EMIT_DONE_SIGNAL_1 (get_backend_property,
@@ -1389,8 +1350,6 @@ E_DECLARE_GDBUS_ASYNC_METHOD_1 (cal,
                                   only_if_exists,
                                   "b")
 E_DECLARE_GDBUS_ASYNC_METHOD_0 (cal,
-                                remove)
-E_DECLARE_GDBUS_ASYNC_METHOD_0 (cal,
                                 refresh)
 E_DECLARE_GDBUS_ASYNC_METHOD_1_WITH_RETURN (cal,
                                             get_backend_property,
@@ -1481,7 +1440,6 @@ E_DECLARE_GDBUS_SYNC_METHOD_0 (cal,
 static const GDBusMethodInfo * const e_gdbus_cal_method_info_pointers[] =
 {
        &E_DECLARED_GDBUS_METHOD_INFO_NAME (cal, open),
-       &E_DECLARED_GDBUS_METHOD_INFO_NAME (cal, remove),
        &E_DECLARED_GDBUS_METHOD_INFO_NAME (cal, refresh),
        &E_DECLARED_GDBUS_METHOD_INFO_NAME (cal, get_backend_property),
        &E_DECLARED_GDBUS_METHOD_INFO_NAME (cal, set_backend_property),
@@ -1514,7 +1472,6 @@ static const GDBusSignalInfo * const e_gdbus_cal_signal_info_pointers[] =
        &E_DECLARED_GDBUS_SIGNAL_INFO_NAME (cal, backend_property_changed),
 
        &E_DECLARED_GDBUS_SIGNAL_INFO_NAME (cal, open_done),
-       &E_DECLARED_GDBUS_SIGNAL_INFO_NAME (cal, remove_done),
        &E_DECLARED_GDBUS_SIGNAL_INFO_NAME (cal, refresh_done),
        &E_DECLARED_GDBUS_SIGNAL_INFO_NAME (cal, get_backend_property_done),
        &E_DECLARED_GDBUS_SIGNAL_INFO_NAME (cal, set_backend_property_done),
@@ -1753,7 +1710,6 @@ e_gdbus_cal_proxy_init (EGdbusCalProxy *proxy)
        proxy->priv->pending_ops = e_gdbus_async_op_keeper_create_pending_ops (E_GDBUS_ASYNC_OP_KEEPER (proxy));
 
        E_GDBUS_CONNECT_METHOD_DONE_SIGNAL_VOID   (open);
-       E_GDBUS_CONNECT_METHOD_DONE_SIGNAL_VOID   (remove);
        E_GDBUS_CONNECT_METHOD_DONE_SIGNAL_VOID   (refresh);
        E_GDBUS_CONNECT_METHOD_DONE_SIGNAL_STRING (get_backend_property);
        E_GDBUS_CONNECT_METHOD_DONE_SIGNAL_VOID   (set_backend_property);
index 47c13b4..2c9edbb 100644 (file)
@@ -112,9 +112,6 @@ struct _EGdbusCalIface
        gboolean (*handle_open)                         (EGdbusCal *object, GDBusMethodInvocation *invocation, gboolean in_only_if_exists);
        void     (*open_done)                           (EGdbusCal *object, guint arg_opid, const GError *arg_error);
 
-       gboolean (*handle_remove)                       (EGdbusCal *object, GDBusMethodInvocation *invocation);
-       void     (*remove_done)                         (EGdbusCal *object, guint arg_opid, const GError *arg_error);
-
        gboolean (*handle_refresh)                      (EGdbusCal *object, GDBusMethodInvocation *invocation);
        void     (*refresh_done)                        (EGdbusCal *object, guint arg_opid, const GError *arg_error);
 
@@ -173,10 +170,6 @@ void               e_gdbus_cal_call_open                           (GDBusProxy *proxy, gboolean in_only_if_exists, G
 gboolean       e_gdbus_cal_call_open_finish                    (GDBusProxy *proxy, GAsyncResult *result, GError **error);
 gboolean       e_gdbus_cal_call_open_sync                      (GDBusProxy *proxy, gboolean in_only_if_exists, GCancellable *cancellable, GError **error);
 
-void           e_gdbus_cal_call_remove                         (GDBusProxy *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
-gboolean       e_gdbus_cal_call_remove_finish                  (GDBusProxy *proxy, GAsyncResult *result, GError **error);
-gboolean       e_gdbus_cal_call_remove_sync                    (GDBusProxy *proxy, GCancellable *cancellable, GError **error);
-
 void           e_gdbus_cal_call_refresh                        (GDBusProxy *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
 gboolean       e_gdbus_cal_call_refresh_finish                 (GDBusProxy *proxy, GAsyncResult *result, GError **error);
 gboolean       e_gdbus_cal_call_refresh_sync                   (GDBusProxy *proxy, GCancellable *cancellable, GError **error);
@@ -271,7 +264,6 @@ gboolean    e_gdbus_cal_call_close_sync                     (GDBusProxy *proxy, GCancellable *cancell
 
 /* D-Bus Methods Completion Helpers */
 #define e_gdbus_cal_complete_open                      e_gdbus_complete_async_method
-#define e_gdbus_cal_complete_remove                    e_gdbus_complete_async_method
 #define e_gdbus_cal_complete_refresh                   e_gdbus_complete_async_method
 #define e_gdbus_cal_complete_get_backend_property      e_gdbus_complete_async_method
 #define e_gdbus_cal_complete_set_backend_property      e_gdbus_complete_async_method
@@ -293,7 +285,6 @@ gboolean    e_gdbus_cal_call_close_sync                     (GDBusProxy *proxy, GCancellable *cancell
 #define e_gdbus_cal_complete_close                     e_gdbus_complete_sync_method_void
 
 void e_gdbus_cal_emit_open_done                                (EGdbusCal *object, guint arg_opid, const GError *arg_error);
-void e_gdbus_cal_emit_remove_done                      (EGdbusCal *object, guint arg_opid, const GError *arg_error);
 void e_gdbus_cal_emit_refresh_done                     (EGdbusCal *object, guint arg_opid, const GError *arg_error);
 void e_gdbus_cal_emit_get_backend_property_done                (EGdbusCal *object, guint arg_opid, const GError *arg_error, const gchar *out_prop_value);
 void e_gdbus_cal_emit_set_backend_property_done                (EGdbusCal *object, guint arg_opid, const GError *arg_error);
index 02157e8..2c8ef6f 100644 (file)
@@ -30,7 +30,6 @@ e_cal_backend_set_notification_proxy
 e_cal_backend_get_backend_property
 e_cal_backend_set_backend_property
 e_cal_backend_open
-e_cal_backend_remove
 e_cal_backend_refresh
 e_cal_backend_get_object
 e_cal_backend_get_object_list
@@ -214,7 +213,6 @@ e_cal_backend_sexp_get_type
 ECalBackendSync
 e_cal_backend_sync_set_lock
 e_cal_backend_sync_open
-e_cal_backend_sync_remove
 e_cal_backend_sync_refresh
 e_cal_backend_sync_get_backend_property
 e_cal_backend_sync_set_backend_property
@@ -264,7 +262,6 @@ e_data_cal_new
 e_data_cal_get_backend
 e_data_cal_register_gdbus_object
 e_data_cal_respond_open
-e_data_cal_respond_remove
 e_data_cal_respond_refresh
 e_data_cal_respond_get_backend_property
 e_data_cal_respond_set_backend_property