Virtual Method

HaslMechanismpossible

Declaration [src]

gboolean
possible (
  HaslMechanism* mechanism,
  HaslContext* ctx,
  GError** error
)

Description [src]

This is used by ctx to determine if it should even attempt mechanism.

Determines whether or not the information in ctx is there for mechanism to work.

For example, the PLAIN mechanism should only be attempted if HaslContext:tls is TRUE or if HaslContext:allow-clear-text is TRUE.

Mechanisms should also implement this checking authzid, username, and password as necessary to avoid multiple round trips with the server that we know aren’t going to work.

Parameters

ctx

Type: HaslContext

The HaslContext instance.

The data is owned by the caller of the method.
error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will be left initialized to NULL by the virtual function if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: gboolean

TRUE if mechanism should be attempted otherwise FALSE with error optionally set.