/* unattended-installer.c generated by valac 0.17.1.6-d284, the Vala compiler
 * generated from unattended-installer.vala, do not modify */

/* This file is part of GNOME Boxes. License: LGPLv2+*/

#include <glib.h>
#include <glib-object.h>
#include <osinfo/osinfo.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <libvirt-gconfig/libvirt-gconfig.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>
#include <gobject/gvaluecollector.h>


#define BOXES_TYPE_INSTALLER_MEDIA (boxes_installer_media_get_type ())
#define BOXES_INSTALLER_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_INSTALLER_MEDIA, BoxesInstallerMedia))
#define BOXES_INSTALLER_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_INSTALLER_MEDIA, BoxesInstallerMediaClass))
#define BOXES_IS_INSTALLER_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_INSTALLER_MEDIA))
#define BOXES_IS_INSTALLER_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_INSTALLER_MEDIA))
#define BOXES_INSTALLER_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_INSTALLER_MEDIA, BoxesInstallerMediaClass))

typedef struct _BoxesInstallerMedia BoxesInstallerMedia;
typedef struct _BoxesInstallerMediaClass BoxesInstallerMediaClass;
typedef struct _BoxesInstallerMediaPrivate BoxesInstallerMediaPrivate;

#define BOXES_TYPE_UNATTENDED_INSTALLER (boxes_unattended_installer_get_type ())
#define BOXES_UNATTENDED_INSTALLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UNATTENDED_INSTALLER, BoxesUnattendedInstaller))
#define BOXES_UNATTENDED_INSTALLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_UNATTENDED_INSTALLER, BoxesUnattendedInstallerClass))
#define BOXES_IS_UNATTENDED_INSTALLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UNATTENDED_INSTALLER))
#define BOXES_IS_UNATTENDED_INSTALLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_UNATTENDED_INSTALLER))
#define BOXES_UNATTENDED_INSTALLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_UNATTENDED_INSTALLER, BoxesUnattendedInstallerClass))

typedef struct _BoxesUnattendedInstaller BoxesUnattendedInstaller;
typedef struct _BoxesUnattendedInstallerClass BoxesUnattendedInstallerClass;
typedef struct _BoxesUnattendedInstallerPrivate BoxesUnattendedInstallerPrivate;

#define BOXES_TYPE_UNATTENDED_FILE (boxes_unattended_file_get_type ())
#define BOXES_UNATTENDED_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UNATTENDED_FILE, BoxesUnattendedFile))
#define BOXES_UNATTENDED_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_UNATTENDED_FILE, BoxesUnattendedFileClass))
#define BOXES_IS_UNATTENDED_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UNATTENDED_FILE))
#define BOXES_IS_UNATTENDED_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_UNATTENDED_FILE))
#define BOXES_UNATTENDED_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_UNATTENDED_FILE, BoxesUnattendedFileClass))

typedef struct _BoxesUnattendedFile BoxesUnattendedFile;
typedef struct _BoxesUnattendedFileClass BoxesUnattendedFileClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define __g_list_free__boxes_unattended_file_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__boxes_unattended_file_unref0_ (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define BOXES_FDO_TYPE_ACCOUNTS (boxes_fdo_accounts_get_type ())
#define BOXES_FDO_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_FDO_TYPE_ACCOUNTS, BoxesFdoAccounts))
#define BOXES_FDO_IS_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_FDO_TYPE_ACCOUNTS))
#define BOXES_FDO_ACCOUNTS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BOXES_FDO_TYPE_ACCOUNTS, BoxesFdoAccountsIface))

typedef struct _BoxesFdoAccounts BoxesFdoAccounts;
typedef struct _BoxesFdoAccountsIface BoxesFdoAccountsIface;

#define BOXES_FDO_TYPE_ACCOUNTS_PROXY (boxes_fdo_accounts_proxy_get_type ())
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
#define _boxes_unattended_file_unref0(var) ((var == NULL) ? NULL : (var = (boxes_unattended_file_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _BoxesUnattendedInstallerSetupData BoxesUnattendedInstallerSetupData;
typedef struct _Block27Data Block27Data;
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
typedef struct _BoxesUnattendedInstallerPrepareDirectBootData BoxesUnattendedInstallerPrepareDirectBootData;
typedef struct _BoxesUnattendedInstallerCreateDiskImageData BoxesUnattendedInstallerCreateDiskImageData;
typedef struct _BoxesUnattendedInstallerUnattendedDiskExistsData BoxesUnattendedInstallerUnattendedDiskExistsData;

#define BOXES_FDO_TYPE_ACCOUNTS_USER (boxes_fdo_accounts_user_get_type ())
#define BOXES_FDO_ACCOUNTS_USER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_FDO_TYPE_ACCOUNTS_USER, BoxesFdoAccountsUser))
#define BOXES_FDO_IS_ACCOUNTS_USER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_FDO_TYPE_ACCOUNTS_USER))
#define BOXES_FDO_ACCOUNTS_USER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BOXES_FDO_TYPE_ACCOUNTS_USER, BoxesFdoAccountsUserIface))

typedef struct _BoxesFdoAccountsUser BoxesFdoAccountsUser;
typedef struct _BoxesFdoAccountsUserIface BoxesFdoAccountsUserIface;

#define BOXES_FDO_TYPE_ACCOUNTS_USER_PROXY (boxes_fdo_accounts_user_proxy_get_type ())
typedef struct _BoxesUnattendedInstallerFetchUserAvatarData BoxesUnattendedInstallerFetchUserAvatarData;
typedef struct _BoxesUnattendedFilePrivate BoxesUnattendedFilePrivate;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
typedef struct _BoxesUnattendedFileCopyData BoxesUnattendedFileCopyData;
typedef struct _BoxesUnattendedFileCreateData BoxesUnattendedFileCreateData;
typedef struct _BoxesParamSpecUnattendedFile BoxesParamSpecUnattendedFile;

typedef enum  {
	UNATTENDED_INSTALLER_ERROR_SETUP_INCOMPLETE
} UnattendedInstallerError;
#define UNATTENDED_INSTALLER_ERROR unattended_installer_error_quark ()
struct _BoxesInstallerMedia {
	GObject parent_instance;
	BoxesInstallerMediaPrivate * priv;
	OsinfoOs* os;
	OsinfoResources* resources;
	OsinfoMedia* os_media;
	gchar* label;
	gchar* device_file;
	gchar* mount_point;
	gboolean from_image;
};

struct _BoxesInstallerMediaClass {
	GObjectClass parent_class;
};

struct _BoxesUnattendedInstaller {
	BoxesInstallerMedia parent_instance;
	BoxesUnattendedInstallerPrivate * priv;
	GDataStreamNewlineType newline_type;
	gchar* disk_path;
	GList* unattended_files;
	GtkTable* setup_table;
	GtkLabel* setup_label;
	GtkHBox* setup_hbox;
	GtkSwitch* express_toggle;
	GtkEntry* username_entry;
	GtkEntry* password_entry;
	gchar* timezone;
	gchar* lang;
};

struct _BoxesUnattendedInstallerClass {
	BoxesInstallerMediaClass parent_class;
	void (*populate_setup_vbox) (BoxesUnattendedInstaller* self, GtkVBox* setup_vbox);
	void (*set_direct_boot_params) (BoxesUnattendedInstaller* self, GVirConfigDomainOs* os);
	GVirConfigDomainDisk* (*get_unattended_disk_config) (BoxesUnattendedInstaller* self);
	void (*check_needed_info) (BoxesUnattendedInstaller* self, GError** error);
	gchar* (*fill_unattended_data) (BoxesUnattendedInstaller* self, const gchar* data, GError** error);
	void (*setup_ui) (BoxesUnattendedInstaller* self);
	void (*clean_up) (BoxesUnattendedInstaller* self, GError** error);
	void (*prepare_direct_boot) (BoxesUnattendedInstaller* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*prepare_direct_boot_finish) (BoxesUnattendedInstaller* self, GAsyncResult* _res_, GError** error);
};

struct _BoxesUnattendedInstallerPrivate {
	gboolean _password_mandatory;
	gboolean created_disk;
};

struct _BoxesFdoAccountsIface {
	GTypeInterface parent_iface;
	void (*FindUserByName) (BoxesFdoAccounts* self, const gchar* name, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gchar* (*FindUserByName_finish) (BoxesFdoAccounts* self, GAsyncResult* _res_, GError** error);
};

struct _BoxesUnattendedInstallerSetupData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesUnattendedInstaller* self;
	GCancellable* cancellable;
	GtkSwitch* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GCancellable* _tmp3_;
	gboolean _tmp4_;
	OsinfoOs* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	GCancellable* _tmp8_;
	GList* _tmp9_;
	GList* unattended_file_collection;
	GList* unattended_file_it;
	BoxesUnattendedFile* _tmp10_;
	BoxesUnattendedFile* unattended_file;
	BoxesUnattendedFile* _tmp11_;
	GCancellable* _tmp12_;
	GCancellable* _tmp13_;
	GError* _error_;
	GError* _tmp14_;
	GError* _tmp15_;
	GError * _inner_error_;
};

struct _Block27Data {
	int _ref_count_;
	BoxesUnattendedInstaller * self;
	GtkNotebook* notebook;
};

struct _BoxesUnattendedInstallerPrepareDirectBootData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesUnattendedInstaller* self;
	GCancellable* cancellable;
};

struct _BoxesUnattendedInstallerCreateDiskImageData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesUnattendedInstaller* self;
	GCancellable* cancellable;
	const gchar* _tmp0_;
	GFile* _tmp1_;
	GFile* disk_file;
	gchar* _tmp2_;
	gchar* template_path;
	GFile* _tmp3_;
	GFile* template_file;
	const gchar* _tmp4_;
	GCancellable* _tmp5_;
	const gchar* _tmp6_;
	GError * _inner_error_;
};

struct _BoxesUnattendedInstallerUnattendedDiskExistsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesUnattendedInstaller* self;
	GCancellable* cancellable;
	gboolean result;
	const gchar* _tmp0_;
	GFile* _tmp1_;
	GFile* file;
	GFile* _tmp2_;
	GCancellable* _tmp3_;
	GFileInputStream* _tmp4_;
	GFileInputStream* _tmp5_;
	GError* not_found_error;
	GError* _error_;
	GError * _inner_error_;
};

struct _BoxesFdoAccountsUserIface {
	GTypeInterface parent_iface;
	gboolean (*get_AutomaticLogin) (BoxesFdoAccountsUser* self);
	gboolean (*get_Locked) (BoxesFdoAccountsUser* self);
	gboolean (*get_SystemAccount) (BoxesFdoAccountsUser* self);
	gint32 (*get_AccountType) (BoxesFdoAccountsUser* self);
	gint32 (*get_PasswordMode) (BoxesFdoAccountsUser* self);
	gchar* (*get_Email) (BoxesFdoAccountsUser* self);
	gchar* (*get_HomeDirectory) (BoxesFdoAccountsUser* self);
	gchar* (*get_IconFile) (BoxesFdoAccountsUser* self);
	gchar* (*get_Language) (BoxesFdoAccountsUser* self);
	gchar* (*get_Location) (BoxesFdoAccountsUser* self);
	gchar* (*get_RealName) (BoxesFdoAccountsUser* self);
	gchar* (*get_Shell) (BoxesFdoAccountsUser* self);
	gchar* (*get_UserName) (BoxesFdoAccountsUser* self);
	gchar* (*get_XSession) (BoxesFdoAccountsUser* self);
};

struct _BoxesUnattendedInstallerFetchUserAvatarData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesUnattendedInstaller* self;
	GtkImage* avatar;
	BoxesFdoAccounts* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* username;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* avatar_file;
	BoxesFdoAccounts* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* path;
	const gchar* _tmp8_;
	BoxesFdoAccountsUser* _tmp9_;
	BoxesFdoAccountsUser* user;
	BoxesFdoAccountsUser* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	GError* _error_;
	const gchar* _tmp13_;
	GError* _tmp14_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	GFile* _tmp17_;
	GFile* file;
	GFile* _tmp18_;
	gboolean _tmp19_;
	GtkImage* _tmp20_;
	const gchar* _tmp21_;
	GError * _inner_error_;
};

struct _BoxesUnattendedFile {
	GTypeInstance parent_instance;
	volatile int ref_count;
	BoxesUnattendedFilePrivate * priv;
	gchar* src_path;
	gchar* dest_name;
};

struct _BoxesUnattendedFileClass {
	GTypeClass parent_class;
	void (*finalize) (BoxesUnattendedFile *self);
};

struct _BoxesUnattendedFilePrivate {
	BoxesUnattendedInstaller* installer;
};

struct _BoxesUnattendedFileCopyData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesUnattendedFile* self;
	GCancellable* cancellable;
	GCancellable* _tmp0_;
	GFile* _tmp1_;
	GFile* unattended_tmp;
	const gchar* _tmp2_;
	BoxesUnattendedInstaller* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	BoxesUnattendedInstaller* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	GFile* _tmp12_;
	gchar* _tmp13_;
	const gchar* _tmp14_;
	gchar* _tmp15_;
	gchar** _tmp16_;
	gchar** argv;
	gint argv_length1;
	gint _argv_size_;
	gchar** _tmp17_;
	gint _tmp17__length1;
	GCancellable* _tmp18_;
	const gchar* _tmp19_;
	BoxesUnattendedInstaller* _tmp20_;
	const gchar* _tmp21_;
	GFile* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	GFile* _tmp25_;
	GCancellable* _tmp26_;
	GFile* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	GError * _inner_error_;
};

struct _BoxesUnattendedFileCreateData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesUnattendedFile* self;
	GCancellable* cancellable;
	GFile* result;
	const gchar* _tmp0_;
	GFile* _tmp1_;
	GFile* source;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* destination_path;
	const gchar* _tmp4_;
	GFile* _tmp5_;
	GFile* destination;
	GFile* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	GFile* _tmp9_;
	GCancellable* _tmp10_;
	GFileInputStream* _tmp11_;
	GFileInputStream* input_stream;
	GFile* _tmp12_;
	GCancellable* _tmp13_;
	GFileOutputStream* _tmp14_;
	GFileOutputStream* output_stream;
	GFileInputStream* _tmp15_;
	GDataInputStream* _tmp16_;
	GDataInputStream* data_stream;
	GDataInputStream* _tmp17_;
	gchar* str;
	GDataInputStream* _tmp18_;
	GCancellable* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	const gchar* _tmp22_;
	BoxesUnattendedInstaller* _tmp23_;
	const gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	const gchar* _tmp27_;
	BoxesUnattendedInstaller* _tmp28_;
	GDataStreamNewlineType _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	gchar* _tmp32_;
	GFileOutputStream* _tmp33_;
	const gchar* _tmp34_;
	guint8* _tmp35_;
	gint _tmp35__length1;
	guint8* _tmp36_;
	gint _tmp36__length1;
	GCancellable* _tmp37_;
	GFileOutputStream* _tmp38_;
	GCancellable* _tmp39_;
	GFile* _tmp40_;
	gchar* _tmp41_;
	gchar* _tmp42_;
	GError * _inner_error_;
};

struct _BoxesParamSpecUnattendedFile {
	GParamSpec parent_instance;
};


static gpointer boxes_unattended_installer_parent_class = NULL;
static GRegex* boxes_unattended_installer_username_regex;
static GRegex* boxes_unattended_installer_username_regex = NULL;
static GRegex* boxes_unattended_installer_password_regex;
static GRegex* boxes_unattended_installer_password_regex = NULL;
static GRegex* boxes_unattended_installer_timezone_regex;
static GRegex* boxes_unattended_installer_timezone_regex = NULL;
static GRegex* boxes_unattended_installer_lang_regex;
static GRegex* boxes_unattended_installer_lang_regex = NULL;
static BoxesFdoAccounts* boxes_unattended_installer_accounts;
static BoxesFdoAccounts* boxes_unattended_installer_accounts = NULL;
static gpointer boxes_unattended_file_parent_class = NULL;

GQuark unattended_installer_error_quark (void);
GType boxes_installer_media_get_type (void) G_GNUC_CONST;
GType boxes_unattended_installer_get_type (void) G_GNUC_CONST;
gpointer boxes_unattended_file_ref (gpointer instance);
void boxes_unattended_file_unref (gpointer instance);
GParamSpec* boxes_param_spec_unattended_file (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void boxes_value_set_unattended_file (GValue* value, gpointer v_object);
void boxes_value_take_unattended_file (GValue* value, gpointer v_object);
gpointer boxes_value_get_unattended_file (const GValue* value);
GType boxes_unattended_file_get_type (void) G_GNUC_CONST;
#define BOXES_UNATTENDED_INSTALLER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_UNATTENDED_INSTALLER, BoxesUnattendedInstallerPrivate))
enum  {
	BOXES_UNATTENDED_INSTALLER_DUMMY_PROPERTY,
	BOXES_UNATTENDED_INSTALLER_EXPRESS_INSTALL,
	BOXES_UNATTENDED_INSTALLER_USERNAME,
	BOXES_UNATTENDED_INSTALLER_PASSWORD,
	BOXES_UNATTENDED_INSTALLER_HIDDEN_PASSWORD,
	BOXES_UNATTENDED_INSTALLER_PASSWORD_MANDATORY,
	BOXES_UNATTENDED_INSTALLER_UNATTENDED_SRC_PATH,
	BOXES_UNATTENDED_INSTALLER_UNATTENDED_DEST_NAME
};
static void _boxes_unattended_file_unref0_ (gpointer var);
static void _g_list_free__boxes_unattended_file_unref0_ (GList* self);
GType boxes_fdo_accounts_proxy_get_type (void) G_GNUC_CONST;
guint boxes_fdo_accounts_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
GType boxes_fdo_accounts_get_type (void) G_GNUC_CONST;
BoxesUnattendedInstaller* boxes_unattended_installer_construct_copy (GType object_type, BoxesInstallerMedia* media, const gchar* unattended_src_path, const gchar* unattended_dest_name, GError** error);
BoxesInstallerMedia* boxes_installer_media_new (void);
BoxesInstallerMedia* boxes_installer_media_construct (GType object_type);
gchar* boxes_get_pkgcache (const gchar* file_name);
BoxesUnattendedFile* boxes_unattended_file_new (BoxesUnattendedInstaller* installer, const gchar* src_path, const gchar* dest_name);
BoxesUnattendedFile* boxes_unattended_file_construct (GType object_type, BoxesUnattendedInstaller* installer, const gchar* src_path, const gchar* dest_name);
static gchar** _vala_array_dup4 (gchar** self, int length);
void boxes_unattended_installer_setup_ui (BoxesUnattendedInstaller* self);
static void boxes_unattended_installer_setup_data_free (gpointer _data);
void boxes_unattended_installer_setup (BoxesUnattendedInstaller* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_unattended_installer_setup_finish (BoxesUnattendedInstaller* self, GAsyncResult* _res_, GError** error);
static gboolean boxes_unattended_installer_setup_co (BoxesUnattendedInstallerSetupData* _data_);
static void boxes_unattended_installer_unattended_disk_exists (BoxesUnattendedInstaller* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean boxes_unattended_installer_unattended_disk_exists_finish (BoxesUnattendedInstaller* self, GAsyncResult* _res_);
static void boxes_unattended_installer_setup_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void boxes_unattended_installer_create_disk_image (BoxesUnattendedInstaller* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void boxes_unattended_installer_create_disk_image_finish (BoxesUnattendedInstaller* self, GAsyncResult* _res_, GError** error);
void boxes_unattended_file_copy (BoxesUnattendedFile* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_unattended_file_copy_finish (BoxesUnattendedFile* self, GAsyncResult* _res_, GError** error);
void boxes_unattended_installer_prepare_direct_boot (BoxesUnattendedInstaller* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_unattended_installer_prepare_direct_boot_finish (BoxesUnattendedInstaller* self, GAsyncResult* _res_, GError** error);
void boxes_unattended_installer_clean_up (BoxesUnattendedInstaller* self, GError** error);
void boxes_unattended_installer_populate_setup_vbox (BoxesUnattendedInstaller* self, GtkVBox* setup_vbox);
static void boxes_unattended_installer_real_populate_setup_vbox (BoxesUnattendedInstaller* self, GtkVBox* setup_vbox);
void boxes_unattended_installer_set_direct_boot_params (BoxesUnattendedInstaller* self, GVirConfigDomainOs* os);
static void boxes_unattended_installer_real_set_direct_boot_params (BoxesUnattendedInstaller* self, GVirConfigDomainOs* os);
GVirConfigDomainDisk* boxes_unattended_installer_get_unattended_disk_config (BoxesUnattendedInstaller* self);
static GVirConfigDomainDisk* boxes_unattended_installer_real_get_unattended_disk_config (BoxesUnattendedInstaller* self);
void boxes_unattended_installer_check_needed_info (BoxesUnattendedInstaller* self, GError** error);
static void boxes_unattended_installer_real_check_needed_info (BoxesUnattendedInstaller* self, GError** error);
const gchar* boxes_unattended_installer_get_username (BoxesUnattendedInstaller* self);
gboolean boxes_unattended_installer_get_password_mandatory (BoxesUnattendedInstaller* self);
gchar* boxes_unattended_installer_get_password (BoxesUnattendedInstaller* self);
gchar* boxes_unattended_installer_fill_unattended_data (BoxesUnattendedInstaller* self, const gchar* data, GError** error);
static gchar* boxes_unattended_installer_real_fill_unattended_data (BoxesUnattendedInstaller* self, const gchar* data, GError** error);
static void boxes_unattended_installer_real_setup_ui (BoxesUnattendedInstaller* self);
static Block27Data* block27_data_ref (Block27Data* _data27_);
static void block27_data_unref (void * _userdata_);
static void boxes_unattended_installer_fetch_user_avatar (BoxesUnattendedInstaller* self, GtkImage* avatar, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void boxes_unattended_installer_fetch_user_avatar_finish (BoxesUnattendedInstaller* self, GAsyncResult* _res_);
static void __lambda45_ (Block27Data* _data27_);
static void ___lambda45__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void boxes_unattended_installer_real_clean_up (BoxesUnattendedInstaller* self, GError** error);
static void boxes_unattended_installer_real_prepare_direct_boot_data_free (gpointer _data);
static void boxes_unattended_installer_real_prepare_direct_boot (BoxesUnattendedInstaller* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean boxes_unattended_installer_real_prepare_direct_boot_co (BoxesUnattendedInstallerPrepareDirectBootData* _data_);
void boxes_unattended_installer_add_unattended_file (BoxesUnattendedInstaller* self, const gchar* unattended_src_path, const gchar* unattended_dest_name);
static void boxes_unattended_installer_create_disk_image_data_free (gpointer _data);
static gboolean boxes_unattended_installer_create_disk_image_co (BoxesUnattendedInstallerCreateDiskImageData* _data_);
gchar* boxes_get_unattended_dir (const gchar* file_name);
static void boxes_unattended_installer_create_disk_image_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void boxes_unattended_installer_unattended_disk_exists_data_free (gpointer _data);
static gboolean boxes_unattended_installer_unattended_disk_exists_co (BoxesUnattendedInstallerUnattendedDiskExistsData* _data_);
static void boxes_unattended_installer_unattended_disk_exists_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void boxes_unattended_installer_fetch_user_avatar_data_free (gpointer _data);
static gboolean boxes_unattended_installer_fetch_user_avatar_co (BoxesUnattendedInstallerFetchUserAvatarData* _data_);
void boxes_fdo_accounts_FindUserByName (BoxesFdoAccounts* self, const gchar* name, GAsyncReadyCallback _callback_, gpointer _user_data_);
gchar* boxes_fdo_accounts_FindUserByName_finish (BoxesFdoAccounts* self, GAsyncResult* _res_, GError** error);
static void boxes_unattended_installer_fetch_user_avatar_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
GType boxes_fdo_accounts_user_get_type (void) G_GNUC_CONST;
GType boxes_fdo_accounts_user_proxy_get_type (void) G_GNUC_CONST;
guint boxes_fdo_accounts_user_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
gchar* boxes_fdo_accounts_user_get_IconFile (BoxesFdoAccountsUser* self);
BoxesUnattendedInstaller* boxes_unattended_installer_construct (GType object_type);
gboolean boxes_unattended_installer_get_express_install (BoxesUnattendedInstaller* self);
gchar* boxes_unattended_installer_get_hidden_password (BoxesUnattendedInstaller* self);
void boxes_unattended_installer_set_password_mandatory (BoxesUnattendedInstaller* self, gboolean value);
const gchar* boxes_unattended_installer_get_unattended_src_path (BoxesUnattendedInstaller* self);
const gchar* boxes_unattended_installer_get_unattended_dest_name (BoxesUnattendedInstaller* self);
static GObject * boxes_unattended_installer_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void boxes_unattended_installer_finalize (GObject* obj);
static void _vala_boxes_unattended_installer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_boxes_unattended_installer_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
#define BOXES_UNATTENDED_FILE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_UNATTENDED_FILE, BoxesUnattendedFilePrivate))
enum  {
	BOXES_UNATTENDED_FILE_DUMMY_PROPERTY
};
static void boxes_unattended_file_copy_data_free (gpointer _data);
static gboolean boxes_unattended_file_copy_co (BoxesUnattendedFileCopyData* _data_);
static void boxes_unattended_file_create (BoxesUnattendedFile* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static GFile* boxes_unattended_file_create_finish (BoxesUnattendedFile* self, GAsyncResult* _res_, GError** error);
static void boxes_unattended_file_copy_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void boxes_exec (gchar** argv, int argv_length1, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_exec_finish (GAsyncResult* _res_, GError** error);
static void boxes_unattended_file_create_data_free (gpointer _data);
static gboolean boxes_unattended_file_create_co (BoxesUnattendedFileCreateData* _data_);
gchar* boxes_get_user_unattended_dir (const gchar* file_name);
static void boxes_unattended_file_create_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void boxes_unattended_file_finalize (BoxesUnattendedFile* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);


GQuark unattended_installer_error_quark (void) {
	return g_quark_from_static_string ("unattended_installer_error-quark");
}


static void _boxes_unattended_file_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (boxes_unattended_file_unref (var), NULL));
}


static void _g_list_free__boxes_unattended_file_unref0_ (GList* self) {
	g_list_foreach (self, (GFunc) _boxes_unattended_file_unref0_, NULL);
	g_list_free (self);
}


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


static gchar** _vala_array_dup4 (gchar** self, int length) {
	gchar** result;
	int i;
	result = g_new0 (gchar*, length + 1);
	for (i = 0; i < length; i++) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (self[i]);
		result[i] = _tmp0_;
	}
	return result;
}


BoxesUnattendedInstaller* boxes_unattended_installer_construct_copy (GType object_type, BoxesInstallerMedia* media, const gchar* unattended_src_path, const gchar* unattended_dest_name, GError** error) {
	BoxesUnattendedInstaller * self = NULL;
	BoxesInstallerMedia* _tmp0_;
	OsinfoOs* _tmp1_;
	OsinfoOs* _tmp2_;
	BoxesInstallerMedia* _tmp3_;
	OsinfoMedia* _tmp4_;
	OsinfoMedia* _tmp5_;
	BoxesInstallerMedia* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	BoxesInstallerMedia* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	BoxesInstallerMedia* _tmp12_;
	gboolean _tmp13_;
	BoxesInstallerMedia* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	BoxesInstallerMedia* _tmp17_;
	OsinfoResources* _tmp18_;
	OsinfoResources* _tmp19_;
	OsinfoOs* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_ = NULL;
	const gchar* _tmp26_;
	const gchar* _tmp27_;
	BoxesUnattendedFile* _tmp28_;
	GTimeVal time = {0};
	GTimeVal _tmp29_;
	GDateTime* _tmp30_;
	GDateTime* date;
	const gchar* _tmp31_ = NULL;
	gchar* _tmp32_;
	gchar** _tmp33_;
	gchar** _tmp34_ = NULL;
	gchar** _tmp35_;
	gint _tmp35__length1;
	gchar** langs;
	gint langs_length1;
	gint _langs_size_;
	const gchar* _tmp36_;
	gchar* _tmp37_;
	g_return_val_if_fail (media != NULL, NULL);
	g_return_val_if_fail (unattended_src_path != NULL, NULL);
	g_return_val_if_fail (unattended_dest_name != NULL, NULL);
	self = (BoxesUnattendedInstaller*) boxes_installer_media_construct (object_type);
	_tmp0_ = media;
	_tmp1_ = _tmp0_->os;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (((BoxesInstallerMedia*) self)->os);
	((BoxesInstallerMedia*) self)->os = _tmp2_;
	_tmp3_ = media;
	_tmp4_ = _tmp3_->os_media;
	_tmp5_ = _g_object_ref0 (_tmp4_);
	_g_object_unref0 (((BoxesInstallerMedia*) self)->os_media);
	((BoxesInstallerMedia*) self)->os_media = _tmp5_;
	_tmp6_ = media;
	_tmp7_ = _tmp6_->label;
	_tmp8_ = g_strdup (_tmp7_);
	_g_free0 (((BoxesInstallerMedia*) self)->label);
	((BoxesInstallerMedia*) self)->label = _tmp8_;
	_tmp9_ = media;
	_tmp10_ = _tmp9_->device_file;
	_tmp11_ = g_strdup (_tmp10_);
	_g_free0 (((BoxesInstallerMedia*) self)->device_file);
	((BoxesInstallerMedia*) self)->device_file = _tmp11_;
	_tmp12_ = media;
	_tmp13_ = _tmp12_->from_image;
	((BoxesInstallerMedia*) self)->from_image = _tmp13_;
	_tmp14_ = media;
	_tmp15_ = _tmp14_->mount_point;
	_tmp16_ = g_strdup (_tmp15_);
	_g_free0 (((BoxesInstallerMedia*) self)->mount_point);
	((BoxesInstallerMedia*) self)->mount_point = _tmp16_;
	_tmp17_ = media;
	_tmp18_ = _tmp17_->resources;
	_tmp19_ = _g_object_ref0 (_tmp18_);
	_g_object_unref0 (((BoxesInstallerMedia*) self)->resources);
	((BoxesInstallerMedia*) self)->resources = _tmp19_;
	_tmp20_ = ((BoxesInstallerMedia*) self)->os;
	_tmp21_ = osinfo_product_get_short_id ((OsinfoProduct*) _tmp20_);
	_tmp22_ = _tmp21_;
	_tmp23_ = g_strconcat (_tmp22_, "-unattended.img", NULL);
	_tmp24_ = _tmp23_;
	_tmp25_ = boxes_get_pkgcache (_tmp24_);
	_g_free0 (self->disk_path);
	self->disk_path = _tmp25_;
	_g_free0 (_tmp24_);
	self->newline_type = G_DATA_STREAM_NEWLINE_TYPE_LF;
	__g_list_free__boxes_unattended_file_unref0_0 (self->unattended_files);
	self->unattended_files = NULL;
	_tmp26_ = unattended_src_path;
	_tmp27_ = unattended_dest_name;
	_tmp28_ = boxes_unattended_file_new (self, _tmp26_, _tmp27_);
	self->unattended_files = g_list_append (self->unattended_files, _tmp28_);
	g_get_current_time (&time);
	_tmp29_ = time;
	_tmp30_ = g_date_time_new_from_timeval_local (&_tmp29_);
	date = _tmp30_;
	_tmp31_ = g_date_time_get_timezone_abbreviation (date);
	_tmp32_ = g_strdup (_tmp31_);
	_g_free0 (self->timezone);
	self->timezone = _tmp32_;
	_tmp34_ = _tmp33_ = g_get_language_names ();
	_tmp35_ = (_tmp34_ != NULL) ? _vala_array_dup4 (_tmp34_, _vala_array_length (_tmp33_)) : ((gpointer) _tmp34_);
	_tmp35__length1 = _vala_array_length (_tmp33_);
	langs = _tmp35_;
	langs_length1 = _tmp35__length1;
	_langs_size_ = langs_length1;
	_tmp36_ = langs[0];
	_tmp37_ = g_strdup (_tmp36_);
	_g_free0 (self->lang);
	self->lang = _tmp37_;
	boxes_unattended_installer_setup_ui (self);
	langs = (_vala_array_free (langs, langs_length1, (GDestroyNotify) g_free), NULL);
	_g_date_time_unref0 (date);
	return self;
}


static void boxes_unattended_installer_setup_data_free (gpointer _data) {
	BoxesUnattendedInstallerSetupData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesUnattendedInstallerSetupData, _data_);
}


void boxes_unattended_installer_setup (BoxesUnattendedInstaller* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesUnattendedInstallerSetupData* _data_;
	BoxesUnattendedInstaller* _tmp0_;
	GCancellable* _tmp1_;
	GCancellable* _tmp2_;
	_data_ = g_slice_new0 (BoxesUnattendedInstallerSetupData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_unattended_installer_setup);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_unattended_installer_setup_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = cancellable;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data_->cancellable = _tmp2_;
	boxes_unattended_installer_setup_co (_data_);
}


void boxes_unattended_installer_setup_finish (BoxesUnattendedInstaller* self, GAsyncResult* _res_, GError** error) {
	BoxesUnattendedInstallerSetupData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void boxes_unattended_installer_setup_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesUnattendedInstallerSetupData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_unattended_installer_setup_co (_data_);
}


static gpointer _boxes_unattended_file_ref0 (gpointer self) {
	return self ? boxes_unattended_file_ref (self) : NULL;
}


static gpointer _g_error_copy0 (gpointer self) {
	return self ? g_error_copy (self) : NULL;
}


static gboolean boxes_unattended_installer_setup_co (BoxesUnattendedInstallerSetupData* _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;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->express_toggle;
	_data_->_tmp1_ = gtk_switch_get_active (_data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	if (!_data_->_tmp2_) {
		g_debug ("unattended-installer.vala:113: Unattended installation disabled.");
		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;
	}
	{
		_data_->_tmp3_ = _data_->cancellable;
		_data_->_state_ = 1;
		boxes_unattended_installer_unattended_disk_exists (_data_->self, _data_->_tmp3_, boxes_unattended_installer_setup_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp4_ = FALSE;
		_data_->_tmp4_ = boxes_unattended_installer_unattended_disk_exists_finish (_data_->self, _data_->_res_);
		if (_data_->_tmp4_) {
			_data_->_tmp5_ = ((BoxesInstallerMedia*) _data_->self)->os;
			_data_->_tmp6_ = osinfo_product_get_short_id ((OsinfoProduct*) _data_->_tmp5_);
			_data_->_tmp7_ = _data_->_tmp6_;
			g_debug ("unattended-installer.vala:120: Found previously created unattended dis" \
"k image for '%s', re-using..", _data_->_tmp7_);
		} else {
			_data_->_tmp8_ = _data_->cancellable;
			_data_->_state_ = 2;
			boxes_unattended_installer_create_disk_image (_data_->self, _data_->_tmp8_, boxes_unattended_installer_setup_ready, _data_);
			return FALSE;
			_state_2:
			boxes_unattended_installer_create_disk_image_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
			if (_data_->_inner_error_ != NULL) {
				goto __catch47_g_error;
			}
		}
		_data_->_tmp9_ = _data_->self->unattended_files;
		{
			_data_->unattended_file_collection = _data_->_tmp9_;
			for (_data_->unattended_file_it = _data_->unattended_file_collection; _data_->unattended_file_it != NULL; _data_->unattended_file_it = _data_->unattended_file_it->next) {
				_data_->_tmp10_ = _boxes_unattended_file_ref0 ((BoxesUnattendedFile*) _data_->unattended_file_it->data);
				_data_->unattended_file = _data_->_tmp10_;
				{
					_data_->_tmp11_ = _data_->unattended_file;
					_data_->_tmp12_ = _data_->cancellable;
					_data_->_state_ = 3;
					boxes_unattended_file_copy (_data_->_tmp11_, _data_->_tmp12_, boxes_unattended_installer_setup_ready, _data_);
					return FALSE;
					_state_3:
					boxes_unattended_file_copy_finish (_data_->_tmp11_, _data_->_res_, &_data_->_inner_error_);
					if (_data_->_inner_error_ != NULL) {
						_boxes_unattended_file_unref0 (_data_->unattended_file);
						goto __catch47_g_error;
					}
					_boxes_unattended_file_unref0 (_data_->unattended_file);
				}
			}
		}
		_data_->_tmp13_ = _data_->cancellable;
		_data_->_state_ = 4;
		boxes_unattended_installer_prepare_direct_boot (_data_->self, _data_->_tmp13_, boxes_unattended_installer_setup_ready, _data_);
		return FALSE;
		_state_4:
		boxes_unattended_installer_prepare_direct_boot_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			goto __catch47_g_error;
		}
	}
	goto __finally47;
	__catch47_g_error:
	{
		_data_->_error_ = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		boxes_unattended_installer_clean_up (_data_->self, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			_g_error_free0 (_data_->_error_);
			goto __finally47;
		}
		_data_->_tmp14_ = _data_->_error_;
		_data_->_tmp15_ = _g_error_copy0 (_data_->_tmp14_);
		_data_->_inner_error_ = _data_->_tmp15_;
		_g_error_free0 (_data_->_error_);
		goto __finally47;
	}
	__finally47:
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		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;
	}
	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 boxes_unattended_installer_real_populate_setup_vbox (BoxesUnattendedInstaller* self, GtkVBox* setup_vbox) {
	GtkVBox* _tmp0_;
	GtkLabel* _tmp1_;
	GtkVBox* _tmp2_;
	GtkHBox* _tmp3_;
	g_return_if_fail (setup_vbox != NULL);
	_tmp0_ = setup_vbox;
	_tmp1_ = self->setup_label;
	gtk_box_pack_start ((GtkBox*) _tmp0_, (GtkWidget*) _tmp1_, FALSE, FALSE, (guint) 0);
	_tmp2_ = setup_vbox;
	_tmp3_ = self->setup_hbox;
	gtk_box_pack_start ((GtkBox*) _tmp2_, (GtkWidget*) _tmp3_, FALSE, FALSE, (guint) 0);
}


void boxes_unattended_installer_populate_setup_vbox (BoxesUnattendedInstaller* self, GtkVBox* setup_vbox) {
	g_return_if_fail (self != NULL);
	BOXES_UNATTENDED_INSTALLER_GET_CLASS (self)->populate_setup_vbox (self, setup_vbox);
}


static void boxes_unattended_installer_real_set_direct_boot_params (BoxesUnattendedInstaller* self, GVirConfigDomainOs* os) {
	g_return_if_fail (os != NULL);
}


void boxes_unattended_installer_set_direct_boot_params (BoxesUnattendedInstaller* self, GVirConfigDomainOs* os) {
	g_return_if_fail (self != NULL);
	BOXES_UNATTENDED_INSTALLER_GET_CLASS (self)->set_direct_boot_params (self, os);
}


static GVirConfigDomainDisk* boxes_unattended_installer_real_get_unattended_disk_config (BoxesUnattendedInstaller* self) {
	GVirConfigDomainDisk* result = NULL;
	GtkSwitch* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GVirConfigDomainDisk* _tmp3_;
	GVirConfigDomainDisk* disk;
	GVirConfigDomainDisk* _tmp4_;
	GVirConfigDomainDisk* _tmp5_;
	GVirConfigDomainDisk* _tmp6_;
	GVirConfigDomainDisk* _tmp7_;
	GVirConfigDomainDisk* _tmp8_;
	const gchar* _tmp9_;
	GVirConfigDomainDisk* _tmp10_;
	_tmp0_ = self->express_toggle;
	_tmp1_ = gtk_switch_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		result = NULL;
		return result;
	}
	_tmp3_ = gvir_config_domain_disk_new ();
	disk = _tmp3_;
	_tmp4_ = disk;
	gvir_config_domain_disk_set_type (_tmp4_, GVIR_CONFIG_DOMAIN_DISK_FILE);
	_tmp5_ = disk;
	gvir_config_domain_disk_set_guest_device_type (_tmp5_, GVIR_CONFIG_DOMAIN_DISK_GUEST_DEVICE_DISK);
	_tmp6_ = disk;
	gvir_config_domain_disk_set_driver_name (_tmp6_, "qemu");
	_tmp7_ = disk;
	gvir_config_domain_disk_set_driver_type (_tmp7_, "raw");
	_tmp8_ = disk;
	_tmp9_ = self->disk_path;
	gvir_config_domain_disk_set_source (_tmp8_, _tmp9_);
	_tmp10_ = disk;
	gvir_config_domain_disk_set_target_dev (_tmp10_, "sdb");
	result = disk;
	return result;
}


GVirConfigDomainDisk* boxes_unattended_installer_get_unattended_disk_config (BoxesUnattendedInstaller* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return BOXES_UNATTENDED_INSTALLER_GET_CLASS (self)->get_unattended_disk_config (self);
}


static void boxes_unattended_installer_real_check_needed_info (BoxesUnattendedInstaller* self, GError** error) {
	GtkSwitch* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_;
	gboolean _tmp12_;
	GError * _inner_error_ = NULL;
	_tmp0_ = self->express_toggle;
	_tmp1_ = gtk_switch_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		return;
	}
	_tmp3_ = boxes_unattended_installer_get_username (self);
	_tmp4_ = _tmp3_;
	if (g_strcmp0 (_tmp4_, "") == 0) {
		const gchar* _tmp5_ = NULL;
		GError* _tmp6_;
		_tmp5_ = _ ("No username provided");
		_tmp6_ = g_error_new_literal (UNATTENDED_INSTALLER_ERROR, UNATTENDED_INSTALLER_ERROR_SETUP_INCOMPLETE, _tmp5_);
		_inner_error_ = _tmp6_;
		if (_inner_error_->domain == UNATTENDED_INSTALLER_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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;
		}
	}
	_tmp8_ = self->priv->_password_mandatory;
	if (_tmp8_) {
		gchar* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		_tmp9_ = boxes_unattended_installer_get_password (self);
		_tmp10_ = _tmp9_;
		_tmp11_ = _tmp10_;
		_tmp7_ = g_strcmp0 (_tmp11_, "") == 0;
		_g_free0 (_tmp11_);
	} else {
		_tmp7_ = FALSE;
	}
	_tmp12_ = _tmp7_;
	if (_tmp12_) {
		const gchar* _tmp13_ = NULL;
		const gchar* _tmp14_;
		GError* _tmp15_;
		_tmp13_ = _ ("Password required for express installation of %s");
		_tmp14_ = ((BoxesInstallerMedia*) self)->label;
		_tmp15_ = g_error_new (UNATTENDED_INSTALLER_ERROR, UNATTENDED_INSTALLER_ERROR_SETUP_INCOMPLETE, _tmp13_, _tmp14_);
		_inner_error_ = _tmp15_;
		if (_inner_error_->domain == UNATTENDED_INSTALLER_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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;
		}
	}
}


void boxes_unattended_installer_check_needed_info (BoxesUnattendedInstaller* self, GError** error) {
	g_return_if_fail (self != NULL);
	BOXES_UNATTENDED_INSTALLER_GET_CLASS (self)->check_needed_info (self, error);
}


static gchar* boxes_unattended_installer_real_fill_unattended_data (BoxesUnattendedInstaller* self, const gchar* data, GError** error) {
	gchar* result = NULL;
	GRegex* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	GtkEntry* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_ = NULL;
	gchar* str;
	GRegex* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gint _tmp12_;
	gint _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_ = NULL;
	gchar* _tmp18_;
	gchar* _tmp19_;
	GRegex* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	gint _tmp23_;
	gint _tmp24_;
	const gchar* _tmp25_;
	gchar* _tmp26_ = NULL;
	gchar* _tmp27_;
	GRegex* _tmp28_;
	const gchar* _tmp29_;
	const gchar* _tmp30_;
	gint _tmp31_;
	gint _tmp32_;
	const gchar* _tmp33_;
	gchar* _tmp34_ = NULL;
	gchar* _tmp35_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (data != NULL, NULL);
	_tmp0_ = boxes_unattended_installer_username_regex;
	_tmp1_ = data;
	_tmp2_ = data;
	_tmp3_ = strlen (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = self->username_entry;
	_tmp6_ = gtk_entry_get_text (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_regex_replace (_tmp0_, _tmp1_, (gssize) _tmp4_, 0, _tmp7_, 0, &_inner_error_);
	str = _tmp8_;
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == G_REGEX_ERROR) {
			g_propagate_error (error, _inner_error_);
			return NULL;
		} else {
			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 NULL;
		}
	}
	_tmp9_ = boxes_unattended_installer_password_regex;
	_tmp10_ = str;
	_tmp11_ = str;
	_tmp12_ = strlen (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = boxes_unattended_installer_get_password (self);
	_tmp15_ = _tmp14_;
	_tmp16_ = _tmp15_;
	_tmp17_ = g_regex_replace (_tmp9_, _tmp10_, (gssize) _tmp13_, 0, _tmp16_, 0, &_inner_error_);
	_tmp18_ = _tmp17_;
	_g_free0 (_tmp16_);
	_tmp19_ = _tmp18_;
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == G_REGEX_ERROR) {
			g_propagate_error (error, _inner_error_);
			_g_free0 (str);
			return NULL;
		} else {
			_g_free0 (str);
			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 NULL;
		}
	}
	_g_free0 (str);
	str = _tmp19_;
	_tmp20_ = boxes_unattended_installer_timezone_regex;
	_tmp21_ = str;
	_tmp22_ = str;
	_tmp23_ = strlen (_tmp22_);
	_tmp24_ = _tmp23_;
	_tmp25_ = self->timezone;
	_tmp26_ = g_regex_replace (_tmp20_, _tmp21_, (gssize) _tmp24_, 0, _tmp25_, 0, &_inner_error_);
	_tmp27_ = _tmp26_;
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == G_REGEX_ERROR) {
			g_propagate_error (error, _inner_error_);
			_g_free0 (str);
			return NULL;
		} else {
			_g_free0 (str);
			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 NULL;
		}
	}
	_g_free0 (str);
	str = _tmp27_;
	_tmp28_ = boxes_unattended_installer_lang_regex;
	_tmp29_ = str;
	_tmp30_ = str;
	_tmp31_ = strlen (_tmp30_);
	_tmp32_ = _tmp31_;
	_tmp33_ = self->lang;
	_tmp34_ = g_regex_replace (_tmp28_, _tmp29_, (gssize) _tmp32_, 0, _tmp33_, 0, &_inner_error_);
	_tmp35_ = _tmp34_;
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == G_REGEX_ERROR) {
			g_propagate_error (error, _inner_error_);
			_g_free0 (str);
			return NULL;
		} else {
			_g_free0 (str);
			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 NULL;
		}
	}
	_g_free0 (str);
	str = _tmp35_;
	result = str;
	return result;
}


gchar* boxes_unattended_installer_fill_unattended_data (BoxesUnattendedInstaller* self, const gchar* data, GError** error) {
	g_return_val_if_fail (self != NULL, NULL);
	return BOXES_UNATTENDED_INSTALLER_GET_CLASS (self)->fill_unattended_data (self, data, error);
}


static Block27Data* block27_data_ref (Block27Data* _data27_) {
	g_atomic_int_inc (&_data27_->_ref_count_);
	return _data27_;
}


static void block27_data_unref (void * _userdata_) {
	Block27Data* _data27_;
	_data27_ = (Block27Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data27_->_ref_count_)) {
		BoxesUnattendedInstaller * self;
		self = _data27_->self;
		_g_object_unref0 (_data27_->notebook);
		_g_object_unref0 (self);
		g_slice_free (Block27Data, _data27_);
	}
}


static void __lambda45_ (Block27Data* _data27_) {
	BoxesUnattendedInstaller * self;
	GtkNotebook* _tmp0_;
	GtkEntry* _tmp1_;
	self = _data27_->self;
	_tmp0_ = _data27_->notebook;
	gtk_notebook_next_page (_tmp0_);
	_tmp1_ = self->password_entry;
	g_object_set ((GtkWidget*) _tmp1_, "is-focus", TRUE, NULL);
}


static void ___lambda45__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda45_ (self);
}


static void boxes_unattended_installer_real_setup_ui (BoxesUnattendedInstaller* self) {
	Block27Data* _data27_;
	const gchar* _tmp0_ = NULL;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	GtkLabel* _tmp3_;
	GtkLabel* _tmp4_;
	GtkLabel* _tmp5_;
	GtkHBox* _tmp6_;
	GtkHBox* _tmp7_;
	GtkHBox* _tmp8_;
	GtkHBox* _tmp9_;
	GtkTable* _tmp10_;
	GtkTable* _tmp11_;
	GtkHBox* _tmp12_;
	GtkTable* _tmp13_;
	GtkTable* _tmp14_;
	GtkTable* _tmp15_;
	const gchar* _tmp16_ = NULL;
	GtkLabel* _tmp17_;
	GtkLabel* _tmp18_;
	GtkLabel* label;
	GtkLabel* _tmp19_;
	GtkLabel* _tmp20_;
	GtkTable* _tmp21_;
	GtkLabel* _tmp22_;
	GtkSwitch* _tmp23_;
	GtkSwitch* _tmp24_;
	GtkSwitch* _tmp25_;
	OsinfoMedia* _tmp26_;
	gboolean _tmp27_ = FALSE;
	gboolean _tmp28_;
	GtkSwitch* _tmp29_;
	GtkSwitch* _tmp30_;
	GtkTable* _tmp31_;
	GtkSwitch* _tmp32_;
	GtkImage* _tmp33_;
	GtkImage* _tmp34_;
	GtkImage* avatar;
	GtkImage* _tmp35_;
	GtkTable* _tmp36_;
	GtkImage* _tmp37_;
	GtkImage* _tmp38_;
	GtkImage* _tmp39_;
	const gchar* _tmp40_ = NULL;
	GtkLabel* _tmp41_;
	GtkLabel* _tmp42_;
	GtkLabel* _tmp43_;
	GtkLabel* _tmp44_;
	GtkTable* _tmp45_;
	GtkLabel* _tmp46_;
	GtkEntry* _tmp47_;
	GtkEntry* _tmp48_;
	GtkEntry* _tmp49_;
	const gchar* _tmp50_ = NULL;
	GtkEntry* _tmp51_;
	GtkEntry* _tmp52_;
	GtkTable* _tmp53_;
	GtkEntry* _tmp54_;
	const gchar* _tmp55_ = NULL;
	GtkLabel* _tmp56_;
	GtkLabel* _tmp57_;
	GtkLabel* _tmp58_;
	GtkLabel* _tmp59_;
	GtkTable* _tmp60_;
	GtkLabel* _tmp61_;
	GtkNotebook* _tmp62_;
	GtkNotebook* _tmp63_;
	GtkNotebook* _tmp64_;
	GtkNotebook* _tmp65_;
	GtkNotebook* _tmp66_;
	GtkNotebook* _tmp67_;
	const gchar* _tmp68_ = NULL;
	GtkButton* _tmp69_;
	GtkButton* _tmp70_;
	GtkButton* button;
	GtkButton* _tmp71_;
	GtkNotebook* _tmp72_;
	GtkButton* _tmp73_;
	GtkEntry* _tmp74_;
	GtkEntry* _tmp75_;
	GtkEntry* _tmp76_;
	GtkEntry* _tmp77_;
	GtkEntry* _tmp78_;
	GtkNotebook* _tmp79_;
	GtkEntry* _tmp80_;
	GtkButton* _tmp81_;
	GtkTable* _tmp82_;
	GtkNotebook* _tmp83_;
	GtkTable* _tmp84_;
	GList* _tmp85_ = NULL;
	_data27_ = g_slice_new0 (Block27Data);
	_data27_->_ref_count_ = 1;
	_data27_->self = g_object_ref (self);
	_tmp0_ = _ ("Choose express install to automatically preconfigure the box with opti" \
"mal settings.");
	_tmp1_ = (GtkLabel*) gtk_label_new (_tmp0_);
	_tmp2_ = g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->setup_label);
	self->setup_label = _tmp2_;
	_tmp3_ = self->setup_label;
	g_object_set (_tmp3_, "wrap", TRUE, NULL);
	_tmp4_ = self->setup_label;
	gtk_label_set_width_chars (_tmp4_, 30);
	_tmp5_ = self->setup_label;
	gtk_widget_set_halign ((GtkWidget*) _tmp5_, GTK_ALIGN_START);
	_tmp6_ = (GtkHBox*) gtk_hbox_new (FALSE, 20);
	_tmp7_ = g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->setup_hbox);
	self->setup_hbox = _tmp7_;
	_tmp8_ = self->setup_hbox;
	gtk_widget_set_valign ((GtkWidget*) _tmp8_, GTK_ALIGN_START);
	_tmp9_ = self->setup_hbox;
	g_object_set ((GtkWidget*) _tmp9_, "margin", 24, NULL);
	_tmp10_ = (GtkTable*) gtk_table_new ((guint) 3, (guint) 3, FALSE);
	_tmp11_ = g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->setup_table);
	self->setup_table = _tmp11_;
	_tmp12_ = self->setup_hbox;
	_tmp13_ = self->setup_table;
	gtk_box_pack_start ((GtkBox*) _tmp12_, (GtkWidget*) _tmp13_, FALSE, FALSE, (guint) 0);
	_tmp14_ = self->setup_table;
	g_object_set (_tmp14_, "column-spacing", (guint) 10, NULL);
	_tmp15_ = self->setup_table;
	g_object_set (_tmp15_, "row-spacing", (guint) 10, NULL);
	_tmp16_ = _ ("Express Install");
	_tmp17_ = (GtkLabel*) gtk_label_new (_tmp16_);
	_tmp18_ = g_object_ref_sink (_tmp17_);
	label = _tmp18_;
	_tmp19_ = label;
	gtk_widget_set_halign ((GtkWidget*) _tmp19_, GTK_ALIGN_END);
	_tmp20_ = label;
	gtk_widget_set_valign ((GtkWidget*) _tmp20_, GTK_ALIGN_CENTER);
	_tmp21_ = self->setup_table;
	_tmp22_ = label;
	gtk_table_attach_defaults (_tmp21_, (GtkWidget*) _tmp22_, (guint) 1, (guint) 2, (guint) 0, (guint) 1);
	_tmp23_ = (GtkSwitch*) gtk_switch_new ();
	_tmp24_ = g_object_ref_sink (_tmp23_);
	_g_object_unref0 (self->express_toggle);
	self->express_toggle = _tmp24_;
	_tmp25_ = self->express_toggle;
	_tmp26_ = ((BoxesInstallerMedia*) self)->os_media;
	g_object_get (_tmp26_, "live", &_tmp27_, NULL);
	_tmp28_ = _tmp27_;
	gtk_switch_set_active (_tmp25_, !_tmp28_);
	_tmp29_ = self->express_toggle;
	gtk_widget_set_halign ((GtkWidget*) _tmp29_, GTK_ALIGN_START);
	_tmp30_ = self->express_toggle;
	gtk_widget_set_valign ((GtkWidget*) _tmp30_, GTK_ALIGN_CENTER);
	_tmp31_ = self->setup_table;
	_tmp32_ = self->express_toggle;
	gtk_table_attach_defaults (_tmp31_, (GtkWidget*) _tmp32_, (guint) 2, (guint) 3, (guint) 0, (guint) 1);
	_tmp33_ = (GtkImage*) gtk_image_new_from_icon_name ("avatar-default", 0);
	_tmp34_ = g_object_ref_sink (_tmp33_);
	avatar = _tmp34_;
	_tmp35_ = avatar;
	gtk_image_set_pixel_size (_tmp35_, 128);
	_tmp36_ = self->setup_table;
	_tmp37_ = avatar;
	gtk_table_attach_defaults (_tmp36_, (GtkWidget*) _tmp37_, (guint) 0, (guint) 1, (guint) 1, (guint) 3);
	_tmp38_ = avatar;
	gtk_widget_show_all ((GtkWidget*) _tmp38_);
	_tmp39_ = avatar;
	boxes_unattended_installer_fetch_user_avatar (self, _tmp39_, NULL, NULL);
	_tmp40_ = _ ("Username");
	_tmp41_ = (GtkLabel*) gtk_label_new (_tmp40_);
	_tmp42_ = g_object_ref_sink (_tmp41_);
	_g_object_unref0 (label);
	label = _tmp42_;
	_tmp43_ = label;
	gtk_widget_set_halign ((GtkWidget*) _tmp43_, GTK_ALIGN_END);
	_tmp44_ = label;
	gtk_widget_set_valign ((GtkWidget*) _tmp44_, GTK_ALIGN_CENTER);
	_tmp45_ = self->setup_table;
	_tmp46_ = label;
	gtk_table_attach_defaults (_tmp45_, (GtkWidget*) _tmp46_, (guint) 1, (guint) 2, (guint) 1, (guint) 2);
	_tmp47_ = (GtkEntry*) gtk_entry_new ();
	_tmp48_ = g_object_ref_sink (_tmp47_);
	_g_object_unref0 (self->username_entry);
	self->username_entry = _tmp48_;
	_tmp49_ = self->username_entry;
	_tmp50_ = g_get_user_name ();
	gtk_entry_set_text (_tmp49_, _tmp50_);
	_tmp51_ = self->username_entry;
	gtk_widget_set_halign ((GtkWidget*) _tmp51_, GTK_ALIGN_START);
	_tmp52_ = self->username_entry;
	gtk_widget_set_valign ((GtkWidget*) _tmp52_, GTK_ALIGN_CENTER);
	_tmp53_ = self->setup_table;
	_tmp54_ = self->username_entry;
	gtk_table_attach_defaults (_tmp53_, (GtkWidget*) _tmp54_, (guint) 2, (guint) 3, (guint) 1, (guint) 2);
	_tmp55_ = _ ("Password");
	_tmp56_ = (GtkLabel*) gtk_label_new (_tmp55_);
	_tmp57_ = g_object_ref_sink (_tmp56_);
	_g_object_unref0 (label);
	label = _tmp57_;
	_tmp58_ = label;
	gtk_widget_set_halign ((GtkWidget*) _tmp58_, GTK_ALIGN_END);
	_tmp59_ = label;
	gtk_widget_set_valign ((GtkWidget*) _tmp59_, GTK_ALIGN_CENTER);
	_tmp60_ = self->setup_table;
	_tmp61_ = label;
	gtk_table_attach_defaults (_tmp60_, (GtkWidget*) _tmp61_, (guint) 1, (guint) 2, (guint) 2, (guint) 3);
	_tmp62_ = (GtkNotebook*) gtk_notebook_new ();
	_tmp63_ = g_object_ref_sink (_tmp62_);
	_data27_->notebook = _tmp63_;
	_tmp64_ = _data27_->notebook;
	gtk_notebook_set_show_tabs (_tmp64_, FALSE);
	_tmp65_ = _data27_->notebook;
	gtk_notebook_set_show_border (_tmp65_, FALSE);
	_tmp66_ = _data27_->notebook;
	gtk_widget_set_halign ((GtkWidget*) _tmp66_, GTK_ALIGN_START);
	_tmp67_ = _data27_->notebook;
	gtk_widget_set_valign ((GtkWidget*) _tmp67_, GTK_ALIGN_CENTER);
	_tmp68_ = _ ("_Add Password");
	_tmp69_ = (GtkButton*) gtk_button_new_with_mnemonic (_tmp68_);
	_tmp70_ = g_object_ref_sink (_tmp69_);
	button = _tmp70_;
	_tmp71_ = button;
	gtk_widget_set_visible ((GtkWidget*) _tmp71_, TRUE);
	_tmp72_ = _data27_->notebook;
	_tmp73_ = button;
	gtk_notebook_append_page (_tmp72_, (GtkWidget*) _tmp73_, NULL);
	_tmp74_ = (GtkEntry*) gtk_entry_new ();
	_tmp75_ = g_object_ref_sink (_tmp74_);
	_g_object_unref0 (self->password_entry);
	self->password_entry = _tmp75_;
	_tmp76_ = self->password_entry;
	gtk_entry_set_visibility (_tmp76_, FALSE);
	_tmp77_ = self->password_entry;
	gtk_widget_set_visible ((GtkWidget*) _tmp77_, TRUE);
	_tmp78_ = self->password_entry;
	gtk_entry_set_text (_tmp78_, "");
	_tmp79_ = _data27_->notebook;
	_tmp80_ = self->password_entry;
	gtk_notebook_append_page (_tmp79_, (GtkWidget*) _tmp80_, NULL);
	_tmp81_ = button;
	g_signal_connect_data (_tmp81_, "clicked", (GCallback) ___lambda45__gtk_button_clicked, block27_data_ref (_data27_), (GClosureNotify) block27_data_unref, 0);
	_tmp82_ = self->setup_table;
	_tmp83_ = _data27_->notebook;
	gtk_table_attach_defaults (_tmp82_, (GtkWidget*) _tmp83_, (guint) 2, (guint) 3, (guint) 2, (guint) 3);
	_tmp84_ = self->setup_table;
	_tmp85_ = gtk_container_get_children ((GtkContainer*) _tmp84_);
	{
		GList* child_collection = NULL;
		GList* child_it = NULL;
		child_collection = _tmp85_;
		for (child_it = child_collection; child_it != NULL; child_it = child_it->next) {
			GtkWidget* child = NULL;
			child = (GtkWidget*) child_it->data;
			{
				GtkWidget* _tmp86_;
				GtkSwitch* _tmp87_;
				_tmp86_ = child;
				_tmp87_ = self->express_toggle;
				if (_tmp86_ != GTK_WIDGET (_tmp87_)) {
					GtkSwitch* _tmp88_;
					GtkWidget* _tmp89_;
					_tmp88_ = self->express_toggle;
					_tmp89_ = child;
					g_object_bind_property_with_closures ((GObject*) _tmp88_, "active", (GObject*) _tmp89_, "sensitive", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)));
				}
			}
		}
		_g_list_free0 (child_collection);
	}
	_g_object_unref0 (button);
	_g_object_unref0 (avatar);
	_g_object_unref0 (label);
	block27_data_unref (_data27_);
	_data27_ = NULL;
}


void boxes_unattended_installer_setup_ui (BoxesUnattendedInstaller* self) {
	g_return_if_fail (self != NULL);
	BOXES_UNATTENDED_INSTALLER_GET_CLASS (self)->setup_ui (self);
}


static void boxes_unattended_installer_real_clean_up (BoxesUnattendedInstaller* self, GError** error) {
	gboolean _tmp0_;
	const gchar* _tmp1_;
	GFile* _tmp2_ = NULL;
	GFile* disk_file;
	GFile* _tmp3_;
	const gchar* _tmp4_;
	GError * _inner_error_ = NULL;
	_tmp0_ = self->priv->created_disk;
	if (!_tmp0_) {
		return;
	}
	_tmp1_ = self->disk_path;
	_tmp2_ = g_file_new_for_path (_tmp1_);
	disk_file = _tmp2_;
	_tmp3_ = disk_file;
	g_file_delete (_tmp3_, NULL, &_inner_error_);
	if (_inner_error_ != NULL) {
		g_propagate_error (error, _inner_error_);
		_g_object_unref0 (disk_file);
		return;
	}
	_tmp4_ = self->disk_path;
	g_debug ("unattended-installer.vala:259: Removed '%s'.", _tmp4_);
	_g_object_unref0 (disk_file);
}


void boxes_unattended_installer_clean_up (BoxesUnattendedInstaller* self, GError** error) {
	g_return_if_fail (self != NULL);
	BOXES_UNATTENDED_INSTALLER_GET_CLASS (self)->clean_up (self, error);
}


static void boxes_unattended_installer_real_prepare_direct_boot_data_free (gpointer _data) {
	BoxesUnattendedInstallerPrepareDirectBootData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesUnattendedInstallerPrepareDirectBootData, _data_);
}


static void boxes_unattended_installer_real_prepare_direct_boot (BoxesUnattendedInstaller* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesUnattendedInstallerPrepareDirectBootData* _data_;
	BoxesUnattendedInstaller* _tmp0_;
	GCancellable* _tmp1_;
	GCancellable* _tmp2_;
	_data_ = g_slice_new0 (BoxesUnattendedInstallerPrepareDirectBootData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_unattended_installer_real_prepare_direct_boot);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_unattended_installer_real_prepare_direct_boot_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = cancellable;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data_->cancellable = _tmp2_;
	boxes_unattended_installer_real_prepare_direct_boot_co (_data_);
}


static void boxes_unattended_installer_real_prepare_direct_boot_finish (BoxesUnattendedInstaller* self, GAsyncResult* _res_, GError** error) {
	BoxesUnattendedInstallerPrepareDirectBootData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static gboolean boxes_unattended_installer_real_prepare_direct_boot_co (BoxesUnattendedInstallerPrepareDirectBootData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	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 boxes_unattended_installer_prepare_direct_boot (BoxesUnattendedInstaller* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BOXES_UNATTENDED_INSTALLER_GET_CLASS (self)->prepare_direct_boot (self, cancellable, _callback_, _user_data_);
}


void boxes_unattended_installer_prepare_direct_boot_finish (BoxesUnattendedInstaller* self, GAsyncResult* _res_, GError** error) {
	BOXES_UNATTENDED_INSTALLER_GET_CLASS (self)->prepare_direct_boot_finish (self, _res_, error);
}


void boxes_unattended_installer_add_unattended_file (BoxesUnattendedInstaller* self, const gchar* unattended_src_path, const gchar* unattended_dest_name) {
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	BoxesUnattendedFile* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (unattended_src_path != NULL);
	g_return_if_fail (unattended_dest_name != NULL);
	_tmp0_ = unattended_src_path;
	_tmp1_ = unattended_dest_name;
	_tmp2_ = boxes_unattended_file_new (self, _tmp0_, _tmp1_);
	self->unattended_files = g_list_append (self->unattended_files, _tmp2_);
}


static void boxes_unattended_installer_create_disk_image_data_free (gpointer _data) {
	BoxesUnattendedInstallerCreateDiskImageData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesUnattendedInstallerCreateDiskImageData, _data_);
}


static void boxes_unattended_installer_create_disk_image (BoxesUnattendedInstaller* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesUnattendedInstallerCreateDiskImageData* _data_;
	BoxesUnattendedInstaller* _tmp0_;
	GCancellable* _tmp1_;
	GCancellable* _tmp2_;
	_data_ = g_slice_new0 (BoxesUnattendedInstallerCreateDiskImageData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_unattended_installer_create_disk_image);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_unattended_installer_create_disk_image_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = cancellable;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data_->cancellable = _tmp2_;
	boxes_unattended_installer_create_disk_image_co (_data_);
}


static void boxes_unattended_installer_create_disk_image_finish (BoxesUnattendedInstaller* self, GAsyncResult* _res_, GError** error) {
	BoxesUnattendedInstallerCreateDiskImageData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void boxes_unattended_installer_create_disk_image_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesUnattendedInstallerCreateDiskImageData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_unattended_installer_create_disk_image_co (_data_);
}


static gboolean boxes_unattended_installer_create_disk_image_co (BoxesUnattendedInstallerCreateDiskImageData* _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->disk_path;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = g_file_new_for_path (_data_->_tmp0_);
	_data_->disk_file = _data_->_tmp1_;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = boxes_get_unattended_dir ("disk.img");
	_data_->template_path = _data_->_tmp2_;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_file_new_for_path (_data_->template_path);
	_data_->template_file = _data_->_tmp3_;
	_data_->_tmp4_ = _data_->self->disk_path;
	g_debug ("unattended-installer.vala:273: Creating disk image for unattended inst" \
"allation at '%s'..", _data_->_tmp4_);
	_data_->_tmp5_ = _data_->cancellable;
	_data_->_state_ = 1;
	g_file_copy_async (_data_->template_file, _data_->disk_file, 0, G_PRIORITY_DEFAULT, _data_->_tmp5_, NULL, NULL, boxes_unattended_installer_create_disk_image_ready, _data_);
	return FALSE;
	_state_1:
	g_file_copy_finish (_data_->template_file, _data_->_res_, &_data_->_inner_error_);
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_object_unref0 (_data_->template_file);
		_g_free0 (_data_->template_path);
		_g_object_unref0 (_data_->disk_file);
		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;
	}
	_data_->_tmp6_ = _data_->self->disk_path;
	g_debug ("unattended-installer.vala:275: Floppy image for unattended installatio" \
"n created at '%s'", _data_->_tmp6_);
	_data_->self->priv->created_disk = TRUE;
	_g_object_unref0 (_data_->template_file);
	_g_free0 (_data_->template_path);
	_g_object_unref0 (_data_->disk_file);
	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 boxes_unattended_installer_unattended_disk_exists_data_free (gpointer _data) {
	BoxesUnattendedInstallerUnattendedDiskExistsData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesUnattendedInstallerUnattendedDiskExistsData, _data_);
}


static void boxes_unattended_installer_unattended_disk_exists (BoxesUnattendedInstaller* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesUnattendedInstallerUnattendedDiskExistsData* _data_;
	BoxesUnattendedInstaller* _tmp0_;
	GCancellable* _tmp1_;
	GCancellable* _tmp2_;
	_data_ = g_slice_new0 (BoxesUnattendedInstallerUnattendedDiskExistsData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_unattended_installer_unattended_disk_exists);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_unattended_installer_unattended_disk_exists_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = cancellable;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data_->cancellable = _tmp2_;
	boxes_unattended_installer_unattended_disk_exists_co (_data_);
}


static gboolean boxes_unattended_installer_unattended_disk_exists_finish (BoxesUnattendedInstaller* self, GAsyncResult* _res_) {
	gboolean result;
	BoxesUnattendedInstallerUnattendedDiskExistsData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	return result;
}


static void boxes_unattended_installer_unattended_disk_exists_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesUnattendedInstallerUnattendedDiskExistsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_unattended_installer_unattended_disk_exists_co (_data_);
}


static gboolean boxes_unattended_installer_unattended_disk_exists_co (BoxesUnattendedInstallerUnattendedDiskExistsData* _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->disk_path;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = g_file_new_for_path (_data_->_tmp0_);
	_data_->file = _data_->_tmp1_;
	{
		_data_->_tmp2_ = _data_->file;
		_data_->_tmp3_ = _data_->cancellable;
		_data_->_state_ = 1;
		g_file_read_async (_data_->_tmp2_, G_PRIORITY_DEFAULT, _data_->_tmp3_, boxes_unattended_installer_unattended_disk_exists_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = g_file_read_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error_);
		_data_->_tmp5_ = _data_->_tmp4_;
		_g_object_unref0 (_data_->_tmp5_);
		if (_data_->_inner_error_ != NULL) {
			if (g_error_matches (_data_->_inner_error_, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) {
				goto __catch48_g_io_error_not_found;
			}
			goto __catch48_g_error;
		}
	}
	goto __finally48;
	__catch48_g_io_error_not_found:
	{
		_data_->not_found_error = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->result = FALSE;
		_g_error_free0 (_data_->not_found_error);
		_g_object_unref0 (_data_->file);
		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;
	}
	goto __finally48;
	__catch48_g_error:
	{
		_data_->_error_ = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_g_error_free0 (_data_->_error_);
	}
	__finally48:
	if (_data_->_inner_error_ != NULL) {
		_g_object_unref0 (_data_->file);
		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_->result = TRUE;
	_g_object_unref0 (_data_->file);
	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;
	_g_object_unref0 (_data_->file);
	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 boxes_unattended_installer_fetch_user_avatar_data_free (gpointer _data) {
	BoxesUnattendedInstallerFetchUserAvatarData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->avatar);
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesUnattendedInstallerFetchUserAvatarData, _data_);
}


static void boxes_unattended_installer_fetch_user_avatar (BoxesUnattendedInstaller* self, GtkImage* avatar, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesUnattendedInstallerFetchUserAvatarData* _data_;
	BoxesUnattendedInstaller* _tmp0_;
	GtkImage* _tmp1_;
	GtkImage* _tmp2_;
	_data_ = g_slice_new0 (BoxesUnattendedInstallerFetchUserAvatarData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_unattended_installer_fetch_user_avatar);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_unattended_installer_fetch_user_avatar_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = avatar;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data_->avatar = _tmp2_;
	boxes_unattended_installer_fetch_user_avatar_co (_data_);
}


static void boxes_unattended_installer_fetch_user_avatar_finish (BoxesUnattendedInstaller* self, GAsyncResult* _res_) {
	BoxesUnattendedInstallerFetchUserAvatarData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void boxes_unattended_installer_fetch_user_avatar_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesUnattendedInstallerFetchUserAvatarData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_unattended_installer_fetch_user_avatar_co (_data_);
}


static gboolean boxes_unattended_installer_fetch_user_avatar_co (BoxesUnattendedInstallerFetchUserAvatarData* _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_ = boxes_unattended_installer_accounts;
	if (_data_->_tmp0_ == 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;
	}
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = g_get_user_name ();
	_data_->_tmp2_ = g_strdup (_data_->_tmp1_);
	_data_->username = _data_->_tmp2_;
	_data_->_tmp3_ = _data_->username;
	_data_->_tmp4_ = g_strconcat ("/var/lib/AccountsService/icons/", _data_->_tmp3_, NULL);
	_data_->avatar_file = _data_->_tmp4_;
	{
		_data_->_tmp5_ = boxes_unattended_installer_accounts;
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = g_get_user_name ();
		_data_->_state_ = 1;
		boxes_fdo_accounts_FindUserByName (_data_->_tmp5_, _data_->_tmp6_, boxes_unattended_installer_fetch_user_avatar_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp7_ = NULL;
		_data_->_tmp7_ = boxes_fdo_accounts_FindUserByName_finish (_data_->_tmp5_, _data_->_res_, &_data_->_inner_error_);
		_data_->path = _data_->_tmp7_;
		if (_data_->_inner_error_ != NULL) {
			if (_data_->_inner_error_->domain == G_IO_ERROR) {
				goto __catch49_g_io_error;
			}
			_g_free0 (_data_->avatar_file);
			_g_free0 (_data_->username);
			g_critical ("file %s: line %d: unexpected 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_->_tmp8_ = _data_->path;
		_data_->_state_ = 2;
		g_async_initable_new_async (BOXES_FDO_TYPE_ACCOUNTS_USER_PROXY, 0, NULL, boxes_unattended_installer_fetch_user_avatar_ready, _data_, "g-flags", 0, "g-name", "org.freedesktop.Accounts", "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", _data_->_tmp8_, "g-interface-name", "org.freedesktop.Accounts.User", NULL);
		return FALSE;
		_state_2:
		_data_->_tmp9_ = NULL;
		_data_->_tmp9_ = g_async_initable_new_finish (_data_->_source_object_, _data_->_res_, &_data_->_inner_error_);
		_data_->user = (BoxesFdoAccountsUser*) _data_->_tmp9_;
		if (_data_->_inner_error_ != NULL) {
			_g_free0 (_data_->path);
			if (_data_->_inner_error_->domain == G_IO_ERROR) {
				goto __catch49_g_io_error;
			}
			_g_free0 (_data_->path);
			_g_free0 (_data_->avatar_file);
			_g_free0 (_data_->username);
			g_critical ("file %s: line %d: unexpected 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_->_tmp10_ = _data_->user;
		_data_->_tmp11_ = boxes_fdo_accounts_user_get_IconFile (_data_->_tmp10_);
		_data_->_tmp12_ = _data_->_tmp11_;
		_g_free0 (_data_->avatar_file);
		_data_->avatar_file = _data_->_tmp12_;
		_g_object_unref0 (_data_->user);
		_g_free0 (_data_->path);
	}
	goto __finally49;
	__catch49_g_io_error:
	{
		_data_->_error_ = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp13_ = _data_->username;
		_data_->_tmp14_ = _data_->_error_;
		_data_->_tmp15_ = _data_->_tmp14_->message;
		g_warning ("unattended-installer.vala:304: Failed to retrieve information about us" \
"er '%s': %s", _data_->_tmp13_, _data_->_tmp15_);
		_g_error_free0 (_data_->_error_);
	}
	__finally49:
	if (_data_->_inner_error_ != NULL) {
		_g_free0 (_data_->avatar_file);
		_g_free0 (_data_->username);
		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_->_tmp16_ = _data_->avatar_file;
	_data_->_tmp17_ = NULL;
	_data_->_tmp17_ = g_file_new_for_path (_data_->_tmp16_);
	_data_->file = _data_->_tmp17_;
	_data_->_tmp18_ = _data_->file;
	_data_->_tmp19_ = FALSE;
	_data_->_tmp19_ = g_file_query_exists (_data_->_tmp18_, NULL);
	if (_data_->_tmp19_) {
		_data_->_tmp20_ = _data_->avatar;
		_data_->_tmp21_ = _data_->avatar_file;
		g_object_set (_data_->_tmp20_, "file", _data_->_tmp21_, NULL);
	}
	_g_object_unref0 (_data_->file);
	_g_free0 (_data_->avatar_file);
	_g_free0 (_data_->username);
	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;
}


BoxesUnattendedInstaller* boxes_unattended_installer_construct (GType object_type) {
	BoxesUnattendedInstaller * self = NULL;
	self = (BoxesUnattendedInstaller*) boxes_installer_media_construct (object_type);
	return self;
}


gboolean boxes_unattended_installer_get_express_install (BoxesUnattendedInstaller* self) {
	gboolean result;
	GtkSwitch* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->express_toggle;
	_tmp1_ = gtk_switch_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}


const gchar* boxes_unattended_installer_get_username (BoxesUnattendedInstaller* self) {
	const gchar* result;
	GtkEntry* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->username_entry;
	_tmp1_ = gtk_entry_get_text (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}


gchar* boxes_unattended_installer_get_password (BoxesUnattendedInstaller* self) {
	gchar* result;
	GtkEntry* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->password_entry;
	_tmp1_ = gtk_entry_get_text (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	result = _tmp3_;
	return result;
}


static gchar* g_unichar_to_string (gunichar self) {
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	gchar* str;
	const gchar* _tmp1_;
	_tmp0_ = g_new0 (gchar, 7);
	str = (gchar*) _tmp0_;
	_tmp1_ = str;
	g_unichar_to_utf8 (self, _tmp1_);
	result = str;
	return result;
}


gchar* boxes_unattended_installer_get_hidden_password (BoxesUnattendedInstaller* self) {
	gchar* result;
	GtkEntry* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->password_entry;
	_tmp1_ = gtk_entry_get_text (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = strlen (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ > 0) {
		gchar* _tmp5_;
		gchar* str;
		_tmp5_ = g_strdup ("");
		str = _tmp5_;
		{
			gint i;
			i = 0;
			{
				gboolean _tmp6_;
				_tmp6_ = TRUE;
				while (TRUE) {
					gboolean _tmp7_;
					gint _tmp9_;
					GtkEntry* _tmp10_;
					guint _tmp11_;
					guint _tmp12_;
					const gchar* _tmp13_;
					GtkEntry* _tmp14_;
					gunichar _tmp15_ = 0U;
					gchar* _tmp16_ = NULL;
					gchar* _tmp17_;
					gchar* _tmp18_;
					_tmp7_ = _tmp6_;
					if (!_tmp7_) {
						gint _tmp8_;
						_tmp8_ = i;
						i = _tmp8_ + 1;
					}
					_tmp6_ = FALSE;
					_tmp9_ = i;
					_tmp10_ = self->password_entry;
					_tmp11_ = gtk_entry_get_text_length (_tmp10_);
					_tmp12_ = _tmp11_;
					if (!(((guint) _tmp9_) < _tmp12_)) {
						break;
					}
					_tmp13_ = str;
					_tmp14_ = self->password_entry;
					_tmp15_ = gtk_entry_get_invisible_char (_tmp14_);
					_tmp16_ = g_unichar_to_string (_tmp15_);
					_tmp17_ = _tmp16_;
					_tmp18_ = g_strconcat (_tmp13_, _tmp17_, NULL);
					_g_free0 (str);
					str = _tmp18_;
					_g_free0 (_tmp17_);
				}
			}
		}
		result = str;
		return result;
	} else {
		const gchar* _tmp19_ = NULL;
		gchar* _tmp20_;
		_tmp19_ = _ ("no password");
		_tmp20_ = g_strdup (_tmp19_);
		result = _tmp20_;
		return result;
	}
}


gboolean boxes_unattended_installer_get_password_mandatory (BoxesUnattendedInstaller* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_password_mandatory;
	result = _tmp0_;
	return result;
}


void boxes_unattended_installer_set_password_mandatory (BoxesUnattendedInstaller* self, gboolean value) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_password_mandatory = _tmp0_;
	g_object_notify ((GObject *) self, "password-mandatory");
}


const gchar* boxes_unattended_installer_get_unattended_src_path (BoxesUnattendedInstaller* self) {
	const gchar* result;
	GList* _tmp0_;
	gconstpointer _tmp1_;
	const gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->unattended_files;
	_tmp1_ = _tmp0_->data;
	_tmp2_ = ((BoxesUnattendedFile*) _tmp1_)->src_path;
	result = _tmp2_;
	return result;
}


const gchar* boxes_unattended_installer_get_unattended_dest_name (BoxesUnattendedInstaller* self) {
	const gchar* result;
	GList* _tmp0_;
	gconstpointer _tmp1_;
	const gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->unattended_files;
	_tmp1_ = _tmp0_->data;
	_tmp2_ = ((BoxesUnattendedFile*) _tmp1_)->dest_name;
	result = _tmp2_;
	return result;
}


static GObject * boxes_unattended_installer_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	BoxesUnattendedInstaller * self;
	BoxesFdoAccounts* _tmp0_;
	GError * _inner_error_ = NULL;
	parent_class = G_OBJECT_CLASS (boxes_unattended_installer_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = BOXES_UNATTENDED_INSTALLER (obj);
	_tmp0_ = boxes_unattended_installer_accounts;
	if (_tmp0_ == NULL) {
		{
			BoxesFdoAccounts* _tmp1_ = NULL;
			BoxesFdoAccounts* _tmp2_;
			_tmp1_ = g_initable_new (BOXES_FDO_TYPE_ACCOUNTS_PROXY, NULL, &_inner_error_, "g-flags", 0, "g-name", "org.freedesktop.Accounts", "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", "/org/freedesktop/Accounts", "g-interface-name", "org.freedesktop.Accounts", NULL);
			_tmp2_ = (BoxesFdoAccounts*) _tmp1_;
			if (_inner_error_ != NULL) {
				goto __catch50_g_error;
			}
			_g_object_unref0 (boxes_unattended_installer_accounts);
			boxes_unattended_installer_accounts = _tmp2_;
		}
		goto __finally50;
		__catch50_g_error:
		{
			GError* _error_ = NULL;
			GError* _tmp3_;
			const gchar* _tmp4_;
			_error_ = _inner_error_;
			_inner_error_ = NULL;
			_tmp3_ = _error_;
			_tmp4_ = _tmp3_->message;
			g_warning ("unattended-installer.vala:80: Failed to connect to D-Bus service '%s':" \
" %s", "org.freedesktop.Accounts", _tmp4_);
			_g_error_free0 (_error_);
		}
		__finally50:
		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 obj;
}


static void boxes_unattended_installer_class_init (BoxesUnattendedInstallerClass * klass) {
	GError * _inner_error_ = NULL;
	boxes_unattended_installer_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BoxesUnattendedInstallerPrivate));
	BOXES_UNATTENDED_INSTALLER_CLASS (klass)->populate_setup_vbox = boxes_unattended_installer_real_populate_setup_vbox;
	BOXES_UNATTENDED_INSTALLER_CLASS (klass)->set_direct_boot_params = boxes_unattended_installer_real_set_direct_boot_params;
	BOXES_UNATTENDED_INSTALLER_CLASS (klass)->get_unattended_disk_config = boxes_unattended_installer_real_get_unattended_disk_config;
	BOXES_UNATTENDED_INSTALLER_CLASS (klass)->check_needed_info = boxes_unattended_installer_real_check_needed_info;
	BOXES_UNATTENDED_INSTALLER_CLASS (klass)->fill_unattended_data = boxes_unattended_installer_real_fill_unattended_data;
	BOXES_UNATTENDED_INSTALLER_CLASS (klass)->setup_ui = boxes_unattended_installer_real_setup_ui;
	BOXES_UNATTENDED_INSTALLER_CLASS (klass)->clean_up = boxes_unattended_installer_real_clean_up;
	BOXES_UNATTENDED_INSTALLER_CLASS (klass)->prepare_direct_boot = boxes_unattended_installer_real_prepare_direct_boot;
	BOXES_UNATTENDED_INSTALLER_CLASS (klass)->prepare_direct_boot_finish = boxes_unattended_installer_real_prepare_direct_boot_finish;
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_unattended_installer_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_unattended_installer_set_property;
	G_OBJECT_CLASS (klass)->constructor = boxes_unattended_installer_constructor;
	G_OBJECT_CLASS (klass)->finalize = boxes_unattended_installer_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_UNATTENDED_INSTALLER_EXPRESS_INSTALL, g_param_spec_boolean ("express-install", "express-install", "express-install", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_UNATTENDED_INSTALLER_USERNAME, g_param_spec_string ("username", "username", "username", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_UNATTENDED_INSTALLER_PASSWORD, g_param_spec_string ("password", "password", "password", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_UNATTENDED_INSTALLER_HIDDEN_PASSWORD, g_param_spec_string ("hidden-password", "hidden-password", "hidden-password", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_UNATTENDED_INSTALLER_PASSWORD_MANDATORY, g_param_spec_boolean ("password-mandatory", "password-mandatory", "password-mandatory", 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), BOXES_UNATTENDED_INSTALLER_UNATTENDED_SRC_PATH, g_param_spec_string ("unattended-src-path", "unattended-src-path", "unattended-src-path", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_UNATTENDED_INSTALLER_UNATTENDED_DEST_NAME, g_param_spec_string ("unattended-dest-name", "unattended-dest-name", "unattended-dest-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	{
		GRegex* _tmp0_;
		GRegex* _tmp1_;
		GRegex* _tmp2_;
		GRegex* _tmp3_;
		GRegex* _tmp4_;
		GRegex* _tmp5_;
		GRegex* _tmp6_;
		GRegex* _tmp7_;
		_tmp0_ = g_regex_new ("BOXES_USERNAME", 0, 0, &_inner_error_);
		_tmp1_ = _tmp0_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch51_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
		}
		_g_regex_unref0 (boxes_unattended_installer_username_regex);
		boxes_unattended_installer_username_regex = _tmp1_;
		_tmp2_ = g_regex_new ("BOXES_PASSWORD", 0, 0, &_inner_error_);
		_tmp3_ = _tmp2_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch51_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
		}
		_g_regex_unref0 (boxes_unattended_installer_password_regex);
		boxes_unattended_installer_password_regex = _tmp3_;
		_tmp4_ = g_regex_new ("BOXES_TZ", 0, 0, &_inner_error_);
		_tmp5_ = _tmp4_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch51_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
		}
		_g_regex_unref0 (boxes_unattended_installer_timezone_regex);
		boxes_unattended_installer_timezone_regex = _tmp5_;
		_tmp6_ = g_regex_new ("BOXES_LANG", 0, 0, &_inner_error_);
		_tmp7_ = _tmp6_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch51_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
		}
		_g_regex_unref0 (boxes_unattended_installer_lang_regex);
		boxes_unattended_installer_lang_regex = _tmp7_;
	}
	goto __finally51;
	__catch51_g_regex_error:
	{
		GError* _error_ = NULL;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (_error_);
	}
	__finally51:
	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_);
	}
}


static void boxes_unattended_installer_instance_init (BoxesUnattendedInstaller * self) {
	self->priv = BOXES_UNATTENDED_INSTALLER_GET_PRIVATE (self);
}


static void boxes_unattended_installer_finalize (GObject* obj) {
	BoxesUnattendedInstaller * self;
	self = BOXES_UNATTENDED_INSTALLER (obj);
	_g_free0 (self->disk_path);
	__g_list_free__boxes_unattended_file_unref0_0 (self->unattended_files);
	_g_object_unref0 (self->setup_table);
	_g_object_unref0 (self->setup_label);
	_g_object_unref0 (self->setup_hbox);
	_g_object_unref0 (self->express_toggle);
	_g_object_unref0 (self->username_entry);
	_g_object_unref0 (self->password_entry);
	_g_free0 (self->timezone);
	_g_free0 (self->lang);
	G_OBJECT_CLASS (boxes_unattended_installer_parent_class)->finalize (obj);
}


GType boxes_unattended_installer_get_type (void) {
	static volatile gsize boxes_unattended_installer_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_unattended_installer_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesUnattendedInstallerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_unattended_installer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesUnattendedInstaller), 0, (GInstanceInitFunc) boxes_unattended_installer_instance_init, NULL };
		GType boxes_unattended_installer_type_id;
		boxes_unattended_installer_type_id = g_type_register_static (BOXES_TYPE_INSTALLER_MEDIA, "BoxesUnattendedInstaller", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&boxes_unattended_installer_type_id__volatile, boxes_unattended_installer_type_id);
	}
	return boxes_unattended_installer_type_id__volatile;
}


static void _vala_boxes_unattended_installer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesUnattendedInstaller * self;
	self = BOXES_UNATTENDED_INSTALLER (object);
	switch (property_id) {
		case BOXES_UNATTENDED_INSTALLER_EXPRESS_INSTALL:
		g_value_set_boolean (value, boxes_unattended_installer_get_express_install (self));
		break;
		case BOXES_UNATTENDED_INSTALLER_USERNAME:
		g_value_set_string (value, boxes_unattended_installer_get_username (self));
		break;
		case BOXES_UNATTENDED_INSTALLER_PASSWORD:
		g_value_take_string (value, boxes_unattended_installer_get_password (self));
		break;
		case BOXES_UNATTENDED_INSTALLER_HIDDEN_PASSWORD:
		g_value_take_string (value, boxes_unattended_installer_get_hidden_password (self));
		break;
		case BOXES_UNATTENDED_INSTALLER_PASSWORD_MANDATORY:
		g_value_set_boolean (value, boxes_unattended_installer_get_password_mandatory (self));
		break;
		case BOXES_UNATTENDED_INSTALLER_UNATTENDED_SRC_PATH:
		g_value_set_string (value, boxes_unattended_installer_get_unattended_src_path (self));
		break;
		case BOXES_UNATTENDED_INSTALLER_UNATTENDED_DEST_NAME:
		g_value_set_string (value, boxes_unattended_installer_get_unattended_dest_name (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_boxes_unattended_installer_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesUnattendedInstaller * self;
	self = BOXES_UNATTENDED_INSTALLER (object);
	switch (property_id) {
		case BOXES_UNATTENDED_INSTALLER_PASSWORD_MANDATORY:
		boxes_unattended_installer_set_password_mandatory (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


BoxesUnattendedFile* boxes_unattended_file_construct (GType object_type, BoxesUnattendedInstaller* installer, const gchar* src_path, const gchar* dest_name) {
	BoxesUnattendedFile* self = NULL;
	BoxesUnattendedInstaller* _tmp0_;
	BoxesUnattendedInstaller* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	g_return_val_if_fail (installer != NULL, NULL);
	g_return_val_if_fail (src_path != NULL, NULL);
	g_return_val_if_fail (dest_name != NULL, NULL);
	self = (BoxesUnattendedFile*) g_type_create_instance (object_type);
	_tmp0_ = installer;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->installer);
	self->priv->installer = _tmp1_;
	_tmp2_ = src_path;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (self->src_path);
	self->src_path = _tmp3_;
	_tmp4_ = dest_name;
	_tmp5_ = g_strdup (_tmp4_);
	_g_free0 (self->dest_name);
	self->dest_name = _tmp5_;
	return self;
}


BoxesUnattendedFile* boxes_unattended_file_new (BoxesUnattendedInstaller* installer, const gchar* src_path, const gchar* dest_name) {
	return boxes_unattended_file_construct (BOXES_TYPE_UNATTENDED_FILE, installer, src_path, dest_name);
}


static void boxes_unattended_file_copy_data_free (gpointer _data) {
	BoxesUnattendedFileCopyData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_boxes_unattended_file_unref0 (_data_->self);
	g_slice_free (BoxesUnattendedFileCopyData, _data_);
}


void boxes_unattended_file_copy (BoxesUnattendedFile* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesUnattendedFileCopyData* _data_;
	BoxesUnattendedFile* _tmp0_;
	GCancellable* _tmp1_;
	GCancellable* _tmp2_;
	_data_ = g_slice_new0 (BoxesUnattendedFileCopyData);
	_data_->_async_result = g_simple_async_result_new (g_object_newv (G_TYPE_OBJECT, 0, NULL), _callback_, _user_data_, boxes_unattended_file_copy);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_unattended_file_copy_data_free);
	_tmp0_ = _boxes_unattended_file_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = cancellable;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data_->cancellable = _tmp2_;
	boxes_unattended_file_copy_co (_data_);
}


void boxes_unattended_file_copy_finish (BoxesUnattendedFile* self, GAsyncResult* _res_, GError** error) {
	BoxesUnattendedFileCopyData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void boxes_unattended_file_copy_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesUnattendedFileCopyData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_unattended_file_copy_co (_data_);
}


static gboolean boxes_unattended_file_copy_co (BoxesUnattendedFileCopyData* _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_ = _data_->cancellable;
	_data_->_state_ = 1;
	boxes_unattended_file_create (_data_->self, _data_->_tmp0_, boxes_unattended_file_copy_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = boxes_unattended_file_create_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
	_data_->unattended_tmp = _data_->_tmp1_;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		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;
	}
	_data_->_tmp2_ = _data_->self->dest_name;
	_data_->_tmp3_ = _data_->self->priv->installer;
	_data_->_tmp4_ = _data_->_tmp3_->disk_path;
	g_debug ("unattended-installer.vala:328: Copying unattended file '%s' into disk " \
"drive/image '%s'", _data_->_tmp2_, _data_->_tmp4_);
	_data_->_tmp5_ = g_strdup ("mcopy");
	_data_->_tmp6_ = g_strdup ("-n");
	_data_->_tmp7_ = g_strdup ("-o");
	_data_->_tmp8_ = g_strdup ("-i");
	_data_->_tmp9_ = _data_->self->priv->installer;
	_data_->_tmp10_ = _data_->_tmp9_->disk_path;
	_data_->_tmp11_ = g_strdup (_data_->_tmp10_);
	_data_->_tmp12_ = _data_->unattended_tmp;
	_data_->_tmp13_ = NULL;
	_data_->_tmp13_ = g_file_get_path (_data_->_tmp12_);
	_data_->_tmp14_ = _data_->self->dest_name;
	_data_->_tmp15_ = g_strconcat ("::", _data_->_tmp14_, NULL);
	_data_->_tmp16_ = NULL;
	_data_->_tmp16_ = g_new0 (gchar*, 7 + 1);
	_data_->_tmp16_[0] = _data_->_tmp5_;
	_data_->_tmp16_[1] = _data_->_tmp6_;
	_data_->_tmp16_[2] = _data_->_tmp7_;
	_data_->_tmp16_[3] = _data_->_tmp8_;
	_data_->_tmp16_[4] = _data_->_tmp11_;
	_data_->_tmp16_[5] = _data_->_tmp13_;
	_data_->_tmp16_[6] = _data_->_tmp15_;
	_data_->argv = _data_->_tmp16_;
	_data_->argv_length1 = 7;
	_data_->_argv_size_ = _data_->argv_length1;
	_data_->_tmp17_ = _data_->argv;
	_data_->_tmp17__length1 = _data_->argv_length1;
	_data_->_tmp18_ = _data_->cancellable;
	_data_->_state_ = 2;
	boxes_exec (_data_->_tmp17_, _data_->_tmp17__length1, _data_->_tmp18_, boxes_unattended_file_copy_ready, _data_);
	return FALSE;
	_state_2:
	boxes_exec_finish (_data_->_res_, &_data_->_inner_error_);
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
		_g_object_unref0 (_data_->unattended_tmp);
		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;
	}
	_data_->_tmp19_ = _data_->self->dest_name;
	_data_->_tmp20_ = _data_->self->priv->installer;
	_data_->_tmp21_ = _data_->_tmp20_->disk_path;
	g_debug ("unattended-installer.vala:334: Copied unattended file '%s' into disk d" \
"rive/image '%s'", _data_->_tmp19_, _data_->_tmp21_);
	_data_->_tmp22_ = _data_->unattended_tmp;
	_data_->_tmp23_ = NULL;
	_data_->_tmp23_ = g_file_get_path (_data_->_tmp22_);
	_data_->_tmp24_ = _data_->_tmp23_;
	g_debug ("unattended-installer.vala:336: Deleting temporary file '%s'", _data_->_tmp24_);
	_g_free0 (_data_->_tmp24_);
	_data_->_tmp25_ = _data_->unattended_tmp;
	_data_->_tmp26_ = _data_->cancellable;
	g_file_delete (_data_->_tmp25_, _data_->_tmp26_, &_data_->_inner_error_);
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
		_g_object_unref0 (_data_->unattended_tmp);
		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;
	}
	_data_->_tmp27_ = _data_->unattended_tmp;
	_data_->_tmp28_ = NULL;
	_data_->_tmp28_ = g_file_get_path (_data_->_tmp27_);
	_data_->_tmp29_ = _data_->_tmp28_;
	g_debug ("unattended-installer.vala:338: Deleted temporary file '%s'", _data_->_tmp29_);
	_g_free0 (_data_->_tmp29_);
	_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (_data_->unattended_tmp);
	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 boxes_unattended_file_create_data_free (gpointer _data) {
	BoxesUnattendedFileCreateData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->result);
	_boxes_unattended_file_unref0 (_data_->self);
	g_slice_free (BoxesUnattendedFileCreateData, _data_);
}


static void boxes_unattended_file_create (BoxesUnattendedFile* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesUnattendedFileCreateData* _data_;
	BoxesUnattendedFile* _tmp0_;
	GCancellable* _tmp1_;
	GCancellable* _tmp2_;
	_data_ = g_slice_new0 (BoxesUnattendedFileCreateData);
	_data_->_async_result = g_simple_async_result_new (g_object_newv (G_TYPE_OBJECT, 0, NULL), _callback_, _user_data_, boxes_unattended_file_create);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_unattended_file_create_data_free);
	_tmp0_ = _boxes_unattended_file_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = cancellable;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data_->cancellable = _tmp2_;
	boxes_unattended_file_create_co (_data_);
}


static GFile* boxes_unattended_file_create_finish (BoxesUnattendedFile* self, GAsyncResult* _res_, GError** error) {
	GFile* result;
	BoxesUnattendedFileCreateData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return NULL;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void boxes_unattended_file_create_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesUnattendedFileCreateData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_unattended_file_create_co (_data_);
}


static guint8* string_get_data (const gchar* self, int* result_length1) {
	guint8* result;
	guint8* res;
	gint res_length1;
	gint _res_size_;
	gint _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	guint8* _tmp3_;
	gint _tmp3__length1;
	guint8* _tmp4_;
	gint _tmp4__length1;
	g_return_val_if_fail (self != NULL, NULL);
	res = (guint8*) self;
	res_length1 = -1;
	_res_size_ = res_length1;
	_tmp0_ = strlen (self);
	_tmp1_ = _tmp0_;
	res_length1 = (gint) _tmp1_;
	_tmp2_ = res_length1;
	_tmp3_ = res;
	_tmp3__length1 = res_length1;
	_tmp4_ = _tmp3_;
	_tmp4__length1 = _tmp3__length1;
	if (result_length1) {
		*result_length1 = _tmp4__length1;
	}
	result = _tmp4_;
	return result;
}


static gboolean boxes_unattended_file_create_co (BoxesUnattendedFileCreateData* _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;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->src_path;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = g_file_new_for_path (_data_->_tmp0_);
	_data_->source = _data_->_tmp1_;
	_data_->_tmp2_ = _data_->self->dest_name;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = boxes_get_user_unattended_dir (_data_->_tmp2_);
	_data_->destination_path = _data_->_tmp3_;
	_data_->_tmp4_ = _data_->destination_path;
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = g_file_new_for_path (_data_->_tmp4_);
	_data_->destination = _data_->_tmp5_;
	_data_->_tmp6_ = _data_->destination;
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = g_file_get_path (_data_->_tmp6_);
	_data_->_tmp8_ = _data_->_tmp7_;
	g_debug ("unattended-installer.vala:346: Creating unattended file at '%s'..", _data_->_tmp8_);
	_g_free0 (_data_->_tmp8_);
	_data_->_tmp9_ = _data_->source;
	_data_->_tmp10_ = _data_->cancellable;
	_data_->_state_ = 1;
	g_file_read_async (_data_->_tmp9_, G_PRIORITY_DEFAULT, _data_->_tmp10_, boxes_unattended_file_create_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp11_ = NULL;
	_data_->_tmp11_ = g_file_read_finish (_data_->_tmp9_, _data_->_res_, &_data_->_inner_error_);
	_data_->input_stream = _data_->_tmp11_;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_object_unref0 (_data_->destination);
		_g_free0 (_data_->destination_path);
		_g_object_unref0 (_data_->source);
		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;
	}
	_data_->_tmp12_ = _data_->destination;
	_data_->_tmp13_ = _data_->cancellable;
	_data_->_state_ = 2;
	g_file_replace_async (_data_->_tmp12_, NULL, FALSE, G_FILE_CREATE_REPLACE_DESTINATION, G_PRIORITY_DEFAULT, _data_->_tmp13_, boxes_unattended_file_create_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp14_ = NULL;
	_data_->_tmp14_ = g_file_replace_finish (_data_->_tmp12_, _data_->_res_, &_data_->_inner_error_);
	_data_->output_stream = _data_->_tmp14_;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_object_unref0 (_data_->input_stream);
		_g_object_unref0 (_data_->destination);
		_g_free0 (_data_->destination_path);
		_g_object_unref0 (_data_->source);
		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;
	}
	_data_->_tmp15_ = _data_->input_stream;
	_data_->_tmp16_ = g_data_input_stream_new ((GInputStream*) _data_->_tmp15_);
	_data_->data_stream = _data_->_tmp16_;
	_data_->_tmp17_ = _data_->data_stream;
	g_data_input_stream_set_newline_type (_data_->_tmp17_, G_DATA_STREAM_NEWLINE_TYPE_ANY);
	while (TRUE) {
		_data_->_tmp18_ = _data_->data_stream;
		_data_->_tmp19_ = _data_->cancellable;
		_data_->_state_ = 3;
		g_data_input_stream_read_line_async (_data_->_tmp18_, G_PRIORITY_DEFAULT, _data_->_tmp19_, boxes_unattended_file_create_ready, _data_);
		return FALSE;
		_state_3:
		_data_->_tmp20_ = NULL;
		_data_->_tmp20_ = g_data_input_stream_read_line_finish (_data_->_tmp18_, _data_->_res_, NULL, &_data_->_inner_error_);
		_data_->_tmp21_ = _data_->_tmp20_;
		if (_data_->_inner_error_ != NULL) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_g_free0 (_data_->str);
			_g_object_unref0 (_data_->data_stream);
			_g_object_unref0 (_data_->output_stream);
			_g_object_unref0 (_data_->input_stream);
			_g_object_unref0 (_data_->destination);
			_g_free0 (_data_->destination_path);
			_g_object_unref0 (_data_->source);
			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;
		}
		_g_free0 (_data_->str);
		_data_->str = _data_->_tmp21_;
		_data_->_tmp22_ = _data_->str;
		if (!(_data_->_tmp22_ != NULL)) {
			break;
		}
		_data_->_tmp23_ = _data_->self->priv->installer;
		_data_->_tmp24_ = _data_->str;
		_data_->_tmp25_ = NULL;
		_data_->_tmp25_ = boxes_unattended_installer_fill_unattended_data (_data_->_tmp23_, _data_->_tmp24_, &_data_->_inner_error_);
		_data_->_tmp26_ = _data_->_tmp25_;
		if (_data_->_inner_error_ != NULL) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_g_free0 (_data_->str);
			_g_object_unref0 (_data_->data_stream);
			_g_object_unref0 (_data_->output_stream);
			_g_object_unref0 (_data_->input_stream);
			_g_object_unref0 (_data_->destination);
			_g_free0 (_data_->destination_path);
			_g_object_unref0 (_data_->source);
			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;
		}
		_g_free0 (_data_->str);
		_data_->str = _data_->_tmp26_;
		_data_->_tmp28_ = _data_->self->priv->installer;
		_data_->_tmp29_ = _data_->_tmp28_->newline_type;
		if (_data_->_tmp29_ == G_DATA_STREAM_NEWLINE_TYPE_LF) {
			_data_->_tmp27_ = "\n";
		} else {
			_data_->_tmp27_ = "\r\n";
		}
		_data_->_tmp30_ = _data_->str;
		_data_->_tmp31_ = _data_->_tmp27_;
		_data_->_tmp32_ = g_strconcat (_data_->_tmp30_, _data_->_tmp31_, NULL);
		_g_free0 (_data_->str);
		_data_->str = _data_->_tmp32_;
		_data_->_tmp33_ = _data_->output_stream;
		_data_->_tmp34_ = _data_->str;
		_data_->_tmp35_ = string_get_data (_data_->_tmp34_, &_data_->_tmp35__length1);
		_data_->_tmp36_ = _data_->_tmp35_;
		_data_->_tmp36__length1 = _data_->_tmp35__length1;
		_data_->_tmp37_ = _data_->cancellable;
		_data_->_state_ = 4;
		g_output_stream_write_async ((GOutputStream*) _data_->_tmp33_, _data_->_tmp36_, (gsize) _data_->_tmp36__length1, G_PRIORITY_DEFAULT, _data_->_tmp37_, boxes_unattended_file_create_ready, _data_);
		return FALSE;
		_state_4:
		g_output_stream_write_finish ((GOutputStream*) _data_->_tmp33_, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_g_free0 (_data_->str);
			_g_object_unref0 (_data_->data_stream);
			_g_object_unref0 (_data_->output_stream);
			_g_object_unref0 (_data_->input_stream);
			_g_object_unref0 (_data_->destination);
			_g_free0 (_data_->destination_path);
			_g_object_unref0 (_data_->source);
			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;
		}
	}
	_data_->_tmp38_ = _data_->output_stream;
	_data_->_tmp39_ = _data_->cancellable;
	_data_->_state_ = 5;
	g_output_stream_close_async ((GOutputStream*) _data_->_tmp38_, G_PRIORITY_DEFAULT, _data_->_tmp39_, boxes_unattended_file_create_ready, _data_);
	return FALSE;
	_state_5:
	g_output_stream_close_finish ((GOutputStream*) _data_->_tmp38_, _data_->_res_, &_data_->_inner_error_);
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_free0 (_data_->str);
		_g_object_unref0 (_data_->data_stream);
		_g_object_unref0 (_data_->output_stream);
		_g_object_unref0 (_data_->input_stream);
		_g_object_unref0 (_data_->destination);
		_g_free0 (_data_->destination_path);
		_g_object_unref0 (_data_->source);
		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;
	}
	_data_->_tmp40_ = _data_->destination;
	_data_->_tmp41_ = NULL;
	_data_->_tmp41_ = g_file_get_path (_data_->_tmp40_);
	_data_->_tmp42_ = _data_->_tmp41_;
	g_debug ("unattended-installer.vala:364: Created unattended file at '%s'..", _data_->_tmp42_);
	_g_free0 (_data_->_tmp42_);
	_data_->result = _data_->destination;
	_g_free0 (_data_->str);
	_g_object_unref0 (_data_->data_stream);
	_g_object_unref0 (_data_->output_stream);
	_g_object_unref0 (_data_->input_stream);
	_g_free0 (_data_->destination_path);
	_g_object_unref0 (_data_->source);
	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;
	_g_free0 (_data_->str);
	_g_object_unref0 (_data_->data_stream);
	_g_object_unref0 (_data_->output_stream);
	_g_object_unref0 (_data_->input_stream);
	_g_object_unref0 (_data_->destination);
	_g_free0 (_data_->destination_path);
	_g_object_unref0 (_data_->source);
	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 boxes_value_unattended_file_init (GValue* value) {
	value->data[0].v_pointer = NULL;
}


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


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


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


static gchar* boxes_value_unattended_file_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	if (collect_values[0].v_pointer) {
		BoxesUnattendedFile* 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 = boxes_unattended_file_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}


static gchar* boxes_value_unattended_file_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	BoxesUnattendedFile** 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 = boxes_unattended_file_ref (value->data[0].v_pointer);
	}
	return NULL;
}


GParamSpec* boxes_param_spec_unattended_file (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	BoxesParamSpecUnattendedFile* spec;
	g_return_val_if_fail (g_type_is_a (object_type, BOXES_TYPE_UNATTENDED_FILE), 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 boxes_value_get_unattended_file (const GValue* value) {
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, BOXES_TYPE_UNATTENDED_FILE), NULL);
	return value->data[0].v_pointer;
}


void boxes_value_set_unattended_file (GValue* value, gpointer v_object) {
	BoxesUnattendedFile* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, BOXES_TYPE_UNATTENDED_FILE));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, BOXES_TYPE_UNATTENDED_FILE));
		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;
		boxes_unattended_file_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		boxes_unattended_file_unref (old);
	}
}


void boxes_value_take_unattended_file (GValue* value, gpointer v_object) {
	BoxesUnattendedFile* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, BOXES_TYPE_UNATTENDED_FILE));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, BOXES_TYPE_UNATTENDED_FILE));
		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) {
		boxes_unattended_file_unref (old);
	}
}


static void boxes_unattended_file_class_init (BoxesUnattendedFileClass * klass) {
	boxes_unattended_file_parent_class = g_type_class_peek_parent (klass);
	BOXES_UNATTENDED_FILE_CLASS (klass)->finalize = boxes_unattended_file_finalize;
	g_type_class_add_private (klass, sizeof (BoxesUnattendedFilePrivate));
}


static void boxes_unattended_file_instance_init (BoxesUnattendedFile * self) {
	self->priv = BOXES_UNATTENDED_FILE_GET_PRIVATE (self);
	self->ref_count = 1;
}


static void boxes_unattended_file_finalize (BoxesUnattendedFile* obj) {
	BoxesUnattendedFile * self;
	self = BOXES_UNATTENDED_FILE (obj);
	_g_free0 (self->src_path);
	_g_free0 (self->dest_name);
	_g_object_unref0 (self->priv->installer);
}


GType boxes_unattended_file_get_type (void) {
	static volatile gsize boxes_unattended_file_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_unattended_file_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { boxes_value_unattended_file_init, boxes_value_unattended_file_free_value, boxes_value_unattended_file_copy_value, boxes_value_unattended_file_peek_pointer, "p", boxes_value_unattended_file_collect_value, "p", boxes_value_unattended_file_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (BoxesUnattendedFileClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_unattended_file_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesUnattendedFile), 0, (GInstanceInitFunc) boxes_unattended_file_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 boxes_unattended_file_type_id;
		boxes_unattended_file_type_id = g_type_register_fundamental (g_type_fundamental_next (), "BoxesUnattendedFile", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&boxes_unattended_file_type_id__volatile, boxes_unattended_file_type_id);
	}
	return boxes_unattended_file_type_id__volatile;
}


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


void boxes_unattended_file_unref (gpointer instance) {
	BoxesUnattendedFile* self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		BOXES_UNATTENDED_FILE_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


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


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


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



