emacs-devel
[Top][All Lists]
Advanced

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

Dbus method argument encoding problem


From: christian.lynbech
Subject: Dbus method argument encoding problem
Date: Mon, 28 Jun 2010 14:37:51 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2.50 (gnu/linux)

I have been experimenting to the pidgin chat client over dbus and have
run into a problem with method calls. This is with emacs "23.2.50.1" (as
taking from bzr a few weeks ago) on Linux.

I want to call the PurpleBuddyGetName() method which takes a number as
argument.

If I call:

    (dbus-call-method :session 
                      "im.pidgin.purple.PurpleService"
                      "/im/pidgin/purple/PurpleObject"
                      "im.pidgin.purple.PurpleService" 
                      "PurpleBuddyGetName" 
                      4671)

I get the following error:

    (dbus-error "Argument 0 is specified to be of type \"int32\", but is 
actually of type \"uint32\"")

If one looks at the documentation of `dbus-call-method', I see the
following encoding scheme for method arguments:

...
  number    => DBUS_TYPE_UINT32
  integer   => DBUS_TYPE_INT32
...

I am guessing that `4671' matches `number' and thus is encoded as a
UINT32 but pidgin/libpurple insists on it being an INT32.

One thing is that the documentation should probably say "natural number"
instead of just "number" (since all integers are conventionally also
numbers), but how can I force a positive integer to encode as INT32?


------------------------+-----------------------------------------------------
Christian Lynbech       | christian #\@ defun #\. dk
------------------------+-----------------------------------------------------
Hit the philistines three times over the head with the Elisp reference manual.
                                        - address@hidden (Michael A. Petonic)



reply via email to

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