### Interface

# Secret Backend

since: 0.19.0

#### Description [src]

    interface Secret.Backend : Gio.AsyncInitable

`SecretBackend` represents a backend implementation of password storage.

Stability: Stable

Available since: 0.19.0

#### Prerequisite

In order to implement Backend, your type must inherit from`GAsyncInitable`.

#### Implementations

- SecretService

#### Functions

###### secret_backend_get

Get a `SecretBackend` instance.

since: 0.19.0

###### secret_backend_get_finish

Complete an asynchronous operation to get a `SecretBackend`.

since: 0.19.0

#### Properties

###### Secret.Backend:flags

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

since: 0.19.0

#### Interface structure

    struct SecretBackendInterface {
      GTypeInterface parent_iface;
      void (* ensure_for_flags) (
        SecretBackend* self,
        SecretBackendFlags flags,
        GCancellable* cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data
      );
      gboolean (* ensure_for_flags_finish) (
        SecretBackend* self,
        GAsyncResult* result,
        GError** error
      );
      void (* store) (
        SecretBackend* self,
        const SecretSchema* schema,
        GHashTable* attributes,
        const gchar* collection,
        const gchar* label,
        SecretValue* value,
        GCancellable* cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data
      );
      gboolean (* store_finish) (
        SecretBackend* self,
        GAsyncResult* result,
        GError** error
      );
      void (* lookup) (
        SecretBackend* self,
        const SecretSchema* schema,
        GHashTable* attributes,
        GCancellable* cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data
      );
      SecretValue* (* lookup_finish) (
        SecretBackend* self,
        GAsyncResult* result,
        GError** error
      );
      void (* clear) (
        SecretBackend* self,
        const SecretSchema* schema,
        GHashTable* attributes,
        GCancellable* cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data
      );
      gboolean (* clear_finish) (
        SecretBackend* self,
        GAsyncResult* result,
        GError** error
      );
      void (* search) (
        SecretBackend* self,
        const SecretSchema* schema,
        GHashTable* attributes,
        SecretSearchFlags flags,
        GCancellable* cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data
      );
      GList* (* search_finish) (
        SecretBackend* self,
        GAsyncResult* result,
        GError** error
      );

    }

The interface for `SecretBackend`.

###### Interface members

`parent_iface`

    GTypeInterface

| The parent interface.

`ensure_for_flags`

    void (* ensure_for_flags) (
        SecretBackend* self,
        SecretBackendFlags flags,
        GCancellable* cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data
      )

| Implementation of reinitialization step in constructor, optional.

`ensure_for_flags_finish`

    gboolean (* ensure_for_flags_finish) (
        SecretBackend* self,
        GAsyncResult* result,
        GError** error
      )

| Implementation of reinitialization step in constructor, optional.

`store`

    void (* store) (
        SecretBackend* self,
        const SecretSchema* schema,
        GHashTable* attributes,
        const gchar* collection,
        const gchar* label,
        SecretValue* value,
        GCancellable* cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data
      )

| Implementation of `secret_password_store()`, required.

`store_finish`

    gboolean (* store_finish) (
        SecretBackend* self,
        GAsyncResult* result,
        GError** error
      )

| Implementation of `secret_password_store_finish()`, required.

`lookup`

    void (* lookup) (
        SecretBackend* self,
        const SecretSchema* schema,
        GHashTable* attributes,
        GCancellable* cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data
      )

| Implementation of `secret_password_lookup()`, required.

`lookup_finish`

    SecretValue* (* lookup_finish) (
        SecretBackend* self,
        GAsyncResult* result,
        GError** error
      )

| Implementation of `secret_password_lookup_finish()`, required.

`clear`

    void (* clear) (
        SecretBackend* self,
        const SecretSchema* schema,
        GHashTable* attributes,
        GCancellable* cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data
      )

| Implementation of `secret_password_clear()`, required.

`clear_finish`

    gboolean (* clear_finish) (
        SecretBackend* self,
        GAsyncResult* result,
        GError** error
      )

| Implementation of `secret_password_clear_finish()`, required.

`search`

    void (* search) (
        SecretBackend* self,
        const SecretSchema* schema,
        GHashTable* attributes,
        SecretSearchFlags flags,
        GCancellable* cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data
      )

| Implementation of `secret_password_search()`, required.

`search_finish`

    GList* (* search_finish) (
        SecretBackend* self,
        GAsyncResult* result,
        GError** error
      )

| Implementation of `secret_password_search_finish()`, required.

#### Virtual methods

###### Secret.Backend.clear

Implementation of `secret_password_clear()`, required.

###### Secret.Backend.clear_finish

Implementation of `secret_password_clear_finish()`, required.

###### Secret.Backend.ensure_for_flags

Implementation of reinitialization step in constructor, optional.

###### Secret.Backend.ensure_for_flags_finish

Implementation of reinitialization step in constructor, optional.

###### Secret.Backend.lookup

Implementation of `secret_password_lookup()`, required.

###### Secret.Backend.lookup_finish

Implementation of `secret_password_lookup_finish()`, required.

###### Secret.Backend.search

Implementation of `secret_password_search()`, required.

###### Secret.Backend.search_finish

Implementation of `secret_password_search_finish()`, required.

###### Secret.Backend.store

Implementation of `secret_password_store()`, required.

###### Secret.Backend.store_finish

Implementation of `secret_password_store_finish()`, required.