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) | 
Properties¶
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| registry | GObject.Object | r/w/co | An EDataServer.SourceRegistry | 
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
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,- Falseotherwise.- 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,- Falseotherwise.- Return type: - bool- Returns whether the source can store its credentials. When - Falseis 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: - source (EDataServer.Source) – anEDataServer.Source, to lookup credentials for
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- callback (Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfied
- user_data (objectorNone) – data to pass to the callback function
 - 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. 
- source (
 - 
delete_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - Trueon success,- Falseon 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: - source (EDataServer.Source) – anEDataServer.Source, to store credentials for
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Return type: - Deletes any previously stored credentials for source. - If an error occurs, the function sets error and returns - False.- New in version 3.16. 
- source (
 - 
lookup(source, cancellable, callback, *user_data)¶
- Parameters: - source (EDataServer.Source) – anEDataServer.Source, to lookup credentials for
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- callback (Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfied
- user_data (objectorNone) – data to pass to the callback function
 - 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. 
- source (
 - 
lookup_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - Trueon success,- Falseon 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: - source (EDataServer.Source) – anEDataServer.Source, to lookup credentials for
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Trueon success,- Falseon 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. 
- source (
 - 
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.Sourcewith- 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- Noneis 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.SourceUID- Returns: - Referenced - EDataServer.Sourcewith the given uid, or- None, when it could not be found. Unref the returned- EDataServer.Sourcewith- GObject.Object.unref(), when no longer needed.- Return type: - EDataServer.Source- Returns referenced - EDataServer.Sourcewith 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: - Trueon success,- Falseon 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: - source (EDataServer.Source) – anEDataServer.Source, to lookup credentials for
- credentials (EDataServer.NamedParameters) – anEDataServer.NamedParameterswith credentials to store
- permanently (bool) – store permanently or just for the session
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- callback (Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfied
- user_data (objectorNone) – data to pass to the callback function
 - 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. 
- source (
 - 
store_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - Trueon success,- Falseon 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: - source (EDataServer.Source) – anEDataServer.Source, to store credentials for
- credentials (EDataServer.NamedParameters) – anEDataServer.NamedParameterswith credentials to store
- permanently (bool) – store permanently or just for the session
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Return type: - 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. 
- source (
 - 
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.SourceUID- Returns: - Referenced - EDataServer.Sourcewith the given uid, or- None, when it could not be found. Unref the returned- EDataServer.Sourcewith- GObject.Object.unref(), when no longer needed.- Return type: - EDataServer.Source- Returns referenced - EDataServer.Sourcewith the given uid, or- None, when it could not be found.- New in version 3.16. 
 
- 
classmethod 
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.