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

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

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

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

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

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


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

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

#define DEJA_DUP_TYPE_DUPLICITY (deja_dup_duplicity_get_type ())
#define DEJA_DUP_DUPLICITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_DUPLICITY, DejaDupDuplicity))
#define DEJA_DUP_DUPLICITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_DUPLICITY, DejaDupDuplicityClass))
#define DEJA_DUP_IS_DUPLICITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_DUPLICITY))
#define DEJA_DUP_IS_DUPLICITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_DUPLICITY))
#define DEJA_DUP_DUPLICITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_DUPLICITY, DejaDupDuplicityClass))

typedef struct _DejaDupDuplicity DejaDupDuplicity;
typedef struct _DejaDupDuplicityClass DejaDupDuplicityClass;

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

typedef struct _DejaDupBackend DejaDupBackend;
typedef struct _DejaDupBackendClass DejaDupBackendClass;

#define DEJA_DUP_OPERATION_TYPE_MODE (deja_dup_operation_mode_get_type ())

#define DEJA_DUP_TYPE_SIMPLE_SETTINGS (deja_dup_simple_settings_get_type ())
#define DEJA_DUP_SIMPLE_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_SIMPLE_SETTINGS, DejaDupSimpleSettings))
#define DEJA_DUP_SIMPLE_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_SIMPLE_SETTINGS, DejaDupSimpleSettingsClass))
#define DEJA_DUP_IS_SIMPLE_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_SIMPLE_SETTINGS))
#define DEJA_DUP_IS_SIMPLE_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_SIMPLE_SETTINGS))
#define DEJA_DUP_SIMPLE_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_SIMPLE_SETTINGS, DejaDupSimpleSettingsClass))

typedef struct _DejaDupSimpleSettings DejaDupSimpleSettings;
typedef struct _DejaDupSimpleSettingsClass DejaDupSimpleSettingsClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

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

typedef struct _DejaDupOperationState DejaDupOperationState;
typedef struct _DejaDupOperationStateClass DejaDupOperationStateClass;
typedef struct _DejaDupOperationStatePrivate DejaDupOperationStatePrivate;
#define _deja_dup_operation_state_unref0(var) ((var == NULL) ? NULL : (var = (deja_dup_operation_state_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define DEJA_DUP_TYPE_BACKEND_AUTO (deja_dup_backend_auto_get_type ())
#define DEJA_DUP_BACKEND_AUTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_BACKEND_AUTO, DejaDupBackendAuto))
#define DEJA_DUP_BACKEND_AUTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_BACKEND_AUTO, DejaDupBackendAutoClass))
#define DEJA_DUP_IS_BACKEND_AUTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_BACKEND_AUTO))
#define DEJA_DUP_IS_BACKEND_AUTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_BACKEND_AUTO))
#define DEJA_DUP_BACKEND_AUTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_BACKEND_AUTO, DejaDupBackendAutoClass))

typedef struct _DejaDupBackendAuto DejaDupBackendAuto;
typedef struct _DejaDupBackendAutoClass DejaDupBackendAutoClass;
typedef struct _DejaDupOperationStartData DejaDupOperationStartData;
typedef struct _DejaDupOperationContinueWithPassphraseData DejaDupOperationContinueWithPassphraseData;
#define __g_list_free__g_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_free0_ (var), NULL)))
typedef struct _DejaDupOperationOperationFinishedData DejaDupOperationOperationFinishedData;
typedef struct _Block6Data Block6Data;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
typedef struct _DejaDupOperationParamSpecState DejaDupOperationParamSpecState;

struct _DejaDupOperation {
	GObject parent_instance;
	DejaDupOperationPrivate * priv;
	DejaDupDuplicity* dup;
	gchar* passphrase;
};

struct _DejaDupOperationClass {
	GObjectClass parent_class;
	void (*start) (DejaDupOperation* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*start_finish) (DejaDupOperation* self, GAsyncResult* _res_);
	void (*connect_to_dup) (DejaDupOperation* self);
	void (*operation_finished) (DejaDupOperation* self, DejaDupDuplicity* dup, gboolean success, gboolean cancelled, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*operation_finished_finish) (DejaDupOperation* self, GAsyncResult* _res_);
	GList* (*make_argv) (DejaDupOperation* self, GError** error);
};

typedef enum  {
	DEJA_DUP_OPERATION_MODE_INVALID,
	DEJA_DUP_OPERATION_MODE_BACKUP,
	DEJA_DUP_OPERATION_MODE_RESTORE,
	DEJA_DUP_OPERATION_MODE_STATUS,
	DEJA_DUP_OPERATION_MODE_LIST,
	DEJA_DUP_OPERATION_MODE_FILEHISTORY
} DejaDupOperationMode;

struct _DejaDupOperationPrivate {
	guint _xid;
	gboolean _needs_password;
	DejaDupBackend* _backend;
	DejaDupOperationMode _mode;
	DejaDupSimpleSettings* settings;
	gboolean finished;
	guint bus_id;
};

struct _DejaDupOperationState {
	GTypeInstance parent_instance;
	volatile int ref_count;
	DejaDupOperationStatePrivate * priv;
	DejaDupBackend* backend;
	gchar* passphrase;
};

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

typedef enum  {
	DEJA_DUP_BACKUP_ERROR_BAD_CONFIG,
	DEJA_DUP_BACKUP_ERROR_ALREADY_RUNNING
} DejaDupBackupError;
#define DEJA_DUP_BACKUP_ERROR deja_dup_backup_error_quark ()
struct _DejaDupOperationStartData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	DejaDupOperation* self;
	const gchar* _tmp0_;
	GError * e;
	DejaDupSimpleSettings* _tmp1_;
	GError * _inner_error_;
};

struct _DejaDupOperationContinueWithPassphraseData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	DejaDupOperation* self;
	GError * e;
	GError * _inner_error_;
};

struct _DejaDupOperationOperationFinishedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	DejaDupOperation* self;
	DejaDupDuplicity* dup;
	gboolean success;
	gboolean cancelled;
};

struct _Block6Data {
	int _ref_count_;
	DejaDupOperation * self;
	gboolean rv;
	GMainLoop* loop;
};

struct _DejaDupOperationParamSpecState {
	GParamSpec parent_instance;
};


static gpointer deja_dup_operation_parent_class = NULL;
static gpointer deja_dup_operation_state_parent_class = NULL;

GType deja_dup_operation_get_type (void) G_GNUC_CONST;
GType deja_dup_duplicity_get_type (void) G_GNUC_CONST;
GType deja_dup_backend_get_type (void) G_GNUC_CONST;
GType deja_dup_operation_mode_get_type (void) G_GNUC_CONST;
GType deja_dup_simple_settings_get_type (void) G_GNUC_CONST;
#define DEJA_DUP_OPERATION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DEJA_DUP_TYPE_OPERATION, DejaDupOperationPrivate))
enum  {
	DEJA_DUP_OPERATION_DUMMY_PROPERTY,
	DEJA_DUP_OPERATION_XID,
	DEJA_DUP_OPERATION_NEEDS_PASSWORD,
	DEJA_DUP_OPERATION_BACKEND,
	DEJA_DUP_OPERATION_USE_PROGRESS,
	DEJA_DUP_OPERATION_MODE
};
gchar* deja_dup_operation_mode_to_string (DejaDupOperationMode mode);
gpointer deja_dup_operation_state_ref (gpointer instance);
void deja_dup_operation_state_unref (gpointer instance);
GParamSpec* deja_dup_operation_param_spec_state (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void deja_dup_operation_value_set_state (GValue* value, gpointer v_object);
void deja_dup_operation_value_take_state (GValue* value, gpointer v_object);
gpointer deja_dup_operation_value_get_state (const GValue* value);
GType deja_dup_operation_state_get_type (void) G_GNUC_CONST;
DejaDupOperationState* deja_dup_operation_get_state (DejaDupOperation* self);
DejaDupOperationState* deja_dup_operation_state_new (void);
DejaDupOperationState* deja_dup_operation_state_construct (GType object_type);
DejaDupBackend* deja_dup_operation_get_backend (DejaDupOperation* self);
void deja_dup_operation_set_state (DejaDupOperation* self, DejaDupOperationState* state);
static void deja_dup_operation_set_backend (DejaDupOperation* self, DejaDupBackend* value);
void deja_dup_operation_set_passphrase (DejaDupOperation* self, const gchar* passphrase);
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_);
void deja_dup_operation_start (DejaDupOperation* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void deja_dup_operation_start_finish (DejaDupOperation* self, GAsyncResult* _res_);
static gboolean deja_dup_operation_real_start_co (DejaDupOperationStartData* data);
GQuark deja_dup_backup_error_quark (void);
static void deja_dup_operation_claim_bus (DejaDupOperation* self, GError** error);
void deja_dup_network_ensure_status (GAsyncReadyCallback _callback_, gpointer _user_data_);
void deja_dup_network_ensure_status_finish (GAsyncResult* _res_);
static void deja_dup_operation_start_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
GType deja_dup_backend_auto_get_type (void) G_GNUC_CONST;
DejaDupSimpleSettings* deja_dup_get_settings (const gchar* subdir);
static void deja_dup_operation_restart (DejaDupOperation* self);
static void _deja_dup_operation_restart_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
void deja_dup_duplicity_cancel (DejaDupDuplicity* self);
DejaDupOperationMode deja_dup_operation_get_mode (DejaDupOperation* self);
DejaDupDuplicity* deja_dup_duplicity_new (DejaDupOperationMode mode);
DejaDupDuplicity* deja_dup_duplicity_construct (GType object_type, DejaDupOperationMode mode);
void deja_dup_operation_connect_to_dup (DejaDupOperation* self);
gboolean deja_dup_operation_get_needs_password (DejaDupOperation* self);
void deja_dup_operation_set_needs_password (DejaDupOperation* self, gboolean value);
void deja_dup_duplicity_set_encrypt_password (DejaDupDuplicity* self, const gchar* value);
static void deja_dup_operation_continue_with_passphrase (DejaDupOperation* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void deja_dup_operation_continue_with_passphrase_finish (DejaDupOperation* self, GAsyncResult* _res_);
void deja_dup_operation_cancel (DejaDupOperation* self);
void deja_dup_operation_stop (DejaDupOperation* self);
void deja_dup_duplicity_stop (DejaDupDuplicity* self);
static void deja_dup_operation_real_connect_to_dup (DejaDupOperation* self);
static void _lambda15_ (DejaDupDuplicity* d, gboolean o, gboolean c, DejaDupOperation* self);
void deja_dup_operation_operation_finished (DejaDupOperation* self, DejaDupDuplicity* dup, gboolean success, gboolean cancelled, GAsyncReadyCallback _callback_, gpointer _user_data_);
void deja_dup_operation_operation_finished_finish (DejaDupOperation* self, GAsyncResult* _res_);
static void __lambda15__deja_dup_duplicity_done (DejaDupDuplicity* _sender, gboolean success, gboolean cancelled, gpointer self);
static void _lambda16_ (DejaDupDuplicity* d, const gchar* s, const gchar* detail, DejaDupOperation* self);
static void __lambda16__deja_dup_duplicity_raise_error (DejaDupDuplicity* _sender, const gchar* errstr, const gchar* detail, gpointer self);
static void _lambda17_ (DejaDupDuplicity* d, const gchar* s, DejaDupOperation* self);
static void __lambda17__deja_dup_duplicity_action_desc_changed (DejaDupDuplicity* _sender, const gchar* action, gpointer self);
static void _lambda18_ (DejaDupDuplicity* d, GFile* f, gboolean b, DejaDupOperation* self);
static void __lambda18__deja_dup_duplicity_action_file_changed (DejaDupDuplicity* _sender, GFile* file, gboolean actual, gpointer self);
static void _lambda19_ (DejaDupDuplicity* d, gdouble p, DejaDupOperation* self);
static void __lambda19__deja_dup_duplicity_progress (DejaDupDuplicity* _sender, gdouble percent, gpointer self);
static void _lambda20_ (DejaDupDuplicity* d, const gchar* t, const gchar* m, DejaDupOperation* self);
static void __lambda20__deja_dup_duplicity_question (DejaDupDuplicity* _sender, const gchar* title, const gchar* msg, gpointer self);
static void _lambda21_ (gboolean first, DejaDupOperation* self);
static void __lambda21__deja_dup_duplicity_is_full (DejaDupDuplicity* _sender, gboolean first, gpointer self);
static void _lambda22_ (DejaDupOperation* self);
static void __lambda22__deja_dup_duplicity_bad_encryption_password (DejaDupDuplicity* _sender, gpointer self);
static void deja_dup_operation_continue_with_passphrase_data_free (gpointer _data);
static gboolean deja_dup_operation_continue_with_passphrase_co (DejaDupOperationContinueWithPassphraseData* data);
static void deja_dup_operation_continue_with_envp (DejaDupOperation* self, DejaDupBackend* b, gboolean success, GList* envp, const gchar* _error_);
static void _deja_dup_operation_continue_with_envp_deja_dup_backend_envp_ready (DejaDupBackend* _sender, gboolean success, GList* envp, const gchar* _error_, gpointer self);
void deja_dup_backend_get_envp (DejaDupBackend* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void deja_dup_backend_get_envp_finish (DejaDupBackend* self, GAsyncResult* _res_, GError** error);
static void deja_dup_operation_continue_with_passphrase_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
GList* deja_dup_operation_make_argv (DejaDupOperation* self, GError** error);
void deja_dup_backend_add_argv (DejaDupBackend* self, DejaDupOperationMode mode, GList** argv);
void deja_dup_duplicity_start (DejaDupDuplicity* self, DejaDupBackend* backend, GList* argv, GList* envp);
static void _g_free0_ (gpointer var);
static void _g_list_free__g_free0_ (GList* self);
static void deja_dup_operation_real_operation_finished_data_free (gpointer _data);
static void deja_dup_operation_real_operation_finished (DejaDupOperation* self, DejaDupDuplicity* dup, 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_unclaim_bus (DejaDupOperation* self);
static GList* deja_dup_operation_real_make_argv (DejaDupOperation* self, GError** error);
static Block6Data* block6_data_ref (Block6Data* _data6_);
static void block6_data_unref (Block6Data* _data6_);
static void _lambda7_ (DejaDupOperation* self);
static void __lambda7__gbus_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self);
static void _lambda8_ (Block6Data* _data6_);
static void __lambda8__gbus_name_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self);
static void _lambda9_ (Block6Data* _data6_);
static void __lambda9__gbus_name_lost_callback (GDBusConnection* connection, const gchar* name, gpointer self);
DejaDupOperation* deja_dup_operation_construct (GType object_type);
guint deja_dup_operation_get_xid (DejaDupOperation* self);
static void deja_dup_operation_set_xid (DejaDupOperation* self, guint value);
gboolean deja_dup_operation_get_use_progress (DejaDupOperation* self);
gboolean deja_dup_duplicity_get_use_progress (DejaDupDuplicity* self);
void deja_dup_operation_set_use_progress (DejaDupOperation* self, gboolean value);
void deja_dup_duplicity_set_use_progress (DejaDupDuplicity* self, gboolean value);
static void deja_dup_operation_set_mode (DejaDupOperation* self, DejaDupOperationMode value);
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 (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 GObject * deja_dup_operation_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
DejaDupBackend* deja_dup_backend_get_default (void);
enum  {
	DEJA_DUP_OPERATION_STATE_DUMMY_PROPERTY
};
static void deja_dup_operation_state_finalize (DejaDupOperationState* obj);
static void deja_dup_operation_finalize (GObject* obj);
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);


GType deja_dup_operation_mode_get_type (void) {
	static volatile gsize deja_dup_operation_mode_type_id__volatile = 0;
	if (g_once_init_enter (&deja_dup_operation_mode_type_id__volatile)) {
		static const GEnumValue values[] = {{DEJA_DUP_OPERATION_MODE_INVALID, "DEJA_DUP_OPERATION_MODE_INVALID", "invalid"}, {DEJA_DUP_OPERATION_MODE_BACKUP, "DEJA_DUP_OPERATION_MODE_BACKUP", "backup"}, {DEJA_DUP_OPERATION_MODE_RESTORE, "DEJA_DUP_OPERATION_MODE_RESTORE", "restore"}, {DEJA_DUP_OPERATION_MODE_STATUS, "DEJA_DUP_OPERATION_MODE_STATUS", "status"}, {DEJA_DUP_OPERATION_MODE_LIST, "DEJA_DUP_OPERATION_MODE_LIST", "list"}, {DEJA_DUP_OPERATION_MODE_FILEHISTORY, "DEJA_DUP_OPERATION_MODE_FILEHISTORY", "filehistory"}, {0, NULL, NULL}};
		GType deja_dup_operation_mode_type_id;
		deja_dup_operation_mode_type_id = g_enum_register_static ("DejaDupOperationMode", values);
		g_once_init_leave (&deja_dup_operation_mode_type_id__volatile, deja_dup_operation_mode_type_id);
	}
	return deja_dup_operation_mode_type_id__volatile;
}


gchar* deja_dup_operation_mode_to_string (DejaDupOperationMode mode) {
	gchar* result = NULL;
	switch (mode) {
		case DEJA_DUP_OPERATION_MODE_BACKUP:
		{
			const gchar* _tmp0_ = NULL;
			gchar* _tmp1_;
			_tmp0_ = _ ("Backing up…");
			_tmp1_ = g_strdup (_tmp0_);
			result = _tmp1_;
			return result;
		}
		case DEJA_DUP_OPERATION_MODE_RESTORE:
		{
			const gchar* _tmp2_ = NULL;
			gchar* _tmp3_;
			_tmp2_ = _ ("Restoring…");
			_tmp3_ = g_strdup (_tmp2_);
			result = _tmp3_;
			return result;
		}
		case DEJA_DUP_OPERATION_MODE_STATUS:
		{
			const gchar* _tmp4_ = NULL;
			gchar* _tmp5_;
			_tmp4_ = _ ("Checking for backups…");
			_tmp5_ = g_strdup (_tmp4_);
			result = _tmp5_;
			return result;
		}
		case DEJA_DUP_OPERATION_MODE_LIST:
		{
			const gchar* _tmp6_ = NULL;
			gchar* _tmp7_;
			_tmp6_ = _ ("Listing files…");
			_tmp7_ = g_strdup (_tmp6_);
			result = _tmp7_;
			return result;
		}
		default:
		{
			const gchar* _tmp8_ = NULL;
			gchar* _tmp9_;
			_tmp8_ = _ ("Preparing…");
			_tmp9_ = g_strdup (_tmp8_);
			result = _tmp9_;
			return result;
		}
	}
}


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


DejaDupOperationState* deja_dup_operation_get_state (DejaDupOperation* self) {
	DejaDupOperationState* result = NULL;
	DejaDupOperationState* _tmp0_ = NULL;
	DejaDupOperationState* rv;
	DejaDupBackend* _tmp1_;
	gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = deja_dup_operation_state_new ();
	rv = _tmp0_;
	_tmp1_ = _g_object_ref0 (self->priv->_backend);
	_g_object_unref0 (rv->backend);
	rv->backend = _tmp1_;
	_tmp2_ = g_strdup (self->passphrase);
	_g_free0 (rv->passphrase);
	rv->passphrase = _tmp2_;
	result = rv;
	return result;
}


void deja_dup_operation_set_state (DejaDupOperation* self, DejaDupOperationState* state) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (state != NULL);
	deja_dup_operation_set_backend (self, state->backend);
	deja_dup_operation_set_passphrase (self, state->passphrase);
}


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_;
	_data_ = g_slice_new0 (DejaDupOperationStartData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, deja_dup_operation_real_start);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, deja_dup_operation_real_start_data_free);
	_data_->self = _g_object_ref0 (self);
	deja_dup_operation_real_start_co (_data_);
}


static void deja_dup_operation_real_start_finish (DejaDupOperation* self, GAsyncResult* _res_) {
	DejaDupOperationStartData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


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 void _deja_dup_operation_restart_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	deja_dup_operation_restart (self);
}


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:
	data->_tmp0_ = NULL;
	data->_tmp0_ = _ ("Preparing…");
	g_signal_emit_by_name (data->self, "action-desc-changed", data->_tmp0_);
	deja_dup_operation_claim_bus (data->self, &data->_inner_error_);
	if (data->_inner_error_ != NULL) {
		goto __catch39_g_error;
	}
	goto __finally39;
	__catch39_g_error:
	{
		data->e = data->_inner_error_;
		data->_inner_error_ = NULL;
		g_signal_emit_by_name (data->self, "raise-error", data->e->message, NULL);
		g_signal_emit_by_name (data->self, "done", FALSE, FALSE);
		_g_error_free0 (data->e);
		if (data->_state_ == 0) {
			g_simple_async_result_complete_in_idle (data->_async_result);
		} else {
			g_simple_async_result_complete (data->_async_result);
		}
		g_object_unref (data->_async_result);
		return FALSE;
	}
	__finally39:
	if (data->_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, data->_inner_error_->message, g_quark_to_string (data->_inner_error_->domain), data->_inner_error_->code);
		g_clear_error (&data->_inner_error_);
		return FALSE;
	}
	data->_state_ = 1;
	deja_dup_network_ensure_status (deja_dup_operation_start_ready, data);
	return FALSE;
	_state_1:
	deja_dup_network_ensure_status_finish (data->_res_);
	if (DEJA_DUP_IS_BACKEND_AUTO (data->self->priv->_backend)) {
		data->_tmp1_ = NULL;
		data->_tmp1_ = deja_dup_get_settings (NULL);
		_g_object_unref0 (data->self->priv->settings);
		data->self->priv->settings = data->_tmp1_;
		g_signal_connect_object ((GObject*) data->self->priv->settings, "notify::backend", (GCallback) _deja_dup_operation_restart_g_object_notify, data->self, 0);
	} else {
		deja_dup_operation_restart (data->self);
	}
	if (data->_state_ == 0) {
		g_simple_async_result_complete_in_idle (data->_async_result);
	} else {
		g_simple_async_result_complete (data->_async_result);
	}
	g_object_unref (data->_async_result);
	return FALSE;
}


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


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


static void deja_dup_operation_restart (DejaDupOperation* self) {
	DejaDupDuplicity* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	g_return_if_fail (self != NULL);
	if (self->priv->settings != NULL) {
		guint _tmp0_;
		GQuark _tmp1_;
		g_signal_parse_name ("notify::backend", G_TYPE_OBJECT, &_tmp0_, &_tmp1_, TRUE);
		g_signal_handlers_disconnect_matched ((GObject*) self->priv->settings, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, _tmp1_, NULL, (GCallback) _deja_dup_operation_restart_g_object_notify, self);
		_g_object_unref0 (self->priv->settings);
		self->priv->settings = NULL;
	}
	if (self->dup != NULL) {
		g_signal_handlers_disconnect_matched (self->dup, G_SIGNAL_MATCH_DATA, (guint) 0, (GQuark) 0, NULL, NULL, self);
		deja_dup_duplicity_cancel (self->dup);
		_g_object_unref0 (self->dup);
		self->dup = NULL;
	}
	_tmp2_ = deja_dup_duplicity_new (self->priv->_mode);
	_g_object_unref0 (self->dup);
	self->dup = _tmp2_;
	deja_dup_operation_connect_to_dup (self);
	g_object_ref ((GObject*) self);
	if (self->priv->_needs_password) {
		_tmp3_ = self->passphrase == NULL;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		deja_dup_operation_set_needs_password (self, TRUE);
		g_signal_emit_by_name (self, "passphrase-required");
	} else {
		deja_dup_duplicity_set_encrypt_password (self->dup, self->passphrase);
	}
	if (!self->priv->finished) {
		deja_dup_operation_continue_with_passphrase (self, NULL, NULL);
	}
	g_object_unref ((GObject*) self);
}


void deja_dup_operation_cancel (DejaDupOperation* self) {
	g_return_if_fail (self != NULL);
	deja_dup_duplicity_cancel (self->dup);
}


void deja_dup_operation_stop (DejaDupOperation* self) {
	g_return_if_fail (self != NULL);
	deja_dup_duplicity_stop (self->dup);
}


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


static void __lambda15__deja_dup_duplicity_done (DejaDupDuplicity* _sender, gboolean success, gboolean cancelled, gpointer self) {
	_lambda15_ (_sender, success, cancelled, self);
}


static void _lambda16_ (DejaDupDuplicity* d, const gchar* s, const gchar* detail, DejaDupOperation* self) {
	g_return_if_fail (d != NULL);
	g_return_if_fail (s != NULL);
	g_signal_emit_by_name (self, "raise-error", s, detail);
}


static void __lambda16__deja_dup_duplicity_raise_error (DejaDupDuplicity* _sender, const gchar* errstr, const gchar* detail, gpointer self) {
	_lambda16_ (_sender, errstr, detail, self);
}


static void _lambda17_ (DejaDupDuplicity* d, const gchar* s, DejaDupOperation* self) {
	g_return_if_fail (d != NULL);
	g_return_if_fail (s != NULL);
	g_signal_emit_by_name (self, "action-desc-changed", s);
}


static void __lambda17__deja_dup_duplicity_action_desc_changed (DejaDupDuplicity* _sender, const gchar* action, gpointer self) {
	_lambda17_ (_sender, action, self);
}


static void _lambda18_ (DejaDupDuplicity* d, GFile* f, gboolean b, DejaDupOperation* self) {
	g_return_if_fail (d != NULL);
	g_return_if_fail (f != NULL);
	g_signal_emit_by_name (self, "action-file-changed", f, b);
}


static void __lambda18__deja_dup_duplicity_action_file_changed (DejaDupDuplicity* _sender, GFile* file, gboolean actual, gpointer self) {
	_lambda18_ (_sender, file, actual, self);
}


static void _lambda19_ (DejaDupDuplicity* d, gdouble p, DejaDupOperation* self) {
	g_return_if_fail (d != NULL);
	g_signal_emit_by_name (self, "progress", p);
}


static void __lambda19__deja_dup_duplicity_progress (DejaDupDuplicity* _sender, gdouble percent, gpointer self) {
	_lambda19_ (_sender, percent, self);
}


static void _lambda20_ (DejaDupDuplicity* d, const gchar* t, const gchar* m, DejaDupOperation* self) {
	g_return_if_fail (d != NULL);
	g_return_if_fail (t != NULL);
	g_return_if_fail (m != NULL);
	g_signal_emit_by_name (self, "question", t, m);
}


static void __lambda20__deja_dup_duplicity_question (DejaDupDuplicity* _sender, const gchar* title, const gchar* msg, gpointer self) {
	_lambda20_ (_sender, title, msg, self);
}


static void _lambda21_ (gboolean first, DejaDupOperation* self) {
	g_signal_emit_by_name (self, "is-full", first);
}


static void __lambda21__deja_dup_duplicity_is_full (DejaDupDuplicity* _sender, gboolean first, gpointer self) {
	_lambda21_ (first, self);
}


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


static void __lambda22__deja_dup_duplicity_bad_encryption_password (DejaDupDuplicity* _sender, gpointer self) {
	_lambda22_ (self);
}


static void deja_dup_operation_real_connect_to_dup (DejaDupOperation* self) {
	g_return_if_fail (self != NULL);
	g_signal_connect_object (self->dup, "done", (GCallback) __lambda15__deja_dup_duplicity_done, self, 0);
	g_signal_connect_object (self->dup, "raise-error", (GCallback) __lambda16__deja_dup_duplicity_raise_error, self, 0);
	g_signal_connect_object (self->dup, "action-desc-changed", (GCallback) __lambda17__deja_dup_duplicity_action_desc_changed, self, 0);
	g_signal_connect_object (self->dup, "action-file-changed", (GCallback) __lambda18__deja_dup_duplicity_action_file_changed, self, 0);
	g_signal_connect_object (self->dup, "progress", (GCallback) __lambda19__deja_dup_duplicity_progress, self, 0);
	g_signal_connect_object (self->dup, "question", (GCallback) __lambda20__deja_dup_duplicity_question, self, 0);
	g_signal_connect_object (self->dup, "is-full", (GCallback) __lambda21__deja_dup_duplicity_is_full, self, 0);
	g_signal_connect_object (self->dup, "bad-encryption-password", (GCallback) __lambda22__deja_dup_duplicity_bad_encryption_password, self, 0);
}


void deja_dup_operation_connect_to_dup (DejaDupOperation* self) {
	DEJA_DUP_OPERATION_GET_CLASS (self)->connect_to_dup (self);
}


void deja_dup_operation_set_passphrase (DejaDupOperation* self, const gchar* passphrase) {
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	deja_dup_operation_set_needs_password (self, FALSE);
	_tmp0_ = g_strdup (passphrase);
	_g_free0 (self->passphrase);
	self->passphrase = _tmp0_;
	if (self->dup != NULL) {
		deja_dup_duplicity_set_encrypt_password (self->dup, passphrase);
	}
}


static void deja_dup_operation_continue_with_passphrase_data_free (gpointer _data) {
	DejaDupOperationContinueWithPassphraseData* data;
	data = _data;
	_g_object_unref0 (data->self);
	g_slice_free (DejaDupOperationContinueWithPassphraseData, data);
}


static void deja_dup_operation_continue_with_passphrase (DejaDupOperation* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	DejaDupOperationContinueWithPassphraseData* _data_;
	_data_ = g_slice_new0 (DejaDupOperationContinueWithPassphraseData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, deja_dup_operation_continue_with_passphrase);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, deja_dup_operation_continue_with_passphrase_data_free);
	_data_->self = _g_object_ref0 (self);
	deja_dup_operation_continue_with_passphrase_co (_data_);
}


static void deja_dup_operation_continue_with_passphrase_finish (DejaDupOperation* self, GAsyncResult* _res_) {
	DejaDupOperationContinueWithPassphraseData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _deja_dup_operation_continue_with_envp_deja_dup_backend_envp_ready (DejaDupBackend* _sender, gboolean success, GList* envp, const gchar* _error_, gpointer self) {
	deja_dup_operation_continue_with_envp (self, _sender, success, envp, _error_);
}


static void deja_dup_operation_continue_with_passphrase_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	DejaDupOperationContinueWithPassphraseData* data;
	data = _user_data_;
	data->_source_object_ = source_object;
	data->_res_ = _res_;
	deja_dup_operation_continue_with_passphrase_co (data);
}


static gboolean deja_dup_operation_continue_with_passphrase_co (DejaDupOperationContinueWithPassphraseData* data) {
	switch (data->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	g_signal_connect_object (data->self->priv->_backend, "envp-ready", (GCallback) _deja_dup_operation_continue_with_envp_deja_dup_backend_envp_ready, data->self, 0);
	data->_state_ = 1;
	deja_dup_backend_get_envp (data->self->priv->_backend, deja_dup_operation_continue_with_passphrase_ready, data);
	return FALSE;
	_state_1:
	deja_dup_backend_get_envp_finish (data->self->priv->_backend, data->_res_, &data->_inner_error_);
	if (data->_inner_error_ != NULL) {
		goto __catch40_g_error;
	}
	goto __finally40;
	__catch40_g_error:
	{
		data->e = data->_inner_error_;
		data->_inner_error_ = NULL;
		g_signal_emit_by_name (data->self, "raise-error", data->e->message, NULL);
		deja_dup_operation_operation_finished (data->self, data->self->dup, FALSE, FALSE, NULL, NULL);
		_g_error_free0 (data->e);
	}
	__finally40:
	if (data->_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, data->_inner_error_->message, g_quark_to_string (data->_inner_error_->domain), data->_inner_error_->code);
		g_clear_error (&data->_inner_error_);
		return FALSE;
	}
	if (data->_state_ == 0) {
		g_simple_async_result_complete_in_idle (data->_async_result);
	} else {
		g_simple_async_result_complete (data->_async_result);
	}
	g_object_unref (data->_async_result);
	return FALSE;
}


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


static void _g_list_free__g_free0_ (GList* self) {
	g_list_foreach (self, (GFunc) _g_free0_, NULL);
	g_list_free (self);
}


static void deja_dup_operation_continue_with_envp (DejaDupOperation* self, DejaDupBackend* b, gboolean success, GList* envp, const gchar* _error_) {
	guint _tmp0_;
	GList* _tmp1_ = NULL;
	GList* argv;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (b != NULL);
	g_signal_parse_name ("envp-ready", DEJA_DUP_TYPE_BACKEND, &_tmp0_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (self->priv->_backend, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 0, NULL, (GCallback) _deja_dup_operation_continue_with_envp_deja_dup_backend_envp_ready, self);
	if (!success) {
		if (_error_ != NULL) {
			g_signal_emit_by_name (self, "raise-error", _error_, NULL);
		}
		deja_dup_operation_operation_finished (self, self->dup, FALSE, FALSE, NULL, NULL);
		return;
	}
	_tmp1_ = deja_dup_operation_make_argv (self, &_inner_error_);
	argv = _tmp1_;
	if (_inner_error_ != NULL) {
		goto __catch41_g_error;
	}
	deja_dup_backend_add_argv (self->priv->_backend, self->priv->_mode, &argv);
	deja_dup_duplicity_start (self->dup, self->priv->_backend, argv, envp);
	__g_list_free__g_free0_0 (argv);
	goto __finally41;
	__catch41_g_error:
	{
		GError * e;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_signal_emit_by_name (self, "raise-error", e->message, NULL);
		deja_dup_operation_operation_finished (self, self->dup, FALSE, FALSE, NULL, NULL);
		_g_error_free0 (e);
		return;
	}
	__finally41:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


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


static void deja_dup_operation_real_operation_finished (DejaDupOperation* self, DejaDupDuplicity* dup, gboolean success, gboolean cancelled, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	DejaDupOperationOperationFinishedData* _data_;
	_data_ = g_slice_new0 (DejaDupOperationOperationFinishedData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, deja_dup_operation_real_operation_finished);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, deja_dup_operation_real_operation_finished_data_free);
	_data_->self = _g_object_ref0 (self);
	_data_->dup = _g_object_ref0 (dup);
	_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_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static gboolean deja_dup_operation_real_operation_finished_co (DejaDupOperationOperationFinishedData* data) {
	switch (data->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	data->self->priv->finished = TRUE;
	deja_dup_operation_unclaim_bus (data->self);
	g_signal_emit_by_name (data->self, "done", data->success, data->cancelled);
	if (data->_state_ == 0) {
		g_simple_async_result_complete_in_idle (data->_async_result);
	} else {
		g_simple_async_result_complete (data->_async_result);
	}
	g_object_unref (data->_async_result);
	return FALSE;
}


void deja_dup_operation_operation_finished (DejaDupOperation* self, DejaDupDuplicity* dup, gboolean success, gboolean cancelled, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	DEJA_DUP_OPERATION_GET_CLASS (self)->operation_finished (self, dup, success, cancelled, _callback_, _user_data_);
}


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


static GList* deja_dup_operation_real_make_argv (DejaDupOperation* self, GError** error) {
	GList* result = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	result = NULL;
	return result;
}


GList* deja_dup_operation_make_argv (DejaDupOperation* self, GError** error) {
	return DEJA_DUP_OPERATION_GET_CLASS (self)->make_argv (self, error);
}


static Block6Data* block6_data_ref (Block6Data* _data6_) {
	g_atomic_int_inc (&_data6_->_ref_count_);
	return _data6_;
}


static void block6_data_unref (Block6Data* _data6_) {
	if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
		_g_object_unref0 (_data6_->self);
		_g_main_loop_unref0 (_data6_->loop);
		g_slice_free (Block6Data, _data6_);
	}
}


static void _lambda7_ (DejaDupOperation* self) {
}


static void __lambda7__gbus_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
	_lambda7_ (self);
}


static void _lambda8_ (Block6Data* _data6_) {
	DejaDupOperation * self;
	self = _data6_->self;
	_data6_->rv = TRUE;
	g_main_loop_quit (_data6_->loop);
}


static void __lambda8__gbus_name_acquired_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
	_lambda8_ (self);
}


static void _lambda9_ (Block6Data* _data6_) {
	DejaDupOperation * self;
	self = _data6_->self;
	_data6_->rv = FALSE;
	g_main_loop_quit (_data6_->loop);
}


static void __lambda9__gbus_name_lost_callback (GDBusConnection* connection, const gchar* name, gpointer self) {
	_lambda9_ (self);
}


static void deja_dup_operation_claim_bus (DejaDupOperation* self, GError** error) {
	Block6Data* _data6_;
	GMainLoop* _tmp0_ = NULL;
	guint _tmp1_;
	gboolean _tmp2_ = FALSE;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	_data6_ = g_slice_new0 (Block6Data);
	_data6_->_ref_count_ = 1;
	_data6_->self = g_object_ref (self);
	_data6_->rv = FALSE;
	_tmp0_ = g_main_loop_new (NULL, FALSE);
	_data6_->loop = _tmp0_;
	_tmp1_ = g_bus_own_name_with_closures (G_BUS_TYPE_SESSION, "org.gnome.DejaDup.Operation", G_BUS_NAME_OWNER_FLAGS_NONE, (GClosure*) ((__lambda7__gbus_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) __lambda7__gbus_acquired_callback, g_object_ref (self), g_object_unref)), (GClosure*) ((__lambda8__gbus_name_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) __lambda8__gbus_name_acquired_callback, block6_data_ref (_data6_), block6_data_unref)), (GClosure*) ((__lambda9__gbus_name_lost_callback == NULL) ? NULL : g_cclosure_new ((GCallback) __lambda9__gbus_name_lost_callback, block6_data_ref (_data6_), block6_data_unref)));
	self->priv->bus_id = _tmp1_;
	g_main_loop_run (_data6_->loop);
	if (self->priv->bus_id == 0) {
		_tmp2_ = TRUE;
	} else {
		_tmp2_ = _data6_->rv == FALSE;
	}
	if (_tmp2_) {
		const gchar* _tmp3_ = NULL;
		GError* _tmp4_ = NULL;
		_tmp3_ = _ ("Another backup operation is already running");
		_tmp4_ = g_error_new_literal (DEJA_DUP_BACKUP_ERROR, DEJA_DUP_BACKUP_ERROR_ALREADY_RUNNING, _tmp3_);
		_inner_error_ = _tmp4_;
		if (_inner_error_->domain == DEJA_DUP_BACKUP_ERROR) {
			g_propagate_error (error, _inner_error_);
			block6_data_unref (_data6_);
			_data6_ = NULL;
			return;
		} else {
			block6_data_unref (_data6_);
			_data6_ = NULL;
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	block6_data_unref (_data6_);
	_data6_ = NULL;
}


static void deja_dup_operation_unclaim_bus (DejaDupOperation* self) {
	g_return_if_fail (self != NULL);
	g_bus_unown_name (self->priv->bus_id);
}


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


guint deja_dup_operation_get_xid (DejaDupOperation* self) {
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_xid;
	return result;
}


static void deja_dup_operation_set_xid (DejaDupOperation* self, guint value) {
	g_return_if_fail (self != NULL);
	self->priv->_xid = value;
	g_object_notify ((GObject *) self, "xid");
}


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) {
	g_return_if_fail (self != NULL);
	self->priv->_needs_password = value;
	g_object_notify ((GObject *) self, "needs-password");
}


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


static void deja_dup_operation_set_backend (DejaDupOperation* self, DejaDupBackend* value) {
	DejaDupBackend* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_backend);
	self->priv->_backend = _tmp0_;
	g_object_notify ((GObject *) self, "backend");
}


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


void deja_dup_operation_set_use_progress (DejaDupOperation* self, gboolean value) {
	g_return_if_fail (self != NULL);
	deja_dup_duplicity_set_use_progress (self->dup, value);
	g_object_notify ((GObject *) self, "use-progress");
}


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


static void deja_dup_operation_set_mode (DejaDupOperation* self, DejaDupOperationMode value) {
	g_return_if_fail (self != NULL);
	self->priv->_mode = value;
	g_object_notify ((GObject *) self, "mode");
}


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, 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 (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, 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, 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 GObject * deja_dup_operation_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	DejaDupOperation * self;
	DejaDupBackend* _tmp0_ = NULL;
	DejaDupBackend* _tmp1_;
	parent_class = G_OBJECT_CLASS (deja_dup_operation_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = DEJA_DUP_OPERATION (obj);
	_tmp0_ = deja_dup_backend_get_default ();
	_tmp1_ = _tmp0_;
	deja_dup_operation_set_backend (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	return obj;
}


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) {
	deja_dup_operation_state_parent_class = g_type_class_peek_parent (klass);
	DEJA_DUP_OPERATION_STATE_CLASS (klass)->finalize = deja_dup_operation_state_finalize;
}


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


static void deja_dup_operation_state_finalize (DejaDupOperationState* obj) {
	DejaDupOperationState * self;
	self = DEJA_DUP_OPERATION_STATE (obj);
	_g_object_unref0 (self->backend);
	_g_free0 (self->passphrase);
}


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


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) {
	deja_dup_operation_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (DejaDupOperationPrivate));
	DEJA_DUP_OPERATION_CLASS (klass)->start = deja_dup_operation_real_start;
	DEJA_DUP_OPERATION_CLASS (klass)->start_finish = deja_dup_operation_real_start_finish;
	DEJA_DUP_OPERATION_CLASS (klass)->connect_to_dup = deja_dup_operation_real_connect_to_dup;
	DEJA_DUP_OPERATION_CLASS (klass)->operation_finished = deja_dup_operation_real_operation_finished;
	DEJA_DUP_OPERATION_CLASS (klass)->operation_finished_finish = deja_dup_operation_real_operation_finished_finish;
	DEJA_DUP_OPERATION_CLASS (klass)->make_argv = 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)->constructor = deja_dup_operation_constructor;
	G_OBJECT_CLASS (klass)->finalize = deja_dup_operation_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_OPERATION_XID, g_param_spec_uint ("xid", "xid", "xid", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_OPERATION_NEEDS_PASSWORD, g_param_spec_boolean ("needs-password", "needs-password", "needs-password", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_OPERATION_BACKEND, g_param_spec_object ("backend", "backend", "backend", DEJA_DUP_TYPE_BACKEND, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_OPERATION_USE_PROGRESS, g_param_spec_boolean ("use-progress", "use-progress", "use-progress", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DEJA_DUP_OPERATION_MODE, g_param_spec_enum ("mode", "mode", "mode", DEJA_DUP_OPERATION_TYPE_MODE, DEJA_DUP_OPERATION_MODE_INVALID, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	/**
	   * 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.
	   */
	g_signal_new ("done", 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);
	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);
	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);
	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_TYPE_FILE, G_TYPE_BOOLEAN);
	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);
	g_signal_new ("passphrase_required", DEJA_DUP_TYPE_OPERATION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	g_signal_new ("question", 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);
	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);
}


static void deja_dup_operation_instance_init (DejaDupOperation * self) {
	self->priv = DEJA_DUP_OPERATION_GET_PRIVATE (self);
	self->priv->_mode = DEJA_DUP_OPERATION_MODE_INVALID;
	self->priv->finished = FALSE;
	self->priv->bus_id = (guint) 0;
}


static void deja_dup_operation_finalize (GObject* obj) {
	DejaDupOperation * self;
	self = DEJA_DUP_OPERATION (obj);
	_g_object_unref0 (self->priv->_backend);
	_g_object_unref0 (self->priv->settings);
	_g_object_unref0 (self->dup);
	_g_free0 (self->passphrase);
	G_OBJECT_CLASS (deja_dup_operation_parent_class)->finalize (obj);
}


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


static void _vala_deja_dup_operation_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	DejaDupOperation * self;
	self = DEJA_DUP_OPERATION (object);
	switch (property_id) {
		case DEJA_DUP_OPERATION_XID:
		g_value_set_uint (value, deja_dup_operation_get_xid (self));
		break;
		case DEJA_DUP_OPERATION_NEEDS_PASSWORD:
		g_value_set_boolean (value, deja_dup_operation_get_needs_password (self));
		break;
		case DEJA_DUP_OPERATION_BACKEND:
		g_value_set_object (value, deja_dup_operation_get_backend (self));
		break;
		case DEJA_DUP_OPERATION_USE_PROGRESS:
		g_value_set_boolean (value, deja_dup_operation_get_use_progress (self));
		break;
		case DEJA_DUP_OPERATION_MODE:
		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 = DEJA_DUP_OPERATION (object);
	switch (property_id) {
		case DEJA_DUP_OPERATION_XID:
		deja_dup_operation_set_xid (self, g_value_get_uint (value));
		break;
		case DEJA_DUP_OPERATION_NEEDS_PASSWORD:
		deja_dup_operation_set_needs_password (self, g_value_get_boolean (value));
		break;
		case DEJA_DUP_OPERATION_BACKEND:
		deja_dup_operation_set_backend (self, g_value_get_object (value));
		break;
		case DEJA_DUP_OPERATION_USE_PROGRESS:
		deja_dup_operation_set_use_progress (self, g_value_get_boolean (value));
		break;
		case DEJA_DUP_OPERATION_MODE:
		deja_dup_operation_set_mode (self, g_value_get_enum (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



