EBackend.CollectionBackend
Description: Reference for EBackend.CollectionBackend

### Class

# EBackendCollectionBackend

since: 3.6

#### Description [src]

    class EBackend.CollectionBackend : EBackend.Backend
    {
      /* No available fields */
    }

Contains only private data that should be read and manipulated using the functions below.

Available since: 3.6

#### Hierarchy

#### Ancestors

- EBackend
- GObject

#### Descendants

- EWebDAVCollectionBackend

#### Instance methods

###### e_collection_backend_authenticate_children

Authenticates all enabled children sources with the given `crendetials`. This is usually called when the collection source successfully used the `credentials` to connect to the (possibly) remote data store, to open the childern too. Already connected child sources are skipped.

since: 3.16

###### e_collection_backend_claim_all_resources

Claims all previously used sources that have not yet been claimed by `e_collection_backend_new_child()` and returns them in a `GList`. Note that previously used sources can only be claimed once, so subsequent calls to this function for `backend` will return `NULL`.

since: 3.6

###### e_collection_backend_create_resource

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.

since: 3.6

###### e_collection_backend_create_resource_finish

Finishes the operation started with e_collection_backend_create_resource().

since: 3.6

###### e_collection_backend_create_resource_sync

Creates a server-side resource described by `source`. For example, if `source` describes a new calendar, an equivalent calendar is created on the server.

since: 3.6

###### e_collection_backend_delete_resource

Asynchronously deletes a server-side resource described by `source`. The `source` must be a child of `backend`‘s collection `EBackend:source`.

since: 3.6

###### e_collection_backend_delete_resource_finish

Finishes the operation started with e_collection_backend_delete_resource().

since: 3.6

###### e_collection_backend_delete_resource_sync

Deletes a server-side resource described by `source`. The `source` must be a child of `backend`‘s collection `EBackend:source`.

since: 3.6

###### e_collection_backend_dup_resource_id

Extracts the resource ID for `child_source`, which is supposed to be a stable and unique server-assigned identifier for the remote resource described by `child_source`. If `child_source` is not actually a child of the collection `EBackend:source` owned by `backend`, the function returns `NULL`.

since: 3.6

###### e_collection_backend_freeze_populate

Freezes populate of the backend’s content. This is used to avoid calling populate multiple times in parallel. Every call to this function should be followed by the call of `e_collection_backend_thaw_populate()` to reverse the effect of this function, regardless of the return value of this function.

since: 3.38

###### e_collection_backend_get_cache_dir

Returns the private cache directory path for `backend`, which is named after the `ESource:uid` of `backend`‘s collection `EBackend:source`.

since: 3.6

###### e_collection_backend_get_part_enabled

Checks whether the `backend` has enabled at least of the `parts`.

since: 3.40

###### e_collection_backend_get_populate_frozen

No description available.

since: 3.38

###### e_collection_backend_is_new_source

Returns whether the `source` is a newly created child or not. New sources are remembered between two populate calls only.

since: 3.32

###### e_collection_backend_list_calendar_sources

Returns a list of calendar sources belonging to the data source collection managed by `backend`.

since: 3.6

###### e_collection_backend_list_contacts_sources

Returns a list of address book sources belonging to the data source collection managed by `backend`.

since: 3.6

###### e_collection_backend_list_mail_sources

Returns a list of mail sources belonging to the data source collection managed by `backend`.

since: 3.6

###### e_collection_backend_new_child

Creates a new `EServerSideSource` as a child of the collection `EBackend:source` owned by `backend`. If possible, the `EServerSideSource` is drawn from a cache of previously used sources indexed by `resource_id` so that locally cached data from previous sessions can be reused.

since: 3.6

###### e_collection_backend_ref_proxy_resolver

Returns the `GProxyResolver` for `backend` (if applicable), as indicated by the `ESourceAuthentication:proxy-uid` of `backend`‘s `EBackend:source` or one of its ancestors.

since: 3.12

###### e_collection_backend_ref_server

Returns the `ESourceRegistryServer` to which `backend` belongs.

since: 3.6

###### e_collection_backend_schedule_populate

Schedules a call to `populate()` of the `backend` on idle. The function does nothing in case the `backend` is offline.

since: 3.30

###### e_collection_backend_thaw_populate

Thaws populate of the backend’s content. This is a pair function for e_collection_backend_freeze_populate().

since: 3.38

##### Methods inherited from EBackend (21)

###### e_backend_credentials_required

Asynchronously calls the `e_backend_credentials_required_sync()` on the `backend`, to inform clients that credentials are required.

since: 3.16

###### e_backend_credentials_required_finish

Finishes the operation started with e_backend_credentials_required().

since: 3.16

###### e_backend_credentials_required_sync

Synchronously lets the clients know that the backned requires credentials to be properly opened. It’s a proxy function for e_source_invoke_credentials_required_sync(), where can be found more information about actual parameters meaning.

since: 3.16

###### e_backend_ensure_online_state_updated

Makes sure that the “online” property is updated, that is, if there is any destination reachability test pending, it’ll be done immediately and the only state will be updated as well.

since: 3.18

###### e_backend_ensure_source_status_connected

Makes sure that the associated ESource::connection-status is connected. This is useful in cases when the backend can connect to the destination without invoking `EBackendClass`.authenticate_sync(), possibly through e_backend_schedule_authenticate().

since: 3.18

###### e_backend_get_destination_address

Provides destination server host name and port to which the backend connects. This is used to determine required connection point for e_backend_is_destination_reachable(). The `host` is a newly allocated string, which will be freed with g_free(). When `backend` sets both `host` and `port`, then it should return `TRUE`, indicating it’s a remote backend. Default implementation returns `FALSE`, which is treated like the backend is local, no checking for server reachability is possible.

since: 3.8

###### e_backend_get_network_monitor

Returns a `GNetworkMonitor` used to check whether the backend can access the remote server. The instance is owned by the `backend`.

since: 3.50

###### e_backend_get_online

Returns the online state of `backend`: `TRUE` if `backend` is online, `FALSE` if offline.

since: 3.4

###### e_backend_get_source

Returns the `ESource` to which `backend` is paired.

since: 3.4

###### e_backend_get_user_prompter

Gets an instance of `EUserPrompter`, associated with this `backend`.

since: 3.8

###### e_backend_is_destination_reachable

Checks whether the `backend`‘s destination server, as returned by e_backend_get_destination_address(), is reachable. If the `e_backend_get_destination_address()` returns `FALSE`, this function returns `TRUE`, meaning the destination is always reachable. This uses `GNetworkMonitor`‘s `g_network_monitor_can_reach()` for reachability tests.

since: 3.8

###### e_backend_prepare_shutdown

Let’s the `backend` know that it’ll be shut down shortly, no client connects to it anymore. The `backend` can free any resources which reference it, for example the opened views.

since: 3.16

###### e_backend_ref_connectable

Returns the socket endpoint for the network service to which `backend` is a client, or `NULL` if `backend` does not use network sockets.

since: 3.8

###### e_backend_ref_main_context

Returns the `GMainContext` on which event sources for `backend` are to be attached.

since: 3.8

###### e_backend_schedule_authenticate

Schedules a new authenticate session, cancelling any previously run. This is usually done automatically, when an ‘authenticate’ signal is received for the associated `ESource`. With `NULL` `credentials` an attempt without it is run.

since: 3.16

###### e_backend_schedule_credentials_required

Asynchronously invokes e_backend_credentials_required(), but installs its own callback which only prints a runtime warning on the console when the call fails. The `who_calls` is a prefix of the console message. This is useful when the caller just wants to start the operation without having actual place where to show the operation result.

since: 3.16

###### e_backend_set_connectable

Sets the socket endpoint for the network service to which `backend` is a client. This can be `NULL` if `backend` does not use network sockets.

since: 3.8

###### e_backend_set_online

Sets the online state of `backend`: `TRUE` if `backend` is online, `FALSE` if offline.

since: 3.4

###### e_backend_trust_prompt

Initiates a user trust prompt with given `parameters`.

since: 3.8

###### e_backend_trust_prompt_finish

Finishes the operation started with e_backend_trust_prompt(). If an error occurred, the function will set `error` and return `E_TRUST_PROMPT_RESPONSE_UNKNOWN`.

since: 3.8

###### e_backend_trust_prompt_sync

Asks a user a trust prompt with given `parameters`, and returns what user responded. This blocks until the response is delivered.

since: 3.8

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### EBackend.CollectionBackend:proxy-resolver

The proxy resolver for this backend.

###### EBackend.CollectionBackend:server

The server to which the backend belongs.

##### Properties inherited from EBackend (5)

###### EBackend.Backend:connectable

Socket endpoint of a network service.

###### EBackend.Backend:main-context

The main loop context on which to attach event sources.

###### EBackend.Backend:online

Whether the backend is online.

###### EBackend.Backend:source

The data source being acted upon.

###### EBackend.Backend:user-prompter

User prompter instance.

#### Signals

###### EBackend.CollectionBackend::child-added

Emitted when an `EServerSideSource` is added to `backend`‘s `ECollectionBackend:server` as a child of `backend`‘s collection `EBackend:source`.

###### EBackend.CollectionBackend::child-removed

Emitted when an `EServerSideSource` that is a child of `backend`‘s collection `EBackend:source` is removed from `backend`‘s `ECollectionBackend:server`.

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct EBackendCollectionBackendClass {
      void (* populate) (
        ECollectionBackend* backend
      );
      gchar* (* dup_resource_id) (
        ECollectionBackend* backend,
        ESource* child_source
      );
      void (* child_added) (
        ECollectionBackend* backend,
        ESource* child_source
      );
      void (* child_removed) (
        ECollectionBackend* backend,
        ESource* child_source
      );
      gboolean (* create_resource_sync) (
        ECollectionBackend* backend,
        ESource* source,
        GCancellable* cancellable,
        GError** error
      );
      void (* create_resource) (
        ECollectionBackend* backend,
        ESource* source,
        GCancellable* cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data
      );
      gboolean (* create_resource_finish) (
        ECollectionBackend* backend,
        GAsyncResult* result,
        GError** error
      );
      gboolean (* delete_resource_sync) (
        ECollectionBackend* backend,
        ESource* source,
        GCancellable* cancellable,
        GError** error
      );
      void (* delete_resource) (
        ECollectionBackend* backend,
        ESource* source,
        GCancellable* cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data
      );
      gboolean (* delete_resource_finish) (
        ECollectionBackend* backend,
        GAsyncResult* result,
        GError** error
      );

    }

No description available.

###### Class members

`populate: void (* populate) ( ECollectionBackend* backend )`

  No description available.

`dup_resource_id: gchar* (* dup_resource_id) ( ECollectionBackend* backend, ESource* child_source )`

  No description available.

`child_added: void (* child_added) ( ECollectionBackend* backend, ESource* child_source )`

  No description available.

`child_removed: void (* child_removed) ( ECollectionBackend* backend, ESource* child_source )`

  No description available.

`create_resource_sync: gboolean (* create_resource_sync) ( ECollectionBackend* backend, ESource* source, GCancellable* cancellable, GError** error )`

  No description available.

`create_resource: void (* create_resource) ( ECollectionBackend* backend, ESource* source, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data )`

  No description available.

`create_resource_finish: gboolean (* create_resource_finish) ( ECollectionBackend* backend, GAsyncResult* result, GError** error )`

  No description available.

`delete_resource_sync: gboolean (* delete_resource_sync) ( ECollectionBackend* backend, ESource* source, GCancellable* cancellable, GError** error )`

  No description available.

`delete_resource: void (* delete_resource) ( ECollectionBackend* backend, ESource* source, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data )`

  No description available.

`delete_resource_finish: gboolean (* delete_resource_finish) ( ECollectionBackend* backend, GAsyncResult* result, GError** error )`

  No description available.

#### Virtual methods

###### EBackend.CollectionBackendClass.child_added

No description available.

###### EBackend.CollectionBackendClass.child_removed

No description available.

###### EBackend.CollectionBackendClass.create_resource

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.

since: 3.6

###### EBackend.CollectionBackendClass.create_resource_finish

Finishes the operation started with e_collection_backend_create_resource().

since: 3.6

###### EBackend.CollectionBackendClass.create_resource_sync

Creates a server-side resource described by `source`. For example, if `source` describes a new calendar, an equivalent calendar is created on the server.

since: 3.6

###### EBackend.CollectionBackendClass.delete_resource

Asynchronously deletes a server-side resource described by `source`. The `source` must be a child of `backend`‘s collection `EBackend:source`.

since: 3.6

###### EBackend.CollectionBackendClass.delete_resource_finish

Finishes the operation started with e_collection_backend_delete_resource().

since: 3.6

###### EBackend.CollectionBackendClass.delete_resource_sync

Deletes a server-side resource described by `source`. The `source` must be a child of `backend`‘s collection `EBackend:source`.

since: 3.6

###### EBackend.CollectionBackendClass.dup_resource_id

Extracts the resource ID for `child_source`, which is supposed to be a stable and unique server-assigned identifier for the remote resource described by `child_source`. If `child_source` is not actually a child of the collection `EBackend:source` owned by `backend`, the function returns `NULL`.

since: 3.6

###### EBackend.CollectionBackendClass.populate

No description available.