Pyrhon binding
Robert McQueen
robert.mcqueen at collabora.co.uk
Thu Mar 2 05:55:12 PST 2006
Marcin wrote:
> Hi,
> It is posible to add method to existing interface?
...
> If I creating object of calss WithinObject the object should add a
> method "methodW" do interface 'com.ObjectService.Interface', but it
> doesn't work. What should I do? How should the class WithinObject be
> written?
Make WithinObject extend ObjectService, or make it extend
dbus.service.Interface and make some other object that inherits from
both ObjectService and WithinObject. You can't do what you tried, which
is to make two Python object instances implement different parts of a
single D-Bus object.
Note that whilst it's allowable to make different instances of an
interface implement different methods, it's confusing and unlikely to
map well to other language bindings. If you want an object that
sometimes has some extra methods, and sometimes doesn't, put those
methods in a different interface.
> Thanks for help.
>
> Marcin
Regards,
Rob
More information about the dbus
mailing list