EBackend.CollectionBackend.create_resource

### Method

# EBackend CollectionBackendcreate_resource

since: 3.6

#### Declaration [src]

    void
    e_collection_backend_create_resource (
      ECollectionBackend* backend,
      ESource* source,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description [src]

Asynchronously 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.

When the operation is finished, `callback` will be called. You can then call `e_collection_backend_create_resource_finish()` to get the result of the operation.

Available since: 3.6

This method completes asynchronously. Use `e_collection_backend_create_resource_finish()` inside the `GAsyncReadyCallback` to obtain the result of the operation.

#### Parameters

`source`

  Type: `ESource`

  An `ESource`.

  The data is owned by the caller of the method.

`cancellable`

  Type: `GCancellable`

  Optional `GCancellable` object, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`callback`

  Type: `GAsyncReadyCallback`

  A `GAsyncReadyCallback` to call when the request is satisfied.

  The argument can be `NULL`.

`user_data`

  Type: `gpointer`

  Data to pass to the callback function.

  The argument can be `NULL`.
  The data is owned by the caller of the method.