/* vm-creator.c generated by valac 0.17.5.2-8558, the Vala compiler
 * generated from vm-creator.vala, do not modify */

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

#include <glib.h>
#include <glib-object.h>
#include <clutter/clutter.h>
#include <gio/gio.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <libcommon.h>
#include <libvirt-gobject/libvirt-gobject.h>
#include <libvirt-gconfig/libvirt-gconfig.h>
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <clutter-gtk/clutter-gtk.h>
#include <glib/gi18n-lib.h>
#include <osinfo/osinfo.h>
#include <config.h>
#include <gobject/gvaluecollector.h>


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

#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 _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define BOXES_TYPE_UI (boxes_ui_get_type ())
#define BOXES_UI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UI, BoxesUI))
#define BOXES_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_UI, BoxesUIClass))
#define BOXES_IS_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UI))
#define BOXES_IS_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_UI))
#define BOXES_UI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_UI, BoxesUIClass))

typedef struct _BoxesUI BoxesUI;
typedef struct _BoxesUIClass BoxesUIClass;

#define BOXES_TYPE_COLLECTION_ITEM (boxes_collection_item_get_type ())
#define BOXES_COLLECTION_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItem))
#define BOXES_COLLECTION_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItemClass))
#define BOXES_IS_COLLECTION_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_ITEM))
#define BOXES_IS_COLLECTION_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_ITEM))
#define BOXES_COLLECTION_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItemClass))

typedef struct _BoxesCollectionItem BoxesCollectionItem;
typedef struct _BoxesCollectionItemClass BoxesCollectionItemClass;

#define BOXES_TYPE_MACHINE (boxes_machine_get_type ())
#define BOXES_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_MACHINE, BoxesMachine))
#define BOXES_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_MACHINE, BoxesMachineClass))
#define BOXES_IS_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_MACHINE))
#define BOXES_IS_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_MACHINE))
#define BOXES_MACHINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_MACHINE, BoxesMachineClass))

typedef struct _BoxesMachine BoxesMachine;
typedef struct _BoxesMachineClass BoxesMachineClass;

#define BOXES_TYPE_LIBVIRT_MACHINE (boxes_libvirt_machine_get_type ())
#define BOXES_LIBVIRT_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_LIBVIRT_MACHINE, BoxesLibvirtMachine))
#define BOXES_LIBVIRT_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_LIBVIRT_MACHINE, BoxesLibvirtMachineClass))
#define BOXES_IS_LIBVIRT_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_LIBVIRT_MACHINE))
#define BOXES_IS_LIBVIRT_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_LIBVIRT_MACHINE))
#define BOXES_LIBVIRT_MACHINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_LIBVIRT_MACHINE, BoxesLibvirtMachineClass))

typedef struct _BoxesLibvirtMachine BoxesLibvirtMachine;
typedef struct _BoxesLibvirtMachineClass BoxesLibvirtMachineClass;
typedef struct _BoxesUIPrivate BoxesUIPrivate;

#define BOXES_TYPE_UI_STATE (boxes_ui_state_get_type ())
typedef struct _BoxesCollectionItemPrivate BoxesCollectionItemPrivate;

#define BOXES_TYPE_IPROPERTIES_PROVIDER (boxes_iproperties_provider_get_type ())
#define BOXES_IPROPERTIES_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_IPROPERTIES_PROVIDER, BoxesIPropertiesProvider))
#define BOXES_IS_IPROPERTIES_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_IPROPERTIES_PROVIDER))
#define BOXES_IPROPERTIES_PROVIDER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BOXES_TYPE_IPROPERTIES_PROVIDER, BoxesIPropertiesProviderIface))

typedef struct _BoxesIPropertiesProvider BoxesIPropertiesProvider;
typedef struct _BoxesIPropertiesProviderIface BoxesIPropertiesProviderIface;

#define BOXES_TYPE_PROPERTIES_PAGE (boxes_properties_page_get_type ())

#define BOXES_TYPE_PROPERTY (boxes_property_get_type ())
#define BOXES_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_PROPERTY, BoxesProperty))
#define BOXES_PROPERTY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_PROPERTY, BoxesPropertyClass))
#define BOXES_IS_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_PROPERTY))
#define BOXES_IS_PROPERTY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_PROPERTY))
#define BOXES_PROPERTY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_PROPERTY, BoxesPropertyClass))

typedef struct _BoxesProperty BoxesProperty;
typedef struct _BoxesPropertyClass BoxesPropertyClass;
typedef struct _BoxesMachinePrivate BoxesMachinePrivate;

#define BOXES_TYPE_MACHINE_ACTOR (boxes_machine_actor_get_type ())
#define BOXES_MACHINE_ACTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_MACHINE_ACTOR, BoxesMachineActor))
#define BOXES_MACHINE_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_MACHINE_ACTOR, BoxesMachineActorClass))
#define BOXES_IS_MACHINE_ACTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_MACHINE_ACTOR))
#define BOXES_IS_MACHINE_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_MACHINE_ACTOR))
#define BOXES_MACHINE_ACTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_MACHINE_ACTOR, BoxesMachineActorClass))

typedef struct _BoxesMachineActor BoxesMachineActor;
typedef struct _BoxesMachineActorClass BoxesMachineActorClass;
typedef struct _BoxesLibvirtMachinePrivate BoxesLibvirtMachinePrivate;
#define _boxes_vm_creator_unref0(var) ((var == NULL) ? NULL : (var = (boxes_vm_creator_unref (var), NULL)))
typedef struct _Block40Data Block40Data;
typedef struct _Block41Data Block41Data;

#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;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _BoxesAppPrivate BoxesAppPrivate;

#define BOXES_TYPE_SEARCHBAR (boxes_searchbar_get_type ())
#define BOXES_SEARCHBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SEARCHBAR, BoxesSearchbar))
#define BOXES_SEARCHBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SEARCHBAR, BoxesSearchbarClass))
#define BOXES_IS_SEARCHBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SEARCHBAR))
#define BOXES_IS_SEARCHBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SEARCHBAR))
#define BOXES_SEARCHBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SEARCHBAR, BoxesSearchbarClass))

typedef struct _BoxesSearchbar BoxesSearchbar;
typedef struct _BoxesSearchbarClass BoxesSearchbarClass;

#define BOXES_TYPE_TOPBAR (boxes_topbar_get_type ())
#define BOXES_TOPBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_TOPBAR, BoxesTopbar))
#define BOXES_TOPBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_TOPBAR, BoxesTopbarClass))
#define BOXES_IS_TOPBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_TOPBAR))
#define BOXES_IS_TOPBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_TOPBAR))
#define BOXES_TOPBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_TOPBAR, BoxesTopbarClass))

typedef struct _BoxesTopbar BoxesTopbar;
typedef struct _BoxesTopbarClass BoxesTopbarClass;

#define BOXES_TYPE_NOTIFICATIONBAR (boxes_notificationbar_get_type ())
#define BOXES_NOTIFICATIONBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbar))
#define BOXES_NOTIFICATIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbarClass))
#define BOXES_IS_NOTIFICATIONBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_NOTIFICATIONBAR))
#define BOXES_IS_NOTIFICATIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_NOTIFICATIONBAR))
#define BOXES_NOTIFICATIONBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbarClass))

typedef struct _BoxesNotificationbar BoxesNotificationbar;
typedef struct _BoxesNotificationbarClass BoxesNotificationbarClass;

#define BOXES_TYPE_REVEALER (boxes_revealer_get_type ())
#define BOXES_REVEALER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_REVEALER, BoxesRevealer))
#define BOXES_REVEALER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_REVEALER, BoxesRevealerClass))
#define BOXES_IS_REVEALER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_REVEALER))
#define BOXES_IS_REVEALER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_REVEALER))
#define BOXES_REVEALER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_REVEALER, BoxesRevealerClass))

typedef struct _BoxesRevealer BoxesRevealer;
typedef struct _BoxesRevealerClass BoxesRevealerClass;

#define BOXES_TYPE_SIDEBAR (boxes_sidebar_get_type ())
#define BOXES_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SIDEBAR, BoxesSidebar))
#define BOXES_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SIDEBAR, BoxesSidebarClass))
#define BOXES_IS_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SIDEBAR))
#define BOXES_IS_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SIDEBAR))
#define BOXES_SIDEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SIDEBAR, BoxesSidebarClass))

typedef struct _BoxesSidebar BoxesSidebar;
typedef struct _BoxesSidebarClass BoxesSidebarClass;

#define BOXES_TYPE_SELECTIONBAR (boxes_selectionbar_get_type ())
#define BOXES_SELECTIONBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SELECTIONBAR, BoxesSelectionbar))
#define BOXES_SELECTIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SELECTIONBAR, BoxesSelectionbarClass))
#define BOXES_IS_SELECTIONBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SELECTIONBAR))
#define BOXES_IS_SELECTIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SELECTIONBAR))
#define BOXES_SELECTIONBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SELECTIONBAR, BoxesSelectionbarClass))

typedef struct _BoxesSelectionbar BoxesSelectionbar;
typedef struct _BoxesSelectionbarClass BoxesSelectionbarClass;

#define BOXES_TYPE_WIZARD (boxes_wizard_get_type ())
#define BOXES_WIZARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_WIZARD, BoxesWizard))
#define BOXES_WIZARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_WIZARD, BoxesWizardClass))
#define BOXES_IS_WIZARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_WIZARD))
#define BOXES_IS_WIZARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_WIZARD))
#define BOXES_WIZARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_WIZARD, BoxesWizardClass))

typedef struct _BoxesWizard BoxesWizard;
typedef struct _BoxesWizardClass BoxesWizardClass;

#define BOXES_TYPE_PROPERTIES (boxes_properties_get_type ())
#define BOXES_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_PROPERTIES, BoxesProperties))
#define BOXES_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_PROPERTIES, BoxesPropertiesClass))
#define BOXES_IS_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_PROPERTIES))
#define BOXES_IS_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_PROPERTIES))
#define BOXES_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_PROPERTIES, BoxesPropertiesClass))

typedef struct _BoxesProperties BoxesProperties;
typedef struct _BoxesPropertiesClass BoxesPropertiesClass;

#define BOXES_TYPE_DISPLAY_PAGE (boxes_display_page_get_type ())
#define BOXES_DISPLAY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_DISPLAY_PAGE, BoxesDisplayPage))
#define BOXES_DISPLAY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_DISPLAY_PAGE, BoxesDisplayPageClass))
#define BOXES_IS_DISPLAY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_DISPLAY_PAGE))
#define BOXES_IS_DISPLAY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_DISPLAY_PAGE))
#define BOXES_DISPLAY_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_DISPLAY_PAGE, BoxesDisplayPageClass))

typedef struct _BoxesDisplayPage BoxesDisplayPage;
typedef struct _BoxesDisplayPageClass BoxesDisplayPageClass;

#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_COLLECTION_FILTER (boxes_collection_filter_get_type ())
#define BOXES_COLLECTION_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilter))
#define BOXES_COLLECTION_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilterClass))
#define BOXES_IS_COLLECTION_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_FILTER))
#define BOXES_IS_COLLECTION_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_FILTER))
#define BOXES_COLLECTION_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilterClass))

typedef struct _BoxesCollectionFilter BoxesCollectionFilter;
typedef struct _BoxesCollectionFilterClass BoxesCollectionFilterClass;

#define BOXES_TYPE_COLLECTION_VIEW (boxes_collection_view_get_type ())
#define BOXES_COLLECTION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_VIEW, BoxesCollectionView))
#define BOXES_COLLECTION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_VIEW, BoxesCollectionViewClass))
#define BOXES_IS_COLLECTION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_VIEW))
#define BOXES_IS_COLLECTION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_VIEW))
#define BOXES_COLLECTION_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_VIEW, BoxesCollectionViewClass))

typedef struct _BoxesCollectionView BoxesCollectionView;
typedef struct _BoxesCollectionViewClass BoxesCollectionViewClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _BoxesInstallerMediaPrivate BoxesInstallerMediaPrivate;
typedef struct _BoxesVmCreatorCreateVmData BoxesVmCreatorCreateVmData;
typedef struct _Block42Data Block42Data;

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

typedef struct _BoxesUnattendedInstaller BoxesUnattendedInstaller;
typedef struct _BoxesUnattendedInstallerClass BoxesUnattendedInstallerClass;
typedef struct _Block43Data Block43Data;

#define BOXES_MACHINE_TYPE_MACHINE_STATE (boxes_machine_machine_state_get_type ())
#define __vala_GVirStorageVolInfo_free0(var) ((var == NULL) ? NULL : (var = (_vala_GVirStorageVolInfo_free (var), NULL)))
typedef struct _Block44Data Block44Data;
typedef struct _Block45Data Block45Data;
typedef struct _BoxesVmCreatorUpdateInstallProgressData BoxesVmCreatorUpdateInstallProgressData;
typedef struct _BoxesVmCreatorCreateDomainNameAndTitleFromMediaData BoxesVmCreatorCreateDomainNameAndTitleFromMediaData;
typedef struct _BoxesVmCreatorCreateTargetVolumeData BoxesVmCreatorCreateTargetVolumeData;
typedef struct _BoxesVmCreatorGetStoragePoolData BoxesVmCreatorGetStoragePoolData;
typedef struct _BoxesParamSpecVMCreator BoxesParamSpecVMCreator;

struct _BoxesVMCreator {
	GTypeInstance parent_instance;
	volatile int ref_count;
	BoxesVMCreatorPrivate * priv;
};

struct _BoxesVMCreatorClass {
	GTypeClass parent_class;
	void (*finalize) (BoxesVMCreator *self);
};

struct _BoxesVMCreatorPrivate {
	BoxesInstallerMedia* _install_media;
	gulong state_changed_id;
	gint prev_progress;
	gboolean updating_install_progress;
};

typedef enum  {
	BOXES_UI_STATE_NONE,
	BOXES_UI_STATE_COLLECTION,
	BOXES_UI_STATE_CREDS,
	BOXES_UI_STATE_DISPLAY,
	BOXES_UI_STATE_SETTINGS,
	BOXES_UI_STATE_WIZARD,
	BOXES_UI_STATE_PROPERTIES
} BoxesUIState;

struct _BoxesUI {
	GObject parent_instance;
	BoxesUIPrivate * priv;
	BoxesUIState previous_ui_state;
};

struct _BoxesUIClass {
	GObjectClass parent_class;
	void (*ui_state_changed) (BoxesUI* self);
	ClutterActor* (*get_actor) (BoxesUI* self);
};

struct _BoxesCollectionItem {
	BoxesUI parent_instance;
	BoxesCollectionItemPrivate * priv;
};

struct _BoxesCollectionItemClass {
	BoxesUIClass parent_class;
};

typedef enum  {
	BOXES_PROPERTIES_PAGE_LOGIN,
	BOXES_PROPERTIES_PAGE_SYSTEM,
	BOXES_PROPERTIES_PAGE_DISPLAY,
	BOXES_PROPERTIES_PAGE_DEVICES,
	BOXES_PROPERTIES_PAGE_LAST
} BoxesPropertiesPage;

struct _BoxesIPropertiesProviderIface {
	GTypeInterface parent_iface;
	GList* (*get_properties) (BoxesIPropertiesProvider* self, BoxesPropertiesPage page);
};

struct _BoxesMachine {
	BoxesCollectionItem parent_instance;
	BoxesMachinePrivate * priv;
	BoxesMachineActor* machine_actor;
	BoxesCollectionSource* source;
	BoxesDisplayConfig* config;
	gboolean stay_on_display;
	gboolean deleted;
};

struct _BoxesMachineClass {
	BoxesCollectionItemClass parent_class;
	void (*take_screenshot) (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GdkPixbuf* (*take_screenshot_finish) (BoxesMachine* self, GAsyncResult* _res_, GError** error);
	GList* (*get_properties) (BoxesMachine* self, BoxesPropertiesPage page);
	void (*connect_display) (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*connect_display_finish) (BoxesMachine* self, GAsyncResult* _res_);
	void (*disconnect_display) (BoxesMachine* self);
	void (*delete) (BoxesMachine* self, gboolean by_user);
};

struct _BoxesLibvirtMachine {
	BoxesMachine parent_instance;
	BoxesLibvirtMachinePrivate * priv;
	GVirDomain* domain;
	GVirConfigDomain* domain_config;
	GVirConnection* connection;
	GVirStorageVol* storage_volume;
	BoxesVMCreator* vm_creator;
	gdouble* cpu_stats;
	gint cpu_stats_length1;
	gint _cpu_stats_size_;
	gdouble* io_stats;
	gint io_stats_length1;
	gint _io_stats_size_;
	gdouble* net_stats;
	gint net_stats_length1;
	gint _net_stats_size_;
};

struct _BoxesLibvirtMachineClass {
	BoxesMachineClass parent_class;
};

struct _Block40Data {
	int _ref_count_;
	BoxesVMCreator * self;
	gpointer _async_data_;
};

struct _Block41Data {
	int _ref_count_;
	Block40Data * _data40_;
	gulong handler;
};

struct _BoxesApp {
	BoxesUI parent_instance;
	BoxesAppPrivate * priv;
	GtkApplicationWindow* window;
	GtkNotebook* notebook;
	GtkClutterEmbed* embed;
	ClutterStage* stage;
	ClutterBinLayout* stage_bin;
	ClutterActor* overlay_bin_actor;
	ClutterBinLayout* overlay_bin;
	BoxesCollectionItem* current_item;
	BoxesSearchbar* searchbar;
	BoxesTopbar* topbar;
	BoxesNotificationbar* notificationbar;
	BoxesRevealer* sidebar_revealer;
	BoxesRevealer* searchbar_revealer;
	BoxesSidebar* sidebar;
	BoxesSelectionbar* selectionbar;
	guint duration;
	GSettings* settings;
	BoxesWizard* wizard;
	BoxesProperties* properties;
	BoxesDisplayPage* display_page;
	BoxesCollection* collection;
	BoxesCollectionFilter* filter;
	GSimpleAction* action_properties;
	GSimpleAction* action_fullscreen;
	GSimpleAction* action_shutdown;
	BoxesCollectionView* view;
};

struct _BoxesAppClass {
	BoxesUIClass parent_class;
};

struct _BoxesInstallerMedia {
	GObject parent_instance;
	BoxesInstallerMediaPrivate * priv;
	OsinfoOs* os;
	OsinfoResources* resources;
	OsinfoMedia* os_media;
	gchar* label;
	gchar* device_file;
	gchar* mount_point;
	gboolean from_image;
};

struct _BoxesInstallerMediaClass {
	GObjectClass parent_class;
	void (*set_direct_boot_params) (BoxesInstallerMedia* self, GVirConfigDomainOs* os);
	void (*prepare_for_installation) (BoxesInstallerMedia* self, const gchar* vm_name, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*prepare_for_installation_finish) (BoxesInstallerMedia* self, GAsyncResult* _res_, GError** error);
	void (*setup_domain_config) (BoxesInstallerMedia* self, GVirConfigDomain* domain);
	void (*populate_setup_vbox) (BoxesInstallerMedia* self, GtkVBox* setup_vbox);
	GList* (*get_vm_properties) (BoxesInstallerMedia* self);
	guint64 (*get_installed_size) (BoxesInstallerMedia* self);
	gboolean (*get_need_user_input_for_vm_creation) (BoxesInstallerMedia* self);
	gboolean (*get_user_data_for_vm_creation_available) (BoxesInstallerMedia* self);
	gboolean (*get_supports_virtio_disk) (BoxesInstallerMedia* self);
};

typedef enum  {
	BOXES_VM_CONFIGURATOR_ERROR_NO_GUEST_CAPS
} BoxesVMConfiguratorError;
#define BOXES_VM_CONFIGURATOR_ERROR boxes_vm_configurator_error_quark ()
struct _BoxesVmCreatorCreateVmData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesVMCreator* self;
	GCancellable* cancellable;
	BoxesLibvirtMachine* result;
	Block40Data* _data40_;
	GVirConnection* _tmp0_;
	GVirConnection* _tmp1_;
	Block41Data* _data41_;
	BoxesApp* _tmp2_;
	gulong _tmp3_;
	gchar* title;
	gchar* name;
	gchar* _tmp4_;
	gchar* _tmp5_;
	BoxesInstallerMedia* _tmp6_;
	const gchar* _tmp7_;
	GCancellable* _tmp8_;
	GError* _error_;
	BoxesApp* _tmp9_;
	BoxesNotificationbar* _tmp10_;
	const gchar* _tmp11_;
	GError* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	BoxesInstallerMedia* _tmp15_;
	OsinfoResources* _tmp16_;
	gint64 _tmp17_;
	gint64 _tmp18_;
	GVirStorageVol* _tmp19_;
	GVirStorageVol* volume;
	GVirConnection* _tmp20_;
	GVirConnection* _tmp21_;
	GCancellable* _tmp22_;
	GVirConfigCapabilities* _tmp23_;
	GVirConfigCapabilities* caps;
	GVirStorageVol* _tmp24_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	BoxesInstallerMedia* _tmp27_;
	GVirConfigCapabilities* _tmp28_;
	GVirConfigDomain* _tmp29_;
	GVirConfigDomain* config;
	GVirConfigDomain* _tmp30_;
	const gchar* _tmp31_;
	GVirConfigDomain* _tmp32_;
	const gchar* _tmp33_;
	GVirConnection* _tmp34_;
	GVirConnection* _tmp35_;
	GVirConfigDomain* _tmp36_;
	GVirDomain* _tmp37_;
	GVirDomain* domain;
	BoxesApp* _tmp38_;
	BoxesApp* _tmp39_;
	BoxesCollectionSource* _tmp40_;
	BoxesCollectionSource* _tmp41_;
	BoxesApp* _tmp42_;
	GVirConnection* _tmp43_;
	GVirConnection* _tmp44_;
	GVirDomain* _tmp45_;
	BoxesLibvirtMachine* _tmp46_;
	BoxesLibvirtMachine* _tmp47_;
	GError * _inner_error_;
};

struct _Block42Data {
	int _ref_count_;
	BoxesVMCreator * self;
	BoxesLibvirtMachine* machine;
};

struct _Block43Data {
	int _ref_count_;
	Block42Data * _data42_;
	gulong signal_id;
};

typedef enum  {
	BOXES_MACHINE_MACHINE_STATE_UNKNOWN,
	BOXES_MACHINE_MACHINE_STATE_STOPPED,
	BOXES_MACHINE_MACHINE_STATE_RUNNING,
	BOXES_MACHINE_MACHINE_STATE_PAUSED,
	BOXES_MACHINE_MACHINE_STATE_SAVED
} BoxesMachineMachineState;

struct _Block44Data {
	int _ref_count_;
	BoxesVMCreator * self;
	BoxesLibvirtMachine* machine;
};

struct _Block45Data {
	int _ref_count_;
	BoxesVMCreator * self;
	gint progress;
	BoxesLibvirtMachine* machine;
	gpointer _async_data_;
};

struct _BoxesVmCreatorUpdateInstallProgressData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesVMCreator* self;
	BoxesLibvirtMachine* machine;
	Block45Data* _data45_;
	BoxesLibvirtMachine* _tmp0_;
	GError* _error_;
	BoxesLibvirtMachine* _tmp1_;
	GVirStorageVol* _tmp2_;
	const gchar* _tmp3_;
	GError* _tmp4_;
	const gchar* _tmp5_;
	BoxesLibvirtMachine* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	GError * _inner_error_;
};

struct _BoxesVmCreatorCreateDomainNameAndTitleFromMediaData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesVMCreator* self;
	gchar* name;
	gchar* title;
	BoxesInstallerMedia* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* base_title;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_;
	BoxesInstallerMedia* _tmp6_;
	OsinfoOs* _tmp7_;
	BoxesInstallerMedia* _tmp8_;
	OsinfoOs* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* base_name;
	gchar* _tmp15_;
	GVirStoragePool* _tmp16_;
	GVirStoragePool* pool;
	gint i;
	gboolean _tmp17_;
	gboolean _tmp18_;
	gint _tmp19_;
	gboolean _tmp20_;
	gboolean _tmp21_;
	GVirConnection* _tmp22_;
	GVirConnection* _tmp23_;
	const gchar* _tmp24_;
	GVirDomain* _tmp25_;
	GVirDomain* _tmp26_;
	gboolean _tmp27_;
	GVirConnection* _tmp28_;
	GVirConnection* _tmp29_;
	const gchar* _tmp30_;
	GVirDomain* _tmp31_;
	GVirDomain* _tmp32_;
	gboolean _tmp33_;
	const gchar* _tmp34_;
	GVirStorageVol* _tmp35_;
	GVirStorageVol* _tmp36_;
	gboolean _tmp37_;
	gchar* _tmp38_;
	gchar* _tmp39_;
	gint _tmp40_;
	gchar* _tmp41_;
	gchar* _tmp42_;
	gchar* _tmp43_;
	const gchar* _tmp44_;
	gchar* _tmp45_;
	gchar* _tmp46_;
	gint _tmp47_;
	gchar* _tmp48_;
	gchar* _tmp49_;
	gchar* _tmp50_;
	GError * _inner_error_;
};

struct _BoxesVmCreatorCreateTargetVolumeData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesVMCreator* self;
	gchar* name;
	gint64 storage;
	GVirStorageVol* result;
	GVirStoragePool* _tmp0_;
	GVirStoragePool* pool;
	const gchar* _tmp1_;
	gint64 _tmp2_;
	GVirConfigStorageVol* _tmp3_;
	GVirConfigStorageVol* config;
	GVirStoragePool* _tmp4_;
	GVirConfigStorageVol* _tmp5_;
	GVirStorageVol* _tmp6_;
	GVirStorageVol* volume;
	GError * _inner_error_;
};

struct _BoxesVmCreatorGetStoragePoolData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesVMCreator* self;
	GVirStoragePool* result;
	GVirConnection* _tmp0_;
	GVirConnection* _tmp1_;
	GVirStoragePool* _tmp2_;
	GVirStoragePool* pool;
	GVirStoragePool* _tmp3_;
	GVirConfigStoragePool* _tmp4_;
	GVirConfigStoragePool* config;
	GVirConnection* _tmp5_;
	GVirConnection* _tmp6_;
	GVirConfigStoragePool* _tmp7_;
	GVirStoragePool* _tmp8_;
	GVirStoragePool* _tmp9_;
	GVirStoragePool* _tmp10_;
	GVirStoragePool* _tmp11_;
	GVirStoragePool* _tmp12_;
	GError * _inner_error_;
};

struct _BoxesParamSpecVMCreator {
	GParamSpec parent_instance;
};


static gpointer boxes_vm_creator_parent_class = NULL;
extern BoxesApp* boxes_app_app;

gpointer boxes_vm_creator_ref (gpointer instance);
void boxes_vm_creator_unref (gpointer instance);
GParamSpec* boxes_param_spec_vm_creator (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void boxes_value_set_vm_creator (GValue* value, gpointer v_object);
void boxes_value_take_vm_creator (GValue* value, gpointer v_object);
gpointer boxes_value_get_vm_creator (const GValue* value);
GType boxes_vm_creator_get_type (void) G_GNUC_CONST;
GType boxes_installer_media_get_type (void) G_GNUC_CONST;
#define BOXES_VM_CREATOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_VM_CREATOR, BoxesVMCreatorPrivate))
enum  {
	BOXES_VM_CREATOR_DUMMY_PROPERTY
};
#define BOXES_VM_CREATOR_INSTALL_COMPLETE_PERCENT 99
BoxesVMCreator* boxes_vm_creator_new (BoxesInstallerMedia* install_media);
BoxesVMCreator* boxes_vm_creator_construct (GType object_type, BoxesInstallerMedia* install_media);
static void boxes_vm_creator_set_install_media (BoxesVMCreator* self, BoxesInstallerMedia* value);
GType boxes_ui_get_type (void) G_GNUC_CONST;
GType boxes_collection_item_get_type (void) G_GNUC_CONST;
GType boxes_machine_get_type (void) G_GNUC_CONST;
GType boxes_libvirt_machine_get_type (void) G_GNUC_CONST;
BoxesVMCreator* boxes_vm_creator_new_for_install_completion (BoxesLibvirtMachine* machine);
BoxesVMCreator* boxes_vm_creator_construct_for_install_completion (GType object_type, BoxesLibvirtMachine* machine);
static void boxes_vm_creator_on_machine_state_changed (BoxesVMCreator* self, GObject* object, GParamSpec* pspec);
static void _boxes_vm_creator_on_machine_state_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
GType boxes_ui_state_get_type (void) G_GNUC_CONST;
GType boxes_properties_page_get_type (void) G_GNUC_CONST;
GType boxes_property_get_type (void) G_GNUC_CONST;
GType boxes_iproperties_provider_get_type (void) G_GNUC_CONST;
GType boxes_machine_actor_get_type (void) G_GNUC_CONST;
static void boxes_vm_creator_update_machine_info (BoxesVMCreator* self, BoxesLibvirtMachine* machine);
static void boxes_vm_creator_create_vm_data_free (gpointer _data);
void boxes_vm_creator_create_vm (BoxesVMCreator* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
BoxesLibvirtMachine* boxes_vm_creator_create_vm_finish (BoxesVMCreator* self, GAsyncResult* _res_, GError** error);
static gboolean boxes_vm_creator_create_vm_co (BoxesVmCreatorCreateVmData* _data_);
static Block40Data* block40_data_ref (Block40Data* _data40_);
static void block40_data_unref (void * _userdata_);
static GVirConnection* boxes_vm_creator_get_connection (BoxesVMCreator* self);
static Block41Data* block41_data_ref (Block41Data* _data41_);
static void block41_data_unref (void * _userdata_);
GType boxes_app_get_type (void) G_GNUC_CONST;
static void ___lambda52_ (Block41Data* _data41_);
static void ____lambda52__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void boxes_vm_creator_create_domain_name_and_title_from_media (BoxesVMCreator* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void boxes_vm_creator_create_domain_name_and_title_from_media_finish (BoxesVMCreator* self, GAsyncResult* _res_, gchar** name, gchar** title, GError** error);
static void boxes_vm_creator_create_vm_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
BoxesInstallerMedia* boxes_vm_creator_get_install_media (BoxesVMCreator* self);
void boxes_installer_media_prepare_for_installation (BoxesInstallerMedia* self, const gchar* vm_name, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_installer_media_prepare_for_installation_finish (BoxesInstallerMedia* self, GAsyncResult* _res_, GError** error);
GType boxes_searchbar_get_type (void) G_GNUC_CONST;
GType boxes_topbar_get_type (void) G_GNUC_CONST;
GType boxes_notificationbar_get_type (void) G_GNUC_CONST;
GType boxes_revealer_get_type (void) G_GNUC_CONST;
GType boxes_sidebar_get_type (void) G_GNUC_CONST;
GType boxes_selectionbar_get_type (void) G_GNUC_CONST;
GType boxes_wizard_get_type (void) G_GNUC_CONST;
GType boxes_properties_get_type (void) G_GNUC_CONST;
GType boxes_display_page_get_type (void) G_GNUC_CONST;
GType boxes_collection_get_type (void) G_GNUC_CONST;
GType boxes_collection_filter_get_type (void) G_GNUC_CONST;
GType boxes_collection_view_get_type (void) G_GNUC_CONST;
void boxes_notificationbar_display_error (BoxesNotificationbar* self, const gchar* message);
static void boxes_vm_creator_create_target_volume (BoxesVMCreator* self, const gchar* name, gint64 storage, GAsyncReadyCallback _callback_, gpointer _user_data_);
static GVirStorageVol* boxes_vm_creator_create_target_volume_finish (BoxesVMCreator* self, GAsyncResult* _res_, GError** error);
GQuark boxes_vm_configurator_error_quark (void);
GVirConfigDomain* boxes_vm_configurator_create_domain_config (BoxesInstallerMedia* install_media, const gchar* target_path, GVirConfigCapabilities* caps, GError** error);
BoxesLibvirtMachine* boxes_app_add_domain (BoxesApp* self, BoxesCollectionSource* source, GVirConnection* connection, GVirDomain* domain, GError** error);
BoxesCollectionSource* boxes_app_get_default_source (BoxesApp* self);
GVirConnection* boxes_app_get_default_connection (BoxesApp* self);
void boxes_vm_creator_launch_vm (BoxesVMCreator* self, BoxesLibvirtMachine* machine, GError** error);
static Block42Data* block42_data_ref (Block42Data* _data42_);
static void block42_data_unref (void * _userdata_);
GType boxes_unattended_installer_get_type (void) G_GNUC_CONST;
gboolean boxes_unattended_installer_get_express_install (BoxesUnattendedInstaller* self);
static Block43Data* block43_data_ref (Block43Data* _data43_);
static void block43_data_unref (void * _userdata_);
static void ___lambda56_ (Block43Data* _data43_);
BoxesUIState boxes_ui_get_ui_state (BoxesUI* self);
void boxes_app_select_item (BoxesApp* self, BoxesCollectionItem* item);
void boxes_app_set_fullscreen (BoxesApp* self, gboolean value);
static void boxes_vm_creator_set_post_install_config (BoxesVMCreator* self, BoxesLibvirtMachine* machine);
static void ____lambda56__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
GType boxes_machine_machine_state_get_type (void) G_GNUC_CONST;
BoxesMachineMachineState boxes_machine_get_state (BoxesMachine* self);
const gchar* boxes_collection_item_get_name (BoxesCollectionItem* self);
gboolean boxes_vm_configurator_is_install_config (GVirConfigDomain* domain);
static gboolean boxes_vm_creator_guest_installed_os (BoxesVMCreator* self, GVirStorageVol* volume);
static void boxes_vm_creator_mark_as_installed (BoxesVMCreator* self, BoxesLibvirtMachine* machine);
gboolean boxes_vm_configurator_is_live_config (GVirConfigDomain* domain);
static gboolean boxes_vm_creator_install_trackable (BoxesVMCreator* self);
void boxes_machine_set_info (BoxesMachine* self, const gchar* value);
void boxes_app_delete_machine (BoxesApp* self, BoxesMachine* machine, gboolean by_user);
static void boxes_vm_creator_track_install_progress (BoxesVMCreator* self, BoxesLibvirtMachine* machine);
void boxes_vm_configurator_post_install_setup (GVirConfigDomain* domain);
void boxes_vm_configurator_mark_as_installed (GVirConfigDomain* domain);
static gint boxes_vm_creator_get_progress (BoxesVMCreator* self, GVirStorageVol* volume, GError** error);
static void _vala_GVirStorageVolInfo_free (GVirStorageVolInfo* self);
static Block44Data* block44_data_ref (Block44Data* _data44_);
static void block44_data_unref (void * _userdata_);
static gboolean __lambda50_ (Block44Data* _data44_);
static void boxes_vm_creator_update_install_progress (BoxesVMCreator* self, BoxesLibvirtMachine* machine, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void boxes_vm_creator_update_install_progress_finish (BoxesVMCreator* self, GAsyncResult* _res_);
static gboolean ___lambda50__gsource_func (gpointer self);
static void boxes_vm_creator_update_install_progress_data_free (gpointer _data);
static gboolean boxes_vm_creator_update_install_progress_co (BoxesVmCreatorUpdateInstallProgressData* _data_);
static Block45Data* block45_data_ref (Block45Data* _data45_);
static void block45_data_unref (void * _userdata_);
static void ___lambda51_ (Block45Data* _data45_, GError** error);
static void ____lambda51__boxes_run_in_thread_func (gpointer self, GError** error);
static void boxes_vm_creator_update_install_progress_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
guint64 boxes_installer_media_get_installed_size (BoxesInstallerMedia* self);
static void boxes_vm_creator_create_domain_name_and_title_from_media_data_free (gpointer _data);
static gboolean boxes_vm_creator_create_domain_name_and_title_from_media_co (BoxesVmCreatorCreateDomainNameAndTitleFromMediaData* _data_);
static void boxes_vm_creator_get_storage_pool (BoxesVMCreator* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static GVirStoragePool* boxes_vm_creator_get_storage_pool_finish (BoxesVMCreator* self, GAsyncResult* _res_, GError** error);
static void boxes_vm_creator_create_domain_name_and_title_from_media_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void boxes_vm_creator_create_target_volume_data_free (gpointer _data);
static gboolean boxes_vm_creator_create_target_volume_co (BoxesVmCreatorCreateTargetVolumeData* _data_);
static void boxes_vm_creator_create_target_volume_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
GVirConfigStorageVol* boxes_vm_configurator_create_volume_config (const gchar* name, gint64 storage, GError** error);
static void boxes_vm_creator_get_storage_pool_data_free (gpointer _data);
static gboolean boxes_vm_creator_get_storage_pool_co (BoxesVmCreatorGetStoragePoolData* _data_);
GVirConfigStoragePool* boxes_vm_configurator_get_pool_config (GError** error);
static void boxes_vm_creator_get_storage_pool_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void boxes_vm_creator_finalize (BoxesVMCreator* obj);


BoxesVMCreator* boxes_vm_creator_construct (GType object_type, BoxesInstallerMedia* install_media) {
	BoxesVMCreator* self = NULL;
	BoxesInstallerMedia* _tmp0_;
	g_return_val_if_fail (install_media != NULL, NULL);
	self = (BoxesVMCreator*) g_type_create_instance (object_type);
	_tmp0_ = install_media;
	boxes_vm_creator_set_install_media (self, _tmp0_);
	return self;
}


BoxesVMCreator* boxes_vm_creator_new (BoxesInstallerMedia* install_media) {
	return boxes_vm_creator_construct (BOXES_TYPE_VM_CREATOR, install_media);
}


static void _boxes_vm_creator_on_machine_state_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	boxes_vm_creator_on_machine_state_changed (self, _sender, pspec);
}


static gpointer _boxes_vm_creator_ref0 (gpointer self) {
	return self ? boxes_vm_creator_ref (self) : NULL;
}


BoxesVMCreator* boxes_vm_creator_construct_for_install_completion (GType object_type, BoxesLibvirtMachine* machine) {
	BoxesVMCreator* self = NULL;
	BoxesLibvirtMachine* _tmp0_;
	gulong _tmp1_ = 0UL;
	BoxesLibvirtMachine* _tmp2_;
	BoxesVMCreator* _tmp3_;
	BoxesLibvirtMachine* _tmp4_;
	BoxesLibvirtMachine* _tmp5_;
	g_return_val_if_fail (machine != NULL, NULL);
	self = (BoxesVMCreator*) g_type_create_instance (object_type);
	_tmp0_ = machine;
	_tmp1_ = g_signal_connect ((GObject*) _tmp0_, "notify::state", (GCallback) _boxes_vm_creator_on_machine_state_changed_g_object_notify, self);
	self->priv->state_changed_id = _tmp1_;
	_tmp2_ = machine;
	_tmp3_ = _boxes_vm_creator_ref0 (self);
	_boxes_vm_creator_unref0 (_tmp2_->vm_creator);
	_tmp2_->vm_creator = _tmp3_;
	_tmp4_ = machine;
	boxes_vm_creator_update_machine_info (self, _tmp4_);
	_tmp5_ = machine;
	boxes_vm_creator_on_machine_state_changed (self, (GObject*) _tmp5_, NULL);
	return self;
}


BoxesVMCreator* boxes_vm_creator_new_for_install_completion (BoxesLibvirtMachine* machine) {
	return boxes_vm_creator_construct_for_install_completion (BOXES_TYPE_VM_CREATOR, machine);
}


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


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


void boxes_vm_creator_create_vm (BoxesVMCreator* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesVmCreatorCreateVmData* _data_;
	BoxesVMCreator* _tmp0_;
	GCancellable* _tmp1_;
	GCancellable* _tmp2_;
	_data_ = g_slice_new0 (BoxesVmCreatorCreateVmData);
	_data_->_async_result = g_simple_async_result_new (g_object_newv (G_TYPE_OBJECT, 0, NULL), _callback_, _user_data_, boxes_vm_creator_create_vm);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_vm_creator_create_vm_data_free);
	_tmp0_ = _boxes_vm_creator_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = cancellable;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data_->cancellable = _tmp2_;
	boxes_vm_creator_create_vm_co (_data_);
}


BoxesLibvirtMachine* boxes_vm_creator_create_vm_finish (BoxesVMCreator* self, GAsyncResult* _res_, GError** error) {
	BoxesLibvirtMachine* result;
	BoxesVmCreatorCreateVmData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return NULL;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static Block40Data* block40_data_ref (Block40Data* _data40_) {
	g_atomic_int_inc (&_data40_->_ref_count_);
	return _data40_;
}


static void block40_data_unref (void * _userdata_) {
	Block40Data* _data40_;
	_data40_ = (Block40Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data40_->_ref_count_)) {
		BoxesVMCreator * self;
		self = _data40_->self;
		_boxes_vm_creator_unref0 (self);
		g_slice_free (Block40Data, _data40_);
	}
}


static Block41Data* block41_data_ref (Block41Data* _data41_) {
	g_atomic_int_inc (&_data41_->_ref_count_);
	return _data41_;
}


static void block41_data_unref (void * _userdata_) {
	Block41Data* _data41_;
	_data41_ = (Block41Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data41_->_ref_count_)) {
		BoxesVMCreator * self;
		self = _data41_->_data40_->self;
		block40_data_unref (_data41_->_data40_);
		_data41_->_data40_ = NULL;
		g_slice_free (Block41Data, _data41_);
	}
}


static void ___lambda52_ (Block41Data* _data41_) {
	Block40Data* _data40_;
	BoxesVMCreator * self;
	BoxesApp* _tmp0_;
	gulong _tmp1_;
	_data40_ = _data41_->_data40_;
	self = _data40_->self;
	boxes_vm_creator_create_vm_co (_data40_->_async_data_);
	_tmp0_ = boxes_app_app;
	_tmp1_ = _data41_->handler;
	g_signal_handler_disconnect ((GObject*) _tmp0_, _tmp1_);
}


static void ____lambda52__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	___lambda52_ (self);
}


static void boxes_vm_creator_create_vm_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesVmCreatorCreateVmData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_vm_creator_create_vm_co (_data_);
}


static gboolean boxes_vm_creator_create_vm_co (BoxesVmCreatorCreateVmData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		case 5:
		goto _state_5;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data40_ = g_slice_new0 (Block40Data);
	_data_->_data40_->_ref_count_ = 1;
	_data_->_data40_->self = boxes_vm_creator_ref (_data_->self);
	_data_->_data40_->_async_data_ = _data_;
	_data_->_tmp0_ = boxes_vm_creator_get_connection (_data_->self);
	_data_->_tmp1_ = _data_->_tmp0_;
	if (_data_->_tmp1_ == NULL) {
		_data_->_data41_ = g_slice_new0 (Block41Data);
		_data_->_data41_->_ref_count_ = 1;
		_data_->_data41_->_data40_ = block40_data_ref (_data_->_data40_);
		_data_->_data41_->handler = (gulong) 0;
		_data_->_tmp2_ = boxes_app_app;
		_data_->_tmp3_ = 0UL;
		_data_->_tmp3_ = g_signal_connect_data ((GObject*) _data_->_tmp2_, "notify::default-connection", (GCallback) ____lambda52__g_object_notify, block41_data_ref (_data_->_data41_), (GClosureNotify) block41_data_unref, 0);
		_data_->_data41_->handler = _data_->_tmp3_;
		_data_->_state_ = 1;
		return FALSE;
		_state_1:
		;
		block41_data_unref (_data_->_data41_);
		_data_->_data41_ = NULL;
	}
	_data_->_tmp4_ = NULL;
	_data_->_tmp5_ = NULL;
	_data_->_state_ = 2;
	boxes_vm_creator_create_domain_name_and_title_from_media (_data_->self, boxes_vm_creator_create_vm_ready, _data_);
	return FALSE;
	_state_2:
	boxes_vm_creator_create_domain_name_and_title_from_media_finish (_data_->self, _data_->_res_, &_data_->_tmp4_, &_data_->_tmp5_, &_data_->_inner_error_);
	_g_free0 (_data_->name);
	_data_->name = _data_->_tmp4_;
	_g_free0 (_data_->title);
	_data_->title = _data_->_tmp5_;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_free0 (_data_->name);
		_g_free0 (_data_->title);
		block40_data_unref (_data_->_data40_);
		_data_->_data40_ = NULL;
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	{
		_data_->_tmp6_ = _data_->self->priv->_install_media;
		_data_->_tmp7_ = _data_->name;
		_data_->_tmp8_ = _data_->cancellable;
		_data_->_state_ = 3;
		boxes_installer_media_prepare_for_installation (_data_->_tmp6_, _data_->_tmp7_, _data_->_tmp8_, boxes_vm_creator_create_vm_ready, _data_);
		return FALSE;
		_state_3:
		boxes_installer_media_prepare_for_installation_finish (_data_->_tmp6_, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			goto __catch66_g_error;
		}
	}
	goto __finally66;
	__catch66_g_error:
	{
		_data_->_error_ = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp9_ = boxes_app_app;
		_data_->_tmp10_ = _data_->_tmp9_->notificationbar;
		_data_->_tmp11_ = NULL;
		_data_->_tmp11_ = _ ("An error occurred during installation preparation. Express Install dis" \
"abled.");
		boxes_notificationbar_display_error (_data_->_tmp10_, _data_->_tmp11_);
		_data_->_tmp12_ = _data_->_error_;
		_data_->_tmp13_ = _data_->_tmp12_->message;
		g_debug ("vm-creator.vala:46: Disabling unattended installation: %s", _data_->_tmp13_);
		_g_error_free0 (_data_->_error_);
	}
	__finally66:
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_free0 (_data_->name);
		_g_free0 (_data_->title);
		block40_data_unref (_data_->_data40_);
		_data_->_data40_ = NULL;
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp14_ = _data_->name;
	_data_->_tmp15_ = _data_->self->priv->_install_media;
	_data_->_tmp16_ = _data_->_tmp15_->resources;
	_data_->_tmp17_ = osinfo_resources_get_storage (_data_->_tmp16_);
	_data_->_tmp18_ = _data_->_tmp17_;
	_data_->_state_ = 4;
	boxes_vm_creator_create_target_volume (_data_->self, _data_->_tmp14_, _data_->_tmp18_, boxes_vm_creator_create_vm_ready, _data_);
	return FALSE;
	_state_4:
	_data_->_tmp19_ = NULL;
	_data_->_tmp19_ = boxes_vm_creator_create_target_volume_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
	_data_->volume = _data_->_tmp19_;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_free0 (_data_->name);
		_g_free0 (_data_->title);
		block40_data_unref (_data_->_data40_);
		_data_->_data40_ = NULL;
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp20_ = boxes_vm_creator_get_connection (_data_->self);
	_data_->_tmp21_ = _data_->_tmp20_;
	_data_->_tmp22_ = _data_->cancellable;
	_data_->_state_ = 5;
	gvir_connection_get_capabilities_async (_data_->_tmp21_, _data_->_tmp22_, boxes_vm_creator_create_vm_ready, _data_);
	return FALSE;
	_state_5:
	_data_->_tmp23_ = NULL;
	_data_->_tmp23_ = gvir_connection_get_capabilities_finish (_data_->_tmp21_, _data_->_res_, &_data_->_inner_error_);
	_data_->caps = _data_->_tmp23_;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_object_unref0 (_data_->volume);
		_g_free0 (_data_->name);
		_g_free0 (_data_->title);
		block40_data_unref (_data_->_data40_);
		_data_->_data40_ = NULL;
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp24_ = _data_->volume;
	_data_->_tmp25_ = NULL;
	_data_->_tmp25_ = gvir_storage_vol_get_path (_data_->_tmp24_, &_data_->_inner_error_);
	_data_->_tmp26_ = _data_->_tmp25_;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_object_unref0 (_data_->caps);
		_g_object_unref0 (_data_->volume);
		_g_free0 (_data_->name);
		_g_free0 (_data_->title);
		block40_data_unref (_data_->_data40_);
		_data_->_data40_ = NULL;
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp27_ = _data_->self->priv->_install_media;
	_data_->_tmp28_ = _data_->caps;
	_data_->_tmp29_ = NULL;
	_data_->_tmp29_ = boxes_vm_configurator_create_domain_config (_data_->_tmp27_, _data_->_tmp26_, _data_->_tmp28_, &_data_->_inner_error_);
	_data_->config = _data_->_tmp29_;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_object_unref0 (_data_->caps);
		_g_object_unref0 (_data_->volume);
		_g_free0 (_data_->name);
		_g_free0 (_data_->title);
		block40_data_unref (_data_->_data40_);
		_data_->_data40_ = NULL;
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp30_ = _data_->config;
	_data_->_tmp31_ = _data_->name;
	gvir_config_domain_set_name (_data_->_tmp30_, _data_->_tmp31_);
	_data_->_tmp32_ = _data_->config;
	_data_->_tmp33_ = _data_->title;
	gvir_config_domain_set_title (_data_->_tmp32_, _data_->_tmp33_);
	_data_->_tmp34_ = boxes_vm_creator_get_connection (_data_->self);
	_data_->_tmp35_ = _data_->_tmp34_;
	_data_->_tmp36_ = _data_->config;
	_data_->_tmp37_ = NULL;
	_data_->_tmp37_ = gvir_connection_create_domain (_data_->_tmp35_, _data_->_tmp36_, &_data_->_inner_error_);
	_data_->domain = _data_->_tmp37_;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_object_unref0 (_data_->config);
		_g_object_unref0 (_data_->caps);
		_g_object_unref0 (_data_->volume);
		_g_free0 (_data_->name);
		_g_free0 (_data_->title);
		block40_data_unref (_data_->_data40_);
		_data_->_data40_ = NULL;
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp38_ = boxes_app_app;
	_data_->_tmp39_ = boxes_app_app;
	_data_->_tmp40_ = boxes_app_get_default_source (_data_->_tmp39_);
	_data_->_tmp41_ = _data_->_tmp40_;
	_data_->_tmp42_ = boxes_app_app;
	_data_->_tmp43_ = boxes_app_get_default_connection (_data_->_tmp42_);
	_data_->_tmp44_ = _data_->_tmp43_;
	_data_->_tmp45_ = _data_->domain;
	_data_->_tmp46_ = NULL;
	_data_->_tmp46_ = boxes_app_add_domain (_data_->_tmp38_, _data_->_tmp41_, _data_->_tmp44_, _data_->_tmp45_, &_data_->_inner_error_);
	_data_->_tmp47_ = _data_->_tmp46_;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_object_unref0 (_data_->domain);
		_g_object_unref0 (_data_->config);
		_g_object_unref0 (_data_->caps);
		_g_object_unref0 (_data_->volume);
		_g_free0 (_data_->name);
		_g_free0 (_data_->title);
		block40_data_unref (_data_->_data40_);
		_data_->_data40_ = NULL;
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->result = _data_->_tmp47_;
	_g_object_unref0 (_data_->domain);
	_g_object_unref0 (_data_->config);
	_g_object_unref0 (_data_->caps);
	_g_object_unref0 (_data_->volume);
	_g_free0 (_data_->name);
	_g_free0 (_data_->title);
	block40_data_unref (_data_->_data40_);
	_data_->_data40_ = NULL;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_object_unref0 (_data_->domain);
	_g_object_unref0 (_data_->config);
	_g_object_unref0 (_data_->caps);
	_g_object_unref0 (_data_->volume);
	_g_free0 (_data_->name);
	_g_free0 (_data_->title);
	block40_data_unref (_data_->_data40_);
	_data_->_data40_ = NULL;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static Block42Data* block42_data_ref (Block42Data* _data42_) {
	g_atomic_int_inc (&_data42_->_ref_count_);
	return _data42_;
}


static void block42_data_unref (void * _userdata_) {
	Block42Data* _data42_;
	_data42_ = (Block42Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data42_->_ref_count_)) {
		BoxesVMCreator * self;
		self = _data42_->self;
		_g_object_unref0 (_data42_->machine);
		_boxes_vm_creator_unref0 (self);
		g_slice_free (Block42Data, _data42_);
	}
}


static Block43Data* block43_data_ref (Block43Data* _data43_) {
	g_atomic_int_inc (&_data43_->_ref_count_);
	return _data43_;
}


static void block43_data_unref (void * _userdata_) {
	Block43Data* _data43_;
	_data43_ = (Block43Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data43_->_ref_count_)) {
		BoxesVMCreator * self;
		self = _data43_->_data42_->self;
		block42_data_unref (_data43_->_data42_);
		_data43_->_data42_ = NULL;
		g_slice_free (Block43Data, _data43_);
	}
}


static void ___lambda56_ (Block43Data* _data43_) {
	Block42Data* _data42_;
	BoxesVMCreator * self;
	BoxesApp* _tmp0_;
	BoxesUIState _tmp1_;
	BoxesUIState _tmp2_;
	BoxesApp* _tmp3_;
	BoxesLibvirtMachine* _tmp4_;
	BoxesApp* _tmp5_;
	BoxesLibvirtMachine* _tmp6_;
	BoxesApp* _tmp7_;
	gulong _tmp8_;
	_data42_ = _data43_->_data42_;
	self = _data42_->self;
	_tmp0_ = boxes_app_app;
	_tmp1_ = boxes_ui_get_ui_state ((BoxesUI*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != BOXES_UI_STATE_COLLECTION) {
		return;
	}
	_tmp3_ = boxes_app_app;
	_tmp4_ = _data42_->machine;
	boxes_app_select_item (_tmp3_, (BoxesCollectionItem*) _tmp4_);
	_tmp5_ = boxes_app_app;
	boxes_app_set_fullscreen (_tmp5_, TRUE);
	_tmp6_ = _data42_->machine;
	boxes_vm_creator_set_post_install_config (self, _tmp6_);
	_tmp7_ = boxes_app_app;
	_tmp8_ = _data43_->signal_id;
	g_signal_handler_disconnect ((GObject*) _tmp7_, _tmp8_);
	return;
}


static void ____lambda56__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	___lambda56_ (self);
}


void boxes_vm_creator_launch_vm (BoxesVMCreator* self, BoxesLibvirtMachine* machine, GError** error) {
	Block42Data* _data42_;
	BoxesLibvirtMachine* _tmp0_;
	BoxesLibvirtMachine* _tmp1_;
	gboolean _tmp2_ = FALSE;
	BoxesInstallerMedia* _tmp3_;
	gboolean _tmp7_;
	BoxesLibvirtMachine* _tmp13_;
	gulong _tmp14_ = 0UL;
	BoxesLibvirtMachine* _tmp15_;
	BoxesVMCreator* _tmp16_;
	BoxesLibvirtMachine* _tmp17_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (machine != NULL);
	_data42_ = g_slice_new0 (Block42Data);
	_data42_->_ref_count_ = 1;
	_data42_->self = boxes_vm_creator_ref (self);
	_tmp0_ = machine;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_data42_->machine = _tmp1_;
	_tmp3_ = self->priv->_install_media;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, BOXES_TYPE_UNATTENDED_INSTALLER)) {
		_tmp2_ = TRUE;
	} else {
		BoxesInstallerMedia* _tmp4_;
		gboolean _tmp5_;
		gboolean _tmp6_;
		_tmp4_ = self->priv->_install_media;
		_tmp5_ = boxes_unattended_installer_get_express_install (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, BOXES_TYPE_UNATTENDED_INSTALLER) ? ((BoxesUnattendedInstaller*) _tmp4_) : NULL);
		_tmp6_ = _tmp5_;
		_tmp2_ = !_tmp6_;
	}
	_tmp7_ = _tmp2_;
	if (_tmp7_) {
		Block43Data* _data43_;
		BoxesApp* _tmp8_;
		gulong _tmp9_ = 0UL;
		_data43_ = g_slice_new0 (Block43Data);
		_data43_->_ref_count_ = 1;
		_data43_->_data42_ = block42_data_ref (_data42_);
		_data43_->signal_id = (gulong) 0;
		_tmp8_ = boxes_app_app;
		_tmp9_ = g_signal_connect_data ((GObject*) _tmp8_, "notify::ui-state", (GCallback) ____lambda56__g_object_notify, block43_data_ref (_data43_), (GClosureNotify) block43_data_unref, 0);
		_data43_->signal_id = _tmp9_;
		block43_data_unref (_data43_);
		_data43_ = NULL;
	} else {
		BoxesLibvirtMachine* _tmp10_;
		GVirDomain* _tmp11_;
		BoxesLibvirtMachine* _tmp12_;
		_tmp10_ = _data42_->machine;
		_tmp11_ = _tmp10_->domain;
		gvir_domain_start (_tmp11_, (guint) 0, &_inner_error_);
		if (_inner_error_ != NULL) {
			g_propagate_error (error, _inner_error_);
			block42_data_unref (_data42_);
			_data42_ = NULL;
			return;
		}
		_tmp12_ = _data42_->machine;
		boxes_vm_creator_set_post_install_config (self, _tmp12_);
	}
	_tmp13_ = _data42_->machine;
	_tmp14_ = g_signal_connect ((GObject*) _tmp13_, "notify::state", (GCallback) _boxes_vm_creator_on_machine_state_changed_g_object_notify, self);
	self->priv->state_changed_id = _tmp14_;
	_tmp15_ = _data42_->machine;
	_tmp16_ = _boxes_vm_creator_ref0 (self);
	_boxes_vm_creator_unref0 (_tmp15_->vm_creator);
	_tmp15_->vm_creator = _tmp16_;
	_tmp17_ = _data42_->machine;
	boxes_vm_creator_update_machine_info (self, _tmp17_);
	block42_data_unref (_data42_);
	_data42_ = NULL;
}


static void boxes_vm_creator_on_machine_state_changed (BoxesVMCreator* self, GObject* object, GParamSpec* pspec) {
	GObject* _tmp0_;
	BoxesLibvirtMachine* _tmp1_;
	BoxesLibvirtMachine* machine;
	gboolean _tmp2_ = FALSE;
	BoxesLibvirtMachine* _tmp3_;
	BoxesMachineMachineState _tmp4_;
	BoxesMachineMachineState _tmp5_;
	gboolean _tmp9_;
	BoxesLibvirtMachine* _tmp10_;
	GVirDomain* _tmp11_;
	GVirDomain* _tmp12_;
	GVirDomain* domain;
	BoxesLibvirtMachine* _tmp13_;
	gboolean _tmp14_;
	GVirDomain* _tmp20_;
	gboolean _tmp21_ = FALSE;
	BoxesLibvirtMachine* _tmp29_;
	GVirStorageVol* _tmp30_;
	gboolean _tmp31_ = FALSE;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = object;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, BOXES_TYPE_LIBVIRT_MACHINE) ? ((BoxesLibvirtMachine*) _tmp0_) : NULL);
	machine = _tmp1_;
	_tmp3_ = machine;
	_tmp4_ = boxes_machine_get_state ((BoxesMachine*) _tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_ != BOXES_MACHINE_MACHINE_STATE_STOPPED) {
		BoxesLibvirtMachine* _tmp6_;
		BoxesMachineMachineState _tmp7_;
		BoxesMachineMachineState _tmp8_;
		_tmp6_ = machine;
		_tmp7_ = boxes_machine_get_state ((BoxesMachine*) _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp2_ = _tmp8_ != BOXES_MACHINE_MACHINE_STATE_UNKNOWN;
	} else {
		_tmp2_ = FALSE;
	}
	_tmp9_ = _tmp2_;
	if (_tmp9_) {
		_g_object_unref0 (machine);
		return;
	}
	_tmp10_ = machine;
	_tmp11_ = _tmp10_->domain;
	_tmp12_ = _g_object_ref0 (_tmp11_);
	domain = _tmp12_;
	_tmp13_ = machine;
	_tmp14_ = ((BoxesMachine*) _tmp13_)->deleted;
	if (_tmp14_) {
		BoxesLibvirtMachine* _tmp15_;
		gulong _tmp16_;
		BoxesLibvirtMachine* _tmp17_;
		const gchar* _tmp18_;
		const gchar* _tmp19_;
		_tmp15_ = machine;
		_tmp16_ = self->priv->state_changed_id;
		g_signal_handler_disconnect ((GObject*) _tmp15_, _tmp16_);
		_tmp17_ = machine;
		_tmp18_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _tmp17_);
		_tmp19_ = _tmp18_;
		g_debug ("vm-creator.vala:95: '%s' was deleted, no need for post-installation se" \
"tup on it", _tmp19_);
		_g_object_unref0 (domain);
		_g_object_unref0 (machine);
		return;
	}
	_tmp20_ = domain;
	_tmp21_ = gvir_domain_get_saved (_tmp20_);
	if (_tmp21_) {
		BoxesLibvirtMachine* _tmp22_;
		const gchar* _tmp23_;
		const gchar* _tmp24_;
		BoxesLibvirtMachine* _tmp25_;
		GVirConfigDomain* _tmp26_;
		gboolean _tmp27_ = FALSE;
		_tmp22_ = machine;
		_tmp23_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _tmp22_);
		_tmp24_ = _tmp23_;
		g_debug ("vm-creator.vala:100: '%s' has saved state, no need for post-installati" \
"on setup on it", _tmp24_);
		_tmp25_ = machine;
		_tmp26_ = _tmp25_->domain_config;
		_tmp27_ = boxes_vm_configurator_is_install_config (_tmp26_);
		if (_tmp27_) {
			GVirDomain* _tmp28_;
			_tmp28_ = domain;
			gvir_domain_start_async (_tmp28_, (guint) 0, NULL, NULL, NULL);
		}
		_g_object_unref0 (domain);
		_g_object_unref0 (machine);
		return;
	}
	_tmp29_ = machine;
	_tmp30_ = _tmp29_->storage_volume;
	_tmp31_ = boxes_vm_creator_guest_installed_os (self, _tmp30_);
	if (_tmp31_) {
		BoxesLibvirtMachine* _tmp32_;
		BoxesLibvirtMachine* _tmp38_;
		gulong _tmp39_;
		gboolean _tmp40_ = FALSE;
		BoxesLibvirtMachine* _tmp41_;
		GVirConfigDomain* _tmp42_;
		gboolean _tmp43_ = FALSE;
		gboolean _tmp45_;
		BoxesLibvirtMachine* _tmp47_;
		_tmp32_ = machine;
		boxes_vm_creator_mark_as_installed (self, _tmp32_);
		{
			GVirDomain* _tmp33_;
			_tmp33_ = domain;
			gvir_domain_start (_tmp33_, (guint) 0, &_inner_error_);
			if (_inner_error_ != NULL) {
				goto __catch67_g_error;
			}
		}
		goto __finally67;
		__catch67_g_error:
		{
			GError* _error_ = NULL;
			GVirDomain* _tmp34_;
			const gchar* _tmp35_ = NULL;
			GError* _tmp36_;
			const gchar* _tmp37_;
			_error_ = _inner_error_;
			_inner_error_ = NULL;
			_tmp34_ = domain;
			_tmp35_ = gvir_domain_get_name (_tmp34_);
			_tmp36_ = _error_;
			_tmp37_ = _tmp36_->message;
			g_warning ("vm-creator.vala:114: Failed to start domain '%s': %s", _tmp35_, _tmp37_);
			_g_error_free0 (_error_);
		}
		__finally67:
		if (_inner_error_ != NULL) {
			_g_object_unref0 (domain);
			_g_object_unref0 (machine);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
		_tmp38_ = machine;
		_tmp39_ = self->priv->state_changed_id;
		g_signal_handler_disconnect ((GObject*) _tmp38_, _tmp39_);
		_tmp41_ = machine;
		_tmp42_ = _tmp41_->domain_config;
		_tmp43_ = boxes_vm_configurator_is_live_config (_tmp42_);
		if (_tmp43_) {
			_tmp40_ = TRUE;
		} else {
			gboolean _tmp44_ = FALSE;
			_tmp44_ = boxes_vm_creator_install_trackable (self);
			_tmp40_ = !_tmp44_;
		}
		_tmp45_ = _tmp40_;
		if (_tmp45_) {
			BoxesLibvirtMachine* _tmp46_;
			_tmp46_ = machine;
			boxes_machine_set_info ((BoxesMachine*) _tmp46_, NULL);
		}
		_tmp47_ = machine;
		_boxes_vm_creator_unref0 (_tmp47_->vm_creator);
		_tmp47_->vm_creator = NULL;
	} else {
		BoxesLibvirtMachine* _tmp48_;
		GVirConfigDomain* _tmp49_;
		gboolean _tmp50_ = FALSE;
		_tmp48_ = machine;
		_tmp49_ = _tmp48_->domain_config;
		_tmp50_ = boxes_vm_configurator_is_live_config (_tmp49_);
		if (_tmp50_) {
			BoxesLibvirtMachine* _tmp51_;
			gulong _tmp52_;
			BoxesApp* _tmp53_;
			BoxesLibvirtMachine* _tmp54_;
			_tmp51_ = machine;
			_tmp52_ = self->priv->state_changed_id;
			g_signal_handler_disconnect ((GObject*) _tmp51_, _tmp52_);
			_tmp53_ = boxes_app_app;
			_tmp54_ = machine;
			boxes_app_delete_machine (_tmp53_, (BoxesMachine*) _tmp54_, TRUE);
		} else {
			{
				GVirDomain* _tmp55_;
				_tmp55_ = domain;
				gvir_domain_start (_tmp55_, (guint) 0, &_inner_error_);
				if (_inner_error_ != NULL) {
					goto __catch68_g_error;
				}
			}
			goto __finally68;
			__catch68_g_error:
			{
				GError* _error_ = NULL;
				GVirDomain* _tmp56_;
				const gchar* _tmp57_ = NULL;
				GError* _tmp58_;
				const gchar* _tmp59_;
				_error_ = _inner_error_;
				_inner_error_ = NULL;
				_tmp56_ = domain;
				_tmp57_ = gvir_domain_get_name (_tmp56_);
				_tmp58_ = _error_;
				_tmp59_ = _tmp58_->message;
				g_warning ("vm-creator.vala:129: Failed to start domain '%s': %s", _tmp57_, _tmp59_);
				_g_error_free0 (_error_);
			}
			__finally68:
			if (_inner_error_ != NULL) {
				_g_object_unref0 (domain);
				_g_object_unref0 (machine);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
				g_clear_error (&_inner_error_);
				return;
			}
		}
	}
	_g_object_unref0 (domain);
	_g_object_unref0 (machine);
}


static void boxes_vm_creator_update_machine_info (BoxesVMCreator* self, BoxesLibvirtMachine* machine) {
	BoxesLibvirtMachine* _tmp0_;
	GVirConfigDomain* _tmp1_;
	gboolean _tmp2_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (machine != NULL);
	_tmp0_ = machine;
	_tmp1_ = _tmp0_->domain_config;
	_tmp2_ = boxes_vm_configurator_is_install_config (_tmp1_);
	if (_tmp2_) {
		BoxesLibvirtMachine* _tmp3_;
		const gchar* _tmp4_ = NULL;
		BoxesLibvirtMachine* _tmp5_;
		_tmp3_ = machine;
		_tmp4_ = _ ("Installing...");
		boxes_machine_set_info ((BoxesMachine*) _tmp3_, _tmp4_);
		_tmp5_ = machine;
		boxes_vm_creator_track_install_progress (self, _tmp5_);
	} else {
		BoxesLibvirtMachine* _tmp6_;
		const gchar* _tmp7_ = NULL;
		_tmp6_ = machine;
		_tmp7_ = _ ("Live");
		boxes_machine_set_info ((BoxesMachine*) _tmp6_, _tmp7_);
	}
}


static void boxes_vm_creator_set_post_install_config (BoxesVMCreator* self, BoxesLibvirtMachine* machine) {
	BoxesLibvirtMachine* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (machine != NULL);
	_tmp0_ = machine;
	_tmp1_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _tmp0_);
	_tmp2_ = _tmp1_;
	g_debug ("vm-creator.vala:144: Setting post-installation configuration on '%s'", _tmp2_);
	{
		BoxesLibvirtMachine* _tmp3_;
		GVirDomain* _tmp4_;
		GVirConfigDomain* _tmp5_ = NULL;
		GVirConfigDomain* config;
		GVirConfigDomain* _tmp6_;
		BoxesLibvirtMachine* _tmp7_;
		GVirDomain* _tmp8_;
		GVirConfigDomain* _tmp9_;
		_tmp3_ = machine;
		_tmp4_ = _tmp3_->domain;
		_tmp5_ = gvir_domain_get_config (_tmp4_, (guint) GVIR_DOMAIN_XML_INACTIVE, &_inner_error_);
		config = _tmp5_;
		if (_inner_error_ != NULL) {
			goto __catch69_g_error;
		}
		_tmp6_ = config;
		boxes_vm_configurator_post_install_setup (_tmp6_);
		_tmp7_ = machine;
		_tmp8_ = _tmp7_->domain;
		_tmp9_ = config;
		gvir_domain_set_config (_tmp8_, _tmp9_, &_inner_error_);
		if (_inner_error_ != NULL) {
			_g_object_unref0 (config);
			goto __catch69_g_error;
		}
		_g_object_unref0 (config);
	}
	goto __finally69;
	__catch69_g_error:
	{
		GError* _error_ = NULL;
		BoxesLibvirtMachine* _tmp10_;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		GError* _tmp13_;
		const gchar* _tmp14_;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_tmp10_ = machine;
		_tmp11_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = _error_;
		_tmp14_ = _tmp13_->message;
		g_warning ("vm-creator.vala:150: Failed to set post-install configuration on '%s' " \
"failed: %s", _tmp12_, _tmp14_);
		_g_error_free0 (_error_);
	}
	__finally69:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


static void boxes_vm_creator_mark_as_installed (BoxesVMCreator* self, BoxesLibvirtMachine* machine) {
	BoxesLibvirtMachine* _tmp0_;
	BoxesMachineMachineState _tmp1_;
	BoxesMachineMachineState _tmp2_;
	BoxesLibvirtMachine* _tmp3_;
	BoxesMachineMachineState _tmp4_;
	BoxesMachineMachineState _tmp5_;
	BoxesLibvirtMachine* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (machine != NULL);
	_tmp0_ = machine;
	_tmp1_ = boxes_machine_get_state ((BoxesMachine*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = machine;
	_tmp4_ = boxes_machine_get_state ((BoxesMachine*) _tmp3_);
	_tmp5_ = _tmp4_;
	g_return_if_fail ((_tmp2_ == BOXES_MACHINE_MACHINE_STATE_STOPPED) || (_tmp5_ == BOXES_MACHINE_MACHINE_STATE_UNKNOWN));
	_tmp6_ = machine;
	_tmp7_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _tmp6_);
	_tmp8_ = _tmp7_;
	g_debug ("vm-creator.vala:156: Marking '%s' as installed.", _tmp8_);
	{
		BoxesLibvirtMachine* _tmp9_;
		GVirDomain* _tmp10_;
		GVirConfigDomain* _tmp11_ = NULL;
		GVirConfigDomain* config;
		GVirConfigDomain* _tmp12_;
		BoxesLibvirtMachine* _tmp13_;
		GVirDomain* _tmp14_;
		GVirConfigDomain* _tmp15_;
		_tmp9_ = machine;
		_tmp10_ = _tmp9_->domain;
		_tmp11_ = gvir_domain_get_config (_tmp10_, (guint) GVIR_DOMAIN_XML_INACTIVE, &_inner_error_);
		config = _tmp11_;
		if (_inner_error_ != NULL) {
			goto __catch70_g_error;
		}
		_tmp12_ = config;
		boxes_vm_configurator_mark_as_installed (_tmp12_);
		_tmp13_ = machine;
		_tmp14_ = _tmp13_->domain;
		_tmp15_ = config;
		gvir_domain_set_config (_tmp14_, _tmp15_, &_inner_error_);
		if (_inner_error_ != NULL) {
			_g_object_unref0 (config);
			goto __catch70_g_error;
		}
		_g_object_unref0 (config);
	}
	goto __finally70;
	__catch70_g_error:
	{
		GError* _error_ = NULL;
		BoxesLibvirtMachine* _tmp16_;
		const gchar* _tmp17_;
		const gchar* _tmp18_;
		GError* _tmp19_;
		const gchar* _tmp20_;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_tmp16_ = machine;
		_tmp17_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = _error_;
		_tmp20_ = _tmp19_->message;
		g_warning ("vm-creator.vala:162: Failed to marking domain '%s' as installed: %s", _tmp18_, _tmp20_);
		_g_error_free0 (_error_);
	}
	__finally70:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


static void _vala_GVirStorageVolInfo_free (GVirStorageVolInfo* self) {
	g_boxed_free (gvir_storage_vol_info_get_type (), self);
}


static gboolean boxes_vm_creator_guest_installed_os (BoxesVMCreator* self, GVirStorageVol* volume) {
	gboolean result = FALSE;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (volume != NULL, FALSE);
	{
		gboolean _tmp0_ = FALSE;
		_tmp0_ = boxes_vm_creator_install_trackable (self);
		if (_tmp0_) {
			GVirStorageVol* _tmp1_;
			gint _tmp2_ = 0;
			gint _tmp3_;
			_tmp1_ = volume;
			_tmp2_ = boxes_vm_creator_get_progress (self, _tmp1_, &_inner_error_);
			_tmp3_ = _tmp2_;
			if (_inner_error_ != NULL) {
				goto __catch71_g_error;
			}
			result = _tmp3_ == BOXES_VM_CREATOR_INSTALL_COMPLETE_PERCENT;
			return result;
		} else {
			GVirStorageVol* _tmp4_;
			GVirStorageVolInfo* _tmp5_ = NULL;
			GVirStorageVolInfo* info;
			GVirStorageVolInfo* _tmp6_;
			guint64 _tmp7_;
			_tmp4_ = volume;
			_tmp5_ = gvir_storage_vol_get_info (_tmp4_, &_inner_error_);
			info = _tmp5_;
			if (_inner_error_ != NULL) {
				goto __catch71_g_error;
			}
			_tmp6_ = info;
			_tmp7_ = _tmp6_->allocation;
			result = _tmp7_ >= ((guint64) OSINFO_MEBIBYTES);
			__vala_GVirStorageVolInfo_free0 (info);
			return result;
		}
	}
	goto __finally71;
	__catch71_g_error:
	{
		GError* _error_ = NULL;
		GVirStorageVol* _tmp8_;
		const gchar* _tmp9_ = NULL;
		GError* _tmp10_;
		const gchar* _tmp11_;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_tmp8_ = volume;
		_tmp9_ = gvir_storage_vol_get_name (_tmp8_);
		_tmp10_ = _error_;
		_tmp11_ = _tmp10_->message;
		g_warning ("vm-creator.vala:178: Failed to get information from volume '%s': %s", _tmp9_, _tmp11_);
		result = FALSE;
		_g_error_free0 (_error_);
		return result;
	}
	__finally71:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
	g_clear_error (&_inner_error_);
	return FALSE;
}


static Block44Data* block44_data_ref (Block44Data* _data44_) {
	g_atomic_int_inc (&_data44_->_ref_count_);
	return _data44_;
}


static void block44_data_unref (void * _userdata_) {
	Block44Data* _data44_;
	_data44_ = (Block44Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data44_->_ref_count_)) {
		BoxesVMCreator * self;
		self = _data44_->self;
		_g_object_unref0 (_data44_->machine);
		_boxes_vm_creator_unref0 (self);
		g_slice_free (Block44Data, _data44_);
	}
}


static gboolean __lambda50_ (Block44Data* _data44_) {
	BoxesVMCreator * self;
	gboolean result = FALSE;
	gint _tmp0_;
	gboolean _tmp2_;
	self = _data44_->self;
	_tmp0_ = self->priv->prev_progress;
	if (_tmp0_ == 100) {
		BoxesLibvirtMachine* _tmp1_;
		_tmp1_ = _data44_->machine;
		boxes_machine_set_info ((BoxesMachine*) _tmp1_, NULL);
		result = FALSE;
		return result;
	}
	_tmp2_ = self->priv->updating_install_progress;
	if (!_tmp2_) {
		BoxesLibvirtMachine* _tmp3_;
		_tmp3_ = _data44_->machine;
		boxes_vm_creator_update_install_progress (self, _tmp3_, NULL, NULL);
	}
	result = TRUE;
	return result;
}


static gboolean ___lambda50__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda50_ (self);
	return result;
}


static void boxes_vm_creator_track_install_progress (BoxesVMCreator* self, BoxesLibvirtMachine* machine) {
	Block44Data* _data44_;
	BoxesLibvirtMachine* _tmp0_;
	BoxesLibvirtMachine* _tmp1_;
	gboolean _tmp2_ = FALSE;
	BoxesLibvirtMachine* _tmp3_;
	GVirStorageVol* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (machine != NULL);
	_data44_ = g_slice_new0 (Block44Data);
	_data44_->_ref_count_ = 1;
	_data44_->self = boxes_vm_creator_ref (self);
	_tmp0_ = machine;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_data44_->machine = _tmp1_;
	_tmp2_ = boxes_vm_creator_install_trackable (self);
	if (!_tmp2_) {
		block44_data_unref (_data44_);
		_data44_ = NULL;
		return;
	}
	_tmp3_ = _data44_->machine;
	_tmp4_ = _tmp3_->storage_volume;
	g_return_if_fail (_tmp4_ != NULL);
	g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 6, ___lambda50__gsource_func, block44_data_ref (_data44_), block44_data_unref);
	block44_data_unref (_data44_);
	_data44_ = NULL;
}


static void boxes_vm_creator_update_install_progress_data_free (gpointer _data) {
	BoxesVmCreatorUpdateInstallProgressData* _data_;
	_data_ = _data;
	_boxes_vm_creator_unref0 (_data_->self);
	g_slice_free (BoxesVmCreatorUpdateInstallProgressData, _data_);
}


static void boxes_vm_creator_update_install_progress (BoxesVMCreator* self, BoxesLibvirtMachine* machine, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesVmCreatorUpdateInstallProgressData* _data_;
	BoxesVMCreator* _tmp0_;
	BoxesLibvirtMachine* _tmp1_;
	BoxesLibvirtMachine* _tmp2_;
	_data_ = g_slice_new0 (BoxesVmCreatorUpdateInstallProgressData);
	_data_->_async_result = g_simple_async_result_new (g_object_newv (G_TYPE_OBJECT, 0, NULL), _callback_, _user_data_, boxes_vm_creator_update_install_progress);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_vm_creator_update_install_progress_data_free);
	_tmp0_ = _boxes_vm_creator_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = machine;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data_->machine = _tmp2_;
	boxes_vm_creator_update_install_progress_co (_data_);
}


static void boxes_vm_creator_update_install_progress_finish (BoxesVMCreator* self, GAsyncResult* _res_) {
	BoxesVmCreatorUpdateInstallProgressData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static Block45Data* block45_data_ref (Block45Data* _data45_) {
	g_atomic_int_inc (&_data45_->_ref_count_);
	return _data45_;
}


static void block45_data_unref (void * _userdata_) {
	Block45Data* _data45_;
	_data45_ = (Block45Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data45_->_ref_count_)) {
		BoxesVMCreator * self;
		self = _data45_->self;
		_g_object_unref0 (_data45_->machine);
		_boxes_vm_creator_unref0 (self);
		g_slice_free (Block45Data, _data45_);
	}
}


static void ___lambda51_ (Block45Data* _data45_, GError** error) {
	BoxesVMCreator * self;
	BoxesLibvirtMachine* _tmp0_;
	GVirStorageVol* _tmp1_;
	gint _tmp2_ = 0;
	gint _tmp3_;
	GError * _inner_error_ = NULL;
	self = _data45_->self;
	_tmp0_ = _data45_->machine;
	_tmp1_ = _tmp0_->storage_volume;
	_tmp2_ = boxes_vm_creator_get_progress (self, _tmp1_, &_inner_error_);
	_tmp3_ = _tmp2_;
	if (_inner_error_ != NULL) {
		g_propagate_error (error, _inner_error_);
		return;
	}
	_data45_->progress = _tmp3_;
}


static void ____lambda51__boxes_run_in_thread_func (gpointer self, GError** error) {
	___lambda51_ (self, error);
}


static void boxes_vm_creator_update_install_progress_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesVmCreatorUpdateInstallProgressData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_vm_creator_update_install_progress_co (_data_);
}


static gboolean boxes_vm_creator_update_install_progress_co (BoxesVmCreatorUpdateInstallProgressData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data45_ = g_slice_new0 (Block45Data);
	_data_->_data45_->_ref_count_ = 1;
	_data_->_data45_->self = boxes_vm_creator_ref (_data_->self);
	_data_->_tmp0_ = _data_->machine;
	_data_->_data45_->machine = _data_->_tmp0_;
	_data_->_data45_->_async_data_ = _data_;
	_data_->self->priv->updating_install_progress = TRUE;
	_data_->_data45_->progress = 0;
	{
		_data_->_state_ = 1;
		boxes_run_in_thread (____lambda51__boxes_run_in_thread_func, block45_data_ref (_data_->_data45_), block45_data_unref, NULL, boxes_vm_creator_update_install_progress_ready, _data_);
		return FALSE;
		_state_1:
		boxes_run_in_thread_finish (_data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			goto __catch72_g_error;
		}
	}
	goto __finally72;
	__catch72_g_error:
	{
		_data_->_error_ = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp1_ = _data_->_data45_->machine;
		_data_->_tmp2_ = _data_->_tmp1_->storage_volume;
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = gvir_storage_vol_get_name (_data_->_tmp2_);
		_data_->_tmp4_ = _data_->_error_;
		_data_->_tmp5_ = _data_->_tmp4_->message;
		g_warning ("vm-creator.vala:214: Failed to get information from volume '%s': %s", _data_->_tmp3_, _data_->_tmp5_);
		_g_error_free0 (_data_->_error_);
	}
	__finally72:
	if (_data_->_inner_error_ != NULL) {
		block45_data_unref (_data_->_data45_);
		_data_->_data45_ = NULL;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	if (_data_->_data45_->progress < 0) {
		block45_data_unref (_data_->_data45_);
		_data_->_data45_ = NULL;
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp6_ = _data_->_data45_->machine;
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = ngettext ("%d%% Installed", "%d%% Installed", (gulong) _data_->_data45_->progress);
	_data_->_tmp8_ = NULL;
	_data_->_tmp8_ = g_strdup_printf (_data_->_tmp7_, _data_->_data45_->progress);
	_data_->_tmp9_ = _data_->_tmp8_;
	boxes_machine_set_info ((BoxesMachine*) _data_->_tmp6_, _data_->_tmp9_);
	_g_free0 (_data_->_tmp9_);
	_data_->self->priv->prev_progress = _data_->_data45_->progress;
	_data_->self->priv->updating_install_progress = FALSE;
	block45_data_unref (_data_->_data45_);
	_data_->_data45_ = NULL;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static gboolean boxes_vm_creator_install_trackable (BoxesVMCreator* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	BoxesInstallerMedia* _tmp1_;
	gboolean _tmp5_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->priv->_install_media;
	if (_tmp1_ != NULL) {
		BoxesInstallerMedia* _tmp2_;
		guint64 _tmp3_;
		guint64 _tmp4_;
		_tmp2_ = self->priv->_install_media;
		_tmp3_ = boxes_installer_media_get_installed_size (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ > ((guint64) 0);
	} else {
		_tmp0_ = FALSE;
	}
	_tmp5_ = _tmp0_;
	result = _tmp5_;
	return result;
}


static gint boxes_vm_creator_get_progress (BoxesVMCreator* self, GVirStorageVol* volume, GError** error) {
	gint result = 0;
	GVirStorageVol* _tmp0_;
	GVirStorageVolInfo* _tmp1_ = NULL;
	GVirStorageVolInfo* volume_info;
	guint64 _tmp2_;
	BoxesInstallerMedia* _tmp3_;
	guint64 _tmp4_;
	guint64 _tmp5_;
	gint percent;
	gint _tmp6_;
	gint _tmp7_ = 0;
	gint _tmp8_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (volume != NULL, 0);
	_tmp0_ = volume;
	_tmp1_ = gvir_storage_vol_get_info (_tmp0_, &_inner_error_);
	volume_info = _tmp1_;
	if (_inner_error_ != NULL) {
		g_propagate_error (error, _inner_error_);
		return 0;
	}
	_tmp2_ = volume_info->allocation;
	_tmp3_ = self->priv->_install_media;
	_tmp4_ = boxes_installer_media_get_installed_size (_tmp3_);
	_tmp5_ = _tmp4_;
	percent = (gint) ((_tmp2_ * 100) / _tmp5_);
	_tmp6_ = percent;
	_tmp7_ = CLAMP (_tmp6_, 0, BOXES_VM_CREATOR_INSTALL_COMPLETE_PERCENT);
	percent = _tmp7_;
	_tmp8_ = percent;
	if (_tmp8_ == BOXES_VM_CREATOR_INSTALL_COMPLETE_PERCENT) {
		percent = 100;
	}
	result = percent;
	__vala_GVirStorageVolInfo_free0 (volume_info);
	return result;
}


static void boxes_vm_creator_create_domain_name_and_title_from_media_data_free (gpointer _data) {
	BoxesVmCreatorCreateDomainNameAndTitleFromMediaData* _data_;
	_data_ = _data;
	_boxes_vm_creator_unref0 (_data_->self);
	g_slice_free (BoxesVmCreatorCreateDomainNameAndTitleFromMediaData, _data_);
}


static void boxes_vm_creator_create_domain_name_and_title_from_media (BoxesVMCreator* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesVmCreatorCreateDomainNameAndTitleFromMediaData* _data_;
	BoxesVMCreator* _tmp0_;
	_data_ = g_slice_new0 (BoxesVmCreatorCreateDomainNameAndTitleFromMediaData);
	_data_->_async_result = g_simple_async_result_new (g_object_newv (G_TYPE_OBJECT, 0, NULL), _callback_, _user_data_, boxes_vm_creator_create_domain_name_and_title_from_media);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_vm_creator_create_domain_name_and_title_from_media_data_free);
	_tmp0_ = _boxes_vm_creator_ref0 (self);
	_data_->self = _tmp0_;
	boxes_vm_creator_create_domain_name_and_title_from_media_co (_data_);
}


static void boxes_vm_creator_create_domain_name_and_title_from_media_finish (BoxesVMCreator* self, GAsyncResult* _res_, gchar** name, gchar** title, GError** error) {
	BoxesVmCreatorCreateDomainNameAndTitleFromMediaData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	if (name) {
		*name = _data_->name;
	} else {
		_g_free0 (_data_->name);
	}
	_data_->name = NULL;
	if (title) {
		*title = _data_->title;
	} else {
		_g_free0 (_data_->title);
	}
	_data_->title = NULL;
}


static void boxes_vm_creator_create_domain_name_and_title_from_media_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesVmCreatorCreateDomainNameAndTitleFromMediaData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_vm_creator_create_domain_name_and_title_from_media_co (_data_);
}


static gboolean boxes_vm_creator_create_domain_name_and_title_from_media_co (BoxesVmCreatorCreateDomainNameAndTitleFromMediaData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->_install_media;
	_data_->_tmp1_ = _data_->_tmp0_->label;
	_data_->_tmp2_ = g_strdup (_data_->_tmp1_);
	_data_->base_title = _data_->_tmp2_;
	_data_->_tmp3_ = _data_->base_title;
	_data_->_tmp4_ = g_strdup (_data_->_tmp3_);
	_g_free0 (_data_->title);
	_data_->title = _data_->_tmp4_;
	_data_->_tmp6_ = _data_->self->priv->_install_media;
	_data_->_tmp7_ = _data_->_tmp6_->os;
	if (_data_->_tmp7_ != NULL) {
		_data_->_tmp8_ = _data_->self->priv->_install_media;
		_data_->_tmp9_ = _data_->_tmp8_->os;
		_data_->_tmp10_ = osinfo_product_get_short_id ((OsinfoProduct*) _data_->_tmp9_);
		_data_->_tmp11_ = _data_->_tmp10_;
		_data_->_tmp5_ = _data_->_tmp11_;
	} else {
		_data_->_tmp12_ = _data_->base_title;
		_data_->_tmp5_ = _data_->_tmp12_;
	}
	_data_->_tmp13_ = _data_->_tmp5_;
	_data_->_tmp14_ = g_strdup (_data_->_tmp13_);
	_data_->base_name = _data_->_tmp14_;
	_data_->_tmp15_ = g_strdup (_data_->base_name);
	_g_free0 (_data_->name);
	_data_->name = _data_->_tmp15_;
	_data_->_state_ = 1;
	boxes_vm_creator_get_storage_pool (_data_->self, boxes_vm_creator_create_domain_name_and_title_from_media_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp16_ = NULL;
	_data_->_tmp16_ = boxes_vm_creator_get_storage_pool_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
	_data_->pool = _data_->_tmp16_;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_free0 (_data_->base_name);
		_g_free0 (_data_->base_title);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	{
		_data_->i = 2;
		{
			_data_->_tmp17_ = TRUE;
			while (TRUE) {
				_data_->_tmp18_ = _data_->_tmp17_;
				if (!_data_->_tmp18_) {
					_data_->_tmp19_ = _data_->i;
					_data_->i = _data_->_tmp19_ + 1;
				}
				_data_->_tmp17_ = FALSE;
				_data_->_tmp22_ = boxes_vm_creator_get_connection (_data_->self);
				_data_->_tmp23_ = _data_->_tmp22_;
				_data_->_tmp24_ = _data_->name;
				_data_->_tmp25_ = NULL;
				_data_->_tmp25_ = gvir_connection_find_domain_by_name (_data_->_tmp23_, _data_->_tmp24_);
				_data_->_tmp26_ = _data_->_tmp25_;
				_data_->_tmp27_ = _data_->_tmp26_ != NULL;
				_g_object_unref0 (_data_->_tmp26_);
				if (_data_->_tmp27_) {
					_data_->_tmp21_ = TRUE;
				} else {
					_data_->_tmp28_ = boxes_vm_creator_get_connection (_data_->self);
					_data_->_tmp29_ = _data_->_tmp28_;
					_data_->_tmp30_ = _data_->title;
					_data_->_tmp31_ = NULL;
					_data_->_tmp31_ = gvir_connection_find_domain_by_name (_data_->_tmp29_, _data_->_tmp30_);
					_data_->_tmp32_ = _data_->_tmp31_;
					_data_->_tmp21_ = _data_->_tmp32_ != NULL;
					_g_object_unref0 (_data_->_tmp32_);
				}
				_data_->_tmp33_ = _data_->_tmp21_;
				if (_data_->_tmp33_) {
					_data_->_tmp20_ = TRUE;
				} else {
					_data_->_tmp34_ = _data_->name;
					_data_->_tmp35_ = NULL;
					_data_->_tmp35_ = gvir_storage_pool_get_volume (_data_->pool, _data_->_tmp34_);
					_data_->_tmp36_ = _data_->_tmp35_;
					_data_->_tmp20_ = _data_->_tmp36_ != NULL;
					_g_object_unref0 (_data_->_tmp36_);
				}
				_data_->_tmp37_ = _data_->_tmp20_;
				if (!_data_->_tmp37_) {
					break;
				}
				_data_->_tmp38_ = g_strconcat (_data_->base_name, "-", NULL);
				_data_->_tmp39_ = _data_->_tmp38_;
				_data_->_tmp40_ = _data_->i;
				_data_->_tmp41_ = NULL;
				_data_->_tmp41_ = g_strdup_printf ("%i", _data_->_tmp40_);
				_data_->_tmp42_ = _data_->_tmp41_;
				_data_->_tmp43_ = g_strconcat (_data_->_tmp39_, _data_->_tmp42_, NULL);
				_g_free0 (_data_->name);
				_data_->name = _data_->_tmp43_;
				_g_free0 (_data_->_tmp42_);
				_g_free0 (_data_->_tmp39_);
				_data_->_tmp44_ = _data_->base_title;
				_data_->_tmp45_ = g_strconcat (_data_->_tmp44_, " ", NULL);
				_data_->_tmp46_ = _data_->_tmp45_;
				_data_->_tmp47_ = _data_->i;
				_data_->_tmp48_ = NULL;
				_data_->_tmp48_ = g_strdup_printf ("%i", _data_->_tmp47_);
				_data_->_tmp49_ = _data_->_tmp48_;
				_data_->_tmp50_ = g_strconcat (_data_->_tmp46_, _data_->_tmp49_, NULL);
				_g_free0 (_data_->title);
				_data_->title = _data_->_tmp50_;
				_g_free0 (_data_->_tmp49_);
				_g_free0 (_data_->_tmp46_);
			}
		}
	}
	_g_object_unref0 (_data_->pool);
	_g_free0 (_data_->base_name);
	_g_free0 (_data_->base_title);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void boxes_vm_creator_create_target_volume_data_free (gpointer _data) {
	BoxesVmCreatorCreateTargetVolumeData* _data_;
	_data_ = _data;
	_g_free0 (_data_->name);
	_g_object_unref0 (_data_->result);
	_boxes_vm_creator_unref0 (_data_->self);
	g_slice_free (BoxesVmCreatorCreateTargetVolumeData, _data_);
}


static void boxes_vm_creator_create_target_volume (BoxesVMCreator* self, const gchar* name, gint64 storage, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesVmCreatorCreateTargetVolumeData* _data_;
	BoxesVMCreator* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gint64 _tmp3_;
	_data_ = g_slice_new0 (BoxesVmCreatorCreateTargetVolumeData);
	_data_->_async_result = g_simple_async_result_new (g_object_newv (G_TYPE_OBJECT, 0, NULL), _callback_, _user_data_, boxes_vm_creator_create_target_volume);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_vm_creator_create_target_volume_data_free);
	_tmp0_ = _boxes_vm_creator_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = name;
	_tmp2_ = g_strdup (_tmp1_);
	_data_->name = _tmp2_;
	_tmp3_ = storage;
	_data_->storage = _tmp3_;
	boxes_vm_creator_create_target_volume_co (_data_);
}


static GVirStorageVol* boxes_vm_creator_create_target_volume_finish (BoxesVMCreator* self, GAsyncResult* _res_, GError** error) {
	GVirStorageVol* result;
	BoxesVmCreatorCreateTargetVolumeData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return NULL;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void boxes_vm_creator_create_target_volume_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesVmCreatorCreateTargetVolumeData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_vm_creator_create_target_volume_co (_data_);
}


static gboolean boxes_vm_creator_create_target_volume_co (BoxesVmCreatorCreateTargetVolumeData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_state_ = 1;
	boxes_vm_creator_get_storage_pool (_data_->self, boxes_vm_creator_create_target_volume_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = boxes_vm_creator_get_storage_pool_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
	_data_->pool = _data_->_tmp0_;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp1_ = _data_->name;
	_data_->_tmp2_ = _data_->storage;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = boxes_vm_configurator_create_volume_config (_data_->_tmp1_, _data_->_tmp2_, &_data_->_inner_error_);
	_data_->config = _data_->_tmp3_;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_object_unref0 (_data_->pool);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp4_ = _data_->pool;
	_data_->_tmp5_ = _data_->config;
	_data_->_tmp6_ = NULL;
	_data_->_tmp6_ = gvir_storage_pool_create_volume (_data_->_tmp4_, _data_->_tmp5_, &_data_->_inner_error_);
	_data_->volume = _data_->_tmp6_;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_object_unref0 (_data_->config);
		_g_object_unref0 (_data_->pool);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->result = _data_->volume;
	_g_object_unref0 (_data_->config);
	_g_object_unref0 (_data_->pool);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_object_unref0 (_data_->volume);
	_g_object_unref0 (_data_->config);
	_g_object_unref0 (_data_->pool);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void boxes_vm_creator_get_storage_pool_data_free (gpointer _data) {
	BoxesVmCreatorGetStoragePoolData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->result);
	_boxes_vm_creator_unref0 (_data_->self);
	g_slice_free (BoxesVmCreatorGetStoragePoolData, _data_);
}


static void boxes_vm_creator_get_storage_pool (BoxesVMCreator* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesVmCreatorGetStoragePoolData* _data_;
	BoxesVMCreator* _tmp0_;
	_data_ = g_slice_new0 (BoxesVmCreatorGetStoragePoolData);
	_data_->_async_result = g_simple_async_result_new (g_object_newv (G_TYPE_OBJECT, 0, NULL), _callback_, _user_data_, boxes_vm_creator_get_storage_pool);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_vm_creator_get_storage_pool_data_free);
	_tmp0_ = _boxes_vm_creator_ref0 (self);
	_data_->self = _tmp0_;
	boxes_vm_creator_get_storage_pool_co (_data_);
}


static GVirStoragePool* boxes_vm_creator_get_storage_pool_finish (BoxesVMCreator* self, GAsyncResult* _res_, GError** error) {
	GVirStoragePool* result;
	BoxesVmCreatorGetStoragePoolData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return NULL;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void boxes_vm_creator_get_storage_pool_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesVmCreatorGetStoragePoolData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_vm_creator_get_storage_pool_co (_data_);
}


static gboolean boxes_vm_creator_get_storage_pool_co (BoxesVmCreatorGetStoragePoolData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = boxes_vm_creator_get_connection (_data_->self);
	_data_->_tmp1_ = _data_->_tmp0_;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = gvir_connection_find_storage_pool_by_name (_data_->_tmp1_, PACKAGE_TARNAME);
	_data_->pool = _data_->_tmp2_;
	_data_->_tmp3_ = _data_->pool;
	if (_data_->_tmp3_ == NULL) {
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = boxes_vm_configurator_get_pool_config (&_data_->_inner_error_);
		_data_->config = _data_->_tmp4_;
		if (_data_->_inner_error_ != NULL) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_g_object_unref0 (_data_->pool);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp5_ = boxes_vm_creator_get_connection (_data_->self);
		_data_->_tmp6_ = _data_->_tmp5_;
		_data_->_tmp7_ = _data_->config;
		_data_->_tmp8_ = NULL;
		_data_->_tmp8_ = gvir_connection_create_storage_pool (_data_->_tmp6_, _data_->_tmp7_, (guint) 0, &_data_->_inner_error_);
		_data_->_tmp9_ = _data_->_tmp8_;
		if (_data_->_inner_error_ != NULL) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_g_object_unref0 (_data_->config);
			_g_object_unref0 (_data_->pool);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_g_object_unref0 (_data_->pool);
		_data_->pool = _data_->_tmp9_;
		_data_->_tmp10_ = _data_->pool;
		_data_->_state_ = 1;
		gvir_storage_pool_build_async (_data_->_tmp10_, (guint) 0, NULL, boxes_vm_creator_get_storage_pool_ready, _data_);
		return FALSE;
		_state_1:
		gvir_storage_pool_build_finish (_data_->_tmp10_, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_g_object_unref0 (_data_->config);
			_g_object_unref0 (_data_->pool);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp11_ = _data_->pool;
		_data_->_state_ = 2;
		gvir_storage_pool_start_async (_data_->_tmp11_, (guint) 0, NULL, boxes_vm_creator_get_storage_pool_ready, _data_);
		return FALSE;
		_state_2:
		gvir_storage_pool_start_finish (_data_->_tmp11_, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_g_object_unref0 (_data_->config);
			_g_object_unref0 (_data_->pool);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp12_ = _data_->pool;
		_data_->_state_ = 3;
		gvir_storage_pool_refresh_async (_data_->_tmp12_, NULL, boxes_vm_creator_get_storage_pool_ready, _data_);
		return FALSE;
		_state_3:
		gvir_storage_pool_refresh_finish (_data_->_tmp12_, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_g_object_unref0 (_data_->config);
			_g_object_unref0 (_data_->pool);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_g_object_unref0 (_data_->config);
	}
	_data_->result = _data_->pool;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_object_unref0 (_data_->pool);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


BoxesInstallerMedia* boxes_vm_creator_get_install_media (BoxesVMCreator* self) {
	BoxesInstallerMedia* result;
	BoxesInstallerMedia* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_install_media;
	result = _tmp0_;
	return result;
}


static void boxes_vm_creator_set_install_media (BoxesVMCreator* self, BoxesInstallerMedia* value) {
	BoxesInstallerMedia* _tmp0_;
	BoxesInstallerMedia* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_install_media);
	self->priv->_install_media = _tmp1_;
}


static GVirConnection* boxes_vm_creator_get_connection (BoxesVMCreator* self) {
	GVirConnection* result;
	BoxesApp* _tmp0_;
	GVirConnection* _tmp1_;
	GVirConnection* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = boxes_app_app;
	_tmp1_ = boxes_app_get_default_connection (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}


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


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


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


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


static gchar* boxes_value_vm_creator_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	if (collect_values[0].v_pointer) {
		BoxesVMCreator* object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = boxes_vm_creator_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}


static gchar* boxes_value_vm_creator_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	BoxesVMCreator** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = boxes_vm_creator_ref (value->data[0].v_pointer);
	}
	return NULL;
}


GParamSpec* boxes_param_spec_vm_creator (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	BoxesParamSpecVMCreator* spec;
	g_return_val_if_fail (g_type_is_a (object_type, BOXES_TYPE_VM_CREATOR), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}


gpointer boxes_value_get_vm_creator (const GValue* value) {
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, BOXES_TYPE_VM_CREATOR), NULL);
	return value->data[0].v_pointer;
}


void boxes_value_set_vm_creator (GValue* value, gpointer v_object) {
	BoxesVMCreator* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, BOXES_TYPE_VM_CREATOR));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, BOXES_TYPE_VM_CREATOR));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		boxes_vm_creator_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		boxes_vm_creator_unref (old);
	}
}


void boxes_value_take_vm_creator (GValue* value, gpointer v_object) {
	BoxesVMCreator* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, BOXES_TYPE_VM_CREATOR));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, BOXES_TYPE_VM_CREATOR));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		boxes_vm_creator_unref (old);
	}
}


static void boxes_vm_creator_class_init (BoxesVMCreatorClass * klass) {
	boxes_vm_creator_parent_class = g_type_class_peek_parent (klass);
	BOXES_VM_CREATOR_CLASS (klass)->finalize = boxes_vm_creator_finalize;
	g_type_class_add_private (klass, sizeof (BoxesVMCreatorPrivate));
}


static void boxes_vm_creator_instance_init (BoxesVMCreator * self) {
	self->priv = BOXES_VM_CREATOR_GET_PRIVATE (self);
	self->priv->prev_progress = 0;
	self->ref_count = 1;
}


static void boxes_vm_creator_finalize (BoxesVMCreator* obj) {
	BoxesVMCreator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_VM_CREATOR, BoxesVMCreator);
	_g_object_unref0 (self->priv->_install_media);
}


GType boxes_vm_creator_get_type (void) {
	static volatile gsize boxes_vm_creator_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_vm_creator_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { boxes_value_vm_creator_init, boxes_value_vm_creator_free_value, boxes_value_vm_creator_copy_value, boxes_value_vm_creator_peek_pointer, "p", boxes_value_vm_creator_collect_value, "p", boxes_value_vm_creator_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (BoxesVMCreatorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_vm_creator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesVMCreator), 0, (GInstanceInitFunc) boxes_vm_creator_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType boxes_vm_creator_type_id;
		boxes_vm_creator_type_id = g_type_register_fundamental (g_type_fundamental_next (), "BoxesVMCreator", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&boxes_vm_creator_type_id__volatile, boxes_vm_creator_type_id);
	}
	return boxes_vm_creator_type_id__volatile;
}


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


void boxes_vm_creator_unref (gpointer instance) {
	BoxesVMCreator* self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		BOXES_VM_CREATOR_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}



