unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Jan Moringen <jan.moringen@uni-bielefeld.de>
Cc: emacs-devel@gnu.org
Subject: Re: Automatic value conversion in DBus bindings
Date: Mon, 27 Jul 2009 06:43:45 +0200	[thread overview]
Message-ID: <87zlaq7n26.fsf@gmx.de> (raw)
In-Reply-To: <22440_1248662818_ZZg0A4O3jD8Bt.00_1248662661.13837.61.camel@localhost.localdomain> (Jan Moringen's message of "Mon, 27 Jul 2009 04:44:21 +0200")

Jan Moringen <jan.moringen@uni-bielefeld.de> 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	other threads:[~2009-07-27  4:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-27  2:44 Automatic value conversion in DBus bindings Jan Moringen
2009-07-27  4:43 ` Michael Albinus [this message]
2009-07-27  5:49   ` Jan Moringen
2009-07-27 10:19     ` Michael Albinus
2009-07-27 18:18       ` Jan Moringen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zlaq7n26.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=jan.moringen@uni-bielefeld.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).