(secrets-get-collections)))
(defun secrets-collection-path (collection)
- "Return the object path of collection labelled COLLECTION.
+ "Return the object path of collection labeled COLLECTION.
If COLLECTION is nil, return the session collection path.
If there is no such COLLECTION, return nil."
(or
(throw 'collection-found collection-path))))))
(defun secrets-create-collection (collection)
- "Create collection labelled COLLECTION if it doesn't exist.
+ "Create collection labeled COLLECTION if it doesn't exist.
Return the D-Bus object path for collection."
(let ((collection-path (secrets-collection-path collection)))
;; Create the collection.
"Label"))
(defun secrets-set-alias (collection alias)
- "Set ALIAS as alias of collection labelled COLLECTION.
+ "Set ALIAS as alias of collection labeled COLLECTION.
For the time being, only the alias \"default\" is supported."
(let ((collection-path (secrets-collection-path collection)))
(unless (secrets-empty-path collection-path)
alias :object-path secrets-empty-path))
(defun secrets-unlock-collection (collection)
- "Unlock collection labelled COLLECTION.
+ "Unlock collection labeled COLLECTION.
If successful, return the object path of the collection."
(let ((collection-path (secrets-collection-path collection)))
(unless (secrets-empty-path collection-path)
collection-path))
(defun secrets-delete-collection (collection)
- "Delete collection labelled COLLECTION."
+ "Delete collection labeled COLLECTION."
(let ((collection-path (secrets-collection-path collection)))
(unless (secrets-empty-path collection-path)
(secrets-prompt
(car result)))))
(defun secrets-item-path (collection item)
- "Return the object path of item labelled ITEM in COLLECTION.
+ "Return the object path of item labeled ITEM in COLLECTION.
If there is no such item, return nil."
(let ((collection-path (secrets-unlock-collection collection)))
(catch 'item-found
(throw 'item-found item-path))))))
(defun secrets-get-secret (collection item)
- "Return the secret of item labelled ITEM in COLLECTION.
+ "Return the secret of item labeled ITEM in COLLECTION.
If there is no such item, return nil."
(let ((item-path (secrets-item-path collection item)))
(unless (secrets-empty-path item-path)
"GetSecret" :object-path secrets-session-path))))))
(defun secrets-get-attributes (collection item)
- "Return the lookup attributes of item labelled ITEM in COLLECTION.
+ "Return the lookup attributes of item labeled ITEM in COLLECTION.
If there is no such item, or the item has no attributes, return nil."
(unless (stringp collection) (setq collection "default"))
(let ((item-path (secrets-item-path collection item)))
secrets-interface-item "Attributes")))))
(defun secrets-get-attribute (collection item attribute)
- "Return the value of ATTRIBUTE of item labelled ITEM in COLLECTION.
+ "Return the value of ATTRIBUTE of item labeled ITEM in COLLECTION.
If there is no such item, or the item doesn't own this attribute, return nil."
(cdr (assoc attribute (secrets-get-attributes collection item))))