dasbus.server.property module
- class PropertiesInterface[source]
Bases:
object
Standard DBus interface org.freedesktop.DBus.Properties.
DBus objects don’t have to inherit this class, because the DBus library provides support for this interface by default. This class only extends this support.
Report the changed property:
self.report_changed_property('X')
Emit all changes when the method is done:
@emits_properties_changed def SetX(x: Int): self.set_x(x)
- PropertiesChanged
DBus signal.
Can be used as:
Signal = dbus_signal()
Or as a method decorator:
@dbus_signal def Signal(x: Int, y: Double): pass
Signal is defined by the type hints of a decorated method. This method is accessible as: signal.definition
If the signal is not defined by a method, it is expected to have no arguments and signal.definition is equal to None.
- emits_properties_changed(method)[source]
Decorator for emitting properties changes.
The decorated method has to be a member of a class that inherits PropertiesInterface.
- Parameters
method – a DBus method of a class that inherits PropertiesInterface
- Returns
a wrapper of a DBus method that emits PropertiesChanged