/* Operation.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from Operation.vala, do not modify */

/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 2 -*-
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 * SPDX-FileCopyrightText: Michael Terry
 */

#include "deja.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>
#include <float.h>
#include <math.h>
#include <glib-object.h>
#include <sys/wait.h>
#include <gobject/gvaluecollector.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	DEJA_DUP_OPERATION_0_PROPERTY,
	DEJA_DUP_OPERATION_USE_CACHED_PASSWORD_PROPERTY,
	DEJA_DUP_OPERATION_NEEDS_PASSWORD_PROPERTY,
	DEJA_DUP_OPERATION_BACKEND_PROPERTY,
	DEJA_DUP_OPERATION_USE_PROGRESS_PROPERTY,
	DEJA_DUP_OPERATION_MODE_PROPERTY,
	DEJA_DUP_OPERATION_NUM_PROPERTIES
};
static GParamSpec* deja_dup_operation_properties[DEJA_DUP_OPERATION_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
typedef struct _DejaDupOperationStartData DejaDupOperationStartData;
typedef struct _DejaDupOperationDoInitialSetupData DejaDupOperationDoInitialSetupData;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _DejaDupOperationRestartData DejaDupOperationRestartData;
typedef struct _DejaDupOperationPrepareData DejaDupOperationPrepareData;
typedef struct _DejaDupOperationSendOauthQuestionData DejaDupOperationSendOauthQuestionData;
typedef struct _DejaDupOperationSetPassphraseData DejaDupOperationSetPassphraseData;
typedef struct _DejaDupOperationSetBackendPasswordData DejaDupOperationSetBackendPasswordData;
typedef struct _DejaDupOperationOperationFinishedData DejaDupOperationOperationFinishedData;
#define _deja_dup_operation_state_unref0(var) ((var == NULL) ? NULL : (var = (deja_dup_operation_state_unref (var), NULL)))
typedef struct _DejaDupOperationChainOpData DejaDupOperationChainOpData;
typedef struct _DejaDupOperationFindOrAskForPassphraseData DejaDupOperationFindOrAskForPassphraseData;
typedef struct _DejaDupOperationCheckDependenciesData DejaDupOperationCheckDependenciesData;
typedef struct _DejaDupOperationCheckBackendDependenciesData DejaDupOperationCheckBackendDependenciesData;
typedef struct _DejaDupOperationCheckToolDependenciesData DejaDupOperationCheckToolDependenciesData;
typedef struct _DejaDupOperationInstallDependenciesData DejaDupOperationInstallDependenciesData;

#define DEJA_DUP_TYPE_BACKEND_ERROR (deja_dup_backend_error_get_type ())
typedef struct _DejaDupOperationMakeToolData DejaDupOperationMakeToolData;
typedef struct _DejaDupOperationParamSpecState DejaDupOperationParamSpecState;
enum  {
	DEJA_DUP_OPERATION_STARTED_SIGNAL,
	DEJA_DUP_OPERATION_DONE_SIGNAL,
	DEJA_DUP_OPERATION_RAISE_ERROR_SIGNAL,
	DEJA_DUP_OPERATION_ACTION_DESC_CHANGED_SIGNAL,
	DEJA_DUP_OPERATION_ACTION_FILE_CHANGED_SIGNAL,
	DEJA_DUP_OPERATION_IS_FULL_SIGNAL,
	DEJA_DUP_OPERATION_PROGRESS_SIGNAL,
	DEJA_DUP_OPERATION_OPEN_URL_SIGNAL,
	DEJA_DUP_OPERATION_MOUNT_OP_REQUIRED_SIGNAL,
	DEJA_DUP_OPERATION_PASSPHRASE_REQUIRED_SIGNAL,
	DEJA_DUP_OPERATION_BACKEND_PASSWORD_REQUIRED_SIGNAL,
	DEJA_DUP_OPERATION_PAUSE_CHANGED_SIGNAL,
	DEJA_DUP_OPERATION_QUESTION_SIGNAL,
	DEJA_DUP_OPERATION_NUM_SIGNALS
};
static guint deja_dup_operation_signals[DEJA_DUP_OPERATION_NUM_SIGNALS] = {0};
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _DejaDupOperationPrivate {
	gboolean _use_cached_password;
	gboolean _needs_password;
	DejaDupBackend* _backend;
	gboolean _use_progress;
	DejaDupToolJobMode _mode;
	gboolean initial_setup_done;
	gboolean first_passphrase_selected;
	gboolean finished;
	gboolean searched_for_passphrase;
	GHashTable* local_error_files;
	GVariant* job_question_state;
	gchar** install_package_ids;
	gint install_package_ids_length1;
	gint _install_package_ids_size_;
	gchar* oauth_url_to_open;
};

struct _DejaDupOperationStartData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupOperation* self;
};

struct _DejaDupOperationDoInitialSetupData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupOperation* self;
	gboolean result;
	gchar* stdout;
	gchar* stderr;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_;
	gchar* detail;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
};

struct _DejaDupOperationRestartData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupOperation* self;
	DejaDupOperation* _tmp0_;
	DejaDupOperation* _tmp1_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	gchar** _tmp3_;
	gint _tmp3__length1;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gboolean _tmp6_;
	gchar* reason;
	DejaDupBackend* _tmp7_;
	gchar* _tmp8_;
	gboolean _tmp9_;
	const gchar* _tmp10_;
	gchar* support_explanation;
	DejaDupToolPlugin* _tmp11_;
	DejaDupBackend* _tmp12_;
	DejaDupBackendKind _tmp13_;
	DejaDupBackendKind _tmp14_;
	gchar* _tmp15_;
	gboolean _tmp16_;
	const gchar* _tmp17_;
	gboolean _tmp18_;
	gboolean _tmp19_;
	const gchar* _tmp20_;
	DejaDupToolJob* _tmp21_;
	DejaDupToolPlugin* _tmp22_;
	DejaDupToolJob* _tmp23_;
	DejaDupToolJob* _tmp24_;
	GError* e;
	GError* _tmp25_;
	const gchar* _tmp26_;
	DejaDupToolJob* _tmp27_;
	const gchar* _tmp28_;
	DejaDupToolJob* _tmp29_;
	DejaDupToolJobMode _tmp30_;
	DejaDupToolJob* _tmp31_;
	DejaDupBackend* _tmp32_;
	GVariant* _tmp33_;
	DejaDupToolJob* _tmp34_;
	GVariant* _tmp35_;
	gboolean _tmp36_;
	DejaDupToolJob* _tmp37_;
	DejaDupToolJob* _tmp38_;
	DejaDupToolJobFlags _tmp39_;
	DejaDupToolJobFlags _tmp40_;
	GList* _tmp41_;
	GList* _tmp42_;
	DejaDupToolJob* _tmp43_;
	GError* _inner_error0_;
};

struct _DejaDupOperationPrepareData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupOperation* self;
	gboolean result;
};

struct _DejaDupOperationSendOauthQuestionData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupOperation* self;
	gchar* msg;
	gchar* header;
	gchar* desc;
	gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
};

struct _DejaDupOperationSetPassphraseData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupOperation* self;
	gchar* passphrase;
	gboolean save;
	gchar* processed;
	gchar* _tmp0_;
	gboolean _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
};

struct _DejaDupOperationSetBackendPasswordData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupOperation* self;
	gchar* password;
	gboolean save;
	gchar* processed;
	gchar* _tmp0_;
	DejaDupBackend* _tmp1_;
};

struct _DejaDupOperationOperationFinishedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupOperation* self;
	gboolean success;
	gboolean cancelled;
	DejaDupBackend* _tmp0_;
};

struct _DejaDupOperationChainOpData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupOperation* self;
	DejaDupOperation* subop;
	gchar* desc;
	DejaDupOperation* _tmp0_;
	DejaDupOperation* _tmp1_;
	gboolean _tmp2_;
	DejaDupOperationState* _tmp3_;
	DejaDupOperationState* _tmp4_;
};

struct _DejaDupOperationFindOrAskForPassphraseData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupOperation* self;
	gboolean already_searched;
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gchar* str;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
};

struct _DejaDupOperationCheckDependenciesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupOperation* self;
	gchar** deps;
	gint deps_length1;
	gboolean result;
};

struct _DejaDupOperationCheckBackendDependenciesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupOperation* self;
	gboolean result;
	DejaDupBackend* _tmp0_;
	DejaDupBackend* _tmp1_;
	gint _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	gboolean _tmp5_;
};

struct _DejaDupOperationCheckToolDependenciesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupOperation* self;
	gboolean result;
	DejaDupToolPlugin* _tmp0_;
	DejaDupToolPlugin* _tmp1_;
	gint _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	gboolean _tmp5_;
};

struct _DejaDupOperationInstallDependenciesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupOperation* self;
	gchar** deps;
	gint deps_length1;
};

typedef enum  {
	DEJA_DUP_BACKEND_ERROR_MOUNT_OP_NEEDED
} DejaDupBackendError;
#define DEJA_DUP_BACKEND_ERROR deja_dup_backend_error_quark ()

struct _DejaDupOperationMakeToolData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DejaDupOperation* self;
	gboolean result;
	DejaDupBackend* _tmp0_;
	DejaDupToolPlugin* _tmp1_;
	DejaDupBackend* _tmp2_;
	DejaDupToolPlugin* _tmp3_;
	DejaDupToolPlugin* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	DejaDupToolPlugin* _tmp7_;
	DejaDupToolJobMode _tmp8_;
	DejaDupToolPlugin* _tmp9_;
	DejaDupToolPlugin* _tmp10_;
	GError* e;
	GError* _tmp11_;
	const gchar* _tmp12_;
	GError* _inner_error0_;
};

struct _DejaDupOperationParamSpecState {
	GParamSpec parent_instance;
};

static gint DejaDupOperation_private_offset;
static gpointer deja_dup_operation_parent_class = NULL;
static gpointer deja_dup_operation_state_parent_class = NULL;

VALA_EXTERN void deja_dup_operation_operation_finished (DejaDupOperation* self,
                                            gboolean success,
                                            gboolean cancelled,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
VALA_EXTERN void deja_dup_operation_operation_finished_finish (DejaDupOperation* self,
                                                   GAsyncResult* _res_);
static void _g_free0_ (gpointer var);
static DejaDupOperationState* deja_dup_operation_real_get_state (DejaDupOperation* self);
static void deja_dup_operation_real_set_state (DejaDupOperation* self,
                                        DejaDupOperationState* state);
static void deja_dup_operation_real_start_data_free (gpointer _data);
static void deja_dup_operation_real_start (DejaDupOperation* self,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);
static gboolean deja_dup_operation_real_start_co (DejaDupOperationStartData* _data_);
static void deja_dup_operation_restart (DejaDupOperation* self,
                                 GAsyncReadyCallback _callback_,
                                 gpointer _user_data_);
static void deja_dup_operation_restart_finish (DejaDupOperation* self,
                                        GAsyncResult* _res_);
static void deja_dup_operation_start_ready (GObject* source_object,
                                     GAsyncResult* _res_,
                                     gpointer _user_data_);
static void deja_dup_operation_do_initial_setup_data_free (gpointer _data);
static void deja_dup_operation_do_initial_setup (DejaDupOperation* self,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_);
static gboolean deja_dup_operation_do_initial_setup_finish (DejaDupOperation* self,
                                                     GAsyncResult* _res_);
static gboolean deja_dup_operation_do_initial_setup_co (DejaDupOperationDoInitialSetupData* _data_);
static void deja_dup_operation_check_backend_dependencies (DejaDupOperation* self,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
static gboolean deja_dup_operation_check_backend_dependencies_finish (DejaDupOperation* self,
                                                               GAsyncResult* _res_);
static void deja_dup_operation_do_initial_setup_ready (GObject* source_object,
                                                GAsyncResult* _res_,
                                                gpointer _user_data_);
static void deja_dup_operation_make_tool (DejaDupOperation* self,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_);
static gboolean deja_dup_operation_make_tool_finish (DejaDupOperation* self,
                                              GAsyncResult* _res_);
static void deja_dup_operation_check_tool_dependencies (DejaDupOperation* self,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_);
static gboolean deja_dup_operation_check_tool_dependencies_finish (DejaDupOperation* self,
                                                            GAsyncResult* _res_);
static gboolean deja_dup_operation_run_custom_tool_command (DejaDupOperation* self,
                                                     const gchar* key,
                                                     gchar** stdout,
                                                     gchar** stderr);
static void deja_dup_operation_send_done (DejaDupOperation* self,
                                   gboolean success,
                                   gboolean cancelled);
static void deja_dup_operation_restart_data_free (gpointer _data);
static gboolean deja_dup_operation_restart_co (DejaDupOperationRestartData* _data_);
static void deja_dup_operation_restart_ready (GObject* source_object,
                                       GAsyncResult* _res_,
                                       gpointer _user_data_);
static void deja_dup_operation_install_dependencies (DejaDupOperation* self,
                                              gchar** deps,
                                              gint deps_length1,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_);
static void deja_dup_operation_install_dependencies_finish (DejaDupOperation* self,
                                                     GAsyncResult* _res_);
static void deja_dup_operation_reset_progress (DejaDupOperation* self);
static void deja_dup_operation_disconnect_job (DejaDupOperation* self);
static void deja_dup_operation_find_or_ask_for_passphrase (DejaDupOperation* self,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
static void deja_dup_operation_find_or_ask_for_passphrase_finish (DejaDupOperation* self,
                                                           GAsyncResult* _res_);
static inline void _g_list_free__g_free0_ (GList* self);
static gboolean deja_dup_operation_real_stop_if_dormant (DejaDupOperation* self);
static void deja_dup_operation_real_stop (DejaDupOperation* self);
static void deja_dup_operation_real_resume (DejaDupOperation* self);
static void deja_dup_operation_real_prepare_data_free (gpointer _data);
static void deja_dup_operation_real_prepare (DejaDupOperation* self,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_);
static gboolean deja_dup_operation_real_prepare_co (DejaDupOperationPrepareData* _data_);
static void deja_dup_operation_send_oauth_question_data_free (gpointer _data);
static void deja_dup_operation_send_oauth_question (DejaDupOperation* self,
                                             const gchar* msg,
                                             const gchar* header,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
static void deja_dup_operation_send_oauth_question_finish (DejaDupOperation* self,
                                                    GAsyncResult* _res_);
static gboolean deja_dup_operation_send_oauth_question_co (DejaDupOperationSendOauthQuestionData* _data_);
static void deja_dup_operation_send_oauth_question_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_);
static void deja_dup_operation_real_connect_to_backend (DejaDupOperation* self);
static void __lambda15_ (DejaDupOperation* self,
                  const gchar* msg,
                  const gchar* header,
                  const gchar* url);
static void ___lambda15__deja_dup_backend_show_oauth_consent_page (DejaDupBackend* _sender,
                                                            const gchar* message,
                                                            const gchar* header,
                                                            const gchar* url,
                                                            gpointer self);
static void __lambda16_ (DejaDupOperation* self,
                  const gchar* header,
                  const gchar* msg);
static void ___lambda16__deja_dup_backend_pause_op (DejaDupBackend* _sender,
                                             const gchar* header,
                                             const gchar* msg,
                                             gpointer self);
static void __lambda17_ (DejaDupOperation* self,
                  const gchar* d,
                  const gchar* l,
                  const gchar* e);
static void ___lambda17__deja_dup_backend_show_backend_password_page (DejaDupBackend* _sender,
                                                               const gchar* desc,
                                                               const gchar* label,
                                                               const gchar* _error_,
                                                               gpointer self);
static void deja_dup_operation_real_connect_to_job (DejaDupOperation* self,
                                             gboolean actions);
static void __lambda31_ (DejaDupOperation* self,
                  DejaDupToolJob* d,
                  gboolean o,
                  gboolean c);
static void ___lambda31__deja_dup_tool_job_done (DejaDupToolJob* _sender,
                                          gboolean success,
                                          gboolean cancelled,
                                          gpointer self);
static void __lambda32_ (DejaDupOperation* self,
                  DejaDupToolJob* d,
                  const gchar* s,
                  const gchar* detail);
static void ___lambda32__deja_dup_tool_job_raise_error (DejaDupToolJob* _sender,
                                                 const gchar* errstr,
                                                 const gchar* detail,
                                                 gpointer self);
static void ___lambda33_ (DejaDupOperation* self,
                   DejaDupToolJob* d,
                   const gchar* s);
static void ____lambda33__deja_dup_tool_job_action_desc_changed (DejaDupToolJob* _sender,
                                                          const gchar* action,
                                                          gpointer self);
static void ___lambda34_ (DejaDupOperation* self,
                   DejaDupToolJob* d,
                   GFile* f,
                   gboolean b);
static void ____lambda34__deja_dup_tool_job_action_file_changed (DejaDupToolJob* _sender,
                                                          GFile* file,
                                                          gboolean actual,
                                                          gpointer self);
static void deja_dup_operation_note_local_file_error (DejaDupOperation* self,
                                               const gchar* file);
static void _deja_dup_operation_note_local_file_error_deja_dup_tool_job_local_file_error (DejaDupToolJob* _sender,
                                                                                   const gchar* file,
                                                                                   gpointer self);
static void __lambda35_ (DejaDupOperation* self,
                  DejaDupToolJob* d,
                  gdouble p);
static void ___lambda35__deja_dup_tool_job_progress (DejaDupToolJob* _sender,
                                              gdouble percent,
                                              gpointer self);
static void __lambda36_ (DejaDupOperation* self,
                  const gchar* s,
                  const gchar* h,
                  const gchar* d,
                  const gchar* a,
                  gboolean safe,
                  GVariant* state);
static void ___lambda36__deja_dup_tool_job_question (DejaDupToolJob* _sender,
                                              const gchar* summary,
                                              const gchar* header,
                                              const gchar* description,
                                              const gchar* action,
                                              gboolean safe,
                                              GVariant* state,
                                              gpointer self);
static void __lambda37_ (DejaDupOperation* self,
                  gboolean first);
static void ___lambda37__deja_dup_tool_job_is_full (DejaDupToolJob* _sender,
                                             gboolean first,
                                             gpointer self);
static void __lambda38_ (DejaDupOperation* self);
static void ___lambda38__deja_dup_tool_job_bad_encryption_password (DejaDupToolJob* _sender,
                                                             gpointer self);
static void deja_dup_operation_real_set_passphrase_data_free (gpointer _data);
static void deja_dup_operation_real_set_passphrase (DejaDupOperation* self,
                                             const gchar* passphrase,
                                             gboolean save,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
static gboolean deja_dup_operation_real_set_passphrase_co (DejaDupOperationSetPassphraseData* _data_);
static void deja_dup_operation_set_passphrase_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_);
static void deja_dup_operation_real_set_backend_password_data_free (gpointer _data);
static void deja_dup_operation_real_set_backend_password (DejaDupOperation* self,
                                                   const gchar* password,
                                                   gboolean save,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_);
static gboolean deja_dup_operation_real_set_backend_password_co (DejaDupOperationSetBackendPasswordData* _data_);
static void deja_dup_operation_set_backend_password_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_);
static void deja_dup_operation_real_set_mount_op (DejaDupOperation* self,
                                           GMountOperation* mount_op);
static gboolean deja_dup_operation_real_set_oauth_token (DejaDupOperation* self,
                                                  const gchar* uri);
static gchar* deja_dup_operation_real_get_success_detail (DejaDupOperation* self);
static void deja_dup_operation_real_operation_finished_data_free (gpointer _data);
static void deja_dup_operation_real_operation_finished (DejaDupOperation* self,
                                                 gboolean success,
                                                 gboolean cancelled,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_);
static gboolean deja_dup_operation_real_operation_finished_co (DejaDupOperationOperationFinishedData* _data_);
static void deja_dup_operation_operation_finished_ready (GObject* source_object,
                                                  GAsyncResult* _res_,
                                                  gpointer _user_data_);
static GList* deja_dup_operation_real_make_argv (DejaDupOperation* self);
static void deja_dup_operation_chain_op_data_free (gpointer _data);
static gboolean deja_dup_operation_chain_op_co (DejaDupOperationChainOpData* _data_);
static void __lambda39_ (DejaDupOperation* self,
                  gboolean s,
                  gboolean c,
                  const gchar* d);
static void ___lambda39__deja_dup_operation_done (DejaDupOperation* _sender,
                                           gboolean success,
                                           gboolean cancelled,
                                           const gchar* detail,
                                           gpointer self);
static void __lambda40_ (DejaDupOperation* self,
                  const gchar* e,
                  const gchar* d);
static void ___lambda40__deja_dup_operation_raise_error (DejaDupOperation* _sender,
                                                  const gchar* errstr,
                                                  const gchar* detail,
                                                  gpointer self);
static void __lambda41_ (DejaDupOperation* self,
                  const gchar* d);
static void ___lambda41__deja_dup_operation_action_desc_changed (DejaDupOperation* _sender,
                                                          const gchar* action,
                                                          gpointer self);
static void __lambda42_ (DejaDupOperation* self,
                  gdouble p);
static void ___lambda42__deja_dup_operation_progress (DejaDupOperation* _sender,
                                               gdouble percent,
                                               gpointer self);
static void __lambda43_ (DejaDupOperation* self,
                  gboolean r,
                  gboolean f);
static void ___lambda43__deja_dup_operation_passphrase_required (DejaDupOperation* _sender,
                                                          gboolean repeat,
                                                          gboolean first,
                                                          gpointer self);
static void __lambda44_ (DejaDupOperation* self,
                  const gchar* s,
                  const gchar* h,
                  const gchar* d,
                  const gchar* a,
                  gboolean safe);
static void ___lambda44__deja_dup_operation_question (DejaDupOperation* _sender,
                                               const gchar* summary,
                                               const gchar* header,
                                               const gchar* description,
                                               const gchar* action,
                                               gboolean safe,
                                               gpointer self);
static void deja_dup_operation_chain_op_ready (GObject* source_object,
                                        GAsyncResult* _res_,
                                        gpointer _user_data_);
static void deja_dup_operation_find_or_ask_for_passphrase_data_free (gpointer _data);
static gboolean deja_dup_operation_find_or_ask_for_passphrase_co (DejaDupOperationFindOrAskForPassphraseData* _data_);
static void deja_dup_operation_find_or_ask_for_passphrase_ready (GObject* source_object,
                                                          GAsyncResult* _res_,
                                                          gpointer _user_data_);
static void deja_dup_operation_check_dependencies_data_free (gpointer _data);
static void deja_dup_operation_check_dependencies (DejaDupOperation* self,
                                            gchar** deps,
                                            gint deps_length1,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
static gboolean deja_dup_operation_check_dependencies_finish (DejaDupOperation* self,
                                                       GAsyncResult* _res_);
static gboolean deja_dup_operation_check_dependencies_co (DejaDupOperationCheckDependenciesData* _data_);
static void deja_dup_operation_check_backend_dependencies_data_free (gpointer _data);
static gboolean deja_dup_operation_check_backend_dependencies_co (DejaDupOperationCheckBackendDependenciesData* _data_);
static void deja_dup_operation_check_backend_dependencies_ready (GObject* source_object,
                                                          GAsyncResult* _res_,
                                                          gpointer _user_data_);
static void deja_dup_operation_check_tool_dependencies_data_free (gpointer _data);
static gboolean deja_dup_operation_check_tool_dependencies_co (DejaDupOperationCheckToolDependenciesData* _data_);
static void deja_dup_operation_check_tool_dependencies_ready (GObject* source_object,
                                                       GAsyncResult* _res_,
                                                       gpointer _user_data_);
static void deja_dup_operation_install_dependencies_data_free (gpointer _data);
static gboolean deja_dup_operation_install_dependencies_co (DejaDupOperationInstallDependenciesData* _data_);
static void deja_dup_operation_make_tool_data_free (gpointer _data);
static gboolean deja_dup_operation_make_tool_co (DejaDupOperationMakeToolData* _data_);
static void deja_dup_operation_make_tool_ready (GObject* source_object,
                                         GAsyncResult* _res_,
                                         gpointer _user_data_);
VALA_EXTERN GQuark deja_dup_backend_error_quark (void);
VALA_EXTERN GType deja_dup_backend_error_get_type (void) G_GNUC_CONST ;
static void g_cclosure_user_marshal_VOID__BOOLEAN_BOOLEAN_STRING (GClosure * closure,
                                                           GValue * return_value,
                                                           guint n_param_values,
                                                           const GValue * param_values,
                                                           gpointer invocation_hint,
                                                           gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__STRING_STRING (GClosure * closure,
                                                  GValue * return_value,
                                                  guint n_param_values,
                                                  const GValue * param_values,
                                                  gpointer invocation_hint,
                                                  gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__OBJECT_BOOLEAN (GClosure * closure,
                                                   GValue * return_value,
                                                   guint n_param_values,
                                                   const GValue * param_values,
                                                   gpointer invocation_hint,
                                                   gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__BOOLEAN_BOOLEAN (GClosure * closure,
                                                    GValue * return_value,
                                                    guint n_param_values,
                                                    const GValue * param_values,
                                                    gpointer invocation_hint,
                                                    gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__STRING_STRING_STRING (GClosure * closure,
                                                         GValue * return_value,
                                                         guint n_param_values,
                                                         const GValue * param_values,
                                                         gpointer invocation_hint,
                                                         gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__STRING_STRING_STRING_STRING_BOOLEAN (GClosure * closure,
                                                                        GValue * return_value,
                                                                        guint n_param_values,
                                                                        const GValue * param_values,
                                                                        gpointer invocation_hint,
                                                                        gpointer marshal_data);
static void deja_dup_operation_state_finalize (DejaDupOperationState * obj);
static GType deja_dup_operation_state_get_type_once (void);
static void deja_dup_operation_finalize (GObject * obj);
static GType deja_dup_operation_get_type_once (void);
static void _vala_deja_dup_operation_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec);
static void _vala_deja_dup_operation_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
deja_dup_operation_get_instance_private (DejaDupOperation* self)
{
	return G_STRUCT_MEMBER_P (self, DejaDupOperation_private_offset);
}

static void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}

gchar*
deja_dup_operation_mode_to_string (DejaDupToolJobMode mode)
{
	gchar* result;
	switch (mode) {
		case DEJA_DUP_TOOL_JOB_MODE_BACKUP:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup (_ ("Backing up…"));
			result = _tmp0_;
			return result;
		}
		case DEJA_DUP_TOOL_JOB_MODE_RESTORE:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup (_ ("Restoring…"));
			result = _tmp1_;
			return result;
		}
		case DEJA_DUP_TOOL_JOB_MODE_LIST_SNAPSHOTS:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup (_ ("Checking for backups…"));
			result = _tmp2_;
			return result;
		}
		case DEJA_DUP_TOOL_JOB_MODE_LIST_FILES:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup (_ ("Listing files…"));
			result = _tmp3_;
			return result;
		}
		case DEJA_DUP_TOOL_JOB_MODE_VERIFY_BASIC:
		case DEJA_DUP_TOOL_JOB_MODE_VERIFY_CLEAN:
		{
			gchar* _tmp4_;
			_tmp4_ = g_strdup (_ ("Verifying backup…"));
			result = _tmp4_;
			return result;
		}
		default:
		{
			gchar* _tmp5_;
			_tmp5_ = g_strdup (_ ("Preparing…"));
			result = _tmp5_;
			return result;
		}
	}
}

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

static DejaDupOperationState*
deja_dup_operation_real_get_state (DejaDupOperation* self)
{
	DejaDupOperationState* rv = NULL;
	DejaDupOperationState* _tmp0_;
	DejaDupBackend* _tmp1_;
	DejaDupBackend* _tmp2_;
	DejaDupToolPlugin* _tmp3_;
	DejaDupToolPlugin* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	DejaDupOperationState* result;
	_tmp0_ = deja_dup_operation_state_new ();
	rv = _tmp0_;
	_tmp1_ = self->priv->_backend;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (rv->backend);
	rv->backend = _tmp2_;
	_tmp3_ = self->tool;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (rv->tool);
	rv->tool = _tmp4_;
	_tmp5_ = self->passphrase;
	_tmp6_ = g_strdup (_tmp5_);
	_g_free0 (rv->passphrase);
	rv->passphrase = _tmp6_;
	result = rv;
	return result;
}

DejaDupOperationState*
deja_dup_operation_get_state (DejaDupOperation* self)
{
	DejaDupOperationClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->get_state) {
		return _klass_->get_state (self);
	}
	return NULL;
}

static void
deja_dup_operation_real_set_state (DejaDupOperation* self,
                                   DejaDupOperationState* state)
{
	DejaDupBackend* _tmp0_;
	DejaDupToolPlugin* _tmp1_;
	DejaDupToolPlugin* _tmp2_;
	const gchar* _tmp3_;
	g_return_if_fail (state != NULL);
	_tmp0_ = state->backend;
	deja_dup_operation_set_backend (self, _tmp0_);
	_tmp1_ = state->tool;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (self->tool);
	self->tool = _tmp2_;
	_tmp3_ = state->passphrase;
	deja_dup_operation_set_passphrase_fields (self, _tmp3_);
}

void
deja_dup_operation_set_state (DejaDupOperation* self,
                              DejaDupOperationState* state)
{
	DejaDupOperationClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->set_state) {
		_klass_->set_state (self, state);
	}
}

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

static void
deja_dup_operation_real_start (DejaDupOperation* self,
                               GAsyncReadyCallback _callback_,
                               gpointer _user_data_)
{
	DejaDupOperationStartData* _data_;
	DejaDupOperation* _tmp0_;
	_data_ = g_slice_new0 (DejaDupOperationStartData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_operation_real_start_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	deja_dup_operation_real_start_co (_data_);
}

static void
deja_dup_operation_real_start_finish (DejaDupOperation* self,
                                      GAsyncResult* _res_)
{
	DejaDupOperationStartData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
deja_dup_operation_start_ready (GObject* source_object,
                                GAsyncResult* _res_,
                                gpointer _user_data_)
{
	DejaDupOperationStartData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_operation_real_start_co (_data_);
}

static gboolean
deja_dup_operation_real_start_co (DejaDupOperationStartData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	g_signal_emit (_data_->self, deja_dup_operation_signals[DEJA_DUP_OPERATION_STARTED_SIGNAL], 0);
	_data_->_state_ = 1;
	deja_dup_operation_restart (_data_->self, deja_dup_operation_start_ready, _data_);
	return FALSE;
	_state_1:
	deja_dup_operation_restart_finish (_data_->self, _data_->_res_);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

void
deja_dup_operation_start (DejaDupOperation* self,
                          GAsyncReadyCallback _callback_,
                          gpointer _user_data_)
{
	DejaDupOperationClass* _klass_;
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->start) {
		_klass_->start (self, _callback_, _user_data_);
	}
}

void
deja_dup_operation_start_finish (DejaDupOperation* self,
                                 GAsyncResult* _res_)
{
	DejaDupOperationClass* _klass_;
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->start_finish) {
		_klass_->start_finish (self, _res_);
	}
}

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

static void
deja_dup_operation_do_initial_setup (DejaDupOperation* self,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_)
{
	DejaDupOperationDoInitialSetupData* _data_;
	DejaDupOperation* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DejaDupOperationDoInitialSetupData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_operation_do_initial_setup_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	deja_dup_operation_do_initial_setup_co (_data_);
}

static gboolean
deja_dup_operation_do_initial_setup_finish (DejaDupOperation* self,
                                            GAsyncResult* _res_)
{
	gboolean result;
	DejaDupOperationDoInitialSetupData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
deja_dup_operation_do_initial_setup_ready (GObject* source_object,
                                           GAsyncResult* _res_,
                                           gpointer _user_data_)
{
	DejaDupOperationDoInitialSetupData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_operation_do_initial_setup_co (_data_);
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strstrip (_result_);
	result = _result_;
	return result;
}

static gboolean
deja_dup_operation_do_initial_setup_co (DejaDupOperationDoInitialSetupData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (_data_->self->priv->initial_setup_done) {
		_data_->result = TRUE;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_state_ = 1;
	deja_dup_operation_check_backend_dependencies (_data_->self, deja_dup_operation_do_initial_setup_ready, _data_);
	return FALSE;
	_state_1:
	if (deja_dup_operation_check_backend_dependencies_finish (_data_->self, _data_->_res_)) {
		_data_->result = 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;
	}
	_data_->_state_ = 2;
	deja_dup_operation_make_tool (_data_->self, deja_dup_operation_do_initial_setup_ready, _data_);
	return FALSE;
	_state_2:
	if (!deja_dup_operation_make_tool_finish (_data_->self, _data_->_res_)) {
		_data_->result = 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;
	}
	if (_data_->self->priv->finished) {
		_data_->result = 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;
	}
	_data_->_state_ = 3;
	deja_dup_operation_check_tool_dependencies (_data_->self, deja_dup_operation_do_initial_setup_ready, _data_);
	return FALSE;
	_state_3:
	if (deja_dup_operation_check_tool_dependencies_finish (_data_->self, _data_->_res_)) {
		_data_->result = 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;
	}
	_data_->_tmp0_ = NULL;
	_data_->_tmp1_ = NULL;
	_data_->_tmp2_ = deja_dup_operation_run_custom_tool_command (_data_->self, DEJA_DUP_CUSTOM_TOOL_SETUP_KEY, &_data_->_tmp0_, &_data_->_tmp1_);
	_g_free0 (_data_->stdout);
	_data_->stdout = _data_->_tmp0_;
	_g_free0 (_data_->stderr);
	_data_->stderr = _data_->_tmp1_;
	if (!_data_->_tmp2_) {
		_data_->_tmp3_ = _data_->stdout;
		_data_->_tmp4_ = _data_->stderr;
		_data_->_tmp5_ = g_strconcat (_data_->_tmp3_, _data_->_tmp4_, NULL);
		_data_->_tmp6_ = _data_->_tmp5_;
		_data_->_tmp7_ = string_strip (_data_->_tmp6_);
		_data_->_tmp8_ = _data_->_tmp7_;
		_g_free0 (_data_->_tmp6_);
		_data_->detail = _data_->_tmp8_;
		_data_->_tmp9_ = _data_->detail;
		if (g_strcmp0 (_data_->_tmp9_, "") == 0) {
			_g_free0 (_data_->detail);
			_data_->detail = NULL;
		}
		_data_->_tmp10_ = _data_->detail;
		g_signal_emit (_data_->self, deja_dup_operation_signals[DEJA_DUP_OPERATION_RAISE_ERROR_SIGNAL], 0, _ ("Custom tool setup failed."), _data_->_tmp10_);
		deja_dup_operation_send_done (_data_->self, FALSE, FALSE);
		_data_->result = FALSE;
		_g_free0 (_data_->detail);
		_g_free0 (_data_->stderr);
		_g_free0 (_data_->stdout);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->self->priv->initial_setup_done = TRUE;
	_data_->result = TRUE;
	_g_free0 (_data_->stderr);
	_g_free0 (_data_->stdout);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

static void
deja_dup_operation_restart (DejaDupOperation* self,
                            GAsyncReadyCallback _callback_,
                            gpointer _user_data_)
{
	DejaDupOperationRestartData* _data_;
	DejaDupOperation* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DejaDupOperationRestartData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_operation_restart_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	deja_dup_operation_restart_co (_data_);
}

static void
deja_dup_operation_restart_finish (DejaDupOperation* self,
                                   GAsyncResult* _res_)
{
	DejaDupOperationRestartData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
deja_dup_operation_restart_ready (GObject* source_object,
                                  GAsyncResult* _res_,
                                  gpointer _user_data_)
{
	DejaDupOperationRestartData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_operation_restart_co (_data_);
}

static inline void
_g_list_free__g_free0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_free0_);
}

static gboolean
deja_dup_operation_restart_co (DejaDupOperationRestartData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		case 5:
		goto _state_5;
		case 6:
		goto _state_6;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->chained_op;
	if (_data_->_tmp0_ != NULL) {
		_data_->_tmp1_ = _data_->self->chained_op;
		_data_->_state_ = 1;
		deja_dup_operation_restart (_data_->_tmp1_, deja_dup_operation_restart_ready, _data_);
		return FALSE;
		_state_1:
		deja_dup_operation_restart_finish (_data_->_tmp1_, _data_->_res_);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp2_ = _data_->self->priv->install_package_ids;
	_data_->_tmp2__length1 = _data_->self->priv->install_package_ids_length1;
	if (_data_->_tmp2_ != NULL) {
		_data_->_tmp3_ = _data_->self->priv->install_package_ids;
		_data_->_tmp3__length1 = _data_->self->priv->install_package_ids_length1;
		_data_->_state_ = 2;
		deja_dup_operation_install_dependencies (_data_->self, _data_->_tmp3_, (gint) _data_->_tmp3__length1, deja_dup_operation_restart_ready, _data_);
		return FALSE;
		_state_2:
		deja_dup_operation_install_dependencies_finish (_data_->self, _data_->_res_);
		_data_->self->priv->install_package_ids = (_vala_array_free (_data_->self->priv->install_package_ids, _data_->self->priv->install_package_ids_length1, (GDestroyNotify) g_free), NULL);
		_data_->self->priv->install_package_ids = NULL;
		_data_->self->priv->install_package_ids_length1 = 0;
		_data_->self->priv->_install_package_ids_size_ = _data_->self->priv->install_package_ids_length1;
	}
	_data_->_tmp4_ = _data_->self->priv->oauth_url_to_open;
	if (_data_->_tmp4_ != NULL) {
		_data_->_tmp5_ = _data_->self->priv->oauth_url_to_open;
		g_signal_emit (_data_->self, deja_dup_operation_signals[DEJA_DUP_OPERATION_OPEN_URL_SIGNAL], 0, _data_->_tmp5_);
		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;
	}
	deja_dup_operation_reset_progress (_data_->self);
	if (!_data_->self->priv->initial_setup_done) {
		_data_->_state_ = 3;
		deja_dup_operation_do_initial_setup (_data_->self, deja_dup_operation_restart_ready, _data_);
		return FALSE;
		_state_3:
		_data_->_tmp6_ = !deja_dup_operation_do_initial_setup_finish (_data_->self, _data_->_res_);
	} else {
		_data_->_tmp6_ = FALSE;
	}
	if (_data_->_tmp6_) {
		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;
	}
	deja_dup_operation_disconnect_job (_data_->self);
	_data_->_tmp7_ = _data_->self->priv->_backend;
	_data_->_tmp8_ = NULL;
	_data_->_tmp9_ = deja_dup_backend_is_acceptable (_data_->_tmp7_, &_data_->_tmp8_);
	_g_free0 (_data_->reason);
	_data_->reason = _data_->_tmp8_;
	if (!_data_->_tmp9_) {
		_data_->_tmp10_ = _data_->reason;
		g_signal_emit (_data_->self, deja_dup_operation_signals[DEJA_DUP_OPERATION_RAISE_ERROR_SIGNAL], 0, _data_->_tmp10_, NULL);
		deja_dup_operation_send_done (_data_->self, FALSE, FALSE);
		_g_free0 (_data_->reason);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp11_ = _data_->self->tool;
	_data_->_tmp12_ = _data_->self->priv->_backend;
	_data_->_tmp13_ = deja_dup_backend_get_kind (_data_->_tmp12_);
	_data_->_tmp14_ = _data_->_tmp13_;
	_data_->_tmp15_ = NULL;
	_data_->_tmp16_ = deja_dup_tool_plugin_supports_backend (_data_->_tmp11_, _data_->_tmp14_, &_data_->_tmp15_);
	_g_free0 (_data_->support_explanation);
	_data_->support_explanation = _data_->_tmp15_;
	if (!_data_->_tmp16_) {
		_data_->_tmp17_ = _data_->support_explanation;
		g_signal_emit (_data_->self, deja_dup_operation_signals[DEJA_DUP_OPERATION_RAISE_ERROR_SIGNAL], 0, _data_->_tmp17_, NULL);
		deja_dup_operation_send_done (_data_->self, FALSE, FALSE);
		_g_free0 (_data_->support_explanation);
		_g_free0 (_data_->reason);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp19_ = _data_->self->priv->_needs_password;
	if (_data_->_tmp19_) {
		_data_->_tmp20_ = _data_->self->passphrase;
		_data_->_tmp18_ = _data_->_tmp20_ == NULL;
	} else {
		_data_->_tmp18_ = FALSE;
	}
	if (_data_->_tmp18_) {
		_data_->_state_ = 4;
		deja_dup_operation_find_or_ask_for_passphrase (_data_->self, deja_dup_operation_restart_ready, _data_);
		return FALSE;
		_state_4:
		deja_dup_operation_find_or_ask_for_passphrase_finish (_data_->self, _data_->_res_);
		_g_free0 (_data_->support_explanation);
		_g_free0 (_data_->reason);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_state_ = 5;
	deja_dup_operation_prepare (_data_->self, deja_dup_operation_restart_ready, _data_);
	return FALSE;
	_state_5:
	if (!deja_dup_operation_prepare_finish (_data_->self, _data_->_res_)) {
		_g_free0 (_data_->support_explanation);
		_g_free0 (_data_->reason);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	{
		_data_->_tmp22_ = _data_->self->tool;
		_data_->_tmp23_ = deja_dup_tool_plugin_create_job (_data_->_tmp22_, &_data_->_inner_error0_);
		_data_->_tmp21_ = _data_->_tmp23_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp24_ = _data_->_tmp21_;
		_data_->_tmp21_ = NULL;
		_g_object_unref0 (_data_->self->job);
		_data_->self->job = _data_->_tmp24_;
		_g_object_unref0 (_data_->_tmp21_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp25_ = _data_->e;
		_data_->_tmp26_ = _data_->_tmp25_->message;
		g_signal_emit (_data_->self, deja_dup_operation_signals[DEJA_DUP_OPERATION_RAISE_ERROR_SIGNAL], 0, _data_->_tmp26_, NULL);
		deja_dup_operation_send_done (_data_->self, FALSE, FALSE);
		_g_error_free0 (_data_->e);
		_g_free0 (_data_->support_explanation);
		_g_free0 (_data_->reason);
		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;
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_free0 (_data_->support_explanation);
		_g_free0 (_data_->reason);
		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;
	}
	_data_->_tmp27_ = _data_->self->job;
	_data_->_tmp28_ = _data_->self->passphrase;
	deja_dup_tool_job_set_encrypt_password (_data_->_tmp27_, _data_->_tmp28_);
	_data_->_tmp29_ = _data_->self->job;
	_data_->_tmp30_ = _data_->self->priv->_mode;
	deja_dup_tool_job_set_mode (_data_->_tmp29_, _data_->_tmp30_);
	_data_->_tmp31_ = _data_->self->job;
	_data_->_tmp32_ = _data_->self->priv->_backend;
	deja_dup_tool_job_set_backend (_data_->_tmp31_, _data_->_tmp32_);
	_data_->_tmp33_ = _data_->self->priv->job_question_state;
	if (_data_->_tmp33_ != NULL) {
		_data_->_tmp34_ = _data_->self->job;
		_data_->_tmp35_ = _data_->self->priv->job_question_state;
		deja_dup_tool_job_set_question_state (_data_->_tmp34_, _data_->_tmp35_);
		_g_variant_unref0 (_data_->self->priv->job_question_state);
		_data_->self->priv->job_question_state = NULL;
	}
	_data_->_tmp36_ = _data_->self->priv->_use_progress;
	if (!_data_->_tmp36_) {
		_data_->_tmp37_ = _data_->self->job;
		_data_->_tmp38_ = _data_->self->job;
		_data_->_tmp39_ = deja_dup_tool_job_get_flags (_data_->_tmp38_);
		_data_->_tmp40_ = _data_->_tmp39_;
		deja_dup_tool_job_set_flags (_data_->_tmp38_, _data_->_tmp40_ | DEJA_DUP_TOOL_JOB_FLAGS_NO_PROGRESS);
	}
	_data_->_tmp41_ = deja_dup_operation_make_argv (_data_->self);
	_data_->_tmp42_ = _data_->_tmp41_;
	(_data_->_tmp42_ == NULL) ? NULL : (_data_->_tmp42_ = (_g_list_free__g_free0_ (_data_->_tmp42_), NULL));
	deja_dup_operation_connect_to_job (_data_->self, TRUE);
	_data_->_tmp43_ = _data_->self->job;
	_data_->_state_ = 6;
	deja_dup_tool_job_start (_data_->_tmp43_, deja_dup_operation_restart_ready, _data_);
	return FALSE;
	_state_6:
	deja_dup_tool_job_start_finish (_data_->_tmp43_, _data_->_res_);
	_g_free0 (_data_->support_explanation);
	_g_free0 (_data_->reason);
	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 gboolean
deja_dup_operation_real_stop_if_dormant (DejaDupOperation* self)
{
	DejaDupOperation* _tmp0_;
	gboolean result;
	_tmp0_ = self->chained_op;
	if (_tmp0_ != NULL) {
		DejaDupOperation* _tmp1_;
		_tmp1_ = self->chained_op;
		result = deja_dup_operation_stop_if_dormant (_tmp1_);
		return result;
	} else {
		DejaDupToolJob* _tmp2_;
		_tmp2_ = self->job;
		if (_tmp2_ == NULL) {
			deja_dup_operation_stop (self);
			result = TRUE;
			return result;
		}
	}
	result = FALSE;
	return result;
}

gboolean
deja_dup_operation_stop_if_dormant (DejaDupOperation* self)
{
	DejaDupOperationClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->stop_if_dormant) {
		return _klass_->stop_if_dormant (self);
	}
	return FALSE;
}

static void
deja_dup_operation_real_stop (DejaDupOperation* self)
{
	DejaDupOperation* _tmp0_;
	_tmp0_ = self->chained_op;
	if (_tmp0_ != NULL) {
		DejaDupOperation* _tmp1_;
		_tmp1_ = self->chained_op;
		deja_dup_operation_stop (_tmp1_);
	} else {
		DejaDupToolJob* _tmp2_;
		_tmp2_ = self->job;
		if (_tmp2_ != NULL) {
			DejaDupToolJob* _tmp3_;
			_tmp3_ = self->job;
			deja_dup_tool_job_stop (_tmp3_);
		} else {
			deja_dup_operation_operation_finished (self, TRUE, TRUE, NULL, NULL);
		}
	}
}

void
deja_dup_operation_stop (DejaDupOperation* self)
{
	DejaDupOperationClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->stop) {
		_klass_->stop (self);
	}
}

static void
deja_dup_operation_real_resume (DejaDupOperation* self)
{
	deja_dup_operation_restart (self, NULL, NULL);
}

void
deja_dup_operation_resume (DejaDupOperation* self)
{
	DejaDupOperationClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->resume) {
		_klass_->resume (self);
	}
}

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

static void
deja_dup_operation_real_prepare (DejaDupOperation* self,
                                 GAsyncReadyCallback _callback_,
                                 gpointer _user_data_)
{
	DejaDupOperationPrepareData* _data_;
	DejaDupOperation* _tmp0_;
	_data_ = g_slice_new0 (DejaDupOperationPrepareData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_operation_real_prepare_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	deja_dup_operation_real_prepare_co (_data_);
}

static gboolean
deja_dup_operation_real_prepare_finish (DejaDupOperation* self,
                                        GAsyncResult* _res_)
{
	gboolean result;
	DejaDupOperationPrepareData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static gboolean
deja_dup_operation_real_prepare_co (DejaDupOperationPrepareData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->result = TRUE;
	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;
}

void
deja_dup_operation_prepare (DejaDupOperation* self,
                            GAsyncReadyCallback _callback_,
                            gpointer _user_data_)
{
	DejaDupOperationClass* _klass_;
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->prepare) {
		_klass_->prepare (self, _callback_, _user_data_);
	}
}

gboolean
deja_dup_operation_prepare_finish (DejaDupOperation* self,
                                   GAsyncResult* _res_)
{
	DejaDupOperationClass* _klass_;
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->prepare_finish) {
		return _klass_->prepare_finish (self, _res_);
	}
	return FALSE;
}

static void
deja_dup_operation_reset_progress (DejaDupOperation* self)
{
	DejaDupToolJobMode _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_mode;
	_tmp1_ = deja_dup_operation_mode_to_string (_tmp0_);
	_tmp2_ = _tmp1_;
	g_signal_emit (self, deja_dup_operation_signals[DEJA_DUP_OPERATION_ACTION_DESC_CHANGED_SIGNAL], 0, _tmp2_);
	_g_free0 (_tmp2_);
	g_signal_emit (self, deja_dup_operation_signals[DEJA_DUP_OPERATION_PROGRESS_SIGNAL], 0, (gdouble) 0);
}

static void
deja_dup_operation_send_oauth_question_data_free (gpointer _data)
{
	DejaDupOperationSendOauthQuestionData* _data_;
	_data_ = _data;
	_g_free0 (_data_->msg);
	_g_free0 (_data_->header);
	_g_object_unref0 (_data_->self);
	g_slice_free (DejaDupOperationSendOauthQuestionData, _data_);
}

static void
deja_dup_operation_send_oauth_question (DejaDupOperation* self,
                                        const gchar* msg,
                                        const gchar* header,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	DejaDupOperationSendOauthQuestionData* _data_;
	DejaDupOperation* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (msg != NULL);
	g_return_if_fail (header != NULL);
	_data_ = g_slice_new0 (DejaDupOperationSendOauthQuestionData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_operation_send_oauth_question_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (msg);
	_g_free0 (_data_->msg);
	_data_->msg = _tmp1_;
	_tmp2_ = g_strdup (header);
	_g_free0 (_data_->header);
	_data_->header = _tmp2_;
	deja_dup_operation_send_oauth_question_co (_data_);
}

static void
deja_dup_operation_send_oauth_question_finish (DejaDupOperation* self,
                                               GAsyncResult* _res_)
{
	DejaDupOperationSendOauthQuestionData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
deja_dup_operation_send_oauth_question_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_)
{
	DejaDupOperationSendOauthQuestionData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_operation_send_oauth_question_co (_data_);
}

static gboolean
deja_dup_operation_send_oauth_question_co (DejaDupOperationSendOauthQuestionData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_strdup (_ ("Once granted, Backups will automatically continue"));
	_data_->desc = _data_->_tmp0_;
	_data_->_state_ = 1;
	deja_dup_is_secret_service_available (deja_dup_operation_send_oauth_question_ready, _data_);
	return FALSE;
	_state_1:
	if (!deja_dup_is_secret_service_available_finish (_data_->_res_)) {
		_data_->_tmp1_ = g_strdup (_ ("Note that you will have to grant access every time " "because your desktop session does not support saving " "credentials"));
		_g_free0 (_data_->desc);
		_data_->desc = _data_->_tmp1_;
	}
	_data_->_tmp2_ = _data_->desc;
	g_signal_emit (_data_->self, deja_dup_operation_signals[DEJA_DUP_OPERATION_QUESTION_SIGNAL], 0, _data_->msg, _data_->header, _data_->_tmp2_, _ ("_Grant Access…"), TRUE);
	_g_free0 (_data_->desc);
	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
__lambda15_ (DejaDupOperation* self,
             const gchar* msg,
             const gchar* header,
             const gchar* url)
{
	gchar* _tmp0_;
	g_return_if_fail (msg != NULL);
	g_return_if_fail (header != NULL);
	g_return_if_fail (url != NULL);
	_tmp0_ = g_strdup (url);
	_g_free0 (self->priv->oauth_url_to_open);
	self->priv->oauth_url_to_open = _tmp0_;
	deja_dup_operation_send_oauth_question (self, msg, header, NULL, NULL);
}

static void
___lambda15__deja_dup_backend_show_oauth_consent_page (DejaDupBackend* _sender,
                                                       const gchar* message,
                                                       const gchar* header,
                                                       const gchar* url,
                                                       gpointer self)
{
	__lambda15_ ((DejaDupOperation*) self, message, header, url);
}

static void
__lambda16_ (DejaDupOperation* self,
             const gchar* header,
             const gchar* msg)
{
	gboolean _tmp0_ = FALSE;
	if (header == NULL) {
		_tmp0_ = msg == NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		deja_dup_operation_reset_progress (self);
		g_signal_emit (self, deja_dup_operation_signals[DEJA_DUP_OPERATION_PAUSE_CHANGED_SIGNAL], 0, FALSE);
	} else {
		g_signal_emit (self, deja_dup_operation_signals[DEJA_DUP_OPERATION_ACTION_DESC_CHANGED_SIGNAL], 0, msg);
		g_signal_emit (self, deja_dup_operation_signals[DEJA_DUP_OPERATION_PROGRESS_SIGNAL], 0, (gdouble) 0);
		g_signal_emit (self, deja_dup_operation_signals[DEJA_DUP_OPERATION_PAUSE_CHANGED_SIGNAL], 0, TRUE);
	}
}

static void
___lambda16__deja_dup_backend_pause_op (DejaDupBackend* _sender,
                                        const gchar* header,
                                        const gchar* msg,
                                        gpointer self)
{
	__lambda16_ ((DejaDupOperation*) self, header, msg);
}

static void
__lambda17_ (DejaDupOperation* self,
             const gchar* d,
             const gchar* l,
             const gchar* e)
{
	g_return_if_fail (d != NULL);
	g_return_if_fail (l != NULL);
	g_signal_emit (self, deja_dup_operation_signals[DEJA_DUP_OPERATION_BACKEND_PASSWORD_REQUIRED_SIGNAL], 0, d, l, e);
}

static void
___lambda17__deja_dup_backend_show_backend_password_page (DejaDupBackend* _sender,
                                                          const gchar* desc,
                                                          const gchar* label,
                                                          const gchar* _error_,
                                                          gpointer self)
{
	__lambda17_ ((DejaDupOperation*) self, desc, label, _error_);
}

static void
deja_dup_operation_real_connect_to_backend (DejaDupOperation* self)
{
	DejaDupBackend* _tmp0_;
	DejaDupBackend* _tmp1_;
	DejaDupBackend* _tmp2_;
	_tmp0_ = self->priv->_backend;
	g_signal_connect_object (_tmp0_, "show-oauth-consent-page", (GCallback) ___lambda15__deja_dup_backend_show_oauth_consent_page, self, 0);
	_tmp1_ = self->priv->_backend;
	g_signal_connect_object (_tmp1_, "pause-op", (GCallback) ___lambda16__deja_dup_backend_pause_op, self, 0);
	_tmp2_ = self->priv->_backend;
	g_signal_connect_object (_tmp2_, "show-backend-password-page", (GCallback) ___lambda17__deja_dup_backend_show_backend_password_page, self, 0);
}

void
deja_dup_operation_connect_to_backend (DejaDupOperation* self)
{
	DejaDupOperationClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->connect_to_backend) {
		_klass_->connect_to_backend (self);
	}
}

static void
__lambda31_ (DejaDupOperation* self,
             DejaDupToolJob* d,
             gboolean o,
             gboolean c)
{
	g_return_if_fail (d != NULL);
	deja_dup_operation_operation_finished (self, o, c, NULL, NULL);
}

static void
___lambda31__deja_dup_tool_job_done (DejaDupToolJob* _sender,
                                     gboolean success,
                                     gboolean cancelled,
                                     gpointer self)
{
	__lambda31_ ((DejaDupOperation*) self, _sender, success, cancelled);
}

static void
__lambda32_ (DejaDupOperation* self,
             DejaDupToolJob* d,
             const gchar* s,
             const gchar* detail)
{
	g_return_if_fail (d != NULL);
	g_return_if_fail (s != NULL);
	g_signal_emit (self, deja_dup_operation_signals[DEJA_DUP_OPERATION_RAISE_ERROR_SIGNAL], 0, s, detail);
}

static void
___lambda32__deja_dup_tool_job_raise_error (DejaDupToolJob* _sender,
                                            const gchar* errstr,
                                            const gchar* detail,
                                            gpointer self)
{
	__lambda32_ ((DejaDupOperation*) self, _sender, errstr, detail);
}

static void
___lambda33_ (DejaDupOperation* self,
              DejaDupToolJob* d,
              const gchar* s)
{
	g_return_if_fail (d != NULL);
	g_return_if_fail (s != NULL);
	g_signal_emit (self, deja_dup_operation_signals[DEJA_DUP_OPERATION_ACTION_DESC_CHANGED_SIGNAL], 0, s);
}

static void
____lambda33__deja_dup_tool_job_action_desc_changed (DejaDupToolJob* _sender,
                                                     const gchar* action,
                                                     gpointer self)
{
	___lambda33_ ((DejaDupOperation*) self, _sender, action);
}

static void
___lambda34_ (DejaDupOperation* self,
              DejaDupToolJob* d,
              GFile* f,
              gboolean b)
{
	g_return_if_fail (d != NULL);
	g_return_if_fail (f != NULL);
	g_signal_emit (self, deja_dup_operation_signals[DEJA_DUP_OPERATION_ACTION_FILE_CHANGED_SIGNAL], 0, f, b);
}

static void
____lambda34__deja_dup_tool_job_action_file_changed (DejaDupToolJob* _sender,
                                                     GFile* file,
                                                     gboolean actual,
                                                     gpointer self)
{
	___lambda34_ ((DejaDupOperation*) self, _sender, file, actual);
}

static void
_deja_dup_operation_note_local_file_error_deja_dup_tool_job_local_file_error (DejaDupToolJob* _sender,
                                                                              const gchar* file,
                                                                              gpointer self)
{
	deja_dup_operation_note_local_file_error ((DejaDupOperation*) self, file);
}

static void
__lambda35_ (DejaDupOperation* self,
             DejaDupToolJob* d,
             gdouble p)
{
	g_return_if_fail (d != NULL);
	g_signal_emit (self, deja_dup_operation_signals[DEJA_DUP_OPERATION_PROGRESS_SIGNAL], 0, p);
}

static void
___lambda35__deja_dup_tool_job_progress (DejaDupToolJob* _sender,
                                         gdouble percent,
                                         gpointer self)
{
	__lambda35_ ((DejaDupOperation*) self, _sender, percent);
}

static gpointer
_g_variant_ref0 (gpointer self)
{
	return self ? g_variant_ref (self) : NULL;
}

static void
__lambda36_ (DejaDupOperation* self,
             const gchar* s,
             const gchar* h,
             const gchar* d,
             const gchar* a,
             gboolean safe,
             GVariant* state)
{
	GVariant* _tmp0_;
	g_return_if_fail (s != NULL);
	_tmp0_ = _g_variant_ref0 (state);
	_g_variant_unref0 (self->priv->job_question_state);
	self->priv->job_question_state = _tmp0_;
	g_signal_emit (self, deja_dup_operation_signals[DEJA_DUP_OPERATION_QUESTION_SIGNAL], 0, s, h, d, a, safe);
}

static void
___lambda36__deja_dup_tool_job_question (DejaDupToolJob* _sender,
                                         const gchar* summary,
                                         const gchar* header,
                                         const gchar* description,
                                         const gchar* action,
                                         gboolean safe,
                                         GVariant* state,
                                         gpointer self)
{
	__lambda36_ ((DejaDupOperation*) self, summary, header, description, action, safe, state);
}

static void
__lambda37_ (DejaDupOperation* self,
             gboolean first)
{
	g_signal_emit (self, deja_dup_operation_signals[DEJA_DUP_OPERATION_IS_FULL_SIGNAL], 0, first);
}

static void
___lambda37__deja_dup_tool_job_is_full (DejaDupToolJob* _sender,
                                        gboolean first,
                                        gpointer self)
{
	__lambda37_ ((DejaDupOperation*) self, first);
}

static void
__lambda38_ (DejaDupOperation* self)
{
	deja_dup_operation_set_needs_password (self, TRUE);
	_g_free0 (self->passphrase);
	self->passphrase = NULL;
	deja_dup_operation_restart (self, NULL, NULL);
}

static void
___lambda38__deja_dup_tool_job_bad_encryption_password (DejaDupToolJob* _sender,
                                                        gpointer self)
{
	__lambda38_ ((DejaDupOperation*) self);
}

static void
deja_dup_operation_real_connect_to_job (DejaDupOperation* self,
                                        gboolean actions)
{
	DejaDupToolJob* _tmp0_;
	DejaDupToolJob* _tmp1_;
	DejaDupToolJob* _tmp4_;
	DejaDupToolJob* _tmp5_;
	DejaDupToolJob* _tmp6_;
	DejaDupToolJob* _tmp7_;
	DejaDupToolJob* _tmp8_;
	_tmp0_ = self->job;
	g_signal_connect_object (_tmp0_, "done", (GCallback) ___lambda31__deja_dup_tool_job_done, self, 0);
	_tmp1_ = self->job;
	g_signal_connect_object (_tmp1_, "raise-error", (GCallback) ___lambda32__deja_dup_tool_job_raise_error, self, 0);
	if (actions) {
		DejaDupToolJob* _tmp2_;
		DejaDupToolJob* _tmp3_;
		_tmp2_ = self->job;
		g_signal_connect_object (_tmp2_, "action-desc-changed", (GCallback) ____lambda33__deja_dup_tool_job_action_desc_changed, self, 0);
		_tmp3_ = self->job;
		g_signal_connect_object (_tmp3_, "action-file-changed", (GCallback) ____lambda34__deja_dup_tool_job_action_file_changed, self, 0);
	}
	_tmp4_ = self->job;
	g_signal_connect_object (_tmp4_, "local-file-error", (GCallback) _deja_dup_operation_note_local_file_error_deja_dup_tool_job_local_file_error, self, 0);
	_tmp5_ = self->job;
	g_signal_connect_object (_tmp5_, "progress", (GCallback) ___lambda35__deja_dup_tool_job_progress, self, 0);
	_tmp6_ = self->job;
	g_signal_connect_object (_tmp6_, "question", (GCallback) ___lambda36__deja_dup_tool_job_question, self, 0);
	_tmp7_ = self->job;
	g_signal_connect_object (_tmp7_, "is-full", (GCallback) ___lambda37__deja_dup_tool_job_is_full, self, 0);
	_tmp8_ = self->job;
	g_signal_connect_object (_tmp8_, "bad-encryption-password", (GCallback) ___lambda38__deja_dup_tool_job_bad_encryption_password, self, 0);
}

void
deja_dup_operation_connect_to_job (DejaDupOperation* self,
                                   gboolean actions)
{
	DejaDupOperationClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->connect_to_job) {
		_klass_->connect_to_job (self, actions);
	}
}

void
deja_dup_operation_set_passphrase_fields (DejaDupOperation* self,
                                          const gchar* passphrase)
{
	DejaDupOperation* _tmp0_;
	gchar* _tmp2_;
	DejaDupToolJob* _tmp3_;
	g_return_if_fail (self != NULL);
	deja_dup_operation_set_needs_password (self, FALSE);
	_tmp0_ = self->chained_op;
	if (_tmp0_ != NULL) {
		DejaDupOperation* _tmp1_;
		_tmp1_ = self->chained_op;
		deja_dup_operation_set_passphrase_fields (_tmp1_, passphrase);
		return;
	}
	_tmp2_ = g_strdup (passphrase);
	_g_free0 (self->passphrase);
	self->passphrase = _tmp2_;
	_tmp3_ = self->job;
	if (_tmp3_ != NULL) {
		DejaDupToolJob* _tmp4_;
		_tmp4_ = self->job;
		deja_dup_tool_job_set_encrypt_password (_tmp4_, passphrase);
	}
}

static void
deja_dup_operation_real_set_passphrase_data_free (gpointer _data)
{
	DejaDupOperationSetPassphraseData* _data_;
	_data_ = _data;
	_g_free0 (_data_->passphrase);
	_g_object_unref0 (_data_->self);
	g_slice_free (DejaDupOperationSetPassphraseData, _data_);
}

static void
deja_dup_operation_real_set_passphrase (DejaDupOperation* self,
                                        const gchar* passphrase,
                                        gboolean save,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	DejaDupOperationSetPassphraseData* _data_;
	DejaDupOperation* _tmp0_;
	gchar* _tmp1_;
	_data_ = g_slice_new0 (DejaDupOperationSetPassphraseData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_operation_real_set_passphrase_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (passphrase);
	_g_free0 (_data_->passphrase);
	_data_->passphrase = _tmp1_;
	_data_->save = save;
	deja_dup_operation_real_set_passphrase_co (_data_);
}

static void
deja_dup_operation_real_set_passphrase_finish (DejaDupOperation* self,
                                               GAsyncResult* _res_)
{
	DejaDupOperationSetPassphraseData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
deja_dup_operation_set_passphrase_ready (GObject* source_object,
                                         GAsyncResult* _res_,
                                         gpointer _user_data_)
{
	DejaDupOperationSetPassphraseData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_operation_real_set_passphrase_co (_data_);
}

static gboolean
deja_dup_operation_real_set_passphrase_co (DejaDupOperationSetPassphraseData* _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:
	_data_->_tmp0_ = deja_dup_process_passphrase (_data_->passphrase);
	_data_->processed = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->self->priv->_use_cached_password;
	if (_data_->_tmp1_) {
		_data_->_tmp2_ = _data_->processed;
		_data_->_state_ = 1;
		deja_dup_store_passphrase (_data_->_tmp2_, _data_->save, deja_dup_operation_set_passphrase_ready, _data_);
		return FALSE;
		_state_1:
		deja_dup_store_passphrase_finish (_data_->_res_);
	}
	_data_->_tmp3_ = _data_->processed;
	deja_dup_operation_set_passphrase_fields (_data_->self, _data_->_tmp3_);
	_data_->_state_ = 2;
	deja_dup_operation_restart (_data_->self, deja_dup_operation_set_passphrase_ready, _data_);
	return FALSE;
	_state_2:
	deja_dup_operation_restart_finish (_data_->self, _data_->_res_);
	_g_free0 (_data_->processed);
	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;
}

void
deja_dup_operation_set_passphrase (DejaDupOperation* self,
                                   const gchar* passphrase,
                                   gboolean save,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_)
{
	DejaDupOperationClass* _klass_;
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->set_passphrase) {
		_klass_->set_passphrase (self, passphrase, save, _callback_, _user_data_);
	}
}

void
deja_dup_operation_set_passphrase_finish (DejaDupOperation* self,
                                          GAsyncResult* _res_)
{
	DejaDupOperationClass* _klass_;
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->set_passphrase_finish) {
		_klass_->set_passphrase_finish (self, _res_);
	}
}

static void
deja_dup_operation_real_set_backend_password_data_free (gpointer _data)
{
	DejaDupOperationSetBackendPasswordData* _data_;
	_data_ = _data;
	_g_free0 (_data_->password);
	_g_object_unref0 (_data_->self);
	g_slice_free (DejaDupOperationSetBackendPasswordData, _data_);
}

static void
deja_dup_operation_real_set_backend_password (DejaDupOperation* self,
                                              const gchar* password,
                                              gboolean save,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_)
{
	DejaDupOperationSetBackendPasswordData* _data_;
	DejaDupOperation* _tmp0_;
	gchar* _tmp1_;
	_data_ = g_slice_new0 (DejaDupOperationSetBackendPasswordData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_operation_real_set_backend_password_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (password);
	_g_free0 (_data_->password);
	_data_->password = _tmp1_;
	_data_->save = save;
	deja_dup_operation_real_set_backend_password_co (_data_);
}

static void
deja_dup_operation_real_set_backend_password_finish (DejaDupOperation* self,
                                                     GAsyncResult* _res_)
{
	DejaDupOperationSetBackendPasswordData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
deja_dup_operation_set_backend_password_ready (GObject* source_object,
                                               GAsyncResult* _res_,
                                               gpointer _user_data_)
{
	DejaDupOperationSetBackendPasswordData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_operation_real_set_backend_password_co (_data_);
}

static gboolean
deja_dup_operation_real_set_backend_password_co (DejaDupOperationSetBackendPasswordData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = deja_dup_process_passphrase (_data_->password);
	_data_->processed = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->self->priv->_backend;
	_data_->_state_ = 1;
	deja_dup_backend_provide_backend_password (_data_->_tmp1_, _data_->processed, _data_->save, deja_dup_operation_set_backend_password_ready, _data_);
	return FALSE;
	_state_1:
	deja_dup_backend_provide_backend_password_finish (_data_->_tmp1_, _data_->_res_);
	_g_free0 (_data_->processed);
	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;
}

void
deja_dup_operation_set_backend_password (DejaDupOperation* self,
                                         const gchar* password,
                                         gboolean save,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_)
{
	DejaDupOperationClass* _klass_;
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->set_backend_password) {
		_klass_->set_backend_password (self, password, save, _callback_, _user_data_);
	}
}

void
deja_dup_operation_set_backend_password_finish (DejaDupOperation* self,
                                                GAsyncResult* _res_)
{
	DejaDupOperationClass* _klass_;
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->set_backend_password_finish) {
		_klass_->set_backend_password_finish (self, _res_);
	}
}

static void
deja_dup_operation_real_set_mount_op (DejaDupOperation* self,
                                      GMountOperation* mount_op)
{
	DejaDupBackend* _tmp0_;
	g_return_if_fail (mount_op != NULL);
	_tmp0_ = self->priv->_backend;
	deja_dup_backend_set_mount_op (_tmp0_, mount_op);
	deja_dup_operation_restart (self, NULL, NULL);
}

void
deja_dup_operation_set_mount_op (DejaDupOperation* self,
                                 GMountOperation* mount_op)
{
	DejaDupOperationClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->set_mount_op) {
		_klass_->set_mount_op (self, mount_op);
	}
}

static gboolean
deja_dup_operation_real_set_oauth_token (DejaDupOperation* self,
                                         const gchar* uri)
{
	DejaDupBackendOAuth* oauth_backend = NULL;
	DejaDupBackend* _tmp0_;
	DejaDupBackendOAuth* _tmp1_;
	DejaDupBackendOAuth* _tmp2_;
	gchar* redirect_uri = NULL;
	DejaDupBackendOAuth* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GFile* _tmp6_;
	GFile* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	const gchar* _tmp10_;
	DejaDupBackendOAuth* _tmp11_;
	gboolean result;
	g_return_val_if_fail (uri != NULL, FALSE);
	_tmp0_ = self->priv->_backend;
	_tmp1_ = _g_object_ref0 (DEJA_DUP_IS_BACKEND_OAUTH (_tmp0_) ? ((DejaDupBackendOAuth*) _tmp0_) : NULL);
	oauth_backend = _tmp1_;
	_tmp2_ = oauth_backend;
	if (_tmp2_ == NULL) {
		result = FALSE;
		_g_object_unref0 (oauth_backend);
		return result;
	}
	_tmp3_ = oauth_backend;
	_tmp4_ = deja_dup_backend_oauth_get_redirect_uri (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_file_new_for_uri (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_file_get_uri (_tmp7_);
	_tmp9_ = _tmp8_;
	_g_object_unref0 (_tmp7_);
	_g_free0 (_tmp5_);
	redirect_uri = _tmp9_;
	_tmp10_ = redirect_uri;
	if (!g_str_has_prefix (uri, _tmp10_)) {
		result = FALSE;
		_g_free0 (redirect_uri);
		_g_object_unref0 (oauth_backend);
		return result;
	}
	_g_free0 (self->priv->oauth_url_to_open);
	self->priv->oauth_url_to_open = NULL;
	deja_dup_operation_reset_progress (self);
	_tmp11_ = oauth_backend;
	deja_dup_backend_oauth_continue_authorization (_tmp11_, uri);
	result = TRUE;
	_g_free0 (redirect_uri);
	_g_object_unref0 (oauth_backend);
	return result;
}

gboolean
deja_dup_operation_set_oauth_token (DejaDupOperation* self,
                                    const gchar* uri)
{
	DejaDupOperationClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->set_oauth_token) {
		return _klass_->set_oauth_token (self, uri);
	}
	return FALSE;
}

static gchar*
deja_dup_operation_real_get_success_detail (DejaDupOperation* self)
{
	gchar* result;
	result = NULL;
	return result;
}

gchar*
deja_dup_operation_get_success_detail (DejaDupOperation* self)
{
	DejaDupOperationClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->get_success_detail) {
		return _klass_->get_success_detail (self);
	}
	return NULL;
}

static void
deja_dup_operation_send_done (DejaDupOperation* self,
                              gboolean success,
                              gboolean cancelled)
{
	gchar* detail = NULL;
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	detail = NULL;
	if (success) {
		_tmp0_ = !cancelled;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gchar* _tmp1_;
		_tmp1_ = deja_dup_operation_get_success_detail (self);
		_g_free0 (detail);
		detail = _tmp1_;
	}
	_tmp2_ = detail;
	g_signal_emit (self, deja_dup_operation_signals[DEJA_DUP_OPERATION_DONE_SIGNAL], 0, success, cancelled, _tmp2_);
	_g_free0 (detail);
}

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

static void
deja_dup_operation_real_operation_finished (DejaDupOperation* self,
                                            gboolean success,
                                            gboolean cancelled,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_)
{
	DejaDupOperationOperationFinishedData* _data_;
	DejaDupOperation* _tmp0_;
	_data_ = g_slice_new0 (DejaDupOperationOperationFinishedData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_operation_real_operation_finished_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->success = success;
	_data_->cancelled = cancelled;
	deja_dup_operation_real_operation_finished_co (_data_);
}

static void
deja_dup_operation_real_operation_finished_finish (DejaDupOperation* self,
                                                   GAsyncResult* _res_)
{
	DejaDupOperationOperationFinishedData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
deja_dup_operation_operation_finished_ready (GObject* source_object,
                                             GAsyncResult* _res_,
                                             gpointer _user_data_)
{
	DejaDupOperationOperationFinishedData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_operation_real_operation_finished_co (_data_);
}

static gboolean
deja_dup_operation_real_operation_finished_co (DejaDupOperationOperationFinishedData* _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:
	_data_->self->priv->finished = TRUE;
	_data_->_tmp0_ = _data_->self->priv->_backend;
	_data_->_state_ = 1;
	deja_dup_backend_cleanup (_data_->_tmp0_, deja_dup_operation_operation_finished_ready, _data_);
	return FALSE;
	_state_1:
	deja_dup_backend_cleanup_finish (_data_->_tmp0_, _data_->_res_);
	_data_->_state_ = 2;
	deja_dup_clean_tempdirs (FALSE, deja_dup_operation_operation_finished_ready, _data_);
	return FALSE;
	_state_2:
	deja_dup_clean_tempdirs_finish (_data_->_res_);
	deja_dup_operation_run_custom_tool_command (_data_->self, DEJA_DUP_CUSTOM_TOOL_TEARDOWN_KEY, NULL, NULL);
	deja_dup_operation_send_done (_data_->self, _data_->success, _data_->cancelled);
	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;
}

void
deja_dup_operation_operation_finished (DejaDupOperation* self,
                                       gboolean success,
                                       gboolean cancelled,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	DejaDupOperationClass* _klass_;
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->operation_finished) {
		_klass_->operation_finished (self, success, cancelled, _callback_, _user_data_);
	}
}

void
deja_dup_operation_operation_finished_finish (DejaDupOperation* self,
                                              GAsyncResult* _res_)
{
	DejaDupOperationClass* _klass_;
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->operation_finished_finish) {
		_klass_->operation_finished_finish (self, _res_);
	}
}

static GList*
deja_dup_operation_real_make_argv (DejaDupOperation* self)
{
	GList* result;
	result = NULL;
	return result;
}

GList*
deja_dup_operation_make_argv (DejaDupOperation* self)
{
	DejaDupOperationClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = DEJA_DUP_OPERATION_GET_CLASS (self);
	if (_klass_->make_argv) {
		return _klass_->make_argv (self);
	}
	return NULL;
}

static void
deja_dup_operation_disconnect_job (DejaDupOperation* self)
{
	DejaDupToolJob* _tmp0_;
	DejaDupToolJob* _tmp1_;
	DejaDupToolJob* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->job;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->job;
	g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_DATA, (guint) 0, (GQuark) 0, NULL, NULL, self);
	_tmp2_ = self->job;
	deja_dup_tool_job_stop (_tmp2_);
	_g_object_unref0 (self->job);
	self->job = NULL;
}

static void
deja_dup_operation_chain_op_data_free (gpointer _data)
{
	DejaDupOperationChainOpData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->subop);
	_g_free0 (_data_->desc);
	_g_object_unref0 (_data_->self);
	g_slice_free (DejaDupOperationChainOpData, _data_);
}

void
deja_dup_operation_chain_op (DejaDupOperation* self,
                             DejaDupOperation* subop,
                             const gchar* desc,
                             GAsyncReadyCallback _callback_,
                             gpointer _user_data_)
{
	DejaDupOperationChainOpData* _data_;
	DejaDupOperation* _tmp0_;
	DejaDupOperation* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (subop != NULL);
	g_return_if_fail (desc != NULL);
	_data_ = g_slice_new0 (DejaDupOperationChainOpData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_operation_chain_op_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (subop);
	_g_object_unref0 (_data_->subop);
	_data_->subop = _tmp1_;
	_tmp2_ = g_strdup (desc);
	_g_free0 (_data_->desc);
	_data_->desc = _tmp2_;
	deja_dup_operation_chain_op_co (_data_);
}

void
deja_dup_operation_chain_op_finish (DejaDupOperation* self,
                                    GAsyncResult* _res_)
{
	DejaDupOperationChainOpData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
__lambda39_ (DejaDupOperation* self,
             gboolean s,
             gboolean c,
             const gchar* d)
{
	deja_dup_operation_send_done (self, s, c);
	_g_object_unref0 (self->chained_op);
	self->chained_op = NULL;
}

static void
___lambda39__deja_dup_operation_done (DejaDupOperation* _sender,
                                      gboolean success,
                                      gboolean cancelled,
                                      const gchar* detail,
                                      gpointer self)
{
	__lambda39_ ((DejaDupOperation*) self, success, cancelled, detail);
}

static void
__lambda40_ (DejaDupOperation* self,
             const gchar* e,
             const gchar* d)
{
	g_return_if_fail (e != NULL);
	g_signal_emit (self, deja_dup_operation_signals[DEJA_DUP_OPERATION_RAISE_ERROR_SIGNAL], 0, e, d);
}

static void
___lambda40__deja_dup_operation_raise_error (DejaDupOperation* _sender,
                                             const gchar* errstr,
                                             const gchar* detail,
                                             gpointer self)
{
	__lambda40_ ((DejaDupOperation*) self, errstr, detail);
}

static void
__lambda41_ (DejaDupOperation* self,
             const gchar* d)
{
	g_return_if_fail (d != NULL);
	g_signal_emit (self, deja_dup_operation_signals[DEJA_DUP_OPERATION_ACTION_DESC_CHANGED_SIGNAL], 0, d);
}

static void
___lambda41__deja_dup_operation_action_desc_changed (DejaDupOperation* _sender,
                                                     const gchar* action,
                                                     gpointer self)
{
	__lambda41_ ((DejaDupOperation*) self, action);
}

static void
__lambda42_ (DejaDupOperation* self,
             gdouble p)
{
	g_signal_emit (self, deja_dup_operation_signals[DEJA_DUP_OPERATION_PROGRESS_SIGNAL], 0, p);
}

static void
___lambda42__deja_dup_operation_progress (DejaDupOperation* _sender,
                                          gdouble percent,
                                          gpointer self)
{
	__lambda42_ ((DejaDupOperation*) self, percent);
}

static void
__lambda43_ (DejaDupOperation* self,
             gboolean r,
             gboolean f)
{
	deja_dup_operation_set_needs_password (self, TRUE);
	g_signal_emit (self, deja_dup_operation_signals[DEJA_DUP_OPERATION_PASSPHRASE_REQUIRED_SIGNAL], 0, r, f);
}

static void
___lambda43__deja_dup_operation_passphrase_required (DejaDupOperation* _sender,
                                                     gboolean repeat,
                                                     gboolean first,
                                                     gpointer self)
{
	__lambda43_ ((DejaDupOperation*) self, repeat, first);
}

static void
__lambda44_ (DejaDupOperation* self,
             const gchar* s,
             const gchar* h,
             const gchar* d,
             const gchar* a,
             gboolean safe)
{
	g_return_if_fail (s != NULL);
	g_signal_emit (self, deja_dup_operation_signals[DEJA_DUP_OPERATION_QUESTION_SIGNAL], 0, s, h, d, a, safe);
}

static void
___lambda44__deja_dup_operation_question (DejaDupOperation* _sender,
                                          const gchar* summary,
                                          const gchar* header,
                                          const gchar* description,
                                          const gchar* action,
                                          gboolean safe,
                                          gpointer self)
{
	__lambda44_ ((DejaDupOperation*) self, summary, header, description, action, safe);
}

static void
deja_dup_operation_chain_op_ready (GObject* source_object,
                                   GAsyncResult* _res_,
                                   gpointer _user_data_)
{
	DejaDupOperationChainOpData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_operation_chain_op_co (_data_);
}

static gboolean
deja_dup_operation_chain_op_co (DejaDupOperationChainOpData* _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->chained_op;
	_vala_assert (_data_->_tmp0_ == NULL, "chained_op == null");
	_data_->_tmp1_ = _g_object_ref0 (_data_->subop);
	_g_object_unref0 (_data_->self->chained_op);
	_data_->self->chained_op = _data_->_tmp1_;
	g_signal_connect_object (_data_->subop, "done", (GCallback) ___lambda39__deja_dup_operation_done, _data_->self, 0);
	g_signal_connect_object (_data_->subop, "raise-error", (GCallback) ___lambda40__deja_dup_operation_raise_error, _data_->self, 0);
	g_signal_connect_object (_data_->subop, "action-desc-changed", (GCallback) ___lambda41__deja_dup_operation_action_desc_changed, _data_->self, 0);
	g_signal_connect_object (_data_->subop, "progress", (GCallback) ___lambda42__deja_dup_operation_progress, _data_->self, 0);
	g_signal_connect_object (_data_->subop, "passphrase-required", (GCallback) ___lambda43__deja_dup_operation_passphrase_required, _data_->self, 0);
	g_signal_connect_object (_data_->subop, "question", (GCallback) ___lambda44__deja_dup_operation_question, _data_->self, 0);
	_data_->_tmp2_ = _data_->subop->priv->_use_cached_password;
	deja_dup_operation_set_use_cached_password (_data_->self, _data_->_tmp2_);
	_data_->_tmp3_ = deja_dup_operation_get_state (_data_->self);
	_data_->_tmp4_ = _data_->_tmp3_;
	deja_dup_operation_set_state (_data_->subop, _data_->_tmp4_);
	_deja_dup_operation_state_unref0 (_data_->_tmp4_);
	g_signal_emit (_data_->self, deja_dup_operation_signals[DEJA_DUP_OPERATION_ACTION_DESC_CHANGED_SIGNAL], 0, _data_->desc);
	g_signal_emit (_data_->self, deja_dup_operation_signals[DEJA_DUP_OPERATION_PROGRESS_SIGNAL], 0, (gdouble) 0);
	_data_->_state_ = 1;
	deja_dup_operation_start (_data_->subop, deja_dup_operation_chain_op_ready, _data_);
	return FALSE;
	_state_1:
	deja_dup_operation_start_finish (_data_->subop, _data_->_res_);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

static void
deja_dup_operation_find_or_ask_for_passphrase (DejaDupOperation* self,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_)
{
	DejaDupOperationFindOrAskForPassphraseData* _data_;
	DejaDupOperation* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DejaDupOperationFindOrAskForPassphraseData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_operation_find_or_ask_for_passphrase_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	deja_dup_operation_find_or_ask_for_passphrase_co (_data_);
}

static void
deja_dup_operation_find_or_ask_for_passphrase_finish (DejaDupOperation* self,
                                                      GAsyncResult* _res_)
{
	DejaDupOperationFindOrAskForPassphraseData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
deja_dup_operation_find_or_ask_for_passphrase_ready (GObject* source_object,
                                                     GAsyncResult* _res_,
                                                     gpointer _user_data_)
{
	DejaDupOperationFindOrAskForPassphraseData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_operation_find_or_ask_for_passphrase_co (_data_);
}

static gboolean
deja_dup_operation_find_or_ask_for_passphrase_co (DejaDupOperationFindOrAskForPassphraseData* _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:
	_data_->already_searched = _data_->self->priv->searched_for_passphrase;
	_data_->self->priv->searched_for_passphrase = TRUE;
	if (!_data_->already_searched) {
		_data_->_tmp1_ = !deja_dup_in_testing_mode ();
	} else {
		_data_->_tmp1_ = FALSE;
	}
	if (_data_->_tmp1_) {
		_data_->_tmp2_ = _data_->self->priv->_use_cached_password;
		_data_->_tmp0_ = _data_->_tmp2_;
	} else {
		_data_->_tmp0_ = FALSE;
	}
	if (_data_->_tmp0_) {
		_data_->_state_ = 1;
		deja_dup_lookup_passphrase (deja_dup_operation_find_or_ask_for_passphrase_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp3_ = deja_dup_lookup_passphrase_finish (_data_->_res_, NULL);
		_data_->str = _data_->_tmp3_;
		_data_->_tmp4_ = _data_->str;
		if (_data_->_tmp4_ != NULL) {
			_data_->_tmp5_ = _data_->str;
			deja_dup_operation_set_passphrase_fields (_data_->self, _data_->_tmp5_);
			_data_->_state_ = 2;
			deja_dup_operation_restart (_data_->self, deja_dup_operation_find_or_ask_for_passphrase_ready, _data_);
			return FALSE;
			_state_2:
			deja_dup_operation_restart_finish (_data_->self, _data_->_res_);
			_g_free0 (_data_->str);
			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;
		}
		_g_free0 (_data_->str);
	}
	g_signal_emit (_data_->self, deja_dup_operation_signals[DEJA_DUP_OPERATION_PASSPHRASE_REQUIRED_SIGNAL], 0, _data_->already_searched, 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 gboolean
deja_dup_operation_run_custom_tool_command (DejaDupOperation* self,
                                            const gchar* key,
                                            gchar** stdout,
                                            gchar** stderr)
{
	gchar* _vala_stdout = NULL;
	gchar* _vala_stderr = NULL;
	DejaDupFilteredSettings* settings = NULL;
	DejaDupFilteredSettings* _tmp0_;
	gchar* command = NULL;
	DejaDupFilteredSettings* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	gint status = 0;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	gboolean _tmp16_ = FALSE;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (key != NULL, FALSE);
	_g_free0 (_vala_stdout);
	_vala_stdout = NULL;
	_g_free0 (_vala_stderr);
	_vala_stderr = NULL;
	_tmp0_ = deja_dup_get_settings (NULL);
	settings = _tmp0_;
	_tmp1_ = settings;
	_tmp2_ = g_settings_get_string ((GSettings*) _tmp1_, key);
	command = _tmp2_;
	_tmp3_ = command;
	if (g_strcmp0 (_tmp3_, "") == 0) {
		result = TRUE;
		_g_free0 (command);
		_g_object_unref0 (settings);
		if (stdout) {
			*stdout = _vala_stdout;
		} else {
			_g_free0 (_vala_stdout);
		}
		if (stderr) {
			*stderr = _vala_stderr;
		} else {
			_g_free0 (_vala_stderr);
		}
		return result;
	}
	{
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
		gint _tmp8_ = 0;
		_tmp4_ = command;
		g_debug ("Operation.vala:507: Running '%s'", _tmp4_);
		_tmp5_ = command;
		g_spawn_command_line_sync (_tmp5_, &_tmp6_, &_tmp7_, &_tmp8_, &_inner_error0_);
		_g_free0 (_vala_stdout);
		_vala_stdout = _tmp6_;
		_g_free0 (_vala_stderr);
		_vala_stderr = _tmp7_;
		status = _tmp8_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp9_;
		const gchar* _tmp10_;
		gchar* _tmp11_;
		gchar* _tmp12_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp9_ = e;
		_tmp10_ = _tmp9_->message;
		_tmp11_ = g_strdup (_tmp10_);
		_g_free0 (_vala_stdout);
		_vala_stdout = _tmp11_;
		_tmp12_ = g_strdup ("");
		_g_free0 (_vala_stderr);
		_vala_stderr = _tmp12_;
		result = FALSE;
		_g_error_free0 (e);
		_g_free0 (command);
		_g_object_unref0 (settings);
		if (stdout) {
			*stdout = _vala_stdout;
		} else {
			_g_free0 (_vala_stdout);
		}
		if (stderr) {
			*stderr = _vala_stderr;
		} else {
			_g_free0 (_vala_stderr);
		}
		return result;
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp13_ = FALSE;
		_g_free0 (command);
		_g_object_unref0 (settings);
		_g_free0 (_vala_stdout);
		_g_free0 (_vala_stderr);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp13_;
	}
	_tmp14_ = _vala_stdout;
	g_print ("%s", _tmp14_);
	_tmp15_ = _vala_stderr;
	g_print ("%s", _tmp15_);
	if (WIFEXITED (status)) {
		_tmp16_ = WEXITSTATUS (status) == 0;
	} else {
		_tmp16_ = FALSE;
	}
	result = _tmp16_;
	_g_free0 (command);
	_g_object_unref0 (settings);
	if (stdout) {
		*stdout = _vala_stdout;
	} else {
		_g_free0 (_vala_stdout);
	}
	if (stderr) {
		*stderr = _vala_stderr;
	} else {
		_g_free0 (_vala_stderr);
	}
	return result;
}

static void
deja_dup_operation_note_local_file_error (DejaDupOperation* self,
                                          const gchar* file)
{
	GHashTable* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (file != NULL);
	_tmp0_ = self->priv->local_error_files;
	_tmp1_ = g_strdup (file);
	g_hash_table_add (_tmp0_, _tmp1_);
}

GList*
deja_dup_operation_get_local_error_files (DejaDupOperation* self)
{
	GList* sorted_error_files = NULL;
	GHashTable* _tmp0_;
	GList* _tmp1_;
	GCompareFunc _tmp2_;
	GList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->local_error_files;
	_tmp1_ = g_hash_table_get_values (_tmp0_);
	sorted_error_files = _tmp1_;
	_tmp2_ = ((GCompareFunc) g_strcmp0);
	sorted_error_files = g_list_sort (sorted_error_files, _tmp2_);
	result = sorted_error_files;
	return result;
}

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

static void
deja_dup_operation_check_dependencies (DejaDupOperation* self,
                                       gchar** deps,
                                       gint deps_length1,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	DejaDupOperationCheckDependenciesData* _data_;
	DejaDupOperation* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DejaDupOperationCheckDependenciesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_operation_check_dependencies_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->deps = deps;
	_data_->deps_length1 = deps_length1;
	deja_dup_operation_check_dependencies_co (_data_);
}

static gboolean
deja_dup_operation_check_dependencies_finish (DejaDupOperation* self,
                                              GAsyncResult* _res_)
{
	gboolean result;
	DejaDupOperationCheckDependenciesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static gboolean
deja_dup_operation_check_dependencies_co (DejaDupOperationCheckDependenciesData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->result = 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_operation_check_backend_dependencies_data_free (gpointer _data)
{
	DejaDupOperationCheckBackendDependenciesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (DejaDupOperationCheckBackendDependenciesData, _data_);
}

static void
deja_dup_operation_check_backend_dependencies (DejaDupOperation* self,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_)
{
	DejaDupOperationCheckBackendDependenciesData* _data_;
	DejaDupOperation* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DejaDupOperationCheckBackendDependenciesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_operation_check_backend_dependencies_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	deja_dup_operation_check_backend_dependencies_co (_data_);
}

static gboolean
deja_dup_operation_check_backend_dependencies_finish (DejaDupOperation* self,
                                                      GAsyncResult* _res_)
{
	gboolean result;
	DejaDupOperationCheckBackendDependenciesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
deja_dup_operation_check_backend_dependencies_ready (GObject* source_object,
                                                     GAsyncResult* _res_,
                                                     gpointer _user_data_)
{
	DejaDupOperationCheckBackendDependenciesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_operation_check_backend_dependencies_co (_data_);
}

static gboolean
deja_dup_operation_check_backend_dependencies_co (DejaDupOperationCheckBackendDependenciesData* _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->_backend;
	if (deja_dup_backend_needs_dependencies (_data_->_tmp0_)) {
		_data_->_tmp1_ = _data_->self->priv->_backend;
		_data_->_tmp2_ = 0;
		_data_->_tmp3_ = deja_dup_backend_get_dependencies (_data_->_tmp1_, &_data_->_tmp2_);
		_data_->_tmp4_ = _data_->_tmp3_;
		_data_->_tmp4__length1 = _data_->_tmp2_;
		_data_->_state_ = 1;
		deja_dup_operation_check_dependencies (_data_->self, _data_->_tmp4_, (gint) _data_->_tmp2_, deja_dup_operation_check_backend_dependencies_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp5_ = deja_dup_operation_check_dependencies_finish (_data_->self, _data_->_res_);
		_data_->_tmp4_ = (_vala_array_free (_data_->_tmp4_, _data_->_tmp4__length1, (GDestroyNotify) g_free), NULL);
		_data_->result = _data_->_tmp5_;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->result = 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_operation_check_tool_dependencies_data_free (gpointer _data)
{
	DejaDupOperationCheckToolDependenciesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (DejaDupOperationCheckToolDependenciesData, _data_);
}

static void
deja_dup_operation_check_tool_dependencies (DejaDupOperation* self,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_)
{
	DejaDupOperationCheckToolDependenciesData* _data_;
	DejaDupOperation* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DejaDupOperationCheckToolDependenciesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_operation_check_tool_dependencies_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	deja_dup_operation_check_tool_dependencies_co (_data_);
}

static gboolean
deja_dup_operation_check_tool_dependencies_finish (DejaDupOperation* self,
                                                   GAsyncResult* _res_)
{
	gboolean result;
	DejaDupOperationCheckToolDependenciesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
deja_dup_operation_check_tool_dependencies_ready (GObject* source_object,
                                                  GAsyncResult* _res_,
                                                  gpointer _user_data_)
{
	DejaDupOperationCheckToolDependenciesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_operation_check_tool_dependencies_co (_data_);
}

static gboolean
deja_dup_operation_check_tool_dependencies_co (DejaDupOperationCheckToolDependenciesData* _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->tool;
	if (deja_dup_tool_plugin_needs_dependencies (_data_->_tmp0_)) {
		_data_->_tmp1_ = _data_->self->tool;
		_data_->_tmp2_ = 0;
		_data_->_tmp3_ = deja_dup_tool_plugin_get_dependencies (_data_->_tmp1_, &_data_->_tmp2_);
		_data_->_tmp4_ = _data_->_tmp3_;
		_data_->_tmp4__length1 = _data_->_tmp2_;
		_data_->_state_ = 1;
		deja_dup_operation_check_dependencies (_data_->self, _data_->_tmp4_, (gint) _data_->_tmp2_, deja_dup_operation_check_tool_dependencies_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp5_ = deja_dup_operation_check_dependencies_finish (_data_->self, _data_->_res_);
		_data_->_tmp4_ = (_vala_array_free (_data_->_tmp4_, _data_->_tmp4__length1, (GDestroyNotify) g_free), NULL);
		_data_->result = _data_->_tmp5_;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->result = 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_operation_install_dependencies_data_free (gpointer _data)
{
	DejaDupOperationInstallDependenciesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (DejaDupOperationInstallDependenciesData, _data_);
}

static void
deja_dup_operation_install_dependencies (DejaDupOperation* self,
                                         gchar** deps,
                                         gint deps_length1,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_)
{
	DejaDupOperationInstallDependenciesData* _data_;
	DejaDupOperation* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DejaDupOperationInstallDependenciesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_operation_install_dependencies_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->deps = deps;
	_data_->deps_length1 = deps_length1;
	deja_dup_operation_install_dependencies_co (_data_);
}

static void
deja_dup_operation_install_dependencies_finish (DejaDupOperation* self,
                                                GAsyncResult* _res_)
{
	DejaDupOperationInstallDependenciesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static gboolean
deja_dup_operation_install_dependencies_co (DejaDupOperationInstallDependenciesData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

static void
deja_dup_operation_make_tool (DejaDupOperation* self,
                              GAsyncReadyCallback _callback_,
                              gpointer _user_data_)
{
	DejaDupOperationMakeToolData* _data_;
	DejaDupOperation* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DejaDupOperationMakeToolData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, deja_dup_operation_make_tool_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	deja_dup_operation_make_tool_co (_data_);
}

static gboolean
deja_dup_operation_make_tool_finish (DejaDupOperation* self,
                                     GAsyncResult* _res_)
{
	gboolean result;
	DejaDupOperationMakeToolData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
deja_dup_operation_make_tool_ready (GObject* source_object,
                                    GAsyncResult* _res_,
                                    gpointer _user_data_)
{
	DejaDupOperationMakeToolData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	deja_dup_operation_make_tool_co (_data_);
}

static gboolean
deja_dup_operation_make_tool_co (DejaDupOperationMakeToolData* _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_operation_connect_to_backend (_data_->self);
	{
		_data_->_tmp0_ = _data_->self->priv->_backend;
		_data_->_state_ = 1;
		deja_dup_backend_prepare (_data_->_tmp0_, deja_dup_operation_make_tool_ready, _data_);
		return FALSE;
		_state_1:
		deja_dup_backend_prepare_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			if (g_error_matches (_data_->_inner_error0_, DEJA_DUP_BACKEND_ERROR, DEJA_DUP_BACKEND_ERROR_MOUNT_OP_NEEDED)) {
				goto __catch0_deja_dup_backend_error_mount_op_needed;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp2_ = _data_->self->priv->_backend;
		_data_->_state_ = 2;
		deja_dup_get_tool_for_backend (_data_->_tmp2_, deja_dup_operation_make_tool_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp3_ = deja_dup_get_tool_for_backend_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp1_ = _data_->_tmp3_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			if (g_error_matches (_data_->_inner_error0_, DEJA_DUP_BACKEND_ERROR, DEJA_DUP_BACKEND_ERROR_MOUNT_OP_NEEDED)) {
				goto __catch0_deja_dup_backend_error_mount_op_needed;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp4_ = _data_->_tmp1_;
		_data_->_tmp1_ = NULL;
		_g_object_unref0 (_data_->self->tool);
		_data_->self->tool = _data_->_tmp4_;
		_data_->_tmp7_ = _data_->self->tool;
		if (_data_->_tmp7_ == NULL) {
			_data_->_tmp6_ = !_data_->self->priv->first_passphrase_selected;
		} else {
			_data_->_tmp6_ = FALSE;
		}
		if (_data_->_tmp6_) {
			_data_->_tmp8_ = _data_->self->priv->_mode;
			_data_->_tmp5_ = _data_->_tmp8_ == DEJA_DUP_TOOL_JOB_MODE_BACKUP;
		} else {
			_data_->_tmp5_ = FALSE;
		}
		if (_data_->_tmp5_) {
			_data_->self->priv->first_passphrase_selected = TRUE;
			g_signal_emit (_data_->self, deja_dup_operation_signals[DEJA_DUP_OPERATION_PASSPHRASE_REQUIRED_SIGNAL], 0, FALSE, TRUE);
			_data_->result = FALSE;
			_g_object_unref0 (_data_->_tmp1_);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp9_ = _data_->self->tool;
		if (_data_->_tmp9_ == NULL) {
			_data_->_tmp10_ = deja_dup_get_default_tool ();
			_g_object_unref0 (_data_->self->tool);
			_data_->self->tool = _data_->_tmp10_;
		}
		_data_->result = TRUE;
		_g_object_unref0 (_data_->_tmp1_);
		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;
	}
	goto __finally0;
	__catch0_deja_dup_backend_error_mount_op_needed:
	{
		g_clear_error (&_data_->_inner_error0_);
		g_signal_emit (_data_->self, deja_dup_operation_signals[DEJA_DUP_OPERATION_MOUNT_OP_REQUIRED_SIGNAL], 0);
		_data_->result = 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;
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp11_ = _data_->e;
		_data_->_tmp12_ = _data_->_tmp11_->message;
		g_signal_emit (_data_->self, deja_dup_operation_signals[DEJA_DUP_OPERATION_RAISE_ERROR_SIGNAL], 0, _data_->_tmp12_, NULL);
		deja_dup_operation_send_done (_data_->self, FALSE, FALSE);
		_data_->result = FALSE;
		_g_error_free0 (_data_->e);
		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;
	}
	__finally0:
	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;
}

DejaDupOperation*
deja_dup_operation_construct (GType object_type)
{
	DejaDupOperation * self = NULL;
	self = (DejaDupOperation*) g_object_new (object_type, NULL);
	return self;
}

gboolean
deja_dup_operation_get_use_cached_password (DejaDupOperation* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_use_cached_password;
	return result;
}

void
deja_dup_operation_set_use_cached_password (DejaDupOperation* self,
                                            gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = deja_dup_operation_get_use_cached_password (self);
	if (old_value != value) {
		self->priv->_use_cached_password = value;
		g_object_notify_by_pspec ((GObject *) self, deja_dup_operation_properties[DEJA_DUP_OPERATION_USE_CACHED_PASSWORD_PROPERTY]);
	}
}

gboolean
deja_dup_operation_get_needs_password (DejaDupOperation* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_needs_password;
	return result;
}

void
deja_dup_operation_set_needs_password (DejaDupOperation* self,
                                       gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = deja_dup_operation_get_needs_password (self);
	if (old_value != value) {
		self->priv->_needs_password = value;
		g_object_notify_by_pspec ((GObject *) self, deja_dup_operation_properties[DEJA_DUP_OPERATION_NEEDS_PASSWORD_PROPERTY]);
	}
}

DejaDupBackend*
deja_dup_operation_get_backend (DejaDupOperation* self)
{
	DejaDupBackend* result;
	DejaDupBackend* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_backend;
	result = _tmp0_;
	return result;
}

void
deja_dup_operation_set_backend (DejaDupOperation* self,
                                DejaDupBackend* value)
{
	DejaDupBackend* old_value;
	g_return_if_fail (self != NULL);
	old_value = deja_dup_operation_get_backend (self);
	if (old_value != value) {
		DejaDupBackend* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_backend);
		self->priv->_backend = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, deja_dup_operation_properties[DEJA_DUP_OPERATION_BACKEND_PROPERTY]);
	}
}

gboolean
deja_dup_operation_get_use_progress (DejaDupOperation* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_use_progress;
	return result;
}

void
deja_dup_operation_set_use_progress (DejaDupOperation* self,
                                     gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = deja_dup_operation_get_use_progress (self);
	if (old_value != value) {
		self->priv->_use_progress = value;
		g_object_notify_by_pspec ((GObject *) self, deja_dup_operation_properties[DEJA_DUP_OPERATION_USE_PROGRESS_PROPERTY]);
	}
}

DejaDupToolJobMode
deja_dup_operation_get_mode (DejaDupOperation* self)
{
	DejaDupToolJobMode result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_mode;
	return result;
}

void
deja_dup_operation_set_mode (DejaDupOperation* self,
                             DejaDupToolJobMode value)
{
	DejaDupToolJobMode old_value;
	g_return_if_fail (self != NULL);
	old_value = deja_dup_operation_get_mode (self);
	if (old_value != value) {
		self->priv->_mode = value;
		g_object_notify_by_pspec ((GObject *) self, deja_dup_operation_properties[DEJA_DUP_OPERATION_MODE_PROPERTY]);
	}
}

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

static void
g_cclosure_user_marshal_VOID__STRING_STRING (GClosure * closure,
                                             GValue * return_value,
                                             guint n_param_values,
                                             const GValue * param_values,
                                             gpointer invocation_hint,
                                             gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer data1, const char* arg_1, const char* arg_2, gpointer data2);
	register GMarshalFunc_VOID__STRING_STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	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__STRING_STRING) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), data2);
}

static void
g_cclosure_user_marshal_VOID__OBJECT_BOOLEAN (GClosure * closure,
                                              GValue * return_value,
                                              guint n_param_values,
                                              const GValue * param_values,
                                              gpointer invocation_hint,
                                              gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_BOOLEAN) (gpointer data1, gpointer arg_1, gboolean arg_2, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_BOOLEAN callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	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_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), g_value_get_boolean (param_values + 2), data2);
}

static void
g_cclosure_user_marshal_VOID__BOOLEAN_BOOLEAN (GClosure * closure,
                                               GValue * return_value,
                                               guint n_param_values,
                                               const GValue * param_values,
                                               gpointer invocation_hint,
                                               gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__BOOLEAN_BOOLEAN) (gpointer data1, gboolean arg_1, gboolean arg_2, gpointer data2);
	register GMarshalFunc_VOID__BOOLEAN_BOOLEAN callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	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__BOOLEAN_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_boolean (param_values + 1), g_value_get_boolean (param_values + 2), data2);
}

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

static void
g_cclosure_user_marshal_VOID__STRING_STRING_STRING_STRING_BOOLEAN (GClosure * closure,
                                                                   GValue * return_value,
                                                                   guint n_param_values,
                                                                   const GValue * param_values,
                                                                   gpointer invocation_hint,
                                                                   gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING_STRING_BOOLEAN) (gpointer data1, const char* arg_1, const char* arg_2, const char* arg_3, const char* arg_4, gboolean arg_5, gpointer data2);
	register GMarshalFunc_VOID__STRING_STRING_STRING_STRING_BOOLEAN callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 6);
	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__STRING_STRING_STRING_STRING_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), g_value_get_string (param_values + 3), g_value_get_string (param_values + 4), g_value_get_boolean (param_values + 5), data2);
}

DejaDupOperationState*
deja_dup_operation_state_construct (GType object_type)
{
	DejaDupOperationState* self = NULL;
	self = (DejaDupOperationState*) g_type_create_instance (object_type);
	return self;
}

DejaDupOperationState*
deja_dup_operation_state_new (void)
{
	return deja_dup_operation_state_construct (DEJA_DUP_OPERATION_TYPE_STATE);
}

static void
deja_dup_operation_value_state_init (GValue* value)
{
	value->data[0].v_pointer = NULL;
}

static void
deja_dup_operation_value_state_free_value (GValue* value)
{
	if (value->data[0].v_pointer) {
		deja_dup_operation_state_unref (value->data[0].v_pointer);
	}
}

static void
deja_dup_operation_value_state_copy_value (const GValue* src_value,
                                           GValue* dest_value)
{
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = deja_dup_operation_state_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}

static gpointer
deja_dup_operation_value_state_peek_pointer (const GValue* value)
{
	return value->data[0].v_pointer;
}

static gchar*
deja_dup_operation_value_state_collect_value (GValue* value,
                                              guint n_collect_values,
                                              GTypeCValue* collect_values,
                                              guint collect_flags)
{
	if (collect_values[0].v_pointer) {
		DejaDupOperationState * object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = deja_dup_operation_state_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}

static gchar*
deja_dup_operation_value_state_lcopy_value (const GValue* value,
                                            guint n_collect_values,
                                            GTypeCValue* collect_values,
                                            guint collect_flags)
{
	DejaDupOperationState ** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = deja_dup_operation_state_ref (value->data[0].v_pointer);
	}
	return NULL;
}

GParamSpec*
deja_dup_operation_param_spec_state (const gchar* name,
                                     const gchar* nick,
                                     const gchar* blurb,
                                     GType object_type,
                                     GParamFlags flags)
{
	DejaDupOperationParamSpecState* spec;
	g_return_val_if_fail (g_type_is_a (object_type, DEJA_DUP_OPERATION_TYPE_STATE), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}

gpointer
deja_dup_operation_value_get_state (const GValue* value)
{
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, DEJA_DUP_OPERATION_TYPE_STATE), NULL);
	return value->data[0].v_pointer;
}

void
deja_dup_operation_value_set_state (GValue* value,
                                    gpointer v_object)
{
	DejaDupOperationState * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, DEJA_DUP_OPERATION_TYPE_STATE));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, DEJA_DUP_OPERATION_TYPE_STATE));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		deja_dup_operation_state_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		deja_dup_operation_state_unref (old);
	}
}

void
deja_dup_operation_value_take_state (GValue* value,
                                     gpointer v_object)
{
	DejaDupOperationState * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, DEJA_DUP_OPERATION_TYPE_STATE));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, DEJA_DUP_OPERATION_TYPE_STATE));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		deja_dup_operation_state_unref (old);
	}
}

static void
deja_dup_operation_state_class_init (DejaDupOperationStateClass * klass,
                                     gpointer klass_data)
{
	deja_dup_operation_state_parent_class = g_type_class_peek_parent (klass);
	((DejaDupOperationStateClass *) klass)->finalize = deja_dup_operation_state_finalize;
}

static void
deja_dup_operation_state_instance_init (DejaDupOperationState * self,
                                        gpointer klass)
{
	self->ref_count = 1;
}

static void
deja_dup_operation_state_finalize (DejaDupOperationState * obj)
{
	DejaDupOperationState * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DEJA_DUP_OPERATION_TYPE_STATE, DejaDupOperationState);
	g_signal_handlers_destroy (self);
	_g_object_unref0 (self->backend);
	_g_object_unref0 (self->tool);
	_g_free0 (self->passphrase);
}

 G_GNUC_NO_INLINE static GType
deja_dup_operation_state_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { deja_dup_operation_value_state_init, deja_dup_operation_value_state_free_value, deja_dup_operation_value_state_copy_value, deja_dup_operation_value_state_peek_pointer, "p", deja_dup_operation_value_state_collect_value, "p", deja_dup_operation_value_state_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (DejaDupOperationStateClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) deja_dup_operation_state_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DejaDupOperationState), 0, (GInstanceInitFunc) deja_dup_operation_state_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	GType deja_dup_operation_state_type_id;
	deja_dup_operation_state_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DejaDupOperationState", &g_define_type_info, &g_define_type_fundamental_info, 0);
	return deja_dup_operation_state_type_id;
}

GType
deja_dup_operation_state_get_type (void)
{
	static gsize deja_dup_operation_state_type_id__once = 0;
	if (g_once_init_enter (&deja_dup_operation_state_type_id__once)) {
		GType deja_dup_operation_state_type_id;
		deja_dup_operation_state_type_id = deja_dup_operation_state_get_type_once ();
		g_once_init_leave (&deja_dup_operation_state_type_id__once, deja_dup_operation_state_type_id);
	}
	return deja_dup_operation_state_type_id__once;
}

gpointer
deja_dup_operation_state_ref (gpointer instance)
{
	DejaDupOperationState * self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}

void
deja_dup_operation_state_unref (gpointer instance)
{
	DejaDupOperationState * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		DEJA_DUP_OPERATION_STATE_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static void
deja_dup_operation_class_init (DejaDupOperationClass * klass,
                               gpointer klass_data)
{
	deja_dup_operation_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DejaDupOperation_private_offset);
	((DejaDupOperationClass *) klass)->get_state = (DejaDupOperationState* (*) (DejaDupOperation*)) deja_dup_operation_real_get_state;
	((DejaDupOperationClass *) klass)->set_state = (void (*) (DejaDupOperation*, DejaDupOperationState*)) deja_dup_operation_real_set_state;
	((DejaDupOperationClass *) klass)->start = (void (*) (DejaDupOperation*, GAsyncReadyCallback, gpointer)) deja_dup_operation_real_start;
	((DejaDupOperationClass *) klass)->start_finish = (void (*) (DejaDupOperation*, GAsyncResult*)) deja_dup_operation_real_start_finish;
	((DejaDupOperationClass *) klass)->stop_if_dormant = (gboolean (*) (DejaDupOperation*)) deja_dup_operation_real_stop_if_dormant;
	((DejaDupOperationClass *) klass)->stop = (void (*) (DejaDupOperation*)) deja_dup_operation_real_stop;
	((DejaDupOperationClass *) klass)->resume = (void (*) (DejaDupOperation*)) deja_dup_operation_real_resume;
	((DejaDupOperationClass *) klass)->prepare = (void (*) (DejaDupOperation*, GAsyncReadyCallback, gpointer)) deja_dup_operation_real_prepare;
	((DejaDupOperationClass *) klass)->prepare_finish = (gboolean (*) (DejaDupOperation*, GAsyncResult*)) deja_dup_operation_real_prepare_finish;
	((DejaDupOperationClass *) klass)->connect_to_backend = (void (*) (DejaDupOperation*)) deja_dup_operation_real_connect_to_backend;
	((DejaDupOperationClass *) klass)->connect_to_job = (void (*) (DejaDupOperation*, gboolean)) deja_dup_operation_real_connect_to_job;
	((DejaDupOperationClass *) klass)->set_passphrase = (void (*) (DejaDupOperation*, const gchar*, gboolean, GAsyncReadyCallback, gpointer)) deja_dup_operation_real_set_passphrase;
	((DejaDupOperationClass *) klass)->set_passphrase_finish = (void (*) (DejaDupOperation*, GAsyncResult*)) deja_dup_operation_real_set_passphrase_finish;
	((DejaDupOperationClass *) klass)->set_backend_password = (void (*) (DejaDupOperation*, const gchar*, gboolean, GAsyncReadyCallback, gpointer)) deja_dup_operation_real_set_backend_password;
	((DejaDupOperationClass *) klass)->set_backend_password_finish = (void (*) (DejaDupOperation*, GAsyncResult*)) deja_dup_operation_real_set_backend_password_finish;
	((DejaDupOperationClass *) klass)->set_mount_op = (void (*) (DejaDupOperation*, GMountOperation*)) deja_dup_operation_real_set_mount_op;
	((DejaDupOperationClass *) klass)->set_oauth_token = (gboolean (*) (DejaDupOperation*, const gchar*)) deja_dup_operation_real_set_oauth_token;
	((DejaDupOperationClass *) klass)->get_success_detail = (gchar* (*) (DejaDupOperation*)) deja_dup_operation_real_get_success_detail;
	((DejaDupOperationClass *) klass)->operation_finished = (void (*) (DejaDupOperation*, gboolean, gboolean, GAsyncReadyCallback, gpointer)) deja_dup_operation_real_operation_finished;
	((DejaDupOperationClass *) klass)->operation_finished_finish = (void (*) (DejaDupOperation*, GAsyncResult*)) deja_dup_operation_real_operation_finished_finish;
	((DejaDupOperationClass *) klass)->make_argv = (GList* (*) (DejaDupOperation*)) deja_dup_operation_real_make_argv;
	G_OBJECT_CLASS (klass)->get_property = _vala_deja_dup_operation_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_deja_dup_operation_set_property;
	G_OBJECT_CLASS (klass)->finalize = deja_dup_operation_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_OPERATION_USE_CACHED_PASSWORD_PROPERTY, deja_dup_operation_properties[DEJA_DUP_OPERATION_USE_CACHED_PASSWORD_PROPERTY] = g_param_spec_boolean ("use-cached-password", "use-cached-password", "use-cached-password", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_OPERATION_NEEDS_PASSWORD_PROPERTY, deja_dup_operation_properties[DEJA_DUP_OPERATION_NEEDS_PASSWORD_PROPERTY] = g_param_spec_boolean ("needs-password", "needs-password", "needs-password", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_OPERATION_BACKEND_PROPERTY, deja_dup_operation_properties[DEJA_DUP_OPERATION_BACKEND_PROPERTY] = g_param_spec_object ("backend", "backend", "backend", DEJA_DUP_TYPE_BACKEND, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_OPERATION_USE_PROGRESS_PROPERTY, deja_dup_operation_properties[DEJA_DUP_OPERATION_USE_PROGRESS_PROPERTY] = g_param_spec_boolean ("use-progress", "use-progress", "use-progress", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_OPERATION_MODE_PROPERTY, deja_dup_operation_properties[DEJA_DUP_OPERATION_MODE_PROPERTY] = g_param_spec_enum ("mode", "mode", "mode", DEJA_DUP_TOOL_JOB_TYPE_MODE, DEJA_DUP_TOOL_JOB_MODE_INVALID, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * Abstract class that abstracts low level operations of duplicity
	   * with specific classes for specific operations
	   *
	   * Abstract class that defines methods and properties that have to be defined
	   * by classes that abstract operations from duplicity. It is generally unnecessary
	   * but it is provided to provide easier development and an abstraction layer
	   * in case Deja Dup project ever replaces its backend.
	   */
	deja_dup_operation_signals[DEJA_DUP_OPERATION_STARTED_SIGNAL] = g_signal_new ("started", DEJA_DUP_TYPE_OPERATION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	deja_dup_operation_signals[DEJA_DUP_OPERATION_DONE_SIGNAL] = g_signal_new ("done", DEJA_DUP_TYPE_OPERATION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__BOOLEAN_BOOLEAN_STRING, G_TYPE_NONE, 3, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_STRING);
	deja_dup_operation_signals[DEJA_DUP_OPERATION_RAISE_ERROR_SIGNAL] = g_signal_new ("raise-error", DEJA_DUP_TYPE_OPERATION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);
	deja_dup_operation_signals[DEJA_DUP_OPERATION_ACTION_DESC_CHANGED_SIGNAL] = g_signal_new ("action-desc-changed", DEJA_DUP_TYPE_OPERATION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	deja_dup_operation_signals[DEJA_DUP_OPERATION_ACTION_FILE_CHANGED_SIGNAL] = g_signal_new ("action-file-changed", DEJA_DUP_TYPE_OPERATION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2, g_file_get_type (), G_TYPE_BOOLEAN);
	deja_dup_operation_signals[DEJA_DUP_OPERATION_IS_FULL_SIGNAL] = g_signal_new ("is-full", DEJA_DUP_TYPE_OPERATION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
	deja_dup_operation_signals[DEJA_DUP_OPERATION_PROGRESS_SIGNAL] = g_signal_new ("progress", DEJA_DUP_TYPE_OPERATION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__DOUBLE, G_TYPE_NONE, 1, G_TYPE_DOUBLE);
	deja_dup_operation_signals[DEJA_DUP_OPERATION_OPEN_URL_SIGNAL] = g_signal_new ("open-url", DEJA_DUP_TYPE_OPERATION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	deja_dup_operation_signals[DEJA_DUP_OPERATION_MOUNT_OP_REQUIRED_SIGNAL] = g_signal_new ("mount-op-required", DEJA_DUP_TYPE_OPERATION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	deja_dup_operation_signals[DEJA_DUP_OPERATION_PASSPHRASE_REQUIRED_SIGNAL] = g_signal_new ("passphrase-required", DEJA_DUP_TYPE_OPERATION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__BOOLEAN_BOOLEAN, G_TYPE_NONE, 2, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);
	deja_dup_operation_signals[DEJA_DUP_OPERATION_BACKEND_PASSWORD_REQUIRED_SIGNAL] = g_signal_new ("backend-password-required", DEJA_DUP_TYPE_OPERATION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_STRING, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
	deja_dup_operation_signals[DEJA_DUP_OPERATION_PAUSE_CHANGED_SIGNAL] = g_signal_new ("pause-changed", DEJA_DUP_TYPE_OPERATION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
	deja_dup_operation_signals[DEJA_DUP_OPERATION_QUESTION_SIGNAL] = g_signal_new ("question", DEJA_DUP_TYPE_OPERATION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_STRING_STRING_BOOLEAN, G_TYPE_NONE, 5, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN);
}

static void
deja_dup_operation_instance_init (DejaDupOperation * self,
                                  gpointer klass)
{
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	self->priv = deja_dup_operation_get_instance_private (self);
	self->priv->_use_cached_password = TRUE;
	self->priv->_use_progress = TRUE;
	self->priv->_mode = DEJA_DUP_TOOL_JOB_MODE_INVALID;
	self->priv->initial_setup_done = FALSE;
	self->priv->first_passphrase_selected = FALSE;
	self->priv->finished = FALSE;
	self->chained_op = NULL;
	self->priv->searched_for_passphrase = FALSE;
	_tmp0_ = g_str_hash;
	_tmp1_ = g_str_equal;
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, NULL, _g_free0_);
	self->priv->local_error_files = _tmp2_;
}

static void
deja_dup_operation_finalize (GObject * obj)
{
	DejaDupOperation * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DEJA_DUP_TYPE_OPERATION, DejaDupOperation);
	g_debug ("Operation.vala:111: Finalizing Operation\n");
	_g_object_unref0 (self->priv->_backend);
	_g_object_unref0 (self->tool);
	_g_object_unref0 (self->job);
	_g_free0 (self->passphrase);
	_g_object_unref0 (self->chained_op);
	_g_hash_table_unref0 (self->priv->local_error_files);
	_g_variant_unref0 (self->priv->job_question_state);
	self->priv->install_package_ids = (_vala_array_free (self->priv->install_package_ids, self->priv->install_package_ids_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (self->priv->oauth_url_to_open);
	G_OBJECT_CLASS (deja_dup_operation_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
deja_dup_operation_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DejaDupOperationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) deja_dup_operation_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DejaDupOperation), 0, (GInstanceInitFunc) deja_dup_operation_instance_init, NULL };
	GType deja_dup_operation_type_id;
	deja_dup_operation_type_id = g_type_register_static (G_TYPE_OBJECT, "DejaDupOperation", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	DejaDupOperation_private_offset = g_type_add_instance_private (deja_dup_operation_type_id, sizeof (DejaDupOperationPrivate));
	return deja_dup_operation_type_id;
}

GType
deja_dup_operation_get_type (void)
{
	static gsize deja_dup_operation_type_id__once = 0;
	if (g_once_init_enter (&deja_dup_operation_type_id__once)) {
		GType deja_dup_operation_type_id;
		deja_dup_operation_type_id = deja_dup_operation_get_type_once ();
		g_once_init_leave (&deja_dup_operation_type_id__once, deja_dup_operation_type_id);
	}
	return deja_dup_operation_type_id__once;
}

static void
_vala_deja_dup_operation_get_property (GObject * object,
                                       guint property_id,
                                       GValue * value,
                                       GParamSpec * pspec)
{
	DejaDupOperation * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DEJA_DUP_TYPE_OPERATION, DejaDupOperation);
	switch (property_id) {
		case DEJA_DUP_OPERATION_USE_CACHED_PASSWORD_PROPERTY:
		g_value_set_boolean (value, deja_dup_operation_get_use_cached_password (self));
		break;
		case DEJA_DUP_OPERATION_NEEDS_PASSWORD_PROPERTY:
		g_value_set_boolean (value, deja_dup_operation_get_needs_password (self));
		break;
		case DEJA_DUP_OPERATION_BACKEND_PROPERTY:
		g_value_set_object (value, deja_dup_operation_get_backend (self));
		break;
		case DEJA_DUP_OPERATION_USE_PROGRESS_PROPERTY:
		g_value_set_boolean (value, deja_dup_operation_get_use_progress (self));
		break;
		case DEJA_DUP_OPERATION_MODE_PROPERTY:
		g_value_set_enum (value, deja_dup_operation_get_mode (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_deja_dup_operation_set_property (GObject * object,
                                       guint property_id,
                                       const GValue * value,
                                       GParamSpec * pspec)
{
	DejaDupOperation * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DEJA_DUP_TYPE_OPERATION, DejaDupOperation);
	switch (property_id) {
		case DEJA_DUP_OPERATION_USE_CACHED_PASSWORD_PROPERTY:
		deja_dup_operation_set_use_cached_password (self, g_value_get_boolean (value));
		break;
		case DEJA_DUP_OPERATION_NEEDS_PASSWORD_PROPERTY:
		deja_dup_operation_set_needs_password (self, g_value_get_boolean (value));
		break;
		case DEJA_DUP_OPERATION_BACKEND_PROPERTY:
		deja_dup_operation_set_backend (self, g_value_get_object (value));
		break;
		case DEJA_DUP_OPERATION_USE_PROGRESS_PROPERTY:
		deja_dup_operation_set_use_progress (self, g_value_get_boolean (value));
		break;
		case DEJA_DUP_OPERATION_MODE_PROPERTY:
		deja_dup_operation_set_mode (self, g_value_get_enum (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

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

