GMenuModel exporter

## GMenuModel exporter GMenuModel exporter — Export GMenuModels on D-Bus |

## Synopsis

    guint               g_dbus_connection_export_menu_model (GDBusConnection *connection,
                                                             const gchar *object_path,
                                                             GMenuModel *menu,
                                                             GError **error);
    void                g_dbus_connection_unexport_menu_model
                                                            (GDBusConnection *connection,
                                                             guint export_id);

## Description

These functions support exporting a GMenuModel on D-Bus. The D-Bus interface that is used is a private implementation detail.

To access an exported GMenuModel remotely, use `g_dbus_menu_model_get()` to obtain a GDBusMenuModel.

## Details

### g_dbus_connection_export_menu_model ()

    guint               g_dbus_connection_export_menu_model (GDBusConnection *connection,
                                                             const gchar *object_path,
                                                             GMenuModel *menu,
                                                             GError **error);

Exports `menu` on `connection` at `object_path`.

The implemented D-Bus API should be considered private. It is subject to change in the future.

An object path can only have one action group exported on it. If this constraint is violated, the export will fail and 0 will be returned (with `error` set accordingly).

You can unexport the menu model using `g_dbus_connection_unexport_menu_model()` with the return value of this function.

`connection` : | a GDBusConnection
`object_path` : | a D-Bus object path
`menu` : | a GMenuModel
`error` : | return location for an error, or `NULL`
Returns : | the ID of the export (never zero), or 0 in case of failure

Since 2.32

### g_dbus_connection_unexport_menu_model ()

    void                g_dbus_connection_unexport_menu_model
                                                            (GDBusConnection *connection,
                                                             guint export_id);

Reverses the effect of a previous call to `g_dbus_connection_export_menu_model()`.

It is an error to call this function with an ID that wasn't returned from `g_dbus_connection_export_menu_model()` or to call it with the same ID more than once.

`connection` : | a GDBusConnection
`export_id` : | the ID from `g_dbus_connection_export_menu_model()`

Since 2.32

## See Also

GMenuModel, GDBusMenuModel