### Function

# Gio DBusSubtreeEnumerateFunc

since: 2.26

#### Declaration

    gchar**
    (* GDBusSubtreeEnumerateFunc) (
      GDBusConnection* connection,
      const gchar* sender,
      const gchar* object_path,
      gpointer user_data
    )

#### Description

The type of the `enumerate` function in `GDBusSubtreeVTable`.

This function is called when generating introspection data and also when preparing to dispatch incoming messages in the event that the `G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES` flag is not specified (ie: to verify that the object path is valid).

Hierarchies are not supported; the items that you return should not contain the `/` character.

The return value will be freed with g_strfreev().

Available since: 2.26

#### Parameters

`connection`

  Type: `GDBusConnection`

  A `GDBusConnection`.

  The data is owned by the caller of the function.

`sender`

  Type: `const gchar*`

  The unique bus name of the remote caller.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`object_path`

  Type: `const gchar*`

  The object path that was registered with g_dbus_connection_register_subtree().

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`user_data`

  Type: `gpointer`

  The `user_data` #gpointer passed to g_dbus_connection_register_subtree().

  The argument can be `NULL`.
  The data is owned by the caller of the function.

#### Return value

Type: An array of `utf8`

A newly allocated array of strings for node names that are children of `object_path`.

The array is `NULL`-terminated.
The caller of the function takes ownership of the data, and is responsible for freeing it.
Each element is a NUL terminated UTF-8 string.