Function: secrets-search-item-paths
secrets-search-item-paths is a byte-compiled function defined in
secrets.el.gz.
Signature
(secrets-search-item-paths COLLECTION &rest ATTRIBUTES)
Documentation
Search items in COLLECTION with ATTRIBUTES.
ATTRIBUTES are key-value pairs. The keys are keyword symbols, starting with a colon. Example:
(secrets-search-item-paths "Tramp collection" :user "joe")
The object paths of the found items are returned as list.
Source Code
;; Defined in /usr/src/emacs/lisp/net/secrets.el.gz
(defun secrets-search-item-paths (collection &rest attributes)
"Search items in COLLECTION with ATTRIBUTES.
ATTRIBUTES are key-value pairs. The keys are keyword symbols,
starting with a colon. Example:
(secrets-search-item-paths \"Tramp collection\" :user \"joe\")
The object paths of the found items are returned as list."
(let ((collection-path (secrets-unlock-collection collection))
props)
(unless (secrets-empty-path collection-path)
;; Create attributes list.
(while (consp (cdr attributes))
(unless (keywordp (car attributes))
(error 'wrong-type-argument (car attributes)))
(unless (stringp (cadr attributes))
(error 'wrong-type-argument (cadr attributes)))
(setq props (append
props
`((:dict-entry
,(substring (symbol-name (car attributes)) 1)
,(cadr attributes))))
attributes (cddr attributes)))
;; Search. The result is a list of object paths.
(dbus-call-method
:session secrets-service collection-path
secrets-interface-collection "SearchItems"
(if props
(cons :array props)
'(:array :signature "{ss}"))))))