/* OperationBackup.c generated by valac 0.12.1, the Vala compiler
 * generated from OperationBackup.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 <config.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_OPERATION_BACKUP (deja_dup_operation_backup_get_type ())
#define DEJA_DUP_OPERATION_BACKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_OPERATION_BACKUP, DejaDupOperationBackup))
#define DEJA_DUP_OPERATION_BACKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_OPERATION_BACKUP, DejaDupOperationBackupClass))
#define DEJA_DUP_IS_OPERATION_BACKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_OPERATION_BACKUP))
#define DEJA_DUP_IS_OPERATION_BACKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_OPERATION_BACKUP))
#define DEJA_DUP_OPERATION_BACKUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_OPERATION_BACKUP, DejaDupOperationBackupClass))

typedef struct _DejaDupOperationBackup DejaDupOperationBackup;
typedef struct _DejaDupOperationBackupClass DejaDupOperationBackupClass;
typedef struct _DejaDupOperationBackupPrivate DejaDupOperationBackupPrivate;

#define DEJA_DUP_OPERATION_TYPE_MODE (deja_dup_operation_mode_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define DEJA_DUP_TYPE_TIMESTAMP_TYPE (deja_dup_timestamp_type_get_type ())
typedef struct _DejaDupOperationBackupOperationFinishedData DejaDupOperationBackupOperationFinishedData;

#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;
typedef struct _DejaDupDuplicityPrivate DejaDupDuplicityPrivate;

#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 _g_free0(var) (var = (g_free (var), NULL))
#define __g_list_free__g_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_free0_ (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))

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

struct _DejaDupOperationBackup {
	DejaDupOperation parent_instance;
	DejaDupOperationBackupPrivate * priv;
};

struct _DejaDupOperationBackupClass {
	DejaDupOperationClass parent_class;
};

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;

typedef enum  {
	DEJA_DUP_TIMESTAMP_TYPE_NONE,
	DEJA_DUP_TIMESTAMP_TYPE_BACKUP,
	DEJA_DUP_TIMESTAMP_TYPE_RESTORE
} DejaDupTimestampType;

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

struct _DejaDupDuplicity {
	GObject parent_instance;
	DejaDupDuplicityPrivate * priv;
	GList* includes;
	GList* excludes;
};

struct _DejaDupDuplicityClass {
	GObjectClass parent_class;
	void (*start) (DejaDupDuplicity* self, DejaDupBackend* backend, GList* argv, GList* envp);
	void (*process_error) (DejaDupDuplicity* self, gchar** firstline, int firstline_length1, GList* data, const gchar* text_in);
	void (*process_info) (DejaDupDuplicity* self, gchar** firstline, int firstline_length1, GList* data, const gchar* text);
	void (*process_debug) (DejaDupDuplicity* self, gchar** firstline, int firstline_length1, GList* data, const gchar* text);
	void (*process_warning) (DejaDupDuplicity* self, gchar** firstline, int firstline_length1, GList* data, const gchar* text);
};


static gpointer deja_dup_operation_backup_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_operation_backup_get_type (void) G_GNUC_CONST;
enum  {
	DEJA_DUP_OPERATION_BACKUP_DUMMY_PROPERTY
};
DejaDupOperationBackup* deja_dup_operation_backup_new (guint xid);
DejaDupOperationBackup* deja_dup_operation_backup_construct (GType object_type, guint xid);
GType deja_dup_operation_mode_get_type (void) G_GNUC_CONST;
static void deja_dup_operation_backup_real_operation_finished_data_free (gpointer _data);
static void deja_dup_operation_backup_real_operation_finished (DejaDupOperation* base, DejaDupDuplicity* dup, gboolean success, gboolean cancelled, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean deja_dup_operation_backup_real_operation_finished_co (DejaDupOperationBackupOperationFinishedData* data);
GType deja_dup_timestamp_type_get_type (void) G_GNUC_CONST;
void deja_dup_update_last_run_timestamp (DejaDupTimestampType type);
void deja_dup_operation_operation_finished (DejaDupOperation* self, DejaDupDuplicity* dup, gboolean success, gboolean cancelled, GAsyncReadyCallback _callback_, gpointer _user_data_);
void deja_dup_operation_operation_finished_finish (DejaDupOperation* self, GAsyncResult* _res_);
static GList* deja_dup_operation_backup_real_make_argv (DejaDupOperation* base, GError** error);
GType deja_dup_simple_settings_get_type (void) G_GNUC_CONST;
DejaDupSimpleSettings* deja_dup_get_settings (const gchar* subdir);
#define DEJA_DUP_INCLUDE_LIST_KEY "include-list"
GFile** deja_dup_parse_dir_list (const gchar** dirs, int dirs_length1, int* result_length1);
#define DEJA_DUP_EXCLUDE_LIST_KEY "exclude-list"
static GList* deja_dup_operation_backup_get_always_excluded_dirs (DejaDupOperationBackup* self);
GType deja_dup_backend_get_type (void) G_GNUC_CONST;
void deja_dup_duplicity_set_local (DejaDupDuplicity* self, GFile* value);
static void _g_free0_ (gpointer var);
static void _g_list_free__g_free0_ (GList* self);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


DejaDupOperationBackup* deja_dup_operation_backup_construct (GType object_type, guint xid) {
	DejaDupOperationBackup * self = NULL;
	self = (DejaDupOperationBackup*) g_object_new (object_type, "xid", xid, "mode", DEJA_DUP_OPERATION_MODE_BACKUP, NULL);
	return self;
}


DejaDupOperationBackup* deja_dup_operation_backup_new (guint xid) {
	return deja_dup_operation_backup_construct (DEJA_DUP_TYPE_OPERATION_BACKUP, xid);
}


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


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


static void deja_dup_operation_backup_real_operation_finished (DejaDupOperation* base, DejaDupDuplicity* dup, gboolean success, gboolean cancelled, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	DejaDupOperationBackup * self;
	DejaDupOperationBackupOperationFinishedData* _data_;
	self = (DejaDupOperationBackup*) base;
	_data_ = g_slice_new0 (DejaDupOperationBackupOperationFinishedData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, deja_dup_operation_backup_real_operation_finished);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, deja_dup_operation_backup_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_backup_real_operation_finished_co (_data_);
}


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


static gboolean deja_dup_operation_backup_real_operation_finished_co (DejaDupOperationBackupOperationFinishedData* data) {
	switch (data->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (data->success) {
		deja_dup_update_last_run_timestamp (DEJA_DUP_TIMESTAMP_TYPE_BACKUP);
	}
	DEJA_DUP_OPERATION_CLASS (deja_dup_operation_backup_parent_class)->operation_finished (DEJA_DUP_OPERATION (data->self), data->dup, data->success, data->cancelled, NULL, NULL);
	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 GList* deja_dup_operation_backup_real_make_argv (DejaDupOperation* base, GError** error) {
	DejaDupOperationBackup * self;
	GList* result = NULL;
	DejaDupSimpleSettings* _tmp0_ = NULL;
	DejaDupSimpleSettings* settings;
	GVariant* _tmp1_ = NULL;
	GVariant* include_val;
	size_t _tmp2_;
	const gchar** _tmp3_ = NULL;
	const gchar** _tmp4_;
	gint _tmp4__length1;
	gint _tmp5_;
	GFile** _tmp6_ = NULL;
	GFile** _tmp7_;
	GFile** include_list;
	gint include_list_length1;
	gint _include_list_size_;
	GVariant* _tmp8_ = NULL;
	GVariant* exclude_val;
	size_t _tmp9_;
	const gchar** _tmp10_ = NULL;
	const gchar** _tmp11_;
	gint _tmp11__length1;
	gint _tmp12_;
	GFile** _tmp13_ = NULL;
	GFile** _tmp14_;
	GFile** exclude_list;
	gint exclude_list_length1;
	gint _exclude_list_size_;
	GList* rv;
	GList* _tmp15_ = NULL;
	GList* always_excluded;
	GFile* _tmp22_ = NULL;
	GFile* _tmp23_;
	self = (DejaDupOperationBackup*) base;
	_tmp0_ = deja_dup_get_settings (NULL);
	settings = _tmp0_;
	_tmp1_ = g_settings_get_value ((GSettings*) settings, DEJA_DUP_INCLUDE_LIST_KEY);
	include_val = _tmp1_;
	_tmp3_ = g_variant_get_strv (include_val, &_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp4__length1 = _tmp2_;
	_tmp6_ = deja_dup_parse_dir_list (_tmp4_, _tmp2_, &_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp4_ = (g_free (_tmp4_), NULL);
	include_list = _tmp7_;
	include_list_length1 = _tmp5_;
	_include_list_size_ = _tmp5_;
	_tmp8_ = g_settings_get_value ((GSettings*) settings, DEJA_DUP_EXCLUDE_LIST_KEY);
	exclude_val = _tmp8_;
	_tmp10_ = g_variant_get_strv (exclude_val, &_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp11__length1 = _tmp9_;
	_tmp13_ = deja_dup_parse_dir_list (_tmp11_, _tmp9_, &_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp11_ = (g_free (_tmp11_), NULL);
	exclude_list = _tmp14_;
	exclude_list_length1 = _tmp12_;
	_exclude_list_size_ = _tmp12_;
	rv = NULL;
	_tmp15_ = deja_dup_operation_backup_get_always_excluded_dirs (self);
	always_excluded = _tmp15_;
	{
		GList* dir_collection;
		GList* dir_it;
		dir_collection = always_excluded;
		for (dir_it = dir_collection; dir_it != NULL; dir_it = dir_it->next) {
			gchar* _tmp16_;
			gchar* dir;
			_tmp16_ = g_strdup ((const gchar*) dir_it->data);
			dir = _tmp16_;
			{
				GFile* _tmp17_ = NULL;
				_tmp17_ = g_file_new_for_path (dir);
				((DejaDupOperation*) self)->dup->excludes = g_list_prepend (((DejaDupOperation*) self)->dup->excludes, _tmp17_);
				_g_free0 (dir);
			}
		}
	}
	{
		GFile** s_collection;
		int s_collection_length1;
		int s_it;
		s_collection = exclude_list;
		s_collection_length1 = exclude_list_length1;
		for (s_it = 0; s_it < exclude_list_length1; s_it = s_it + 1) {
			GFile* _tmp18_;
			GFile* s;
			_tmp18_ = _g_object_ref0 (s_collection[s_it]);
			s = _tmp18_;
			{
				GFile* _tmp19_;
				_tmp19_ = _g_object_ref0 (s);
				((DejaDupOperation*) self)->dup->excludes = g_list_prepend (((DejaDupOperation*) self)->dup->excludes, _tmp19_);
				_g_object_unref0 (s);
			}
		}
	}
	{
		GFile** s_collection;
		int s_collection_length1;
		int s_it;
		s_collection = include_list;
		s_collection_length1 = include_list_length1;
		for (s_it = 0; s_it < include_list_length1; s_it = s_it + 1) {
			GFile* _tmp20_;
			GFile* s;
			_tmp20_ = _g_object_ref0 (s_collection[s_it]);
			s = _tmp20_;
			{
				GFile* _tmp21_;
				_tmp21_ = _g_object_ref0 (s);
				((DejaDupOperation*) self)->dup->includes = g_list_prepend (((DejaDupOperation*) self)->dup->includes, _tmp21_);
				_g_object_unref0 (s);
			}
		}
	}
	_tmp22_ = g_file_new_for_path ("/");
	_tmp23_ = _tmp22_;
	deja_dup_duplicity_set_local (((DejaDupOperation*) self)->dup, _tmp23_);
	_g_object_unref0 (_tmp23_);
	result = rv;
	__g_list_free__g_free0_0 (always_excluded);
	exclude_list = (_vala_array_free (exclude_list, exclude_list_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_variant_unref0 (exclude_val);
	include_list = (_vala_array_free (include_list, include_list_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_variant_unref0 (include_val);
	_g_object_unref0 (settings);
	return result;
}


static GList* deja_dup_operation_backup_get_always_excluded_dirs (DejaDupOperationBackup* self) {
	GList* result = NULL;
	GList* rv;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_;
	gchar* dir;
	const gchar* _tmp4_ = NULL;
	gchar* _tmp5_;
	const gchar* _tmp13_ = NULL;
	gchar* _tmp14_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	g_return_val_if_fail (self != NULL, NULL);
	rv = NULL;
	_tmp0_ = g_get_user_cache_dir ();
	_tmp1_ = g_strdup (_tmp0_);
	dir = _tmp1_;
	if (dir != NULL) {
		gchar* _tmp2_;
		gchar* _tmp3_ = NULL;
		_tmp2_ = g_strdup (dir);
		rv = g_list_append (rv, _tmp2_);
		_tmp3_ = g_build_filename (dir, PACKAGE, NULL);
		rv = g_list_append (rv, _tmp3_);
	}
	_tmp4_ = g_get_home_dir ();
	_tmp5_ = g_strdup (_tmp4_);
	_g_free0 (dir);
	dir = _tmp5_;
	if (dir != NULL) {
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		gchar* _tmp10_ = NULL;
		gchar* _tmp11_ = NULL;
		gchar* _tmp12_ = NULL;
		_tmp6_ = g_build_filename (dir, ".adobe/Flash_Player/AssetCache", NULL);
		rv = g_list_append (rv, _tmp6_);
		_tmp7_ = g_build_filename (dir, ".gvfs", NULL);
		rv = g_list_append (rv, _tmp7_);
		_tmp8_ = g_build_filename (dir, ".Private", NULL);
		rv = g_list_append (rv, _tmp8_);
		_tmp9_ = g_build_filename (dir, ".recent-applications.xbel", NULL);
		rv = g_list_append (rv, _tmp9_);
		_tmp10_ = g_build_filename (dir, ".recently-used.xbel", NULL);
		rv = g_list_append (rv, _tmp10_);
		_tmp11_ = g_build_filename (dir, ".thumbnails", NULL);
		rv = g_list_append (rv, _tmp11_);
		_tmp12_ = g_build_filename (dir, ".xsession-errors", NULL);
		rv = g_list_append (rv, _tmp12_);
	}
	_tmp13_ = g_get_tmp_dir ();
	_tmp14_ = g_strdup (_tmp13_);
	_g_free0 (dir);
	dir = _tmp14_;
	if (dir != NULL) {
		gchar* _tmp15_;
		_tmp15_ = g_strdup (dir);
		rv = g_list_append (rv, _tmp15_);
	}
	_tmp16_ = g_strdup ("/proc");
	rv = g_list_append (rv, _tmp16_);
	_tmp17_ = g_strdup ("/sys");
	rv = g_list_append (rv, _tmp17_);
	result = rv;
	_g_free0 (dir);
	return result;
}


static void deja_dup_operation_backup_class_init (DejaDupOperationBackupClass * klass) {
	deja_dup_operation_backup_parent_class = g_type_class_peek_parent (klass);
	DEJA_DUP_OPERATION_CLASS (klass)->operation_finished = deja_dup_operation_backup_real_operation_finished;
	DEJA_DUP_OPERATION_CLASS (klass)->operation_finished_finish = deja_dup_operation_backup_real_operation_finished_finish;
	DEJA_DUP_OPERATION_CLASS (klass)->make_argv = deja_dup_operation_backup_real_make_argv;
}


static void deja_dup_operation_backup_instance_init (DejaDupOperationBackup * self) {
}


GType deja_dup_operation_backup_get_type (void) {
	static volatile gsize deja_dup_operation_backup_type_id__volatile = 0;
	if (g_once_init_enter (&deja_dup_operation_backup_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DejaDupOperationBackupClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) deja_dup_operation_backup_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DejaDupOperationBackup), 0, (GInstanceInitFunc) deja_dup_operation_backup_instance_init, NULL };
		GType deja_dup_operation_backup_type_id;
		deja_dup_operation_backup_type_id = g_type_register_static (DEJA_DUP_TYPE_OPERATION, "DejaDupOperationBackup", &g_define_type_info, 0);
		g_once_init_leave (&deja_dup_operation_backup_type_id__volatile, deja_dup_operation_backup_type_id);
	}
	return deja_dup_operation_backup_type_id__volatile;
}


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


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



