/* MediaFeedback.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from MediaFeedback.vala, do not modify */

/*
 * Copyright 2016 Rico Tzschichholz
 * Copyright 2018 elementary LLC. (https://elementary.io)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib-object.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.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
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define GREETER_COMPOSITOR_TYPE_DBUS_NOTIFICATIONS (greeter_compositor_dbus_notifications_get_type ())
#define GREETER_COMPOSITOR_DBUS_NOTIFICATIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GREETER_COMPOSITOR_TYPE_DBUS_NOTIFICATIONS, GreeterCompositorDBusNotifications))
#define GREETER_COMPOSITOR_IS_DBUS_NOTIFICATIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GREETER_COMPOSITOR_TYPE_DBUS_NOTIFICATIONS))
#define GREETER_COMPOSITOR_DBUS_NOTIFICATIONS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GREETER_COMPOSITOR_TYPE_DBUS_NOTIFICATIONS, GreeterCompositorDBusNotificationsIface))

typedef struct _GreeterCompositorDBusNotifications GreeterCompositorDBusNotifications;
typedef struct _GreeterCompositorDBusNotificationsIface GreeterCompositorDBusNotificationsIface;

#define GREETER_COMPOSITOR_TYPE_DBUS_NOTIFICATIONS_PROXY (greeter_compositor_dbus_notifications_proxy_get_type ())
typedef GDBusProxy GreeterCompositorDBusNotificationsProxy;
typedef GDBusProxyClass GreeterCompositorDBusNotificationsProxyClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))

#define GREETER_COMPOSITOR_TYPE_MEDIA_FEEDBACK (greeter_compositor_media_feedback_get_type ())
#define GREETER_COMPOSITOR_MEDIA_FEEDBACK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GREETER_COMPOSITOR_TYPE_MEDIA_FEEDBACK, GreeterCompositorMediaFeedback))
#define GREETER_COMPOSITOR_MEDIA_FEEDBACK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GREETER_COMPOSITOR_TYPE_MEDIA_FEEDBACK, GreeterCompositorMediaFeedbackClass))
#define GREETER_COMPOSITOR_IS_MEDIA_FEEDBACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GREETER_COMPOSITOR_TYPE_MEDIA_FEEDBACK))
#define GREETER_COMPOSITOR_IS_MEDIA_FEEDBACK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GREETER_COMPOSITOR_TYPE_MEDIA_FEEDBACK))
#define GREETER_COMPOSITOR_MEDIA_FEEDBACK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GREETER_COMPOSITOR_TYPE_MEDIA_FEEDBACK, GreeterCompositorMediaFeedbackClass))

typedef struct _GreeterCompositorMediaFeedback GreeterCompositorMediaFeedback;
typedef struct _GreeterCompositorMediaFeedbackClass GreeterCompositorMediaFeedbackClass;
typedef struct _GreeterCompositorMediaFeedbackPrivate GreeterCompositorMediaFeedbackPrivate;
enum  {
	GREETER_COMPOSITOR_MEDIA_FEEDBACK_0_PROPERTY,
	GREETER_COMPOSITOR_MEDIA_FEEDBACK_NUM_PROPERTIES
};
static GParamSpec* greeter_compositor_media_feedback_properties[GREETER_COMPOSITOR_MEDIA_FEEDBACK_NUM_PROPERTIES];
typedef struct _GreeterCompositorMediaFeedbackFeedback GreeterCompositorMediaFeedbackFeedback;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _Block20Data Block20Data;
#define _g_thread_unref0(var) ((var == NULL) ? NULL : (var = (g_thread_unref (var), NULL)))
#define _greeter_compositor_media_feedback_feedback_free0(var) ((var == NULL) ? NULL : (var = (greeter_compositor_media_feedback_feedback_free (var), NULL)))
#define _g_thread_pool_free0(var) ((var == NULL) ? NULL : (var = (g_thread_pool_free (var, FALSE, TRUE), NULL)))
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _GreeterCompositorDBusNotificationsIface {
	GTypeInterface parent_iface;
	guint32 (*notify) (GreeterCompositorDBusNotifications* 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, GError** error);
};

struct _GreeterCompositorMediaFeedback {
	GObject parent_instance;
	GreeterCompositorMediaFeedbackPrivate * priv;
};

struct _GreeterCompositorMediaFeedbackClass {
	GObjectClass parent_class;
};

struct _GreeterCompositorMediaFeedbackPrivate {
	GDBusConnection* connection;
	GreeterCompositorDBusNotifications* notifications;
	GRecMutex __lock_notifications;
	guint dbus_name_owner_changed_signal_id;
	guint32 notification_id;
};

struct _Block20Data {
	int _ref_count_;
	GreeterCompositorMediaFeedback* self;
	GDBusConnection* connection;
};

struct _GreeterCompositorMediaFeedbackFeedback {
	gchar* icon;
	gint32 level;
};

static gint GreeterCompositorMediaFeedback_private_offset;
static gpointer greeter_compositor_media_feedback_parent_class = NULL;
static GreeterCompositorMediaFeedback* greeter_compositor_media_feedback_instance;
static GreeterCompositorMediaFeedback* greeter_compositor_media_feedback_instance = NULL;
static GThreadPool* greeter_compositor_media_feedback_pool;
static GThreadPool* greeter_compositor_media_feedback_pool = NULL;

VALA_EXTERN GType greeter_compositor_dbus_notifications_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint greeter_compositor_dbus_notifications_register_object (void* object,
                                                             GDBusConnection* connection,
                                                             const gchar* path,
                                                             GError** error);
VALA_EXTERN GType greeter_compositor_dbus_notifications_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GreeterCompositorDBusNotifications, g_object_unref)
VALA_EXTERN guint32 greeter_compositor_dbus_notifications_notify (GreeterCompositorDBusNotifications* 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,
                                                      GError** error);
static GType greeter_compositor_dbus_notifications_get_type_once (void);
static void greeter_compositor_dbus_notifications_proxy_g_signal (GDBusProxy* proxy,
                                                           const gchar* sender_name,
                                                           const gchar* signal_name,
                                                           GVariant* parameters);
static guint32 greeter_compositor_dbus_notifications_proxy_notify (GreeterCompositorDBusNotifications* 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,
                                                            GError** error);
static void greeter_compositor_dbus_notifications_proxy_greeter_compositor_dbus_notifications_interface_init (GreeterCompositorDBusNotificationsIface* iface);
static void _dbus_greeter_compositor_dbus_notifications_notify (GreeterCompositorDBusNotifications* self,
                                                         GVariant* _parameters_,
                                                         GDBusMethodInvocation* invocation);
static void greeter_compositor_dbus_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* greeter_compositor_dbus_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 greeter_compositor_dbus_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 _greeter_compositor_dbus_notifications_unregister_object (gpointer user_data);
VALA_EXTERN GType greeter_compositor_media_feedback_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GreeterCompositorMediaFeedback, g_object_unref)
static void greeter_compositor_media_feedback_feedback_free (GreeterCompositorMediaFeedbackFeedback * self);
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GreeterCompositorMediaFeedbackFeedback, greeter_compositor_media_feedback_feedback_free)
VALA_EXTERN void greeter_compositor_media_feedback_init (void);
static GreeterCompositorMediaFeedback* greeter_compositor_media_feedback_new (void);
static GreeterCompositorMediaFeedback* greeter_compositor_media_feedback_construct (GType object_type);
VALA_EXTERN void greeter_compositor_media_feedback_send (const gchar* icon,
                                             gint val);
static GreeterCompositorMediaFeedbackFeedback* greeter_compositor_media_feedback_feedback_new (const gchar* _icon,
                                                                                        gint32 _level);
static void greeter_compositor_media_feedback_handle_name_owner_changed (GDBusConnection* connection,
                                                                  const gchar* sender_name,
                                                                  const gchar* object_path,
                                                                  const gchar* interface_name,
                                                                  const gchar* signal_name,
                                                                  GVariant* parameters,
                                                                  GreeterCompositorMediaFeedback* self);
static Block20Data* block20_data_ref (Block20Data* _data20_);
static void block20_data_unref (void * _userdata_);
static void* ___lambda27_ (Block20Data* _data20_);
static gpointer ____lambda27__gthread_func (gpointer self);
static void greeter_compositor_media_feedback_send_feedback (GreeterCompositorMediaFeedbackFeedback* feedback,
                                                      GreeterCompositorMediaFeedback* self);
static void _g_free0_ (gpointer var);
static void _g_variant_unref0_ (gpointer var);
static void greeter_compositor_media_feedback_feedback_instance_init (GreeterCompositorMediaFeedbackFeedback * self);
static GObject * greeter_compositor_media_feedback_constructor (GType type,
                                                         guint n_construct_properties,
                                                         GObjectConstructParam * construct_properties);
static void greeter_compositor_media_feedback_finalize (GObject * obj);
static GType greeter_compositor_media_feedback_get_type_once (void);
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 _greeter_compositor_dbus_notifications_dbus_arg_info_notify_app_name = {-1, "app_name", "s", NULL};
static const GDBusArgInfo _greeter_compositor_dbus_notifications_dbus_arg_info_notify_replaces_id = {-1, "replaces_id", "u", NULL};
static const GDBusArgInfo _greeter_compositor_dbus_notifications_dbus_arg_info_notify_app_icon = {-1, "app_icon", "s", NULL};
static const GDBusArgInfo _greeter_compositor_dbus_notifications_dbus_arg_info_notify_summary = {-1, "summary", "s", NULL};
static const GDBusArgInfo _greeter_compositor_dbus_notifications_dbus_arg_info_notify_body = {-1, "body", "s", NULL};
static const GDBusArgInfo _greeter_compositor_dbus_notifications_dbus_arg_info_notify_actions = {-1, "actions", "as", NULL};
static const GDBusArgInfo _greeter_compositor_dbus_notifications_dbus_arg_info_notify_hints = {-1, "hints", "a{sv}", NULL};
static const GDBusArgInfo _greeter_compositor_dbus_notifications_dbus_arg_info_notify_expire_timeout = {-1, "expire_timeout", "i", NULL};
static const GDBusArgInfo _greeter_compositor_dbus_notifications_dbus_arg_info_notify_result = {-1, "result", "u", NULL};
static const GDBusArgInfo * const _greeter_compositor_dbus_notifications_dbus_arg_info_notify_in[] = {&_greeter_compositor_dbus_notifications_dbus_arg_info_notify_app_name, &_greeter_compositor_dbus_notifications_dbus_arg_info_notify_replaces_id, &_greeter_compositor_dbus_notifications_dbus_arg_info_notify_app_icon, &_greeter_compositor_dbus_notifications_dbus_arg_info_notify_summary, &_greeter_compositor_dbus_notifications_dbus_arg_info_notify_body, &_greeter_compositor_dbus_notifications_dbus_arg_info_notify_actions, &_greeter_compositor_dbus_notifications_dbus_arg_info_notify_hints, &_greeter_compositor_dbus_notifications_dbus_arg_info_notify_expire_timeout, NULL};
static const GDBusArgInfo * const _greeter_compositor_dbus_notifications_dbus_arg_info_notify_out[] = {&_greeter_compositor_dbus_notifications_dbus_arg_info_notify_result, NULL};
static const GDBusMethodInfo _greeter_compositor_dbus_notifications_dbus_method_info_notify = {-1, "Notify", (GDBusArgInfo **) (&_greeter_compositor_dbus_notifications_dbus_arg_info_notify_in), (GDBusArgInfo **) (&_greeter_compositor_dbus_notifications_dbus_arg_info_notify_out), NULL};
static const GDBusMethodInfo * const _greeter_compositor_dbus_notifications_dbus_method_info[] = {&_greeter_compositor_dbus_notifications_dbus_method_info_notify, NULL};
static const GDBusSignalInfo * const _greeter_compositor_dbus_notifications_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _greeter_compositor_dbus_notifications_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _greeter_compositor_dbus_notifications_dbus_interface_info = {-1, "org.freedesktop.Notifications", (GDBusMethodInfo **) (&_greeter_compositor_dbus_notifications_dbus_method_info), (GDBusSignalInfo **) (&_greeter_compositor_dbus_notifications_dbus_signal_info), (GDBusPropertyInfo **) (&_greeter_compositor_dbus_notifications_dbus_property_info), NULL};
static const GDBusInterfaceVTable _greeter_compositor_dbus_notifications_dbus_interface_vtable = {greeter_compositor_dbus_notifications_dbus_interface_method_call, greeter_compositor_dbus_notifications_dbus_interface_get_property, greeter_compositor_dbus_notifications_dbus_interface_set_property};

guint32
greeter_compositor_dbus_notifications_notify (GreeterCompositorDBusNotifications* 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,
                                              GError** error)
{
	GreeterCompositorDBusNotificationsIface* _iface_;
	g_return_val_if_fail (self != NULL, 0U);
	_iface_ = GREETER_COMPOSITOR_DBUS_NOTIFICATIONS_GET_INTERFACE (self);
	if (_iface_->notify) {
		return _iface_->notify (self, app_name, replaces_id, app_icon, summary, body, actions, actions_length1, hints, expire_timeout, error);
	}
	return 0U;
}

static void
greeter_compositor_dbus_notifications_default_init (GreeterCompositorDBusNotificationsIface * iface,
                                                    gpointer iface_data)
{
}

static GType
greeter_compositor_dbus_notifications_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GreeterCompositorDBusNotificationsIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) greeter_compositor_dbus_notifications_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType greeter_compositor_dbus_notifications_type_id;
	greeter_compositor_dbus_notifications_type_id = g_type_register_static (G_TYPE_INTERFACE, "GreeterCompositorDBusNotifications", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (greeter_compositor_dbus_notifications_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (greeter_compositor_dbus_notifications_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) greeter_compositor_dbus_notifications_proxy_get_type);
	g_type_set_qdata (greeter_compositor_dbus_notifications_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.Notifications");
	g_type_set_qdata (greeter_compositor_dbus_notifications_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_greeter_compositor_dbus_notifications_dbus_interface_info));
	g_type_set_qdata (greeter_compositor_dbus_notifications_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) greeter_compositor_dbus_notifications_register_object);
	return greeter_compositor_dbus_notifications_type_id;
}

GType
greeter_compositor_dbus_notifications_get_type (void)
{
	static volatile gsize greeter_compositor_dbus_notifications_type_id__once = 0;
	if (g_once_init_enter (&greeter_compositor_dbus_notifications_type_id__once)) {
		GType greeter_compositor_dbus_notifications_type_id;
		greeter_compositor_dbus_notifications_type_id = greeter_compositor_dbus_notifications_get_type_once ();
		g_once_init_leave (&greeter_compositor_dbus_notifications_type_id__once, greeter_compositor_dbus_notifications_type_id);
	}
	return greeter_compositor_dbus_notifications_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (GreeterCompositorDBusNotificationsProxy, greeter_compositor_dbus_notifications_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (GREETER_COMPOSITOR_TYPE_DBUS_NOTIFICATIONS, greeter_compositor_dbus_notifications_proxy_greeter_compositor_dbus_notifications_interface_init) )
static void
greeter_compositor_dbus_notifications_proxy_class_init (GreeterCompositorDBusNotificationsProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = greeter_compositor_dbus_notifications_proxy_g_signal;
}

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

static void
greeter_compositor_dbus_notifications_proxy_init (GreeterCompositorDBusNotificationsProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_greeter_compositor_dbus_notifications_dbus_interface_info));
}

static guint32
greeter_compositor_dbus_notifications_proxy_notify (GreeterCompositorDBusNotifications* 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,
                                                    GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	gchar** _tmp53_;
	GVariantBuilder _tmp54_;
	gint _tmp55_;
	GVariantBuilder _tmp56_;
	GHashTableIter _tmp57_;
	gpointer _tmp58_;
	gpointer _tmp59_;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	guint32 _result = 0U;
	GVariant* _tmp62_;
	_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));
	_tmp53_ = actions;
	g_variant_builder_init (&_tmp54_, G_VARIANT_TYPE ("as"));
	for (_tmp55_ = 0; _tmp55_ < actions_length1; _tmp55_++) {
		g_variant_builder_add_value (&_tmp54_, g_variant_new_string (*_tmp53_));
		_tmp53_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp54_));
	g_hash_table_iter_init (&_tmp57_, hints);
	g_variant_builder_init (&_tmp56_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp57_, &_tmp58_, &_tmp59_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp58_;
		_value = (GVariant*) _tmp59_;
		g_variant_builder_add (&_tmp56_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp56_));
	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);
	_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) {
		guint32 _tmp60_ = 0U;
		return _tmp60_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		guint32 _tmp61_ = 0U;
		g_object_unref (_reply_message);
		return _tmp61_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp62_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_uint32 (_tmp62_);
	g_variant_unref (_tmp62_);
	g_object_unref (_reply_message);
	return _result;
}

static void
greeter_compositor_dbus_notifications_proxy_greeter_compositor_dbus_notifications_interface_init (GreeterCompositorDBusNotificationsIface* iface)
{
	iface->notify = greeter_compositor_dbus_notifications_proxy_notify;
}

static void
_dbus_greeter_compositor_dbus_notifications_notify (GreeterCompositorDBusNotifications* self,
                                                    GVariant* _parameters_,
                                                    GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* app_name = NULL;
	GVariant* _tmp63_;
	guint32 replaces_id = 0U;
	GVariant* _tmp64_;
	gchar* app_icon = NULL;
	GVariant* _tmp65_;
	gchar* summary = NULL;
	GVariant* _tmp66_;
	gchar* body = NULL;
	GVariant* _tmp67_;
	gchar** actions = NULL;
	gint actions_length1 = 0;
	GVariant* _tmp68_;
	gchar** _tmp69_;
	gint _tmp69__length;
	gint _tmp69__size;
	gint _tmp69__length1;
	GVariantIter _tmp70_;
	GVariant* _tmp71_;
	GHashTable* hints = NULL;
	GVariant* _tmp72_;
	GHashTable* _tmp73_;
	GVariantIter _tmp74_;
	GVariant* _tmp75_;
	GVariant* _tmp76_;
	gint32 expire_timeout = 0;
	GVariant* _tmp77_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	guint32 result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp63_ = g_variant_iter_next_value (&_arguments_iter);
	app_name = g_variant_dup_string (_tmp63_, NULL);
	g_variant_unref (_tmp63_);
	_tmp64_ = g_variant_iter_next_value (&_arguments_iter);
	replaces_id = g_variant_get_uint32 (_tmp64_);
	g_variant_unref (_tmp64_);
	_tmp65_ = g_variant_iter_next_value (&_arguments_iter);
	app_icon = g_variant_dup_string (_tmp65_, NULL);
	g_variant_unref (_tmp65_);
	_tmp66_ = g_variant_iter_next_value (&_arguments_iter);
	summary = g_variant_dup_string (_tmp66_, NULL);
	g_variant_unref (_tmp66_);
	_tmp67_ = g_variant_iter_next_value (&_arguments_iter);
	body = g_variant_dup_string (_tmp67_, NULL);
	g_variant_unref (_tmp67_);
	_tmp68_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp69_ = g_new (gchar*, 5);
	_tmp69__length = 0;
	_tmp69__size = 4;
	_tmp69__length1 = 0;
	g_variant_iter_init (&_tmp70_, _tmp68_);
	for (; (_tmp71_ = g_variant_iter_next_value (&_tmp70_)) != NULL; _tmp69__length1++) {
		if (_tmp69__size == _tmp69__length) {
			_tmp69__size = 2 * _tmp69__size;
			_tmp69_ = g_renew (gchar*, _tmp69_, _tmp69__size + 1);
		}
		_tmp69_[_tmp69__length++] = g_variant_dup_string (_tmp71_, NULL);
		g_variant_unref (_tmp71_);
	}
	actions_length1 = _tmp69__length1;
	_tmp69_[_tmp69__length] = NULL;
	actions = _tmp69_;
	g_variant_unref (_tmp68_);
	_tmp72_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp73_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp74_, _tmp72_);
	while (g_variant_iter_loop (&_tmp74_, "{?*}", &_tmp75_, &_tmp76_)) {
		g_hash_table_insert (_tmp73_, g_variant_dup_string (_tmp75_, NULL), g_variant_get_variant (_tmp76_));
	}
	hints = _tmp73_;
	g_variant_unref (_tmp72_);
	_tmp77_ = g_variant_iter_next_value (&_arguments_iter);
	expire_timeout = g_variant_get_int32 (_tmp77_);
	g_variant_unref (_tmp77_);
	result = greeter_compositor_dbus_notifications_notify (self, app_name, replaces_id, app_icon, summary, body, actions, actions_length1, hints, expire_timeout, &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 (app_name);
	_g_free0 (app_icon);
	_g_free0 (summary);
	_g_free0 (body);
	actions = (_vala_array_free (actions, actions_length1, (GDestroyNotify) g_free), NULL);
	_g_hash_table_unref0 (hints);
	;
}

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

static GVariant*
greeter_compositor_dbus_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];
	return NULL;
}

static gboolean
greeter_compositor_dbus_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)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return FALSE;
}

guint
greeter_compositor_dbus_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 *) (&_greeter_compositor_dbus_notifications_dbus_interface_info), &_greeter_compositor_dbus_notifications_dbus_interface_vtable, data, _greeter_compositor_dbus_notifications_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

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

static inline gpointer
greeter_compositor_media_feedback_get_instance_private (GreeterCompositorMediaFeedback* self)
{
	return G_STRUCT_MEMBER_P (self, GreeterCompositorMediaFeedback_private_offset);
}

void
greeter_compositor_media_feedback_init (void)
{
	GreeterCompositorMediaFeedback* _tmp0_;
	_tmp0_ = greeter_compositor_media_feedback_instance;
	if (_tmp0_ == NULL) {
		GreeterCompositorMediaFeedback* _tmp1_;
		_tmp1_ = greeter_compositor_media_feedback_new ();
		_g_object_unref0 (greeter_compositor_media_feedback_instance);
		greeter_compositor_media_feedback_instance = _tmp1_;
	}
}

void
greeter_compositor_media_feedback_send (const gchar* icon,
                                        gint val)
{
	GreeterCompositorMediaFeedback* _tmp0_;
	GThreadPool* _tmp1_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (icon != NULL);
	_tmp0_ = greeter_compositor_media_feedback_instance;
	_tmp1_ = greeter_compositor_media_feedback_pool;
	_vala_return_if_fail ((_tmp0_ != NULL) && (_tmp1_ != NULL), "instance != null && pool != null");
	{
		GThreadPool* _tmp2_;
		GreeterCompositorMediaFeedbackFeedback* _tmp3_;
		_tmp2_ = greeter_compositor_media_feedback_pool;
		_tmp3_ = greeter_compositor_media_feedback_feedback_new (icon, (gint32) val);
		g_thread_pool_push (_tmp2_, _tmp3_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_THREAD_ERROR) {
				goto __catch0_g_thread_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	}
	goto __finally0;
	__catch0_g_thread_error:
	{
		GError* e = NULL;
		GError* _tmp4_;
		const gchar* _tmp5_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp4_ = e;
		_tmp5_ = _tmp4_->message;
		g_critical ("MediaFeedback.vala:50: %s", _tmp5_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static GreeterCompositorMediaFeedback*
greeter_compositor_media_feedback_construct (GType object_type)
{
	GreeterCompositorMediaFeedback * self = NULL;
	self = (GreeterCompositorMediaFeedback*) g_object_new (object_type, NULL);
	return self;
}

static GreeterCompositorMediaFeedback*
greeter_compositor_media_feedback_new (void)
{
	return greeter_compositor_media_feedback_construct (GREETER_COMPOSITOR_TYPE_MEDIA_FEEDBACK);
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static Block20Data*
block20_data_ref (Block20Data* _data20_)
{
	g_atomic_int_inc (&_data20_->_ref_count_);
	return _data20_;
}

static void
block20_data_unref (void * _userdata_)
{
	Block20Data* _data20_;
	_data20_ = (Block20Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data20_->_ref_count_)) {
		GreeterCompositorMediaFeedback* self;
		self = _data20_->self;
		_g_object_unref0 (_data20_->connection);
		_g_object_unref0 (self);
		g_slice_free (Block20Data, _data20_);
	}
}

static void*
___lambda27_ (Block20Data* _data20_)
{
	GreeterCompositorMediaFeedback* self;
	GError* _inner_error0_ = NULL;
	void* result;
	self = _data20_->self;
	{
		GreeterCompositorDBusNotifications* _tmp0_;
		_tmp0_ = self->priv->notifications;
		g_rec_mutex_lock (&self->priv->__lock_notifications);
		{
			{
				GreeterCompositorDBusNotifications* _tmp1_ = NULL;
				GreeterCompositorDBusNotifications* _tmp2_;
				GreeterCompositorDBusNotifications* _tmp3_;
				_tmp2_ = (GreeterCompositorDBusNotifications*) g_initable_new (GREETER_COMPOSITOR_TYPE_DBUS_NOTIFICATIONS_PROXY, NULL, &_inner_error0_, "g-flags", G_DBUS_PROXY_FLAGS_NONE, "g-name", "org.freedesktop.Notifications", "g-connection", _data20_->connection, "g-object-path", "/org/freedesktop/Notifications", "g-interface-name", "org.freedesktop.Notifications", NULL);
				_tmp1_ = (GreeterCompositorDBusNotifications*) _tmp2_;
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					goto __catch1_g_error;
				}
				_tmp3_ = _tmp1_;
				_tmp1_ = NULL;
				_g_object_unref0 (self->priv->notifications);
				self->priv->notifications = _tmp3_;
				_g_object_unref0 (_tmp1_);
			}
			goto __finally1;
			__catch1_g_error:
			{
				g_clear_error (&_inner_error0_);
				_g_object_unref0 (self->priv->notifications);
				self->priv->notifications = NULL;
			}
			__finally1:
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
				g_clear_error (&_inner_error0_);
				return NULL;
			}
		}
		__finally0:
		{
			GreeterCompositorDBusNotifications* _tmp4_;
			_tmp4_ = self->priv->notifications;
			g_rec_mutex_unlock (&self->priv->__lock_notifications);
		}
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
	}
	result = NULL;
	return result;
}

static gpointer
____lambda27__gthread_func (gpointer self)
{
	gpointer result;
	result = ___lambda27_ (self);
	block20_data_unref (self);
	return result;
}

static void
greeter_compositor_media_feedback_handle_name_owner_changed (GDBusConnection* connection,
                                                             const gchar* sender_name,
                                                             const gchar* object_path,
                                                             const gchar* interface_name,
                                                             const gchar* signal_name,
                                                             GVariant* parameters,
                                                             GreeterCompositorMediaFeedback* self)
{
	Block20Data* _data20_;
	GDBusConnection* _tmp0_;
	gchar* name = NULL;
	gchar* before = NULL;
	gchar* after = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	const gchar* _tmp4_;
	gboolean _tmp5_ = FALSE;
	const gchar* _tmp6_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (connection != NULL);
	g_return_if_fail (sender_name != NULL);
	g_return_if_fail (object_path != NULL);
	g_return_if_fail (interface_name != NULL);
	g_return_if_fail (signal_name != NULL);
	g_return_if_fail (parameters != NULL);
	_data20_ = g_slice_new0 (Block20Data);
	_data20_->_ref_count_ = 1;
	_data20_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (connection);
	_g_object_unref0 (_data20_->connection);
	_data20_->connection = _tmp0_;
	g_variant_get (parameters, "(sss)", &_tmp1_, &_tmp2_, &_tmp3_, NULL);
	_g_free0 (name);
	name = _tmp1_;
	_g_free0 (before);
	before = _tmp2_;
	_g_free0 (after);
	after = _tmp3_;
	_tmp4_ = name;
	if (g_strcmp0 (_tmp4_, "org.freedesktop.Notifications") != 0) {
		_g_free0 (after);
		_g_free0 (before);
		_g_free0 (name);
		block20_data_unref (_data20_);
		_data20_ = NULL;
		return;
	}
	_tmp6_ = after;
	if (g_strcmp0 (_tmp6_, "") != 0) {
		const gchar* _tmp7_;
		_tmp7_ = before;
		_tmp5_ = g_strcmp0 (_tmp7_, "") == 0;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		GThread* _tmp8_;
		GThread* _tmp9_;
		_tmp8_ = g_thread_new (NULL, ____lambda27__gthread_func, block20_data_ref (_data20_));
		_tmp9_ = _tmp8_;
		_g_thread_unref0 (_tmp9_);
	} else {
		gboolean _tmp10_ = FALSE;
		const gchar* _tmp11_;
		_tmp11_ = before;
		if (g_strcmp0 (_tmp11_, "") != 0) {
			const gchar* _tmp12_;
			_tmp12_ = after;
			_tmp10_ = g_strcmp0 (_tmp12_, "") == 0;
		} else {
			_tmp10_ = FALSE;
		}
		if (_tmp10_) {
			{
				GreeterCompositorDBusNotifications* _tmp13_;
				_tmp13_ = self->priv->notifications;
				g_rec_mutex_lock (&self->priv->__lock_notifications);
				{
					_g_object_unref0 (self->priv->notifications);
					self->priv->notifications = NULL;
				}
				__finally0:
				{
					GreeterCompositorDBusNotifications* _tmp14_;
					_tmp14_ = self->priv->notifications;
					g_rec_mutex_unlock (&self->priv->__lock_notifications);
				}
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					_g_free0 (after);
					_g_free0 (before);
					_g_free0 (name);
					block20_data_unref (_data20_);
					_data20_ = NULL;
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
					g_clear_error (&_inner_error0_);
					return;
				}
			}
		}
	}
	_g_free0 (after);
	_g_free0 (before);
	_g_free0 (name);
	block20_data_unref (_data20_);
	_data20_ = NULL;
}

static void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}

static void
_g_variant_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_variant_unref (var), NULL));
}

static void
greeter_compositor_media_feedback_send_feedback (GreeterCompositorMediaFeedbackFeedback* feedback,
                                                 GreeterCompositorMediaFeedback* self)
{
	GHashTable* hints = NULL;
	GHashTable* _tmp0_;
	gchar* _tmp1_;
	GVariant* _tmp2_;
	gchar* _tmp3_;
	GVariant* _tmp4_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (feedback != NULL);
	_tmp0_ = g_hash_table_new_full (NULL, NULL, _g_free0_, _g_variant_unref0_);
	hints = _tmp0_;
	_tmp1_ = g_strdup ("x-canonical-private-synchronous");
	_tmp2_ = g_variant_new_string ("gala-feedback");
	g_variant_ref_sink (_tmp2_);
	g_hash_table_insert (hints, _tmp1_, _tmp2_);
	_tmp3_ = g_strdup ("value");
	_tmp4_ = g_variant_new_int32 (feedback->level);
	g_variant_ref_sink (_tmp4_);
	g_hash_table_insert (hints, _tmp3_, _tmp4_);
	{
		guint32 _tmp5_ = 0U;
		GreeterCompositorDBusNotifications* _tmp6_;
		const gchar* _tmp7_;
		gchar** _tmp8_;
		gchar** _tmp9_;
		gint _tmp9__length1;
		guint32 _tmp10_;
		_tmp6_ = self->priv->notifications;
		_tmp7_ = feedback->icon;
		_tmp8_ = g_new0 (gchar*, 0 + 1);
		_tmp9_ = _tmp8_;
		_tmp9__length1 = 0;
		_tmp10_ = greeter_compositor_dbus_notifications_notify (_tmp6_, "gala-feedback", self->priv->notification_id, _tmp7_, "", "", _tmp9_, (gint) 0, hints, (gint32) 2000, &_inner_error0_);
		_tmp9_ = (_vala_array_free (_tmp9_, _tmp9__length1, (GDestroyNotify) g_free), NULL);
		_tmp5_ = _tmp10_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		self->priv->notification_id = _tmp5_;
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp11_;
		const gchar* _tmp12_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp11_ = e;
		_tmp12_ = _tmp11_->message;
		g_critical ("MediaFeedback.vala:116: %s", _tmp12_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_hash_table_unref0 (hints);
		_greeter_compositor_media_feedback_feedback_free0 (feedback);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_g_hash_table_unref0 (hints);
	_greeter_compositor_media_feedback_feedback_free0 (feedback);
}

static GreeterCompositorMediaFeedbackFeedback*
greeter_compositor_media_feedback_feedback_new (const gchar* _icon,
                                                gint32 _level)
{
	GreeterCompositorMediaFeedbackFeedback* self;
	gchar* _tmp0_;
	g_return_val_if_fail (_icon != NULL, NULL);
	self = g_slice_new0 (GreeterCompositorMediaFeedbackFeedback);
	greeter_compositor_media_feedback_feedback_instance_init (self);
	_tmp0_ = g_strdup (_icon);
	_g_free0 (self->icon);
	self->icon = _tmp0_;
	self->level = _level;
	return self;
}

static void
greeter_compositor_media_feedback_feedback_instance_init (GreeterCompositorMediaFeedbackFeedback * self)
{
}

static void
greeter_compositor_media_feedback_feedback_free (GreeterCompositorMediaFeedbackFeedback * self)
{
	_g_free0 (self->icon);
	g_slice_free (GreeterCompositorMediaFeedbackFeedback, self);
}

static GObject *
greeter_compositor_media_feedback_constructor (GType type,
                                               guint n_construct_properties,
                                               GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	GreeterCompositorMediaFeedback * self;
	GError* _inner_error0_ = NULL;
	parent_class = G_OBJECT_CLASS (greeter_compositor_media_feedback_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GREETER_COMPOSITOR_TYPE_MEDIA_FEEDBACK, GreeterCompositorMediaFeedback);
	{
		GThreadPool* _tmp0_ = NULL;
		GThreadPool* _tmp1_;
		GThreadPool* _tmp2_;
		_tmp1_ = g_thread_pool_new ((GFunc) greeter_compositor_media_feedback_send_feedback, self, 1, FALSE, &_inner_error0_);
		_tmp0_ = _tmp1_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_THREAD_ERROR) {
				goto __catch0_g_thread_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
		}
		_tmp2_ = _tmp0_;
		_tmp0_ = NULL;
		_g_thread_pool_free0 (greeter_compositor_media_feedback_pool);
		greeter_compositor_media_feedback_pool = _tmp2_;
		_g_thread_pool_free0 (_tmp0_);
	}
	goto __finally0;
	__catch0_g_thread_error:
	{
		GError* e = NULL;
		GError* _tmp3_;
		const gchar* _tmp4_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp3_ = e;
		_tmp4_ = _tmp3_->message;
		g_critical ("MediaFeedback.vala:67: %s", _tmp4_);
		_g_thread_pool_free0 (greeter_compositor_media_feedback_pool);
		greeter_compositor_media_feedback_pool = NULL;
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
	}
	{
		GDBusConnection* _tmp5_ = NULL;
		GDBusConnection* _tmp6_;
		GDBusConnection* _tmp7_;
		GDBusConnection* _tmp8_;
		_tmp6_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error0_);
		_tmp5_ = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_IO_ERROR) {
				goto __catch1_g_io_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
		}
		_tmp7_ = _tmp5_;
		_tmp5_ = NULL;
		_g_object_unref0 (self->priv->connection);
		self->priv->connection = _tmp7_;
		_tmp8_ = self->priv->connection;
		self->priv->dbus_name_owner_changed_signal_id = g_dbus_connection_signal_subscribe (_tmp8_, "org.freedesktop.DBus", "org.freedesktop.DBus", "NameOwnerChanged", "/org/freedesktop/DBus", NULL, G_DBUS_SIGNAL_FLAGS_NONE, (GDBusSignalCallback) greeter_compositor_media_feedback_handle_name_owner_changed, g_object_ref (self), g_object_unref);
		_g_object_unref0 (_tmp5_);
	}
	goto __finally1;
	__catch1_g_io_error:
	{
		GError* e = NULL;
		GError* _tmp9_;
		const gchar* _tmp10_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp9_ = e;
		_tmp10_ = _tmp9_->message;
		g_critical ("MediaFeedback.vala:76: %s", _tmp10_);
		_g_error_free0 (e);
	}
	__finally1:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
	}
	return obj;
}

static void
greeter_compositor_media_feedback_class_init (GreeterCompositorMediaFeedbackClass * klass,
                                              gpointer klass_data)
{
	greeter_compositor_media_feedback_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GreeterCompositorMediaFeedback_private_offset);
	G_OBJECT_CLASS (klass)->constructor = greeter_compositor_media_feedback_constructor;
	G_OBJECT_CLASS (klass)->finalize = greeter_compositor_media_feedback_finalize;
}

static void
greeter_compositor_media_feedback_instance_init (GreeterCompositorMediaFeedback * self,
                                                 gpointer klass)
{
	self->priv = greeter_compositor_media_feedback_get_instance_private (self);
	self->priv->connection = NULL;
	g_rec_mutex_init (&self->priv->__lock_notifications);
	self->priv->notifications = NULL;
	self->priv->dbus_name_owner_changed_signal_id = (guint) 0;
	self->priv->notification_id = (guint32) 0;
}

static void
greeter_compositor_media_feedback_finalize (GObject * obj)
{
	GreeterCompositorMediaFeedback * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GREETER_COMPOSITOR_TYPE_MEDIA_FEEDBACK, GreeterCompositorMediaFeedback);
	_g_object_unref0 (self->priv->connection);
	g_rec_mutex_clear (&self->priv->__lock_notifications);
	_g_object_unref0 (self->priv->notifications);
	G_OBJECT_CLASS (greeter_compositor_media_feedback_parent_class)->finalize (obj);
}

static GType
greeter_compositor_media_feedback_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GreeterCompositorMediaFeedbackClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) greeter_compositor_media_feedback_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GreeterCompositorMediaFeedback), 0, (GInstanceInitFunc) greeter_compositor_media_feedback_instance_init, NULL };
	GType greeter_compositor_media_feedback_type_id;
	greeter_compositor_media_feedback_type_id = g_type_register_static (G_TYPE_OBJECT, "GreeterCompositorMediaFeedback", &g_define_type_info, 0);
	GreeterCompositorMediaFeedback_private_offset = g_type_add_instance_private (greeter_compositor_media_feedback_type_id, sizeof (GreeterCompositorMediaFeedbackPrivate));
	return greeter_compositor_media_feedback_type_id;
}

GType
greeter_compositor_media_feedback_get_type (void)
{
	static volatile gsize greeter_compositor_media_feedback_type_id__once = 0;
	if (g_once_init_enter (&greeter_compositor_media_feedback_type_id__once)) {
		GType greeter_compositor_media_feedback_type_id;
		greeter_compositor_media_feedback_type_id = greeter_compositor_media_feedback_get_type_once ();
		g_once_init_leave (&greeter_compositor_media_feedback_type_id__once, greeter_compositor_media_feedback_type_id);
	}
	return greeter_compositor_media_feedback_type_id__once;
}

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

