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 12:19:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux)

Jan Moringen <address@hidden> writes:

> Hi Michael.

Hi Jan,

> In this case (the code above) the problem is not whether the caller
> receives a return value or not, but whether the call returns at all. It
> does return fine as long as `test' does not return nil. A value of nil
> causes an infinite loop in `dbus-call-method-non-blocking' as I
> explained:
>
>> (while (not (gethash key dbus-return-values-table nil))
>>     (read-event nil nil 0.1))
>> 
>> Here, the return value nil cannot be distinguished from "no return
>> value
>> yet".

Understood. I've committed to the CVS trunk a patch similar to the one
you have proposed.

> The second problem is not being able to not return any values from a
> DBus-invokable function.
>
> I think that a *reply* is required, too. The problem seems to be, that
> it must not have *return values* in it.

OK. There is another patch just committed, which allows your function to
return the special symbol `:ignore'. In this case, the reply message is
sent without any argument, as needed in your case.

Your function would look like this:

  (defun test ()
    :ignore)

> I have no idea how I could work around this problem without the ability
> to not return any values from a DBus-invoked function. If further
> explanations or tests are required, I would be happy to provide them.

Could you, please, check whether the patches solve your needs?

> Thanks in advance.
>
> Kind regards,
> Jan

Best regards, Michael.




reply via email to

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