Calling methods non-blocking
Function: dbus-call-method-asynchronously bus service path interface method handler &optional :timeout timeout :authorizable auth :keep-fd &rest args
This function calls method on the D-Bus bus asynchronously. bus is either the keyword :system or the keyword :session.
service is the D-Bus service name to be used. path is the D-Bus object path, service is registered at. interface is an interface offered by service. It must provide method.
handler is a Lisp function, which is called when the corresponding return message arrives. If handler is nil, no return message will be expected.
If the parameter :timeout is given, the following integer timeout specifies the maximum number of milliseconds before a reply message must arrive. The default value is 25,000. If there is no reply message in time, a D-Bus error is raised (see Errors and events).
If the parameter :authorizable is given and the following auth is non-nil, the invoked method may interactively prompt the user for authorization. The default is nil.
If the parameter :keep-fd is given, and the return message has a first argument with a D-Bus type :unix-fd, the returned file descriptor is kept internally, and can be used in a later call of dbus--close-fd (see Handle file descriptors).
The remaining arguments args are passed to method as arguments. They are converted into D-Bus types as described in Mapping Lisp types and D-Bus types.
If handler is a Lisp function, the function returns a key into the hash table dbus-registered-objects-table. The corresponding entry in the hash table is removed, when the return message arrives, and handler is called. Example: