changeset 87158:f10e4cb7d001

* dbus.texi (Synchronous Methods): Adapt dbus-call-method. (Signals): Adapt dbus-send-signal and dbus-register-signal. (Errors and Events): Adapt dbus-event.
author Michael Albinus <michael.albinus@gmx.de>
date Fri, 07 Dec 2007 04:42:00 +0000
parents c6aa4b381248
children bcf59f3d73d7
files doc/misc/ChangeLog doc/misc/dbus.texi
diffstat 2 files changed, 31 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/doc/misc/ChangeLog	Fri Dec 07 04:40:28 2007 +0000
+++ b/doc/misc/ChangeLog	Fri Dec 07 04:42:00 2007 +0000
@@ -1,3 +1,9 @@
+2007-12-07  Michael Albinus  <michael.albinus@gmx.de>
+
+	* dbus.texi (Synchronous Methods): Adapt dbus-call-method.
+	(Signals): Adapt dbus-send-signal and dbus-register-signal.
+	(Errors and Events): Adapt dbus-event.
+
 2007-12-03  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 	* gnus.texi (Other Files): Add the yenc command.
--- a/doc/misc/dbus.texi	Fri Dec 07 04:40:28 2007 +0000
+++ b/doc/misc/dbus.texi	Fri Dec 07 04:42:00 2007 +0000
@@ -318,7 +318,7 @@
 be called, and a reply message returning the resulting output
 parameters from the object.
 
-@defun dbus-call-method bus method service path interface &rest args
+@defun dbus-call-method bus service path interface method &rest args
 This function calls @var{method} on the D-Bus @var{bus}.  @var{bus} is
 either the symbol @code{:system} or the symbol @code{:session}.
 
@@ -336,8 +336,8 @@
 
 @example
 (dbus-call-method
-  :session "GetKeyField" "org.gnome.seahorse"
-  "/org/gnome/seahorse/keys/openpgp" "org.gnome.seahorse.Keys"
+  :session "org.gnome.seahorse" "/org/gnome/seahorse/keys/openpgp"
+  "org.gnome.seahorse.Keys" "GetKeyField"
   "openpgp:657984B8C7A966DD" "simple-name")
 
 @result{} (t ("Philip R. Zimmermann"))
@@ -349,8 +349,9 @@
 
 @example
 (dbus-call-method
-  :system "GetPropertyString" "org.freedesktop.Hal"
-  "/org/freedesktop/Hal/devices/computer" "org.freedesktop.Hal.Device"
+  :system "org.freedesktop.Hal"
+  "/org/freedesktop/Hal/devices/computer"
+  "org.freedesktop.Hal.Device" "GetPropertyString"
   "system.kernel.machine")
 
 @result{} "i686"
@@ -368,14 +369,14 @@
 @example
 (dolist (device
           (dbus-call-method
-            :system "GetAllDevices" "org.freedesktop.Hal"
+            :system "org.freedesktop.Hal"
             "/org/freedesktop/Hal/Manager"
-            "org.freedesktop.Hal.Manager"))
+            "org.freedesktop.Hal.Manager" "GetAllDevices"))
   (message "\nudi = %s" device)
   (dolist (properties
             (dbus-call-method
-              :system "GetAllProperties" "org.freedesktop.Hal"
-              device "org.freedesktop.Hal.Device"))
+              :system "org.freedesktop.Hal" device
+              "org.freedesktop.Hal.Device" "GetAllProperties"))
     (message "  %s = %S"
              (car properties) (or (caar (cdr properties)) ""))))
 
@@ -406,7 +407,7 @@
 Signals are broadcast messages.  They carry input parameters, which
 are received by all objects which have registered for such a signal.
 
-@defun dbus-send-signal bus signal service path interface &rest args
+@defun dbus-send-signal bus service path interface signal &rest args
 This function is similar to @code{dbus-call-method}.  The difference
 is, that there are no returning output parameters.
 
@@ -425,12 +426,12 @@
 
 @example
 (dbus-send-signal
-  :session "FileModified" "org.gnu.Emacs" "/org/gnu/Emacs"
-  "org.gnu.Emacs.FileManager" "/home/albinus/.emacs")
+  :session "org.gnu.Emacs" "/org/gnu/Emacs"
+  "org.gnu.Emacs.FileManager" "FileModified" "/home/albinus/.emacs")
 @end example
 @end defun
 
-@defun dbus-register-signal bus signal service path interface handler
+@defun dbus-register-signal bus service path interface signal handler
 With this function, an application registers for @var{signal} on the
 D-Bus @var{bus}.
 
@@ -461,13 +462,15 @@
 (defun my-dbus-signal-handler (device)
   (message "Device %s added" device))
 
+@result{} my-dbus-signal-handler
+
 (dbus-register-signal
-  :system "DeviceAdded"
-  (dbus-get-name-owner :system "org.freedesktop.Hal")
-  "/org/freedesktop/Hal/Manager" "org.freedesktop.Hal.Manager"
+  :system "org.freedesktop.Hal" "/org/freedesktop/Hal/Manager"
+  "org.freedesktop.Hal.Manager" "DeviceAdded"
   'my-dbus-signal-handler)
 
-@result{} (:system "org.freedesktop.Hal.Manager" "DeviceAdded")
+@result{} (:system ":1.3" "/org/freedesktop/Hal/Manager"
+    "org.freedesktop.Hal.Manager" "DeviceAdded")
 @end example
 
 As we know from the inspection data of interface
@@ -503,13 +506,9 @@
 Events, , , elisp}).  The generated event has this form:
 
 @example
-(dbus-event @var{handler} @var{bus} @var{service} @var{path} @var{interface} @var{member} &rest @var{args})
+(dbus-event @var{bus} @var{service} @var{path} @var{interface} @var{member} @var{handler} &rest @var{args})
 @end example
 
-@var{handler} is the callback function which has been registered for
-this signal (see @pxref{Signals}).  When a @code{dbus-event} event
-arrives, @var{handler} is called with @var{args} as arguments.
-
 @var{bus} identifies the D-Bus the signal is coming from.  It is
 either the symbol @code{:system} or the symbol @code{:session}.
 
@@ -517,6 +516,10 @@
 of the D-Bus object emitting the signal.  @var{interface} and
 @var{member} denote the signal which has been sent.
 
+@var{handler} is the callback function which has been registered for
+this signal (see @pxref{Signals}).  When a @code{dbus-event} event
+arrives, @var{handler} is called with @var{args} as arguments.
+
 In order to inspect the @code{dbus-event} data, you could extend the
 definition of the callback function in @ref{Signals}: