[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/net/dbus.el,v

From: Michael Albinus
Subject: [Emacs-diffs] Changes to emacs/lisp/net/dbus.el,v
Date: Wed, 06 Feb 2008 20:49:36 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Michael Albinus <albinus>       08/02/06 20:49:35

Index: dbus.el
RCS file: /sources/emacs/emacs/lisp/net/dbus.el,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- dbus.el     3 Feb 2008 12:00:51 -0000       1.12
+++ dbus.el     6 Feb 2008 20:49:35 -0000       1.13
@@ -47,7 +47,11 @@
 (defconst dbus-interface-dbus "org.freedesktop.DBus"
   "The interface exported by the object with `dbus-service-dbus' and 
-(defconst dbus-interface-introspectable "org.freedesktop.DBus.Introspectable"
+(defconst dbus-interface-peer (concat dbus-interface-dbus ".Peer")
+  "The interface for peer objects.")
+(defconst dbus-interface-introspectable
+  (concat dbus-interface-dbus ".Introspectable")
   "The interface supported by introspectable objects.")
 (defmacro dbus-ignore-errors (&rest body)
@@ -319,6 +323,16 @@
      bus dbus-service-dbus dbus-path-dbus
      dbus-interface-dbus "GetNameOwner" service)))
+(defun dbus-ping (bus service)
+  "Check whether SERVICE is registered for D-Bus BUS."
+  ;; "Ping" raises a D-Bus error if SERVICE does not exist.
+  ;; Otherwise, it returns silently.
+  (condition-case nil
+      (progn
+       (dbus-call-method bus service dbus-path-dbus dbus-interface-peer "Ping")
+       t)
+    (dbus-error nil)))
 (defun dbus-introspect (bus service path)
   "Return the introspection data of SERVICE in D-Bus BUS at object path PATH.
 The data are in XML format.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]