EDataServer.OAuth2Services

g EDataServer.Extensible EDataServer.Extensible EDataServer.OAuth2Services EDataServer.OAuth2Services EDataServer.Extensible->EDataServer.OAuth2Services GObject.GInterface GObject.GInterface GObject.GInterface->EDataServer.Extensible GObject.Object GObject.Object GObject.Object->EDataServer.OAuth2Services

Subclasses:None

Methods

Inherited:GObject.Object (37), EDataServer.Extensible (2)
Structs:GObject.ObjectClass (5)
class is_oauth2_alias_static (auth_method)
class is_supported ()
class new ()
  add (service)
  find (source)
  guess (protocol, hostname)
  is_oauth2_alias (auth_method)
  list ()
  remove (service)

Virtual Methods

Inherited:GObject.Object (7)

Properties

None

Signals

Inherited:GObject.Object (1)

Fields

Inherited:GObject.Object (1)
Name Type Access Description
parent GObject.Object r  

Class Details

class EDataServer.OAuth2Services(**kwargs)
Bases:GObject.Object, EDataServer.Extensible
Abstract:No
Structure:EDataServer.OAuth2ServicesClass

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

New in version 3.28.

classmethod is_oauth2_alias_static(auth_method)
Parameters:auth_method (str or None) – an authentication method, or None
Returns:whether exists any EDataServer.OAuth2Service, with the same name as auth_method.
Return type:bool

This is the same as EDataServer.OAuth2Services.is_oauth2_alias(), except it creates its own EDataServer.OAuth2Services instance and frees it at the end. The EDataServer.OAuth2Services is implemented as a singleton, thus it won’t be much trouble, as long as there is something else having created one instance.

New in version 3.28.

classmethod is_supported()
Returns:True, when evolution-data-server had been compiled with OAuth2 authentication enabled, False otherwise.
Return type:bool

New in version 3.28.

classmethod new()
Returns:an EDataServer.OAuth2Services
Return type:EDataServer.OAuth2Services

Creates a new EDataServer.OAuth2Services instance.

New in version 3.28.

add(service)
Parameters:service (EDataServer.OAuth2Service) – an EDataServer.OAuth2Service to add

Adds the service to the list of known OAuth2 services into self. It also adds a reference to service.

New in version 3.28.

find(source)
Parameters:source (EDataServer.Source) – an EDataServer.Source
Returns:a referenced EDataServer.OAuth2Service, which can be used with given source, or None, when none was found.
Return type:EDataServer.OAuth2Service or None

Searches the list of currently known OAuth2 services for the one which can be used with the given source.

The returned EDataServer.OAuth2Service is referenced for thread safety, if found.

New in version 3.28.

guess(protocol, hostname)
Parameters:
  • protocol (str or None) – a protocol to search the service for, like “imap”, or None
  • hostname (str or None) – a host name to search the service for, like “server.example.com”, or None
Returns:

a referenced EDataServer.OAuth2Service, which can be used with given constraints, or None, when none was found.

Return type:

EDataServer.OAuth2Service or None

Searches the list of currently known OAuth2 services for the one which can be used with the given protocol and/or hostname. Any of protocol and hostname can be None, but not both. It’s up to each EDataServer.OAuth2Service to decide, which of the arguments are important and whether all or only any of them can be required.

The returned EDataServer.OAuth2Service is referenced for thread safety, if found.

New in version 3.28.

is_oauth2_alias(auth_method)
Parameters:auth_method (str or None) – an authentication method, or None
Returns:whether exists any EDataServer.OAuth2Service, with the same name as auth_method.

See: EDataServer.OAuth2Services.is_oauth2_alias_static()

Return type:bool

New in version 3.28.

list()
Returns:a newly allocated GLib.SList with all currently known EDataServer.OAuth2Service referenced instances
Return type:[EDataServer.OAuth2Service]

Lists all currently known services, which had been added with EDataServer.OAuth2Services.add(). Free the returned GLib.SList with g_slist_remove_full (known_services, GObject.Object.unref); when no longer needed.

New in version 3.28.

remove(service)
Parameters:service (EDataServer.OAuth2Service) – an EDataServer.OAuth2Service to remove

Removes the service from the list of known services in self. The function does nothing, if the service had not been added.

New in version 3.28.