我即将开展mpris的实施工作。但目前我不确定如何使用python-dbus读/写dbus接口属性。有没有这方面的例子?
答案 0 :(得分:4)
终于得到了答案:
@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):
...