如何处理与Python的dbus接口的属性?

我即将开始实施mpris 。 但是目前我不确定如何用pythondbus读/写dbus接口的属性。 有没有这样的例子?

Solutions Collecting From Web of "如何处理与Python的dbus接口的属性?"

终于得到了答案:

@dbus.service.method(dbus.PROPERTIES_IFACE, in_signature='ss', out_signature='v') def Get(self, interface, prop): ... @dbus.service.method(dbus.PROPERTIES_IFACE, in_signature='ssv') def Set(self, interface, prop, value): ... @dbus.service.method(dbus.PROPERTIES_IFACE, in_signature='s', out_signature='a{sv}') def GetAll(self, interface): ...