[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102810: * net/dbus.el (dbus-unregist
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102810: * net/dbus.el (dbus-unregister-service): Translate returned |
Date: |
Mon, 10 Jan 2011 10:46:19 +0100 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102810
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Mon 2011-01-10 10:46:19 +0100
message:
* net/dbus.el (dbus-unregister-service): Translate returned
integer into a symbol.
(dbus-register-property): Use `dbus-register-service' to do the
name registration.
modified:
lisp/ChangeLog
lisp/net/dbus.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-01-09 21:24:07 +0000
+++ b/lisp/ChangeLog 2011-01-10 09:46:19 +0000
@@ -1,3 +1,10 @@
+2011-01-10 Jan Moringen <address@hidden>
+
+ * net/dbus.el (dbus-unregister-service): Translate returned
+ integer into a symbol.
+ (dbus-register-property): Use `dbus-register-service' to do the
+ name registration.
+
2011-01-09 Chong Yidong <address@hidden>
* progmodes/idlw-help.el (idlwave-help-link): Inherit from link
=== modified file 'lisp/net/dbus.el'
--- a/lisp/net/dbus.el 2011-01-04 10:57:24 +0000
+++ b/lisp/net/dbus.el 2011-01-10 09:46:19 +0000
@@ -193,9 +193,14 @@
(puthash key (delete elt value) dbus-registered-objects-table)
(remhash key dbus-registered-objects-table))))))
dbus-registered-objects-table)
- (dbus-call-method
- bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus
- "ReleaseName" service))
+ (let ((reply (dbus-call-method
+ bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus
+ "ReleaseName" service)))
+ (case reply
+ (1 :released)
+ (2 :non-existent)
+ (3 :not-owner)
+ (t (signal 'dbus-error "Could not unregister service")))))
(defun dbus-call-method-non-blocking-handler (&rest args)
"Handler for reply messages of asynchronous D-Bus message calls.
@@ -914,17 +919,20 @@
bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus
"RequestName" service 0))
- ;; Add the handler. We use `dbus-service-emacs' as service name, in
- ;; order to let unregister SERVICE despite of this default handler.
- (dbus-register-method
- bus service path dbus-interface-properties "Get" 'dbus-property-handler
- dont-register-service)
- (dbus-register-method
- bus service path dbus-interface-properties "GetAll" 'dbus-property-handler
- dont-register-service)
- (dbus-register-method
- bus service path dbus-interface-properties "Set" 'dbus-property-handler
- dont-register-service)
+ ;; Add handlers for the three property-related methods.
+ (dbus-register-method
+ bus service path dbus-interface-properties "Get"
+ 'dbus-property-handler t)
+ (dbus-register-method
+ bus service path dbus-interface-properties "GetAll"
+ 'dbus-property-handler t)
+ (dbus-register-method
+ bus service path dbus-interface-properties "Set"
+ 'dbus-property-handler t)
+
+ ;; Register the name SERVICE with BUS.
+ (unless dont-register-service
+ (dbus-register-service bus service))
;; Send the PropertiesChanged signal.
(when emits-signal
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102810: * net/dbus.el (dbus-unregister-service): Translate returned,
Michael Albinus <=