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()
}
/**
- * 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.
}
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,
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;
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,
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,
}
/**
- * 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
guint32 opid,
GCancellable *cancellable,
gboolean only_if_exists);
- void (*remove) (ECalBackend *backend,
- EDataCal *cal,
- guint32 opid,
- GCancellable *cancellable);
void (*refresh) (ECalBackend *backend,
EDataCal *cal,
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,
typedef enum {
OP_OPEN,
- OP_REMOVE,
OP_REFRESH,
OP_GET_BACKEND_PROPERTY,
OP_SET_BACKEND_PROPERTY,
gchar *prop_value;
} sbp;
- /* OP_REMOVE */
/* OP_REFRESH */
/* OP_CANCEL_ALL */
/* OP_CLOSE */
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;
}
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)
}
/**
- * 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.
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 (
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);
__BACKEND_PROPERTY_CHANGED_SIGNAL,
__OPEN_METHOD,
__OPEN_DONE_SIGNAL,
- __REMOVE_METHOD,
- __REMOVE_DONE_SIGNAL,
__REFRESH_METHOD,
__REFRESH_DONE_SIGNAL,
__GET_BACKEND_PROPERTY_METHOD,
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)
__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,
}
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,
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,
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,
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),
&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),
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);
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);
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);
/* 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
#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);
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
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
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