Method

SecretServicesearch

Declaration [src]

void
secret_service_search (
  SecretService* service,
  const SecretSchema* schema,
  GHashTable* attributes,
  SecretSearchFlags flags,
  GCancellable* cancellable,
  GAsyncReadyCallback callback,
  gpointer user_data
)

Description [src]

Search for items matching the attributes.

All collections are searched. The attributes should be a table of string keys and string values.

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

If SECRET_SEARCH_ALL is set in flags, then all the items matching the search will be returned. Otherwise only the first item will be returned. This is almost always the unlocked item that was most recently stored.

If SECRET_SEARCH_UNLOCK is set in flags, then items will be unlocked if necessary. In either case, locked and unlocked items will match the search and be returned. If the unlock fails, the search does not fail.

If SECRET_SEARCH_LOAD_SECRETS is set in flags, then the items will have their secret values loaded and available via secret_item_get_secret().

This function returns immediately and completes asynchronously.

Parameters

schema

Type: SecretSchema

The schema for the attributes.

The argument can be NULL.
The data is owned by the caller of the function.
attributes

Type: GHashTable

Search for items matching these attributes.

The data is owned by the caller of the function.
flags

Type: SecretSearchFlags

Search option flags.

cancellable

Type: GCancellable

Optional cancellation object.

The argument can be NULL.
The data is owned by the caller of the function.
callback

Type: GAsyncReadyCallback

Called when the operation completes.

The argument can be NULL.
user_data

Type: gpointer

Data to pass to the callback.

The argument can be NULL.
The data is owned by the caller of the function.