函数
GioDBusSubtreeIntrospectFunc
since: 2.26
声明
GDBusInterfaceInfo**
(* GDBusSubtreeIntrospectFunc) (
GDBusConnection* connection,
const gchar* sender,
const gchar* object_path,
const gchar* node,
gpointer user_data
)
描述 [src]
GDBusSubtreeVTable 中 introspect 函数的类型。
子树是扁平的。node(如果非 NULL)始终恰好是对象路径的一个片段(例如:它从不包含斜杠)。
此函数应返回 NULL 以表明此节点上没有对象。
如果此函数返回非 NULL,则期望返回值是描述由 node 实现的接口的 GDBusInterfaceInfo 结构的指针的 NULL 终止数组。在使用 g_free() 释放之前,对该数组的每个项目都会调用 g_dbus_interface_info_unref() 。
返回 NULL 和返回包含零个项目的数组之间的差异在于,在空数组情况下,标准 DBus 接口将返回到远程内省器,而在 NULL 情况下则不返回。
自 2.26 起提供
参数
connection-
类型:
GDBusConnection一个
GDBusConnection。数据归函数调用者所有。 sender-
类型:
const gchar*远程调用者的唯一总线名称。
数据归函数调用者所有。 該值是一個 NUL 截止 UTF-8 字串。 object_path-
类型:
const gchar*使用 g_dbus_connection_register_subtree() 注册的对象路径。
数据归函数调用者所有。 該值是一個 NUL 截止 UTF-8 字串。 node-
类型:
const gchar*子树根目录的
object_path(相对于object_path)的子节点或NULL。数据归函数调用者所有。 該值是一個 NUL 截止 UTF-8 字串。 user_data-
类型:
gpointer传递给 g_dbus_connection_register_subtree() 的
user_data#gpointer。该参数可以为 NULL。数据归函数调用者所有。