/* unattended-installer.c generated by valac 0.17.7, 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 <libvirt-gconfig/libvirt-gconfig.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <libcommon.h>
#include <osinfo/osinfo.h>
#include <glib/gi18n-lib.h>
#include <glib/gstdio.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_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#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 _avatar_format_unref0(var) ((var == NULL) ? NULL : (var = (avatar_format_unref (var), NULL)))

#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_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _BoxesUnattendedInstallerPrepareForInstallationData BoxesUnattendedInstallerPrepareForInstallationData;
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
#define __g_list_free__boxes_pair_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__boxes_pair_unref0_ (var), NULL)))
typedef struct _Block36Data Block36Data;
typedef struct _BoxesUnattendedInstallerCreateDiskImageData BoxesUnattendedInstallerCreateDiskImageData;

#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;
typedef struct _BoxesUnattendedInstallerFetchUserAvatarData BoxesUnattendedInstallerFetchUserAvatarData;
typedef struct _BoxesUnattendedFileCopyData BoxesUnattendedFileCopyData;

#define BOXES_TYPE_UNATTENDED_RAW_FILE (boxes_unattended_raw_file_get_type ())
#define BOXES_UNATTENDED_RAW_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UNATTENDED_RAW_FILE, BoxesUnattendedRawFile))
#define BOXES_UNATTENDED_RAW_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_UNATTENDED_RAW_FILE, BoxesUnattendedRawFileClass))
#define BOXES_IS_UNATTENDED_RAW_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UNATTENDED_RAW_FILE))
#define BOXES_IS_UNATTENDED_RAW_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_UNATTENDED_RAW_FILE))
#define BOXES_UNATTENDED_RAW_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_UNATTENDED_RAW_FILE, BoxesUnattendedRawFileClass))

typedef struct _BoxesUnattendedRawFile BoxesUnattendedRawFile;
typedef struct _BoxesUnattendedRawFileClass BoxesUnattendedRawFileClass;
typedef struct _BoxesUnattendedRawFilePrivate BoxesUnattendedRawFilePrivate;
typedef struct _BoxesUnattendedRawFileGetSourceFileData BoxesUnattendedRawFileGetSourceFileData;
typedef struct _BoxesUnattendedTextFilePrivate BoxesUnattendedTextFilePrivate;
typedef struct _BoxesUnattendedTextFileGetSourceFileData BoxesUnattendedTextFileGetSourceFileData;
typedef struct _BoxesUnattendedAvatarFilePrivate BoxesUnattendedAvatarFilePrivate;
typedef struct _AvatarFormatPrivate AvatarFormatPrivate;
typedef struct _BoxesUnattendedAvatarFileGetSourceFileData BoxesUnattendedAvatarFileGetSourceFileData;
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;
	void (*set_direct_boot_params) (BoxesInstallerMedia* self, GVirConfigDomainOs* os);
	void (*prepare_for_installation) (BoxesInstallerMedia* self, const gchar* vm_name, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*prepare_for_installation_finish) (BoxesInstallerMedia* self, GAsyncResult* _res_, GError** error);
	void (*setup_domain_config) (BoxesInstallerMedia* self, GVirConfigDomain* domain);
	void (*populate_setup_vbox) (BoxesInstallerMedia* self, GtkVBox* setup_vbox);
	GList* (*get_vm_properties) (BoxesInstallerMedia* self);
	guint64 (*get_installed_size) (BoxesInstallerMedia* self);
	gboolean (*get_need_user_input_for_vm_creation) (BoxesInstallerMedia* self);
	gboolean (*get_user_data_for_vm_creation_available) (BoxesInstallerMedia* self);
	gboolean (*get_supports_virtio_disk) (BoxesInstallerMedia* self);
};

struct _BoxesUnattendedFileIface {
	GTypeInterface parent_iface;
	void (*get_source_file) (BoxesUnattendedFile* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GFile* (*get_source_file_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;
	GFile* disk_file;
	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;
	gchar* hostname;
	AvatarFormat* avatar_format;
};

struct _BoxesUnattendedInstallerClass {
	BoxesInstallerMediaClass parent_class;
	gchar* (*fill_unattended_data) (BoxesUnattendedInstaller* self, const gchar* data, GError** error);
	void (*setup_ui) (BoxesUnattendedInstaller* self);
	void (*clean_up) (BoxesUnattendedInstaller* self, GError** error);
	GVirConfigDomainDisk* (*get_unattended_disk_config) (BoxesUnattendedInstaller* self);
};

struct _BoxesUnattendedInstallerPrivate {
	gchar* _extra_iso;
};

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

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

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

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

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

struct _BoxesUnattendedRawFile {
	GObject parent_instance;
	BoxesUnattendedRawFilePrivate * priv;
};

struct _BoxesUnattendedRawFileClass {
	GObjectClass parent_class;
};

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

struct _BoxesUnattendedRawFileGetSourceFileData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesUnattendedRawFile* self;
	GCancellable* cancellable;
	GFile* result;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GFile* _tmp2_;
};

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

struct _BoxesUnattendedTextFileClass {
	GObjectClass parent_class;
};

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

struct _BoxesUnattendedTextFileGetSourceFileData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesUnattendedTextFile* self;
	GCancellable* cancellable;
	GFile* result;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GFile* _tmp2_;
	GFile* source;
	BoxesUnattendedInstaller* _tmp3_;
	BoxesUnattendedInstaller* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* destination_path;
	const gchar* _tmp8_;
	GFile* _tmp9_;
	GFile* destination;
	GFile* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	GFile* _tmp13_;
	GCancellable* _tmp14_;
	GFileInputStream* _tmp15_;
	GFileInputStream* input_stream;
	GFile* _tmp16_;
	GCancellable* _tmp17_;
	GFileOutputStream* _tmp18_;
	GFileOutputStream* output_stream;
	GFileInputStream* _tmp19_;
	GDataInputStream* _tmp20_;
	GDataInputStream* data_stream;
	GDataInputStream* _tmp21_;
	gchar* str;
	GDataInputStream* _tmp22_;
	GCancellable* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	const gchar* _tmp26_;
	BoxesUnattendedInstaller* _tmp27_;
	BoxesUnattendedInstaller* _tmp28_;
	const gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	const gchar* _tmp32_;
	BoxesUnattendedInstaller* _tmp33_;
	BoxesUnattendedInstaller* _tmp34_;
	GDataStreamNewlineType _tmp35_;
	const gchar* _tmp36_;
	const gchar* _tmp37_;
	gchar* _tmp38_;
	GFileOutputStream* _tmp39_;
	const gchar* _tmp40_;
	guint8* _tmp41_;
	gint _tmp41__length1;
	guint8* _tmp42_;
	gint _tmp42__length1;
	GCancellable* _tmp43_;
	GFileOutputStream* _tmp44_;
	GCancellable* _tmp45_;
	GFile* _tmp46_;
	gchar* _tmp47_;
	gchar* _tmp48_;
	GFile* _tmp49_;
	GFile* _tmp50_;
	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;
	GFile* unattended_tmp;
	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 _BoxesUnattendedAvatarFileGetSourceFileData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesUnattendedAvatarFile* self;
	GCancellable* cancellable;
	GFile* result;
	BoxesUnattendedInstaller* _tmp0_;
	BoxesUnattendedInstaller* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	AvatarFormat* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	BoxesUnattendedInstaller* _tmp8_;
	BoxesUnattendedInstaller* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* destination_path;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	AvatarFormat* _tmp15_;
	gint _tmp16_;
	AvatarFormat* _tmp17_;
	gint _tmp18_;
	GdkPixbuf* _tmp19_;
	GdkPixbuf* pixbuf;
	gboolean _tmp20_;
	AvatarFormat* _tmp21_;
	gboolean _tmp22_;
	GdkPixbuf* _tmp23_;
	gboolean _tmp24_;
	gboolean _tmp25_;
	GdkPixbuf* _tmp26_;
	GdkPixbuf* _tmp27_;
	const gchar* _tmp28_;
	GdkPixbuf* _tmp29_;
	const gchar* _tmp30_;
	AvatarFormat* _tmp31_;
	const gchar* _tmp32_;
	const gchar* _tmp33_;
	GError* _error_;
	GError* _tmp34_;
	const gchar* _tmp35_;
	const gchar* _tmp36_;
	GFile* _tmp37_;
	GFile* _tmp38_;
	GFile* _tmp39_;
	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_raw_file_parent_class = NULL;
static BoxesUnattendedFileIface* boxes_unattended_raw_file_boxes_unattended_file_parent_iface = 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_NEED_USER_INPUT_FOR_VM_CREATION,
	BOXES_UNATTENDED_INSTALLER_USER_DATA_FOR_VM_CREATION_AVAILABLE,
	BOXES_UNATTENDED_INSTALLER_EXPRESS_INSTALL,
	BOXES_UNATTENDED_INSTALLER_USERNAME,
	BOXES_UNATTENDED_INSTALLER_PASSWORD,
	BOXES_UNATTENDED_INSTALLER_HIDDEN_PASSWORD,
	BOXES_UNATTENDED_INSTALLER_EXTRA_ISO
};
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
BoxesUnattendedInstaller* boxes_unattended_installer_construct_from_media (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);
void boxes_unattended_installer_add_unattended_file (BoxesUnattendedInstaller* self, BoxesUnattendedFile* file);
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_dup5 (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_real_prepare_for_installation_data_free (gpointer _data);
static void boxes_unattended_installer_real_prepare_for_installation (BoxesInstallerMedia* base, const gchar* vm_name, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean boxes_unattended_installer_real_prepare_for_installation_co (BoxesUnattendedInstallerPrepareForInstallationData* _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);
static void boxes_unattended_installer_prepare_for_installation_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void boxes_unattended_file_copy (BoxesUnattendedFile* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_unattended_file_copy_finish (BoxesUnattendedFile* self, GAsyncResult* _res_, GError** error);
void boxes_unattended_installer_clean_up (BoxesUnattendedInstaller* self, GError** error);
static void boxes_unattended_installer_real_setup_domain_config (BoxesInstallerMedia* base, GVirConfigDomain* domain);
void boxes_installer_media_setup_domain_config (BoxesInstallerMedia* self, GVirConfigDomain* domain);
GVirConfigDomainDisk* boxes_unattended_installer_get_unattended_disk_config (BoxesUnattendedInstaller* self);
void boxes_unattended_installer_add_extra_iso (BoxesUnattendedInstaller* self, GVirConfigDomain* domain);
gchar* boxes_unattended_installer_get_extra_iso (BoxesUnattendedInstaller* self);
void boxes_installer_media_add_cd_config (BoxesInstallerMedia* self, GVirConfigDomain* domain, GVirConfigDomainDiskType type, const gchar* iso_path, const gchar* device_name, gboolean mandatory);
static void boxes_unattended_installer_real_populate_setup_vbox (BoxesInstallerMedia* base, GtkVBox* setup_vbox);
static GList* boxes_unattended_installer_real_get_vm_properties (BoxesInstallerMedia* base);
GList* boxes_installer_media_get_vm_properties (BoxesInstallerMedia* self);
gboolean boxes_unattended_installer_get_express_install (BoxesUnattendedInstaller* self);
const gchar* boxes_unattended_installer_get_username (BoxesUnattendedInstaller* self);
gchar* boxes_unattended_installer_get_hidden_password (BoxesUnattendedInstaller* self);
static void _boxes_pair_unref0_ (gpointer var);
static void _g_list_free__boxes_pair_unref0_ (GList* self);
gchar* boxes_unattended_installer_fill_unattended_data (BoxesUnattendedInstaller* self, const gchar* data, GError** error);
static gchar* boxes_unattended_installer_real_fill_unattended_data (BoxesUnattendedInstaller* self, const gchar* data, GError** error);
gchar* boxes_unattended_installer_get_password (BoxesUnattendedInstaller* self);
gchar* boxes_unattended_installer_get_user_unattended (BoxesUnattendedInstaller* self, const gchar* suffix);
static void boxes_unattended_installer_real_setup_ui (BoxesUnattendedInstaller* self);
static Block36Data* block36_data_ref (Block36Data* _data36_);
static void block36_data_unref (void * _userdata_);
static void __lambda47_ (BoxesUnattendedInstaller* self);
static void ___lambda47__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
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_);
GtkEntry* boxes_unattended_installer_create_input_entry (BoxesUnattendedInstaller* self, const gchar* text, gboolean mandatory, gboolean visibility);
static void __lambda49_ (Block36Data* _data36_);
static void ___lambda49__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void boxes_unattended_installer_real_clean_up (BoxesUnattendedInstaller* self, GError** error);
static GVirConfigDomainDisk* boxes_unattended_installer_real_get_unattended_disk_config (BoxesUnattendedInstaller* self);
static void ___lambda48_ (BoxesUnattendedInstaller* self);
static void ____lambda48__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void boxes_unattended_installer_create_disk_image_data_free (gpointer _data);
static gboolean boxes_unattended_installer_create_disk_image_co (BoxesUnattendedInstallerCreateDiskImageData* _data_);
static void boxes_unattended_installer_create_disk_image_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static gchar* boxes_unattended_installer_lookup_extra_iso (BoxesUnattendedInstaller* self, const gchar* name);
static void boxes_unattended_installer_fetch_user_avatar_data_free (gpointer _data);
static gboolean boxes_unattended_installer_fetch_user_avatar_co (BoxesUnattendedInstallerFetchUserAvatarData* _data_);
static void boxes_unattended_installer_fetch_user_avatar_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_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;
BoxesUnattendedInstaller* boxes_unattended_installer_construct (GType object_type);
gboolean boxes_installer_media_get_live (BoxesInstallerMedia* self);
void boxes_unattended_installer_set_extra_iso (BoxesUnattendedInstaller* self, const gchar* value);
static GObject * boxes_unattended_installer_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void boxes_unattended_installer_finalize (GObject* obj);
gboolean boxes_installer_media_get_need_user_input_for_vm_creation (BoxesInstallerMedia* self);
gboolean boxes_installer_media_get_user_data_for_vm_creation_available (BoxesInstallerMedia* self);
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_get_source_file (BoxesUnattendedFile* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
GFile* boxes_unattended_file_get_source_file_finish (BoxesUnattendedFile* self, GAsyncResult* _res_, GError** error);
static void boxes_unattended_file_copy_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
const gchar* boxes_unattended_file_get_dest_name (BoxesUnattendedFile* self);
BoxesUnattendedInstaller* boxes_unattended_file_get_installer (BoxesUnattendedFile* self);
const gchar* boxes_unattended_file_get_src_path (BoxesUnattendedFile* self);
void boxes_unattended_file_set_src_path (BoxesUnattendedFile* self, const gchar* value);
void boxes_unattended_file_set_dest_name (BoxesUnattendedFile* self, const gchar* value);
void boxes_unattended_file_set_installer (BoxesUnattendedFile* self, BoxesUnattendedInstaller* value);
GType boxes_unattended_raw_file_get_type (void) G_GNUC_CONST;
#define BOXES_UNATTENDED_RAW_FILE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_UNATTENDED_RAW_FILE, BoxesUnattendedRawFilePrivate))
enum  {
	BOXES_UNATTENDED_RAW_FILE_DUMMY_PROPERTY,
	BOXES_UNATTENDED_RAW_FILE_SRC_PATH,
	BOXES_UNATTENDED_RAW_FILE_DEST_NAME,
	BOXES_UNATTENDED_RAW_FILE_INSTALLER
};
BoxesUnattendedRawFile* boxes_unattended_raw_file_new (BoxesUnattendedInstaller* installer, const gchar* src_path, const gchar* dest_name);
BoxesUnattendedRawFile* boxes_unattended_raw_file_construct (GType object_type, BoxesUnattendedInstaller* installer, const gchar* src_path, const gchar* dest_name);
static void boxes_unattended_raw_file_real_get_source_file_data_free (gpointer _data);
static void boxes_unattended_raw_file_real_get_source_file (BoxesUnattendedFile* base, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean boxes_unattended_raw_file_real_get_source_file_co (BoxesUnattendedRawFileGetSourceFileData* _data_);
static void boxes_unattended_raw_file_finalize (GObject* obj);
static void _vala_boxes_unattended_raw_file_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_boxes_unattended_raw_file_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
#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_get_source_file_data_free (gpointer _data);
static void boxes_unattended_text_file_real_get_source_file (BoxesUnattendedFile* base, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean boxes_unattended_text_file_real_get_source_file_co (BoxesUnattendedTextFileGetSourceFileData* _data_);
static void boxes_unattended_text_file_get_source_file_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_get_source_file_data_free (gpointer _data);
static void boxes_unattended_avatar_file_real_get_source_file (BoxesUnattendedFile* base, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean boxes_unattended_avatar_file_real_get_source_file_co (BoxesUnattendedAvatarFileGetSourceFileData* _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_dup5 (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_from_media (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_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	BoxesUnattendedTextFile* _tmp22_;
	BoxesUnattendedTextFile* _tmp23_;
	GTimeVal time = {0};
	GTimeVal _tmp24_;
	GDateTime* _tmp25_;
	GDateTime* date;
	GDateTime* _tmp26_;
	const gchar* _tmp27_ = NULL;
	gchar* _tmp28_;
	gchar** _tmp29_;
	gchar** _tmp30_ = NULL;
	gchar** _tmp31_;
	gint _tmp31__length1;
	gchar** langs;
	gint langs_length1;
	gint _langs_size_;
	gchar** _tmp32_;
	gint _tmp32__length1;
	const gchar* _tmp33_;
	gchar* _tmp34_;
	AvatarFormat* _tmp35_;
	AvatarFormat* _tmp36_;
	AvatarFormat* _tmp37_;
	g_return_val_if_fail (media != NULL, NULL);
	g_return_val_if_fail (unattended_src_path != NULL, NULL);
	g_return_val_if_fail (unattended_dest_name != NULL, NULL);
	self = (BoxesUnattendedInstaller*) boxes_installer_media_construct (object_type);
	_tmp0_ = media;
	_tmp1_ = _tmp0_->os;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (((BoxesInstallerMedia*) self)->os);
	((BoxesInstallerMedia*) self)->os = _tmp2_;
	_tmp3_ = media;
	_tmp4_ = _tmp3_->os_media;
	_tmp5_ = _g_object_ref0 (_tmp4_);
	_g_object_unref0 (((BoxesInstallerMedia*) self)->os_media);
	((BoxesInstallerMedia*) self)->os_media = _tmp5_;
	_tmp6_ = media;
	_tmp7_ = _tmp6_->label;
	_tmp8_ = g_strdup (_tmp7_);
	_g_free0 (((BoxesInstallerMedia*) self)->label);
	((BoxesInstallerMedia*) self)->label = _tmp8_;
	_tmp9_ = media;
	_tmp10_ = _tmp9_->device_file;
	_tmp11_ = g_strdup (_tmp10_);
	_g_free0 (((BoxesInstallerMedia*) self)->device_file);
	((BoxesInstallerMedia*) self)->device_file = _tmp11_;
	_tmp12_ = media;
	_tmp13_ = _tmp12_->from_image;
	((BoxesInstallerMedia*) self)->from_image = _tmp13_;
	_tmp14_ = media;
	_tmp15_ = _tmp14_->mount_point;
	_tmp16_ = g_strdup (_tmp15_);
	_g_free0 (((BoxesInstallerMedia*) self)->mount_point);
	((BoxesInstallerMedia*) self)->mount_point = _tmp16_;
	_tmp17_ = media;
	_tmp18_ = _tmp17_->resources;
	_tmp19_ = _g_object_ref0 (_tmp18_);
	_g_object_unref0 (((BoxesInstallerMedia*) self)->resources);
	((BoxesInstallerMedia*) self)->resources = _tmp19_;
	self->newline_type = G_DATA_STREAM_NEWLINE_TYPE_LF;
	__g_list_free__g_object_unref0_0 (self->unattended_files);
	self->unattended_files = NULL;
	_tmp20_ = unattended_src_path;
	_tmp21_ = unattended_dest_name;
	_tmp22_ = boxes_unattended_text_file_new (self, _tmp20_, _tmp21_);
	_tmp23_ = _tmp22_;
	boxes_unattended_installer_add_unattended_file (self, (BoxesUnattendedFile*) _tmp23_);
	_g_object_unref0 (_tmp23_);
	g_get_current_time (&time);
	_tmp24_ = time;
	_tmp25_ = g_date_time_new_from_timeval_local (&_tmp24_);
	date = _tmp25_;
	_tmp26_ = date;
	_tmp27_ = g_date_time_get_timezone_abbreviation (_tmp26_);
	_tmp28_ = g_strdup (_tmp27_);
	_g_free0 (self->timezone);
	self->timezone = _tmp28_;
	_tmp30_ = _tmp29_ = g_get_language_names ();
	_tmp31_ = (_tmp30_ != NULL) ? _vala_array_dup5 (_tmp30_, _vala_array_length (_tmp29_)) : ((gpointer) _tmp30_);
	_tmp31__length1 = _vala_array_length (_tmp29_);
	langs = _tmp31_;
	langs_length1 = _tmp31__length1;
	_langs_size_ = langs_length1;
	_tmp32_ = langs;
	_tmp32__length1 = langs_length1;
	_tmp33_ = _tmp32_[0];
	_tmp34_ = g_strdup (_tmp33_);
	_g_free0 (self->lang);
	self->lang = _tmp34_;
	_tmp35_ = avatar_format;
	_tmp36_ = _avatar_format_ref0 (_tmp35_);
	_avatar_format_unref0 (self->avatar_format);
	self->avatar_format = _tmp36_;
	_tmp37_ = avatar_format;
	if (_tmp37_ == NULL) {
		AvatarFormat* _tmp38_;
		_tmp38_ = avatar_format_new ("png", "", TRUE, -1, -1);
		_avatar_format_unref0 (self->avatar_format);
		self->avatar_format = _tmp38_;
	}
	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_real_prepare_for_installation_data_free (gpointer _data) {
	BoxesUnattendedInstallerPrepareForInstallationData* _data_;
	_data_ = _data;
	_g_free0 (_data_->vm_name);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesUnattendedInstallerPrepareForInstallationData, _data_);
}


static void boxes_unattended_installer_real_prepare_for_installation (BoxesInstallerMedia* base, const gchar* vm_name, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesUnattendedInstaller * self;
	BoxesUnattendedInstallerPrepareForInstallationData* _data_;
	BoxesUnattendedInstaller* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GCancellable* _tmp3_;
	GCancellable* _tmp4_;
	self = (BoxesUnattendedInstaller*) base;
	_data_ = g_slice_new0 (BoxesUnattendedInstallerPrepareForInstallationData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_unattended_installer_real_prepare_for_installation);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_unattended_installer_real_prepare_for_installation_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = vm_name;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->vm_name);
	_data_->vm_name = _tmp2_;
	_tmp3_ = cancellable;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp4_;
	boxes_unattended_installer_real_prepare_for_installation_co (_data_);
}


static void boxes_unattended_installer_real_prepare_for_installation_finish (BoxesInstallerMedia* base, GAsyncResult* _res_, GError** error) {
	BoxesUnattendedInstallerPrepareForInstallationData* _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 gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) {
	gchar* result = NULL;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	{
		const gchar* _tmp0_;
		gchar* _tmp1_ = NULL;
		gchar* _tmp2_;
		GRegex* _tmp3_;
		GRegex* _tmp4_;
		GRegex* regex;
		GRegex* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_ = NULL;
		gchar* _tmp8_;
		_tmp0_ = old;
		_tmp1_ = g_regex_escape_string (_tmp0_, -1);
		_tmp2_ = _tmp1_;
		_tmp3_ = g_regex_new (_tmp2_, 0, 0, &_inner_error_);
		_tmp4_ = _tmp3_;
		_g_free0 (_tmp2_);
		regex = _tmp4_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch50_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_);
			return NULL;
		}
		_tmp5_ = regex;
		_tmp6_ = replacement;
		_tmp7_ = g_regex_replace_literal (_tmp5_, self, (gssize) (-1), 0, _tmp6_, 0, &_inner_error_);
		_tmp8_ = _tmp7_;
		if (_inner_error_ != NULL) {
			_g_regex_unref0 (regex);
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch50_g_regex_error;
			}
			_g_regex_unref0 (regex);
			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_);
			return NULL;
		}
		result = _tmp8_;
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally50;
	__catch50_g_regex_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__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 NULL;
	}
}


static void boxes_unattended_installer_prepare_for_installation_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesUnattendedInstallerPrepareForInstallationData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_unattended_installer_real_prepare_for_installation_co (_data_);
}


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


static gboolean boxes_unattended_installer_real_prepare_for_installation_co (BoxesUnattendedInstallerPrepareForInstallationData* _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_->self->express_toggle;
	_data_->_tmp1_ = gtk_switch_get_active (_data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	if (!_data_->_tmp2_) {
		g_debug ("unattended-installer.vala:136: 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_->vm_name;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = string_replace (_data_->_tmp3_, " ", "-");
	_g_free0 (_data_->self->hostname);
	_data_->self->hostname = _data_->_tmp4_;
	{
		_data_->_tmp5_ = _data_->cancellable;
		_data_->_state_ = 1;
		boxes_unattended_installer_create_disk_image (_data_->self, _data_->_tmp5_, boxes_unattended_installer_prepare_for_installation_ready, _data_);
		return FALSE;
		_state_1:
		boxes_unattended_installer_create_disk_image_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			goto __catch51_g_error;
		}
		_data_->_tmp6_ = _data_->self->unattended_files;
		{
			_data_->unattended_file_collection = _data_->_tmp6_;
			for (_data_->unattended_file_it = _data_->unattended_file_collection; _data_->unattended_file_it != NULL; _data_->unattended_file_it = _data_->unattended_file_it->next) {
				_data_->_tmp7_ = _g_object_ref0 ((BoxesUnattendedFile*) _data_->unattended_file_it->data);
				_data_->unattended_file = _data_->_tmp7_;
				{
					_data_->_tmp8_ = _data_->unattended_file;
					_data_->_tmp9_ = _data_->cancellable;
					_data_->_state_ = 2;
					boxes_unattended_file_copy (_data_->_tmp8_, _data_->_tmp9_, boxes_unattended_installer_prepare_for_installation_ready, _data_);
					return FALSE;
					_state_2:
					boxes_unattended_file_copy_finish (_data_->_tmp8_, _data_->_res_, &_data_->_inner_error_);
					if (_data_->_inner_error_ != NULL) {
						_g_object_unref0 (_data_->unattended_file);
						goto __catch51_g_error;
					}
					_g_object_unref0 (_data_->unattended_file);
				}
			}
		}
	}
	goto __finally51;
	__catch51_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 __finally51;
		}
		_data_->_tmp10_ = _data_->self->express_toggle;
		gtk_switch_set_active (_data_->_tmp10_, FALSE);
		_data_->_tmp11_ = _data_->_error_;
		_data_->_tmp12_ = _g_error_copy0 (_data_->_tmp11_);
		_data_->_inner_error_ = _data_->_tmp12_;
		_g_error_free0 (_data_->_error_);
		goto __finally51;
	}
	__finally51:
	{
		__g_list_free__g_object_unref0_0 (_data_->self->unattended_files);
		_data_->self->unattended_files = NULL;
	}
	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_setup_domain_config (BoxesInstallerMedia* base, GVirConfigDomain* domain) {
	BoxesUnattendedInstaller * self;
	GVirConfigDomain* _tmp0_;
	GVirConfigDomainDisk* _tmp1_ = NULL;
	GVirConfigDomainDisk* disk;
	GVirConfigDomainDisk* _tmp2_;
	GVirConfigDomain* _tmp3_;
	GVirConfigDomainDisk* _tmp4_;
	self = (BoxesUnattendedInstaller*) base;
	g_return_if_fail (domain != NULL);
	_tmp0_ = domain;
	BOXES_INSTALLER_MEDIA_CLASS (boxes_unattended_installer_parent_class)->setup_domain_config (G_TYPE_CHECK_INSTANCE_CAST (self, BOXES_TYPE_INSTALLER_MEDIA, BoxesInstallerMedia), _tmp0_);
	_tmp1_ = boxes_unattended_installer_get_unattended_disk_config (self);
	disk = _tmp1_;
	_tmp2_ = disk;
	if (_tmp2_ == NULL) {
		_g_object_unref0 (disk);
		return;
	}
	_tmp3_ = domain;
	_tmp4_ = disk;
	gvir_config_domain_add_device (_tmp3_, (GVirConfigDomainDevice*) _tmp4_);
	_g_object_unref0 (disk);
}


void boxes_unattended_installer_add_extra_iso (BoxesUnattendedInstaller* self, GVirConfigDomain* domain) {
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gboolean _tmp3_;
	GVirConfigDomain* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (domain != NULL);
	_tmp0_ = boxes_unattended_installer_get_extra_iso (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_ == NULL;
	_g_free0 (_tmp2_);
	if (_tmp3_) {
		return;
	}
	_tmp4_ = domain;
	_tmp5_ = boxes_unattended_installer_get_extra_iso (self);
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp6_;
	boxes_installer_media_add_cd_config ((BoxesInstallerMedia*) self, _tmp4_, GVIR_CONFIG_DOMAIN_DISK_FILE, _tmp7_, "hdd", FALSE);
	_g_free0 (_tmp7_);
}


static void boxes_unattended_installer_real_populate_setup_vbox (BoxesInstallerMedia* base, GtkVBox* setup_vbox) {
	BoxesUnattendedInstaller * self;
	GtkVBox* _tmp0_;
	GList* _tmp1_ = NULL;
	GtkVBox* _tmp4_;
	GtkLabel* _tmp5_;
	GtkVBox* _tmp6_;
	GtkHBox* _tmp7_;
	GtkVBox* _tmp8_;
	self = (BoxesUnattendedInstaller*) base;
	g_return_if_fail (setup_vbox != NULL);
	_tmp0_ = setup_vbox;
	_tmp1_ = gtk_container_get_children ((GtkContainer*) _tmp0_);
	{
		GList* child_collection = NULL;
		GList* child_it = NULL;
		child_collection = _tmp1_;
		for (child_it = child_collection; child_it != NULL; child_it = child_it->next) {
			GtkWidget* child = NULL;
			child = (GtkWidget*) child_it->data;
			{
				GtkVBox* _tmp2_;
				GtkWidget* _tmp3_;
				_tmp2_ = setup_vbox;
				_tmp3_ = child;
				gtk_container_remove ((GtkContainer*) _tmp2_, _tmp3_);
			}
		}
		_g_list_free0 (child_collection);
	}
	_tmp4_ = setup_vbox;
	_tmp5_ = self->setup_label;
	gtk_box_pack_start ((GtkBox*) _tmp4_, (GtkWidget*) _tmp5_, FALSE, FALSE, (guint) 0);
	_tmp6_ = setup_vbox;
	_tmp7_ = self->setup_hbox;
	gtk_box_pack_start ((GtkBox*) _tmp6_, (GtkWidget*) _tmp7_, FALSE, FALSE, (guint) 0);
	_tmp8_ = setup_vbox;
	gtk_widget_show_all ((GtkWidget*) _tmp8_);
}


static void _boxes_pair_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (boxes_pair_unref (var), NULL));
}


static void _g_list_free__boxes_pair_unref0_ (GList* self) {
	g_list_foreach (self, (GFunc) _boxes_pair_unref0_, NULL);
	g_list_free (self);
}


static GList* boxes_unattended_installer_real_get_vm_properties (BoxesInstallerMedia* base) {
	BoxesUnattendedInstaller * self;
	GList* result = NULL;
	GList* _tmp0_ = NULL;
	GList* properties;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = (BoxesUnattendedInstaller*) base;
	_tmp0_ = BOXES_INSTALLER_MEDIA_CLASS (boxes_unattended_installer_parent_class)->get_vm_properties (G_TYPE_CHECK_INSTANCE_CAST (self, BOXES_TYPE_INSTALLER_MEDIA, BoxesInstallerMedia));
	properties = _tmp0_;
	_tmp1_ = boxes_unattended_installer_get_express_install (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		const gchar* _tmp3_ = NULL;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		BoxesPair* _tmp6_;
		const gchar* _tmp7_ = NULL;
		gchar* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		BoxesPair* _tmp11_;
		_tmp3_ = _ ("Username");
		_tmp4_ = boxes_unattended_installer_get_username (self);
		_tmp5_ = _tmp4_;
		_tmp6_ = boxes_pair_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, _tmp3_, _tmp5_);
		properties = g_list_append (properties, _tmp6_);
		_tmp7_ = _ ("Password");
		_tmp8_ = boxes_unattended_installer_get_hidden_password (self);
		_tmp9_ = _tmp8_;
		_tmp10_ = _tmp9_;
		_tmp11_ = boxes_pair_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, _tmp7_, _tmp10_);
		properties = g_list_append (properties, _tmp11_);
		_g_free0 (_tmp10_);
	}
	result = properties;
	return result;
}


static gchar* boxes_unattended_installer_real_fill_unattended_data (BoxesUnattendedInstaller* self, const gchar* data, GError** error) {
	gchar* result = NULL;
	GRegex* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	GtkEntry* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_ = NULL;
	gchar* str;
	GRegex* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gint _tmp12_;
	gint _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_ = NULL;
	gchar* _tmp18_;
	gchar* _tmp19_;
	GRegex* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	gint _tmp23_;
	gint _tmp24_;
	const gchar* _tmp25_;
	gchar* _tmp26_ = NULL;
	gchar* _tmp27_;
	GRegex* _tmp28_;
	const gchar* _tmp29_;
	const gchar* _tmp30_;
	gint _tmp31_;
	gint _tmp32_;
	const gchar* _tmp33_;
	gchar* _tmp34_ = NULL;
	gchar* _tmp35_;
	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);
	_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_ = self->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, GError** error) {
	g_return_val_if_fail (self != NULL, NULL);
	return BOXES_UNATTENDED_INSTALLER_GET_CLASS (self)->fill_unattended_data (self, data, error);
}


gchar* boxes_unattended_installer_get_user_unattended (BoxesUnattendedInstaller* self, const gchar* suffix) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* filename;
	const gchar* _tmp2_;
	const gchar* _tmp8_;
	gchar* _tmp9_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->hostname;
	_tmp1_ = g_strdup (_tmp0_);
	filename = _tmp1_;
	_tmp2_ = suffix;
	if (_tmp2_ != NULL) {
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp3_ = filename;
		_tmp4_ = suffix;
		_tmp5_ = g_strconcat ("-", _tmp4_, NULL);
		_tmp6_ = _tmp5_;
		_tmp7_ = g_strconcat (_tmp3_, _tmp6_, NULL);
		_g_free0 (filename);
		filename = _tmp7_;
		_g_free0 (_tmp6_);
	}
	_tmp8_ = filename;
	_tmp9_ = boxes_get_user_pkgcache (_tmp8_);
	result = _tmp9_;
	_g_free0 (filename);
	return result;
}


static Block36Data* block36_data_ref (Block36Data* _data36_) {
	g_atomic_int_inc (&_data36_->_ref_count_);
	return _data36_;
}


static void block36_data_unref (void * _userdata_) {
	Block36Data* _data36_;
	_data36_ = (Block36Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data36_->_ref_count_)) {
		BoxesUnattendedInstaller * self;
		self = _data36_->self;
		_g_object_unref0 (_data36_->notebook);
		_g_object_unref0 (self);
		g_slice_free (Block36Data, _data36_);
	}
}


static void __lambda47_ (BoxesUnattendedInstaller* self) {
	g_object_notify ((GObject*) self, "user-data-for-vm-creation-available");
}


static void ___lambda47__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda47_ (self);
}


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


static void ___lambda49__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda49_ (self);
}


static void boxes_unattended_installer_real_setup_ui (BoxesUnattendedInstaller* self) {
	Block36Data* _data36_;
	const gchar* _tmp0_ = NULL;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	GtkLabel* _tmp3_;
	GtkLabel* _tmp4_;
	GtkHBox* _tmp5_;
	GtkHBox* _tmp6_;
	GtkHBox* _tmp7_;
	GtkTable* _tmp8_;
	GtkHBox* _tmp9_;
	GtkTable* _tmp10_;
	GtkTable* _tmp11_;
	GtkTable* _tmp12_;
	const gchar* _tmp13_ = NULL;
	GtkLabel* _tmp14_;
	GtkLabel* label;
	GtkLabel* _tmp15_;
	GtkLabel* _tmp16_;
	GtkTable* _tmp17_;
	GtkLabel* _tmp18_;
	GtkSwitch* _tmp19_;
	GtkSwitch* _tmp20_;
	OsinfoMedia* _tmp21_;
	gboolean _tmp22_ = FALSE;
	gboolean _tmp23_;
	GtkSwitch* _tmp24_;
	GtkSwitch* _tmp25_;
	GtkSwitch* _tmp26_;
	GtkTable* _tmp27_;
	GtkSwitch* _tmp28_;
	GtkImage* _tmp29_;
	GtkImage* avatar;
	GtkImage* _tmp30_;
	GtkTable* _tmp31_;
	GtkImage* _tmp32_;
	GtkImage* _tmp33_;
	GtkImage* _tmp34_;
	const gchar* _tmp35_ = NULL;
	GtkLabel* _tmp36_;
	GtkLabel* _tmp37_;
	GtkLabel* _tmp38_;
	GtkTable* _tmp39_;
	GtkLabel* _tmp40_;
	const gchar* _tmp41_ = NULL;
	GtkEntry* _tmp42_ = NULL;
	GtkEntry* _tmp43_;
	GtkEntry* _tmp44_;
	GtkTable* _tmp45_;
	GtkEntry* _tmp46_;
	const gchar* _tmp47_ = NULL;
	GtkLabel* _tmp48_;
	GtkLabel* _tmp49_;
	GtkLabel* _tmp50_;
	GtkTable* _tmp51_;
	GtkLabel* _tmp52_;
	GtkNotebook* _tmp53_;
	GtkNotebook* _tmp54_;
	GtkNotebook* _tmp55_;
	GtkNotebook* _tmp56_;
	GtkNotebook* _tmp57_;
	const gchar* _tmp58_ = NULL;
	GtkButton* _tmp59_;
	GtkButton* button;
	GtkButton* _tmp60_;
	GtkNotebook* _tmp61_;
	GtkButton* _tmp62_;
	GtkEntry* _tmp63_ = NULL;
	GtkNotebook* _tmp64_;
	GtkEntry* _tmp65_;
	GtkButton* _tmp66_;
	GtkTable* _tmp67_;
	GtkNotebook* _tmp68_;
	GtkTable* _tmp69_;
	GList* _tmp70_ = NULL;
	_data36_ = g_slice_new0 (Block36Data);
	_data36_->_ref_count_ = 1;
	_data36_->self = g_object_ref (self);
	_tmp0_ = _ ("Choose express install to automatically preconfigure the box with opti" \
"mal settings.");
	_tmp1_ = (GtkLabel*) gtk_label_new (_tmp0_);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->setup_label);
	self->setup_label = _tmp1_;
	_tmp2_ = self->setup_label;
	g_object_set (_tmp2_, "wrap", TRUE, NULL);
	_tmp3_ = self->setup_label;
	gtk_label_set_width_chars (_tmp3_, 30);
	_tmp4_ = self->setup_label;
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_START);
	_tmp5_ = (GtkHBox*) gtk_hbox_new (FALSE, 20);
	g_object_ref_sink (_tmp5_);
	_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);
	g_object_ref_sink (_tmp8_);
	_g_object_unref0 (self->setup_table);
	self->setup_table = _tmp8_;
	_tmp9_ = self->setup_hbox;
	_tmp10_ = self->setup_table;
	gtk_box_pack_start ((GtkBox*) _tmp9_, (GtkWidget*) _tmp10_, FALSE, FALSE, (guint) 0);
	_tmp11_ = self->setup_table;
	g_object_set (_tmp11_, "column-spacing", (guint) 10, NULL);
	_tmp12_ = self->setup_table;
	g_object_set (_tmp12_, "row-spacing", (guint) 10, NULL);
	_tmp13_ = _ ("Express Install");
	_tmp14_ = (GtkLabel*) gtk_label_new (_tmp13_);
	g_object_ref_sink (_tmp14_);
	label = _tmp14_;
	_tmp15_ = label;
	gtk_widget_set_halign ((GtkWidget*) _tmp15_, GTK_ALIGN_END);
	_tmp16_ = label;
	gtk_widget_set_valign ((GtkWidget*) _tmp16_, GTK_ALIGN_CENTER);
	_tmp17_ = self->setup_table;
	_tmp18_ = label;
	gtk_table_attach_defaults (_tmp17_, (GtkWidget*) _tmp18_, (guint) 1, (guint) 2, (guint) 0, (guint) 1);
	_tmp19_ = (GtkSwitch*) gtk_switch_new ();
	g_object_ref_sink (_tmp19_);
	_g_object_unref0 (self->express_toggle);
	self->express_toggle = _tmp19_;
	_tmp20_ = self->express_toggle;
	_tmp21_ = ((BoxesInstallerMedia*) self)->os_media;
	g_object_get (_tmp21_, "live", &_tmp22_, NULL);
	_tmp23_ = _tmp22_;
	gtk_switch_set_active (_tmp20_, !_tmp23_);
	_tmp24_ = self->express_toggle;
	gtk_widget_set_halign ((GtkWidget*) _tmp24_, GTK_ALIGN_START);
	_tmp25_ = self->express_toggle;
	gtk_widget_set_valign ((GtkWidget*) _tmp25_, GTK_ALIGN_CENTER);
	_tmp26_ = self->express_toggle;
	g_signal_connect_object ((GObject*) _tmp26_, "notify::active", (GCallback) ___lambda47__g_object_notify, self, 0);
	_tmp27_ = self->setup_table;
	_tmp28_ = self->express_toggle;
	gtk_table_attach_defaults (_tmp27_, (GtkWidget*) _tmp28_, (guint) 2, (guint) 3, (guint) 0, (guint) 1);
	_tmp29_ = (GtkImage*) gtk_image_new_from_icon_name ("avatar-default", 0);
	g_object_ref_sink (_tmp29_);
	avatar = _tmp29_;
	_tmp30_ = avatar;
	gtk_image_set_pixel_size (_tmp30_, 128);
	_tmp31_ = self->setup_table;
	_tmp32_ = avatar;
	gtk_table_attach_defaults (_tmp31_, (GtkWidget*) _tmp32_, (guint) 0, (guint) 1, (guint) 1, (guint) 3);
	_tmp33_ = avatar;
	gtk_widget_show_all ((GtkWidget*) _tmp33_);
	_tmp34_ = avatar;
	boxes_unattended_installer_fetch_user_avatar (self, _tmp34_, NULL, NULL);
	_tmp35_ = _ ("Username");
	_tmp36_ = (GtkLabel*) gtk_label_new (_tmp35_);
	g_object_ref_sink (_tmp36_);
	_g_object_unref0 (label);
	label = _tmp36_;
	_tmp37_ = label;
	gtk_widget_set_halign ((GtkWidget*) _tmp37_, GTK_ALIGN_END);
	_tmp38_ = label;
	gtk_widget_set_valign ((GtkWidget*) _tmp38_, GTK_ALIGN_CENTER);
	_tmp39_ = self->setup_table;
	_tmp40_ = label;
	gtk_table_attach_defaults (_tmp39_, (GtkWidget*) _tmp40_, (guint) 1, (guint) 2, (guint) 1, (guint) 2);
	_tmp41_ = g_get_user_name ();
	_tmp42_ = boxes_unattended_installer_create_input_entry (self, _tmp41_, TRUE, TRUE);
	_g_object_unref0 (self->username_entry);
	self->username_entry = _tmp42_;
	_tmp43_ = self->username_entry;
	gtk_widget_set_halign ((GtkWidget*) _tmp43_, GTK_ALIGN_START);
	_tmp44_ = self->username_entry;
	gtk_widget_set_valign ((GtkWidget*) _tmp44_, GTK_ALIGN_CENTER);
	_tmp45_ = self->setup_table;
	_tmp46_ = self->username_entry;
	gtk_table_attach_defaults (_tmp45_, (GtkWidget*) _tmp46_, (guint) 2, (guint) 3, (guint) 1, (guint) 2);
	_tmp47_ = _ ("Password");
	_tmp48_ = (GtkLabel*) gtk_label_new (_tmp47_);
	g_object_ref_sink (_tmp48_);
	_g_object_unref0 (label);
	label = _tmp48_;
	_tmp49_ = label;
	gtk_widget_set_halign ((GtkWidget*) _tmp49_, GTK_ALIGN_END);
	_tmp50_ = label;
	gtk_widget_set_valign ((GtkWidget*) _tmp50_, GTK_ALIGN_CENTER);
	_tmp51_ = self->setup_table;
	_tmp52_ = label;
	gtk_table_attach_defaults (_tmp51_, (GtkWidget*) _tmp52_, (guint) 1, (guint) 2, (guint) 2, (guint) 3);
	_tmp53_ = (GtkNotebook*) gtk_notebook_new ();
	g_object_ref_sink (_tmp53_);
	_data36_->notebook = _tmp53_;
	_tmp54_ = _data36_->notebook;
	gtk_notebook_set_show_tabs (_tmp54_, FALSE);
	_tmp55_ = _data36_->notebook;
	gtk_notebook_set_show_border (_tmp55_, FALSE);
	_tmp56_ = _data36_->notebook;
	gtk_widget_set_halign ((GtkWidget*) _tmp56_, GTK_ALIGN_START);
	_tmp57_ = _data36_->notebook;
	gtk_widget_set_valign ((GtkWidget*) _tmp57_, GTK_ALIGN_CENTER);
	_tmp58_ = _ ("_Add Password");
	_tmp59_ = (GtkButton*) gtk_button_new_with_mnemonic (_tmp58_);
	g_object_ref_sink (_tmp59_);
	button = _tmp59_;
	_tmp60_ = button;
	gtk_widget_set_visible ((GtkWidget*) _tmp60_, TRUE);
	_tmp61_ = _data36_->notebook;
	_tmp62_ = button;
	gtk_notebook_append_page (_tmp61_, (GtkWidget*) _tmp62_, NULL);
	_tmp63_ = boxes_unattended_installer_create_input_entry (self, "", FALSE, FALSE);
	_g_object_unref0 (self->password_entry);
	self->password_entry = _tmp63_;
	_tmp64_ = _data36_->notebook;
	_tmp65_ = self->password_entry;
	gtk_notebook_append_page (_tmp64_, (GtkWidget*) _tmp65_, NULL);
	_tmp66_ = button;
	g_signal_connect_data (_tmp66_, "clicked", (GCallback) ___lambda49__gtk_button_clicked, block36_data_ref (_data36_), (GClosureNotify) block36_data_unref, 0);
	_tmp67_ = self->setup_table;
	_tmp68_ = _data36_->notebook;
	gtk_table_attach_defaults (_tmp67_, (GtkWidget*) _tmp68_, (guint) 2, (guint) 3, (guint) 2, (guint) 3);
	_tmp69_ = self->setup_table;
	_tmp70_ = gtk_container_get_children ((GtkContainer*) _tmp69_);
	{
		GList* child_collection = NULL;
		GList* child_it = NULL;
		child_collection = _tmp70_;
		for (child_it = child_collection; child_it != NULL; child_it = child_it->next) {
			GtkWidget* child = NULL;
			child = (GtkWidget*) child_it->data;
			{
				GtkWidget* _tmp71_;
				GtkSwitch* _tmp72_;
				_tmp71_ = child;
				_tmp72_ = self->express_toggle;
				if (_tmp71_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp72_, GTK_TYPE_WIDGET, GtkWidget)) {
					GtkSwitch* _tmp73_;
					GtkWidget* _tmp74_;
					_tmp73_ = self->express_toggle;
					_tmp74_ = child;
					g_object_bind_property_with_closures ((GObject*) _tmp73_, "active", (GObject*) _tmp74_, "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);
	block36_data_unref (_data36_);
	_data36_ = 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) {
	GFile* _tmp0_;
	GError * _inner_error_ = NULL;
	_tmp0_ = self->disk_file;
	if (_tmp0_ != NULL) {
		GFile* _tmp1_;
		_tmp1_ = self->disk_file;
		boxes_delete_file (_tmp1_, &_inner_error_);
		if (_inner_error_ != NULL) {
			g_propagate_error (error, _inner_error_);
			return;
		}
		_g_object_unref0 (self->disk_file);
		self->disk_file = NULL;
	}
}


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 GVirConfigDomainDisk* boxes_unattended_installer_real_get_unattended_disk_config (BoxesUnattendedInstaller* self) {
	GVirConfigDomainDisk* result = NULL;
	GtkSwitch* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GFile* _tmp3_;
	GVirConfigDomainDisk* _tmp4_;
	GVirConfigDomainDisk* disk;
	GVirConfigDomainDisk* _tmp5_;
	GVirConfigDomainDisk* _tmp6_;
	GVirConfigDomainDisk* _tmp7_;
	GVirConfigDomainDisk* _tmp8_;
	GVirConfigDomainDisk* _tmp9_;
	GFile* _tmp10_;
	gchar* _tmp11_ = NULL;
	gchar* _tmp12_;
	GVirConfigDomainDisk* _tmp13_;
	_tmp0_ = self->express_toggle;
	_tmp1_ = gtk_switch_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		result = NULL;
		return result;
	}
	_tmp3_ = self->disk_file;
	g_return_val_if_fail (_tmp3_ != NULL, NULL);
	_tmp4_ = gvir_config_domain_disk_new ();
	disk = _tmp4_;
	_tmp5_ = disk;
	gvir_config_domain_disk_set_type (_tmp5_, GVIR_CONFIG_DOMAIN_DISK_FILE);
	_tmp6_ = disk;
	gvir_config_domain_disk_set_guest_device_type (_tmp6_, GVIR_CONFIG_DOMAIN_DISK_GUEST_DEVICE_DISK);
	_tmp7_ = disk;
	gvir_config_domain_disk_set_driver_name (_tmp7_, "qemu");
	_tmp8_ = disk;
	gvir_config_domain_disk_set_driver_type (_tmp8_, "raw");
	_tmp9_ = disk;
	_tmp10_ = self->disk_file;
	_tmp11_ = g_file_get_path (_tmp10_);
	_tmp12_ = _tmp11_;
	gvir_config_domain_disk_set_source (_tmp9_, _tmp12_);
	_g_free0 (_tmp12_);
	_tmp13_ = disk;
	gvir_config_domain_disk_set_target_dev (_tmp13_, "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);
}


void boxes_unattended_installer_add_unattended_file (BoxesUnattendedInstaller* self, BoxesUnattendedFile* file) {
	BoxesUnattendedFile* _tmp0_;
	BoxesUnattendedFile* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (file != NULL);
	_tmp0_ = file;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	self->unattended_files = g_list_append (self->unattended_files, _tmp1_);
}


static void ___lambda48_ (BoxesUnattendedInstaller* self) {
	g_object_notify ((GObject*) self, "user-data-for-vm-creation-available");
}


static void ____lambda48__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	___lambda48_ (self);
}


GtkEntry* boxes_unattended_installer_create_input_entry (BoxesUnattendedInstaller* self, const gchar* text, gboolean mandatory, gboolean visibility) {
	GtkEntry* result = NULL;
	GtkEntry* _tmp0_;
	GtkEntry* entry;
	GtkEntry* _tmp1_;
	gboolean _tmp2_;
	GtkEntry* _tmp3_;
	GtkEntry* _tmp4_;
	const gchar* _tmp5_;
	gboolean _tmp6_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (text != NULL, NULL);
	_tmp0_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp0_);
	entry = _tmp0_;
	_tmp1_ = entry;
	_tmp2_ = visibility;
	gtk_entry_set_visibility (_tmp1_, _tmp2_);
	_tmp3_ = entry;
	gtk_widget_set_visible ((GtkWidget*) _tmp3_, TRUE);
	_tmp4_ = entry;
	_tmp5_ = text;
	gtk_entry_set_text (_tmp4_, _tmp5_);
	_tmp6_ = mandatory;
	if (_tmp6_) {
		GtkEntry* _tmp7_;
		_tmp7_ = entry;
		g_signal_connect_object ((GObject*) _tmp7_, "notify::text", (GCallback) ____lambda48__g_object_notify, self, 0);
	}
	result = entry;
	return result;
}


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_);
	_g_object_unref0 (_data_->cancellable);
	_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_ = NULL;
	_data_->_tmp0_ = boxes_unattended_installer_get_user_unattended (_data_->self, "unattended.img");
	_data_->disk_path = _data_->_tmp0_;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = g_file_new_for_path (_data_->disk_path);
	_g_object_unref0 (_data_->self->disk_file);
	_data_->self->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_;
	g_debug ("unattended-installer.vala:338: Creating disk image for unattended inst" \
"allation at '%s'..", _data_->disk_path);
	_data_->_tmp4_ = _data_->self->disk_file;
	_data_->_tmp5_ = _data_->cancellable;
	_data_->_state_ = 1;
	g_file_copy_async (_data_->template_file, _data_->_tmp4_, G_FILE_COPY_OVERWRITE, 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_free0 (_data_->disk_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_debug ("unattended-installer.vala:340: Floppy image for unattended installatio" \
"n created at '%s'", _data_->disk_path);
	_g_object_unref0 (_data_->template_file);
	_g_free0 (_data_->template_path);
	_g_free0 (_data_->disk_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 gchar* boxes_unattended_installer_lookup_extra_iso (BoxesUnattendedInstaller* self, const gchar* name) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_ = NULL;
	gchar* path;
	const gchar* _tmp2_;
	gboolean _tmp3_ = FALSE;
	const gchar* _tmp4_;
	gchar* _tmp5_ = NULL;
	const gchar* _tmp6_;
	gboolean _tmp7_ = FALSE;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = name;
	_tmp1_ = boxes_get_user_pkgcache (_tmp0_);
	path = _tmp1_;
	_tmp2_ = path;
	_tmp3_ = g_file_test (_tmp2_, G_FILE_TEST_IS_REGULAR);
	if (_tmp3_) {
		result = path;
		return result;
	}
	_tmp4_ = name;
	_tmp5_ = boxes_get_unattended (_tmp4_);
	_g_free0 (path);
	path = _tmp5_;
	_tmp6_ = path;
	_tmp7_ = g_file_test (_tmp6_, G_FILE_TEST_IS_REGULAR);
	if (_tmp7_) {
		result = path;
		return result;
	}
	result = NULL;
	_g_free0 (path);
	return result;
}


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_);
	_g_object_unref0 (_data_->avatar);
	_data_->avatar = _tmp2_;
	boxes_unattended_installer_fetch_user_avatar_co (_data_);
}


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


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


static gboolean boxes_unattended_installer_fetch_user_avatar_co (BoxesUnattendedInstallerFetchUserAvatarData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = boxes_unattended_installer_accounts;
	if (_data_->_tmp0_ == NULL) {
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = g_get_user_name ();
	_data_->_tmp2_ = g_strdup (_data_->_tmp1_);
	_data_->username = _data_->_tmp2_;
	_data_->_tmp3_ = _data_->username;
	_data_->_tmp4_ = g_strconcat ("/var/lib/AccountsService/icons/", _data_->_tmp3_, NULL);
	_data_->avatar_path = _data_->_tmp4_;
	{
		_data_->_tmp5_ = boxes_unattended_installer_accounts;
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = g_get_user_name ();
		_data_->_state_ = 1;
		boxes_fdo_accounts_FindUserByName (_data_->_tmp5_, _data_->_tmp6_, boxes_unattended_installer_fetch_user_avatar_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp7_ = NULL;
		_data_->_tmp7_ = boxes_fdo_accounts_FindUserByName_finish (_data_->_tmp5_, _data_->_res_, &_data_->_inner_error_);
		_data_->path = _data_->_tmp7_;
		if (_data_->_inner_error_ != NULL) {
			if (_data_->_inner_error_->domain == G_IO_ERROR) {
				goto __catch52_g_io_error;
			}
			_g_free0 (_data_->avatar_path);
			_g_free0 (_data_->username);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
		_data_->_tmp8_ = _data_->path;
		_data_->_state_ = 2;
		g_async_initable_new_async (BOXES_FDO_TYPE_ACCOUNTS_USER_PROXY, 0, NULL, boxes_unattended_installer_fetch_user_avatar_ready, _data_, "g-flags", 0, "g-name", "org.freedesktop.Accounts", "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", _data_->_tmp8_, "g-interface-name", "org.freedesktop.Accounts.User", NULL);
		return FALSE;
		_state_2:
		_data_->_tmp9_ = NULL;
		_data_->_tmp9_ = g_async_initable_new_finish (_data_->_source_object_, _data_->_res_, &_data_->_inner_error_);
		_data_->user = (BoxesFdoAccountsUser*) _data_->_tmp9_;
		if (_data_->_inner_error_ != NULL) {
			_g_free0 (_data_->path);
			if (_data_->_inner_error_->domain == G_IO_ERROR) {
				goto __catch52_g_io_error;
			}
			_g_free0 (_data_->path);
			_g_free0 (_data_->avatar_path);
			_g_free0 (_data_->username);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
		_data_->_tmp10_ = _data_->user;
		_data_->_tmp11_ = boxes_fdo_accounts_user_get_IconFile (_data_->_tmp10_);
		_data_->_tmp12_ = _data_->_tmp11_;
		_g_free0 (_data_->avatar_path);
		_data_->avatar_path = _data_->_tmp12_;
		_g_object_unref0 (_data_->user);
		_g_free0 (_data_->path);
	}
	goto __finally52;
	__catch52_g_io_error:
	{
		_data_->_error_ = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp13_ = _data_->username;
		_data_->_tmp14_ = _data_->_error_;
		_data_->_tmp15_ = _data_->_tmp14_->message;
		g_warning ("unattended-installer.vala:369: Failed to retrieve information about us" \
"er '%s': %s", _data_->_tmp13_, _data_->_tmp15_);
		_g_error_free0 (_data_->_error_);
	}
	__finally52:
	if (_data_->_inner_error_ != NULL) {
		_g_free0 (_data_->avatar_path);
		_g_free0 (_data_->username);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	_data_->_tmp16_ = _data_->avatar_path;
	_data_->_tmp17_ = NULL;
	_data_->_tmp17_ = g_file_new_for_path (_data_->_tmp16_);
	_data_->file = _data_->_tmp17_;
	_data_->_tmp18_ = _data_->file;
	_data_->_tmp19_ = FALSE;
	_data_->_tmp19_ = g_file_query_exists (_data_->_tmp18_, NULL);
	if (_data_->_tmp19_) {
		_data_->_tmp20_ = _data_->avatar;
		_data_->_tmp21_ = _data_->avatar_path;
		g_object_set (_data_->_tmp20_, "file", _data_->_tmp21_, NULL);
		_data_->_tmp22_ = _data_->avatar_path;
		_data_->_tmp23_ = _data_->self->avatar_format;
		_data_->_tmp24_ = boxes_unattended_avatar_file_new (_data_->self, _data_->_tmp22_, _data_->_tmp23_);
		_data_->_tmp25_ = _data_->_tmp24_;
		boxes_unattended_installer_add_unattended_file (_data_->self, (BoxesUnattendedFile*) _data_->_tmp25_);
		_g_object_unref0 (_data_->_tmp25_);
	}
	_g_object_unref0 (_data_->file);
	_g_free0 (_data_->avatar_path);
	_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;
}


static gboolean boxes_unattended_installer_real_get_need_user_input_for_vm_creation (BoxesInstallerMedia* base) {
	gboolean result;
	BoxesUnattendedInstaller* self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	self = (BoxesUnattendedInstaller*) base;
	_tmp0_ = boxes_installer_media_get_live ((BoxesInstallerMedia*) self);
	_tmp1_ = _tmp0_;
	result = !_tmp1_;
	return result;
}


static gboolean boxes_unattended_installer_real_get_user_data_for_vm_creation_available (BoxesInstallerMedia* base) {
	gboolean result;
	BoxesUnattendedInstaller* self;
	gboolean _tmp0_ = FALSE;
	GtkSwitch* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp6_;
	self = (BoxesUnattendedInstaller*) base;
	_tmp1_ = self->express_toggle;
	_tmp2_ = gtk_switch_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	if (!_tmp3_) {
		_tmp0_ = TRUE;
	} else {
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		_tmp4_ = boxes_unattended_installer_get_username (self);
		_tmp5_ = _tmp4_;
		_tmp0_ = g_strcmp0 (_tmp5_, "") != 0;
	}
	_tmp6_ = _tmp0_;
	result = _tmp6_;
	return result;
}


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


gchar* boxes_unattended_installer_get_extra_iso (BoxesUnattendedInstaller* self) {
	gchar* result;
	const gchar* _tmp0_;
	gchar* _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_extra_iso;
	_tmp1_ = boxes_unattended_installer_lookup_extra_iso (self, _tmp0_);
	result = _tmp1_;
	return result;
}


void boxes_unattended_installer_set_extra_iso (BoxesUnattendedInstaller* self, const gchar* value) {
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_extra_iso);
	self->priv->_extra_iso = _tmp1_;
	g_object_notify ((GObject *) self, "extra-iso");
}


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 = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_UNATTENDED_INSTALLER, BoxesUnattendedInstaller);
	_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 __catch53_g_error;
			}
			_g_object_unref0 (boxes_unattended_installer_accounts);
			boxes_unattended_installer_accounts = _tmp2_;
		}
		goto __finally53;
		__catch53_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:98: Failed to connect to D-Bus service '%s':" \
" %s", "org.freedesktop.Accounts", _tmp4_);
			_g_error_free0 (_error_);
		}
		__finally53:
		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_INSTALLER_MEDIA_CLASS (klass)->prepare_for_installation = boxes_unattended_installer_real_prepare_for_installation;
	BOXES_INSTALLER_MEDIA_CLASS (klass)->prepare_for_installation_finish = boxes_unattended_installer_real_prepare_for_installation_finish;
	BOXES_INSTALLER_MEDIA_CLASS (klass)->setup_domain_config = boxes_unattended_installer_real_setup_domain_config;
	BOXES_INSTALLER_MEDIA_CLASS (klass)->populate_setup_vbox = boxes_unattended_installer_real_populate_setup_vbox;
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_vm_properties = boxes_unattended_installer_real_get_vm_properties;
	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)->get_unattended_disk_config = boxes_unattended_installer_real_get_unattended_disk_config;
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_need_user_input_for_vm_creation = boxes_unattended_installer_real_get_need_user_input_for_vm_creation;
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_user_data_for_vm_creation_available = boxes_unattended_installer_real_get_user_data_for_vm_creation_available;
	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_NEED_USER_INPUT_FOR_VM_CREATION, g_param_spec_boolean ("need-user-input-for-vm-creation", "need-user-input-for-vm-creation", "need-user-input-for-vm-creation", 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_USER_DATA_FOR_VM_CREATION_AVAILABLE, g_param_spec_boolean ("user-data-for-vm-creation-available", "user-data-for-vm-creation-available", "user-data-for-vm-creation-available", 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_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_EXTRA_ISO, g_param_spec_string ("extra-iso", "extra-iso", "extra-iso", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	{
		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 __catch54_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 __catch54_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 __catch54_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 __catch54_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 __catch54_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 __finally54;
	__catch54_g_regex_error:
	{
		GError* _error_ = NULL;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (_error_);
	}
	__finally54:
	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 = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_UNATTENDED_INSTALLER, BoxesUnattendedInstaller);
	_g_object_unref0 (self->disk_file);
	_g_free0 (self->priv->_extra_iso);
	__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);
	_g_free0 (self->hostname);
	_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 = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_UNATTENDED_INSTALLER, BoxesUnattendedInstaller);
	switch (property_id) {
		case BOXES_UNATTENDED_INSTALLER_NEED_USER_INPUT_FOR_VM_CREATION:
		g_value_set_boolean (value, boxes_installer_media_get_need_user_input_for_vm_creation ((BoxesInstallerMedia*) self));
		break;
		case BOXES_UNATTENDED_INSTALLER_USER_DATA_FOR_VM_CREATION_AVAILABLE:
		g_value_set_boolean (value, boxes_installer_media_get_user_data_for_vm_creation_available ((BoxesInstallerMedia*) self));
		break;
		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_EXTRA_ISO:
		g_value_take_string (value, boxes_unattended_installer_get_extra_iso (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 = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_UNATTENDED_INSTALLER, BoxesUnattendedInstaller);
	switch (property_id) {
		case BOXES_UNATTENDED_INSTALLER_EXTRA_ISO:
		boxes_unattended_installer_set_extra_iso (self, g_value_get_string (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_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesUnattendedFileCopyData, _data_);
}


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


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


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


static gboolean boxes_unattended_file_copy_co (BoxesUnattendedFileCopyData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->cancellable;
	_data_->_state_ = 1;
	boxes_unattended_file_get_source_file (_data_->self, _data_->_tmp0_, boxes_unattended_file_copy_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = boxes_unattended_file_get_source_file_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
	_data_->source_file = _data_->_tmp1_;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp2_ = boxes_unattended_file_get_dest_name (_data_->self);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = boxes_unattended_file_get_installer (_data_->self);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = _data_->_tmp5_->disk_file;
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = g_file_get_path (_data_->_tmp6_);
	_data_->_tmp8_ = _data_->_tmp7_;
	g_debug ("unattended-installer.vala:389: Copying unattended file '%s' into disk " \
"drive/image '%s'", _data_->_tmp3_, _data_->_tmp8_);
	_g_free0 (_data_->_tmp8_);
	_data_->_tmp9_ = g_strdup ("mcopy");
	_data_->_tmp10_ = g_strdup ("-n");
	_data_->_tmp11_ = g_strdup ("-o");
	_data_->_tmp12_ = g_strdup ("-i");
	_data_->_tmp13_ = boxes_unattended_file_get_installer (_data_->self);
	_data_->_tmp14_ = _data_->_tmp13_;
	_data_->_tmp15_ = _data_->_tmp14_->disk_file;
	_data_->_tmp16_ = NULL;
	_data_->_tmp16_ = g_file_get_path (_data_->_tmp15_);
	_data_->_tmp17_ = _data_->source_file;
	_data_->_tmp18_ = NULL;
	_data_->_tmp18_ = g_file_get_path (_data_->_tmp17_);
	_data_->_tmp19_ = boxes_unattended_file_get_dest_name (_data_->self);
	_data_->_tmp20_ = _data_->_tmp19_;
	_data_->_tmp21_ = g_strconcat ("::", _data_->_tmp20_, NULL);
	_data_->_tmp22_ = NULL;
	_data_->_tmp22_ = g_new0 (gchar*, 7 + 1);
	_data_->_tmp22_[0] = _data_->_tmp9_;
	_data_->_tmp22_[1] = _data_->_tmp10_;
	_data_->_tmp22_[2] = _data_->_tmp11_;
	_data_->_tmp22_[3] = _data_->_tmp12_;
	_data_->_tmp22_[4] = _data_->_tmp16_;
	_data_->_tmp22_[5] = _data_->_tmp18_;
	_data_->_tmp22_[6] = _data_->_tmp21_;
	_data_->argv = _data_->_tmp22_;
	_data_->argv_length1 = 7;
	_data_->_argv_size_ = _data_->argv_length1;
	_data_->_tmp23_ = _data_->argv;
	_data_->_tmp23__length1 = _data_->argv_length1;
	_data_->_tmp24_ = _data_->cancellable;
	_data_->_state_ = 2;
	boxes_exec (_data_->_tmp23_, _data_->_tmp23__length1, _data_->_tmp24_, boxes_unattended_file_copy_ready, _data_);
	return FALSE;
	_state_2:
	boxes_exec_finish (_data_->_res_, NULL, NULL, &_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_->source_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_->_tmp25_ = boxes_unattended_file_get_dest_name (_data_->self);
	_data_->_tmp26_ = _data_->_tmp25_;
	_data_->_tmp27_ = boxes_unattended_file_get_installer (_data_->self);
	_data_->_tmp28_ = _data_->_tmp27_;
	_data_->_tmp29_ = _data_->_tmp28_->disk_file;
	_data_->_tmp30_ = NULL;
	_data_->_tmp30_ = g_file_get_path (_data_->_tmp29_);
	_data_->_tmp31_ = _data_->_tmp30_;
	g_debug ("unattended-installer.vala:395: Copied unattended file '%s' into disk d" \
"rive/image '%s'", _data_->_tmp26_, _data_->_tmp31_);
	_g_free0 (_data_->_tmp31_);
	_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (_data_->source_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;
}


void boxes_unattended_file_get_source_file (BoxesUnattendedFile* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BOXES_UNATTENDED_FILE_GET_INTERFACE (self)->get_source_file (self, cancellable, _callback_, _user_data_);
}


GFile* boxes_unattended_file_get_source_file_finish (BoxesUnattendedFile* self, GAsyncResult* _res_, GError** error) {
	return BOXES_UNATTENDED_FILE_GET_INTERFACE (self)->get_source_file_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;
}


BoxesUnattendedRawFile* boxes_unattended_raw_file_construct (GType object_type, BoxesUnattendedInstaller* installer, const gchar* src_path, const gchar* dest_name) {
	BoxesUnattendedRawFile * 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 = (BoxesUnattendedRawFile*) 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;
}


BoxesUnattendedRawFile* boxes_unattended_raw_file_new (BoxesUnattendedInstaller* installer, const gchar* src_path, const gchar* dest_name) {
	return boxes_unattended_raw_file_construct (BOXES_TYPE_UNATTENDED_RAW_FILE, installer, src_path, dest_name);
}


static void boxes_unattended_raw_file_real_get_source_file_data_free (gpointer _data) {
	BoxesUnattendedRawFileGetSourceFileData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesUnattendedRawFileGetSourceFileData, _data_);
}


static void boxes_unattended_raw_file_real_get_source_file (BoxesUnattendedFile* base, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesUnattendedRawFile * self;
	BoxesUnattendedRawFileGetSourceFileData* _data_;
	BoxesUnattendedRawFile* _tmp0_;
	GCancellable* _tmp1_;
	GCancellable* _tmp2_;
	self = (BoxesUnattendedRawFile*) base;
	_data_ = g_slice_new0 (BoxesUnattendedRawFileGetSourceFileData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_unattended_raw_file_real_get_source_file);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_unattended_raw_file_real_get_source_file_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = cancellable;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp2_;
	boxes_unattended_raw_file_real_get_source_file_co (_data_);
}


static GFile* boxes_unattended_raw_file_real_get_source_file_finish (BoxesUnattendedFile* base, GAsyncResult* _res_, GError** error) {
	GFile* result;
	BoxesUnattendedRawFileGetSourceFileData* _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_raw_file_real_get_source_file_co (BoxesUnattendedRawFileGetSourceFileData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		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_->result = _data_->_tmp2_;
	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 const gchar* boxes_unattended_raw_file_real_get_src_path (BoxesUnattendedFile* base) {
	const gchar* result;
	BoxesUnattendedRawFile* self;
	const gchar* _tmp0_;
	self = (BoxesUnattendedRawFile*) base;
	_tmp0_ = self->priv->_src_path;
	result = _tmp0_;
	return result;
}


static void boxes_unattended_raw_file_real_set_src_path (BoxesUnattendedFile* base, const gchar* value) {
	BoxesUnattendedRawFile* self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	self = (BoxesUnattendedRawFile*) 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_raw_file_real_get_dest_name (BoxesUnattendedFile* base) {
	const gchar* result;
	BoxesUnattendedRawFile* self;
	const gchar* _tmp0_;
	self = (BoxesUnattendedRawFile*) base;
	_tmp0_ = self->priv->_dest_name;
	result = _tmp0_;
	return result;
}


static void boxes_unattended_raw_file_real_set_dest_name (BoxesUnattendedFile* base, const gchar* value) {
	BoxesUnattendedRawFile* self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	self = (BoxesUnattendedRawFile*) 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_raw_file_real_get_installer (BoxesUnattendedFile* base) {
	BoxesUnattendedInstaller* result;
	BoxesUnattendedRawFile* self;
	BoxesUnattendedInstaller* _tmp0_;
	self = (BoxesUnattendedRawFile*) base;
	_tmp0_ = self->priv->_installer;
	result = _tmp0_;
	return result;
}


static void boxes_unattended_raw_file_real_set_installer (BoxesUnattendedFile* base, BoxesUnattendedInstaller* value) {
	BoxesUnattendedRawFile* self;
	BoxesUnattendedInstaller* _tmp0_;
	BoxesUnattendedInstaller* _tmp1_;
	self = (BoxesUnattendedRawFile*) 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_raw_file_class_init (BoxesUnattendedRawFileClass * klass) {
	boxes_unattended_raw_file_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BoxesUnattendedRawFilePrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_unattended_raw_file_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_unattended_raw_file_set_property;
	G_OBJECT_CLASS (klass)->finalize = boxes_unattended_raw_file_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_UNATTENDED_RAW_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_RAW_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_RAW_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_raw_file_boxes_unattended_file_interface_init (BoxesUnattendedFileIface * iface) {
	boxes_unattended_raw_file_boxes_unattended_file_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_source_file = (GFile* (*)(BoxesUnattendedFile*, GCancellable*, GError**)) boxes_unattended_raw_file_real_get_source_file;
	iface->get_source_file_finish = boxes_unattended_raw_file_real_get_source_file_finish;
	iface->get_src_path = boxes_unattended_raw_file_real_get_src_path;
	iface->set_src_path = boxes_unattended_raw_file_real_set_src_path;
	iface->get_dest_name = boxes_unattended_raw_file_real_get_dest_name;
	iface->set_dest_name = boxes_unattended_raw_file_real_set_dest_name;
	iface->get_installer = boxes_unattended_raw_file_real_get_installer;
	iface->set_installer = boxes_unattended_raw_file_real_set_installer;
}


static void boxes_unattended_raw_file_instance_init (BoxesUnattendedRawFile * self) {
	self->priv = BOXES_UNATTENDED_RAW_FILE_GET_PRIVATE (self);
}


static void boxes_unattended_raw_file_finalize (GObject* obj) {
	BoxesUnattendedRawFile * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_UNATTENDED_RAW_FILE, BoxesUnattendedRawFile);
	_g_free0 (self->priv->_src_path);
	_g_free0 (self->priv->_dest_name);
	_g_object_unref0 (self->priv->_installer);
	G_OBJECT_CLASS (boxes_unattended_raw_file_parent_class)->finalize (obj);
}


GType boxes_unattended_raw_file_get_type (void) {
	static volatile gsize boxes_unattended_raw_file_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_unattended_raw_file_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesUnattendedRawFileClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_unattended_raw_file_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesUnattendedRawFile), 0, (GInstanceInitFunc) boxes_unattended_raw_file_instance_init, NULL };
		static const GInterfaceInfo boxes_unattended_file_info = { (GInterfaceInitFunc) boxes_unattended_raw_file_boxes_unattended_file_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType boxes_unattended_raw_file_type_id;
		boxes_unattended_raw_file_type_id = g_type_register_static (G_TYPE_OBJECT, "BoxesUnattendedRawFile", &g_define_type_info, 0);
		g_type_add_interface_static (boxes_unattended_raw_file_type_id, BOXES_TYPE_UNATTENDED_FILE, &boxes_unattended_file_info);
		g_once_init_leave (&boxes_unattended_raw_file_type_id__volatile, boxes_unattended_raw_file_type_id);
	}
	return boxes_unattended_raw_file_type_id__volatile;
}


static void _vala_boxes_unattended_raw_file_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesUnattendedRawFile * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_UNATTENDED_RAW_FILE, BoxesUnattendedRawFile);
	switch (property_id) {
		case BOXES_UNATTENDED_RAW_FILE_SRC_PATH:
		g_value_set_string (value, boxes_unattended_file_get_src_path ((BoxesUnattendedFile*) self));
		break;
		case BOXES_UNATTENDED_RAW_FILE_DEST_NAME:
		g_value_set_string (value, boxes_unattended_file_get_dest_name ((BoxesUnattendedFile*) self));
		break;
		case BOXES_UNATTENDED_RAW_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_raw_file_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesUnattendedRawFile * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_UNATTENDED_RAW_FILE, BoxesUnattendedRawFile);
	switch (property_id) {
		case BOXES_UNATTENDED_RAW_FILE_SRC_PATH:
		boxes_unattended_file_set_src_path ((BoxesUnattendedFile*) self, g_value_get_string (value));
		break;
		case BOXES_UNATTENDED_RAW_FILE_DEST_NAME:
		boxes_unattended_file_set_dest_name ((BoxesUnattendedFile*) self, g_value_get_string (value));
		break;
		case BOXES_UNATTENDED_RAW_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;
	}
}


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_get_source_file_data_free (gpointer _data) {
	BoxesUnattendedTextFileGetSourceFileData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesUnattendedTextFileGetSourceFileData, _data_);
}


static void boxes_unattended_text_file_real_get_source_file (BoxesUnattendedFile* base, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesUnattendedTextFile * self;
	BoxesUnattendedTextFileGetSourceFileData* _data_;
	BoxesUnattendedTextFile* _tmp0_;
	GCancellable* _tmp1_;
	GCancellable* _tmp2_;
	self = (BoxesUnattendedTextFile*) base;
	_data_ = g_slice_new0 (BoxesUnattendedTextFileGetSourceFileData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_unattended_text_file_real_get_source_file);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_unattended_text_file_real_get_source_file_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = cancellable;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp2_;
	boxes_unattended_text_file_real_get_source_file_co (_data_);
}


static GFile* boxes_unattended_text_file_real_get_source_file_finish (BoxesUnattendedFile* base, GAsyncResult* _res_, GError** error) {
	GFile* result;
	BoxesUnattendedTextFileGetSourceFileData* _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_get_source_file_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesUnattendedTextFileGetSourceFileData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_unattended_text_file_real_get_source_file_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_get_source_file_co (BoxesUnattendedTextFileGetSourceFileData* _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_installer ((BoxesUnattendedFile*) _data_->self);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = boxes_unattended_file_get_dest_name ((BoxesUnattendedFile*) _data_->self);
	_data_->_tmp6_ = _data_->_tmp5_;
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = boxes_unattended_installer_get_user_unattended (_data_->_tmp4_, _data_->_tmp6_);
	_data_->destination_path = _data_->_tmp7_;
	_data_->_tmp8_ = _data_->destination_path;
	_data_->_tmp9_ = NULL;
	_data_->_tmp9_ = g_file_new_for_path (_data_->_tmp8_);
	_data_->destination = _data_->_tmp9_;
	_data_->_tmp10_ = _data_->destination;
	_data_->_tmp11_ = NULL;
	_data_->_tmp11_ = g_file_get_path (_data_->_tmp10_);
	_data_->_tmp12_ = _data_->_tmp11_;
	g_debug ("unattended-installer.vala:445: Creating unattended file at '%s'..", _data_->_tmp12_);
	_g_free0 (_data_->_tmp12_);
	_data_->_tmp13_ = _data_->source;
	_data_->_tmp14_ = _data_->cancellable;
	_data_->_state_ = 1;
	g_file_read_async (_data_->_tmp13_, G_PRIORITY_DEFAULT, _data_->_tmp14_, boxes_unattended_text_file_get_source_file_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp15_ = NULL;
	_data_->_tmp15_ = g_file_read_finish (_data_->_tmp13_, _data_->_res_, &_data_->_inner_error_);
	_data_->input_stream = _data_->_tmp15_;
	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_->_tmp16_ = _data_->destination;
	_data_->_tmp17_ = _data_->cancellable;
	_data_->_state_ = 2;
	g_file_replace_async (_data_->_tmp16_, NULL, FALSE, G_FILE_CREATE_REPLACE_DESTINATION, G_PRIORITY_DEFAULT, _data_->_tmp17_, boxes_unattended_text_file_get_source_file_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp18_ = NULL;
	_data_->_tmp18_ = g_file_replace_finish (_data_->_tmp16_, _data_->_res_, &_data_->_inner_error_);
	_data_->output_stream = _data_->_tmp18_;
	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_->_tmp19_ = _data_->input_stream;
	_data_->_tmp20_ = g_data_input_stream_new ((GInputStream*) _data_->_tmp19_);
	_data_->data_stream = _data_->_tmp20_;
	_data_->_tmp21_ = _data_->data_stream;
	g_data_input_stream_set_newline_type (_data_->_tmp21_, G_DATA_STREAM_NEWLINE_TYPE_ANY);
	while (TRUE) {
		_data_->_tmp22_ = _data_->data_stream;
		_data_->_tmp23_ = _data_->cancellable;
		_data_->_state_ = 3;
		g_data_input_stream_read_line_async (_data_->_tmp22_, G_PRIORITY_DEFAULT, _data_->_tmp23_, boxes_unattended_text_file_get_source_file_ready, _data_);
		return FALSE;
		_state_3:
		_data_->_tmp24_ = NULL;
		_data_->_tmp24_ = g_data_input_stream_read_line_finish (_data_->_tmp22_, _data_->_res_, NULL, &_data_->_inner_error_);
		_data_->_tmp25_ = _data_->_tmp24_;
		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_->_tmp25_;
		_data_->_tmp26_ = _data_->str;
		if (!(_data_->_tmp26_ != NULL)) {
			break;
		}
		_data_->_tmp27_ = boxes_unattended_file_get_installer ((BoxesUnattendedFile*) _data_->self);
		_data_->_tmp28_ = _data_->_tmp27_;
		_data_->_tmp29_ = _data_->str;
		_data_->_tmp30_ = NULL;
		_data_->_tmp30_ = boxes_unattended_installer_fill_unattended_data (_data_->_tmp28_, _data_->_tmp29_, &_data_->_inner_error_);
		_data_->_tmp31_ = _data_->_tmp30_;
		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_->_tmp31_;
		_data_->_tmp33_ = boxes_unattended_file_get_installer ((BoxesUnattendedFile*) _data_->self);
		_data_->_tmp34_ = _data_->_tmp33_;
		_data_->_tmp35_ = _data_->_tmp34_->newline_type;
		if (_data_->_tmp35_ == G_DATA_STREAM_NEWLINE_TYPE_LF) {
			_data_->_tmp32_ = "\n";
		} else {
			_data_->_tmp32_ = "\r\n";
		}
		_data_->_tmp36_ = _data_->str;
		_data_->_tmp37_ = _data_->_tmp32_;
		_data_->_tmp38_ = g_strconcat (_data_->_tmp36_, _data_->_tmp37_, NULL);
		_g_free0 (_data_->str);
		_data_->str = _data_->_tmp38_;
		_data_->_tmp39_ = _data_->output_stream;
		_data_->_tmp40_ = _data_->str;
		_data_->_tmp41_ = string_get_data (_data_->_tmp40_, &_data_->_tmp41__length1);
		_data_->_tmp42_ = _data_->_tmp41_;
		_data_->_tmp42__length1 = _data_->_tmp41__length1;
		_data_->_tmp43_ = _data_->cancellable;
		_data_->_state_ = 4;
		g_output_stream_write_async ((GOutputStream*) _data_->_tmp39_, _data_->_tmp42_, (gsize) _data_->_tmp42__length1, G_PRIORITY_DEFAULT, _data_->_tmp43_, boxes_unattended_text_file_get_source_file_ready, _data_);
		return FALSE;
		_state_4:
		g_output_stream_write_finish ((GOutputStream*) _data_->_tmp39_, _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_->_tmp44_ = _data_->output_stream;
	_data_->_tmp45_ = _data_->cancellable;
	_data_->_state_ = 5;
	g_output_stream_close_async ((GOutputStream*) _data_->_tmp44_, G_PRIORITY_DEFAULT, _data_->_tmp45_, boxes_unattended_text_file_get_source_file_ready, _data_);
	return FALSE;
	_state_5:
	g_output_stream_close_finish ((GOutputStream*) _data_->_tmp44_, _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_->_tmp46_ = _data_->destination;
	_data_->_tmp47_ = NULL;
	_data_->_tmp47_ = g_file_get_path (_data_->_tmp46_);
	_data_->_tmp48_ = _data_->_tmp47_;
	g_debug ("unattended-installer.vala:463: Created unattended file at '%s'..", _data_->_tmp48_);
	_g_free0 (_data_->_tmp48_);
	_data_->_tmp49_ = _data_->destination;
	_data_->_tmp50_ = _g_object_ref0 (_data_->_tmp49_);
	_g_object_unref0 (_data_->self->priv->unattended_tmp);
	_data_->self->priv->unattended_tmp = _data_->_tmp50_;
	_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->get_source_file = (GFile* (*)(BoxesUnattendedFile*, GCancellable*, GError**)) boxes_unattended_text_file_real_get_source_file;
	iface->get_source_file_finish = boxes_unattended_text_file_real_get_source_file_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;
	GError * _inner_error_ = NULL;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_UNATTENDED_TEXT_FILE, BoxesUnattendedTextFile);
	{
		GFile* _tmp0_;
		_tmp0_ = self->priv->unattended_tmp;
		boxes_delete_file (_tmp0_, &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch55_g_error;
		}
	}
	goto __finally55;
	__catch55_g_error:
	{
		GError* e = NULL;
		GFile* _tmp1_;
		gchar* _tmp2_ = NULL;
		gchar* _tmp3_;
		GError* _tmp4_;
		const gchar* _tmp5_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp1_ = self->priv->unattended_tmp;
		_tmp2_ = g_file_get_path (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = e;
		_tmp5_ = _tmp4_->message;
		g_warning ("unattended-installer.vala:436: Error deleting %s: %s", _tmp3_, _tmp5_);
		_g_free0 (_tmp3_);
		_g_error_free0 (e);
	}
	__finally55:
	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_);
	}
	_g_free0 (self->priv->_src_path);
	_g_free0 (self->priv->_dest_name);
	_g_object_unref0 (self->priv->_installer);
	_g_object_unref0 (self->priv->unattended_tmp);
	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 = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_UNATTENDED_TEXT_FILE, BoxesUnattendedTextFile);
	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 = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_UNATTENDED_TEXT_FILE, BoxesUnattendedTextFile);
	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_get_source_file_data_free (gpointer _data) {
	BoxesUnattendedAvatarFileGetSourceFileData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesUnattendedAvatarFileGetSourceFileData, _data_);
}


static void boxes_unattended_avatar_file_real_get_source_file (BoxesUnattendedFile* base, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesUnattendedAvatarFile * self;
	BoxesUnattendedAvatarFileGetSourceFileData* _data_;
	BoxesUnattendedAvatarFile* _tmp0_;
	GCancellable* _tmp1_;
	GCancellable* _tmp2_;
	self = (BoxesUnattendedAvatarFile*) base;
	_data_ = g_slice_new0 (BoxesUnattendedAvatarFileGetSourceFileData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_unattended_avatar_file_real_get_source_file);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_unattended_avatar_file_real_get_source_file_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = cancellable;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp2_;
	boxes_unattended_avatar_file_real_get_source_file_co (_data_);
}


static GFile* boxes_unattended_avatar_file_real_get_source_file_finish (BoxesUnattendedFile* base, GAsyncResult* _res_, GError** error) {
	GFile* result;
	BoxesUnattendedAvatarFileGetSourceFileData* _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_get_source_file_co (BoxesUnattendedAvatarFileGetSourceFileData* _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_installer ((BoxesUnattendedFile*) _data_->self);
	_data_->_tmp9_ = _data_->_tmp8_;
	_data_->_tmp10_ = boxes_unattended_file_get_dest_name ((BoxesUnattendedFile*) _data_->self);
	_data_->_tmp11_ = _data_->_tmp10_;
	_data_->_tmp12_ = NULL;
	_data_->_tmp12_ = boxes_unattended_installer_get_user_unattended (_data_->_tmp9_, _data_->_tmp11_);
	_data_->destination_path = _data_->_tmp12_;
	{
		_data_->_tmp13_ = boxes_unattended_file_get_src_path ((BoxesUnattendedFile*) _data_->self);
		_data_->_tmp14_ = _data_->_tmp13_;
		_data_->_tmp15_ = _data_->self->priv->dest_format;
		_data_->_tmp16_ = _data_->_tmp15_->width;
		_data_->_tmp17_ = _data_->self->priv->dest_format;
		_data_->_tmp18_ = _data_->_tmp17_->height;
		_data_->_tmp19_ = gdk_pixbuf_new_from_file_at_scale (_data_->_tmp14_, _data_->_tmp16_, _data_->_tmp18_, TRUE, &_data_->_inner_error_);
		_data_->pixbuf = _data_->_tmp19_;
		if (_data_->_inner_error_ != NULL) {
			goto __catch57_g_error;
		}
		_data_->_tmp21_ = _data_->self->priv->dest_format;
		_data_->_tmp22_ = _data_->_tmp21_->alpha;
		if (!_data_->_tmp22_) {
			_data_->_tmp23_ = _data_->pixbuf;
			_data_->_tmp24_ = FALSE;
			_data_->_tmp24_ = gdk_pixbuf_get_has_alpha (_data_->_tmp23_);
			_data_->_tmp20_ = _data_->_tmp24_;
		} else {
			_data_->_tmp20_ = FALSE;
		}
		_data_->_tmp25_ = _data_->_tmp20_;
		if (_data_->_tmp25_) {
			_data_->_tmp26_ = _data_->pixbuf;
			_data_->_tmp27_ = NULL;
			_data_->_tmp27_ = boxes_remove_alpha (_data_->_tmp26_);
			_g_object_unref0 (_data_->pixbuf);
			_data_->pixbuf = _data_->_tmp27_;
		}
		_data_->_tmp28_ = _data_->destination_path;
		g_debug ("unattended-installer.vala:505: Saving user avatar file at '%s'..", _data_->_tmp28_);
		_data_->_tmp29_ = _data_->pixbuf;
		_data_->_tmp30_ = _data_->destination_path;
		_data_->_tmp31_ = _data_->self->priv->dest_format;
		_data_->_tmp32_ = _data_->_tmp31_->type;
		gdk_pixbuf_save (_data_->_tmp29_, _data_->_tmp30_, _data_->_tmp32_, &_data_->_inner_error_, NULL);
		if (_data_->_inner_error_ != NULL) {
			_g_object_unref0 (_data_->pixbuf);
			goto __catch57_g_error;
		}
		_data_->_tmp33_ = _data_->destination_path;
		g_debug ("unattended-installer.vala:507: Saved user avatar file at '%s'.", _data_->_tmp33_);
		_g_object_unref0 (_data_->pixbuf);
	}
	goto __finally57;
	__catch57_g_error:
	{
		_data_->_error_ = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp34_ = _data_->_error_;
		_data_->_tmp35_ = _data_->_tmp34_->message;
		g_warning ("unattended-installer.vala:509: Failed to save user avatar: %s.", _data_->_tmp35_);
		_g_error_free0 (_data_->_error_);
	}
	__finally57:
	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_->_tmp36_ = _data_->destination_path;
	_data_->_tmp37_ = NULL;
	_data_->_tmp37_ = g_file_new_for_path (_data_->_tmp36_);
	_g_object_unref0 (_data_->self->priv->unattended_tmp);
	_data_->self->priv->unattended_tmp = _data_->_tmp37_;
	_data_->_tmp38_ = _data_->self->priv->unattended_tmp;
	_data_->_tmp39_ = _g_object_ref0 (_data_->_tmp38_);
	_data_->result = _data_->_tmp39_;
	_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->get_source_file = (GFile* (*)(BoxesUnattendedFile*, GCancellable*, GError**)) boxes_unattended_avatar_file_real_get_source_file;
	iface->get_source_file_finish = boxes_unattended_avatar_file_real_get_source_file_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;
	GError * _inner_error_ = NULL;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_UNATTENDED_AVATAR_FILE, BoxesUnattendedAvatarFile);
	{
		GFile* _tmp0_;
		_tmp0_ = self->priv->unattended_tmp;
		boxes_delete_file (_tmp0_, &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch56_g_error;
		}
	}
	goto __finally56;
	__catch56_g_error:
	{
		GError* e = NULL;
		GFile* _tmp1_;
		gchar* _tmp2_ = NULL;
		gchar* _tmp3_;
		GError* _tmp4_;
		const gchar* _tmp5_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp1_ = self->priv->unattended_tmp;
		_tmp2_ = g_file_get_path (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = e;
		_tmp5_ = _tmp4_->message;
		g_warning ("unattended-installer.vala:491: Error deleting %s: %s", _tmp3_, _tmp5_);
		_g_free0 (_tmp3_);
		_g_error_free0 (e);
	}
	__finally56:
	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_);
	}
	_g_free0 (self->priv->_src_path);
	_g_free0 (self->priv->_dest_name);
	_g_object_unref0 (self->priv->_installer);
	_g_object_unref0 (self->priv->unattended_tmp);
	_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 = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_UNATTENDED_AVATAR_FILE, BoxesUnattendedAvatarFile);
	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 = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_UNATTENDED_AVATAR_FILE, BoxesUnattendedAvatarFile);
	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 = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_AVATAR_FORMAT, AvatarFormat);
	_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;
}



