emacs-devel
[Top][All Lists]
Advanced

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

Re: Automatic value conversion in DBus bindings


From: Michael Albinus
Subject: Re: Automatic value conversion in DBus bindings
Date: Mon, 27 Jul 2009 06:43:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Jan Moringen <address@hidden> writes:

Hi Jan,

> While playing around with the DBus bindings, I came across some problems
> related to the automatic conversion between LISP and DBus values.
>
> The first problem can be demonstrated by running the following code:
>
>   (require 'dbus)
>
>   (defun test ()
>     nil)
>
>   (dbus-register-method
>    :session "org.gnu.emacs" "/org/gnu/emacs" "org.gnu.Emacs" "test"
>    #'test)
>
>   (dbus-call-method-non-blocking
>    :session "org.gnu.emacs" "/org/gnu/emacs" "org.gnu.Emacs" "test")

If you don't want to get a return value, you shall call

(dbus-call-method-asynchronously
 :session "org.gnu.emacs" "/org/gnu/emacs" "org.gnu.Emacs" "test" 'ignore)

> The original motivation for my experiments was writing a function that
> should receive DBus calls but not return a value. This was necessary
> since another process (Empathy) would call the method via DBus and
> complain if it returned anything.

How is your function called from Empathy? If it is
dbus_connection_send_with_reply_and_block or
dbus_connection_send_with_reply, you *must* return a value. In the case
of dbus_connection_send (that's what I suspect) it doesn't matter, I believe.

> Kind regards,
> Jan Moringen

Best regards, Michael.




reply via email to

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