summaryrefslogtreecommitdiff
path: root/lisp/net
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2010-12-27 18:52:17 +0100
committerMichael Albinus <michael.albinus@gmx.de>2010-12-27 18:52:17 +0100
commit4c145d5d06aff906d311f95bff3ccc2cb424580a (patch)
tree6d2a83734c21aa8b6024302a3e8aed53b5f40910 /lisp/net
parent2f7c71a117244e1967009e8a4a0c82cd7388b470 (diff)
downloademacs-4c145d5d06aff906d311f95bff3ccc2cb424580a.tar.gz
* net/secrets.el (secrets-delete-alias): New defun.
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/secrets.el14
1 files changed, 10 insertions, 4 deletions
diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el
index 4487407971f..33376418025 100644
--- a/lisp/net/secrets.el
+++ b/lisp/net/secrets.el
@@ -448,10 +448,9 @@ If there is no such COLLECTION, return nil."
;; Check the collections.
(catch 'collection-found
(dolist (collection-path (secrets-get-collections) nil)
- (when
- (string-equal
- collection
- (secrets-get-collection-property collection-path "Label"))
+ (when (string-equal
+ collection
+ (secrets-get-collection-property collection-path "Label"))
(throw 'collection-found collection-path))))))
(defun secrets-create-collection (collection)
@@ -490,6 +489,13 @@ For the time being, only the alias \"default\" is supported."
secrets-interface-service "SetAlias"
alias :object-path collection-path))))
+(defun secrets-delete-alias (alias)
+ "Delete ALIAS, referencing to a collection."
+ (dbus-call-method
+ :session secrets-service secrets-path
+ secrets-interface-service "SetAlias"
+ alias :object-path secrets-empty-path))
+
(defun secrets-unlock-collection (collection)
"Unlock collection labelled COLLECTION.
If successful, return the object path of the collection."