Mercurial > emacs
comparison lisp/net/dbus.el @ 91589:12b2f1526656
* net/dbus.el (dbus-interface-peer): New defconst.
(dbus-ping): New defun.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Wed, 06 Feb 2008 20:54:19 +0000 |
parents | 83afe69ce25e |
children | 58bf306db72e |
comparison
equal
deleted
inserted
replaced
91588:83afe69ce25e | 91589:12b2f1526656 |
---|---|
324 dbus-interface-dbus "GetNameOwner" service))) | 324 dbus-interface-dbus "GetNameOwner" service))) |
325 | 325 |
326 (defun dbus-ping (bus service) | 326 (defun dbus-ping (bus service) |
327 "Check whether SERVICE is registered for D-Bus BUS." | 327 "Check whether SERVICE is registered for D-Bus BUS." |
328 ;; "Ping" raises a D-Bus error if SERVICE does not exist. | 328 ;; "Ping" raises a D-Bus error if SERVICE does not exist. |
329 ;; Otherwise, it returns silently. | 329 ;; Otherwise, it returns silently with `nil'. |
330 (condition-case nil | 330 (condition-case nil |
331 (progn | 331 (not |
332 (dbus-call-method bus service dbus-path-dbus dbus-interface-peer "Ping") | 332 (dbus-call-method bus service dbus-path-dbus dbus-interface-peer "Ping")) |
333 t) | |
334 (dbus-error nil))) | 333 (dbus-error nil))) |
335 | 334 |
336 (defun dbus-introspect (bus service path) | 335 (defun dbus-introspect (bus service path) |
337 "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. |
338 The data are in XML format. | 337 The data are in XML format. |