emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r101173: * net/dbus.el: Accept UNIX d


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101173: * net/dbus.el: Accept UNIX domain sockets as bus address.
Date: Mon, 23 Aug 2010 15:08:54 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101173
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Mon 2010-08-23 15:08:54 +0200
message:
  * net/dbus.el: Accept UNIX domain sockets as bus address.
  (top): Don't initialize `dbus-registered-objects-table' anymore,
  this is done in dbusbind,c.
  (dbus-check-event): Adapt test for bus.
  (dbus-return-values-table, dbus-unregister-service)
  (dbus-event-bus-name, dbus-introspect, dbus-register-property):
  Adapt doc string.
modified:
  lisp/ChangeLog
  lisp/net/dbus.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-08-23 10:21:01 +0000
+++ b/lisp/ChangeLog    2010-08-23 13:08:54 +0000
@@ -1,3 +1,13 @@
+2010-08-23  Michael Albinus  <address@hidden>
+
+       * net/dbus.el: Accept UNIX domain sockets as bus address.
+       (top): Don't initialize `dbus-registered-objects-table' anymore,
+       this is done in dbusbind,c.
+       (dbus-check-event): Adapt test for bus.
+       (dbus-return-values-table, dbus-unregister-service)
+       (dbus-event-bus-name, dbus-introspect, dbus-register-property):
+       Adapt doc string.
+
 2010-08-23  Juanma Barranquero  <address@hidden>
 
        * ido.el (ido-use-virtual-buffers): Fix typo in docstring.

=== modified file 'lisp/net/dbus.el'
--- a/lisp/net/dbus.el  2010-07-04 14:32:00 +0000
+++ b/lisp/net/dbus.el  2010-08-23 13:08:54 +0000
@@ -108,15 +108,12 @@
 
 ;;; Hash table of registered functions.
 
-;; We create it here.  So we have a simple test in dbusbind.c, whether
-;; the Lisp code has been loaded.
-(setq dbus-registered-objects-table (make-hash-table :test 'equal))
-
 (defvar dbus-return-values-table (make-hash-table :test 'equal)
   "Hash table for temporary storing arguments of reply messages.
-A key in this hash table is a list (BUS SERIAL).  BUS is either the
-symbol `:system' or the symbol `:session'.  SERIAL is the serial number
-of the reply message.  See `dbus-call-method-non-blocking-handler' and
+A key in this hash table is a list (BUS SERIAL).  BUS is either a
+Lisp symbol, `:system' or `:session', or a string denoting the
+bus address.  SERIAL is the serial number of the reply message.
+See `dbus-call-method-non-blocking-handler' and
 `dbus-call-method-non-blocking'.")
 
 (defun dbus-list-hash-table ()
@@ -187,8 +184,8 @@
 
 (defun dbus-unregister-service (bus service)
   "Unregister all objects related to SERVICE from D-Bus BUS.
-BUS must be either the symbol `:system' or the symbol `:session'.
-SERVICE must be a known service name."
+BUS is either a Lisp symbol, `:system' or `:session', or a string
+denoting the bus address.  SERVICE must be a known service name."
   (maphash
    (lambda (key value)
      (dolist (elt value)
@@ -353,15 +350,15 @@
   (dbus-event BUS TYPE SERIAL SERVICE PATH INTERFACE MEMBER HANDLER &rest ARGS)
 
 BUS identifies the D-Bus the message is coming from.  It is
-either the symbol `:system' or the symbol `:session'.  TYPE is
-the D-Bus message type which has caused the event, SERIAL is the
-serial number of the received D-Bus message.  SERVICE and PATH
-are the unique name and the object path of the D-Bus object
-emitting the message.  INTERFACE and MEMBER denote the message
-which has been sent.  HANDLER is the function which has been
-registered for this message.  ARGS are the arguments passed to
-HANDLER, when it is called during event handling in
-`dbus-handle-event'.
+either a Lisp symbol, `:system' or `:session', or a string
+denoting the bus address.  TYPE is the D-Bus message type which
+has caused the event, SERIAL is the serial number of the received
+D-Bus message.  SERVICE and PATH are the unique name and the
+object path of the D-Bus object emitting the message.  INTERFACE
+and MEMBER denote the message which has been sent.  HANDLER is
+the function which has been registered for this message.  ARGS
+are the arguments passed to HANDLER, when it is called during
+event handling in `dbus-handle-event'.
 
 This function raises a `dbus-error' signal in case the event is
 not well formed."
@@ -369,7 +366,8 @@
   (unless (and (listp event)
               (eq (car event) 'dbus-event)
               ;; Bus symbol.
-              (symbolp (nth 1 event))
+              (or (symbolp (nth 1 event))
+                  (stringp (nth 1 event)))
               ;; Type.
               (and (natnump (nth 2 event))
                    (< dbus-message-type-invalid (nth 2 event)))
@@ -434,9 +432,10 @@
 
 (defun dbus-event-bus-name (event)
   "Return the bus name the event is coming from.
-The result is either the symbol `:system' or the symbol `:session'.
-EVENT is a D-Bus event, see `dbus-check-event'.  This function
-raises a `dbus-error' signal in case the event is not well formed."
+The result is either a Lisp symbol, `:system' or `:session', or a
+string denoting the bus address.  EVENT is a D-Bus event, see
+`dbus-check-event'.  This function raises a `dbus-error' signal
+in case the event is not well formed."
   (dbus-check-event event)
   (nth 1 event))
 
@@ -566,10 +565,11 @@
   "Return all interfaces and sub-nodes of SERVICE,
 registered at object path PATH at bus BUS.
 
-BUS must be either the symbol `:system' or the symbol `:session'.
-SERVICE must be a known service name, and PATH must be a valid
-object path.  The last two parameters are strings.  The result,
-the introspection data, is a string in XML format."
+BUS is either a Lisp symbol, `:system' or `:session', or a string
+denoting the bus address.  SERVICE must be a known service name,
+and PATH must be a valid object path.  The last two parameters
+are strings.  The result, the introspection data, is a string in
+XML format."
   ;; We don't want to raise errors.  `dbus-call-method-non-blocking'
   ;; is used, because the handler can be registered in our Emacs
   ;; instance; caller an callee would block each other.
@@ -873,7 +873,8 @@
   (bus service path interface property access value &optional emits-signal)
   "Register property PROPERTY on the D-Bus BUS.
 
-BUS is either the symbol `:system' or the symbol `:session'.
+BUS is either a Lisp symbol, `:system' or `:session', or a string
+denoting the bus address.
 
 SERVICE is the D-Bus service name of the D-Bus.  It must be a
 known name.


reply via email to

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