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

/**/
/*  Copyright (C) 2016 Rico Tzschichholz*/
/**/
/*  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_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 GALA_TYPE_DBUS_NOTIFICATIONS (gala_dbus_notifications_get_type ())
#define GALA_DBUS_NOTIFICATIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_TYPE_DBUS_NOTIFICATIONS, GalaDBusNotifications))
#define GALA_IS_DBUS_NOTIFICATIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_TYPE_DBUS_NOTIFICATIONS))
#define GALA_DBUS_NOTIFICATIONS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GALA_TYPE_DBUS_NOTIFICATIONS, GalaDBusNotificationsIface))

typedef struct _GalaDBusNotifications GalaDBusNotifications;
typedef struct _GalaDBusNotificationsIface GalaDBusNotificationsIface;

#define GALA_TYPE_DBUS_NOTIFICATIONS_PROXY (gala_dbus_notifications_proxy_get_type ())
typedef GDBusProxy GalaDBusNotificationsProxy;
typedef GDBusProxyClass GalaDBusNotificationsProxyClass;
#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 GALA_TYPE_MEDIA_FEEDBACK (gala_media_feedback_get_type ())
#define GALA_MEDIA_FEEDBACK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_TYPE_MEDIA_FEEDBACK, GalaMediaFeedback))
#define GALA_MEDIA_FEEDBACK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GALA_TYPE_MEDIA_FEEDBACK, GalaMediaFeedbackClass))
#define GALA_IS_MEDIA_FEEDBACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_TYPE_MEDIA_FEEDBACK))
#define GALA_IS_MEDIA_FEEDBACK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GALA_TYPE_MEDIA_FEEDBACK))
#define GALA_MEDIA_FEEDBACK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GALA_TYPE_MEDIA_FEEDBACK, GalaMediaFeedbackClass))

typedef struct _GalaMediaFeedback GalaMediaFeedback;
typedef struct _GalaMediaFeedbackClass GalaMediaFeedbackClass;
typedef struct _GalaMediaFeedbackPrivate GalaMediaFeedbackPrivate;
enum  {
	GALA_MEDIA_FEEDBACK_0_PROPERTY,
	GALA_MEDIA_FEEDBACK_NUM_PROPERTIES
};
static GParamSpec* gala_media_feedback_properties[GALA_MEDIA_FEEDBACK_NUM_PROPERTIES];
typedef struct _GalaMediaFeedbackFeedback GalaMediaFeedbackFeedback;
#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)))
#define _gala_media_feedback_feedback_free0(var) ((var == NULL) ? NULL : (var = (gala_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 _GalaDBusNotificationsIface {
	GTypeInterface parent_iface;
	guint32 (*notify) (GalaDBusNotifications* 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 _GalaMediaFeedback {
	GObject parent_instance;
	GalaMediaFeedbackPrivate * priv;
};

struct _GalaMediaFeedbackClass {
	GObjectClass parent_class;
};

struct _GalaMediaFeedbackPrivate {
	GalaDBusNotifications* notifications;
	guint32 notification_id;
};

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

static gint GalaMediaFeedback_private_offset;
static gpointer gala_media_feedback_parent_class = NULL;
static GalaMediaFeedback* gala_media_feedback_instance;
static GalaMediaFeedback* gala_media_feedback_instance = NULL;
static GThreadPool* gala_media_feedback_pool;
static GThreadPool* gala_media_feedback_pool = NULL;

VALA_EXTERN GType gala_dbus_notifications_proxy_get_type (void) G_GNUC_CONST ;
 G_GNUC_INTERNAL guint gala_dbus_notifications_register_object (void* object,
                                               GDBusConnection* connection,
                                               const gchar* path,
                                               GError** error);
 G_GNUC_INTERNAL GType gala_dbus_notifications_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaDBusNotifications, g_object_unref)
 G_GNUC_INTERNAL guint32 gala_dbus_notifications_notify (GalaDBusNotifications* 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 gala_dbus_notifications_get_type_once (void);
static void gala_dbus_notifications_proxy_g_signal (GDBusProxy* proxy,
                                             const gchar* sender_name,
                                             const gchar* signal_name,
                                             GVariant* parameters);
static guint32 gala_dbus_notifications_proxy_notify (GalaDBusNotifications* 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 gala_dbus_notifications_proxy_gala_dbus_notifications_interface_init (GalaDBusNotificationsIface* iface);
static void _dbus_gala_dbus_notifications_notify (GalaDBusNotifications* self,
                                           GVariant* _parameters_,
                                           GDBusMethodInvocation* invocation);
static void gala_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* gala_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 gala_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 _gala_dbus_notifications_unregister_object (gpointer user_data);
VALA_EXTERN GType gala_media_feedback_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaMediaFeedback, g_object_unref)
static void gala_media_feedback_feedback_free (GalaMediaFeedbackFeedback * self);
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaMediaFeedbackFeedback, gala_media_feedback_feedback_free)
VALA_EXTERN void gala_media_feedback_init (void);
static GalaMediaFeedback* gala_media_feedback_new (void);
static GalaMediaFeedback* gala_media_feedback_construct (GType object_type);
VALA_EXTERN void gala_media_feedback_send (const gchar* icon,
                               gint val);
static GalaMediaFeedbackFeedback* gala_media_feedback_feedback_new (const gchar* _icon,
                                                             gint32 _level);
static void gala_media_feedback_on_watch (GalaMediaFeedback* self,
                                   GDBusConnection* conn);
static void __lambda45_ (GalaMediaFeedback* self,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda45__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void gala_media_feedback_on_unwatch (GalaMediaFeedback* self,
                                     GDBusConnection* conn);
static void gala_media_feedback_send_feedback (GalaMediaFeedback* self,
                                        GalaMediaFeedbackFeedback* feedback);
static void _g_free0_ (gpointer var);
static void _g_variant_unref0_ (gpointer var);
static void gala_media_feedback_feedback_instance_init (GalaMediaFeedbackFeedback * self);
static GObject * gala_media_feedback_constructor (GType type,
                                           guint n_construct_properties,
                                           GObjectConstructParam * construct_properties);
static void _gala_media_feedback_send_feedback_gfunc (gpointer data,
                                               gpointer self);
static void _gala_media_feedback_on_watch_gbus_name_appeared_callback (GDBusConnection* connection,
                                                                const gchar* name,
                                                                const gchar* name_owner,
                                                                gpointer self);
static void _gala_media_feedback_on_unwatch_gbus_name_vanished_callback (GDBusConnection* connection,
                                                                  const gchar* name,
                                                                  gpointer self);
static void gala_media_feedback_finalize (GObject * obj);
static GType gala_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 _gala_dbus_notifications_dbus_arg_info_notify_app_name = {-1, "app_name", "s", NULL};
static const GDBusArgInfo _gala_dbus_notifications_dbus_arg_info_notify_replaces_id = {-1, "replaces_id", "u", NULL};
static const GDBusArgInfo _gala_dbus_notifications_dbus_arg_info_notify_app_icon = {-1, "app_icon", "s", NULL};
static const GDBusArgInfo _gala_dbus_notifications_dbus_arg_info_notify_summary = {-1, "summary", "s", NULL};
static const GDBusArgInfo _gala_dbus_notifications_dbus_arg_info_notify_body = {-1, "body", "s", NULL};
static const GDBusArgInfo _gala_dbus_notifications_dbus_arg_info_notify_actions = {-1, "actions", "as", NULL};
static const GDBusArgInfo _gala_dbus_notifications_dbus_arg_info_notify_hints = {-1, "hints", "a{sv}", NULL};
static const GDBusArgInfo _gala_dbus_notifications_dbus_arg_info_notify_expire_timeout = {-1, "expire_timeout", "i", NULL};
static const GDBusArgInfo _gala_dbus_notifications_dbus_arg_info_notify_result = {-1, "result", "u", NULL};
static const GDBusArgInfo * const _gala_dbus_notifications_dbus_arg_info_notify_in[] = {&_gala_dbus_notifications_dbus_arg_info_notify_app_name, &_gala_dbus_notifications_dbus_arg_info_notify_replaces_id, &_gala_dbus_notifications_dbus_arg_info_notify_app_icon, &_gala_dbus_notifications_dbus_arg_info_notify_summary, &_gala_dbus_notifications_dbus_arg_info_notify_body, &_gala_dbus_notifications_dbus_arg_info_notify_actions, &_gala_dbus_notifications_dbus_arg_info_notify_hints, &_gala_dbus_notifications_dbus_arg_info_notify_expire_timeout, NULL};
static const GDBusArgInfo * const _gala_dbus_notifications_dbus_arg_info_notify_out[] = {&_gala_dbus_notifications_dbus_arg_info_notify_result, NULL};
static const GDBusMethodInfo _gala_dbus_notifications_dbus_method_info_notify = {-1, "Notify", (GDBusArgInfo **) (&_gala_dbus_notifications_dbus_arg_info_notify_in), (GDBusArgInfo **) (&_gala_dbus_notifications_dbus_arg_info_notify_out), NULL};
static const GDBusMethodInfo * const _gala_dbus_notifications_dbus_method_info[] = {&_gala_dbus_notifications_dbus_method_info_notify, NULL};
static const GDBusSignalInfo * const _gala_dbus_notifications_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _gala_dbus_notifications_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _gala_dbus_notifications_dbus_interface_info = {-1, "org.freedesktop.Notifications", (GDBusMethodInfo **) (&_gala_dbus_notifications_dbus_method_info), (GDBusSignalInfo **) (&_gala_dbus_notifications_dbus_signal_info), (GDBusPropertyInfo **) (&_gala_dbus_notifications_dbus_property_info), NULL};
static const GDBusInterfaceVTable _gala_dbus_notifications_dbus_interface_vtable = {gala_dbus_notifications_dbus_interface_method_call, gala_dbus_notifications_dbus_interface_get_property, gala_dbus_notifications_dbus_interface_set_property};

guint32
gala_dbus_notifications_notify (GalaDBusNotifications* 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)
{
	GalaDBusNotificationsIface* _iface_;
	g_return_val_if_fail (self != NULL, 0U);
	_iface_ = GALA_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
gala_dbus_notifications_default_init (GalaDBusNotificationsIface * iface,
                                      gpointer iface_data)
{
}

static GType
gala_dbus_notifications_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GalaDBusNotificationsIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gala_dbus_notifications_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gala_dbus_notifications_type_id;
	gala_dbus_notifications_type_id = g_type_register_static (G_TYPE_INTERFACE, "GalaDBusNotifications", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gala_dbus_notifications_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (gala_dbus_notifications_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) gala_dbus_notifications_proxy_get_type);
	g_type_set_qdata (gala_dbus_notifications_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.Notifications");
	g_type_set_qdata (gala_dbus_notifications_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_gala_dbus_notifications_dbus_interface_info));
	g_type_set_qdata (gala_dbus_notifications_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) gala_dbus_notifications_register_object);
	return gala_dbus_notifications_type_id;
}

 G_GNUC_INTERNAL GType
gala_dbus_notifications_get_type (void)
{
	static volatile gsize gala_dbus_notifications_type_id__once = 0;
	if (g_once_init_enter (&gala_dbus_notifications_type_id__once)) {
		GType gala_dbus_notifications_type_id;
		gala_dbus_notifications_type_id = gala_dbus_notifications_get_type_once ();
		g_once_init_leave (&gala_dbus_notifications_type_id__once, gala_dbus_notifications_type_id);
	}
	return gala_dbus_notifications_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (GalaDBusNotificationsProxy, gala_dbus_notifications_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (GALA_TYPE_DBUS_NOTIFICATIONS, gala_dbus_notifications_proxy_gala_dbus_notifications_interface_init) )
static void
gala_dbus_notifications_proxy_class_init (GalaDBusNotificationsProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = gala_dbus_notifications_proxy_g_signal;
}

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

static void
gala_dbus_notifications_proxy_init (GalaDBusNotificationsProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_gala_dbus_notifications_dbus_interface_info));
}

static guint32
gala_dbus_notifications_proxy_notify (GalaDBusNotifications* 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** _tmp71_;
	GVariantBuilder _tmp72_;
	gint _tmp73_;
	GVariantBuilder _tmp74_;
	GHashTableIter _tmp75_;
	gpointer _tmp76_;
	gpointer _tmp77_;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	guint32 _result = 0U;
	GVariant* _tmp80_;
	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));
	_tmp71_ = actions;
	g_variant_builder_init (&_tmp72_, G_VARIANT_TYPE ("as"));
	for (_tmp73_ = 0; _tmp73_ < actions_length1; _tmp73_++) {
		g_variant_builder_add_value (&_tmp72_, g_variant_new_string (*_tmp71_));
		_tmp71_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp72_));
	g_hash_table_iter_init (&_tmp75_, hints);
	g_variant_builder_init (&_tmp74_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp75_, &_tmp76_, &_tmp77_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp76_;
		_value = (GVariant*) _tmp77_;
		g_variant_builder_add (&_tmp74_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp74_));
	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 _tmp78_ = 0U;
		return _tmp78_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		guint32 _tmp79_ = 0U;
		g_object_unref (_reply_message);
		return _tmp79_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp80_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_uint32 (_tmp80_);
	g_variant_unref (_tmp80_);
	g_object_unref (_reply_message);
	return _result;
}

static void
gala_dbus_notifications_proxy_gala_dbus_notifications_interface_init (GalaDBusNotificationsIface* iface)
{
	iface->notify = gala_dbus_notifications_proxy_notify;
}

static void
_dbus_gala_dbus_notifications_notify (GalaDBusNotifications* self,
                                      GVariant* _parameters_,
                                      GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* app_name = NULL;
	GVariant* _tmp81_;
	guint32 replaces_id = 0U;
	GVariant* _tmp82_;
	gchar* app_icon = NULL;
	GVariant* _tmp83_;
	gchar* summary = NULL;
	GVariant* _tmp84_;
	gchar* body = NULL;
	GVariant* _tmp85_;
	gchar** actions = NULL;
	gint actions_length1 = 0;
	GVariant* _tmp86_;
	gchar** _tmp87_;
	gint _tmp87__length;
	gint _tmp87__size;
	gint _tmp87__length1;
	GVariantIter _tmp88_;
	GVariant* _tmp89_;
	GHashTable* hints = NULL;
	GVariant* _tmp90_;
	GHashTable* _tmp91_;
	GVariantIter _tmp92_;
	GVariant* _tmp93_;
	GVariant* _tmp94_;
	gint32 expire_timeout = 0;
	GVariant* _tmp95_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	guint32 result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp81_ = g_variant_iter_next_value (&_arguments_iter);
	app_name = g_variant_dup_string (_tmp81_, NULL);
	g_variant_unref (_tmp81_);
	_tmp82_ = g_variant_iter_next_value (&_arguments_iter);
	replaces_id = g_variant_get_uint32 (_tmp82_);
	g_variant_unref (_tmp82_);
	_tmp83_ = g_variant_iter_next_value (&_arguments_iter);
	app_icon = g_variant_dup_string (_tmp83_, NULL);
	g_variant_unref (_tmp83_);
	_tmp84_ = g_variant_iter_next_value (&_arguments_iter);
	summary = g_variant_dup_string (_tmp84_, NULL);
	g_variant_unref (_tmp84_);
	_tmp85_ = g_variant_iter_next_value (&_arguments_iter);
	body = g_variant_dup_string (_tmp85_, NULL);
	g_variant_unref (_tmp85_);
	_tmp86_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp87_ = g_new (gchar*, 5);
	_tmp87__length = 0;
	_tmp87__size = 4;
	_tmp87__length1 = 0;
	g_variant_iter_init (&_tmp88_, _tmp86_);
	for (; (_tmp89_ = g_variant_iter_next_value (&_tmp88_)) != NULL; _tmp87__length1++) {
		if (_tmp87__size == _tmp87__length) {
			_tmp87__size = 2 * _tmp87__size;
			_tmp87_ = g_renew (gchar*, _tmp87_, _tmp87__size + 1);
		}
		_tmp87_[_tmp87__length++] = g_variant_dup_string (_tmp89_, NULL);
		g_variant_unref (_tmp89_);
	}
	actions_length1 = _tmp87__length1;
	_tmp87_[_tmp87__length] = NULL;
	actions = _tmp87_;
	g_variant_unref (_tmp86_);
	_tmp90_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp91_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp92_, _tmp90_);
	while (g_variant_iter_loop (&_tmp92_, "{?*}", &_tmp93_, &_tmp94_)) {
		g_hash_table_insert (_tmp91_, g_variant_dup_string (_tmp93_, NULL), g_variant_get_variant (_tmp94_));
	}
	hints = _tmp91_;
	g_variant_unref (_tmp90_);
	_tmp95_ = g_variant_iter_next_value (&_arguments_iter);
	expire_timeout = g_variant_get_int32 (_tmp95_);
	g_variant_unref (_tmp95_);
	result = gala_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
gala_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_gala_dbus_notifications_notify (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
gala_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
gala_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;
}

 G_GNUC_INTERNAL guint
gala_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 *) (&_gala_dbus_notifications_dbus_interface_info), &_gala_dbus_notifications_dbus_interface_vtable, data, _gala_dbus_notifications_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_gala_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
gala_media_feedback_get_instance_private (GalaMediaFeedback* self)
{
	return G_STRUCT_MEMBER_P (self, GalaMediaFeedback_private_offset);
}

void
gala_media_feedback_init (void)
{
	GalaMediaFeedback* _tmp0_;
	_tmp0_ = gala_media_feedback_instance;
	if (_tmp0_ == NULL) {
		GalaMediaFeedback* _tmp1_;
		_tmp1_ = gala_media_feedback_new ();
		_g_object_unref0 (gala_media_feedback_instance);
		gala_media_feedback_instance = _tmp1_;
	}
}

void
gala_media_feedback_send (const gchar* icon,
                          gint val)
{
	GalaMediaFeedback* _tmp0_;
	GThreadPool* _tmp1_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (icon != NULL);
	_tmp0_ = gala_media_feedback_instance;
	_tmp1_ = gala_media_feedback_pool;
	_vala_return_if_fail ((_tmp0_ != NULL) && (_tmp1_ != NULL), "instance != null && pool != null");
	{
		GThreadPool* _tmp2_;
		GalaMediaFeedbackFeedback* _tmp3_;
		_tmp2_ = gala_media_feedback_pool;
		_tmp3_ = gala_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:
	{
		g_clear_error (&_inner_error0_);
	}
	__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 GalaMediaFeedback*
gala_media_feedback_construct (GType object_type)
{
	GalaMediaFeedback * self = NULL;
	self = (GalaMediaFeedback*) g_object_new (object_type, NULL);
	return self;
}

static GalaMediaFeedback*
gala_media_feedback_new (void)
{
	return gala_media_feedback_construct (GALA_TYPE_MEDIA_FEEDBACK);
}

static void
__lambda45_ (GalaMediaFeedback* self,
             GObject* obj,
             GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		GalaDBusNotifications* _tmp0_ = NULL;
		GalaDBusNotifications* _tmp1_;
		GalaDBusNotifications* _tmp2_;
		GalaDBusNotifications* _tmp3_;
		_tmp1_ = g_async_result_get_source_object (res);
		_tmp2_ = (GalaDBusNotifications*) g_async_initable_new_finish ((GAsyncInitable *) _tmp1_, res, &_inner_error0_);
		g_object_unref (_tmp1_);
		_tmp0_ = (GalaDBusNotifications*) _tmp2_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp3_ = _tmp0_;
		_tmp0_ = NULL;
		_g_object_unref0 (self->priv->notifications);
		self->priv->notifications = _tmp3_;
		_g_object_unref0 (_tmp0_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp4_;
		const gchar* _tmp5_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp4_ = e;
		_tmp5_ = _tmp4_->message;
		g_debug ("MediaFeedback.vala:81: %s", _tmp5_);
		_g_object_unref0 (self->priv->notifications);
		self->priv->notifications = 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_);
		return;
	}
}

static void
___lambda45__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda45_ ((GalaMediaFeedback*) self, source_object, res);
	g_object_unref (self);
}

static void
gala_media_feedback_on_watch (GalaMediaFeedback* self,
                              GDBusConnection* conn)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (conn != NULL);
	g_async_initable_new_async (GALA_TYPE_DBUS_NOTIFICATIONS_PROXY, 0, NULL, ___lambda45__gasync_ready_callback, g_object_ref (self), "g-flags", G_DBUS_PROXY_FLAGS_NONE, "g-name", "org.freedesktop.Notifications", "g-connection", conn, "g-object-path", "/org/freedesktop/Notifications", "g-interface-name", "org.freedesktop.Notifications", NULL);
}

static void
gala_media_feedback_on_unwatch (GalaMediaFeedback* self,
                                GDBusConnection* conn)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (conn != NULL);
	_g_object_unref0 (self->priv->notifications);
	self->priv->notifications = 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
gala_media_feedback_send_feedback (GalaMediaFeedback* self,
                                   GalaMediaFeedbackFeedback* feedback)
{
	GalaDBusNotifications* _tmp0_;
	GHashTable* hints = NULL;
	GHashTable* _tmp1_;
	GHashTable* _tmp2_;
	gchar* _tmp3_;
	GVariant* _tmp4_;
	GHashTable* _tmp5_;
	gchar* _tmp6_;
	GVariant* _tmp7_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (feedback != NULL);
	_tmp0_ = self->priv->notifications;
	if (_tmp0_ == NULL) {
		_gala_media_feedback_feedback_free0 (feedback);
		return;
	}
	_tmp1_ = g_hash_table_new_full (NULL, NULL, _g_free0_, _g_variant_unref0_);
	hints = _tmp1_;
	_tmp2_ = hints;
	_tmp3_ = g_strdup ("x-canonical-private-synchronous");
	_tmp4_ = g_variant_new_string ("gala-feedback");
	g_variant_ref_sink (_tmp4_);
	g_hash_table_insert (_tmp2_, _tmp3_, _tmp4_);
	_tmp5_ = hints;
	_tmp6_ = g_strdup ("value");
	_tmp7_ = g_variant_new_int32 (feedback->level);
	g_variant_ref_sink (_tmp7_);
	g_hash_table_insert (_tmp5_, _tmp6_, _tmp7_);
	{
		guint32 _tmp8_ = 0U;
		GalaDBusNotifications* _tmp9_;
		const gchar* _tmp10_;
		gchar** _tmp11_;
		gchar** _tmp12_;
		gint _tmp12__length1;
		GHashTable* _tmp13_;
		guint32 _tmp14_;
		_tmp9_ = self->priv->notifications;
		_tmp10_ = feedback->icon;
		_tmp11_ = g_new0 (gchar*, 0 + 1);
		_tmp12_ = _tmp11_;
		_tmp12__length1 = 0;
		_tmp13_ = hints;
		_tmp14_ = gala_dbus_notifications_notify (_tmp9_, "gala-feedback", self->priv->notification_id, _tmp10_, "", "", _tmp12_, (gint) 0, _tmp13_, (gint32) 2000, &_inner_error0_);
		_tmp12_ = (_vala_array_free (_tmp12_, _tmp12__length1, (GDestroyNotify) g_free), NULL);
		_tmp8_ = _tmp14_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		self->priv->notification_id = _tmp8_;
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp15_;
		const gchar* _tmp16_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp15_ = e;
		_tmp16_ = _tmp15_->message;
		g_critical ("MediaFeedback.vala:103: %s", _tmp16_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_hash_table_unref0 (hints);
		_gala_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);
	_gala_media_feedback_feedback_free0 (feedback);
}

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

static void
gala_media_feedback_feedback_instance_init (GalaMediaFeedbackFeedback * self)
{
}

static void
gala_media_feedback_feedback_free (GalaMediaFeedbackFeedback * self)
{
	_g_free0 (self->icon);
	g_slice_free (GalaMediaFeedbackFeedback, self);
}

static void
_gala_media_feedback_send_feedback_gfunc (gpointer data,
                                          gpointer self)
{
	gala_media_feedback_send_feedback ((GalaMediaFeedback*) self, (GalaMediaFeedbackFeedback*) data);
}

static void
_gala_media_feedback_on_watch_gbus_name_appeared_callback (GDBusConnection* connection,
                                                           const gchar* name,
                                                           const gchar* name_owner,
                                                           gpointer self)
{
	gala_media_feedback_on_watch ((GalaMediaFeedback*) self, connection);
}

static void
_gala_media_feedback_on_unwatch_gbus_name_vanished_callback (GDBusConnection* connection,
                                                             const gchar* name,
                                                             gpointer self)
{
	gala_media_feedback_on_unwatch ((GalaMediaFeedback*) self, connection);
}

static GObject *
gala_media_feedback_constructor (GType type,
                                 guint n_construct_properties,
                                 GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	GalaMediaFeedback * self;
	GError* _inner_error0_ = NULL;
	parent_class = G_OBJECT_CLASS (gala_media_feedback_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GALA_TYPE_MEDIA_FEEDBACK, GalaMediaFeedback);
	{
		GThreadPool* _tmp0_ = NULL;
		GThreadPool* _tmp1_;
		GThreadPool* _tmp2_;
		_tmp1_ = g_thread_pool_new (_gala_media_feedback_send_feedback_gfunc, 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 (gala_media_feedback_pool);
		gala_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:64: %s", _tmp4_);
		_g_thread_pool_free0 (gala_media_feedback_pool);
		gala_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_);
	}
	{
		g_bus_watch_name_with_closures (G_BUS_TYPE_SESSION, "org.freedesktop.Notifications", G_BUS_NAME_WATCHER_FLAGS_NONE, (GClosure*) ((_gala_media_feedback_on_watch_gbus_name_appeared_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _gala_media_feedback_on_watch_gbus_name_appeared_callback, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((_gala_media_feedback_on_unwatch_gbus_name_vanished_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _gala_media_feedback_on_unwatch_gbus_name_vanished_callback, g_object_ref (self), (GClosureNotify) g_object_unref)));
	}
	goto __finally1;
	__catch1_g_io_error:
	{
		GError* e = NULL;
		GError* _tmp5_;
		const gchar* _tmp6_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp5_ = e;
		_tmp6_ = _tmp5_->message;
		g_debug ("MediaFeedback.vala:71: %s", _tmp6_);
		_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
gala_media_feedback_class_init (GalaMediaFeedbackClass * klass,
                                gpointer klass_data)
{
	gala_media_feedback_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GalaMediaFeedback_private_offset);
	G_OBJECT_CLASS (klass)->constructor = gala_media_feedback_constructor;
	G_OBJECT_CLASS (klass)->finalize = gala_media_feedback_finalize;
}

static void
gala_media_feedback_instance_init (GalaMediaFeedback * self,
                                   gpointer klass)
{
	self->priv = gala_media_feedback_get_instance_private (self);
	self->priv->notifications = NULL;
	self->priv->notification_id = (guint32) 0;
}

static void
gala_media_feedback_finalize (GObject * obj)
{
	GalaMediaFeedback * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GALA_TYPE_MEDIA_FEEDBACK, GalaMediaFeedback);
	_g_object_unref0 (self->priv->notifications);
	G_OBJECT_CLASS (gala_media_feedback_parent_class)->finalize (obj);
}

static GType
gala_media_feedback_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GalaMediaFeedbackClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gala_media_feedback_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GalaMediaFeedback), 0, (GInstanceInitFunc) gala_media_feedback_instance_init, NULL };
	GType gala_media_feedback_type_id;
	gala_media_feedback_type_id = g_type_register_static (G_TYPE_OBJECT, "GalaMediaFeedback", &g_define_type_info, 0);
	GalaMediaFeedback_private_offset = g_type_add_instance_private (gala_media_feedback_type_id, sizeof (GalaMediaFeedbackPrivate));
	return gala_media_feedback_type_id;
}

GType
gala_media_feedback_get_type (void)
{
	static volatile gsize gala_media_feedback_type_id__once = 0;
	if (g_once_init_enter (&gala_media_feedback_type_id__once)) {
		GType gala_media_feedback_type_id;
		gala_media_feedback_type_id = gala_media_feedback_get_type_once ();
		g_once_init_leave (&gala_media_feedback_type_id__once, gala_media_feedback_type_id);
	}
	return gala_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);
}

