Function: dbus-set-property
dbus-set-property is a byte-compiled function defined in dbus.el.gz.
Signature
(dbus-set-property BUS SERVICE PATH INTERFACE PROPERTY &rest ARGS)
Documentation
Set value of PROPERTY of INTERFACE to VALUE.
It will be checked at BUS, SERVICE, PATH. VALUE can be preceded by a TYPE keyword. When the value is successfully set, and the property's access type is not :write, return VALUE. Otherwise, return nil.
(dbus-set-property BUS SERVICE PATH INTERFACE PROPERTY [TYPE] VALUE)
Probably introduced at or before Emacs version 28.1.
Source Code
;; Defined in /usr/src/emacs/lisp/net/dbus.el.gz
(defun dbus-set-property (bus service path interface property &rest args)
"Set value of PROPERTY of INTERFACE to VALUE.
It will be checked at BUS, SERVICE, PATH. VALUE can be preceded
by a TYPE keyword. When the value is successfully set, and the
property's access type is not `:write', return VALUE. Otherwise,
return nil.
\(dbus-set-property BUS SERVICE PATH INTERFACE PROPERTY [TYPE] VALUE)"
;; "Set" requires a variant.
(dbus-call-method
bus service path dbus-interface-properties
"Set" :timeout 500 interface property (cons :variant args))
;; Return VALUE.
(condition-case err
(dbus-get-property bus service path interface property)
(dbus-error
(if (string-equal dbus-error-access-denied (cadr err))
(car args)
(signal (car err) (cdr err))))))