/* OperationVerify.c generated by valac 0.30.2, the Vala compiler
 * generated from OperationVerify.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>
#include <glib/gstdio.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_VERIFY (deja_dup_operation_verify_get_type ())
#define DEJA_DUP_OPERATION_VERIFY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_OPERATION_VERIFY, DejaDupOperationVerify))
#define DEJA_DUP_OPERATION_VERIFY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_OPERATION_VERIFY, DejaDupOperationVerifyClass))
#define DEJA_DUP_IS_OPERATION_VERIFY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_OPERATION_VERIFY))
#define DEJA_DUP_IS_OPERATION_VERIFY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_OPERATION_VERIFY))
#define DEJA_DUP_OPERATION_VERIFY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_OPERATION_VERIFY, DejaDupOperationVerifyClass))

typedef struct _DejaDupOperationVerify DejaDupOperationVerify;
typedef struct _DejaDupOperationVerifyClass DejaDupOperationVerifyClass;
typedef struct _DejaDupOperationVerifyPrivate DejaDupOperationVerifyPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define DEJA_DUP_TOOL_JOB_TYPE_MODE (deja_dup_tool_job_mode_get_type ())

#define DEJA_DUP_OPERATION_TYPE_STATE (deja_dup_operation_state_get_type ())
#define DEJA_DUP_OPERATION_STATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_OPERATION_TYPE_STATE, DejaDupOperationState))
#define DEJA_DUP_OPERATION_STATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_OPERATION_TYPE_STATE, DejaDupOperationStateClass))
#define DEJA_DUP_OPERATION_IS_STATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_OPERATION_TYPE_STATE))
#define DEJA_DUP_OPERATION_IS_STATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_OPERATION_TYPE_STATE))
#define DEJA_DUP_OPERATION_STATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_OPERATION_TYPE_STATE, DejaDupOperationStateClass))

typedef struct _DejaDupOperationState DejaDupOperationState;
typedef struct _DejaDupOperationStateClass DejaDupOperationStateClass;

#define DEJA_DUP_TYPE_BACKEND (deja_dup_backend_get_type ())
#define DEJA_DUP_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_BACKEND, DejaDupBackend))
#define DEJA_DUP_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_BACKEND, DejaDupBackendClass))
#define DEJA_DUP_IS_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_BACKEND))
#define DEJA_DUP_IS_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_BACKEND))
#define DEJA_DUP_BACKEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_BACKEND, DejaDupBackendClass))

typedef struct _DejaDupBackend DejaDupBackend;
typedef struct _DejaDupBackendClass DejaDupBackendClass;
typedef struct _DejaDupOperationStatePrivate DejaDupOperationStatePrivate;
#define _deja_dup_operation_state_unref0(var) ((var == NULL) ? NULL : (var = (deja_dup_operation_state_unref (var), NULL)))
typedef struct _DejaDupOperationVerifyStartData DejaDupOperationVerifyStartData;

#define DEJA_DUP_TOOL_JOB_TYPE_FLAGS (deja_dup_tool_job_flags_get_type ())
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#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;

#define DEJA_DUP_TYPE_RECURSIVE_DELETE (deja_dup_recursive_delete_get_type ())
#define DEJA_DUP_RECURSIVE_DELETE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_RECURSIVE_DELETE, DejaDupRecursiveDelete))
#define DEJA_DUP_RECURSIVE_DELETE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_RECURSIVE_DELETE, DejaDupRecursiveDeleteClass))
#define DEJA_DUP_IS_RECURSIVE_DELETE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_RECURSIVE_DELETE))
#define DEJA_DUP_IS_RECURSIVE_DELETE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_RECURSIVE_DELETE))
#define DEJA_DUP_RECURSIVE_DELETE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_RECURSIVE_DELETE, DejaDupRecursiveDeleteClass))

typedef struct _DejaDupRecursiveDelete DejaDupRecursiveDelete;
typedef struct _DejaDupRecursiveDeleteClass DejaDupRecursiveDeleteClass;
typedef struct _DejaDupOperationVerifyOperationFinishedData DejaDupOperationVerifyOperationFinishedData;

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 _DejaDupOperationVerify {
	DejaDupOperation parent_instance;
	DejaDupOperationVerifyPrivate * priv;
};

struct _DejaDupOperationVerifyClass {
	DejaDupOperationClass parent_class;
};

struct _DejaDupOperationVerifyPrivate {
	GFile* metadir;
	GFile* destdir;
	gboolean nag;
};

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 _DejaDupOperationState {
	GTypeInstance parent_instance;
	volatile int ref_count;
	DejaDupOperationStatePrivate * priv;
	DejaDupBackend* backend;
	gchar* passphrase;
};

struct _DejaDupOperationStateClass {
	GTypeClass parent_class;
	void (*finalize) (DejaDupOperationState *self);
};

struct _DejaDupOperationVerifyStartData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	DejaDupOperationVerify* self;
	gboolean try_claim_bus;
	gboolean _tmp0_;
	DejaDupOperationState* fake_state;
	DejaDupOperationState* _tmp1_;
	DejaDupOperationState* _tmp2_;
	DejaDupBackend* _tmp3_;
	DejaDupBackend* _tmp4_;
	DejaDupBackend* _tmp5_;
	DejaDupOperationState* _tmp6_;
	const gchar* _tmp7_;
	gboolean _tmp8_;
};

typedef enum  {
	DEJA_DUP_TOOL_JOB_FLAGS_NO_PROGRESS,
	DEJA_DUP_TOOL_JOB_FLAGS_NO_CACHE
} DejaDupToolJobFlags;

struct _DejaDupOperationVerifyOperationFinishedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	DejaDupOperationVerify* self;
	DejaDupToolJob* job;
	gboolean success;
	gboolean cancelled;
	gchar* detail;
	gboolean _tmp0_;
	gboolean verified;
	gchar* contents;
	GFile* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GError* e;
	gboolean _tmp7_;
	gchar** lines;
	const gchar* _tmp8_;
	gchar** _tmp9_;
	gchar** _tmp10_;
	gint lines_length1;
	gint _lines_size_;
	gchar** _tmp11_;
	gint _tmp11__length1;
	const gchar* _tmp12_;
	gboolean _tmp13_;
	const gchar* _tmp14_;
	gboolean _tmp15_;
	GFile* _tmp16_;
	DejaDupRecursiveDelete* _tmp17_;
	DejaDupRecursiveDelete* _tmp18_;
	DejaDupToolJob* _tmp19_;
	gboolean _tmp20_;
	gboolean _tmp21_;
	const gchar* _tmp22_;
	GError * _inner_error_;
};


static gpointer deja_dup_operation_verify_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_verify_get_type (void) G_GNUC_CONST;
#define DEJA_DUP_OPERATION_VERIFY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DEJA_DUP_TYPE_OPERATION_VERIFY, DejaDupOperationVerifyPrivate))
enum  {
	DEJA_DUP_OPERATION_VERIFY_DUMMY_PROPERTY
};
DejaDupOperationVerify* deja_dup_operation_verify_new (void);
DejaDupOperationVerify* deja_dup_operation_verify_construct (GType object_type);
GType deja_dup_tool_job_mode_get_type (void) G_GNUC_CONST;
static void deja_dup_operation_verify_real_start_data_free (gpointer _data);
static void deja_dup_operation_verify_real_start (DejaDupOperation* base, gboolean try_claim_bus, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean deja_dup_operation_verify_real_start_co (DejaDupOperationVerifyStartData* _data_);
gpointer deja_dup_operation_state_ref (gpointer instance);
void deja_dup_operation_state_unref (gpointer instance);
GParamSpec* deja_dup_operation_param_spec_state (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void deja_dup_operation_value_set_state (GValue* value, gpointer v_object);
void deja_dup_operation_value_take_state (GValue* value, gpointer v_object);
gpointer deja_dup_operation_value_get_state (const GValue* value);
GType deja_dup_operation_state_get_type (void) G_GNUC_CONST;
DejaDupOperationState* deja_dup_operation_state_new (void);
DejaDupOperationState* deja_dup_operation_state_construct (GType object_type);
GType deja_dup_backend_get_type (void) G_GNUC_CONST;
DejaDupBackend* deja_dup_operation_get_backend (DejaDupOperation* self);
DejaDupBackend* deja_dup_backend_clone (DejaDupBackend* self);
void deja_dup_operation_set_state (DejaDupOperation* self, DejaDupOperationState* state);
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_verify_start_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void deja_dup_operation_verify_real_connect_to_job (DejaDupOperation* base);
GType deja_dup_tool_job_flags_get_type (void) G_GNUC_CONST;
DejaDupToolJobFlags deja_dup_tool_job_get_flags (DejaDupToolJob* self);
void deja_dup_tool_job_set_flags (DejaDupToolJob* self, DejaDupToolJobFlags value);
GList* deja_dup_tool_job_get_restore_files (DejaDupToolJob* self);
void deja_dup_tool_job_set_restore_files (DejaDupToolJob* self, GList* value);
void deja_dup_tool_job_set_local (DejaDupToolJob* self, GFile* value);
void deja_dup_operation_connect_to_job (DejaDupOperation* self);
static void deja_dup_operation_verify_real_operation_finished_data_free (gpointer _data);
static void deja_dup_operation_verify_real_operation_finished (DejaDupOperation* base, DejaDupToolJob* job, gboolean success, gboolean cancelled, const gchar* detail, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean deja_dup_operation_verify_real_operation_finished_co (DejaDupOperationVerifyOperationFinishedData* _data_);
void deja_dup_update_nag_time (gboolean cancel);
DejaDupRecursiveDelete* deja_dup_recursive_delete_new (GFile* source, const gchar* skip);
DejaDupRecursiveDelete* deja_dup_recursive_delete_construct (GType object_type, GFile* source, const gchar* skip);
GType deja_dup_recursive_op_get_type (void) G_GNUC_CONST;
GType deja_dup_recursive_delete_get_type (void) G_GNUC_CONST;
void deja_dup_recursive_op_start (DejaDupRecursiveOp* self);
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_verify_operation_finished_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static GObject * deja_dup_operation_verify_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
gboolean deja_dup_is_nag_time (void);
void deja_dup_operation_set_use_cached_password (DejaDupOperation* self, gboolean value);
static void deja_dup_operation_verify_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);


DejaDupOperationVerify* deja_dup_operation_verify_construct (GType object_type) {
	DejaDupOperationVerify * self = NULL;
	self = (DejaDupOperationVerify*) g_object_new (object_type, "mode", DEJA_DUP_TOOL_JOB_MODE_RESTORE, NULL);
	return self;
}


DejaDupOperationVerify* deja_dup_operation_verify_new (void) {
	return deja_dup_operation_verify_construct (DEJA_DUP_TYPE_OPERATION_VERIFY);
}


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


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


static void deja_dup_operation_verify_real_start (DejaDupOperation* base, gboolean try_claim_bus, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	DejaDupOperationVerify * self;
	DejaDupOperationVerifyStartData* _data_;
	DejaDupOperationVerify* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	self = (DejaDupOperationVerify*) base;
	_data_ = g_slice_new0 (DejaDupOperationVerifyStartData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, deja_dup_operation_verify_real_start);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, deja_dup_operation_verify_real_start_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = try_claim_bus;
	_data_->try_claim_bus = _tmp1_;
	deja_dup_operation_verify_real_start_co (_data_);
}


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


static void deja_dup_operation_verify_start_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	DejaDupOperationVerifyStartData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_operation_verify_real_start_co (_data_);
}


static gboolean deja_dup_operation_verify_real_start_co (DejaDupOperationVerifyStartData* _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_->self->priv->nag;
	if (_data_->_tmp0_) {
		_data_->_tmp1_ = NULL;
		_data_->_tmp1_ = deja_dup_operation_state_new ();
		_data_->fake_state = _data_->_tmp1_;
		_data_->_tmp2_ = NULL;
		_data_->_tmp2_ = _data_->fake_state;
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = deja_dup_operation_get_backend ((DejaDupOperation*) _data_->self);
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = _data_->_tmp3_;
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = deja_dup_backend_clone (_data_->_tmp4_);
		_g_object_unref0 (_data_->_tmp2_->backend);
		_data_->_tmp2_->backend = _data_->_tmp5_;
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = _data_->fake_state;
		deja_dup_operation_set_state ((DejaDupOperation*) _data_->self, _data_->_tmp6_);
		_deja_dup_operation_state_unref0 (_data_->fake_state);
	}
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = _ ("Verifying backup…");
	g_signal_emit_by_name ((DejaDupOperation*) _data_->self, "action-desc-changed", _data_->_tmp7_);
	_data_->_tmp8_ = FALSE;
	_data_->_tmp8_ = _data_->try_claim_bus;
	_data_->_state_ = 1;
	DEJA_DUP_OPERATION_CLASS (deja_dup_operation_verify_parent_class)->start (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, DEJA_DUP_TYPE_OPERATION, DejaDupOperation), _data_->_tmp8_, deja_dup_operation_verify_start_ready, _data_);
	return FALSE;
	_state_1:
	DEJA_DUP_OPERATION_CLASS (deja_dup_operation_verify_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 void deja_dup_operation_verify_real_connect_to_job (DejaDupOperation* base) {
	DejaDupOperationVerify * self;
	gboolean _tmp0_ = FALSE;
	gchar* cachedir = NULL;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	GFile* _tmp9_ = NULL;
	DejaDupToolJob* _tmp10_ = NULL;
	GList* _tmp11_ = NULL;
	GList* _tmp12_ = NULL;
	GFile* _tmp13_ = NULL;
	GFile* _tmp14_ = NULL;
	GFile* _tmp15_ = NULL;
	DejaDupToolJob* _tmp16_ = NULL;
	GFile* _tmp17_ = NULL;
	self = (DejaDupOperationVerify*) base;
	_tmp0_ = self->priv->nag;
	if (_tmp0_) {
		DejaDupToolJob* _tmp1_ = NULL;
		DejaDupToolJob* _tmp2_ = NULL;
		DejaDupToolJobFlags _tmp3_ = 0;
		DejaDupToolJobFlags _tmp4_ = 0;
		_tmp1_ = ((DejaDupOperation*) self)->job;
		_tmp2_ = ((DejaDupOperation*) self)->job;
		_tmp3_ = deja_dup_tool_job_get_flags (_tmp2_);
		_tmp4_ = _tmp3_;
		deja_dup_tool_job_set_flags (_tmp2_, _tmp4_ | DEJA_DUP_TOOL_JOB_FLAGS_NO_CACHE);
	}
	_tmp5_ = g_get_user_cache_dir ();
	_tmp6_ = g_strdup (_tmp5_);
	cachedir = _tmp6_;
	_tmp7_ = g_build_filename (cachedir, PACKAGE, "metadata", NULL);
	_tmp8_ = _tmp7_;
	_tmp9_ = g_file_new_for_path (_tmp8_);
	_g_object_unref0 (self->priv->metadir);
	self->priv->metadir = _tmp9_;
	_g_free0 (_tmp8_);
	_tmp10_ = ((DejaDupOperation*) self)->job;
	_tmp11_ = deja_dup_tool_job_get_restore_files (_tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = self->priv->metadir;
	_tmp14_ = _g_object_ref0 (_tmp13_);
	deja_dup_tool_job_set_restore_files (_tmp10_, g_list_append (_tmp12_, _tmp14_));
	_tmp15_ = g_file_new_for_path ("/");
	_g_object_unref0 (self->priv->destdir);
	self->priv->destdir = _tmp15_;
	_tmp16_ = ((DejaDupOperation*) self)->job;
	_tmp17_ = self->priv->destdir;
	deja_dup_tool_job_set_local (_tmp16_, _tmp17_);
	DEJA_DUP_OPERATION_CLASS (deja_dup_operation_verify_parent_class)->connect_to_job (G_TYPE_CHECK_INSTANCE_CAST (self, DEJA_DUP_TYPE_OPERATION, DejaDupOperation));
	_g_free0 (cachedir);
}


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


static void deja_dup_operation_verify_real_operation_finished (DejaDupOperation* base, DejaDupToolJob* job, gboolean success, gboolean cancelled, const gchar* detail, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	DejaDupOperationVerify * self;
	DejaDupOperationVerifyOperationFinishedData* _data_;
	DejaDupOperationVerify* _tmp0_ = NULL;
	DejaDupToolJob* _tmp1_ = NULL;
	DejaDupToolJob* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	self = (DejaDupOperationVerify*) base;
	_data_ = g_slice_new0 (DejaDupOperationVerifyOperationFinishedData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, deja_dup_operation_verify_real_operation_finished);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, deja_dup_operation_verify_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_verify_real_operation_finished_co (_data_);
}


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


static void deja_dup_operation_verify_operation_finished_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	DejaDupOperationVerifyOperationFinishedData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_operation_verify_real_operation_finished_co (_data_);
}


static gboolean deja_dup_operation_verify_real_operation_finished_co (DejaDupOperationVerifyOperationFinishedData* _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_) {
		_data_->verified = TRUE;
		{
			_data_->_tmp1_ = NULL;
			_data_->_tmp1_ = _data_->self->priv->metadir;
			_data_->_tmp2_ = NULL;
			_data_->_tmp2_ = g_file_get_path (_data_->_tmp1_);
			_data_->_tmp3_ = NULL;
			_data_->_tmp3_ = _data_->_tmp2_;
			_data_->_tmp4_ = NULL;
			_data_->_tmp4_ = g_build_filename (_data_->_tmp3_, "README", NULL);
			_data_->_tmp5_ = NULL;
			_data_->_tmp5_ = _data_->_tmp4_;
			_data_->_tmp6_ = NULL;
			g_file_get_contents (_data_->_tmp5_, &_data_->_tmp6_, NULL, &_data_->_inner_error_);
			_g_free0 (_data_->contents);
			_data_->contents = _data_->_tmp6_;
			_g_free0 (_data_->_tmp5_);
			_g_free0 (_data_->_tmp3_);
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
				goto __catch38_g_error;
			}
		}
		goto __finally38;
		__catch38_g_error:
		{
			_data_->e = _data_->_inner_error_;
			_data_->_inner_error_ = NULL;
			_data_->verified = FALSE;
			_g_error_free0 (_data_->e);
		}
		__finally38:
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
			_g_free0 (_data_->contents);
			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;
		}
		_data_->_tmp7_ = FALSE;
		_data_->_tmp7_ = _data_->verified;
		if (_data_->_tmp7_) {
			_data_->_tmp8_ = NULL;
			_data_->_tmp8_ = _data_->contents;
			_data_->_tmp9_ = NULL;
			_data_->_tmp10_ = NULL;
			_data_->_tmp10_ = _data_->_tmp9_ = g_strsplit (_data_->_tmp8_, "\n", 0);
			_data_->lines_length1 = 0;
			_data_->_lines_size_ = 0;
			_data_->lines = _data_->_tmp10_;
			_data_->lines_length1 = _vala_array_length (_data_->_tmp9_);
			_data_->_lines_size_ = _data_->lines_length1;
			_data_->_tmp11_ = NULL;
			_data_->_tmp11__length1 = 0;
			_data_->_tmp11_ = _data_->lines;
			_data_->_tmp11__length1 = _data_->lines_length1;
			_data_->_tmp12_ = NULL;
			_data_->_tmp12_ = _data_->_tmp11_[0];
			_data_->verified = g_strcmp0 (_data_->_tmp12_, "This folder can be safely deleted.") == 0;
			_data_->lines = (_vala_array_free (_data_->lines, _data_->lines_length1, (GDestroyNotify) g_free), NULL);
		}
		_data_->_tmp13_ = FALSE;
		_data_->_tmp13_ = _data_->verified;
		if (!_data_->_tmp13_) {
			_data_->_tmp14_ = NULL;
			_data_->_tmp14_ = _ ("Your backup appears to be corrupted.  You should delete the backup and" \
" try again.");
			g_signal_emit_by_name ((DejaDupOperation*) _data_->self, "raise-error", _data_->_tmp14_, NULL);
			_data_->success = FALSE;
		}
		_data_->_tmp15_ = FALSE;
		_data_->_tmp15_ = _data_->self->priv->nag;
		if (_data_->_tmp15_) {
			deja_dup_update_nag_time (FALSE);
		}
		_g_free0 (_data_->contents);
	}
	_data_->_tmp16_ = NULL;
	_data_->_tmp16_ = _data_->self->priv->metadir;
	_data_->_tmp17_ = NULL;
	_data_->_tmp17_ = deja_dup_recursive_delete_new (_data_->_tmp16_, NULL);
	_data_->_tmp18_ = NULL;
	_data_->_tmp18_ = _data_->_tmp17_;
	deja_dup_recursive_op_start ((DejaDupRecursiveOp*) _data_->_tmp18_);
	_g_object_unref0 (_data_->_tmp18_);
	_data_->_tmp19_ = NULL;
	_data_->_tmp19_ = _data_->job;
	_data_->_tmp20_ = FALSE;
	_data_->_tmp20_ = _data_->success;
	_data_->_tmp21_ = FALSE;
	_data_->_tmp21_ = _data_->cancelled;
	_data_->_tmp22_ = NULL;
	_data_->_tmp22_ = _data_->detail;
	_data_->_state_ = 1;
	DEJA_DUP_OPERATION_CLASS (deja_dup_operation_verify_parent_class)->operation_finished (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, DEJA_DUP_TYPE_OPERATION, DejaDupOperation), _data_->_tmp19_, _data_->_tmp20_, _data_->_tmp21_, _data_->_tmp22_, deja_dup_operation_verify_operation_finished_ready, _data_);
	return FALSE;
	_state_1:
	DEJA_DUP_OPERATION_CLASS (deja_dup_operation_verify_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;
}


static GObject * deja_dup_operation_verify_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	DejaDupOperationVerify * self;
	gboolean _tmp0_ = FALSE;
	parent_class = G_OBJECT_CLASS (deja_dup_operation_verify_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DEJA_DUP_TYPE_OPERATION_VERIFY, DejaDupOperationVerify);
	_tmp0_ = deja_dup_is_nag_time ();
	if (_tmp0_) {
		deja_dup_operation_set_use_cached_password ((DejaDupOperation*) self, FALSE);
		self->priv->nag = TRUE;
	}
	return obj;
}


static void deja_dup_operation_verify_class_init (DejaDupOperationVerifyClass * klass) {
	deja_dup_operation_verify_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (DejaDupOperationVerifyPrivate));
	((DejaDupOperationClass *) klass)->start = deja_dup_operation_verify_real_start;
	((DejaDupOperationClass *) klass)->start_finish = deja_dup_operation_verify_real_start_finish;
	((DejaDupOperationClass *) klass)->connect_to_job = deja_dup_operation_verify_real_connect_to_job;
	((DejaDupOperationClass *) klass)->operation_finished = deja_dup_operation_verify_real_operation_finished;
	((DejaDupOperationClass *) klass)->operation_finished_finish = deja_dup_operation_verify_real_operation_finished_finish;
	G_OBJECT_CLASS (klass)->constructor = deja_dup_operation_verify_constructor;
	G_OBJECT_CLASS (klass)->finalize = deja_dup_operation_verify_finalize;
}


static void deja_dup_operation_verify_instance_init (DejaDupOperationVerify * self) {
	self->priv = DEJA_DUP_OPERATION_VERIFY_GET_PRIVATE (self);
}


static void deja_dup_operation_verify_finalize (GObject* obj) {
	DejaDupOperationVerify * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DEJA_DUP_TYPE_OPERATION_VERIFY, DejaDupOperationVerify);
	_g_object_unref0 (self->priv->metadir);
	_g_object_unref0 (self->priv->destdir);
	G_OBJECT_CLASS (deja_dup_operation_verify_parent_class)->finalize (obj);
}


GType deja_dup_operation_verify_get_type (void) {
	static volatile gsize deja_dup_operation_verify_type_id__volatile = 0;
	if (g_once_init_enter (&deja_dup_operation_verify_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DejaDupOperationVerifyClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) deja_dup_operation_verify_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DejaDupOperationVerify), 0, (GInstanceInitFunc) deja_dup_operation_verify_instance_init, NULL };
		GType deja_dup_operation_verify_type_id;
		deja_dup_operation_verify_type_id = g_type_register_static (DEJA_DUP_TYPE_OPERATION, "DejaDupOperationVerify", &g_define_type_info, 0);
		g_once_init_leave (&deja_dup_operation_verify_type_id__volatile, deja_dup_operation_verify_type_id);
	}
	return deja_dup_operation_verify_type_id__volatile;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int 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, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}


static gint _vala_array_length (gpointer array) {
	int length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}



