/* ToolJob.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from ToolJob.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 "deja.h"
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <float.h>
#include <math.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

enum  {
	DEJA_DUP_SNAPSHOT_INFO_0_PROPERTY,
	DEJA_DUP_SNAPSHOT_INFO_NUM_PROPERTIES
};
static GParamSpec* deja_dup_snapshot_info_properties[DEJA_DUP_SNAPSHOT_INFO_NUM_PROPERTIES];
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	DEJA_DUP_TOOL_JOB_0_PROPERTY,
	DEJA_DUP_TOOL_JOB_MODE_PROPERTY,
	DEJA_DUP_TOOL_JOB_FLAGS_PROPERTY,
	DEJA_DUP_TOOL_JOB_LOCAL_PROPERTY,
	DEJA_DUP_TOOL_JOB_BACKEND_PROPERTY,
	DEJA_DUP_TOOL_JOB_ENCRYPT_PASSWORD_PROPERTY,
	DEJA_DUP_TOOL_JOB_TAG_PROPERTY,
	DEJA_DUP_TOOL_JOB_QUESTION_STATE_PROPERTY,
	DEJA_DUP_TOOL_JOB_RESTORE_FILES_PROPERTY,
	DEJA_DUP_TOOL_JOB_TREE_PROPERTY,
	DEJA_DUP_TOOL_JOB_NUM_PROPERTIES
};
static GParamSpec* deja_dup_tool_job_properties[DEJA_DUP_TOOL_JOB_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
enum  {
	DEJA_DUP_TOOL_JOB_DONE_SIGNAL,
	DEJA_DUP_TOOL_JOB_RAISE_ERROR_SIGNAL,
	DEJA_DUP_TOOL_JOB_ACTION_DESC_CHANGED_SIGNAL,
	DEJA_DUP_TOOL_JOB_ACTION_FILE_CHANGED_SIGNAL,
	DEJA_DUP_TOOL_JOB_PROGRESS_SIGNAL,
	DEJA_DUP_TOOL_JOB_IS_FULL_SIGNAL,
	DEJA_DUP_TOOL_JOB_LOCAL_FILE_ERROR_SIGNAL,
	DEJA_DUP_TOOL_JOB_BAD_ENCRYPTION_PASSWORD_SIGNAL,
	DEJA_DUP_TOOL_JOB_QUESTION_SIGNAL,
	DEJA_DUP_TOOL_JOB_COLLECTION_DATES_SIGNAL,
	DEJA_DUP_TOOL_JOB_LISTED_CURRENT_FILES_SIGNAL,
	DEJA_DUP_TOOL_JOB_NUM_SIGNALS
};
static guint deja_dup_tool_job_signals[DEJA_DUP_TOOL_JOB_NUM_SIGNALS] = {0};

struct _DejaDupToolJobPrivate {
	DejaDupToolJobMode _mode;
	DejaDupToolJobFlags _flags;
	GFile* _local;
	DejaDupBackend* _backend;
	gchar* _encrypt_password;
	gchar* _tag;
	GVariant* _question_state;
	DejaDupFileTree* _tree;
};

static gpointer deja_dup_snapshot_info_parent_class = NULL;
static gint DejaDupToolJob_private_offset;
static gpointer deja_dup_tool_job_parent_class = NULL;

static void deja_dup_snapshot_info_finalize (GObject * obj);
static GType deja_dup_snapshot_info_get_type_once (void);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void deja_dup_tool_job_real_stop (DejaDupToolJob* self);
static void deja_dup_tool_job_real_pause (DejaDupToolJob* self,
                                   const gchar* reason);
static void deja_dup_tool_job_real_resume (DejaDupToolJob* self);
static void g_cclosure_user_marshal_VOID__BOOLEAN_BOOLEAN (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 (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__OBJECT_BOOLEAN (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_STRING_BOOLEAN_VARIANT (GClosure * closure,
                                                                                GValue * return_value,
                                                                                guint n_param_values,
                                                                                const GValue * param_values,
                                                                                gpointer invocation_hint,
                                                                                gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__STRING_ENUM (GClosure * closure,
                                                GValue * return_value,
                                                guint n_param_values,
                                                const GValue * param_values,
                                                gpointer invocation_hint,
                                                gpointer marshal_data);
static void deja_dup_tool_job_finalize (GObject * obj);
static GType deja_dup_tool_job_get_type_once (void);
static void _vala_deja_dup_tool_job_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec);
static void _vala_deja_dup_tool_job_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec);

static gpointer
_g_date_time_ref0 (gpointer self)
{
	return self ? g_date_time_ref (self) : NULL;
}

DejaDupSnapshotInfo*
deja_dup_snapshot_info_construct (GType object_type,
                                  GDateTime* time,
                                  const gchar* tag)
{
	DejaDupSnapshotInfo * self = NULL;
	GDateTime* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (time != NULL, NULL);
	g_return_val_if_fail (tag != NULL, NULL);
	self = (DejaDupSnapshotInfo*) g_object_new (object_type, NULL);
	_tmp0_ = _g_date_time_ref0 (time);
	_g_date_time_unref0 (self->time);
	self->time = _tmp0_;
	_tmp1_ = g_strdup (tag);
	_g_free0 (self->tag);
	self->tag = _tmp1_;
	return self;
}

DejaDupSnapshotInfo*
deja_dup_snapshot_info_new (GDateTime* time,
                            const gchar* tag)
{
	return deja_dup_snapshot_info_construct (DEJA_DUP_TYPE_SNAPSHOT_INFO, time, tag);
}

static void
deja_dup_snapshot_info_class_init (DejaDupSnapshotInfoClass * klass,
                                   gpointer klass_data)
{
	deja_dup_snapshot_info_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = deja_dup_snapshot_info_finalize;
}

static void
deja_dup_snapshot_info_instance_init (DejaDupSnapshotInfo * self,
                                      gpointer klass)
{
}

static void
deja_dup_snapshot_info_finalize (GObject * obj)
{
	DejaDupSnapshotInfo * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DEJA_DUP_TYPE_SNAPSHOT_INFO, DejaDupSnapshotInfo);
	_g_date_time_unref0 (self->time);
	_g_free0 (self->tag);
	_g_free0 (self->external_description);
	G_OBJECT_CLASS (deja_dup_snapshot_info_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
deja_dup_snapshot_info_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DejaDupSnapshotInfoClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) deja_dup_snapshot_info_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DejaDupSnapshotInfo), 0, (GInstanceInitFunc) deja_dup_snapshot_info_instance_init, NULL };
	GType deja_dup_snapshot_info_type_id;
	deja_dup_snapshot_info_type_id = g_type_register_static (G_TYPE_OBJECT, "DejaDupSnapshotInfo", &g_define_type_info, 0);
	return deja_dup_snapshot_info_type_id;
}

GType
deja_dup_snapshot_info_get_type (void)
{
	static gsize deja_dup_snapshot_info_type_id__once = 0;
	if (g_once_init_enter (&deja_dup_snapshot_info_type_id__once)) {
		GType deja_dup_snapshot_info_type_id;
		deja_dup_snapshot_info_type_id = deja_dup_snapshot_info_get_type_once ();
		g_once_init_leave (&deja_dup_snapshot_info_type_id__once, deja_dup_snapshot_info_type_id);
	}
	return deja_dup_snapshot_info_type_id__once;
}

static inline gpointer
deja_dup_tool_job_get_instance_private (DejaDupToolJob* self)
{
	return G_STRUCT_MEMBER_P (self, DejaDupToolJob_private_offset);
}

 G_GNUC_NO_INLINE static GType
deja_dup_tool_job_mode_get_type_once (void)
{
	static const GEnumValue values[] = {{DEJA_DUP_TOOL_JOB_MODE_INVALID, "DEJA_DUP_TOOL_JOB_MODE_INVALID", "invalid"}, {DEJA_DUP_TOOL_JOB_MODE_BACKUP, "DEJA_DUP_TOOL_JOB_MODE_BACKUP", "backup"}, {DEJA_DUP_TOOL_JOB_MODE_RESTORE, "DEJA_DUP_TOOL_JOB_MODE_RESTORE", "restore"}, {DEJA_DUP_TOOL_JOB_MODE_LIST_SNAPSHOTS, "DEJA_DUP_TOOL_JOB_MODE_LIST_SNAPSHOTS", "list-snapshots"}, {DEJA_DUP_TOOL_JOB_MODE_LIST_FILES, "DEJA_DUP_TOOL_JOB_MODE_LIST_FILES", "list-files"}, {DEJA_DUP_TOOL_JOB_MODE_VERIFY_BASIC, "DEJA_DUP_TOOL_JOB_MODE_VERIFY_BASIC", "verify-basic"}, {DEJA_DUP_TOOL_JOB_MODE_VERIFY_CLEAN, "DEJA_DUP_TOOL_JOB_MODE_VERIFY_CLEAN", "verify-clean"}, {DEJA_DUP_TOOL_JOB_MODE_MOUNT, "DEJA_DUP_TOOL_JOB_MODE_MOUNT", "mount"}, {DEJA_DUP_TOOL_JOB_MODE_LAST_MODE, "DEJA_DUP_TOOL_JOB_MODE_LAST_MODE", "last-mode"}, {0, NULL, NULL}};
	GType deja_dup_tool_job_mode_type_id;
	deja_dup_tool_job_mode_type_id = g_enum_register_static ("DejaDupToolJobMode", values);
	return deja_dup_tool_job_mode_type_id;
}

GType
deja_dup_tool_job_mode_get_type (void)
{
	static gsize deja_dup_tool_job_mode_type_id__once = 0;
	if (g_once_init_enter (&deja_dup_tool_job_mode_type_id__once)) {
		GType deja_dup_tool_job_mode_type_id;
		deja_dup_tool_job_mode_type_id = deja_dup_tool_job_mode_get_type_once ();
		g_once_init_leave (&deja_dup_tool_job_mode_type_id__once, deja_dup_tool_job_mode_type_id);
	}
	return deja_dup_tool_job_mode_type_id__once;
}

 G_GNUC_NO_INLINE static GType
deja_dup_tool_job_flags_get_type_once (void)
{
	static const GEnumValue values[] = {{DEJA_DUP_TOOL_JOB_FLAGS_NO_PROGRESS, "DEJA_DUP_TOOL_JOB_FLAGS_NO_PROGRESS", "no-progress"}, {0, NULL, NULL}};
	GType deja_dup_tool_job_flags_type_id;
	deja_dup_tool_job_flags_type_id = g_enum_register_static ("DejaDupToolJobFlags", values);
	return deja_dup_tool_job_flags_type_id;
}

GType
deja_dup_tool_job_flags_get_type (void)
{
	static gsize deja_dup_tool_job_flags_type_id__once = 0;
	if (g_once_init_enter (&deja_dup_tool_job_flags_type_id__once)) {
		GType deja_dup_tool_job_flags_type_id;
		deja_dup_tool_job_flags_type_id = deja_dup_tool_job_flags_get_type_once ();
		g_once_init_leave (&deja_dup_tool_job_flags_type_id__once, deja_dup_tool_job_flags_type_id);
	}
	return deja_dup_tool_job_flags_type_id__once;
}

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

static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

void
deja_dup_tool_job_start (DejaDupToolJob* self,
                         GAsyncReadyCallback _callback_,
                         gpointer _user_data_)
{
	DejaDupToolJobClass* _klass_;
	_klass_ = DEJA_DUP_TOOL_JOB_GET_CLASS (self);
	if (_klass_->start) {
		_klass_->start (self, _callback_, _user_data_);
	}
}

void
deja_dup_tool_job_start_finish (DejaDupToolJob* self,
                                GAsyncResult* _res_)
{
	DejaDupToolJobClass* _klass_;
	_klass_ = DEJA_DUP_TOOL_JOB_GET_CLASS (self);
	if (_klass_->start_finish) {
		_klass_->start_finish (self, _res_);
	}
}

static void
deja_dup_tool_job_real_stop (DejaDupToolJob* self)
{
	g_critical ("Type `%s' does not implement abstract method `deja_dup_tool_job_stop'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
deja_dup_tool_job_stop (DejaDupToolJob* self)
{
	DejaDupToolJobClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = DEJA_DUP_TOOL_JOB_GET_CLASS (self);
	if (_klass_->stop) {
		_klass_->stop (self);
	}
}

static void
deja_dup_tool_job_real_pause (DejaDupToolJob* self,
                              const gchar* reason)
{
	g_critical ("Type `%s' does not implement abstract method `deja_dup_tool_job_pause'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
deja_dup_tool_job_pause (DejaDupToolJob* self,
                         const gchar* reason)
{
	DejaDupToolJobClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = DEJA_DUP_TOOL_JOB_GET_CLASS (self);
	if (_klass_->pause) {
		_klass_->pause (self, reason);
	}
}

static void
deja_dup_tool_job_real_resume (DejaDupToolJob* self)
{
	g_critical ("Type `%s' does not implement abstract method `deja_dup_tool_job_resume'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
deja_dup_tool_job_resume (DejaDupToolJob* self)
{
	DejaDupToolJobClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = DEJA_DUP_TOOL_JOB_GET_CLASS (self);
	if (_klass_->resume) {
		_klass_->resume (self);
	}
}

DejaDupToolJob*
deja_dup_tool_job_construct (GType object_type)
{
	DejaDupToolJob * self = NULL;
	self = (DejaDupToolJob*) g_object_new (object_type, NULL);
	return self;
}

DejaDupToolJobMode
deja_dup_tool_job_get_mode (DejaDupToolJob* self)
{
	DejaDupToolJobMode result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_mode;
	return result;
}

void
deja_dup_tool_job_set_mode (DejaDupToolJob* self,
                            DejaDupToolJobMode value)
{
	DejaDupToolJobMode old_value;
	g_return_if_fail (self != NULL);
	old_value = deja_dup_tool_job_get_mode (self);
	if (old_value != value) {
		self->priv->_mode = value;
		g_object_notify_by_pspec ((GObject *) self, deja_dup_tool_job_properties[DEJA_DUP_TOOL_JOB_MODE_PROPERTY]);
	}
}

DejaDupToolJobFlags
deja_dup_tool_job_get_flags (DejaDupToolJob* self)
{
	DejaDupToolJobFlags result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_flags;
	return result;
}

void
deja_dup_tool_job_set_flags (DejaDupToolJob* self,
                             DejaDupToolJobFlags value)
{
	DejaDupToolJobFlags old_value;
	g_return_if_fail (self != NULL);
	old_value = deja_dup_tool_job_get_flags (self);
	if (old_value != value) {
		self->priv->_flags = value;
		g_object_notify_by_pspec ((GObject *) self, deja_dup_tool_job_properties[DEJA_DUP_TOOL_JOB_FLAGS_PROPERTY]);
	}
}

GFile*
deja_dup_tool_job_get_local (DejaDupToolJob* self)
{
	GFile* result;
	GFile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_local;
	result = _tmp0_;
	return result;
}

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

void
deja_dup_tool_job_set_local (DejaDupToolJob* self,
                             GFile* value)
{
	GFile* old_value;
	g_return_if_fail (self != NULL);
	old_value = deja_dup_tool_job_get_local (self);
	if (old_value != value) {
		GFile* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_local);
		self->priv->_local = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, deja_dup_tool_job_properties[DEJA_DUP_TOOL_JOB_LOCAL_PROPERTY]);
	}
}

DejaDupBackend*
deja_dup_tool_job_get_backend (DejaDupToolJob* self)
{
	DejaDupBackend* result;
	DejaDupBackend* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_backend;
	result = _tmp0_;
	return result;
}

void
deja_dup_tool_job_set_backend (DejaDupToolJob* self,
                               DejaDupBackend* value)
{
	DejaDupBackend* old_value;
	g_return_if_fail (self != NULL);
	old_value = deja_dup_tool_job_get_backend (self);
	if (old_value != value) {
		DejaDupBackend* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_backend);
		self->priv->_backend = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, deja_dup_tool_job_properties[DEJA_DUP_TOOL_JOB_BACKEND_PROPERTY]);
	}
}

const gchar*
deja_dup_tool_job_get_encrypt_password (DejaDupToolJob* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_encrypt_password;
	result = _tmp0_;
	return result;
}

void
deja_dup_tool_job_set_encrypt_password (DejaDupToolJob* self,
                                        const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = deja_dup_tool_job_get_encrypt_password (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_encrypt_password);
		self->priv->_encrypt_password = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, deja_dup_tool_job_properties[DEJA_DUP_TOOL_JOB_ENCRYPT_PASSWORD_PROPERTY]);
	}
}

const gchar*
deja_dup_tool_job_get_tag (DejaDupToolJob* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tag;
	result = _tmp0_;
	return result;
}

void
deja_dup_tool_job_set_tag (DejaDupToolJob* self,
                           const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = deja_dup_tool_job_get_tag (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_tag);
		self->priv->_tag = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, deja_dup_tool_job_properties[DEJA_DUP_TOOL_JOB_TAG_PROPERTY]);
	}
}

GVariant*
deja_dup_tool_job_get_question_state (DejaDupToolJob* self)
{
	GVariant* result;
	GVariant* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_question_state;
	result = _tmp0_;
	return result;
}

static gpointer
_g_variant_ref0 (gpointer self)
{
	return self ? g_variant_ref (self) : NULL;
}

void
deja_dup_tool_job_set_question_state (DejaDupToolJob* self,
                                      GVariant* value)
{
	GVariant* old_value;
	g_return_if_fail (self != NULL);
	old_value = deja_dup_tool_job_get_question_state (self);
	if (old_value != value) {
		GVariant* _tmp0_;
		_tmp0_ = _g_variant_ref0 (value);
		_g_variant_unref0 (self->priv->_question_state);
		self->priv->_question_state = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, deja_dup_tool_job_properties[DEJA_DUP_TOOL_JOB_QUESTION_STATE_PROPERTY]);
	}
}

GList*
deja_dup_tool_job_get_restore_files (DejaDupToolJob* self)
{
	GList* result;
	GList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->_restore_files;
	result = _tmp0_;
	return result;
}

void
deja_dup_tool_job_set_restore_files (DejaDupToolJob* self,
                                     GList* value)
{
	GList* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_list_copy_deep (value, (GCopyFunc) g_object_ref, NULL);
	(self->_restore_files == NULL) ? NULL : (self->_restore_files = (_g_list_free__g_object_unref0_ (self->_restore_files), NULL));
	self->_restore_files = _tmp0_;
	g_object_notify_by_pspec ((GObject *) self, deja_dup_tool_job_properties[DEJA_DUP_TOOL_JOB_RESTORE_FILES_PROPERTY]);
}

DejaDupFileTree*
deja_dup_tool_job_get_tree (DejaDupToolJob* self)
{
	DejaDupFileTree* result;
	DejaDupFileTree* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tree;
	result = _tmp0_;
	return result;
}

void
deja_dup_tool_job_set_tree (DejaDupToolJob* self,
                            DejaDupFileTree* value)
{
	DejaDupFileTree* old_value;
	g_return_if_fail (self != NULL);
	old_value = deja_dup_tool_job_get_tree (self);
	if (old_value != value) {
		DejaDupFileTree* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_tree);
		self->priv->_tree = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, deja_dup_tool_job_properties[DEJA_DUP_TOOL_JOB_TREE_PROPERTY]);
	}
}

static void
g_cclosure_user_marshal_VOID__BOOLEAN_BOOLEAN (GClosure * closure,
                                               GValue * return_value,
                                               guint n_param_values,
                                               const GValue * param_values,
                                               gpointer invocation_hint,
                                               gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__BOOLEAN_BOOLEAN) (gpointer data1, gboolean arg_1, gboolean arg_2, gpointer data2);
	register GMarshalFunc_VOID__BOOLEAN_BOOLEAN 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__BOOLEAN_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_boolean (param_values + 1), g_value_get_boolean (param_values + 2), data2);
}

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__OBJECT_BOOLEAN (GClosure * closure,
                                              GValue * return_value,
                                              guint n_param_values,
                                              const GValue * param_values,
                                              gpointer invocation_hint,
                                              gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_BOOLEAN) (gpointer data1, gpointer arg_1, gboolean arg_2, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_BOOLEAN 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__OBJECT_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), g_value_get_boolean (param_values + 2), data2);
}

static void
g_cclosure_user_marshal_VOID__STRING_STRING_STRING_STRING_BOOLEAN_VARIANT (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_STRING_BOOLEAN_VARIANT) (gpointer data1, const char* arg_1, const char* arg_2, const char* arg_3, const char* arg_4, gboolean arg_5, gpointer arg_6, gpointer data2);
	register GMarshalFunc_VOID__STRING_STRING_STRING_STRING_BOOLEAN_VARIANT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 7);
	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_STRING_BOOLEAN_VARIANT) (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), g_value_get_string (param_values + 4), g_value_get_boolean (param_values + 5), g_value_get_variant (param_values + 6), data2);
}

static void
g_cclosure_user_marshal_VOID__STRING_ENUM (GClosure * closure,
                                           GValue * return_value,
                                           guint n_param_values,
                                           const GValue * param_values,
                                           gpointer invocation_hint,
                                           gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__STRING_ENUM) (gpointer data1, const char* arg_1, gint arg_2, gpointer data2);
	register GMarshalFunc_VOID__STRING_ENUM 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_ENUM) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_enum (param_values + 2), data2);
}

static void
deja_dup_tool_job_class_init (DejaDupToolJobClass * klass,
                              gpointer klass_data)
{
	deja_dup_tool_job_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DejaDupToolJob_private_offset);
	((DejaDupToolJobClass *) klass)->stop = (void (*) (DejaDupToolJob*)) deja_dup_tool_job_real_stop;
	((DejaDupToolJobClass *) klass)->pause = (void (*) (DejaDupToolJob*, const gchar*)) deja_dup_tool_job_real_pause;
	((DejaDupToolJobClass *) klass)->resume = (void (*) (DejaDupToolJob*)) deja_dup_tool_job_real_resume;
	G_OBJECT_CLASS (klass)->get_property = _vala_deja_dup_tool_job_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_deja_dup_tool_job_set_property;
	G_OBJECT_CLASS (klass)->finalize = deja_dup_tool_job_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_TOOL_JOB_MODE_PROPERTY, deja_dup_tool_job_properties[DEJA_DUP_TOOL_JOB_MODE_PROPERTY] = g_param_spec_enum ("mode", "mode", "mode", DEJA_DUP_TOOL_JOB_TYPE_MODE, DEJA_DUP_TOOL_JOB_MODE_INVALID, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_TOOL_JOB_FLAGS_PROPERTY, deja_dup_tool_job_properties[DEJA_DUP_TOOL_JOB_FLAGS_PROPERTY] = g_param_spec_enum ("flags", "flags", "flags", DEJA_DUP_TOOL_JOB_TYPE_FLAGS, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_TOOL_JOB_LOCAL_PROPERTY, deja_dup_tool_job_properties[DEJA_DUP_TOOL_JOB_LOCAL_PROPERTY] = g_param_spec_object ("local", "local", "local", g_file_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_TOOL_JOB_BACKEND_PROPERTY, deja_dup_tool_job_properties[DEJA_DUP_TOOL_JOB_BACKEND_PROPERTY] = g_param_spec_object ("backend", "backend", "backend", DEJA_DUP_TYPE_BACKEND, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_TOOL_JOB_ENCRYPT_PASSWORD_PROPERTY, deja_dup_tool_job_properties[DEJA_DUP_TOOL_JOB_ENCRYPT_PASSWORD_PROPERTY] = g_param_spec_string ("encrypt-password", "encrypt-password", "encrypt-password", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_TOOL_JOB_TAG_PROPERTY, deja_dup_tool_job_properties[DEJA_DUP_TOOL_JOB_TAG_PROPERTY] = g_param_spec_string ("tag", "tag", "tag", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_TOOL_JOB_QUESTION_STATE_PROPERTY, deja_dup_tool_job_properties[DEJA_DUP_TOOL_JOB_QUESTION_STATE_PROPERTY] = g_param_spec_variant ("question-state", "question-state", "question-state", G_VARIANT_TYPE_ANY, NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_TOOL_JOB_RESTORE_FILES_PROPERTY, deja_dup_tool_job_properties[DEJA_DUP_TOOL_JOB_RESTORE_FILES_PROPERTY] = g_param_spec_pointer ("restore-files", "restore-files", "restore-files", G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_TOOL_JOB_TREE_PROPERTY, deja_dup_tool_job_properties[DEJA_DUP_TOOL_JOB_TREE_PROPERTY] = g_param_spec_object ("tree", "tree", "tree", DEJA_DUP_TYPE_FILE_TREE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	deja_dup_tool_job_signals[DEJA_DUP_TOOL_JOB_DONE_SIGNAL] = g_signal_new ("done", DEJA_DUP_TYPE_TOOL_JOB, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__BOOLEAN_BOOLEAN, G_TYPE_NONE, 2, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);
	deja_dup_tool_job_signals[DEJA_DUP_TOOL_JOB_RAISE_ERROR_SIGNAL] = g_signal_new ("raise-error", DEJA_DUP_TYPE_TOOL_JOB, 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_tool_job_signals[DEJA_DUP_TOOL_JOB_ACTION_DESC_CHANGED_SIGNAL] = g_signal_new ("action-desc-changed", DEJA_DUP_TYPE_TOOL_JOB, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	deja_dup_tool_job_signals[DEJA_DUP_TOOL_JOB_ACTION_FILE_CHANGED_SIGNAL] = g_signal_new ("action-file-changed", DEJA_DUP_TYPE_TOOL_JOB, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2, g_file_get_type (), G_TYPE_BOOLEAN);
	deja_dup_tool_job_signals[DEJA_DUP_TOOL_JOB_PROGRESS_SIGNAL] = g_signal_new ("progress", DEJA_DUP_TYPE_TOOL_JOB, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__DOUBLE, G_TYPE_NONE, 1, G_TYPE_DOUBLE);
	deja_dup_tool_job_signals[DEJA_DUP_TOOL_JOB_IS_FULL_SIGNAL] = g_signal_new ("is-full", DEJA_DUP_TYPE_TOOL_JOB, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
	deja_dup_tool_job_signals[DEJA_DUP_TOOL_JOB_LOCAL_FILE_ERROR_SIGNAL] = g_signal_new ("local-file-error", DEJA_DUP_TYPE_TOOL_JOB, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	deja_dup_tool_job_signals[DEJA_DUP_TOOL_JOB_BAD_ENCRYPTION_PASSWORD_SIGNAL] = g_signal_new ("bad-encryption-password", DEJA_DUP_TYPE_TOOL_JOB, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	deja_dup_tool_job_signals[DEJA_DUP_TOOL_JOB_QUESTION_SIGNAL] = g_signal_new ("question", DEJA_DUP_TYPE_TOOL_JOB, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_STRING_STRING_BOOLEAN_VARIANT, G_TYPE_NONE, 6, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_VARIANT);
	deja_dup_tool_job_signals[DEJA_DUP_TOOL_JOB_COLLECTION_DATES_SIGNAL] = g_signal_new ("collection-dates", DEJA_DUP_TYPE_TOOL_JOB, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER);
	deja_dup_tool_job_signals[DEJA_DUP_TOOL_JOB_LISTED_CURRENT_FILES_SIGNAL] = g_signal_new ("listed-current-files", DEJA_DUP_TYPE_TOOL_JOB, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_ENUM, G_TYPE_NONE, 2, G_TYPE_STRING, g_file_type_get_type ());
}

static void
deja_dup_tool_job_instance_init (DejaDupToolJob * self,
                                 gpointer klass)
{
	self->priv = deja_dup_tool_job_get_instance_private (self);
	self->priv->_mode = DEJA_DUP_TOOL_JOB_MODE_INVALID;
}

static void
deja_dup_tool_job_finalize (GObject * obj)
{
	DejaDupToolJob * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DEJA_DUP_TYPE_TOOL_JOB, DejaDupToolJob);
	_g_object_unref0 (self->priv->_local);
	_g_object_unref0 (self->priv->_backend);
	_g_free0 (self->priv->_encrypt_password);
	_g_free0 (self->priv->_tag);
	_g_variant_unref0 (self->priv->_question_state);
	(self->includes == NULL) ? NULL : (self->includes = (_g_list_free__g_object_unref0_ (self->includes), NULL));
	(self->excludes == NULL) ? NULL : (self->excludes = (_g_list_free__g_object_unref0_ (self->excludes), NULL));
	(self->exclude_regexps == NULL) ? NULL : (self->exclude_regexps = (_g_list_free__g_object_unref0_ (self->exclude_regexps), NULL));
	(self->_restore_files == NULL) ? NULL : (self->_restore_files = (_g_list_free__g_object_unref0_ (self->_restore_files), NULL));
	_g_object_unref0 (self->priv->_tree);
	G_OBJECT_CLASS (deja_dup_tool_job_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
deja_dup_tool_job_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DejaDupToolJobClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) deja_dup_tool_job_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DejaDupToolJob), 0, (GInstanceInitFunc) deja_dup_tool_job_instance_init, NULL };
	GType deja_dup_tool_job_type_id;
	deja_dup_tool_job_type_id = g_type_register_static (G_TYPE_OBJECT, "DejaDupToolJob", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	DejaDupToolJob_private_offset = g_type_add_instance_private (deja_dup_tool_job_type_id, sizeof (DejaDupToolJobPrivate));
	return deja_dup_tool_job_type_id;
}

GType
deja_dup_tool_job_get_type (void)
{
	static gsize deja_dup_tool_job_type_id__once = 0;
	if (g_once_init_enter (&deja_dup_tool_job_type_id__once)) {
		GType deja_dup_tool_job_type_id;
		deja_dup_tool_job_type_id = deja_dup_tool_job_get_type_once ();
		g_once_init_leave (&deja_dup_tool_job_type_id__once, deja_dup_tool_job_type_id);
	}
	return deja_dup_tool_job_type_id__once;
}

static void
_vala_deja_dup_tool_job_get_property (GObject * object,
                                      guint property_id,
                                      GValue * value,
                                      GParamSpec * pspec)
{
	DejaDupToolJob * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DEJA_DUP_TYPE_TOOL_JOB, DejaDupToolJob);
	switch (property_id) {
		case DEJA_DUP_TOOL_JOB_MODE_PROPERTY:
		g_value_set_enum (value, deja_dup_tool_job_get_mode (self));
		break;
		case DEJA_DUP_TOOL_JOB_FLAGS_PROPERTY:
		g_value_set_enum (value, deja_dup_tool_job_get_flags (self));
		break;
		case DEJA_DUP_TOOL_JOB_LOCAL_PROPERTY:
		g_value_set_object (value, deja_dup_tool_job_get_local (self));
		break;
		case DEJA_DUP_TOOL_JOB_BACKEND_PROPERTY:
		g_value_set_object (value, deja_dup_tool_job_get_backend (self));
		break;
		case DEJA_DUP_TOOL_JOB_ENCRYPT_PASSWORD_PROPERTY:
		g_value_set_string (value, deja_dup_tool_job_get_encrypt_password (self));
		break;
		case DEJA_DUP_TOOL_JOB_TAG_PROPERTY:
		g_value_set_string (value, deja_dup_tool_job_get_tag (self));
		break;
		case DEJA_DUP_TOOL_JOB_QUESTION_STATE_PROPERTY:
		g_value_set_variant (value, deja_dup_tool_job_get_question_state (self));
		break;
		case DEJA_DUP_TOOL_JOB_RESTORE_FILES_PROPERTY:
		g_value_set_pointer (value, deja_dup_tool_job_get_restore_files (self));
		break;
		case DEJA_DUP_TOOL_JOB_TREE_PROPERTY:
		g_value_set_object (value, deja_dup_tool_job_get_tree (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_deja_dup_tool_job_set_property (GObject * object,
                                      guint property_id,
                                      const GValue * value,
                                      GParamSpec * pspec)
{
	DejaDupToolJob * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DEJA_DUP_TYPE_TOOL_JOB, DejaDupToolJob);
	switch (property_id) {
		case DEJA_DUP_TOOL_JOB_MODE_PROPERTY:
		deja_dup_tool_job_set_mode (self, g_value_get_enum (value));
		break;
		case DEJA_DUP_TOOL_JOB_FLAGS_PROPERTY:
		deja_dup_tool_job_set_flags (self, g_value_get_enum (value));
		break;
		case DEJA_DUP_TOOL_JOB_LOCAL_PROPERTY:
		deja_dup_tool_job_set_local (self, g_value_get_object (value));
		break;
		case DEJA_DUP_TOOL_JOB_BACKEND_PROPERTY:
		deja_dup_tool_job_set_backend (self, g_value_get_object (value));
		break;
		case DEJA_DUP_TOOL_JOB_ENCRYPT_PASSWORD_PROPERTY:
		deja_dup_tool_job_set_encrypt_password (self, g_value_get_string (value));
		break;
		case DEJA_DUP_TOOL_JOB_TAG_PROPERTY:
		deja_dup_tool_job_set_tag (self, g_value_get_string (value));
		break;
		case DEJA_DUP_TOOL_JOB_QUESTION_STATE_PROPERTY:
		deja_dup_tool_job_set_question_state (self, g_value_get_variant (value));
		break;
		case DEJA_DUP_TOOL_JOB_RESTORE_FILES_PROPERTY:
		deja_dup_tool_job_set_restore_files (self, g_value_get_pointer (value));
		break;
		case DEJA_DUP_TOOL_JOB_TREE_PROPERTY:
		deja_dup_tool_job_set_tree (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

