Service.search

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.Service.get will be called to get the default classService proxy.

If secret.types.SearchFlags.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.types.SearchFlags.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.types.SearchFlags.LoadSecrets is set in flags, then the items will have their secret values loaded and available via secret.item.Item.getSecret.

This function returns immediately and completes asynchronously.

Parameters

schema secret.schema.Schema

the schema for the attributes

attributes string[string]

search for items matching these attributes

flags secret.types.SearchFlags

search option flags

cancellable gio.cancellable.Cancellable

optional cancellation object

callback gio.types.AsyncReadyCallback

called when the operation completes