]> code.delx.au - gnu-emacs/commitdiff
* net/dbus.el (dbus-introspect, dbus-get-property)
authorMichael Albinus <albinus@detlef>
Sun, 28 Feb 2010 10:27:39 +0000 (11:27 +0100)
committerMichael Albinus <albinus@detlef>
Sun, 28 Feb 2010 10:27:39 +0000 (11:27 +0100)
(dbus-set-property, dbus-get-all-properties): Use
`dbus-call-method' when noninteractive.  (Bug#5645)

lisp/ChangeLog
lisp/net/dbus.el

index 1c91ebe48317c2937305db1c8a5e71a00ef36110..cd06672cfb9516bf62963e2ad3c1d8fb28df736c 100644 (file)
@@ -1,3 +1,9 @@
+2010-02-28  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/dbus.el (dbus-introspect, dbus-get-property)
+       (dbus-set-property, dbus-get-all-properties): Use
+       `dbus-call-method' when noninteractive.  (Bug#5645)
+
 2010-02-28  Chong Yidong  <cyd@stupidchicken.com>
 
        * textmodes/reftex-toc.el (reftex-toc-promote-prepare):
index 146cff0544e6a92287e06e515f4ab36dfdc4091e..5635640cd4c92abccd1552a46d17800273fa9f46 100644 (file)
@@ -573,7 +573,8 @@ the introspection data, is a string in XML format."
   ;; is used, because the handler can be registered in our Emacs
   ;; instance; caller an callee would block each other.
   (dbus-ignore-errors
-    (dbus-call-method-non-blocking
+    (funcall
+     (if noninteractive 'dbus-call-method 'dbus-call-method-non-blocking)
      bus service path dbus-interface-introspectable "Introspect")))
 
 (defun dbus-introspect-xml (bus service path)
@@ -831,7 +832,8 @@ valid D-Bus value, or `nil' if there is no PROPERTY."
   (dbus-ignore-errors
     ;; "Get" returns a variant, so we must use the `car'.
     (car
-     (dbus-call-method-non-blocking
+     (funcall
+      (if noninteractive 'dbus-call-method 'dbus-call-method-non-blocking)
       bus service path dbus-interface-properties
       "Get" :timeout 500 interface property))))
 
@@ -842,7 +844,8 @@ been set successful, the result is VALUE.  Otherwise, `nil' is
 returned."
   (dbus-ignore-errors
     ;; "Set" requires a variant.
-    (dbus-call-method-non-blocking
+    (funcall
+     (if noninteractive 'dbus-call-method 'dbus-call-method-non-blocking)
      bus service path dbus-interface-properties
      "Set" :timeout 500 interface property (list :variant value))
     ;; Return VALUE.
@@ -857,7 +860,10 @@ name of the property, and its value.  If there are no properties,
     ;; "GetAll" returns "a{sv}".
     (let (result)
       (dolist (dict
-              (dbus-call-method-non-blocking
+              (funcall
+               (if noninteractive
+                   'dbus-call-method
+                 'dbus-call-method-non-blocking)
                bus service path dbus-interface-properties
                "GetAll" :timeout 500 interface)
               result)