Collection.createSync

Create a new collection in the secret service.

This method may block indefinitely and should not be used in user interface threads. The secret service may prompt the user. secret_service_prompt() will be used to handle any prompts that are required.

An @alias is a well-known tag for a collection, such as 'default' (ie: the default collection to store items in). This allows other applications to easily identify and share a collection. If you specify an @alias, and a collection with that alias already exists, then a new collection will not be created. The previous one will be returned instead.

If @service is NULL, then secret_service_get_sync() will be called to get the default #SecretService proxy.

class Collection
static
createSync
(,
string label
,
string alias_
,
SecretCollectionCreateFlags flags
,
Cancellable cancellable
)

Parameters

service Service

a secret service object

label string

label for the new collection

alias_ string

alias to assign to the collection

flags SecretCollectionCreateFlags

currently unused

cancellable Cancellable

optional cancellation object

Return Value

the new collection, which should be unreferenced with g_object_unref()

Throws

GException on failure.

Meta