【问题标题】:where dbus proxy interface located?dbus 代理接口在哪里?
【发布时间】:2015-04-21 15:37:54
【问题描述】:

我有一些dbus.proxies.Interface。以及它的一些 API 文档(在 *.txt 文件中)。

我需要在这个界面上添加一些新功能,但实际上我找不到这个界面。 用于解释的简单python代码块

set_obj = bus.get_object('org.Murphy', path)
rset = dbus.Interface(set_obj, dbus_interface='org.murphy.resourceset')
# print(type(rset)) this printing "<class 'dbus.proxies.Interface'>"
rset.delete()

我需要让rset.foo() 之类的东西正常工作。但我不明白我需要在哪里声明和实现foo()

【问题讨论】:

    标签: python interface dbus


    【解决方案1】:

    要向 API 添加一些内容,您可以将方法添加到 D-Bus 服务实现中。在这种情况下,您可以在 Murphy 源代码中的 src/plugins/plugin-resource-dbus.c 中执行此操作。

    您确定需要在接口中添加方法,而不仅仅是使用现有接口吗?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-10-31
      • 2012-11-13
      • 2012-05-02
      • 1970-01-01
      • 1970-01-01
      • 2012-09-03
      • 2014-02-02
      • 2016-10-29
      相关资源
      最近更新 更多