comparison doc/misc/dbus.texi @ 93422:d2f671c73132

* dbus.texi (Synchronous Methods): New parameter TIMEOUT for dbus-call-method. (Receiving Method Calls): The timeout can be set by the calling client.
author Michael Albinus <michael.albinus@gmx.de>
date Sun, 30 Mar 2008 12:52:00 +0000
parents 83be756929f1
children eafbd7a5c9be
comparison
equal deleted inserted replaced
93421:ef82dfe47b36 93422:d2f671c73132
423 At D-Bus level, a method call consist of two messages: one message 423 At D-Bus level, a method call consist of two messages: one message
424 which carries the input parameters to the object owning the method to 424 which carries the input parameters to the object owning the method to
425 be called, and a reply message returning the resulting output 425 be called, and a reply message returning the resulting output
426 parameters from the object. 426 parameters from the object.
427 427
428 @defun dbus-call-method bus service path interface method &rest args 428 @defun dbus-call-method bus service path interface method &optional :timeout timeout &rest args
429 This function calls @var{method} on the D-Bus @var{bus}. @var{bus} is 429 This function calls @var{method} on the D-Bus @var{bus}. @var{bus} is
430 either the symbol @code{:system} or the symbol @code{:session}. 430 either the symbol @code{:system} or the symbol @code{:session}.
431 431
432 @var{service} is the D-Bus service name to be used. @var{path} is the 432 @var{service} is the D-Bus service name to be used. @var{path} is the
433 D-Bus object path, @var{service} is registered at. @var{interface} is 433 D-Bus object path, @var{service} is registered at. @var{interface} is
434 an interface offered by @var{service}. It must provide @var{method}. 434 an interface offered by @var{service}. It must provide @var{method}.
435
436 If the parameter @code{:timeout} is given, the following integer
437 @var{timeout} specifies the maximun number of milliseconds the method
438 call must return. The default value is 25.000. If the method call
439 doesn't return in time, a D-Bus error is raised (@pxref{Errors and
440 Events}).
435 441
436 All other arguments args are passed to @var{method} as arguments. 442 All other arguments args are passed to @var{method} as arguments.
437 They are converted into D-Bus types as described in @ref{Type 443 They are converted into D-Bus types as described in @ref{Type
438 Conversion}. 444 Conversion}.
439 445
544 of @var{method}. @var{handler} must return a list, which elements are 550 of @var{method}. @var{handler} must return a list, which elements are
545 used as arguments for the reply message of @var{method}. This list 551 used as arguments for the reply message of @var{method}. This list
546 can be composed like the input parameters in @ref{Type Conversion}. 552 can be composed like the input parameters in @ref{Type Conversion}.
547 553
548 The default D-Bus timeout when waiting for a message reply is 25 554 The default D-Bus timeout when waiting for a message reply is 25
549 seconds. Therefore, @var{handler} shall not last longer than 555 seconds. This value could be even smaller, depending on the calling
556 client. Therefore, @var{handler} shall not last longer than
550 absolutely necessary. 557 absolutely necessary.
551 558
552 @code{dbus-register-method} returns a Lisp symbol, which can be used 559 @code{dbus-register-method} returns a Lisp symbol, which can be used
553 as argument in @code{dbus-unregister-object} for removing the 560 as argument in @code{dbus-unregister-object} for removing the
554 registration for @var{method}. Example: 561 registration for @var{method}. Example: