Connecting a service to an own bus
dbus at phmali.de
Wed Mar 19 02:23:54 PDT 2008
I try with a client to get the Introspection by wrapping it using the
do you mean this?
I think the problem is at the service. Maybe python-dbus has a problem
to export methods to a bus that isn't session or system bus.
I'll send you my service. Maybe you see the mistake
John (J5) Palmieri schrieb:
> On Tue, 2008-03-18 at 10:54 +0100, thomas wrote:
>> I connect a new Bus to the dbus deamon simply with the command:
>> dbus-daemon --config-file=$config --nofork --print-address | head -1
>> > ~/.remotebus.address
>> where $config is my own config file and I save the address in a file
>> named ".remotebus.address" to connect a service to this bus
>> I use python and try to connect a service with the commands:
>> remotebus = dbus.Bus(address)
>> name = dbus.service.BusName("com.example.CalculatorService", remotebus)
>> object = CalculatorObject(remotebus, '/CalculatorObject')
>> "address" is the busaddress I stored in the "~/.remotebus.address" file
>> and "/CalculatorObject" is my Service class
>> one Method is in that class:
>> in_signature='ii', out_signature='ai')
>> def GetAdd(self, add1, add2):
>> return [sum]
>> but if I want to Introspect or connect with a client to this bus it
>> shows only the CalculatorObject but no methods or anything else.
>> Introspection only shows:
>> <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object
>> Introspection 1.0//EN"
>> <node name="CalculatorObject"/>
>> I tryed the same with the session bus and it was perfect.
>> Thanks for help
> Are you wrapping your call in the introspectable interface?
> iface = dbus.service.Interface(object,
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1469 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20080319/fc8b5116/attachment.py
More information about the dbus