+/**
+ * e_collection_backend_create_resource_sync
+ * @backend: an #ECollectionBackend
+ * @source: an #ESource
+ * @cancellable: optional #GCancellable object, or %NULL
+ * @error: return location for a #GError, or %NULL
+ *
+ * Creates a server-side resource described by @source. For example, if
+ * @source describes a new calendar, an equivalent calendar is created on
+ * the server.
+ *
+ * It is the implementor's responsibility to examine @source and determine
+ * what the equivalent server-side resource would be. If this cannot be
+ * determined without ambiguity, the function must return an error.
+ *
+ * After the server-side resource is successfully created, the implementor
+ * must also add an #ESource to @backend's #ECollectionBackend:server. This
+ * can either be done immediately or in response to some "resource created"
+ * notification from the server. The added #ESource can be @source itself
+ * or a different #ESource instance that describes the new resource.
+ * implementor's responsibility to add an #ESource to.
+ *
+ * Since: 3.6
+ **/
+gboolean
+e_collection_backend_create_resource_sync (ECollectionBackend *backend,
+ ESource *source,
+ GCancellable *cancellable,
+ GError **error)
+{
+ ECollectionBackendClass *class;
+
+ g_return_val_if_fail (E_IS_COLLECTION_BACKEND (backend), FALSE);
+ g_return_val_if_fail (E_IS_SOURCE (source), FALSE);
+
+ class = E_COLLECTION_BACKEND_GET_CLASS (backend);
+ g_return_val_if_fail (class->create_resource_sync != NULL, FALSE);
+
+ return class->create_resource_sync (
+ backend, source, cancellable, error);
+}
+
+void
+e_collection_backend_create_resource (ECollectionBackend *backend,
+ ESource *source,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ ECollectionBackendClass *class;
+
+ g_return_if_fail (E_IS_COLLECTION_BACKEND (backend));
+ g_return_if_fail (E_IS_SOURCE (source));
+
+ class = E_COLLECTION_BACKEND_GET_CLASS (backend);
+ g_return_if_fail (class->create_resource != NULL);
+
+ class->create_resource (
+ backend, source, cancellable, callback, user_data);
+}
+
+gboolean
+e_collection_backend_create_resource_finish (ECollectionBackend *backend,
+ GAsyncResult *result,
+ GError **error)
+{
+ ECollectionBackendClass *class;
+
+ g_return_val_if_fail (E_IS_COLLECTION_BACKEND (backend), FALSE);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (result), FALSE);
+
+ class = E_COLLECTION_BACKEND_GET_CLASS (backend);
+ g_return_val_if_fail (class->create_resource_finish != NULL, FALSE);
+
+ return class->create_resource_finish (backend, result, error);
+}
+
+gboolean
+e_collection_backend_delete_resource_sync (ECollectionBackend *backend,
+ ESource *source,
+ GCancellable *cancellable,
+ GError **error)
+{
+ ECollectionBackendClass *class;
+
+ g_return_val_if_fail (E_IS_COLLECTION_BACKEND (backend), FALSE);
+ g_return_val_if_fail (E_IS_SOURCE (source), FALSE);
+
+ class = E_COLLECTION_BACKEND_GET_CLASS (backend);
+ g_return_val_if_fail (class->delete_resource_sync != NULL, FALSE);
+
+ return class->delete_resource_sync (
+ backend, source, cancellable, error);
+}
+
+void
+e_collection_backend_delete_resource (ECollectionBackend *backend,
+ ESource *source,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ ECollectionBackendClass *class;
+
+ g_return_if_fail (E_IS_COLLECTION_BACKEND (backend));
+ g_return_if_fail (E_IS_SOURCE (source));
+
+ class = E_COLLECTION_BACKEND_GET_CLASS (backend);
+ g_return_if_fail (class->delete_resource != NULL);
+
+ return class->delete_resource (
+ backend, source, cancellable, callback, user_data);
+}
+
+gboolean
+e_collection_backend_delete_resource_finish (ECollectionBackend *backend,
+ GAsyncResult *result,
+ GError **error)
+{
+ ECollectionBackendClass *class;
+
+ g_return_val_if_fail (E_IS_COLLECTION_BACKEND (backend), FALSE);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (result), FALSE);
+
+ class = E_COLLECTION_BACKEND_GET_CLASS (backend);
+ g_return_val_if_fail (class->delete_resource_finish != NULL, FALSE);
+
+ return class->delete_resource_finish (backend, result, error);
+}
+