/* RecursiveOp.c generated by valac, the Vala compiler
 * generated from RecursiveOp.vala, do not modify */

/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 2 -*- */
/*
    This file is part of Déjà Dup.
    © 2008,2009 Michael Terry <mike@mterry.name>

    Déjà Dup is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Déjà Dup is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Déjà Dup.  If not, see <http://www.gnu.org/licenses/>.
*/

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


#define DEJA_DUP_TYPE_RECURSIVE_OP (deja_dup_recursive_op_get_type ())
#define DEJA_DUP_RECURSIVE_OP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_RECURSIVE_OP, DejaDupRecursiveOp))
#define DEJA_DUP_RECURSIVE_OP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_RECURSIVE_OP, DejaDupRecursiveOpClass))
#define DEJA_DUP_IS_RECURSIVE_OP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_RECURSIVE_OP))
#define DEJA_DUP_IS_RECURSIVE_OP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_RECURSIVE_OP))
#define DEJA_DUP_RECURSIVE_OP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_RECURSIVE_OP, DejaDupRecursiveOpClass))

typedef struct _DejaDupRecursiveOp DejaDupRecursiveOp;
typedef struct _DejaDupRecursiveOpClass DejaDupRecursiveOpClass;
typedef struct _DejaDupRecursiveOpPrivate DejaDupRecursiveOpPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
typedef struct _Block3Data Block3Data;
#define __g_list_free_g_object_unref0(var) ((var == NULL) ? NULL : (var = (_g_list_free_g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _DejaDupRecursiveOpDoDirData DejaDupRecursiveOpDoDirData;

struct _DejaDupRecursiveOp {
	GObject parent_instance;
	DejaDupRecursiveOpPrivate * priv;
	GFileType src_type;
	GFileType dst_type;
};

struct _DejaDupRecursiveOpClass {
	GObjectClass parent_class;
	void (*handle_file) (DejaDupRecursiveOp* self);
	void (*handle_dir) (DejaDupRecursiveOp* self);
	void (*finish_dir) (DejaDupRecursiveOp* self);
	DejaDupRecursiveOp* (*clone_for_info) (DejaDupRecursiveOp* self, GFileInfo* info);
};

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

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

struct _DejaDupRecursiveOpDoDirData {
	int _state_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	DejaDupRecursiveOp* self;
	GFileEnumerator* enumerator;
	GList* infos;
	GList* info_collection;
	GList* info_it;
	GFileInfo* info;
	GError * e;
	GError * _inner_error_;
};


static gpointer deja_dup_recursive_op_parent_class = NULL;

GType deja_dup_recursive_op_get_type (void);
#define DEJA_DUP_RECURSIVE_OP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DEJA_DUP_TYPE_RECURSIVE_OP, DejaDupRecursiveOpPrivate))
enum  {
	DEJA_DUP_RECURSIVE_OP_DUMMY_PROPERTY,
	DEJA_DUP_RECURSIVE_OP_SRC,
	DEJA_DUP_RECURSIVE_OP_DST
};
#define DEJA_DUP_RECURSIVE_OP_NUM_ENUMERATED 16
void deja_dup_recursive_op_handle_file (DejaDupRecursiveOp* self);
static void deja_dup_recursive_op_real_handle_file (DejaDupRecursiveOp* self);
void deja_dup_recursive_op_handle_dir (DejaDupRecursiveOp* self);
static void deja_dup_recursive_op_real_handle_dir (DejaDupRecursiveOp* self);
void deja_dup_recursive_op_finish_dir (DejaDupRecursiveOp* self);
static void deja_dup_recursive_op_real_finish_dir (DejaDupRecursiveOp* self);
DejaDupRecursiveOp* deja_dup_recursive_op_clone_for_info (DejaDupRecursiveOp* self, GFileInfo* info);
static DejaDupRecursiveOp* deja_dup_recursive_op_real_clone_for_info (DejaDupRecursiveOp* self, GFileInfo* info);
void deja_dup_recursive_op_start_async (DejaDupRecursiveOp* self);
static gboolean deja_dup_recursive_op_idle_action (DejaDupRecursiveOp* self);
static gboolean _deja_dup_recursive_op_idle_action_gsource_func (gpointer self);
static void _lambda11_ (DejaDupRecursiveOp* m, Block3Data* _data3_);
static void __lambda11__deja_dup_recursive_op_done (DejaDupRecursiveOp* _sender, gpointer self);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (Block3Data* _data3_);
void deja_dup_recursive_op_start (DejaDupRecursiveOp* self);
GFile* deja_dup_recursive_op_get_src (DejaDupRecursiveOp* self);
GFile* deja_dup_recursive_op_get_dst (DejaDupRecursiveOp* self);
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_check_ref (DejaDupRecursiveOp* self);
static void deja_dup_recursive_op_add_ref (DejaDupRecursiveOp* self);
static void deja_dup_recursive_op_remove_ref (DejaDupRecursiveOp* self);
static void _lambda9_ (DejaDupRecursiveOp* m, DejaDupRecursiveOp* self);
static void __lambda9__deja_dup_recursive_op_done (DejaDupRecursiveOp* _sender, gpointer self);
static void _lambda10_ (DejaDupRecursiveOp* m, GFile* s, GFile* d, const char* e, DejaDupRecursiveOp* self);
static void __lambda10__deja_dup_recursive_op_raise_error (DejaDupRecursiveOp* _sender, GFile* src, GFile* dst, const char* errstr, gpointer self);
static void deja_dup_recursive_op_recurse_on_info (DejaDupRecursiveOp* self, GFileInfo* info);
static void deja_dup_recursive_op_do_dir_data_free (gpointer _data);
static void deja_dup_recursive_op_do_dir_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _g_list_free_g_object_unref (GList* self);
static gboolean deja_dup_recursive_op_do_dir_co (DejaDupRecursiveOpDoDirData* data);
DejaDupRecursiveOp* deja_dup_recursive_op_construct (GType object_type);
static void deja_dup_recursive_op_set_src (DejaDupRecursiveOp* self, GFile* value);
static void deja_dup_recursive_op_set_dst (DejaDupRecursiveOp* self, GFile* value);
static void deja_dup_recursive_op_finalize (GObject* obj);
static void deja_dup_recursive_op_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void deja_dup_recursive_op_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


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_real_handle_file (DejaDupRecursiveOp* self) {
	g_return_if_fail (self != NULL);
}


void deja_dup_recursive_op_handle_file (DejaDupRecursiveOp* self) {
	DEJA_DUP_RECURSIVE_OP_GET_CLASS (self)->handle_file (self);
}


static void deja_dup_recursive_op_real_handle_dir (DejaDupRecursiveOp* self) {
	g_return_if_fail (self != NULL);
}


void deja_dup_recursive_op_handle_dir (DejaDupRecursiveOp* self) {
	DEJA_DUP_RECURSIVE_OP_GET_CLASS (self)->handle_dir (self);
}


static void deja_dup_recursive_op_real_finish_dir (DejaDupRecursiveOp* self) {
	g_return_if_fail (self != NULL);
}


void deja_dup_recursive_op_finish_dir (DejaDupRecursiveOp* self) {
	DEJA_DUP_RECURSIVE_OP_GET_CLASS (self)->finish_dir (self);
}


static DejaDupRecursiveOp* deja_dup_recursive_op_real_clone_for_info (DejaDupRecursiveOp* self, GFileInfo* info) {
	g_return_val_if_fail (self != NULL, NULL);
	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) {
	return DEJA_DUP_RECURSIVE_OP_GET_CLASS (self)->clone_for_info (self, info);
}


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


static gboolean _deja_dup_recursive_op_idle_action_gsource_func (gpointer self) {
	return deja_dup_recursive_op_idle_action (self);
}


static void _lambda11_ (DejaDupRecursiveOp* m, Block3Data* _data3_) {
	DejaDupRecursiveOp * self;
	self = _data3_->self;
	g_return_if_fail (m != NULL);
	g_main_loop_quit (_data3_->loop);
}


static void __lambda11__deja_dup_recursive_op_done (DejaDupRecursiveOp* _sender, gpointer self) {
	_lambda11_ (_sender, self);
}


static Block3Data* block3_data_ref (Block3Data* _data3_) {
	++_data3_->_ref_count_;
	return _data3_;
}


static void block3_data_unref (Block3Data* _data3_) {
	if ((--_data3_->_ref_count_) == 0) {
		_g_object_unref0 (_data3_->self);
		_g_main_loop_unref0 (_data3_->loop);
		g_slice_free (Block3Data, _data3_);
	}
}


void deja_dup_recursive_op_start (DejaDupRecursiveOp* self) {
	Block3Data* _data3_;
	g_return_if_fail (self != NULL);
	_data3_ = g_slice_new0 (Block3Data);
	_data3_->_ref_count_ = 1;
	_data3_->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);
	_data3_->loop = g_main_loop_new (NULL, FALSE);
	g_signal_connect_data (self, "done", (GCallback) __lambda11__deja_dup_recursive_op_done, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
	g_main_loop_run (_data3_->loop);
	block3_data_unref (_data3_);
}


void deja_dup_recursive_op_start_async (DejaDupRecursiveOp* self) {
	g_return_if_fail (self != NULL);
	if (self->priv->_src != NULL) {
		self->src_type = g_file_query_file_type (self->priv->_src, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL);
	}
	if (self->priv->_dst != NULL) {
		self->dst_type = g_file_query_file_type (self->priv->_dst, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL);
	}
	switch (self->src_type) {
		case G_FILE_TYPE_DIRECTORY:
		{
			deja_dup_recursive_op_do_dir (self, NULL, NULL);
			break;
		}
		default:
		{
			deja_dup_recursive_op_handle_file (self);
			break;
		}
	}
	deja_dup_recursive_op_check_ref (self);
}


static void _lambda9_ (DejaDupRecursiveOp* m, DejaDupRecursiveOp* self) {
	g_return_if_fail (m != NULL);
	deja_dup_recursive_op_remove_ref (self);
	g_object_unref ((GObject*) m);
}


static void __lambda9__deja_dup_recursive_op_done (DejaDupRecursiveOp* _sender, gpointer self) {
	_lambda9_ (_sender, self);
}


static void _lambda10_ (DejaDupRecursiveOp* m, GFile* s, GFile* d, const char* e, DejaDupRecursiveOp* self) {
	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_by_name (self, "raise-error", s, d, e);
}


static void __lambda10__deja_dup_recursive_op_raise_error (DejaDupRecursiveOp* _sender, GFile* src, GFile* dst, const char* errstr, gpointer self) {
	_lambda10_ (_sender, src, dst, errstr, self);
}


static void deja_dup_recursive_op_recurse_on_info (DejaDupRecursiveOp* self, GFileInfo* info) {
	DejaDupRecursiveOp* op;
	g_return_if_fail (self != NULL);
	g_return_if_fail (info != NULL);
	deja_dup_recursive_op_add_ref (self);
	op = deja_dup_recursive_op_clone_for_info (self, info);
	g_object_ref ((GObject*) op);
	g_signal_connect_object (op, "done", (GCallback) __lambda9__deja_dup_recursive_op_done, self, 0);
	g_signal_connect_object (op, "raise-error", (GCallback) __lambda10__deja_dup_recursive_op_raise_error, self, 0);
	deja_dup_recursive_op_start_async (op);
	_g_object_unref0 (op);
}


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


static void deja_dup_recursive_op_do_dir (DejaDupRecursiveOp* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	DejaDupRecursiveOpDoDirData* _data_;
	_data_ = g_slice_new0 (DejaDupRecursiveOpDoDirData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, deja_dup_recursive_op_do_dir);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, deja_dup_recursive_op_do_dir_data_free);
	_data_->self = g_object_ref (self);
	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_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


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


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


static void _g_list_free_g_object_unref (GList* self) {
	g_list_foreach (self, (GFunc) g_object_unref, NULL);
	g_list_free (self);
}


static gboolean deja_dup_recursive_op_do_dir_co (DejaDupRecursiveOpDoDirData* data) {
	switch (data->_state_) {
		case 0:
		goto _state_0;
		case 12:
		goto _state_12;
		case 13:
		goto _state_13;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		deja_dup_recursive_op_handle_dir (data->self);
		deja_dup_recursive_op_add_ref (data->self);
		{
			data->_state_ = 12;
			g_file_enumerate_children_async (data->self->priv->_src, G_FILE_ATTRIBUTE_STANDARD_NAME, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, G_PRIORITY_DEFAULT, NULL, deja_dup_recursive_op_do_dir_ready, data);
			return FALSE;
			_state_12:
			data->enumerator = g_file_enumerate_children_finish (data->self->priv->_src, data->_res_, &data->_inner_error_);
			if (data->_inner_error_ != NULL) {
				goto __catch51_g_error;
			}
			while (TRUE) {
				data->_state_ = 13;
				g_file_enumerator_next_files_async (data->enumerator, DEJA_DUP_RECURSIVE_OP_NUM_ENUMERATED, G_PRIORITY_DEFAULT, NULL, deja_dup_recursive_op_do_dir_ready, data);
				return FALSE;
				_state_13:
				data->infos = g_file_enumerator_next_files_finish (data->enumerator, data->_res_, &data->_inner_error_);
				if (data->_inner_error_ != NULL) {
					_g_object_unref0 (data->enumerator);
					goto __catch51_g_error;
				}
				{
					data->info_collection = data->infos;
					for (data->info_it = data->info_collection; data->info_it != NULL; data->info_it = data->info_it->next) {
						data->info = _g_object_ref0 ((GFileInfo*) data->info_it->data);
						{
							deja_dup_recursive_op_recurse_on_info (data->self, data->info);
							_g_object_unref0 (data->info);
						}
					}
				}
				if (g_list_length (data->infos) != DEJA_DUP_RECURSIVE_OP_NUM_ENUMERATED) {
					deja_dup_recursive_op_remove_ref (data->self);
					__g_list_free_g_object_unref0 (data->infos);
					break;
				}
				__g_list_free_g_object_unref0 (data->infos);
			}
			_g_object_unref0 (data->enumerator);
		}
		goto __finally51;
		__catch51_g_error:
		{
			data->e = data->_inner_error_;
			data->_inner_error_ = NULL;
			{
				g_signal_emit_by_name (data->self, "raise-error", data->self->priv->_src, data->self->priv->_dst, data->e->message);
				deja_dup_recursive_op_remove_ref (data->self);
				_g_error_free0 (data->e);
			}
		}
		__finally51:
		if (data->_inner_error_ != NULL) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, data->_inner_error_->message, g_quark_to_string (data->_inner_error_->domain), data->_inner_error_->code);
			g_clear_error (&data->_inner_error_);
			return FALSE;
		}
	}
	{
		if (data->_state_ == 0) {
			g_simple_async_result_complete_in_idle (data->_async_result);
		} else {
			g_simple_async_result_complete (data->_async_result);
		}
		g_object_unref (data->_async_result);
		return FALSE;
	}
}


static void deja_dup_recursive_op_add_ref (DejaDupRecursiveOp* self) {
	g_return_if_fail (self != NULL);
	self->priv->refs = self->priv->refs + 1;
}


static void deja_dup_recursive_op_remove_ref (DejaDupRecursiveOp* self) {
	g_return_if_fail (self != NULL);
	self->priv->refs = self->priv->refs - 1;
	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_by_name (self, "done");
	}
}


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


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


static void deja_dup_recursive_op_set_src (DejaDupRecursiveOp* self, GFile* value) {
	GFile* _tmp0_;
	g_return_if_fail (self != NULL);
	self->priv->_src = (_tmp0_ = _g_object_ref0 (value), _g_object_unref0 (self->priv->_src), _tmp0_);
	g_object_notify ((GObject *) self, "src");
}


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


static void deja_dup_recursive_op_set_dst (DejaDupRecursiveOp* self, GFile* value) {
	GFile* _tmp0_;
	g_return_if_fail (self != NULL);
	self->priv->_dst = (_tmp0_ = _g_object_ref0 (value), _g_object_unref0 (self->priv->_dst), _tmp0_);
	g_object_notify ((GObject *) self, "dst");
}


static void deja_dup_recursive_op_class_init (DejaDupRecursiveOpClass * klass) {
	deja_dup_recursive_op_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (DejaDupRecursiveOpPrivate));
	DEJA_DUP_RECURSIVE_OP_CLASS (klass)->handle_file = deja_dup_recursive_op_real_handle_file;
	DEJA_DUP_RECURSIVE_OP_CLASS (klass)->handle_dir = deja_dup_recursive_op_real_handle_dir;
	DEJA_DUP_RECURSIVE_OP_CLASS (klass)->finish_dir = deja_dup_recursive_op_real_finish_dir;
	DEJA_DUP_RECURSIVE_OP_CLASS (klass)->clone_for_info = deja_dup_recursive_op_real_clone_for_info;
	G_OBJECT_CLASS (klass)->get_property = deja_dup_recursive_op_get_property;
	G_OBJECT_CLASS (klass)->set_property = 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, g_param_spec_object ("src", "src", "src", G_TYPE_FILE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_RECURSIVE_OP_DST, g_param_spec_object ("dst", "dst", "dst", G_TYPE_FILE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	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);
	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_TYPE_FILE, G_TYPE_FILE, G_TYPE_STRING);
}


static void deja_dup_recursive_op_instance_init (DejaDupRecursiveOp * self) {
	self->priv = DEJA_DUP_RECURSIVE_OP_GET_PRIVATE (self);
}


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


GType deja_dup_recursive_op_get_type (void) {
	static volatile gsize deja_dup_recursive_op_type_id__volatile = 0;
	if (g_once_init_enter (&deja_dup_recursive_op_type_id__volatile)) {
		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);
		g_once_init_leave (&deja_dup_recursive_op_type_id__volatile, deja_dup_recursive_op_type_id);
	}
	return deja_dup_recursive_op_type_id__volatile;
}


static void deja_dup_recursive_op_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	DejaDupRecursiveOp * self;
	self = DEJA_DUP_RECURSIVE_OP (object);
	switch (property_id) {
		case DEJA_DUP_RECURSIVE_OP_SRC:
		g_value_set_object (value, deja_dup_recursive_op_get_src (self));
		break;
		case DEJA_DUP_RECURSIVE_OP_DST:
		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 deja_dup_recursive_op_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	DejaDupRecursiveOp * self;
	self = DEJA_DUP_RECURSIVE_OP (object);
	switch (property_id) {
		case DEJA_DUP_RECURSIVE_OP_SRC:
		deja_dup_recursive_op_set_src (self, g_value_get_object (value));
		break;
		case DEJA_DUP_RECURSIVE_OP_DST:
		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;
	}
}



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



