Collection.search

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 returns immediately and completes asynchronously.

class Collection
void
search
(,
HashTable attributes
,
SecretSearchFlags flags
,
Cancellable cancellable
,
GAsyncReadyCallback callback
,
void* userData
)

Parameters

schema Schema

the schema for the attributes

attributes HashTable

search for items matching these attributes

flags SecretSearchFlags

search option flags

cancellable Cancellable

optional cancellation object

callback GAsyncReadyCallback

called when the operation completes

userData void*

data to pass to the callback

Meta