EDataServer.SourceCredentialsProvider¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/co |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
Class Details¶
- class EDataServer.SourceCredentialsProvider(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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) – anEDataServer.SourceRegistry- Returns:
- Return type:
Creates a new
EDataServer.SourceCredentialsProvider, which is meant to abstract credential management forEDataServer.Source-s.New in version 3.16.
- can_prompt(source)¶
- Parameters:
source (
EDataServer.Source) – anEDataServer.Source- Returns:
True, when a credentials prompt can be shown for source,Falseotherwise.- Return type:
Returns whether a credentials prompt can be shown for the source.
New in version 3.16.
- can_store(source)¶
- Parameters:
source (
EDataServer.Source) – anEDataServer.Source- Returns:
True, when the credentials storing for source is possible,Falseotherwise.- Return type:
Returns whether the source can store its credentials. When
Falseis returned, an attempt to callEDataServer.SourceCredentialsProvider.store() orEDataServer.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 forcancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNonecallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfieduser_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.
- delete_finish(result)¶
- Parameters:
result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
- Returns:
- Return type:
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 forcancellable (
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.
- lookup(source, cancellable, callback, *user_data)¶
- Parameters:
source (
EDataServer.Source) – anEDataServer.Source, to lookup credentials forcancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNonecallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfieduser_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.
- lookup_finish(result)¶
- Parameters:
result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
- 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 forcancellable (
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.
- ref_credentials_source(source)¶
- Parameters:
source (
EDataServer.Source) – anEDataServer.Source- Returns:
referenced parent
EDataServer.Source, which holds credentials, orNone. Unref the returned non-NoneEDataServer.SourcewithGObject.Object.unref(), when no longer needed.- Return type:
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, aNoneis 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:
Returns refenrenced registry associated with this self.
New in version 3.16.
- ref_source(uid)¶
- Parameters:
uid (
str) – anEDataServer.SourceUID- Returns:
Referenced
EDataServer.Sourcewith the given uid, orNone, when it could not be found. Unref the returnedEDataServer.SourcewithGObject.Object.unref(), when no longer needed.- Return type:
Returns referenced
EDataServer.Sourcewith the given uid, orNone, when it could not be found.New in version 3.16.
- register_impl(provider_impl)¶
- Parameters:
provider_impl (
EDataServer.SourceCredentialsProviderImpl) – anEDataServer.SourceCredentialsProviderImpl- Returns:
Trueon success,Falseon failure, like when there is the provider_impl already registered.- Return type:
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 forcredentials (
EDataServer.NamedParameters) – anEDataServer.NamedParameterswith credentials to storepermanently (
bool) – store permanently or just for the sessioncancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNonecallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfieduser_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.
- store_finish(result)¶
- Parameters:
result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
- Returns:
- Return type:
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 forcredentials (
EDataServer.NamedParameters) – anEDataServer.NamedParameterswith credentials to storepermanently (
bool) – store permanently or just for the sessioncancellable (
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.
- unregister_impl(provider_impl)¶
- Parameters:
provider_impl (
EDataServer.SourceCredentialsProviderImpl) – anEDataServer.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) – anEDataServer.SourceUID- Returns:
Referenced
EDataServer.Sourcewith the given uid, orNone, when it could not be found. Unref the returnedEDataServer.SourcewithGObject.Object.unref(), when no longer needed.- Return type:
Returns referenced
EDataServer.Sourcewith the given uid, orNone, when it could not be found.New in version 3.16.
Property Details¶
- EDataServer.SourceCredentialsProvider.props.registry¶
- Name:
registry- Type:
- Default Value:
- Flags:
The Source Registry object, which can be either #ESourceregistry or #ESourceRegistryServer.