<none>
输出中的接口gdbus-monitor
有什么特殊含义吗?
GDbus
使用(g_dbus_connection_register_object
不允许传递NULL
asGDBusInterfaceInfo *
并且这似乎是唯一将对象注册到路径的方法)创建这样的消息需要什么 API 调用
<none>
输出中的接口gdbus-monitor
有什么特殊含义吗?
GDbus
使用(g_dbus_connection_register_object
不允许传递NULL
asGDBusInterfaceInfo *
并且这似乎是唯一将对象注册到路径的方法)创建这样的消息需要什么 API 调用
Looking into dbus-monitor
's source code shows that it occures as soon as DBUS_EXPORT const char * dbus_message_get_interface ( DBusMessage * message )
returns NULL
(which is valid!, but not according to the spec which requires minimum one .
and two name chunks!! EDIT: A noteable exception are method calls which do not require the interface field of a message to be set http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-types).
g_dbus_message_new_method_call (...)
allows interface_
to be null. But that still only solves half the problems (sender). The receiver method seems to not exist for interface_
s being NULL
.
Turns out it is a bug, I did a source code investigation and filed a bug (including fix) https://bugzilla.gnome.org/show_bug.cgi?id=706675
客户端在订阅 g_dbus_connection_signal_subscribe 任何信号时需要知道接口名称,否则它将监听所有接口,因此效率低下。需要接口来绑定服务器自省 xml 文件中提到的单个实体中的方法和信号。