EDataServer.SourceCredentialsProviderImpl

g EDataServer.Extension EDataServer.Extension EDataServer.SourceCredentialsProviderImpl EDataServer.SourceCredentialsProviderImpl EDataServer.Extension->EDataServer.SourceCredentialsProviderImpl GObject.Object GObject.Object GObject.Object->EDataServer.Extension

Subclasses:EDataServer.SourceCredentialsProviderImplOAuth2, EDataServer.SourceCredentialsProviderImplPassword

Methods

Inherited:EDataServer.Extension (1), GObject.Object (37)
Structs:GObject.ObjectClass (5)
  can_process (source)
  can_prompt ()
  can_store ()
  delete_sync (source, cancellable)
  get_provider ()
  lookup_sync (source, cancellable)
  store_sync (source, credentials, permanently, cancellable)

Virtual Methods

Inherited:GObject.Object (7)
  do_can_process (source)
  do_can_prompt ()
  do_can_store ()
  do_delete_sync (source, cancellable)
  do_lookup_sync (source, cancellable)
  do_store_sync (source, credentials, permanently, cancellable)

Properties

Inherited:EDataServer.Extension (1)

Signals

Inherited:GObject.Object (1)

Fields

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

Class Details

class EDataServer.SourceCredentialsProviderImpl(**kwargs)
Bases:EDataServer.Extension
Abstract:Yes
Structure:EDataServer.SourceCredentialsProviderImplClass

Credentials provider implementation base structure. The descendants implement the virtual methods. The descendants are automatically registered into an EDataServer.SourceCredentialsProvider.

New in version 3.16.

can_process(source)
Parameters:source (EDataServer.Source) – an EDataServer.Source
Returns:Whether the self can process credentials for the source.
Return type:bool

Returns whether the self can process credentials for the source.

New in version 3.16.

can_prompt()
Returns:Whether credential prompt can be done for the self.
Return type:bool

Returns whether credential prompt can be done for the self.

New in version 3.16.

can_store()
Returns:Whether the self can store credentials.
Return type:bool

Returns whether the self can store credentials.

New in version 3.16.

delete_sync(source, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True on success, False on error

Return type:

bool

Asks self to delete any stored credentials for source.

Default implementation returns False and sets Gio.IOErrorEnum.NOT_SUPPORTED error.

If an error occurs, the function sets error and returns False.

New in version 3.16.

get_provider()
Returns:an EDataServer.SourceCredentialsProvider
Return type:object or None

Returns an EDataServer.SourceCredentialsProvider with which the self is associated.

New in version 3.16.

lookup_sync(source, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True on success, False on error

out_credentials:
 an EDataServer.NamedParameters to be set with stored credentials

Return type:

(bool, out_credentials: EDataServer.NamedParameters)

Asks self to lookup for stored credentials for source. The out_credentials is populated with them. If the result is not None, then it should be freed with EDataServer.NamedParameters.free() when no longer needed.

Default implementation returns False and sets Gio.IOErrorEnum.NOT_SUPPORTED error.

If an error occurs, the function sets error and returns False.

New in version 3.16.

store_sync(source, credentials, permanently, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True on success, False on error

Return type:

bool

Asks self to store credentials for source.

Default implementation returns False and sets Gio.IOErrorEnum.NOT_SUPPORTED error.

If an error occurs, the function sets error and returns False.

New in version 3.16.

do_can_process(source) virtual
Parameters:source (EDataServer.Source) – an EDataServer.Source
Returns:Whether the provider_impl can process credentials for the source.
Return type:bool

Returns whether the provider_impl can process credentials for the source.

New in version 3.16.

do_can_prompt() virtual
Returns:Whether credential prompt can be done for the provider_impl.
Return type:bool

Returns whether credential prompt can be done for the provider_impl.

New in version 3.16.

do_can_store() virtual
Returns:Whether the provider_impl can store credentials.
Return type:bool

Returns whether the provider_impl can store credentials.

New in version 3.16.

do_delete_sync(source, cancellable) virtual
Parameters:
Returns:

True on success, False on error

Return type:

bool

Asks provider_impl to delete any stored credentials for source.

Default implementation returns False and sets Gio.IOErrorEnum.NOT_SUPPORTED error.

If an error occurs, the function sets error and returns False.

New in version 3.16.

do_lookup_sync(source, cancellable) virtual
Parameters:
Returns:

True on success, False on error

out_credentials:
 an EDataServer.NamedParameters to be set with stored credentials

Return type:

(bool, out_credentials: EDataServer.NamedParameters)

Asks provider_impl to lookup for stored credentials for source. The out_credentials is populated with them. If the result is not None, then it should be freed with EDataServer.NamedParameters.free() when no longer needed.

Default implementation returns False and sets Gio.IOErrorEnum.NOT_SUPPORTED error.

If an error occurs, the function sets error and returns False.

New in version 3.16.

do_store_sync(source, credentials, permanently, cancellable) virtual
Parameters:
Returns:

True on success, False on error

Return type:

bool

Asks provider_impl to store credentials for source.

Default implementation returns False and sets Gio.IOErrorEnum.NOT_SUPPORTED error.

If an error occurs, the function sets error and returns False.

New in version 3.16.