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

/*
 * Copyright (c) 2025-2026 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))
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;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
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;
enum  {
	PORTAL_NOTIFICATION_ACTION_INVOKED_SIGNAL,
	PORTAL_NOTIFICATION_NUM_SIGNALS
};
static guint portal_notification_signals[PORTAL_NOTIFICATION_NUM_SIGNALS] = {0};
typedef GDBusProxy PortalNotificationProxy;
typedef GDBusProxyClass PortalNotificationProxyClass;
typedef struct _PortalNotificationAddNotificationReadyData PortalNotificationAddNotificationReadyData;
typedef struct _PortalNotificationRemoveNotificationReadyData PortalNotificationRemoveNotificationReadyData;
#define _g_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))
#define _g_dbus_interface_info_unref0(var) ((var == NULL) ? NULL : (var = (g_dbus_interface_info_unref (var), NULL)))
#define _g_dbus_node_info_unref0(var) ((var == NULL) ? NULL : (var = (g_dbus_node_info_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

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

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

struct _PortalGlobalShortcutsBindShortcutsReadyData {
	GDBusMethodInvocation* _invocation_;
	char* session_handle;
	GVariant* shortcuts;
	gchar* parent_window;
	GVariant* options;
};

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

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

struct _PortalNotificationAddNotificationReadyData {
	GDBusMethodInvocation* _invocation_;
	gchar* id;
	GVariant* notification;
};

struct _PortalNotificationRemoveNotificationReadyData {
	GDBusMethodInvocation* _invocation_;
	gchar* id;
};

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

static void g_cclosure_user_marshal_VOID__UINT_VARIANT (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,
                                    GVariant* 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,
                                                       GVariant* 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_VARIANT (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_VARIANT (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 _dbus_handle_portal_global_shortcuts_shortcuts_changed (PortalGlobalShortcuts* self,
                                                             GVariant* parameters);
static void portal_global_shortcuts_proxy_create_session_async (PortalGlobalShortcuts* self,
                                                         GVariant* 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,
                                                         GVariant* shortcuts,
                                                         const gchar* parent_window,
                                                         GVariant* 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,
                                                         GVariant* 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,
                                                              GVariant* 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,
                                              GVariant* options,
                                              gpointer* _data);
static void _dbus_portal_global_shortcuts_deactivated (GObject* _sender,
                                                const char* session_handle,
                                                const gchar* shortcut_id,
                                                guint64 timestamp,
                                                GVariant* options,
                                                gpointer* _data);
static void _dbus_portal_global_shortcuts_shortcuts_changed (GObject* _sender,
                                                      const char* session_handle,
                                                      GVariant* shortcuts,
                                                      gpointer* _data);
static void _portal_global_shortcuts_unregister_object (gpointer user_data);
static void g_cclosure_user_marshal_VOID__STRING_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_notification_proxy_g_signal (GDBusProxy* proxy,
                                         const gchar* sender_name,
                                         const gchar* signal_name,
                                         GVariant* parameters);
static void _dbus_handle_portal_notification_action_invoked (PortalNotification* self,
                                                      GVariant* parameters);
static void portal_notification_proxy_add_notification_async (PortalNotification* self,
                                                       const gchar* id,
                                                       GVariant* notification,
                                                       GCancellable* cancellable,
                                                       GAsyncReadyCallback _callback_,
                                                       gpointer _user_data_);
static void portal_notification_proxy_add_notification_finish (PortalNotification* self,
                                                        GAsyncResult* _res_,
                                                        GError** error);
static void portal_notification_proxy_remove_notification_async (PortalNotification* self,
                                                          const gchar* id,
                                                          GAsyncReadyCallback _callback_,
                                                          gpointer _user_data_);
static void portal_notification_proxy_remove_notification_finish (PortalNotification* self,
                                                           GAsyncResult* _res_,
                                                           GError** error);
static guint32 portal_notification_dbus_proxy_get_version (PortalNotification* self);
static GVariant* portal_notification_dbus_proxy_get_supported_options (PortalNotification* self);
static void portal_notification_proxy_portal_notification_interface_init (PortalNotificationIface* iface);
static void _dbus_portal_notification_add_notification (PortalNotification* self,
                                                 GVariant* _parameters_,
                                                 GDBusMethodInvocation* invocation);
static void _dbus_portal_notification_add_notification_ready (GObject * source_object,
                                                       GAsyncResult * _res_,
                                                       gpointer _user_data_);
static void _dbus_portal_notification_remove_notification (PortalNotification* self,
                                                    GVariant* _parameters_,
                                                    GDBusMethodInvocation* invocation);
static void _dbus_portal_notification_remove_notification_ready (GObject * source_object,
                                                          GAsyncResult * _res_,
                                                          gpointer _user_data_);
static void portal_notification_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_notification_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_notification_get_version (PortalNotification* self);
static GVariant* _dbus_portal_notification_get_supported_options (PortalNotification* self);
static gboolean portal_notification_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_notification_action_invoked (GObject* _sender,
                                               const gchar* id,
                                               const gchar* action,
                                               GVariant** parameter,
                                               gint parameter_length1,
                                               gpointer* _data);
static void _portal_notification_unregister_object (gpointer user_data);
VALA_EXTERN gboolean portal_has_dbus_interface (GDBusConnection* connection,
                                    const gchar* bus_name,
                                    const gchar* object_path,
                                    const gchar* interface_name,
                                    gint timeout);
VALA_EXTERN gboolean portal_has_dbus_method (GDBusProxy* proxy,
                                 const gchar* name);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);

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 const GDBusArgInfo _portal_notification_dbus_arg_info_add_notification_id = {-1, "id", "s", NULL};
static const GDBusArgInfo _portal_notification_dbus_arg_info_add_notification_notification = {-1, "notification", "a{sv}", NULL};
static const GDBusArgInfo * const _portal_notification_dbus_arg_info_add_notification_in[] = {&_portal_notification_dbus_arg_info_add_notification_id, &_portal_notification_dbus_arg_info_add_notification_notification, NULL};
static const GDBusArgInfo * const _portal_notification_dbus_arg_info_add_notification_out[] = {NULL};
static const GDBusMethodInfo _portal_notification_dbus_method_info_add_notification = {-1, "AddNotification", (GDBusArgInfo **) (&_portal_notification_dbus_arg_info_add_notification_in), (GDBusArgInfo **) (&_portal_notification_dbus_arg_info_add_notification_out), NULL};
static const GDBusArgInfo _portal_notification_dbus_arg_info_remove_notification_id = {-1, "id", "s", NULL};
static const GDBusArgInfo * const _portal_notification_dbus_arg_info_remove_notification_in[] = {&_portal_notification_dbus_arg_info_remove_notification_id, NULL};
static const GDBusArgInfo * const _portal_notification_dbus_arg_info_remove_notification_out[] = {NULL};
static const GDBusMethodInfo _portal_notification_dbus_method_info_remove_notification = {-1, "RemoveNotification", (GDBusArgInfo **) (&_portal_notification_dbus_arg_info_remove_notification_in), (GDBusArgInfo **) (&_portal_notification_dbus_arg_info_remove_notification_out), NULL};
static const GDBusMethodInfo * const _portal_notification_dbus_method_info[] = {&_portal_notification_dbus_method_info_add_notification, &_portal_notification_dbus_method_info_remove_notification, NULL};
static const GDBusArgInfo _portal_notification_dbus_arg_info_action_invoked_id = {-1, "id", "s", NULL};
static const GDBusArgInfo _portal_notification_dbus_arg_info_action_invoked_action = {-1, "action", "s", NULL};
static const GDBusArgInfo _portal_notification_dbus_arg_info_action_invoked_parameter = {-1, "parameter", "av", NULL};
static const GDBusArgInfo * const _portal_notification_dbus_arg_info_action_invoked[] = {&_portal_notification_dbus_arg_info_action_invoked_id, &_portal_notification_dbus_arg_info_action_invoked_action, &_portal_notification_dbus_arg_info_action_invoked_parameter, NULL};
static const GDBusSignalInfo _portal_notification_dbus_signal_info_action_invoked = {-1, "ActionInvoked", (GDBusArgInfo **) (&_portal_notification_dbus_arg_info_action_invoked), NULL};
static const GDBusSignalInfo * const _portal_notification_dbus_signal_info[] = {&_portal_notification_dbus_signal_info_action_invoked, NULL};
static const GDBusPropertyInfo _portal_notification_dbus_property_info_version = {-1, "version", "u", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _portal_notification_dbus_property_info_supported_options = {-1, "SupportedOptions", "a{sv}", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _portal_notification_dbus_property_info[] = {&_portal_notification_dbus_property_info_version, &_portal_notification_dbus_property_info_supported_options, NULL};
static const GDBusInterfaceInfo _portal_notification_dbus_interface_info = {-1, "org.freedesktop.portal.Notification", (GDBusMethodInfo **) (&_portal_notification_dbus_method_info), (GDBusSignalInfo **) (&_portal_notification_dbus_signal_info), (GDBusPropertyInfo **) (&_portal_notification_dbus_property_info), NULL};
static const GDBusInterfaceVTable _portal_notification_dbus_interface_vtable = {portal_notification_dbus_interface_method_call, portal_notification_dbus_interface_get_property, portal_notification_dbus_interface_set_property};

void
portal_shortcut_copy (const PortalShortcut* self,
                      PortalShortcut* dest)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	_tmp0_ = (*self).id;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 ((*dest).id);
	(*dest).id = _tmp1_;
	_tmp2_ = (*self).description;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 ((*dest).description);
	(*dest).description = _tmp3_;
	_tmp4_ = (*self).preferred_trigger;
	_tmp5_ = g_strdup (_tmp4_);
	_g_free0 ((*dest).preferred_trigger);
	(*dest).preferred_trigger = _tmp5_;
	_tmp6_ = (*self).trigger_description;
	_tmp7_ = g_strdup (_tmp6_);
	_g_free0 ((*dest).trigger_description);
	(*dest).trigger_description = _tmp7_;
}

void
portal_shortcut_destroy (PortalShortcut* self)
{
	_g_free0 ((*self).id);
	_g_free0 ((*self).description);
	_g_free0 ((*self).preferred_trigger);
	_g_free0 ((*self).trigger_description);
}

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_VARIANT (GClosure * closure,
                                            GValue * return_value,
                                            guint n_param_values,
                                            const GValue * param_values,
                                            gpointer invocation_hint,
                                            gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__UINT_VARIANT) (gpointer data1, guint32 arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__UINT_VARIANT 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_VARIANT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_uint (param_values + 1), g_value_get_variant (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_VARIANT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_VARIANT);
}

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_;
	GVariant* results = NULL;
	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_);
	results = g_variant_iter_next_value (&_arguments_iter);
	g_signal_emit_by_name (self, "response", response, results);
	_g_variant_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,
                               GVariant* results,
                               gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_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_variant_builder_add_value (&_arguments_builder, results);
	_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,
                                      GVariant* 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,
                                                  GVariant* options,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	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_variant_builder_add_value (&_arguments_builder, options);
	_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* _tmp1_;
	_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);
	_tmp1_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_dup_string (_tmp1_, NULL);
	g_variant_unref (_tmp1_);
	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 _tmp2_ = 0U;
			return _tmp2_;
		}
		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* _tmp3_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (PortalBackgroundRequestBackgroundReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp3_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->parent_window = g_variant_dup_string (_tmp3_, NULL);
	g_variant_unref (_tmp3_);
	_ready_data->options = g_variant_iter_next_value (&_arguments_iter);
	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_variant_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,
                                        GVariant* 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,
                                        GVariant* shortcuts,
                                        const gchar* parent_window,
                                        GVariant* 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, 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,
                                        GVariant* 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,
                                             GVariant* 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_VARIANT (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_VARIANT) (gpointer data1, const char* arg_1, const char* arg_2, guint64 arg_3, gpointer arg_4, gpointer data2);
	register GMarshalFunc_VOID__STRING_STRING_UINT64_VARIANT 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_VARIANT) (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_variant (param_values + 4), data2);
}

static void
g_cclosure_user_marshal_VOID__STRING_VARIANT (GClosure * closure,
                                              GValue * return_value,
                                              guint n_param_values,
                                              const GValue * param_values,
                                              gpointer invocation_hint,
                                              gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__STRING_VARIANT) (gpointer data1, const char* arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__STRING_VARIANT 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__STRING_VARIANT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_variant (param_values + 2), 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_VARIANT, G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT64, G_TYPE_VARIANT);
	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_VARIANT, G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT64, G_TYPE_VARIANT);
	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_VARIANT, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_VARIANT);
}

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* _tmp4_;
	gchar* shortcut_id = NULL;
	GVariant* _tmp5_;
	guint64 timestamp = 0ULL;
	GVariant* _tmp6_;
	GVariant* options = NULL;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp4_ = g_variant_iter_next_value (&_arguments_iter);
	session_handle = g_variant_dup_string (_tmp4_, NULL);
	g_variant_unref (_tmp4_);
	_tmp5_ = g_variant_iter_next_value (&_arguments_iter);
	shortcut_id = g_variant_dup_string (_tmp5_, NULL);
	g_variant_unref (_tmp5_);
	_tmp6_ = g_variant_iter_next_value (&_arguments_iter);
	timestamp = g_variant_get_uint64 (_tmp6_);
	g_variant_unref (_tmp6_);
	options = g_variant_iter_next_value (&_arguments_iter);
	g_signal_emit_by_name (self, "activated", session_handle, shortcut_id, timestamp, options);
	_g_free0 (session_handle);
	_g_free0 (shortcut_id);
	_g_variant_unref0 (options);
}

static void
_dbus_handle_portal_global_shortcuts_deactivated (PortalGlobalShortcuts* self,
                                                  GVariant* parameters)
{
	GVariantIter _arguments_iter;
	char* session_handle = NULL;
	GVariant* _tmp7_;
	gchar* shortcut_id = NULL;
	GVariant* _tmp8_;
	guint64 timestamp = 0ULL;
	GVariant* _tmp9_;
	GVariant* options = NULL;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp7_ = g_variant_iter_next_value (&_arguments_iter);
	session_handle = g_variant_dup_string (_tmp7_, NULL);
	g_variant_unref (_tmp7_);
	_tmp8_ = g_variant_iter_next_value (&_arguments_iter);
	shortcut_id = g_variant_dup_string (_tmp8_, NULL);
	g_variant_unref (_tmp8_);
	_tmp9_ = g_variant_iter_next_value (&_arguments_iter);
	timestamp = g_variant_get_uint64 (_tmp9_);
	g_variant_unref (_tmp9_);
	options = g_variant_iter_next_value (&_arguments_iter);
	g_signal_emit_by_name (self, "deactivated", session_handle, shortcut_id, timestamp, options);
	_g_free0 (session_handle);
	_g_free0 (shortcut_id);
	_g_variant_unref0 (options);
}

static void
_dbus_handle_portal_global_shortcuts_shortcuts_changed (PortalGlobalShortcuts* self,
                                                        GVariant* parameters)
{
	GVariantIter _arguments_iter;
	char* session_handle = NULL;
	GVariant* _tmp10_;
	GVariant* shortcuts = NULL;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp10_ = g_variant_iter_next_value (&_arguments_iter);
	session_handle = g_variant_dup_string (_tmp10_, NULL);
	g_variant_unref (_tmp10_);
	shortcuts = g_variant_iter_next_value (&_arguments_iter);
	g_signal_emit_by_name (self, "shortcuts-changed", session_handle, shortcuts);
	_g_free0 (session_handle);
	_g_variant_unref0 (shortcuts);
}

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,
                                                    GVariant* options,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	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_variant_builder_add_value (&_arguments_builder, options);
	_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* _tmp11_;
	_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);
	_tmp11_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_dup_string (_tmp11_, NULL);
	g_variant_unref (_tmp11_);
	g_object_unref (_reply_message);
	return _result;
}

static void
portal_global_shortcuts_proxy_bind_shortcuts_async (PortalGlobalShortcuts* self,
                                                    const char* session_handle,
                                                    GVariant* shortcuts,
                                                    const gchar* parent_window,
                                                    GVariant* options,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	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));
	g_variant_builder_add_value (&_arguments_builder, shortcuts);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (parent_window));
	g_variant_builder_add_value (&_arguments_builder, options);
	_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* _tmp12_;
	_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);
	_tmp12_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_dup_string (_tmp12_, NULL);
	g_variant_unref (_tmp12_);
	g_object_unref (_reply_message);
	return _result;
}

static void
portal_global_shortcuts_proxy_list_shortcuts_async (PortalGlobalShortcuts* self,
                                                    const char* session_handle,
                                                    GVariant* options,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	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_variant_builder_add_value (&_arguments_builder, options);
	_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* _tmp13_;
	_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);
	_tmp13_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_dup_string (_tmp13_, NULL);
	g_variant_unref (_tmp13_);
	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,
                                                         GVariant* options,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	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_variant_builder_add_value (&_arguments_builder, options);
	_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 _tmp14_ = 0U;
			return _tmp14_;
		}
		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;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (PortalGlobalShortcutsCreateSessionReadyData);
	_ready_data->_invocation_ = invocation;
	_ready_data->options = g_variant_iter_next_value (&_arguments_iter);
	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_variant_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* _tmp15_;
	GVariant* _tmp16_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (PortalGlobalShortcutsBindShortcutsReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp15_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->session_handle = g_variant_dup_string (_tmp15_, NULL);
	g_variant_unref (_tmp15_);
	_ready_data->shortcuts = g_variant_iter_next_value (&_arguments_iter);
	_tmp16_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->parent_window = g_variant_dup_string (_tmp16_, NULL);
	g_variant_unref (_tmp16_);
	_ready_data->options = g_variant_iter_next_value (&_arguments_iter);
	portal_global_shortcuts_bind_shortcuts (self, _ready_data->session_handle, _ready_data->shortcuts, _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);
	_g_variant_unref0 (_ready_data->shortcuts);
	_g_free0 (_ready_data->parent_window);
	_g_variant_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* _tmp17_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (PortalGlobalShortcutsListShortcutsReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp17_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->session_handle = g_variant_dup_string (_tmp17_, NULL);
	g_variant_unref (_tmp17_);
	_ready_data->options = g_variant_iter_next_value (&_arguments_iter);
	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_variant_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* _tmp18_;
	GVariant* _tmp19_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (PortalGlobalShortcutsConfigureShortcutsReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp18_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->session_handle = g_variant_dup_string (_tmp18_, NULL);
	g_variant_unref (_tmp18_);
	_tmp19_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->parent_window = g_variant_dup_string (_tmp19_, NULL);
	g_variant_unref (_tmp19_);
	_ready_data->options = g_variant_iter_next_value (&_arguments_iter);
	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_variant_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,
                                         GVariant* options,
                                         gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_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_variant_builder_add_value (&_arguments_builder, options);
	_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,
                                           GVariant* options,
                                           gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_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_variant_builder_add_value (&_arguments_builder, options);
	_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,
                                                 GVariant* shortcuts,
                                                 gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_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, shortcuts);
	_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);
}

void
portal_notification_add_notification (PortalNotification* self,
                                      const gchar* id,
                                      GVariant* notification,
                                      GCancellable* cancellable,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_)
{
	PortalNotificationIface* _iface_;
	_iface_ = PORTAL_NOTIFICATION_GET_INTERFACE (self);
	if (_iface_->add_notification) {
		_iface_->add_notification (self, id, notification, cancellable, _callback_, _user_data_);
	}
}

void
portal_notification_add_notification_finish (PortalNotification* self,
                                             GAsyncResult* _res_,
                                             GError** error)
{
	PortalNotificationIface* _iface_;
	_iface_ = PORTAL_NOTIFICATION_GET_INTERFACE (self);
	if (_iface_->add_notification_finish) {
		_iface_->add_notification_finish (self, _res_, error);
	}
}

void
portal_notification_remove_notification (PortalNotification* self,
                                         const gchar* id,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_)
{
	PortalNotificationIface* _iface_;
	_iface_ = PORTAL_NOTIFICATION_GET_INTERFACE (self);
	if (_iface_->remove_notification) {
		_iface_->remove_notification (self, id, _callback_, _user_data_);
	}
}

void
portal_notification_remove_notification_finish (PortalNotification* self,
                                                GAsyncResult* _res_,
                                                GError** error)
{
	PortalNotificationIface* _iface_;
	_iface_ = PORTAL_NOTIFICATION_GET_INTERFACE (self);
	if (_iface_->remove_notification_finish) {
		_iface_->remove_notification_finish (self, _res_, error);
	}
}

guint32
portal_notification_get_version (PortalNotification* self)
{
	PortalNotificationIface* _iface_;
	g_return_val_if_fail (self != NULL, 0U);
	_iface_ = PORTAL_NOTIFICATION_GET_INTERFACE (self);
	if (_iface_->get_version) {
		return _iface_->get_version (self);
	}
	return 0U;
}

GVariant*
portal_notification_get_supported_options (PortalNotification* self)
{
	PortalNotificationIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = PORTAL_NOTIFICATION_GET_INTERFACE (self);
	if (_iface_->get_supported_options) {
		return _iface_->get_supported_options (self);
	}
	return NULL;
}

static void
g_cclosure_user_marshal_VOID__STRING_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_STRING_POINTER_INT) (gpointer data1, const char* arg_1, const char* arg_2, gpointer arg_3, gint arg_4, gpointer data2);
	register GMarshalFunc_VOID__STRING_STRING_POINTER_INT 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_POINTER_INT) (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_pointer (param_values + 3), g_value_get_int (param_values + 4), data2);
}

static void
portal_notification_default_init (PortalNotificationIface * iface,
                                  gpointer iface_data)
{
	portal_notification_signals[PORTAL_NOTIFICATION_ACTION_INVOKED_SIGNAL] = g_signal_new ("action-invoked", PORTAL_TYPE_NOTIFICATION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_POINTER_INT, G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_INT);
}

/**
     * https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Notification.html
     */
GType
portal_notification_get_type (void)
{
	return portal_notification_type_id;
}

GType
portal_notification_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (PortalNotificationIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) portal_notification_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	portal_notification_type_id = g_type_module_register_type (module, G_TYPE_INTERFACE, "PortalNotification", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (portal_notification_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (portal_notification_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) portal_notification_proxy_get_type);
	g_type_set_qdata (portal_notification_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.portal.Notification");
	g_type_set_qdata (portal_notification_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_portal_notification_dbus_interface_info));
	g_type_set_qdata (portal_notification_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) portal_notification_register_object);
	return portal_notification_type_id;
}

G_DEFINE_DYNAMIC_TYPE_EXTENDED (PortalNotificationProxy, portal_notification_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE_DYNAMIC (PORTAL_TYPE_NOTIFICATION, portal_notification_proxy_portal_notification_interface_init) )
static void
portal_notification_proxy_class_init (PortalNotificationProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = portal_notification_proxy_g_signal;
}

static void
_dbus_handle_portal_notification_action_invoked (PortalNotification* self,
                                                 GVariant* parameters)
{
	GVariantIter _arguments_iter;
	gchar* id = NULL;
	GVariant* _tmp20_;
	gchar* action = NULL;
	GVariant* _tmp21_;
	GVariant** parameter = NULL;
	gint parameter_length1;
	GVariant* _tmp22_;
	GVariant** _tmp23_;
	gint _tmp23__length;
	gint _tmp23__size;
	gint _tmp23__length1;
	GVariantIter _tmp24_;
	GVariant* _tmp25_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp20_ = g_variant_iter_next_value (&_arguments_iter);
	id = g_variant_dup_string (_tmp20_, NULL);
	g_variant_unref (_tmp20_);
	_tmp21_ = g_variant_iter_next_value (&_arguments_iter);
	action = g_variant_dup_string (_tmp21_, NULL);
	g_variant_unref (_tmp21_);
	parameter_length1 = 0;
	_tmp22_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp23_ = g_new (GVariant*, 5);
	_tmp23__length = 0;
	_tmp23__size = 4;
	_tmp23__length1 = 0;
	g_variant_iter_init (&_tmp24_, _tmp22_);
	for (; (_tmp25_ = g_variant_iter_next_value (&_tmp24_)) != NULL; _tmp23__length1++) {
		if (_tmp23__size == _tmp23__length) {
			_tmp23__size = 2 * _tmp23__size;
			_tmp23_ = g_renew (GVariant*, _tmp23_, _tmp23__size + 1);
		}
		_tmp23_[_tmp23__length++] = g_variant_get_variant (_tmp25_);
		g_variant_unref (_tmp25_);
	}
	parameter_length1 = _tmp23__length1;
	_tmp23_[_tmp23__length] = NULL;
	parameter = _tmp23_;
	g_variant_unref (_tmp22_);
	g_signal_emit_by_name (self, "action-invoked", id, action, parameter, parameter_length1);
	_g_free0 (id);
	_g_free0 (action);
	parameter = (_vala_array_free (parameter, parameter_length1, (GDestroyNotify) g_variant_unref), NULL);
}

static void
portal_notification_proxy_g_signal (GDBusProxy* proxy,
                                    const gchar* sender_name,
                                    const gchar* signal_name,
                                    GVariant* parameters)
{
	if (strcmp (signal_name, "ActionInvoked") == 0) {
		_dbus_handle_portal_notification_action_invoked ((PortalNotification*) proxy, parameters);
	}
}

static void
portal_notification_proxy_class_finalize (PortalNotificationProxyClass* klass)
{
}

void
portal_notification_proxy_register_dynamic_type (GTypeModule* module)
{
	portal_notification_proxy_register_type (module);
}

static void
portal_notification_proxy_init (PortalNotificationProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_portal_notification_dbus_interface_info));
}

static void
portal_notification_proxy_add_notification_async (PortalNotification* self,
                                                  const gchar* id,
                                                  GVariant* notification,
                                                  GCancellable* cancellable,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	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.Notification", "AddNotification");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (id));
	g_variant_builder_add_value (&_arguments_builder, notification);
	_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, cancellable, _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_notification_proxy_add_notification_finish (PortalNotification* 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 void
portal_notification_proxy_remove_notification_async (PortalNotification* self,
                                                     const gchar* id,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	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.Notification", "RemoveNotification");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (id));
	_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_notification_proxy_remove_notification_finish (PortalNotification* 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_notification_dbus_proxy_get_version (PortalNotification* 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.Notification"));
		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 _tmp26_ = 0U;
			return _tmp26_;
		}
		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 GVariant*
portal_notification_dbus_proxy_get_supported_options (PortalNotification* self)
{
	GVariant *_inner_reply;
	GVariant* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "SupportedOptions");
	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.Notification"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("SupportedOptions"));
		_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) {
			return NULL;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = _inner_reply;
	return _result;
}

static void
portal_notification_proxy_portal_notification_interface_init (PortalNotificationIface* iface)
{
	iface->add_notification = portal_notification_proxy_add_notification_async;
	iface->add_notification_finish = portal_notification_proxy_add_notification_finish;
	iface->remove_notification = portal_notification_proxy_remove_notification_async;
	iface->remove_notification_finish = portal_notification_proxy_remove_notification_finish;
	iface->get_version = portal_notification_dbus_proxy_get_version;
	iface->get_supported_options = portal_notification_dbus_proxy_get_supported_options;
}

static void
_dbus_portal_notification_add_notification (PortalNotification* self,
                                            GVariant* _parameters_,
                                            GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	PortalNotificationAddNotificationReadyData* _ready_data;
	GVariant* _tmp27_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (PortalNotificationAddNotificationReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp27_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->id = g_variant_dup_string (_tmp27_, NULL);
	g_variant_unref (_tmp27_);
	_ready_data->notification = g_variant_iter_next_value (&_arguments_iter);
	portal_notification_add_notification (self, _ready_data->id, _ready_data->notification, NULL, (GAsyncReadyCallback) _dbus_portal_notification_add_notification_ready, _ready_data);
	_error:
	;
}

static void
_dbus_portal_notification_add_notification_ready (GObject * source_object,
                                                  GAsyncResult * _res_,
                                                  gpointer _user_data_)
{
	PortalNotificationAddNotificationReadyData* _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_notification_add_notification_finish ((PortalNotification*) 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->id);
	_g_variant_unref0 (_ready_data->notification);
	g_slice_free (PortalNotificationAddNotificationReadyData, _ready_data);
}

static void
_dbus_portal_notification_remove_notification (PortalNotification* self,
                                               GVariant* _parameters_,
                                               GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	PortalNotificationRemoveNotificationReadyData* _ready_data;
	GVariant* _tmp28_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (PortalNotificationRemoveNotificationReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp28_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->id = g_variant_dup_string (_tmp28_, NULL);
	g_variant_unref (_tmp28_);
	portal_notification_remove_notification (self, _ready_data->id, (GAsyncReadyCallback) _dbus_portal_notification_remove_notification_ready, _ready_data);
	_error:
	;
}

static void
_dbus_portal_notification_remove_notification_ready (GObject * source_object,
                                                     GAsyncResult * _res_,
                                                     gpointer _user_data_)
{
	PortalNotificationRemoveNotificationReadyData* _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_notification_remove_notification_finish ((PortalNotification*) 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->id);
	g_slice_free (PortalNotificationRemoveNotificationReadyData, _ready_data);
}

static void
portal_notification_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, "AddNotification") == 0) {
		_dbus_portal_notification_add_notification (object, parameters, invocation);
	} else if (strcmp (method_name, "RemoveNotification") == 0) {
		_dbus_portal_notification_remove_notification (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
_dbus_portal_notification_get_version (PortalNotification* self)
{
	guint32 result;
	GVariant* _reply;
	result = portal_notification_get_version (self);
	_reply = g_variant_new_uint32 (result);
	return _reply;
}

static GVariant*
_dbus_portal_notification_get_supported_options (PortalNotification* self)
{
	GVariant* result;
	GVariant* _reply;
	result = portal_notification_get_supported_options (self);
	_reply = result;
	return _reply;
}

static GVariant*
portal_notification_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_notification_get_version (object);
	} else if (strcmp (property_name, "SupportedOptions") == 0) {
		return _dbus_portal_notification_get_supported_options (object);
	}
	return NULL;
}

static gboolean
portal_notification_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_notification_action_invoked (GObject* _sender,
                                          const gchar* id,
                                          const gchar* action,
                                          GVariant** parameter,
                                          gint parameter_length1,
                                          gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GVariant** _tmp29_;
	GVariantBuilder _tmp30_;
	gint _tmp31_;
	_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_string (id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (action));
	_tmp29_ = parameter;
	g_variant_builder_init (&_tmp30_, G_VARIANT_TYPE ("av"));
	for (_tmp31_ = 0; _tmp31_ < parameter_length1; _tmp31_++) {
		g_variant_builder_add_value (&_tmp30_, g_variant_new_variant (*_tmp29_));
		_tmp29_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp30_));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.portal.Notification", "ActionInvoked", _arguments, NULL);
}

guint
portal_notification_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_notification_dbus_interface_info), &_portal_notification_dbus_interface_vtable, data, _portal_notification_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "action-invoked", (GCallback) _dbus_portal_notification_action_invoked, data);
	return result;
}

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

static gpointer
_g_dbus_interface_info_ref0 (gpointer self)
{
	return self ? g_dbus_interface_info_ref (self) : NULL;
}

gboolean
portal_has_dbus_interface (GDBusConnection* connection,
                           const gchar* bus_name,
                           const gchar* object_path,
                           const gchar* interface_name,
                           gint timeout)
{
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (connection != NULL, FALSE);
	g_return_val_if_fail (bus_name != NULL, FALSE);
	g_return_val_if_fail (object_path != NULL, FALSE);
	g_return_val_if_fail (interface_name != NULL, FALSE);
	{
		GVariant* _result_ = NULL;
		GVariantType* _tmp0_;
		GVariantType* _tmp1_;
		GVariant* _tmp2_;
		GVariant* _tmp3_;
		gchar* xml_data = NULL;
		GVariant* _tmp4_;
		gchar* _tmp5_ = NULL;
		GDBusNodeInfo* node_info = NULL;
		const gchar* _tmp6_;
		GDBusNodeInfo* _tmp7_;
		GDBusNodeInfo* _tmp8_;
		GDBusInterfaceInfo** _tmp9_;
		gint _tmp9__length1;
		_tmp0_ = g_variant_type_new ("(s)");
		_tmp1_ = _tmp0_;
		_tmp2_ = g_dbus_connection_call_sync (connection, bus_name, object_path, "org.freedesktop.DBus.Introspectable", "Introspect", NULL, _tmp1_, G_DBUS_CALL_FLAGS_NONE, timeout, NULL, &_inner_error0_);
		_tmp3_ = _tmp2_;
		_g_variant_type_free0 (_tmp1_);
		_result_ = _tmp3_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp4_ = _result_;
		g_variant_get (_tmp4_, "(s)", &_tmp5_, NULL);
		_g_free0 (xml_data);
		xml_data = _tmp5_;
		_tmp6_ = xml_data;
		_tmp7_ = g_dbus_node_info_new_for_xml (_tmp6_, &_inner_error0_);
		node_info = _tmp7_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (xml_data);
			_g_variant_unref0 (_result_);
			goto __catch0_g_error;
		}
		_tmp8_ = node_info;
		_tmp9_ = _tmp8_->interfaces;
		_tmp9__length1 = _vala_array_length (_tmp8_->interfaces);
		{
			GDBusInterfaceInfo** iface_collection = NULL;
			gint iface_collection_length1 = 0;
			gint _iface_collection_size_ = 0;
			gint iface_it = 0;
			iface_collection = _tmp9_;
			iface_collection_length1 = _tmp9__length1;
			for (iface_it = 0; iface_it < iface_collection_length1; iface_it = iface_it + 1) {
				GDBusInterfaceInfo* _tmp10_;
				GDBusInterfaceInfo* iface = NULL;
				_tmp10_ = _g_dbus_interface_info_ref0 (iface_collection[iface_it]);
				iface = _tmp10_;
				{
					GDBusInterfaceInfo* _tmp11_;
					const gchar* _tmp12_;
					_tmp11_ = iface;
					_tmp12_ = _tmp11_->name;
					if (g_strcmp0 (_tmp12_, interface_name) == 0) {
						result = TRUE;
						_g_dbus_interface_info_unref0 (iface);
						_g_dbus_node_info_unref0 (node_info);
						_g_free0 (xml_data);
						_g_variant_unref0 (_result_);
						return result;
					}
					_g_dbus_interface_info_unref0 (iface);
				}
			}
		}
		_g_dbus_node_info_unref0 (node_info);
		_g_free0 (xml_data);
		_g_variant_unref0 (_result_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp13_;
		const gchar* _tmp14_;
		_error_ = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp13_ = _error_;
		_tmp14_ = _tmp13_->message;
		g_debug ("interfaces.vala:132: Failed to introspect %s: %s", bus_name, _tmp14_);
		_g_error_free0 (_error_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp15_ = FALSE;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp15_;
	}
	result = FALSE;
	return result;
}

gboolean
portal_has_dbus_method (GDBusProxy* proxy,
                        const gchar* name)
{
	GDBusInterfaceInfo* _tmp0_ = NULL;
	GDBusInterfaceInfo* _tmp1_;
	GDBusInterfaceInfo* _tmp2_;
	GDBusMethodInfo* _tmp3_ = NULL;
	gboolean result;
	g_return_val_if_fail (proxy != NULL, FALSE);
	g_return_val_if_fail (name != NULL, FALSE);
	g_object_get (proxy, "g-interface-info", &_tmp1_, NULL);
	_tmp2_ = _tmp1_;
	_tmp0_ = _tmp2_;
	_tmp3_ = NULL;
	if (_tmp0_ != NULL) {
		GDBusMethodInfo* _tmp4_;
		_tmp4_ = g_dbus_interface_info_lookup_method (_tmp0_, name);
		_tmp3_ = _tmp4_;
	}
	result = _tmp3_ != NULL;
	_g_dbus_interface_info_unref0 (_tmp0_);
	return result;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

