EWebDAVCollectionBackend: Evolution-Data-Server Reference Manual

## EWebDAVCollectionBackend EWebDAVCollectionBackend |

## Functions

gchar * | e_webdav_collection_backend_get_resource_id ()
gboolean | e_webdav_collection_backend_is_custom_source ()
ESourceAuthenticationResult | e_webdav_collection_backend_discover_sync ()

## Types and Values

struct | EWebDAVCollectionBackend

## Object Hierarchy

        GObject
        ╰── EBackend
            ╰── ECollectionBackend
                ╰── EWebDAVCollectionBackend

## Description

## Functions

### e_webdav_collection_backend_get_resource_id ()

    gchar *
    e_webdav_collection_backend_get_resource_id
                                   (EWebDAVCollectionBackend *webdav_backend,
                                    ESource *source);

Verifies that the `source` is expected here and returns its resource ID, which is used in call to `e_collection_backend_new_child()`. It returns `NULL`, when the `source` is not part of the backend and should be removed instead. The default implementation allows all sources, which has `ESourceResource` extension defined.

#### Parameters

webdav_backend | an EWebDAVCollectionBackend |
source | an ESource |

#### Returns

a resource ID corresponding to `source` , or `NULL`, when the `source` should be removed.

[transfer full][nullable]

Since: 3.26

### e_webdav_collection_backend_is_custom_source ()

    gboolean
    e_webdav_collection_backend_is_custom_source
                                   (EWebDAVCollectionBackend *webdav_backend,
                                    ESource *source);

#### Parameters

webdav_backend | an EWebDAVCollectionBackend |
source | an ESource |

#### Returns

`TRUE`, when the `source` is a custom source, thus it should not be removed as an obsolete source; `FALSE` to not force to keep it. It still can be left, when it's one of the WebDAV-discovered sources.

Since: 3.26

### e_webdav_collection_backend_discover_sync ()

    ESourceAuthenticationResult
    e_webdav_collection_backend_discover_sync
                                   (EWebDAVCollectionBackend *webdav_backend,
                                    const gchar *calendar_url,
                                    const gchar *contacts_url,
                                    const ENamedParameters *credentials,
                                    gchar **out_certificate_pem,
                                    GTlsCertificateFlags *out_certificate_errors,
                                    GCancellable *cancellable,
                                    GError **error);

This function is usually called in EBackend::`authenticate_sync()` implementation of the descendant, causing discovery of CalDAV and CardDAV sources on given URLs. If either of `calendar_url` and `contacts_url` is `NULL`, that that part is skipped. The `calendar_url` covers all calendars, memo lists and task lists.

The function also takes care of `e_collection_backend_authenticate_children()` on success.

#### Parameters

webdav_backend | an EWebDAVCollectionBackend |
calendar_url | a URL to search calendars at, or `NULL`. | [nullable]
contacts_url | a URL to search contacts at, or `NULL`. | [nullable]
credentials | credentials to use when running the discovery |
out_certificate_pem | optional return location for a server SSL certificate in PEM format, when the operation failed with an SSL error. | [out][nullable]
out_certificate_errors | optional GTlsCertificateFlags, with certificate error flags when the operation failed with SSL error. | [out][nullable]
cancellable | optional GCancellable object, or `NULL` |
error | return location for a GError, or `NULL` |

#### Returns

an ESourceAuthenticationResult describing whether discovery on given addresses succeeded.

Since: 3.26

## Types and Values

### struct EWebDAVCollectionBackend

    struct EWebDAVCollectionBackend;

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

Since: 3.26