EBackend.WebDAVCollectionBackend

g EBackend.Backend EBackend.Backend EBackend.CollectionBackend EBackend.CollectionBackend EBackend.Backend->EBackend.CollectionBackend EBackend.WebDAVCollectionBackend EBackend.WebDAVCollectionBackend EBackend.CollectionBackend->EBackend.WebDAVCollectionBackend GObject.Object GObject.Object GObject.Object->EBackend.Backend

Subclasses:None

Methods

Inherited:EBackend.CollectionBackend (22), EBackend.Backend (20), GObject.Object (37)
Structs:GObject.ObjectClass (5)
  discover_sync (calendar_url, contacts_url, credentials, cancellable)
  get_resource_id (source)
  is_custom_source (source)

Fields

Inherited:EBackend.CollectionBackend (2), GObject.Object (1)
Name Type Access Description
parent EBackend.CollectionBackend r  

Class Details

class EBackend.WebDAVCollectionBackend(**kwargs)
Bases:EBackend.CollectionBackend
Abstract:No
Structure:EBackend.WebDAVCollectionBackendClass

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

New in version 3.26.

discover_sync(calendar_url, contacts_url, credentials, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

an EDataServer.SourceAuthenticationResult describing whether discovery on given addresses succeeded.

out_certificate_pem:
 optional return location for a server SSL certificate in PEM format, when the operation failed with an SSL error
out_certificate_errors:
 optional Gio.TlsCertificateFlags, with certificate error flags when the operation failed with SSL error

Return type:

(EDataServer.SourceAuthenticationResult, out_certificate_pem: str or None, out_certificate_errors: Gio.TlsCertificateFlags)

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 None, that that Camel.part is skipped. The calendar_url covers all calendars, memo lists and task lists.

The function also takes care of EBackend.CollectionBackend.authenticate_children() on success.

New in version 3.26.

get_resource_id(source)
Parameters:source (EDataServer.Source) – an EDataServer.Source
Returns:a resource ID corresponding to source, or None, when the source should be removed.
Return type:str or None

Verifies that the source is expected here and returns its resource ID, which is used in call to EBackend.CollectionBackend.new_child(). It returns None, when the source is not Camel.part of the backend and should be removed instead. The default implementation allows all sources, which has EDataServer.SourceResource extension defined.

New in version 3.26.

is_custom_source(source)
Parameters:source (EDataServer.Source) – an EDataServer.Source
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.
Return type:bool

New in version 3.26.

do_get_resource_id(source) virtual
Parameters:source (EDataServer.Source) – an EDataServer.Source
Returns:a resource ID corresponding to source, or None, when the source should be removed.
Return type:str or None

Verifies that the source is expected here and returns its resource ID, which is used in call to EBackend.CollectionBackend.new_child(). It returns None, when the source is not Camel.part of the backend and should be removed instead. The default implementation allows all sources, which has EDataServer.SourceResource extension defined.

New in version 3.26.

do_is_custom_source(source) virtual
Parameters:source (EDataServer.Source) – an EDataServer.Source
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.
Return type:bool

New in version 3.26.