Python / C++ application D-Bus usage issues
Krzysztof Konopko
krzysztof.konopko at youview.com
Sat Dec 15 08:05:01 PST 2012
On 15/12/12 05:56, Thiago Macieira wrote:
> On sexta-feira, 14 de dezembro de 2012 19.04.24, Kip Warner wrote:
>>> You do not need to get a proxy object. You simply need to send the signal.
>>
>> I'm sorry, but I am very confused. Can you show me how this is suppose
>> to work? My C++ application and Python application only need to send
>> signals back and forth and do not need actual proxy objects. But the
>> code I have written uses APIs that all seem to require proxy objects or
>> interfaces.
>
> I'm sorry, I don't know the API of the Python binding. I can't help you with
> it.
>
> But since your C++ code does not reply to Introspection, you need to find a way
> to emit the signal in the Python side without creating a proxy object. Forget
> the C++ application for a minute: make the Python object emit and confirm that
> it got emitted by using dbus-monitor. Once that is working, go back to your
> C++ application.
>
>>> Indeed, you are doing it.
>>>
>>> But I don't think you've even reached that point. Your application stopped
>>> earlier.
>>
>> I checked with a Python print statement right before the signal is
>> suppose to be fired off and it does reach that point.
>
>
>
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
>
Hi Kip,
Python bindings seem to use org.freedesktop.DBus.Introspectable
interface to learn about a DBus service to provide relevant bindings on
the run time. If you want your service to interact with Python
applications properly, you need to implement
org.freedesktop.DBus.Introspectable interface and write an XML
specification of your service. IMO this is a good idea anyway as you
might want to use some other tools like d-feet.
See more here:
http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-introspectable
I'm not an expert so in order to answer any detailed questions I'd have
to read the relevant documentation which I believe your can also do
yourself.
HTH,
Kris
More information about the dbus
mailing list