ESourceCredentialsProvider

ESourceCredentialsProvider

Types and Values

Object Hierarchy

    GObject
    ╰── ESourceCredentialsProvider
        ╰── EServerSideSourceCredentialsProvider

Implemented Interfaces

ESourceCredentialsProvider implements

Description

Functions

e_source_credentials_provider_new ()

ESourceCredentialsProvider *
e_source_credentials_provider_new (ESourceRegistry *registry);

Creates a new ESourceCredentialsProvider, which is meant to abstract credential management for ESource-s.

Parameters

registry

an ESourceRegistry

 

Returns

a new ESourceCredentialsProvider.

[transfer full]

Since: 3.16


e_source_credentials_provider_ref_registry ()

GObject *
e_source_credentials_provider_ref_registry
                               (ESourceCredentialsProvider *provider);

Returns refenrenced registry associated with this provider .

Parameters

Returns

Reference registry associated with this provider . Unref it with g_object_unref() when no longer needed.

[transfer full]

Since: 3.16


e_source_credentials_provider_register_impl ()

gboolean
e_source_credentials_provider_register_impl
                               (ESourceCredentialsProvider *provider,
                                ESourceCredentialsProviderImpl *provider_impl);

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

Parameters

provider

an ESourceCredentialsProvider

 

provider_impl

an ESourceCredentialsProviderImpl

 

Returns

TRUE on success, FALSE on failure, like when there is the provider_impl already registered.

Since: 3.16


e_source_credentials_provider_unregister_impl ()

void
e_source_credentials_provider_unregister_impl
                               (ESourceCredentialsProvider *provider,
                                ESourceCredentialsProviderImpl *provider_impl);

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

Parameters

provider

an ESourceCredentialsProvider

 

provider_impl

an ESourceCredentialsProviderImpl

 

Since: 3.16


e_source_credentials_provider_ref_source ()

ESource *
e_source_credentials_provider_ref_source
                               (ESourceCredentialsProvider *provider,
                                const gchar *uid);

Returns referenced ESource with the given uid , or NULL, when it could not be found.

Parameters

provider

an ESourceCredentialsProvider

 

uid

an ESource UID

 

Returns

Referenced ESource with the given uid , or NULL, when it could not be found. Unref the returned ESource with g_object_unref(), when no longer needed.

[transfer full]

Since: 3.16


e_source_credentials_provider_ref_credentials_source ()

ESource *
e_source_credentials_provider_ref_credentials_source
                               (ESourceCredentialsProvider *provider,
                                ESource *source);

Returns a referenced parent ESource, 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 NULL is returned, which means the source holds credentials for itself.

Parameters

provider

an ESourceCredentialsProvider

 

source

an ESource

 

Returns

referenced parent ESource, which holds credentials, or NULL. Unref the returned non-NULL ESource with g_object_unref(), when no longer needed.

[transfer full]

Since: 3.16


e_source_credentials_provider_can_store ()

gboolean
e_source_credentials_provider_can_store
                               (ESourceCredentialsProvider *provider,
                                ESource *source);

Returns whether the source can store its credentials. When FALSE is returned, an attempt to call e_source_credentials_provider_store() or e_source_credentials_provider_store_sync() will fail for this source .

Parameters

provider

an ESourceCredentialsProvider

 

source

an ESource

 

Returns

TRUE, when the credentials storing for source is possible, FALSE otherwise.

Since: 3.16


e_source_credentials_provider_can_prompt ()

gboolean
e_source_credentials_provider_can_prompt
                               (ESourceCredentialsProvider *provider,
                                ESource *source);

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

Parameters

provider

an ESourceCredentialsProvider

 

source

an ESource

 

Returns

TRUE, when a credentials prompt can be shown for source , FALSE otherwise.

Since: 3.16


e_source_credentials_provider_lookup_sync ()

gboolean
e_source_credentials_provider_lookup_sync
                               (ESourceCredentialsProvider *provider,
                                ESource *source,
                                GCancellable *cancellable,
                                ENamedParameters **out_credentials,
                                GError **error);

Looks up the credentials for source .

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

Parameters

provider

an ESourceCredentialsProvider

 

source

an ESource, to lookup credentials for

 

cancellable

optional GCancellable object, or NULL

 

out_credentials

return location for the credentials.

[out]

error

return location for a GError, or NULL

 

Returns

TRUE on success, FALSE on error

Since: 3.16


e_source_credentials_provider_lookup ()

void
e_source_credentials_provider_lookup (ESourceCredentialsProvider *provider,
                                      ESource *source,
                                      GCancellable *cancellable,
                                      GAsyncReadyCallback callback,
                                      gpointer user_data);

Asynchronously looks up for credentials for source .

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

Parameters

provider

an ESourceCredentialsProvider

 

source

an ESource, to lookup credentials for

 

cancellable

optional GCancellable object, or NULL

 

callback

a GAsyncReadyCallback to call when the request is satisfied

 

user_data

data to pass to the callback function

 

Since: 3.16


e_source_credentials_provider_lookup_finish ()

gboolean
e_source_credentials_provider_lookup_finish
                               (ESourceCredentialsProvider *provider,
                                GAsyncResult *result,
                                ENamedParameters **out_credentials,
                                GError **error);

Finishes the operation started with e_source_credentials_provider_lookup().

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

Parameters

provider

an ESourceCredentialsProvider

 

result

a GAsyncResult

 

out_credentials

return location for the credentials.

[out]

error

return location for a GError, or NULL

 

Returns

TRUE on success, FALSE on error

Since: 3.16


e_source_credentials_provider_store_sync ()

gboolean
e_source_credentials_provider_store_sync
                               (ESourceCredentialsProvider *provider,
                                ESource *source,
                                const ENamedParameters *credentials,
                                gboolean permanently,
                                GCancellable *cancellable,
                                GError **error);

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.

Parameters

provider

an ESourceCredentialsProvider

 

source

an ESource, to store credentials for

 

credentials

an ENamedParameters with credentials to store

 

permanently

store permanently or just for the session

 

cancellable

optional GCancellable object, or NULL

 

error

return location for a GError, or NULL

 

Returns

TRUE on success, FALSE on error

Since: 3.16


e_source_credentials_provider_store ()

void
e_source_credentials_provider_store (ESourceCredentialsProvider *provider,
                                     ESource *source,
                                     const ENamedParameters *credentials,
                                     gboolean permanently,
                                     GCancellable *cancellable,
                                     GAsyncReadyCallback callback,
                                     gpointer user_data);

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 e_source_credentials_provider_store_finish() to get the result of the operation.

Parameters

provider

an ESourceCredentialsProvider

 

source

an ESource, to lookup credentials for

 

credentials

an ENamedParameters with credentials to store

 

permanently

store permanently or just for the session

 

cancellable

optional GCancellable object, or NULL

 

callback

a GAsyncReadyCallback to call when the request is satisfied

 

user_data

data to pass to the callback function

 

Since: 3.16


e_source_credentials_provider_store_finish ()

gboolean
e_source_credentials_provider_store_finish
                               (ESourceCredentialsProvider *provider,
                                GAsyncResult *result,
                                GError **error);

Finishes the operation started with e_source_credentials_provider_store().

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

Parameters

provider

an ESourceCredentialsProvider

 

result

a GAsyncResult

 

error

return location for a GError, or NULL

 

Returns

TRUE on success, FALSE on error

Since: 3.16


e_source_credentials_provider_delete_sync ()

gboolean
e_source_credentials_provider_delete_sync
                               (ESourceCredentialsProvider *provider,
                                ESource *source,
                                GCancellable *cancellable,
                                GError **error);

Deletes any previously stored credentials for source .

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

Parameters

provider

an ESourceCredentialsProvider

 

source

an ESource, to store credentials for

 

cancellable

optional GCancellable object, or NULL

 

error

return location for a GError, or NULL

 

Returns

TRUE on success, FALSE on error

Since: 3.16


e_source_credentials_provider_delete ()

void
e_source_credentials_provider_delete (ESourceCredentialsProvider *provider,
                                      ESource *source,
                                      GCancellable *cancellable,
                                      GAsyncReadyCallback callback,
                                      gpointer user_data);

Asynchronously deletes any previously stored credentials for source .

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

Parameters

provider

an ESourceCredentialsProvider

 

source

an ESource, to lookup credentials for

 

cancellable

optional GCancellable object, or NULL

 

callback

a GAsyncReadyCallback to call when the request is satisfied

 

user_data

data to pass to the callback function

 

Since: 3.16


e_source_credentials_provider_delete_finish ()

gboolean
e_source_credentials_provider_delete_finish
                               (ESourceCredentialsProvider *provider,
                                GAsyncResult *result,
                                GError **error);

Finishes the operation started with e_source_credentials_provider_delete().

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

Parameters

provider

an ESourceCredentialsProvider

 

result

a GAsyncResult

 

error

return location for a GError, or NULL

 

Returns

TRUE on success, FALSE on error

Since: 3.16

Types and Values

struct ESourceCredentialsProvider

struct ESourceCredentialsProvider;

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

Since: 3.16