1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Add an example for the :authorizable `dbus-call-method' keyword

This was requested in bug#71969 over a year ago.

* doc/misc/dbus.texi (Synchronous Methods): Add example for
`dbus-call-method' with authorization.  (Bug#79062)
This commit is contained in:
Steven Allen 2025-07-21 09:50:33 +02:00 committed by Michael Albinus
parent ef84a1b2d6
commit 59575c32aa

View file

@ -1228,7 +1228,19 @@ and Events}).
If the parameter @code{:authorizable} is given and the following If the parameter @code{:authorizable} is given and the following
@var{auth} is non-@code{nil}, the invoked method may interactively @var{auth} is non-@code{nil}, the invoked method may interactively
prompt the user for authorization. The default is @code{nil}. prompt the user for authorization. The default is @code{nil}. For
example, the following will restart the Bluez systemd service, prompting
the user for authorization via polkit (assuming a polkit agent is
running):
@lisp
(dbus-call-method
:system
"org.freedesktop.systemd1" "/org/freedesktop/systemd1"
"org.freedesktop.systemd1.Manager" "RestartUnit"
:authorizable t
"bluetooth.service" "replace")
@end lisp
The remaining arguments @var{args} are passed to @var{method} as The remaining arguments @var{args} are passed to @var{method} as
arguments. They are converted into D-Bus types as described in arguments. They are converted into D-Bus types as described in