Previous: Properties and Annotations, Up: Inspection

### 2.6 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

> Return a list of all argument names as list of 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 return `nil` therefore, even if the method or signal has arguments.

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

> Return argument ARG as 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

> Return signature of a `method` or `signal`, represented by name, as 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"