* 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.
This commit is contained in:
parent
0c37265543
commit
e73f184c42
2 changed files with 38 additions and 27 deletions
|
|
@ -1,3 +1,13 @@
|
|||
2010-08-23 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* 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 <lekktu@gmail.com>
|
||||
|
||||
* ido.el (ido-use-virtual-buffers): Fix typo in docstring.
|
||||
|
|
|
|||
|
|
@ -108,15 +108,12 @@ catched in `condition-case' by `dbus-error'.")
|
|||
|
||||
;;; 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 @@ association to the service from D-Bus."
|
|||
|
||||
(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 @@ EVENT is a list which starts with symbol `dbus-event':
|
|||
(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 @@ not well formed."
|
|||
(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 @@ If the HANDLER returns a `dbus-error', it is propagated as return message."
|
|||
|
||||
(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 @@ apply
|
|||
"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 @@ name of the property, and its value. If there are no properties,
|
|||
(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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue