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

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

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

#define PORTAL_BACKGROUND_PROVIDER_COMAPTIBLE_VERSION 2U
#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

enum  {
	PORTAL_BACKGROUND_PROVIDER_0_PROPERTY,
	PORTAL_BACKGROUND_PROVIDER_PRIORITY_PROPERTY,
	PORTAL_BACKGROUND_PROVIDER_BACKGROUND_ALLOWED_PROPERTY,
	PORTAL_BACKGROUND_PROVIDER_AUTOSTART_ALLOWED_PROPERTY,
	PORTAL_BACKGROUND_PROVIDER_NUM_PROPERTIES
};
static GParamSpec* portal_background_provider_properties[PORTAL_BACKGROUND_PROVIDER_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)))
typedef struct _PortalBackgroundProviderInitializeData PortalBackgroundProviderInitializeData;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _PortalBackgroundProviderEnableData PortalBackgroundProviderEnableData;
typedef struct _PortalBackgroundProviderDisableData PortalBackgroundProviderDisableData;
typedef struct _PortalBackgroundProviderUninitializeData PortalBackgroundProviderUninitializeData;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block2Data Block2Data;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_variant_dict_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_dict_unref (var), NULL)))
typedef struct _PortalBackgroundProviderRequestBackgroundData PortalBackgroundProviderRequestBackgroundData;

struct _PortalBackgroundProviderPrivate {
	GDBusConnection* connection;
	PortalBackground* proxy;
	GCancellable* cancellable;
	GHashTable* requests;
	guint dbus_watcher_id;
	gboolean _background_allowed;
	gboolean _autostart_allowed;
};

struct _PortalBackgroundProviderInitializeData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PortalBackgroundProvider* self;
	GCancellable* cancellable;
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
};

struct _PortalBackgroundProviderEnableData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PortalBackgroundProvider* self;
	GCancellable* cancellable;
	PortalBackground* _tmp0_;
	GCancellable* _tmp1_;
	GCancellable* _tmp2_;
	GCancellable* _tmp3_;
	GCancellable* _tmp4_;
	PortalBackground* _tmp5_;
	GCancellable* _tmp6_;
	PortalBackground* _tmp7_;
	PortalBackground* _tmp8_;
	PortalBackground* _tmp9_;
	guint32 _tmp10_;
	guint32 _tmp11_;
	PortalBackground* _tmp12_;
	guint32 _tmp13_;
	guint32 _tmp14_;
	GError* _error_;
	GError* _tmp15_;
	const gchar* _tmp16_;
	GError* _tmp17_;
	GError* _tmp18_;
	GError* _inner_error0_;
};

struct _PortalBackgroundProviderDisableData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PortalBackgroundProvider* self;
	GCancellable* _tmp0_;
	GCancellable* _tmp1_;
};

struct _PortalBackgroundProviderUninitializeData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PortalBackgroundProvider* self;
};

struct _Block2Data {
	int _ref_count_;
	PortalBackgroundProvider* self;
	gboolean autostart;
	gpointer _async_data_;
};

struct _PortalBackgroundProviderRequestBackgroundData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PortalBackgroundProvider* self;
	gboolean autostart;
	gchar* parent_window;
	Block2Data* _data2_;
	gchar* handle_token;
	PortalBackground* _tmp0_;
	gchar* _tmp1_;
	GDBusConnection* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GError* _error_;
	GError* _tmp5_;
	const gchar* _tmp6_;
	PortalBackground* _tmp7_;
	const gchar* _tmp8_;
	GVariantDict* options;
	GVariantDict* _tmp9_;
	GVariantDict* _tmp10_;
	const gchar* _tmp11_;
	GVariant* _tmp12_;
	GVariant* _tmp13_;
	GVariantDict* _tmp14_;
	GVariant* _tmp15_;
	GVariant* _tmp16_;
	GVariantDict* _tmp17_;
	GVariant* _tmp18_;
	GVariant* _tmp19_;
	PortalBackground* _tmp20_;
	GVariantDict* _tmp21_;
	GVariant* _tmp22_;
	GVariant* _tmp23_;
	GError* _inner_error0_;
};

static gint PortalBackgroundProvider_private_offset;
static gpointer portal_background_provider_parent_class = NULL;
static FtBackgroundProviderIface * portal_background_provider_ft_background_provider_parent_iface = NULL;
static GType portal_background_provider_type_id = 0;

static void portal_background_provider_on_name_appeared (PortalBackgroundProvider* self,
                                                  GDBusConnection* connection,
                                                  const gchar* name,
                                                  const gchar* name_owner);
static void portal_background_provider_on_name_vanished (PortalBackgroundProvider* self,
                                                  GDBusConnection* connection,
                                                  const gchar* name);
static void portal_background_provider_real_initialize_data_free (gpointer _data);
static void portal_background_provider_real_initialize (FtProvider* base,
                                                 GCancellable* cancellable,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_);
static gboolean portal_background_provider_real_initialize_co (PortalBackgroundProviderInitializeData* _data_);
static void _g_object_unref0_ (gpointer var);
static void _portal_background_provider_on_name_appeared_gbus_name_appeared_callback (GDBusConnection* connection,
                                                                               const gchar* name,
                                                                               const gchar* name_owner,
                                                                               gpointer self);
static void _portal_background_provider_on_name_vanished_gbus_name_vanished_callback (GDBusConnection* connection,
                                                                               const gchar* name,
                                                                               gpointer self);
static void portal_background_provider_real_enable_data_free (gpointer _data);
static void portal_background_provider_real_enable (FtProvider* base,
                                             GCancellable* cancellable,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
static gboolean portal_background_provider_real_enable_co (PortalBackgroundProviderEnableData* _data_);
static void portal_background_provider_enable_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_);
static void portal_background_provider_real_disable_data_free (gpointer _data);
static void portal_background_provider_real_disable (FtProvider* base,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_);
static gboolean portal_background_provider_real_disable_co (PortalBackgroundProviderDisableData* _data_);
static void portal_background_provider_real_uninitialize_data_free (gpointer _data);
static void portal_background_provider_real_uninitialize (FtProvider* base,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_);
static gboolean portal_background_provider_real_uninitialize_co (PortalBackgroundProviderUninitializeData* _data_);
static void portal_background_provider_real_request_background_data_free (gpointer _data);
static void portal_background_provider_real_request_background (FtBackgroundProvider* base,
                                                         gboolean autostart,
                                                         const gchar* parent_window,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
static gboolean portal_background_provider_real_request_background_co (PortalBackgroundProviderRequestBackgroundData* _data_);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static void ___lambda5_ (Block2Data* _data2_,
                  guint32 response,
                  GVariant* results);
static void ____lambda5__portal_request_callback (guint32 response,
                                           GVariant* results,
                                           gpointer self);
static void portal_background_provider_request_background_ready (GObject* source_object,
                                                          GAsyncResult* _res_,
                                                          gpointer _user_data_);
static void __lambda6_ (PortalBackgroundProvider* self,
                 GObject* obj,
                 GAsyncResult* res);
static void ___lambda6__gasync_ready_callback (GObject* source_object,
                                        GAsyncResult* res,
                                        gpointer self);
static void portal_background_provider_finalize (GObject * obj);
static void _vala_portal_background_provider_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec);

static const gchar* PORTAL_BACKGROUND_PROVIDER_COMMANDLINE[2] = {"focus-timer", "--gapplication-service"};

static inline gpointer
portal_background_provider_get_instance_private (PortalBackgroundProvider* self)
{
	return G_STRUCT_MEMBER_P (self, PortalBackgroundProvider_private_offset);
}

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

static void
portal_background_provider_on_name_appeared (PortalBackgroundProvider* self,
                                             GDBusConnection* connection,
                                             const gchar* name,
                                             const gchar* name_owner)
{
	GDBusConnection* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (connection != NULL);
	g_return_if_fail (name != NULL);
	g_return_if_fail (name_owner != NULL);
	ft_provider_set_available ((FtProvider*) self, TRUE);
	_tmp0_ = _g_object_ref0 (connection);
	_g_object_unref0 (self->priv->connection);
	self->priv->connection = _tmp0_;
}

static void
portal_background_provider_on_name_vanished (PortalBackgroundProvider* self,
                                             GDBusConnection* connection,
                                             const gchar* name)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	ft_provider_set_available ((FtProvider*) self, FALSE);
	_g_object_unref0 (self->priv->connection);
	self->priv->connection = NULL;
}

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

static void
portal_background_provider_real_initialize (FtProvider* base,
                                            GCancellable* cancellable,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_)
{
	PortalBackgroundProvider * self;
	PortalBackgroundProviderInitializeData* _data_;
	PortalBackgroundProvider* _tmp0_;
	GCancellable* _tmp1_;
	self = (PortalBackgroundProvider*) base;
	_data_ = g_slice_new0 (PortalBackgroundProviderInitializeData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, portal_background_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_;
	portal_background_provider_real_initialize_co (_data_);
}

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

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

static void
_portal_background_provider_on_name_appeared_gbus_name_appeared_callback (GDBusConnection* connection,
                                                                          const gchar* name,
                                                                          const gchar* name_owner,
                                                                          gpointer self)
{
	portal_background_provider_on_name_appeared ((PortalBackgroundProvider*) self, connection, name, name_owner);
}

static void
_portal_background_provider_on_name_vanished_gbus_name_vanished_callback (GDBusConnection* connection,
                                                                          const gchar* name,
                                                                          gpointer self)
{
	portal_background_provider_on_name_vanished ((PortalBackgroundProvider*) self, connection, name);
}

static gboolean
portal_background_provider_real_initialize_co (PortalBackgroundProviderInitializeData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_direct_hash;
	_data_->_tmp1_ = g_direct_equal;
	_data_->_tmp2_ = g_hash_table_new_full (_data_->_tmp0_, _data_->_tmp1_, NULL, _g_object_unref0_);
	_g_hash_table_unref0 (_data_->self->priv->requests);
	_data_->self->priv->requests = _data_->_tmp2_;
	if (_data_->self->priv->dbus_watcher_id == ((guint) 0)) {
		_data_->self->priv->dbus_watcher_id = g_bus_watch_name_with_closures (G_BUS_TYPE_SESSION, "org.freedesktop.portal.Desktop", G_BUS_NAME_WATCHER_FLAGS_NONE, (GClosure*) ((_portal_background_provider_on_name_appeared_gbus_name_appeared_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _portal_background_provider_on_name_appeared_gbus_name_appeared_callback, g_object_ref (_data_->self), (GClosureNotify) g_object_unref)), (GClosure*) ((_portal_background_provider_on_name_vanished_gbus_name_vanished_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _portal_background_provider_on_name_vanished_gbus_name_vanished_callback, g_object_ref (_data_->self), (GClosureNotify) g_object_unref)));
	}
	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
portal_background_provider_real_enable_data_free (gpointer _data)
{
	PortalBackgroundProviderEnableData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (PortalBackgroundProviderEnableData, _data_);
}

static void
portal_background_provider_real_enable (FtProvider* base,
                                        GCancellable* cancellable,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	PortalBackgroundProvider * self;
	PortalBackgroundProviderEnableData* _data_;
	PortalBackgroundProvider* _tmp0_;
	GCancellable* _tmp1_;
	self = (PortalBackgroundProvider*) base;
	_data_ = g_slice_new0 (PortalBackgroundProviderEnableData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, portal_background_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_;
	portal_background_provider_real_enable_co (_data_);
}

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

static void
portal_background_provider_enable_ready (GObject* source_object,
                                         GAsyncResult* _res_,
                                         gpointer _user_data_)
{
	PortalBackgroundProviderEnableData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	portal_background_provider_real_enable_co (_data_);
}

static gpointer
_g_error_copy0 (gpointer self)
{
	return self ? g_error_copy (self) : NULL;
}

static gboolean
portal_background_provider_real_enable_co (PortalBackgroundProviderEnableData* _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->proxy;
	if (_data_->_tmp0_ != 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;
	}
	if (_data_->cancellable != NULL) {
		_data_->_tmp2_ = _g_object_ref0 (_data_->cancellable);
		_g_object_unref0 (_data_->_tmp1_);
		_data_->_tmp1_ = _data_->_tmp2_;
	} else {
		_data_->_tmp3_ = g_cancellable_new ();
		_g_object_unref0 (_data_->_tmp1_);
		_data_->_tmp1_ = _data_->_tmp3_;
	}
	_data_->_tmp4_ = _data_->_tmp1_;
	_data_->_tmp1_ = NULL;
	_g_object_unref0 (_data_->self->priv->cancellable);
	_data_->self->priv->cancellable = _data_->_tmp4_;
	{
		_data_->_tmp6_ = _data_->self->priv->cancellable;
		_data_->_state_ = 1;
		g_async_initable_new_async (PORTAL_TYPE_BACKGROUND_PROXY, 0, _data_->_tmp6_, portal_background_provider_enable_ready, _data_, "g-flags", G_DBUS_PROXY_FLAGS_NONE, "g-name", "org.freedesktop.portal.Desktop", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/freedesktop/portal/desktop", "g-interface-name", "org.freedesktop.portal.Background", NULL);
		return FALSE;
		_state_1:
		_data_->_tmp7_ = (PortalBackground*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp5_ = (PortalBackground*) _data_->_tmp7_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp8_ = _data_->_tmp5_;
		_data_->_tmp5_ = NULL;
		_g_object_unref0 (_data_->self->priv->proxy);
		_data_->self->priv->proxy = _data_->_tmp8_;
		_data_->_tmp9_ = _data_->self->priv->proxy;
		_data_->_tmp10_ = portal_background_get_version (_data_->_tmp9_);
		_data_->_tmp11_ = _data_->_tmp10_;
		if (_data_->_tmp11_ > ((guint32) PORTAL_BACKGROUND_PROVIDER_COMAPTIBLE_VERSION)) {
			_data_->_tmp12_ = _data_->self->priv->proxy;
			_data_->_tmp13_ = portal_background_get_version (_data_->_tmp12_);
			_data_->_tmp14_ = _data_->_tmp13_;
			g_warning ("background-provider.vala:95: Using Background API version %u. Implemen" \
"tation was aimed for older version.", (guint) _data_->_tmp14_);
		}
		_g_object_unref0 (_data_->_tmp5_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->_error_ = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp15_ = _data_->_error_;
		_data_->_tmp16_ = _data_->_tmp15_->message;
		g_warning ("background-provider.vala:100: Error while enabling background provider" \
": %s", _data_->_tmp16_);
		_data_->_tmp17_ = _data_->_error_;
		_data_->_tmp18_ = _g_error_copy0 (_data_->_tmp17_);
		_data_->_inner_error0_ = _data_->_tmp18_;
		_g_error_free0 (_data_->_error_);
		goto __finally0;
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_g_object_unref0 (_data_->_tmp1_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_object_unref0 (_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
portal_background_provider_real_disable_data_free (gpointer _data)
{
	PortalBackgroundProviderDisableData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (PortalBackgroundProviderDisableData, _data_);
}

static void
portal_background_provider_real_disable (FtProvider* base,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_)
{
	PortalBackgroundProvider * self;
	PortalBackgroundProviderDisableData* _data_;
	PortalBackgroundProvider* _tmp0_;
	self = (PortalBackgroundProvider*) base;
	_data_ = g_slice_new0 (PortalBackgroundProviderDisableData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, portal_background_provider_real_disable_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	portal_background_provider_real_disable_co (_data_);
}

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

static gboolean
portal_background_provider_real_disable_co (PortalBackgroundProviderDisableData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->cancellable;
	if (_data_->_tmp0_ != NULL) {
		_data_->_tmp1_ = _data_->self->priv->cancellable;
		g_cancellable_cancel (_data_->_tmp1_);
	}
	_g_object_unref0 (_data_->self->priv->proxy);
	_data_->self->priv->proxy = NULL;
	_g_hash_table_unref0 (_data_->self->priv->requests);
	_data_->self->priv->requests = 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;
}

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

static void
portal_background_provider_real_uninitialize (FtProvider* base,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_)
{
	PortalBackgroundProvider * self;
	PortalBackgroundProviderUninitializeData* _data_;
	PortalBackgroundProvider* _tmp0_;
	self = (PortalBackgroundProvider*) base;
	_data_ = g_slice_new0 (PortalBackgroundProviderUninitializeData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, portal_background_provider_real_uninitialize_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	portal_background_provider_real_uninitialize_co (_data_);
}

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

static gboolean
portal_background_provider_real_uninitialize_co (PortalBackgroundProviderUninitializeData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (_data_->self->priv->dbus_watcher_id != ((guint) 0)) {
		g_bus_unwatch_name (_data_->self->priv->dbus_watcher_id);
		_data_->self->priv->dbus_watcher_id = (guint) 0;
	}
	_g_object_unref0 (_data_->self->priv->cancellable);
	_data_->self->priv->cancellable = 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;
}

static void
portal_background_provider_real_request_background_data_free (gpointer _data)
{
	PortalBackgroundProviderRequestBackgroundData* _data_;
	_data_ = _data;
	_g_free0 (_data_->parent_window);
	_g_object_unref0 (_data_->self);
	g_slice_free (PortalBackgroundProviderRequestBackgroundData, _data_);
}

static void
portal_background_provider_real_request_background (FtBackgroundProvider* base,
                                                    gboolean autostart,
                                                    const gchar* parent_window,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_)
{
	PortalBackgroundProvider * self;
	PortalBackgroundProviderRequestBackgroundData* _data_;
	PortalBackgroundProvider* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (parent_window != NULL);
	self = (PortalBackgroundProvider*) base;
	_data_ = g_slice_new0 (PortalBackgroundProviderRequestBackgroundData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, portal_background_provider_real_request_background_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->autostart = autostart;
	_tmp1_ = g_strdup (parent_window);
	_g_free0 (_data_->parent_window);
	_data_->parent_window = _tmp1_;
	portal_background_provider_real_request_background_co (_data_);
}

static void
portal_background_provider_request_background_finish (FtBackgroundProvider* base,
                                                      GAsyncResult* _res_)
{
	PortalBackgroundProviderRequestBackgroundData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static Block2Data*
block2_data_ref (Block2Data* _data2_)
{
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}

static void
block2_data_unref (void * _userdata_)
{
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		PortalBackgroundProvider* self;
		self = _data2_->self;
		_g_object_unref0 (self);
		g_slice_free (Block2Data, _data2_);
	}
}

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
___lambda5_ (Block2Data* _data2_,
             guint32 response,
             GVariant* results)
{
	PortalBackgroundProvider* self;
	GVariant* background_variant = NULL;
	GVariant* _tmp0_;
	GVariant* autostart_variant = NULL;
	GVariant* _tmp1_;
	gboolean _tmp2_ = FALSE;
	GVariant* _tmp3_;
	gboolean background_allowed = FALSE;
	gboolean _tmp5_ = FALSE;
	GVariant* _tmp6_;
	gboolean autostart_allowed = FALSE;
	self = _data2_->self;
	g_return_if_fail (results != NULL);
	_tmp0_ = g_variant_lookup_value (results, "background", NULL);
	background_variant = _tmp0_;
	_tmp1_ = g_variant_lookup_value (results, "autostart", NULL);
	autostart_variant = _tmp1_;
	_tmp3_ = background_variant;
	if (_tmp3_ != NULL) {
		GVariant* _tmp4_;
		_tmp4_ = background_variant;
		_tmp2_ = g_variant_get_boolean (_tmp4_);
	} else {
		_tmp2_ = self->priv->_background_allowed;
	}
	background_allowed = _tmp2_;
	_tmp6_ = autostart_variant;
	if (_tmp6_ != NULL) {
		GVariant* _tmp7_;
		_tmp7_ = autostart_variant;
		_tmp5_ = g_variant_get_boolean (_tmp7_);
	} else {
		_tmp5_ = self->priv->_autostart_allowed;
	}
	autostart_allowed = _tmp5_;
	if (autostart_allowed != _data2_->autostart) {
		gchar* _tmp8_;
		gchar* _tmp9_;
		_tmp8_ = bool_to_string (_data2_->autostart);
		_tmp9_ = _tmp8_;
		g_warning ("background-provider.vala:159: Failed to set `autostart = %s`", _tmp9_);
		_g_free0 (_tmp9_);
	}
	if (self->priv->_background_allowed != background_allowed) {
		self->priv->_background_allowed = background_allowed;
		g_object_notify ((GObject*) self, "background-allowed");
	}
	if (self->priv->_autostart_allowed != autostart_allowed) {
		self->priv->_autostart_allowed = autostart_allowed;
		g_object_notify ((GObject*) self, "autostart-allowed");
	}
	portal_background_provider_real_request_background_co (_data2_->_async_data_);
	_g_variant_unref0 (autostart_variant);
	_g_variant_unref0 (background_variant);
}

static void
____lambda5__portal_request_callback (guint32 response,
                                      GVariant* results,
                                      gpointer self)
{
	___lambda5_ (self, response, results);
}

static void
portal_background_provider_request_background_ready (GObject* source_object,
                                                     GAsyncResult* _res_,
                                                     gpointer _user_data_)
{
	PortalBackgroundProviderRequestBackgroundData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	portal_background_provider_real_request_background_co (_data_);
}

static void
__lambda6_ (PortalBackgroundProvider* self,
            GObject* obj,
            GAsyncResult* res)
{
	PortalBackground* _tmp0_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->proxy;
	if (_tmp0_ == NULL) {
		return;
	}
	{
		PortalBackground* _tmp1_;
		char* _tmp2_;
		char* _tmp3_;
		_tmp1_ = self->priv->proxy;
		_tmp2_ = portal_background_request_background_finish (_tmp1_, res, &_inner_error0_);
		_tmp3_ = _tmp2_;
		_g_free0 (_tmp3_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp4_;
		const gchar* _tmp5_;
		_error_ = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp4_ = _error_;
		_tmp5_ = _tmp4_->message;
		g_warning ("background-provider.vala:203: Error while requesting background: %s", _tmp5_);
		_g_error_free0 (_error_);
	}
	__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
___lambda6__gasync_ready_callback (GObject* source_object,
                                   GAsyncResult* res,
                                   gpointer self)
{
	__lambda6_ ((PortalBackgroundProvider*) self, source_object, res);
	g_object_unref (self);
}

static gboolean
portal_background_provider_real_request_background_co (PortalBackgroundProviderRequestBackgroundData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data2_ = g_slice_new0 (Block2Data);
	_data_->_data2_->_ref_count_ = 1;
	_data_->_data2_->self = g_object_ref (_data_->self);
	_data_->_data2_->autostart = _data_->autostart;
	_data_->_data2_->_async_data_ = _data_;
	_data_->_tmp0_ = _data_->self->priv->proxy;
	if (_data_->_tmp0_ == NULL) {
		_g_free0 (_data_->handle_token);
		block2_data_unref (_data_->_data2_);
		_data_->_data2_ = 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_->_tmp2_ = _data_->self->priv->connection;
		_data_->_state_ = 1;
		portal_create_request (_data_->_tmp2_, ____lambda5__portal_request_callback, _data_->_data2_, portal_background_provider_request_background_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp3_ = portal_create_request_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp1_ = _data_->_tmp3_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp4_ = _data_->_tmp1_;
		_data_->_tmp1_ = NULL;
		_g_free0 (_data_->handle_token);
		_data_->handle_token = _data_->_tmp4_;
		_g_free0 (_data_->_tmp1_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->_error_ = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp5_ = _data_->_error_;
		_data_->_tmp6_ = _data_->_tmp5_->message;
		g_warning ("background-provider.vala:177: Error while requesting background: %s", _data_->_tmp6_);
		_g_error_free0 (_data_->_error_);
		_g_free0 (_data_->handle_token);
		block2_data_unref (_data_->_data2_);
		_data_->_data2_ = 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;
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_free0 (_data_->handle_token);
		block2_data_unref (_data_->_data2_);
		_data_->_data2_ = NULL;
		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;
	}
	_data_->_tmp7_ = _data_->self->priv->proxy;
	if (_data_->_tmp7_ == NULL) {
		_data_->_tmp8_ = _data_->handle_token;
		portal_destroy_request (_data_->_tmp8_);
		_g_free0 (_data_->handle_token);
		block2_data_unref (_data_->_data2_);
		_data_->_data2_ = 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_->_tmp9_ = g_variant_dict_new (NULL);
	_data_->options = _data_->_tmp9_;
	_data_->_tmp10_ = _data_->options;
	_data_->_tmp11_ = _data_->handle_token;
	_data_->_tmp12_ = g_variant_new_string (_data_->_tmp11_);
	g_variant_ref_sink (_data_->_tmp12_);
	_data_->_tmp13_ = _data_->_tmp12_;
	g_variant_dict_insert_value (_data_->_tmp10_, "handle_token", _data_->_tmp13_);
	_g_variant_unref0 (_data_->_tmp13_);
	_data_->_tmp14_ = _data_->options;
	_data_->_tmp15_ = g_variant_new_boolean (_data_->_data2_->autostart);
	g_variant_ref_sink (_data_->_tmp15_);
	_data_->_tmp16_ = _data_->_tmp15_;
	g_variant_dict_insert_value (_data_->_tmp14_, "autostart", _data_->_tmp16_);
	_g_variant_unref0 (_data_->_tmp16_);
	_data_->_tmp17_ = _data_->options;
	_data_->_tmp18_ = g_variant_new_strv (PORTAL_BACKGROUND_PROVIDER_COMMANDLINE, G_N_ELEMENTS (PORTAL_BACKGROUND_PROVIDER_COMMANDLINE));
	g_variant_ref_sink (_data_->_tmp18_);
	_data_->_tmp19_ = _data_->_tmp18_;
	g_variant_dict_insert_value (_data_->_tmp17_, "commandline", _data_->_tmp19_);
	_g_variant_unref0 (_data_->_tmp19_);
	_data_->_tmp20_ = _data_->self->priv->proxy;
	_data_->_tmp21_ = _data_->options;
	_data_->_tmp22_ = g_variant_dict_end (_data_->_tmp21_);
	g_variant_ref_sink (_data_->_tmp22_);
	_data_->_tmp23_ = _data_->_tmp22_;
	portal_background_request_background (_data_->_tmp20_, _data_->parent_window, _data_->_tmp23_, ___lambda6__gasync_ready_callback, g_object_ref (_data_->self));
	_g_variant_unref0 (_data_->_tmp23_);
	_data_->_state_ = 2;
	return FALSE;
	_state_2:
	;
	_g_variant_dict_unref0 (_data_->options);
	_g_free0 (_data_->handle_token);
	block2_data_unref (_data_->_data2_);
	_data_->_data2_ = 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;
}

PortalBackgroundProvider*
portal_background_provider_construct (GType object_type)
{
	PortalBackgroundProvider * self = NULL;
	self = (PortalBackgroundProvider*) ft_provider_construct (object_type);
	return self;
}

PortalBackgroundProvider*
portal_background_provider_new (void)
{
	return portal_background_provider_construct (PORTAL_TYPE_BACKGROUND_PROVIDER);
}

FtPriority
portal_background_provider_get_priority (PortalBackgroundProvider* self)
{
	FtPriority result;
	g_return_val_if_fail (self != NULL, 0);
	result = FT_PRIORITY_HIGH;
	return result;
}

static gboolean
portal_background_provider_real_get_background_allowed (FtBackgroundProvider* base)
{
	gboolean result;
	PortalBackgroundProvider* self;
	self = (PortalBackgroundProvider*) base;
	result = self->priv->_background_allowed;
	return result;
}

static gboolean
portal_background_provider_real_get_autostart_allowed (FtBackgroundProvider* base)
{
	gboolean result;
	PortalBackgroundProvider* self;
	self = (PortalBackgroundProvider*) base;
	result = self->priv->_autostart_allowed;
	return result;
}

static void
portal_background_provider_class_init (PortalBackgroundProviderClass * klass,
                                       gpointer klass_data)
{
	portal_background_provider_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &PortalBackgroundProvider_private_offset);
	((FtProviderClass *) klass)->initialize = (void (*) (FtProvider*, GCancellable*, GAsyncReadyCallback, gpointer)) portal_background_provider_real_initialize;
	((FtProviderClass *) klass)->initialize_finish = (void (*) (FtProvider*, GAsyncResult*, GError**)) portal_background_provider_initialize_finish;
	((FtProviderClass *) klass)->enable = (void (*) (FtProvider*, GCancellable*, GAsyncReadyCallback, gpointer)) portal_background_provider_real_enable;
	((FtProviderClass *) klass)->enable_finish = (void (*) (FtProvider*, GAsyncResult*, GError**)) portal_background_provider_enable_finish;
	((FtProviderClass *) klass)->disable = (void (*) (FtProvider*, GAsyncReadyCallback, gpointer)) portal_background_provider_real_disable;
	((FtProviderClass *) klass)->disable_finish = (void (*) (FtProvider*, GAsyncResult*, GError**)) portal_background_provider_disable_finish;
	((FtProviderClass *) klass)->uninitialize = (void (*) (FtProvider*, GAsyncReadyCallback, gpointer)) portal_background_provider_real_uninitialize;
	((FtProviderClass *) klass)->uninitialize_finish = (void (*) (FtProvider*, GAsyncResult*, GError**)) portal_background_provider_uninitialize_finish;
	G_OBJECT_CLASS (klass)->get_property = _vala_portal_background_provider_get_property;
	G_OBJECT_CLASS (klass)->finalize = portal_background_provider_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PORTAL_BACKGROUND_PROVIDER_PRIORITY_PROPERTY, portal_background_provider_properties[PORTAL_BACKGROUND_PROVIDER_PRIORITY_PROPERTY] = g_param_spec_enum ("priority", "priority", "priority", FT_TYPE_PRIORITY, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PORTAL_BACKGROUND_PROVIDER_BACKGROUND_ALLOWED_PROPERTY, portal_background_provider_properties[PORTAL_BACKGROUND_PROVIDER_BACKGROUND_ALLOWED_PROPERTY] = g_param_spec_boolean ("background-allowed", "background-allowed", "background-allowed", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PORTAL_BACKGROUND_PROVIDER_AUTOSTART_ALLOWED_PROPERTY, portal_background_provider_properties[PORTAL_BACKGROUND_PROVIDER_AUTOSTART_ALLOWED_PROPERTY] = g_param_spec_boolean ("autostart-allowed", "autostart-allowed", "autostart-allowed", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
portal_background_provider_ft_background_provider_interface_init (FtBackgroundProviderIface * iface,
                                                                  gpointer iface_data)
{
	portal_background_provider_ft_background_provider_parent_iface = g_type_interface_peek_parent (iface);
	iface->request_background = (void (*) (FtBackgroundProvider*, gboolean, const gchar*, GAsyncReadyCallback, gpointer)) portal_background_provider_real_request_background;
	iface->request_background_finish = (void (*) (FtBackgroundProvider*, GAsyncResult*)) portal_background_provider_request_background_finish;
	iface->get_background_allowed = portal_background_provider_real_get_background_allowed;
	iface->get_autostart_allowed = portal_background_provider_real_get_autostart_allowed;
}

static void
portal_background_provider_instance_init (PortalBackgroundProvider * self,
                                          gpointer klass)
{
	self->priv = portal_background_provider_get_instance_private (self);
	self->priv->connection = NULL;
	self->priv->proxy = NULL;
	self->priv->cancellable = NULL;
	self->priv->requests = NULL;
	self->priv->dbus_watcher_id = 0U;
	self->priv->_background_allowed = FALSE;
	self->priv->_autostart_allowed = FALSE;
}

static void
portal_background_provider_finalize (GObject * obj)
{
	PortalBackgroundProvider * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PORTAL_TYPE_BACKGROUND_PROVIDER, PortalBackgroundProvider);
	_g_object_unref0 (self->priv->connection);
	_g_object_unref0 (self->priv->proxy);
	_g_object_unref0 (self->priv->cancellable);
	_g_hash_table_unref0 (self->priv->requests);
	G_OBJECT_CLASS (portal_background_provider_parent_class)->finalize (obj);
}

GType
portal_background_provider_get_type (void)
{
	return portal_background_provider_type_id;
}

GType
portal_background_provider_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (PortalBackgroundProviderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) portal_background_provider_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PortalBackgroundProvider), 0, (GInstanceInitFunc) portal_background_provider_instance_init, NULL };
	static const GInterfaceInfo ft_background_provider_info = { (GInterfaceInitFunc) portal_background_provider_ft_background_provider_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	portal_background_provider_type_id = g_type_module_register_type (module, FT_TYPE_PROVIDER, "PortalBackgroundProvider", &g_define_type_info, 0);
	g_type_module_add_interface (module, portal_background_provider_type_id, FT_TYPE_BACKGROUND_PROVIDER, &ft_background_provider_info);
	PortalBackgroundProvider_private_offset = sizeof (PortalBackgroundProviderPrivate);
	return portal_background_provider_type_id;
}

static void
_vala_portal_background_provider_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec)
{
	PortalBackgroundProvider * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PORTAL_TYPE_BACKGROUND_PROVIDER, PortalBackgroundProvider);
	switch (property_id) {
		case PORTAL_BACKGROUND_PROVIDER_PRIORITY_PROPERTY:
		g_value_set_enum (value, portal_background_provider_get_priority (self));
		break;
		case PORTAL_BACKGROUND_PROVIDER_BACKGROUND_ALLOWED_PROPERTY:
		g_value_set_boolean (value, ft_background_provider_get_background_allowed ((FtBackgroundProvider*) self));
		break;
		case PORTAL_BACKGROUND_PROVIDER_AUTOSTART_ALLOWED_PROPERTY:
		g_value_set_boolean (value, ft_background_provider_get_autostart_allowed ((FtBackgroundProvider*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

