/* unattended-file.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from unattended-file.vala, do not modify */

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

#include <glib-object.h>
#include <gio/gio.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include "common.h"
#include <archive.h>
#include <libvirt-gconfig/libvirt-gconfig.h>
#include <osinfo/osinfo.h>
#include <stdio.h>
#include <glib/gstdio.h>
#include <errno.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

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

#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;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _BoxesUnattendedFileCopyData BoxesUnattendedFileCopyData;
typedef struct _Block50Data Block50Data;

#define BOXES_TYPE_APP (boxes_app_get_type ())
#define BOXES_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_APP, BoxesApp))
#define BOXES_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_APP, BoxesAppClass))
#define BOXES_IS_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_APP))
#define BOXES_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_APP))
#define BOXES_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_APP, BoxesAppClass))

typedef struct _BoxesApp BoxesApp;
typedef struct _BoxesAppClass BoxesAppClass;
typedef struct _BoxesAppPrivate BoxesAppPrivate;

#define BOXES_TYPE_COLLECTION (boxes_collection_get_type ())
#define BOXES_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION, BoxesCollection))
#define BOXES_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION, BoxesCollectionClass))
#define BOXES_IS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION))
#define BOXES_IS_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION))
#define BOXES_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION, BoxesCollectionClass))

typedef struct _BoxesCollection BoxesCollection;
typedef struct _BoxesCollectionClass BoxesCollectionClass;

#define BOXES_TYPE_SHARED_FOLDERS_MANAGER (boxes_shared_folders_manager_get_type ())
#define BOXES_SHARED_FOLDERS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SHARED_FOLDERS_MANAGER, BoxesSharedFoldersManager))
#define BOXES_SHARED_FOLDERS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SHARED_FOLDERS_MANAGER, BoxesSharedFoldersManagerClass))
#define BOXES_IS_SHARED_FOLDERS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SHARED_FOLDERS_MANAGER))
#define BOXES_IS_SHARED_FOLDERS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SHARED_FOLDERS_MANAGER))
#define BOXES_SHARED_FOLDERS_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SHARED_FOLDERS_MANAGER, BoxesSharedFoldersManagerClass))

typedef struct _BoxesSharedFoldersManager BoxesSharedFoldersManager;
typedef struct _BoxesSharedFoldersManagerClass BoxesSharedFoldersManagerClass;
typedef struct _BoxesUnattendedFileDefaultCopyData BoxesUnattendedFileDefaultCopyData;

#define BOXES_TYPE_ARCHIVE_READER (boxes_archive_reader_get_type ())
#define BOXES_ARCHIVE_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_ARCHIVE_READER, BoxesArchiveReader))
#define BOXES_ARCHIVE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_ARCHIVE_READER, BoxesArchiveReaderClass))
#define BOXES_IS_ARCHIVE_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_ARCHIVE_READER))
#define BOXES_IS_ARCHIVE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_ARCHIVE_READER))
#define BOXES_ARCHIVE_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_ARCHIVE_READER, BoxesArchiveReaderClass))

typedef struct _BoxesArchiveReader BoxesArchiveReader;
typedef struct _BoxesArchiveReaderClass BoxesArchiveReaderClass;

#define BOXES_TYPE_ARCHIVE_WRITER (boxes_archive_writer_get_type ())
#define BOXES_ARCHIVE_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_ARCHIVE_WRITER, BoxesArchiveWriter))
#define BOXES_ARCHIVE_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_ARCHIVE_WRITER, BoxesArchiveWriterClass))
#define BOXES_IS_ARCHIVE_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_ARCHIVE_WRITER))
#define BOXES_IS_ARCHIVE_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_ARCHIVE_WRITER))
#define BOXES_ARCHIVE_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_ARCHIVE_WRITER, BoxesArchiveWriterClass))

typedef struct _BoxesArchiveWriter BoxesArchiveWriter;
typedef struct _BoxesArchiveWriterClass BoxesArchiveWriterClass;
typedef struct _BoxesInstallerMediaPrivate BoxesInstallerMediaPrivate;

#define BOXES_TYPE_VM_CREATOR (boxes_vm_creator_get_type ())
#define BOXES_VM_CREATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_VM_CREATOR, BoxesVMCreator))
#define BOXES_VM_CREATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_VM_CREATOR, BoxesVMCreatorClass))
#define BOXES_IS_VM_CREATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_VM_CREATOR))
#define BOXES_IS_VM_CREATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_VM_CREATOR))
#define BOXES_VM_CREATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_VM_CREATOR, BoxesVMCreatorClass))

typedef struct _BoxesVMCreator BoxesVMCreator;
typedef struct _BoxesVMCreatorClass BoxesVMCreatorClass;
typedef struct _BoxesUnattendedInstallerPrivate BoxesUnattendedInstallerPrivate;

#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;
enum  {
	BOXES_UNATTENDED_RAW_FILE_0_PROPERTY,
	BOXES_UNATTENDED_RAW_FILE_DEST_NAME_PROPERTY,
	BOXES_UNATTENDED_RAW_FILE_SRC_PATH_PROPERTY,
	BOXES_UNATTENDED_RAW_FILE_INSTALLER_PROPERTY,
	BOXES_UNATTENDED_RAW_FILE_NUM_PROPERTIES
};
static GParamSpec* boxes_unattended_raw_file_properties[BOXES_UNATTENDED_RAW_FILE_NUM_PROPERTIES];
typedef struct _BoxesUnattendedRawFileGetSourceFileData BoxesUnattendedRawFileGetSourceFileData;

#define BOXES_TYPE_UNATTENDED_SCRIPT_FILE (boxes_unattended_script_file_get_type ())
#define BOXES_UNATTENDED_SCRIPT_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UNATTENDED_SCRIPT_FILE, BoxesUnattendedScriptFile))
#define BOXES_UNATTENDED_SCRIPT_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_UNATTENDED_SCRIPT_FILE, BoxesUnattendedScriptFileClass))
#define BOXES_IS_UNATTENDED_SCRIPT_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UNATTENDED_SCRIPT_FILE))
#define BOXES_IS_UNATTENDED_SCRIPT_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_UNATTENDED_SCRIPT_FILE))
#define BOXES_UNATTENDED_SCRIPT_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_UNATTENDED_SCRIPT_FILE, BoxesUnattendedScriptFileClass))

typedef struct _BoxesUnattendedScriptFile BoxesUnattendedScriptFile;
typedef struct _BoxesUnattendedScriptFileClass BoxesUnattendedScriptFileClass;
typedef struct _BoxesUnattendedScriptFilePrivate BoxesUnattendedScriptFilePrivate;
enum  {
	BOXES_UNATTENDED_SCRIPT_FILE_0_PROPERTY,
	BOXES_UNATTENDED_SCRIPT_FILE_DEST_NAME_PROPERTY,
	BOXES_UNATTENDED_SCRIPT_FILE_SRC_PATH_PROPERTY,
	BOXES_UNATTENDED_SCRIPT_FILE_INJECTION_METHOD_PROPERTY,
	BOXES_UNATTENDED_SCRIPT_FILE_INSTALLER_PROPERTY,
	BOXES_UNATTENDED_SCRIPT_FILE_SCRIPT_PROPERTY,
	BOXES_UNATTENDED_SCRIPT_FILE_NUM_PROPERTIES
};
static GParamSpec* boxes_unattended_script_file_properties[BOXES_UNATTENDED_SCRIPT_FILE_NUM_PROPERTIES];
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _BoxesUnattendedScriptFileCopyData BoxesUnattendedScriptFileCopyData;
#define _fclose0(var) ((var == NULL) ? NULL : (var = (fclose (var), NULL)))
typedef struct _BoxesUnattendedScriptFileGetSourceFileData BoxesUnattendedScriptFileGetSourceFileData;

struct _BoxesUnattendedFileIface {
	GTypeInterface parent_iface;
	void (*copy) (BoxesUnattendedFile* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*copy_finish) (BoxesUnattendedFile* self, GAsyncResult* _res_, GError** error);
	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 _BoxesUnattendedFileCopyData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesUnattendedFile* self;
	GCancellable* cancellable;
	GFile* source_file;
	GFile* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	GFile* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	GError* _inner_error0_;
};

struct _Block50Data {
	int _ref_count_;
	gchar* disk_file;
	gchar* source_file;
	gchar* dest_name;
	gpointer _async_data_;
};

struct _BoxesApp {
	GtkApplication parent_instance;
	BoxesAppPrivate * priv;
	BoxesCollection* collection;
	BoxesAsyncLauncher* async_launcher;
	BoxesSharedFoldersManager* shared_folders_manager;
};

struct _BoxesAppClass {
	GtkApplicationClass parent_class;
};

struct _BoxesUnattendedFileDefaultCopyData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	gchar* disk_file;
	gchar* source_file;
	gchar* dest_name;
	GCancellable* cancellable;
	Block50Data* _data50_;
	BoxesApp* _tmp0_;
	BoxesAsyncLauncher* _tmp1_;
	GError* _inner_error0_;
};

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) (BoxesInstallerMedia* self, BoxesActivityProgress* progress, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*prepare_finish) (BoxesInstallerMedia* self, GAsyncResult* _res_);
	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_);
	void (*prepare_to_continue_installation) (BoxesInstallerMedia* self, const gchar* vm_name);
	void (*clean_up) (BoxesInstallerMedia* self);
	void (*clean_up_preparation_cache) (BoxesInstallerMedia* self);
	void (*setup_domain_config) (BoxesInstallerMedia* self, GVirConfigDomain* domain);
	void (*setup_post_install_domain_config) (BoxesInstallerMedia* self, GVirConfigDomain* domain);
	BoxesVMCreator* (*get_vm_creator) (BoxesInstallerMedia* self);
	OsinfoDeviceList* (*get_supported_devices) (BoxesInstallerMedia* self);
	guint64 (*get_installed_size) (BoxesInstallerMedia* self);
	gboolean (*get_need_user_input_for_vm_creation) (BoxesInstallerMedia* self);
	gboolean (*get_prefers_q35) (BoxesInstallerMedia* self);
	gboolean (*get_prefers_ich9) (BoxesInstallerMedia* self);
	gboolean (*get_live) (BoxesInstallerMedia* self);
	gboolean (*get_eject_after_install) (BoxesInstallerMedia* self);
	gchar* (*get_architecture) (BoxesInstallerMedia* self);
};

struct _BoxesUnattendedInstaller {
	BoxesInstallerMedia parent_instance;
	BoxesUnattendedInstallerPrivate * priv;
	GFile* disk_file;
	GFile* kernel_file;
	GFile* initrd_file;
	OsinfoInstallConfig* config;
	OsinfoInstallScriptList* scripts;
	gchar* username;
	gchar* password;
	gchar* product_key;
};

struct _BoxesUnattendedInstallerClass {
	BoxesInstallerMediaClass parent_class;
};

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

struct _BoxesUnattendedRawFileClass {
	GObjectClass parent_class;
};

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

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

struct _BoxesUnattendedScriptFile {
	GObject parent_instance;
	BoxesUnattendedScriptFilePrivate * priv;
};

struct _BoxesUnattendedScriptFileClass {
	GObjectClass parent_class;
};

struct _BoxesUnattendedScriptFilePrivate {
	gchar* _dest_name;
	gchar* _src_path;
	OsinfoInstallScriptInjectionMethod _injection_method;
	BoxesUnattendedInstaller* _installer;
	OsinfoInstallScript* _script;
	GFile* unattended_tmp;
};

struct _BoxesUnattendedScriptFileCopyData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesUnattendedScriptFile* self;
	GCancellable* cancellable;
	GFile* source_file;
	GFile* _tmp0_;
	OsinfoInstallScriptInjectionMethod _tmp1_;
	BoxesUnattendedInstaller* _tmp2_;
	BoxesUnattendedInstaller* _tmp3_;
	GFile* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GFile* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	GFile* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	GError* _inner_error0_;
};

struct _BoxesUnattendedScriptFileGetSourceFileData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesUnattendedScriptFile* self;
	GCancellable* cancellable;
	GFile* result;
	BoxesUnattendedInstaller* _tmp0_;
	BoxesUnattendedInstaller* _tmp1_;
	OsinfoInstallScript* _tmp2_;
	GFile* output_dir;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GFile* _tmp5_;
	GFile* _tmp6_;
	GFile* _tmp7_;
	OsinfoInstallScript* _tmp8_;
	BoxesUnattendedInstaller* _tmp9_;
	BoxesUnattendedInstaller* _tmp10_;
	OsinfoMedia* _tmp11_;
	BoxesUnattendedInstaller* _tmp12_;
	BoxesUnattendedInstaller* _tmp13_;
	OsinfoInstallConfig* _tmp14_;
	GFile* _tmp15_;
	GFile* _tmp16_;
	GFile* _tmp17_;
	GFile* _tmp18_;
	GError* _inner_error0_;
};

VALA_EXTERN BoxesApp* boxes_app_app;
static gint BoxesUnattendedRawFile_private_offset;
static gpointer boxes_unattended_raw_file_parent_class = NULL;
static BoxesUnattendedFileIface * boxes_unattended_raw_file_boxes_unattended_file_parent_iface = NULL;
static gint BoxesUnattendedScriptFile_private_offset;
static gpointer boxes_unattended_script_file_parent_class = NULL;
static BoxesUnattendedFileIface * boxes_unattended_script_file_boxes_unattended_file_parent_iface = NULL;

VALA_EXTERN GType boxes_installer_media_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesInstallerMedia, g_object_unref)
VALA_EXTERN GType boxes_unattended_installer_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesUnattendedInstaller, g_object_unref)
VALA_EXTERN GType boxes_unattended_file_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesUnattendedFile, g_object_unref)
static void boxes_unattended_file_real_copy_data_free (gpointer _data);
static void boxes_unattended_file_real_copy (BoxesUnattendedFile* self,
                                      GCancellable* cancellable,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_);
VALA_EXTERN void boxes_unattended_file_copy (BoxesUnattendedFile* self,
                                 GCancellable* cancellable,
                                 GAsyncReadyCallback _callback_,
                                 gpointer _user_data_);
VALA_EXTERN void boxes_unattended_file_copy_finish (BoxesUnattendedFile* self,
                                        GAsyncResult* _res_,
                                        GError** error);
static gboolean boxes_unattended_file_real_copy_co (BoxesUnattendedFileCopyData* _data_);
VALA_EXTERN void boxes_unattended_file_get_source_file (BoxesUnattendedFile* self,
                                            GCancellable* cancellable,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
VALA_EXTERN 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_);
VALA_EXTERN void boxes_unattended_file_default_copy (const gchar* disk_file,
                                         const gchar* source_file,
                                         const gchar* dest_name,
                                         GCancellable* cancellable,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_);
VALA_EXTERN void boxes_unattended_file_default_copy_finish (GAsyncResult* _res_,
                                                GError** error);
VALA_EXTERN gchar* boxes_unattended_file_get_disk_file (BoxesUnattendedFile* self);
VALA_EXTERN const gchar* boxes_unattended_file_get_dest_name (BoxesUnattendedFile* self);
static void boxes_unattended_file_default_copy_data_free (gpointer _data);
static gboolean boxes_unattended_file_default_copy_co (BoxesUnattendedFileDefaultCopyData* _data_);
static Block50Data* block50_data_ref (Block50Data* _data50_);
static void block50_data_unref (void * _userdata_);
static gboolean boxes_unattended_file_is_libarchive_compatible (const gchar* filename);
VALA_EXTERN GType boxes_app_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesApp, g_object_unref)
VALA_EXTERN GType boxes_collection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesCollection, g_object_unref)
VALA_EXTERN GType boxes_shared_folders_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesSharedFoldersManager, g_object_unref)
static void ___lambda19_ (Block50Data* _data50_,
                   GError** error);
static void boxes_unattended_file_copy_with_libarchive (const gchar* disk_file,
                                                 const gchar* source_file,
                                                 const gchar* dest_name,
                                                 GError** error);
static void ____lambda19__boxes_async_launcher_run_in_thread_func (gpointer self,
                                                            GError** error);
static void boxes_unattended_file_default_copy_ready (GObject* source_object,
                                               GAsyncResult* _res_,
                                               gpointer _user_data_);
VALA_EXTERN GType boxes_archive_reader_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesArchiveReader, g_object_unref)
VALA_EXTERN BoxesArchiveReader* boxes_archive_reader_new (const gchar* filename,
                                              int* format,
                                              GList* filters,
                                              GError** error);
VALA_EXTERN BoxesArchiveReader* boxes_archive_reader_construct (GType object_type,
                                                    const gchar* filename,
                                                    int* format,
                                                    GList* filters,
                                                    GError** error);
VALA_EXTERN GType boxes_archive_writer_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesArchiveWriter, g_object_unref)
VALA_EXTERN BoxesArchiveWriter* boxes_archive_writer_new_from_archive_reader (BoxesArchiveReader* archive_reader,
                                                                  const gchar* filename,
                                                                  gboolean import_contents,
                                                                  GError** error);
VALA_EXTERN BoxesArchiveWriter* boxes_archive_writer_construct_from_archive_reader (GType object_type,
                                                                        BoxesArchiveReader* archive_reader,
                                                                        const gchar* filename,
                                                                        gboolean import_contents,
                                                                        GError** error);
VALA_EXTERN void boxes_archive_writer_import_read_archive (BoxesArchiveWriter* self,
                                               BoxesArchiveReader* archive_reader,
                                               gchar** omit_files,
                                               gint omit_files_length1,
                                               gboolean omit_hardlinked_files,
                                               GError** error);
VALA_EXTERN void boxes_archive_writer_insert_file (BoxesArchiveWriter* self,
                                       const gchar* src,
                                       const gchar* dest,
                                       GError** error);
VALA_EXTERN const gchar* boxes_unattended_file_get_src_path (BoxesUnattendedFile* self);
VALA_EXTERN void boxes_unattended_file_set_src_path (BoxesUnattendedFile* self,
                                         const gchar* value);
VALA_EXTERN void boxes_unattended_file_set_dest_name (BoxesUnattendedFile* self,
                                          const gchar* value);
VALA_EXTERN BoxesUnattendedInstaller* boxes_unattended_file_get_installer (BoxesUnattendedFile* self);
VALA_EXTERN GType boxes_vm_creator_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesVMCreator, g_object_unref)
VALA_EXTERN void boxes_unattended_file_set_installer (BoxesUnattendedFile* self,
                                          BoxesUnattendedInstaller* value);
static GType boxes_unattended_file_get_type_once (void);
VALA_EXTERN GType boxes_unattended_raw_file_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesUnattendedRawFile, g_object_unref)
VALA_EXTERN BoxesUnattendedRawFile* boxes_unattended_raw_file_new (BoxesUnattendedInstaller* installer,
                                                       const gchar* src_path,
                                                       const gchar* dest_name);
VALA_EXTERN 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 GType boxes_unattended_raw_file_get_type_once (void);
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);
VALA_EXTERN GType boxes_unattended_script_file_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesUnattendedScriptFile, g_object_unref)
VALA_EXTERN BoxesUnattendedScriptFile* boxes_unattended_script_file_new (BoxesUnattendedInstaller* installer,
                                                             OsinfoInstallScript* script,
                                                             const gchar* dest_name,
                                                             GError** error);
VALA_EXTERN BoxesUnattendedScriptFile* boxes_unattended_script_file_construct (GType object_type,
                                                                   BoxesUnattendedInstaller* installer,
                                                                   OsinfoInstallScript* script,
                                                                   const gchar* dest_name,
                                                                   GError** error);
VALA_EXTERN void boxes_unattended_script_file_set_script (BoxesUnattendedScriptFile* self,
                                              OsinfoInstallScript* value);
VALA_EXTERN void boxes_unattended_script_file_set_injection_method (BoxesUnattendedScriptFile* self,
                                                        OsinfoInstallScriptInjectionMethod value);
static void boxes_unattended_script_file_real_copy_data_free (gpointer _data);
static void boxes_unattended_script_file_real_copy (BoxesUnattendedFile* base,
                                             GCancellable* cancellable,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
static gboolean boxes_unattended_script_file_real_copy_co (BoxesUnattendedScriptFileCopyData* _data_);
static void boxes_unattended_script_file_copy_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_);
VALA_EXTERN OsinfoInstallScriptInjectionMethod boxes_unattended_script_file_get_injection_method (BoxesUnattendedScriptFile* self);
static void boxes_unattended_script_file_initrd_append (const gchar* disk_file,
                                                 const gchar* source_file,
                                                 const gchar* dest_name,
                                                 GError** error);
VALA_EXTERN BoxesArchiveWriter* boxes_archive_writer_new_from_fd (gint fd,
                                                      int format,
                                                      GList* filters,
                                                      GError** error);
VALA_EXTERN BoxesArchiveWriter* boxes_archive_writer_construct_from_fd (GType object_type,
                                                            gint fd,
                                                            int format,
                                                            GList* filters,
                                                            GError** error);
static void boxes_unattended_script_file_real_get_source_file_data_free (gpointer _data);
static void boxes_unattended_script_file_real_get_source_file (BoxesUnattendedFile* base,
                                                        GCancellable* cancellable,
                                                        GAsyncReadyCallback _callback_,
                                                        gpointer _user_data_);
static gboolean boxes_unattended_script_file_real_get_source_file_co (BoxesUnattendedScriptFileGetSourceFileData* _data_);
VALA_EXTERN void boxes_unattended_installer_configure_install_script (BoxesUnattendedInstaller* self,
                                                          OsinfoInstallScript* script);
VALA_EXTERN OsinfoInstallScript* boxes_unattended_script_file_get_script (BoxesUnattendedScriptFile* self);
static void boxes_unattended_script_file_get_source_file_ready (GObject* source_object,
                                                         GAsyncResult* _res_,
                                                         gpointer _user_data_);
static void boxes_unattended_script_file_finalize (GObject * obj);
static GType boxes_unattended_script_file_get_type_once (void);
static void _vala_boxes_unattended_script_file_get_property (GObject * object,
                                                      guint property_id,
                                                      GValue * value,
                                                      GParamSpec * pspec);
static void _vala_boxes_unattended_script_file_set_property (GObject * object,
                                                      guint property_id,
                                                      const GValue * value,
                                                      GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

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

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

static void
boxes_unattended_file_real_copy (BoxesUnattendedFile* self,
                                 GCancellable* cancellable,
                                 GAsyncReadyCallback _callback_,
                                 gpointer _user_data_)
{
	BoxesUnattendedFileCopyData* _data_;
	BoxesUnattendedFile* _tmp0_;
	GCancellable* _tmp1_;
	_data_ = g_slice_new0 (BoxesUnattendedFileCopyData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_unattended_file_real_copy_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp1_;
	boxes_unattended_file_real_copy_co (_data_);
}

static void
boxes_unattended_file_real_copy_finish (BoxesUnattendedFile* self,
                                        GAsyncResult* _res_,
                                        GError** error)
{
	BoxesUnattendedFileCopyData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

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_real_copy_co (_data_);
}

static gboolean
boxes_unattended_file_real_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_->_state_ = 1;
	boxes_unattended_file_get_source_file (_data_->self, _data_->cancellable, boxes_unattended_file_copy_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp0_ = boxes_unattended_file_get_source_file_finish (_data_->self, _data_->_res_, &_data_->_inner_error0_);
	_data_->source_file = _data_->_tmp0_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp1_ = boxes_unattended_file_get_disk_file (_data_->self);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = _data_->source_file;
	_data_->_tmp5_ = g_file_get_path (_data_->_tmp4_);
	_data_->_tmp6_ = _data_->_tmp5_;
	_data_->_tmp7_ = boxes_unattended_file_get_dest_name (_data_->self);
	_data_->_tmp8_ = _data_->_tmp7_;
	_data_->_state_ = 2;
	boxes_unattended_file_default_copy (_data_->_tmp3_, _data_->_tmp6_, _data_->_tmp8_, NULL, boxes_unattended_file_copy_ready, _data_);
	return FALSE;
	_state_2:
	boxes_unattended_file_default_copy_finish (_data_->_res_, &_data_->_inner_error0_);
	_g_free0 (_data_->_tmp6_);
	_g_free0 (_data_->_tmp3_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_g_object_unref0 (_data_->source_file);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_object_unref0 (_data_->source_file);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

void
boxes_unattended_file_copy (BoxesUnattendedFile* self,
                            GCancellable* cancellable,
                            GAsyncReadyCallback _callback_,
                            gpointer _user_data_)
{
	BoxesUnattendedFileIface* _iface_;
	_iface_ = BOXES_UNATTENDED_FILE_GET_INTERFACE (self);
	if (_iface_->copy) {
		_iface_->copy (self, cancellable, _callback_, _user_data_);
	}
}

void
boxes_unattended_file_copy_finish (BoxesUnattendedFile* self,
                                   GAsyncResult* _res_,
                                   GError** error)
{
	BoxesUnattendedFileIface* _iface_;
	_iface_ = BOXES_UNATTENDED_FILE_GET_INTERFACE (self);
	if (_iface_->copy_finish) {
		_iface_->copy_finish (self, _res_, error);
	}
}

static void
boxes_unattended_file_default_copy_data_free (gpointer _data)
{
	BoxesUnattendedFileDefaultCopyData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	g_slice_free (BoxesUnattendedFileDefaultCopyData, _data_);
}

void
boxes_unattended_file_default_copy (const gchar* disk_file,
                                    const gchar* source_file,
                                    const gchar* dest_name,
                                    GCancellable* cancellable,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_)
{
	BoxesUnattendedFileDefaultCopyData* _data_;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	GCancellable* _tmp3_;
	g_return_if_fail (disk_file != NULL);
	g_return_if_fail (source_file != NULL);
	g_return_if_fail (dest_name != NULL);
	_data_ = g_slice_new0 (BoxesUnattendedFileDefaultCopyData);
	_data_->_async_result = g_task_new (NULL, cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_unattended_file_default_copy_data_free);
	_tmp0_ = g_strdup (disk_file);
	_g_free0 (_data_->disk_file);
	_data_->disk_file = _tmp0_;
	_tmp1_ = g_strdup (source_file);
	_g_free0 (_data_->source_file);
	_data_->source_file = _tmp1_;
	_tmp2_ = g_strdup (dest_name);
	_g_free0 (_data_->dest_name);
	_data_->dest_name = _tmp2_;
	_tmp3_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp3_;
	boxes_unattended_file_default_copy_co (_data_);
}

void
boxes_unattended_file_default_copy_finish (GAsyncResult* _res_,
                                           GError** error)
{
	BoxesUnattendedFileDefaultCopyData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static Block50Data*
block50_data_ref (Block50Data* _data50_)
{
	g_atomic_int_inc (&_data50_->_ref_count_);
	return _data50_;
}

static void
block50_data_unref (void * _userdata_)
{
	Block50Data* _data50_;
	_data50_ = (Block50Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data50_->_ref_count_)) {
		_g_free0 (_data50_->disk_file);
		_g_free0 (_data50_->source_file);
		_g_free0 (_data50_->dest_name);
		g_slice_free (Block50Data, _data50_);
	}
}

static void
___lambda19_ (Block50Data* _data50_,
              GError** error)
{
	GError* _inner_error0_ = NULL;
	boxes_unattended_file_copy_with_libarchive (_data50_->disk_file, _data50_->source_file, _data50_->dest_name, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return;
	}
}

static void
____lambda19__boxes_async_launcher_run_in_thread_func (gpointer self,
                                                       GError** error)
{
	___lambda19_ (self, error);
}

static void
boxes_unattended_file_default_copy_ready (GObject* source_object,
                                          GAsyncResult* _res_,
                                          gpointer _user_data_)
{
	BoxesUnattendedFileDefaultCopyData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_unattended_file_default_copy_co (_data_);
}

static gboolean
boxes_unattended_file_default_copy_co (BoxesUnattendedFileDefaultCopyData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data50_ = g_slice_new0 (Block50Data);
	_data_->_data50_->_ref_count_ = 1;
	_g_free0 (_data_->_data50_->disk_file);
	_data_->_data50_->disk_file = _data_->disk_file;
	_g_free0 (_data_->_data50_->source_file);
	_data_->_data50_->source_file = _data_->source_file;
	_g_free0 (_data_->_data50_->dest_name);
	_data_->_data50_->dest_name = _data_->dest_name;
	_data_->_data50_->_async_data_ = _data_;
	g_debug ("unattended-file.vala:26: Copying unattended file '%s' into disk drive/" \
"image '%s'", _data_->_data50_->dest_name, _data_->_data50_->disk_file);
	if (boxes_unattended_file_is_libarchive_compatible (_data_->_data50_->disk_file)) {
		_data_->_tmp0_ = boxes_app_app;
		_data_->_tmp1_ = _data_->_tmp0_->async_launcher;
		_data_->_state_ = 1;
		boxes_async_launcher_launch (_data_->_tmp1_, ____lambda19__boxes_async_launcher_run_in_thread_func, block50_data_ref (_data_->_data50_), block50_data_unref, boxes_unattended_file_default_copy_ready, _data_);
		return FALSE;
		_state_1:
		boxes_async_launcher_launch_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			block50_data_unref (_data_->_data50_);
			_data_->_data50_ = NULL;
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	g_debug ("unattended-file.vala:34: Copied unattended file '%s' into disk drive/i" \
"mage '%s'", _data_->_data50_->dest_name, _data_->_data50_->disk_file);
	block50_data_unref (_data_->_data50_);
	_data_->_data50_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

GFile*
boxes_unattended_file_get_source_file_finish (BoxesUnattendedFile* self,
                                              GAsyncResult* _res_,
                                              GError** error)
{
	BoxesUnattendedFileIface* _iface_;
	_iface_ = BOXES_UNATTENDED_FILE_GET_INTERFACE (self);
	if (_iface_->get_source_file_finish) {
		return _iface_->get_source_file_finish (self, _res_, error);
	}
	return NULL;
}

static void
boxes_unattended_file_copy_with_libarchive (const gchar* disk_file,
                                            const gchar* source_file,
                                            const gchar* dest_name,
                                            GError** error)
{
	BoxesArchiveReader* reader = NULL;
	BoxesArchiveReader* _tmp0_;
	BoxesArchiveWriter* writer = NULL;
	BoxesArchiveReader* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	BoxesArchiveWriter* _tmp4_;
	BoxesArchiveWriter* _tmp5_;
	BoxesArchiveWriter* _tmp6_;
	BoxesArchiveReader* _tmp7_;
	gchar* _tmp8_;
	gchar** _tmp9_;
	gchar** _tmp10_;
	gint _tmp10__length1;
	BoxesArchiveWriter* _tmp11_;
	GFile* src = NULL;
	gchar* _tmp12_;
	gchar* _tmp13_;
	GFile* _tmp14_;
	GFile* _tmp15_;
	GFile* dst = NULL;
	GFile* _tmp16_;
	GFile* _tmp17_;
	GFile* _tmp18_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (disk_file != NULL);
	g_return_if_fail (source_file != NULL);
	g_return_if_fail (dest_name != NULL);
	_tmp0_ = boxes_archive_reader_new (disk_file, NULL, NULL, &_inner_error0_);
	reader = _tmp0_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return;
	}
	_tmp1_ = reader;
	_tmp2_ = g_strconcat (disk_file, "~", NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = boxes_archive_writer_new_from_archive_reader (_tmp1_, _tmp3_, FALSE, &_inner_error0_);
	_tmp5_ = _tmp4_;
	_g_free0 (_tmp3_);
	writer = _tmp5_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		_g_object_unref0 (reader);
		return;
	}
	_tmp6_ = writer;
	_tmp7_ = reader;
	_tmp8_ = g_strdup (dest_name);
	_tmp9_ = g_new0 (gchar*, 1 + 1);
	_tmp9_[0] = _tmp8_;
	_tmp10_ = _tmp9_;
	_tmp10__length1 = 1;
	boxes_archive_writer_import_read_archive (_tmp6_, _tmp7_, _tmp10_, (gint) 1, FALSE, &_inner_error0_);
	_tmp10_ = (_vala_array_free (_tmp10_, _tmp10__length1, (GDestroyNotify) g_free), NULL);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		_g_object_unref0 (writer);
		_g_object_unref0 (reader);
		return;
	}
	_tmp11_ = writer;
	boxes_archive_writer_insert_file (_tmp11_, source_file, dest_name, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		_g_object_unref0 (writer);
		_g_object_unref0 (reader);
		return;
	}
	_g_object_unref0 (reader);
	reader = NULL;
	_g_object_unref0 (writer);
	writer = NULL;
	_tmp12_ = g_strconcat (disk_file, "~", NULL);
	_tmp13_ = _tmp12_;
	_tmp14_ = g_file_new_for_path (_tmp13_);
	_tmp15_ = _tmp14_;
	_g_free0 (_tmp13_);
	src = _tmp15_;
	_tmp16_ = g_file_new_for_path (disk_file);
	dst = _tmp16_;
	_tmp17_ = src;
	_tmp18_ = dst;
	g_file_move (_tmp17_, _tmp18_, G_FILE_COPY_OVERWRITE, NULL, NULL, NULL, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		_g_object_unref0 (dst);
		_g_object_unref0 (src);
		_g_object_unref0 (writer);
		_g_object_unref0 (reader);
		return;
	}
	_g_object_unref0 (dst);
	_g_object_unref0 (src);
	_g_object_unref0 (writer);
	_g_object_unref0 (reader);
}

static gboolean
boxes_unattended_file_is_libarchive_compatible (const gchar* filename)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	g_return_val_if_fail (filename != NULL, FALSE);
	if (!g_str_has_suffix (filename, ".img")) {
		_tmp0_ = !g_str_has_suffix (filename, ".IMG");
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

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

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

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

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

gchar*
boxes_unattended_file_get_disk_file (BoxesUnattendedFile* self)
{
	gchar* result;
	BoxesUnattendedInstaller* _tmp0_;
	BoxesUnattendedInstaller* _tmp1_;
	GFile* _tmp2_;
	gchar* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = boxes_unattended_file_get_installer (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->disk_file;
	_tmp3_ = g_file_get_path (_tmp2_);
	result = _tmp3_;
	return result;
}

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

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

static void
boxes_unattended_file_default_init (BoxesUnattendedFileIface * iface,
                                    gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_string ("src-path", "src-path", "src-path", NULL, G_PARAM_STATIC_STRINGS | 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_STRINGS | 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_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	iface->copy = boxes_unattended_file_real_copy;
	iface->copy_finish = boxes_unattended_file_real_copy_finish;
}

static GType
boxes_unattended_file_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BoxesUnattendedFileIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_unattended_file_default_init, (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);
	return boxes_unattended_file_type_id;
}

GType
boxes_unattended_file_get_type (void)
{
	static volatile gsize boxes_unattended_file_type_id__once = 0;
	if (g_once_init_enter (&boxes_unattended_file_type_id__once)) {
		GType boxes_unattended_file_type_id;
		boxes_unattended_file_type_id = boxes_unattended_file_get_type_once ();
		g_once_init_leave (&boxes_unattended_file_type_id__once, boxes_unattended_file_type_id);
	}
	return boxes_unattended_file_type_id__once;
}

static inline gpointer
boxes_unattended_raw_file_get_instance_private (BoxesUnattendedRawFile* self)
{
	return G_STRUCT_MEMBER_P (self, BoxesUnattendedRawFile_private_offset);
}

BoxesUnattendedRawFile*
boxes_unattended_raw_file_construct (GType object_type,
                                     BoxesUnattendedInstaller* installer,
                                     const gchar* src_path,
                                     const gchar* dest_name)
{
	BoxesUnattendedRawFile * self = NULL;
	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);
	boxes_unattended_file_set_installer ((BoxesUnattendedFile*) self, installer);
	boxes_unattended_file_set_src_path ((BoxesUnattendedFile*) self, src_path);
	boxes_unattended_file_set_dest_name ((BoxesUnattendedFile*) self, dest_name);
	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_;
	self = (BoxesUnattendedRawFile*) base;
	_data_ = g_slice_new0 (BoxesUnattendedRawFileGetSourceFileData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_unattended_raw_file_real_get_source_file_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp1_;
	boxes_unattended_raw_file_real_get_source_file_co (_data_);
}

static GFile*
boxes_unattended_raw_file_get_source_file_finish (BoxesUnattendedFile* base,
                                                  GAsyncResult* _res_,
                                                  GError** error)
{
	GFile* result;
	BoxesUnattendedRawFileGetSourceFileData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return NULL;
	}
	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_ = g_file_new_for_path (_data_->_tmp1_);
	_data_->result = _data_->_tmp2_;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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;
	gchar* old_value;
	self = (BoxesUnattendedRawFile*) base;
	old_value = boxes_unattended_raw_file_real_get_dest_name (base);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_dest_name);
		self->priv->_dest_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, boxes_unattended_raw_file_properties[BOXES_UNATTENDED_RAW_FILE_DEST_NAME_PROPERTY]);
	}
}

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;
	gchar* old_value;
	self = (BoxesUnattendedRawFile*) base;
	old_value = boxes_unattended_raw_file_real_get_src_path (base);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_src_path);
		self->priv->_src_path = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, boxes_unattended_raw_file_properties[BOXES_UNATTENDED_RAW_FILE_SRC_PATH_PROPERTY]);
	}
}

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* old_value;
	self = (BoxesUnattendedRawFile*) base;
	old_value = boxes_unattended_raw_file_real_get_installer (base);
	if (old_value != value) {
		BoxesUnattendedInstaller* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_installer);
		self->priv->_installer = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, boxes_unattended_raw_file_properties[BOXES_UNATTENDED_RAW_FILE_INSTALLER_PROPERTY]);
	}
}

static void
boxes_unattended_raw_file_class_init (BoxesUnattendedRawFileClass * klass,
                                      gpointer klass_data)
{
	boxes_unattended_raw_file_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BoxesUnattendedRawFile_private_offset);
	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_DEST_NAME_PROPERTY, boxes_unattended_raw_file_properties[BOXES_UNATTENDED_RAW_FILE_DEST_NAME_PROPERTY] = g_param_spec_string ("dest-name", "dest-name", "dest-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_UNATTENDED_RAW_FILE_SRC_PATH_PROPERTY, boxes_unattended_raw_file_properties[BOXES_UNATTENDED_RAW_FILE_SRC_PATH_PROPERTY] = g_param_spec_string ("src-path", "src-path", "src-path", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_UNATTENDED_RAW_FILE_INSTALLER_PROPERTY, boxes_unattended_raw_file_properties[BOXES_UNATTENDED_RAW_FILE_INSTALLER_PROPERTY] = g_param_spec_object ("installer", "installer", "installer", BOXES_TYPE_UNATTENDED_INSTALLER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
boxes_unattended_raw_file_boxes_unattended_file_interface_init (BoxesUnattendedFileIface * iface,
                                                                gpointer iface_data)
{
	boxes_unattended_raw_file_boxes_unattended_file_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_source_file = (void (*) (BoxesUnattendedFile*, GCancellable*, GAsyncReadyCallback, gpointer)) boxes_unattended_raw_file_real_get_source_file;
	iface->get_source_file_finish = (GFile* (*) (BoxesUnattendedFile*, GAsyncResult*, GError**)) boxes_unattended_raw_file_get_source_file_finish;
	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_src_path = boxes_unattended_raw_file_real_get_src_path;
	iface->set_src_path = boxes_unattended_raw_file_real_set_src_path;
	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,
                                         gpointer klass)
{
	self->priv = boxes_unattended_raw_file_get_instance_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->_dest_name);
	_g_free0 (self->priv->_src_path);
	_g_object_unref0 (self->priv->_installer);
	G_OBJECT_CLASS (boxes_unattended_raw_file_parent_class)->finalize (obj);
}

static GType
boxes_unattended_raw_file_get_type_once (void)
{
	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);
	BoxesUnattendedRawFile_private_offset = g_type_add_instance_private (boxes_unattended_raw_file_type_id, sizeof (BoxesUnattendedRawFilePrivate));
	return boxes_unattended_raw_file_type_id;
}

GType
boxes_unattended_raw_file_get_type (void)
{
	static volatile gsize boxes_unattended_raw_file_type_id__once = 0;
	if (g_once_init_enter (&boxes_unattended_raw_file_type_id__once)) {
		GType boxes_unattended_raw_file_type_id;
		boxes_unattended_raw_file_type_id = boxes_unattended_raw_file_get_type_once ();
		g_once_init_leave (&boxes_unattended_raw_file_type_id__once, boxes_unattended_raw_file_type_id);
	}
	return boxes_unattended_raw_file_type_id__once;
}

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_DEST_NAME_PROPERTY:
		g_value_set_string (value, boxes_unattended_file_get_dest_name ((BoxesUnattendedFile*) self));
		break;
		case BOXES_UNATTENDED_RAW_FILE_SRC_PATH_PROPERTY:
		g_value_set_string (value, boxes_unattended_file_get_src_path ((BoxesUnattendedFile*) self));
		break;
		case BOXES_UNATTENDED_RAW_FILE_INSTALLER_PROPERTY:
		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_DEST_NAME_PROPERTY:
		boxes_unattended_file_set_dest_name ((BoxesUnattendedFile*) self, g_value_get_string (value));
		break;
		case BOXES_UNATTENDED_RAW_FILE_SRC_PATH_PROPERTY:
		boxes_unattended_file_set_src_path ((BoxesUnattendedFile*) self, g_value_get_string (value));
		break;
		case BOXES_UNATTENDED_RAW_FILE_INSTALLER_PROPERTY:
		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;
	}
}

static inline gpointer
boxes_unattended_script_file_get_instance_private (BoxesUnattendedScriptFile* self)
{
	return G_STRUCT_MEMBER_P (self, BoxesUnattendedScriptFile_private_offset);
}

BoxesUnattendedScriptFile*
boxes_unattended_script_file_construct (GType object_type,
                                        BoxesUnattendedInstaller* installer,
                                        OsinfoInstallScript* script,
                                        const gchar* dest_name,
                                        GError** error)
{
	BoxesUnattendedScriptFile * self = NULL;
	OsinfoInstallScriptInjectionMethod injection_methods = 0U;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (installer != NULL, NULL);
	g_return_val_if_fail (script != NULL, NULL);
	g_return_val_if_fail (dest_name != NULL, NULL);
	self = (BoxesUnattendedScriptFile*) g_object_new (object_type, NULL);
	boxes_unattended_file_set_installer ((BoxesUnattendedFile*) self, installer);
	boxes_unattended_script_file_set_script (self, script);
	boxes_unattended_file_set_dest_name ((BoxesUnattendedFile*) self, dest_name);
	injection_methods = osinfo_install_script_get_injection_methods (script);
	if ((injection_methods & OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_INITRD) == OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_INITRD) {
		boxes_unattended_script_file_set_injection_method (self, OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_INITRD);
	} else {
		if ((injection_methods & OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_DISK) == OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_DISK) {
			boxes_unattended_script_file_set_injection_method (self, OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_DISK);
		} else {
			if ((injection_methods & OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_CDROM) == OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_CDROM) {
				boxes_unattended_script_file_set_injection_method (self, OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_CDROM);
			} else {
				GError* _tmp0_;
				_tmp0_ = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "No supported injection method available.");
				_inner_error0_ = _tmp0_;
				g_propagate_error (error, _inner_error0_);
				_g_object_unref0 (self);
				return NULL;
			}
		}
	}
	return self;
}

BoxesUnattendedScriptFile*
boxes_unattended_script_file_new (BoxesUnattendedInstaller* installer,
                                  OsinfoInstallScript* script,
                                  const gchar* dest_name,
                                  GError** error)
{
	return boxes_unattended_script_file_construct (BOXES_TYPE_UNATTENDED_SCRIPT_FILE, installer, script, dest_name, error);
}

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

static void
boxes_unattended_script_file_real_copy (BoxesUnattendedFile* base,
                                        GCancellable* cancellable,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	BoxesUnattendedScriptFile * self;
	BoxesUnattendedScriptFileCopyData* _data_;
	BoxesUnattendedScriptFile* _tmp0_;
	GCancellable* _tmp1_;
	self = (BoxesUnattendedScriptFile*) base;
	_data_ = g_slice_new0 (BoxesUnattendedScriptFileCopyData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_unattended_script_file_real_copy_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp1_;
	boxes_unattended_script_file_real_copy_co (_data_);
}

static void
boxes_unattended_script_file_copy_finish (BoxesUnattendedFile* base,
                                          GAsyncResult* _res_,
                                          GError** error)
{
	BoxesUnattendedScriptFileCopyData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static void
boxes_unattended_script_file_copy_ready (GObject* source_object,
                                         GAsyncResult* _res_,
                                         gpointer _user_data_)
{
	BoxesUnattendedScriptFileCopyData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_unattended_script_file_real_copy_co (_data_);
}

static gboolean
boxes_unattended_script_file_real_copy_co (BoxesUnattendedScriptFileCopyData* _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_->_state_ = 1;
	boxes_unattended_file_get_source_file ((BoxesUnattendedFile*) _data_->self, _data_->cancellable, boxes_unattended_script_file_copy_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp0_ = boxes_unattended_file_get_source_file_finish ((BoxesUnattendedFile*) _data_->self, _data_->_res_, &_data_->_inner_error0_);
	_data_->source_file = _data_->_tmp0_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp1_ = _data_->self->priv->_injection_method;
	if (_data_->_tmp1_ == OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_INITRD) {
		_data_->_tmp2_ = boxes_unattended_file_get_installer ((BoxesUnattendedFile*) _data_->self);
		_data_->_tmp3_ = _data_->_tmp2_;
		_data_->_tmp4_ = _data_->_tmp3_->initrd_file;
		_data_->_tmp5_ = g_file_get_path (_data_->_tmp4_);
		_data_->_tmp6_ = _data_->_tmp5_;
		_data_->_tmp7_ = _data_->source_file;
		_data_->_tmp8_ = g_file_get_path (_data_->_tmp7_);
		_data_->_tmp9_ = _data_->_tmp8_;
		_data_->_tmp10_ = boxes_unattended_file_get_dest_name ((BoxesUnattendedFile*) _data_->self);
		_data_->_tmp11_ = _data_->_tmp10_;
		boxes_unattended_script_file_initrd_append (_data_->_tmp6_, _data_->_tmp9_, _data_->_tmp11_, &_data_->_inner_error0_);
		_g_free0 (_data_->_tmp9_);
		_g_free0 (_data_->_tmp6_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			_g_object_unref0 (_data_->source_file);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	} else {
		_data_->_tmp12_ = boxes_unattended_file_get_disk_file ((BoxesUnattendedFile*) _data_->self);
		_data_->_tmp13_ = _data_->_tmp12_;
		_data_->_tmp14_ = _data_->_tmp13_;
		_data_->_tmp15_ = _data_->source_file;
		_data_->_tmp16_ = g_file_get_path (_data_->_tmp15_);
		_data_->_tmp17_ = _data_->_tmp16_;
		_data_->_tmp18_ = boxes_unattended_file_get_dest_name ((BoxesUnattendedFile*) _data_->self);
		_data_->_tmp19_ = _data_->_tmp18_;
		_data_->_state_ = 2;
		boxes_unattended_file_default_copy (_data_->_tmp14_, _data_->_tmp17_, _data_->_tmp19_, NULL, boxes_unattended_script_file_copy_ready, _data_);
		return FALSE;
		_state_2:
		boxes_unattended_file_default_copy_finish (_data_->_res_, &_data_->_inner_error0_);
		_g_free0 (_data_->_tmp17_);
		_g_free0 (_data_->_tmp14_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			_g_object_unref0 (_data_->source_file);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	_g_object_unref0 (_data_->source_file);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static GError*
vala_g_io_error_from_errno (gint err_no)
{
	const gchar* _tmp0_;
	GError* _tmp1_;
	GError* result;
	_tmp0_ = g_strerror (err_no);
	_tmp1_ = g_error_new (g_io_error_quark (), g_io_error_from_errno (err_no), "%s", _tmp0_);
	result = (GError*) _tmp1_;
	return result;
}

static void
boxes_unattended_script_file_initrd_append (const gchar* disk_file,
                                            const gchar* source_file,
                                            const gchar* dest_name,
                                            GError** error)
{
	GList* gzip_filter = NULL;
	FILE* file = NULL;
	FILE* _tmp0_;
	FILE* _tmp1_;
	BoxesArchiveWriter* writer = NULL;
	FILE* _tmp3_;
	GList* _tmp4_;
	BoxesArchiveWriter* _tmp5_;
	BoxesArchiveWriter* _tmp6_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (disk_file != NULL);
	g_return_if_fail (source_file != NULL);
	g_return_if_fail (dest_name != NULL);
	g_debug ("unattended-file.vala:125: Appending unattended file '%s' to initrd '%s" \
"'", dest_name, disk_file);
	gzip_filter = NULL;
	gzip_filter = g_list_append (gzip_filter, (gpointer) ((gintptr) ARCHIVE_FILTER_GZIP));
	_tmp0_ = g_fopen (disk_file, "a");
	file = _tmp0_;
	_tmp1_ = file;
	if (_tmp1_ == NULL) {
		GError* _tmp2_;
		_tmp2_ = vala_g_io_error_from_errno (errno);
		_inner_error0_ = _tmp2_;
		g_propagate_error (error, _inner_error0_);
		_fclose0 (file);
		(gzip_filter == NULL) ? NULL : (gzip_filter = (g_list_free (gzip_filter), NULL));
		return;
	}
	_tmp3_ = file;
	_tmp4_ = gzip_filter;
	_tmp5_ = boxes_archive_writer_new_from_fd (fileno (_tmp3_), ARCHIVE_FORMAT_CPIO_SVR4_NOCRC, _tmp4_, &_inner_error0_);
	writer = _tmp5_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		_fclose0 (file);
		(gzip_filter == NULL) ? NULL : (gzip_filter = (g_list_free (gzip_filter), NULL));
		return;
	}
	_tmp6_ = writer;
	boxes_archive_writer_insert_file (_tmp6_, source_file, dest_name, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		_g_object_unref0 (writer);
		_fclose0 (file);
		(gzip_filter == NULL) ? NULL : (gzip_filter = (g_list_free (gzip_filter), NULL));
		return;
	}
	g_debug ("unattended-file.vala:133: Appended unattended file '%s' to initrd '%s'", dest_name, disk_file);
	_g_object_unref0 (writer);
	_fclose0 (file);
	(gzip_filter == NULL) ? NULL : (gzip_filter = (g_list_free (gzip_filter), NULL));
}

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

static void
boxes_unattended_script_file_real_get_source_file (BoxesUnattendedFile* base,
                                                   GCancellable* cancellable,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_)
{
	BoxesUnattendedScriptFile * self;
	BoxesUnattendedScriptFileGetSourceFileData* _data_;
	BoxesUnattendedScriptFile* _tmp0_;
	GCancellable* _tmp1_;
	self = (BoxesUnattendedScriptFile*) base;
	_data_ = g_slice_new0 (BoxesUnattendedScriptFileGetSourceFileData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_unattended_script_file_real_get_source_file_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp1_;
	boxes_unattended_script_file_real_get_source_file_co (_data_);
}

static GFile*
boxes_unattended_script_file_get_source_file_finish (BoxesUnattendedFile* base,
                                                     GAsyncResult* _res_,
                                                     GError** error)
{
	GFile* result;
	BoxesUnattendedScriptFileGetSourceFileData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return NULL;
	}
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
boxes_unattended_script_file_get_source_file_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_)
{
	BoxesUnattendedScriptFileGetSourceFileData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_unattended_script_file_real_get_source_file_co (_data_);
}

static gboolean
boxes_unattended_script_file_real_get_source_file_co (BoxesUnattendedScriptFileGetSourceFileData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = boxes_unattended_file_get_installer ((BoxesUnattendedFile*) _data_->self);
	_data_->_tmp1_ = _data_->_tmp0_;
	_data_->_tmp2_ = _data_->self->priv->_script;
	boxes_unattended_installer_configure_install_script (_data_->_tmp1_, _data_->_tmp2_);
	_data_->_tmp3_ = boxes_get_user_pkgcache (NULL);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = g_file_new_for_path (_data_->_tmp4_);
	_data_->_tmp6_ = _data_->_tmp5_;
	_g_free0 (_data_->_tmp4_);
	_data_->output_dir = _data_->_tmp6_;
	_data_->_tmp8_ = _data_->self->priv->_script;
	_data_->_tmp9_ = boxes_unattended_file_get_installer ((BoxesUnattendedFile*) _data_->self);
	_data_->_tmp10_ = _data_->_tmp9_;
	_data_->_tmp11_ = ((BoxesInstallerMedia*) _data_->_tmp10_)->os_media;
	_data_->_tmp12_ = boxes_unattended_file_get_installer ((BoxesUnattendedFile*) _data_->self);
	_data_->_tmp13_ = _data_->_tmp12_;
	_data_->_tmp14_ = _data_->_tmp13_->config;
	_data_->_state_ = 1;
	osinfo_install_script_generate_output_for_media_async (_data_->_tmp8_, _data_->_tmp11_, _data_->_tmp14_, _data_->output_dir, _data_->cancellable, boxes_unattended_script_file_get_source_file_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp15_ = osinfo_install_script_generate_output_for_media_finish (_data_->_tmp8_, _data_->_res_, &_data_->_inner_error0_);
	_data_->_tmp7_ = _data_->_tmp15_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_g_object_unref0 (_data_->output_dir);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp16_ = _data_->_tmp7_;
	_data_->_tmp7_ = NULL;
	_g_object_unref0 (_data_->self->priv->unattended_tmp);
	_data_->self->priv->unattended_tmp = _data_->_tmp16_;
	_data_->_tmp17_ = _data_->self->priv->unattended_tmp;
	_data_->_tmp18_ = _g_object_ref0 (_data_->_tmp17_);
	_data_->result = _data_->_tmp18_;
	_g_object_unref0 (_data_->_tmp7_);
	_g_object_unref0 (_data_->output_dir);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

static void
boxes_unattended_script_file_real_set_dest_name (BoxesUnattendedFile* base,
                                                 const gchar* value)
{
	BoxesUnattendedScriptFile* self;
	gchar* old_value;
	self = (BoxesUnattendedScriptFile*) base;
	old_value = boxes_unattended_script_file_real_get_dest_name (base);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_dest_name);
		self->priv->_dest_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, boxes_unattended_script_file_properties[BOXES_UNATTENDED_SCRIPT_FILE_DEST_NAME_PROPERTY]);
	}
}

static const gchar*
boxes_unattended_script_file_real_get_src_path (BoxesUnattendedFile* base)
{
	const gchar* result;
	BoxesUnattendedScriptFile* self;
	const gchar* _tmp0_;
	self = (BoxesUnattendedScriptFile*) base;
	_tmp0_ = self->priv->_src_path;
	result = _tmp0_;
	return result;
}

static void
boxes_unattended_script_file_real_set_src_path (BoxesUnattendedFile* base,
                                                const gchar* value)
{
	BoxesUnattendedScriptFile* self;
	gchar* old_value;
	self = (BoxesUnattendedScriptFile*) base;
	old_value = boxes_unattended_script_file_real_get_src_path (base);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_src_path);
		self->priv->_src_path = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, boxes_unattended_script_file_properties[BOXES_UNATTENDED_SCRIPT_FILE_SRC_PATH_PROPERTY]);
	}
}

OsinfoInstallScriptInjectionMethod
boxes_unattended_script_file_get_injection_method (BoxesUnattendedScriptFile* self)
{
	OsinfoInstallScriptInjectionMethod result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_injection_method;
	return result;
}

void
boxes_unattended_script_file_set_injection_method (BoxesUnattendedScriptFile* self,
                                                   OsinfoInstallScriptInjectionMethod value)
{
	OsinfoInstallScriptInjectionMethod old_value;
	g_return_if_fail (self != NULL);
	old_value = boxes_unattended_script_file_get_injection_method (self);
	if (old_value != value) {
		self->priv->_injection_method = value;
		g_object_notify_by_pspec ((GObject *) self, boxes_unattended_script_file_properties[BOXES_UNATTENDED_SCRIPT_FILE_INJECTION_METHOD_PROPERTY]);
	}
}

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

static void
boxes_unattended_script_file_real_set_installer (BoxesUnattendedFile* base,
                                                 BoxesUnattendedInstaller* value)
{
	BoxesUnattendedScriptFile* self;
	BoxesUnattendedInstaller* old_value;
	self = (BoxesUnattendedScriptFile*) base;
	old_value = boxes_unattended_script_file_real_get_installer (base);
	if (old_value != value) {
		BoxesUnattendedInstaller* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_installer);
		self->priv->_installer = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, boxes_unattended_script_file_properties[BOXES_UNATTENDED_SCRIPT_FILE_INSTALLER_PROPERTY]);
	}
}

OsinfoInstallScript*
boxes_unattended_script_file_get_script (BoxesUnattendedScriptFile* self)
{
	OsinfoInstallScript* result;
	OsinfoInstallScript* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_script;
	result = _tmp0_;
	return result;
}

void
boxes_unattended_script_file_set_script (BoxesUnattendedScriptFile* self,
                                         OsinfoInstallScript* value)
{
	OsinfoInstallScript* old_value;
	g_return_if_fail (self != NULL);
	old_value = boxes_unattended_script_file_get_script (self);
	if (old_value != value) {
		OsinfoInstallScript* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_script);
		self->priv->_script = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, boxes_unattended_script_file_properties[BOXES_UNATTENDED_SCRIPT_FILE_SCRIPT_PROPERTY]);
	}
}

static void
boxes_unattended_script_file_class_init (BoxesUnattendedScriptFileClass * klass,
                                         gpointer klass_data)
{
	boxes_unattended_script_file_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BoxesUnattendedScriptFile_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_unattended_script_file_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_unattended_script_file_set_property;
	G_OBJECT_CLASS (klass)->finalize = boxes_unattended_script_file_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_UNATTENDED_SCRIPT_FILE_DEST_NAME_PROPERTY, boxes_unattended_script_file_properties[BOXES_UNATTENDED_SCRIPT_FILE_DEST_NAME_PROPERTY] = g_param_spec_string ("dest-name", "dest-name", "dest-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_UNATTENDED_SCRIPT_FILE_SRC_PATH_PROPERTY, boxes_unattended_script_file_properties[BOXES_UNATTENDED_SCRIPT_FILE_SRC_PATH_PROPERTY] = g_param_spec_string ("src-path", "src-path", "src-path", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_UNATTENDED_SCRIPT_FILE_INJECTION_METHOD_PROPERTY, boxes_unattended_script_file_properties[BOXES_UNATTENDED_SCRIPT_FILE_INJECTION_METHOD_PROPERTY] = g_param_spec_flags ("injection-method", "injection-method", "injection-method", osinfo_install_script_injection_method_get_type (), 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_UNATTENDED_SCRIPT_FILE_INSTALLER_PROPERTY, boxes_unattended_script_file_properties[BOXES_UNATTENDED_SCRIPT_FILE_INSTALLER_PROPERTY] = g_param_spec_object ("installer", "installer", "installer", BOXES_TYPE_UNATTENDED_INSTALLER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_UNATTENDED_SCRIPT_FILE_SCRIPT_PROPERTY, boxes_unattended_script_file_properties[BOXES_UNATTENDED_SCRIPT_FILE_SCRIPT_PROPERTY] = g_param_spec_object ("script", "script", "script", osinfo_install_script_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
boxes_unattended_script_file_boxes_unattended_file_interface_init (BoxesUnattendedFileIface * iface,
                                                                   gpointer iface_data)
{
	boxes_unattended_script_file_boxes_unattended_file_parent_iface = g_type_interface_peek_parent (iface);
	iface->copy = (void (*) (BoxesUnattendedFile*, GCancellable*, GAsyncReadyCallback, gpointer)) boxes_unattended_script_file_real_copy;
	iface->copy_finish = (void (*) (BoxesUnattendedFile*, GAsyncResult*, GError**)) boxes_unattended_script_file_copy_finish;
	iface->get_source_file = (void (*) (BoxesUnattendedFile*, GCancellable*, GAsyncReadyCallback, gpointer)) boxes_unattended_script_file_real_get_source_file;
	iface->get_source_file_finish = (GFile* (*) (BoxesUnattendedFile*, GAsyncResult*, GError**)) boxes_unattended_script_file_get_source_file_finish;
	iface->get_dest_name = boxes_unattended_script_file_real_get_dest_name;
	iface->set_dest_name = boxes_unattended_script_file_real_set_dest_name;
	iface->get_src_path = boxes_unattended_script_file_real_get_src_path;
	iface->set_src_path = boxes_unattended_script_file_real_set_src_path;
	iface->get_installer = boxes_unattended_script_file_real_get_installer;
	iface->set_installer = boxes_unattended_script_file_real_set_installer;
}

static void
boxes_unattended_script_file_instance_init (BoxesUnattendedScriptFile * self,
                                            gpointer klass)
{
	self->priv = boxes_unattended_script_file_get_instance_private (self);
}

static void
boxes_unattended_script_file_finalize (GObject * obj)
{
	BoxesUnattendedScriptFile * self;
	GFile* _tmp0_;
	GError* _inner_error0_ = NULL;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_UNATTENDED_SCRIPT_FILE, BoxesUnattendedScriptFile);
	_tmp0_ = self->priv->unattended_tmp;
	if (_tmp0_ == NULL) {
		goto _return;
	}
	{
		GFile* _tmp1_;
		_tmp1_ = self->priv->unattended_tmp;
		boxes_delete_file (_tmp1_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GFile* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GError* _tmp5_;
		const gchar* _tmp6_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp2_ = self->priv->unattended_tmp;
		_tmp3_ = g_file_get_path (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = e;
		_tmp6_ = _tmp5_->message;
		g_warning ("unattended-file.vala:143: Error deleting %s: %s", _tmp4_, _tmp6_);
		_g_free0 (_tmp4_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
	}
	_return:
	_g_free0 (self->priv->_dest_name);
	_g_free0 (self->priv->_src_path);
	_g_object_unref0 (self->priv->_installer);
	_g_object_unref0 (self->priv->_script);
	_g_object_unref0 (self->priv->unattended_tmp);
	G_OBJECT_CLASS (boxes_unattended_script_file_parent_class)->finalize (obj);
}

static GType
boxes_unattended_script_file_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BoxesUnattendedScriptFileClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_unattended_script_file_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesUnattendedScriptFile), 0, (GInstanceInitFunc) boxes_unattended_script_file_instance_init, NULL };
	static const GInterfaceInfo boxes_unattended_file_info = { (GInterfaceInitFunc) boxes_unattended_script_file_boxes_unattended_file_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType boxes_unattended_script_file_type_id;
	boxes_unattended_script_file_type_id = g_type_register_static (G_TYPE_OBJECT, "BoxesUnattendedScriptFile", &g_define_type_info, 0);
	g_type_add_interface_static (boxes_unattended_script_file_type_id, BOXES_TYPE_UNATTENDED_FILE, &boxes_unattended_file_info);
	BoxesUnattendedScriptFile_private_offset = g_type_add_instance_private (boxes_unattended_script_file_type_id, sizeof (BoxesUnattendedScriptFilePrivate));
	return boxes_unattended_script_file_type_id;
}

GType
boxes_unattended_script_file_get_type (void)
{
	static volatile gsize boxes_unattended_script_file_type_id__once = 0;
	if (g_once_init_enter (&boxes_unattended_script_file_type_id__once)) {
		GType boxes_unattended_script_file_type_id;
		boxes_unattended_script_file_type_id = boxes_unattended_script_file_get_type_once ();
		g_once_init_leave (&boxes_unattended_script_file_type_id__once, boxes_unattended_script_file_type_id);
	}
	return boxes_unattended_script_file_type_id__once;
}

static void
_vala_boxes_unattended_script_file_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec)
{
	BoxesUnattendedScriptFile * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_UNATTENDED_SCRIPT_FILE, BoxesUnattendedScriptFile);
	switch (property_id) {
		case BOXES_UNATTENDED_SCRIPT_FILE_DEST_NAME_PROPERTY:
		g_value_set_string (value, boxes_unattended_file_get_dest_name ((BoxesUnattendedFile*) self));
		break;
		case BOXES_UNATTENDED_SCRIPT_FILE_SRC_PATH_PROPERTY:
		g_value_set_string (value, boxes_unattended_file_get_src_path ((BoxesUnattendedFile*) self));
		break;
		case BOXES_UNATTENDED_SCRIPT_FILE_INJECTION_METHOD_PROPERTY:
		g_value_set_flags (value, boxes_unattended_script_file_get_injection_method (self));
		break;
		case BOXES_UNATTENDED_SCRIPT_FILE_INSTALLER_PROPERTY:
		g_value_set_object (value, boxes_unattended_file_get_installer ((BoxesUnattendedFile*) self));
		break;
		case BOXES_UNATTENDED_SCRIPT_FILE_SCRIPT_PROPERTY:
		g_value_set_object (value, boxes_unattended_script_file_get_script (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_boxes_unattended_script_file_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec)
{
	BoxesUnattendedScriptFile * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_UNATTENDED_SCRIPT_FILE, BoxesUnattendedScriptFile);
	switch (property_id) {
		case BOXES_UNATTENDED_SCRIPT_FILE_DEST_NAME_PROPERTY:
		boxes_unattended_file_set_dest_name ((BoxesUnattendedFile*) self, g_value_get_string (value));
		break;
		case BOXES_UNATTENDED_SCRIPT_FILE_SRC_PATH_PROPERTY:
		boxes_unattended_file_set_src_path ((BoxesUnattendedFile*) self, g_value_get_string (value));
		break;
		case BOXES_UNATTENDED_SCRIPT_FILE_INJECTION_METHOD_PROPERTY:
		boxes_unattended_script_file_set_injection_method (self, g_value_get_flags (value));
		break;
		case BOXES_UNATTENDED_SCRIPT_FILE_INSTALLER_PROPERTY:
		boxes_unattended_file_set_installer ((BoxesUnattendedFile*) self, g_value_get_object (value));
		break;
		case BOXES_UNATTENDED_SCRIPT_FILE_SCRIPT_PROPERTY:
		boxes_unattended_script_file_set_script (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize 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,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

