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

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

#include "ft_plugin_freedesktop.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  {
	FREEDESKTOP_LOGIN_MANAGER_PREPARE_FOR_SLEEP_SIGNAL,
	FREEDESKTOP_LOGIN_MANAGER_NUM_SIGNALS
};
static guint freedesktop_login_manager_signals[FREEDESKTOP_LOGIN_MANAGER_NUM_SIGNALS] = {0};
typedef GDBusProxy FreedesktopLoginManagerProxy;
typedef GDBusProxyClass FreedesktopLoginManagerProxyClass;
typedef struct _FreedesktopLoginManagerListSessionsReadyData FreedesktopLoginManagerListSessionsReadyData;
typedef GDBusProxy FreedesktopLoginSessionProxy;
typedef GDBusProxyClass FreedesktopLoginSessionProxyClass;
typedef struct _FreedesktopLoginSessionLockReadyData FreedesktopLoginSessionLockReadyData;
typedef GDBusProxy FreedesktopTimeDateProxy;
typedef GDBusProxyClass FreedesktopTimeDateProxyClass;
enum  {
	FREEDESKTOP_NOTIFICATIONS_ACTION_INVOKED_SIGNAL,
	FREEDESKTOP_NOTIFICATIONS_ACTIVATION_TOKEN_SIGNAL,
	FREEDESKTOP_NOTIFICATIONS_NOTIFICATION_CLOSED_SIGNAL,
	FREEDESKTOP_NOTIFICATIONS_NUM_SIGNALS
};
static guint freedesktop_notifications_signals[FREEDESKTOP_NOTIFICATIONS_NUM_SIGNALS] = {0};
typedef GDBusProxy FreedesktopNotificationsProxy;
typedef GDBusProxyClass FreedesktopNotificationsProxyClass;
typedef struct _FreedesktopNotificationsGetCapabilitiesReadyData FreedesktopNotificationsGetCapabilitiesReadyData;
typedef struct _FreedesktopNotificationsGetServerInformationReadyData FreedesktopNotificationsGetServerInformationReadyData;
typedef struct _FreedesktopNotificationsNotifyReadyData FreedesktopNotificationsNotifyReadyData;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
typedef struct _FreedesktopNotificationsCloseNotificationReadyData FreedesktopNotificationsCloseNotificationReadyData;

struct _FreedesktopLoginManagerListSessionsReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _FreedesktopLoginSessionLockReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _FreedesktopNotificationsGetCapabilitiesReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _FreedesktopNotificationsGetServerInformationReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _FreedesktopNotificationsNotifyReadyData {
	GDBusMethodInvocation* _invocation_;
	gchar* app_name;
	guint32 replaces_id;
	gchar* app_icon;
	gchar* summary;
	gchar* body;
	gchar** actions;
	gint actions_length1;
	GHashTable* hints;
	gint32 expire_timeout;
};

struct _FreedesktopNotificationsCloseNotificationReadyData {
	GDBusMethodInvocation* _invocation_;
	guint32 id;
};

static GType freedesktop_login_manager_type_id = 0;
static GType freedesktop_login_session_type_id = 0;
static GType freedesktop_time_date_type_id = 0;
static GType freedesktop_notifications_type_id = 0;

static void freedesktop_login_manager_proxy_g_signal (GDBusProxy* proxy,
                                               const gchar* sender_name,
                                               const gchar* signal_name,
                                               GVariant* parameters);
static void _dbus_handle_freedesktop_login_manager_prepare_for_sleep (FreedesktopLoginManager* self,
                                                               GVariant* parameters);
static void _vala_g_async_ready_callback (GObject *source_object,
                                   GAsyncResult *res,
                                   void *user_data);
static void freedesktop_login_manager_proxy_list_sessions_async (FreedesktopLoginManager* self,
                                                          GAsyncReadyCallback _callback_,
                                                          gpointer _user_data_);
static FreedesktopSession* freedesktop_login_manager_proxy_list_sessions_finish (FreedesktopLoginManager* self,
                                                                          GAsyncResult* _res_,
                                                                          gint* result_length1,
                                                                          GError** error);
static void freedesktop_login_manager_proxy_freedesktop_login_manager_interface_init (FreedesktopLoginManagerIface* iface);
static void _dbus_freedesktop_login_manager_list_sessions (FreedesktopLoginManager* self,
                                                    GVariant* _parameters_,
                                                    GDBusMethodInvocation* invocation);
static void _vala_FreedesktopSession_array_free (FreedesktopSession * array,
                                          gssize array_length);
static void _dbus_freedesktop_login_manager_list_sessions_ready (GObject * source_object,
                                                          GAsyncResult * _res_,
                                                          gpointer _user_data_);
static void freedesktop_login_manager_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* freedesktop_login_manager_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 freedesktop_login_manager_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_freedesktop_login_manager_prepare_for_sleep (GObject* _sender,
                                                        gboolean active,
                                                        gpointer* _data);
static void _freedesktop_login_manager_unregister_object (gpointer user_data);
static void freedesktop_login_session_proxy_g_signal (GDBusProxy* proxy,
                                               const gchar* sender_name,
                                               const gchar* signal_name,
                                               GVariant* parameters);
static void freedesktop_login_session_proxy_lock_async (FreedesktopLoginSession* self,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_);
static void freedesktop_login_session_proxy_lock_finish (FreedesktopLoginSession* self,
                                                  GAsyncResult* _res_,
                                                  GError** error);
static gchar* freedesktop_login_session_dbus_proxy_get_id (FreedesktopLoginSession* self);
static gboolean freedesktop_login_session_dbus_proxy_get_active (FreedesktopLoginSession* self);
static gboolean freedesktop_login_session_dbus_proxy_get_locked_hint (FreedesktopLoginSession* self);
static void freedesktop_login_session_proxy_freedesktop_login_session_interface_init (FreedesktopLoginSessionIface* iface);
static void _dbus_freedesktop_login_session_lock (FreedesktopLoginSession* self,
                                           GVariant* _parameters_,
                                           GDBusMethodInvocation* invocation);
static void _dbus_freedesktop_login_session_lock_ready (GObject * source_object,
                                                 GAsyncResult * _res_,
                                                 gpointer _user_data_);
static void freedesktop_login_session_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* freedesktop_login_session_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_freedesktop_login_session_get_id (FreedesktopLoginSession* self);
static GVariant* _dbus_freedesktop_login_session_get_active (FreedesktopLoginSession* self);
static GVariant* _dbus_freedesktop_login_session_get_locked_hint (FreedesktopLoginSession* self);
static gboolean freedesktop_login_session_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 _freedesktop_login_session_unregister_object (gpointer user_data);
static void freedesktop_time_date_proxy_g_signal (GDBusProxy* proxy,
                                           const gchar* sender_name,
                                           const gchar* signal_name,
                                           GVariant* parameters);
static gchar* freedesktop_time_date_dbus_proxy_get_timezone (FreedesktopTimeDate* self);
static void freedesktop_time_date_proxy_freedesktop_time_date_interface_init (FreedesktopTimeDateIface* iface);
static void freedesktop_time_date_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* freedesktop_time_date_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_freedesktop_time_date_get_timezone (FreedesktopTimeDate* self);
static gboolean freedesktop_time_date_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 _freedesktop_time_date_unregister_object (gpointer user_data);
static void g_cclosure_user_marshal_VOID__UINT_STRING (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__UINT_UINT (GClosure * closure,
                                              GValue * return_value,
                                              guint n_param_values,
                                              const GValue * param_values,
                                              gpointer invocation_hint,
                                              gpointer marshal_data);
static void freedesktop_notifications_proxy_g_signal (GDBusProxy* proxy,
                                               const gchar* sender_name,
                                               const gchar* signal_name,
                                               GVariant* parameters);
static void _dbus_handle_freedesktop_notifications_action_invoked (FreedesktopNotifications* self,
                                                            GVariant* parameters);
static void _dbus_handle_freedesktop_notifications_activation_token (FreedesktopNotifications* self,
                                                              GVariant* parameters);
static void _dbus_handle_freedesktop_notifications_notification_closed (FreedesktopNotifications* self,
                                                                 GVariant* parameters);
static void freedesktop_notifications_proxy_get_capabilities_async (FreedesktopNotifications* self,
                                                             GAsyncReadyCallback _callback_,
                                                             gpointer _user_data_);
static gchar** freedesktop_notifications_proxy_get_capabilities_finish (FreedesktopNotifications* self,
                                                                 GAsyncResult* _res_,
                                                                 gint* result_length1,
                                                                 GError** error);
static void freedesktop_notifications_proxy_get_server_information_async (FreedesktopNotifications* self,
                                                                   GAsyncReadyCallback _callback_,
                                                                   gpointer _user_data_);
static void freedesktop_notifications_proxy_get_server_information_finish (FreedesktopNotifications* self,
                                                                    GAsyncResult* _res_,
                                                                    gchar** name,
                                                                    gchar** vendor,
                                                                    gchar** version,
                                                                    gchar** spec_version,
                                                                    GError** error);
static void freedesktop_notifications_proxy_notify_async (FreedesktopNotifications* self,
                                                   const gchar* app_name,
                                                   guint32 replaces_id,
                                                   const gchar* app_icon,
                                                   const gchar* summary,
                                                   const gchar* body,
                                                   gchar** actions,
                                                   gint actions_length1,
                                                   GHashTable* hints,
                                                   gint32 expire_timeout,
                                                   GCancellable* cancellable,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_);
static guint32 freedesktop_notifications_proxy_notify_finish (FreedesktopNotifications* self,
                                                       GAsyncResult* _res_,
                                                       GError** error);
static void freedesktop_notifications_proxy_close_notification_async (FreedesktopNotifications* self,
                                                               guint32 id,
                                                               GAsyncReadyCallback _callback_,
                                                               gpointer _user_data_);
static void freedesktop_notifications_proxy_close_notification_finish (FreedesktopNotifications* self,
                                                                GAsyncResult* _res_,
                                                                GError** error);
static void freedesktop_notifications_proxy_freedesktop_notifications_interface_init (FreedesktopNotificationsIface* iface);
static void _dbus_freedesktop_notifications_get_capabilities (FreedesktopNotifications* self,
                                                       GVariant* _parameters_,
                                                       GDBusMethodInvocation* invocation);
static void _dbus_freedesktop_notifications_get_capabilities_ready (GObject * source_object,
                                                             GAsyncResult * _res_,
                                                             gpointer _user_data_);
static void _dbus_freedesktop_notifications_get_server_information (FreedesktopNotifications* self,
                                                             GVariant* _parameters_,
                                                             GDBusMethodInvocation* invocation);
static void _dbus_freedesktop_notifications_get_server_information_ready (GObject * source_object,
                                                                   GAsyncResult * _res_,
                                                                   gpointer _user_data_);
static void _dbus_freedesktop_notifications_notify (FreedesktopNotifications* self,
                                             GVariant* _parameters_,
                                             GDBusMethodInvocation* invocation);
static void _dbus_freedesktop_notifications_notify_ready (GObject * source_object,
                                                   GAsyncResult * _res_,
                                                   gpointer _user_data_);
static void _dbus_freedesktop_notifications_close_notification (FreedesktopNotifications* self,
                                                         GVariant* _parameters_,
                                                         GDBusMethodInvocation* invocation);
static void _dbus_freedesktop_notifications_close_notification_ready (GObject * source_object,
                                                               GAsyncResult * _res_,
                                                               gpointer _user_data_);
static void freedesktop_notifications_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* freedesktop_notifications_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 freedesktop_notifications_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_freedesktop_notifications_action_invoked (GObject* _sender,
                                                     guint32 id,
                                                     const gchar* action_key,
                                                     gpointer* _data);
static void _dbus_freedesktop_notifications_activation_token (GObject* _sender,
                                                       guint32 id,
                                                       const gchar* activation_token,
                                                       gpointer* _data);
static void _dbus_freedesktop_notifications_notification_closed (GObject* _sender,
                                                          guint32 id,
                                                          guint32 reason,
                                                          gpointer* _data);
static void _freedesktop_notifications_unregister_object (gpointer user_data);
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 const GDBusArgInfo _freedesktop_login_manager_dbus_arg_info_list_sessions_result = {-1, "result", "a(susss)", NULL};
static const GDBusArgInfo * const _freedesktop_login_manager_dbus_arg_info_list_sessions_in[] = {NULL};
static const GDBusArgInfo * const _freedesktop_login_manager_dbus_arg_info_list_sessions_out[] = {&_freedesktop_login_manager_dbus_arg_info_list_sessions_result, NULL};
static const GDBusMethodInfo _freedesktop_login_manager_dbus_method_info_list_sessions = {-1, "ListSessions", (GDBusArgInfo **) (&_freedesktop_login_manager_dbus_arg_info_list_sessions_in), (GDBusArgInfo **) (&_freedesktop_login_manager_dbus_arg_info_list_sessions_out), NULL};
static const GDBusMethodInfo * const _freedesktop_login_manager_dbus_method_info[] = {&_freedesktop_login_manager_dbus_method_info_list_sessions, NULL};
static const GDBusArgInfo _freedesktop_login_manager_dbus_arg_info_prepare_for_sleep_active = {-1, "active", "b", NULL};
static const GDBusArgInfo * const _freedesktop_login_manager_dbus_arg_info_prepare_for_sleep[] = {&_freedesktop_login_manager_dbus_arg_info_prepare_for_sleep_active, NULL};
static const GDBusSignalInfo _freedesktop_login_manager_dbus_signal_info_prepare_for_sleep = {-1, "PrepareForSleep", (GDBusArgInfo **) (&_freedesktop_login_manager_dbus_arg_info_prepare_for_sleep), NULL};
static const GDBusSignalInfo * const _freedesktop_login_manager_dbus_signal_info[] = {&_freedesktop_login_manager_dbus_signal_info_prepare_for_sleep, NULL};
static const GDBusPropertyInfo * const _freedesktop_login_manager_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _freedesktop_login_manager_dbus_interface_info = {-1, "org.freedesktop.login1.Manager", (GDBusMethodInfo **) (&_freedesktop_login_manager_dbus_method_info), (GDBusSignalInfo **) (&_freedesktop_login_manager_dbus_signal_info), (GDBusPropertyInfo **) (&_freedesktop_login_manager_dbus_property_info), NULL};
static const GDBusInterfaceVTable _freedesktop_login_manager_dbus_interface_vtable = {freedesktop_login_manager_dbus_interface_method_call, freedesktop_login_manager_dbus_interface_get_property, freedesktop_login_manager_dbus_interface_set_property};
static const GDBusArgInfo * const _freedesktop_login_session_dbus_arg_info_lock_in[] = {NULL};
static const GDBusArgInfo * const _freedesktop_login_session_dbus_arg_info_lock_out[] = {NULL};
static const GDBusMethodInfo _freedesktop_login_session_dbus_method_info_lock = {-1, "Lock", (GDBusArgInfo **) (&_freedesktop_login_session_dbus_arg_info_lock_in), (GDBusArgInfo **) (&_freedesktop_login_session_dbus_arg_info_lock_out), NULL};
static const GDBusMethodInfo * const _freedesktop_login_session_dbus_method_info[] = {&_freedesktop_login_session_dbus_method_info_lock, NULL};
static const GDBusSignalInfo * const _freedesktop_login_session_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo _freedesktop_login_session_dbus_property_info_id = {-1, "Id", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _freedesktop_login_session_dbus_property_info_active = {-1, "Active", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _freedesktop_login_session_dbus_property_info_locked_hint = {-1, "LockedHint", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _freedesktop_login_session_dbus_property_info[] = {&_freedesktop_login_session_dbus_property_info_id, &_freedesktop_login_session_dbus_property_info_active, &_freedesktop_login_session_dbus_property_info_locked_hint, NULL};
static const GDBusInterfaceInfo _freedesktop_login_session_dbus_interface_info = {-1, "org.freedesktop.login1.Session", (GDBusMethodInfo **) (&_freedesktop_login_session_dbus_method_info), (GDBusSignalInfo **) (&_freedesktop_login_session_dbus_signal_info), (GDBusPropertyInfo **) (&_freedesktop_login_session_dbus_property_info), NULL};
static const GDBusInterfaceVTable _freedesktop_login_session_dbus_interface_vtable = {freedesktop_login_session_dbus_interface_method_call, freedesktop_login_session_dbus_interface_get_property, freedesktop_login_session_dbus_interface_set_property};
static const GDBusMethodInfo * const _freedesktop_time_date_dbus_method_info[] = {NULL};
static const GDBusSignalInfo * const _freedesktop_time_date_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo _freedesktop_time_date_dbus_property_info_timezone = {-1, "Timezone", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _freedesktop_time_date_dbus_property_info[] = {&_freedesktop_time_date_dbus_property_info_timezone, NULL};
static const GDBusInterfaceInfo _freedesktop_time_date_dbus_interface_info = {-1, "org.freedesktop.timedate1", (GDBusMethodInfo **) (&_freedesktop_time_date_dbus_method_info), (GDBusSignalInfo **) (&_freedesktop_time_date_dbus_signal_info), (GDBusPropertyInfo **) (&_freedesktop_time_date_dbus_property_info), NULL};
static const GDBusInterfaceVTable _freedesktop_time_date_dbus_interface_vtable = {freedesktop_time_date_dbus_interface_method_call, freedesktop_time_date_dbus_interface_get_property, freedesktop_time_date_dbus_interface_set_property};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_get_capabilities_result = {-1, "result", "as", NULL};
static const GDBusArgInfo * const _freedesktop_notifications_dbus_arg_info_get_capabilities_in[] = {NULL};
static const GDBusArgInfo * const _freedesktop_notifications_dbus_arg_info_get_capabilities_out[] = {&_freedesktop_notifications_dbus_arg_info_get_capabilities_result, NULL};
static const GDBusMethodInfo _freedesktop_notifications_dbus_method_info_get_capabilities = {-1, "GetCapabilities", (GDBusArgInfo **) (&_freedesktop_notifications_dbus_arg_info_get_capabilities_in), (GDBusArgInfo **) (&_freedesktop_notifications_dbus_arg_info_get_capabilities_out), NULL};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_get_server_information_name = {-1, "name", "s", NULL};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_get_server_information_vendor = {-1, "vendor", "s", NULL};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_get_server_information_version = {-1, "version", "s", NULL};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_get_server_information_spec_version = {-1, "spec_version", "s", NULL};
static const GDBusArgInfo * const _freedesktop_notifications_dbus_arg_info_get_server_information_in[] = {NULL};
static const GDBusArgInfo * const _freedesktop_notifications_dbus_arg_info_get_server_information_out[] = {&_freedesktop_notifications_dbus_arg_info_get_server_information_name, &_freedesktop_notifications_dbus_arg_info_get_server_information_vendor, &_freedesktop_notifications_dbus_arg_info_get_server_information_version, &_freedesktop_notifications_dbus_arg_info_get_server_information_spec_version, NULL};
static const GDBusMethodInfo _freedesktop_notifications_dbus_method_info_get_server_information = {-1, "GetServerInformation", (GDBusArgInfo **) (&_freedesktop_notifications_dbus_arg_info_get_server_information_in), (GDBusArgInfo **) (&_freedesktop_notifications_dbus_arg_info_get_server_information_out), NULL};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_notify_app_name = {-1, "app_name", "s", NULL};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_notify_replaces_id = {-1, "replaces_id", "u", NULL};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_notify_app_icon = {-1, "app_icon", "s", NULL};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_notify_summary = {-1, "summary", "s", NULL};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_notify_body = {-1, "body", "s", NULL};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_notify_actions = {-1, "actions", "as", NULL};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_notify_hints = {-1, "hints", "a{sv}", NULL};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_notify_expire_timeout = {-1, "expire_timeout", "i", NULL};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_notify_result = {-1, "result", "u", NULL};
static const GDBusArgInfo * const _freedesktop_notifications_dbus_arg_info_notify_in[] = {&_freedesktop_notifications_dbus_arg_info_notify_app_name, &_freedesktop_notifications_dbus_arg_info_notify_replaces_id, &_freedesktop_notifications_dbus_arg_info_notify_app_icon, &_freedesktop_notifications_dbus_arg_info_notify_summary, &_freedesktop_notifications_dbus_arg_info_notify_body, &_freedesktop_notifications_dbus_arg_info_notify_actions, &_freedesktop_notifications_dbus_arg_info_notify_hints, &_freedesktop_notifications_dbus_arg_info_notify_expire_timeout, NULL};
static const GDBusArgInfo * const _freedesktop_notifications_dbus_arg_info_notify_out[] = {&_freedesktop_notifications_dbus_arg_info_notify_result, NULL};
static const GDBusMethodInfo _freedesktop_notifications_dbus_method_info_notify = {-1, "Notify", (GDBusArgInfo **) (&_freedesktop_notifications_dbus_arg_info_notify_in), (GDBusArgInfo **) (&_freedesktop_notifications_dbus_arg_info_notify_out), NULL};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_close_notification_id = {-1, "id", "u", NULL};
static const GDBusArgInfo * const _freedesktop_notifications_dbus_arg_info_close_notification_in[] = {&_freedesktop_notifications_dbus_arg_info_close_notification_id, NULL};
static const GDBusArgInfo * const _freedesktop_notifications_dbus_arg_info_close_notification_out[] = {NULL};
static const GDBusMethodInfo _freedesktop_notifications_dbus_method_info_close_notification = {-1, "CloseNotification", (GDBusArgInfo **) (&_freedesktop_notifications_dbus_arg_info_close_notification_in), (GDBusArgInfo **) (&_freedesktop_notifications_dbus_arg_info_close_notification_out), NULL};
static const GDBusMethodInfo * const _freedesktop_notifications_dbus_method_info[] = {&_freedesktop_notifications_dbus_method_info_get_capabilities, &_freedesktop_notifications_dbus_method_info_get_server_information, &_freedesktop_notifications_dbus_method_info_notify, &_freedesktop_notifications_dbus_method_info_close_notification, NULL};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_action_invoked_id = {-1, "id", "u", NULL};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_action_invoked_action_key = {-1, "action_key", "s", NULL};
static const GDBusArgInfo * const _freedesktop_notifications_dbus_arg_info_action_invoked[] = {&_freedesktop_notifications_dbus_arg_info_action_invoked_id, &_freedesktop_notifications_dbus_arg_info_action_invoked_action_key, NULL};
static const GDBusSignalInfo _freedesktop_notifications_dbus_signal_info_action_invoked = {-1, "ActionInvoked", (GDBusArgInfo **) (&_freedesktop_notifications_dbus_arg_info_action_invoked), NULL};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_activation_token_id = {-1, "id", "u", NULL};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_activation_token_activation_token = {-1, "activation_token", "s", NULL};
static const GDBusArgInfo * const _freedesktop_notifications_dbus_arg_info_activation_token[] = {&_freedesktop_notifications_dbus_arg_info_activation_token_id, &_freedesktop_notifications_dbus_arg_info_activation_token_activation_token, NULL};
static const GDBusSignalInfo _freedesktop_notifications_dbus_signal_info_activation_token = {-1, "ActivationToken", (GDBusArgInfo **) (&_freedesktop_notifications_dbus_arg_info_activation_token), NULL};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_notification_closed_id = {-1, "id", "u", NULL};
static const GDBusArgInfo _freedesktop_notifications_dbus_arg_info_notification_closed_reason = {-1, "reason", "u", NULL};
static const GDBusArgInfo * const _freedesktop_notifications_dbus_arg_info_notification_closed[] = {&_freedesktop_notifications_dbus_arg_info_notification_closed_id, &_freedesktop_notifications_dbus_arg_info_notification_closed_reason, NULL};
static const GDBusSignalInfo _freedesktop_notifications_dbus_signal_info_notification_closed = {-1, "NotificationClosed", (GDBusArgInfo **) (&_freedesktop_notifications_dbus_arg_info_notification_closed), NULL};
static const GDBusSignalInfo * const _freedesktop_notifications_dbus_signal_info[] = {&_freedesktop_notifications_dbus_signal_info_action_invoked, &_freedesktop_notifications_dbus_signal_info_activation_token, &_freedesktop_notifications_dbus_signal_info_notification_closed, NULL};
static const GDBusPropertyInfo * const _freedesktop_notifications_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _freedesktop_notifications_dbus_interface_info = {-1, "org.freedesktop.Notifications", (GDBusMethodInfo **) (&_freedesktop_notifications_dbus_method_info), (GDBusSignalInfo **) (&_freedesktop_notifications_dbus_signal_info), (GDBusPropertyInfo **) (&_freedesktop_notifications_dbus_property_info), NULL};
static const GDBusInterfaceVTable _freedesktop_notifications_dbus_interface_vtable = {freedesktop_notifications_dbus_interface_method_call, freedesktop_notifications_dbus_interface_get_property, freedesktop_notifications_dbus_interface_set_property};

void
freedesktop_session_copy (const FreedesktopSession* self,
                          FreedesktopSession* dest)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	_tmp0_ = (*self).session_id;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 ((*dest).session_id);
	(*dest).session_id = _tmp1_;
	(*dest).user_id = (*self).user_id;
	_tmp2_ = (*self).user_name;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 ((*dest).user_name);
	(*dest).user_name = _tmp3_;
	_tmp4_ = (*self).seat_id;
	_tmp5_ = g_strdup (_tmp4_);
	_g_free0 ((*dest).seat_id);
	(*dest).seat_id = _tmp5_;
	_tmp6_ = (*self).object_path;
	_tmp7_ = g_strdup (_tmp6_);
	_g_free0 ((*dest).object_path);
	(*dest).object_path = _tmp7_;
}

void
freedesktop_session_destroy (FreedesktopSession* self)
{
	_g_free0 ((*self).session_id);
	_g_free0 ((*self).user_name);
	_g_free0 ((*self).seat_id);
	_g_free0 ((*self).object_path);
}

FreedesktopSession*
freedesktop_session_dup (const FreedesktopSession* self)
{
	FreedesktopSession* dup;
	dup = g_new0 (FreedesktopSession, 1);
	freedesktop_session_copy (self, dup);
	return dup;
}

void
freedesktop_session_free (FreedesktopSession* self)
{
	freedesktop_session_destroy (self);
	g_free (self);
}

static GType
freedesktop_session_get_type_once (void)
{
	GType freedesktop_session_type_id;
	freedesktop_session_type_id = g_boxed_type_register_static ("FreedesktopSession", (GBoxedCopyFunc) freedesktop_session_dup, (GBoxedFreeFunc) freedesktop_session_free);
	return freedesktop_session_type_id;
}

GType
freedesktop_session_get_type (void)
{
	static volatile gsize freedesktop_session_type_id__once = 0;
	if (g_once_init_enter (&freedesktop_session_type_id__once)) {
		GType freedesktop_session_type_id;
		freedesktop_session_type_id = freedesktop_session_get_type_once ();
		g_once_init_leave (&freedesktop_session_type_id__once, freedesktop_session_type_id);
	}
	return freedesktop_session_type_id__once;
}

void
freedesktop_login_manager_list_sessions (FreedesktopLoginManager* self,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_)
{
	FreedesktopLoginManagerIface* _iface_;
	_iface_ = FREEDESKTOP_LOGIN_MANAGER_GET_INTERFACE (self);
	if (_iface_->list_sessions) {
		_iface_->list_sessions (self, _callback_, _user_data_);
	}
}

FreedesktopSession*
freedesktop_login_manager_list_sessions_finish (FreedesktopLoginManager* self,
                                                GAsyncResult* _res_,
                                                gint* result_length1,
                                                GError** error)
{
	FreedesktopLoginManagerIface* _iface_;
	_iface_ = FREEDESKTOP_LOGIN_MANAGER_GET_INTERFACE (self);
	if (_iface_->list_sessions_finish) {
		return _iface_->list_sessions_finish (self, _res_, result_length1, error);
	}
	return NULL;
}

static void
freedesktop_login_manager_default_init (FreedesktopLoginManagerIface * iface,
                                        gpointer iface_data)
{
	freedesktop_login_manager_signals[FREEDESKTOP_LOGIN_MANAGER_PREPARE_FOR_SLEEP_SIGNAL] = g_signal_new ("prepare-for-sleep", FREEDESKTOP_TYPE_LOGIN_MANAGER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
}

GType
freedesktop_login_manager_get_type (void)
{
	return freedesktop_login_manager_type_id;
}

GType
freedesktop_login_manager_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (FreedesktopLoginManagerIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) freedesktop_login_manager_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	freedesktop_login_manager_type_id = g_type_module_register_type (module, G_TYPE_INTERFACE, "FreedesktopLoginManager", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (freedesktop_login_manager_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (freedesktop_login_manager_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) freedesktop_login_manager_proxy_get_type);
	g_type_set_qdata (freedesktop_login_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.login1.Manager");
	g_type_set_qdata (freedesktop_login_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_freedesktop_login_manager_dbus_interface_info));
	g_type_set_qdata (freedesktop_login_manager_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) freedesktop_login_manager_register_object);
	return freedesktop_login_manager_type_id;
}

G_DEFINE_DYNAMIC_TYPE_EXTENDED (FreedesktopLoginManagerProxy, freedesktop_login_manager_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE_DYNAMIC (FREEDESKTOP_TYPE_LOGIN_MANAGER, freedesktop_login_manager_proxy_freedesktop_login_manager_interface_init) )
static void
freedesktop_login_manager_proxy_class_init (FreedesktopLoginManagerProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = freedesktop_login_manager_proxy_g_signal;
}

static void
_dbus_handle_freedesktop_login_manager_prepare_for_sleep (FreedesktopLoginManager* self,
                                                          GVariant* parameters)
{
	GVariantIter _arguments_iter;
	gboolean active = FALSE;
	GVariant* _tmp0_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp0_ = g_variant_iter_next_value (&_arguments_iter);
	active = g_variant_get_boolean (_tmp0_);
	g_variant_unref (_tmp0_);
	g_signal_emit_by_name (self, "prepare-for-sleep", active);
}

static void
freedesktop_login_manager_proxy_g_signal (GDBusProxy* proxy,
                                          const gchar* sender_name,
                                          const gchar* signal_name,
                                          GVariant* parameters)
{
	if (strcmp (signal_name, "PrepareForSleep") == 0) {
		_dbus_handle_freedesktop_login_manager_prepare_for_sleep ((FreedesktopLoginManager*) proxy, parameters);
	}
}

static void
freedesktop_login_manager_proxy_class_finalize (FreedesktopLoginManagerProxyClass* klass)
{
}

void
freedesktop_login_manager_proxy_register_dynamic_type (GTypeModule* module)
{
	freedesktop_login_manager_proxy_register_type (module);
}

static void
freedesktop_login_manager_proxy_init (FreedesktopLoginManagerProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_freedesktop_login_manager_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
freedesktop_login_manager_proxy_list_sessions_async (FreedesktopLoginManager* self,
                                                     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.login1.Manager", "ListSessions");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_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 FreedesktopSession*
freedesktop_login_manager_proxy_list_sessions_finish (FreedesktopLoginManager* self,
                                                      GAsyncResult* _res_,
                                                      gint* result_length1,
                                                      GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	FreedesktopSession* _result = NULL;
	gint _result_length1;
	GVariant* _tmp1_;
	FreedesktopSession* _tmp2_;
	gint _tmp2__length;
	gint _tmp2__size;
	gint _tmp2__length1;
	GVariantIter _tmp3_;
	GVariant* _tmp4_;
	_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);
	_result_length1 = 0;
	_tmp1_ = g_variant_iter_next_value (&_reply_iter);
	_tmp2_ = g_new (FreedesktopSession, 5);
	_tmp2__length = 0;
	_tmp2__size = 4;
	_tmp2__length1 = 0;
	g_variant_iter_init (&_tmp3_, _tmp1_);
	for (; (_tmp4_ = g_variant_iter_next_value (&_tmp3_)) != NULL; _tmp2__length1++) {
		FreedesktopSession _tmp5_;
		GVariantIter _tmp6_;
		GVariant* _tmp7_;
		GVariant* _tmp8_;
		GVariant* _tmp9_;
		GVariant* _tmp10_;
		GVariant* _tmp11_;
		if (_tmp2__size == _tmp2__length) {
			_tmp2__size = 2 * _tmp2__size;
			_tmp2_ = g_renew (FreedesktopSession, _tmp2_, _tmp2__size + 1);
		}
		g_variant_iter_init (&_tmp6_, _tmp4_);
		_tmp7_ = g_variant_iter_next_value (&_tmp6_);
		_tmp5_.session_id = g_variant_dup_string (_tmp7_, NULL);
		g_variant_unref (_tmp7_);
		_tmp8_ = g_variant_iter_next_value (&_tmp6_);
		_tmp5_.user_id = g_variant_get_uint32 (_tmp8_);
		g_variant_unref (_tmp8_);
		_tmp9_ = g_variant_iter_next_value (&_tmp6_);
		_tmp5_.user_name = g_variant_dup_string (_tmp9_, NULL);
		g_variant_unref (_tmp9_);
		_tmp10_ = g_variant_iter_next_value (&_tmp6_);
		_tmp5_.seat_id = g_variant_dup_string (_tmp10_, NULL);
		g_variant_unref (_tmp10_);
		_tmp11_ = g_variant_iter_next_value (&_tmp6_);
		_tmp5_.object_path = g_variant_dup_string (_tmp11_, NULL);
		g_variant_unref (_tmp11_);
		_tmp2_[_tmp2__length++] = _tmp5_;
		g_variant_unref (_tmp4_);
	}
	_result_length1 = _tmp2__length1;
	_result = _tmp2_;
	g_variant_unref (_tmp1_);
	*result_length1 = _result_length1;
	g_object_unref (_reply_message);
	return _result;
}

static void
freedesktop_login_manager_proxy_freedesktop_login_manager_interface_init (FreedesktopLoginManagerIface* iface)
{
	iface->list_sessions = freedesktop_login_manager_proxy_list_sessions_async;
	iface->list_sessions_finish = freedesktop_login_manager_proxy_list_sessions_finish;
}

static void
_dbus_freedesktop_login_manager_list_sessions (FreedesktopLoginManager* self,
                                               GVariant* _parameters_,
                                               GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	FreedesktopLoginManagerListSessionsReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (FreedesktopLoginManagerListSessionsReadyData);
	_ready_data->_invocation_ = invocation;
	freedesktop_login_manager_list_sessions (self, (GAsyncReadyCallback) _dbus_freedesktop_login_manager_list_sessions_ready, _ready_data);
}

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

static void
_dbus_freedesktop_login_manager_list_sessions_ready (GObject * source_object,
                                                     GAsyncResult * _res_,
                                                     gpointer _user_data_)
{
	FreedesktopLoginManagerListSessionsReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	FreedesktopSession* result;
	gint result_length1 = 0;
	FreedesktopSession* _tmp12_;
	GVariantBuilder _tmp13_;
	gint _tmp14_;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	result = freedesktop_login_manager_list_sessions_finish ((FreedesktopLoginManager*) source_object, _res_, &result_length1, &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);
	_tmp12_ = result;
	g_variant_builder_init (&_tmp13_, G_VARIANT_TYPE ("a(susss)"));
	for (_tmp14_ = 0; _tmp14_ < result_length1; _tmp14_++) {
		GVariantBuilder _tmp15_;
		g_variant_builder_init (&_tmp15_, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_tmp15_, g_variant_new_string ((*_tmp12_).session_id));
		g_variant_builder_add_value (&_tmp15_, g_variant_new_uint32 ((*_tmp12_).user_id));
		g_variant_builder_add_value (&_tmp15_, g_variant_new_string ((*_tmp12_).user_name));
		g_variant_builder_add_value (&_tmp15_, g_variant_new_string ((*_tmp12_).seat_id));
		g_variant_builder_add_value (&_tmp15_, g_variant_new_string ((*_tmp12_).object_path));
		g_variant_builder_add_value (&_tmp13_, g_variant_builder_end (&_tmp15_));
		_tmp12_++;
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp13_));
	result = (_vala_FreedesktopSession_array_free (result, result_length1), NULL);
	_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_slice_free (FreedesktopLoginManagerListSessionsReadyData, _ready_data);
}

static void
freedesktop_login_manager_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, "ListSessions") == 0) {
		_dbus_freedesktop_login_manager_list_sessions (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
freedesktop_login_manager_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
freedesktop_login_manager_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_freedesktop_login_manager_prepare_for_sleep (GObject* _sender,
                                                   gboolean active,
                                                   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_boolean (active));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.login1.Manager", "PrepareForSleep", _arguments, NULL);
}

guint
freedesktop_login_manager_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 *) (&_freedesktop_login_manager_dbus_interface_info), &_freedesktop_login_manager_dbus_interface_vtable, data, _freedesktop_login_manager_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "prepare-for-sleep", (GCallback) _dbus_freedesktop_login_manager_prepare_for_sleep, data);
	return result;
}

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

void
freedesktop_login_session_lock (FreedesktopLoginSession* self,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_)
{
	FreedesktopLoginSessionIface* _iface_;
	_iface_ = FREEDESKTOP_LOGIN_SESSION_GET_INTERFACE (self);
	if (_iface_->lock) {
		_iface_->lock (self, _callback_, _user_data_);
	}
}

void
freedesktop_login_session_lock_finish (FreedesktopLoginSession* self,
                                       GAsyncResult* _res_,
                                       GError** error)
{
	FreedesktopLoginSessionIface* _iface_;
	_iface_ = FREEDESKTOP_LOGIN_SESSION_GET_INTERFACE (self);
	if (_iface_->lock_finish) {
		_iface_->lock_finish (self, _res_, error);
	}
}

gchar*
freedesktop_login_session_get_id (FreedesktopLoginSession* self)
{
	FreedesktopLoginSessionIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = FREEDESKTOP_LOGIN_SESSION_GET_INTERFACE (self);
	if (_iface_->get_id) {
		return _iface_->get_id (self);
	}
	return NULL;
}

gboolean
freedesktop_login_session_get_active (FreedesktopLoginSession* self)
{
	FreedesktopLoginSessionIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = FREEDESKTOP_LOGIN_SESSION_GET_INTERFACE (self);
	if (_iface_->get_active) {
		return _iface_->get_active (self);
	}
	return FALSE;
}

gboolean
freedesktop_login_session_get_locked_hint (FreedesktopLoginSession* self)
{
	FreedesktopLoginSessionIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = FREEDESKTOP_LOGIN_SESSION_GET_INTERFACE (self);
	if (_iface_->get_locked_hint) {
		return _iface_->get_locked_hint (self);
	}
	return FALSE;
}

static void
freedesktop_login_session_default_init (FreedesktopLoginSessionIface * iface,
                                        gpointer iface_data)
{
}

GType
freedesktop_login_session_get_type (void)
{
	return freedesktop_login_session_type_id;
}

GType
freedesktop_login_session_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (FreedesktopLoginSessionIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) freedesktop_login_session_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	freedesktop_login_session_type_id = g_type_module_register_type (module, G_TYPE_INTERFACE, "FreedesktopLoginSession", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (freedesktop_login_session_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (freedesktop_login_session_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) freedesktop_login_session_proxy_get_type);
	g_type_set_qdata (freedesktop_login_session_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.login1.Session");
	g_type_set_qdata (freedesktop_login_session_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_freedesktop_login_session_dbus_interface_info));
	g_type_set_qdata (freedesktop_login_session_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) freedesktop_login_session_register_object);
	return freedesktop_login_session_type_id;
}

G_DEFINE_DYNAMIC_TYPE_EXTENDED (FreedesktopLoginSessionProxy, freedesktop_login_session_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE_DYNAMIC (FREEDESKTOP_TYPE_LOGIN_SESSION, freedesktop_login_session_proxy_freedesktop_login_session_interface_init) )
static void
freedesktop_login_session_proxy_class_init (FreedesktopLoginSessionProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = freedesktop_login_session_proxy_g_signal;
}

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

static void
freedesktop_login_session_proxy_class_finalize (FreedesktopLoginSessionProxyClass* klass)
{
}

void
freedesktop_login_session_proxy_register_dynamic_type (GTypeModule* module)
{
	freedesktop_login_session_proxy_register_type (module);
}

static void
freedesktop_login_session_proxy_init (FreedesktopLoginSessionProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_freedesktop_login_session_dbus_interface_info));
}

static void
freedesktop_login_session_proxy_lock_async (FreedesktopLoginSession* self,
                                            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.login1.Session", "Lock");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_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
freedesktop_login_session_proxy_lock_finish (FreedesktopLoginSession* 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 gchar*
freedesktop_login_session_dbus_proxy_get_id (FreedesktopLoginSession* self)
{
	GVariant *_inner_reply;
	gchar* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Id");
	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.login1.Session"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Id"));
		_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 = g_variant_dup_string (_inner_reply, NULL);
	g_variant_unref (_inner_reply);
	return _result;
}

static gboolean
freedesktop_login_session_dbus_proxy_get_active (FreedesktopLoginSession* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Active");
	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.login1.Session"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Active"));
		_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) {
			gboolean _tmp16_ = FALSE;
			return _tmp16_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_boolean (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static gboolean
freedesktop_login_session_dbus_proxy_get_locked_hint (FreedesktopLoginSession* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "LockedHint");
	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.login1.Session"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("LockedHint"));
		_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) {
			gboolean _tmp17_ = FALSE;
			return _tmp17_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_boolean (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static void
freedesktop_login_session_proxy_freedesktop_login_session_interface_init (FreedesktopLoginSessionIface* iface)
{
	iface->lock = freedesktop_login_session_proxy_lock_async;
	iface->lock_finish = freedesktop_login_session_proxy_lock_finish;
	iface->get_id = freedesktop_login_session_dbus_proxy_get_id;
	iface->get_active = freedesktop_login_session_dbus_proxy_get_active;
	iface->get_locked_hint = freedesktop_login_session_dbus_proxy_get_locked_hint;
}

static void
_dbus_freedesktop_login_session_lock (FreedesktopLoginSession* self,
                                      GVariant* _parameters_,
                                      GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	FreedesktopLoginSessionLockReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (FreedesktopLoginSessionLockReadyData);
	_ready_data->_invocation_ = invocation;
	freedesktop_login_session_lock (self, (GAsyncReadyCallback) _dbus_freedesktop_login_session_lock_ready, _ready_data);
}

static void
_dbus_freedesktop_login_session_lock_ready (GObject * source_object,
                                            GAsyncResult * _res_,
                                            gpointer _user_data_)
{
	FreedesktopLoginSessionLockReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	freedesktop_login_session_lock_finish ((FreedesktopLoginSession*) source_object, _res_, &error);
	_error:
	g_slice_free (FreedesktopLoginSessionLockReadyData, _ready_data);
}

static void
freedesktop_login_session_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, "Lock") == 0) {
		_dbus_freedesktop_login_session_lock (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
_dbus_freedesktop_login_session_get_id (FreedesktopLoginSession* self)
{
	gchar* result;
	GVariant* _reply;
	result = freedesktop_login_session_get_id (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_freedesktop_login_session_get_active (FreedesktopLoginSession* self)
{
	gboolean result;
	GVariant* _reply;
	result = freedesktop_login_session_get_active (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
_dbus_freedesktop_login_session_get_locked_hint (FreedesktopLoginSession* self)
{
	gboolean result;
	GVariant* _reply;
	result = freedesktop_login_session_get_locked_hint (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
freedesktop_login_session_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, "Id") == 0) {
		return _dbus_freedesktop_login_session_get_id (object);
	} else if (strcmp (property_name, "Active") == 0) {
		return _dbus_freedesktop_login_session_get_active (object);
	} else if (strcmp (property_name, "LockedHint") == 0) {
		return _dbus_freedesktop_login_session_get_locked_hint (object);
	}
	return NULL;
}

static gboolean
freedesktop_login_session_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
freedesktop_login_session_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 *) (&_freedesktop_login_session_dbus_interface_info), &_freedesktop_login_session_dbus_interface_vtable, data, _freedesktop_login_session_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_freedesktop_login_session_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);
}

gchar*
freedesktop_time_date_get_timezone (FreedesktopTimeDate* self)
{
	FreedesktopTimeDateIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = FREEDESKTOP_TIME_DATE_GET_INTERFACE (self);
	if (_iface_->get_timezone) {
		return _iface_->get_timezone (self);
	}
	return NULL;
}

static void
freedesktop_time_date_default_init (FreedesktopTimeDateIface * iface,
                                    gpointer iface_data)
{
}

GType
freedesktop_time_date_get_type (void)
{
	return freedesktop_time_date_type_id;
}

GType
freedesktop_time_date_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (FreedesktopTimeDateIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) freedesktop_time_date_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	freedesktop_time_date_type_id = g_type_module_register_type (module, G_TYPE_INTERFACE, "FreedesktopTimeDate", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (freedesktop_time_date_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (freedesktop_time_date_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) freedesktop_time_date_proxy_get_type);
	g_type_set_qdata (freedesktop_time_date_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.timedate1");
	g_type_set_qdata (freedesktop_time_date_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_freedesktop_time_date_dbus_interface_info));
	g_type_set_qdata (freedesktop_time_date_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) freedesktop_time_date_register_object);
	return freedesktop_time_date_type_id;
}

G_DEFINE_DYNAMIC_TYPE_EXTENDED (FreedesktopTimeDateProxy, freedesktop_time_date_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE_DYNAMIC (FREEDESKTOP_TYPE_TIME_DATE, freedesktop_time_date_proxy_freedesktop_time_date_interface_init) )
static void
freedesktop_time_date_proxy_class_init (FreedesktopTimeDateProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = freedesktop_time_date_proxy_g_signal;
}

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

static void
freedesktop_time_date_proxy_class_finalize (FreedesktopTimeDateProxyClass* klass)
{
}

void
freedesktop_time_date_proxy_register_dynamic_type (GTypeModule* module)
{
	freedesktop_time_date_proxy_register_type (module);
}

static void
freedesktop_time_date_proxy_init (FreedesktopTimeDateProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_freedesktop_time_date_dbus_interface_info));
}

static gchar*
freedesktop_time_date_dbus_proxy_get_timezone (FreedesktopTimeDate* self)
{
	GVariant *_inner_reply;
	gchar* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Timezone");
	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.timedate1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Timezone"));
		_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 = g_variant_dup_string (_inner_reply, NULL);
	g_variant_unref (_inner_reply);
	return _result;
}

static void
freedesktop_time_date_proxy_freedesktop_time_date_interface_init (FreedesktopTimeDateIface* iface)
{
	iface->get_timezone = freedesktop_time_date_dbus_proxy_get_timezone;
}

static void
freedesktop_time_date_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)
{
	g_object_unref (invocation);
}

static GVariant*
_dbus_freedesktop_time_date_get_timezone (FreedesktopTimeDate* self)
{
	gchar* result;
	GVariant* _reply;
	result = freedesktop_time_date_get_timezone (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
freedesktop_time_date_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, "Timezone") == 0) {
		return _dbus_freedesktop_time_date_get_timezone (object);
	}
	return NULL;
}

static gboolean
freedesktop_time_date_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
freedesktop_time_date_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 *) (&_freedesktop_time_date_dbus_interface_info), &_freedesktop_time_date_dbus_interface_vtable, data, _freedesktop_time_date_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_freedesktop_time_date_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);
}

FreedesktopNotificationDestroyedReason
freedesktop_notification_destroyed_reason_from_uint (guint32 value)
{
	FreedesktopNotificationDestroyedReason result;
	switch (value) {
		case FREEDESKTOP_NOTIFICATION_DESTROYED_REASON_EXPIRED:
		{
			result = FREEDESKTOP_NOTIFICATION_DESTROYED_REASON_EXPIRED;
			return result;
		}
		case FREEDESKTOP_NOTIFICATION_DESTROYED_REASON_DISMISSED:
		{
			result = FREEDESKTOP_NOTIFICATION_DESTROYED_REASON_DISMISSED;
			return result;
		}
		case FREEDESKTOP_NOTIFICATION_DESTROYED_REASON_CLOSED:
		{
			result = FREEDESKTOP_NOTIFICATION_DESTROYED_REASON_CLOSED;
			return result;
		}
		default:
		{
			result = FREEDESKTOP_NOTIFICATION_DESTROYED_REASON_UNKNOWN;
			return result;
		}
	}
}

static GType
freedesktop_notification_destroyed_reason_get_type_once (void)
{
	static const GEnumValue values[] = {{FREEDESKTOP_NOTIFICATION_DESTROYED_REASON_EXPIRED, "FREEDESKTOP_NOTIFICATION_DESTROYED_REASON_EXPIRED", "expired"}, {FREEDESKTOP_NOTIFICATION_DESTROYED_REASON_DISMISSED, "FREEDESKTOP_NOTIFICATION_DESTROYED_REASON_DISMISSED", "dismissed"}, {FREEDESKTOP_NOTIFICATION_DESTROYED_REASON_CLOSED, "FREEDESKTOP_NOTIFICATION_DESTROYED_REASON_CLOSED", "closed"}, {FREEDESKTOP_NOTIFICATION_DESTROYED_REASON_UNKNOWN, "FREEDESKTOP_NOTIFICATION_DESTROYED_REASON_UNKNOWN", "unknown"}, {0, NULL, NULL}};
	GType freedesktop_notification_destroyed_reason_type_id;
	freedesktop_notification_destroyed_reason_type_id = g_enum_register_static ("FreedesktopNotificationDestroyedReason", values);
	return freedesktop_notification_destroyed_reason_type_id;
}

GType
freedesktop_notification_destroyed_reason_get_type (void)
{
	static volatile gsize freedesktop_notification_destroyed_reason_type_id__once = 0;
	if (g_once_init_enter (&freedesktop_notification_destroyed_reason_type_id__once)) {
		GType freedesktop_notification_destroyed_reason_type_id;
		freedesktop_notification_destroyed_reason_type_id = freedesktop_notification_destroyed_reason_get_type_once ();
		g_once_init_leave (&freedesktop_notification_destroyed_reason_type_id__once, freedesktop_notification_destroyed_reason_type_id);
	}
	return freedesktop_notification_destroyed_reason_type_id__once;
}

GVariant*
freedesktop_notification_urgency_to_variant (FreedesktopNotificationUrgency self)
{
	GVariant* _tmp0_;
	GVariant* result;
	_tmp0_ = g_variant_new_byte ((guint8) self);
	g_variant_ref_sink (_tmp0_);
	result = _tmp0_;
	return result;
}

static GType
freedesktop_notification_urgency_get_type_once (void)
{
	static const GEnumValue values[] = {{FREEDESKTOP_NOTIFICATION_URGENCY_LOW, "FREEDESKTOP_NOTIFICATION_URGENCY_LOW", "low"}, {FREEDESKTOP_NOTIFICATION_URGENCY_NORMAL, "FREEDESKTOP_NOTIFICATION_URGENCY_NORMAL", "normal"}, {FREEDESKTOP_NOTIFICATION_URGENCY_CRITICAL, "FREEDESKTOP_NOTIFICATION_URGENCY_CRITICAL", "critical"}, {0, NULL, NULL}};
	GType freedesktop_notification_urgency_type_id;
	freedesktop_notification_urgency_type_id = g_enum_register_static ("FreedesktopNotificationUrgency", values);
	return freedesktop_notification_urgency_type_id;
}

GType
freedesktop_notification_urgency_get_type (void)
{
	static volatile gsize freedesktop_notification_urgency_type_id__once = 0;
	if (g_once_init_enter (&freedesktop_notification_urgency_type_id__once)) {
		GType freedesktop_notification_urgency_type_id;
		freedesktop_notification_urgency_type_id = freedesktop_notification_urgency_get_type_once ();
		g_once_init_leave (&freedesktop_notification_urgency_type_id__once, freedesktop_notification_urgency_type_id);
	}
	return freedesktop_notification_urgency_type_id__once;
}

void
freedesktop_notifications_get_capabilities (FreedesktopNotifications* self,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_)
{
	FreedesktopNotificationsIface* _iface_;
	_iface_ = FREEDESKTOP_NOTIFICATIONS_GET_INTERFACE (self);
	if (_iface_->get_capabilities) {
		_iface_->get_capabilities (self, _callback_, _user_data_);
	}
}

gchar**
freedesktop_notifications_get_capabilities_finish (FreedesktopNotifications* self,
                                                   GAsyncResult* _res_,
                                                   gint* result_length1,
                                                   GError** error)
{
	FreedesktopNotificationsIface* _iface_;
	_iface_ = FREEDESKTOP_NOTIFICATIONS_GET_INTERFACE (self);
	if (_iface_->get_capabilities_finish) {
		return _iface_->get_capabilities_finish (self, _res_, result_length1, error);
	}
	return NULL;
}

void
freedesktop_notifications_get_server_information (FreedesktopNotifications* self,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_)
{
	FreedesktopNotificationsIface* _iface_;
	_iface_ = FREEDESKTOP_NOTIFICATIONS_GET_INTERFACE (self);
	if (_iface_->get_server_information) {
		_iface_->get_server_information (self, _callback_, _user_data_);
	}
}

void
freedesktop_notifications_get_server_information_finish (FreedesktopNotifications* self,
                                                         GAsyncResult* _res_,
                                                         gchar** name,
                                                         gchar** vendor,
                                                         gchar** version,
                                                         gchar** spec_version,
                                                         GError** error)
{
	FreedesktopNotificationsIface* _iface_;
	_iface_ = FREEDESKTOP_NOTIFICATIONS_GET_INTERFACE (self);
	if (_iface_->get_server_information_finish) {
		_iface_->get_server_information_finish (self, _res_, name, vendor, version, spec_version, error);
	}
}

void
freedesktop_notifications_notify (FreedesktopNotifications* self,
                                  const gchar* app_name,
                                  guint32 replaces_id,
                                  const gchar* app_icon,
                                  const gchar* summary,
                                  const gchar* body,
                                  gchar** actions,
                                  gint actions_length1,
                                  GHashTable* hints,
                                  gint32 expire_timeout,
                                  GCancellable* cancellable,
                                  GAsyncReadyCallback _callback_,
                                  gpointer _user_data_)
{
	FreedesktopNotificationsIface* _iface_;
	_iface_ = FREEDESKTOP_NOTIFICATIONS_GET_INTERFACE (self);
	if (_iface_->notify) {
		_iface_->notify (self, app_name, replaces_id, app_icon, summary, body, actions, actions_length1, hints, expire_timeout, cancellable, _callback_, _user_data_);
	}
}

guint32
freedesktop_notifications_notify_finish (FreedesktopNotifications* self,
                                         GAsyncResult* _res_,
                                         GError** error)
{
	FreedesktopNotificationsIface* _iface_;
	_iface_ = FREEDESKTOP_NOTIFICATIONS_GET_INTERFACE (self);
	if (_iface_->notify_finish) {
		return _iface_->notify_finish (self, _res_, error);
	}
	return 0U;
}

void
freedesktop_notifications_close_notification (FreedesktopNotifications* self,
                                              guint32 id,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_)
{
	FreedesktopNotificationsIface* _iface_;
	_iface_ = FREEDESKTOP_NOTIFICATIONS_GET_INTERFACE (self);
	if (_iface_->close_notification) {
		_iface_->close_notification (self, id, _callback_, _user_data_);
	}
}

void
freedesktop_notifications_close_notification_finish (FreedesktopNotifications* self,
                                                     GAsyncResult* _res_,
                                                     GError** error)
{
	FreedesktopNotificationsIface* _iface_;
	_iface_ = FREEDESKTOP_NOTIFICATIONS_GET_INTERFACE (self);
	if (_iface_->close_notification_finish) {
		_iface_->close_notification_finish (self, _res_, error);
	}
}

static void
g_cclosure_user_marshal_VOID__UINT_STRING (GClosure * closure,
                                           GValue * return_value,
                                           guint n_param_values,
                                           const GValue * param_values,
                                           gpointer invocation_hint,
                                           gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__UINT_STRING) (gpointer data1, guint32 arg_1, const char* arg_2, gpointer data2);
	register GMarshalFunc_VOID__UINT_STRING 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_STRING) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_uint (param_values + 1), g_value_get_string (param_values + 2), data2);
}

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

static void
freedesktop_notifications_default_init (FreedesktopNotificationsIface * iface,
                                        gpointer iface_data)
{
	freedesktop_notifications_signals[FREEDESKTOP_NOTIFICATIONS_ACTION_INVOKED_SIGNAL] = g_signal_new ("action-invoked", FREEDESKTOP_TYPE_NOTIFICATIONS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_STRING, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING);
	freedesktop_notifications_signals[FREEDESKTOP_NOTIFICATIONS_ACTIVATION_TOKEN_SIGNAL] = g_signal_new ("activation-token", FREEDESKTOP_TYPE_NOTIFICATIONS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_STRING, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING);
	freedesktop_notifications_signals[FREEDESKTOP_NOTIFICATIONS_NOTIFICATION_CLOSED_SIGNAL] = g_signal_new ("notification-closed", FREEDESKTOP_TYPE_NOTIFICATIONS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
}

/**
     * https://specifications.freedesktop.org/notification/latest/protocol.html
     */
GType
freedesktop_notifications_get_type (void)
{
	return freedesktop_notifications_type_id;
}

GType
freedesktop_notifications_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (FreedesktopNotificationsIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) freedesktop_notifications_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	freedesktop_notifications_type_id = g_type_module_register_type (module, G_TYPE_INTERFACE, "FreedesktopNotifications", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (freedesktop_notifications_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (freedesktop_notifications_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) freedesktop_notifications_proxy_get_type);
	g_type_set_qdata (freedesktop_notifications_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.Notifications");
	g_type_set_qdata (freedesktop_notifications_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_freedesktop_notifications_dbus_interface_info));
	g_type_set_qdata (freedesktop_notifications_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) freedesktop_notifications_register_object);
	return freedesktop_notifications_type_id;
}

G_DEFINE_DYNAMIC_TYPE_EXTENDED (FreedesktopNotificationsProxy, freedesktop_notifications_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE_DYNAMIC (FREEDESKTOP_TYPE_NOTIFICATIONS, freedesktop_notifications_proxy_freedesktop_notifications_interface_init) )
static void
freedesktop_notifications_proxy_class_init (FreedesktopNotificationsProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = freedesktop_notifications_proxy_g_signal;
}

static void
_dbus_handle_freedesktop_notifications_action_invoked (FreedesktopNotifications* self,
                                                       GVariant* parameters)
{
	GVariantIter _arguments_iter;
	guint32 id = 0U;
	GVariant* _tmp18_;
	gchar* action_key = NULL;
	GVariant* _tmp19_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp18_ = g_variant_iter_next_value (&_arguments_iter);
	id = g_variant_get_uint32 (_tmp18_);
	g_variant_unref (_tmp18_);
	_tmp19_ = g_variant_iter_next_value (&_arguments_iter);
	action_key = g_variant_dup_string (_tmp19_, NULL);
	g_variant_unref (_tmp19_);
	g_signal_emit_by_name (self, "action-invoked", id, action_key);
	_g_free0 (action_key);
}

static void
_dbus_handle_freedesktop_notifications_activation_token (FreedesktopNotifications* self,
                                                         GVariant* parameters)
{
	GVariantIter _arguments_iter;
	guint32 id = 0U;
	GVariant* _tmp20_;
	gchar* activation_token = NULL;
	GVariant* _tmp21_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp20_ = g_variant_iter_next_value (&_arguments_iter);
	id = g_variant_get_uint32 (_tmp20_);
	g_variant_unref (_tmp20_);
	_tmp21_ = g_variant_iter_next_value (&_arguments_iter);
	activation_token = g_variant_dup_string (_tmp21_, NULL);
	g_variant_unref (_tmp21_);
	g_signal_emit_by_name (self, "activation-token", id, activation_token);
	_g_free0 (activation_token);
}

static void
_dbus_handle_freedesktop_notifications_notification_closed (FreedesktopNotifications* self,
                                                            GVariant* parameters)
{
	GVariantIter _arguments_iter;
	guint32 id = 0U;
	GVariant* _tmp22_;
	guint32 reason = 0U;
	GVariant* _tmp23_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp22_ = g_variant_iter_next_value (&_arguments_iter);
	id = g_variant_get_uint32 (_tmp22_);
	g_variant_unref (_tmp22_);
	_tmp23_ = g_variant_iter_next_value (&_arguments_iter);
	reason = g_variant_get_uint32 (_tmp23_);
	g_variant_unref (_tmp23_);
	g_signal_emit_by_name (self, "notification-closed", id, reason);
}

static void
freedesktop_notifications_proxy_g_signal (GDBusProxy* proxy,
                                          const gchar* sender_name,
                                          const gchar* signal_name,
                                          GVariant* parameters)
{
	if (strcmp (signal_name, "ActionInvoked") == 0) {
		_dbus_handle_freedesktop_notifications_action_invoked ((FreedesktopNotifications*) proxy, parameters);
	} else if (strcmp (signal_name, "ActivationToken") == 0) {
		_dbus_handle_freedesktop_notifications_activation_token ((FreedesktopNotifications*) proxy, parameters);
	} else if (strcmp (signal_name, "NotificationClosed") == 0) {
		_dbus_handle_freedesktop_notifications_notification_closed ((FreedesktopNotifications*) proxy, parameters);
	}
}

static void
freedesktop_notifications_proxy_class_finalize (FreedesktopNotificationsProxyClass* klass)
{
}

void
freedesktop_notifications_proxy_register_dynamic_type (GTypeModule* module)
{
	freedesktop_notifications_proxy_register_type (module);
}

static void
freedesktop_notifications_proxy_init (FreedesktopNotificationsProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_freedesktop_notifications_dbus_interface_info));
}

static void
freedesktop_notifications_proxy_get_capabilities_async (FreedesktopNotifications* self,
                                                        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.Notifications", "GetCapabilities");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_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 gchar**
freedesktop_notifications_proxy_get_capabilities_finish (FreedesktopNotifications* self,
                                                         GAsyncResult* _res_,
                                                         gint* result_length1,
                                                         GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gchar** _result = NULL;
	gint _result_length1;
	GVariant* _tmp24_;
	gchar** _tmp25_;
	gint _tmp25__length;
	gint _tmp25__size;
	gint _tmp25__length1;
	GVariantIter _tmp26_;
	GVariant* _tmp27_;
	_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);
	_result_length1 = 0;
	_tmp24_ = g_variant_iter_next_value (&_reply_iter);
	_tmp25_ = g_new (gchar*, 5);
	_tmp25__length = 0;
	_tmp25__size = 4;
	_tmp25__length1 = 0;
	g_variant_iter_init (&_tmp26_, _tmp24_);
	for (; (_tmp27_ = g_variant_iter_next_value (&_tmp26_)) != NULL; _tmp25__length1++) {
		if (_tmp25__size == _tmp25__length) {
			_tmp25__size = 2 * _tmp25__size;
			_tmp25_ = g_renew (gchar*, _tmp25_, _tmp25__size + 1);
		}
		_tmp25_[_tmp25__length++] = g_variant_dup_string (_tmp27_, NULL);
		g_variant_unref (_tmp27_);
	}
	_result_length1 = _tmp25__length1;
	_tmp25_[_tmp25__length] = NULL;
	_result = _tmp25_;
	g_variant_unref (_tmp24_);
	*result_length1 = _result_length1;
	g_object_unref (_reply_message);
	return _result;
}

static void
freedesktop_notifications_proxy_get_server_information_async (FreedesktopNotifications* self,
                                                              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.Notifications", "GetServerInformation");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_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
freedesktop_notifications_proxy_get_server_information_finish (FreedesktopNotifications* self,
                                                               GAsyncResult* _res_,
                                                               gchar** name,
                                                               gchar** vendor,
                                                               gchar** version,
                                                               gchar** spec_version,
                                                               GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gchar* _vala_name = NULL;
	GVariant* _tmp28_;
	gchar* _vala_vendor = NULL;
	GVariant* _tmp29_;
	gchar* _vala_version = NULL;
	GVariant* _tmp30_;
	gchar* _vala_spec_version = NULL;
	GVariant* _tmp31_;
	_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;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp28_ = g_variant_iter_next_value (&_reply_iter);
	_vala_name = g_variant_dup_string (_tmp28_, NULL);
	g_variant_unref (_tmp28_);
	*name = _vala_name;
	_tmp29_ = g_variant_iter_next_value (&_reply_iter);
	_vala_vendor = g_variant_dup_string (_tmp29_, NULL);
	g_variant_unref (_tmp29_);
	*vendor = _vala_vendor;
	_tmp30_ = g_variant_iter_next_value (&_reply_iter);
	_vala_version = g_variant_dup_string (_tmp30_, NULL);
	g_variant_unref (_tmp30_);
	*version = _vala_version;
	_tmp31_ = g_variant_iter_next_value (&_reply_iter);
	_vala_spec_version = g_variant_dup_string (_tmp31_, NULL);
	g_variant_unref (_tmp31_);
	*spec_version = _vala_spec_version;
	g_object_unref (_reply_message);
}

static void
freedesktop_notifications_proxy_notify_async (FreedesktopNotifications* self,
                                              const gchar* app_name,
                                              guint32 replaces_id,
                                              const gchar* app_icon,
                                              const gchar* summary,
                                              const gchar* body,
                                              gchar** actions,
                                              gint actions_length1,
                                              GHashTable* hints,
                                              gint32 expire_timeout,
                                              GCancellable* cancellable,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	gchar** _tmp32_;
	GVariantBuilder _tmp33_;
	gint _tmp34_;
	GVariantBuilder _tmp35_;
	GHashTableIter _tmp36_;
	gpointer _tmp37_;
	gpointer _tmp38_;
	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.Notifications", "Notify");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (app_name));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (replaces_id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (app_icon));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (summary));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (body));
	_tmp32_ = actions;
	g_variant_builder_init (&_tmp33_, G_VARIANT_TYPE ("as"));
	for (_tmp34_ = 0; _tmp34_ < actions_length1; _tmp34_++) {
		g_variant_builder_add_value (&_tmp33_, g_variant_new_string (*_tmp32_));
		_tmp32_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp33_));
	g_hash_table_iter_init (&_tmp36_, hints);
	g_variant_builder_init (&_tmp35_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp36_, &_tmp37_, &_tmp38_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp37_;
		_value = (GVariant*) _tmp38_;
		g_variant_builder_add (&_tmp35_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp35_));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (expire_timeout));
	_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 guint32
freedesktop_notifications_proxy_notify_finish (FreedesktopNotifications* self,
                                               GAsyncResult* _res_,
                                               GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	guint32 _result = 0U;
	GVariant* _tmp41_;
	_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) {
		guint32 _tmp39_ = 0U;
		return _tmp39_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		guint32 _tmp40_ = 0U;
		g_object_unref (_reply_message);
		return _tmp40_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp41_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_uint32 (_tmp41_);
	g_variant_unref (_tmp41_);
	g_object_unref (_reply_message);
	return _result;
}

static void
freedesktop_notifications_proxy_close_notification_async (FreedesktopNotifications* self,
                                                          guint32 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.Notifications", "CloseNotification");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (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
freedesktop_notifications_proxy_close_notification_finish (FreedesktopNotifications* 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
freedesktop_notifications_proxy_freedesktop_notifications_interface_init (FreedesktopNotificationsIface* iface)
{
	iface->get_capabilities = freedesktop_notifications_proxy_get_capabilities_async;
	iface->get_capabilities_finish = freedesktop_notifications_proxy_get_capabilities_finish;
	iface->get_server_information = freedesktop_notifications_proxy_get_server_information_async;
	iface->get_server_information_finish = freedesktop_notifications_proxy_get_server_information_finish;
	iface->notify = freedesktop_notifications_proxy_notify_async;
	iface->notify_finish = freedesktop_notifications_proxy_notify_finish;
	iface->close_notification = freedesktop_notifications_proxy_close_notification_async;
	iface->close_notification_finish = freedesktop_notifications_proxy_close_notification_finish;
}

static void
_dbus_freedesktop_notifications_get_capabilities (FreedesktopNotifications* self,
                                                  GVariant* _parameters_,
                                                  GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	FreedesktopNotificationsGetCapabilitiesReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (FreedesktopNotificationsGetCapabilitiesReadyData);
	_ready_data->_invocation_ = invocation;
	freedesktop_notifications_get_capabilities (self, (GAsyncReadyCallback) _dbus_freedesktop_notifications_get_capabilities_ready, _ready_data);
}

static void
_dbus_freedesktop_notifications_get_capabilities_ready (GObject * source_object,
                                                        GAsyncResult * _res_,
                                                        gpointer _user_data_)
{
	FreedesktopNotificationsGetCapabilitiesReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gchar** result;
	gint result_length1 = 0;
	gchar** _tmp42_;
	GVariantBuilder _tmp43_;
	gint _tmp44_;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	result = freedesktop_notifications_get_capabilities_finish ((FreedesktopNotifications*) source_object, _res_, &result_length1, &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);
	_tmp42_ = result;
	g_variant_builder_init (&_tmp43_, G_VARIANT_TYPE ("as"));
	for (_tmp44_ = 0; _tmp44_ < result_length1; _tmp44_++) {
		g_variant_builder_add_value (&_tmp43_, g_variant_new_string (*_tmp42_));
		_tmp42_++;
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp43_));
	result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL);
	_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_slice_free (FreedesktopNotificationsGetCapabilitiesReadyData, _ready_data);
}

static void
_dbus_freedesktop_notifications_get_server_information (FreedesktopNotifications* self,
                                                        GVariant* _parameters_,
                                                        GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	FreedesktopNotificationsGetServerInformationReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (FreedesktopNotificationsGetServerInformationReadyData);
	_ready_data->_invocation_ = invocation;
	freedesktop_notifications_get_server_information (self, (GAsyncReadyCallback) _dbus_freedesktop_notifications_get_server_information_ready, _ready_data);
}

static void
_dbus_freedesktop_notifications_get_server_information_ready (GObject * source_object,
                                                              GAsyncResult * _res_,
                                                              gpointer _user_data_)
{
	FreedesktopNotificationsGetServerInformationReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gchar* name = NULL;
	gchar* vendor = NULL;
	gchar* version = NULL;
	gchar* spec_version = NULL;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	freedesktop_notifications_get_server_information_finish ((FreedesktopNotifications*) source_object, _res_, &name, &vendor, &version, &spec_version, &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_string (name));
	g_variant_builder_add_value (&_reply_builder, g_variant_new_string (vendor));
	g_variant_builder_add_value (&_reply_builder, g_variant_new_string (version));
	g_variant_builder_add_value (&_reply_builder, g_variant_new_string (spec_version));
	_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 (name);
	_g_free0 (vendor);
	_g_free0 (version);
	_g_free0 (spec_version);
	g_slice_free (FreedesktopNotificationsGetServerInformationReadyData, _ready_data);
}

static void
_dbus_freedesktop_notifications_notify (FreedesktopNotifications* self,
                                        GVariant* _parameters_,
                                        GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	FreedesktopNotificationsNotifyReadyData* _ready_data;
	GVariant* _tmp45_;
	GVariant* _tmp46_;
	GVariant* _tmp47_;
	GVariant* _tmp48_;
	GVariant* _tmp49_;
	GVariant* _tmp50_;
	gchar** _tmp51_;
	gint _tmp51__length;
	gint _tmp51__size;
	gint _tmp51__length1;
	GVariantIter _tmp52_;
	GVariant* _tmp53_;
	GVariant* _tmp54_;
	GHashTable* _tmp55_;
	GVariantIter _tmp56_;
	GVariant* _tmp57_;
	GVariant* _tmp58_;
	GVariant* _tmp59_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (FreedesktopNotificationsNotifyReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp45_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->app_name = g_variant_dup_string (_tmp45_, NULL);
	g_variant_unref (_tmp45_);
	_tmp46_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->replaces_id = g_variant_get_uint32 (_tmp46_);
	g_variant_unref (_tmp46_);
	_tmp47_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->app_icon = g_variant_dup_string (_tmp47_, NULL);
	g_variant_unref (_tmp47_);
	_tmp48_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->summary = g_variant_dup_string (_tmp48_, NULL);
	g_variant_unref (_tmp48_);
	_tmp49_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->body = g_variant_dup_string (_tmp49_, NULL);
	g_variant_unref (_tmp49_);
	_tmp50_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp51_ = g_new (gchar*, 5);
	_tmp51__length = 0;
	_tmp51__size = 4;
	_tmp51__length1 = 0;
	g_variant_iter_init (&_tmp52_, _tmp50_);
	for (; (_tmp53_ = g_variant_iter_next_value (&_tmp52_)) != NULL; _tmp51__length1++) {
		if (_tmp51__size == _tmp51__length) {
			_tmp51__size = 2 * _tmp51__size;
			_tmp51_ = g_renew (gchar*, _tmp51_, _tmp51__size + 1);
		}
		_tmp51_[_tmp51__length++] = g_variant_dup_string (_tmp53_, NULL);
		g_variant_unref (_tmp53_);
	}
	_ready_data->actions_length1 = _tmp51__length1;
	_tmp51_[_tmp51__length] = NULL;
	_ready_data->actions = _tmp51_;
	g_variant_unref (_tmp50_);
	_tmp54_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp55_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp56_, _tmp54_);
	while (g_variant_iter_loop (&_tmp56_, "{?*}", &_tmp57_, &_tmp58_)) {
		g_hash_table_insert (_tmp55_, g_variant_dup_string (_tmp57_, NULL), g_variant_get_variant (_tmp58_));
	}
	_ready_data->hints = _tmp55_;
	g_variant_unref (_tmp54_);
	_tmp59_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->expire_timeout = g_variant_get_int32 (_tmp59_);
	g_variant_unref (_tmp59_);
	freedesktop_notifications_notify (self, _ready_data->app_name, _ready_data->replaces_id, _ready_data->app_icon, _ready_data->summary, _ready_data->body, _ready_data->actions, _ready_data->actions_length1, _ready_data->hints, _ready_data->expire_timeout, NULL, (GAsyncReadyCallback) _dbus_freedesktop_notifications_notify_ready, _ready_data);
	_error:
	;
}

static void
_dbus_freedesktop_notifications_notify_ready (GObject * source_object,
                                              GAsyncResult * _res_,
                                              gpointer _user_data_)
{
	FreedesktopNotificationsNotifyReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	guint32 result;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	result = freedesktop_notifications_notify_finish ((FreedesktopNotifications*) 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_uint32 (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->app_name);
	_g_free0 (_ready_data->app_icon);
	_g_free0 (_ready_data->summary);
	_g_free0 (_ready_data->body);
	_ready_data->actions = (_vala_array_free (_ready_data->actions, _ready_data->actions_length1, (GDestroyNotify) g_free), NULL);
	_g_hash_table_unref0 (_ready_data->hints);
	g_slice_free (FreedesktopNotificationsNotifyReadyData, _ready_data);
}

static void
_dbus_freedesktop_notifications_close_notification (FreedesktopNotifications* self,
                                                    GVariant* _parameters_,
                                                    GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	FreedesktopNotificationsCloseNotificationReadyData* _ready_data;
	GVariant* _tmp60_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (FreedesktopNotificationsCloseNotificationReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp60_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->id = g_variant_get_uint32 (_tmp60_);
	g_variant_unref (_tmp60_);
	freedesktop_notifications_close_notification (self, _ready_data->id, (GAsyncReadyCallback) _dbus_freedesktop_notifications_close_notification_ready, _ready_data);
}

static void
_dbus_freedesktop_notifications_close_notification_ready (GObject * source_object,
                                                          GAsyncResult * _res_,
                                                          gpointer _user_data_)
{
	FreedesktopNotificationsCloseNotificationReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	freedesktop_notifications_close_notification_finish ((FreedesktopNotifications*) 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_slice_free (FreedesktopNotificationsCloseNotificationReadyData, _ready_data);
}

static void
freedesktop_notifications_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, "GetCapabilities") == 0) {
		_dbus_freedesktop_notifications_get_capabilities (object, parameters, invocation);
	} else if (strcmp (method_name, "GetServerInformation") == 0) {
		_dbus_freedesktop_notifications_get_server_information (object, parameters, invocation);
	} else if (strcmp (method_name, "Notify") == 0) {
		_dbus_freedesktop_notifications_notify (object, parameters, invocation);
	} else if (strcmp (method_name, "CloseNotification") == 0) {
		_dbus_freedesktop_notifications_close_notification (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
freedesktop_notifications_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
freedesktop_notifications_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_freedesktop_notifications_action_invoked (GObject* _sender,
                                                guint32 id,
                                                const gchar* action_key,
                                                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 (id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (action_key));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.Notifications", "ActionInvoked", _arguments, NULL);
}

static void
_dbus_freedesktop_notifications_activation_token (GObject* _sender,
                                                  guint32 id,
                                                  const gchar* activation_token,
                                                  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 (id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (activation_token));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.Notifications", "ActivationToken", _arguments, NULL);
}

static void
_dbus_freedesktop_notifications_notification_closed (GObject* _sender,
                                                     guint32 id,
                                                     guint32 reason,
                                                     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 (id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (reason));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.Notifications", "NotificationClosed", _arguments, NULL);
}

guint
freedesktop_notifications_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 *) (&_freedesktop_notifications_dbus_interface_info), &_freedesktop_notifications_dbus_interface_vtable, data, _freedesktop_notifications_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "action-invoked", (GCallback) _dbus_freedesktop_notifications_action_invoked, data);
	g_signal_connect (object, "activation-token", (GCallback) _dbus_freedesktop_notifications_activation_token, data);
	g_signal_connect (object, "notification-closed", (GCallback) _dbus_freedesktop_notifications_notification_closed, data);
	return result;
}

static void
_freedesktop_notifications_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_freedesktop_notifications_action_invoked, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_freedesktop_notifications_activation_token, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_freedesktop_notifications_notification_closed, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

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);
}

