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

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

#include "ft_plugin_kde.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

typedef GDBusProxy KdeNotificationsProxy;
typedef GDBusProxyClass KdeNotificationsProxyClass;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _KdeNotificationsInhibitReadyData KdeNotificationsInhibitReadyData;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
typedef struct _KdeNotificationsUninhibitReadyData KdeNotificationsUninhibitReadyData;

struct _KdeNotificationsInhibitReadyData {
	GDBusMethodInvocation* _invocation_;
	gchar* desktop_entry;
	gchar* reason;
	GHashTable* hints;
};

struct _KdeNotificationsUninhibitReadyData {
	GDBusMethodInvocation* _invocation_;
	guint32 inhibitor_id;
};

static GType kde_notifications_type_id = 0;

static void kde_notifications_proxy_g_signal (GDBusProxy* proxy,
                                       const gchar* sender_name,
                                       const gchar* signal_name,
                                       GVariant* parameters);
static void kde_notifications_proxy_get_server_information (KdeNotifications* self,
                                                     gchar** name,
                                                     gchar** vendor,
                                                     gchar** version,
                                                     gchar** spec_version,
                                                     GError** error);
static void _vala_g_async_ready_callback (GObject *source_object,
                                   GAsyncResult *res,
                                   void *user_data);
static void kde_notifications_proxy_inhibit_async (KdeNotifications* self,
                                            const gchar* desktop_entry,
                                            const gchar* reason,
                                            GHashTable* hints,
                                            GCancellable* cancellable,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
static guint32 kde_notifications_proxy_inhibit_finish (KdeNotifications* self,
                                                GAsyncResult* _res_,
                                                GError** error);
static void kde_notifications_proxy_uninhibit_async (KdeNotifications* self,
                                              guint32 inhibitor_id,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_);
static void kde_notifications_proxy_uninhibit_finish (KdeNotifications* self,
                                               GAsyncResult* _res_,
                                               GError** error);
static gboolean kde_notifications_dbus_proxy_get_inhibited (KdeNotifications* self);
static void kde_notifications_proxy_kde_notifications_interface_init (KdeNotificationsIface* iface);
static void _dbus_kde_notifications_get_server_information (KdeNotifications* self,
                                                     GVariant* _parameters_,
                                                     GDBusMethodInvocation* invocation);
static void _dbus_kde_notifications_inhibit (KdeNotifications* self,
                                      GVariant* _parameters_,
                                      GDBusMethodInvocation* invocation);
static void _dbus_kde_notifications_inhibit_ready (GObject * source_object,
                                            GAsyncResult * _res_,
                                            gpointer _user_data_);
static void _dbus_kde_notifications_uninhibit (KdeNotifications* self,
                                        GVariant* _parameters_,
                                        GDBusMethodInvocation* invocation);
static void _dbus_kde_notifications_uninhibit_ready (GObject * source_object,
                                              GAsyncResult * _res_,
                                              gpointer _user_data_);
static void kde_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* kde_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 GVariant* _dbus_kde_notifications_get_inhibited (KdeNotifications* self);
static gboolean kde_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 _kde_notifications_unregister_object (gpointer user_data);

static const GDBusArgInfo _kde_notifications_dbus_arg_info_get_server_information_name = {-1, "name", "s", NULL};
static const GDBusArgInfo _kde_notifications_dbus_arg_info_get_server_information_vendor = {-1, "vendor", "s", NULL};
static const GDBusArgInfo _kde_notifications_dbus_arg_info_get_server_information_version = {-1, "version", "s", NULL};
static const GDBusArgInfo _kde_notifications_dbus_arg_info_get_server_information_spec_version = {-1, "spec_version", "s", NULL};
static const GDBusArgInfo * const _kde_notifications_dbus_arg_info_get_server_information_in[] = {NULL};
static const GDBusArgInfo * const _kde_notifications_dbus_arg_info_get_server_information_out[] = {&_kde_notifications_dbus_arg_info_get_server_information_name, &_kde_notifications_dbus_arg_info_get_server_information_vendor, &_kde_notifications_dbus_arg_info_get_server_information_version, &_kde_notifications_dbus_arg_info_get_server_information_spec_version, NULL};
static const GDBusMethodInfo _kde_notifications_dbus_method_info_get_server_information = {-1, "GetServerInformation", (GDBusArgInfo **) (&_kde_notifications_dbus_arg_info_get_server_information_in), (GDBusArgInfo **) (&_kde_notifications_dbus_arg_info_get_server_information_out), NULL};
static const GDBusArgInfo _kde_notifications_dbus_arg_info_inhibit_desktop_entry = {-1, "desktop_entry", "s", NULL};
static const GDBusArgInfo _kde_notifications_dbus_arg_info_inhibit_reason = {-1, "reason", "s", NULL};
static const GDBusArgInfo _kde_notifications_dbus_arg_info_inhibit_hints = {-1, "hints", "a{sv}", NULL};
static const GDBusArgInfo _kde_notifications_dbus_arg_info_inhibit_result = {-1, "result", "u", NULL};
static const GDBusArgInfo * const _kde_notifications_dbus_arg_info_inhibit_in[] = {&_kde_notifications_dbus_arg_info_inhibit_desktop_entry, &_kde_notifications_dbus_arg_info_inhibit_reason, &_kde_notifications_dbus_arg_info_inhibit_hints, NULL};
static const GDBusArgInfo * const _kde_notifications_dbus_arg_info_inhibit_out[] = {&_kde_notifications_dbus_arg_info_inhibit_result, NULL};
static const GDBusMethodInfo _kde_notifications_dbus_method_info_inhibit = {-1, "Inhibit", (GDBusArgInfo **) (&_kde_notifications_dbus_arg_info_inhibit_in), (GDBusArgInfo **) (&_kde_notifications_dbus_arg_info_inhibit_out), NULL};
static const GDBusArgInfo _kde_notifications_dbus_arg_info_uninhibit_inhibitor_id = {-1, "inhibitor_id", "u", NULL};
static const GDBusArgInfo * const _kde_notifications_dbus_arg_info_uninhibit_in[] = {&_kde_notifications_dbus_arg_info_uninhibit_inhibitor_id, NULL};
static const GDBusArgInfo * const _kde_notifications_dbus_arg_info_uninhibit_out[] = {NULL};
static const GDBusMethodInfo _kde_notifications_dbus_method_info_uninhibit = {-1, "UnInhibit", (GDBusArgInfo **) (&_kde_notifications_dbus_arg_info_uninhibit_in), (GDBusArgInfo **) (&_kde_notifications_dbus_arg_info_uninhibit_out), NULL};
static const GDBusMethodInfo * const _kde_notifications_dbus_method_info[] = {&_kde_notifications_dbus_method_info_get_server_information, &_kde_notifications_dbus_method_info_inhibit, &_kde_notifications_dbus_method_info_uninhibit, NULL};
static const GDBusSignalInfo * const _kde_notifications_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo _kde_notifications_dbus_property_info_inhibited = {-1, "Inhibited", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _kde_notifications_dbus_property_info[] = {&_kde_notifications_dbus_property_info_inhibited, NULL};
static const GDBusInterfaceInfo _kde_notifications_dbus_interface_info = {-1, "org.freedesktop.Notifications", (GDBusMethodInfo **) (&_kde_notifications_dbus_method_info), (GDBusSignalInfo **) (&_kde_notifications_dbus_signal_info), (GDBusPropertyInfo **) (&_kde_notifications_dbus_property_info), NULL};
static const GDBusInterfaceVTable _kde_notifications_dbus_interface_vtable = {kde_notifications_dbus_interface_method_call, kde_notifications_dbus_interface_get_property, kde_notifications_dbus_interface_set_property};

void
kde_notifications_get_server_information (KdeNotifications* self,
                                          gchar** name,
                                          gchar** vendor,
                                          gchar** version,
                                          gchar** spec_version,
                                          GError** error)
{
	KdeNotificationsIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = KDE_NOTIFICATIONS_GET_INTERFACE (self);
	if (_iface_->get_server_information) {
		_iface_->get_server_information (self, name, vendor, version, spec_version, error);
	}
}

void
kde_notifications_inhibit (KdeNotifications* self,
                           const gchar* desktop_entry,
                           const gchar* reason,
                           GHashTable* hints,
                           GCancellable* cancellable,
                           GAsyncReadyCallback _callback_,
                           gpointer _user_data_)
{
	KdeNotificationsIface* _iface_;
	_iface_ = KDE_NOTIFICATIONS_GET_INTERFACE (self);
	if (_iface_->inhibit) {
		_iface_->inhibit (self, desktop_entry, reason, hints, cancellable, _callback_, _user_data_);
	}
}

guint32
kde_notifications_inhibit_finish (KdeNotifications* self,
                                  GAsyncResult* _res_,
                                  GError** error)
{
	KdeNotificationsIface* _iface_;
	_iface_ = KDE_NOTIFICATIONS_GET_INTERFACE (self);
	if (_iface_->inhibit_finish) {
		return _iface_->inhibit_finish (self, _res_, error);
	}
	return 0U;
}

void
kde_notifications_uninhibit (KdeNotifications* self,
                             guint32 inhibitor_id,
                             GAsyncReadyCallback _callback_,
                             gpointer _user_data_)
{
	KdeNotificationsIface* _iface_;
	_iface_ = KDE_NOTIFICATIONS_GET_INTERFACE (self);
	if (_iface_->uninhibit) {
		_iface_->uninhibit (self, inhibitor_id, _callback_, _user_data_);
	}
}

void
kde_notifications_uninhibit_finish (KdeNotifications* self,
                                    GAsyncResult* _res_,
                                    GError** error)
{
	KdeNotificationsIface* _iface_;
	_iface_ = KDE_NOTIFICATIONS_GET_INTERFACE (self);
	if (_iface_->uninhibit_finish) {
		_iface_->uninhibit_finish (self, _res_, error);
	}
}

gboolean
kde_notifications_get_inhibited (KdeNotifications* self)
{
	KdeNotificationsIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = KDE_NOTIFICATIONS_GET_INTERFACE (self);
	if (_iface_->get_inhibited) {
		return _iface_->get_inhibited (self);
	}
	return FALSE;
}

static void
kde_notifications_default_init (KdeNotificationsIface * iface,
                                gpointer iface_data)
{
}

/**
     * Not part of Freedesktop spec
     *
     * See https://invent.kde.org/plasma/plasma-workspace/-/blob/master/libnotificationmanager/server_p.cpp
     */
GType
kde_notifications_get_type (void)
{
	return kde_notifications_type_id;
}

GType
kde_notifications_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (KdeNotificationsIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) kde_notifications_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	kde_notifications_type_id = g_type_module_register_type (module, G_TYPE_INTERFACE, "KdeNotifications", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (kde_notifications_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (kde_notifications_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) kde_notifications_proxy_get_type);
	g_type_set_qdata (kde_notifications_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.Notifications");
	g_type_set_qdata (kde_notifications_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_kde_notifications_dbus_interface_info));
	g_type_set_qdata (kde_notifications_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) kde_notifications_register_object);
	return kde_notifications_type_id;
}

G_DEFINE_DYNAMIC_TYPE_EXTENDED (KdeNotificationsProxy, kde_notifications_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE_DYNAMIC (KDE_TYPE_NOTIFICATIONS, kde_notifications_proxy_kde_notifications_interface_init) )
static void
kde_notifications_proxy_class_init (KdeNotificationsProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = kde_notifications_proxy_g_signal;
}

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

static void
kde_notifications_proxy_class_finalize (KdeNotificationsProxyClass* klass)
{
}

void
kde_notifications_proxy_register_dynamic_type (GTypeModule* module)
{
	kde_notifications_proxy_register_type (module);
}

static void
kde_notifications_proxy_init (KdeNotificationsProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_kde_notifications_dbus_interface_info));
}

static void
kde_notifications_proxy_get_server_information (KdeNotifications* self,
                                                gchar** name,
                                                gchar** vendor,
                                                gchar** version,
                                                gchar** spec_version,
                                                GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gchar* _vala_name = NULL;
	GVariant* _tmp0_;
	gchar* _vala_vendor = NULL;
	GVariant* _tmp1_;
	gchar* _vala_version = NULL;
	GVariant* _tmp2_;
	gchar* _vala_spec_version = NULL;
	GVariant* _tmp3_;
	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);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp0_ = g_variant_iter_next_value (&_reply_iter);
	_vala_name = g_variant_dup_string (_tmp0_, NULL);
	g_variant_unref (_tmp0_);
	*name = _vala_name;
	_tmp1_ = g_variant_iter_next_value (&_reply_iter);
	_vala_vendor = g_variant_dup_string (_tmp1_, NULL);
	g_variant_unref (_tmp1_);
	*vendor = _vala_vendor;
	_tmp2_ = g_variant_iter_next_value (&_reply_iter);
	_vala_version = g_variant_dup_string (_tmp2_, NULL);
	g_variant_unref (_tmp2_);
	*version = _vala_version;
	_tmp3_ = g_variant_iter_next_value (&_reply_iter);
	_vala_spec_version = g_variant_dup_string (_tmp3_, NULL);
	g_variant_unref (_tmp3_);
	*spec_version = _vala_spec_version;
	g_object_unref (_reply_message);
}

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
kde_notifications_proxy_inhibit_async (KdeNotifications* self,
                                       const gchar* desktop_entry,
                                       const gchar* reason,
                                       GHashTable* hints,
                                       GCancellable* cancellable,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GVariantBuilder _tmp4_;
	GHashTableIter _tmp5_;
	gpointer _tmp6_;
	gpointer _tmp7_;
	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", "Inhibit");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (desktop_entry));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (reason));
	g_hash_table_iter_init (&_tmp5_, hints);
	g_variant_builder_init (&_tmp4_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp5_, &_tmp6_, &_tmp7_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp6_;
		_value = (GVariant*) _tmp7_;
		g_variant_builder_add (&_tmp4_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp4_));
	_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
kde_notifications_proxy_inhibit_finish (KdeNotifications* self,
                                        GAsyncResult* _res_,
                                        GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	guint32 _result = 0U;
	GVariant* _tmp10_;
	_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 _tmp8_ = 0U;
		return _tmp8_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		guint32 _tmp9_ = 0U;
		g_object_unref (_reply_message);
		return _tmp9_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp10_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_uint32 (_tmp10_);
	g_variant_unref (_tmp10_);
	g_object_unref (_reply_message);
	return _result;
}

static void
kde_notifications_proxy_uninhibit_async (KdeNotifications* self,
                                         guint32 inhibitor_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", "UnInhibit");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (inhibitor_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
kde_notifications_proxy_uninhibit_finish (KdeNotifications* 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 gboolean
kde_notifications_dbus_proxy_get_inhibited (KdeNotifications* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Inhibited");
	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.Notifications"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Inhibited"));
		_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 _tmp11_ = FALSE;
			return _tmp11_;
		}
		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
kde_notifications_proxy_kde_notifications_interface_init (KdeNotificationsIface* iface)
{
	iface->get_server_information = kde_notifications_proxy_get_server_information;
	iface->inhibit = kde_notifications_proxy_inhibit_async;
	iface->inhibit_finish = kde_notifications_proxy_inhibit_finish;
	iface->uninhibit = kde_notifications_proxy_uninhibit_async;
	iface->uninhibit_finish = kde_notifications_proxy_uninhibit_finish;
	iface->get_inhibited = kde_notifications_dbus_proxy_get_inhibited;
}

static void
_dbus_kde_notifications_get_server_information (KdeNotifications* self,
                                                GVariant* _parameters_,
                                                GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gchar* name = NULL;
	gchar* vendor = NULL;
	gchar* version = NULL;
	gchar* spec_version = NULL;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	kde_notifications_get_server_information (self, &name, &vendor, &version, &spec_version, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	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);
	_g_free0 (name);
	_g_free0 (vendor);
	_g_free0 (version);
	_g_free0 (spec_version);
}

static void
_dbus_kde_notifications_inhibit (KdeNotifications* self,
                                 GVariant* _parameters_,
                                 GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	KdeNotificationsInhibitReadyData* _ready_data;
	GVariant* _tmp12_;
	GVariant* _tmp13_;
	GVariant* _tmp14_;
	GHashTable* _tmp15_;
	GVariantIter _tmp16_;
	GVariant* _tmp17_;
	GVariant* _tmp18_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (KdeNotificationsInhibitReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp12_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->desktop_entry = g_variant_dup_string (_tmp12_, NULL);
	g_variant_unref (_tmp12_);
	_tmp13_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->reason = g_variant_dup_string (_tmp13_, NULL);
	g_variant_unref (_tmp13_);
	_tmp14_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp15_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp16_, _tmp14_);
	while (g_variant_iter_loop (&_tmp16_, "{?*}", &_tmp17_, &_tmp18_)) {
		g_hash_table_insert (_tmp15_, g_variant_dup_string (_tmp17_, NULL), g_variant_get_variant (_tmp18_));
	}
	_ready_data->hints = _tmp15_;
	g_variant_unref (_tmp14_);
	kde_notifications_inhibit (self, _ready_data->desktop_entry, _ready_data->reason, _ready_data->hints, NULL, (GAsyncReadyCallback) _dbus_kde_notifications_inhibit_ready, _ready_data);
	_error:
	;
}

static void
_dbus_kde_notifications_inhibit_ready (GObject * source_object,
                                       GAsyncResult * _res_,
                                       gpointer _user_data_)
{
	KdeNotificationsInhibitReadyData* _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 = kde_notifications_inhibit_finish ((KdeNotifications*) 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->desktop_entry);
	_g_free0 (_ready_data->reason);
	_g_hash_table_unref0 (_ready_data->hints);
	g_slice_free (KdeNotificationsInhibitReadyData, _ready_data);
}

static void
_dbus_kde_notifications_uninhibit (KdeNotifications* self,
                                   GVariant* _parameters_,
                                   GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	KdeNotificationsUninhibitReadyData* _ready_data;
	GVariant* _tmp19_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (KdeNotificationsUninhibitReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp19_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->inhibitor_id = g_variant_get_uint32 (_tmp19_);
	g_variant_unref (_tmp19_);
	kde_notifications_uninhibit (self, _ready_data->inhibitor_id, (GAsyncReadyCallback) _dbus_kde_notifications_uninhibit_ready, _ready_data);
}

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

static void
kde_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, "GetServerInformation") == 0) {
		_dbus_kde_notifications_get_server_information (object, parameters, invocation);
	} else if (strcmp (method_name, "Inhibit") == 0) {
		_dbus_kde_notifications_inhibit (object, parameters, invocation);
	} else if (strcmp (method_name, "UnInhibit") == 0) {
		_dbus_kde_notifications_uninhibit (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
_dbus_kde_notifications_get_inhibited (KdeNotifications* self)
{
	gboolean result;
	GVariant* _reply;
	result = kde_notifications_get_inhibited (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
kde_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)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (property_name, "Inhibited") == 0) {
		return _dbus_kde_notifications_get_inhibited (object);
	}
	return NULL;
}

static gboolean
kde_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;
}

guint
kde_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 *) (&_kde_notifications_dbus_interface_info), &_kde_notifications_dbus_interface_vtable, data, _kde_notifications_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

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

