guess_can_process


Description:

public abstract bool guess_can_process (string? protocol, string? hostname)

Checks whether the this can be used with the given protocol and/or hostname.

Any of protocol and hostname can be null, but not both. It's up to each implementer to decide, which of the arguments are important and whether all or only any of them can be required.

The function is meant to check whether the this can be offered for example when configuring a new account. The real usage is determined by can_process.

The default implementation consults org.gnome.evolution-data-server.oauth2-services-hint GSettings key against given hostname. See its description for more information.

The default implementation is tried always as the first and when it fails, then the descendant's implementation is called.

Parameters:

this

an OAuth2Service

protocol

a protocol to search the service for, like "imap", or null

hostname

a host name to search the service for, like "server.example.com", or null

Returns:

Whether the this can be used for the given arguments