Issues while using DBUS over TCP
Simon McVittie
simon.mcvittie at collabora.co.uk
Wed Aug 6 07:35:30 PDT 2008
On Wed, 06 Aug 2008 at 10:09:06 -0400, Schmottlach, Glenn wrote:
> class TcpSessionBus(dbus.bus.BusConnection):
> def __new__(cls, addr, mainloop=None):
> from _dbus_bindings import BUS_SESSION
Don't use _dbus_bindings. It's not API and never has been. Any code that
uses it *will* break, it's just a matter of when.
> bus = dbus.bus.BusConnection(addr, mainloop=mainloop)
> bus._bus_type = BUS_SESSION
>
> return bus
...
> def main():
> addr = 'tcp:host=192.168.217.129,port=6666'
> bus = TcpSessionBus(addr, DbusGMainLoop())
> # Use the bus as normal to create an object and then retrieve the
> # interface.
This class shouldn't be necessary at all. Can't you just use
"remote_bus = dbus.bus.BusConnection(addr, DBusGMainLoop())"? That was
my intention when I made BusConnection separate...
Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 155 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/dbus/attachments/20080806/7e6eb884/attachment.pgp
More information about the dbus
mailing list