### Function

# Gio DBusMenuModel get

since: 2.32

#### Declaration [src]

    GDBusMenuModel*
    g_dbus_menu_model_get (
      GDBusConnection* connection,
      const gchar* bus_name,
      const gchar* object_path
    )

#### Description [src]

Obtains a `GDBusMenuModel` for the menu model which is exported at the given `bus_name` and `object_path`.

The thread default main context is taken at the time of this call. All signals on the menu model (and any linked models) are reported with respect to this context. All calls on the returned menu model (and linked models) must also originate from this same context, with the thread default main context unchanged.

Available since: 2.32

#### Parameters

`connection`

  Type: `GDBusConnection`

  A `GDBusConnection`.

  The data is owned by the caller of the function.

`bus_name`

  Type: `const gchar*`

  The bus name which exports the menu model or `NULL` if `connection` is not a message bus connection.

  The argument can be `NULL`.
  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 at which the menu model is exported.

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

#### Return value

Type: `GDBusMenuModel`

A `GDBusMenuModel` object. Free with g_object_unref().

The caller of the function takes ownership of the data, and is responsible for freeing it.