diff options
| -rw-r--r-- | lisp/net/dbus.el | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 6ecd0065606..4390f305b66 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el | |||
| @@ -47,7 +47,11 @@ | |||
| 47 | (defconst dbus-interface-dbus "org.freedesktop.DBus" | 47 | (defconst dbus-interface-dbus "org.freedesktop.DBus" |
| 48 | "The interface exported by the object with `dbus-service-dbus' and `dbus-path-dbus'.") | 48 | "The interface exported by the object with `dbus-service-dbus' and `dbus-path-dbus'.") |
| 49 | 49 | ||
| 50 | (defconst dbus-interface-introspectable "org.freedesktop.DBus.Introspectable" | 50 | (defconst dbus-interface-peer (concat dbus-interface-dbus ".Peer") |
| 51 | "The interface for peer objects.") | ||
| 52 | |||
| 53 | (defconst dbus-interface-introspectable | ||
| 54 | (concat dbus-interface-dbus ".Introspectable") | ||
| 51 | "The interface supported by introspectable objects.") | 55 | "The interface supported by introspectable objects.") |
| 52 | 56 | ||
| 53 | (defmacro dbus-ignore-errors (&rest body) | 57 | (defmacro dbus-ignore-errors (&rest body) |
| @@ -319,6 +323,15 @@ The result is either a string, or nil if there is no name owner." | |||
| 319 | bus dbus-service-dbus dbus-path-dbus | 323 | bus dbus-service-dbus dbus-path-dbus |
| 320 | dbus-interface-dbus "GetNameOwner" service))) | 324 | dbus-interface-dbus "GetNameOwner" service))) |
| 321 | 325 | ||
| 326 | (defun dbus-ping (bus service) | ||
| 327 | "Check whether SERVICE is registered for D-Bus BUS." | ||
| 328 | ;; "Ping" raises a D-Bus error if SERVICE does not exist. | ||
| 329 | ;; Otherwise, it returns silently with `nil'. | ||
| 330 | (condition-case nil | ||
| 331 | (not | ||
| 332 | (dbus-call-method bus service dbus-path-dbus dbus-interface-peer "Ping")) | ||
| 333 | (dbus-error nil))) | ||
| 334 | |||
| 322 | (defun dbus-introspect (bus service path) | 335 | (defun dbus-introspect (bus service path) |
| 323 | "Return the introspection data of SERVICE in D-Bus BUS at object path PATH. | 336 | "Return the introspection data of SERVICE in D-Bus BUS at object path PATH. |
| 324 | The data are in XML format. | 337 | The data are in XML format. |