/* unattended-installer.c generated by valac 0.16.0.2-f2187, 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 <gdk-pixbuf/gdk-pixbuf.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_IS_UNATTENDED_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UNATTENDED_FILE))
#define BOXES_UNATTENDED_FILE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BOXES_TYPE_UNATTENDED_FILE, BoxesUnattendedFileIface))

typedef struct _BoxesUnattendedFile BoxesUnattendedFile;
typedef struct _BoxesUnattendedFileIface BoxesUnattendedFileIface;

#define TYPE_AVATAR_FORMAT (avatar_format_get_type ())
#define AVATAR_FORMAT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AVATAR_FORMAT, AvatarFormat))
#define AVATAR_FORMAT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AVATAR_FORMAT, AvatarFormatClass))
#define IS_AVATAR_FORMAT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AVATAR_FORMAT))
#define IS_AVATAR_FORMAT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AVATAR_FORMAT))
#define AVATAR_FORMAT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AVATAR_FORMAT, AvatarFormatClass))

typedef struct _AvatarFormat AvatarFormat;
typedef struct _AvatarFormatClass AvatarFormatClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _avatar_format_unref0(var) ((var == NULL) ? NULL : (var = (avatar_format_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 BOXES_TYPE_UNATTENDED_TEXT_FILE (boxes_unattended_text_file_get_type ())
#define BOXES_UNATTENDED_TEXT_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UNATTENDED_TEXT_FILE, BoxesUnattendedTextFile))
#define BOXES_UNATTENDED_TEXT_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_UNATTENDED_TEXT_FILE, BoxesUnattendedTextFileClass))
#define BOXES_IS_UNATTENDED_TEXT_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UNATTENDED_TEXT_FILE))
#define BOXES_IS_UNATTENDED_TEXT_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_UNATTENDED_TEXT_FILE))
#define BOXES_UNATTENDED_TEXT_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_UNATTENDED_TEXT_FILE, BoxesUnattendedTextFileClass))

typedef struct _BoxesUnattendedTextFile BoxesUnattendedTextFile;
typedef struct _BoxesUnattendedTextFileClass BoxesUnattendedTextFileClass;
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _BoxesUnattendedInstallerSetupData BoxesUnattendedInstallerSetupData;
typedef struct _Block26Data Block26Data;
#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_TYPE_UNATTENDED_AVATAR_FILE (boxes_unattended_avatar_file_get_type ())
#define BOXES_UNATTENDED_AVATAR_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UNATTENDED_AVATAR_FILE, BoxesUnattendedAvatarFile))
#define BOXES_UNATTENDED_AVATAR_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_UNATTENDED_AVATAR_FILE, BoxesUnattendedAvatarFileClass))
#define BOXES_IS_UNATTENDED_AVATAR_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UNATTENDED_AVATAR_FILE))
#define BOXES_IS_UNATTENDED_AVATAR_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_UNATTENDED_AVATAR_FILE))
#define BOXES_UNATTENDED_AVATAR_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_UNATTENDED_AVATAR_FILE, BoxesUnattendedAvatarFileClass))

typedef struct _BoxesUnattendedAvatarFile BoxesUnattendedAvatarFile;
typedef struct _BoxesUnattendedAvatarFileClass BoxesUnattendedAvatarFileClass;

#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;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
typedef struct _BoxesUnattendedFileCopyData BoxesUnattendedFileCopyData;
typedef struct _BoxesUnattendedTextFilePrivate BoxesUnattendedTextFilePrivate;
typedef struct _BoxesUnattendedTextFileCreateData BoxesUnattendedTextFileCreateData;
typedef struct _BoxesUnattendedAvatarFilePrivate BoxesUnattendedAvatarFilePrivate;
typedef struct _AvatarFormatPrivate AvatarFormatPrivate;
typedef struct _BoxesUnattendedAvatarFileCreateData BoxesUnattendedAvatarFileCreateData;
typedef struct _ParamSpecAvatarFormat ParamSpecAvatarFormat;

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 _BoxesUnattendedFileIface {
	GTypeInterface parent_iface;
	void (*create) (BoxesUnattendedFile* self, const gchar* hostname, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GFile* (*create_finish) (BoxesUnattendedFile* self, GAsyncResult* _res_, GError** error);
	const gchar* (*get_src_path) (BoxesUnattendedFile* self);
	void (*set_src_path) (BoxesUnattendedFile* self, const gchar* value);
	const gchar* (*get_dest_name) (BoxesUnattendedFile* self);
	void (*set_dest_name) (BoxesUnattendedFile* self, const gchar* value);
	BoxesUnattendedInstaller* (*get_installer) (BoxesUnattendedFile* self);
	void (*set_installer) (BoxesUnattendedFile* self, BoxesUnattendedInstaller* value);
};

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;
	AvatarFormat* avatar_format;
};

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, const gchar* hostname, 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;
	gchar* hostname;
	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_;
	const gchar* _tmp12_;
	GCancellable* _tmp13_;
	GCancellable* _tmp14_;
	GError* _error_;
	GError* _tmp15_;
	GError* _tmp16_;
	GError * _inner_error_;
};

struct _Block26Data {
	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* _tmp5_;
	AvatarFormat* _tmp6_;
	BoxesUnattendedAvatarFile* _tmp7_;
	BoxesUnattendedAvatarFile* _tmp8_;
	BoxesUnattendedAvatarFile* avatar_file;
	BoxesFdoAccounts* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* path;
	const gchar* _tmp12_;
	BoxesFdoAccountsUser* _tmp13_;
	BoxesFdoAccountsUser* user;
	BoxesUnattendedAvatarFile* _tmp14_;
	BoxesFdoAccountsUser* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	GError* _error_;
	const gchar* _tmp19_;
	GError* _tmp20_;
	const gchar* _tmp21_;
	BoxesUnattendedAvatarFile* _tmp22_;
	const gchar* _tmp23_;
	const gchar* _tmp24_;
	GFile* _tmp25_;
	GFile* file;
	GFile* _tmp26_;
	gboolean _tmp27_;
	GtkImage* _tmp28_;
	BoxesUnattendedAvatarFile* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	BoxesUnattendedAvatarFile* _tmp32_;
	BoxesUnattendedFile* _tmp33_;
	GError * _inner_error_;
};

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

struct _BoxesUnattendedTextFile {
	GObject parent_instance;
	BoxesUnattendedTextFilePrivate * priv;
};

struct _BoxesUnattendedTextFileClass {
	GObjectClass parent_class;
};

struct _BoxesUnattendedTextFilePrivate {
	gchar* _src_path;
	gchar* _dest_name;
	BoxesUnattendedInstaller* _installer;
};

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

struct _BoxesUnattendedAvatarFile {
	GObject parent_instance;
	BoxesUnattendedAvatarFilePrivate * priv;
};

struct _BoxesUnattendedAvatarFileClass {
	GObjectClass parent_class;
};

struct _BoxesUnattendedAvatarFilePrivate {
	gchar* _src_path;
	gchar* _dest_name;
	BoxesUnattendedInstaller* _installer;
	AvatarFormat* dest_format;
};

struct _AvatarFormat {
	GTypeInstance parent_instance;
	volatile int ref_count;
	AvatarFormatPrivate * priv;
	gchar* type;
	gchar* extension;
	gboolean alpha;
	gint width;
	gint height;
};

struct _AvatarFormatClass {
	GTypeClass parent_class;
	void (*finalize) (AvatarFormat *self);
};

struct _BoxesUnattendedAvatarFileCreateData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesUnattendedAvatarFile* self;
	gchar* hostname;
	GCancellable* cancellable;
	GFile* result;
	BoxesUnattendedInstaller* _tmp0_;
	BoxesUnattendedInstaller* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	AvatarFormat* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* destination_path;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	AvatarFormat* _tmp13_;
	gint _tmp14_;
	AvatarFormat* _tmp15_;
	gint _tmp16_;
	GdkPixbuf* _tmp17_;
	GdkPixbuf* pixbuf;
	gboolean _tmp18_;
	AvatarFormat* _tmp19_;
	gboolean _tmp20_;
	GdkPixbuf* _tmp21_;
	gboolean _tmp22_;
	gboolean _tmp23_;
	GdkPixbuf* _tmp24_;
	GdkPixbuf* _tmp25_;
	const gchar* _tmp26_;
	GdkPixbuf* _tmp27_;
	const gchar* _tmp28_;
	AvatarFormat* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	GError* _error_;
	GError* _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp34_;
	GFile* _tmp35_;
	GError * _inner_error_;
};

struct _ParamSpecAvatarFormat {
	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 GRegex* boxes_unattended_installer_host_regex;
static GRegex* boxes_unattended_installer_host_regex = NULL;
static BoxesFdoAccounts* boxes_unattended_installer_accounts;
static BoxesFdoAccounts* boxes_unattended_installer_accounts = NULL;
static gpointer boxes_unattended_text_file_parent_class = NULL;
static BoxesUnattendedFileIface* boxes_unattended_text_file_boxes_unattended_file_parent_iface = NULL;
static gpointer boxes_unattended_avatar_file_parent_class = NULL;
static BoxesUnattendedFileIface* boxes_unattended_avatar_file_boxes_unattended_file_parent_iface = NULL;
static gpointer avatar_format_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;
GType boxes_unattended_file_get_type (void) G_GNUC_CONST;
gpointer avatar_format_ref (gpointer instance);
void avatar_format_unref (gpointer instance);
GParamSpec* param_spec_avatar_format (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_avatar_format (GValue* value, gpointer v_object);
void value_take_avatar_format (GValue* value, gpointer v_object);
gpointer value_get_avatar_format (const GValue* value);
GType avatar_format_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 _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_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, AvatarFormat* avatar_format, GError** error);
BoxesInstallerMedia* boxes_installer_media_new (void);
BoxesInstallerMedia* boxes_installer_media_construct (GType object_type);
gchar* boxes_get_user_pkgcache (const gchar* file_name);
BoxesUnattendedTextFile* boxes_unattended_text_file_new (BoxesUnattendedInstaller* installer, const gchar* src_path, const gchar* dest_name);
BoxesUnattendedTextFile* boxes_unattended_text_file_construct (GType object_type, BoxesUnattendedInstaller* installer, const gchar* src_path, const gchar* dest_name);
GType boxes_unattended_text_file_get_type (void) G_GNUC_CONST;
static gchar** _vala_array_dup4 (gchar** self, int length);
AvatarFormat* avatar_format_new (const gchar* type, const gchar* extension, gboolean alpha, gint width, gint height);
AvatarFormat* avatar_format_construct (GType object_type, const gchar* type, const gchar* extension, gboolean alpha, gint width, gint height);
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, const gchar* hostname, 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, const gchar* hostname, 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, const gchar* hostname, GError** error);
static gchar* boxes_unattended_installer_real_fill_unattended_data (BoxesUnattendedInstaller* self, const gchar* data, const gchar* hostname, GError** error);
static void boxes_unattended_installer_real_setup_ui (BoxesUnattendedInstaller* self);
static Block26Data* block26_data_ref (Block26Data* _data26_);
static void block26_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_ (Block26Data* _data26_);
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_text_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 (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_);
BoxesUnattendedAvatarFile* boxes_unattended_avatar_file_new (BoxesUnattendedInstaller* installer, const gchar* src_path, AvatarFormat* dest_format);
BoxesUnattendedAvatarFile* boxes_unattended_avatar_file_construct (GType object_type, BoxesUnattendedInstaller* installer, const gchar* src_path, AvatarFormat* dest_format);
GType boxes_unattended_avatar_file_get_type (void) G_GNUC_CONST;
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);
void boxes_unattended_file_set_src_path (BoxesUnattendedFile* self, const gchar* value);
const gchar* boxes_unattended_file_get_src_path (BoxesUnattendedFile* 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);
const gchar* boxes_unattended_file_get_dest_name (BoxesUnattendedFile* 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);
static void boxes_unattended_file_copy_data_free (gpointer _data);
static gboolean boxes_unattended_file_copy_co (BoxesUnattendedFileCopyData* _data_);
void boxes_unattended_file_create (BoxesUnattendedFile* self, const gchar* hostname, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
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_);
BoxesUnattendedInstaller* boxes_unattended_file_get_installer (BoxesUnattendedFile* self);
void boxes_exec (gchar** argv, int argv_length1, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_exec_finish (GAsyncResult* _res_, GError** error);
void boxes_unattended_file_set_dest_name (BoxesUnattendedFile* self, const gchar* value);
void boxes_unattended_file_set_installer (BoxesUnattendedFile* self, BoxesUnattendedInstaller* value);
#define BOXES_UNATTENDED_TEXT_FILE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_UNATTENDED_TEXT_FILE, BoxesUnattendedTextFilePrivate))
enum  {
	BOXES_UNATTENDED_TEXT_FILE_DUMMY_PROPERTY,
	BOXES_UNATTENDED_TEXT_FILE_SRC_PATH,
	BOXES_UNATTENDED_TEXT_FILE_DEST_NAME,
	BOXES_UNATTENDED_TEXT_FILE_INSTALLER
};
static void boxes_unattended_text_file_real_create_data_free (gpointer _data);
static void boxes_unattended_text_file_real_create (BoxesUnattendedFile* base, const gchar* hostname, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean boxes_unattended_text_file_real_create_co (BoxesUnattendedTextFileCreateData* _data_);
gchar* boxes_get_user_unattended (const gchar* file_name);
static void boxes_unattended_text_file_create_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void boxes_unattended_text_file_finalize (GObject* obj);
static void _vala_boxes_unattended_text_file_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_boxes_unattended_text_file_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
#define BOXES_UNATTENDED_AVATAR_FILE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_UNATTENDED_AVATAR_FILE, BoxesUnattendedAvatarFilePrivate))
enum  {
	BOXES_UNATTENDED_AVATAR_FILE_DUMMY_PROPERTY,
	BOXES_UNATTENDED_AVATAR_FILE_SRC_PATH,
	BOXES_UNATTENDED_AVATAR_FILE_DEST_NAME,
	BOXES_UNATTENDED_AVATAR_FILE_INSTALLER
};
static void boxes_unattended_avatar_file_real_create_data_free (gpointer _data);
static void boxes_unattended_avatar_file_real_create (BoxesUnattendedFile* base, const gchar* hostname, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean boxes_unattended_avatar_file_real_create_co (BoxesUnattendedAvatarFileCreateData* _data_);
GdkPixbuf* boxes_remove_alpha (GdkPixbuf* pixbuf);
static void boxes_unattended_avatar_file_finalize (GObject* obj);
static void _vala_boxes_unattended_avatar_file_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_boxes_unattended_avatar_file_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
enum  {
	AVATAR_FORMAT_DUMMY_PROPERTY
};
static void avatar_format_finalize (AvatarFormat* 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 _g_object_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}


static void _g_list_free__g_object_unref0_ (GList* self) {
	g_list_foreach (self, (GFunc) _g_object_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;
}


static gpointer _avatar_format_ref0 (gpointer self) {
	return self ? avatar_format_ref (self) : NULL;
}


BoxesUnattendedInstaller* boxes_unattended_installer_construct_copy (GType object_type, BoxesInstallerMedia* media, const gchar* unattended_src_path, const gchar* unattended_dest_name, AvatarFormat* avatar_format, 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_;
	BoxesUnattendedTextFile* _tmp28_;
	GTimeVal time = {0};
	GTimeVal _tmp29_;
	GDateTime* _tmp30_;
	GDateTime* date;
	GDateTime* _tmp31_;
	const gchar* _tmp32_ = NULL;
	gchar* _tmp33_;
	gchar** _tmp34_;
	gchar** _tmp35_ = NULL;
	gchar** _tmp36_;
	gint _tmp36__length1;
	gchar** langs;
	gint langs_length1;
	gint _langs_size_;
	gchar** _tmp37_;
	gint _tmp37__length1;
	const gchar* _tmp38_;
	gchar* _tmp39_;
	AvatarFormat* _tmp40_;
	AvatarFormat* _tmp41_;
	AvatarFormat* _tmp42_;
	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_user_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__g_object_unref0_0 (self->unattended_files);
	self->unattended_files = NULL;
	_tmp26_ = unattended_src_path;
	_tmp27_ = unattended_dest_name;
	_tmp28_ = boxes_unattended_text_file_new (self, _tmp26_, _tmp27_);
	self->unattended_files = g_list_append (self->unattended_files, (BoxesUnattendedFile*) _tmp28_);
	g_get_current_time (&time);
	_tmp29_ = time;
	_tmp30_ = g_date_time_new_from_timeval_local (&_tmp29_);
	date = _tmp30_;
	_tmp31_ = date;
	_tmp32_ = g_date_time_get_timezone_abbreviation (_tmp31_);
	_tmp33_ = g_strdup (_tmp32_);
	_g_free0 (self->timezone);
	self->timezone = _tmp33_;
	_tmp35_ = _tmp34_ = g_get_language_names ();
	_tmp36_ = (_tmp35_ != NULL) ? _vala_array_dup4 (_tmp35_, _vala_array_length (_tmp34_)) : ((gpointer) _tmp35_);
	_tmp36__length1 = _vala_array_length (_tmp34_);
	langs = _tmp36_;
	langs_length1 = _tmp36__length1;
	_langs_size_ = langs_length1;
	_tmp37_ = langs;
	_tmp37__length1 = langs_length1;
	_tmp38_ = _tmp37_[0];
	_tmp39_ = g_strdup (_tmp38_);
	_g_free0 (self->lang);
	self->lang = _tmp39_;
	_tmp40_ = avatar_format;
	_tmp41_ = _avatar_format_ref0 (_tmp40_);
	_avatar_format_unref0 (self->avatar_format);
	self->avatar_format = _tmp41_;
	_tmp42_ = avatar_format;
	if (_tmp42_ == NULL) {
		AvatarFormat* _tmp43_;
		_tmp43_ = avatar_format_new ("png", "", TRUE, -1, -1);
		_avatar_format_unref0 (self->avatar_format);
		self->avatar_format = _tmp43_;
	}
	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_free0 (_data_->hostname);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesUnattendedInstallerSetupData, _data_);
}


void boxes_unattended_installer_setup (BoxesUnattendedInstaller* self, const gchar* hostname, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesUnattendedInstallerSetupData* _data_;
	BoxesUnattendedInstaller* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GCancellable* _tmp3_;
	GCancellable* _tmp4_;
	_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_ = hostname;
	_tmp2_ = g_strdup (_tmp1_);
	_data_->hostname = _tmp2_;
	_tmp3_ = cancellable;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_data_->cancellable = _tmp4_;
	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 _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:122: 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:129: 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_ = _g_object_ref0 ((BoxesUnattendedFile*) _data_->unattended_file_it->data);
				_data_->unattended_file = _data_->_tmp10_;
				{
					_data_->_tmp11_ = _data_->unattended_file;
					_data_->_tmp12_ = _data_->hostname;
					_data_->_tmp13_ = _data_->cancellable;
					_data_->_state_ = 3;
					boxes_unattended_file_copy (_data_->_tmp11_, _data_->_tmp12_, _data_->_tmp13_, 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) {
						_g_object_unref0 (_data_->unattended_file);
						goto __catch47_g_error;
					}
					_g_object_unref0 (_data_->unattended_file);
				}
			}
		}
		_data_->_tmp14_ = _data_->cancellable;
		_data_->_state_ = 4;
		boxes_unattended_installer_prepare_direct_boot (_data_->self, _data_->_tmp14_, 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_->_tmp15_ = _data_->_error_;
		_data_->_tmp16_ = _g_error_copy0 (_data_->_tmp15_);
		_data_->_inner_error_ = _data_->_tmp16_;
		_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, const gchar* hostname, 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_;
	GRegex* _tmp36_;
	const gchar* _tmp37_;
	const gchar* _tmp38_;
	gint _tmp39_;
	gint _tmp40_;
	const gchar* _tmp41_;
	gchar* _tmp42_ = NULL;
	gchar* _tmp43_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (data != NULL, NULL);
	g_return_val_if_fail (hostname != 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_;
	_tmp36_ = boxes_unattended_installer_host_regex;
	_tmp37_ = str;
	_tmp38_ = str;
	_tmp39_ = strlen (_tmp38_);
	_tmp40_ = _tmp39_;
	_tmp41_ = hostname;
	_tmp42_ = g_regex_replace (_tmp36_, _tmp37_, (gssize) _tmp40_, 0, _tmp41_, 0, &_inner_error_);
	_tmp43_ = _tmp42_;
	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 = _tmp43_;
	result = str;
	return result;
}


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


static Block26Data* block26_data_ref (Block26Data* _data26_) {
	g_atomic_int_inc (&_data26_->_ref_count_);
	return _data26_;
}


static void block26_data_unref (void * _userdata_) {
	Block26Data* _data26_;
	_data26_ = (Block26Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data26_->_ref_count_)) {
		BoxesUnattendedInstaller * self;
		self = _data26_->self;
		_g_object_unref0 (_data26_->notebook);
		_g_object_unref0 (self);
		g_slice_free (Block26Data, _data26_);
	}
}


static void __lambda45_ (Block26Data* _data26_) {
	BoxesUnattendedInstaller * self;
	GtkNotebook* _tmp0_;
	GtkEntry* _tmp1_;
	self = _data26_->self;
	_tmp0_ = _data26_->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) {
	Block26Data* _data26_;
	const gchar* _tmp0_ = NULL;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	GtkLabel* _tmp3_;
	GtkHBox* _tmp4_;
	GtkHBox* _tmp5_;
	GtkHBox* _tmp6_;
	GtkHBox* _tmp7_;
	GtkTable* _tmp8_;
	GtkTable* _tmp9_;
	GtkHBox* _tmp10_;
	GtkTable* _tmp11_;
	GtkTable* _tmp12_;
	GtkTable* _tmp13_;
	const gchar* _tmp14_ = NULL;
	GtkLabel* _tmp15_;
	GtkLabel* _tmp16_;
	GtkLabel* label;
	GtkLabel* _tmp17_;
	GtkLabel* _tmp18_;
	GtkTable* _tmp19_;
	GtkLabel* _tmp20_;
	GtkSwitch* _tmp21_;
	GtkSwitch* _tmp22_;
	GtkSwitch* _tmp23_;
	OsinfoMedia* _tmp24_;
	gboolean _tmp25_ = FALSE;
	gboolean _tmp26_;
	GtkSwitch* _tmp27_;
	GtkSwitch* _tmp28_;
	GtkTable* _tmp29_;
	GtkSwitch* _tmp30_;
	GtkImage* _tmp31_;
	GtkImage* _tmp32_;
	GtkImage* avatar;
	GtkImage* _tmp33_;
	GtkTable* _tmp34_;
	GtkImage* _tmp35_;
	GtkImage* _tmp36_;
	GtkImage* _tmp37_;
	const gchar* _tmp38_ = NULL;
	GtkLabel* _tmp39_;
	GtkLabel* _tmp40_;
	GtkLabel* _tmp41_;
	GtkLabel* _tmp42_;
	GtkTable* _tmp43_;
	GtkLabel* _tmp44_;
	GtkEntry* _tmp45_;
	GtkEntry* _tmp46_;
	GtkEntry* _tmp47_;
	const gchar* _tmp48_ = NULL;
	GtkEntry* _tmp49_;
	GtkEntry* _tmp50_;
	GtkTable* _tmp51_;
	GtkEntry* _tmp52_;
	const gchar* _tmp53_ = NULL;
	GtkLabel* _tmp54_;
	GtkLabel* _tmp55_;
	GtkLabel* _tmp56_;
	GtkLabel* _tmp57_;
	GtkTable* _tmp58_;
	GtkLabel* _tmp59_;
	GtkNotebook* _tmp60_;
	GtkNotebook* _tmp61_;
	GtkNotebook* _tmp62_;
	GtkNotebook* _tmp63_;
	GtkNotebook* _tmp64_;
	GtkNotebook* _tmp65_;
	const gchar* _tmp66_ = NULL;
	GtkButton* _tmp67_;
	GtkButton* _tmp68_;
	GtkButton* button;
	GtkButton* _tmp69_;
	GtkNotebook* _tmp70_;
	GtkButton* _tmp71_;
	GtkEntry* _tmp72_;
	GtkEntry* _tmp73_;
	GtkEntry* _tmp74_;
	GtkEntry* _tmp75_;
	GtkEntry* _tmp76_;
	GtkNotebook* _tmp77_;
	GtkEntry* _tmp78_;
	GtkButton* _tmp79_;
	GtkTable* _tmp80_;
	GtkNotebook* _tmp81_;
	GtkTable* _tmp82_;
	GList* _tmp83_ = NULL;
	_data26_ = g_slice_new0 (Block26Data);
	_data26_->_ref_count_ = 1;
	_data26_->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;
	gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_START);
	_tmp4_ = (GtkHBox*) gtk_hbox_new (FALSE, 20);
	_tmp5_ = g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->setup_hbox);
	self->setup_hbox = _tmp5_;
	_tmp6_ = self->setup_hbox;
	gtk_widget_set_valign ((GtkWidget*) _tmp6_, GTK_ALIGN_START);
	_tmp7_ = self->setup_hbox;
	g_object_set ((GtkWidget*) _tmp7_, "margin", 24, NULL);
	_tmp8_ = (GtkTable*) gtk_table_new ((guint) 3, (guint) 3, FALSE);
	_tmp9_ = g_object_ref_sink (_tmp8_);
	_g_object_unref0 (self->setup_table);
	self->setup_table = _tmp9_;
	_tmp10_ = self->setup_hbox;
	_tmp11_ = self->setup_table;
	gtk_box_pack_start ((GtkBox*) _tmp10_, (GtkWidget*) _tmp11_, FALSE, FALSE, (guint) 0);
	_tmp12_ = self->setup_table;
	g_object_set (_tmp12_, "column-spacing", (guint) 10, NULL);
	_tmp13_ = self->setup_table;
	g_object_set (_tmp13_, "row-spacing", (guint) 10, NULL);
	_tmp14_ = _ ("Express Install");
	_tmp15_ = (GtkLabel*) gtk_label_new (_tmp14_);
	_tmp16_ = g_object_ref_sink (_tmp15_);
	label = _tmp16_;
	_tmp17_ = label;
	gtk_widget_set_halign ((GtkWidget*) _tmp17_, GTK_ALIGN_END);
	_tmp18_ = label;
	gtk_widget_set_valign ((GtkWidget*) _tmp18_, GTK_ALIGN_CENTER);
	_tmp19_ = self->setup_table;
	_tmp20_ = label;
	gtk_table_attach_defaults (_tmp19_, (GtkWidget*) _tmp20_, (guint) 1, (guint) 2, (guint) 0, (guint) 1);
	_tmp21_ = (GtkSwitch*) gtk_switch_new ();
	_tmp22_ = g_object_ref_sink (_tmp21_);
	_g_object_unref0 (self->express_toggle);
	self->express_toggle = _tmp22_;
	_tmp23_ = self->express_toggle;
	_tmp24_ = ((BoxesInstallerMedia*) self)->os_media;
	g_object_get (_tmp24_, "live", &_tmp25_, NULL);
	_tmp26_ = _tmp25_;
	gtk_switch_set_active (_tmp23_, !_tmp26_);
	_tmp27_ = self->express_toggle;
	gtk_widget_set_halign ((GtkWidget*) _tmp27_, GTK_ALIGN_START);
	_tmp28_ = self->express_toggle;
	gtk_widget_set_valign ((GtkWidget*) _tmp28_, GTK_ALIGN_CENTER);
	_tmp29_ = self->setup_table;
	_tmp30_ = self->express_toggle;
	gtk_table_attach_defaults (_tmp29_, (GtkWidget*) _tmp30_, (guint) 2, (guint) 3, (guint) 0, (guint) 1);
	_tmp31_ = (GtkImage*) gtk_image_new_from_icon_name ("avatar-default", 0);
	_tmp32_ = g_object_ref_sink (_tmp31_);
	avatar = _tmp32_;
	_tmp33_ = avatar;
	gtk_image_set_pixel_size (_tmp33_, 128);
	_tmp34_ = self->setup_table;
	_tmp35_ = avatar;
	gtk_table_attach_defaults (_tmp34_, (GtkWidget*) _tmp35_, (guint) 0, (guint) 1, (guint) 1, (guint) 3);
	_tmp36_ = avatar;
	gtk_widget_show_all ((GtkWidget*) _tmp36_);
	_tmp37_ = avatar;
	boxes_unattended_installer_fetch_user_avatar (self, _tmp37_, NULL, NULL);
	_tmp38_ = _ ("Username");
	_tmp39_ = (GtkLabel*) gtk_label_new (_tmp38_);
	_tmp40_ = g_object_ref_sink (_tmp39_);
	_g_object_unref0 (label);
	label = _tmp40_;
	_tmp41_ = label;
	gtk_widget_set_halign ((GtkWidget*) _tmp41_, GTK_ALIGN_END);
	_tmp42_ = label;
	gtk_widget_set_valign ((GtkWidget*) _tmp42_, GTK_ALIGN_CENTER);
	_tmp43_ = self->setup_table;
	_tmp44_ = label;
	gtk_table_attach_defaults (_tmp43_, (GtkWidget*) _tmp44_, (guint) 1, (guint) 2, (guint) 1, (guint) 2);
	_tmp45_ = (GtkEntry*) gtk_entry_new ();
	_tmp46_ = g_object_ref_sink (_tmp45_);
	_g_object_unref0 (self->username_entry);
	self->username_entry = _tmp46_;
	_tmp47_ = self->username_entry;
	_tmp48_ = g_get_user_name ();
	gtk_entry_set_text (_tmp47_, _tmp48_);
	_tmp49_ = self->username_entry;
	gtk_widget_set_halign ((GtkWidget*) _tmp49_, GTK_ALIGN_START);
	_tmp50_ = self->username_entry;
	gtk_widget_set_valign ((GtkWidget*) _tmp50_, GTK_ALIGN_CENTER);
	_tmp51_ = self->setup_table;
	_tmp52_ = self->username_entry;
	gtk_table_attach_defaults (_tmp51_, (GtkWidget*) _tmp52_, (guint) 2, (guint) 3, (guint) 1, (guint) 2);
	_tmp53_ = _ ("Password");
	_tmp54_ = (GtkLabel*) gtk_label_new (_tmp53_);
	_tmp55_ = g_object_ref_sink (_tmp54_);
	_g_object_unref0 (label);
	label = _tmp55_;
	_tmp56_ = label;
	gtk_widget_set_halign ((GtkWidget*) _tmp56_, GTK_ALIGN_END);
	_tmp57_ = label;
	gtk_widget_set_valign ((GtkWidget*) _tmp57_, GTK_ALIGN_CENTER);
	_tmp58_ = self->setup_table;
	_tmp59_ = label;
	gtk_table_attach_defaults (_tmp58_, (GtkWidget*) _tmp59_, (guint) 1, (guint) 2, (guint) 2, (guint) 3);
	_tmp60_ = (GtkNotebook*) gtk_notebook_new ();
	_tmp61_ = g_object_ref_sink (_tmp60_);
	_data26_->notebook = _tmp61_;
	_tmp62_ = _data26_->notebook;
	gtk_notebook_set_show_tabs (_tmp62_, FALSE);
	_tmp63_ = _data26_->notebook;
	gtk_notebook_set_show_border (_tmp63_, FALSE);
	_tmp64_ = _data26_->notebook;
	gtk_widget_set_halign ((GtkWidget*) _tmp64_, GTK_ALIGN_START);
	_tmp65_ = _data26_->notebook;
	gtk_widget_set_valign ((GtkWidget*) _tmp65_, GTK_ALIGN_CENTER);
	_tmp66_ = _ ("_Add Password");
	_tmp67_ = (GtkButton*) gtk_button_new_with_mnemonic (_tmp66_);
	_tmp68_ = g_object_ref_sink (_tmp67_);
	button = _tmp68_;
	_tmp69_ = button;
	gtk_widget_set_visible ((GtkWidget*) _tmp69_, TRUE);
	_tmp70_ = _data26_->notebook;
	_tmp71_ = button;
	gtk_notebook_append_page (_tmp70_, (GtkWidget*) _tmp71_, NULL);
	_tmp72_ = (GtkEntry*) gtk_entry_new ();
	_tmp73_ = g_object_ref_sink (_tmp72_);
	_g_object_unref0 (self->password_entry);
	self->password_entry = _tmp73_;
	_tmp74_ = self->password_entry;
	gtk_entry_set_visibility (_tmp74_, FALSE);
	_tmp75_ = self->password_entry;
	gtk_widget_set_visible ((GtkWidget*) _tmp75_, TRUE);
	_tmp76_ = self->password_entry;
	gtk_entry_set_text (_tmp76_, "");
	_tmp77_ = _data26_->notebook;
	_tmp78_ = self->password_entry;
	gtk_notebook_append_page (_tmp77_, (GtkWidget*) _tmp78_, NULL);
	_tmp79_ = button;
	g_signal_connect_data (_tmp79_, "clicked", (GCallback) ___lambda45__gtk_button_clicked, block26_data_ref (_data26_), (GClosureNotify) block26_data_unref, 0);
	_tmp80_ = self->setup_table;
	_tmp81_ = _data26_->notebook;
	gtk_table_attach_defaults (_tmp80_, (GtkWidget*) _tmp81_, (guint) 2, (guint) 3, (guint) 2, (guint) 3);
	_tmp82_ = self->setup_table;
	_tmp83_ = gtk_container_get_children ((GtkContainer*) _tmp82_);
	{
		GList* child_collection = NULL;
		GList* child_it = NULL;
		child_collection = _tmp83_;
		for (child_it = child_collection; child_it != NULL; child_it = child_it->next) {
			GtkWidget* child = NULL;
			child = (GtkWidget*) child_it->data;
			{
				GtkWidget* _tmp84_;
				GtkSwitch* _tmp85_;
				_tmp84_ = child;
				_tmp85_ = self->express_toggle;
				if (_tmp84_ != GTK_WIDGET (_tmp85_)) {
					GtkSwitch* _tmp86_;
					GtkWidget* _tmp87_;
					_tmp86_ = self->express_toggle;
					_tmp87_ = child;
					g_object_bind_property_with_closures ((GObject*) _tmp86_, "active", (GObject*) _tmp87_, "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);
	block26_data_unref (_data26_);
	_data26_ = 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:267: 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_text_file (BoxesUnattendedInstaller* self, const gchar* unattended_src_path, const gchar* unattended_dest_name) {
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	BoxesUnattendedTextFile* _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_text_file_new (self, _tmp0_, _tmp1_);
	self->unattended_files = g_list_append (self->unattended_files, (BoxesUnattendedFile*) _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 ("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:281: 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:283: 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_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = _data_->self->avatar_format;
	_data_->_tmp7_ = boxes_unattended_avatar_file_new (_data_->self, _data_->_tmp5_, _data_->_tmp6_);
	_data_->_tmp8_ = _data_->_tmp7_;
	_g_free0 (_data_->_tmp5_);
	_data_->avatar_file = _data_->_tmp8_;
	{
		_data_->_tmp9_ = boxes_unattended_installer_accounts;
		_data_->_tmp10_ = NULL;
		_data_->_tmp10_ = g_get_user_name ();
		_data_->_state_ = 1;
		boxes_fdo_accounts_FindUserByName (_data_->_tmp9_, _data_->_tmp10_, boxes_unattended_installer_fetch_user_avatar_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp11_ = NULL;
		_data_->_tmp11_ = boxes_fdo_accounts_FindUserByName_finish (_data_->_tmp9_, _data_->_res_, &_data_->_inner_error_);
		_data_->path = _data_->_tmp11_;
		if (_data_->_inner_error_ != NULL) {
			if (_data_->_inner_error_->domain == G_IO_ERROR) {
				goto __catch49_g_io_error;
			}
			_g_object_unref0 (_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_->_tmp12_ = _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_->_tmp12_, "g-interface-name", "org.freedesktop.Accounts.User", NULL);
		return FALSE;
		_state_2:
		_data_->_tmp13_ = NULL;
		_data_->_tmp13_ = g_async_initable_new_finish (_data_->_source_object_, _data_->_res_, &_data_->_inner_error_);
		_data_->user = (BoxesFdoAccountsUser*) _data_->_tmp13_;
		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_object_unref0 (_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_->_tmp14_ = _data_->avatar_file;
		_data_->_tmp15_ = _data_->user;
		_data_->_tmp16_ = boxes_fdo_accounts_user_get_IconFile (_data_->_tmp15_);
		_data_->_tmp17_ = _data_->_tmp16_;
		_data_->_tmp18_ = _data_->_tmp17_;
		boxes_unattended_file_set_src_path ((BoxesUnattendedFile*) _data_->_tmp14_, _data_->_tmp18_);
		_g_free0 (_data_->_tmp18_);
		_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_->_tmp19_ = _data_->username;
		_data_->_tmp20_ = _data_->_error_;
		_data_->_tmp21_ = _data_->_tmp20_->message;
		g_warning ("unattended-installer.vala:312: Failed to retrieve information about us" \
"er '%s': %s", _data_->_tmp19_, _data_->_tmp21_);
		_g_error_free0 (_data_->_error_);
	}
	__finally49:
	if (_data_->_inner_error_ != NULL) {
		_g_object_unref0 (_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_->_tmp22_ = _data_->avatar_file;
	_data_->_tmp23_ = boxes_unattended_file_get_src_path ((BoxesUnattendedFile*) _data_->_tmp22_);
	_data_->_tmp24_ = _data_->_tmp23_;
	_data_->_tmp25_ = NULL;
	_data_->_tmp25_ = g_file_new_for_path (_data_->_tmp24_);
	_data_->file = _data_->_tmp25_;
	_data_->_tmp26_ = _data_->file;
	_data_->_tmp27_ = FALSE;
	_data_->_tmp27_ = g_file_query_exists (_data_->_tmp26_, NULL);
	if (_data_->_tmp27_) {
		_data_->_tmp28_ = _data_->avatar;
		_data_->_tmp29_ = _data_->avatar_file;
		_data_->_tmp30_ = boxes_unattended_file_get_src_path ((BoxesUnattendedFile*) _data_->_tmp29_);
		_data_->_tmp31_ = _data_->_tmp30_;
		g_object_set (_data_->_tmp28_, "file", _data_->_tmp31_, NULL);
		_data_->_tmp32_ = _data_->avatar_file;
		_data_->_tmp33_ = _g_object_ref0 ((BoxesUnattendedFile*) _data_->_tmp32_);
		_data_->self->unattended_files = g_list_append (_data_->self->unattended_files, _data_->_tmp33_);
	}
	_g_object_unref0 (_data_->file);
	_g_object_unref0 (_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_;
	const gchar* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->unattended_files;
	_tmp1_ = _tmp0_->data;
	_tmp2_ = boxes_unattended_file_get_src_path ((BoxesUnattendedFile*) _tmp1_);
	_tmp3_ = _tmp2_;
	result = _tmp3_;
	return result;
}


const gchar* boxes_unattended_installer_get_unattended_dest_name (BoxesUnattendedInstaller* self) {
	const gchar* result;
	GList* _tmp0_;
	gconstpointer _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->unattended_files;
	_tmp1_ = _tmp0_->data;
	_tmp2_ = boxes_unattended_file_get_dest_name ((BoxesUnattendedFile*) _tmp1_);
	_tmp3_ = _tmp2_;
	result = _tmp3_;
	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:84: 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_;
		GRegex* _tmp8_;
		GRegex* _tmp9_;
		_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_;
		_tmp8_ = g_regex_new ("BOXES_HOSTNAME", 0, 0, &_inner_error_);
		_tmp9_ = _tmp8_;
		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_host_regex);
		boxes_unattended_installer_host_regex = _tmp9_;
	}
	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__g_object_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);
	_avatar_format_unref0 (self->avatar_format);
	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;
	}
}


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


void boxes_unattended_file_copy (BoxesUnattendedFile* self, const gchar* hostname, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesUnattendedFileCopyData* _data_;
	BoxesUnattendedFile* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GCancellable* _tmp3_;
	GCancellable* _tmp4_;
	_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_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = hostname;
	_tmp2_ = g_strdup (_tmp1_);
	_data_->hostname = _tmp2_;
	_tmp3_ = cancellable;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_data_->cancellable = _tmp4_;
	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_->hostname;
	_data_->_tmp1_ = _data_->cancellable;
	_data_->_state_ = 1;
	boxes_unattended_file_create (_data_->self, _data_->_tmp0_, _data_->_tmp1_, boxes_unattended_file_copy_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = boxes_unattended_file_create_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
	_data_->unattended_tmp = _data_->_tmp2_;
	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_->_tmp3_ = boxes_unattended_file_get_dest_name (_data_->self);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = boxes_unattended_file_get_installer (_data_->self);
	_data_->_tmp6_ = _data_->_tmp5_;
	_data_->_tmp7_ = _data_->_tmp6_->disk_path;
	g_debug ("unattended-installer.vala:332: Copying unattended file '%s' into disk " \
"drive/image '%s'", _data_->_tmp4_, _data_->_tmp7_);
	_data_->_tmp8_ = g_strdup ("mcopy");
	_data_->_tmp9_ = g_strdup ("-n");
	_data_->_tmp10_ = g_strdup ("-o");
	_data_->_tmp11_ = g_strdup ("-i");
	_data_->_tmp12_ = boxes_unattended_file_get_installer (_data_->self);
	_data_->_tmp13_ = _data_->_tmp12_;
	_data_->_tmp14_ = _data_->_tmp13_->disk_path;
	_data_->_tmp15_ = g_strdup (_data_->_tmp14_);
	_data_->_tmp16_ = _data_->unattended_tmp;
	_data_->_tmp17_ = NULL;
	_data_->_tmp17_ = g_file_get_path (_data_->_tmp16_);
	_data_->_tmp18_ = boxes_unattended_file_get_dest_name (_data_->self);
	_data_->_tmp19_ = _data_->_tmp18_;
	_data_->_tmp20_ = g_strconcat ("::", _data_->_tmp19_, NULL);
	_data_->_tmp21_ = NULL;
	_data_->_tmp21_ = g_new0 (gchar*, 7 + 1);
	_data_->_tmp21_[0] = _data_->_tmp8_;
	_data_->_tmp21_[1] = _data_->_tmp9_;
	_data_->_tmp21_[2] = _data_->_tmp10_;
	_data_->_tmp21_[3] = _data_->_tmp11_;
	_data_->_tmp21_[4] = _data_->_tmp15_;
	_data_->_tmp21_[5] = _data_->_tmp17_;
	_data_->_tmp21_[6] = _data_->_tmp20_;
	_data_->argv = _data_->_tmp21_;
	_data_->argv_length1 = 7;
	_data_->_argv_size_ = _data_->argv_length1;
	_data_->_tmp22_ = _data_->argv;
	_data_->_tmp22__length1 = _data_->argv_length1;
	_data_->_tmp23_ = _data_->cancellable;
	_data_->_state_ = 2;
	boxes_exec (_data_->_tmp22_, _data_->_tmp22__length1, _data_->_tmp23_, 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_->_tmp24_ = boxes_unattended_file_get_dest_name (_data_->self);
	_data_->_tmp25_ = _data_->_tmp24_;
	_data_->_tmp26_ = boxes_unattended_file_get_installer (_data_->self);
	_data_->_tmp27_ = _data_->_tmp26_;
	_data_->_tmp28_ = _data_->_tmp27_->disk_path;
	g_debug ("unattended-installer.vala:338: Copied unattended file '%s' into disk d" \
"rive/image '%s'", _data_->_tmp25_, _data_->_tmp28_);
	_data_->_tmp29_ = _data_->unattended_tmp;
	_data_->_tmp30_ = NULL;
	_data_->_tmp30_ = g_file_get_path (_data_->_tmp29_);
	_data_->_tmp31_ = _data_->_tmp30_;
	g_debug ("unattended-installer.vala:340: Deleting temporary file '%s'", _data_->_tmp31_);
	_g_free0 (_data_->_tmp31_);
	_data_->_tmp32_ = _data_->unattended_tmp;
	_data_->_tmp33_ = _data_->cancellable;
	g_file_delete (_data_->_tmp32_, _data_->_tmp33_, &_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_->_tmp34_ = _data_->unattended_tmp;
	_data_->_tmp35_ = NULL;
	_data_->_tmp35_ = g_file_get_path (_data_->_tmp34_);
	_data_->_tmp36_ = _data_->_tmp35_;
	g_debug ("unattended-installer.vala:342: Deleted temporary file '%s'", _data_->_tmp36_);
	_g_free0 (_data_->_tmp36_);
	_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;
}


void boxes_unattended_file_create (BoxesUnattendedFile* self, const gchar* hostname, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BOXES_UNATTENDED_FILE_GET_INTERFACE (self)->create (self, hostname, cancellable, _callback_, _user_data_);
}


GFile* boxes_unattended_file_create_finish (BoxesUnattendedFile* self, GAsyncResult* _res_, GError** error) {
	return BOXES_UNATTENDED_FILE_GET_INTERFACE (self)->create_finish (self, _res_, error);
}


const gchar* boxes_unattended_file_get_src_path (BoxesUnattendedFile* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return BOXES_UNATTENDED_FILE_GET_INTERFACE (self)->get_src_path (self);
}


void boxes_unattended_file_set_src_path (BoxesUnattendedFile* self, const gchar* value) {
	g_return_if_fail (self != NULL);
	BOXES_UNATTENDED_FILE_GET_INTERFACE (self)->set_src_path (self, value);
}


const gchar* boxes_unattended_file_get_dest_name (BoxesUnattendedFile* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return BOXES_UNATTENDED_FILE_GET_INTERFACE (self)->get_dest_name (self);
}


void boxes_unattended_file_set_dest_name (BoxesUnattendedFile* self, const gchar* value) {
	g_return_if_fail (self != NULL);
	BOXES_UNATTENDED_FILE_GET_INTERFACE (self)->set_dest_name (self, value);
}


BoxesUnattendedInstaller* boxes_unattended_file_get_installer (BoxesUnattendedFile* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return BOXES_UNATTENDED_FILE_GET_INTERFACE (self)->get_installer (self);
}


void boxes_unattended_file_set_installer (BoxesUnattendedFile* self, BoxesUnattendedInstaller* value) {
	g_return_if_fail (self != NULL);
	BOXES_UNATTENDED_FILE_GET_INTERFACE (self)->set_installer (self, value);
}


static void boxes_unattended_file_base_init (BoxesUnattendedFileIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
		g_object_interface_install_property (iface, g_param_spec_string ("src-path", "src-path", "src-path", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
		g_object_interface_install_property (iface, g_param_spec_string ("dest-name", "dest-name", "dest-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
		g_object_interface_install_property (iface, g_param_spec_object ("installer", "installer", "installer", BOXES_TYPE_UNATTENDED_INSTALLER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	}
}


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 GTypeInfo g_define_type_info = { sizeof (BoxesUnattendedFileIface), (GBaseInitFunc) boxes_unattended_file_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType boxes_unattended_file_type_id;
		boxes_unattended_file_type_id = g_type_register_static (G_TYPE_INTERFACE, "BoxesUnattendedFile", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (boxes_unattended_file_type_id, G_TYPE_OBJECT);
		g_once_init_leave (&boxes_unattended_file_type_id__volatile, boxes_unattended_file_type_id);
	}
	return boxes_unattended_file_type_id__volatile;
}


BoxesUnattendedTextFile* boxes_unattended_text_file_construct (GType object_type, BoxesUnattendedInstaller* installer, const gchar* src_path, const gchar* dest_name) {
	BoxesUnattendedTextFile * self = NULL;
	BoxesUnattendedInstaller* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	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 = (BoxesUnattendedTextFile*) g_object_new (object_type, NULL);
	_tmp0_ = installer;
	boxes_unattended_file_set_installer ((BoxesUnattendedFile*) self, _tmp0_);
	_tmp1_ = src_path;
	boxes_unattended_file_set_src_path ((BoxesUnattendedFile*) self, _tmp1_);
	_tmp2_ = dest_name;
	boxes_unattended_file_set_dest_name ((BoxesUnattendedFile*) self, _tmp2_);
	return self;
}


BoxesUnattendedTextFile* boxes_unattended_text_file_new (BoxesUnattendedInstaller* installer, const gchar* src_path, const gchar* dest_name) {
	return boxes_unattended_text_file_construct (BOXES_TYPE_UNATTENDED_TEXT_FILE, installer, src_path, dest_name);
}


static void boxes_unattended_text_file_real_create_data_free (gpointer _data) {
	BoxesUnattendedTextFileCreateData* _data_;
	_data_ = _data;
	_g_free0 (_data_->hostname);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesUnattendedTextFileCreateData, _data_);
}


static void boxes_unattended_text_file_real_create (BoxesUnattendedFile* base, const gchar* hostname, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesUnattendedTextFile * self;
	BoxesUnattendedTextFileCreateData* _data_;
	BoxesUnattendedTextFile* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GCancellable* _tmp3_;
	GCancellable* _tmp4_;
	self = (BoxesUnattendedTextFile*) base;
	_data_ = g_slice_new0 (BoxesUnattendedTextFileCreateData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_unattended_text_file_real_create);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_unattended_text_file_real_create_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = hostname;
	_tmp2_ = g_strdup (_tmp1_);
	_data_->hostname = _tmp2_;
	_tmp3_ = cancellable;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_data_->cancellable = _tmp4_;
	boxes_unattended_text_file_real_create_co (_data_);
}


static GFile* boxes_unattended_text_file_real_create_finish (BoxesUnattendedFile* base, GAsyncResult* _res_, GError** error) {
	GFile* result;
	BoxesUnattendedTextFileCreateData* _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_text_file_create_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesUnattendedTextFileCreateData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_unattended_text_file_real_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_text_file_real_create_co (BoxesUnattendedTextFileCreateData* _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_ = boxes_unattended_file_get_src_path ((BoxesUnattendedFile*) _data_->self);
	_data_->_tmp1_ = _data_->_tmp0_;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = g_file_new_for_path (_data_->_tmp1_);
	_data_->source = _data_->_tmp2_;
	_data_->_tmp3_ = boxes_unattended_file_get_dest_name ((BoxesUnattendedFile*) _data_->self);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = boxes_get_user_unattended (_data_->_tmp4_);
	_data_->destination_path = _data_->_tmp5_;
	_data_->_tmp6_ = _data_->destination_path;
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = g_file_new_for_path (_data_->_tmp6_);
	_data_->destination = _data_->_tmp7_;
	_data_->_tmp8_ = _data_->destination;
	_data_->_tmp9_ = NULL;
	_data_->_tmp9_ = g_file_get_path (_data_->_tmp8_);
	_data_->_tmp10_ = _data_->_tmp9_;
	g_debug ("unattended-installer.vala:365: Creating unattended file at '%s'..", _data_->_tmp10_);
	_g_free0 (_data_->_tmp10_);
	_data_->_tmp11_ = _data_->source;
	_data_->_tmp12_ = _data_->cancellable;
	_data_->_state_ = 1;
	g_file_read_async (_data_->_tmp11_, G_PRIORITY_DEFAULT, _data_->_tmp12_, boxes_unattended_text_file_create_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp13_ = NULL;
	_data_->_tmp13_ = g_file_read_finish (_data_->_tmp11_, _data_->_res_, &_data_->_inner_error_);
	_data_->input_stream = _data_->_tmp13_;
	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_->_tmp14_ = _data_->destination;
	_data_->_tmp15_ = _data_->cancellable;
	_data_->_state_ = 2;
	g_file_replace_async (_data_->_tmp14_, NULL, FALSE, G_FILE_CREATE_REPLACE_DESTINATION, G_PRIORITY_DEFAULT, _data_->_tmp15_, boxes_unattended_text_file_create_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp16_ = NULL;
	_data_->_tmp16_ = g_file_replace_finish (_data_->_tmp14_, _data_->_res_, &_data_->_inner_error_);
	_data_->output_stream = _data_->_tmp16_;
	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_->_tmp17_ = _data_->input_stream;
	_data_->_tmp18_ = g_data_input_stream_new ((GInputStream*) _data_->_tmp17_);
	_data_->data_stream = _data_->_tmp18_;
	_data_->_tmp19_ = _data_->data_stream;
	g_data_input_stream_set_newline_type (_data_->_tmp19_, G_DATA_STREAM_NEWLINE_TYPE_ANY);
	while (TRUE) {
		_data_->_tmp20_ = _data_->data_stream;
		_data_->_tmp21_ = _data_->cancellable;
		_data_->_state_ = 3;
		g_data_input_stream_read_line_async (_data_->_tmp20_, G_PRIORITY_DEFAULT, _data_->_tmp21_, boxes_unattended_text_file_create_ready, _data_);
		return FALSE;
		_state_3:
		_data_->_tmp22_ = NULL;
		_data_->_tmp22_ = g_data_input_stream_read_line_finish (_data_->_tmp20_, _data_->_res_, NULL, &_data_->_inner_error_);
		_data_->_tmp23_ = _data_->_tmp22_;
		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_->_tmp23_;
		_data_->_tmp24_ = _data_->str;
		if (!(_data_->_tmp24_ != NULL)) {
			break;
		}
		_data_->_tmp25_ = boxes_unattended_file_get_installer ((BoxesUnattendedFile*) _data_->self);
		_data_->_tmp26_ = _data_->_tmp25_;
		_data_->_tmp27_ = _data_->str;
		_data_->_tmp28_ = _data_->hostname;
		_data_->_tmp29_ = NULL;
		_data_->_tmp29_ = boxes_unattended_installer_fill_unattended_data (_data_->_tmp26_, _data_->_tmp27_, _data_->_tmp28_, &_data_->_inner_error_);
		_data_->_tmp30_ = _data_->_tmp29_;
		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_->_tmp30_;
		_data_->_tmp32_ = boxes_unattended_file_get_installer ((BoxesUnattendedFile*) _data_->self);
		_data_->_tmp33_ = _data_->_tmp32_;
		_data_->_tmp34_ = _data_->_tmp33_->newline_type;
		if (_data_->_tmp34_ == G_DATA_STREAM_NEWLINE_TYPE_LF) {
			_data_->_tmp31_ = "\n";
		} else {
			_data_->_tmp31_ = "\r\n";
		}
		_data_->_tmp35_ = _data_->str;
		_data_->_tmp36_ = _data_->_tmp31_;
		_data_->_tmp37_ = g_strconcat (_data_->_tmp35_, _data_->_tmp36_, NULL);
		_g_free0 (_data_->str);
		_data_->str = _data_->_tmp37_;
		_data_->_tmp38_ = _data_->output_stream;
		_data_->_tmp39_ = _data_->str;
		_data_->_tmp40_ = string_get_data (_data_->_tmp39_, &_data_->_tmp40__length1);
		_data_->_tmp41_ = _data_->_tmp40_;
		_data_->_tmp41__length1 = _data_->_tmp40__length1;
		_data_->_tmp42_ = _data_->cancellable;
		_data_->_state_ = 4;
		g_output_stream_write_async ((GOutputStream*) _data_->_tmp38_, _data_->_tmp41_, (gsize) _data_->_tmp41__length1, G_PRIORITY_DEFAULT, _data_->_tmp42_, boxes_unattended_text_file_create_ready, _data_);
		return FALSE;
		_state_4:
		g_output_stream_write_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_->_tmp43_ = _data_->output_stream;
	_data_->_tmp44_ = _data_->cancellable;
	_data_->_state_ = 5;
	g_output_stream_close_async ((GOutputStream*) _data_->_tmp43_, G_PRIORITY_DEFAULT, _data_->_tmp44_, boxes_unattended_text_file_create_ready, _data_);
	return FALSE;
	_state_5:
	g_output_stream_close_finish ((GOutputStream*) _data_->_tmp43_, _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_->_tmp45_ = _data_->destination;
	_data_->_tmp46_ = NULL;
	_data_->_tmp46_ = g_file_get_path (_data_->_tmp45_);
	_data_->_tmp47_ = _data_->_tmp46_;
	g_debug ("unattended-installer.vala:383: Created unattended file at '%s'..", _data_->_tmp47_);
	_g_free0 (_data_->_tmp47_);
	_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 const gchar* boxes_unattended_text_file_real_get_src_path (BoxesUnattendedFile* base) {
	const gchar* result;
	BoxesUnattendedTextFile* self;
	const gchar* _tmp0_;
	self = (BoxesUnattendedTextFile*) base;
	_tmp0_ = self->priv->_src_path;
	result = _tmp0_;
	return result;
}


static void boxes_unattended_text_file_real_set_src_path (BoxesUnattendedFile* base, const gchar* value) {
	BoxesUnattendedTextFile* self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	self = (BoxesUnattendedTextFile*) base;
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_src_path);
	self->priv->_src_path = _tmp1_;
	g_object_notify ((GObject *) self, "src-path");
}


static const gchar* boxes_unattended_text_file_real_get_dest_name (BoxesUnattendedFile* base) {
	const gchar* result;
	BoxesUnattendedTextFile* self;
	const gchar* _tmp0_;
	self = (BoxesUnattendedTextFile*) base;
	_tmp0_ = self->priv->_dest_name;
	result = _tmp0_;
	return result;
}


static void boxes_unattended_text_file_real_set_dest_name (BoxesUnattendedFile* base, const gchar* value) {
	BoxesUnattendedTextFile* self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	self = (BoxesUnattendedTextFile*) base;
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_dest_name);
	self->priv->_dest_name = _tmp1_;
	g_object_notify ((GObject *) self, "dest-name");
}


static BoxesUnattendedInstaller* boxes_unattended_text_file_real_get_installer (BoxesUnattendedFile* base) {
	BoxesUnattendedInstaller* result;
	BoxesUnattendedTextFile* self;
	BoxesUnattendedInstaller* _tmp0_;
	self = (BoxesUnattendedTextFile*) base;
	_tmp0_ = self->priv->_installer;
	result = _tmp0_;
	return result;
}


static void boxes_unattended_text_file_real_set_installer (BoxesUnattendedFile* base, BoxesUnattendedInstaller* value) {
	BoxesUnattendedTextFile* self;
	BoxesUnattendedInstaller* _tmp0_;
	BoxesUnattendedInstaller* _tmp1_;
	self = (BoxesUnattendedTextFile*) base;
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_installer);
	self->priv->_installer = _tmp1_;
	g_object_notify ((GObject *) self, "installer");
}


static void boxes_unattended_text_file_class_init (BoxesUnattendedTextFileClass * klass) {
	boxes_unattended_text_file_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BoxesUnattendedTextFilePrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_unattended_text_file_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_unattended_text_file_set_property;
	G_OBJECT_CLASS (klass)->finalize = boxes_unattended_text_file_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_UNATTENDED_TEXT_FILE_SRC_PATH, g_param_spec_string ("src-path", "src-path", "src-path", NULL, 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_TEXT_FILE_DEST_NAME, g_param_spec_string ("dest-name", "dest-name", "dest-name", NULL, 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_TEXT_FILE_INSTALLER, g_param_spec_object ("installer", "installer", "installer", BOXES_TYPE_UNATTENDED_INSTALLER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void boxes_unattended_text_file_boxes_unattended_file_interface_init (BoxesUnattendedFileIface * iface) {
	boxes_unattended_text_file_boxes_unattended_file_parent_iface = g_type_interface_peek_parent (iface);
	iface->create = (GFile* (*)(BoxesUnattendedFile*, const gchar*, GCancellable*, GError**)) boxes_unattended_text_file_real_create;
	iface->create_finish = boxes_unattended_text_file_real_create_finish;
	iface->get_src_path = boxes_unattended_text_file_real_get_src_path;
	iface->set_src_path = boxes_unattended_text_file_real_set_src_path;
	iface->get_dest_name = boxes_unattended_text_file_real_get_dest_name;
	iface->set_dest_name = boxes_unattended_text_file_real_set_dest_name;
	iface->get_installer = boxes_unattended_text_file_real_get_installer;
	iface->set_installer = boxes_unattended_text_file_real_set_installer;
}


static void boxes_unattended_text_file_instance_init (BoxesUnattendedTextFile * self) {
	self->priv = BOXES_UNATTENDED_TEXT_FILE_GET_PRIVATE (self);
}


static void boxes_unattended_text_file_finalize (GObject* obj) {
	BoxesUnattendedTextFile * self;
	self = BOXES_UNATTENDED_TEXT_FILE (obj);
	_g_free0 (self->priv->_src_path);
	_g_free0 (self->priv->_dest_name);
	_g_object_unref0 (self->priv->_installer);
	G_OBJECT_CLASS (boxes_unattended_text_file_parent_class)->finalize (obj);
}


GType boxes_unattended_text_file_get_type (void) {
	static volatile gsize boxes_unattended_text_file_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_unattended_text_file_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesUnattendedTextFileClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_unattended_text_file_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesUnattendedTextFile), 0, (GInstanceInitFunc) boxes_unattended_text_file_instance_init, NULL };
		static const GInterfaceInfo boxes_unattended_file_info = { (GInterfaceInitFunc) boxes_unattended_text_file_boxes_unattended_file_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType boxes_unattended_text_file_type_id;
		boxes_unattended_text_file_type_id = g_type_register_static (G_TYPE_OBJECT, "BoxesUnattendedTextFile", &g_define_type_info, 0);
		g_type_add_interface_static (boxes_unattended_text_file_type_id, BOXES_TYPE_UNATTENDED_FILE, &boxes_unattended_file_info);
		g_once_init_leave (&boxes_unattended_text_file_type_id__volatile, boxes_unattended_text_file_type_id);
	}
	return boxes_unattended_text_file_type_id__volatile;
}


static void _vala_boxes_unattended_text_file_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesUnattendedTextFile * self;
	self = BOXES_UNATTENDED_TEXT_FILE (object);
	switch (property_id) {
		case BOXES_UNATTENDED_TEXT_FILE_SRC_PATH:
		g_value_set_string (value, boxes_unattended_file_get_src_path ((BoxesUnattendedFile*) self));
		break;
		case BOXES_UNATTENDED_TEXT_FILE_DEST_NAME:
		g_value_set_string (value, boxes_unattended_file_get_dest_name ((BoxesUnattendedFile*) self));
		break;
		case BOXES_UNATTENDED_TEXT_FILE_INSTALLER:
		g_value_set_object (value, boxes_unattended_file_get_installer ((BoxesUnattendedFile*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_boxes_unattended_text_file_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesUnattendedTextFile * self;
	self = BOXES_UNATTENDED_TEXT_FILE (object);
	switch (property_id) {
		case BOXES_UNATTENDED_TEXT_FILE_SRC_PATH:
		boxes_unattended_file_set_src_path ((BoxesUnattendedFile*) self, g_value_get_string (value));
		break;
		case BOXES_UNATTENDED_TEXT_FILE_DEST_NAME:
		boxes_unattended_file_set_dest_name ((BoxesUnattendedFile*) self, g_value_get_string (value));
		break;
		case BOXES_UNATTENDED_TEXT_FILE_INSTALLER:
		boxes_unattended_file_set_installer ((BoxesUnattendedFile*) self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


BoxesUnattendedAvatarFile* boxes_unattended_avatar_file_construct (GType object_type, BoxesUnattendedInstaller* installer, const gchar* src_path, AvatarFormat* dest_format) {
	BoxesUnattendedAvatarFile * self = NULL;
	BoxesUnattendedInstaller* _tmp0_;
	const gchar* _tmp1_;
	AvatarFormat* _tmp2_;
	AvatarFormat* _tmp3_;
	g_return_val_if_fail (installer != NULL, NULL);
	g_return_val_if_fail (src_path != NULL, NULL);
	g_return_val_if_fail (dest_format != NULL, NULL);
	self = (BoxesUnattendedAvatarFile*) g_object_new (object_type, NULL);
	_tmp0_ = installer;
	boxes_unattended_file_set_installer ((BoxesUnattendedFile*) self, _tmp0_);
	_tmp1_ = src_path;
	boxes_unattended_file_set_src_path ((BoxesUnattendedFile*) self, _tmp1_);
	_tmp2_ = dest_format;
	_tmp3_ = _avatar_format_ref0 (_tmp2_);
	_avatar_format_unref0 (self->priv->dest_format);
	self->priv->dest_format = _tmp3_;
	return self;
}


BoxesUnattendedAvatarFile* boxes_unattended_avatar_file_new (BoxesUnattendedInstaller* installer, const gchar* src_path, AvatarFormat* dest_format) {
	return boxes_unattended_avatar_file_construct (BOXES_TYPE_UNATTENDED_AVATAR_FILE, installer, src_path, dest_format);
}


static void boxes_unattended_avatar_file_real_create_data_free (gpointer _data) {
	BoxesUnattendedAvatarFileCreateData* _data_;
	_data_ = _data;
	_g_free0 (_data_->hostname);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesUnattendedAvatarFileCreateData, _data_);
}


static void boxes_unattended_avatar_file_real_create (BoxesUnattendedFile* base, const gchar* hostname, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesUnattendedAvatarFile * self;
	BoxesUnattendedAvatarFileCreateData* _data_;
	BoxesUnattendedAvatarFile* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GCancellable* _tmp3_;
	GCancellable* _tmp4_;
	self = (BoxesUnattendedAvatarFile*) base;
	_data_ = g_slice_new0 (BoxesUnattendedAvatarFileCreateData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_unattended_avatar_file_real_create);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_unattended_avatar_file_real_create_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = hostname;
	_tmp2_ = g_strdup (_tmp1_);
	_data_->hostname = _tmp2_;
	_tmp3_ = cancellable;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_data_->cancellable = _tmp4_;
	boxes_unattended_avatar_file_real_create_co (_data_);
}


static GFile* boxes_unattended_avatar_file_real_create_finish (BoxesUnattendedFile* base, GAsyncResult* _res_, GError** error) {
	GFile* result;
	BoxesUnattendedAvatarFileCreateData* _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 gboolean boxes_unattended_avatar_file_real_create_co (BoxesUnattendedAvatarFileCreateData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = boxes_unattended_file_get_installer ((BoxesUnattendedFile*) _data_->self);
	_data_->_tmp1_ = _data_->_tmp0_;
	_data_->_tmp2_ = boxes_unattended_installer_get_username (_data_->_tmp1_);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = _data_->self->priv->dest_format;
	_data_->_tmp5_ = _data_->_tmp4_->extension;
	_data_->_tmp6_ = g_strconcat (_data_->_tmp3_, _data_->_tmp5_, NULL);
	_data_->_tmp7_ = _data_->_tmp6_;
	boxes_unattended_file_set_dest_name ((BoxesUnattendedFile*) _data_->self, _data_->_tmp7_);
	_g_free0 (_data_->_tmp7_);
	_data_->_tmp8_ = boxes_unattended_file_get_dest_name ((BoxesUnattendedFile*) _data_->self);
	_data_->_tmp9_ = _data_->_tmp8_;
	_data_->_tmp10_ = NULL;
	_data_->_tmp10_ = boxes_get_user_unattended (_data_->_tmp9_);
	_data_->destination_path = _data_->_tmp10_;
	{
		_data_->_tmp11_ = boxes_unattended_file_get_src_path ((BoxesUnattendedFile*) _data_->self);
		_data_->_tmp12_ = _data_->_tmp11_;
		_data_->_tmp13_ = _data_->self->priv->dest_format;
		_data_->_tmp14_ = _data_->_tmp13_->width;
		_data_->_tmp15_ = _data_->self->priv->dest_format;
		_data_->_tmp16_ = _data_->_tmp15_->height;
		_data_->_tmp17_ = gdk_pixbuf_new_from_file_at_scale (_data_->_tmp12_, _data_->_tmp14_, _data_->_tmp16_, TRUE, &_data_->_inner_error_);
		_data_->pixbuf = _data_->_tmp17_;
		if (_data_->_inner_error_ != NULL) {
			goto __catch52_g_error;
		}
		_data_->_tmp19_ = _data_->self->priv->dest_format;
		_data_->_tmp20_ = _data_->_tmp19_->alpha;
		if (!_data_->_tmp20_) {
			_data_->_tmp21_ = _data_->pixbuf;
			_data_->_tmp22_ = FALSE;
			_data_->_tmp22_ = gdk_pixbuf_get_has_alpha (_data_->_tmp21_);
			_data_->_tmp18_ = _data_->_tmp22_;
		} else {
			_data_->_tmp18_ = FALSE;
		}
		_data_->_tmp23_ = _data_->_tmp18_;
		if (_data_->_tmp23_) {
			_data_->_tmp24_ = _data_->pixbuf;
			_data_->_tmp25_ = NULL;
			_data_->_tmp25_ = boxes_remove_alpha (_data_->_tmp24_);
			_g_object_unref0 (_data_->pixbuf);
			_data_->pixbuf = _data_->_tmp25_;
		}
		_data_->_tmp26_ = _data_->destination_path;
		g_debug ("unattended-installer.vala:414: Saving user avatar file at '%s'..", _data_->_tmp26_);
		_data_->_tmp27_ = _data_->pixbuf;
		_data_->_tmp28_ = _data_->destination_path;
		_data_->_tmp29_ = _data_->self->priv->dest_format;
		_data_->_tmp30_ = _data_->_tmp29_->type;
		gdk_pixbuf_save (_data_->_tmp27_, _data_->_tmp28_, _data_->_tmp30_, &_data_->_inner_error_, NULL);
		if (_data_->_inner_error_ != NULL) {
			_g_object_unref0 (_data_->pixbuf);
			goto __catch52_g_error;
		}
		_data_->_tmp31_ = _data_->destination_path;
		g_debug ("unattended-installer.vala:416: Saved user avatar file at '%s'.", _data_->_tmp31_);
		_g_object_unref0 (_data_->pixbuf);
	}
	goto __finally52;
	__catch52_g_error:
	{
		_data_->_error_ = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp32_ = _data_->_error_;
		_data_->_tmp33_ = _data_->_tmp32_->message;
		g_warning ("unattended-installer.vala:418: Failed to save user avatar: %s.", _data_->_tmp33_);
		_g_error_free0 (_data_->_error_);
	}
	__finally52:
	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_->destination_path);
		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_->_tmp34_ = _data_->destination_path;
	_data_->_tmp35_ = NULL;
	_data_->_tmp35_ = g_file_new_for_path (_data_->_tmp34_);
	_data_->result = _data_->_tmp35_;
	_g_free0 (_data_->destination_path);
	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_->destination_path);
	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 const gchar* boxes_unattended_avatar_file_real_get_src_path (BoxesUnattendedFile* base) {
	const gchar* result;
	BoxesUnattendedAvatarFile* self;
	const gchar* _tmp0_;
	self = (BoxesUnattendedAvatarFile*) base;
	_tmp0_ = self->priv->_src_path;
	result = _tmp0_;
	return result;
}


static void boxes_unattended_avatar_file_real_set_src_path (BoxesUnattendedFile* base, const gchar* value) {
	BoxesUnattendedAvatarFile* self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	self = (BoxesUnattendedAvatarFile*) base;
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_src_path);
	self->priv->_src_path = _tmp1_;
	g_object_notify ((GObject *) self, "src-path");
}


static const gchar* boxes_unattended_avatar_file_real_get_dest_name (BoxesUnattendedFile* base) {
	const gchar* result;
	BoxesUnattendedAvatarFile* self;
	const gchar* _tmp0_;
	self = (BoxesUnattendedAvatarFile*) base;
	_tmp0_ = self->priv->_dest_name;
	result = _tmp0_;
	return result;
}


static void boxes_unattended_avatar_file_real_set_dest_name (BoxesUnattendedFile* base, const gchar* value) {
	BoxesUnattendedAvatarFile* self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	self = (BoxesUnattendedAvatarFile*) base;
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_dest_name);
	self->priv->_dest_name = _tmp1_;
	g_object_notify ((GObject *) self, "dest-name");
}


static BoxesUnattendedInstaller* boxes_unattended_avatar_file_real_get_installer (BoxesUnattendedFile* base) {
	BoxesUnattendedInstaller* result;
	BoxesUnattendedAvatarFile* self;
	BoxesUnattendedInstaller* _tmp0_;
	self = (BoxesUnattendedAvatarFile*) base;
	_tmp0_ = self->priv->_installer;
	result = _tmp0_;
	return result;
}


static void boxes_unattended_avatar_file_real_set_installer (BoxesUnattendedFile* base, BoxesUnattendedInstaller* value) {
	BoxesUnattendedAvatarFile* self;
	BoxesUnattendedInstaller* _tmp0_;
	BoxesUnattendedInstaller* _tmp1_;
	self = (BoxesUnattendedAvatarFile*) base;
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_installer);
	self->priv->_installer = _tmp1_;
	g_object_notify ((GObject *) self, "installer");
}


static void boxes_unattended_avatar_file_class_init (BoxesUnattendedAvatarFileClass * klass) {
	boxes_unattended_avatar_file_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BoxesUnattendedAvatarFilePrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_unattended_avatar_file_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_unattended_avatar_file_set_property;
	G_OBJECT_CLASS (klass)->finalize = boxes_unattended_avatar_file_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_UNATTENDED_AVATAR_FILE_SRC_PATH, g_param_spec_string ("src-path", "src-path", "src-path", NULL, 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_AVATAR_FILE_DEST_NAME, g_param_spec_string ("dest-name", "dest-name", "dest-name", NULL, 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_AVATAR_FILE_INSTALLER, g_param_spec_object ("installer", "installer", "installer", BOXES_TYPE_UNATTENDED_INSTALLER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void boxes_unattended_avatar_file_boxes_unattended_file_interface_init (BoxesUnattendedFileIface * iface) {
	boxes_unattended_avatar_file_boxes_unattended_file_parent_iface = g_type_interface_peek_parent (iface);
	iface->create = (GFile* (*)(BoxesUnattendedFile*, const gchar*, GCancellable*, GError**)) boxes_unattended_avatar_file_real_create;
	iface->create_finish = boxes_unattended_avatar_file_real_create_finish;
	iface->get_src_path = boxes_unattended_avatar_file_real_get_src_path;
	iface->set_src_path = boxes_unattended_avatar_file_real_set_src_path;
	iface->get_dest_name = boxes_unattended_avatar_file_real_get_dest_name;
	iface->set_dest_name = boxes_unattended_avatar_file_real_set_dest_name;
	iface->get_installer = boxes_unattended_avatar_file_real_get_installer;
	iface->set_installer = boxes_unattended_avatar_file_real_set_installer;
}


static void boxes_unattended_avatar_file_instance_init (BoxesUnattendedAvatarFile * self) {
	self->priv = BOXES_UNATTENDED_AVATAR_FILE_GET_PRIVATE (self);
}


static void boxes_unattended_avatar_file_finalize (GObject* obj) {
	BoxesUnattendedAvatarFile * self;
	self = BOXES_UNATTENDED_AVATAR_FILE (obj);
	_g_free0 (self->priv->_src_path);
	_g_free0 (self->priv->_dest_name);
	_g_object_unref0 (self->priv->_installer);
	_avatar_format_unref0 (self->priv->dest_format);
	G_OBJECT_CLASS (boxes_unattended_avatar_file_parent_class)->finalize (obj);
}


GType boxes_unattended_avatar_file_get_type (void) {
	static volatile gsize boxes_unattended_avatar_file_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_unattended_avatar_file_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesUnattendedAvatarFileClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_unattended_avatar_file_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesUnattendedAvatarFile), 0, (GInstanceInitFunc) boxes_unattended_avatar_file_instance_init, NULL };
		static const GInterfaceInfo boxes_unattended_file_info = { (GInterfaceInitFunc) boxes_unattended_avatar_file_boxes_unattended_file_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType boxes_unattended_avatar_file_type_id;
		boxes_unattended_avatar_file_type_id = g_type_register_static (G_TYPE_OBJECT, "BoxesUnattendedAvatarFile", &g_define_type_info, 0);
		g_type_add_interface_static (boxes_unattended_avatar_file_type_id, BOXES_TYPE_UNATTENDED_FILE, &boxes_unattended_file_info);
		g_once_init_leave (&boxes_unattended_avatar_file_type_id__volatile, boxes_unattended_avatar_file_type_id);
	}
	return boxes_unattended_avatar_file_type_id__volatile;
}


static void _vala_boxes_unattended_avatar_file_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesUnattendedAvatarFile * self;
	self = BOXES_UNATTENDED_AVATAR_FILE (object);
	switch (property_id) {
		case BOXES_UNATTENDED_AVATAR_FILE_SRC_PATH:
		g_value_set_string (value, boxes_unattended_file_get_src_path ((BoxesUnattendedFile*) self));
		break;
		case BOXES_UNATTENDED_AVATAR_FILE_DEST_NAME:
		g_value_set_string (value, boxes_unattended_file_get_dest_name ((BoxesUnattendedFile*) self));
		break;
		case BOXES_UNATTENDED_AVATAR_FILE_INSTALLER:
		g_value_set_object (value, boxes_unattended_file_get_installer ((BoxesUnattendedFile*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_boxes_unattended_avatar_file_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesUnattendedAvatarFile * self;
	self = BOXES_UNATTENDED_AVATAR_FILE (object);
	switch (property_id) {
		case BOXES_UNATTENDED_AVATAR_FILE_SRC_PATH:
		boxes_unattended_file_set_src_path ((BoxesUnattendedFile*) self, g_value_get_string (value));
		break;
		case BOXES_UNATTENDED_AVATAR_FILE_DEST_NAME:
		boxes_unattended_file_set_dest_name ((BoxesUnattendedFile*) self, g_value_get_string (value));
		break;
		case BOXES_UNATTENDED_AVATAR_FILE_INSTALLER:
		boxes_unattended_file_set_installer ((BoxesUnattendedFile*) self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


AvatarFormat* avatar_format_construct (GType object_type, const gchar* type, const gchar* extension, gboolean alpha, gint width, gint height) {
	AvatarFormat* self = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	g_return_val_if_fail (type != NULL, NULL);
	g_return_val_if_fail (extension != NULL, NULL);
	self = (AvatarFormat*) g_type_create_instance (object_type);
	_tmp0_ = type;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->type);
	self->type = _tmp1_;
	_tmp2_ = extension;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (self->extension);
	self->extension = _tmp3_;
	_tmp4_ = alpha;
	self->alpha = _tmp4_;
	_tmp5_ = width;
	self->width = _tmp5_;
	_tmp6_ = height;
	self->height = _tmp6_;
	return self;
}


AvatarFormat* avatar_format_new (const gchar* type, const gchar* extension, gboolean alpha, gint width, gint height) {
	return avatar_format_construct (TYPE_AVATAR_FORMAT, type, extension, alpha, width, height);
}


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


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


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


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


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


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


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


void value_set_avatar_format (GValue* value, gpointer v_object) {
	AvatarFormat* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_AVATAR_FORMAT));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_AVATAR_FORMAT));
		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;
		avatar_format_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		avatar_format_unref (old);
	}
}


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


static void avatar_format_class_init (AvatarFormatClass * klass) {
	avatar_format_parent_class = g_type_class_peek_parent (klass);
	AVATAR_FORMAT_CLASS (klass)->finalize = avatar_format_finalize;
}


static void avatar_format_instance_init (AvatarFormat * self) {
	self->ref_count = 1;
}


static void avatar_format_finalize (AvatarFormat* obj) {
	AvatarFormat * self;
	self = AVATAR_FORMAT (obj);
	_g_free0 (self->type);
	_g_free0 (self->extension);
}


GType avatar_format_get_type (void) {
	static volatile gsize avatar_format_type_id__volatile = 0;
	if (g_once_init_enter (&avatar_format_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { value_avatar_format_init, value_avatar_format_free_value, value_avatar_format_copy_value, value_avatar_format_peek_pointer, "p", value_avatar_format_collect_value, "p", value_avatar_format_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (AvatarFormatClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) avatar_format_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AvatarFormat), 0, (GInstanceInitFunc) avatar_format_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 avatar_format_type_id;
		avatar_format_type_id = g_type_register_fundamental (g_type_fundamental_next (), "AvatarFormat", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&avatar_format_type_id__volatile, avatar_format_type_id);
	}
	return avatar_format_type_id__volatile;
}


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


void avatar_format_unref (gpointer instance) {
	AvatarFormat* self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		AVATAR_FORMAT_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;
}



