Function: dbus-introspect-get-signature
dbus-introspect-get-signature is a byte-compiled function defined in
dbus.el.gz.
Signature
(dbus-introspect-get-signature BUS SERVICE PATH INTERFACE NAME &optional DIRECTION)
Documentation
Return signature of a method, property or signal represented by NAME.
If NAME is a method, DIRECTION can be either "in" or "out".
If DIRECTION is nil, "in" is assumed.
If NAME is a signal or a property, DIRECTION is ignored.
Source Code
;; Defined in /usr/src/emacs/lisp/net/dbus.el.gz
(defun dbus-introspect-get-signature
(bus service path interface name &optional direction)
"Return signature of a `method', `property' or `signal' represented by NAME.
If NAME is a `method', DIRECTION can be either \"in\" or \"out\".
If DIRECTION is nil, \"in\" is assumed.
If NAME is a `signal' or a `property', DIRECTION is ignored."
;; For methods, we use "in" as default direction.
(let ((object (or (dbus-introspect-get-method
bus service path interface name)
(dbus-introspect-get-signal
bus service path interface name)
(dbus-introspect-get-property
bus service path interface name))))
(when (and (eq 'method (car object)) (not (stringp direction)))
(setq direction "in"))
;; In signals, no direction is given.
(when (eq 'signal (car object))
(setq direction nil))
;; Collect the signatures.
(if (eq 'property (car object))
(dbus-introspect-get-attribute object "type")
(mapconcat
(lambda (x)
(let ((arg (dbus-introspect-get-argument
bus service path interface name x)))
(if (or (not (stringp direction))
(string-equal
direction
(dbus-introspect-get-attribute arg "direction")))
(dbus-introspect-get-attribute arg "type")
"")))
(dbus-introspect-get-argument-names bus service path interface name)
""))))