EDataServer.OAuth2Service.guess_can_process
Description: Reference for EDataServer.OAuth2Service.guess_can_process

### Virtual Method

# EDataServer OAuth2Serviceguess_can_process

since: 3.28

#### Declaration [src]

    gboolean
    guess_can_process (
      EOAuth2Service* service,
      const gchar* protocol,
      const gchar* hostname
    )

#### Description [src]

Checks whether the `service` 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 `service` can be offered for example when configuring a new account. The real usage is determined by e_oauth2_service_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.

Available since: 3.28

#### Parameters

`protocol`

  Type: `const gchar*`

  A protocol to search the service for, like “imap”, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`hostname`

  Type: `const gchar*`

  A host name to search the service for, like “server.example.com”, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `gboolean`

Whether the `service` can be used for the given arguments.