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:
parent
ef84a1b2d6
commit
59575c32aa
1 changed files with 13 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue