/* interfaces.c generated by valac 0.56.19, the Vala compiler
 * generated from interfaces.vala, do not modify */

/*
 * Copyright (c) 2025 focus-timer contributors
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#include "ft_plugin_portal.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gio.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
enum  {
	PORTAL_REQUEST_RESPONSE_SIGNAL,
	PORTAL_REQUEST_NUM_SIGNALS
};
static guint portal_request_signals[PORTAL_REQUEST_NUM_SIGNALS] = {0};
typedef GDBusProxy PortalRequestProxy;
typedef GDBusProxyClass PortalRequestProxyClass;
typedef GDBusProxy PortalBackgroundProxy;
typedef GDBusProxyClass PortalBackgroundProxyClass;
typedef struct _PortalBackgroundRequestBackgroundReadyData PortalBackgroundRequestBackgroundReadyData;
enum  {
	PORTAL_GLOBAL_SHORTCUTS_ACTIVATED_SIGNAL,
	PORTAL_GLOBAL_SHORTCUTS_DEACTIVATED_SIGNAL,
	PORTAL_GLOBAL_SHORTCUTS_SHORTCUTS_CHANGED_SIGNAL,
	PORTAL_GLOBAL_SHORTCUTS_NUM_SIGNALS
};
static guint portal_global_shortcuts_signals[PORTAL_GLOBAL_SHORTCUTS_NUM_SIGNALS] = {0};
typedef GDBusProxy PortalGlobalShortcutsProxy;
typedef GDBusProxyClass PortalGlobalShortcutsProxyClass;
typedef struct _PortalGlobalShortcutsCreateSessionReadyData PortalGlobalShortcutsCreateSessionReadyData;
typedef struct _PortalGlobalShortcutsBindShortcutsReadyData PortalGlobalShortcutsBindShortcutsReadyData;
typedef struct _PortalGlobalShortcutsListShortcutsReadyData PortalGlobalShortcutsListShortcutsReadyData;
typedef struct _PortalGlobalShortcutsConfigureShortcutsReadyData PortalGlobalShortcutsConfigureShortcutsReadyData;

struct _PortalBackgroundRequestBackgroundReadyData {
	GDBusMethodInvocation* _invocation_;
	gchar* parent_window;
	GHashTable* options;
};

struct _PortalGlobalShortcutsCreateSessionReadyData {
	GDBusMethodInvocation* _invocation_;
	GHashTable* options;
};

struct _PortalGlobalShortcutsBindShortcutsReadyData {
	GDBusMethodInvocation* _invocation_;
	char* session_handle;
	PortalShortcut* shortcuts;
	gint shortcuts_length1;
	gchar* parent_window;
	GHashTable* options;
};

struct _PortalGlobalShortcutsListShortcutsReadyData {
	GDBusMethodInvocation* _invocation_;
	char* session_handle;
	GHashTable* options;
};

struct _PortalGlobalShortcutsConfigureShortcutsReadyData {
	GDBusMethodInvocation* _invocation_;
	char* session_handle;
	gchar* parent_window;
	GHashTable* options;
};

static GType portal_request_type_id = 0;
static GType portal_background_type_id = 0;
static GType portal_global_shortcuts_type_id = 0;

static void g_cclosure_user_marshal_VOID__UINT_BOXED (GClosure * closure,
                                               GValue * return_value,
                                               guint n_param_values,
                                               const GValue * param_values,
                                               gpointer invocation_hint,
                                               gpointer marshal_data);
static void portal_request_proxy_g_signal (GDBusProxy* proxy,
                                    const gchar* sender_name,
                                    const gchar* signal_name,
                                    GVariant* parameters);
static void _dbus_handle_portal_request_response (PortalRequest* self,
                                           GVariant* parameters);
static void portal_request_proxy_close (PortalRequest* self,
                                 GError** error);
static void portal_request_proxy_portal_request_interface_init (PortalRequestIface* iface);
static void _dbus_portal_request_close (PortalRequest* self,
                                 GVariant* _parameters_,
                                 GDBusMethodInvocation* invocation);
static void portal_request_dbus_interface_method_call (GDBusConnection* connection,
                                                const gchar* sender,
                                                const gchar* object_path,
                                                const gchar* interface_name,
                                                const gchar* method_name,
                                                GVariant* parameters,
                                                GDBusMethodInvocation* invocation,
                                                gpointer user_data);
static GVariant* portal_request_dbus_interface_get_property (GDBusConnection* connection,
                                                      const gchar* sender,
                                                      const gchar* object_path,
                                                      const gchar* interface_name,
                                                      const gchar* property_name,
                                                      GError** error,
                                                      gpointer user_data);
static gboolean portal_request_dbus_interface_set_property (GDBusConnection* connection,
                                                     const gchar* sender,
                                                     const gchar* object_path,
                                                     const gchar* interface_name,
                                                     const gchar* property_name,
                                                     GVariant* value,
                                                     GError** error,
                                                     gpointer user_data);
static void _dbus_portal_request_response (GObject* _sender,
                                    guint32 response,
                                    GHashTable* results,
                                    gpointer* _data);
static void _portal_request_unregister_object (gpointer user_data);
static void portal_background_proxy_g_signal (GDBusProxy* proxy,
                                       const gchar* sender_name,
                                       const gchar* signal_name,
                                       GVariant* parameters);
static void _vala_g_async_ready_callback (GObject *source_object,
                                   GAsyncResult *res,
                                   void *user_data);
static void portal_background_proxy_request_background_async (PortalBackground* self,
                                                       const gchar* parent_window,
                                                       GHashTable* options,
                                                       GAsyncReadyCallback _callback_,
                                                       gpointer _user_data_);
static char* portal_background_proxy_request_background_finish (PortalBackground* self,
                                                         GAsyncResult* _res_,
                                                         GError** error);
static guint32 portal_background_dbus_proxy_get_version (PortalBackground* self);
static void portal_background_proxy_portal_background_interface_init (PortalBackgroundIface* iface);
static void _dbus_portal_background_request_background (PortalBackground* self,
                                                 GVariant* _parameters_,
                                                 GDBusMethodInvocation* invocation);
static void _dbus_portal_background_request_background_ready (GObject * source_object,
                                                       GAsyncResult * _res_,
                                                       gpointer _user_data_);
static void portal_background_dbus_interface_method_call (GDBusConnection* connection,
                                                   const gchar* sender,
                                                   const gchar* object_path,
                                                   const gchar* interface_name,
                                                   const gchar* method_name,
                                                   GVariant* parameters,
                                                   GDBusMethodInvocation* invocation,
                                                   gpointer user_data);
static GVariant* portal_background_dbus_interface_get_property (GDBusConnection* connection,
                                                         const gchar* sender,
                                                         const gchar* object_path,
                                                         const gchar* interface_name,
                                                         const gchar* property_name,
                                                         GError** error,
                                                         gpointer user_data);
static GVariant* _dbus_portal_background_get_version (PortalBackground* self);
static gboolean portal_background_dbus_interface_set_property (GDBusConnection* connection,
                                                        const gchar* sender,
                                                        const gchar* object_path,
                                                        const gchar* interface_name,
                                                        const gchar* property_name,
                                                        GVariant* value,
                                                        GError** error,
                                                        gpointer user_data);
static void _portal_background_unregister_object (gpointer user_data);
static void g_cclosure_user_marshal_VOID__STRING_STRING_UINT64_BOXED (GClosure * closure,
                                                               GValue * return_value,
                                                               guint n_param_values,
                                                               const GValue * param_values,
                                                               gpointer invocation_hint,
                                                               gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__STRING_POINTER_INT (GClosure * closure,
                                                       GValue * return_value,
                                                       guint n_param_values,
                                                       const GValue * param_values,
                                                       gpointer invocation_hint,
                                                       gpointer marshal_data);
static void portal_global_shortcuts_proxy_g_signal (GDBusProxy* proxy,
                                             const gchar* sender_name,
                                             const gchar* signal_name,
                                             GVariant* parameters);
static void _dbus_handle_portal_global_shortcuts_activated (PortalGlobalShortcuts* self,
                                                     GVariant* parameters);
static void _dbus_handle_portal_global_shortcuts_deactivated (PortalGlobalShortcuts* self,
                                                       GVariant* parameters);
static void _vala_PortalShortcut_array_free (PortalShortcut * array,
                                      gssize array_length);
static void _dbus_handle_portal_global_shortcuts_shortcuts_changed (PortalGlobalShortcuts* self,
                                                             GVariant* parameters);
static void portal_global_shortcuts_proxy_create_session_async (PortalGlobalShortcuts* self,
                                                         GHashTable* options,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
static char* portal_global_shortcuts_proxy_create_session_finish (PortalGlobalShortcuts* self,
                                                           GAsyncResult* _res_,
                                                           GError** error);
static void portal_global_shortcuts_proxy_bind_shortcuts_async (PortalGlobalShortcuts* self,
                                                         const char* session_handle,
                                                         PortalShortcut* shortcuts,
                                                         gint shortcuts_length1,
                                                         const gchar* parent_window,
                                                         GHashTable* options,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
static char* portal_global_shortcuts_proxy_bind_shortcuts_finish (PortalGlobalShortcuts* self,
                                                           GAsyncResult* _res_,
                                                           GError** error);
static void portal_global_shortcuts_proxy_list_shortcuts_async (PortalGlobalShortcuts* self,
                                                         const char* session_handle,
                                                         GHashTable* options,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
static char* portal_global_shortcuts_proxy_list_shortcuts_finish (PortalGlobalShortcuts* self,
                                                           GAsyncResult* _res_,
                                                           GError** error);
static void portal_global_shortcuts_proxy_configure_shortcuts_async (PortalGlobalShortcuts* self,
                                                              const char* session_handle,
                                                              const gchar* parent_window,
                                                              GHashTable* options,
                                                              GAsyncReadyCallback _callback_,
                                                              gpointer _user_data_);
static void portal_global_shortcuts_proxy_configure_shortcuts_finish (PortalGlobalShortcuts* self,
                                                               GAsyncResult* _res_,
                                                               GError** error);
static guint32 portal_global_shortcuts_dbus_proxy_get_version (PortalGlobalShortcuts* self);
static void portal_global_shortcuts_proxy_portal_global_shortcuts_interface_init (PortalGlobalShortcutsIface* iface);
static void _dbus_portal_global_shortcuts_create_session (PortalGlobalShortcuts* self,
                                                   GVariant* _parameters_,
                                                   GDBusMethodInvocation* invocation);
static void _dbus_portal_global_shortcuts_create_session_ready (GObject * source_object,
                                                         GAsyncResult * _res_,
                                                         gpointer _user_data_);
static void _dbus_portal_global_shortcuts_bind_shortcuts (PortalGlobalShortcuts* self,
                                                   GVariant* _parameters_,
                                                   GDBusMethodInvocation* invocation);
static void _dbus_portal_global_shortcuts_bind_shortcuts_ready (GObject * source_object,
                                                         GAsyncResult * _res_,
                                                         gpointer _user_data_);
static void _dbus_portal_global_shortcuts_list_shortcuts (PortalGlobalShortcuts* self,
                                                   GVariant* _parameters_,
                                                   GDBusMethodInvocation* invocation);
static void _dbus_portal_global_shortcuts_list_shortcuts_ready (GObject * source_object,
                                                         GAsyncResult * _res_,
                                                         gpointer _user_data_);
static void _dbus_portal_global_shortcuts_configure_shortcuts (PortalGlobalShortcuts* self,
                                                        GVariant* _parameters_,
                                                        GDBusMethodInvocation* invocation);
static void _dbus_portal_global_shortcuts_configure_shortcuts_ready (GObject * source_object,
                                                              GAsyncResult * _res_,
                                                              gpointer _user_data_);
static void portal_global_shortcuts_dbus_interface_method_call (GDBusConnection* connection,
                                                         const gchar* sender,
                                                         const gchar* object_path,
                                                         const gchar* interface_name,
                                                         const gchar* method_name,
                                                         GVariant* parameters,
                                                         GDBusMethodInvocation* invocation,
                                                         gpointer user_data);
static GVariant* portal_global_shortcuts_dbus_interface_get_property (GDBusConnection* connection,
                                                               const gchar* sender,
                                                               const gchar* object_path,
                                                               const gchar* interface_name,
                                                               const gchar* property_name,
                                                               GError** error,
                                                               gpointer user_data);
static GVariant* _dbus_portal_global_shortcuts_get_version (PortalGlobalShortcuts* self);
static gboolean portal_global_shortcuts_dbus_interface_set_property (GDBusConnection* connection,
                                                              const gchar* sender,
                                                              const gchar* object_path,
                                                              const gchar* interface_name,
                                                              const gchar* property_name,
                                                              GVariant* value,
                                                              GError** error,
                                                              gpointer user_data);
static void _dbus_portal_global_shortcuts_activated (GObject* _sender,
                                              const char* session_handle,
                                              const gchar* shortcut_id,
                                              guint64 timestamp,
                                              GHashTable* options,
                                              gpointer* _data);
static void _dbus_portal_global_shortcuts_deactivated (GObject* _sender,
                                                const char* session_handle,
                                                const gchar* shortcut_id,
                                                guint64 timestamp,
                                                GHashTable* options,
                                                gpointer* _data);
static void _dbus_portal_global_shortcuts_shortcuts_changed (GObject* _sender,
                                                      const char* session_handle,
                                                      PortalShortcut* shortcuts,
                                                      gint shortcuts_length1,
                                                      gpointer* _data);
static void _portal_global_shortcuts_unregister_object (gpointer user_data);

static const GDBusArgInfo * const _portal_request_dbus_arg_info_close_in[] = {NULL};
static const GDBusArgInfo * const _portal_request_dbus_arg_info_close_out[] = {NULL};
static const GDBusMethodInfo _portal_request_dbus_method_info_close = {-1, "Close", (GDBusArgInfo **) (&_portal_request_dbus_arg_info_close_in), (GDBusArgInfo **) (&_portal_request_dbus_arg_info_close_out), NULL};
static const GDBusMethodInfo * const _portal_request_dbus_method_info[] = {&_portal_request_dbus_method_info_close, NULL};
static const GDBusArgInfo _portal_request_dbus_arg_info_response_response = {-1, "response", "u", NULL};
static const GDBusArgInfo _portal_request_dbus_arg_info_response_results = {-1, "results", "a{sv}", NULL};
static const GDBusArgInfo * const _portal_request_dbus_arg_info_response[] = {&_portal_request_dbus_arg_info_response_response, &_portal_request_dbus_arg_info_response_results, NULL};
static const GDBusSignalInfo _portal_request_dbus_signal_info_response = {-1, "Response", (GDBusArgInfo **) (&_portal_request_dbus_arg_info_response), NULL};
static const GDBusSignalInfo * const _portal_request_dbus_signal_info[] = {&_portal_request_dbus_signal_info_response, NULL};
static const GDBusPropertyInfo * const _portal_request_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _portal_request_dbus_interface_info = {-1, "org.freedesktop.portal.Request", (GDBusMethodInfo **) (&_portal_request_dbus_method_info), (GDBusSignalInfo **) (&_portal_request_dbus_signal_info), (GDBusPropertyInfo **) (&_portal_request_dbus_property_info), NULL};
static const GDBusInterfaceVTable _portal_request_dbus_interface_vtable = {portal_request_dbus_interface_method_call, portal_request_dbus_interface_get_property, portal_request_dbus_interface_set_property};
static const GDBusArgInfo _portal_background_dbus_arg_info_request_background_parent_window = {-1, "parent_window", "s", NULL};
static const GDBusArgInfo _portal_background_dbus_arg_info_request_background_options = {-1, "options", "a{sv}", NULL};
static const GDBusArgInfo _portal_background_dbus_arg_info_request_background_result = {-1, "result", "o", NULL};
static const GDBusArgInfo * const _portal_background_dbus_arg_info_request_background_in[] = {&_portal_background_dbus_arg_info_request_background_parent_window, &_portal_background_dbus_arg_info_request_background_options, NULL};
static const GDBusArgInfo * const _portal_background_dbus_arg_info_request_background_out[] = {&_portal_background_dbus_arg_info_request_background_result, NULL};
static const GDBusMethodInfo _portal_background_dbus_method_info_request_background = {-1, "RequestBackground", (GDBusArgInfo **) (&_portal_background_dbus_arg_info_request_background_in), (GDBusArgInfo **) (&_portal_background_dbus_arg_info_request_background_out), NULL};
static const GDBusMethodInfo * const _portal_background_dbus_method_info[] = {&_portal_background_dbus_method_info_request_background, NULL};
static const GDBusSignalInfo * const _portal_background_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo _portal_background_dbus_property_info_version = {-1, "Version", "u", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _portal_background_dbus_property_info[] = {&_portal_background_dbus_property_info_version, NULL};
static const GDBusInterfaceInfo _portal_background_dbus_interface_info = {-1, "org.freedesktop.portal.Background", (GDBusMethodInfo **) (&_portal_background_dbus_method_info), (GDBusSignalInfo **) (&_portal_background_dbus_signal_info), (GDBusPropertyInfo **) (&_portal_background_dbus_property_info), NULL};
static const GDBusInterfaceVTable _portal_background_dbus_interface_vtable = {portal_background_dbus_interface_method_call, portal_background_dbus_interface_get_property, portal_background_dbus_interface_set_property};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_create_session_options = {-1, "options", "a{sv}", NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_create_session_result = {-1, "result", "o", NULL};
static const GDBusArgInfo * const _portal_global_shortcuts_dbus_arg_info_create_session_in[] = {&_portal_global_shortcuts_dbus_arg_info_create_session_options, NULL};
static const GDBusArgInfo * const _portal_global_shortcuts_dbus_arg_info_create_session_out[] = {&_portal_global_shortcuts_dbus_arg_info_create_session_result, NULL};
static const GDBusMethodInfo _portal_global_shortcuts_dbus_method_info_create_session = {-1, "CreateSession", (GDBusArgInfo **) (&_portal_global_shortcuts_dbus_arg_info_create_session_in), (GDBusArgInfo **) (&_portal_global_shortcuts_dbus_arg_info_create_session_out), NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_bind_shortcuts_session_handle = {-1, "session_handle", "o", NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_bind_shortcuts_shortcuts = {-1, "shortcuts", "a(sa{sv})", NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_bind_shortcuts_parent_window = {-1, "parent_window", "s", NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_bind_shortcuts_options = {-1, "options", "a{sv}", NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_bind_shortcuts_result = {-1, "result", "o", NULL};
static const GDBusArgInfo * const _portal_global_shortcuts_dbus_arg_info_bind_shortcuts_in[] = {&_portal_global_shortcuts_dbus_arg_info_bind_shortcuts_session_handle, &_portal_global_shortcuts_dbus_arg_info_bind_shortcuts_shortcuts, &_portal_global_shortcuts_dbus_arg_info_bind_shortcuts_parent_window, &_portal_global_shortcuts_dbus_arg_info_bind_shortcuts_options, NULL};
static const GDBusArgInfo * const _portal_global_shortcuts_dbus_arg_info_bind_shortcuts_out[] = {&_portal_global_shortcuts_dbus_arg_info_bind_shortcuts_result, NULL};
static const GDBusMethodInfo _portal_global_shortcuts_dbus_method_info_bind_shortcuts = {-1, "BindShortcuts", (GDBusArgInfo **) (&_portal_global_shortcuts_dbus_arg_info_bind_shortcuts_in), (GDBusArgInfo **) (&_portal_global_shortcuts_dbus_arg_info_bind_shortcuts_out), NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_list_shortcuts_session_handle = {-1, "session_handle", "o", NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_list_shortcuts_options = {-1, "options", "a{sv}", NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_list_shortcuts_result = {-1, "result", "o", NULL};
static const GDBusArgInfo * const _portal_global_shortcuts_dbus_arg_info_list_shortcuts_in[] = {&_portal_global_shortcuts_dbus_arg_info_list_shortcuts_session_handle, &_portal_global_shortcuts_dbus_arg_info_list_shortcuts_options, NULL};
static const GDBusArgInfo * const _portal_global_shortcuts_dbus_arg_info_list_shortcuts_out[] = {&_portal_global_shortcuts_dbus_arg_info_list_shortcuts_result, NULL};
static const GDBusMethodInfo _portal_global_shortcuts_dbus_method_info_list_shortcuts = {-1, "ListShortcuts", (GDBusArgInfo **) (&_portal_global_shortcuts_dbus_arg_info_list_shortcuts_in), (GDBusArgInfo **) (&_portal_global_shortcuts_dbus_arg_info_list_shortcuts_out), NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_configure_shortcuts_session_handle = {-1, "session_handle", "o", NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_configure_shortcuts_parent_window = {-1, "parent_window", "s", NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_configure_shortcuts_options = {-1, "options", "a{sv}", NULL};
static const GDBusArgInfo * const _portal_global_shortcuts_dbus_arg_info_configure_shortcuts_in[] = {&_portal_global_shortcuts_dbus_arg_info_configure_shortcuts_session_handle, &_portal_global_shortcuts_dbus_arg_info_configure_shortcuts_parent_window, &_portal_global_shortcuts_dbus_arg_info_configure_shortcuts_options, NULL};
static const GDBusArgInfo * const _portal_global_shortcuts_dbus_arg_info_configure_shortcuts_out[] = {NULL};
static const GDBusMethodInfo _portal_global_shortcuts_dbus_method_info_configure_shortcuts = {-1, "ConfigureShortcuts", (GDBusArgInfo **) (&_portal_global_shortcuts_dbus_arg_info_configure_shortcuts_in), (GDBusArgInfo **) (&_portal_global_shortcuts_dbus_arg_info_configure_shortcuts_out), NULL};
static const GDBusMethodInfo * const _portal_global_shortcuts_dbus_method_info[] = {&_portal_global_shortcuts_dbus_method_info_create_session, &_portal_global_shortcuts_dbus_method_info_bind_shortcuts, &_portal_global_shortcuts_dbus_method_info_list_shortcuts, &_portal_global_shortcuts_dbus_method_info_configure_shortcuts, NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_activated_session_handle = {-1, "session_handle", "o", NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_activated_shortcut_id = {-1, "shortcut_id", "s", NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_activated_timestamp = {-1, "timestamp", "t", NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_activated_options = {-1, "options", "a{sv}", NULL};
static const GDBusArgInfo * const _portal_global_shortcuts_dbus_arg_info_activated[] = {&_portal_global_shortcuts_dbus_arg_info_activated_session_handle, &_portal_global_shortcuts_dbus_arg_info_activated_shortcut_id, &_portal_global_shortcuts_dbus_arg_info_activated_timestamp, &_portal_global_shortcuts_dbus_arg_info_activated_options, NULL};
static const GDBusSignalInfo _portal_global_shortcuts_dbus_signal_info_activated = {-1, "Activated", (GDBusArgInfo **) (&_portal_global_shortcuts_dbus_arg_info_activated), NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_deactivated_session_handle = {-1, "session_handle", "o", NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_deactivated_shortcut_id = {-1, "shortcut_id", "s", NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_deactivated_timestamp = {-1, "timestamp", "t", NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_deactivated_options = {-1, "options", "a{sv}", NULL};
static const GDBusArgInfo * const _portal_global_shortcuts_dbus_arg_info_deactivated[] = {&_portal_global_shortcuts_dbus_arg_info_deactivated_session_handle, &_portal_global_shortcuts_dbus_arg_info_deactivated_shortcut_id, &_portal_global_shortcuts_dbus_arg_info_deactivated_timestamp, &_portal_global_shortcuts_dbus_arg_info_deactivated_options, NULL};
static const GDBusSignalInfo _portal_global_shortcuts_dbus_signal_info_deactivated = {-1, "Deactivated", (GDBusArgInfo **) (&_portal_global_shortcuts_dbus_arg_info_deactivated), NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_shortcuts_changed_session_handle = {-1, "session_handle", "o", NULL};
static const GDBusArgInfo _portal_global_shortcuts_dbus_arg_info_shortcuts_changed_shortcuts = {-1, "shortcuts", "a(sa{sv})", NULL};
static const GDBusArgInfo * const _portal_global_shortcuts_dbus_arg_info_shortcuts_changed[] = {&_portal_global_shortcuts_dbus_arg_info_shortcuts_changed_session_handle, &_portal_global_shortcuts_dbus_arg_info_shortcuts_changed_shortcuts, NULL};
static const GDBusSignalInfo _portal_global_shortcuts_dbus_signal_info_shortcuts_changed = {-1, "ShortcutsChanged", (GDBusArgInfo **) (&_portal_global_shortcuts_dbus_arg_info_shortcuts_changed), NULL};
static const GDBusSignalInfo * const _portal_global_shortcuts_dbus_signal_info[] = {&_portal_global_shortcuts_dbus_signal_info_activated, &_portal_global_shortcuts_dbus_signal_info_deactivated, &_portal_global_shortcuts_dbus_signal_info_shortcuts_changed, NULL};
static const GDBusPropertyInfo _portal_global_shortcuts_dbus_property_info_version = {-1, "Version", "u", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _portal_global_shortcuts_dbus_property_info[] = {&_portal_global_shortcuts_dbus_property_info_version, NULL};
static const GDBusInterfaceInfo _portal_global_shortcuts_dbus_interface_info = {-1, "org.freedesktop.portal.GlobalShortcuts", (GDBusMethodInfo **) (&_portal_global_shortcuts_dbus_method_info), (GDBusSignalInfo **) (&_portal_global_shortcuts_dbus_signal_info), (GDBusPropertyInfo **) (&_portal_global_shortcuts_dbus_property_info), NULL};
static const GDBusInterfaceVTable _portal_global_shortcuts_dbus_interface_vtable = {portal_global_shortcuts_dbus_interface_method_call, portal_global_shortcuts_dbus_interface_get_property, portal_global_shortcuts_dbus_interface_set_property};

static gpointer
_g_hash_table_ref0 (gpointer self)
{
	return self ? g_hash_table_ref (self) : NULL;
}

void
portal_shortcut_copy (const PortalShortcut* self,
                      PortalShortcut* dest)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	GHashTable* _tmp2_;
	GHashTable* _tmp3_;
	_tmp0_ = (*self).id;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 ((*dest).id);
	(*dest).id = _tmp1_;
	_tmp2_ = (*self).properties;
	_tmp3_ = _g_hash_table_ref0 (_tmp2_);
	_g_hash_table_unref0 ((*dest).properties);
	(*dest).properties = _tmp3_;
}

void
portal_shortcut_destroy (PortalShortcut* self)
{
	_g_free0 ((*self).id);
	_g_hash_table_unref0 ((*self).properties);
}

PortalShortcut*
portal_shortcut_dup (const PortalShortcut* self)
{
	PortalShortcut* dup;
	dup = g_new0 (PortalShortcut, 1);
	portal_shortcut_copy (self, dup);
	return dup;
}

void
portal_shortcut_free (PortalShortcut* self)
{
	portal_shortcut_destroy (self);
	g_free (self);
}

static GType
portal_shortcut_get_type_once (void)
{
	GType portal_shortcut_type_id;
	portal_shortcut_type_id = g_boxed_type_register_static ("PortalShortcut", (GBoxedCopyFunc) portal_shortcut_dup, (GBoxedFreeFunc) portal_shortcut_free);
	return portal_shortcut_type_id;
}

GType
portal_shortcut_get_type (void)
{
	static volatile gsize portal_shortcut_type_id__once = 0;
	if (g_once_init_enter (&portal_shortcut_type_id__once)) {
		GType portal_shortcut_type_id;
		portal_shortcut_type_id = portal_shortcut_get_type_once ();
		g_once_init_leave (&portal_shortcut_type_id__once, portal_shortcut_type_id);
	}
	return portal_shortcut_type_id__once;
}

void
portal_request_close (PortalRequest* self,
                      GError** error)
{
	PortalRequestIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = PORTAL_REQUEST_GET_INTERFACE (self);
	if (_iface_->close) {
		_iface_->close (self, error);
	}
}

static void
g_cclosure_user_marshal_VOID__UINT_BOXED (GClosure * closure,
                                          GValue * return_value,
                                          guint n_param_values,
                                          const GValue * param_values,
                                          gpointer invocation_hint,
                                          gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__UINT_BOXED) (gpointer data1, guint32 arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__UINT_BOXED callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__UINT_BOXED) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_uint (param_values + 1), g_value_get_boxed (param_values + 2), data2);
}

static void
portal_request_default_init (PortalRequestIface * iface,
                             gpointer iface_data)
{
	portal_request_signals[PORTAL_REQUEST_RESPONSE_SIGNAL] = g_signal_new ("response", PORTAL_TYPE_REQUEST, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_BOXED, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_HASH_TABLE);
}

GType
portal_request_get_type (void)
{
	return portal_request_type_id;
}

GType
portal_request_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (PortalRequestIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) portal_request_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	portal_request_type_id = g_type_module_register_type (module, G_TYPE_INTERFACE, "PortalRequest", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (portal_request_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (portal_request_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) portal_request_proxy_get_type);
	g_type_set_qdata (portal_request_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.portal.Request");
	g_type_set_qdata (portal_request_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_portal_request_dbus_interface_info));
	g_type_set_qdata (portal_request_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) portal_request_register_object);
	return portal_request_type_id;
}

G_DEFINE_DYNAMIC_TYPE_EXTENDED (PortalRequestProxy, portal_request_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE_DYNAMIC (PORTAL_TYPE_REQUEST, portal_request_proxy_portal_request_interface_init) )
static void
portal_request_proxy_class_init (PortalRequestProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = portal_request_proxy_g_signal;
}

static void
_dbus_handle_portal_request_response (PortalRequest* self,
                                      GVariant* parameters)
{
	GVariantIter _arguments_iter;
	guint32 response = 0U;
	GVariant* _tmp0_;
	GHashTable* results = NULL;
	GVariant* _tmp1_;
	GHashTable* _tmp2_;
	GVariantIter _tmp3_;
	GVariant* _tmp4_;
	GVariant* _tmp5_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp0_ = g_variant_iter_next_value (&_arguments_iter);
	response = g_variant_get_uint32 (_tmp0_);
	g_variant_unref (_tmp0_);
	_tmp1_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp2_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp3_, _tmp1_);
	while (g_variant_iter_loop (&_tmp3_, "{?*}", &_tmp4_, &_tmp5_)) {
		g_hash_table_insert (_tmp2_, g_variant_dup_string (_tmp4_, NULL), g_variant_get_variant (_tmp5_));
	}
	results = _tmp2_;
	g_variant_unref (_tmp1_);
	g_signal_emit_by_name (self, "response", response, results);
	_g_hash_table_unref0 (results);
}

static void
portal_request_proxy_g_signal (GDBusProxy* proxy,
                               const gchar* sender_name,
                               const gchar* signal_name,
                               GVariant* parameters)
{
	if (strcmp (signal_name, "Response") == 0) {
		_dbus_handle_portal_request_response ((PortalRequest*) proxy, parameters);
	}
}

static void
portal_request_proxy_class_finalize (PortalRequestProxyClass* klass)
{
}

void
portal_request_proxy_register_dynamic_type (GTypeModule* module)
{
	portal_request_proxy_register_type (module);
}

static void
portal_request_proxy_init (PortalRequestProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_portal_request_dbus_interface_info));
}

static void
portal_request_proxy_close (PortalRequest* self,
                            GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.portal.Request", "Close");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
portal_request_proxy_portal_request_interface_init (PortalRequestIface* iface)
{
	iface->close = portal_request_proxy_close;
}

static void
_dbus_portal_request_close (PortalRequest* self,
                            GVariant* _parameters_,
                            GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	portal_request_close (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
portal_request_dbus_interface_method_call (GDBusConnection* connection,
                                           const gchar* sender,
                                           const gchar* object_path,
                                           const gchar* interface_name,
                                           const gchar* method_name,
                                           GVariant* parameters,
                                           GDBusMethodInvocation* invocation,
                                           gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "Close") == 0) {
		_dbus_portal_request_close (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
portal_request_dbus_interface_get_property (GDBusConnection* connection,
                                            const gchar* sender,
                                            const gchar* object_path,
                                            const gchar* interface_name,
                                            const gchar* property_name,
                                            GError** error,
                                            gpointer user_data)
{
	return NULL;
}

static gboolean
portal_request_dbus_interface_set_property (GDBusConnection* connection,
                                            const gchar* sender,
                                            const gchar* object_path,
                                            const gchar* interface_name,
                                            const gchar* property_name,
                                            GVariant* value,
                                            GError** error,
                                            gpointer user_data)
{
	return FALSE;
}

static void
_dbus_portal_request_response (GObject* _sender,
                               guint32 response,
                               GHashTable* results,
                               gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GVariantBuilder _tmp6_;
	GHashTableIter _tmp7_;
	gpointer _tmp8_;
	gpointer _tmp9_;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (response));
	g_hash_table_iter_init (&_tmp7_, results);
	g_variant_builder_init (&_tmp6_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp7_, &_tmp8_, &_tmp9_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp8_;
		_value = (GVariant*) _tmp9_;
		g_variant_builder_add (&_tmp6_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp6_));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.portal.Request", "Response", _arguments, NULL);
}

guint
portal_request_register_object (gpointer object,
                                GDBusConnection* connection,
                                const gchar* path,
                                GError** error)
{
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_portal_request_dbus_interface_info), &_portal_request_dbus_interface_vtable, data, _portal_request_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "response", (GCallback) _dbus_portal_request_response, data);
	return result;
}

static void
_portal_request_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_portal_request_response, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

void
portal_background_request_background (PortalBackground* self,
                                      const gchar* parent_window,
                                      GHashTable* options,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_)
{
	PortalBackgroundIface* _iface_;
	_iface_ = PORTAL_BACKGROUND_GET_INTERFACE (self);
	if (_iface_->request_background) {
		_iface_->request_background (self, parent_window, options, _callback_, _user_data_);
	}
}

char*
portal_background_request_background_finish (PortalBackground* self,
                                             GAsyncResult* _res_,
                                             GError** error)
{
	PortalBackgroundIface* _iface_;
	_iface_ = PORTAL_BACKGROUND_GET_INTERFACE (self);
	if (_iface_->request_background_finish) {
		return _iface_->request_background_finish (self, _res_, error);
	}
	return NULL;
}

guint32
portal_background_get_version (PortalBackground* self)
{
	PortalBackgroundIface* _iface_;
	g_return_val_if_fail (self != NULL, 0U);
	_iface_ = PORTAL_BACKGROUND_GET_INTERFACE (self);
	if (_iface_->get_version) {
		return _iface_->get_version (self);
	}
	return 0U;
}

static void
portal_background_default_init (PortalBackgroundIface * iface,
                                gpointer iface_data)
{
}

GType
portal_background_get_type (void)
{
	return portal_background_type_id;
}

GType
portal_background_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (PortalBackgroundIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) portal_background_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	portal_background_type_id = g_type_module_register_type (module, G_TYPE_INTERFACE, "PortalBackground", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (portal_background_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (portal_background_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) portal_background_proxy_get_type);
	g_type_set_qdata (portal_background_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.portal.Background");
	g_type_set_qdata (portal_background_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_portal_background_dbus_interface_info));
	g_type_set_qdata (portal_background_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) portal_background_register_object);
	return portal_background_type_id;
}

G_DEFINE_DYNAMIC_TYPE_EXTENDED (PortalBackgroundProxy, portal_background_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE_DYNAMIC (PORTAL_TYPE_BACKGROUND, portal_background_proxy_portal_background_interface_init) )
static void
portal_background_proxy_class_init (PortalBackgroundProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = portal_background_proxy_g_signal;
}

static void
portal_background_proxy_g_signal (GDBusProxy* proxy,
                                  const gchar* sender_name,
                                  const gchar* signal_name,
                                  GVariant* parameters)
{
}

static void
portal_background_proxy_class_finalize (PortalBackgroundProxyClass* klass)
{
}

void
portal_background_proxy_register_dynamic_type (GTypeModule* module)
{
	portal_background_proxy_register_type (module);
}

static void
portal_background_proxy_init (PortalBackgroundProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_portal_background_dbus_interface_info));
}

static void
_vala_g_async_ready_callback (GObject *source_object,
                              GAsyncResult *res,
                              void *user_data)
{
	g_task_return_pointer (user_data, g_object_ref (res), g_object_unref);
	g_object_unref (user_data);
}

static void
portal_background_proxy_request_background_async (PortalBackground* self,
                                                  const gchar* parent_window,
                                                  GHashTable* options,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GVariantBuilder _tmp10_;
	GHashTableIter _tmp11_;
	gpointer _tmp12_;
	gpointer _tmp13_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.portal.Background", "RequestBackground");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (parent_window));
	g_hash_table_iter_init (&_tmp11_, options);
	g_variant_builder_init (&_tmp10_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp11_, &_tmp12_, &_tmp13_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp12_;
		_value = (GVariant*) _tmp13_;
		g_variant_builder_add (&_tmp10_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp10_));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static char*
portal_background_proxy_request_background_finish (PortalBackground* self,
                                                   GAsyncResult* _res_,
                                                   GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	char* _result = NULL;
	GVariant* _tmp14_;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		return NULL;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return NULL;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp14_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_dup_string (_tmp14_, NULL);
	g_variant_unref (_tmp14_);
	g_object_unref (_reply_message);
	return _result;
}

static guint32
portal_background_dbus_proxy_get_version (PortalBackground* self)
{
	GVariant *_inner_reply;
	guint32 _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Version");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.freedesktop.portal.Background"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Version"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			guint32 _tmp15_ = 0U;
			return _tmp15_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_uint32 (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static void
portal_background_proxy_portal_background_interface_init (PortalBackgroundIface* iface)
{
	iface->request_background = portal_background_proxy_request_background_async;
	iface->request_background_finish = portal_background_proxy_request_background_finish;
	iface->get_version = portal_background_dbus_proxy_get_version;
}

static void
_dbus_portal_background_request_background (PortalBackground* self,
                                            GVariant* _parameters_,
                                            GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	PortalBackgroundRequestBackgroundReadyData* _ready_data;
	GVariant* _tmp16_;
	GVariant* _tmp17_;
	GHashTable* _tmp18_;
	GVariantIter _tmp19_;
	GVariant* _tmp20_;
	GVariant* _tmp21_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (PortalBackgroundRequestBackgroundReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp16_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->parent_window = g_variant_dup_string (_tmp16_, NULL);
	g_variant_unref (_tmp16_);
	_tmp17_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp18_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp19_, _tmp17_);
	while (g_variant_iter_loop (&_tmp19_, "{?*}", &_tmp20_, &_tmp21_)) {
		g_hash_table_insert (_tmp18_, g_variant_dup_string (_tmp20_, NULL), g_variant_get_variant (_tmp21_));
	}
	_ready_data->options = _tmp18_;
	g_variant_unref (_tmp17_);
	portal_background_request_background (self, _ready_data->parent_window, _ready_data->options, (GAsyncReadyCallback) _dbus_portal_background_request_background_ready, _ready_data);
	_error:
	;
}

static void
_dbus_portal_background_request_background_ready (GObject * source_object,
                                                  GAsyncResult * _res_,
                                                  gpointer _user_data_)
{
	PortalBackgroundRequestBackgroundReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	char* result;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	result = portal_background_request_background_finish ((PortalBackground*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_object_path (result));
	_g_free0 (result);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (_ready_data->parent_window);
	_g_hash_table_unref0 (_ready_data->options);
	g_slice_free (PortalBackgroundRequestBackgroundReadyData, _ready_data);
}

static void
portal_background_dbus_interface_method_call (GDBusConnection* connection,
                                              const gchar* sender,
                                              const gchar* object_path,
                                              const gchar* interface_name,
                                              const gchar* method_name,
                                              GVariant* parameters,
                                              GDBusMethodInvocation* invocation,
                                              gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "RequestBackground") == 0) {
		_dbus_portal_background_request_background (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
_dbus_portal_background_get_version (PortalBackground* self)
{
	guint32 result;
	GVariant* _reply;
	result = portal_background_get_version (self);
	_reply = g_variant_new_uint32 (result);
	return _reply;
}

static GVariant*
portal_background_dbus_interface_get_property (GDBusConnection* connection,
                                               const gchar* sender,
                                               const gchar* object_path,
                                               const gchar* interface_name,
                                               const gchar* property_name,
                                               GError** error,
                                               gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (property_name, "Version") == 0) {
		return _dbus_portal_background_get_version (object);
	}
	return NULL;
}

static gboolean
portal_background_dbus_interface_set_property (GDBusConnection* connection,
                                               const gchar* sender,
                                               const gchar* object_path,
                                               const gchar* interface_name,
                                               const gchar* property_name,
                                               GVariant* value,
                                               GError** error,
                                               gpointer user_data)
{
	return FALSE;
}

guint
portal_background_register_object (gpointer object,
                                   GDBusConnection* connection,
                                   const gchar* path,
                                   GError** error)
{
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_portal_background_dbus_interface_info), &_portal_background_dbus_interface_vtable, data, _portal_background_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_portal_background_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

void
portal_global_shortcuts_create_session (PortalGlobalShortcuts* self,
                                        GHashTable* options,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	PortalGlobalShortcutsIface* _iface_;
	_iface_ = PORTAL_GLOBAL_SHORTCUTS_GET_INTERFACE (self);
	if (_iface_->create_session) {
		_iface_->create_session (self, options, _callback_, _user_data_);
	}
}

char*
portal_global_shortcuts_create_session_finish (PortalGlobalShortcuts* self,
                                               GAsyncResult* _res_,
                                               GError** error)
{
	PortalGlobalShortcutsIface* _iface_;
	_iface_ = PORTAL_GLOBAL_SHORTCUTS_GET_INTERFACE (self);
	if (_iface_->create_session_finish) {
		return _iface_->create_session_finish (self, _res_, error);
	}
	return NULL;
}

void
portal_global_shortcuts_bind_shortcuts (PortalGlobalShortcuts* self,
                                        const char* session_handle,
                                        PortalShortcut* shortcuts,
                                        gint shortcuts_length1,
                                        const gchar* parent_window,
                                        GHashTable* options,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	PortalGlobalShortcutsIface* _iface_;
	_iface_ = PORTAL_GLOBAL_SHORTCUTS_GET_INTERFACE (self);
	if (_iface_->bind_shortcuts) {
		_iface_->bind_shortcuts (self, session_handle, shortcuts, shortcuts_length1, parent_window, options, _callback_, _user_data_);
	}
}

char*
portal_global_shortcuts_bind_shortcuts_finish (PortalGlobalShortcuts* self,
                                               GAsyncResult* _res_,
                                               GError** error)
{
	PortalGlobalShortcutsIface* _iface_;
	_iface_ = PORTAL_GLOBAL_SHORTCUTS_GET_INTERFACE (self);
	if (_iface_->bind_shortcuts_finish) {
		return _iface_->bind_shortcuts_finish (self, _res_, error);
	}
	return NULL;
}

void
portal_global_shortcuts_list_shortcuts (PortalGlobalShortcuts* self,
                                        const char* session_handle,
                                        GHashTable* options,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	PortalGlobalShortcutsIface* _iface_;
	_iface_ = PORTAL_GLOBAL_SHORTCUTS_GET_INTERFACE (self);
	if (_iface_->list_shortcuts) {
		_iface_->list_shortcuts (self, session_handle, options, _callback_, _user_data_);
	}
}

char*
portal_global_shortcuts_list_shortcuts_finish (PortalGlobalShortcuts* self,
                                               GAsyncResult* _res_,
                                               GError** error)
{
	PortalGlobalShortcutsIface* _iface_;
	_iface_ = PORTAL_GLOBAL_SHORTCUTS_GET_INTERFACE (self);
	if (_iface_->list_shortcuts_finish) {
		return _iface_->list_shortcuts_finish (self, _res_, error);
	}
	return NULL;
}

void
portal_global_shortcuts_configure_shortcuts (PortalGlobalShortcuts* self,
                                             const char* session_handle,
                                             const gchar* parent_window,
                                             GHashTable* options,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_)
{
	PortalGlobalShortcutsIface* _iface_;
	_iface_ = PORTAL_GLOBAL_SHORTCUTS_GET_INTERFACE (self);
	if (_iface_->configure_shortcuts) {
		_iface_->configure_shortcuts (self, session_handle, parent_window, options, _callback_, _user_data_);
	}
}

void
portal_global_shortcuts_configure_shortcuts_finish (PortalGlobalShortcuts* self,
                                                    GAsyncResult* _res_,
                                                    GError** error)
{
	PortalGlobalShortcutsIface* _iface_;
	_iface_ = PORTAL_GLOBAL_SHORTCUTS_GET_INTERFACE (self);
	if (_iface_->configure_shortcuts_finish) {
		_iface_->configure_shortcuts_finish (self, _res_, error);
	}
}

guint32
portal_global_shortcuts_get_version (PortalGlobalShortcuts* self)
{
	PortalGlobalShortcutsIface* _iface_;
	g_return_val_if_fail (self != NULL, 0U);
	_iface_ = PORTAL_GLOBAL_SHORTCUTS_GET_INTERFACE (self);
	if (_iface_->get_version) {
		return _iface_->get_version (self);
	}
	return 0U;
}

static void
g_cclosure_user_marshal_VOID__STRING_STRING_UINT64_BOXED (GClosure * closure,
                                                          GValue * return_value,
                                                          guint n_param_values,
                                                          const GValue * param_values,
                                                          gpointer invocation_hint,
                                                          gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__STRING_STRING_UINT64_BOXED) (gpointer data1, const char* arg_1, const char* arg_2, guint64 arg_3, gpointer arg_4, gpointer data2);
	register GMarshalFunc_VOID__STRING_STRING_UINT64_BOXED callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 5);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__STRING_STRING_UINT64_BOXED) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), g_value_get_uint64 (param_values + 3), g_value_get_boxed (param_values + 4), data2);
}

static void
g_cclosure_user_marshal_VOID__STRING_POINTER_INT (GClosure * closure,
                                                  GValue * return_value,
                                                  guint n_param_values,
                                                  const GValue * param_values,
                                                  gpointer invocation_hint,
                                                  gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__STRING_POINTER_INT) (gpointer data1, const char* arg_1, gpointer arg_2, gint arg_3, gpointer data2);
	register GMarshalFunc_VOID__STRING_POINTER_INT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 4);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__STRING_POINTER_INT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_pointer (param_values + 2), g_value_get_int (param_values + 3), data2);
}

static void
portal_global_shortcuts_default_init (PortalGlobalShortcutsIface * iface,
                                      gpointer iface_data)
{
	portal_global_shortcuts_signals[PORTAL_GLOBAL_SHORTCUTS_ACTIVATED_SIGNAL] = g_signal_new ("activated", PORTAL_TYPE_GLOBAL_SHORTCUTS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_UINT64_BOXED, G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT64, G_TYPE_HASH_TABLE);
	portal_global_shortcuts_signals[PORTAL_GLOBAL_SHORTCUTS_DEACTIVATED_SIGNAL] = g_signal_new ("deactivated", PORTAL_TYPE_GLOBAL_SHORTCUTS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_UINT64_BOXED, G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT64, G_TYPE_HASH_TABLE);
	portal_global_shortcuts_signals[PORTAL_GLOBAL_SHORTCUTS_SHORTCUTS_CHANGED_SIGNAL] = g_signal_new ("shortcuts-changed", PORTAL_TYPE_GLOBAL_SHORTCUTS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_POINTER_INT, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_INT);
}

GType
portal_global_shortcuts_get_type (void)
{
	return portal_global_shortcuts_type_id;
}

GType
portal_global_shortcuts_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (PortalGlobalShortcutsIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) portal_global_shortcuts_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	portal_global_shortcuts_type_id = g_type_module_register_type (module, G_TYPE_INTERFACE, "PortalGlobalShortcuts", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (portal_global_shortcuts_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (portal_global_shortcuts_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) portal_global_shortcuts_proxy_get_type);
	g_type_set_qdata (portal_global_shortcuts_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.portal.GlobalShortcuts");
	g_type_set_qdata (portal_global_shortcuts_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_portal_global_shortcuts_dbus_interface_info));
	g_type_set_qdata (portal_global_shortcuts_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) portal_global_shortcuts_register_object);
	return portal_global_shortcuts_type_id;
}

G_DEFINE_DYNAMIC_TYPE_EXTENDED (PortalGlobalShortcutsProxy, portal_global_shortcuts_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE_DYNAMIC (PORTAL_TYPE_GLOBAL_SHORTCUTS, portal_global_shortcuts_proxy_portal_global_shortcuts_interface_init) )
static void
portal_global_shortcuts_proxy_class_init (PortalGlobalShortcutsProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = portal_global_shortcuts_proxy_g_signal;
}

static void
_dbus_handle_portal_global_shortcuts_activated (PortalGlobalShortcuts* self,
                                                GVariant* parameters)
{
	GVariantIter _arguments_iter;
	char* session_handle = NULL;
	GVariant* _tmp22_;
	gchar* shortcut_id = NULL;
	GVariant* _tmp23_;
	guint64 timestamp = 0ULL;
	GVariant* _tmp24_;
	GHashTable* options = NULL;
	GVariant* _tmp25_;
	GHashTable* _tmp26_;
	GVariantIter _tmp27_;
	GVariant* _tmp28_;
	GVariant* _tmp29_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp22_ = g_variant_iter_next_value (&_arguments_iter);
	session_handle = g_variant_dup_string (_tmp22_, NULL);
	g_variant_unref (_tmp22_);
	_tmp23_ = g_variant_iter_next_value (&_arguments_iter);
	shortcut_id = g_variant_dup_string (_tmp23_, NULL);
	g_variant_unref (_tmp23_);
	_tmp24_ = g_variant_iter_next_value (&_arguments_iter);
	timestamp = g_variant_get_uint64 (_tmp24_);
	g_variant_unref (_tmp24_);
	_tmp25_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp26_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp27_, _tmp25_);
	while (g_variant_iter_loop (&_tmp27_, "{?*}", &_tmp28_, &_tmp29_)) {
		g_hash_table_insert (_tmp26_, g_variant_dup_string (_tmp28_, NULL), g_variant_get_variant (_tmp29_));
	}
	options = _tmp26_;
	g_variant_unref (_tmp25_);
	g_signal_emit_by_name (self, "activated", session_handle, shortcut_id, timestamp, options);
	_g_free0 (session_handle);
	_g_free0 (shortcut_id);
	_g_hash_table_unref0 (options);
}

static void
_dbus_handle_portal_global_shortcuts_deactivated (PortalGlobalShortcuts* self,
                                                  GVariant* parameters)
{
	GVariantIter _arguments_iter;
	char* session_handle = NULL;
	GVariant* _tmp30_;
	gchar* shortcut_id = NULL;
	GVariant* _tmp31_;
	guint64 timestamp = 0ULL;
	GVariant* _tmp32_;
	GHashTable* options = NULL;
	GVariant* _tmp33_;
	GHashTable* _tmp34_;
	GVariantIter _tmp35_;
	GVariant* _tmp36_;
	GVariant* _tmp37_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp30_ = g_variant_iter_next_value (&_arguments_iter);
	session_handle = g_variant_dup_string (_tmp30_, NULL);
	g_variant_unref (_tmp30_);
	_tmp31_ = g_variant_iter_next_value (&_arguments_iter);
	shortcut_id = g_variant_dup_string (_tmp31_, NULL);
	g_variant_unref (_tmp31_);
	_tmp32_ = g_variant_iter_next_value (&_arguments_iter);
	timestamp = g_variant_get_uint64 (_tmp32_);
	g_variant_unref (_tmp32_);
	_tmp33_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp34_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp35_, _tmp33_);
	while (g_variant_iter_loop (&_tmp35_, "{?*}", &_tmp36_, &_tmp37_)) {
		g_hash_table_insert (_tmp34_, g_variant_dup_string (_tmp36_, NULL), g_variant_get_variant (_tmp37_));
	}
	options = _tmp34_;
	g_variant_unref (_tmp33_);
	g_signal_emit_by_name (self, "deactivated", session_handle, shortcut_id, timestamp, options);
	_g_free0 (session_handle);
	_g_free0 (shortcut_id);
	_g_hash_table_unref0 (options);
}

static void
_vala_PortalShortcut_array_free (PortalShortcut * array,
                                 gssize array_length)
{
	if (array != NULL) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			portal_shortcut_destroy (&array[i]);
		}
	}
	g_free (array);
}

static void
_dbus_handle_portal_global_shortcuts_shortcuts_changed (PortalGlobalShortcuts* self,
                                                        GVariant* parameters)
{
	GVariantIter _arguments_iter;
	char* session_handle = NULL;
	GVariant* _tmp38_;
	PortalShortcut* shortcuts = NULL;
	gint shortcuts_length1;
	GVariant* _tmp39_;
	PortalShortcut* _tmp40_;
	gint _tmp40__length;
	gint _tmp40__size;
	gint _tmp40__length1;
	GVariantIter _tmp41_;
	GVariant* _tmp42_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp38_ = g_variant_iter_next_value (&_arguments_iter);
	session_handle = g_variant_dup_string (_tmp38_, NULL);
	g_variant_unref (_tmp38_);
	shortcuts_length1 = 0;
	_tmp39_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp40_ = g_new (PortalShortcut, 5);
	_tmp40__length = 0;
	_tmp40__size = 4;
	_tmp40__length1 = 0;
	g_variant_iter_init (&_tmp41_, _tmp39_);
	for (; (_tmp42_ = g_variant_iter_next_value (&_tmp41_)) != NULL; _tmp40__length1++) {
		PortalShortcut _tmp43_;
		GVariantIter _tmp44_;
		GVariant* _tmp45_;
		GVariant* _tmp46_;
		GHashTable* _tmp47_;
		GVariantIter _tmp48_;
		GVariant* _tmp49_;
		GVariant* _tmp50_;
		if (_tmp40__size == _tmp40__length) {
			_tmp40__size = 2 * _tmp40__size;
			_tmp40_ = g_renew (PortalShortcut, _tmp40_, _tmp40__size + 1);
		}
		g_variant_iter_init (&_tmp44_, _tmp42_);
		_tmp45_ = g_variant_iter_next_value (&_tmp44_);
		_tmp43_.id = g_variant_dup_string (_tmp45_, NULL);
		g_variant_unref (_tmp45_);
		_tmp46_ = g_variant_iter_next_value (&_tmp44_);
		_tmp47_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
		g_variant_iter_init (&_tmp48_, _tmp46_);
		while (g_variant_iter_loop (&_tmp48_, "{?*}", &_tmp49_, &_tmp50_)) {
			g_hash_table_insert (_tmp47_, g_variant_dup_string (_tmp49_, NULL), g_variant_get_variant (_tmp50_));
		}
		_tmp43_.properties = _tmp47_;
		g_variant_unref (_tmp46_);
		_tmp40_[_tmp40__length++] = _tmp43_;
		g_variant_unref (_tmp42_);
	}
	shortcuts_length1 = _tmp40__length1;
	shortcuts = _tmp40_;
	g_variant_unref (_tmp39_);
	g_signal_emit_by_name (self, "shortcuts-changed", session_handle, shortcuts, shortcuts_length1);
	_g_free0 (session_handle);
	shortcuts = (_vala_PortalShortcut_array_free (shortcuts, shortcuts_length1), NULL);
}

static void
portal_global_shortcuts_proxy_g_signal (GDBusProxy* proxy,
                                        const gchar* sender_name,
                                        const gchar* signal_name,
                                        GVariant* parameters)
{
	if (strcmp (signal_name, "Activated") == 0) {
		_dbus_handle_portal_global_shortcuts_activated ((PortalGlobalShortcuts*) proxy, parameters);
	} else if (strcmp (signal_name, "Deactivated") == 0) {
		_dbus_handle_portal_global_shortcuts_deactivated ((PortalGlobalShortcuts*) proxy, parameters);
	} else if (strcmp (signal_name, "ShortcutsChanged") == 0) {
		_dbus_handle_portal_global_shortcuts_shortcuts_changed ((PortalGlobalShortcuts*) proxy, parameters);
	}
}

static void
portal_global_shortcuts_proxy_class_finalize (PortalGlobalShortcutsProxyClass* klass)
{
}

void
portal_global_shortcuts_proxy_register_dynamic_type (GTypeModule* module)
{
	portal_global_shortcuts_proxy_register_type (module);
}

static void
portal_global_shortcuts_proxy_init (PortalGlobalShortcutsProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_portal_global_shortcuts_dbus_interface_info));
}

static void
portal_global_shortcuts_proxy_create_session_async (PortalGlobalShortcuts* self,
                                                    GHashTable* options,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GVariantBuilder _tmp51_;
	GHashTableIter _tmp52_;
	gpointer _tmp53_;
	gpointer _tmp54_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.portal.GlobalShortcuts", "CreateSession");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_hash_table_iter_init (&_tmp52_, options);
	g_variant_builder_init (&_tmp51_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp52_, &_tmp53_, &_tmp54_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp53_;
		_value = (GVariant*) _tmp54_;
		g_variant_builder_add (&_tmp51_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp51_));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static char*
portal_global_shortcuts_proxy_create_session_finish (PortalGlobalShortcuts* self,
                                                     GAsyncResult* _res_,
                                                     GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	char* _result = NULL;
	GVariant* _tmp55_;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		return NULL;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return NULL;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp55_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_dup_string (_tmp55_, NULL);
	g_variant_unref (_tmp55_);
	g_object_unref (_reply_message);
	return _result;
}

static void
portal_global_shortcuts_proxy_bind_shortcuts_async (PortalGlobalShortcuts* self,
                                                    const char* session_handle,
                                                    PortalShortcut* shortcuts,
                                                    gint shortcuts_length1,
                                                    const gchar* parent_window,
                                                    GHashTable* options,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	PortalShortcut* _tmp56_;
	GVariantBuilder _tmp57_;
	gint _tmp58_;
	GVariantBuilder _tmp64_;
	GHashTableIter _tmp65_;
	gpointer _tmp66_;
	gpointer _tmp67_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.portal.GlobalShortcuts", "BindShortcuts");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_object_path (session_handle));
	_tmp56_ = shortcuts;
	g_variant_builder_init (&_tmp57_, G_VARIANT_TYPE ("a(sa{sv})"));
	for (_tmp58_ = 0; _tmp58_ < shortcuts_length1; _tmp58_++) {
		GVariantBuilder _tmp59_;
		GVariantBuilder _tmp60_;
		GHashTableIter _tmp61_;
		gpointer _tmp62_;
		gpointer _tmp63_;
		g_variant_builder_init (&_tmp59_, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_tmp59_, g_variant_new_string ((*_tmp56_).id));
		g_hash_table_iter_init (&_tmp61_, (*_tmp56_).properties);
		g_variant_builder_init (&_tmp60_, G_VARIANT_TYPE ("a{sv}"));
		while (g_hash_table_iter_next (&_tmp61_, &_tmp62_, &_tmp63_)) {
			gchar* _key;
			GVariant* _value;
			_key = (gchar*) _tmp62_;
			_value = (GVariant*) _tmp63_;
			g_variant_builder_add (&_tmp60_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
		}
		g_variant_builder_add_value (&_tmp59_, g_variant_builder_end (&_tmp60_));
		g_variant_builder_add_value (&_tmp57_, g_variant_builder_end (&_tmp59_));
		_tmp56_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp57_));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (parent_window));
	g_hash_table_iter_init (&_tmp65_, options);
	g_variant_builder_init (&_tmp64_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp65_, &_tmp66_, &_tmp67_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp66_;
		_value = (GVariant*) _tmp67_;
		g_variant_builder_add (&_tmp64_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp64_));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static char*
portal_global_shortcuts_proxy_bind_shortcuts_finish (PortalGlobalShortcuts* self,
                                                     GAsyncResult* _res_,
                                                     GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	char* _result = NULL;
	GVariant* _tmp68_;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		return NULL;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return NULL;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp68_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_dup_string (_tmp68_, NULL);
	g_variant_unref (_tmp68_);
	g_object_unref (_reply_message);
	return _result;
}

static void
portal_global_shortcuts_proxy_list_shortcuts_async (PortalGlobalShortcuts* self,
                                                    const char* session_handle,
                                                    GHashTable* options,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GVariantBuilder _tmp69_;
	GHashTableIter _tmp70_;
	gpointer _tmp71_;
	gpointer _tmp72_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.portal.GlobalShortcuts", "ListShortcuts");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_object_path (session_handle));
	g_hash_table_iter_init (&_tmp70_, options);
	g_variant_builder_init (&_tmp69_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp70_, &_tmp71_, &_tmp72_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp71_;
		_value = (GVariant*) _tmp72_;
		g_variant_builder_add (&_tmp69_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp69_));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static char*
portal_global_shortcuts_proxy_list_shortcuts_finish (PortalGlobalShortcuts* self,
                                                     GAsyncResult* _res_,
                                                     GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	char* _result = NULL;
	GVariant* _tmp73_;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		return NULL;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return NULL;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp73_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_dup_string (_tmp73_, NULL);
	g_variant_unref (_tmp73_);
	g_object_unref (_reply_message);
	return _result;
}

static void
portal_global_shortcuts_proxy_configure_shortcuts_async (PortalGlobalShortcuts* self,
                                                         const char* session_handle,
                                                         const gchar* parent_window,
                                                         GHashTable* options,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GVariantBuilder _tmp74_;
	GHashTableIter _tmp75_;
	gpointer _tmp76_;
	gpointer _tmp77_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.portal.GlobalShortcuts", "ConfigureShortcuts");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_object_path (session_handle));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (parent_window));
	g_hash_table_iter_init (&_tmp75_, options);
	g_variant_builder_init (&_tmp74_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp75_, &_tmp76_, &_tmp77_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp76_;
		_value = (GVariant*) _tmp77_;
		g_variant_builder_add (&_tmp74_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp74_));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static void
portal_global_shortcuts_proxy_configure_shortcuts_finish (PortalGlobalShortcuts* self,
                                                          GAsyncResult* _res_,
                                                          GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static guint32
portal_global_shortcuts_dbus_proxy_get_version (PortalGlobalShortcuts* self)
{
	GVariant *_inner_reply;
	guint32 _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Version");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.freedesktop.portal.GlobalShortcuts"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Version"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			guint32 _tmp78_ = 0U;
			return _tmp78_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_uint32 (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static void
portal_global_shortcuts_proxy_portal_global_shortcuts_interface_init (PortalGlobalShortcutsIface* iface)
{
	iface->create_session = portal_global_shortcuts_proxy_create_session_async;
	iface->create_session_finish = portal_global_shortcuts_proxy_create_session_finish;
	iface->bind_shortcuts = portal_global_shortcuts_proxy_bind_shortcuts_async;
	iface->bind_shortcuts_finish = portal_global_shortcuts_proxy_bind_shortcuts_finish;
	iface->list_shortcuts = portal_global_shortcuts_proxy_list_shortcuts_async;
	iface->list_shortcuts_finish = portal_global_shortcuts_proxy_list_shortcuts_finish;
	iface->configure_shortcuts = portal_global_shortcuts_proxy_configure_shortcuts_async;
	iface->configure_shortcuts_finish = portal_global_shortcuts_proxy_configure_shortcuts_finish;
	iface->get_version = portal_global_shortcuts_dbus_proxy_get_version;
}

static void
_dbus_portal_global_shortcuts_create_session (PortalGlobalShortcuts* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	PortalGlobalShortcutsCreateSessionReadyData* _ready_data;
	GVariant* _tmp79_;
	GHashTable* _tmp80_;
	GVariantIter _tmp81_;
	GVariant* _tmp82_;
	GVariant* _tmp83_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (PortalGlobalShortcutsCreateSessionReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp79_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp80_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp81_, _tmp79_);
	while (g_variant_iter_loop (&_tmp81_, "{?*}", &_tmp82_, &_tmp83_)) {
		g_hash_table_insert (_tmp80_, g_variant_dup_string (_tmp82_, NULL), g_variant_get_variant (_tmp83_));
	}
	_ready_data->options = _tmp80_;
	g_variant_unref (_tmp79_);
	portal_global_shortcuts_create_session (self, _ready_data->options, (GAsyncReadyCallback) _dbus_portal_global_shortcuts_create_session_ready, _ready_data);
	_error:
	;
}

static void
_dbus_portal_global_shortcuts_create_session_ready (GObject * source_object,
                                                    GAsyncResult * _res_,
                                                    gpointer _user_data_)
{
	PortalGlobalShortcutsCreateSessionReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	char* result;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	result = portal_global_shortcuts_create_session_finish ((PortalGlobalShortcuts*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_object_path (result));
	_g_free0 (result);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_hash_table_unref0 (_ready_data->options);
	g_slice_free (PortalGlobalShortcutsCreateSessionReadyData, _ready_data);
}

static void
_dbus_portal_global_shortcuts_bind_shortcuts (PortalGlobalShortcuts* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	PortalGlobalShortcutsBindShortcutsReadyData* _ready_data;
	GVariant* _tmp84_;
	GVariant* _tmp85_;
	PortalShortcut* _tmp86_;
	gint _tmp86__length;
	gint _tmp86__size;
	gint _tmp86__length1;
	GVariantIter _tmp87_;
	GVariant* _tmp88_;
	GVariant* _tmp97_;
	GVariant* _tmp98_;
	GHashTable* _tmp99_;
	GVariantIter _tmp100_;
	GVariant* _tmp101_;
	GVariant* _tmp102_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (PortalGlobalShortcutsBindShortcutsReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp84_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->session_handle = g_variant_dup_string (_tmp84_, NULL);
	g_variant_unref (_tmp84_);
	_tmp85_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp86_ = g_new (PortalShortcut, 5);
	_tmp86__length = 0;
	_tmp86__size = 4;
	_tmp86__length1 = 0;
	g_variant_iter_init (&_tmp87_, _tmp85_);
	for (; (_tmp88_ = g_variant_iter_next_value (&_tmp87_)) != NULL; _tmp86__length1++) {
		PortalShortcut _tmp89_;
		GVariantIter _tmp90_;
		GVariant* _tmp91_;
		GVariant* _tmp92_;
		GHashTable* _tmp93_;
		GVariantIter _tmp94_;
		GVariant* _tmp95_;
		GVariant* _tmp96_;
		if (_tmp86__size == _tmp86__length) {
			_tmp86__size = 2 * _tmp86__size;
			_tmp86_ = g_renew (PortalShortcut, _tmp86_, _tmp86__size + 1);
		}
		g_variant_iter_init (&_tmp90_, _tmp88_);
		_tmp91_ = g_variant_iter_next_value (&_tmp90_);
		_tmp89_.id = g_variant_dup_string (_tmp91_, NULL);
		g_variant_unref (_tmp91_);
		_tmp92_ = g_variant_iter_next_value (&_tmp90_);
		_tmp93_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
		g_variant_iter_init (&_tmp94_, _tmp92_);
		while (g_variant_iter_loop (&_tmp94_, "{?*}", &_tmp95_, &_tmp96_)) {
			g_hash_table_insert (_tmp93_, g_variant_dup_string (_tmp95_, NULL), g_variant_get_variant (_tmp96_));
		}
		_tmp89_.properties = _tmp93_;
		g_variant_unref (_tmp92_);
		_tmp86_[_tmp86__length++] = _tmp89_;
		g_variant_unref (_tmp88_);
	}
	_ready_data->shortcuts_length1 = _tmp86__length1;
	_ready_data->shortcuts = _tmp86_;
	g_variant_unref (_tmp85_);
	_tmp97_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->parent_window = g_variant_dup_string (_tmp97_, NULL);
	g_variant_unref (_tmp97_);
	_tmp98_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp99_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp100_, _tmp98_);
	while (g_variant_iter_loop (&_tmp100_, "{?*}", &_tmp101_, &_tmp102_)) {
		g_hash_table_insert (_tmp99_, g_variant_dup_string (_tmp101_, NULL), g_variant_get_variant (_tmp102_));
	}
	_ready_data->options = _tmp99_;
	g_variant_unref (_tmp98_);
	portal_global_shortcuts_bind_shortcuts (self, _ready_data->session_handle, _ready_data->shortcuts, _ready_data->shortcuts_length1, _ready_data->parent_window, _ready_data->options, (GAsyncReadyCallback) _dbus_portal_global_shortcuts_bind_shortcuts_ready, _ready_data);
	_error:
	;
}

static void
_dbus_portal_global_shortcuts_bind_shortcuts_ready (GObject * source_object,
                                                    GAsyncResult * _res_,
                                                    gpointer _user_data_)
{
	PortalGlobalShortcutsBindShortcutsReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	char* result;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	result = portal_global_shortcuts_bind_shortcuts_finish ((PortalGlobalShortcuts*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_object_path (result));
	_g_free0 (result);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (_ready_data->session_handle);
	_ready_data->shortcuts = (_vala_PortalShortcut_array_free (_ready_data->shortcuts, _ready_data->shortcuts_length1), NULL);
	_g_free0 (_ready_data->parent_window);
	_g_hash_table_unref0 (_ready_data->options);
	g_slice_free (PortalGlobalShortcutsBindShortcutsReadyData, _ready_data);
}

static void
_dbus_portal_global_shortcuts_list_shortcuts (PortalGlobalShortcuts* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	PortalGlobalShortcutsListShortcutsReadyData* _ready_data;
	GVariant* _tmp103_;
	GVariant* _tmp104_;
	GHashTable* _tmp105_;
	GVariantIter _tmp106_;
	GVariant* _tmp107_;
	GVariant* _tmp108_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (PortalGlobalShortcutsListShortcutsReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp103_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->session_handle = g_variant_dup_string (_tmp103_, NULL);
	g_variant_unref (_tmp103_);
	_tmp104_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp105_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp106_, _tmp104_);
	while (g_variant_iter_loop (&_tmp106_, "{?*}", &_tmp107_, &_tmp108_)) {
		g_hash_table_insert (_tmp105_, g_variant_dup_string (_tmp107_, NULL), g_variant_get_variant (_tmp108_));
	}
	_ready_data->options = _tmp105_;
	g_variant_unref (_tmp104_);
	portal_global_shortcuts_list_shortcuts (self, _ready_data->session_handle, _ready_data->options, (GAsyncReadyCallback) _dbus_portal_global_shortcuts_list_shortcuts_ready, _ready_data);
	_error:
	;
}

static void
_dbus_portal_global_shortcuts_list_shortcuts_ready (GObject * source_object,
                                                    GAsyncResult * _res_,
                                                    gpointer _user_data_)
{
	PortalGlobalShortcutsListShortcutsReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	char* result;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	result = portal_global_shortcuts_list_shortcuts_finish ((PortalGlobalShortcuts*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_object_path (result));
	_g_free0 (result);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (_ready_data->session_handle);
	_g_hash_table_unref0 (_ready_data->options);
	g_slice_free (PortalGlobalShortcutsListShortcutsReadyData, _ready_data);
}

static void
_dbus_portal_global_shortcuts_configure_shortcuts (PortalGlobalShortcuts* self,
                                                   GVariant* _parameters_,
                                                   GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	PortalGlobalShortcutsConfigureShortcutsReadyData* _ready_data;
	GVariant* _tmp109_;
	GVariant* _tmp110_;
	GVariant* _tmp111_;
	GHashTable* _tmp112_;
	GVariantIter _tmp113_;
	GVariant* _tmp114_;
	GVariant* _tmp115_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (PortalGlobalShortcutsConfigureShortcutsReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp109_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->session_handle = g_variant_dup_string (_tmp109_, NULL);
	g_variant_unref (_tmp109_);
	_tmp110_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->parent_window = g_variant_dup_string (_tmp110_, NULL);
	g_variant_unref (_tmp110_);
	_tmp111_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp112_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp113_, _tmp111_);
	while (g_variant_iter_loop (&_tmp113_, "{?*}", &_tmp114_, &_tmp115_)) {
		g_hash_table_insert (_tmp112_, g_variant_dup_string (_tmp114_, NULL), g_variant_get_variant (_tmp115_));
	}
	_ready_data->options = _tmp112_;
	g_variant_unref (_tmp111_);
	portal_global_shortcuts_configure_shortcuts (self, _ready_data->session_handle, _ready_data->parent_window, _ready_data->options, (GAsyncReadyCallback) _dbus_portal_global_shortcuts_configure_shortcuts_ready, _ready_data);
	_error:
	;
}

static void
_dbus_portal_global_shortcuts_configure_shortcuts_ready (GObject * source_object,
                                                         GAsyncResult * _res_,
                                                         gpointer _user_data_)
{
	PortalGlobalShortcutsConfigureShortcutsReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	portal_global_shortcuts_configure_shortcuts_finish ((PortalGlobalShortcuts*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (_ready_data->session_handle);
	_g_free0 (_ready_data->parent_window);
	_g_hash_table_unref0 (_ready_data->options);
	g_slice_free (PortalGlobalShortcutsConfigureShortcutsReadyData, _ready_data);
}

static void
portal_global_shortcuts_dbus_interface_method_call (GDBusConnection* connection,
                                                    const gchar* sender,
                                                    const gchar* object_path,
                                                    const gchar* interface_name,
                                                    const gchar* method_name,
                                                    GVariant* parameters,
                                                    GDBusMethodInvocation* invocation,
                                                    gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "CreateSession") == 0) {
		_dbus_portal_global_shortcuts_create_session (object, parameters, invocation);
	} else if (strcmp (method_name, "BindShortcuts") == 0) {
		_dbus_portal_global_shortcuts_bind_shortcuts (object, parameters, invocation);
	} else if (strcmp (method_name, "ListShortcuts") == 0) {
		_dbus_portal_global_shortcuts_list_shortcuts (object, parameters, invocation);
	} else if (strcmp (method_name, "ConfigureShortcuts") == 0) {
		_dbus_portal_global_shortcuts_configure_shortcuts (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
_dbus_portal_global_shortcuts_get_version (PortalGlobalShortcuts* self)
{
	guint32 result;
	GVariant* _reply;
	result = portal_global_shortcuts_get_version (self);
	_reply = g_variant_new_uint32 (result);
	return _reply;
}

static GVariant*
portal_global_shortcuts_dbus_interface_get_property (GDBusConnection* connection,
                                                     const gchar* sender,
                                                     const gchar* object_path,
                                                     const gchar* interface_name,
                                                     const gchar* property_name,
                                                     GError** error,
                                                     gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (property_name, "Version") == 0) {
		return _dbus_portal_global_shortcuts_get_version (object);
	}
	return NULL;
}

static gboolean
portal_global_shortcuts_dbus_interface_set_property (GDBusConnection* connection,
                                                     const gchar* sender,
                                                     const gchar* object_path,
                                                     const gchar* interface_name,
                                                     const gchar* property_name,
                                                     GVariant* value,
                                                     GError** error,
                                                     gpointer user_data)
{
	return FALSE;
}

static void
_dbus_portal_global_shortcuts_activated (GObject* _sender,
                                         const char* session_handle,
                                         const gchar* shortcut_id,
                                         guint64 timestamp,
                                         GHashTable* options,
                                         gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GVariantBuilder _tmp116_;
	GHashTableIter _tmp117_;
	gpointer _tmp118_;
	gpointer _tmp119_;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_object_path (session_handle));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (shortcut_id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint64 (timestamp));
	g_hash_table_iter_init (&_tmp117_, options);
	g_variant_builder_init (&_tmp116_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp117_, &_tmp118_, &_tmp119_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp118_;
		_value = (GVariant*) _tmp119_;
		g_variant_builder_add (&_tmp116_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp116_));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.portal.GlobalShortcuts", "Activated", _arguments, NULL);
}

static void
_dbus_portal_global_shortcuts_deactivated (GObject* _sender,
                                           const char* session_handle,
                                           const gchar* shortcut_id,
                                           guint64 timestamp,
                                           GHashTable* options,
                                           gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GVariantBuilder _tmp120_;
	GHashTableIter _tmp121_;
	gpointer _tmp122_;
	gpointer _tmp123_;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_object_path (session_handle));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (shortcut_id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint64 (timestamp));
	g_hash_table_iter_init (&_tmp121_, options);
	g_variant_builder_init (&_tmp120_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp121_, &_tmp122_, &_tmp123_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp122_;
		_value = (GVariant*) _tmp123_;
		g_variant_builder_add (&_tmp120_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp120_));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.portal.GlobalShortcuts", "Deactivated", _arguments, NULL);
}

static void
_dbus_portal_global_shortcuts_shortcuts_changed (GObject* _sender,
                                                 const char* session_handle,
                                                 PortalShortcut* shortcuts,
                                                 gint shortcuts_length1,
                                                 gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	PortalShortcut* _tmp124_;
	GVariantBuilder _tmp125_;
	gint _tmp126_;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_object_path (session_handle));
	_tmp124_ = shortcuts;
	g_variant_builder_init (&_tmp125_, G_VARIANT_TYPE ("a(sa{sv})"));
	for (_tmp126_ = 0; _tmp126_ < shortcuts_length1; _tmp126_++) {
		GVariantBuilder _tmp127_;
		GVariantBuilder _tmp128_;
		GHashTableIter _tmp129_;
		gpointer _tmp130_;
		gpointer _tmp131_;
		g_variant_builder_init (&_tmp127_, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_tmp127_, g_variant_new_string ((*_tmp124_).id));
		g_hash_table_iter_init (&_tmp129_, (*_tmp124_).properties);
		g_variant_builder_init (&_tmp128_, G_VARIANT_TYPE ("a{sv}"));
		while (g_hash_table_iter_next (&_tmp129_, &_tmp130_, &_tmp131_)) {
			gchar* _key;
			GVariant* _value;
			_key = (gchar*) _tmp130_;
			_value = (GVariant*) _tmp131_;
			g_variant_builder_add (&_tmp128_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
		}
		g_variant_builder_add_value (&_tmp127_, g_variant_builder_end (&_tmp128_));
		g_variant_builder_add_value (&_tmp125_, g_variant_builder_end (&_tmp127_));
		_tmp124_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp125_));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.portal.GlobalShortcuts", "ShortcutsChanged", _arguments, NULL);
}

guint
portal_global_shortcuts_register_object (gpointer object,
                                         GDBusConnection* connection,
                                         const gchar* path,
                                         GError** error)
{
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_portal_global_shortcuts_dbus_interface_info), &_portal_global_shortcuts_dbus_interface_vtable, data, _portal_global_shortcuts_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "activated", (GCallback) _dbus_portal_global_shortcuts_activated, data);
	g_signal_connect (object, "deactivated", (GCallback) _dbus_portal_global_shortcuts_deactivated, data);
	g_signal_connect (object, "shortcuts-changed", (GCallback) _dbus_portal_global_shortcuts_shortcuts_changed, data);
	return result;
}

static void
_portal_global_shortcuts_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_portal_global_shortcuts_activated, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_portal_global_shortcuts_deactivated, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_portal_global_shortcuts_shortcuts_changed, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

