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

/*
 * SPDX-License-Identifier: GPL-3.0-or-later
 * SPDX-FileCopyrightText: 2016 Rico Tzschichholz
 *                         2025 elementary, Inc. (https://elementary.io)
 */

#include <glib-object.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>

#define GALA_NOTIFICATIONS_MANAGER_EXPIRE_TIMEOUT 2000
#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 GALA_TYPE_NOTIFICATIONS_MANAGER (gala_notifications_manager_get_type ())
#define GALA_NOTIFICATIONS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_TYPE_NOTIFICATIONS_MANAGER, GalaNotificationsManager))
#define GALA_NOTIFICATIONS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GALA_TYPE_NOTIFICATIONS_MANAGER, GalaNotificationsManagerClass))
#define GALA_IS_NOTIFICATIONS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_TYPE_NOTIFICATIONS_MANAGER))
#define GALA_IS_NOTIFICATIONS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GALA_TYPE_NOTIFICATIONS_MANAGER))
#define GALA_NOTIFICATIONS_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GALA_TYPE_NOTIFICATIONS_MANAGER, GalaNotificationsManagerClass))

typedef struct _GalaNotificationsManager GalaNotificationsManager;
typedef struct _GalaNotificationsManagerClass GalaNotificationsManagerClass;
typedef struct _GalaNotificationsManagerPrivate GalaNotificationsManagerPrivate;

#define GALA_NOTIFICATIONS_MANAGER_TYPE_DBUS_NOTIFICATIONS (gala_notifications_manager_dbus_notifications_get_type ())
#define GALA_NOTIFICATIONS_MANAGER_DBUS_NOTIFICATIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_NOTIFICATIONS_MANAGER_TYPE_DBUS_NOTIFICATIONS, GalaNotificationsManagerDBusNotifications))
#define GALA_NOTIFICATIONS_MANAGER_IS_DBUS_NOTIFICATIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_NOTIFICATIONS_MANAGER_TYPE_DBUS_NOTIFICATIONS))
#define GALA_NOTIFICATIONS_MANAGER_DBUS_NOTIFICATIONS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GALA_NOTIFICATIONS_MANAGER_TYPE_DBUS_NOTIFICATIONS, GalaNotificationsManagerDBusNotificationsIface))

typedef struct _GalaNotificationsManagerDBusNotifications GalaNotificationsManagerDBusNotifications;
typedef struct _GalaNotificationsManagerDBusNotificationsIface GalaNotificationsManagerDBusNotificationsIface;

#define GALA_NOTIFICATIONS_MANAGER_TYPE_DBUS_NOTIFICATIONS_PROXY (gala_notifications_manager_dbus_notifications_proxy_get_type ())
enum  {
	GALA_NOTIFICATIONS_MANAGER_0_PROPERTY,
	GALA_NOTIFICATIONS_MANAGER_NUM_PROPERTIES
};
static GParamSpec* gala_notifications_manager_properties[GALA_NOTIFICATIONS_MANAGER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
typedef struct _GalaNotificationsManagerSendData GalaNotificationsManagerSendData;
enum  {
	GALA_NOTIFICATIONS_MANAGER_DBUS_NOTIFICATIONS_ACTION_INVOKED_SIGNAL,
	GALA_NOTIFICATIONS_MANAGER_DBUS_NOTIFICATIONS_NOTIFICATION_CLOSED_SIGNAL,
	GALA_NOTIFICATIONS_MANAGER_DBUS_NOTIFICATIONS_NUM_SIGNALS
};
static guint gala_notifications_manager_dbus_notifications_signals[GALA_NOTIFICATIONS_MANAGER_DBUS_NOTIFICATIONS_NUM_SIGNALS] = {0};
typedef GDBusProxy GalaNotificationsManagerDBusNotificationsProxy;
typedef GDBusProxyClass GalaNotificationsManagerDBusNotificationsProxyClass;
typedef struct _GalaNotificationsManagerDbusNotificationsNotifyReadyData GalaNotificationsManagerDbusNotificationsNotifyReadyData;
enum  {
	GALA_NOTIFICATIONS_MANAGER_ACTION_INVOKED_SIGNAL,
	GALA_NOTIFICATIONS_MANAGER_NOTIFICATION_CLOSED_SIGNAL,
	GALA_NOTIFICATIONS_MANAGER_NUM_SIGNALS
};
static guint gala_notifications_manager_signals[GALA_NOTIFICATIONS_MANAGER_NUM_SIGNALS] = {0};

struct _GalaNotificationsManager {
	GObject parent_instance;
	GalaNotificationsManagerPrivate * priv;
};

struct _GalaNotificationsManagerClass {
	GObjectClass parent_class;
};

struct _GalaNotificationsManagerDBusNotificationsIface {
	GTypeInterface parent_iface;
	void (*notify) (GalaNotificationsManagerDBusNotifications* 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, GAsyncReadyCallback _callback_, gpointer _user_data_);
	guint32 (*notify_finish) (GalaNotificationsManagerDBusNotifications* self, GAsyncResult* _res_, GError** error);
};

struct _GalaNotificationsManagerPrivate {
	GalaNotificationsManagerDBusNotifications* notifications;
	GHashTable* replaces_id_table;
};

struct _GalaNotificationsManagerSendData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GalaNotificationsManager* self;
	gchar* component_name;
	gchar* icon;
	gchar* summary;
	gchar* body;
	gchar** actions;
	gint actions_length1;
	GHashTable* hints;
	guint32* result;
	GalaNotificationsManagerDBusNotifications* _tmp0_;
	guint32* replaces_id;
	GHashTable* _tmp1_;
	gconstpointer _tmp2_;
	guint32 _tmp3_;
	guint32* _tmp4_;
	guint32* _tmp5_;
	guint32 _tmp6_;
	guint32* _tmp7_;
	guint32 notification_id;
	GalaNotificationsManagerDBusNotifications* _tmp8_;
	guint32* _tmp9_;
	GHashTable* _tmp10_;
	gchar* _tmp11_;
	guint32* _tmp12_;
	GError* e;
	GError* _tmp13_;
	const gchar* _tmp14_;
	GError* _inner_error0_;
};

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

static gint GalaNotificationsManager_private_offset;
static gpointer gala_notifications_manager_parent_class = NULL;

VALA_EXTERN GType gala_notifications_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaNotificationsManager, g_object_unref)
VALA_EXTERN GType gala_notifications_manager_dbus_notifications_proxy_get_type (void) G_GNUC_CONST ;
static guint gala_notifications_manager_dbus_notifications_register_object (void* object,
                                                                     GDBusConnection* connection,
                                                                     const gchar* path,
                                                                     GError** error);
static GType gala_notifications_manager_dbus_notifications_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaNotificationsManagerDBusNotifications, g_object_unref)
static void _g_free0_ (gpointer var);
static void gala_notifications_manager_on_watch (GalaNotificationsManager* self,
                                          GDBusConnection* connection);
static void __lambda102_ (GalaNotificationsManager* self,
                   GObject* obj,
                   GAsyncResult* res);
static void gala_notifications_manager_handle_action_invoked (GalaNotificationsManager* self,
                                                       guint32 id,
                                                       const gchar* action_name);
static void _gala_notifications_manager_handle_action_invoked_gala_notifications_manager_dbus_notifications_action_invoked (GalaNotificationsManagerDBusNotifications* _sender,
                                                                                                                     guint32 id,
                                                                                                                     const gchar* action_key,
                                                                                                                     gpointer self);
static void gala_notifications_manager_handle_notification_closed (GalaNotificationsManager* self,
                                                            guint32 id,
                                                            guint32 reason);
static void _gala_notifications_manager_handle_notification_closed_gala_notifications_manager_dbus_notifications_notification_closed (GalaNotificationsManagerDBusNotifications* _sender,
                                                                                                                               guint32 id,
                                                                                                                               guint32 reason,
                                                                                                                               gpointer self);
static void ___lambda102__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void gala_notifications_manager_on_unwatch (GalaNotificationsManager* self,
                                            GDBusConnection* conn);
static void gala_notifications_manager_send_data_free (gpointer _data);
VALA_EXTERN void gala_notifications_manager_send (GalaNotificationsManager* self,
                                      const gchar* component_name,
                                      const gchar* icon,
                                      const gchar* summary,
                                      const gchar* body,
                                      gchar** actions,
                                      gint actions_length1,
                                      GHashTable* hints,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_);
VALA_EXTERN guint32* gala_notifications_manager_send_finish (GalaNotificationsManager* self,
                                                 GAsyncResult* _res_);
static gboolean gala_notifications_manager_send_co (GalaNotificationsManagerSendData* _data_);
static guint32* _uint32_dup (guint32* self);
static void gala_notifications_manager_dbus_notifications_notify (GalaNotificationsManagerDBusNotifications* 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,
                                                           GAsyncReadyCallback _callback_,
                                                           gpointer _user_data_);
static guint32 gala_notifications_manager_dbus_notifications_notify_finish (GalaNotificationsManagerDBusNotifications* self,
                                                                     GAsyncResult* _res_,
                                                                     GError** error);
static void gala_notifications_manager_send_ready (GObject* source_object,
                                            GAsyncResult* _res_,
                                            gpointer _user_data_);
VALA_EXTERN GalaNotificationsManager* gala_notifications_manager_new (void);
VALA_EXTERN GalaNotificationsManager* gala_notifications_manager_construct (GType object_type);
static void g_cclosure_user_marshal_VOID__UINT_STRING_VARIANT (GClosure * closure,
                                                        GValue * return_value,
                                                        guint n_param_values,
                                                        const GValue * param_values,
                                                        gpointer invocation_hint,
                                                        gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__UINT_STRING (GClosure * closure,
                                                GValue * return_value,
                                                guint n_param_values,
                                                const GValue * param_values,
                                                gpointer invocation_hint,
                                                gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__UINT_UINT (GClosure * closure,
                                              GValue * return_value,
                                              guint n_param_values,
                                              const GValue * param_values,
                                              gpointer invocation_hint,
                                              gpointer marshal_data);
static GType gala_notifications_manager_dbus_notifications_get_type_once (void);
static void gala_notifications_manager_dbus_notifications_proxy_g_signal (GDBusProxy* proxy,
                                                                   const gchar* sender_name,
                                                                   const gchar* signal_name,
                                                                   GVariant* parameters);
static void _dbus_handle_gala_notifications_manager_dbus_notifications_action_invoked (GalaNotificationsManagerDBusNotifications* self,
                                                                                GVariant* parameters);
static void _dbus_handle_gala_notifications_manager_dbus_notifications_notification_closed (GalaNotificationsManagerDBusNotifications* self,
                                                                                     GVariant* parameters);
static void _vala_g_async_ready_callback (GObject *source_object,
                                   GAsyncResult *res,
                                   void *user_data);
static void gala_notifications_manager_dbus_notifications_proxy_notify_async (GalaNotificationsManagerDBusNotifications* 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,
                                                                       GAsyncReadyCallback _callback_,
                                                                       gpointer _user_data_);
static guint32 gala_notifications_manager_dbus_notifications_proxy_notify_finish (GalaNotificationsManagerDBusNotifications* self,
                                                                           GAsyncResult* _res_,
                                                                           GError** error);
static void gala_notifications_manager_dbus_notifications_proxy_gala_notifications_manager_dbus_notifications_interface_init (GalaNotificationsManagerDBusNotificationsIface* iface);
static void _dbus_gala_notifications_manager_dbus_notifications_notify (GalaNotificationsManagerDBusNotifications* self,
                                                                 GVariant* _parameters_,
                                                                 GDBusMethodInvocation* invocation);
static void _dbus_gala_notifications_manager_dbus_notifications_notify_ready (GObject * source_object,
                                                                       GAsyncResult * _res_,
                                                                       gpointer _user_data_);
static void gala_notifications_manager_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_notifications_manager_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_notifications_manager_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 _dbus_gala_notifications_manager_dbus_notifications_action_invoked (GObject* _sender,
                                                                         guint32 id,
                                                                         const gchar* action_key,
                                                                         gpointer* _data);
static void _dbus_gala_notifications_manager_dbus_notifications_notification_closed (GObject* _sender,
                                                                              guint32 id,
                                                                              guint32 reason,
                                                                              gpointer* _data);
static void _gala_notifications_manager_dbus_notifications_unregister_object (gpointer user_data);
static GObject * gala_notifications_manager_constructor (GType type,
                                                  guint n_construct_properties,
                                                  GObjectConstructParam * construct_properties);
static void _gala_notifications_manager_on_watch_gbus_name_appeared_callback (GDBusConnection* connection,
                                                                       const gchar* name,
                                                                       const gchar* name_owner,
                                                                       gpointer self);
static void _gala_notifications_manager_on_unwatch_gbus_name_vanished_callback (GDBusConnection* connection,
                                                                         const gchar* name,
                                                                         gpointer self);
static void gala_notifications_manager_finalize (GObject * obj);
static GType gala_notifications_manager_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_notifications_manager_dbus_notifications_dbus_arg_info_notify_app_name = {-1, "app_name", "s", NULL};
static const GDBusArgInfo _gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_replaces_id = {-1, "replaces_id", "u", NULL};
static const GDBusArgInfo _gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_app_icon = {-1, "app_icon", "s", NULL};
static const GDBusArgInfo _gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_summary = {-1, "summary", "s", NULL};
static const GDBusArgInfo _gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_body = {-1, "body", "s", NULL};
static const GDBusArgInfo _gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_actions = {-1, "actions", "as", NULL};
static const GDBusArgInfo _gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_hints = {-1, "hints", "a{sv}", NULL};
static const GDBusArgInfo _gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_expire_timeout = {-1, "expire_timeout", "i", NULL};
static const GDBusArgInfo _gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_result = {-1, "result", "u", NULL};
static const GDBusArgInfo * const _gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_in[] = {&_gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_app_name, &_gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_replaces_id, &_gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_app_icon, &_gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_summary, &_gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_body, &_gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_actions, &_gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_hints, &_gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_expire_timeout, NULL};
static const GDBusArgInfo * const _gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_out[] = {&_gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_result, NULL};
static const GDBusMethodInfo _gala_notifications_manager_dbus_notifications_dbus_method_info_notify = {-1, "Notify", (GDBusArgInfo **) (&_gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_in), (GDBusArgInfo **) (&_gala_notifications_manager_dbus_notifications_dbus_arg_info_notify_out), NULL};
static const GDBusMethodInfo * const _gala_notifications_manager_dbus_notifications_dbus_method_info[] = {&_gala_notifications_manager_dbus_notifications_dbus_method_info_notify, NULL};
static const GDBusArgInfo _gala_notifications_manager_dbus_notifications_dbus_arg_info_action_invoked_id = {-1, "id", "u", NULL};
static const GDBusArgInfo _gala_notifications_manager_dbus_notifications_dbus_arg_info_action_invoked_action_key = {-1, "action_key", "s", NULL};
static const GDBusArgInfo * const _gala_notifications_manager_dbus_notifications_dbus_arg_info_action_invoked[] = {&_gala_notifications_manager_dbus_notifications_dbus_arg_info_action_invoked_id, &_gala_notifications_manager_dbus_notifications_dbus_arg_info_action_invoked_action_key, NULL};
static const GDBusSignalInfo _gala_notifications_manager_dbus_notifications_dbus_signal_info_action_invoked = {-1, "ActionInvoked", (GDBusArgInfo **) (&_gala_notifications_manager_dbus_notifications_dbus_arg_info_action_invoked), NULL};
static const GDBusArgInfo _gala_notifications_manager_dbus_notifications_dbus_arg_info_notification_closed_id = {-1, "id", "u", NULL};
static const GDBusArgInfo _gala_notifications_manager_dbus_notifications_dbus_arg_info_notification_closed_reason = {-1, "reason", "u", NULL};
static const GDBusArgInfo * const _gala_notifications_manager_dbus_notifications_dbus_arg_info_notification_closed[] = {&_gala_notifications_manager_dbus_notifications_dbus_arg_info_notification_closed_id, &_gala_notifications_manager_dbus_notifications_dbus_arg_info_notification_closed_reason, NULL};
static const GDBusSignalInfo _gala_notifications_manager_dbus_notifications_dbus_signal_info_notification_closed = {-1, "NotificationClosed", (GDBusArgInfo **) (&_gala_notifications_manager_dbus_notifications_dbus_arg_info_notification_closed), NULL};
static const GDBusSignalInfo * const _gala_notifications_manager_dbus_notifications_dbus_signal_info[] = {&_gala_notifications_manager_dbus_notifications_dbus_signal_info_action_invoked, &_gala_notifications_manager_dbus_notifications_dbus_signal_info_notification_closed, NULL};
static const GDBusPropertyInfo * const _gala_notifications_manager_dbus_notifications_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _gala_notifications_manager_dbus_notifications_dbus_interface_info = {-1, "org.freedesktop.Notifications", (GDBusMethodInfo **) (&_gala_notifications_manager_dbus_notifications_dbus_method_info), (GDBusSignalInfo **) (&_gala_notifications_manager_dbus_notifications_dbus_signal_info), (GDBusPropertyInfo **) (&_gala_notifications_manager_dbus_notifications_dbus_property_info), NULL};
static const GDBusInterfaceVTable _gala_notifications_manager_dbus_notifications_dbus_interface_vtable = {gala_notifications_manager_dbus_notifications_dbus_interface_method_call, gala_notifications_manager_dbus_notifications_dbus_interface_get_property, gala_notifications_manager_dbus_notifications_dbus_interface_set_property};

static inline gpointer
gala_notifications_manager_get_instance_private (GalaNotificationsManager* self)
{
	return G_STRUCT_MEMBER_P (self, GalaNotificationsManager_private_offset);
}

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

static void
_gala_notifications_manager_handle_action_invoked_gala_notifications_manager_dbus_notifications_action_invoked (GalaNotificationsManagerDBusNotifications* _sender,
                                                                                                                guint32 id,
                                                                                                                const gchar* action_key,
                                                                                                                gpointer self)
{
	gala_notifications_manager_handle_action_invoked ((GalaNotificationsManager*) self, id, action_key);
}

static void
_gala_notifications_manager_handle_notification_closed_gala_notifications_manager_dbus_notifications_notification_closed (GalaNotificationsManagerDBusNotifications* _sender,
                                                                                                                          guint32 id,
                                                                                                                          guint32 reason,
                                                                                                                          gpointer self)
{
	gala_notifications_manager_handle_notification_closed ((GalaNotificationsManager*) self, id, reason);
}

static void
__lambda102_ (GalaNotificationsManager* self,
              GObject* obj,
              GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		GalaNotificationsManagerDBusNotifications* _tmp0_ = NULL;
		GalaNotificationsManagerDBusNotifications* _tmp1_;
		GalaNotificationsManagerDBusNotifications* _tmp2_;
		GalaNotificationsManagerDBusNotifications* _tmp3_;
		GalaNotificationsManagerDBusNotifications* _tmp4_;
		GalaNotificationsManagerDBusNotifications* _tmp5_;
		_tmp1_ = g_async_result_get_source_object (res);
		_tmp2_ = (GalaNotificationsManagerDBusNotifications*) g_async_initable_new_finish ((GAsyncInitable *) _tmp1_, res, &_inner_error0_);
		g_object_unref (_tmp1_);
		_tmp0_ = (GalaNotificationsManagerDBusNotifications*) _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_;
		_tmp4_ = self->priv->notifications;
		g_signal_connect_object (_tmp4_, "action-invoked", (GCallback) _gala_notifications_manager_handle_action_invoked_gala_notifications_manager_dbus_notifications_action_invoked, self, 0);
		_tmp5_ = self->priv->notifications;
		g_signal_connect_object (_tmp5_, "notification-closed", (GCallback) _gala_notifications_manager_handle_notification_closed_gala_notifications_manager_dbus_notifications_notification_closed, self, 0);
		_g_object_unref0 (_tmp0_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp6_;
		const gchar* _tmp7_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp6_ = e;
		_tmp7_ = _tmp6_->message;
		g_warning ("NotificationsManager.vala:41: NotificationsManager: Couldn't connect t" \
"o notifications server: %s", _tmp7_);
		_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
___lambda102__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda102_ ((GalaNotificationsManager*) self, source_object, res);
	g_object_unref (self);
}

static void
gala_notifications_manager_on_watch (GalaNotificationsManager* self,
                                     GDBusConnection* connection)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (connection != NULL);
	g_async_initable_new_async (GALA_NOTIFICATIONS_MANAGER_TYPE_DBUS_NOTIFICATIONS_PROXY, 0, NULL, ___lambda102__gasync_ready_callback, g_object_ref (self), "g-flags", G_DBUS_PROXY_FLAGS_NONE, "g-name", "org.freedesktop.Notifications", "g-connection", connection, "g-object-path", "/org/freedesktop/Notifications", "g-interface-name", "org.freedesktop.Notifications", NULL);
}

static void
gala_notifications_manager_on_unwatch (GalaNotificationsManager* self,
                                       GDBusConnection* conn)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (conn != NULL);
	g_warning ("NotificationsManager.vala:49: NotificationsManager: Lost connection to" \
" notifications server");
	_g_object_unref0 (self->priv->notifications);
	self->priv->notifications = NULL;
}

static void
gala_notifications_manager_handle_action_invoked (GalaNotificationsManager* self,
                                                  guint32 id,
                                                  const gchar* action_name)
{
	gchar* name = NULL;
	GVariant* target_value = NULL;
	const gchar* _tmp4_;
	GVariant* _tmp5_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action_name != NULL);
	{
		gchar* _tmp0_ = NULL;
		GVariant* _tmp1_ = NULL;
		g_action_parse_detailed_name (action_name, &_tmp0_, &_tmp1_, &_inner_error0_);
		_g_free0 (name);
		name = _tmp0_;
		_g_variant_unref0 (target_value);
		target_value = _tmp1_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp2_;
		const gchar* _tmp3_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp2_ = e;
		_tmp3_ = _tmp2_->message;
		g_warning ("NotificationsManager.vala:60: NotificationsManager: Couldn't parse act" \
"ion: %s", _tmp3_);
		_g_error_free0 (e);
		_g_variant_unref0 (target_value);
		_g_free0 (name);
		return;
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_variant_unref0 (target_value);
		_g_free0 (name);
		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;
	}
	_tmp4_ = name;
	_tmp5_ = target_value;
	g_signal_emit (self, gala_notifications_manager_signals[GALA_NOTIFICATIONS_MANAGER_ACTION_INVOKED_SIGNAL], 0, id, _tmp4_, _tmp5_);
	_g_variant_unref0 (target_value);
	_g_free0 (name);
}

static void
gala_notifications_manager_handle_notification_closed (GalaNotificationsManager* self,
                                                       guint32 id,
                                                       guint32 reason)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, gala_notifications_manager_signals[GALA_NOTIFICATIONS_MANAGER_NOTIFICATION_CLOSED_SIGNAL], 0, id);
}

static void
gala_notifications_manager_send_data_free (gpointer _data)
{
	GalaNotificationsManagerSendData* _data_;
	_data_ = _data;
	_g_free0 (_data_->component_name);
	_g_free0 (_data_->icon);
	_g_free0 (_data_->summary);
	_g_free0 (_data_->body);
	_g_hash_table_unref0 (_data_->hints);
	_g_free0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (GalaNotificationsManagerSendData, _data_);
}

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

static gpointer
_g_hash_table_ref0 (gpointer self)
{
	return self ? g_hash_table_ref (self) : NULL;
}

void
gala_notifications_manager_send (GalaNotificationsManager* self,
                                 const gchar* component_name,
                                 const gchar* icon,
                                 const gchar* summary,
                                 const gchar* body,
                                 gchar** actions,
                                 gint actions_length1,
                                 GHashTable* hints,
                                 GAsyncReadyCallback _callback_,
                                 gpointer _user_data_)
{
	GalaNotificationsManagerSendData* _data_;
	GalaNotificationsManager* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GHashTable* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (component_name != NULL);
	g_return_if_fail (icon != NULL);
	g_return_if_fail (summary != NULL);
	g_return_if_fail (body != NULL);
	g_return_if_fail (hints != NULL);
	_data_ = g_slice_new0 (GalaNotificationsManagerSendData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, gala_notifications_manager_send_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (component_name);
	_g_free0 (_data_->component_name);
	_data_->component_name = _tmp1_;
	_tmp2_ = g_strdup (icon);
	_g_free0 (_data_->icon);
	_data_->icon = _tmp2_;
	_tmp3_ = g_strdup (summary);
	_g_free0 (_data_->summary);
	_data_->summary = _tmp3_;
	_tmp4_ = g_strdup (body);
	_g_free0 (_data_->body);
	_data_->body = _tmp4_;
	_data_->actions = actions;
	_data_->actions_length1 = actions_length1;
	_tmp5_ = _g_hash_table_ref0 (hints);
	_g_hash_table_unref0 (_data_->hints);
	_data_->hints = _tmp5_;
	gala_notifications_manager_send_co (_data_);
}

guint32*
gala_notifications_manager_send_finish (GalaNotificationsManager* self,
                                        GAsyncResult* _res_)
{
	guint32* result;
	GalaNotificationsManagerSendData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static guint32*
_uint32_dup (guint32* self)
{
	guint32* dup;
	dup = g_new0 (guint32, 1);
	memcpy (dup, self, sizeof (guint32));
	return dup;
}

static gpointer
__uint32_dup0 (gpointer self)
{
	return self ? _uint32_dup (self) : NULL;
}

static void
gala_notifications_manager_send_ready (GObject* source_object,
                                       GAsyncResult* _res_,
                                       gpointer _user_data_)
{
	GalaNotificationsManagerSendData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	gala_notifications_manager_send_co (_data_);
}

static gboolean
gala_notifications_manager_send_co (GalaNotificationsManagerSendData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->notifications;
	if (_data_->_tmp0_ == NULL) {
		g_warning ("NotificationsManager.vala:80: NotificationsManager: Unable to send not" \
"ification. No connection to notification server");
		_data_->result = NULL;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp1_ = _data_->self->priv->replaces_id_table;
	_data_->_tmp2_ = g_hash_table_lookup (_data_->_tmp1_, _data_->component_name);
	_data_->_tmp3_ = (guint32) ((guintptr) _data_->_tmp2_);
	_data_->_tmp4_ = __uint32_dup0 (&_data_->_tmp3_);
	_data_->replaces_id = _data_->_tmp4_;
	_data_->_tmp5_ = _data_->replaces_id;
	if (_data_->_tmp5_ == NULL) {
		_data_->_tmp6_ = (guint32) 0;
		_data_->_tmp7_ = __uint32_dup0 (&_data_->_tmp6_);
		_g_free0 (_data_->replaces_id);
		_data_->replaces_id = _data_->_tmp7_;
	}
	{
		_data_->_tmp8_ = _data_->self->priv->notifications;
		_data_->_tmp9_ = _data_->replaces_id;
		_data_->_state_ = 1;
		gala_notifications_manager_dbus_notifications_notify (_data_->_tmp8_, "gala-feedback", *_data_->_tmp9_, _data_->icon, _data_->summary, _data_->body, _data_->actions, (gint) _data_->actions_length1, _data_->hints, (gint32) GALA_NOTIFICATIONS_MANAGER_EXPIRE_TIMEOUT, gala_notifications_manager_send_ready, _data_);
		return FALSE;
		_state_1:
		_data_->notification_id = gala_notifications_manager_dbus_notifications_notify_finish (_data_->_tmp8_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp10_ = _data_->self->priv->replaces_id_table;
		_data_->_tmp11_ = g_strdup (_data_->component_name);
		g_hash_table_insert (_data_->_tmp10_, _data_->_tmp11_, (gpointer) ((guintptr) _data_->notification_id));
		_data_->_tmp12_ = __uint32_dup0 (&_data_->notification_id);
		_data_->result = _data_->_tmp12_;
		_g_free0 (_data_->replaces_id);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp13_ = _data_->e;
		_data_->_tmp14_ = _data_->_tmp13_->message;
		g_critical ("NotificationsManager.vala:105: NotificationsManager: There was an erro" \
"r sending a notification: %s", _data_->_tmp14_);
		_data_->result = NULL;
		_g_error_free0 (_data_->e);
		_g_free0 (_data_->replaces_id);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	__finally0:
	_g_free0 (_data_->replaces_id);
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
	g_clear_error (&_data_->_inner_error0_);
	g_object_unref (_data_->_async_result);
	return FALSE;
}

GalaNotificationsManager*
gala_notifications_manager_construct (GType object_type)
{
	GalaNotificationsManager * self = NULL;
	self = (GalaNotificationsManager*) g_object_new (object_type, NULL);
	return self;
}

GalaNotificationsManager*
gala_notifications_manager_new (void)
{
	return gala_notifications_manager_construct (GALA_TYPE_NOTIFICATIONS_MANAGER);
}

static void
g_cclosure_user_marshal_VOID__UINT_STRING_VARIANT (GClosure * closure,
                                                   GValue * return_value,
                                                   guint n_param_values,
                                                   const GValue * param_values,
                                                   gpointer invocation_hint,
                                                   gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__UINT_STRING_VARIANT) (gpointer data1, guint32 arg_1, const char* arg_2, gpointer arg_3, gpointer data2);
	register GMarshalFunc_VOID__UINT_STRING_VARIANT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 4);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__UINT_STRING_VARIANT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_uint (param_values + 1), g_value_get_string (param_values + 2), g_value_get_variant (param_values + 3), data2);
}

void
gala_notifications_manager_dbus_notifications_notify (GalaNotificationsManagerDBusNotifications* 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,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_)
{
	GalaNotificationsManagerDBusNotificationsIface* _iface_;
	_iface_ = GALA_NOTIFICATIONS_MANAGER_DBUS_NOTIFICATIONS_GET_INTERFACE (self);
	if (_iface_->notify) {
		_iface_->notify (self, app_name, replaces_id, app_icon, summary, body, actions, actions_length1, hints, expire_timeout, _callback_, _user_data_);
	}
}

guint32
gala_notifications_manager_dbus_notifications_notify_finish (GalaNotificationsManagerDBusNotifications* self,
                                                             GAsyncResult* _res_,
                                                             GError** error)
{
	GalaNotificationsManagerDBusNotificationsIface* _iface_;
	_iface_ = GALA_NOTIFICATIONS_MANAGER_DBUS_NOTIFICATIONS_GET_INTERFACE (self);
	if (_iface_->notify_finish) {
		return _iface_->notify_finish (self, _res_, error);
	}
	return 0U;
}

static void
g_cclosure_user_marshal_VOID__UINT_STRING (GClosure * closure,
                                           GValue * return_value,
                                           guint n_param_values,
                                           const GValue * param_values,
                                           gpointer invocation_hint,
                                           gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__UINT_STRING) (gpointer data1, guint32 arg_1, const char* arg_2, gpointer data2);
	register GMarshalFunc_VOID__UINT_STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__UINT_STRING) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_uint (param_values + 1), g_value_get_string (param_values + 2), data2);
}

static void
g_cclosure_user_marshal_VOID__UINT_UINT (GClosure * closure,
                                         GValue * return_value,
                                         guint n_param_values,
                                         const GValue * param_values,
                                         gpointer invocation_hint,
                                         gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__UINT_UINT) (gpointer data1, guint32 arg_1, guint32 arg_2, gpointer data2);
	register GMarshalFunc_VOID__UINT_UINT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__UINT_UINT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_uint (param_values + 1), g_value_get_uint (param_values + 2), data2);
}

static void
gala_notifications_manager_dbus_notifications_default_init (GalaNotificationsManagerDBusNotificationsIface * iface,
                                                            gpointer iface_data)
{
	gala_notifications_manager_dbus_notifications_signals[GALA_NOTIFICATIONS_MANAGER_DBUS_NOTIFICATIONS_ACTION_INVOKED_SIGNAL] = g_signal_new ("action-invoked", GALA_NOTIFICATIONS_MANAGER_TYPE_DBUS_NOTIFICATIONS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_STRING, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING);
	gala_notifications_manager_dbus_notifications_signals[GALA_NOTIFICATIONS_MANAGER_DBUS_NOTIFICATIONS_NOTIFICATION_CLOSED_SIGNAL] = g_signal_new ("notification-closed", GALA_NOTIFICATIONS_MANAGER_TYPE_DBUS_NOTIFICATIONS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
}

 G_GNUC_NO_INLINE static GType
gala_notifications_manager_dbus_notifications_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GalaNotificationsManagerDBusNotificationsIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gala_notifications_manager_dbus_notifications_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gala_notifications_manager_dbus_notifications_type_id;
	gala_notifications_manager_dbus_notifications_type_id = g_type_register_static (G_TYPE_INTERFACE, "GalaNotificationsManagerDBusNotifications", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gala_notifications_manager_dbus_notifications_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (gala_notifications_manager_dbus_notifications_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) gala_notifications_manager_dbus_notifications_proxy_get_type);
	g_type_set_qdata (gala_notifications_manager_dbus_notifications_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.Notifications");
	g_type_set_qdata (gala_notifications_manager_dbus_notifications_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_gala_notifications_manager_dbus_notifications_dbus_interface_info));
	g_type_set_qdata (gala_notifications_manager_dbus_notifications_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) gala_notifications_manager_dbus_notifications_register_object);
	return gala_notifications_manager_dbus_notifications_type_id;
}

static GType
gala_notifications_manager_dbus_notifications_get_type (void)
{
	static gsize gala_notifications_manager_dbus_notifications_type_id__once = 0;
	if (g_once_init_enter (&gala_notifications_manager_dbus_notifications_type_id__once)) {
		GType gala_notifications_manager_dbus_notifications_type_id;
		gala_notifications_manager_dbus_notifications_type_id = gala_notifications_manager_dbus_notifications_get_type_once ();
		g_once_init_leave (&gala_notifications_manager_dbus_notifications_type_id__once, gala_notifications_manager_dbus_notifications_type_id);
	}
	return gala_notifications_manager_dbus_notifications_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (GalaNotificationsManagerDBusNotificationsProxy, gala_notifications_manager_dbus_notifications_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (GALA_NOTIFICATIONS_MANAGER_TYPE_DBUS_NOTIFICATIONS, gala_notifications_manager_dbus_notifications_proxy_gala_notifications_manager_dbus_notifications_interface_init) )
static void
gala_notifications_manager_dbus_notifications_proxy_class_init (GalaNotificationsManagerDBusNotificationsProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = gala_notifications_manager_dbus_notifications_proxy_g_signal;
}

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

static void
_dbus_handle_gala_notifications_manager_dbus_notifications_notification_closed (GalaNotificationsManagerDBusNotifications* self,
                                                                                GVariant* parameters)
{
	GVariantIter _arguments_iter;
	guint32 id = 0U;
	GVariant* _tmp2_;
	guint32 reason = 0U;
	GVariant* _tmp3_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp2_ = g_variant_iter_next_value (&_arguments_iter);
	id = g_variant_get_uint32 (_tmp2_);
	g_variant_unref (_tmp2_);
	_tmp3_ = g_variant_iter_next_value (&_arguments_iter);
	reason = g_variant_get_uint32 (_tmp3_);
	g_variant_unref (_tmp3_);
	g_signal_emit_by_name (self, "notification-closed", id, reason);
}

static void
gala_notifications_manager_dbus_notifications_proxy_g_signal (GDBusProxy* proxy,
                                                              const gchar* sender_name,
                                                              const gchar* signal_name,
                                                              GVariant* parameters)
{
	if (strcmp (signal_name, "ActionInvoked") == 0) {
		_dbus_handle_gala_notifications_manager_dbus_notifications_action_invoked ((GalaNotificationsManagerDBusNotifications*) proxy, parameters);
	} else if (strcmp (signal_name, "NotificationClosed") == 0) {
		_dbus_handle_gala_notifications_manager_dbus_notifications_notification_closed ((GalaNotificationsManagerDBusNotifications*) proxy, parameters);
	}
}

static void
gala_notifications_manager_dbus_notifications_proxy_init (GalaNotificationsManagerDBusNotificationsProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_gala_notifications_manager_dbus_notifications_dbus_interface_info));
}

static void
_vala_g_async_ready_callback (GObject *source_object,
                              GAsyncResult *res,
                              void *user_data)
{
	g_task_return_pointer (user_data, g_object_ref (res), g_object_unref);
	g_object_unref (user_data);
}

static void
gala_notifications_manager_dbus_notifications_proxy_notify_async (GalaNotificationsManagerDBusNotifications* 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,
                                                                  GAsyncReadyCallback _callback_,
                                                                  gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	gchar** _tmp4_;
	GVariantBuilder _tmp5_;
	gint _tmp6_;
	GVariantBuilder _tmp7_;
	GHashTableIter _tmp8_;
	gpointer _tmp9_;
	gpointer _tmp10_;
	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));
	_tmp4_ = actions;
	g_variant_builder_init (&_tmp5_, G_VARIANT_TYPE ("as"));
	for (_tmp6_ = 0; _tmp6_ < actions_length1; _tmp6_++) {
		g_variant_builder_add_value (&_tmp5_, g_variant_new_string (*_tmp4_));
		_tmp4_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp5_));
	g_hash_table_iter_init (&_tmp8_, hints);
	g_variant_builder_init (&_tmp7_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp8_, &_tmp9_, &_tmp10_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp9_;
		_value = (GVariant*) _tmp10_;
		g_variant_builder_add (&_tmp7_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp7_));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (expire_timeout));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static guint32
gala_notifications_manager_dbus_notifications_proxy_notify_finish (GalaNotificationsManagerDBusNotifications* self,
                                                                   GAsyncResult* _res_,
                                                                   GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	guint32 _result = 0U;
	GVariant* _tmp13_;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		guint32 _tmp11_ = 0U;
		return _tmp11_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		guint32 _tmp12_ = 0U;
		g_object_unref (_reply_message);
		return _tmp12_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp13_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_uint32 (_tmp13_);
	g_variant_unref (_tmp13_);
	g_object_unref (_reply_message);
	return _result;
}

static void
gala_notifications_manager_dbus_notifications_proxy_gala_notifications_manager_dbus_notifications_interface_init (GalaNotificationsManagerDBusNotificationsIface* iface)
{
	iface->notify = gala_notifications_manager_dbus_notifications_proxy_notify_async;
	iface->notify_finish = gala_notifications_manager_dbus_notifications_proxy_notify_finish;
}

static void
_dbus_gala_notifications_manager_dbus_notifications_notify (GalaNotificationsManagerDBusNotifications* self,
                                                            GVariant* _parameters_,
                                                            GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	GalaNotificationsManagerDbusNotificationsNotifyReadyData* _ready_data;
	GVariant* _tmp14_;
	GVariant* _tmp15_;
	GVariant* _tmp16_;
	GVariant* _tmp17_;
	GVariant* _tmp18_;
	GVariant* _tmp19_;
	gchar** _tmp20_;
	gint _tmp20__length;
	gint _tmp20__size;
	gint _tmp20__length1;
	GVariantIter _tmp21_;
	GVariant* _tmp22_;
	GVariant* _tmp23_;
	GHashTable* _tmp24_;
	GVariantIter _tmp25_;
	GVariant* _tmp26_;
	GVariant* _tmp27_;
	GVariant* _tmp28_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (GalaNotificationsManagerDbusNotificationsNotifyReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp14_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->app_name = g_variant_dup_string (_tmp14_, NULL);
	g_variant_unref (_tmp14_);
	_tmp15_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->replaces_id = g_variant_get_uint32 (_tmp15_);
	g_variant_unref (_tmp15_);
	_tmp16_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->app_icon = g_variant_dup_string (_tmp16_, NULL);
	g_variant_unref (_tmp16_);
	_tmp17_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->summary = g_variant_dup_string (_tmp17_, NULL);
	g_variant_unref (_tmp17_);
	_tmp18_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->body = g_variant_dup_string (_tmp18_, NULL);
	g_variant_unref (_tmp18_);
	_tmp19_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp20_ = g_new (gchar*, 5);
	_tmp20__length = 0;
	_tmp20__size = 4;
	_tmp20__length1 = 0;
	g_variant_iter_init (&_tmp21_, _tmp19_);
	for (; (_tmp22_ = g_variant_iter_next_value (&_tmp21_)) != NULL; _tmp20__length1++) {
		if (_tmp20__size == _tmp20__length) {
			_tmp20__size = 2 * _tmp20__size;
			_tmp20_ = g_renew (gchar*, _tmp20_, _tmp20__size + 1);
		}
		_tmp20_[_tmp20__length++] = g_variant_dup_string (_tmp22_, NULL);
		g_variant_unref (_tmp22_);
	}
	_ready_data->actions_length1 = _tmp20__length1;
	_tmp20_[_tmp20__length] = NULL;
	_ready_data->actions = _tmp20_;
	g_variant_unref (_tmp19_);
	_tmp23_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp24_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp25_, _tmp23_);
	while (g_variant_iter_loop (&_tmp25_, "{?*}", &_tmp26_, &_tmp27_)) {
		g_hash_table_insert (_tmp24_, g_variant_dup_string (_tmp26_, NULL), g_variant_get_variant (_tmp27_));
	}
	_ready_data->hints = _tmp24_;
	g_variant_unref (_tmp23_);
	_tmp28_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->expire_timeout = g_variant_get_int32 (_tmp28_);
	g_variant_unref (_tmp28_);
	gala_notifications_manager_dbus_notifications_notify (self, _ready_data->app_name, _ready_data->replaces_id, _ready_data->app_icon, _ready_data->summary, _ready_data->body, _ready_data->actions, _ready_data->actions_length1, _ready_data->hints, _ready_data->expire_timeout, (GAsyncReadyCallback) _dbus_gala_notifications_manager_dbus_notifications_notify_ready, _ready_data);
	_error:
	;
}

static void
_dbus_gala_notifications_manager_dbus_notifications_notify_ready (GObject * source_object,
                                                                  GAsyncResult * _res_,
                                                                  gpointer _user_data_)
{
	GalaNotificationsManagerDbusNotificationsNotifyReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	guint32 result;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	result = gala_notifications_manager_dbus_notifications_notify_finish ((GalaNotificationsManagerDBusNotifications*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_uint32 (result));
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (_ready_data->app_name);
	_g_free0 (_ready_data->app_icon);
	_g_free0 (_ready_data->summary);
	_g_free0 (_ready_data->body);
	_ready_data->actions = (_vala_array_free (_ready_data->actions, _ready_data->actions_length1, (GDestroyNotify) g_free), NULL);
	_g_hash_table_unref0 (_ready_data->hints);
	g_slice_free (GalaNotificationsManagerDbusNotificationsNotifyReadyData, _ready_data);
}

static void
gala_notifications_manager_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_notifications_manager_dbus_notifications_notify (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

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

static void
_dbus_gala_notifications_manager_dbus_notifications_action_invoked (GObject* _sender,
                                                                    guint32 id,
                                                                    const gchar* action_key,
                                                                    gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (action_key));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.Notifications", "ActionInvoked", _arguments, NULL);
}

static void
_dbus_gala_notifications_manager_dbus_notifications_notification_closed (GObject* _sender,
                                                                         guint32 id,
                                                                         guint32 reason,
                                                                         gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (reason));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.Notifications", "NotificationClosed", _arguments, NULL);
}

static guint
gala_notifications_manager_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_notifications_manager_dbus_notifications_dbus_interface_info), &_gala_notifications_manager_dbus_notifications_dbus_interface_vtable, data, _gala_notifications_manager_dbus_notifications_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "action-invoked", (GCallback) _dbus_gala_notifications_manager_dbus_notifications_action_invoked, data);
	g_signal_connect (object, "notification-closed", (GCallback) _dbus_gala_notifications_manager_dbus_notifications_notification_closed, data);
	return result;
}

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

static void
_gala_notifications_manager_on_watch_gbus_name_appeared_callback (GDBusConnection* connection,
                                                                  const gchar* name,
                                                                  const gchar* name_owner,
                                                                  gpointer self)
{
	gala_notifications_manager_on_watch ((GalaNotificationsManager*) self, connection);
}

static void
_gala_notifications_manager_on_unwatch_gbus_name_vanished_callback (GDBusConnection* connection,
                                                                    const gchar* name,
                                                                    gpointer self)
{
	gala_notifications_manager_on_unwatch ((GalaNotificationsManager*) self, connection);
}

static GObject *
gala_notifications_manager_constructor (GType type,
                                        guint n_construct_properties,
                                        GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	GalaNotificationsManager * self;
	parent_class = G_OBJECT_CLASS (gala_notifications_manager_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GALA_TYPE_NOTIFICATIONS_MANAGER, GalaNotificationsManager);
	g_bus_watch_name_with_closures (G_BUS_TYPE_SESSION, "org.freedesktop.Notifications", G_BUS_NAME_WATCHER_FLAGS_NONE, (GClosure*) ((_gala_notifications_manager_on_watch_gbus_name_appeared_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _gala_notifications_manager_on_watch_gbus_name_appeared_callback, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((_gala_notifications_manager_on_unwatch_gbus_name_vanished_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _gala_notifications_manager_on_unwatch_gbus_name_vanished_callback, g_object_ref (self), (GClosureNotify) g_object_unref)));
	return obj;
}

static void
gala_notifications_manager_class_init (GalaNotificationsManagerClass * klass,
                                       gpointer klass_data)
{
	gala_notifications_manager_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GalaNotificationsManager_private_offset);
	G_OBJECT_CLASS (klass)->constructor = gala_notifications_manager_constructor;
	G_OBJECT_CLASS (klass)->finalize = gala_notifications_manager_finalize;
	gala_notifications_manager_signals[GALA_NOTIFICATIONS_MANAGER_ACTION_INVOKED_SIGNAL] = g_signal_new ("action-invoked", GALA_TYPE_NOTIFICATIONS_MANAGER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_STRING_VARIANT, G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_VARIANT);
	gala_notifications_manager_signals[GALA_NOTIFICATIONS_MANAGER_NOTIFICATION_CLOSED_SIGNAL] = g_signal_new ("notification-closed", GALA_TYPE_NOTIFICATIONS_MANAGER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT);
}

static void
gala_notifications_manager_instance_init (GalaNotificationsManager * self,
                                          gpointer klass)
{
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	self->priv = gala_notifications_manager_get_instance_private (self);
	self->priv->notifications = NULL;
	_tmp0_ = g_str_hash;
	_tmp1_ = g_str_equal;
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, NULL);
	self->priv->replaces_id_table = _tmp2_;
}

static void
gala_notifications_manager_finalize (GObject * obj)
{
	GalaNotificationsManager * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GALA_TYPE_NOTIFICATIONS_MANAGER, GalaNotificationsManager);
	_g_object_unref0 (self->priv->notifications);
	_g_hash_table_unref0 (self->priv->replaces_id_table);
	G_OBJECT_CLASS (gala_notifications_manager_parent_class)->finalize (obj);
}

/**
 * Gala.NotificationsManager can be used to send notifications to org.freedesktop.Notifications
 */
 G_GNUC_NO_INLINE static GType
gala_notifications_manager_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GalaNotificationsManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gala_notifications_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GalaNotificationsManager), 0, (GInstanceInitFunc) gala_notifications_manager_instance_init, NULL };
	GType gala_notifications_manager_type_id;
	gala_notifications_manager_type_id = g_type_register_static (G_TYPE_OBJECT, "GalaNotificationsManager", &g_define_type_info, 0);
	GalaNotificationsManager_private_offset = g_type_add_instance_private (gala_notifications_manager_type_id, sizeof (GalaNotificationsManagerPrivate));
	return gala_notifications_manager_type_id;
}

GType
gala_notifications_manager_get_type (void)
{
	static gsize gala_notifications_manager_type_id__once = 0;
	if (g_once_init_enter (&gala_notifications_manager_type_id__once)) {
		GType gala_notifications_manager_type_id;
		gala_notifications_manager_type_id = gala_notifications_manager_get_type_once ();
		g_once_init_leave (&gala_notifications_manager_type_id__once, gala_notifications_manager_type_id);
	}
	return gala_notifications_manager_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);
}

