Variable: secrets-struct-secret-content-type
secrets-struct-secret-content-type is a variable defined in
secrets.el.gz.
Value
nil
Documentation
The content_type of a secret struct.
It must be wrapped as list, because we add it via append. This
is an interface introduced in 2011.
Source Code
;; Defined in /usr/src/emacs/lisp/net/secrets.el.gz
;; We cannot use introspection, because some servers, like
;; mate-keyring-daemon, don't provide relevant data. Once the dust
;; has settled, we shall assume the new interface, and get rid of the test.
(defconst secrets-struct-secret-content-type
(ignore-errors
(let ((content-type "text/plain")
(path (cadr
(dbus-call-method
:session secrets-service secrets-path
secrets-interface-service
"OpenSession" "plain" '(:variant ""))))
result)
;; Create a dummy item.
(setq result
(dbus-call-method
:session secrets-service secrets-session-collection-path
secrets-interface-collection "CreateItem"
;; Properties.
`(:array
(:dict-entry ,(concat secrets-interface-item ".Label")
(:variant " ")))
;; Secret.
`(:struct :object-path ,path
(:array :signature "y")
,(dbus-string-to-byte-array " ")
:string ,content-type)
;; Don't replace.
nil))
;; Remove it.
(dbus-call-method
:session secrets-service (car result)
secrets-interface-item "Delete")
;; Result.
`(,content-type)))
"The content_type of a secret struct.
It must be wrapped as list, because we add it via `append'. This
is an interface introduced in 2011.")