Right now it's not possible to define methods on a single class that map to different interfaces. An example of how this is useful is how a ServiceInterface also implements the standard DBus interfaces such as the properties interface. Right now that's all done by the library.
One solution might be to add a member to the annotations to specify an interface name.
And a similar member for signals and properties. We can make that optional and take the constructor param as the default interface_name for backwards compatibility.
Another possibility to investigate is to use the python class inheritance system. However, in this case, it would require a class decorator to specify the interface name. Something like this (although this definitely would need some thought):
@DBusInterface(interface_name='org.iface1')
class Iface1(ServiceInterface):
# ...
pass
@DBusInterface(interface_name='org.iface2')
class Iface2(ServiceInterface):
# ...
pass
class Iface3(Iface1, Iface2):
# ...
pass
Right now it's not possible to define methods on a single class that map to different interfaces. An example of how this is useful is how a ServiceInterface also implements the standard DBus interfaces such as the properties interface. Right now that's all done by the library.
One solution might be to add a member to the annotations to specify an interface name.
And a similar member for signals and properties. We can make that optional and take the constructor param as the default
interface_name
for backwards compatibility.Another possibility to investigate is to use the python class inheritance system. However, in this case, it would require a class decorator to specify the interface name. Something like this (although this definitely would need some thought):