SecretService

## SecretService SecretService — the Secret Service |

## Synopsis

    #include <secret/secret-unstable.h>

                        SecretService;
    struct              SecretServiceClass;
    enum                SecretServiceFlags;
    void                secret_service_get                  (SecretServiceFlags flags,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    SecretService *     secret_service_get_sync             (SecretServiceFlags flags,
                                                             GCancellable *cancellable,
                                                             GError **error);
    SecretService *     secret_service_get_finish           (GAsyncResult *result,
                                                             GError **error);
    void                secret_service_new                  (const gchar *service_bus_name,
                                                             SecretServiceFlags flags,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    SecretService *     secret_service_new_finish           (GAsyncResult *result,
                                                             GError **error);
    SecretService *     secret_service_new_sync             (const gchar *service_bus_name,
                                                             SecretServiceFlags flags,
                                                             GCancellable *cancellable,
                                                             GError **error);
    GList *             secret_service_get_collections      (SecretService *self);
    SecretServiceFlags  secret_service_get_flags            (SecretService *self);
    const gchar *       secret_service_get_session_algorithms
                                                            (SecretService *self);
    const gchar *       secret_service_get_session_path     (SecretService *self);
    void                secret_service_ensure_session       (SecretService *self,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    const gchar *       secret_service_ensure_session_finish
                                                            (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);
    const gchar *       secret_service_ensure_session_sync  (SecretService *self,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                secret_service_ensure_collections   (SecretService *self,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            secret_service_ensure_collections_finish
                                                            (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);
    gboolean            secret_service_ensure_collections_sync
                                                            (SecretService *self,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                secret_service_search               (SecretService *self,
                                                             GHashTable *attributes,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            secret_service_search_finish        (SecretService *self,
                                                             GAsyncResult *result,
                                                             GList **unlocked,
                                                             GList **locked,
                                                             GError **error);
    gboolean            secret_service_search_sync          (SecretService *self,
                                                             GHashTable *attributes,
                                                             GCancellable *cancellable,
                                                             GList **unlocked,
                                                             GList **locked,
                                                             GError **error);
    void                secret_service_search_for_paths     (SecretService *self,
                                                             GHashTable *attributes,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            secret_service_search_for_paths_finish
                                                            (SecretService *self,
                                                             GAsyncResult *result,
                                                             gchar ***unlocked,
                                                             gchar ***locked,
                                                             GError **error);
    gboolean            secret_service_search_for_paths_sync
                                                            (SecretService *self,
                                                             GHashTable *attributes,
                                                             GCancellable *cancellable,
                                                             gchar ***unlocked,
                                                             gchar ***locked,
                                                             GError **error);
    void                secret_service_get_secrets          (SecretService *self,
                                                             GList *items,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    GHashTable *        secret_service_get_secrets_finish   (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);
    GHashTable *        secret_service_get_secrets_sync     (SecretService *self,
                                                             GList *items,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                secret_service_get_secrets_for_paths
                                                            (SecretService *self,
                                                             const gchar **item_paths,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    GHashTable *        secret_service_get_secrets_for_paths_finish
                                                            (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);
    GHashTable *        secret_service_get_secrets_for_paths_sync
                                                            (SecretService *self,
                                                             const gchar **item_paths,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                secret_service_get_secret_for_path  (SecretService *self,
                                                             const gchar *item_path,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    SecretValue *       secret_service_get_secret_for_path_finish
                                                            (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);
    SecretValue *       secret_service_get_secret_for_path_sync
                                                            (SecretService *self,
                                                             const gchar *item_path,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                secret_service_lock                 (SecretService *self,
                                                             GList *objects,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gint                secret_service_lock_finish          (SecretService *self,
                                                             GAsyncResult *result,
                                                             GList **locked,
                                                             GError **error);
    gint                secret_service_lock_sync            (SecretService *self,
                                                             GList *objects,
                                                             GCancellable *cancellable,
                                                             GList **locked,
                                                             GError **error);
    void                secret_service_lock_paths           (SecretService *self,
                                                             const gchar **paths,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gint                secret_service_lock_paths_finish    (SecretService *self,
                                                             GAsyncResult *result,
                                                             gchar ***locked,
                                                             GError **error);
    gint                secret_service_lock_paths_sync      (SecretService *self,
                                                             const gchar **paths,
                                                             GCancellable *cancellable,
                                                             gchar ***locked,
                                                             GError **error);
    void                secret_service_unlock               (SecretService *self,
                                                             GList *objects,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gint                secret_service_unlock_finish        (SecretService *self,
                                                             GAsyncResult *result,
                                                             GList **unlocked,
                                                             GError **error);
    gint                secret_service_unlock_sync          (SecretService *self,
                                                             GList *objects,
                                                             GCancellable *cancellable,
                                                             GList **unlocked,
                                                             GError **error);
    void                secret_service_unlock_paths         (SecretService *self,
                                                             const gchar **paths,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gint                secret_service_unlock_paths_finish  (SecretService *self,
                                                             GAsyncResult *result,
                                                             gchar ***unlocked,
                                                             GError **error);
    gint                secret_service_unlock_paths_sync    (SecretService *self,
                                                             const gchar **paths,
                                                             GCancellable *cancellable,
                                                             gchar ***unlocked,
                                                             GError **error);
    void                secret_service_store                (SecretService *self,
                                                             const SecretSchema *schema,
                                                             const gchar *collection_path,
                                                             const gchar *label,
                                                             SecretValue *value,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data,
                                                             ...);
    void                secret_service_storev               (SecretService *self,
                                                             const SecretSchema *schema,
                                                             GHashTable *attributes,
                                                             const gchar *collection_path,
                                                             const gchar *label,
                                                             SecretValue *value,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            secret_service_store_finish         (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);
    gboolean            secret_service_store_sync           (SecretService *self,
                                                             const SecretSchema *schema,
                                                             const gchar *collection_path,
                                                             const gchar *label,
                                                             SecretValue *value,
                                                             GCancellable *cancellable,
                                                             GError **error,
                                                             ...);
    gboolean            secret_service_storev_sync          (SecretService *self,
                                                             const SecretSchema *schema,
                                                             GHashTable *attributes,
                                                             const gchar *collection_path,
                                                             const gchar *label,
                                                             SecretValue *value,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                secret_service_lookup               (SecretService *self,
                                                             const SecretSchema *schema,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data,
                                                             ...);
    void                secret_service_lookupv              (SecretService *self,
                                                             const SecretSchema *schema,
                                                             GHashTable *attributes,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    SecretValue *       secret_service_lookup_finish        (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);
    SecretValue *       secret_service_lookup_sync          (SecretService *self,
                                                             const SecretSchema *schema,
                                                             GCancellable *cancellable,
                                                             GError **error,
                                                             ...);
    SecretValue *       secret_service_lookupv_sync         (SecretService *self,
                                                             const SecretSchema *schema,
                                                             GHashTable *attributes,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                secret_service_remove               (SecretService *self,
                                                             const SecretSchema *schema,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data,
                                                             ...);
    void                secret_service_removev              (SecretService *self,
                                                             const SecretSchema *schema,
                                                             GHashTable *attributes,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            secret_service_remove_finish        (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);
    gboolean            secret_service_remove_sync          (SecretService *self,
                                                             const SecretSchema *schema,
                                                             GCancellable *cancellable,
                                                             GError **error,
                                                             ...);
    gboolean            secret_service_removev_sync         (SecretService *self,
                                                             const SecretSchema *schema,
                                                             GHashTable *attributes,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                secret_service_prompt               (SecretService *self,
                                                             SecretPrompt *prompt,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    GVariant *          secret_service_prompt_finish        (SecretService *self,
                                                             GAsyncResult *result,
                                                             const GVariantType *return_type,
                                                             GError **error);
    GVariant *          secret_service_prompt_sync          (SecretService *self,
                                                             SecretPrompt *prompt,
                                                             GCancellable *cancellable,
                                                             const GVariantType *return_type,
                                                             GError **error);
    void                secret_service_prompt_path          (SecretService *self,
                                                             const gchar *prompt_path,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    GVariant *          secret_service_prompt_path_finish   (SecretService *self,
                                                             GAsyncResult *result,
                                                             const GVariantType *return_type,
                                                             GError **error);
    GVariant *          secret_service_prompt_path_sync     (SecretService *self,
                                                             const gchar *prompt_path,
                                                             GCancellable *cancellable,
                                                             const GVariantType *return_type,
                                                             GError **error);
    void                secret_service_create_collection_path
                                                            (SecretService *self,
                                                             GHashTable *properties,
                                                             const gchar *alias,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gchar *             secret_service_create_collection_path_finish
                                                            (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);
    gchar *             secret_service_create_collection_path_sync
                                                            (SecretService *self,
                                                             GHashTable *properties,
                                                             const gchar *alias,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                secret_service_create_item_path     (SecretService *self,
                                                             const gchar *collection_path,
                                                             GHashTable *properties,
                                                             SecretValue *value,
                                                             gboolean replace,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gchar *             secret_service_create_item_path_finish
                                                            (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);
    gchar *             secret_service_create_item_path_sync
                                                            (SecretService *self,
                                                             const gchar *collection_path,
                                                             GHashTable *properties,
                                                             SecretValue *value,
                                                             gboolean replace,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                secret_service_delete_path          (SecretService *self,
                                                             const gchar *item_path,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            secret_service_delete_path_finish   (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);
    gboolean            secret_service_delete_path_sync     (SecretService *self,
                                                             const gchar *item_path,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                secret_service_read_alias           (SecretService *self,
                                                             const gchar *alias,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    SecretCollection *  secret_service_read_alias_finish    (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);
    SecretCollection *  secret_service_read_alias_sync      (SecretService *self,
                                                             const gchar *alias,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                secret_service_read_alias_path      (SecretService *self,
                                                             const gchar *alias,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gchar *             secret_service_read_alias_path_finish
                                                            (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);
    gchar *             secret_service_read_alias_path_sync (SecretService *self,
                                                             const gchar *alias,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                secret_service_set_alias            (SecretService *self,
                                                             const gchar *alias,
                                                             SecretCollection *collection,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            secret_service_set_alias_finish     (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);
    gboolean            secret_service_set_alias_sync       (SecretService *self,
                                                             const gchar *alias,
                                                             SecretCollection *collection,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                secret_service_set_alias_path       (SecretService *self,
                                                             const gchar *alias,
                                                             const gchar *collection_path,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            secret_service_set_alias_path_finish
                                                            (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);
    gboolean            secret_service_set_alias_path_sync  (SecretService *self,
                                                             const gchar *alias,
                                                             const gchar *collection_path,
                                                             GCancellable *cancellable,
                                                             GError **error);

## Object Hierarchy

      GObject
       +----GDBusProxy
             +----SecretService

      GFlags
       +----SecretServiceFlags

## Implemented Interfaces

SecretService implements GDBusInterface, GInitable and GAsyncInitable.

## Properties

      "collections"              SecretObjectList*     : Read
      "flags"                    SecretServiceFlags    : Read / Write / Construct Only

## Description

A SecretService object represents the Secret Service implementation which runs as a D-Bus service.

Normally a single SecretService object can be shared between multiple callers. The `secret_service_get()` method is used to access this SecretService object. If a new independent SecretService object is required, use `secret_service_new()`.

In order to securely transfer secrets to the Sercret Service, an session is established. This session can be established while initializing a SecretService object by passing the `SECRET_SERVICE_OPEN_SESSION` flag to the `secret_service_get()` or `secret_service_new()` functions. In order to establish a session on an already existing SecretService, use the `secret_service_ensure_session()` function.

To search for items, use the `secret_service_search()` method.

Multiple collections can exist in the Secret Service, each of which contains secret items. In order to instantiate SecretCollection objects which represent those collections while initializing a SecretService then pass the `SECRET_SERVICE_LOAD_COLLECTIONS` flag to the `secret_service_get()` or `secret_service_new()` functions. In order to establish a session on an already existing SecretService, use the `secret_service_ensure_collections()` function. To access the list of collections use `secret_service_get_collections()`.

Certain actions on the Secret Service require user prompting to complete, such as creating a collection, or unlocking a collection. When such a prompt is necessary, then a SecretPrompt object is created by this library, and passed to the `secret_service_prompt()` method. In this way it is handled automatically.

In order to customize prompt handling, override the `prompt_async` and `prompt_finish` virtual methods of the SecretService class.

## Details

### SecretService

    typedef struct _SecretService SecretService;

A proxy object representing the Secret Service.

### struct SecretServiceClass

    struct SecretServiceClass {
    	GDBusProxyClass parent_class;

    	GType collection_gtype;
    	GType item_gtype;

    	GVariant *  (* prompt_sync)      (SecretService *self,
    	                                  SecretPrompt *prompt,
    	                                  GCancellable *cancellable,
    	                                  const GVariantType *return_type,
    	                                  GError **error);

    	void        (* prompt_async)     (SecretService *self,
    	                                  SecretPrompt *prompt,
    	                                  GCancellable *cancellable,
    	                                  GAsyncReadyCallback callback,
    	                                  gpointer user_data);

    	GVariant *  (* prompt_finish)    (SecretService *self,
    	                                  GAsyncResult *result,
    	                                  const GVariantType *return_type,
    	                                  GError **error);
    };

The class for SecretService.

GDBusProxyClass `parent_class`; | the parent class
GType `collection_gtype`; | the GType of the SecretCollection objects instantiated by the SecretService proxy
GType `item_gtype`; | the GType of the SecretItem objects instantiated by the SecretService proxy
`prompt_sync` () | called to perform synchronous prompting when necessary
`prompt_async` () | called to perform asynchronous prompting when necessary
`prompt_finish` () | called to complete an asynchronous prompt operation

### enum SecretServiceFlags

    typedef enum {
    	SECRET_SERVICE_NONE,
    	SECRET_SERVICE_OPEN_SESSION = 1 << 1,
    	SECRET_SERVICE_LOAD_COLLECTIONS = 1 << 2,
    } SecretServiceFlags;

Flags which determine which parts of the SecretService proxy are initialized during a `secret_service_get()` or `secret_service_new()` operation.

`SECRET_SERVICE_NONE` | no flags for initializing the SecretService
`SECRET_SERVICE_OPEN_SESSION` | establish a session for transfer of secrets while initializing the SecretService
`SECRET_SERVICE_LOAD_COLLECTIONS` | load collections while initializing the SecretService

### secret_service_get ()

    void                secret_service_get                  (SecretServiceFlags flags,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Get a SecretService proxy for the Secret Service. If such a proxy object already exists, then the same proxy is returned.

If `flags` contains any flags of which parts of the secret service to ensure are initialized, then those will be initialized before completing.

This method will return immediately and complete asynchronously.

`flags` : | flags for which service functionality to ensure is initialized
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to be passed to the callback

### secret_service_get_sync ()

    SecretService *     secret_service_get_sync             (SecretServiceFlags flags,
                                                             GCancellable *cancellable,
                                                             GError **error);

Get a SecretService proxy for the Secret Service. If such a proxy object already exists, then the same proxy is returned.

If `flags` contains any flags of which parts of the secret service to ensure are initialized, then those will be initialized before returning.

This method may block indefinitely and should not be used in user interface threads.

`flags` : | flags for which service functionality to ensure is initialized
`cancellable` : | optional cancellation object
`error` : | location to place an error on failure
Returns : | a new reference to a SecretService proxy, which should be released with `g_object_unref()`. [transfer full]

### secret_service_get_finish ()

    SecretService *     secret_service_get_finish           (GAsyncResult *result,
                                                             GError **error);

Complete an asynchronous operation to get a SecretService proxy for the Secret Service.

`result` : | the asynchronous result passed to the callback
`error` : | location to place an error on failure
Returns : | a new reference to a SecretService proxy, which should be released with `g_object_unref()`. [transfer full]

### secret_service_new ()

    void                secret_service_new                  (const gchar *service_bus_name,
                                                             SecretServiceFlags flags,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Create a new SecretService proxy for the Secret Service.

This function is rarely used, see `secret_service_get()` instead.

If `flags` contains any flags of which parts of the secret service to ensure are initialized, then those will be initialized before returning.

If `service_bus_name` is `NULL` then the default is used.

This method will return immediately and complete asynchronously.

`service_bus_name` : | the D-Bus service name of the secret service. [allow-none]
`flags` : | flags for which service functionality to ensure is initialized
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to be passed to the callback

### secret_service_new_finish ()

    SecretService *     secret_service_new_finish           (GAsyncResult *result,
                                                             GError **error);

Complete an asynchronous operation to create a new SecretService proxy for the Secret Service.

`result` : | the asynchronous result passed to the callback
`error` : | location to place an error on failure
Returns : | a new reference to a SecretService proxy, which should be released with `g_object_unref()`. [transfer full]

### secret_service_new_sync ()

    SecretService *     secret_service_new_sync             (const gchar *service_bus_name,
                                                             SecretServiceFlags flags,
                                                             GCancellable *cancellable,
                                                             GError **error);

Create a new SecretService proxy for the Secret Service.

This function is rarely used, see `secret_service_get_sync()` instead.

If `flags` contains any flags of which parts of the secret service to ensure are initialized, then those will be initialized before returning.

If `service_bus_name` is `NULL` then the default is used.

This method may block indefinitely and should not be used in user interface threads.

`service_bus_name` : | the D-Bus service name of the secret service. [allow-none]
`flags` : | flags for which service functionality to ensure is initialized
`cancellable` : | optional cancellation object
`error` : | location to place an error on failure
Returns : | a new reference to a SecretService proxy, which should be released with `g_object_unref()`. [transfer full]

### secret_service_get_collections ()

    GList *             secret_service_get_collections      (SecretService *self);

Get a list of SecretCollection objects representing all the collections in the secret service.

If the `SECRET_SERVICE_LOAD_COLLECTIONS` flag was not specified when initializing SecretService proxy object, then this method will return `NULL`. Use `secret_service_ensure_collections()` to load the collections.

`self` : | the secret service proxy
Returns : | a list of the collections in the secret service. [transfer full][element-type Secret.Collection][allow-none]

### secret_service_get_flags ()

    SecretServiceFlags  secret_service_get_flags            (SecretService *self);

Get the flags representing what features of the SecretService proxy have been initialized.

Use `secret_service_ensure_session()` or `secret_service_ensure_collections()` to initialize further features and change the flags.

`self` : | the secret service proxy
Returns : | the flags for features initialized

### secret_service_get_session_algorithms ()

    const gchar *       secret_service_get_session_algorithms
                                                            (SecretService *self);

Get the set of algorithms being used to transfer secrets between this secret service proxy and the Secret Service itself.

This will be `NULL` if no session has been established. Use `secret_service_ensure_session()` to establish a session.

`self` : | the secret service proxy
Returns : | a string representing the algorithms for transferring secrets. [allow-none]

### secret_service_get_session_path ()

    const gchar *       secret_service_get_session_path     (SecretService *self);

Get the D-Bus object path of the session object being used to transfer secrets between this secret service proxy and the Secret Service itself.

This will be `NULL` if no session has been established. Use `secret_service_ensure_session()` to establish a session.

`self` : | the secret service proxy
Returns : | a string representing the D-Bus object path of the session. [allow-none]

### secret_service_ensure_session ()

    void                secret_service_ensure_session       (SecretService *self,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Ensure that the SecretService proxy has established a session with the Secret Service. This session is used to transfer secrets.

It is not normally necessary to call this method, as the session is established as necessary. You can also pass the `SECRET_SERVICE_OPEN_SESSION` to `secret_service_get()` in order to ensure that a session has been established by the time you get the SecretService proxy.

This method will return immediately and complete asynchronously.

`self` : | the secret service
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to be passed to the callback

### secret_service_ensure_session_finish ()

    const gchar *       secret_service_ensure_session_finish
                                                            (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);

Finish an asynchronous operation to ensure that the SecretService proxy has established a session with the Secret Service.

`self` : | the secret service
`result` : | the asynchronous result passed to the callback
`error` : | location to place an error on failure
Returns : | the path of the established session

### secret_service_ensure_session_sync ()

    const gchar *       secret_service_ensure_session_sync  (SecretService *self,
                                                             GCancellable *cancellable,
                                                             GError **error);

Ensure that the SecretService proxy has established a session with the Secret Service. This session is used to transfer secrets.

It is not normally necessary to call this method, as the session is established as necessary. You can also pass the `SECRET_SERVICE_OPEN_SESSION` to `secret_service_get_sync()` in order to ensure that a session has been established by the time you get the SecretService proxy.

This method may block indefinitely and should not be used in user interface threads.

`self` : | the secret service
`cancellable` : | optional cancellation object
`error` : | location to place an error on failure
Returns : | the path of the established session

### secret_service_ensure_collections ()

    void                secret_service_ensure_collections   (SecretService *self,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Ensure that the SecretService proxy has loaded all the collections present in the Secret Service. This affects the result of `secret_service_get_collections()`.

You can also pass the `SECRET_SERVICE_LOAD_COLLECTIONS` to `secret_service_get_sync()` in order to ensure that the collections have been loaded by the time you get the SecretService proxy.

This method will return immediately and complete asynchronously.

`self` : | the secret service
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to be passed to the callback

### secret_service_ensure_collections_finish ()

    gboolean            secret_service_ensure_collections_finish
                                                            (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);

Complete an asynchronous operation to ensure that the SecretService proxy has loaded all the collections present in the Secret Service.

`self` : | the secret service
`result` : | the asynchronous result passed to the callback
`error` : | location to place an error on failure
Returns : | whether the load was successful or not

### secret_service_ensure_collections_sync ()

    gboolean            secret_service_ensure_collections_sync
                                                            (SecretService *self,
                                                             GCancellable *cancellable,
                                                             GError **error);

Ensure that the SecretService proxy has loaded all the collections present in the Secret Service. This affects the result of `secret_service_get_collections()`.

You can also pass the `SECRET_SERVICE_LOAD_COLLECTIONS` to `secret_service_get_sync()` in order to ensure that the collections have been loaded by the time you get the SecretService proxy.

This method may block indefinitely and should not be used in user interface threads.

`self` : | the secret service
`cancellable` : | optional cancellation object
`error` : | location to place an error on failure
Returns : | whether the load was successful or not

### secret_service_search ()

    void                secret_service_search               (SecretService *self,
                                                             GHashTable *attributes,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Search for items matching the `attributes`. All collections are searched. The `attributes` should be a table of string keys and string values.

This function returns immediately and completes asynchronously.

When your callback is called use `secret_service_search_finish()` to get the results of this function. SecretItem proxy objects will be returned. If you prefer to only have the items D-Bus object paths returned, then then use the `secret_service_search_for_paths()` function.

`self` : | the secret service
`attributes` : | search for items matching these attributes. [element-type utf8 utf8]
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to pass to the callback

### secret_service_search_finish ()

    gboolean            secret_service_search_finish        (SecretService *self,
                                                             GAsyncResult *result,
                                                             GList **unlocked,
                                                             GList **locked,
                                                             GError **error);

Complete asynchronous operation to search for items.

Matching items that are locked or unlocked are placed in the `locked` or `unlocked` lists respectively.

SecretItem proxy objects will be returned. If you prefer to only have the items' D-Bus object paths returned, then then use the `secret_service_search_for_paths()` function.

`self` : | the secret service
`result` : | asynchronous result passed to callback
`unlocked` : | location to place a list of matching items which were not locked. [out][transfer full][element-type Secret.Item][allow-none]
`locked` : | location to place a list of matching items which were locked. [out][transfer full][element-type Secret.Item][allow-none]
`error` : | location to place error on failure
Returns : | whether the search was successful or not

### secret_service_search_sync ()

    gboolean            secret_service_search_sync          (SecretService *self,
                                                             GHashTable *attributes,
                                                             GCancellable *cancellable,
                                                             GList **unlocked,
                                                             GList **locked,
                                                             GError **error);

Search for items matching the `attributes`. All collections are searched. The `attributes` should be a table of string keys and string values.

This function may block indefinetely. Use the asynchronous version in user interface threads.

Matching items that are locked or unlocked are placed in the `locked` or `unlocked` lists respectively.

SecretItem proxy objects will be returned. If you prefer to only have the items' D-Bus object paths returned, then then use the `secret_service_search_sync()` function.

`self` : | the secret service
`attributes` : | search for items matching these attributes. [element-type utf8 utf8]
`cancellable` : | optional cancellation object
`unlocked` : | location to place a list of matching items which were not locked. [out][transfer full][element-type Secret.Item][allow-none]
`locked` : | location to place a list of matching items which were locked. [out][transfer full][element-type Secret.Item][allow-none]
`error` : | location to place error on failure
Returns : | whether the search was successful or not

### secret_service_search_for_paths ()

    void                secret_service_search_for_paths     (SecretService *self,
                                                             GHashTable *attributes,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Search for items matching the `attributes`, and return their D-Bus object paths. All collections are searched. The `attributes` should be a table of string keys and string values.

This function returns immediately and completes asynchronously.

When your callback is called use `secret_service_search_for_paths_finish()` to get the results of this function. Only the D-Bus object paths of the items will be returned. If you would like SecretItem objects to be returned instead, then use the `secret_service_search()` function.

`self` : | the secret service
`attributes` : | search for items matching these attributes. [element-type utf8 utf8]
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to pass to the callback

### secret_service_search_for_paths_finish ()

    gboolean            secret_service_search_for_paths_finish
                                                            (SecretService *self,
                                                             GAsyncResult *result,
                                                             gchar ***unlocked,
                                                             gchar ***locked,
                                                             GError **error);

Complete asynchronous operation to search for items, and return their D-Bus object paths.

Matching items that are locked or unlocked, have their D-Bus paths placed in the `locked` or `unlocked` arrays respectively.

D-Bus object paths of the items will be returned in the `unlocked` or `locked` arrays. If you would to have SecretItem objects to be returned instead, then us the `secret_service_search()` and `secret_service_search_finish()` functions.

`self` : | the secret service
`result` : | asynchronous result passed to callback
`unlocked` : | location to place an array of D-Bus object paths for matching items which were locked. [out][transfer full][array zero-terminated=1][allow-none]
`locked` : | location to place an array of D-Bus object paths for matching items which were locked. [out][transfer full][array zero-terminated=1][allow-none]
`error` : | location to place error on failure
Returns : | whether the search was successful or not

### secret_service_search_for_paths_sync ()

    gboolean            secret_service_search_for_paths_sync
                                                            (SecretService *self,
                                                             GHashTable *attributes,
                                                             GCancellable *cancellable,
                                                             gchar ***unlocked,
                                                             gchar ***locked,
                                                             GError **error);

Search for items matching the `attributes`, and return their D-Bus object paths. All collections are searched. The `attributes` should be a table of string keys and string values.

This function may block indefinetely. Use the asynchronous version in user interface threads.

Matching items that are locked or unlocked, have their D-Bus paths placed in the `locked` or `unlocked` arrays respectively.

D-Bus object paths of the items will be returned in the `unlocked` or `locked` arrays. If you would to have SecretItem objects to be returned instead, then use the `secret_service_search_sync()` function.

`self` : | the secret service
`attributes` : | search for items matching these attributes. [element-type utf8 utf8]
`cancellable` : | optional cancellation object
`unlocked` : | location to place an array of D-Bus object paths for matching items which were locked. [out][transfer full][array zero-terminated=1][allow-none]
`locked` : | location to place an array of D-Bus object paths for matching items which were locked. [out][transfer full][array zero-terminated=1][allow-none]
`error` : | location to place error on failure
Returns : | whether the search was successful or not

### secret_service_get_secrets ()

    void                secret_service_get_secrets          (SecretService *self,
                                                             GList *items,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Get the secret values for an secret items stored in the service.

This method takes a list of SecretItem proxy objects. If you only have the D-Bus object paths of the items, use `secret_service_get_secrets_for_paths()` instead.

This function returns immediately and completes asynchronously.

`self` : | the secret service
`items` : | the items to retrieve secrets for. [element-type Secret.Item]
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to pass to the callback

### secret_service_get_secrets_finish ()

    GHashTable *        secret_service_get_secrets_finish   (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);

Complete asynchronous operation to get the secret values for an secret items stored in the service.

Items that are locked will not be included the results.

`self` : | the secret service
`result` : | asynchronous result passed to callback
`error` : | location to place an error on failure
Returns : | a newly allocated hash table of SecretItem keys to SecretValue values. [transfer full]

### secret_service_get_secrets_sync ()

    GHashTable *        secret_service_get_secrets_sync     (SecretService *self,
                                                             GList *items,
                                                             GCancellable *cancellable,
                                                             GError **error);

Get the secret values for an secret items stored in the service.

This method takes a list of SecretItem proxy objects. If you only have the D-Bus object paths of the items, use `secret_service_get_secrets_for_paths_sync()` instead.

This method may block indefinitely and should not be used in user interface threads.

Items that are locked will not be included the results.

`self` : | the secret service
`items` : | the items to retrieve secrets for. [element-type Secret.Item]
`cancellable` : | optional cancellation object
`error` : | location to place an error on failure
Returns : | a newly allocated hash table of SecretItem keys to SecretValue values. [transfer full]

### secret_service_get_secrets_for_paths ()

    void                secret_service_get_secrets_for_paths
                                                            (SecretService *self,
                                                             const gchar **item_paths,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Get the secret values for an secret items stored in the service.

The items are represented by their D-Bus object paths. If you already have SecretItem proxy objects, use use `secret_service_get_secrets()` to more simply get their secret values.

This function returns immediately and completes asynchronously.

`self` : | the secret service
`item_paths` : | the D-Bus paths to items to retrieve secrets for
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to pass to the callback

### secret_service_get_secrets_for_paths_finish ()

    GHashTable *        secret_service_get_secrets_for_paths_finish
                                                            (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);

Complete asynchronous operation to get the secret values for an secret items stored in the service.

Items that are locked will not be included the results.

`self` : | the secret service
`result` : | asynchronous result passed to callback
`error` : | location to place an error on failure
Returns : | a newly allocated hash table of item_path keys to SecretValue values. [transfer full]

### secret_service_get_secrets_for_paths_sync ()

    GHashTable *        secret_service_get_secrets_for_paths_sync
                                                            (SecretService *self,
                                                             const gchar **item_paths,
                                                             GCancellable *cancellable,
                                                             GError **error);

Get the secret values for an secret items stored in the service.

The items are represented by their D-Bus object paths. If you already have SecretItem proxy objects, use use `secret_service_get_secrets_sync()` to more simply get their secret values.

This method may block indefinitely and should not be used in user interface threads.

Items that are locked will not be included the results.

`self` : | the secret service
`item_paths` : | the D-Bus paths to items to retrieve secrets for
`cancellable` : | optional cancellation object
`error` : | location to place an error on failure
Returns : | a newly allocated hash table of item_path keys to SecretValue values. [transfer full]

### secret_service_get_secret_for_path ()

    void                secret_service_get_secret_for_path  (SecretService *self,
                                                             const gchar *item_path,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Get the secret value for an secret item stored in the service.

The item is represented by its D-Bus object path. If you already have a SecretItem proxy object, use use `secret_item_get_secret()` to more simply get its secret value.

This function returns immediately and completes asynchronously.

`self` : | the secret service
`item_path` : | the D-Bus path to item to retrieve secret for
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to pass to the callback

### secret_service_get_secret_for_path_finish ()

    SecretValue *       secret_service_get_secret_for_path_finish
                                                            (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);

Complete asynchronous operation to get the secret value for an secret item stored in the service.

Will return `NULL` if the item is locked.

`self` : | the secret service
`result` : | asynchronous result passed to callback
`error` : | location to place an error on failure
Returns : | the newly allocated secret value for the item, which should be released with `secret_value_unref()`. [transfer full][allow-none]

### secret_service_get_secret_for_path_sync ()

    SecretValue *       secret_service_get_secret_for_path_sync
                                                            (SecretService *self,
                                                             const gchar *item_path,
                                                             GCancellable *cancellable,
                                                             GError **error);

Get the secret value for an secret item stored in the service.

The item is represented by its D-Bus object path. If you already have a SecretItem proxy object, use use `secret_item_get_secret_sync()` to more simply get its secret value.

This method may block indefinitely and should not be used in user interface threads.

Will return `NULL` if the item is locked.

`self` : | the secret service
`item_path` : | the D-Bus path to item to retrieve secret for
`cancellable` : | optional cancellation object
`error` : | location to place an error on failure
Returns : | the newly allocated secret value for the item, which should be released with `secret_value_unref()`. [transfer full][allow-none]

### secret_service_lock ()

    void                secret_service_lock                 (SecretService *self,
                                                             GList *objects,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Lock items or collections in the secret service.

This method takes a list of SecretItem or SecretCollection proxy objects. If you only have the D-Bus object paths of the items or collections, use `secret_service_lock_paths()` instead.

The secret service may not be able to lock items individually, and may lock an entire collection instead.

This method returns immediately and completes asynchronously. The secret service may prompt the user. `secret_service_prompt()` will be used to handle any prompts that show up.

`self` : | the secret service
`objects` : | the items or collections to lock. [element-type GLib.DBusProxy]
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to pass to the callback

### secret_service_lock_finish ()

    gint                secret_service_lock_finish          (SecretService *self,
                                                             GAsyncResult *result,
                                                             GList **locked,
                                                             GError **error);

Complete asynchronous operation to lock items or collections in the secret service.

The secret service may not be able to lock items individually, and may lock an entire collection instead.

`self` : | the secret service
`result` : | asynchronous result passed to the callback
`locked` : | location to place list of items or collections that were locked. [out][element-type GLib.DBusProxy][transfer full][allow-none]
`error` : | location to place an error on failure
Returns : | the number of items or collections that were locked

### secret_service_lock_sync ()

    gint                secret_service_lock_sync            (SecretService *self,
                                                             GList *objects,
                                                             GCancellable *cancellable,
                                                             GList **locked,
                                                             GError **error);

Lock items or collections in the secret service.

This method takes a list of SecretItem or SecretCollection proxy objects. If you only have the D-Bus object paths of the items or collections, use `secret_service_lock_paths_sync()` instead.

The secret service may not be able to lock items individually, and may lock an entire collection instead.

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 show up.

`self` : | the secret service
`objects` : | the items or collections to lock. [element-type GLib.DBusProxy]
`cancellable` : | optional cancellation object
`locked` : | location to place list of items or collections that were locked. [out][element-type GLib.DBusProxy][transfer full][allow-none]
`error` : | location to place an error on failure
Returns : | the number of items or collections that were locked

### secret_service_lock_paths ()

    void                secret_service_lock_paths           (SecretService *self,
                                                             const gchar **paths,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Lock items or collections in the secret service.

The items or collections are represented by their D-Bus object paths. If you already have SecretItem and SecretCollection proxy objects, use use `secret_service_lock()` instead.

The secret service may not be able to lock items individually, and may lock an entire collection instead.

This method returns immediately and completes asynchronously. The secret service may prompt the user. `secret_service_prompt()` will be used to handle any prompts that show up.

`self` : | the secret service
`paths` : | the D-Bus paths for items or collections to lock
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to pass to the callback

### secret_service_lock_paths_finish ()

    gint                secret_service_lock_paths_finish    (SecretService *self,
                                                             GAsyncResult *result,
                                                             gchar ***locked,
                                                             GError **error);

Complete asynchronous operation to lock items or collections in the secret service.

The secret service may not be able to lock items individually, and may lock an entire collection instead.

`self` : | the secret service
`result` : | asynchronous result passed to the callback
`locked` : | location to place array of D-Bus paths of items or collections that were locked. [out][array zero-terminated=1][transfer full][allow-none]
`error` : | location to place an error on failure
Returns : | the number of items or collections that were locked

### secret_service_lock_paths_sync ()

    gint                secret_service_lock_paths_sync      (SecretService *self,
                                                             const gchar **paths,
                                                             GCancellable *cancellable,
                                                             gchar ***locked,
                                                             GError **error);

Lock items or collections in the secret service.

The items or collections are represented by their D-Bus object paths. If you already have SecretItem and SecretCollection proxy objects, use use `secret_service_lock_sync()` instead.

The secret service may not be able to lock items individually, and may lock an entire collection instead.

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 show up.

`self` : | the secret service
`paths` : | the D-Bus object paths of the items or collections to lock
`cancellable` : | optional cancellation object
`locked` : | location to place array of D-Bus paths of items or collections that were locked. [out][array zero-terminated=1][transfer full][allow-none]
`error` : | location to place an error on failure
Returns : | the number of items or collections that were locked

### secret_service_unlock ()

    void                secret_service_unlock               (SecretService *self,
                                                             GList *objects,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Unlock items or collections in the secret service.

This method takes a list of SecretItem or SecretCollection proxy objects. If you only have the D-Bus object paths of the items or collections, use `secret_service_unlock_paths()` instead.

The secret service may not be able to unlock items individually, and may unlock an entire collection instead.

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 show up.

`self` : | the secret service
`objects` : | the items or collections to unlock. [element-type GLib.DBusProxy]
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to pass to the callback

### secret_service_unlock_finish ()

    gint                secret_service_unlock_finish        (SecretService *self,
                                                             GAsyncResult *result,
                                                             GList **unlocked,
                                                             GError **error);

Complete asynchronous operation to unlock items or collections in the secret service.

The secret service may not be able to unlock items individually, and may unlock an entire collection instead.

`self` : | the secret service
`result` : | asynchronous result passed to the callback
`unlocked` : | location to place list of items or collections that were unlocked. [out][element-type GLib.DBusProxy][transfer full][allow-none]
`error` : | location to place an error on failure
Returns : | the number of items or collections that were unlocked

### secret_service_unlock_sync ()

    gint                secret_service_unlock_sync          (SecretService *self,
                                                             GList *objects,
                                                             GCancellable *cancellable,
                                                             GList **unlocked,
                                                             GError **error);

Unlock items or collections in the secret service.

This method takes a list of SecretItem or SecretCollection proxy objects. If you only have the D-Bus object paths of the items or collections, use `secret_service_unlock_paths_sync()` instead.

The secret service may not be able to unlock items individually, and may unlock an entire collection instead.

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 show up.

`self` : | the secret service
`objects` : | the items or collections to unlock. [element-type GLib.DBusProxy]
`cancellable` : | optional cancellation object
`unlocked` : | location to place list of items or collections that were unlocked. [out][element-type GLib.DBusProxy][transfer full][allow-none]
`error` : | location to place an error on failure
Returns : | the number of items or collections that were unlocked

### secret_service_unlock_paths ()

    void                secret_service_unlock_paths         (SecretService *self,
                                                             const gchar **paths,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Unlock items or collections in the secret service.

The items or collections are represented by their D-Bus object paths. If you already have SecretItem and SecretCollection proxy objects, use use `secret_service_unlock()` instead.

The secret service may not be able to unlock items individually, and may unlock an entire collection instead.

This method returns immediately and completes asynchronously. The secret service may prompt the user. `secret_service_prompt()` will be used to handle any prompts that show up.

`self` : | the secret service
`paths` : | the D-Bus paths for items or collections to unlock
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to pass to the callback

### secret_service_unlock_paths_finish ()

    gint                secret_service_unlock_paths_finish  (SecretService *self,
                                                             GAsyncResult *result,
                                                             gchar ***unlocked,
                                                             GError **error);

Complete asynchronous operation to unlock items or collections in the secret service.

The secret service may not be able to unlock items individually, and may unlock an entire collection instead.

`self` : | the secret service
`result` : | asynchronous result passed to the callback
`unlocked` : | location to place array of D-Bus paths of items or collections that were unlocked. [out][array zero-terminated=1][transfer full][allow-none]
`error` : | location to place an error on failure
Returns : | the number of items or collections that were unlocked

### secret_service_unlock_paths_sync ()

    gint                secret_service_unlock_paths_sync    (SecretService *self,
                                                             const gchar **paths,
                                                             GCancellable *cancellable,
                                                             gchar ***unlocked,
                                                             GError **error);

Unlock items or collections in the secret service.

The items or collections are represented by their D-Bus object paths. If you already have SecretItem and SecretCollection proxy objects, use use `secret_service_unlock_sync()` instead.

The secret service may not be able to unlock items individually, and may unlock an entire collection instead.

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 show up.

`self` : | the secret service
`paths` : | the D-Bus object paths of the items or collections to unlock
`cancellable` : | optional cancellation object
`unlocked` : | location to place array of D-Bus paths of items or collections that were unlocked. [out][array zero-terminated=1][transfer full][allow-none]
`error` : | location to place an error on failure
Returns : | the number of items or collections that were unlocked

### secret_service_store ()

    void                secret_service_store                (SecretService *self,
                                                             const SecretSchema *schema,
                                                             const gchar *collection_path,
                                                             const gchar *label,
                                                             SecretValue *value,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data,
                                                             ...);

Store a secret value in the secret service.

The variable argument list should contain pairs of a) The attribute name as a null-terminated string, followed by b) attribute value, either a character string, an int number, or a gboolean value, as defined in the password `schema`. The list of attribtues should be terminated with a `NULL`.

If the attributes match a secret item already stored in the collection, then the item will be updated with these new values.

If `collection_path` is not specified, then the default collection will be used. Use SECRET_COLLECTION_SESSION to store the password in the session collection, which doesn't get stored across login sessions.

This method will return immediately and complete asynchronously.

`self` : | the secret service
`schema` : | the schema for the attributes
`collection_path` : | the D-Bus path to the collection where to store the secret. [allow-none]
`label` : | label for the secret
`value` : | the secret value
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to be passed to the callback
`...` : | the attribute keys and values, terminated with `NULL`

### secret_service_storev ()

    void                secret_service_storev               (SecretService *self,
                                                             const SecretSchema *schema,
                                                             GHashTable *attributes,
                                                             const gchar *collection_path,
                                                             const gchar *label,
                                                             SecretValue *value,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Store a secret value in the secret service.

The `attributes` should be a set of key and value string pairs.

If the attributes match a secret item already stored in the collection, then the item will be updated with these new values.

If `collection_path` is not specified, then the default collection will be used. Use SECRET_COLLECTION_SESSION to store the password in the session collection, which doesn't get stored across login sessions.

This method will return immediately and complete asynchronously.

`self` : | the secret service
`schema` : | the schema to use to check attributes. [allow-none]
`attributes` : | the attribute keys and values. [element-type utf8 utf8]
`collection_path` : | the D-Bus path to the collection where to store the secret. [allow-none]
`label` : | label for the secret
`value` : | the secret value
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to be passed to the callback

### secret_service_store_finish ()

    gboolean            secret_service_store_finish         (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);

Finish asynchronous operation to store a secret value in the secret service.

`self` : | the secret service
`result` : | the asynchronous result passed to the callback
`error` : | location to place an error on failure
Returns : | whether the storage was successful or not

### secret_service_store_sync ()

    gboolean            secret_service_store_sync           (SecretService *self,
                                                             const SecretSchema *schema,
                                                             const gchar *collection_path,
                                                             const gchar *label,
                                                             SecretValue *value,
                                                             GCancellable *cancellable,
                                                             GError **error,
                                                             ...);

Store a secret value in the secret service.

The variable argument list should contain pairs of a) The attribute name as a null-terminated string, followed by b) attribute value, either a character string, an int number, or a gboolean value, as defined in the password `schema`. The list of attribtues should be terminated with a `NULL`.

If the attributes match a secret item already stored in the collection, then the item will be updated with these new values.

If `collection_path` is `NULL`, then the default collection will be used. Use SECRET_COLLECTION_SESSION to store the password in the session collection, which doesn't get stored across login sessions.

This method may block indefinitely and should not be used in user interface threads.

`self` : | the secret service
`schema` : | the schema for the attributes
`collection_path` : | the D-Bus path to the collection where to store the secret. [allow-none]
`label` : | label for the secret
`value` : | the secret value
`cancellable` : | optional cancellation object
`error` : | location to place an error on failure
`...` : | the attribute keys and values, terminated with `NULL`
Returns : | whether the storage was successful or not

### secret_service_storev_sync ()

    gboolean            secret_service_storev_sync          (SecretService *self,
                                                             const SecretSchema *schema,
                                                             GHashTable *attributes,
                                                             const gchar *collection_path,
                                                             const gchar *label,
                                                             SecretValue *value,
                                                             GCancellable *cancellable,
                                                             GError **error);

Store a secret value in the secret service.

The `attributes` should be a set of key and value string pairs.

If the attributes match a secret item already stored in the collection, then the item will be updated with these new values.

If `collection_path` is `NULL`, then the default collection will be used. Use SECRET_COLLECTION_SESSION to store the password in the session collection, which doesn't get stored across login sessions.

This method may block indefinitely and should not be used in user interface threads.

`self` : | the secret service
`schema` : | the schema for the attributes. [allow-none]
`attributes` : | the attribute keys and values. [element-type utf8 utf8]
`collection_path` : | the D-Bus path to the collection where to store the secret. [allow-none]
`label` : | label for the secret
`value` : | the secret value
`cancellable` : | optional cancellation object
`error` : | location to place an error on failure
Returns : | whether the storage was successful or not

### secret_service_lookup ()

    void                secret_service_lookup               (SecretService *self,
                                                             const SecretSchema *schema,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data,
                                                             ...);

Lookup a secret value in the secret service.

The variable argument list should contain pairs of a) The attribute name as a null-terminated string, followed by b) attribute value, either a character string, an int number, or a gboolean value, as defined in the password `schema`. The list of attribtues should be terminated with a `NULL`.

This method will return immediately and complete asynchronously.

`self` : | the secret service
`schema` : | the schema for the attributes
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to be passed to the callback
`...` : | the attribute keys and values, terminated with `NULL`

### secret_service_lookupv ()

    void                secret_service_lookupv              (SecretService *self,
                                                             const SecretSchema *schema,
                                                             GHashTable *attributes,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Lookup a secret value in the secret service.

The `attributes` should be a set of key and value string pairs.

This method will return immediately and complete asynchronously.

`self` : | the secret service
`schema` : | the schema for the attributes. [allow-none]
`attributes` : | the attribute keys and values. [element-type utf8 utf8]
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to be passed to the callback

### secret_service_lookup_finish ()

    SecretValue *       secret_service_lookup_finish        (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);

Finish asynchronous operation to lookup a secret value in the secret service.

If no secret is found then `NULL` is returned.

`self` : | the secret service
`result` : | the asynchronous result passed to the callback
`error` : | location to place an error on failure
Returns : | a newly allocated SecretValue, which should be released with `secret_value_unref()`, or `NULL` if no secret found. [transfer full]

### secret_service_lookup_sync ()

    SecretValue *       secret_service_lookup_sync          (SecretService *self,
                                                             const SecretSchema *schema,
                                                             GCancellable *cancellable,
                                                             GError **error,
                                                             ...);

Lookup a secret value in the secret service.

The variable argument list should contain pairs of a) The attribute name as a null-terminated string, followed by b) attribute value, either a character string, an int number, or a gboolean value, as defined in the password `schema`. The list of attribtues should be terminated with a `NULL`.

If no secret is found then `NULL` is returned.

This method may block indefinitely and should not be used in user interface threads.

`self` : | the secret service
`schema` : | the schema for the attributes
`cancellable` : | optional cancellation object
`error` : | location to place an error on failure
`...` : | the attribute keys and values, terminated with `NULL`
Returns : | a newly allocated SecretValue, which should be released with `secret_value_unref()`, or `NULL` if no secret found. [transfer full]

### secret_service_lookupv_sync ()

    SecretValue *       secret_service_lookupv_sync         (SecretService *self,
                                                             const SecretSchema *schema,
                                                             GHashTable *attributes,
                                                             GCancellable *cancellable,
                                                             GError **error);

Lookup a secret value in the secret service.

The `attributes` should be a set of key and value string pairs.

This method may block indefinitely and should not be used in user interface threads.

`self` : | the secret service
`schema` : | the schema for the attributes. [allow-none]
`attributes` : | the attribute keys and values. [element-type utf8 utf8]
`cancellable` : | optional cancellation object
`error` : | location to place an error on failure
Returns : | a newly allocated SecretValue, which should be released with `secret_value_unref()`, or `NULL` if no secret found. [transfer full]

### secret_service_remove ()

    void                secret_service_remove               (SecretService *self,
                                                             const SecretSchema *schema,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data,
                                                             ...);

Remove a secret value from the secret service.

The variable argument list should contain pairs of a) The attribute name as a null-terminated string, followed by b) attribute value, either a character string, an int number, or a gboolean value, as defined in the password `schema`. The list of attribtues should be terminated with a `NULL`.

If multiple items match the attributes, then only one will be deleted.

This method will return immediately and complete asynchronously.

`self` : | the secret service
`schema` : | the schema for the attributes
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to be passed to the callback
`...` : | the attribute keys and values, terminated with `NULL`

### secret_service_removev ()

    void                secret_service_removev              (SecretService *self,
                                                             const SecretSchema *schema,
                                                             GHashTable *attributes,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Remove a secret value from the secret service.

The `attributes` should be a set of key and value string pairs.

If multiple items match the attributes, then only one will be deleted.

This method will return immediately and complete asynchronously.

`self` : | the secret service
`schema` : | the schema for the attributes. [allow-none]
`attributes` : | the attribute keys and values. [element-type utf8 utf8]
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to be passed to the callback

### secret_service_remove_finish ()

    gboolean            secret_service_remove_finish        (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);

Finish asynchronous operation to remove a secret value from the secret service.

`self` : | the secret service
`result` : | the asynchronous result passed to the callback
`error` : | location to place an error on failure
Returns : | whether the removal was successful or not

### secret_service_remove_sync ()

    gboolean            secret_service_remove_sync          (SecretService *self,
                                                             const SecretSchema *schema,
                                                             GCancellable *cancellable,
                                                             GError **error,
                                                             ...);

Remove a secret value from the secret service.

The variable argument list should contain pairs of a) The attribute name as a null-terminated string, followed by b) attribute value, either a character string, an int number, or a gboolean value, as defined in the password `schema`. The list of attribtues should be terminated with a `NULL`.

If multiple items match the attributes, then only one will be deleted.

This method may block indefinitely and should not be used in user interface threads.

`self` : | the secret service
`schema` : | the schema for the attributes
`cancellable` : | optional cancellation object
`error` : | location to place an error on failure
`...` : | the attribute keys and values, terminated with `NULL`
Returns : | whether the removal was successful or not

### secret_service_removev_sync ()

    gboolean            secret_service_removev_sync         (SecretService *self,
                                                             const SecretSchema *schema,
                                                             GHashTable *attributes,
                                                             GCancellable *cancellable,
                                                             GError **error);

Remove a secret value from the secret service.

The `attributes` should be a set of key and value string pairs.

If multiple items match the attributes, then only one will be deleted.

This method may block indefinitely and should not be used in user interface threads.

`self` : | the secret service
`schema` : | the schema for the attributes. [allow-none]
`attributes` : | the attribute keys and values. [element-type utf8 utf8]
`cancellable` : | optional cancellation object
`error` : | location to place an error on failure
Returns : | whether the removal was successful or not

### secret_service_prompt ()

    void                secret_service_prompt               (SecretService *self,
                                                             SecretPrompt *prompt,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Perform prompting for a SecretPrompt.

This function is called by other parts of this library to handle prompts for the various actions that can require prompting.

Override the SecretServiceClass `prompt_async` virtual method to change the behavior of the propmting. The default behavior is to simply run `secret_prompt_perform()` on the prompt.

`self` : | the secret service
`prompt` : | the prompt
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to be passed to the callback

### secret_service_prompt_finish ()

    GVariant *          secret_service_prompt_finish        (SecretService *self,
                                                             GAsyncResult *result,
                                                             const GVariantType *return_type,
                                                             GError **error);

Complete asynchronous operation to perform prompting for a SecretPrompt.

Returns a variant result if the prompt was completed and not dismissed. The type of result depends on the action the prompt is completing, and is defined in the Secret Service DBus API specification.

`self` : | the secret service
`result` : | the asynchronous result passed to the callback
`return_type` : | the variant type of the prompt result
`error` : | location to place an error on failure
Returns : | `NULL` if the prompt was dismissed or an error occurred, a variant result if the prompt was successful. [transfer full]

### secret_service_prompt_sync ()

    GVariant *          secret_service_prompt_sync          (SecretService *self,
                                                             SecretPrompt *prompt,
                                                             GCancellable *cancellable,
                                                             const GVariantType *return_type,
                                                             GError **error);

Perform prompting for a SecretPrompt.

Runs a prompt and performs the prompting. Returns a variant result if the prompt was completed and not dismissed. The type of result depends on the action the prompt is completing, and is defined in the Secret Service DBus API specification.

This function is called by other parts of this library to handle prompts for the various actions that can require prompting.

Override the SecretServiceClass `prompt_sync` virtual method to change the behavior of the propmting. The default behavior is to simply run `secret_prompt_perform_sync()` on the prompt.

`self` : | the secret service
`prompt` : | the prompt
`cancellable` : | optional cancellation object
`return_type` : | the variant type of the prompt result
`error` : | location to place an error on failure
Returns : | `NULL` if the prompt was dismissed or an error occurred, a variant result if the prompt was successful. [transfer full]

### secret_service_prompt_path ()

    void                secret_service_prompt_path          (SecretService *self,
                                                             const gchar *prompt_path,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Perform prompting for a SecretPrompt.

This function is called by other parts of this library to handle prompts for the various actions that can require prompting.

Override the SecretServiceClass `prompt_async` virtual method to change the behavior of the propmting. The default behavior is to simply run `secret_prompt_perform()` on the prompt.

`self` : | the secret service
`prompt_path` : | the D-Bus object path of the prompt
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to be passed to the callback

### secret_service_prompt_path_finish ()

    GVariant *          secret_service_prompt_path_finish   (SecretService *self,
                                                             GAsyncResult *result,
                                                             const GVariantType *return_type,
                                                             GError **error);

Complete asynchronous operation to perform prompting for a SecretPrompt.

Returns a variant result if the prompt was completed and not dismissed. The type of result depends on the action the prompt is completing, and is defined in the Secret Service DBus API specification.

`self` : | the secret service
`result` : | the asynchronous result passed to the callback
`return_type` : | the variant type of the prompt result
`error` : | location to place an error on failure
Returns : | `NULL` if the prompt was dismissed or an error occurred, a variant result if the prompt was successful. [transfer full]

### secret_service_prompt_path_sync ()

    GVariant *          secret_service_prompt_path_sync     (SecretService *self,
                                                             const gchar *prompt_path,
                                                             GCancellable *cancellable,
                                                             const GVariantType *return_type,
                                                             GError **error);

### secret_service_create_collection_path ()

    void                secret_service_create_collection_path
                                                            (SecretService *self,
                                                             GHashTable *properties,
                                                             const gchar *alias,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Create a new collection in the secret service, and return its path.

Using this method requires that you setup a correct hash table of D-Bus properties for the new collection. You may prefer to use `secret_collection_create()` which does handles this for you.

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 a collection with the `alias` already exists, then instead of creating a new collection, the existing collection will be returned. If no collection with this alias exists, then a new collection will be created and this alias will be assigned to it.

`properties` is a set of properties for the new collection. The keys in the hash table should be interface.property strings like `org.freedesktop.Secret.Collection.Label`. The values in the hash table should be GVariant values of the properties.

If you wish to have a

This method will return immediately and complete asynchronously. The secret service may prompt the user. `secret_service_prompt()` will be used to handle any prompts that are required.

`self` : | a secret service object
`properties` : | hash table of properties for the new collection. [element-type utf8 GLib.Variant]
`alias` : | an alias to check for before creating the new collection, or to assign to the new collection. [allow-none]
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to be passed to the callback

### secret_service_create_collection_path_finish ()

    gchar *             secret_service_create_collection_path_finish
                                                            (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);

Finish asynchronous operation to create a new collection in the secret service.

`self` : | a secret service object
`result` : | the asynchronous result passed to the callback
`error` : | location to place an error on failure
Returns : | a new string containing the D-Bus object path of the collection. [transfer full]

### secret_service_create_collection_path_sync ()

    gchar *             secret_service_create_collection_path_sync
                                                            (SecretService *self,
                                                             GHashTable *properties,
                                                             const gchar *alias,
                                                             GCancellable *cancellable,
                                                             GError **error);

Create a new collection in the secret service and return its path.

Using this method requires that you setup a correct hash table of D-Bus properties for the new collection. You may prefer to use `secret_collection_create()` which does handles this for you.

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 a collection with the `alias` already exists, then instead of creating a new collection, the existing collection will be returned. If no collection with this alias exists, then a new collection will be created and this alias will be assigned to it.

`properties` is a set of properties for the new collection. The keys in the hash table should be interface.property strings like `org.freedesktop.Secret.Collection.Label`. The values in the hash table should be GVariant values of the properties.

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.

`self` : | a secret service object
`properties` : | hash table of D-Bus properties for the new collection. [element-type utf8 GLib.Variant]
`alias` : | an alias to check for before creating the new collection, or to assign to the new collection. [allow-none]
`cancellable` : | optional cancellation object
`error` : | location to place an error on failure
Returns : | a new string containing the D-Bus object path of the collection. [transfer full]

### secret_service_create_item_path ()

    void                secret_service_create_item_path     (SecretService *self,
                                                             const gchar *collection_path,
                                                             GHashTable *properties,
                                                             SecretValue *value,
                                                             gboolean replace,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Create a new item in a secret service collection and return its D-Bus object path.

It is often easier to use `secret_password_store()` or `secret_item_create()` rather than using this function. Using this method requires that you setup a correct hash table of D-Bus `properties` for the new collection.

If `replace` is set to `TRUE`, and an item already in the collection matches the attributes (specified in `properties`) then the item will be updated instead of creating a new item.

`properties` is a set of properties for the new collection. The keys in the hash table should be interface.property strings like `org.freedesktop.Secret.Item.Label`. The values in the hash table should be GVariant values of the properties.

If `collection_path` is `NULL`, then the default collection will be used. Use SECRET_COLLECTION_SESSION to store the password in the session collection, which doesn't get stored across login sessions.

This method will return immediately and complete asynchronously. The secret service may prompt the user. `secret_service_prompt()` will be used to handle any prompts that are required.

`self` : | a secret service object
`collection_path` : | the D-Bus object path of the collection in which to create item. [allow-none]
`properties` : | hash table of D-Bus properties for the new collection. [element-type utf8 GLib.Variant]
`value` : | the secret value to store in the item
`replace` : | whether to replace an item with the matching attributes
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to be passed to the callback

### secret_service_create_item_path_finish ()

    gchar *             secret_service_create_item_path_finish
                                                            (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);

Finish asynchronous operation to create a new item in the secret service.

`self` : | a secret service object
`result` : | the asynchronous result passed to the callback
`error` : | location to place an error on failure
Returns : | a new string containing the D-Bus object path of the item. [transfer full]

### secret_service_create_item_path_sync ()

    gchar *             secret_service_create_item_path_sync
                                                            (SecretService *self,
                                                             const gchar *collection_path,
                                                             GHashTable *properties,
                                                             SecretValue *value,
                                                             gboolean replace,
                                                             GCancellable *cancellable,
                                                             GError **error);

Create a new item in a secret service collection and return its D-Bus object path.

It is often easier to use `secret_password_store_sync()` or `secret_item_create_sync()` rather than using this function. Using this method requires that you setup a correct hash table of D-Bus `properties` for the new collection.

If `replace` is set to `TRUE`, and an item already in the collection matches the attributes (specified in `properties`) then the item will be updated instead of creating a new item.

`properties` is a set of properties for the new collection. The keys in the hash table should be interface.property strings like `org.freedesktop.Secret.Item.Label`. The values in the hash table should be GVariant values of the properties.

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.

`self` : | a secret service object
`collection_path` : | the D-Bus path of the collection in which to create item. [allow-none]
`properties` : | hash table of D-Bus properties for the new collection. [element-type utf8 GLib.Variant]
`value` : | the secret value to store in the item
`replace` : | whether to replace an item with the matching attributes
`cancellable` : | optional cancellation object
`error` : | location to place an error on failure
Returns : | a new string containing the D-Bus object path of the item. [transfer full]

### secret_service_delete_path ()

    void                secret_service_delete_path          (SecretService *self,
                                                             const gchar *item_path,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Delete a secret item from the secret service.

The item is represented by its D-Bus object path. If you already have a SecretItem proxy objects, use use `secret_item_delete()` instead.

This method will return immediately and complete asynchronously.

`self` : | the secret service
`item_path` : | the D-Bus path of item to delete
`cancellable` : | optional cancellation object
`callback` : | called when the operation completes
`user_data` : | data to be passed to the callback

### secret_service_delete_path_finish ()

    gboolean            secret_service_delete_path_finish   (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);

Complete an asynchronous operation to delete a secret item from the secret service.

`self` : | the secret service
`result` : | the asynchronous result passed to the callback
`error` : | location to place an error on failure
Returns : | whether the deletion was successful or not

### secret_service_delete_path_sync ()

    gboolean            secret_service_delete_path_sync     (SecretService *self,
                                                             const gchar *item_path,
                                                             GCancellable *cancellable,
                                                             GError **error);

Delete a secret item from the secret service.

The item is represented by its D-Bus object path. If you already have a SecretItem proxy objects, use use `secret_item_delete_sync()` instead.

This method may block indefinitely and should not be used in user interface threads.

`self` : | the secret service
`item_path` : | the D-Bus path of item to delete
`cancellable` : | optional cancellation object
`error` : | location to place an error on failure
Returns : | whether the deletion was successful or not

### secret_service_read_alias ()

    void                secret_service_read_alias           (SecretService *self,
                                                             const gchar *alias,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Lookup which collection is assigned to this alias. Aliases help determine well known collections, such as 'default'.

This method will return immediately and complete asynchronously.

`self` : | a secret service object
`alias` : | the alias to lookup
`cancellable` : | optional cancellation object. [allow-none]
`callback` : | called when the operation completes
`user_data` : | data to pass to the callback

### secret_service_read_alias_finish ()

    SecretCollection *  secret_service_read_alias_finish    (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);

Finish an asynchronous operation to lookup which collection is assigned to an alias.

`self` : | a secret service object
`result` : | asynchronous result passed to callback
`error` : | location to place error on failure
Returns : | the collection, or `NULL` if none assigned to the alias. [transfer full]

### secret_service_read_alias_sync ()

    SecretCollection *  secret_service_read_alias_sync      (SecretService *self,
                                                             const gchar *alias,
                                                             GCancellable *cancellable,
                                                             GError **error);

Lookup which collection is assigned to this alias. Aliases help determine well known collections, such as 'default'.

This method may block and should not be used in user interface threads.

`self` : | a secret service object
`alias` : | the alias to lookup
`cancellable` : | optional cancellation object. [allow-none]
`error` : | location to place error on failure
Returns : | the collection, or `NULL` if none assigned to the alias. [transfer full]

### secret_service_read_alias_path ()

    void                secret_service_read_alias_path      (SecretService *self,
                                                             const gchar *alias,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Lookup which collection is assigned to this alias. Aliases help determine well known collections, such as 'default'. This method looks up the dbus object path of the well known collection.

This method will return immediately and complete asynchronously.

`self` : | a secret service object
`alias` : | the alias to lookup
`cancellable` : | optional cancellation object. [allow-none]
`callback` : | called when the operation completes
`user_data` : | data to pass to the callback

### secret_service_read_alias_path_finish ()

    gchar *             secret_service_read_alias_path_finish
                                                            (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);

Finish an asynchronous operation to lookup which collection is assigned to an alias. This method returns the DBus object path of the collection

`self` : | a secret service object
`result` : | asynchronous result passed to callback
`error` : | location to place error on failure
Returns : | the collection dbus object path, or `NULL` if none assigned to the alias. [transfer full]

### secret_service_read_alias_path_sync ()

    gchar *             secret_service_read_alias_path_sync (SecretService *self,
                                                             const gchar *alias,
                                                             GCancellable *cancellable,
                                                             GError **error);

Lookup which collection is assigned to this alias. Aliases help determine well known collections, such as 'default'. This method returns the dbus object path of the collection.

This method may block and should not be used in user interface threads.

`self` : | a secret service object
`alias` : | the alias to lookup
`cancellable` : | optional cancellation object. [allow-none]
`error` : | location to place error on failure
Returns : | the collection dbus object path, or `NULL` if none assigned to the alias. [transfer full]

### secret_service_set_alias ()

    void                secret_service_set_alias            (SecretService *self,
                                                             const gchar *alias,
                                                             SecretCollection *collection,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Assign a collection to this alias. Aliases help determine well known collections, such as 'default'.

This method will return immediately and complete asynchronously.

`self` : | a secret service object
`alias` : | the alias to assign the collection to
`collection` : | the collection to assign to the alias. [allow-none]
`cancellable` : | optional cancellation object. [allow-none]
`callback` : | called when the operation completes
`user_data` : | data to pass to the callback

### secret_service_set_alias_finish ()

    gboolean            secret_service_set_alias_finish     (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);

Finish an asynchronous operation to assign a collection to an alias.

`self` : | a secret service object
`result` : | asynchronous result passed to callback
`error` : | location to place error on failure
Returns : | `TRUE` if successful

### secret_service_set_alias_sync ()

    gboolean            secret_service_set_alias_sync       (SecretService *self,
                                                             const gchar *alias,
                                                             SecretCollection *collection,
                                                             GCancellable *cancellable,
                                                             GError **error);

Assign a collection to this alias. Aliases help determine well known collections, such as 'default'.

This method may block and should not be used in user interface threads.

`self` : | a secret service object
`alias` : | the alias to assign the collection to
`collection` : | the collection to assign to the alias. [allow-none]
`cancellable` : | optional cancellation object. [allow-none]
`error` : | location to place error on failure
Returns : | `TRUE` if successful

### secret_service_set_alias_path ()

    void                secret_service_set_alias_path       (SecretService *self,
                                                             const gchar *alias,
                                                             const gchar *collection_path,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Assign a collection to this alias. Aliases help determine well known collections, such as 'default'. This method takes the dbus object path of the collection to assign to the alias.

This method will return immediately and complete asynchronously.

`self` : | a secret service object
`alias` : | the alias to assign the collection to
`collection_path` : | the dbus object path of the collection to assign to the alias. [allow-none]
`cancellable` : | optional cancellation object. [allow-none]
`callback` : | called when the operation completes
`user_data` : | data to pass to the callback

### secret_service_set_alias_path_finish ()

    gboolean            secret_service_set_alias_path_finish
                                                            (SecretService *self,
                                                             GAsyncResult *result,
                                                             GError **error);

Finish an asynchronous operation to assign a collection to an alias.

`self` : | a secret service object
`result` : | asynchronous result passed to callback
`error` : | location to place error on failure
Returns : | `TRUE` if successful

### secret_service_set_alias_path_sync ()

    gboolean            secret_service_set_alias_path_sync  (SecretService *self,
                                                             const gchar *alias,
                                                             const gchar *collection_path,
                                                             GCancellable *cancellable,
                                                             GError **error);

Assign a collection to this alias. Aliases help determine well known collections, such as 'default'. This method takes the dbus object path of the collection to assign to the alias.

This method may block and should not be used in user interface threads.

`self` : | a secret service object
`alias` : | the alias to assign the collection to
`collection_path` : | the dbus object path of the collection to assign to the alias. [allow-none]
`cancellable` : | optional cancellation object. [allow-none]
`error` : | location to place error on failure
Returns : | `TRUE` if successful

## Property Details

### The `"collections"` property

      "collections"              SecretObjectList*     : Read

A list of SecretCollection objects representing the collections in the Secret Service. This list may be `NULL` if the collections have not been loaded.

To load the collections, specify the `SECRET_SERVICE_LOAD_COLLECTIONS` initialization flag when calling the `secret_service_get()` or `secret_service_new()` functions. Or call the `secret_service_ensure_collections()` method.

### The `"flags"` property

      "flags"                    SecretServiceFlags    : Read / Write / Construct Only

A set of flags describing which parts of the secret service have been initialized.