/* OperationBackup.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from OperationBackup.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.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <glib-object.h>
#include <glib/gi18n-lib.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_OPERATION_BACKUP_0_PROPERTY,
	DEJA_DUP_OPERATION_BACKUP_AUTOMATIC_PROPERTY,
	DEJA_DUP_OPERATION_BACKUP_NUM_PROPERTIES
};
static GParamSpec* deja_dup_operation_backup_properties[DEJA_DUP_OPERATION_BACKUP_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _DejaDupOperationBackupStartData DejaDupOperationBackupStartData;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _DejaDupOperationBackupOperationFinishedData DejaDupOperationBackupOperationFinishedData;
typedef struct _DejaDupOperationBackupGetUnavailableIncludesData DejaDupOperationBackupGetUnavailableIncludesData;
typedef struct _DejaDupOperationBackupPrepareData DejaDupOperationBackupPrepareData;

struct _DejaDupOperationBackupPrivate {
	gboolean _automatic;
};

struct _DejaDupOperationBackupStartData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupOperationBackup* self;
};

struct _DejaDupOperationBackupOperationFinishedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupOperationBackup* self;
	gboolean success;
	gboolean cancelled;
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	DejaDupOperation* _tmp3_;
	DejaDupOperationVerify* verify;
	DejaDupBackend* _tmp4_;
	DejaDupBackend* _tmp5_;
	DejaDupToolJob* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	DejaDupOperationVerify* _tmp9_;
	DejaDupOperationVerify* _tmp10_;
};

struct _DejaDupOperationBackupGetUnavailableIncludesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupOperationBackup* self;
	gchar** result;
	gint result_length1;
	gchar** unavailable;
	gchar** _tmp0_;
	gint unavailable_length1;
	gint _unavailable_size_;
	DejaDupInstallEnv* install_env;
	DejaDupInstallEnv* _tmp1_;
	DejaDupFilteredSettings* settings;
	DejaDupFilteredSettings* _tmp2_;
	GFile** include_list;
	DejaDupFilteredSettings* _tmp3_;
	gint _tmp4_;
	GFile** _tmp5_;
	gint include_list_length1;
	gint _include_list_size_;
	GFile** _tmp6_;
	gint _tmp6__length1;
	GFile** include_collection;
	gint include_collection_length1;
	gint _include_collection_size_;
	gint include_it;
	GFile* _tmp7_;
	GFile* include;
	DejaDupInstallEnv* _tmp8_;
	GFile* _tmp9_;
	GFile* _tmp10_;
	gchar* _tmp11_;
	gchar** _tmp12_;
	gint _tmp12__length1;
};

struct _DejaDupOperationBackupPrepareData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupOperationBackup* self;
	gboolean result;
	gchar** unavailable;
	gint _tmp0_;
	gchar** _tmp1_;
	gint unavailable_length1;
	gint _unavailable_size_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	gchar* msg;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar** _tmp5_;
	gint _tmp5__length1;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	const gchar* _tmp11_;
};

static gint DejaDupOperationBackup_private_offset;
static gpointer deja_dup_operation_backup_parent_class = NULL;

VALA_EXTERN void deja_dup_operation_operation_finished (DejaDupOperation* self,
                                            gboolean success,
                                            gboolean cancelled,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
VALA_EXTERN void deja_dup_operation_operation_finished_finish (DejaDupOperation* self,
                                                   GAsyncResult* _res_);
static void deja_dup_operation_backup_real_start_data_free (gpointer _data);
static void deja_dup_operation_backup_real_start (DejaDupOperation* base,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_);
static gboolean deja_dup_operation_backup_real_start_co (DejaDupOperationBackupStartData* _data_);
static void deja_dup_operation_backup_start_ready (GObject* source_object,
                                            GAsyncResult* _res_,
                                            gpointer _user_data_);
static gchar* deja_dup_operation_backup_real_get_success_detail (DejaDupOperation* base);
static void deja_dup_operation_backup_real_operation_finished_data_free (gpointer _data);
static void deja_dup_operation_backup_real_operation_finished (DejaDupOperation* base,
                                                        gboolean success,
                                                        gboolean cancelled,
                                                        GAsyncReadyCallback _callback_,
                                                        gpointer _user_data_);
static gboolean deja_dup_operation_backup_real_operation_finished_co (DejaDupOperationBackupOperationFinishedData* _data_);
static void deja_dup_operation_backup_operation_finished_ready (GObject* source_object,
                                                         GAsyncResult* _res_,
                                                         gpointer _user_data_);
static void deja_dup_operation_backup_get_unavailable_includes_data_free (gpointer _data);
static void deja_dup_operation_backup_get_unavailable_includes (DejaDupOperationBackup* self,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
static gchar** deja_dup_operation_backup_get_unavailable_includes_finish (DejaDupOperationBackup* self,
                                                                   GAsyncResult* _res_,
                                                                   gint* result_length1);
static gboolean deja_dup_operation_backup_get_unavailable_includes_co (DejaDupOperationBackupGetUnavailableIncludesData* _data_);
static void deja_dup_operation_backup_get_unavailable_includes_ready (GObject* source_object,
                                                               GAsyncResult* _res_,
                                                               gpointer _user_data_);
static void _vala_array_add14 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void deja_dup_operation_backup_real_prepare_data_free (gpointer _data);
static void deja_dup_operation_backup_real_prepare (DejaDupOperation* base,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
static gboolean deja_dup_operation_backup_real_prepare_co (DejaDupOperationBackupPrepareData* _data_);
static void deja_dup_operation_backup_prepare_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_);
static GList* deja_dup_operation_backup_real_make_argv (DejaDupOperation* base);
static void deja_dup_operation_backup_add_always_excluded_dirs (DejaDupOperationBackup* self,
                                                         GList** files,
                                                         GList** regexps);
static void deja_dup_operation_backup_finalize (GObject * obj);
static GType deja_dup_operation_backup_get_type_once (void);
static void _vala_deja_dup_operation_backup_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec);
static void _vala_deja_dup_operation_backup_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
deja_dup_operation_backup_get_instance_private (DejaDupOperationBackup* self)
{
	return G_STRUCT_MEMBER_P (self, DejaDupOperationBackup_private_offset);
}

DejaDupOperationBackup*
deja_dup_operation_backup_construct (GType object_type,
                                     DejaDupBackend* backend,
                                     gboolean automatic)
{
	DejaDupOperationBackup * self = NULL;
	g_return_val_if_fail (backend != NULL, NULL);
	self = (DejaDupOperationBackup*) g_object_new (object_type, "mode", DEJA_DUP_TOOL_JOB_MODE_BACKUP, "backend", backend, "automatic", automatic, NULL);
	return self;
}

DejaDupOperationBackup*
deja_dup_operation_backup_new (DejaDupBackend* backend,
                               gboolean automatic)
{
	return deja_dup_operation_backup_construct (DEJA_DUP_TYPE_OPERATION_BACKUP, backend, automatic);
}

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

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

static void
deja_dup_operation_backup_real_start (DejaDupOperation* base,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_)
{
	DejaDupOperationBackup * self;
	DejaDupOperationBackupStartData* _data_;
	DejaDupOperationBackup* _tmp0_;
	self = (DejaDupOperationBackup*) base;
	_data_ = g_slice_new0 (DejaDupOperationBackupStartData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_operation_backup_real_start_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	deja_dup_operation_backup_real_start_co (_data_);
}

static void
deja_dup_operation_backup_start_finish (DejaDupOperation* base,
                                        GAsyncResult* _res_)
{
	DejaDupOperationBackupStartData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
deja_dup_operation_backup_start_ready (GObject* source_object,
                                       GAsyncResult* _res_,
                                       gpointer _user_data_)
{
	DejaDupOperationBackupStartData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_operation_backup_real_start_co (_data_);
}

static gboolean
deja_dup_operation_backup_real_start_co (DejaDupOperationBackupStartData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	deja_dup_update_last_run_timestamp (DEJA_DUP_LAST_RUN_KEY);
	_data_->_state_ = 1;
	DEJA_DUP_OPERATION_CLASS (deja_dup_operation_backup_parent_class)->start (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, DEJA_DUP_TYPE_OPERATION, DejaDupOperation), deja_dup_operation_backup_start_ready, _data_);
	return FALSE;
	_state_1:
	DEJA_DUP_OPERATION_CLASS (deja_dup_operation_backup_parent_class)->start_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, DEJA_DUP_TYPE_OPERATION, DejaDupOperation), _data_->_res_);
	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 gchar*
deja_dup_operation_backup_real_get_success_detail (DejaDupOperation* base)
{
	DejaDupOperationBackup * self;
	gchar* detail = NULL;
	GList* error_files = NULL;
	GList* _tmp0_;
	GList* _tmp1_;
	gchar* result;
	self = (DejaDupOperationBackup*) base;
	detail = NULL;
	_tmp0_ = deja_dup_operation_get_local_error_files ((DejaDupOperation*) self);
	error_files = _tmp0_;
	_tmp1_ = error_files;
	if (g_list_length (_tmp1_) > ((guint) 0)) {
		gchar* _tmp2_;
		const gchar* _tmp3_;
		gchar* _tmp4_;
		GList* _tmp5_;
		_tmp2_ = g_strdup (_ ("Could not back up the following files.  Please make sure you are able " \
"to open them."));
		_g_free0 (detail);
		detail = _tmp2_;
		_tmp3_ = detail;
		_tmp4_ = g_strconcat (_tmp3_, "\n", NULL);
		_g_free0 (detail);
		detail = _tmp4_;
		_tmp5_ = error_files;
		{
			GList* f_collection = NULL;
			GList* f_it = NULL;
			f_collection = _tmp5_;
			for (f_it = f_collection; f_it != NULL; f_it = f_it->next) {
				const gchar* f = NULL;
				f = (const gchar*) f_it->data;
				{
					const gchar* _tmp6_;
					const gchar* _tmp7_;
					gchar* _tmp8_;
					gchar* _tmp9_;
					gchar* _tmp10_;
					_tmp6_ = detail;
					_tmp7_ = f;
					_tmp8_ = g_strdup_printf ("\n%s", _tmp7_);
					_tmp9_ = _tmp8_;
					_tmp10_ = g_strconcat (_tmp6_, _tmp9_, NULL);
					_g_free0 (detail);
					detail = _tmp10_;
					_g_free0 (_tmp9_);
				}
			}
		}
	}
	result = detail;
	(error_files == NULL) ? NULL : (error_files = (g_list_free (error_files), NULL));
	return result;
}

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

static void
deja_dup_operation_backup_real_operation_finished (DejaDupOperation* base,
                                                   gboolean success,
                                                   gboolean cancelled,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_)
{
	DejaDupOperationBackup * self;
	DejaDupOperationBackupOperationFinishedData* _data_;
	DejaDupOperationBackup* _tmp0_;
	self = (DejaDupOperationBackup*) base;
	_data_ = g_slice_new0 (DejaDupOperationBackupOperationFinishedData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_operation_backup_real_operation_finished_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->success = success;
	_data_->cancelled = cancelled;
	deja_dup_operation_backup_real_operation_finished_co (_data_);
}

static void
deja_dup_operation_backup_operation_finished_finish (DejaDupOperation* base,
                                                     GAsyncResult* _res_)
{
	DejaDupOperationBackupOperationFinishedData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
deja_dup_operation_backup_operation_finished_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_)
{
	DejaDupOperationBackupOperationFinishedData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_operation_backup_real_operation_finished_co (_data_);
}

static gboolean
deja_dup_operation_backup_real_operation_finished_co (DejaDupOperationBackupOperationFinishedData* _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:
	if (_data_->success) {
		_data_->_tmp0_ = !_data_->cancelled;
	} else {
		_data_->_tmp0_ = FALSE;
	}
	if (_data_->_tmp0_) {
		deja_dup_update_last_run_timestamp (DEJA_DUP_LAST_BACKUP_KEY);
	}
	if (_data_->success) {
		_data_->_tmp2_ = !_data_->cancelled;
	} else {
		_data_->_tmp2_ = FALSE;
	}
	if (_data_->_tmp2_) {
		_data_->_tmp3_ = ((DejaDupOperation*) _data_->self)->chained_op;
		_data_->_tmp1_ = _data_->_tmp3_ == NULL;
	} else {
		_data_->_tmp1_ = FALSE;
	}
	if (_data_->_tmp1_) {
		_data_->_tmp4_ = deja_dup_operation_get_backend ((DejaDupOperation*) _data_->self);
		_data_->_tmp5_ = _data_->_tmp4_;
		_data_->_tmp6_ = ((DejaDupOperation*) _data_->self)->job;
		_data_->_tmp7_ = deja_dup_tool_job_get_tag (_data_->_tmp6_);
		_data_->_tmp8_ = _data_->_tmp7_;
		_data_->_tmp9_ = deja_dup_operation_verify_new (_data_->_tmp5_, _data_->_tmp8_);
		_data_->verify = _data_->_tmp9_;
		_data_->_tmp10_ = _data_->verify;
		_data_->_state_ = 1;
		deja_dup_operation_chain_op ((DejaDupOperation*) _data_->self, (DejaDupOperation*) _data_->_tmp10_, _ ("Verifying backup…"), deja_dup_operation_backup_operation_finished_ready, _data_);
		return FALSE;
		_state_1:
		deja_dup_operation_chain_op_finish ((DejaDupOperation*) _data_->self, _data_->_res_);
		_g_object_unref0 (_data_->verify);
	} else {
		_data_->_state_ = 2;
		DEJA_DUP_OPERATION_CLASS (deja_dup_operation_backup_parent_class)->operation_finished (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, DEJA_DUP_TYPE_OPERATION, DejaDupOperation), _data_->success, _data_->cancelled, deja_dup_operation_backup_operation_finished_ready, _data_);
		return FALSE;
		_state_2:
		DEJA_DUP_OPERATION_CLASS (deja_dup_operation_backup_parent_class)->operation_finished_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, DEJA_DUP_TYPE_OPERATION, DejaDupOperation), _data_->_res_);
	}
	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
deja_dup_operation_backup_get_unavailable_includes_data_free (gpointer _data)
{
	DejaDupOperationBackupGetUnavailableIncludesData* _data_;
	_data_ = _data;
	_data_->result = (_vala_array_free (_data_->result, _data_->result_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (_data_->self);
	g_slice_free (DejaDupOperationBackupGetUnavailableIncludesData, _data_);
}

static void
deja_dup_operation_backup_get_unavailable_includes (DejaDupOperationBackup* self,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_)
{
	DejaDupOperationBackupGetUnavailableIncludesData* _data_;
	DejaDupOperationBackup* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DejaDupOperationBackupGetUnavailableIncludesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_operation_backup_get_unavailable_includes_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	deja_dup_operation_backup_get_unavailable_includes_co (_data_);
}

static gchar**
deja_dup_operation_backup_get_unavailable_includes_finish (DejaDupOperationBackup* self,
                                                           GAsyncResult* _res_,
                                                           gint* result_length1)
{
	gchar** result;
	DejaDupOperationBackupGetUnavailableIncludesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	*result_length1 = _data_->result_length1;
	_data_->result = NULL;
	return result;
}

static void
deja_dup_operation_backup_get_unavailable_includes_ready (GObject* source_object,
                                                          GAsyncResult* _res_,
                                                          gpointer _user_data_)
{
	DejaDupOperationBackupGetUnavailableIncludesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_operation_backup_get_unavailable_includes_co (_data_);
}

static void
_vala_array_add14 (gchar** * array,
                   gint* length,
                   gint* size,
                   gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static gboolean
deja_dup_operation_backup_get_unavailable_includes_co (DejaDupOperationBackupGetUnavailableIncludesData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_new0 (gchar*, 0 + 1);
	_data_->unavailable = _data_->_tmp0_;
	_data_->unavailable_length1 = 0;
	_data_->_unavailable_size_ = _data_->unavailable_length1;
	_data_->_tmp1_ = deja_dup_install_env_instance ();
	_data_->install_env = _data_->_tmp1_;
	_data_->_tmp2_ = deja_dup_get_settings (NULL);
	_data_->settings = _data_->_tmp2_;
	_data_->_tmp3_ = _data_->settings;
	_data_->_tmp4_ = 0;
	_data_->_tmp5_ = deja_dup_filtered_settings_get_file_list (_data_->_tmp3_, DEJA_DUP_INCLUDE_LIST_KEY, &_data_->_tmp4_);
	_data_->include_list = _data_->_tmp5_;
	_data_->include_list_length1 = _data_->_tmp4_;
	_data_->_include_list_size_ = _data_->include_list_length1;
	_data_->_tmp6_ = _data_->include_list;
	_data_->_tmp6__length1 = _data_->include_list_length1;
	{
		_data_->include_collection_length1 = 0;
		_data_->_include_collection_size_ = 0;
		_data_->include_collection = _data_->_tmp6_;
		_data_->include_collection_length1 = _data_->_tmp6__length1;
		for (_data_->include_it = 0; _data_->include_it < _data_->include_collection_length1; _data_->include_it = _data_->include_it + 1) {
			_data_->_tmp7_ = _g_object_ref0 (_data_->include_collection[_data_->include_it]);
			_data_->include = _data_->_tmp7_;
			{
				_data_->_tmp8_ = _data_->install_env;
				_data_->_tmp9_ = _data_->include;
				if (!deja_dup_install_env_is_file_available (_data_->_tmp8_, _data_->_tmp9_)) {
					_data_->_tmp10_ = _data_->include;
					_data_->_state_ = 1;
					deja_dup_get_nickname (_data_->_tmp10_, deja_dup_operation_backup_get_unavailable_includes_ready, _data_);
					return FALSE;
					_state_1:
					_data_->_tmp11_ = deja_dup_get_nickname_finish (_data_->_res_);
					_vala_array_add14 (&_data_->unavailable, &_data_->unavailable_length1, &_data_->_unavailable_size_, _data_->_tmp11_);
				}
				_g_object_unref0 (_data_->include);
			}
		}
	}
	_data_->_tmp12_ = _data_->unavailable;
	_data_->_tmp12__length1 = _data_->unavailable_length1;
	_data_->result_length1 = _data_->_tmp12__length1;
	_data_->result = _data_->_tmp12_;
	_data_->include_list = (_vala_array_free (_data_->include_list, _data_->include_list_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_object_unref0 (_data_->settings);
	_g_object_unref0 (_data_->install_env);
	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
deja_dup_operation_backup_real_prepare_data_free (gpointer _data)
{
	DejaDupOperationBackupPrepareData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (DejaDupOperationBackupPrepareData, _data_);
}

static void
deja_dup_operation_backup_real_prepare (DejaDupOperation* base,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	DejaDupOperationBackup * self;
	DejaDupOperationBackupPrepareData* _data_;
	DejaDupOperationBackup* _tmp0_;
	self = (DejaDupOperationBackup*) base;
	_data_ = g_slice_new0 (DejaDupOperationBackupPrepareData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_operation_backup_real_prepare_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	deja_dup_operation_backup_real_prepare_co (_data_);
}

static gboolean
deja_dup_operation_backup_prepare_finish (DejaDupOperation* base,
                                          GAsyncResult* _res_)
{
	gboolean result;
	DejaDupOperationBackupPrepareData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
deja_dup_operation_backup_prepare_ready (GObject* source_object,
                                         GAsyncResult* _res_,
                                         gpointer _user_data_)
{
	DejaDupOperationBackupPrepareData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_operation_backup_real_prepare_co (_data_);
}

static gchar*
_vala_g_strjoinv (const gchar* separator,
                  gchar** str_array,
                  gint str_array_length1)
{
	gboolean _tmp0_ = FALSE;
	gchar* result;
	if (separator == NULL) {
		separator = "";
	}
	if (str_array != NULL) {
		gboolean _tmp1_ = FALSE;
		if (str_array_length1 > 0) {
			_tmp1_ = TRUE;
		} else {
			gboolean _tmp2_ = FALSE;
			if (str_array_length1 == -1) {
				const gchar* _tmp3_;
				_tmp3_ = str_array[0];
				_tmp2_ = _tmp3_ != NULL;
			} else {
				_tmp2_ = FALSE;
			}
			_tmp1_ = _tmp2_;
		}
		_tmp0_ = _tmp1_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gint i = 0;
		gsize len = 0UL;
		gint _tmp16_;
		gint _tmp17_;
		const gchar* res = NULL;
		void* _tmp18_;
		const gchar* _tmp19_ = NULL;
		const gchar* _tmp20_;
		void* ptr = NULL;
		const gchar* _tmp22_;
		void* _tmp23_;
		const gchar* _tmp33_;
		len = (gsize) 1;
		{
			gboolean _tmp4_ = FALSE;
			i = 0;
			_tmp4_ = TRUE;
			while (TRUE) {
				gboolean _tmp6_ = FALSE;
				gboolean _tmp7_ = FALSE;
				gint _tmp10_ = 0;
				const gchar* _tmp11_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				if (str_array_length1 != -1) {
					_tmp7_ = i < str_array_length1;
				} else {
					_tmp7_ = FALSE;
				}
				if (_tmp7_) {
					_tmp6_ = TRUE;
				} else {
					gboolean _tmp8_ = FALSE;
					if (str_array_length1 == -1) {
						const gchar* _tmp9_;
						_tmp9_ = str_array[i];
						_tmp8_ = _tmp9_ != NULL;
					} else {
						_tmp8_ = FALSE;
					}
					_tmp6_ = _tmp8_;
				}
				if (!_tmp6_) {
					break;
				}
				_tmp11_ = str_array[i];
				if (_tmp11_ != NULL) {
					const gchar* _tmp12_;
					gint _tmp13_;
					gint _tmp14_;
					_tmp12_ = str_array[i];
					_tmp13_ = strlen ((const gchar*) _tmp12_);
					_tmp14_ = _tmp13_;
					_tmp10_ = _tmp14_;
				} else {
					_tmp10_ = 0;
				}
				len += (gsize) _tmp10_;
			}
		}
		if (i == 0) {
			gchar* _tmp15_;
			_tmp15_ = g_strdup ("");
			result = _tmp15_;
			return result;
		}
		str_array_length1 = i;
		_tmp16_ = strlen ((const gchar*) separator);
		_tmp17_ = _tmp16_;
		len += (gsize) (_tmp17_ * (i - 1));
		_tmp18_ = g_malloc (len);
		res = _tmp18_;
		_tmp20_ = str_array[0];
		if (_tmp20_ != NULL) {
			const gchar* _tmp21_;
			_tmp21_ = str_array[0];
			_tmp19_ = (const gchar*) _tmp21_;
		} else {
			_tmp19_ = "";
		}
		_tmp22_ = res;
		_tmp23_ = g_stpcpy ((void*) _tmp22_, _tmp19_);
		ptr = _tmp23_;
		{
			gboolean _tmp24_ = FALSE;
			i = 1;
			_tmp24_ = TRUE;
			while (TRUE) {
				void* _tmp26_;
				void* _tmp27_;
				const gchar* _tmp28_ = NULL;
				const gchar* _tmp29_;
				void* _tmp31_;
				void* _tmp32_;
				if (!_tmp24_) {
					gint _tmp25_;
					_tmp25_ = i;
					i = _tmp25_ + 1;
				}
				_tmp24_ = FALSE;
				if (!(i < str_array_length1)) {
					break;
				}
				_tmp26_ = ptr;
				_tmp27_ = g_stpcpy (_tmp26_, (const gchar*) separator);
				ptr = _tmp27_;
				_tmp29_ = str_array[i];
				if (_tmp29_ != NULL) {
					const gchar* _tmp30_;
					_tmp30_ = str_array[i];
					_tmp28_ = (const gchar*) _tmp30_;
				} else {
					_tmp28_ = "";
				}
				_tmp31_ = ptr;
				_tmp32_ = g_stpcpy (_tmp31_, _tmp28_);
				ptr = _tmp32_;
			}
		}
		_tmp33_ = res;
		res = NULL;
		result = (gchar*) _tmp33_;
		return result;
	} else {
		gchar* _tmp34_;
		_tmp34_ = g_strdup ("");
		result = _tmp34_;
		return result;
	}
}

static gboolean
deja_dup_operation_backup_real_prepare_co (DejaDupOperationBackupPrepareData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = 0;
	_data_->_state_ = 1;
	deja_dup_operation_backup_get_unavailable_includes (_data_->self, deja_dup_operation_backup_prepare_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = deja_dup_operation_backup_get_unavailable_includes_finish (_data_->self, _data_->_res_, &_data_->_tmp0_);
	_data_->unavailable = _data_->_tmp1_;
	_data_->unavailable_length1 = _data_->_tmp0_;
	_data_->_unavailable_size_ = _data_->unavailable_length1;
	_data_->_tmp2_ = _data_->unavailable;
	_data_->_tmp2__length1 = _data_->unavailable_length1;
	if (_data_->_tmp2__length1 > 0) {
		_data_->_tmp3_ = g_strdup (_ ("The following folders cannot be backed up because Backups does not hav" \
"e access to them:"));
		_data_->msg = _data_->_tmp3_;
		_data_->_tmp4_ = _data_->msg;
		_data_->_tmp5_ = _data_->unavailable;
		_data_->_tmp5__length1 = _data_->unavailable_length1;
		_data_->_tmp6_ = _vala_g_strjoinv (", ", _data_->_tmp5_, (gint) _data_->_tmp5__length1);
		_data_->_tmp7_ = _data_->_tmp6_;
		_data_->_tmp8_ = g_strconcat (" ", _data_->_tmp7_, NULL);
		_data_->_tmp9_ = _data_->_tmp8_;
		_data_->_tmp10_ = g_strconcat (_data_->_tmp4_, _data_->_tmp9_, NULL);
		_g_free0 (_data_->msg);
		_data_->msg = _data_->_tmp10_;
		_g_free0 (_data_->_tmp9_);
		_g_free0 (_data_->_tmp7_);
		_data_->_tmp11_ = _data_->msg;
		g_signal_emit_by_name ((DejaDupOperation*) _data_->self, "raise-error", _data_->_tmp11_, NULL);
		g_signal_emit_by_name ((DejaDupOperation*) _data_->self, "done", FALSE, FALSE, NULL);
		_data_->result = FALSE;
		_g_free0 (_data_->msg);
		_data_->unavailable = (_vala_array_free (_data_->unavailable, _data_->unavailable_length1, (GDestroyNotify) g_free), 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_->result = TRUE;
	_data_->unavailable = (_vala_array_free (_data_->unavailable, _data_->unavailable_length1, (GDestroyNotify) g_free), 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 GList*
deja_dup_operation_backup_real_make_argv (DejaDupOperation* base)
{
	DejaDupOperationBackup * self;
	DejaDupFilteredSettings* settings = NULL;
	DejaDupFilteredSettings* _tmp0_;
	GFile** include_list = NULL;
	DejaDupFilteredSettings* _tmp1_;
	gint _tmp2_ = 0;
	GFile** _tmp3_;
	gint include_list_length1;
	gint _include_list_size_;
	GFile** exclude_list = NULL;
	DejaDupFilteredSettings* _tmp4_;
	gint _tmp5_ = 0;
	GFile** _tmp6_;
	gint exclude_list_length1;
	gint _exclude_list_size_;
	DejaDupInstallEnv* install_env = NULL;
	DejaDupInstallEnv* _tmp7_;
	DejaDupToolJob* _tmp8_;
	DejaDupToolJob* _tmp9_;
	DejaDupBackend* _tmp10_;
	DejaDupBackend* _tmp11_;
	DejaDupToolJob* _tmp12_;
	GFile** _tmp13_;
	gint _tmp13__length1;
	GFile** _tmp19_;
	gint _tmp19__length1;
	DejaDupToolJob* _tmp28_;
	DejaDupInstallEnv* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	GFile* _tmp32_;
	GFile* _tmp33_;
	GList* result;
	self = (DejaDupOperationBackup*) base;
	_tmp0_ = deja_dup_get_settings (NULL);
	settings = _tmp0_;
	_tmp1_ = settings;
	_tmp3_ = deja_dup_filtered_settings_get_file_list (_tmp1_, DEJA_DUP_INCLUDE_LIST_KEY, &_tmp2_);
	include_list = _tmp3_;
	include_list_length1 = _tmp2_;
	_include_list_size_ = include_list_length1;
	_tmp4_ = settings;
	_tmp6_ = deja_dup_filtered_settings_get_file_list (_tmp4_, DEJA_DUP_EXCLUDE_LIST_KEY, &_tmp5_);
	exclude_list = _tmp6_;
	exclude_list_length1 = _tmp5_;
	_exclude_list_size_ = exclude_list_length1;
	_tmp7_ = deja_dup_install_env_instance ();
	install_env = _tmp7_;
	_tmp8_ = ((DejaDupOperation*) self)->job;
	_tmp9_ = ((DejaDupOperation*) self)->job;
	deja_dup_operation_backup_add_always_excluded_dirs (self, &_tmp8_->excludes, &_tmp9_->exclude_regexps);
	_tmp10_ = deja_dup_operation_get_backend ((DejaDupOperation*) self);
	_tmp11_ = _tmp10_;
	_tmp12_ = ((DejaDupOperation*) self)->job;
	deja_dup_backend_add_excludes (_tmp11_, &_tmp12_->excludes);
	_tmp13_ = exclude_list;
	_tmp13__length1 = exclude_list_length1;
	{
		GFile** s_collection = NULL;
		gint s_collection_length1 = 0;
		gint _s_collection_size_ = 0;
		gint s_it = 0;
		s_collection = _tmp13_;
		s_collection_length1 = _tmp13__length1;
		for (s_it = 0; s_it < s_collection_length1; s_it = s_it + 1) {
			GFile* _tmp14_;
			GFile* s = NULL;
			_tmp14_ = _g_object_ref0 (s_collection[s_it]);
			s = _tmp14_;
			{
				GFile* _tmp15_;
				_tmp15_ = s;
				if (g_file_is_native (_tmp15_)) {
					DejaDupToolJob* _tmp16_;
					GFile* _tmp17_;
					GFile* _tmp18_;
					_tmp16_ = ((DejaDupOperation*) self)->job;
					_tmp17_ = s;
					_tmp18_ = _g_object_ref0 (_tmp17_);
					_tmp16_->excludes = g_list_prepend (_tmp16_->excludes, _tmp18_);
				}
				_g_object_unref0 (s);
			}
		}
	}
	_tmp19_ = include_list;
	_tmp19__length1 = include_list_length1;
	{
		GFile** s_collection = NULL;
		gint s_collection_length1 = 0;
		gint _s_collection_size_ = 0;
		gint s_it = 0;
		s_collection = _tmp19_;
		s_collection_length1 = _tmp19__length1;
		for (s_it = 0; s_it < s_collection_length1; s_it = s_it + 1) {
			GFile* _tmp20_;
			GFile* s = NULL;
			_tmp20_ = _g_object_ref0 (s_collection[s_it]);
			s = _tmp20_;
			{
				gboolean _tmp21_ = FALSE;
				GFile* _tmp22_;
				_tmp22_ = s;
				if (g_file_is_native (_tmp22_)) {
					DejaDupInstallEnv* _tmp23_;
					GFile* _tmp24_;
					_tmp23_ = install_env;
					_tmp24_ = s;
					_tmp21_ = deja_dup_install_env_is_file_available (_tmp23_, _tmp24_);
				} else {
					_tmp21_ = FALSE;
				}
				if (_tmp21_) {
					DejaDupToolJob* _tmp25_;
					GFile* _tmp26_;
					GFile* _tmp27_;
					_tmp25_ = ((DejaDupOperation*) self)->job;
					_tmp26_ = s;
					_tmp27_ = _g_object_ref0 (_tmp26_);
					_tmp25_->includes = g_list_prepend (_tmp25_->includes, _tmp27_);
				}
				_g_object_unref0 (s);
			}
		}
	}
	_tmp28_ = ((DejaDupOperation*) self)->job;
	_tmp29_ = install_env;
	_tmp30_ = deja_dup_install_env_get_read_root (_tmp29_);
	_tmp31_ = _tmp30_;
	_tmp32_ = g_file_new_for_path (_tmp31_);
	_tmp33_ = _tmp32_;
	deja_dup_tool_job_set_local (_tmp28_, _tmp33_);
	_g_object_unref0 (_tmp33_);
	_g_free0 (_tmp31_);
	result = NULL;
	_g_object_unref0 (install_env);
	exclude_list = (_vala_array_free (exclude_list, exclude_list_length1, (GDestroyNotify) g_object_unref), NULL);
	include_list = (_vala_array_free (include_list, include_list_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_object_unref0 (settings);
	return result;
}

static void
deja_dup_operation_backup_add_always_excluded_dirs (DejaDupOperationBackup* self,
                                                    GList** files,
                                                    GList** regexps)
{
	gchar* cache_dir = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* config_dir = NULL;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* home_dir = NULL;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp22_;
	const gchar* _tmp29_;
	const gchar* _tmp49_;
	gint _tmp68_ = 0;
	gchar** _tmp69_;
	GFile* _tmp73_;
	GFile* _tmp74_;
	GFile* _tmp75_;
	GFile* _tmp76_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_get_user_cache_dir ();
	_tmp1_ = g_strdup (_tmp0_);
	cache_dir = _tmp1_;
	_tmp2_ = g_get_user_config_dir ();
	_tmp3_ = g_strdup (_tmp2_);
	config_dir = _tmp3_;
	_tmp4_ = g_get_home_dir ();
	_tmp5_ = g_strdup (_tmp4_);
	home_dir = _tmp5_;
	_tmp6_ = cache_dir;
	if (_tmp6_ != NULL) {
		GFile* cache = NULL;
		const gchar* _tmp7_;
		GFile* _tmp8_;
		GFile* _tmp9_;
		GFile* _tmp10_;
		const gchar* _tmp11_;
		GFile* _tmp20_;
		GFile* _tmp21_;
		_tmp7_ = cache_dir;
		_tmp8_ = g_file_new_for_path (_tmp7_);
		cache = _tmp8_;
		_tmp9_ = cache;
		_tmp10_ = _g_object_ref0 (_tmp9_);
		*files = g_list_prepend (*files, _tmp10_);
		_tmp11_ = home_dir;
		if (_tmp11_ != NULL) {
			GFile* home = NULL;
			const gchar* _tmp12_;
			GFile* _tmp13_;
			GFile* home_cache = NULL;
			GFile* _tmp14_;
			GFile* _tmp15_;
			GFile* _tmp16_;
			GFile* _tmp17_;
			_tmp12_ = home_dir;
			_tmp13_ = g_file_new_for_path (_tmp12_);
			home = _tmp13_;
			_tmp14_ = home;
			_tmp15_ = g_file_get_child (_tmp14_, ".cache");
			home_cache = _tmp15_;
			_tmp16_ = cache;
			_tmp17_ = home_cache;
			if (!g_file_equal (_tmp16_, _tmp17_)) {
				GFile* _tmp18_;
				GFile* _tmp19_;
				_tmp18_ = home_cache;
				_tmp19_ = _g_object_ref0 (_tmp18_);
				*files = g_list_prepend (*files, _tmp19_);
			}
			_g_object_unref0 (home_cache);
			_g_object_unref0 (home);
		}
		_tmp20_ = cache;
		_tmp21_ = g_file_get_child (_tmp20_, PACKAGE);
		*files = g_list_prepend (*files, _tmp21_);
		_g_object_unref0 (cache);
	}
	_tmp22_ = config_dir;
	if (_tmp22_ != NULL) {
		GFile* config = NULL;
		const gchar* _tmp23_;
		GFile* _tmp24_;
		GFile* _tmp25_;
		GFile* _tmp26_;
		GFile* _tmp27_;
		GFile* _tmp28_;
		_tmp23_ = config_dir;
		_tmp24_ = g_file_new_for_path (_tmp23_);
		config = _tmp24_;
		_tmp25_ = config;
		_tmp26_ = g_file_resolve_relative_path (_tmp25_, "*/Cache");
		*regexps = g_list_prepend (*regexps, _tmp26_);
		_tmp27_ = config;
		_tmp28_ = g_file_resolve_relative_path (_tmp27_, "*/Code Cache");
		*regexps = g_list_prepend (*regexps, _tmp28_);
		_g_object_unref0 (config);
	}
	_tmp29_ = home_dir;
	if (_tmp29_ != NULL) {
		GFile* home = NULL;
		const gchar* _tmp30_;
		GFile* _tmp31_;
		const gchar* _tmp32_;
		const gchar* _tmp33_;
		gchar* _tmp34_;
		gchar* _tmp35_;
		gboolean _tmp36_;
		GFile* _tmp41_;
		GFile* _tmp42_;
		GFile* _tmp43_;
		GFile* _tmp44_;
		GFile* _tmp45_;
		GFile* _tmp46_;
		GFile* _tmp47_;
		GFile* _tmp48_;
		_tmp30_ = home_dir;
		_tmp31_ = g_file_new_for_path (_tmp30_);
		home = _tmp31_;
		_tmp32_ = config_dir;
		_tmp33_ = home_dir;
		_tmp34_ = g_build_filename (_tmp33_, ".config", NULL);
		_tmp35_ = _tmp34_;
		_tmp36_ = g_strcmp0 (_tmp32_, _tmp35_) != 0;
		_g_free0 (_tmp35_);
		if (_tmp36_) {
			GFile* _tmp37_;
			GFile* _tmp38_;
			GFile* _tmp39_;
			GFile* _tmp40_;
			_tmp37_ = home;
			_tmp38_ = g_file_resolve_relative_path (_tmp37_, ".config/*/Cache");
			*regexps = g_list_prepend (*regexps, _tmp38_);
			_tmp39_ = home;
			_tmp40_ = g_file_resolve_relative_path (_tmp39_, ".config/*/Code Cache");
			*regexps = g_list_prepend (*regexps, _tmp40_);
		}
		_tmp41_ = home;
		_tmp42_ = g_file_resolve_relative_path (_tmp41_, ".var/app/*/config/Cache");
		*regexps = g_list_prepend (*regexps, _tmp42_);
		_tmp43_ = home;
		_tmp44_ = g_file_resolve_relative_path (_tmp43_, ".var/app/*/config/Code Cache");
		*regexps = g_list_prepend (*regexps, _tmp44_);
		_tmp45_ = home;
		_tmp46_ = g_file_resolve_relative_path (_tmp45_, "snap/*/*/.config/Cache");
		*regexps = g_list_prepend (*regexps, _tmp46_);
		_tmp47_ = home;
		_tmp48_ = g_file_resolve_relative_path (_tmp47_, "snap/*/*/.config/Code Cache");
		*regexps = g_list_prepend (*regexps, _tmp48_);
		_g_object_unref0 (home);
	}
	_tmp49_ = home_dir;
	if (_tmp49_ != NULL) {
		GFile* home = NULL;
		const gchar* _tmp50_;
		GFile* _tmp51_;
		GFile* _tmp52_;
		GFile* _tmp53_;
		GFile* _tmp54_;
		GFile* _tmp55_;
		GFile* _tmp56_;
		GFile* _tmp57_;
		GFile* _tmp58_;
		GFile* _tmp59_;
		GFile* _tmp60_;
		GFile* _tmp61_;
		GFile* _tmp62_;
		GFile* _tmp63_;
		GFile* _tmp64_;
		GFile* _tmp65_;
		GFile* _tmp66_;
		GFile* _tmp67_;
		_tmp50_ = home_dir;
		_tmp51_ = g_file_new_for_path (_tmp50_);
		home = _tmp51_;
		_tmp52_ = home;
		_tmp53_ = g_file_resolve_relative_path (_tmp52_, ".ccache");
		*files = g_list_prepend (*files, _tmp53_);
		_tmp54_ = home;
		_tmp55_ = g_file_resolve_relative_path (_tmp54_, ".gvfs");
		*files = g_list_prepend (*files, _tmp55_);
		_tmp56_ = home;
		_tmp57_ = g_file_resolve_relative_path (_tmp56_, ".Private");
		*files = g_list_prepend (*files, _tmp57_);
		_tmp58_ = home;
		_tmp59_ = g_file_resolve_relative_path (_tmp58_, ".steam/root");
		*files = g_list_prepend (*files, _tmp59_);
		_tmp60_ = home;
		_tmp61_ = g_file_resolve_relative_path (_tmp60_, ".var/app/com.valvesoftware.Steam/.steam/root");
		*files = g_list_prepend (*files, _tmp61_);
		_tmp62_ = home;
		_tmp63_ = g_file_resolve_relative_path (_tmp62_, ".xsession-errors");
		*files = g_list_prepend (*files, _tmp63_);
		_tmp64_ = home;
		_tmp65_ = g_file_resolve_relative_path (_tmp64_, ".var/app/*/cache");
		*regexps = g_list_prepend (*regexps, _tmp65_);
		_tmp66_ = home;
		_tmp67_ = g_file_resolve_relative_path (_tmp66_, "snap/*/*/.cache");
		*regexps = g_list_prepend (*regexps, _tmp67_);
		_g_object_unref0 (home);
	}
	_tmp69_ = deja_dup_get_tempdirs (&_tmp68_);
	{
		gchar** tempdir_collection = NULL;
		gint tempdir_collection_length1 = 0;
		gint _tempdir_collection_size_ = 0;
		gint tempdir_it = 0;
		tempdir_collection = _tmp69_;
		tempdir_collection_length1 = _tmp68_;
		for (tempdir_it = 0; tempdir_it < tempdir_collection_length1; tempdir_it = tempdir_it + 1) {
			gchar* _tmp70_;
			gchar* tempdir = NULL;
			_tmp70_ = g_strdup (tempdir_collection[tempdir_it]);
			tempdir = _tmp70_;
			{
				const gchar* _tmp71_;
				GFile* _tmp72_;
				_tmp71_ = tempdir;
				_tmp72_ = g_file_new_for_path (_tmp71_);
				*files = g_list_prepend (*files, _tmp72_);
				_g_free0 (tempdir);
			}
		}
		tempdir_collection = (_vala_array_free (tempdir_collection, tempdir_collection_length1, (GDestroyNotify) g_free), NULL);
	}
	_tmp73_ = g_file_new_for_path ("/dev");
	*files = g_list_prepend (*files, _tmp73_);
	_tmp74_ = g_file_new_for_path ("/proc");
	*files = g_list_prepend (*files, _tmp74_);
	_tmp75_ = g_file_new_for_path ("/run");
	*files = g_list_prepend (*files, _tmp75_);
	_tmp76_ = g_file_new_for_path ("/sys");
	*files = g_list_prepend (*files, _tmp76_);
	_g_free0 (home_dir);
	_g_free0 (config_dir);
	_g_free0 (cache_dir);
}

gboolean
deja_dup_operation_backup_get_automatic (DejaDupOperationBackup* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_automatic;
	return result;
}

static void
deja_dup_operation_backup_set_automatic (DejaDupOperationBackup* self,
                                         gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = deja_dup_operation_backup_get_automatic (self);
	if (old_value != value) {
		self->priv->_automatic = value;
		g_object_notify_by_pspec ((GObject *) self, deja_dup_operation_backup_properties[DEJA_DUP_OPERATION_BACKUP_AUTOMATIC_PROPERTY]);
	}
}

static void
deja_dup_operation_backup_class_init (DejaDupOperationBackupClass * klass,
                                      gpointer klass_data)
{
	deja_dup_operation_backup_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DejaDupOperationBackup_private_offset);
	((DejaDupOperationClass *) klass)->start = (void (*) (DejaDupOperation*, GAsyncReadyCallback, gpointer)) deja_dup_operation_backup_real_start;
	((DejaDupOperationClass *) klass)->start_finish = (void (*) (DejaDupOperation*, GAsyncResult*)) deja_dup_operation_backup_start_finish;
	((DejaDupOperationClass *) klass)->get_success_detail = (gchar* (*) (DejaDupOperation*)) deja_dup_operation_backup_real_get_success_detail;
	((DejaDupOperationClass *) klass)->operation_finished = (void (*) (DejaDupOperation*, gboolean, gboolean, GAsyncReadyCallback, gpointer)) deja_dup_operation_backup_real_operation_finished;
	((DejaDupOperationClass *) klass)->operation_finished_finish = (void (*) (DejaDupOperation*, GAsyncResult*)) deja_dup_operation_backup_operation_finished_finish;
	((DejaDupOperationClass *) klass)->prepare = (void (*) (DejaDupOperation*, GAsyncReadyCallback, gpointer)) deja_dup_operation_backup_real_prepare;
	((DejaDupOperationClass *) klass)->prepare_finish = (gboolean (*) (DejaDupOperation*, GAsyncResult*)) deja_dup_operation_backup_prepare_finish;
	((DejaDupOperationClass *) klass)->make_argv = (GList* (*) (DejaDupOperation*)) deja_dup_operation_backup_real_make_argv;
	G_OBJECT_CLASS (klass)->get_property = _vala_deja_dup_operation_backup_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_deja_dup_operation_backup_set_property;
	G_OBJECT_CLASS (klass)->finalize = deja_dup_operation_backup_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_OPERATION_BACKUP_AUTOMATIC_PROPERTY, deja_dup_operation_backup_properties[DEJA_DUP_OPERATION_BACKUP_AUTOMATIC_PROPERTY] = g_param_spec_boolean ("automatic", "automatic", "automatic", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
deja_dup_operation_backup_instance_init (DejaDupOperationBackup * self,
                                         gpointer klass)
{
	self->priv = deja_dup_operation_backup_get_instance_private (self);
}

static void
deja_dup_operation_backup_finalize (GObject * obj)
{
	DejaDupOperationBackup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DEJA_DUP_TYPE_OPERATION_BACKUP, DejaDupOperationBackup);
	G_OBJECT_CLASS (deja_dup_operation_backup_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
deja_dup_operation_backup_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DejaDupOperationBackupClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) deja_dup_operation_backup_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DejaDupOperationBackup), 0, (GInstanceInitFunc) deja_dup_operation_backup_instance_init, NULL };
	GType deja_dup_operation_backup_type_id;
	deja_dup_operation_backup_type_id = g_type_register_static (DEJA_DUP_TYPE_OPERATION, "DejaDupOperationBackup", &g_define_type_info, 0);
	DejaDupOperationBackup_private_offset = g_type_add_instance_private (deja_dup_operation_backup_type_id, sizeof (DejaDupOperationBackupPrivate));
	return deja_dup_operation_backup_type_id;
}

GType
deja_dup_operation_backup_get_type (void)
{
	static gsize deja_dup_operation_backup_type_id__once = 0;
	if (g_once_init_enter (&deja_dup_operation_backup_type_id__once)) {
		GType deja_dup_operation_backup_type_id;
		deja_dup_operation_backup_type_id = deja_dup_operation_backup_get_type_once ();
		g_once_init_leave (&deja_dup_operation_backup_type_id__once, deja_dup_operation_backup_type_id);
	}
	return deja_dup_operation_backup_type_id__once;
}

static void
_vala_deja_dup_operation_backup_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec)
{
	DejaDupOperationBackup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DEJA_DUP_TYPE_OPERATION_BACKUP, DejaDupOperationBackup);
	switch (property_id) {
		case DEJA_DUP_OPERATION_BACKUP_AUTOMATIC_PROPERTY:
		g_value_set_boolean (value, deja_dup_operation_backup_get_automatic (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_deja_dup_operation_backup_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec)
{
	DejaDupOperationBackup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DEJA_DUP_TYPE_OPERATION_BACKUP, DejaDupOperationBackup);
	switch (property_id) {
		case DEJA_DUP_OPERATION_BACKUP_AUTOMATIC_PROPERTY:
		deja_dup_operation_backup_set_automatic (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

