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

/*
 * Copyright (c) 2026 focus-timer contributors
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 *
 * Authors: Kamil Prusko <kamilprusko@gmail.com>
 */

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

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

#define FT_TYPE_DEFAULT_NOTIFICATION_BACKEND_PROVIDER (ft_default_notification_backend_provider_get_type ())
#define FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FT_TYPE_DEFAULT_NOTIFICATION_BACKEND_PROVIDER, FtDefaultNotificationBackendProvider))
#define FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FT_TYPE_DEFAULT_NOTIFICATION_BACKEND_PROVIDER, FtDefaultNotificationBackendProviderClass))
#define FT_IS_DEFAULT_NOTIFICATION_BACKEND_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FT_TYPE_DEFAULT_NOTIFICATION_BACKEND_PROVIDER))
#define FT_IS_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FT_TYPE_DEFAULT_NOTIFICATION_BACKEND_PROVIDER))
#define FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FT_TYPE_DEFAULT_NOTIFICATION_BACKEND_PROVIDER, FtDefaultNotificationBackendProviderClass))

typedef struct _FtDefaultNotificationBackendProvider FtDefaultNotificationBackendProvider;
typedef struct _FtDefaultNotificationBackendProviderClass FtDefaultNotificationBackendProviderClass;
typedef struct _FtDefaultNotificationBackendProviderPrivate FtDefaultNotificationBackendProviderPrivate;
enum  {
	FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_0_PROPERTY,
	FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_NAME_PROPERTY,
	FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_VENDOR_PROPERTY,
	FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_VERSION_PROPERTY,
	FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_HAS_ACTIONS_PROPERTY,
	FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_NUM_PROPERTIES
};
static GParamSpec* ft_default_notification_backend_provider_properties[FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _FtDefaultNotificationBackendProviderInitializeData FtDefaultNotificationBackendProviderInitializeData;
typedef struct _FtDefaultNotificationBackendProviderUninitializeData FtDefaultNotificationBackendProviderUninitializeData;
typedef struct _FtDefaultNotificationBackendProviderEnableData FtDefaultNotificationBackendProviderEnableData;
typedef struct _FtDefaultNotificationBackendProviderDisableData FtDefaultNotificationBackendProviderDisableData;

#define FT_TYPE_DEFAULT_NOTIFICATION_BACKEND (ft_default_notification_backend_get_type ())
#define FT_DEFAULT_NOTIFICATION_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FT_TYPE_DEFAULT_NOTIFICATION_BACKEND, FtDefaultNotificationBackend))
#define FT_DEFAULT_NOTIFICATION_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FT_TYPE_DEFAULT_NOTIFICATION_BACKEND, FtDefaultNotificationBackendClass))
#define FT_IS_DEFAULT_NOTIFICATION_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FT_TYPE_DEFAULT_NOTIFICATION_BACKEND))
#define FT_IS_DEFAULT_NOTIFICATION_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FT_TYPE_DEFAULT_NOTIFICATION_BACKEND))
#define FT_DEFAULT_NOTIFICATION_BACKEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FT_TYPE_DEFAULT_NOTIFICATION_BACKEND, FtDefaultNotificationBackendClass))

typedef struct _FtDefaultNotificationBackend FtDefaultNotificationBackend;
typedef struct _FtDefaultNotificationBackendClass FtDefaultNotificationBackendClass;
typedef struct _FtDefaultNotificationBackendPrivate FtDefaultNotificationBackendPrivate;
enum  {
	FT_DEFAULT_NOTIFICATION_BACKEND_0_PROPERTY,
	FT_DEFAULT_NOTIFICATION_BACKEND_NAME_PROPERTY,
	FT_DEFAULT_NOTIFICATION_BACKEND_VENDOR_PROPERTY,
	FT_DEFAULT_NOTIFICATION_BACKEND_VERSION_PROPERTY,
	FT_DEFAULT_NOTIFICATION_BACKEND_HAS_ACTIONS_PROPERTY,
	FT_DEFAULT_NOTIFICATION_BACKEND_NUM_PROPERTIES
};
static GParamSpec* ft_default_notification_backend_properties[FT_DEFAULT_NOTIFICATION_BACKEND_NUM_PROPERTIES];
#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)))
typedef struct _Block23Data Block23Data;

struct _FtDefaultNotificationBackendProvider {
	FtProvider parent_instance;
	FtDefaultNotificationBackendProviderPrivate * priv;
};

struct _FtDefaultNotificationBackendProviderClass {
	FtProviderClass parent_class;
};

struct _FtDefaultNotificationBackendProviderPrivate {
	GApplication* application;
};

struct _FtDefaultNotificationBackendProviderInitializeData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	FtDefaultNotificationBackendProvider* self;
	GCancellable* cancellable;
};

struct _FtDefaultNotificationBackendProviderUninitializeData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	FtDefaultNotificationBackendProvider* self;
};

struct _FtDefaultNotificationBackendProviderEnableData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	FtDefaultNotificationBackendProvider* self;
	GCancellable* cancellable;
	GApplication* _tmp0_;
	GApplication* _tmp1_;
};

struct _FtDefaultNotificationBackendProviderDisableData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	FtDefaultNotificationBackendProvider* self;
};

struct _FtDefaultNotificationBackend {
	FtProvidedObject parent_instance;
	FtDefaultNotificationBackendPrivate * priv;
};

struct _FtDefaultNotificationBackendClass {
	FtProvidedObjectClass parent_class;
};

struct _FtDefaultNotificationBackendPrivate {
	gchar* _name;
	gchar* _vendor;
	gchar* _version;
	gboolean _has_actions;
	GHashTable* notifications;
};

struct _Block23Data {
	int _ref_count_;
	FtDefaultNotificationBackend* self;
	FtNotificationBackendProvider* provider;
};

static gint FtDefaultNotificationBackendProvider_private_offset;
static gpointer ft_default_notification_backend_provider_parent_class = NULL;
static FtNotificationBackendProviderIface * ft_default_notification_backend_provider_ft_notification_backend_provider_parent_iface = NULL;
static gint FtDefaultNotificationBackend_private_offset;
static gpointer ft_default_notification_backend_parent_class = NULL;
static FtNotificationBackendIface * ft_default_notification_backend_ft_notification_backend_parent_iface = NULL;

static GType ft_notification_backend_provider_get_type_once (void);
VALA_EXTERN GType ft_default_notification_backend_provider_get_type (void) G_GNUC_CONST ;
static void ft_default_notification_backend_provider_real_withdraw_notification (FtNotificationBackendProvider* base,
                                                                          const gchar* id);
static void ft_default_notification_backend_provider_real_send_notification (FtNotificationBackendProvider* base,
                                                                      const gchar* id,
                                                                      GNotification* notification);
static void ft_default_notification_backend_provider_real_initialize_data_free (gpointer _data);
static void ft_default_notification_backend_provider_real_initialize (FtProvider* base,
                                                               GCancellable* cancellable,
                                                               GAsyncReadyCallback _callback_,
                                                               gpointer _user_data_);
static gboolean ft_default_notification_backend_provider_real_initialize_co (FtDefaultNotificationBackendProviderInitializeData* _data_);
static void ft_default_notification_backend_provider_real_uninitialize_data_free (gpointer _data);
static void ft_default_notification_backend_provider_real_uninitialize (FtProvider* base,
                                                                 GAsyncReadyCallback _callback_,
                                                                 gpointer _user_data_);
static gboolean ft_default_notification_backend_provider_real_uninitialize_co (FtDefaultNotificationBackendProviderUninitializeData* _data_);
static void ft_default_notification_backend_provider_real_enable_data_free (gpointer _data);
static void ft_default_notification_backend_provider_real_enable (FtProvider* base,
                                                           GCancellable* cancellable,
                                                           GAsyncReadyCallback _callback_,
                                                           gpointer _user_data_);
static gboolean ft_default_notification_backend_provider_real_enable_co (FtDefaultNotificationBackendProviderEnableData* _data_);
static void ft_default_notification_backend_provider_real_disable_data_free (gpointer _data);
static void ft_default_notification_backend_provider_real_disable (FtProvider* base,
                                                            GAsyncReadyCallback _callback_,
                                                            gpointer _user_data_);
static gboolean ft_default_notification_backend_provider_real_disable_co (FtDefaultNotificationBackendProviderDisableData* _data_);
VALA_EXTERN FtDefaultNotificationBackendProvider* ft_default_notification_backend_provider_new (void);
VALA_EXTERN FtDefaultNotificationBackendProvider* ft_default_notification_backend_provider_construct (GType object_type);
static void ft_default_notification_backend_provider_finalize (GObject * obj);
static GType ft_default_notification_backend_provider_get_type_once (void);
static void _vala_ft_default_notification_backend_provider_get_property (GObject * object,
                                                                  guint property_id,
                                                                  GValue * value,
                                                                  GParamSpec * pspec);
static GType ft_notification_backend_get_type_once (void);
VALA_EXTERN GType ft_default_notification_backend_get_type (void) G_GNUC_CONST ;
static void ft_default_notification_backend_real_initialize (FtProvidedObject* base);
static void ft_default_notification_backend_real_setup_providers (FtProvidedObject* base);
static void ft_default_notification_backend_real_provider_enabled (FtProvidedObject* base,
                                                            FtNotificationBackendProvider* provider);
static Block23Data* block23_data_ref (Block23Data* _data23_);
static void block23_data_unref (void * _userdata_);
static void __lambda82_ (Block23Data* _data23_,
                  const gchar* id,
                  GNotification* notification);
static void ___lambda82__gh_func (gconstpointer key,
                           gconstpointer value,
                           gpointer self);
static void ft_default_notification_backend_real_provider_disabled (FtProvidedObject* base,
                                                             FtNotificationBackendProvider* provider);
static void ft_default_notification_backend_real_withdraw_notification (FtNotificationBackend* base,
                                                                 const gchar* id);
static void ft_default_notification_backend_real_send_notification (FtNotificationBackend* base,
                                                             const gchar* id,
                                                             GNotification* notification);
static void ft_default_notification_backend_real_dispose (GObject* base);
VALA_EXTERN FtDefaultNotificationBackend* ft_default_notification_backend_new (void);
VALA_EXTERN FtDefaultNotificationBackend* ft_default_notification_backend_construct (GType object_type);
static GObject * ft_default_notification_backend_constructor (GType type,
                                                       guint n_construct_properties,
                                                       GObjectConstructParam * construct_properties);
static void _g_free0_ (gpointer var);
static void _g_object_unref0_ (gpointer var);
static void ft_default_notification_backend_finalize (GObject * obj);
static GType ft_default_notification_backend_get_type_once (void);
static void _vala_ft_default_notification_backend_get_property (GObject * object,
                                                         guint property_id,
                                                         GValue * value,
                                                         GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

void
ft_notification_backend_provider_withdraw_notification (FtNotificationBackendProvider* self,
                                                        const gchar* id)
{
	FtNotificationBackendProviderIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = FT_NOTIFICATION_BACKEND_PROVIDER_GET_INTERFACE (self);
	if (_iface_->withdraw_notification) {
		_iface_->withdraw_notification (self, id);
	}
}

void
ft_notification_backend_provider_send_notification (FtNotificationBackendProvider* self,
                                                    const gchar* id,
                                                    GNotification* notification)
{
	FtNotificationBackendProviderIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = FT_NOTIFICATION_BACKEND_PROVIDER_GET_INTERFACE (self);
	if (_iface_->send_notification) {
		_iface_->send_notification (self, id, notification);
	}
}

const gchar*
ft_notification_backend_provider_get_name (FtNotificationBackendProvider* self)
{
	FtNotificationBackendProviderIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = FT_NOTIFICATION_BACKEND_PROVIDER_GET_INTERFACE (self);
	if (_iface_->get_name) {
		return _iface_->get_name (self);
	}
	return NULL;
}

const gchar*
ft_notification_backend_provider_get_vendor (FtNotificationBackendProvider* self)
{
	FtNotificationBackendProviderIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = FT_NOTIFICATION_BACKEND_PROVIDER_GET_INTERFACE (self);
	if (_iface_->get_vendor) {
		return _iface_->get_vendor (self);
	}
	return NULL;
}

const gchar*
ft_notification_backend_provider_get_version (FtNotificationBackendProvider* self)
{
	FtNotificationBackendProviderIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = FT_NOTIFICATION_BACKEND_PROVIDER_GET_INTERFACE (self);
	if (_iface_->get_version) {
		return _iface_->get_version (self);
	}
	return NULL;
}

gboolean
ft_notification_backend_provider_get_has_actions (FtNotificationBackendProvider* self)
{
	FtNotificationBackendProviderIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = FT_NOTIFICATION_BACKEND_PROVIDER_GET_INTERFACE (self);
	if (_iface_->get_has_actions) {
		return _iface_->get_has_actions (self);
	}
	return FALSE;
}

static void
ft_notification_backend_provider_default_init (FtNotificationBackendProviderIface * iface,
                                               gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_string ("vendor", "vendor", "vendor", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_string ("version", "version", "version", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_boolean ("has-actions", "has-actions", "has-actions", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static GType
ft_notification_backend_provider_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FtNotificationBackendProviderIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ft_notification_backend_provider_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType ft_notification_backend_provider_type_id;
	ft_notification_backend_provider_type_id = g_type_register_static (G_TYPE_INTERFACE, "FtNotificationBackendProvider", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (ft_notification_backend_provider_type_id, FT_TYPE_PROVIDER);
	return ft_notification_backend_provider_type_id;
}

GType
ft_notification_backend_provider_get_type (void)
{
	static volatile gsize ft_notification_backend_provider_type_id__once = 0;
	if (g_once_init_enter (&ft_notification_backend_provider_type_id__once)) {
		GType ft_notification_backend_provider_type_id;
		ft_notification_backend_provider_type_id = ft_notification_backend_provider_get_type_once ();
		g_once_init_leave (&ft_notification_backend_provider_type_id__once, ft_notification_backend_provider_type_id);
	}
	return ft_notification_backend_provider_type_id__once;
}

static inline gpointer
ft_default_notification_backend_provider_get_instance_private (FtDefaultNotificationBackendProvider* self)
{
	return G_STRUCT_MEMBER_P (self, FtDefaultNotificationBackendProvider_private_offset);
}

static void
ft_default_notification_backend_provider_real_withdraw_notification (FtNotificationBackendProvider* base,
                                                                     const gchar* id)
{
	FtDefaultNotificationBackendProvider * self;
	GApplication* _tmp0_ = NULL;
	GApplication* _tmp1_;
	self = (FtDefaultNotificationBackendProvider*) base;
	g_return_if_fail (id != NULL);
	_tmp1_ = self->priv->application;
	_tmp0_ = _tmp1_;
	if (_tmp0_ != NULL) {
		g_application_withdraw_notification (_tmp0_, id);
	}
}

static void
ft_default_notification_backend_provider_real_send_notification (FtNotificationBackendProvider* base,
                                                                 const gchar* id,
                                                                 GNotification* notification)
{
	FtDefaultNotificationBackendProvider * self;
	GApplication* _tmp0_ = NULL;
	GApplication* _tmp1_;
	self = (FtDefaultNotificationBackendProvider*) base;
	g_return_if_fail (id != NULL);
	g_return_if_fail (notification != NULL);
	_tmp1_ = self->priv->application;
	_tmp0_ = _tmp1_;
	if (_tmp0_ != NULL) {
		g_application_send_notification (_tmp0_, id, notification);
	}
}

static void
ft_default_notification_backend_provider_real_initialize_data_free (gpointer _data)
{
	FtDefaultNotificationBackendProviderInitializeData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (FtDefaultNotificationBackendProviderInitializeData, _data_);
}

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

static void
ft_default_notification_backend_provider_real_initialize (FtProvider* base,
                                                          GCancellable* cancellable,
                                                          GAsyncReadyCallback _callback_,
                                                          gpointer _user_data_)
{
	FtDefaultNotificationBackendProvider * self;
	FtDefaultNotificationBackendProviderInitializeData* _data_;
	FtDefaultNotificationBackendProvider* _tmp0_;
	GCancellable* _tmp1_;
	self = (FtDefaultNotificationBackendProvider*) base;
	_data_ = g_slice_new0 (FtDefaultNotificationBackendProviderInitializeData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, ft_default_notification_backend_provider_real_initialize_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp1_;
	ft_default_notification_backend_provider_real_initialize_co (_data_);
}

static void
ft_default_notification_backend_provider_initialize_finish (FtProvider* base,
                                                            GAsyncResult* _res_,
                                                            GError** error)
{
	FtDefaultNotificationBackendProviderInitializeData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static gboolean
ft_default_notification_backend_provider_real_initialize_co (FtDefaultNotificationBackendProviderInitializeData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	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;
}

static void
ft_default_notification_backend_provider_real_uninitialize_data_free (gpointer _data)
{
	FtDefaultNotificationBackendProviderUninitializeData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (FtDefaultNotificationBackendProviderUninitializeData, _data_);
}

static void
ft_default_notification_backend_provider_real_uninitialize (FtProvider* base,
                                                            GAsyncReadyCallback _callback_,
                                                            gpointer _user_data_)
{
	FtDefaultNotificationBackendProvider * self;
	FtDefaultNotificationBackendProviderUninitializeData* _data_;
	FtDefaultNotificationBackendProvider* _tmp0_;
	self = (FtDefaultNotificationBackendProvider*) base;
	_data_ = g_slice_new0 (FtDefaultNotificationBackendProviderUninitializeData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, ft_default_notification_backend_provider_real_uninitialize_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	ft_default_notification_backend_provider_real_uninitialize_co (_data_);
}

static void
ft_default_notification_backend_provider_uninitialize_finish (FtProvider* base,
                                                              GAsyncResult* _res_,
                                                              GError** error)
{
	FtDefaultNotificationBackendProviderUninitializeData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static gboolean
ft_default_notification_backend_provider_real_uninitialize_co (FtDefaultNotificationBackendProviderUninitializeData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	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;
}

static void
ft_default_notification_backend_provider_real_enable_data_free (gpointer _data)
{
	FtDefaultNotificationBackendProviderEnableData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (FtDefaultNotificationBackendProviderEnableData, _data_);
}

static void
ft_default_notification_backend_provider_real_enable (FtProvider* base,
                                                      GCancellable* cancellable,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_)
{
	FtDefaultNotificationBackendProvider * self;
	FtDefaultNotificationBackendProviderEnableData* _data_;
	FtDefaultNotificationBackendProvider* _tmp0_;
	GCancellable* _tmp1_;
	self = (FtDefaultNotificationBackendProvider*) base;
	_data_ = g_slice_new0 (FtDefaultNotificationBackendProviderEnableData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, ft_default_notification_backend_provider_real_enable_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp1_;
	ft_default_notification_backend_provider_real_enable_co (_data_);
}

static void
ft_default_notification_backend_provider_enable_finish (FtProvider* base,
                                                        GAsyncResult* _res_,
                                                        GError** error)
{
	FtDefaultNotificationBackendProviderEnableData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static gboolean
ft_default_notification_backend_provider_real_enable_co (FtDefaultNotificationBackendProviderEnableData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_application_get_default ();
	_data_->_tmp1_ = _g_object_ref0 (_data_->_tmp0_);
	_g_object_unref0 (_data_->self->priv->application);
	_data_->self->priv->application = _data_->_tmp1_;
	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;
}

static void
ft_default_notification_backend_provider_real_disable_data_free (gpointer _data)
{
	FtDefaultNotificationBackendProviderDisableData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (FtDefaultNotificationBackendProviderDisableData, _data_);
}

static void
ft_default_notification_backend_provider_real_disable (FtProvider* base,
                                                       GAsyncReadyCallback _callback_,
                                                       gpointer _user_data_)
{
	FtDefaultNotificationBackendProvider * self;
	FtDefaultNotificationBackendProviderDisableData* _data_;
	FtDefaultNotificationBackendProvider* _tmp0_;
	self = (FtDefaultNotificationBackendProvider*) base;
	_data_ = g_slice_new0 (FtDefaultNotificationBackendProviderDisableData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, ft_default_notification_backend_provider_real_disable_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	ft_default_notification_backend_provider_real_disable_co (_data_);
}

static void
ft_default_notification_backend_provider_disable_finish (FtProvider* base,
                                                         GAsyncResult* _res_,
                                                         GError** error)
{
	FtDefaultNotificationBackendProviderDisableData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static gboolean
ft_default_notification_backend_provider_real_disable_co (FtDefaultNotificationBackendProviderDisableData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_g_object_unref0 (_data_->self->priv->application);
	_data_->self->priv->application = 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;
}

FtDefaultNotificationBackendProvider*
ft_default_notification_backend_provider_construct (GType object_type)
{
	FtDefaultNotificationBackendProvider * self = NULL;
	self = (FtDefaultNotificationBackendProvider*) ft_provider_construct (object_type);
	return self;
}

FtDefaultNotificationBackendProvider*
ft_default_notification_backend_provider_new (void)
{
	return ft_default_notification_backend_provider_construct (FT_TYPE_DEFAULT_NOTIFICATION_BACKEND_PROVIDER);
}

static const gchar*
ft_default_notification_backend_provider_real_get_name (FtNotificationBackendProvider* base)
{
	const gchar* result;
	FtDefaultNotificationBackendProvider* self;
	self = (FtDefaultNotificationBackendProvider*) base;
	result = "";
	return result;
}

static const gchar*
ft_default_notification_backend_provider_real_get_vendor (FtNotificationBackendProvider* base)
{
	const gchar* result;
	FtDefaultNotificationBackendProvider* self;
	self = (FtDefaultNotificationBackendProvider*) base;
	result = "";
	return result;
}

static const gchar*
ft_default_notification_backend_provider_real_get_version (FtNotificationBackendProvider* base)
{
	const gchar* result;
	FtDefaultNotificationBackendProvider* self;
	self = (FtDefaultNotificationBackendProvider*) base;
	result = "";
	return result;
}

static gboolean
ft_default_notification_backend_provider_real_get_has_actions (FtNotificationBackendProvider* base)
{
	gboolean result;
	FtDefaultNotificationBackendProvider* self;
	self = (FtDefaultNotificationBackendProvider*) base;
	result = TRUE;
	return result;
}

static void
ft_default_notification_backend_provider_class_init (FtDefaultNotificationBackendProviderClass * klass,
                                                     gpointer klass_data)
{
	ft_default_notification_backend_provider_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FtDefaultNotificationBackendProvider_private_offset);
	((FtProviderClass *) klass)->initialize = (void (*) (FtProvider*, GCancellable*, GAsyncReadyCallback, gpointer)) ft_default_notification_backend_provider_real_initialize;
	((FtProviderClass *) klass)->initialize_finish = (void (*) (FtProvider*, GAsyncResult*, GError**)) ft_default_notification_backend_provider_initialize_finish;
	((FtProviderClass *) klass)->uninitialize = (void (*) (FtProvider*, GAsyncReadyCallback, gpointer)) ft_default_notification_backend_provider_real_uninitialize;
	((FtProviderClass *) klass)->uninitialize_finish = (void (*) (FtProvider*, GAsyncResult*, GError**)) ft_default_notification_backend_provider_uninitialize_finish;
	((FtProviderClass *) klass)->enable = (void (*) (FtProvider*, GCancellable*, GAsyncReadyCallback, gpointer)) ft_default_notification_backend_provider_real_enable;
	((FtProviderClass *) klass)->enable_finish = (void (*) (FtProvider*, GAsyncResult*, GError**)) ft_default_notification_backend_provider_enable_finish;
	((FtProviderClass *) klass)->disable = (void (*) (FtProvider*, GAsyncReadyCallback, gpointer)) ft_default_notification_backend_provider_real_disable;
	((FtProviderClass *) klass)->disable_finish = (void (*) (FtProvider*, GAsyncResult*, GError**)) ft_default_notification_backend_provider_disable_finish;
	G_OBJECT_CLASS (klass)->get_property = _vala_ft_default_notification_backend_provider_get_property;
	G_OBJECT_CLASS (klass)->finalize = ft_default_notification_backend_provider_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_NAME_PROPERTY, ft_default_notification_backend_provider_properties[FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_VENDOR_PROPERTY, ft_default_notification_backend_provider_properties[FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_VENDOR_PROPERTY] = g_param_spec_string ("vendor", "vendor", "vendor", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_VERSION_PROPERTY, ft_default_notification_backend_provider_properties[FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_VERSION_PROPERTY] = g_param_spec_string ("version", "version", "version", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_HAS_ACTIONS_PROPERTY, ft_default_notification_backend_provider_properties[FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_HAS_ACTIONS_PROPERTY] = g_param_spec_boolean ("has-actions", "has-actions", "has-actions", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
ft_default_notification_backend_provider_ft_notification_backend_provider_interface_init (FtNotificationBackendProviderIface * iface,
                                                                                          gpointer iface_data)
{
	ft_default_notification_backend_provider_ft_notification_backend_provider_parent_iface = g_type_interface_peek_parent (iface);
	iface->withdraw_notification = (void (*) (FtNotificationBackendProvider*, const gchar*)) ft_default_notification_backend_provider_real_withdraw_notification;
	iface->send_notification = (void (*) (FtNotificationBackendProvider*, const gchar*, GNotification*)) ft_default_notification_backend_provider_real_send_notification;
	iface->get_name = ft_default_notification_backend_provider_real_get_name;
	iface->get_vendor = ft_default_notification_backend_provider_real_get_vendor;
	iface->get_version = ft_default_notification_backend_provider_real_get_version;
	iface->get_has_actions = ft_default_notification_backend_provider_real_get_has_actions;
}

static void
ft_default_notification_backend_provider_instance_init (FtDefaultNotificationBackendProvider * self,
                                                        gpointer klass)
{
	self->priv = ft_default_notification_backend_provider_get_instance_private (self);
	self->priv->application = NULL;
}

static void
ft_default_notification_backend_provider_finalize (GObject * obj)
{
	FtDefaultNotificationBackendProvider * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FT_TYPE_DEFAULT_NOTIFICATION_BACKEND_PROVIDER, FtDefaultNotificationBackendProvider);
	_g_object_unref0 (self->priv->application);
	G_OBJECT_CLASS (ft_default_notification_backend_provider_parent_class)->finalize (obj);
}

static GType
ft_default_notification_backend_provider_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FtDefaultNotificationBackendProviderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ft_default_notification_backend_provider_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FtDefaultNotificationBackendProvider), 0, (GInstanceInitFunc) ft_default_notification_backend_provider_instance_init, NULL };
	static const GInterfaceInfo ft_notification_backend_provider_info = { (GInterfaceInitFunc) ft_default_notification_backend_provider_ft_notification_backend_provider_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType ft_default_notification_backend_provider_type_id;
	ft_default_notification_backend_provider_type_id = g_type_register_static (FT_TYPE_PROVIDER, "FtDefaultNotificationBackendProvider", &g_define_type_info, 0);
	g_type_add_interface_static (ft_default_notification_backend_provider_type_id, FT_TYPE_NOTIFICATION_BACKEND_PROVIDER, &ft_notification_backend_provider_info);
	FtDefaultNotificationBackendProvider_private_offset = g_type_add_instance_private (ft_default_notification_backend_provider_type_id, sizeof (FtDefaultNotificationBackendProviderPrivate));
	return ft_default_notification_backend_provider_type_id;
}

GType
ft_default_notification_backend_provider_get_type (void)
{
	static volatile gsize ft_default_notification_backend_provider_type_id__once = 0;
	if (g_once_init_enter (&ft_default_notification_backend_provider_type_id__once)) {
		GType ft_default_notification_backend_provider_type_id;
		ft_default_notification_backend_provider_type_id = ft_default_notification_backend_provider_get_type_once ();
		g_once_init_leave (&ft_default_notification_backend_provider_type_id__once, ft_default_notification_backend_provider_type_id);
	}
	return ft_default_notification_backend_provider_type_id__once;
}

static void
_vala_ft_default_notification_backend_provider_get_property (GObject * object,
                                                             guint property_id,
                                                             GValue * value,
                                                             GParamSpec * pspec)
{
	FtDefaultNotificationBackendProvider * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FT_TYPE_DEFAULT_NOTIFICATION_BACKEND_PROVIDER, FtDefaultNotificationBackendProvider);
	switch (property_id) {
		case FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_NAME_PROPERTY:
		g_value_set_string (value, ft_notification_backend_provider_get_name ((FtNotificationBackendProvider*) self));
		break;
		case FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_VENDOR_PROPERTY:
		g_value_set_string (value, ft_notification_backend_provider_get_vendor ((FtNotificationBackendProvider*) self));
		break;
		case FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_VERSION_PROPERTY:
		g_value_set_string (value, ft_notification_backend_provider_get_version ((FtNotificationBackendProvider*) self));
		break;
		case FT_DEFAULT_NOTIFICATION_BACKEND_PROVIDER_HAS_ACTIONS_PROPERTY:
		g_value_set_boolean (value, ft_notification_backend_provider_get_has_actions ((FtNotificationBackendProvider*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

void
ft_notification_backend_withdraw_notification (FtNotificationBackend* self,
                                               const gchar* id)
{
	FtNotificationBackendIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = FT_NOTIFICATION_BACKEND_GET_INTERFACE (self);
	if (_iface_->withdraw_notification) {
		_iface_->withdraw_notification (self, id);
	}
}

void
ft_notification_backend_send_notification (FtNotificationBackend* self,
                                           const gchar* id,
                                           GNotification* notification)
{
	FtNotificationBackendIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = FT_NOTIFICATION_BACKEND_GET_INTERFACE (self);
	if (_iface_->send_notification) {
		_iface_->send_notification (self, id, notification);
	}
}

const gchar*
ft_notification_backend_get_name (FtNotificationBackend* self)
{
	FtNotificationBackendIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = FT_NOTIFICATION_BACKEND_GET_INTERFACE (self);
	if (_iface_->get_name) {
		return _iface_->get_name (self);
	}
	return NULL;
}

const gchar*
ft_notification_backend_get_vendor (FtNotificationBackend* self)
{
	FtNotificationBackendIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = FT_NOTIFICATION_BACKEND_GET_INTERFACE (self);
	if (_iface_->get_vendor) {
		return _iface_->get_vendor (self);
	}
	return NULL;
}

const gchar*
ft_notification_backend_get_version (FtNotificationBackend* self)
{
	FtNotificationBackendIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = FT_NOTIFICATION_BACKEND_GET_INTERFACE (self);
	if (_iface_->get_version) {
		return _iface_->get_version (self);
	}
	return NULL;
}

gboolean
ft_notification_backend_get_has_actions (FtNotificationBackend* self)
{
	FtNotificationBackendIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = FT_NOTIFICATION_BACKEND_GET_INTERFACE (self);
	if (_iface_->get_has_actions) {
		return _iface_->get_has_actions (self);
	}
	return FALSE;
}

static void
ft_notification_backend_default_init (FtNotificationBackendIface * iface,
                                      gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_string ("vendor", "vendor", "vendor", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_string ("version", "version", "version", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_boolean ("has-actions", "has-actions", "has-actions", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static GType
ft_notification_backend_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FtNotificationBackendIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ft_notification_backend_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType ft_notification_backend_type_id;
	ft_notification_backend_type_id = g_type_register_static (G_TYPE_INTERFACE, "FtNotificationBackend", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (ft_notification_backend_type_id, G_TYPE_OBJECT);
	return ft_notification_backend_type_id;
}

GType
ft_notification_backend_get_type (void)
{
	static volatile gsize ft_notification_backend_type_id__once = 0;
	if (g_once_init_enter (&ft_notification_backend_type_id__once)) {
		GType ft_notification_backend_type_id;
		ft_notification_backend_type_id = ft_notification_backend_get_type_once ();
		g_once_init_leave (&ft_notification_backend_type_id__once, ft_notification_backend_type_id);
	}
	return ft_notification_backend_type_id__once;
}

static inline gpointer
ft_default_notification_backend_get_instance_private (FtDefaultNotificationBackend* self)
{
	return G_STRUCT_MEMBER_P (self, FtDefaultNotificationBackend_private_offset);
}

static void
ft_default_notification_backend_real_initialize (FtProvidedObject* base)
{
	FtDefaultNotificationBackend * self;
	self = (FtDefaultNotificationBackend*) base;
}

static void
ft_default_notification_backend_real_setup_providers (FtProvidedObject* base)
{
	FtDefaultNotificationBackend * self;
	FtProviderSet* _tmp0_;
	FtDefaultNotificationBackendProvider* _tmp1_;
	FtDefaultNotificationBackendProvider* _tmp2_;
	self = (FtDefaultNotificationBackend*) base;
	_tmp0_ = ((FtProvidedObject*) self)->providers;
	_tmp1_ = ft_default_notification_backend_provider_new ();
	_tmp2_ = _tmp1_;
	ft_provider_set_add (_tmp0_, (FtNotificationBackendProvider*) _tmp2_, FT_PRIORITY_DEFAULT);
	_g_object_unref0 (_tmp2_);
}

static Block23Data*
block23_data_ref (Block23Data* _data23_)
{
	g_atomic_int_inc (&_data23_->_ref_count_);
	return _data23_;
}

static void
block23_data_unref (void * _userdata_)
{
	Block23Data* _data23_;
	_data23_ = (Block23Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data23_->_ref_count_)) {
		FtDefaultNotificationBackend* self;
		self = _data23_->self;
		_g_object_unref0 (_data23_->provider);
		_g_object_unref0 (self);
		g_slice_free (Block23Data, _data23_);
	}
}

static gchar*
bool_to_string (gboolean self)
{
	gchar* result;
	if (self) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup ("true");
		result = _tmp0_;
		return result;
	} else {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("false");
		result = _tmp1_;
		return result;
	}
}

static void
__lambda82_ (Block23Data* _data23_,
             const gchar* id,
             GNotification* notification)
{
	FtDefaultNotificationBackend* self;
	self = _data23_->self;
	g_return_if_fail (id != NULL);
	if (notification != NULL) {
		ft_notification_backend_provider_send_notification (_data23_->provider, id, notification);
	} else {
		ft_notification_backend_provider_withdraw_notification (_data23_->provider, id);
	}
}

static void
___lambda82__gh_func (gconstpointer key,
                      gconstpointer value,
                      gpointer self)
{
	__lambda82_ (self, (const gchar*) key, (GNotification*) value);
}

static void
ft_default_notification_backend_real_provider_enabled (FtProvidedObject* base,
                                                       FtNotificationBackendProvider* provider)
{
	FtDefaultNotificationBackend * self;
	Block23Data* _data23_;
	FtNotificationBackendProvider* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gboolean _tmp10_;
	gboolean _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	gboolean _tmp19_;
	gboolean _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	GHashTable* _tmp23_;
	GHashTable* _tmp24_;
	self = (FtDefaultNotificationBackend*) base;
	g_return_if_fail (provider != NULL);
	_data23_ = g_slice_new0 (Block23Data);
	_data23_->_ref_count_ = 1;
	_data23_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (provider);
	_g_object_unref0 (_data23_->provider);
	_data23_->provider = _tmp0_;
	_tmp1_ = ft_notification_backend_provider_get_name (_data23_->provider);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (self->priv->_name);
	self->priv->_name = _tmp3_;
	_tmp4_ = ft_notification_backend_provider_get_vendor (_data23_->provider);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strdup (_tmp5_);
	_g_free0 (self->priv->_vendor);
	self->priv->_vendor = _tmp6_;
	_tmp7_ = ft_notification_backend_provider_get_version (_data23_->provider);
	_tmp8_ = _tmp7_;
	_tmp9_ = g_strdup (_tmp8_);
	_g_free0 (self->priv->_version);
	self->priv->_version = _tmp9_;
	_tmp10_ = ft_notification_backend_provider_get_has_actions (_data23_->provider);
	_tmp11_ = _tmp10_;
	self->priv->_has_actions = _tmp11_;
	_tmp12_ = g_type_name (G_TYPE_FROM_INSTANCE ((GObject*) _data23_->provider));
	_tmp13_ = ft_notification_backend_provider_get_name (_data23_->provider);
	_tmp14_ = _tmp13_;
	_tmp15_ = ft_notification_backend_provider_get_vendor (_data23_->provider);
	_tmp16_ = _tmp15_;
	_tmp17_ = ft_notification_backend_provider_get_version (_data23_->provider);
	_tmp18_ = _tmp17_;
	_tmp19_ = ft_notification_backend_provider_get_has_actions (_data23_->provider);
	_tmp20_ = _tmp19_;
	_tmp21_ = bool_to_string (_tmp20_);
	_tmp22_ = _tmp21_;
	g_debug ("notification-backend.vala:164: Notification backend:\n" \
"  class: %s\n" \
"  name: %s\n" \
"  vendor: %s\n" \
"  version: %s\n" \
"  has-actions: %s", _tmp12_, _tmp14_, _tmp16_, _tmp18_, _tmp22_);
	_g_free0 (_tmp22_);
	_tmp23_ = self->priv->notifications;
	g_hash_table_foreach (_tmp23_, ___lambda82__gh_func, _data23_);
	_tmp24_ = self->priv->notifications;
	g_hash_table_remove_all (_tmp24_);
	block23_data_unref (_data23_);
	_data23_ = NULL;
}

static void
ft_default_notification_backend_real_provider_disabled (FtProvidedObject* base,
                                                        FtNotificationBackendProvider* provider)
{
	FtDefaultNotificationBackend * self;
	self = (FtDefaultNotificationBackend*) base;
	g_return_if_fail (provider != NULL);
}

static void
ft_default_notification_backend_real_withdraw_notification (FtNotificationBackend* base,
                                                            const gchar* id)
{
	FtDefaultNotificationBackend * self;
	FtNotificationBackendProvider* provider = NULL;
	gconstpointer _tmp0_;
	gconstpointer _tmp1_;
	FtNotificationBackendProvider* _tmp2_;
	self = (FtDefaultNotificationBackend*) base;
	g_return_if_fail (id != NULL);
	_tmp0_ = ft_provided_object_get_provider ((FtProvidedObject*) self);
	_tmp1_ = _tmp0_;
	provider = (FtNotificationBackendProvider*) _tmp1_;
	_tmp2_ = provider;
	if (_tmp2_ != NULL) {
		FtNotificationBackendProvider* _tmp3_;
		_tmp3_ = provider;
		ft_notification_backend_provider_withdraw_notification (_tmp3_, id);
	} else {
		GHashTable* _tmp4_;
		gchar* _tmp5_;
		_tmp4_ = self->priv->notifications;
		_tmp5_ = g_strdup (id);
		g_hash_table_insert (_tmp4_, _tmp5_, NULL);
	}
}

static void
ft_default_notification_backend_real_send_notification (FtNotificationBackend* base,
                                                        const gchar* id,
                                                        GNotification* notification)
{
	FtDefaultNotificationBackend * self;
	FtNotificationBackendProvider* provider = NULL;
	gconstpointer _tmp0_;
	gconstpointer _tmp1_;
	FtNotificationBackendProvider* _tmp2_;
	self = (FtDefaultNotificationBackend*) base;
	g_return_if_fail (id != NULL);
	g_return_if_fail (notification != NULL);
	_tmp0_ = ft_provided_object_get_provider ((FtProvidedObject*) self);
	_tmp1_ = _tmp0_;
	provider = (FtNotificationBackendProvider*) _tmp1_;
	_tmp2_ = provider;
	if (_tmp2_ != NULL) {
		FtNotificationBackendProvider* _tmp3_;
		_tmp3_ = provider;
		ft_notification_backend_provider_send_notification (_tmp3_, id, notification);
	} else {
		GHashTable* _tmp4_;
		gchar* _tmp5_;
		GNotification* _tmp6_;
		_tmp4_ = self->priv->notifications;
		_tmp5_ = g_strdup (id);
		_tmp6_ = _g_object_ref0 (notification);
		g_hash_table_insert (_tmp4_, _tmp5_, _tmp6_);
	}
}

static void
ft_default_notification_backend_real_dispose (GObject* base)
{
	FtDefaultNotificationBackend * self;
	GHashTable* _tmp0_;
	self = (FtDefaultNotificationBackend*) base;
	_tmp0_ = self->priv->notifications;
	if (_tmp0_ != NULL) {
		GHashTable* _tmp1_;
		_tmp1_ = self->priv->notifications;
		g_hash_table_remove_all (_tmp1_);
		_g_hash_table_unref0 (self->priv->notifications);
		self->priv->notifications = NULL;
	}
	G_OBJECT_CLASS (ft_default_notification_backend_parent_class)->dispose ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (self, FT_TYPE_PROVIDED_OBJECT, FtProvidedObject));
}

FtDefaultNotificationBackend*
ft_default_notification_backend_construct (GType object_type)
{
	FtDefaultNotificationBackend * self = NULL;
	self = (FtDefaultNotificationBackend*) ft_provided_object_construct (object_type, FT_TYPE_NOTIFICATION_BACKEND_PROVIDER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref);
	return self;
}

FtDefaultNotificationBackend*
ft_default_notification_backend_new (void)
{
	return ft_default_notification_backend_construct (FT_TYPE_DEFAULT_NOTIFICATION_BACKEND);
}

static const gchar*
ft_default_notification_backend_real_get_name (FtNotificationBackend* base)
{
	const gchar* result;
	FtDefaultNotificationBackend* self;
	const gchar* _tmp0_;
	self = (FtDefaultNotificationBackend*) base;
	_tmp0_ = self->priv->_name;
	result = _tmp0_;
	return result;
}

static const gchar*
ft_default_notification_backend_real_get_vendor (FtNotificationBackend* base)
{
	const gchar* result;
	FtDefaultNotificationBackend* self;
	const gchar* _tmp0_;
	self = (FtDefaultNotificationBackend*) base;
	_tmp0_ = self->priv->_vendor;
	result = _tmp0_;
	return result;
}

static const gchar*
ft_default_notification_backend_real_get_version (FtNotificationBackend* base)
{
	const gchar* result;
	FtDefaultNotificationBackend* self;
	const gchar* _tmp0_;
	self = (FtDefaultNotificationBackend*) base;
	_tmp0_ = self->priv->_version;
	result = _tmp0_;
	return result;
}

static gboolean
ft_default_notification_backend_real_get_has_actions (FtNotificationBackend* base)
{
	gboolean result;
	FtDefaultNotificationBackend* self;
	self = (FtDefaultNotificationBackend*) base;
	result = self->priv->_has_actions;
	return result;
}

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

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static GObject *
ft_default_notification_backend_constructor (GType type,
                                             guint n_construct_properties,
                                             GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	FtDefaultNotificationBackend * self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	GHashFunc _tmp3_;
	GEqualFunc _tmp4_;
	GHashTable* _tmp5_;
	parent_class = G_OBJECT_CLASS (ft_default_notification_backend_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FT_TYPE_DEFAULT_NOTIFICATION_BACKEND, FtDefaultNotificationBackend);
	_tmp0_ = g_strdup ("");
	_g_free0 (self->priv->_name);
	self->priv->_name = _tmp0_;
	_tmp1_ = g_strdup ("");
	_g_free0 (self->priv->_vendor);
	self->priv->_vendor = _tmp1_;
	_tmp2_ = g_strdup ("");
	_g_free0 (self->priv->_version);
	self->priv->_version = _tmp2_;
	self->priv->_has_actions = TRUE;
	_tmp3_ = g_str_hash;
	_tmp4_ = g_str_equal;
	_tmp5_ = g_hash_table_new_full (_tmp3_, _tmp4_, _g_free0_, _g_object_unref0_);
	_g_hash_table_unref0 (self->priv->notifications);
	self->priv->notifications = _tmp5_;
	return obj;
}

static void
ft_default_notification_backend_class_init (FtDefaultNotificationBackendClass * klass,
                                            gpointer klass_data)
{
	ft_default_notification_backend_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FtDefaultNotificationBackend_private_offset);
	((FtProvidedObjectClass *) klass)->initialize = (void (*) (FtProvidedObject*)) ft_default_notification_backend_real_initialize;
	((FtProvidedObjectClass *) klass)->setup_providers = (void (*) (FtProvidedObject*)) ft_default_notification_backend_real_setup_providers;
	((FtProvidedObjectClass *) klass)->provider_enabled = (void (*) (FtProvidedObject*, gconstpointer)) ft_default_notification_backend_real_provider_enabled;
	((FtProvidedObjectClass *) klass)->provider_disabled = (void (*) (FtProvidedObject*, gconstpointer)) ft_default_notification_backend_real_provider_disabled;
	((GObjectClass *) klass)->dispose = (void (*) (GObject*)) ft_default_notification_backend_real_dispose;
	G_OBJECT_CLASS (klass)->get_property = _vala_ft_default_notification_backend_get_property;
	G_OBJECT_CLASS (klass)->constructor = ft_default_notification_backend_constructor;
	G_OBJECT_CLASS (klass)->finalize = ft_default_notification_backend_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FT_DEFAULT_NOTIFICATION_BACKEND_NAME_PROPERTY, ft_default_notification_backend_properties[FT_DEFAULT_NOTIFICATION_BACKEND_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FT_DEFAULT_NOTIFICATION_BACKEND_VENDOR_PROPERTY, ft_default_notification_backend_properties[FT_DEFAULT_NOTIFICATION_BACKEND_VENDOR_PROPERTY] = g_param_spec_string ("vendor", "vendor", "vendor", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FT_DEFAULT_NOTIFICATION_BACKEND_VERSION_PROPERTY, ft_default_notification_backend_properties[FT_DEFAULT_NOTIFICATION_BACKEND_VERSION_PROPERTY] = g_param_spec_string ("version", "version", "version", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FT_DEFAULT_NOTIFICATION_BACKEND_HAS_ACTIONS_PROPERTY, ft_default_notification_backend_properties[FT_DEFAULT_NOTIFICATION_BACKEND_HAS_ACTIONS_PROPERTY] = g_param_spec_boolean ("has-actions", "has-actions", "has-actions", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
ft_default_notification_backend_ft_notification_backend_interface_init (FtNotificationBackendIface * iface,
                                                                        gpointer iface_data)
{
	ft_default_notification_backend_ft_notification_backend_parent_iface = g_type_interface_peek_parent (iface);
	iface->withdraw_notification = (void (*) (FtNotificationBackend*, const gchar*)) ft_default_notification_backend_real_withdraw_notification;
	iface->send_notification = (void (*) (FtNotificationBackend*, const gchar*, GNotification*)) ft_default_notification_backend_real_send_notification;
	iface->get_name = ft_default_notification_backend_real_get_name;
	iface->get_vendor = ft_default_notification_backend_real_get_vendor;
	iface->get_version = ft_default_notification_backend_real_get_version;
	iface->get_has_actions = ft_default_notification_backend_real_get_has_actions;
}

static void
ft_default_notification_backend_instance_init (FtDefaultNotificationBackend * self,
                                               gpointer klass)
{
	self->priv = ft_default_notification_backend_get_instance_private (self);
}

static void
ft_default_notification_backend_finalize (GObject * obj)
{
	FtDefaultNotificationBackend * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FT_TYPE_DEFAULT_NOTIFICATION_BACKEND, FtDefaultNotificationBackend);
	_g_free0 (self->priv->_name);
	_g_free0 (self->priv->_vendor);
	_g_free0 (self->priv->_version);
	_g_hash_table_unref0 (self->priv->notifications);
	G_OBJECT_CLASS (ft_default_notification_backend_parent_class)->finalize (obj);
}

/**
     * It's an over-engineered wrapper around `Application.send_notification()`.
     *
     * We need to have info about the backend used. That's why it uses providers.
     *
     * For testing we want whole `DefaultNotificationBackend` to be swapped with a mock.
     */
static GType
ft_default_notification_backend_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FtDefaultNotificationBackendClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ft_default_notification_backend_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FtDefaultNotificationBackend), 0, (GInstanceInitFunc) ft_default_notification_backend_instance_init, NULL };
	static const GInterfaceInfo ft_notification_backend_info = { (GInterfaceInitFunc) ft_default_notification_backend_ft_notification_backend_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType ft_default_notification_backend_type_id;
	ft_default_notification_backend_type_id = g_type_register_static (FT_TYPE_PROVIDED_OBJECT, "FtDefaultNotificationBackend", &g_define_type_info, 0);
	g_type_add_interface_static (ft_default_notification_backend_type_id, FT_TYPE_NOTIFICATION_BACKEND, &ft_notification_backend_info);
	FtDefaultNotificationBackend_private_offset = g_type_add_instance_private (ft_default_notification_backend_type_id, sizeof (FtDefaultNotificationBackendPrivate));
	return ft_default_notification_backend_type_id;
}

GType
ft_default_notification_backend_get_type (void)
{
	static volatile gsize ft_default_notification_backend_type_id__once = 0;
	if (g_once_init_enter (&ft_default_notification_backend_type_id__once)) {
		GType ft_default_notification_backend_type_id;
		ft_default_notification_backend_type_id = ft_default_notification_backend_get_type_once ();
		g_once_init_leave (&ft_default_notification_backend_type_id__once, ft_default_notification_backend_type_id);
	}
	return ft_default_notification_backend_type_id__once;
}

static void
_vala_ft_default_notification_backend_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec)
{
	FtDefaultNotificationBackend * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FT_TYPE_DEFAULT_NOTIFICATION_BACKEND, FtDefaultNotificationBackend);
	switch (property_id) {
		case FT_DEFAULT_NOTIFICATION_BACKEND_NAME_PROPERTY:
		g_value_set_string (value, ft_notification_backend_get_name ((FtNotificationBackend*) self));
		break;
		case FT_DEFAULT_NOTIFICATION_BACKEND_VENDOR_PROPERTY:
		g_value_set_string (value, ft_notification_backend_get_vendor ((FtNotificationBackend*) self));
		break;
		case FT_DEFAULT_NOTIFICATION_BACKEND_VERSION_PROPERTY:
		g_value_set_string (value, ft_notification_backend_get_version ((FtNotificationBackend*) self));
		break;
		case FT_DEFAULT_NOTIFICATION_BACKEND_HAS_ACTIONS_PROPERTY:
		g_value_set_boolean (value, ft_notification_backend_get_has_actions ((FtNotificationBackend*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

