Next: Properties and Annotations, Previous: Nodes and Interfaces, Up: Inspection [Contents][Index]

### 2.5 Applying the functionality.

Methods and signals are the communication means to D-Bus. The following functions return their specifications.

Function: dbus-introspect-get-method-names bus service path interface

  Return a list of strings of all method names of interface of service in D-Bus bus at object path path. Example:

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

      ⇒ ("GetState" "StartSearch" "GetHitCount" "GetHits" "NewSession"
          "CloseSession" "GetHitData" "SetProperty" "NewSearch"
          "GetProperty" "CloseSearch")

Function: dbus-introspect-get-method bus service path interface method

  This function returns method of interface as XML element. It must be located at service in D-Bus bus at object path path. method must be a string, element of the list returned by `dbus-introspect-get-method-names`. Example:

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

      ⇒ (method ((name . "GetHitData"))
           (arg ((name . "search") (type . "s") (direction . "in")))
           (arg ((name . "hit_ids") (type . "au") (direction . "in")))
           (arg ((name . "fields") (type . "as") (direction . "in")))
           (arg ((name . "hit_data") (type . "aav") (direction . "out")))
         )

Function: dbus-introspect-get-signal-names bus service path interface

  Return a list of strings of all signal names of interface of service in D-Bus bus at object path path. Example:

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

      ⇒ ("StateChanged" "SearchDone" "HitsModified"
          "HitsRemoved" "HitsAdded")

Function: dbus-introspect-get-signal bus service path interface signal

  This function returns signal of interface as XML element. It must be located at service in D-Bus bus at object path path. signal must be a string, element of the list returned by `dbus-introspect-get-signal-names`. Example:

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

      ⇒ (signal ((name . "HitsAdded"))
           (arg ((name . "search") (type . "s")))
           (arg ((name . "count") (type . "u")))
         )

Next: Properties and Annotations, Previous: Nodes and Interfaces, Up: Inspection [Contents][Index]