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

/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 2 -*-
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 * SPDX-FileCopyrightText: Michael Terry
 */

#include <glib.h>
#include <glib-object.h>
#include "deja.h"
#include <gio/gio.h>
#include <stdlib.h>
#include <string.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 DEJA_DUP_TYPE_BACKEND_ERROR (deja_dup_backend_error_get_type ())
enum  {
	DEJA_DUP_BACKEND_0_PROPERTY,
	DEJA_DUP_BACKEND_KIND_PROPERTY,
	DEJA_DUP_BACKEND_SETTINGS_PROPERTY,
	DEJA_DUP_BACKEND_NEEDS_BACKEND_PASSWORD_PROPERTY,
	DEJA_DUP_BACKEND_MOUNT_OP_PROPERTY,
	DEJA_DUP_BACKEND_NUM_PROPERTIES
};
static GParamSpec* deja_dup_backend_properties[DEJA_DUP_BACKEND_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _DejaDupBackendProvideBackendPasswordData DejaDupBackendProvideBackendPasswordData;
typedef struct _DejaDupBackendIsReadyData DejaDupBackendIsReadyData;
typedef struct _DejaDupBackendPrepareData DejaDupBackendPrepareData;
typedef struct _DejaDupBackendCleanupData DejaDupBackendCleanupData;
typedef struct _DejaDupBackendPeekAtFilesData DejaDupBackendPeekAtFilesData;
typedef struct _DejaDupBackendGetSpaceData DejaDupBackendGetSpaceData;
enum  {
	DEJA_DUP_BACKEND_PAUSE_OP_SIGNAL,
	DEJA_DUP_BACKEND_SHOW_BACKEND_PASSWORD_PAGE_SIGNAL,
	DEJA_DUP_BACKEND_SHOW_OAUTH_CONSENT_PAGE_SIGNAL,
	DEJA_DUP_BACKEND_NUM_SIGNALS
};
static guint deja_dup_backend_signals[DEJA_DUP_BACKEND_NUM_SIGNALS] = {0};

typedef enum  {
	DEJA_DUP_BACKEND_ERROR_MOUNT_OP_NEEDED
} DejaDupBackendError;
#define DEJA_DUP_BACKEND_ERROR deja_dup_backend_error_quark ()

struct _DejaDupBackendPrivate {
	DejaDupBackendKind _kind;
	GSettings* _settings;
	gboolean _needs_backend_password;
	GMountOperation* _mount_op;
};

struct _DejaDupBackendProvideBackendPasswordData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupBackend* self;
	gchar* password;
	gboolean save;
};

struct _DejaDupBackendIsReadyData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupBackend* self;
	gchar* reason;
	gchar* message;
	gboolean result;
};

struct _DejaDupBackendPrepareData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupBackend* self;
};

struct _DejaDupBackendCleanupData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupBackend* self;
};

struct _DejaDupBackendPeekAtFilesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupBackend* self;
	GList* result;
};

struct _DejaDupBackendGetSpaceData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupBackend* self;
	guint64 free;
	guint64 total;
};

static gint DejaDupBackend_private_offset;
static gpointer deja_dup_backend_parent_class = NULL;

VALA_EXTERN GQuark deja_dup_backend_error_quark (void);
VALA_EXTERN GType deja_dup_backend_error_get_type (void) G_GNUC_CONST ;
static void deja_dup_backend_real_provide_backend_password_data_free (gpointer _data);
static void deja_dup_backend_real_provide_backend_password (DejaDupBackend* self,
                                                     const gchar* password,
                                                     gboolean save,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_);
static gboolean deja_dup_backend_real_provide_backend_password_co (DejaDupBackendProvideBackendPasswordData* _data_);
static gboolean deja_dup_backend_real_is_native (DejaDupBackend* self);
static GIcon* deja_dup_backend_real_get_icon (DejaDupBackend* self);
static gchar* deja_dup_backend_real_get_location_pretty (DejaDupBackend* self);
static gchar* deja_dup_backend_real_get_unique_location (DejaDupBackend* self);
static gchar** deja_dup_backend_real_get_dependencies (DejaDupBackend* self,
                                                gint* result_length1);
static gboolean deja_dup_backend_real_needs_dependencies (DejaDupBackend* self);
static void deja_dup_backend_real_is_ready_data_free (gpointer _data);
static void deja_dup_backend_real_is_ready (DejaDupBackend* self,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_);
static gboolean deja_dup_backend_real_is_ready_co (DejaDupBackendIsReadyData* _data_);
static gboolean deja_dup_backend_real_is_acceptable (DejaDupBackend* self,
                                              gchar** reason);
static void deja_dup_backend_real_prepare_data_free (gpointer _data);
static void deja_dup_backend_real_prepare (DejaDupBackend* self,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);
static gboolean deja_dup_backend_real_prepare_co (DejaDupBackendPrepareData* _data_);
static void deja_dup_backend_real_cleanup_data_free (gpointer _data);
static void deja_dup_backend_real_cleanup (DejaDupBackend* self,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);
static gboolean deja_dup_backend_real_cleanup_co (DejaDupBackendCleanupData* _data_);
static void _g_free0_ (gpointer var);
static inline void _g_list_free__g_free0_ (GList* self);
static void deja_dup_backend_real_peek_at_files_data_free (gpointer _data);
static void deja_dup_backend_real_peek_at_files (DejaDupBackend* self,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_);
static gboolean deja_dup_backend_real_peek_at_files_co (DejaDupBackendPeekAtFilesData* _data_);
static void deja_dup_backend_real_get_space_data_free (gpointer _data);
static void deja_dup_backend_real_get_space (DejaDupBackend* self,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_);
static gboolean deja_dup_backend_real_get_space_co (DejaDupBackendGetSpaceData* _data_);
static void deja_dup_backend_real_add_excludes (DejaDupBackend* self,
                                         GList** excludes);
static void g_cclosure_user_marshal_VOID__STRING_STRING (GClosure * closure,
                                                  GValue * return_value,
                                                  guint n_param_values,
                                                  const GValue * param_values,
                                                  gpointer invocation_hint,
                                                  gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__STRING_STRING_STRING (GClosure * closure,
                                                         GValue * return_value,
                                                         guint n_param_values,
                                                         const GValue * param_values,
                                                         gpointer invocation_hint,
                                                         gpointer marshal_data);
static void deja_dup_backend_finalize (GObject * obj);
static GType deja_dup_backend_get_type_once (void);
static void _vala_deja_dup_backend_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec);
static void _vala_deja_dup_backend_set_property (GObject * object,
                                          guint property_id,
                                          const GValue * value,
                                          GParamSpec * pspec);

GQuark
deja_dup_backend_error_quark (void)
{
	return g_quark_from_static_string ("deja-dup-backend-error-quark");
}

 G_GNUC_NO_INLINE static GType
deja_dup_backend_error_get_type_once (void)
{
	static const GEnumValue values[] = {{DEJA_DUP_BACKEND_ERROR_MOUNT_OP_NEEDED, "DEJA_DUP_BACKEND_ERROR_MOUNT_OP_NEEDED", "mount-op-needed"}, {0, NULL, NULL}};
	GType deja_dup_backend_error_type_id;
	deja_dup_backend_error_type_id = g_enum_register_static ("DejaDupBackendError", values);
	return deja_dup_backend_error_type_id;
}

GType
deja_dup_backend_error_get_type (void)
{
	static gsize deja_dup_backend_error_type_id__once = 0;
	if (g_once_init_enter (&deja_dup_backend_error_type_id__once)) {
		GType deja_dup_backend_error_type_id;
		deja_dup_backend_error_type_id = deja_dup_backend_error_get_type_once ();
		g_once_init_leave (&deja_dup_backend_error_type_id__once, deja_dup_backend_error_type_id);
	}
	return deja_dup_backend_error_type_id__once;
}

static inline gpointer
deja_dup_backend_get_instance_private (DejaDupBackend* self)
{
	return G_STRUCT_MEMBER_P (self, DejaDupBackend_private_offset);
}

 G_GNUC_NO_INLINE static GType
deja_dup_backend_kind_get_type_once (void)
{
	static const GEnumValue values[] = {{DEJA_DUP_BACKEND_KIND_UNKNOWN, "DEJA_DUP_BACKEND_KIND_UNKNOWN", "unknown"}, {DEJA_DUP_BACKEND_KIND_LOCAL, "DEJA_DUP_BACKEND_KIND_LOCAL", "local"}, {DEJA_DUP_BACKEND_KIND_GVFS, "DEJA_DUP_BACKEND_KIND_GVFS", "gvfs"}, {DEJA_DUP_BACKEND_KIND_GOOGLE, "DEJA_DUP_BACKEND_KIND_GOOGLE", "google"}, {DEJA_DUP_BACKEND_KIND_MICROSOFT, "DEJA_DUP_BACKEND_KIND_MICROSOFT", "microsoft"}, {DEJA_DUP_BACKEND_KIND_RCLONE, "DEJA_DUP_BACKEND_KIND_RCLONE", "rclone"}, {0, NULL, NULL}};
	GType deja_dup_backend_kind_type_id;
	deja_dup_backend_kind_type_id = g_enum_register_static ("DejaDupBackendKind", values);
	return deja_dup_backend_kind_type_id;
}

GType
deja_dup_backend_kind_get_type (void)
{
	static gsize deja_dup_backend_kind_type_id__once = 0;
	if (g_once_init_enter (&deja_dup_backend_kind_type_id__once)) {
		GType deja_dup_backend_kind_type_id;
		deja_dup_backend_kind_type_id = deja_dup_backend_kind_get_type_once ();
		g_once_init_leave (&deja_dup_backend_kind_type_id__once, deja_dup_backend_kind_type_id);
	}
	return deja_dup_backend_kind_type_id__once;
}

static void
deja_dup_backend_real_provide_backend_password_data_free (gpointer _data)
{
	DejaDupBackendProvideBackendPasswordData* _data_;
	_data_ = _data;
	_g_free0 (_data_->password);
	_g_object_unref0 (_data_->self);
	g_slice_free (DejaDupBackendProvideBackendPasswordData, _data_);
}

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

static void
deja_dup_backend_real_provide_backend_password (DejaDupBackend* self,
                                                const gchar* password,
                                                gboolean save,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_)
{
	DejaDupBackendProvideBackendPasswordData* _data_;
	DejaDupBackend* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (password != NULL);
	_data_ = g_slice_new0 (DejaDupBackendProvideBackendPasswordData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_backend_real_provide_backend_password_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (password);
	_g_free0 (_data_->password);
	_data_->password = _tmp1_;
	_data_->save = save;
	deja_dup_backend_real_provide_backend_password_co (_data_);
}

static void
deja_dup_backend_real_provide_backend_password_finish (DejaDupBackend* self,
                                                       GAsyncResult* _res_)
{
	DejaDupBackendProvideBackendPasswordData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static gboolean
deja_dup_backend_real_provide_backend_password_co (DejaDupBackendProvideBackendPasswordData* _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;
}

void
deja_dup_backend_provide_backend_password (DejaDupBackend* self,
                                           const gchar* password,
                                           gboolean save,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	DejaDupBackendClass* _klass_;
	_klass_ = DEJA_DUP_BACKEND_GET_CLASS (self);
	if (_klass_->provide_backend_password) {
		_klass_->provide_backend_password (self, password, save, _callback_, _user_data_);
	}
}

void
deja_dup_backend_provide_backend_password_finish (DejaDupBackend* self,
                                                  GAsyncResult* _res_)
{
	DejaDupBackendClass* _klass_;
	_klass_ = DEJA_DUP_BACKEND_GET_CLASS (self);
	if (_klass_->provide_backend_password_finish) {
		_klass_->provide_backend_password_finish (self, _res_);
	}
}

static gboolean
deja_dup_backend_real_is_native (DejaDupBackend* self)
{
	gboolean _tmp0_ = FALSE;
	g_critical ("Type `%s' does not implement abstract method `deja_dup_backend_is_native'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return _tmp0_;
}

gboolean
deja_dup_backend_is_native (DejaDupBackend* self)
{
	DejaDupBackendClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = DEJA_DUP_BACKEND_GET_CLASS (self);
	if (_klass_->is_native) {
		return _klass_->is_native (self);
	}
	return FALSE;
}

static GIcon*
deja_dup_backend_real_get_icon (DejaDupBackend* self)
{
	GIcon* result;
	result = NULL;
	return result;
}

GIcon*
deja_dup_backend_get_icon (DejaDupBackend* self)
{
	DejaDupBackendClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = DEJA_DUP_BACKEND_GET_CLASS (self);
	if (_klass_->get_icon) {
		return _klass_->get_icon (self);
	}
	return NULL;
}

GIcon*
deja_dup_backend_get_icon_safe (DejaDupBackend* self)
{
	GIcon* icon = NULL;
	GIcon* _tmp0_;
	GIcon* _tmp1_ = NULL;
	GIcon* _tmp2_;
	GIcon* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = deja_dup_backend_get_icon (self);
	icon = _tmp0_;
	_tmp2_ = icon;
	if (_tmp2_ == NULL) {
		GThemedIcon* _tmp3_;
		_tmp3_ = (GThemedIcon*) g_themed_icon_new ("folder");
		_g_object_unref0 (_tmp1_);
		_tmp1_ = (GIcon*) _tmp3_;
	} else {
		GIcon* _tmp4_;
		GIcon* _tmp5_;
		_tmp4_ = icon;
		_tmp5_ = _g_object_ref0 (_tmp4_);
		_g_object_unref0 (_tmp1_);
		_tmp1_ = _tmp5_;
	}
	result = _tmp1_;
	_g_object_unref0 (icon);
	return result;
}

static gchar*
deja_dup_backend_real_get_location_pretty (DejaDupBackend* self)
{
	g_critical ("Type `%s' does not implement abstract method `deja_dup_backend_get_location_pretty'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}

gchar*
deja_dup_backend_get_location_pretty (DejaDupBackend* self)
{
	DejaDupBackendClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = DEJA_DUP_BACKEND_GET_CLASS (self);
	if (_klass_->get_location_pretty) {
		return _klass_->get_location_pretty (self);
	}
	return NULL;
}

gchar*
deja_dup_backend_get_unique_id (DejaDupBackend* self)
{
	gchar* location = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = deja_dup_backend_get_unique_location (self);
	location = _tmp0_;
	_tmp1_ = g_compute_checksum_for_string (G_CHECKSUM_MD5, location, (gsize) -1);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strconcat ("0.", _tmp2_, NULL);
	_tmp4_ = _tmp3_;
	_g_free0 (_tmp2_);
	result = _tmp4_;
	_g_free0 (location);
	return result;
}

static gchar*
deja_dup_backend_real_get_unique_location (DejaDupBackend* self)
{
	g_critical ("Type `%s' does not implement abstract method `deja_dup_backend_get_unique_location'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}

gchar*
deja_dup_backend_get_unique_location (DejaDupBackend* self)
{
	DejaDupBackendClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = DEJA_DUP_BACKEND_GET_CLASS (self);
	if (_klass_->get_unique_location) {
		return _klass_->get_unique_location (self);
	}
	return NULL;
}

static gchar**
deja_dup_backend_real_get_dependencies (DejaDupBackend* self,
                                        gint* result_length1)
{
	gchar** _tmp0_;
	gchar** _tmp1_;
	gint _tmp1__length1;
	gchar** result;
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	_tmp1_ = _tmp0_;
	_tmp1__length1 = 0;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}

gchar**
deja_dup_backend_get_dependencies (DejaDupBackend* self,
                                   gint* result_length1)
{
	DejaDupBackendClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = DEJA_DUP_BACKEND_GET_CLASS (self);
	if (_klass_->get_dependencies) {
		return _klass_->get_dependencies (self, result_length1);
	}
	return NULL;
}

static gboolean
deja_dup_backend_real_needs_dependencies (DejaDupBackend* self)
{
	gboolean result;
	result = TRUE;
	return result;
}

gboolean
deja_dup_backend_needs_dependencies (DejaDupBackend* self)
{
	DejaDupBackendClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = DEJA_DUP_BACKEND_GET_CLASS (self);
	if (_klass_->needs_dependencies) {
		return _klass_->needs_dependencies (self);
	}
	return FALSE;
}

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

static void
deja_dup_backend_real_is_ready (DejaDupBackend* self,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_)
{
	DejaDupBackendIsReadyData* _data_;
	DejaDupBackend* _tmp0_;
	_data_ = g_slice_new0 (DejaDupBackendIsReadyData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_backend_real_is_ready_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	deja_dup_backend_real_is_ready_co (_data_);
}

static gboolean
deja_dup_backend_real_is_ready_finish (DejaDupBackend* self,
                                       GAsyncResult* _res_,
                                       gchar** reason,
                                       gchar** message)
{
	gboolean result;
	DejaDupBackendIsReadyData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (reason) {
		*reason = _data_->reason;
	} else {
		_g_free0 (_data_->reason);
	}
	_data_->reason = NULL;
	if (message) {
		*message = _data_->message;
	} else {
		_g_free0 (_data_->message);
	}
	_data_->message = NULL;
	result = _data_->result;
	return result;
}

static gboolean
deja_dup_backend_real_is_ready_co (DejaDupBackendIsReadyData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_g_free0 (_data_->reason);
	_data_->reason = NULL;
	_g_free0 (_data_->message);
	_data_->message = NULL;
	_data_->result = TRUE;
	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;
}

void
deja_dup_backend_is_ready (DejaDupBackend* self,
                           GAsyncReadyCallback _callback_,
                           gpointer _user_data_)
{
	DejaDupBackendClass* _klass_;
	_klass_ = DEJA_DUP_BACKEND_GET_CLASS (self);
	if (_klass_->is_ready) {
		_klass_->is_ready (self, _callback_, _user_data_);
	}
}

gboolean
deja_dup_backend_is_ready_finish (DejaDupBackend* self,
                                  GAsyncResult* _res_,
                                  gchar** reason,
                                  gchar** message)
{
	DejaDupBackendClass* _klass_;
	_klass_ = DEJA_DUP_BACKEND_GET_CLASS (self);
	if (_klass_->is_ready_finish) {
		return _klass_->is_ready_finish (self, _res_, reason, message);
	}
	return FALSE;
}

static gboolean
deja_dup_backend_real_is_acceptable (DejaDupBackend* self,
                                     gchar** reason)
{
	gchar* _vala_reason = NULL;
	gboolean result;
	_g_free0 (_vala_reason);
	_vala_reason = NULL;
	result = TRUE;
	if (reason) {
		*reason = _vala_reason;
	} else {
		_g_free0 (_vala_reason);
	}
	return result;
}

gboolean
deja_dup_backend_is_acceptable (DejaDupBackend* self,
                                gchar** reason)
{
	DejaDupBackendClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = DEJA_DUP_BACKEND_GET_CLASS (self);
	if (_klass_->is_acceptable) {
		return _klass_->is_acceptable (self, reason);
	}
	return FALSE;
}

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

static void
deja_dup_backend_real_prepare (DejaDupBackend* self,
                               GAsyncReadyCallback _callback_,
                               gpointer _user_data_)
{
	DejaDupBackendPrepareData* _data_;
	DejaDupBackend* _tmp0_;
	_data_ = g_slice_new0 (DejaDupBackendPrepareData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_backend_real_prepare_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	deja_dup_backend_real_prepare_co (_data_);
}

static void
deja_dup_backend_real_prepare_finish (DejaDupBackend* self,
                                      GAsyncResult* _res_,
                                      GError** error)
{
	DejaDupBackendPrepareData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static gboolean
deja_dup_backend_real_prepare_co (DejaDupBackendPrepareData* _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;
}

void
deja_dup_backend_prepare (DejaDupBackend* self,
                          GAsyncReadyCallback _callback_,
                          gpointer _user_data_)
{
	DejaDupBackendClass* _klass_;
	_klass_ = DEJA_DUP_BACKEND_GET_CLASS (self);
	if (_klass_->prepare) {
		_klass_->prepare (self, _callback_, _user_data_);
	}
}

void
deja_dup_backend_prepare_finish (DejaDupBackend* self,
                                 GAsyncResult* _res_,
                                 GError** error)
{
	DejaDupBackendClass* _klass_;
	_klass_ = DEJA_DUP_BACKEND_GET_CLASS (self);
	if (_klass_->prepare_finish) {
		_klass_->prepare_finish (self, _res_, error);
	}
}

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

static void
deja_dup_backend_real_cleanup (DejaDupBackend* self,
                               GAsyncReadyCallback _callback_,
                               gpointer _user_data_)
{
	DejaDupBackendCleanupData* _data_;
	DejaDupBackend* _tmp0_;
	_data_ = g_slice_new0 (DejaDupBackendCleanupData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_backend_real_cleanup_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	deja_dup_backend_real_cleanup_co (_data_);
}

static void
deja_dup_backend_real_cleanup_finish (DejaDupBackend* self,
                                      GAsyncResult* _res_)
{
	DejaDupBackendCleanupData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static gboolean
deja_dup_backend_real_cleanup_co (DejaDupBackendCleanupData* _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;
}

void
deja_dup_backend_cleanup (DejaDupBackend* self,
                          GAsyncReadyCallback _callback_,
                          gpointer _user_data_)
{
	DejaDupBackendClass* _klass_;
	_klass_ = DEJA_DUP_BACKEND_GET_CLASS (self);
	if (_klass_->cleanup) {
		_klass_->cleanup (self, _callback_, _user_data_);
	}
}

void
deja_dup_backend_cleanup_finish (DejaDupBackend* self,
                                 GAsyncResult* _res_)
{
	DejaDupBackendClass* _klass_;
	_klass_ = DEJA_DUP_BACKEND_GET_CLASS (self);
	if (_klass_->cleanup_finish) {
		_klass_->cleanup_finish (self, _res_);
	}
}

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

static inline void
_g_list_free__g_free0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_free0_);
}

static void
deja_dup_backend_real_peek_at_files_data_free (gpointer _data)
{
	DejaDupBackendPeekAtFilesData* _data_;
	_data_ = _data;
	(_data_->result == NULL) ? NULL : (_data_->result = (_g_list_free__g_free0_ (_data_->result), NULL));
	_g_object_unref0 (_data_->self);
	g_slice_free (DejaDupBackendPeekAtFilesData, _data_);
}

static void
deja_dup_backend_real_peek_at_files (DejaDupBackend* self,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_)
{
	DejaDupBackendPeekAtFilesData* _data_;
	DejaDupBackend* _tmp0_;
	_data_ = g_slice_new0 (DejaDupBackendPeekAtFilesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_backend_real_peek_at_files_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	deja_dup_backend_real_peek_at_files_co (_data_);
}

static GList*
deja_dup_backend_real_peek_at_files_finish (DejaDupBackend* self,
                                            GAsyncResult* _res_)
{
	GList* result;
	DejaDupBackendPeekAtFilesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static gboolean
deja_dup_backend_real_peek_at_files_co (DejaDupBackendPeekAtFilesData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->result = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

void
deja_dup_backend_peek_at_files (DejaDupBackend* self,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_)
{
	DejaDupBackendClass* _klass_;
	_klass_ = DEJA_DUP_BACKEND_GET_CLASS (self);
	if (_klass_->peek_at_files) {
		_klass_->peek_at_files (self, _callback_, _user_data_);
	}
}

GList*
deja_dup_backend_peek_at_files_finish (DejaDupBackend* self,
                                       GAsyncResult* _res_)
{
	DejaDupBackendClass* _klass_;
	_klass_ = DEJA_DUP_BACKEND_GET_CLASS (self);
	if (_klass_->peek_at_files_finish) {
		return _klass_->peek_at_files_finish (self, _res_);
	}
	return NULL;
}

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

static void
deja_dup_backend_real_get_space (DejaDupBackend* self,
                                 GAsyncReadyCallback _callback_,
                                 gpointer _user_data_)
{
	DejaDupBackendGetSpaceData* _data_;
	DejaDupBackend* _tmp0_;
	_data_ = g_slice_new0 (DejaDupBackendGetSpaceData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_backend_real_get_space_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	deja_dup_backend_real_get_space_co (_data_);
}

static void
deja_dup_backend_real_get_space_finish (DejaDupBackend* self,
                                        GAsyncResult* _res_,
                                        guint64* free,
                                        guint64* total)
{
	DejaDupBackendGetSpaceData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (free) {
		*free = _data_->free;
	}
	if (total) {
		*total = _data_->total;
	}
}

static gboolean
deja_dup_backend_real_get_space_co (DejaDupBackendGetSpaceData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->free = DEJA_DUP_BACKEND_INFINITE_SPACE;
	_data_->total = DEJA_DUP_BACKEND_INFINITE_SPACE;
	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;
}

void
deja_dup_backend_get_space (DejaDupBackend* self,
                            GAsyncReadyCallback _callback_,
                            gpointer _user_data_)
{
	DejaDupBackendClass* _klass_;
	_klass_ = DEJA_DUP_BACKEND_GET_CLASS (self);
	if (_klass_->get_space) {
		_klass_->get_space (self, _callback_, _user_data_);
	}
}

void
deja_dup_backend_get_space_finish (DejaDupBackend* self,
                                   GAsyncResult* _res_,
                                   guint64* free,
                                   guint64* total)
{
	DejaDupBackendClass* _klass_;
	_klass_ = DEJA_DUP_BACKEND_GET_CLASS (self);
	if (_klass_->get_space_finish) {
		_klass_->get_space_finish (self, _res_, free, total);
	}
}

static void
deja_dup_backend_real_add_excludes (DejaDupBackend* self,
                                    GList** excludes)
{
}

void
deja_dup_backend_add_excludes (DejaDupBackend* self,
                               GList** excludes)
{
	DejaDupBackendClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = DEJA_DUP_BACKEND_GET_CLASS (self);
	if (_klass_->add_excludes) {
		_klass_->add_excludes (self, excludes);
	}
}

DejaDupBackend*
deja_dup_backend_get_for_key (const gchar* key,
                              GSettings* settings)
{
	DejaDupBackend* result;
	g_return_val_if_fail (key != NULL, NULL);
	if (g_strcmp0 (key, "auto") == 0) {
		DejaDupBackendAuto* _tmp0_;
		_tmp0_ = deja_dup_backend_auto_new ();
		result = (DejaDupBackend*) _tmp0_;
		return result;
	} else {
		if (g_strcmp0 (key, "google") == 0) {
			DejaDupBackendGoogle* _tmp1_;
			_tmp1_ = deja_dup_backend_google_new (settings);
			result = (DejaDupBackend*) _tmp1_;
			return result;
		} else {
			if (g_strcmp0 (key, "microsoft") == 0) {
				DejaDupBackendMicrosoft* _tmp2_;
				_tmp2_ = deja_dup_backend_microsoft_new (settings);
				result = (DejaDupBackend*) _tmp2_;
				return result;
			} else {
				if (g_strcmp0 (key, "drive") == 0) {
					DejaDupBackendDrive* _tmp3_;
					_tmp3_ = deja_dup_backend_drive_new (settings);
					result = (DejaDupBackend*) _tmp3_;
					return result;
				} else {
					if (g_strcmp0 (key, "remote") == 0) {
						DejaDupBackendRemote* _tmp4_;
						_tmp4_ = deja_dup_backend_remote_new (settings);
						result = (DejaDupBackend*) _tmp4_;
						return result;
					} else {
						if (g_strcmp0 (key, "local") == 0) {
							DejaDupBackendLocal* _tmp5_;
							_tmp5_ = deja_dup_backend_local_new (settings);
							result = (DejaDupBackend*) _tmp5_;
							return result;
						} else {
							if (g_strcmp0 (key, "rclone") == 0) {
								DejaDupBackendRclone* _tmp6_;
								_tmp6_ = deja_dup_backend_rclone_new (settings);
								result = (DejaDupBackend*) _tmp6_;
								return result;
							} else {
								DejaDupBackendUnsupported* _tmp7_;
								_tmp7_ = deja_dup_backend_unsupported_new (key);
								result = (DejaDupBackend*) _tmp7_;
								return result;
							}
						}
					}
				}
			}
		}
	}
}

gchar*
deja_dup_backend_get_key_name (GSettings* settings)
{
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (settings != NULL, NULL);
	_tmp0_ = g_settings_get_string (settings, DEJA_DUP_BACKEND_KEY);
	result = _tmp0_;
	return result;
}

DejaDupBackend*
deja_dup_backend_get_default (void)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	DejaDupBackend* _tmp2_;
	DejaDupBackend* _tmp3_;
	DejaDupBackend* result;
	_tmp0_ = deja_dup_backend_get_default_key ();
	_tmp1_ = _tmp0_;
	_tmp2_ = deja_dup_backend_get_for_key (_tmp1_, NULL);
	_tmp3_ = _tmp2_;
	_g_free0 (_tmp1_);
	result = _tmp3_;
	return result;
}

gchar*
deja_dup_backend_get_default_key (void)
{
	DejaDupFilteredSettings* _tmp0_;
	DejaDupFilteredSettings* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* result;
	_tmp0_ = deja_dup_get_settings (NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = deja_dup_backend_get_key_name ((GSettings*) _tmp1_);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (_tmp1_);
	result = _tmp3_;
	return result;
}

DejaDupBackend*
deja_dup_backend_construct (GType object_type)
{
	DejaDupBackend * self = NULL;
	self = (DejaDupBackend*) g_object_new (object_type, NULL);
	return self;
}

DejaDupBackendKind
deja_dup_backend_get_kind (DejaDupBackend* self)
{
	DejaDupBackendKind result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_kind;
	return result;
}

static void
deja_dup_backend_set_kind (DejaDupBackend* self,
                           DejaDupBackendKind value)
{
	DejaDupBackendKind old_value;
	g_return_if_fail (self != NULL);
	old_value = deja_dup_backend_get_kind (self);
	if (old_value != value) {
		self->priv->_kind = value;
		g_object_notify_by_pspec ((GObject *) self, deja_dup_backend_properties[DEJA_DUP_BACKEND_KIND_PROPERTY]);
	}
}

GSettings*
deja_dup_backend_get_settings (DejaDupBackend* self)
{
	GSettings* result;
	GSettings* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_settings;
	result = _tmp0_;
	return result;
}

static void
deja_dup_backend_set_settings (DejaDupBackend* self,
                               GSettings* value)
{
	GSettings* old_value;
	g_return_if_fail (self != NULL);
	old_value = deja_dup_backend_get_settings (self);
	if (old_value != value) {
		GSettings* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_settings);
		self->priv->_settings = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, deja_dup_backend_properties[DEJA_DUP_BACKEND_SETTINGS_PROPERTY]);
	}
}

gboolean
deja_dup_backend_get_needs_backend_password (DejaDupBackend* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_needs_backend_password;
	return result;
}

void
deja_dup_backend_set_needs_backend_password (DejaDupBackend* self,
                                             gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = deja_dup_backend_get_needs_backend_password (self);
	if (old_value != value) {
		self->priv->_needs_backend_password = value;
		g_object_notify_by_pspec ((GObject *) self, deja_dup_backend_properties[DEJA_DUP_BACKEND_NEEDS_BACKEND_PASSWORD_PROPERTY]);
	}
}

GMountOperation*
deja_dup_backend_get_mount_op (DejaDupBackend* self)
{
	GMountOperation* result;
	GMountOperation* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_mount_op;
	result = _tmp0_;
	return result;
}

void
deja_dup_backend_set_mount_op (DejaDupBackend* self,
                               GMountOperation* value)
{
	GMountOperation* old_value;
	g_return_if_fail (self != NULL);
	old_value = deja_dup_backend_get_mount_op (self);
	if (old_value != value) {
		GMountOperation* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_mount_op);
		self->priv->_mount_op = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, deja_dup_backend_properties[DEJA_DUP_BACKEND_MOUNT_OP_PROPERTY]);
	}
}

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

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

static void
deja_dup_backend_class_init (DejaDupBackendClass * klass,
                             gpointer klass_data)
{
	deja_dup_backend_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DejaDupBackend_private_offset);
	((DejaDupBackendClass *) klass)->provide_backend_password = (void (*) (DejaDupBackend*, const gchar*, gboolean, GAsyncReadyCallback, gpointer)) deja_dup_backend_real_provide_backend_password;
	((DejaDupBackendClass *) klass)->provide_backend_password_finish = (void (*) (DejaDupBackend*, GAsyncResult*)) deja_dup_backend_real_provide_backend_password_finish;
	((DejaDupBackendClass *) klass)->is_native = (gboolean (*) (DejaDupBackend*)) deja_dup_backend_real_is_native;
	((DejaDupBackendClass *) klass)->get_icon = (GIcon* (*) (DejaDupBackend*)) deja_dup_backend_real_get_icon;
	((DejaDupBackendClass *) klass)->get_location_pretty = (gchar* (*) (DejaDupBackend*)) deja_dup_backend_real_get_location_pretty;
	((DejaDupBackendClass *) klass)->get_unique_location = (gchar* (*) (DejaDupBackend*)) deja_dup_backend_real_get_unique_location;
	((DejaDupBackendClass *) klass)->get_dependencies = (gchar** (*) (DejaDupBackend*, gint*)) deja_dup_backend_real_get_dependencies;
	((DejaDupBackendClass *) klass)->needs_dependencies = (gboolean (*) (DejaDupBackend*)) deja_dup_backend_real_needs_dependencies;
	((DejaDupBackendClass *) klass)->is_ready = (void (*) (DejaDupBackend*, GAsyncReadyCallback, gpointer)) deja_dup_backend_real_is_ready;
	((DejaDupBackendClass *) klass)->is_ready_finish = (gboolean (*) (DejaDupBackend*, GAsyncResult*, gchar**, gchar**)) deja_dup_backend_real_is_ready_finish;
	((DejaDupBackendClass *) klass)->is_acceptable = (gboolean (*) (DejaDupBackend*, gchar**)) deja_dup_backend_real_is_acceptable;
	((DejaDupBackendClass *) klass)->prepare = (void (*) (DejaDupBackend*, GAsyncReadyCallback, gpointer)) deja_dup_backend_real_prepare;
	((DejaDupBackendClass *) klass)->prepare_finish = (void (*) (DejaDupBackend*, GAsyncResult*, GError**)) deja_dup_backend_real_prepare_finish;
	((DejaDupBackendClass *) klass)->cleanup = (void (*) (DejaDupBackend*, GAsyncReadyCallback, gpointer)) deja_dup_backend_real_cleanup;
	((DejaDupBackendClass *) klass)->cleanup_finish = (void (*) (DejaDupBackend*, GAsyncResult*)) deja_dup_backend_real_cleanup_finish;
	((DejaDupBackendClass *) klass)->peek_at_files = (void (*) (DejaDupBackend*, GAsyncReadyCallback, gpointer)) deja_dup_backend_real_peek_at_files;
	((DejaDupBackendClass *) klass)->peek_at_files_finish = (GList* (*) (DejaDupBackend*, GAsyncResult*)) deja_dup_backend_real_peek_at_files_finish;
	((DejaDupBackendClass *) klass)->get_space = (void (*) (DejaDupBackend*, GAsyncReadyCallback, gpointer)) deja_dup_backend_real_get_space;
	((DejaDupBackendClass *) klass)->get_space_finish = (void (*) (DejaDupBackend*, GAsyncResult*, guint64*, guint64*)) deja_dup_backend_real_get_space_finish;
	((DejaDupBackendClass *) klass)->add_excludes = (void (*) (DejaDupBackend*, GList**)) deja_dup_backend_real_add_excludes;
	G_OBJECT_CLASS (klass)->get_property = _vala_deja_dup_backend_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_deja_dup_backend_set_property;
	G_OBJECT_CLASS (klass)->finalize = deja_dup_backend_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_BACKEND_KIND_PROPERTY, deja_dup_backend_properties[DEJA_DUP_BACKEND_KIND_PROPERTY] = g_param_spec_enum ("kind", "kind", "kind", DEJA_DUP_BACKEND_TYPE_KIND, DEJA_DUP_BACKEND_KIND_UNKNOWN, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_BACKEND_SETTINGS_PROPERTY, deja_dup_backend_properties[DEJA_DUP_BACKEND_SETTINGS_PROPERTY] = g_param_spec_object ("settings", "settings", "settings", g_settings_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_BACKEND_NEEDS_BACKEND_PASSWORD_PROPERTY, deja_dup_backend_properties[DEJA_DUP_BACKEND_NEEDS_BACKEND_PASSWORD_PROPERTY] = g_param_spec_boolean ("needs-backend-password", "needs-backend-password", "needs-backend-password", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_BACKEND_MOUNT_OP_PROPERTY, deja_dup_backend_properties[DEJA_DUP_BACKEND_MOUNT_OP_PROPERTY] = g_param_spec_object ("mount-op", "mount-op", "mount-op", g_mount_operation_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	deja_dup_backend_signals[DEJA_DUP_BACKEND_PAUSE_OP_SIGNAL] = g_signal_new ("pause-op", DEJA_DUP_TYPE_BACKEND, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);
	deja_dup_backend_signals[DEJA_DUP_BACKEND_SHOW_BACKEND_PASSWORD_PAGE_SIGNAL] = g_signal_new ("show-backend-password-page", DEJA_DUP_TYPE_BACKEND, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_STRING, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
	deja_dup_backend_signals[DEJA_DUP_BACKEND_SHOW_OAUTH_CONSENT_PAGE_SIGNAL] = g_signal_new ("show-oauth-consent-page", DEJA_DUP_TYPE_BACKEND, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_STRING, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
}

static void
deja_dup_backend_instance_init (DejaDupBackend * self,
                                gpointer klass)
{
	self->priv = deja_dup_backend_get_instance_private (self);
	self->priv->_kind = DEJA_DUP_BACKEND_KIND_UNKNOWN;
}

static void
deja_dup_backend_finalize (GObject * obj)
{
	DejaDupBackend * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DEJA_DUP_TYPE_BACKEND, DejaDupBackend);
	_g_object_unref0 (self->priv->_settings);
	_g_object_unref0 (self->priv->_mount_op);
	G_OBJECT_CLASS (deja_dup_backend_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
deja_dup_backend_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DejaDupBackendClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) deja_dup_backend_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DejaDupBackend), 0, (GInstanceInitFunc) deja_dup_backend_instance_init, NULL };
	GType deja_dup_backend_type_id;
	deja_dup_backend_type_id = g_type_register_static (G_TYPE_OBJECT, "DejaDupBackend", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	DejaDupBackend_private_offset = g_type_add_instance_private (deja_dup_backend_type_id, sizeof (DejaDupBackendPrivate));
	return deja_dup_backend_type_id;
}

GType
deja_dup_backend_get_type (void)
{
	static gsize deja_dup_backend_type_id__once = 0;
	if (g_once_init_enter (&deja_dup_backend_type_id__once)) {
		GType deja_dup_backend_type_id;
		deja_dup_backend_type_id = deja_dup_backend_get_type_once ();
		g_once_init_leave (&deja_dup_backend_type_id__once, deja_dup_backend_type_id);
	}
	return deja_dup_backend_type_id__once;
}

static void
_vala_deja_dup_backend_get_property (GObject * object,
                                     guint property_id,
                                     GValue * value,
                                     GParamSpec * pspec)
{
	DejaDupBackend * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DEJA_DUP_TYPE_BACKEND, DejaDupBackend);
	switch (property_id) {
		case DEJA_DUP_BACKEND_KIND_PROPERTY:
		g_value_set_enum (value, deja_dup_backend_get_kind (self));
		break;
		case DEJA_DUP_BACKEND_SETTINGS_PROPERTY:
		g_value_set_object (value, deja_dup_backend_get_settings (self));
		break;
		case DEJA_DUP_BACKEND_NEEDS_BACKEND_PASSWORD_PROPERTY:
		g_value_set_boolean (value, deja_dup_backend_get_needs_backend_password (self));
		break;
		case DEJA_DUP_BACKEND_MOUNT_OP_PROPERTY:
		g_value_set_object (value, deja_dup_backend_get_mount_op (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_deja_dup_backend_set_property (GObject * object,
                                     guint property_id,
                                     const GValue * value,
                                     GParamSpec * pspec)
{
	DejaDupBackend * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DEJA_DUP_TYPE_BACKEND, DejaDupBackend);
	switch (property_id) {
		case DEJA_DUP_BACKEND_KIND_PROPERTY:
		deja_dup_backend_set_kind (self, g_value_get_enum (value));
		break;
		case DEJA_DUP_BACKEND_SETTINGS_PROPERTY:
		deja_dup_backend_set_settings (self, g_value_get_object (value));
		break;
		case DEJA_DUP_BACKEND_NEEDS_BACKEND_PASSWORD_PROPERTY:
		deja_dup_backend_set_needs_backend_password (self, g_value_get_boolean (value));
		break;
		case DEJA_DUP_BACKEND_MOUNT_OP_PROPERTY:
		deja_dup_backend_set_mount_op (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

