Previous: , Up: Inspection of D-Bus services.   [Contents][Index]

2.7 The final details.

Methods and signals have arguments. They are described in the arg XML elements.

Function: dbus-introspect-get-argument-names bus service path interface name

This function returns a list of all argument names as strings. name must be a method or signal XML element. Example:

(dbus-introspect-get-argument-names
 :session "org.freedesktop.xesam.searcher"
 "/org/freedesktop/xesam/searcher/main"
 "org.freedesktop.xesam.Search" "GetHitData")

⇒ ("search" "hit_ids" "fields" "hit_data")

Argument names are optional; the function can therefore return nil, even if the method or signal has arguments.

Function: dbus-introspect-get-argument bus service path interface name arg

This function returns the argument arg as an XML object. name must be a method or signal XML element. Example:

(dbus-introspect-get-argument
 :session "org.freedesktop.xesam.searcher"
 "/org/freedesktop/xesam/searcher/main"
 "org.freedesktop.xesam.Search" "GetHitData" "search")

⇒ (arg ((name . "search") (type . "s") (direction . "in")))
Function: dbus-introspect-get-signature bus service path interface name &optional direction

This function returns the signature of a method or signal, represented by name, as a string.

If name is a method, direction can be either ‘in’ or ‘out’. If direction is nil, ‘in’ is assumed.

If name is a signal, and direction is non-nil, direction must be ‘out’. Example:

(dbus-introspect-get-signature
 :session "org.freedesktop.xesam.searcher"
 "/org/freedesktop/xesam/searcher/main"
 "org.freedesktop.xesam.Search" "GetHitData" "in")

⇒ "sauas"

(dbus-introspect-get-signature
 :session "org.freedesktop.xesam.searcher"
 "/org/freedesktop/xesam/searcher/main"
 "org.freedesktop.xesam.Search" "HitsAdded")

⇒ "su"