EDataServer.SourceCredentialsProvider

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

Subclasses:None

Methods

Inherited:GObject.Object (37), EDataServer.Extensible (2)
Structs:GObject.ObjectClass (5)
class new (registry)
  can_prompt (source)
  can_store (source)
  delete (source, cancellable, callback, *user_data)
  delete_finish (result)
  delete_sync (source, cancellable)
  lookup (source, cancellable, callback, *user_data)
  lookup_finish (result)
  lookup_sync (source, cancellable)
  ref_credentials_source (source)
  ref_registry ()
  ref_source (uid)
  register_impl (provider_impl)
  store (source, credentials, permanently, cancellable, callback, *user_data)
  store_finish (result)
  store_sync (source, credentials, permanently, cancellable)
  unregister_impl (provider_impl)

Virtual Methods

Inherited:GObject.Object (7)
  do_ref_source (uid)

Properties

Name Type Flags Short Description
registry GObject.Object r/w/co An EDataServer.SourceRegistry

Signals

Inherited:GObject.Object (1)

Fields

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

Class Details

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

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

New in version 3.16.

classmethod new(registry)
Parameters:registry (EDataServer.SourceRegistry) – an EDataServer.SourceRegistry
Returns:a new EDataServer.SourceCredentialsProvider
Return type:EDataServer.SourceCredentialsProvider

Creates a new EDataServer.SourceCredentialsProvider, which is meant to abstract credential management for EDataServer.Source -s.

New in version 3.16.

can_prompt(source)
Parameters:source (EDataServer.Source) – an EDataServer.Source
Returns:True, when a credentials prompt can be shown for source, False otherwise.
Return type:bool

Returns whether a credentials prompt can be shown for the source.

New in version 3.16.

can_store(source)
Parameters:source (EDataServer.Source) – an EDataServer.Source
Returns:True, when the credentials storing for source is possible, False otherwise.
Return type:bool

Returns whether the source can store its credentials. When False is returned, an attempt to call EDataServer.SourceCredentialsProvider.store() or EDataServer.SourceCredentialsProvider.store_sync() will fail for this source.

New in version 3.16.

delete(source, cancellable, callback, *user_data)
Parameters:

Asynchronously deletes any previously stored credentials for source.

When the operation is finished, callback will be called. You can then call EDataServer.SourceCredentialsProvider.delete_finish() to get the result of the operation.

New in version 3.16.

delete_finish(result)
Parameters:result (Gio.AsyncResult) – a Gio.AsyncResult
Raises:GLib.Error
Returns:True on success, False on error
Return type:bool

Finishes the operation started with EDataServer.SourceCredentialsProvider.delete().

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

New in version 3.16.

delete_sync(source, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True on success, False on error

Return type:

bool

Deletes any previously stored credentials for source.

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

New in version 3.16.

lookup(source, cancellable, callback, *user_data)
Parameters:

Asynchronously looks up for credentials for source.

When the operation is finished, callback will be called. You can then call EDataServer.SourceCredentialsProvider.lookup_finish() to get the result of the operation.

New in version 3.16.

lookup_finish(result)
Parameters:result (Gio.AsyncResult) – a Gio.AsyncResult
Raises:GLib.Error
Returns:True on success, False on error
out_credentials:
 return location for the credentials
Return type:(bool, out_credentials: EDataServer.NamedParameters)

Finishes the operation started with EDataServer.SourceCredentialsProvider.lookup().

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

New in version 3.16.

lookup_sync(source, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True on success, False on error

out_credentials:
 return location for the credentials

Return type:

(bool, out_credentials: EDataServer.NamedParameters)

Looks up the credentials for source.

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

New in version 3.16.

ref_credentials_source(source)
Parameters:source (EDataServer.Source) – an EDataServer.Source
Returns:referenced parent EDataServer.Source, which holds credentials, or None. Unref the returned non-None EDataServer.Source with GObject.Object.unref(), when no longer needed.
Return type:EDataServer.Source

Returns a referenced parent EDataServer.Source, which holds the credentials for the given source. This is useful for collections, where the credentials are usually stored on the collection source, thus shared between child sources. When ther eis no such parent source, a None is returned, which means the source holds credentials for itself.

New in version 3.16.

ref_registry()
Returns:Reference registry associated with this self. Unref it with GObject.Object.unref() when no longer needed.
Return type:GObject.Object

Returns refenrenced registry associated with this self.

New in version 3.16.

ref_source(uid)
Parameters:uid (str) – an EDataServer.Source UID
Returns:Referenced EDataServer.Source with the given uid, or None, when it could not be found. Unref the returned EDataServer.Source with GObject.Object.unref(), when no longer needed.
Return type:EDataServer.Source

Returns referenced EDataServer.Source with the given uid, or None, when it could not be found.

New in version 3.16.

register_impl(provider_impl)
Parameters:provider_impl (EDataServer.SourceCredentialsProviderImpl) – an EDataServer.SourceCredentialsProviderImpl
Returns:True on success, False on failure, like when there is the provider_impl already registered.
Return type:bool

Registers a credentials provider implementation and adds its own reference on the provider_impl.

New in version 3.16.

store(source, credentials, permanently, cancellable, callback, *user_data)
Parameters:

Asynchronously stores the credentials for source. Note the actual stored values can differ for each storage. In other words, not all named parameters are stored for each source.

When the operation is finished, callback will be called. You can then call EDataServer.SourceCredentialsProvider.store_finish() to get the result of the operation.

New in version 3.16.

store_finish(result)
Parameters:result (Gio.AsyncResult) – a Gio.AsyncResult
Raises:GLib.Error
Returns:True on success, False on error
Return type:bool

Finishes the operation started with EDataServer.SourceCredentialsProvider.store().

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

Stores the credentials for source. Note the actual stored values can differ for each storage. In other words, not all named parameters are stored for each source.

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

New in version 3.16.

unregister_impl(provider_impl)
Parameters:provider_impl (EDataServer.SourceCredentialsProviderImpl) – an EDataServer.SourceCredentialsProviderImpl

Unregisters previously registered provider_impl with EDataServer.SourceCredentialsProvider.register_impl(). Function does nothing, when the provider_impl is not registered.

New in version 3.16.

do_ref_source(uid) virtual
Parameters:uid (str) – an EDataServer.Source UID
Returns:Referenced EDataServer.Source with the given uid, or None, when it could not be found. Unref the returned EDataServer.Source with GObject.Object.unref(), when no longer needed.
Return type:EDataServer.Source

Returns referenced EDataServer.Source with the given uid, or None, when it could not be found.

New in version 3.16.

Property Details

EDataServer.SourceCredentialsProvider.props.registry
Name:registry
Type:GObject.Object
Default Value:None
Flags:READABLE, WRITABLE, CONSTRUCT_ONLY

The Source Registry object, which can be either #ESourceregistry or #ESourceRegistryServer.