dbus-send and method call with dictionaries

Vincent Génieux vincent.genieux at enensys.com
Tue Sep 4 02:49:26 PDT 2007


Simon McVittie a écrit :
> On Tue, 04 Sep 2007 at 10:10:23 +0200, Vincent Génieux wrote:
>   
>> Now i would like to have a dictionary with a variant type for values 
>> (in_signature=a{sv}), but I don't know if it is possible:
>>     
>
> You may find it easier to use a short Python script for complicated
> types. It can often be a one-liner (the newlines in this example are
> optional):
>
> python -c 'import dbus; print dbus.Bus().call_blocking(
> 	"org.designfu.TestService",
> 	"/org/designfu/TestService/object",
> 	"org.designfu.TestService",
> 	"method2",
> 	"a{sv}",
> 	({"key1": "entry1", "key2": dbus.Int32(42), "key3": True},))'
>
> The parameters to call_blocking() are bus name, object path, interface,
> method name, signature and tuple of arguments (it must be a tuple, even
> if it has 0 or 1 items).
>
>   

Ok thanks for your help (using python in command line is a very good idea).
To answer to my question, dbus-send does not support (yet) complex types 
(containers in containers).

--
vincent.


More information about the dbus mailing list