Method

SecretCollectionsearch_sync

Declaration [src]

GList*
secret_collection_search_sync (
  SecretCollection* self,
  const SecretSchema* schema,
  GHashTable* attributes,
  SecretSearchFlags flags,
  GCancellable* cancellable,
  GError** error
)

Description [src]

Search for items matching the attributes in the collection. The attributes should be a table of string keys and string values.

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 may block indefinitely. Use the asynchronous version in user interface threads.

Parameters

schema SecretSchema
 

The schema for the attributes.

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

Search for items matching these attributes.

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

Search option flags.

cancellable GCancellable
 

Optional cancellation object.

 The argument can be NULL.
 The data is owned by the caller of the function.
error GError **
  The return location for a GError*, or NULL.

Return value

Returns: A list of None
 

a list of items that matched the search.

 The caller of the method takes ownership of the data, and is responsible for freeing it.