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

#define DEJA_DUP_RECURSIVE_OP_NUM_ENUMERATED 16
#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_RECURSIVE_OP_0_PROPERTY,
	DEJA_DUP_RECURSIVE_OP_SRC_PROPERTY,
	DEJA_DUP_RECURSIVE_OP_DST_PROPERTY,
	DEJA_DUP_RECURSIVE_OP_NUM_PROPERTIES
};
static GParamSpec* deja_dup_recursive_op_properties[DEJA_DUP_RECURSIVE_OP_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block8Data Block8Data;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
typedef struct _DejaDupRecursiveOpStartAsyncData DejaDupRecursiveOpStartAsyncData;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _DejaDupRecursiveOpDoDirData DejaDupRecursiveOpDoDirData;
enum  {
	DEJA_DUP_RECURSIVE_OP_DONE_SIGNAL,
	DEJA_DUP_RECURSIVE_OP_RAISE_ERROR_SIGNAL,
	DEJA_DUP_RECURSIVE_OP_NUM_SIGNALS
};
static guint deja_dup_recursive_op_signals[DEJA_DUP_RECURSIVE_OP_NUM_SIGNALS] = {0};

struct _DejaDupRecursiveOpPrivate {
	GFile* _src;
	GFile* _dst;
	gint refs;
};

struct _Block8Data {
	int _ref_count_;
	DejaDupRecursiveOp* self;
	GMainLoop* loop;
};

struct _DejaDupRecursiveOpStartAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupRecursiveOp* self;
	GFile* _tmp0_;
	GFile* _tmp1_;
	GFile* _tmp2_;
	GFile* _tmp3_;
};

struct _DejaDupRecursiveOpDoDirData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupRecursiveOp* self;
	GFileEnumerator* enumerator;
	GFile* _tmp0_;
	GFileEnumerator* _tmp1_;
	GList* infos;
	GFileEnumerator* _tmp2_;
	GList* _tmp3_;
	GList* _tmp4_;
	GList* info_collection;
	GList* info_it;
	GFileInfo* _tmp5_;
	GFileInfo* info;
	GFileInfo* _tmp6_;
	GList* _tmp7_;
	GError* e;
	GFile* _tmp8_;
	GFile* _tmp9_;
	GError* _tmp10_;
	const gchar* _tmp11_;
	GError* _inner_error0_;
};

static gint DejaDupRecursiveOp_private_offset;
static gpointer deja_dup_recursive_op_parent_class = NULL;

static void deja_dup_recursive_op_real_handle_file (DejaDupRecursiveOp* self);
static void deja_dup_recursive_op_real_handle_dir (DejaDupRecursiveOp* self);
static void deja_dup_recursive_op_real_finish_dir (DejaDupRecursiveOp* self);
static DejaDupRecursiveOp* deja_dup_recursive_op_real_clone_for_info (DejaDupRecursiveOp* self,
                                                               GFileInfo* info);
static GFileType deja_dup_recursive_op_real_query_file_type (DejaDupRecursiveOp* self,
                                                      GFile* file);
static gboolean deja_dup_recursive_op_idle_action (DejaDupRecursiveOp* self);
static Block8Data* block8_data_ref (Block8Data* _data8_);
static void block8_data_unref (void * _userdata_);
static gboolean _deja_dup_recursive_op_idle_action_gsource_func (gpointer self);
static void __lambda12_ (Block8Data* _data8_,
                  DejaDupRecursiveOp* m);
static void ___lambda12__deja_dup_recursive_op_done (DejaDupRecursiveOp* _sender,
                                              gpointer self);
static void deja_dup_recursive_op_start_async_data_free (gpointer _data);
static gboolean deja_dup_recursive_op_start_async_co (DejaDupRecursiveOpStartAsyncData* _data_);
static void deja_dup_recursive_op_do_dir (DejaDupRecursiveOp* self,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_);
static void deja_dup_recursive_op_do_dir_finish (DejaDupRecursiveOp* self,
                                          GAsyncResult* _res_);
static void deja_dup_recursive_op_start_async_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_);
static void deja_dup_recursive_op_check_ref (DejaDupRecursiveOp* self);
static void deja_dup_recursive_op_recurse_on_info (DejaDupRecursiveOp* self,
                                            GFileInfo* info);
static void deja_dup_recursive_op_add_ref (DejaDupRecursiveOp* self);
static void deja_dup_recursive_op_remove_ref (DejaDupRecursiveOp* self);
static void __lambda10_ (DejaDupRecursiveOp* self,
                  DejaDupRecursiveOp* m);
static void ___lambda10__deja_dup_recursive_op_done (DejaDupRecursiveOp* _sender,
                                              gpointer self);
static void __lambda11_ (DejaDupRecursiveOp* self,
                  DejaDupRecursiveOp* m,
                  GFile* s,
                  GFile* d,
                  const gchar* e);
static void ___lambda11__deja_dup_recursive_op_raise_error (DejaDupRecursiveOp* _sender,
                                                     GFile* src,
                                                     GFile* dst,
                                                     const gchar* errstr,
                                                     gpointer self);
static void deja_dup_recursive_op_do_dir_data_free (gpointer _data);
static gboolean deja_dup_recursive_op_do_dir_co (DejaDupRecursiveOpDoDirData* _data_);
static void deja_dup_recursive_op_do_dir_ready (GObject* source_object,
                                         GAsyncResult* _res_,
                                         gpointer _user_data_);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT_STRING (GClosure * closure,
                                                         GValue * return_value,
                                                         guint n_param_values,
                                                         const GValue * param_values,
                                                         gpointer invocation_hint,
                                                         gpointer marshal_data);
static void deja_dup_recursive_op_finalize (GObject * obj);
static GType deja_dup_recursive_op_get_type_once (void);
static void _vala_deja_dup_recursive_op_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec);
static void _vala_deja_dup_recursive_op_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec);

static inline gpointer
deja_dup_recursive_op_get_instance_private (DejaDupRecursiveOp* self)
{
	return G_STRUCT_MEMBER_P (self, DejaDupRecursiveOp_private_offset);
}

static void
deja_dup_recursive_op_real_handle_file (DejaDupRecursiveOp* self)
{
}

void
deja_dup_recursive_op_handle_file (DejaDupRecursiveOp* self)
{
	DejaDupRecursiveOpClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = DEJA_DUP_RECURSIVE_OP_GET_CLASS (self);
	if (_klass_->handle_file) {
		_klass_->handle_file (self);
	}
}

static void
deja_dup_recursive_op_real_handle_dir (DejaDupRecursiveOp* self)
{
}

void
deja_dup_recursive_op_handle_dir (DejaDupRecursiveOp* self)
{
	DejaDupRecursiveOpClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = DEJA_DUP_RECURSIVE_OP_GET_CLASS (self);
	if (_klass_->handle_dir) {
		_klass_->handle_dir (self);
	}
}

static void
deja_dup_recursive_op_real_finish_dir (DejaDupRecursiveOp* self)
{
}

void
deja_dup_recursive_op_finish_dir (DejaDupRecursiveOp* self)
{
	DejaDupRecursiveOpClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = DEJA_DUP_RECURSIVE_OP_GET_CLASS (self);
	if (_klass_->finish_dir) {
		_klass_->finish_dir (self);
	}
}

static DejaDupRecursiveOp*
deja_dup_recursive_op_real_clone_for_info (DejaDupRecursiveOp* self,
                                           GFileInfo* info)
{
	g_critical ("Type `%s' does not implement abstract method `deja_dup_recursive_op_clone_for_info'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}

DejaDupRecursiveOp*
deja_dup_recursive_op_clone_for_info (DejaDupRecursiveOp* self,
                                      GFileInfo* info)
{
	DejaDupRecursiveOpClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = DEJA_DUP_RECURSIVE_OP_GET_CLASS (self);
	if (_klass_->clone_for_info) {
		return _klass_->clone_for_info (self, info);
	}
	return NULL;
}

static GFileType
deja_dup_recursive_op_real_query_file_type (DejaDupRecursiveOp* self,
                                            GFile* file)
{
	GFileType result;
	g_return_val_if_fail (file != NULL, 0);
	result = g_file_query_file_type (file, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL);
	return result;
}

GFileType
deja_dup_recursive_op_query_file_type (DejaDupRecursiveOp* self,
                                       GFile* file)
{
	DejaDupRecursiveOpClass* _klass_;
	g_return_val_if_fail (self != NULL, 0);
	_klass_ = DEJA_DUP_RECURSIVE_OP_GET_CLASS (self);
	if (_klass_->query_file_type) {
		return _klass_->query_file_type (self, file);
	}
	return 0;
}

static gboolean
deja_dup_recursive_op_idle_action (DejaDupRecursiveOp* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	deja_dup_recursive_op_start_async (self, NULL, NULL);
	result = FALSE;
	return result;
}

static Block8Data*
block8_data_ref (Block8Data* _data8_)
{
	g_atomic_int_inc (&_data8_->_ref_count_);
	return _data8_;
}

static void
block8_data_unref (void * _userdata_)
{
	Block8Data* _data8_;
	_data8_ = (Block8Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data8_->_ref_count_)) {
		DejaDupRecursiveOp* self;
		self = _data8_->self;
		_g_main_loop_unref0 (_data8_->loop);
		_g_object_unref0 (self);
		g_slice_free (Block8Data, _data8_);
	}
}

static gboolean
_deja_dup_recursive_op_idle_action_gsource_func (gpointer self)
{
	gboolean result;
	result = deja_dup_recursive_op_idle_action ((DejaDupRecursiveOp*) self);
	return result;
}

static void
__lambda12_ (Block8Data* _data8_,
             DejaDupRecursiveOp* m)
{
	DejaDupRecursiveOp* self;
	self = _data8_->self;
	g_return_if_fail (m != NULL);
	g_main_loop_quit (_data8_->loop);
}

static void
___lambda12__deja_dup_recursive_op_done (DejaDupRecursiveOp* _sender,
                                         gpointer self)
{
	__lambda12_ (self, _sender);
}

void
deja_dup_recursive_op_start (DejaDupRecursiveOp* self)
{
	Block8Data* _data8_;
	GMainLoop* _tmp0_;
	g_return_if_fail (self != NULL);
	_data8_ = g_slice_new0 (Block8Data);
	_data8_->_ref_count_ = 1;
	_data8_->self = g_object_ref (self);
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _deja_dup_recursive_op_idle_action_gsource_func, g_object_ref (self), g_object_unref);
	_tmp0_ = g_main_loop_new (NULL, FALSE);
	_data8_->loop = _tmp0_;
	g_signal_connect_data (self, "done", (GCallback) ___lambda12__deja_dup_recursive_op_done, block8_data_ref (_data8_), (GClosureNotify) block8_data_unref, 0);
	g_main_loop_run (_data8_->loop);
	block8_data_unref (_data8_);
	_data8_ = NULL;
}

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

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

void
deja_dup_recursive_op_start_async (DejaDupRecursiveOp* self,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_)
{
	DejaDupRecursiveOpStartAsyncData* _data_;
	DejaDupRecursiveOp* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DejaDupRecursiveOpStartAsyncData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_recursive_op_start_async_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	deja_dup_recursive_op_start_async_co (_data_);
}

void
deja_dup_recursive_op_start_finish (DejaDupRecursiveOp* self,
                                    GAsyncResult* _res_)
{
	DejaDupRecursiveOpStartAsyncData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
deja_dup_recursive_op_start_async_ready (GObject* source_object,
                                         GAsyncResult* _res_,
                                         gpointer _user_data_)
{
	DejaDupRecursiveOpStartAsyncData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_recursive_op_start_async_co (_data_);
}

static gboolean
deja_dup_recursive_op_start_async_co (DejaDupRecursiveOpStartAsyncData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->_src;
	if (_data_->_tmp0_ != NULL) {
		_data_->_tmp1_ = _data_->self->priv->_src;
		_data_->self->src_type = deja_dup_recursive_op_query_file_type (_data_->self, _data_->_tmp1_);
	}
	_data_->_tmp2_ = _data_->self->priv->_dst;
	if (_data_->_tmp2_ != NULL) {
		_data_->_tmp3_ = _data_->self->priv->_dst;
		_data_->self->dst_type = deja_dup_recursive_op_query_file_type (_data_->self, _data_->_tmp3_);
	}
	switch (_data_->self->src_type) {
		case G_FILE_TYPE_DIRECTORY:
		{
			_data_->_state_ = 1;
			deja_dup_recursive_op_do_dir (_data_->self, deja_dup_recursive_op_start_async_ready, _data_);
			return FALSE;
			_state_1:
			deja_dup_recursive_op_do_dir_finish (_data_->self, _data_->_res_);
			break;
		}
		default:
		{
			deja_dup_recursive_op_handle_file (_data_->self);
			deja_dup_recursive_op_check_ref (_data_->self);
			break;
		}
	}
	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
__lambda10_ (DejaDupRecursiveOp* self,
             DejaDupRecursiveOp* m)
{
	g_return_if_fail (m != NULL);
	deja_dup_recursive_op_remove_ref (self);
	g_object_unref ((GObject*) m);
}

static void
___lambda10__deja_dup_recursive_op_done (DejaDupRecursiveOp* _sender,
                                         gpointer self)
{
	__lambda10_ ((DejaDupRecursiveOp*) self, _sender);
}

static void
__lambda11_ (DejaDupRecursiveOp* self,
             DejaDupRecursiveOp* m,
             GFile* s,
             GFile* d,
             const gchar* e)
{
	g_return_if_fail (m != NULL);
	g_return_if_fail (s != NULL);
	g_return_if_fail (d != NULL);
	g_return_if_fail (e != NULL);
	g_signal_emit (self, deja_dup_recursive_op_signals[DEJA_DUP_RECURSIVE_OP_RAISE_ERROR_SIGNAL], 0, s, d, e);
}

static void
___lambda11__deja_dup_recursive_op_raise_error (DejaDupRecursiveOp* _sender,
                                                GFile* src,
                                                GFile* dst,
                                                const gchar* errstr,
                                                gpointer self)
{
	__lambda11_ ((DejaDupRecursiveOp*) self, _sender, src, dst, errstr);
}

static void
deja_dup_recursive_op_recurse_on_info (DejaDupRecursiveOp* self,
                                       GFileInfo* info)
{
	DejaDupRecursiveOp* op = NULL;
	DejaDupRecursiveOp* _tmp0_;
	DejaDupRecursiveOp* _tmp1_;
	DejaDupRecursiveOp* _tmp2_;
	DejaDupRecursiveOp* _tmp3_;
	DejaDupRecursiveOp* _tmp4_;
	DejaDupRecursiveOp* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (info != NULL);
	deja_dup_recursive_op_add_ref (self);
	_tmp0_ = deja_dup_recursive_op_clone_for_info (self, info);
	op = _tmp0_;
	_tmp1_ = op;
	if (_tmp1_ == NULL) {
		deja_dup_recursive_op_remove_ref (self);
		_g_object_unref0 (op);
		return;
	}
	_tmp2_ = op;
	g_object_ref ((GObject*) _tmp2_);
	_tmp3_ = op;
	g_signal_connect_object (_tmp3_, "done", (GCallback) ___lambda10__deja_dup_recursive_op_done, self, 0);
	_tmp4_ = op;
	g_signal_connect_object (_tmp4_, "raise-error", (GCallback) ___lambda11__deja_dup_recursive_op_raise_error, self, 0);
	_tmp5_ = op;
	deja_dup_recursive_op_start_async (_tmp5_, NULL, NULL);
	_g_object_unref0 (op);
}

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

static void
deja_dup_recursive_op_do_dir (DejaDupRecursiveOp* self,
                              GAsyncReadyCallback _callback_,
                              gpointer _user_data_)
{
	DejaDupRecursiveOpDoDirData* _data_;
	DejaDupRecursiveOp* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DejaDupRecursiveOpDoDirData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_recursive_op_do_dir_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	deja_dup_recursive_op_do_dir_co (_data_);
}

static void
deja_dup_recursive_op_do_dir_finish (DejaDupRecursiveOp* self,
                                     GAsyncResult* _res_)
{
	DejaDupRecursiveOpDoDirData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
deja_dup_recursive_op_do_dir_ready (GObject* source_object,
                                    GAsyncResult* _res_,
                                    gpointer _user_data_)
{
	DejaDupRecursiveOpDoDirData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_recursive_op_do_dir_co (_data_);
}

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_);
}

static gboolean
deja_dup_recursive_op_do_dir_co (DejaDupRecursiveOpDoDirData* _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:
	deja_dup_recursive_op_handle_dir (_data_->self);
	deja_dup_recursive_op_add_ref (_data_->self);
	{
		_data_->_tmp0_ = _data_->self->priv->_src;
		_data_->_state_ = 1;
		g_file_enumerate_children_async (_data_->_tmp0_, G_FILE_ATTRIBUTE_STANDARD_NAME, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, G_PRIORITY_LOW, NULL, deja_dup_recursive_op_do_dir_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp1_ = g_file_enumerate_children_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error0_);
		_data_->enumerator = _data_->_tmp1_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		while (TRUE) {
			_data_->_tmp2_ = _data_->enumerator;
			_data_->_state_ = 2;
			g_file_enumerator_next_files_async (_data_->_tmp2_, DEJA_DUP_RECURSIVE_OP_NUM_ENUMERATED, G_PRIORITY_LOW, NULL, deja_dup_recursive_op_do_dir_ready, _data_);
			return FALSE;
			_state_2:
			_data_->_tmp3_ = g_file_enumerator_next_files_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error0_);
			_data_->infos = _data_->_tmp3_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_g_object_unref0 (_data_->enumerator);
				goto __catch0_g_error;
			}
			_data_->_tmp4_ = _data_->infos;
			{
				_data_->info_collection = _data_->_tmp4_;
				for (_data_->info_it = _data_->info_collection; _data_->info_it != NULL; _data_->info_it = _data_->info_it->next) {
					_data_->_tmp5_ = _g_object_ref0 ((GFileInfo*) _data_->info_it->data);
					_data_->info = _data_->_tmp5_;
					{
						_data_->_tmp6_ = _data_->info;
						deja_dup_recursive_op_recurse_on_info (_data_->self, _data_->_tmp6_);
						_g_object_unref0 (_data_->info);
					}
				}
			}
			_data_->_tmp7_ = _data_->infos;
			if (g_list_length (_data_->_tmp7_) != ((guint) DEJA_DUP_RECURSIVE_OP_NUM_ENUMERATED)) {
				deja_dup_recursive_op_remove_ref (_data_->self);
				(_data_->infos == NULL) ? NULL : (_data_->infos = (_g_list_free__g_object_unref0_ (_data_->infos), NULL));
				break;
			}
			(_data_->infos == NULL) ? NULL : (_data_->infos = (_g_list_free__g_object_unref0_ (_data_->infos), NULL));
		}
		_g_object_unref0 (_data_->enumerator);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp8_ = _data_->self->priv->_src;
		_data_->_tmp9_ = _data_->self->priv->_dst;
		_data_->_tmp10_ = _data_->e;
		_data_->_tmp11_ = _data_->_tmp10_->message;
		g_signal_emit (_data_->self, deja_dup_recursive_op_signals[DEJA_DUP_RECURSIVE_OP_RAISE_ERROR_SIGNAL], 0, _data_->_tmp8_, _data_->_tmp9_, _data_->_tmp11_);
		deja_dup_recursive_op_remove_ref (_data_->self);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	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_recursive_op_add_ref (DejaDupRecursiveOp* self)
{
	gint _tmp0_;
	g_return_if_fail (self != NULL);
	self->priv->refs = self->priv->refs + 1;
	_tmp0_ = self->priv->refs;
}

static void
deja_dup_recursive_op_remove_ref (DejaDupRecursiveOp* self)
{
	gint _tmp0_;
	g_return_if_fail (self != NULL);
	self->priv->refs = self->priv->refs - 1;
	_tmp0_ = self->priv->refs;
	deja_dup_recursive_op_check_ref (self);
}

static void
deja_dup_recursive_op_check_ref (DejaDupRecursiveOp* self)
{
	g_return_if_fail (self != NULL);
	if (self->priv->refs == 0) {
		if (self->src_type == G_FILE_TYPE_DIRECTORY) {
			deja_dup_recursive_op_finish_dir (self);
		}
		g_signal_emit (self, deja_dup_recursive_op_signals[DEJA_DUP_RECURSIVE_OP_DONE_SIGNAL], 0);
	}
}

DejaDupRecursiveOp*
deja_dup_recursive_op_construct (GType object_type)
{
	DejaDupRecursiveOp * self = NULL;
	self = (DejaDupRecursiveOp*) g_object_new (object_type, NULL);
	return self;
}

GFile*
deja_dup_recursive_op_get_src (DejaDupRecursiveOp* self)
{
	GFile* result;
	GFile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_src;
	result = _tmp0_;
	return result;
}

static void
deja_dup_recursive_op_set_src (DejaDupRecursiveOp* self,
                               GFile* value)
{
	GFile* old_value;
	g_return_if_fail (self != NULL);
	old_value = deja_dup_recursive_op_get_src (self);
	if (old_value != value) {
		GFile* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_src);
		self->priv->_src = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, deja_dup_recursive_op_properties[DEJA_DUP_RECURSIVE_OP_SRC_PROPERTY]);
	}
}

GFile*
deja_dup_recursive_op_get_dst (DejaDupRecursiveOp* self)
{
	GFile* result;
	GFile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_dst;
	result = _tmp0_;
	return result;
}

static void
deja_dup_recursive_op_set_dst (DejaDupRecursiveOp* self,
                               GFile* value)
{
	GFile* old_value;
	g_return_if_fail (self != NULL);
	old_value = deja_dup_recursive_op_get_dst (self);
	if (old_value != value) {
		GFile* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_dst);
		self->priv->_dst = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, deja_dup_recursive_op_properties[DEJA_DUP_RECURSIVE_OP_DST_PROPERTY]);
	}
}

static void
g_cclosure_user_marshal_VOID__OBJECT_OBJECT_STRING (GClosure * closure,
                                                    GValue * return_value,
                                                    guint n_param_values,
                                                    const GValue * param_values,
                                                    gpointer invocation_hint,
                                                    gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT_STRING) (gpointer data1, gpointer arg_1, gpointer arg_2, const char* arg_3, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_OBJECT_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__OBJECT_OBJECT_STRING) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), g_value_get_string (param_values + 3), data2);
}

static void
deja_dup_recursive_op_class_init (DejaDupRecursiveOpClass * klass,
                                  gpointer klass_data)
{
	deja_dup_recursive_op_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DejaDupRecursiveOp_private_offset);
	((DejaDupRecursiveOpClass *) klass)->handle_file = (void (*) (DejaDupRecursiveOp*)) deja_dup_recursive_op_real_handle_file;
	((DejaDupRecursiveOpClass *) klass)->handle_dir = (void (*) (DejaDupRecursiveOp*)) deja_dup_recursive_op_real_handle_dir;
	((DejaDupRecursiveOpClass *) klass)->finish_dir = (void (*) (DejaDupRecursiveOp*)) deja_dup_recursive_op_real_finish_dir;
	((DejaDupRecursiveOpClass *) klass)->clone_for_info = (DejaDupRecursiveOp* (*) (DejaDupRecursiveOp*, GFileInfo*)) deja_dup_recursive_op_real_clone_for_info;
	((DejaDupRecursiveOpClass *) klass)->query_file_type = (GFileType (*) (DejaDupRecursiveOp*, GFile*)) deja_dup_recursive_op_real_query_file_type;
	G_OBJECT_CLASS (klass)->get_property = _vala_deja_dup_recursive_op_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_deja_dup_recursive_op_set_property;
	G_OBJECT_CLASS (klass)->finalize = deja_dup_recursive_op_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_RECURSIVE_OP_SRC_PROPERTY, deja_dup_recursive_op_properties[DEJA_DUP_RECURSIVE_OP_SRC_PROPERTY] = g_param_spec_object ("src", "src", "src", g_file_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_RECURSIVE_OP_DST_PROPERTY, deja_dup_recursive_op_properties[DEJA_DUP_RECURSIVE_OP_DST_PROPERTY] = g_param_spec_object ("dst", "dst", "dst", g_file_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	deja_dup_recursive_op_signals[DEJA_DUP_RECURSIVE_OP_DONE_SIGNAL] = g_signal_new ("done", DEJA_DUP_TYPE_RECURSIVE_OP, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	deja_dup_recursive_op_signals[DEJA_DUP_RECURSIVE_OP_RAISE_ERROR_SIGNAL] = g_signal_new ("raise-error", DEJA_DUP_TYPE_RECURSIVE_OP, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT_STRING, G_TYPE_NONE, 3, g_file_get_type (), g_file_get_type (), G_TYPE_STRING);
}

static void
deja_dup_recursive_op_instance_init (DejaDupRecursiveOp * self,
                                     gpointer klass)
{
	self->priv = deja_dup_recursive_op_get_instance_private (self);
}

static void
deja_dup_recursive_op_finalize (GObject * obj)
{
	DejaDupRecursiveOp * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DEJA_DUP_TYPE_RECURSIVE_OP, DejaDupRecursiveOp);
	_g_object_unref0 (self->priv->_src);
	_g_object_unref0 (self->priv->_dst);
	G_OBJECT_CLASS (deja_dup_recursive_op_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
deja_dup_recursive_op_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DejaDupRecursiveOpClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) deja_dup_recursive_op_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DejaDupRecursiveOp), 0, (GInstanceInitFunc) deja_dup_recursive_op_instance_init, NULL };
	GType deja_dup_recursive_op_type_id;
	deja_dup_recursive_op_type_id = g_type_register_static (G_TYPE_OBJECT, "DejaDupRecursiveOp", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	DejaDupRecursiveOp_private_offset = g_type_add_instance_private (deja_dup_recursive_op_type_id, sizeof (DejaDupRecursiveOpPrivate));
	return deja_dup_recursive_op_type_id;
}

GType
deja_dup_recursive_op_get_type (void)
{
	static gsize deja_dup_recursive_op_type_id__once = 0;
	if (g_once_init_enter (&deja_dup_recursive_op_type_id__once)) {
		GType deja_dup_recursive_op_type_id;
		deja_dup_recursive_op_type_id = deja_dup_recursive_op_get_type_once ();
		g_once_init_leave (&deja_dup_recursive_op_type_id__once, deja_dup_recursive_op_type_id);
	}
	return deja_dup_recursive_op_type_id__once;
}

static void
_vala_deja_dup_recursive_op_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec)
{
	DejaDupRecursiveOp * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DEJA_DUP_TYPE_RECURSIVE_OP, DejaDupRecursiveOp);
	switch (property_id) {
		case DEJA_DUP_RECURSIVE_OP_SRC_PROPERTY:
		g_value_set_object (value, deja_dup_recursive_op_get_src (self));
		break;
		case DEJA_DUP_RECURSIVE_OP_DST_PROPERTY:
		g_value_set_object (value, deja_dup_recursive_op_get_dst (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_deja_dup_recursive_op_set_property (GObject * object,
                                          guint property_id,
                                          const GValue * value,
                                          GParamSpec * pspec)
{
	DejaDupRecursiveOp * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DEJA_DUP_TYPE_RECURSIVE_OP, DejaDupRecursiveOp);
	switch (property_id) {
		case DEJA_DUP_RECURSIVE_OP_SRC_PROPERTY:
		deja_dup_recursive_op_set_src (self, g_value_get_object (value));
		break;
		case DEJA_DUP_RECURSIVE_OP_DST_PROPERTY:
		deja_dup_recursive_op_set_dst (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

