Secret.Service.prototype.search_sync
function search_sync(schema: Secret.Schema, attributes: {String: String}, flags: Secret.SearchFlags, cancellable: Gio.Cancellable): Array(Secret.Item) { // Gjs wrapper for secret_service_search_sync() }
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_sync will be called to get the default Secret.Service proxy.
If Secret.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.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.SearchFlags.load_secrets is set in flags, then the items' secret values will be loaded for any unlocked items. Loaded item secret values are available via Secret.Item.prototype.get_secret. If the load of a secret values fail, then the
This function may block indefinetely. Use the asynchronous version in user interface threads.
- schema
the schema for the attributes
- attributes
search for items matching these attributes
- flags
search option flags
- cancellable
optional cancellation object
- Returns
a list of items that matched the search