* @connection: A #GDBusConnection.
* @sender: The unique bus name of the remote caller.
* @object_path: The object path that was registered with g_dbus_connection_register_subtree().
- * @node: A node that is a child of @object_path (relative to @object_path) or <quote>/</quote> for the root of the subtree.
+ * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
* @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
*
* The type of the @introspect function in #GDBusSubtreeVTable.
*
+ * Subtrees are flat. @node, if non-%NULL, is always exactly one
+ * segment of the object path (ie: it never contains a slash).
+ *
* This function should return %NULL to indicate that there is no object
* at this node.
*
* @sender: The unique bus name of the remote caller.
* @object_path: The object path that was registered with g_dbus_connection_register_subtree().
* @interface_name: The D-Bus interface name that the method call or property access is for.
- * @node: A node that is a child of @object_path (relative to @object_path) or <quote>/</quote> for the root of the subtree.
+ * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
* @out_user_data: Return location for user data to pass to functions in the returned #GDBusInterfaceVTable (never %NULL).
* @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
*
* The type of the @dispatch function in #GDBusSubtreeVTable.
*
+ * Subtrees are flat. @node, if non-%NULL, is always exactly one
+ * segment of the object path (ie: it never contains a slash).
+ *
* Returns: A #GDBusInterfaceVTable or %NULL if you don't want to handle the methods.
*
* Since: 2.26
/* VPs implement the Foo interface, EVPs implement the Bar interface. The root
* does not implement any interfaces
*/
- if (g_str_has_prefix (node, "vp"))
+ if (node == NULL)
+ {
+ return NULL;
+ }
+ else if (g_str_has_prefix (node, "vp"))
{
interfaces[0] = &foo_interface_info;
}
{
interfaces[0] = &bar_interface_info;
}
- else if (g_strcmp0 (node, "/") == 0)
- {
- return NULL;
- }
else
{
g_assert_not_reached ();