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

/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 2 -*- */
/*
    This file is part of Déjà Dup.
    For copyright information, see AUTHORS.

    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>
#include <glib/gi18n-lib.h>


#define DEJA_DUP_TYPE_OPERATION (deja_dup_operation_get_type ())
#define DEJA_DUP_OPERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_OPERATION, DejaDupOperation))
#define DEJA_DUP_OPERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_OPERATION, DejaDupOperationClass))
#define DEJA_DUP_IS_OPERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_OPERATION))
#define DEJA_DUP_IS_OPERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_OPERATION))
#define DEJA_DUP_OPERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_OPERATION, DejaDupOperationClass))

typedef struct _DejaDupOperation DejaDupOperation;
typedef struct _DejaDupOperationClass DejaDupOperationClass;
typedef struct _DejaDupOperationPrivate DejaDupOperationPrivate;

#define DEJA_DUP_TYPE_TOOL_JOB (deja_dup_tool_job_get_type ())
#define DEJA_DUP_TOOL_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_TOOL_JOB, DejaDupToolJob))
#define DEJA_DUP_TOOL_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_TOOL_JOB, DejaDupToolJobClass))
#define DEJA_DUP_IS_TOOL_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_TOOL_JOB))
#define DEJA_DUP_IS_TOOL_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_TOOL_JOB))
#define DEJA_DUP_TOOL_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_TOOL_JOB, DejaDupToolJobClass))

typedef struct _DejaDupToolJob DejaDupToolJob;
typedef struct _DejaDupToolJobClass DejaDupToolJobClass;

#define DEJA_DUP_TYPE_OPERATION_RESTORE (deja_dup_operation_restore_get_type ())
#define DEJA_DUP_OPERATION_RESTORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_OPERATION_RESTORE, DejaDupOperationRestore))
#define DEJA_DUP_OPERATION_RESTORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_OPERATION_RESTORE, DejaDupOperationRestoreClass))
#define DEJA_DUP_IS_OPERATION_RESTORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_OPERATION_RESTORE))
#define DEJA_DUP_IS_OPERATION_RESTORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_OPERATION_RESTORE))
#define DEJA_DUP_OPERATION_RESTORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_OPERATION_RESTORE, DejaDupOperationRestoreClass))

typedef struct _DejaDupOperationRestore DejaDupOperationRestore;
typedef struct _DejaDupOperationRestoreClass DejaDupOperationRestoreClass;
typedef struct _DejaDupOperationRestorePrivate DejaDupOperationRestorePrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))

#define DEJA_DUP_TOOL_JOB_TYPE_MODE (deja_dup_tool_job_mode_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _DejaDupOperationRestoreStartData DejaDupOperationRestoreStartData;

#define DEJA_DUP_TYPE_TIMESTAMP_TYPE (deja_dup_timestamp_type_get_type ())
typedef struct _DejaDupOperationRestoreOperationFinishedData DejaDupOperationRestoreOperationFinishedData;

struct _DejaDupOperation {
	GObject parent_instance;
	DejaDupOperationPrivate * priv;
	DejaDupToolJob* job;
	gchar* passphrase;
};

struct _DejaDupOperationClass {
	GObjectClass parent_class;
	void (*start) (DejaDupOperation* self, gboolean try_claim_bus, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*start_finish) (DejaDupOperation* self, GAsyncResult* _res_);
	void (*connect_to_job) (DejaDupOperation* self);
	void (*send_action_file_changed) (DejaDupOperation* self, GFile* file, gboolean actual);
	void (*operation_finished) (DejaDupOperation* self, DejaDupToolJob* job, gboolean success, gboolean cancelled, const gchar* detail, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*operation_finished_finish) (DejaDupOperation* self, GAsyncResult* _res_);
	GList* (*make_argv) (DejaDupOperation* self);
};

struct _DejaDupOperationRestore {
	DejaDupOperation parent_instance;
	DejaDupOperationRestorePrivate * priv;
};

struct _DejaDupOperationRestoreClass {
	DejaDupOperationClass parent_class;
};

struct _DejaDupOperationRestorePrivate {
	gchar* _dest;
	gchar* _time;
	GList* _restore_files;
};

typedef enum  {
	DEJA_DUP_TOOL_JOB_MODE_INVALID,
	DEJA_DUP_TOOL_JOB_MODE_BACKUP,
	DEJA_DUP_TOOL_JOB_MODE_RESTORE,
	DEJA_DUP_TOOL_JOB_MODE_STATUS,
	DEJA_DUP_TOOL_JOB_MODE_LIST,
	DEJA_DUP_TOOL_JOB_MODE_HISTORY
} DejaDupToolJobMode;

struct _DejaDupOperationRestoreStartData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	DejaDupOperationRestore* self;
	gboolean try_claim_bus;
	const gchar* _tmp0_;
	gboolean _tmp1_;
};

typedef enum  {
	DEJA_DUP_TIMESTAMP_TYPE_NONE,
	DEJA_DUP_TIMESTAMP_TYPE_BACKUP,
	DEJA_DUP_TIMESTAMP_TYPE_RESTORE
} DejaDupTimestampType;

struct _DejaDupOperationRestoreOperationFinishedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	DejaDupOperationRestore* self;
	DejaDupToolJob* job;
	gboolean success;
	gboolean cancelled;
	gchar* detail;
	gboolean _tmp0_;
	DejaDupToolJob* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	const gchar* _tmp4_;
};


static gpointer deja_dup_operation_restore_parent_class = NULL;

GType deja_dup_operation_get_type (void) G_GNUC_CONST;
GType deja_dup_tool_job_get_type (void) G_GNUC_CONST;
GType deja_dup_operation_restore_get_type (void) G_GNUC_CONST;
#define DEJA_DUP_OPERATION_RESTORE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DEJA_DUP_TYPE_OPERATION_RESTORE, DejaDupOperationRestorePrivate))
enum  {
	DEJA_DUP_OPERATION_RESTORE_DUMMY_PROPERTY,
	DEJA_DUP_OPERATION_RESTORE_DEST,
	DEJA_DUP_OPERATION_RESTORE_TIME,
	DEJA_DUP_OPERATION_RESTORE_RESTORE_FILES
};
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
DejaDupOperationRestore* deja_dup_operation_restore_new (const gchar* dest_in, const gchar* time_in, GList* files_in);
DejaDupOperationRestore* deja_dup_operation_restore_construct (GType object_type, const gchar* dest_in, const gchar* time_in, GList* files_in);
GType deja_dup_tool_job_mode_get_type (void) G_GNUC_CONST;
static void deja_dup_operation_restore_real_start_data_free (gpointer _data);
static void deja_dup_operation_restore_real_start (DejaDupOperation* base, gboolean try_claim_bus, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean deja_dup_operation_restore_real_start_co (DejaDupOperationRestoreStartData* _data_);
void deja_dup_operation_start (DejaDupOperation* self, gboolean try_claim_bus, GAsyncReadyCallback _callback_, gpointer _user_data_);
void deja_dup_operation_start_finish (DejaDupOperation* self, GAsyncResult* _res_);
static void deja_dup_operation_restore_start_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static GList* deja_dup_operation_restore_real_make_argv (DejaDupOperation* base);
GList* deja_dup_operation_restore_get_restore_files (DejaDupOperationRestore* self);
void deja_dup_tool_job_set_restore_files (DejaDupToolJob* self, GList* value);
const gchar* deja_dup_operation_restore_get_time (DejaDupOperationRestore* self);
void deja_dup_tool_job_set_time (DejaDupToolJob* self, const gchar* value);
const gchar* deja_dup_operation_restore_get_dest (DejaDupOperationRestore* self);
void deja_dup_tool_job_set_local (DejaDupToolJob* self, GFile* value);
static void deja_dup_operation_restore_real_operation_finished_data_free (gpointer _data);
static void deja_dup_operation_restore_real_operation_finished (DejaDupOperation* base, DejaDupToolJob* job, gboolean success, gboolean cancelled, const gchar* detail, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean deja_dup_operation_restore_real_operation_finished_co (DejaDupOperationRestoreOperationFinishedData* _data_);
GType deja_dup_timestamp_type_get_type (void) G_GNUC_CONST;
void deja_dup_update_last_run_timestamp (DejaDupTimestampType type);
void deja_dup_operation_operation_finished (DejaDupOperation* self, DejaDupToolJob* job, gboolean success, gboolean cancelled, const gchar* detail, GAsyncReadyCallback _callback_, gpointer _user_data_);
void deja_dup_operation_operation_finished_finish (DejaDupOperation* self, GAsyncResult* _res_);
static void deja_dup_operation_restore_operation_finished_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void deja_dup_operation_restore_set_dest (DejaDupOperationRestore* self, const gchar* value);
static void deja_dup_operation_restore_set_time (DejaDupOperationRestore* self, const gchar* value);
static void deja_dup_operation_restore_set_restore_files (DejaDupOperationRestore* self, GList* value);
static void deja_dup_operation_restore_finalize (GObject* obj);
static void _vala_deja_dup_operation_restore_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_deja_dup_operation_restore_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


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


static void _g_list_free__g_object_unref0_ (GList* self) {
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
	g_list_free (self);
}


DejaDupOperationRestore* deja_dup_operation_restore_construct (GType object_type, const gchar* dest_in, const gchar* time_in, GList* files_in) {
	DejaDupOperationRestore * self = NULL;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	GList* _tmp2_ = NULL;
	g_return_val_if_fail (dest_in != NULL, NULL);
	_tmp0_ = dest_in;
	_tmp1_ = time_in;
	_tmp2_ = files_in;
	self = (DejaDupOperationRestore*) g_object_new (object_type, "dest", _tmp0_, "time", _tmp1_, "restore-files", _tmp2_, "mode", DEJA_DUP_TOOL_JOB_MODE_RESTORE, NULL);
	return self;
}


DejaDupOperationRestore* deja_dup_operation_restore_new (const gchar* dest_in, const gchar* time_in, GList* files_in) {
	return deja_dup_operation_restore_construct (DEJA_DUP_TYPE_OPERATION_RESTORE, dest_in, time_in, files_in);
}


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


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


static void deja_dup_operation_restore_real_start (DejaDupOperation* base, gboolean try_claim_bus, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	DejaDupOperationRestore * self;
	DejaDupOperationRestoreStartData* _data_;
	DejaDupOperationRestore* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	self = (DejaDupOperationRestore*) base;
	_data_ = g_slice_new0 (DejaDupOperationRestoreStartData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, deja_dup_operation_restore_real_start);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, deja_dup_operation_restore_real_start_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = try_claim_bus;
	_data_->try_claim_bus = _tmp1_;
	deja_dup_operation_restore_real_start_co (_data_);
}


static void deja_dup_operation_restore_real_start_finish (DejaDupOperation* base, GAsyncResult* _res_) {
	DejaDupOperationRestoreStartData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void deja_dup_operation_restore_start_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	DejaDupOperationRestoreStartData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_operation_restore_real_start_co (_data_);
}


static gboolean deja_dup_operation_restore_real_start_co (DejaDupOperationRestoreStartData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _ ("Restoring files…");
	g_signal_emit_by_name ((DejaDupOperation*) _data_->self, "action-desc-changed", _data_->_tmp0_);
	_data_->_tmp1_ = FALSE;
	_data_->_tmp1_ = _data_->try_claim_bus;
	_data_->_state_ = 1;
	DEJA_DUP_OPERATION_CLASS (deja_dup_operation_restore_parent_class)->start (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, DEJA_DUP_TYPE_OPERATION, DejaDupOperation), _data_->_tmp1_, deja_dup_operation_restore_start_ready, _data_);
	return FALSE;
	_state_1:
	DEJA_DUP_OPERATION_CLASS (deja_dup_operation_restore_parent_class)->start_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, DEJA_DUP_TYPE_OPERATION, DejaDupOperation), _data_->_res_);
	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 GList* deja_dup_operation_restore_real_make_argv (DejaDupOperation* base) {
	DejaDupOperationRestore * self;
	GList* result = NULL;
	DejaDupToolJob* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	GList* _tmp2_ = NULL;
	DejaDupToolJob* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	DejaDupToolJob* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	GFile* _tmp7_ = NULL;
	GFile* _tmp8_ = NULL;
	self = (DejaDupOperationRestore*) base;
	_tmp0_ = ((DejaDupOperation*) self)->job;
	_tmp1_ = deja_dup_operation_restore_get_restore_files (self);
	_tmp2_ = _tmp1_;
	deja_dup_tool_job_set_restore_files (_tmp0_, _tmp2_);
	_tmp3_ = ((DejaDupOperation*) self)->job;
	_tmp4_ = self->priv->_time;
	deja_dup_tool_job_set_time (_tmp3_, _tmp4_);
	_tmp5_ = ((DejaDupOperation*) self)->job;
	_tmp6_ = self->priv->_dest;
	_tmp7_ = g_file_new_for_path (_tmp6_);
	_tmp8_ = _tmp7_;
	deja_dup_tool_job_set_local (_tmp5_, _tmp8_);
	_g_object_unref0 (_tmp8_);
	result = NULL;
	return result;
}


static void deja_dup_operation_restore_real_operation_finished_data_free (gpointer _data) {
	DejaDupOperationRestoreOperationFinishedData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->job);
	_g_free0 (_data_->detail);
	_g_object_unref0 (_data_->self);
	g_slice_free (DejaDupOperationRestoreOperationFinishedData, _data_);
}


static void deja_dup_operation_restore_real_operation_finished (DejaDupOperation* base, DejaDupToolJob* job, gboolean success, gboolean cancelled, const gchar* detail, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	DejaDupOperationRestore * self;
	DejaDupOperationRestoreOperationFinishedData* _data_;
	DejaDupOperationRestore* _tmp0_ = NULL;
	DejaDupToolJob* _tmp1_ = NULL;
	DejaDupToolJob* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	self = (DejaDupOperationRestore*) base;
	_data_ = g_slice_new0 (DejaDupOperationRestoreOperationFinishedData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, deja_dup_operation_restore_real_operation_finished);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, deja_dup_operation_restore_real_operation_finished_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = job;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->job);
	_data_->job = _tmp2_;
	_tmp3_ = success;
	_data_->success = _tmp3_;
	_tmp4_ = cancelled;
	_data_->cancelled = _tmp4_;
	_tmp5_ = detail;
	_tmp6_ = g_strdup (_tmp5_);
	_g_free0 (_data_->detail);
	_data_->detail = _tmp6_;
	deja_dup_operation_restore_real_operation_finished_co (_data_);
}


static void deja_dup_operation_restore_real_operation_finished_finish (DejaDupOperation* base, GAsyncResult* _res_) {
	DejaDupOperationRestoreOperationFinishedData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void deja_dup_operation_restore_operation_finished_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	DejaDupOperationRestoreOperationFinishedData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_operation_restore_real_operation_finished_co (_data_);
}


static gboolean deja_dup_operation_restore_real_operation_finished_co (DejaDupOperationRestoreOperationFinishedData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = FALSE;
	_data_->_tmp0_ = _data_->success;
	if (_data_->_tmp0_) {
		deja_dup_update_last_run_timestamp (DEJA_DUP_TIMESTAMP_TYPE_RESTORE);
	}
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->job;
	_data_->_tmp2_ = FALSE;
	_data_->_tmp2_ = _data_->success;
	_data_->_tmp3_ = FALSE;
	_data_->_tmp3_ = _data_->cancelled;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _data_->detail;
	_data_->_state_ = 1;
	DEJA_DUP_OPERATION_CLASS (deja_dup_operation_restore_parent_class)->operation_finished (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, DEJA_DUP_TYPE_OPERATION, DejaDupOperation), _data_->_tmp1_, _data_->_tmp2_, _data_->_tmp3_, _data_->_tmp4_, deja_dup_operation_restore_operation_finished_ready, _data_);
	return FALSE;
	_state_1:
	DEJA_DUP_OPERATION_CLASS (deja_dup_operation_restore_parent_class)->operation_finished_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, DEJA_DUP_TYPE_OPERATION, DejaDupOperation), _data_->_res_);
	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;
}


const gchar* deja_dup_operation_restore_get_dest (DejaDupOperationRestore* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_dest;
	result = _tmp0_;
	return result;
}


static void deja_dup_operation_restore_set_dest (DejaDupOperationRestore* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_dest);
	self->priv->_dest = _tmp1_;
	g_object_notify ((GObject *) self, "dest");
}


const gchar* deja_dup_operation_restore_get_time (DejaDupOperationRestore* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_time;
	result = _tmp0_;
	return result;
}


static void deja_dup_operation_restore_set_time (DejaDupOperationRestore* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_time);
	self->priv->_time = _tmp1_;
	g_object_notify ((GObject *) self, "time");
}


GList* deja_dup_operation_restore_get_restore_files (DejaDupOperationRestore* self) {
	GList* result;
	GList* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_restore_files;
	result = _tmp0_;
	return result;
}


static void deja_dup_operation_restore_set_restore_files (DejaDupOperationRestore* self, GList* value) {
	GList* _tmp0_ = NULL;
	GList* _tmp3_ = NULL;
	GList* _tmp4_ = NULL;
	GList* _tmp5_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_restore_files;
	{
		GList* f_collection = NULL;
		GList* f_it = NULL;
		f_collection = _tmp0_;
		for (f_it = f_collection; f_it != NULL; f_it = f_it->next) {
			GFile* _tmp1_ = NULL;
			GFile* f = NULL;
			_tmp1_ = _g_object_ref0 ((GFile*) f_it->data);
			f = _tmp1_;
			{
				GFile* _tmp2_ = NULL;
				_tmp2_ = f;
				g_object_unref ((GObject*) _tmp2_);
				_g_object_unref0 (f);
			}
		}
	}
	_tmp3_ = value;
	_tmp4_ = g_list_copy (_tmp3_);
	__g_list_free__g_object_unref0_0 (self->priv->_restore_files);
	self->priv->_restore_files = _tmp4_;
	_tmp5_ = self->priv->_restore_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) {
			GFile* _tmp6_ = NULL;
			GFile* f = NULL;
			_tmp6_ = _g_object_ref0 ((GFile*) f_it->data);
			f = _tmp6_;
			{
				GFile* _tmp7_ = NULL;
				_tmp7_ = f;
				g_object_ref ((GObject*) _tmp7_);
				_g_object_unref0 (f);
			}
		}
	}
	g_object_notify ((GObject *) self, "restore-files");
}


static void deja_dup_operation_restore_class_init (DejaDupOperationRestoreClass * klass) {
	deja_dup_operation_restore_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (DejaDupOperationRestorePrivate));
	((DejaDupOperationClass *) klass)->start = deja_dup_operation_restore_real_start;
	((DejaDupOperationClass *) klass)->start_finish = deja_dup_operation_restore_real_start_finish;
	((DejaDupOperationClass *) klass)->make_argv = deja_dup_operation_restore_real_make_argv;
	((DejaDupOperationClass *) klass)->operation_finished = deja_dup_operation_restore_real_operation_finished;
	((DejaDupOperationClass *) klass)->operation_finished_finish = deja_dup_operation_restore_real_operation_finished_finish;
	G_OBJECT_CLASS (klass)->get_property = _vala_deja_dup_operation_restore_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_deja_dup_operation_restore_set_property;
	G_OBJECT_CLASS (klass)->finalize = deja_dup_operation_restore_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_OPERATION_RESTORE_DEST, g_param_spec_string ("dest", "dest", "dest", NULL, 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_OPERATION_RESTORE_TIME, g_param_spec_string ("time", "time", "time", NULL, 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_OPERATION_RESTORE_RESTORE_FILES, g_param_spec_pointer ("restore-files", "restore-files", "restore-files", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}


static void deja_dup_operation_restore_instance_init (DejaDupOperationRestore * self) {
	self->priv = DEJA_DUP_OPERATION_RESTORE_GET_PRIVATE (self);
}


static void deja_dup_operation_restore_finalize (GObject* obj) {
	DejaDupOperationRestore * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DEJA_DUP_TYPE_OPERATION_RESTORE, DejaDupOperationRestore);
	_g_free0 (self->priv->_dest);
	_g_free0 (self->priv->_time);
	__g_list_free__g_object_unref0_0 (self->priv->_restore_files);
	G_OBJECT_CLASS (deja_dup_operation_restore_parent_class)->finalize (obj);
}


GType deja_dup_operation_restore_get_type (void) {
	static volatile gsize deja_dup_operation_restore_type_id__volatile = 0;
	if (g_once_init_enter (&deja_dup_operation_restore_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DejaDupOperationRestoreClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) deja_dup_operation_restore_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DejaDupOperationRestore), 0, (GInstanceInitFunc) deja_dup_operation_restore_instance_init, NULL };
		GType deja_dup_operation_restore_type_id;
		deja_dup_operation_restore_type_id = g_type_register_static (DEJA_DUP_TYPE_OPERATION, "DejaDupOperationRestore", &g_define_type_info, 0);
		g_once_init_leave (&deja_dup_operation_restore_type_id__volatile, deja_dup_operation_restore_type_id);
	}
	return deja_dup_operation_restore_type_id__volatile;
}


static void _vala_deja_dup_operation_restore_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	DejaDupOperationRestore * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DEJA_DUP_TYPE_OPERATION_RESTORE, DejaDupOperationRestore);
	switch (property_id) {
		case DEJA_DUP_OPERATION_RESTORE_DEST:
		g_value_set_string (value, deja_dup_operation_restore_get_dest (self));
		break;
		case DEJA_DUP_OPERATION_RESTORE_TIME:
		g_value_set_string (value, deja_dup_operation_restore_get_time (self));
		break;
		case DEJA_DUP_OPERATION_RESTORE_RESTORE_FILES:
		g_value_set_pointer (value, deja_dup_operation_restore_get_restore_files (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_deja_dup_operation_restore_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	DejaDupOperationRestore * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DEJA_DUP_TYPE_OPERATION_RESTORE, DejaDupOperationRestore);
	switch (property_id) {
		case DEJA_DUP_OPERATION_RESTORE_DEST:
		deja_dup_operation_restore_set_dest (self, g_value_get_string (value));
		break;
		case DEJA_DUP_OPERATION_RESTORE_TIME:
		deja_dup_operation_restore_set_time (self, g_value_get_string (value));
		break;
		case DEJA_DUP_OPERATION_RESTORE_RESTORE_FILES:
		deja_dup_operation_restore_set_restore_files (self, g_value_get_pointer (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



