0

<none>输出中的接口gdbus-monitor有什么特殊含义吗?

GDbus使用(g_dbus_connection_register_object不允许传递NULLasGDBusInterfaceInfo *并且这似乎是唯一将对象注册到路径的方法)创建这样的消息需要什么 API 调用

相关:dbus - 在接口 NULL 上将对象注册到远程

4

2 回答 2

1

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

于 2013-08-21T16:49:02.543 回答
0

客户端在订阅 g_dbus_connection_signal_subscribe 任何信号时需要知道接口名称,否则它将监听所有接口,因此效率低下。需要接口来绑定服务器自省 xml 文件中提到的单个实体中的方法和信号。

于 2015-03-06T14:01:33.350 回答