Function: with-tramp-dbus-call-method

with-tramp-dbus-call-method is a macro defined in tramp-gvfs.el.gz.

Signature

(with-tramp-dbus-call-method VEC SYNCHRONOUS BUS SERVICE PATH INTERFACE METHOD &rest ARGS)

Documentation

Apply a D-Bus call on bus BUS.

If SYNCHRONOUS is non-nil, the call is synchronously. Otherwise, it is an asynchronous call, with ignore as callback function.

The other arguments have the same meaning as with dbus-call-method or dbus-call-method-asynchronously.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-gvfs.el.gz
(defmacro with-tramp-dbus-call-method
  (vec synchronous bus service path interface method &rest args)
  "Apply a D-Bus call on bus BUS.

If SYNCHRONOUS is non-nil, the call is synchronously.  Otherwise,
it is an asynchronous call, with `ignore' as callback function.

The other arguments have the same meaning as with `dbus-call-method'
or `dbus-call-method-asynchronously'."
  (declare (indent 2) (debug t))
  `(let ((func (if ,synchronous
		   #'dbus-call-method #'dbus-call-method-asynchronously))
	 (args (append (list ,bus ,service ,path ,interface ,method)
		       (if ,synchronous (list ,@args) (list 'ignore ,@args)))))
     ;; We use `dbus-ignore-errors', because this macro is also called
     ;; when loading.
     (dbus-ignore-errors (tramp-dbus-function ,vec func args))))