Python / C++ application D-Bus usage issues
Kip Warner
kip at thevertigo.com
Mon Dec 17 20:38:48 PST 2012
On Mon, 2012-12-17 at 10:26 +0200, Tanu Kaskinen wrote:
> The Introspect message is sent by the proxy object that you create in
> the Python application. Since the C++ application doesn't export any
> objects to D-Bus, there's no point in creating any proxy objects in the
> Python application.
Hey Tanu. The problem is I need the Python application to also receive
some signals from the C++ application and the only way I know how to do
this is by having created the proxy object:
...
dbus_loop = DBusGMainLoop()
self._sessionBus = dbus.SessionBus(mainloop=dbus_loop)
# Initialize the remote proxy...
myProjectProxy = self._sessionBus.get_object(
DBUS_SERVICE_NAME, DBUS_OBJECT_PATH)
# Connect D-Bus notification signal to callback...
myProjectProxy.connect_to_signal(
DBUS_SIGNAL_NOTIFICATION,
self.onNotificationDBusSignal,
dbus_interface=DBUS_INTERFACE)
...
Is there another way?
--
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20121217/4e523002/attachment.pgp>
More information about the dbus
mailing list