/* libvirt-machine.c generated by valac 0.17.1.6-d284, the Vala compiler
 * generated from libvirt-machine.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 <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <libvirt-gobject/libvirt-gobject.h>
#include <libvirt-gconfig/libvirt-gconfig.h>
#include <float.h>
#include <math.h>
#include <clutter-gtk/clutter-gtk.h>
#include <glib/gi18n-lib.h>
#include <osinfo/osinfo.h>


#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;
typedef struct _BoxesUIPrivate BoxesUIPrivate;

#define BOXES_TYPE_UI_STATE (boxes_ui_state_get_type ())

#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;
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_PAIR (boxes_pair_get_type ())
#define BOXES_PAIR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_PAIR, BoxesPair))
#define BOXES_PAIR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_PAIR, BoxesPairClass))
#define BOXES_IS_PAIR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_PAIR))
#define BOXES_IS_PAIR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_PAIR))
#define BOXES_PAIR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_PAIR, BoxesPairClass))

typedef struct _BoxesPair BoxesPair;
typedef struct _BoxesPairClass BoxesPairClass;

#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;
typedef struct _BoxesMachinePrivate BoxesMachinePrivate;

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

#define BOXES_TYPE_COLLECTION_SOURCE (boxes_collection_source_get_type ())
#define BOXES_COLLECTION_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_SOURCE, BoxesCollectionSource))
#define BOXES_COLLECTION_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_SOURCE, BoxesCollectionSourceClass))
#define BOXES_IS_COLLECTION_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_SOURCE))
#define BOXES_IS_COLLECTION_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_SOURCE))
#define BOXES_COLLECTION_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_SOURCE, BoxesCollectionSourceClass))

typedef struct _BoxesCollectionSource BoxesCollectionSource;
typedef struct _BoxesCollectionSourceClass BoxesCollectionSourceClass;

#define BOXES_TYPE_DISPLAY_CONFIG (boxes_display_config_get_type ())
#define BOXES_DISPLAY_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_DISPLAY_CONFIG, BoxesDisplayConfig))
#define BOXES_DISPLAY_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_DISPLAY_CONFIG, BoxesDisplayConfigClass))
#define BOXES_IS_DISPLAY_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_DISPLAY_CONFIG))
#define BOXES_IS_DISPLAY_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_DISPLAY_CONFIG))
#define BOXES_DISPLAY_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_DISPLAY_CONFIG, BoxesDisplayConfigClass))

typedef struct _BoxesDisplayConfig BoxesDisplayConfig;
typedef struct _BoxesDisplayConfigClass BoxesDisplayConfigClass;

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

#define BOXES_LIBVIRT_MACHINE_TYPE_MACHINE_STAT (boxes_libvirt_machine_machine_stat_get_type ())
typedef struct _BoxesLibvirtMachineMachineStat BoxesLibvirtMachineMachineStat;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define BOXES_TYPE_DISPLAY (boxes_display_get_type ())
#define BOXES_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_DISPLAY, BoxesDisplay))
#define BOXES_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_DISPLAY, BoxesDisplayClass))
#define BOXES_IS_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_DISPLAY))
#define BOXES_IS_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_DISPLAY))
#define BOXES_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_DISPLAY, BoxesDisplayClass))

typedef struct _BoxesDisplay BoxesDisplay;
typedef struct _BoxesDisplayClass BoxesDisplayClass;
typedef struct _BoxesAppPrivate BoxesAppPrivate;

#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_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_MACHINE_TYPE_MACHINE_STATE (boxes_machine_machine_state_get_type ())
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define __vala_GVirDomainInfo_free0(var) ((var == NULL) ? NULL : (var = (_vala_GVirDomainInfo_free (var), NULL)))
typedef struct _Block10Data Block10Data;
typedef struct _Block11Data Block11Data;
#define __vala_GVirDomainDiskStats_free0(var) ((var == NULL) ? NULL : (var = (_vala_GVirDomainDiskStats_free (var), NULL)))
typedef struct _BoxesLibvirtMachineUpdateIoStatData BoxesLibvirtMachineUpdateIoStatData;
typedef struct _Block12Data Block12Data;
typedef struct _Block13Data Block13Data;
#define __vala_GVirDomainInterfaceStats_free0(var) ((var == NULL) ? NULL : (var = (_vala_GVirDomainInterfaceStats_free (var), NULL)))
typedef struct _BoxesLibvirtMachineUpdateNetStatData BoxesLibvirtMachineUpdateNetStatData;
typedef struct _BoxesLibvirtMachineUpdateStatsData BoxesLibvirtMachineUpdateStatsData;
typedef struct _Block14Data Block14Data;
#define __g_list_free__boxes_pair_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__boxes_pair_unref0_ (var), NULL)))

#define BOXES_TYPE_SPICE_DISPLAY (boxes_spice_display_get_type ())
#define BOXES_SPICE_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SPICE_DISPLAY, BoxesSpiceDisplay))
#define BOXES_SPICE_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SPICE_DISPLAY, BoxesSpiceDisplayClass))
#define BOXES_IS_SPICE_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SPICE_DISPLAY))
#define BOXES_IS_SPICE_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SPICE_DISPLAY))
#define BOXES_SPICE_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SPICE_DISPLAY, BoxesSpiceDisplayClass))

typedef struct _BoxesSpiceDisplay BoxesSpiceDisplay;
typedef struct _BoxesSpiceDisplayClass BoxesSpiceDisplayClass;

#define BOXES_TYPE_VNC_DISPLAY (boxes_vnc_display_get_type ())
#define BOXES_VNC_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_VNC_DISPLAY, BoxesVncDisplay))
#define BOXES_VNC_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_VNC_DISPLAY, BoxesVncDisplayClass))
#define BOXES_IS_VNC_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_VNC_DISPLAY))
#define BOXES_IS_VNC_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_VNC_DISPLAY))
#define BOXES_VNC_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_VNC_DISPLAY, BoxesVncDisplayClass))

typedef struct _BoxesVncDisplay BoxesVncDisplay;
typedef struct _BoxesVncDisplayClass BoxesVncDisplayClass;
typedef struct _BoxesLibvirtMachineTakeScreenshotData BoxesLibvirtMachineTakeScreenshotData;
typedef struct _BoxesLibvirtMachineSuspendData BoxesLibvirtMachineSuspendData;
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
#define __vala_GVirNodeInfo_free0(var) ((var == NULL) ? NULL : (var = (_vala_GVirNodeInfo_free (var), NULL)))
typedef struct _Block15Data Block15Data;
#define __vala_GVirStorageVolInfo_free0(var) ((var == NULL) ? NULL : (var = (_vala_GVirStorageVolInfo_free (var), NULL)))
#define __vala_GVirStoragePoolInfo_free0(var) ((var == NULL) ? NULL : (var = (_vala_GVirStoragePoolInfo_free (var), NULL)))
typedef struct _Block16Data Block16Data;

#define BOXES_TYPE_ICONFIG (boxes_iconfig_get_type ())
#define BOXES_ICONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_ICONFIG, BoxesIConfig))
#define BOXES_IS_ICONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_ICONFIG))
#define BOXES_ICONFIG_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BOXES_TYPE_ICONFIG, BoxesIConfigIface))

typedef struct _BoxesIConfig BoxesIConfig;
typedef struct _BoxesIConfigIface BoxesIConfigIface;

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;
	BoxesApp* app;
	BoxesMachineActor* machine_actor;
	BoxesCollectionSource* source;
	BoxesDisplayConfig* config;
	gboolean deleted;
};

struct _BoxesMachineClass {
	BoxesCollectionItemClass parent_class;
	gchar* (*get_screenshot_filename) (BoxesMachine* self, const gchar* ext);
	void (*take_screenshot) (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*take_screenshot_finish) (BoxesMachine* self, GAsyncResult* _res_, GError** error);
	GList* (*get_properties) (BoxesMachine* self, BoxesPropertiesPage page);
	gchar* (*get_screenshot_prefix) (BoxesMachine* self);
	void (*connect_display) (BoxesMachine* self);
	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;
	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 _BoxesLibvirtMachineMachineStat {
	gint64 timestamp;
	gdouble cpu_time;
	gdouble cpu_time_abs;
	gdouble cpu_guest_percent;
	gdouble memory_percent;
	GVirDomainDiskStats* disk;
	gdouble disk_read;
	gdouble disk_write;
	GVirDomainInterfaceStats* net;
	gdouble net_read;
	gdouble net_write;
};

struct _BoxesLibvirtMachinePrivate {
	gchar* storage_volume_path;
	gulong started_id;
	guint ram_update_timeout;
	guint storage_update_timeout;
	guint stats_update_timeout;
	GCancellable* stats_cancellable;
	BoxesLibvirtMachineMachineStat* stats;
	gint stats_length1;
	gint _stats_size_;
};

struct _BoxesApp {
	BoxesUI parent_instance;
	BoxesAppPrivate * priv;
	GtkApplicationWindow* window;
	GtkNotebook* notebook;
	GtkClutterEmbed* embed;
	ClutterStage* stage;
	ClutterState* state;
	ClutterBox* box;
	BoxesCollectionItem* current_item;
	BoxesTopbar* topbar;
	BoxesNotificationbar* notificationbar;
	BoxesSidebar* sidebar;
	BoxesSelectionbar* selectionbar;
	guint duration;
	GSettings* settings;
	BoxesWizard* wizard;
	BoxesProperties* properties;
	BoxesDisplayPage* display_page;
	BoxesCollection* collection;
	GSimpleAction* action_properties;
	GSimpleAction* action_fullscreen;
};

struct _BoxesAppClass {
	BoxesUIClass parent_class;
};

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

struct _Block10Data {
	int _ref_count_;
	BoxesLibvirtMachine * self;
	BoxesLibvirtMachineMachineStat* stat;
	gpointer _async_data_;
};

struct _Block11Data {
	int _ref_count_;
	Block10Data * _data10_;
	GVirDomainDisk* disk;
};

typedef void (*BoxesRunInThreadFunc) (void* user_data, GError** error);
struct _BoxesLibvirtMachineUpdateIoStatData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesLibvirtMachine* self;
	GVirDomainInfo* info;
	BoxesLibvirtMachineMachineStat* stat;
	Block10Data* _data10_;
	BoxesLibvirtMachineMachineStat* _tmp0_;
	GVirDomainInfo* _tmp1_;
	GVirDomainState _tmp2_;
	Block11Data* _data11_;
	GVirDomainDisk* _tmp3_;
	GVirDomainDisk* _tmp4_;
	BoxesLibvirtMachineMachineStat* _tmp5_;
	gint _tmp5__length1;
	BoxesLibvirtMachineMachineStat _tmp6_;
	BoxesLibvirtMachineMachineStat _tmp7_;
	BoxesLibvirtMachineMachineStat prev;
	BoxesLibvirtMachineMachineStat _tmp8_;
	GVirDomainDiskStats* _tmp9_;
	BoxesLibvirtMachineMachineStat* _tmp10_;
	BoxesLibvirtMachineMachineStat* _tmp11_;
	GVirDomainDiskStats* _tmp12_;
	gint64 _tmp13_;
	BoxesLibvirtMachineMachineStat _tmp14_;
	GVirDomainDiskStats* _tmp15_;
	gint64 _tmp16_;
	BoxesLibvirtMachineMachineStat* _tmp17_;
	BoxesLibvirtMachineMachineStat* _tmp18_;
	GVirDomainDiskStats* _tmp19_;
	gint64 _tmp20_;
	BoxesLibvirtMachineMachineStat _tmp21_;
	GVirDomainDiskStats* _tmp22_;
	gint64 _tmp23_;
	GError* err;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	GError* _tmp26_;
	const gchar* _tmp27_;
	GError * _inner_error_;
};

struct _Block12Data {
	int _ref_count_;
	BoxesLibvirtMachine * self;
	BoxesLibvirtMachineMachineStat* stat;
	gpointer _async_data_;
};

struct _Block13Data {
	int _ref_count_;
	Block12Data * _data12_;
	GVirDomainInterface* net;
};

struct _BoxesLibvirtMachineUpdateNetStatData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesLibvirtMachine* self;
	GVirDomainInfo* info;
	BoxesLibvirtMachineMachineStat* stat;
	Block12Data* _data12_;
	BoxesLibvirtMachineMachineStat* _tmp0_;
	GVirDomainInfo* _tmp1_;
	GVirDomainState _tmp2_;
	Block13Data* _data13_;
	GVirDomainInterface* _tmp3_;
	GVirDomainInterface* _tmp4_;
	BoxesLibvirtMachineMachineStat* _tmp5_;
	gint _tmp5__length1;
	BoxesLibvirtMachineMachineStat _tmp6_;
	BoxesLibvirtMachineMachineStat _tmp7_;
	BoxesLibvirtMachineMachineStat prev;
	BoxesLibvirtMachineMachineStat _tmp8_;
	GVirDomainInterfaceStats* _tmp9_;
	BoxesLibvirtMachineMachineStat* _tmp10_;
	BoxesLibvirtMachineMachineStat* _tmp11_;
	GVirDomainInterfaceStats* _tmp12_;
	gint64 _tmp13_;
	BoxesLibvirtMachineMachineStat _tmp14_;
	GVirDomainInterfaceStats* _tmp15_;
	gint64 _tmp16_;
	BoxesLibvirtMachineMachineStat* _tmp17_;
	BoxesLibvirtMachineMachineStat* _tmp18_;
	GVirDomainInterfaceStats* _tmp19_;
	gint64 _tmp20_;
	BoxesLibvirtMachineMachineStat _tmp21_;
	GVirDomainInterfaceStats* _tmp22_;
	gint64 _tmp23_;
	GError* err;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	GError* _tmp26_;
	const gchar* _tmp27_;
	GError * _inner_error_;
};

struct _BoxesLibvirtMachineUpdateStatsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesLibvirtMachine* self;
	gint64 _tmp0_;
	gint64 now;
	gint64 _tmp1_;
	BoxesLibvirtMachineMachineStat _tmp2_;
	BoxesLibvirtMachineMachineStat stat;
	GVirDomain* _tmp3_;
	GCancellable* _tmp4_;
	GVirDomainInfo* _tmp5_;
	GVirDomainInfo* info;
	GVirDomainInfo* _tmp6_;
	GVirDomainInfo* _tmp7_;
	GVirDomainInfo* _tmp8_;
	GVirDomainInfo* _tmp9_;
	BoxesLibvirtMachineMachineStat* _tmp10_;
	gint _tmp10__length1;
	BoxesLibvirtMachineMachineStat* _tmp11_;
	gint _tmp11__length1;
	BoxesLibvirtMachineMachineStat* _tmp12_;
	gint _tmp12__length1;
	BoxesLibvirtMachineMachineStat _tmp13_;
	BoxesLibvirtMachineMachineStat _tmp14_;
	GError* err;
	GError* _vala1_err;
	GError* _tmp15_;
	const gchar* _tmp16_;
	gdouble* _tmp17_;
	gdouble* _tmp18_;
	gdouble* _tmp19_;
	BoxesLibvirtMachineMachineStat* _tmp20_;
	gint _tmp20__length1;
	BoxesLibvirtMachineMachineStat* stat_collection;
	gint stat_collection_length1;
	gint _stat_collection_size_;
	gint stat_it;
	BoxesLibvirtMachineMachineStat _tmp21_;
	BoxesLibvirtMachineMachineStat _vala1_stat;
	gdouble* _tmp22_;
	gint _tmp22__length1;
	BoxesLibvirtMachineMachineStat _tmp23_;
	gdouble _tmp24_;
	gdouble* _tmp25_;
	gint _tmp25__length1;
	BoxesLibvirtMachineMachineStat _tmp26_;
	gdouble _tmp27_;
	BoxesLibvirtMachineMachineStat _tmp28_;
	gdouble _tmp29_;
	gdouble* _tmp30_;
	gint _tmp30__length1;
	BoxesLibvirtMachineMachineStat _tmp31_;
	gdouble _tmp32_;
	BoxesLibvirtMachineMachineStat _tmp33_;
	gdouble _tmp34_;
	GError * _inner_error_;
};

struct _Block14Data {
	int _ref_count_;
	BoxesLibvirtMachine * self;
	gboolean stats_updating;
};

typedef void (*PropertyStringChanged) (const gchar* value, void* user_data, GError** error);
typedef enum  {
	BOXES_ERROR_INVALID,
	BOXES_ERROR_COMMAND_FAILED
} BoxesError;
#define BOXES_ERROR boxes_error_quark ()
struct _BoxesLibvirtMachineTakeScreenshotData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesLibvirtMachine* self;
	gboolean result;
	GVirDomainState state;
	GVirDomain* _tmp0_;
	GVirDomainInfo* _tmp1_;
	GVirDomainInfo* _tmp2_;
	GVirDomainInfo* _tmp3_;
	GVirDomainState _tmp4_;
	GError* _error_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gboolean _tmp7_;
	GVirDomainState _tmp8_;
	GVirDomainState _tmp9_;
	gboolean _tmp10_;
	GVirConnection* _tmp11_;
	GVirStream* _tmp12_;
	GVirStream* stream;
	gchar* _tmp13_;
	gchar* file_name;
	const gchar* _tmp14_;
	GFile* _tmp15_;
	GFile* file;
	GFile* _tmp16_;
	GFileOutputStream* _tmp17_;
	GFileOutputStream* output_stream;
	GVirStream* _tmp18_;
	GInputStream* _tmp19_;
	GInputStream* _tmp20_;
	GInputStream* input_stream;
	GVirDomain* _tmp21_;
	GVirStream* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	guint8* _tmp25_;
	guint8* buffer;
	gint buffer_length1;
	gint _buffer_size_;
	gssize length;
	gboolean _tmp26_;
	gboolean _tmp27_;
	gssize _tmp28_;
	GInputStream* _tmp29_;
	guint8* _tmp30_;
	gint _tmp30__length1;
	gssize _tmp31_;
	gssize _tmp32_;
	GFileOutputStream* _tmp33_;
	guint8* _tmp34_;
	gint _tmp34__length1;
	gssize _tmp35_;
	GError * _inner_error_;
};

struct _BoxesLibvirtMachineSuspendData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesLibvirtMachine* self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GVirDomain* _tmp3_;
	gboolean _tmp4_;
	GVirDomain* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	GError * _inner_error_;
};

typedef void (*PropertySizeChanged) (guint64 value, void* user_data, GError** error);
struct _Block15Data {
	int _ref_count_;
	BoxesLibvirtMachine * self;
	guint64 value;
};

typedef void (*BoxesNotificationbarOKFunc) (void* user_data);
typedef void (*BoxesNotificationbarCancelFunc) (void* user_data);
struct _Block16Data {
	int _ref_count_;
	BoxesLibvirtMachine * self;
	guint64 value;
};

struct _BoxesIConfigIface {
	GTypeInterface parent_iface;
	GKeyFile* (*get_keyfile) (BoxesIConfig* self);
	const gchar* (*get_filename) (BoxesIConfig* self);
	void (*set_filename) (BoxesIConfig* self, const gchar* value);
	gboolean (*get_has_file) (BoxesIConfig* self);
	void (*set_has_file) (BoxesIConfig* self, gboolean value);
};


static gpointer boxes_libvirt_machine_parent_class = NULL;

GType boxes_ui_get_type (void) G_GNUC_CONST;
GType boxes_ui_state_get_type (void) G_GNUC_CONST;
GType boxes_collection_item_get_type (void) G_GNUC_CONST;
GType boxes_properties_page_get_type (void) G_GNUC_CONST;
gpointer boxes_pair_ref (gpointer instance);
void boxes_pair_unref (gpointer instance);
GParamSpec* boxes_param_spec_pair (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void boxes_value_set_pair (GValue* value, gpointer v_object);
void boxes_value_take_pair (GValue* value, gpointer v_object);
gpointer boxes_value_get_pair (const GValue* value);
GType boxes_pair_get_type (void) G_GNUC_CONST;
GType boxes_iproperties_provider_get_type (void) G_GNUC_CONST;
GType boxes_machine_get_type (void) G_GNUC_CONST;
GType boxes_app_get_type (void) G_GNUC_CONST;
GType boxes_machine_actor_get_type (void) G_GNUC_CONST;
GType boxes_collection_source_get_type (void) G_GNUC_CONST;
GType boxes_display_config_get_type (void) G_GNUC_CONST;
GType boxes_libvirt_machine_get_type (void) G_GNUC_CONST;
static GType boxes_libvirt_machine_machine_stat_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static BoxesLibvirtMachineMachineStat* boxes_libvirt_machine_machine_stat_dup (const BoxesLibvirtMachineMachineStat* self);
static void boxes_libvirt_machine_machine_stat_free (BoxesLibvirtMachineMachineStat* self);
static void boxes_libvirt_machine_machine_stat_copy (const BoxesLibvirtMachineMachineStat* self, BoxesLibvirtMachineMachineStat* dest);
static void boxes_libvirt_machine_machine_stat_destroy (BoxesLibvirtMachineMachineStat* self);
#define BOXES_LIBVIRT_MACHINE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_LIBVIRT_MACHINE, BoxesLibvirtMachinePrivate))
enum  {
	BOXES_LIBVIRT_MACHINE_DUMMY_PROPERTY,
	BOXES_LIBVIRT_MACHINE_SAVE_ON_QUIT
};
static void _vala_BoxesLibvirtMachineMachineStat_array_free (BoxesLibvirtMachineMachineStat* array, gint array_length);
#define BOXES_LIBVIRT_MACHINE_STATS_SIZE 20
static void boxes_libvirt_machine_real_disconnect_display (BoxesMachine* base);
GType boxes_display_get_type (void) G_GNUC_CONST;
BoxesDisplay* boxes_machine_get_display (BoxesMachine* self);
GType boxes_topbar_get_type (void) G_GNUC_CONST;
GType boxes_notificationbar_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;
GtkWidget* boxes_display_page_remove_display (BoxesDisplayPage* self);
void boxes_display_disconnect_it (BoxesDisplay* self);
void boxes_machine_set_display (BoxesMachine* self, BoxesDisplay* value);
static void boxes_libvirt_machine_real_connect_display (BoxesMachine* base);
GType boxes_machine_machine_state_get_type (void) G_GNUC_CONST;
BoxesMachineMachineState boxes_machine_get_state (BoxesMachine* self);
static void ____lambda55_ (BoxesLibvirtMachine* self);
void boxes_machine_connect_display (BoxesMachine* self);
static void _____lambda55__gvir_domain_resumed (GVirDomain* _sender, gpointer self);
static void ____lambda56_ (BoxesLibvirtMachine* self);
static void _____lambda56__gvir_domain_started (GVirDomain* _sender, gpointer self);
static void boxes_libvirt_machine_update_display (BoxesLibvirtMachine* self);
void boxes_display_connect_it (BoxesDisplay* self);
void boxes_libvirt_machine_update_domain_config (BoxesLibvirtMachine* self);
GVirStorageVol* boxes_get_storage_volume (GVirConnection* connection, GVirDomain* domain, GVirStoragePool** pool);
BoxesLibvirtMachine* boxes_libvirt_machine_new (BoxesCollectionSource* source, BoxesApp* app, GVirConnection* connection, GVirDomain* domain, GError** error);
BoxesLibvirtMachine* boxes_libvirt_machine_construct (GType object_type, BoxesCollectionSource* source, BoxesApp* app, GVirConnection* connection, GVirDomain* domain, GError** error);
BoxesMachine* boxes_machine_construct (GType object_type, BoxesCollectionSource* source, BoxesApp* app, const gchar* name);
const gchar* boxes_collection_item_get_name (BoxesCollectionItem* self);
BoxesDisplayConfig* boxes_display_config_new (BoxesCollectionSource* source, const gchar* subgroup);
BoxesDisplayConfig* boxes_display_config_construct (GType object_type, BoxesCollectionSource* source, const gchar* subgroup);
static void _vala_GVirDomainInfo_free (GVirDomainInfo* self);
void boxes_machine_set_state (BoxesMachine* self, BoxesMachineMachineState value);
static void __lambda68_ (BoxesLibvirtMachine* self);
static void ___lambda68__gvir_domain_started (GVirDomain* _sender, gpointer self);
static void __lambda69_ (BoxesLibvirtMachine* self);
static void ___lambda69__gvir_domain_suspended (GVirDomain* _sender, gpointer self);
static void __lambda70_ (BoxesLibvirtMachine* self);
static void ___lambda70__gvir_domain_resumed (GVirDomain* _sender, gpointer self);
static void __lambda71_ (BoxesLibvirtMachine* self);
static void ___lambda71__gvir_domain_stopped (GVirDomain* _sender, gpointer self);
static void _boxes_libvirt_machine_update_domain_config_gvir_domain_updated (GVirDomain* _sender, gpointer self);
void boxes_machine_set_screenshot_enable (BoxesMachine* self, gboolean enable);
static void boxes_libvirt_machine_set_stats_enable (BoxesLibvirtMachine* self, gboolean enable);
static void boxes_libvirt_machine_update_cpu_stat (BoxesLibvirtMachine* self, GVirDomainInfo* info, BoxesLibvirtMachineMachineStat* stat);
static void boxes_libvirt_machine_update_mem_stat (BoxesLibvirtMachine* self, GVirDomainInfo* info, BoxesLibvirtMachineMachineStat* stat);
static void boxes_libvirt_machine_update_io_stat_data_free (gpointer _data);
static GVirDomainInfo* _vala_GVirDomainInfo_copy (GVirDomainInfo* self);
static void boxes_libvirt_machine_update_io_stat (BoxesLibvirtMachine* self, GVirDomainInfo* info, BoxesLibvirtMachineMachineStat* stat, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void boxes_libvirt_machine_update_io_stat_finish (BoxesLibvirtMachine* self, GAsyncResult* _res_);
static gboolean boxes_libvirt_machine_update_io_stat_co (BoxesLibvirtMachineUpdateIoStatData* _data_);
static Block10Data* block10_data_ref (Block10Data* _data10_);
static void block10_data_unref (void * _userdata_);
static Block11Data* block11_data_ref (Block11Data* _data11_);
static void block11_data_unref (void * _userdata_);
static GVirDomainDisk* boxes_libvirt_machine_get_domain_disk (BoxesLibvirtMachine* self, GError** error);
void boxes_run_in_thread (BoxesRunInThreadFunc func, void* func_target, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_run_in_thread_finish (GAsyncResult* _res_, GError** error);
static void ___lambda75_ (Block11Data* _data11_, GError** error);
static void _vala_GVirDomainDiskStats_free (GVirDomainDiskStats* self);
static void ____lambda75__boxes_run_in_thread_func (gpointer self, GError** error);
static void boxes_libvirt_machine_update_io_stat_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void boxes_libvirt_machine_update_net_stat_data_free (gpointer _data);
static void boxes_libvirt_machine_update_net_stat (BoxesLibvirtMachine* self, GVirDomainInfo* info, BoxesLibvirtMachineMachineStat* stat, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void boxes_libvirt_machine_update_net_stat_finish (BoxesLibvirtMachine* self, GAsyncResult* _res_);
static gboolean boxes_libvirt_machine_update_net_stat_co (BoxesLibvirtMachineUpdateNetStatData* _data_);
static Block12Data* block12_data_ref (Block12Data* _data12_);
static void block12_data_unref (void * _userdata_);
static Block13Data* block13_data_ref (Block13Data* _data13_);
static void block13_data_unref (void * _userdata_);
static GVirDomainInterface* boxes_libvirt_machine_get_domain_network_interface (BoxesLibvirtMachine* self, GError** error);
static void ___lambda76_ (Block13Data* _data13_, GError** error);
static void _vala_GVirDomainInterfaceStats_free (GVirDomainInterfaceStats* self);
static void ____lambda76__boxes_run_in_thread_func (gpointer self, GError** error);
static void boxes_libvirt_machine_update_net_stat_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void boxes_libvirt_machine_update_stats_data_free (gpointer _data);
static void boxes_libvirt_machine_update_stats (BoxesLibvirtMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void boxes_libvirt_machine_update_stats_finish (BoxesLibvirtMachine* self, GAsyncResult* _res_);
static gboolean boxes_libvirt_machine_update_stats_co (BoxesLibvirtMachineUpdateStatsData* _data_);
static void boxes_libvirt_machine_update_stats_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static BoxesLibvirtMachineMachineStat* _vala_array_dup1 (BoxesLibvirtMachineMachineStat* self, int length);
static void _vala_array_add2 (BoxesLibvirtMachineMachineStat** array, int* length, int* size, const BoxesLibvirtMachineMachineStat* value);
static void _vala_array_add3 (gdouble** array, int* length, int* size, gdouble value);
static void _vala_array_add4 (gdouble** array, int* length, int* size, gdouble value);
static void _vala_array_add5 (gdouble** array, int* length, int* size, gdouble value);
static Block14Data* block14_data_ref (Block14Data* _data14_);
static void block14_data_unref (void * _userdata_);
static gboolean ___lambda72_ (Block14Data* _data14_);
static void __lambda77_ (Block14Data* _data14_);
static void ___lambda77__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static gboolean ____lambda72__gsource_func (gpointer self);
static GList* boxes_libvirt_machine_real_get_properties (BoxesMachine* base, BoxesPropertiesPage page);
void boxes_iproperties_provider_add_string_property (BoxesIPropertiesProvider* self, GList** list, const gchar* name, const gchar* value, PropertyStringChanged changed, void* changed_target);
gchar* boxes_collection_source_get_uri (BoxesCollectionSource* self);
gchar* boxes_display_get_uri (BoxesDisplay* self);
static void boxes_libvirt_machine_add_ram_property (BoxesLibvirtMachine* self, GList** list);
static void boxes_libvirt_machine_add_storage_property (BoxesLibvirtMachine* self, GList** list);
const gchar* boxes_display_get_protocol (BoxesDisplay* self);
GList* boxes_display_get_properties (BoxesDisplay* self, BoxesPropertiesPage page);
static void _boxes_pair_unref0_ (gpointer var);
static void _g_list_free__boxes_pair_unref0_ (GList* self);
GQuark boxes_error_quark (void);
gchar* boxes_extract_xpath (const gchar* xmldoc, const gchar* xpath, gboolean required, GError** error);
BoxesSpiceDisplay* boxes_spice_display_new (BoxesDisplayConfig* config, const gchar* host, gint port);
BoxesSpiceDisplay* boxes_spice_display_construct (GType object_type, BoxesDisplayConfig* config, const gchar* host, gint port);
GType boxes_spice_display_get_type (void) G_GNUC_CONST;
BoxesVncDisplay* boxes_vnc_display_new (BoxesDisplayConfig* config, const gchar* host, gint port);
BoxesVncDisplay* boxes_vnc_display_construct (GType object_type, BoxesDisplayConfig* config, const gchar* host, gint port);
GType boxes_vnc_display_get_type (void) G_GNUC_CONST;
static gchar* boxes_libvirt_machine_real_get_screenshot_prefix (BoxesMachine* base);
static void boxes_libvirt_machine_real_take_screenshot_data_free (gpointer _data);
static void boxes_libvirt_machine_real_take_screenshot (BoxesMachine* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean boxes_libvirt_machine_real_take_screenshot_co (BoxesLibvirtMachineTakeScreenshotData* _data_);
static void boxes_libvirt_machine_take_screenshot_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
gchar* boxes_machine_get_screenshot_filename (BoxesMachine* self, const gchar* ext);
void boxes_output_stream_write (GOutputStream* stream, guint8* buffer, int buffer_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_output_stream_write_finish (GAsyncResult* _res_, GError** error);
static void boxes_libvirt_machine_real_delete (BoxesMachine* base, gboolean by_user);
void boxes_machine_delete (BoxesMachine* self, gboolean by_user);
gboolean boxes_machine_is_running (BoxesMachine* self);
GVirConnection* boxes_app_get_default_connection (BoxesApp* self);
static void boxes_libvirt_machine_suspend_data_free (gpointer _data);
void boxes_libvirt_machine_suspend (BoxesLibvirtMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_libvirt_machine_suspend_finish (BoxesLibvirtMachine* self, GAsyncResult* _res_, GError** error);
static gboolean boxes_libvirt_machine_suspend_co (BoxesLibvirtMachineSuspendData* _data_);
gboolean boxes_libvirt_machine_get_save_on_quit (BoxesLibvirtMachine* self);
static void boxes_libvirt_machine_suspend_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
static void _vala_GVirNodeInfo_free (GVirNodeInfo* self);
void boxes_iproperties_provider_add_size_property (BoxesIPropertiesProvider* self, GList** list, const gchar* name, guint64 size, guint64 min, guint64 max, guint64 step, PropertySizeChanged changed, void* changed_target);
static void boxes_libvirt_machine_on_ram_changed (BoxesLibvirtMachine* self, guint64 value);
static void _boxes_libvirt_machine_on_ram_changed_property_size_changed (guint64 value, gpointer self);
static Block15Data* block15_data_ref (Block15Data* _data15_);
static void block15_data_unref (void * _userdata_);
static gboolean __lambda78_ (Block15Data* _data15_);
static void boxes_libvirt_machine_notify_reboot_required (BoxesLibvirtMachine* self);
static gboolean ___lambda78__gsource_func (gpointer self);
static void __lambda79_ (BoxesLibvirtMachine* self);
static void ___lambda79__boxes_notificationbar_ok_func (gpointer self);
void boxes_notificationbar_display_for_action (BoxesNotificationbar* self, const gchar* message, const gchar* action_label, BoxesNotificationbarOKFunc action_func, void* action_func_target, GDestroyNotify action_func_target_destroy_notify, BoxesNotificationbarCancelFunc ignore_func, void* ignore_func_target, GDestroyNotify ignore_func_target_destroy_notify);
static void _vala_GVirStorageVolInfo_free (GVirStorageVolInfo* self);
static void boxes_libvirt_machine_on_storage_changed (BoxesLibvirtMachine* self, guint64 value);
static void _boxes_libvirt_machine_on_storage_changed_property_size_changed (guint64 value, gpointer self);
static void _vala_GVirStoragePoolInfo_free (GVirStoragePoolInfo* self);
static Block16Data* block16_data_ref (Block16Data* _data16_);
static void block16_data_unref (void * _userdata_);
static gboolean __lambda84_ (Block16Data* _data16_);
static gboolean ___lambda84__gsource_func (gpointer self);
GType boxes_iconfig_get_type (void) G_GNUC_CONST;
gboolean boxes_iconfig_get_boolean (BoxesIConfig* self, const gchar* group, const gchar* key, gboolean default_value);
void boxes_libvirt_machine_set_save_on_quit (BoxesLibvirtMachine* self, gboolean value);
void boxes_iconfig_set_boolean (BoxesIConfig* self, const gchar* group, const gchar* key, gboolean value);
static GObject * boxes_libvirt_machine_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static GVirDomainDiskStats* _vala_GVirDomainDiskStats_copy (GVirDomainDiskStats* self);
static GVirDomainInterfaceStats* _vala_GVirDomainInterfaceStats_copy (GVirDomainInterfaceStats* self);
static void boxes_libvirt_machine_finalize (GObject* obj);
static void _vala_boxes_libvirt_machine_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_boxes_libvirt_machine_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


static void _vala_BoxesLibvirtMachineMachineStat_array_free (BoxesLibvirtMachineMachineStat* array, gint array_length) {
	if (array != NULL) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			boxes_libvirt_machine_machine_stat_destroy (&array[i]);
		}
	}
	g_free (array);
}


static void boxes_libvirt_machine_real_disconnect_display (BoxesMachine* base) {
	BoxesLibvirtMachine * self;
	BoxesDisplay* _tmp0_;
	BoxesDisplay* _tmp1_;
	BoxesApp* _tmp2_;
	BoxesDisplayPage* _tmp3_;
	GtkWidget* _tmp4_ = NULL;
	GtkWidget* _tmp5_;
	BoxesDisplay* _tmp6_;
	BoxesDisplay* _tmp7_;
	self = (BoxesLibvirtMachine*) base;
	_tmp0_ = boxes_machine_get_display ((BoxesMachine*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == NULL) {
		return;
	}
	_tmp2_ = ((BoxesMachine*) self)->app;
	_tmp3_ = _tmp2_->display_page;
	_tmp4_ = boxes_display_page_remove_display (_tmp3_);
	_tmp5_ = _tmp4_;
	_g_object_unref0 (_tmp5_);
	_tmp6_ = boxes_machine_get_display ((BoxesMachine*) self);
	_tmp7_ = _tmp6_;
	boxes_display_disconnect_it (_tmp7_);
	boxes_machine_set_display ((BoxesMachine*) self, NULL);
}


static void ____lambda55_ (BoxesLibvirtMachine* self) {
	GVirDomain* _tmp0_;
	gulong _tmp1_;
	_tmp0_ = self->domain;
	_tmp1_ = self->priv->started_id;
	g_signal_handler_disconnect ((GObject*) _tmp0_, _tmp1_);
	self->priv->started_id = (gulong) 0;
	boxes_machine_connect_display ((BoxesMachine*) self);
}


static void _____lambda55__gvir_domain_resumed (GVirDomain* _sender, gpointer self) {
	____lambda55_ (self);
}


static void ____lambda56_ (BoxesLibvirtMachine* self) {
	GVirDomain* _tmp0_;
	gulong _tmp1_;
	_tmp0_ = self->domain;
	_tmp1_ = self->priv->started_id;
	g_signal_handler_disconnect ((GObject*) _tmp0_, _tmp1_);
	self->priv->started_id = (gulong) 0;
	boxes_machine_connect_display ((BoxesMachine*) self);
}


static void _____lambda56__gvir_domain_started (GVirDomain* _sender, gpointer self) {
	____lambda56_ (self);
}


static void boxes_libvirt_machine_real_connect_display (BoxesMachine* base) {
	BoxesLibvirtMachine * self;
	BoxesDisplay* _tmp0_;
	BoxesDisplay* _tmp1_;
	BoxesMachineMachineState _tmp2_;
	BoxesMachineMachineState _tmp3_;
	BoxesDisplay* _tmp17_;
	BoxesDisplay* _tmp18_;
	GError * _inner_error_ = NULL;
	self = (BoxesLibvirtMachine*) base;
	_tmp0_ = boxes_machine_get_display ((BoxesMachine*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		return;
	}
	_tmp2_ = boxes_machine_get_state ((BoxesMachine*) self);
	_tmp3_ = _tmp2_;
	if (_tmp3_ != BOXES_MACHINE_MACHINE_STATE_RUNNING) {
		gulong _tmp4_;
		BoxesMachineMachineState _tmp5_;
		BoxesMachineMachineState _tmp6_;
		_tmp4_ = self->priv->started_id;
		if (_tmp4_ != ((gulong) 0)) {
			return;
		}
		_tmp5_ = boxes_machine_get_state ((BoxesMachine*) self);
		_tmp6_ = _tmp5_;
		if (_tmp6_ == BOXES_MACHINE_MACHINE_STATE_PAUSED) {
			GVirDomain* _tmp7_;
			gulong _tmp8_ = 0UL;
			_tmp7_ = self->domain;
			_tmp8_ = g_signal_connect_object (_tmp7_, "resumed", (GCallback) _____lambda55__gvir_domain_resumed, self, 0);
			self->priv->started_id = _tmp8_;
			{
				GVirDomain* _tmp9_;
				_tmp9_ = self->domain;
				gvir_domain_resume (_tmp9_, &_inner_error_);
				if (_inner_error_ != NULL) {
					goto __catch14_g_error;
				}
			}
			goto __finally14;
			__catch14_g_error:
			{
				GError* _error_ = NULL;
				GError* _tmp10_;
				const gchar* _tmp11_;
				_error_ = _inner_error_;
				_inner_error_ = NULL;
				_tmp10_ = _error_;
				_tmp11_ = _tmp10_->message;
				g_warning ("libvirt-machine.vala:43: %s", _tmp11_);
				_g_error_free0 (_error_);
			}
			__finally14:
			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;
			}
		} else {
			GVirDomain* _tmp12_;
			gulong _tmp13_ = 0UL;
			_tmp12_ = self->domain;
			_tmp13_ = g_signal_connect_object (_tmp12_, "started", (GCallback) _____lambda56__gvir_domain_started, self, 0);
			self->priv->started_id = _tmp13_;
			{
				GVirDomain* _tmp14_;
				_tmp14_ = self->domain;
				gvir_domain_start (_tmp14_, (guint) 0, &_inner_error_);
				if (_inner_error_ != NULL) {
					goto __catch15_g_error;
				}
			}
			goto __finally15;
			__catch15_g_error:
			{
				GError* _error_ = NULL;
				GError* _tmp15_;
				const gchar* _tmp16_;
				_error_ = _inner_error_;
				_inner_error_ = NULL;
				_tmp15_ = _error_;
				_tmp16_ = _tmp15_->message;
				g_warning ("libvirt-machine.vala:54: %s", _tmp16_);
				_g_error_free0 (_error_);
			}
			__finally15:
			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;
			}
		}
	}
	boxes_libvirt_machine_update_display (self);
	_tmp17_ = boxes_machine_get_display ((BoxesMachine*) self);
	_tmp18_ = _tmp17_;
	boxes_display_connect_it (_tmp18_);
}


void boxes_libvirt_machine_update_domain_config (BoxesLibvirtMachine* self) {
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	{
		GVirDomain* _tmp0_;
		GVirConfigDomain* _tmp1_ = NULL;
		GVirConfigDomain* _tmp2_;
		GVirConnection* _tmp3_;
		GVirDomain* _tmp4_;
		GVirStorageVol* _tmp5_ = NULL;
		GVirStorageVol* volume;
		const gchar* _tmp6_ = NULL;
		GVirStorageVol* _tmp7_;
		const gchar* _tmp10_;
		gchar* _tmp11_;
		_tmp0_ = self->domain;
		_tmp1_ = gvir_domain_get_config (_tmp0_, (guint) 0, &_inner_error_);
		_tmp2_ = _tmp1_;
		if (_inner_error_ != NULL) {
			goto __catch16_g_error;
		}
		_g_object_unref0 (self->domain_config);
		self->domain_config = _tmp2_;
		_tmp3_ = self->connection;
		_tmp4_ = self->domain;
		_tmp5_ = boxes_get_storage_volume (_tmp3_, _tmp4_, NULL);
		volume = _tmp5_;
		_tmp7_ = volume;
		if (_tmp7_ != NULL) {
			GVirStorageVol* _tmp8_;
			const gchar* _tmp9_ = NULL;
			_tmp8_ = volume;
			_tmp9_ = gvir_storage_vol_get_path (_tmp8_, &_inner_error_);
			_tmp6_ = _tmp9_;
			if (_inner_error_ != NULL) {
				_g_object_unref0 (volume);
				goto __catch16_g_error;
			}
		} else {
			_tmp6_ = NULL;
		}
		_tmp10_ = _tmp6_;
		_tmp11_ = g_strdup (_tmp10_);
		_g_free0 (self->priv->storage_volume_path);
		self->priv->storage_volume_path = _tmp11_;
		_g_object_unref0 (volume);
	}
	goto __finally16;
	__catch16_g_error:
	{
		GError* _error_ = NULL;
		GVirDomain* _tmp12_;
		const gchar* _tmp13_ = NULL;
		GError* _tmp14_;
		const gchar* _tmp15_;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_tmp12_ = self->domain;
		_tmp13_ = gvir_domain_get_name (_tmp12_);
		_tmp14_ = _error_;
		_tmp15_ = _tmp14_->message;
		g_critical ("libvirt-machine.vala:95: Failed to fetch configuration for domain '%s'" \
": %s", _tmp13_, _tmp15_);
		_g_error_free0 (_error_);
	}
	__finally16:
	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 gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


static void _vala_GVirDomainInfo_free (GVirDomainInfo* self) {
	g_boxed_free (gvir_domain_info_get_type (), self);
}


static void __lambda68_ (BoxesLibvirtMachine* self) {
	boxes_machine_set_state ((BoxesMachine*) self, BOXES_MACHINE_MACHINE_STATE_RUNNING);
}


static void ___lambda68__gvir_domain_started (GVirDomain* _sender, gpointer self) {
	__lambda68_ (self);
}


static void __lambda69_ (BoxesLibvirtMachine* self) {
	boxes_machine_set_state ((BoxesMachine*) self, BOXES_MACHINE_MACHINE_STATE_PAUSED);
}


static void ___lambda69__gvir_domain_suspended (GVirDomain* _sender, gpointer self) {
	__lambda69_ (self);
}


static void __lambda70_ (BoxesLibvirtMachine* self) {
	boxes_machine_set_state ((BoxesMachine*) self, BOXES_MACHINE_MACHINE_STATE_RUNNING);
}


static void ___lambda70__gvir_domain_resumed (GVirDomain* _sender, gpointer self) {
	__lambda70_ (self);
}


static void __lambda71_ (BoxesLibvirtMachine* self) {
	boxes_machine_set_state ((BoxesMachine*) self, BOXES_MACHINE_MACHINE_STATE_STOPPED);
}


static void ___lambda71__gvir_domain_stopped (GVirDomain* _sender, gpointer self) {
	__lambda71_ (self);
}


static void _boxes_libvirt_machine_update_domain_config_gvir_domain_updated (GVirDomain* _sender, gpointer self) {
	boxes_libvirt_machine_update_domain_config (self);
}


BoxesLibvirtMachine* boxes_libvirt_machine_construct (GType object_type, BoxesCollectionSource* source, BoxesApp* app, GVirConnection* connection, GVirDomain* domain, GError** error) {
	BoxesLibvirtMachine * self = NULL;
	BoxesCollectionSource* _tmp0_;
	BoxesApp* _tmp1_;
	GVirDomain* _tmp2_;
	const gchar* _tmp3_ = NULL;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	BoxesCollectionSource* _tmp8_;
	GVirDomain* _tmp9_;
	const gchar* _tmp10_ = NULL;
	BoxesDisplayConfig* _tmp11_;
	GVirConnection* _tmp12_;
	GVirConnection* _tmp13_;
	GVirDomain* _tmp14_;
	GVirDomain* _tmp15_;
	GVirDomain* _tmp23_;
	GVirDomain* _tmp24_;
	GVirDomain* _tmp25_;
	GVirDomain* _tmp26_;
	GVirDomain* _tmp27_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (source != NULL, NULL);
	g_return_val_if_fail (app != NULL, NULL);
	g_return_val_if_fail (connection != NULL, NULL);
	g_return_val_if_fail (domain != NULL, NULL);
	_tmp0_ = source;
	_tmp1_ = app;
	_tmp2_ = domain;
	_tmp3_ = gvir_domain_get_name (_tmp2_);
	self = (BoxesLibvirtMachine*) boxes_machine_construct (object_type, _tmp0_, _tmp1_, _tmp3_);
	_tmp4_ = boxes_collection_item_get_name ((BoxesCollectionItem*) self);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strconcat ("new libvirt machine: ", _tmp5_, NULL);
	_tmp7_ = _tmp6_;
	g_debug ("libvirt-machine.vala:105: %s", _tmp7_);
	_g_free0 (_tmp7_);
	_tmp8_ = source;
	_tmp9_ = domain;
	_tmp10_ = gvir_domain_get_uuid (_tmp9_);
	_tmp11_ = boxes_display_config_new (_tmp8_, _tmp10_);
	_g_object_unref0 (((BoxesMachine*) self)->config);
	((BoxesMachine*) self)->config = _tmp11_;
	_tmp12_ = connection;
	_tmp13_ = _g_object_ref0 (_tmp12_);
	_g_object_unref0 (self->connection);
	self->connection = _tmp13_;
	_tmp14_ = domain;
	_tmp15_ = _g_object_ref0 (_tmp14_);
	_g_object_unref0 (self->domain);
	self->domain = _tmp15_;
	{
		GVirDomain* _tmp16_;
		GVirDomainInfo* _tmp17_ = NULL;
		GVirDomainInfo* _tmp18_;
		GVirDomainInfo* _tmp19_;
		GVirDomainState _tmp20_;
		GVirDomainState _tmp21_;
		GVirDomainState s;
		GVirDomainState _tmp22_;
		_tmp16_ = domain;
		_tmp17_ = gvir_domain_get_info (_tmp16_, &_inner_error_);
		_tmp18_ = _tmp17_;
		if (_inner_error_ != NULL) {
			goto __catch17_g_error;
		}
		_tmp19_ = _tmp18_;
		_tmp20_ = _tmp19_->state;
		_tmp21_ = _tmp20_;
		__vala_GVirDomainInfo_free0 (_tmp19_);
		s = _tmp21_;
		_tmp22_ = s;
		switch (_tmp22_) {
			case GVIR_DOMAIN_STATE_RUNNING:
			case GVIR_DOMAIN_STATE_BLOCKED:
			{
				boxes_machine_set_state ((BoxesMachine*) self, BOXES_MACHINE_MACHINE_STATE_RUNNING);
				break;
			}
			case GVIR_DOMAIN_STATE_PAUSED:
			{
				boxes_machine_set_state ((BoxesMachine*) self, BOXES_MACHINE_MACHINE_STATE_PAUSED);
				break;
			}
			case GVIR_DOMAIN_STATE_SHUTDOWN:
			case GVIR_DOMAIN_STATE_SHUTOFF:
			case GVIR_DOMAIN_STATE_CRASHED:
			{
				boxes_machine_set_state ((BoxesMachine*) self, BOXES_MACHINE_MACHINE_STATE_STOPPED);
				break;
			}
			default:
			case GVIR_DOMAIN_STATE_NONE:
			{
				boxes_machine_set_state ((BoxesMachine*) self, BOXES_MACHINE_MACHINE_STATE_UNKNOWN);
				break;
			}
		}
	}
	goto __finally17;
	__catch17_g_error:
	{
		GError* _error_ = NULL;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		boxes_machine_set_state ((BoxesMachine*) self, BOXES_MACHINE_MACHINE_STATE_UNKNOWN);
		_g_error_free0 (_error_);
	}
	__finally17:
	if (_inner_error_ != NULL) {
		g_propagate_error (error, _inner_error_);
		_g_object_unref0 (self);
		return NULL;
	}
	_tmp23_ = domain;
	g_signal_connect_object (_tmp23_, "started", (GCallback) ___lambda68__gvir_domain_started, self, 0);
	_tmp24_ = domain;
	g_signal_connect_object (_tmp24_, "suspended", (GCallback) ___lambda69__gvir_domain_suspended, self, 0);
	_tmp25_ = domain;
	g_signal_connect_object (_tmp25_, "resumed", (GCallback) ___lambda70__gvir_domain_resumed, self, 0);
	_tmp26_ = domain;
	g_signal_connect_object (_tmp26_, "stopped", (GCallback) ___lambda71__gvir_domain_stopped, self, 0);
	boxes_libvirt_machine_update_domain_config (self);
	_tmp27_ = domain;
	g_signal_connect_object (_tmp27_, "updated", (GCallback) _boxes_libvirt_machine_update_domain_config_gvir_domain_updated, self, 0);
	boxes_machine_set_screenshot_enable ((BoxesMachine*) self, TRUE);
	boxes_libvirt_machine_set_stats_enable (self, TRUE);
	return self;
}


BoxesLibvirtMachine* boxes_libvirt_machine_new (BoxesCollectionSource* source, BoxesApp* app, GVirConnection* connection, GVirDomain* domain, GError** error) {
	return boxes_libvirt_machine_construct (BOXES_TYPE_LIBVIRT_MACHINE, source, app, connection, domain, error);
}


static void boxes_libvirt_machine_update_cpu_stat (BoxesLibvirtMachine* self, GVirDomainInfo* info, BoxesLibvirtMachineMachineStat* stat) {
	BoxesLibvirtMachineMachineStat* _tmp0_;
	gint _tmp0__length1;
	BoxesLibvirtMachineMachineStat _tmp1_;
	BoxesLibvirtMachineMachineStat _tmp2_ = {0};
	BoxesLibvirtMachineMachineStat prev;
	gboolean _tmp3_ = FALSE;
	GVirDomainInfo* _tmp4_;
	GVirDomainState _tmp5_;
	gboolean _tmp8_;
	GVirDomainInfo* _tmp9_;
	guint64 _tmp10_;
	BoxesLibvirtMachineMachineStat _tmp11_;
	gdouble _tmp12_;
	GVirDomainInfo* _tmp13_;
	guint64 _tmp14_;
	BoxesLibvirtMachineMachineStat _tmp15_;
	gint64 _tmp16_;
	BoxesLibvirtMachineMachineStat _tmp17_;
	gint64 _tmp18_;
	gint64 dt;
	BoxesLibvirtMachineMachineStat _tmp19_;
	gdouble _tmp20_;
	gint64 _tmp21_;
	gdouble percent;
	gdouble _tmp22_;
	GVirDomainInfo* _tmp23_;
	guint16 _tmp24_;
	gdouble _tmp25_;
	gdouble _tmp26_ = 0.0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (info != NULL);
	g_return_if_fail (stat != NULL);
	_tmp0_ = self->priv->stats;
	_tmp0__length1 = self->priv->stats_length1;
	_tmp1_ = _tmp0_[BOXES_LIBVIRT_MACHINE_STATS_SIZE - 1];
	boxes_libvirt_machine_machine_stat_copy (&_tmp1_, &_tmp2_);
	prev = _tmp2_;
	_tmp4_ = info;
	_tmp5_ = _tmp4_->state;
	if (_tmp5_ == GVIR_DOMAIN_STATE_CRASHED) {
		_tmp3_ = TRUE;
	} else {
		GVirDomainInfo* _tmp6_;
		GVirDomainState _tmp7_;
		_tmp6_ = info;
		_tmp7_ = _tmp6_->state;
		_tmp3_ = _tmp7_ == GVIR_DOMAIN_STATE_SHUTOFF;
	}
	_tmp8_ = _tmp3_;
	if (_tmp8_) {
		boxes_libvirt_machine_machine_stat_destroy (&prev);
		return;
	}
	_tmp9_ = info;
	_tmp10_ = _tmp9_->cpuTime;
	_tmp11_ = prev;
	_tmp12_ = _tmp11_.cpu_time_abs;
	(*stat).cpu_time = _tmp10_ - _tmp12_;
	_tmp13_ = info;
	_tmp14_ = _tmp13_->cpuTime;
	(*stat).cpu_time_abs = (gdouble) _tmp14_;
	_tmp15_ = *stat;
	_tmp16_ = _tmp15_.timestamp;
	_tmp17_ = prev;
	_tmp18_ = _tmp17_.timestamp;
	dt = (_tmp16_ - _tmp18_) * 10;
	_tmp19_ = *stat;
	_tmp20_ = _tmp19_.cpu_time;
	_tmp21_ = dt;
	percent = _tmp20_ / _tmp21_;
	_tmp22_ = percent;
	_tmp23_ = info;
	_tmp24_ = _tmp23_->nrVirtCpu;
	percent = _tmp22_ / _tmp24_;
	_tmp25_ = percent;
	_tmp26_ = CLAMP (_tmp25_, (gdouble) 0, (gdouble) 100);
	(*stat).cpu_guest_percent = _tmp26_;
	boxes_libvirt_machine_machine_stat_destroy (&prev);
}


static void boxes_libvirt_machine_update_mem_stat (BoxesLibvirtMachine* self, GVirDomainInfo* info, BoxesLibvirtMachineMachineStat* stat) {
	GVirDomainInfo* _tmp0_;
	GVirDomainState _tmp1_;
	GVirDomainInfo* _tmp2_;
	guint64 _tmp3_;
	GVirDomainInfo* _tmp4_;
	guint64 _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (info != NULL);
	g_return_if_fail (stat != NULL);
	_tmp0_ = info;
	_tmp1_ = _tmp0_->state;
	if (_tmp1_ != GVIR_DOMAIN_STATE_RUNNING) {
		return;
	}
	_tmp2_ = info;
	_tmp3_ = _tmp2_->memory;
	_tmp4_ = info;
	_tmp5_ = _tmp4_->maxMem;
	(*stat).memory_percent = (_tmp3_ * 100.0) / _tmp5_;
}


static void boxes_libvirt_machine_update_io_stat_data_free (gpointer _data) {
	BoxesLibvirtMachineUpdateIoStatData* _data_;
	_data_ = _data;
	__vala_GVirDomainInfo_free0 (_data_->info);
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesLibvirtMachineUpdateIoStatData, _data_);
}


static GVirDomainInfo* _vala_GVirDomainInfo_copy (GVirDomainInfo* self) {
	return g_boxed_copy (gvir_domain_info_get_type (), self);
}


static gpointer __vala_GVirDomainInfo_copy0 (gpointer self) {
	return self ? _vala_GVirDomainInfo_copy (self) : NULL;
}


static void boxes_libvirt_machine_update_io_stat (BoxesLibvirtMachine* self, GVirDomainInfo* info, BoxesLibvirtMachineMachineStat* stat, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesLibvirtMachineUpdateIoStatData* _data_;
	BoxesLibvirtMachine* _tmp0_;
	GVirDomainInfo* _tmp1_;
	GVirDomainInfo* _tmp2_;
	BoxesLibvirtMachineMachineStat* _tmp3_;
	_data_ = g_slice_new0 (BoxesLibvirtMachineUpdateIoStatData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_libvirt_machine_update_io_stat);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_libvirt_machine_update_io_stat_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = info;
	_tmp2_ = __vala_GVirDomainInfo_copy0 (_tmp1_);
	_data_->info = _tmp2_;
	_tmp3_ = stat;
	_data_->stat = _tmp3_;
	boxes_libvirt_machine_update_io_stat_co (_data_);
}


static void boxes_libvirt_machine_update_io_stat_finish (BoxesLibvirtMachine* self, GAsyncResult* _res_) {
	BoxesLibvirtMachineUpdateIoStatData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static Block10Data* block10_data_ref (Block10Data* _data10_) {
	g_atomic_int_inc (&_data10_->_ref_count_);
	return _data10_;
}


static void block10_data_unref (void * _userdata_) {
	Block10Data* _data10_;
	_data10_ = (Block10Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data10_->_ref_count_)) {
		BoxesLibvirtMachine * self;
		self = _data10_->self;
		_g_object_unref0 (self);
		g_slice_free (Block10Data, _data10_);
	}
}


static Block11Data* block11_data_ref (Block11Data* _data11_) {
	g_atomic_int_inc (&_data11_->_ref_count_);
	return _data11_;
}


static void block11_data_unref (void * _userdata_) {
	Block11Data* _data11_;
	_data11_ = (Block11Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data11_->_ref_count_)) {
		BoxesLibvirtMachine * self;
		self = _data11_->_data10_->self;
		_g_object_unref0 (_data11_->disk);
		block10_data_unref (_data11_->_data10_);
		_data11_->_data10_ = NULL;
		g_slice_free (Block11Data, _data11_);
	}
}


static void _vala_GVirDomainDiskStats_free (GVirDomainDiskStats* self) {
	g_boxed_free (gvir_domain_disk_stats_get_type (), self);
}


static void ___lambda75_ (Block11Data* _data11_, GError** error) {
	Block10Data* _data10_;
	BoxesLibvirtMachine * self;
	GVirDomainDisk* _tmp0_;
	GVirDomainDiskStats* _tmp1_ = NULL;
	GVirDomainDiskStats* _tmp2_;
	BoxesLibvirtMachineMachineStat* _tmp3_;
	GError * _inner_error_ = NULL;
	_data10_ = _data11_->_data10_;
	self = _data10_->self;
	_tmp0_ = _data11_->disk;
	_tmp1_ = gvir_domain_disk_get_stats (_tmp0_, &_inner_error_);
	_tmp2_ = _tmp1_;
	if (_inner_error_ != NULL) {
		g_propagate_error (error, _inner_error_);
		return;
	}
	_tmp3_ = _data10_->stat;
	__vala_GVirDomainDiskStats_free0 ((*_tmp3_).disk);
	(*_tmp3_).disk = _tmp2_;
}


static void ____lambda75__boxes_run_in_thread_func (gpointer self, GError** error) {
	___lambda75_ (self, error);
}


static void boxes_libvirt_machine_update_io_stat_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesLibvirtMachineUpdateIoStatData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_libvirt_machine_update_io_stat_co (_data_);
}


static gboolean boxes_libvirt_machine_update_io_stat_co (BoxesLibvirtMachineUpdateIoStatData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data10_ = g_slice_new0 (Block10Data);
	_data_->_data10_->_ref_count_ = 1;
	_data_->_data10_->self = g_object_ref (_data_->self);
	_data_->_tmp0_ = _data_->stat;
	_data_->_data10_->stat = _data_->_tmp0_;
	_data_->_data10_->_async_data_ = _data_;
	_data_->_tmp1_ = _data_->info;
	_data_->_tmp2_ = _data_->_tmp1_->state;
	if (_data_->_tmp2_ != GVIR_DOMAIN_STATE_RUNNING) {
		block10_data_unref (_data_->_data10_);
		_data_->_data10_ = 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_->_data11_ = g_slice_new0 (Block11Data);
		_data_->_data11_->_ref_count_ = 1;
		_data_->_data11_->_data10_ = block10_data_ref (_data_->_data10_);
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = boxes_libvirt_machine_get_domain_disk (_data_->self, &_data_->_inner_error_);
		_data_->_data11_->disk = _data_->_tmp3_;
		if (_data_->_inner_error_ != NULL) {
			block11_data_unref (_data_->_data11_);
			_data_->_data11_ = NULL;
			goto __catch18_g_error;
		}
		_data_->_tmp4_ = _data_->_data11_->disk;
		if (_data_->_tmp4_ == NULL) {
			block11_data_unref (_data_->_data11_);
			_data_->_data11_ = NULL;
			block10_data_unref (_data_->_data10_);
			_data_->_data10_ = 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_->_state_ = 1;
		boxes_run_in_thread (____lambda75__boxes_run_in_thread_func, _data_->_data11_, boxes_libvirt_machine_update_io_stat_ready, _data_);
		return FALSE;
		_state_1:
		boxes_run_in_thread_finish (_data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			block11_data_unref (_data_->_data11_);
			_data_->_data11_ = NULL;
			goto __catch18_g_error;
		}
		_data_->_tmp5_ = _data_->self->priv->stats;
		_data_->_tmp5__length1 = _data_->self->priv->stats_length1;
		_data_->_tmp6_ = _data_->_tmp5_[BOXES_LIBVIRT_MACHINE_STATS_SIZE - 1];
		memset (&_data_->_tmp7_, 0, sizeof (BoxesLibvirtMachineMachineStat));
		boxes_libvirt_machine_machine_stat_copy (&_data_->_tmp6_, &_data_->_tmp7_);
		_data_->prev = _data_->_tmp7_;
		_data_->_tmp8_ = _data_->prev;
		_data_->_tmp9_ = _data_->_tmp8_.disk;
		if (_data_->_tmp9_ != NULL) {
			_data_->_tmp10_ = _data_->_data10_->stat;
			_data_->_tmp11_ = _data_->_data10_->stat;
			_data_->_tmp12_ = (*_data_->_tmp11_).disk;
			_data_->_tmp13_ = _data_->_tmp12_->rd_bytes;
			_data_->_tmp14_ = _data_->prev;
			_data_->_tmp15_ = _data_->_tmp14_.disk;
			_data_->_tmp16_ = _data_->_tmp15_->rd_bytes;
			(*_data_->_tmp10_).disk_read = (gdouble) (_data_->_tmp13_ - _data_->_tmp16_);
			_data_->_tmp17_ = _data_->_data10_->stat;
			_data_->_tmp18_ = _data_->_data10_->stat;
			_data_->_tmp19_ = (*_data_->_tmp18_).disk;
			_data_->_tmp20_ = _data_->_tmp19_->wr_bytes;
			_data_->_tmp21_ = _data_->prev;
			_data_->_tmp22_ = _data_->_tmp21_.disk;
			_data_->_tmp23_ = _data_->_tmp22_->wr_bytes;
			(*_data_->_tmp17_).disk_write = (gdouble) (_data_->_tmp20_ - _data_->_tmp23_);
		}
		boxes_libvirt_machine_machine_stat_destroy (&_data_->prev);
		block11_data_unref (_data_->_data11_);
		_data_->_data11_ = NULL;
	}
	goto __finally18;
	__catch18_g_error:
	{
		_data_->err = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp24_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _data_->self);
		_data_->_tmp25_ = _data_->_tmp24_;
		_data_->_tmp26_ = _data_->err;
		_data_->_tmp27_ = _data_->_tmp26_->message;
		g_warning ("libvirt-machine.vala:187: Failed to fetch I/O statistics for %s: %s", _data_->_tmp25_, _data_->_tmp27_);
		_g_error_free0 (_data_->err);
	}
	__finally18:
	if (_data_->_inner_error_ != NULL) {
		block10_data_unref (_data_->_data10_);
		_data_->_data10_ = 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;
	}
	block10_data_unref (_data_->_data10_);
	_data_->_data10_ = 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 void boxes_libvirt_machine_update_net_stat_data_free (gpointer _data) {
	BoxesLibvirtMachineUpdateNetStatData* _data_;
	_data_ = _data;
	__vala_GVirDomainInfo_free0 (_data_->info);
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesLibvirtMachineUpdateNetStatData, _data_);
}


static void boxes_libvirt_machine_update_net_stat (BoxesLibvirtMachine* self, GVirDomainInfo* info, BoxesLibvirtMachineMachineStat* stat, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesLibvirtMachineUpdateNetStatData* _data_;
	BoxesLibvirtMachine* _tmp0_;
	GVirDomainInfo* _tmp1_;
	GVirDomainInfo* _tmp2_;
	BoxesLibvirtMachineMachineStat* _tmp3_;
	_data_ = g_slice_new0 (BoxesLibvirtMachineUpdateNetStatData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_libvirt_machine_update_net_stat);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_libvirt_machine_update_net_stat_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = info;
	_tmp2_ = __vala_GVirDomainInfo_copy0 (_tmp1_);
	_data_->info = _tmp2_;
	_tmp3_ = stat;
	_data_->stat = _tmp3_;
	boxes_libvirt_machine_update_net_stat_co (_data_);
}


static void boxes_libvirt_machine_update_net_stat_finish (BoxesLibvirtMachine* self, GAsyncResult* _res_) {
	BoxesLibvirtMachineUpdateNetStatData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static Block12Data* block12_data_ref (Block12Data* _data12_) {
	g_atomic_int_inc (&_data12_->_ref_count_);
	return _data12_;
}


static void block12_data_unref (void * _userdata_) {
	Block12Data* _data12_;
	_data12_ = (Block12Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data12_->_ref_count_)) {
		BoxesLibvirtMachine * self;
		self = _data12_->self;
		_g_object_unref0 (self);
		g_slice_free (Block12Data, _data12_);
	}
}


static Block13Data* block13_data_ref (Block13Data* _data13_) {
	g_atomic_int_inc (&_data13_->_ref_count_);
	return _data13_;
}


static void block13_data_unref (void * _userdata_) {
	Block13Data* _data13_;
	_data13_ = (Block13Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data13_->_ref_count_)) {
		BoxesLibvirtMachine * self;
		self = _data13_->_data12_->self;
		_g_object_unref0 (_data13_->net);
		block12_data_unref (_data13_->_data12_);
		_data13_->_data12_ = NULL;
		g_slice_free (Block13Data, _data13_);
	}
}


static void _vala_GVirDomainInterfaceStats_free (GVirDomainInterfaceStats* self) {
	g_boxed_free (gvir_domain_interface_stats_get_type (), self);
}


static void ___lambda76_ (Block13Data* _data13_, GError** error) {
	Block12Data* _data12_;
	BoxesLibvirtMachine * self;
	GVirDomainInterface* _tmp0_;
	GVirDomainInterfaceStats* _tmp1_ = NULL;
	GVirDomainInterfaceStats* _tmp2_;
	BoxesLibvirtMachineMachineStat* _tmp3_;
	GError * _inner_error_ = NULL;
	_data12_ = _data13_->_data12_;
	self = _data12_->self;
	_tmp0_ = _data13_->net;
	_tmp1_ = gvir_domain_interface_get_stats (_tmp0_, &_inner_error_);
	_tmp2_ = _tmp1_;
	if (_inner_error_ != NULL) {
		g_propagate_error (error, _inner_error_);
		return;
	}
	_tmp3_ = _data12_->stat;
	__vala_GVirDomainInterfaceStats_free0 ((*_tmp3_).net);
	(*_tmp3_).net = _tmp2_;
}


static void ____lambda76__boxes_run_in_thread_func (gpointer self, GError** error) {
	___lambda76_ (self, error);
}


static void boxes_libvirt_machine_update_net_stat_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesLibvirtMachineUpdateNetStatData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_libvirt_machine_update_net_stat_co (_data_);
}


static gboolean boxes_libvirt_machine_update_net_stat_co (BoxesLibvirtMachineUpdateNetStatData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data12_ = g_slice_new0 (Block12Data);
	_data_->_data12_->_ref_count_ = 1;
	_data_->_data12_->self = g_object_ref (_data_->self);
	_data_->_tmp0_ = _data_->stat;
	_data_->_data12_->stat = _data_->_tmp0_;
	_data_->_data12_->_async_data_ = _data_;
	_data_->_tmp1_ = _data_->info;
	_data_->_tmp2_ = _data_->_tmp1_->state;
	if (_data_->_tmp2_ != GVIR_DOMAIN_STATE_RUNNING) {
		block12_data_unref (_data_->_data12_);
		_data_->_data12_ = 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_->_data13_ = g_slice_new0 (Block13Data);
		_data_->_data13_->_ref_count_ = 1;
		_data_->_data13_->_data12_ = block12_data_ref (_data_->_data12_);
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = boxes_libvirt_machine_get_domain_network_interface (_data_->self, &_data_->_inner_error_);
		_data_->_data13_->net = _data_->_tmp3_;
		if (_data_->_inner_error_ != NULL) {
			block13_data_unref (_data_->_data13_);
			_data_->_data13_ = NULL;
			goto __catch19_g_error;
		}
		_data_->_tmp4_ = _data_->_data13_->net;
		if (_data_->_tmp4_ == NULL) {
			block13_data_unref (_data_->_data13_);
			_data_->_data13_ = NULL;
			block12_data_unref (_data_->_data12_);
			_data_->_data12_ = 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_->_state_ = 1;
		boxes_run_in_thread (____lambda76__boxes_run_in_thread_func, _data_->_data13_, boxes_libvirt_machine_update_net_stat_ready, _data_);
		return FALSE;
		_state_1:
		boxes_run_in_thread_finish (_data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			block13_data_unref (_data_->_data13_);
			_data_->_data13_ = NULL;
			goto __catch19_g_error;
		}
		_data_->_tmp5_ = _data_->self->priv->stats;
		_data_->_tmp5__length1 = _data_->self->priv->stats_length1;
		_data_->_tmp6_ = _data_->_tmp5_[BOXES_LIBVIRT_MACHINE_STATS_SIZE - 1];
		memset (&_data_->_tmp7_, 0, sizeof (BoxesLibvirtMachineMachineStat));
		boxes_libvirt_machine_machine_stat_copy (&_data_->_tmp6_, &_data_->_tmp7_);
		_data_->prev = _data_->_tmp7_;
		_data_->_tmp8_ = _data_->prev;
		_data_->_tmp9_ = _data_->_tmp8_.net;
		if (_data_->_tmp9_ != NULL) {
			_data_->_tmp10_ = _data_->_data12_->stat;
			_data_->_tmp11_ = _data_->_data12_->stat;
			_data_->_tmp12_ = (*_data_->_tmp11_).net;
			_data_->_tmp13_ = _data_->_tmp12_->rx_bytes;
			_data_->_tmp14_ = _data_->prev;
			_data_->_tmp15_ = _data_->_tmp14_.net;
			_data_->_tmp16_ = _data_->_tmp15_->rx_bytes;
			(*_data_->_tmp10_).net_read = (gdouble) (_data_->_tmp13_ - _data_->_tmp16_);
			_data_->_tmp17_ = _data_->_data12_->stat;
			_data_->_tmp18_ = _data_->_data12_->stat;
			_data_->_tmp19_ = (*_data_->_tmp18_).net;
			_data_->_tmp20_ = _data_->_tmp19_->tx_bytes;
			_data_->_tmp21_ = _data_->prev;
			_data_->_tmp22_ = _data_->_tmp21_.net;
			_data_->_tmp23_ = _data_->_tmp22_->tx_bytes;
			(*_data_->_tmp17_).net_write = (gdouble) (_data_->_tmp20_ - _data_->_tmp23_);
		}
		boxes_libvirt_machine_machine_stat_destroy (&_data_->prev);
		block13_data_unref (_data_->_data13_);
		_data_->_data13_ = NULL;
	}
	goto __finally19;
	__catch19_g_error:
	{
		_data_->err = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp24_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _data_->self);
		_data_->_tmp25_ = _data_->_tmp24_;
		_data_->_tmp26_ = _data_->err;
		_data_->_tmp27_ = _data_->_tmp26_->message;
		g_warning ("libvirt-machine.vala:209: Failed to fetch network statistics for %s: %" \
"s", _data_->_tmp25_, _data_->_tmp27_);
		_g_error_free0 (_data_->err);
	}
	__finally19:
	if (_data_->_inner_error_ != NULL) {
		block12_data_unref (_data_->_data12_);
		_data_->_data12_ = 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;
	}
	block12_data_unref (_data_->_data12_);
	_data_->_data12_ = 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 void boxes_libvirt_machine_update_stats_data_free (gpointer _data) {
	BoxesLibvirtMachineUpdateStatsData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesLibvirtMachineUpdateStatsData, _data_);
}


static void boxes_libvirt_machine_update_stats (BoxesLibvirtMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesLibvirtMachineUpdateStatsData* _data_;
	BoxesLibvirtMachine* _tmp0_;
	_data_ = g_slice_new0 (BoxesLibvirtMachineUpdateStatsData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_libvirt_machine_update_stats);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_libvirt_machine_update_stats_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	boxes_libvirt_machine_update_stats_co (_data_);
}


static void boxes_libvirt_machine_update_stats_finish (BoxesLibvirtMachine* self, GAsyncResult* _res_) {
	BoxesLibvirtMachineUpdateStatsData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void boxes_libvirt_machine_update_stats_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesLibvirtMachineUpdateStatsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_libvirt_machine_update_stats_co (_data_);
}


static BoxesLibvirtMachineMachineStat* _vala_array_dup1 (BoxesLibvirtMachineMachineStat* self, int length) {
	BoxesLibvirtMachineMachineStat* result;
	int i;
	result = g_new0 (BoxesLibvirtMachineMachineStat, length);
	for (i = 0; i < length; i++) {
		BoxesLibvirtMachineMachineStat _tmp0_ = {0};
		boxes_libvirt_machine_machine_stat_copy (&self[i], &_tmp0_);
		result[i] = _tmp0_;
	}
	return result;
}


static void _vala_array_add2 (BoxesLibvirtMachineMachineStat** array, int* length, int* size, const BoxesLibvirtMachineMachineStat* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (BoxesLibvirtMachineMachineStat, *array, *size);
	}
	(*array)[(*length)++] = *value;
}


static void _vala_array_add3 (gdouble** array, int* length, int* size, gdouble value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gdouble, *array, *size);
	}
	(*array)[(*length)++] = value;
}


static void _vala_array_add4 (gdouble** array, int* length, int* size, gdouble value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gdouble, *array, *size);
	}
	(*array)[(*length)++] = value;
}


static void _vala_array_add5 (gdouble** array, int* length, int* size, gdouble value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gdouble, *array, *size);
	}
	(*array)[(*length)++] = value;
}


static gboolean boxes_libvirt_machine_update_stats_co (BoxesLibvirtMachineUpdateStatsData* _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_ = 0LL;
		_data_->_tmp0_ = g_get_monotonic_time ();
		_data_->now = _data_->_tmp0_;
		_data_->_tmp1_ = _data_->now;
		memset (&_data_->_tmp2_, 0, sizeof (BoxesLibvirtMachineMachineStat));
		memset (&_data_->_tmp2_, 0, sizeof (BoxesLibvirtMachineMachineStat));
		_data_->_tmp2_.timestamp = _data_->_tmp1_;
		_data_->stat = _data_->_tmp2_;
		_data_->_tmp3_ = _data_->self->domain;
		_data_->_tmp4_ = _data_->self->priv->stats_cancellable;
		_data_->_state_ = 1;
		gvir_domain_get_info_async (_data_->_tmp3_, _data_->_tmp4_, boxes_libvirt_machine_update_stats_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = gvir_domain_get_info_finish (_data_->_tmp3_, _data_->_res_, &_data_->_inner_error_);
		_data_->info = _data_->_tmp5_;
		if (_data_->_inner_error_ != NULL) {
			boxes_libvirt_machine_machine_stat_destroy (&_data_->stat);
			if (g_error_matches (_data_->_inner_error_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
				goto __catch20_g_io_error_cancelled;
			}
			goto __catch20_g_error;
		}
		_data_->_tmp6_ = _data_->info;
		boxes_libvirt_machine_update_cpu_stat (_data_->self, _data_->_tmp6_, &_data_->stat);
		_data_->_tmp7_ = _data_->info;
		boxes_libvirt_machine_update_mem_stat (_data_->self, _data_->_tmp7_, &_data_->stat);
		_data_->_tmp8_ = _data_->info;
		_data_->_state_ = 2;
		boxes_libvirt_machine_update_io_stat (_data_->self, _data_->_tmp8_, &_data_->stat, boxes_libvirt_machine_update_stats_ready, _data_);
		return FALSE;
		_state_2:
		boxes_libvirt_machine_update_io_stat_finish (_data_->self, _data_->_res_);
		_data_->_tmp9_ = _data_->info;
		_data_->_state_ = 3;
		boxes_libvirt_machine_update_net_stat (_data_->self, _data_->_tmp9_, &_data_->stat, boxes_libvirt_machine_update_stats_ready, _data_);
		return FALSE;
		_state_3:
		boxes_libvirt_machine_update_net_stat_finish (_data_->self, _data_->_res_);
		_data_->_tmp10_ = _data_->self->priv->stats;
		_data_->_tmp10__length1 = _data_->self->priv->stats_length1;
		_data_->_tmp11_ = ((_data_->_tmp10_ + 1) != NULL) ? _vala_array_dup1 (_data_->_tmp10_ + 1, BOXES_LIBVIRT_MACHINE_STATS_SIZE - 1) : ((gpointer) (_data_->_tmp10_ + 1));
		_data_->_tmp11__length1 = BOXES_LIBVIRT_MACHINE_STATS_SIZE - 1;
		_data_->self->priv->stats = (_vala_BoxesLibvirtMachineMachineStat_array_free (_data_->self->priv->stats, _data_->self->priv->stats_length1), NULL);
		_data_->self->priv->stats = _data_->_tmp11_;
		_data_->self->priv->stats_length1 = _data_->_tmp11__length1;
		_data_->self->priv->_stats_size_ = _data_->self->priv->stats_length1;
		_data_->_tmp12_ = _data_->self->priv->stats;
		_data_->_tmp12__length1 = _data_->self->priv->stats_length1;
		_data_->_tmp13_ = _data_->stat;
		memset (&_data_->_tmp14_, 0, sizeof (BoxesLibvirtMachineMachineStat));
		boxes_libvirt_machine_machine_stat_copy (&_data_->_tmp13_, &_data_->_tmp14_);
		_vala_array_add2 (&_data_->self->priv->stats, &_data_->self->priv->stats_length1, &_data_->self->priv->_stats_size_, &_data_->_tmp14_);
		__vala_GVirDomainInfo_free0 (_data_->info);
		boxes_libvirt_machine_machine_stat_destroy (&_data_->stat);
	}
	goto __finally20;
	__catch20_g_io_error_cancelled:
	{
		_data_->err = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_g_error_free0 (_data_->err);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	goto __finally20;
	__catch20_g_error:
	{
		_data_->_vala1_err = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp15_ = _data_->_vala1_err;
		_data_->_tmp16_ = _data_->_tmp15_->message;
		g_warning ("libvirt-machine.vala:235: %s", _data_->_tmp16_);
		_g_error_free0 (_data_->_vala1_err);
	}
	__finally20:
	if (_data_->_inner_error_ != 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;
	}
	_data_->_tmp17_ = NULL;
	_data_->_tmp17_ = g_new0 (gdouble, 0);
	_data_->self->cpu_stats = (g_free (_data_->self->cpu_stats), NULL);
	_data_->self->cpu_stats = _data_->_tmp17_;
	_data_->self->cpu_stats_length1 = 0;
	_data_->self->_cpu_stats_size_ = _data_->self->cpu_stats_length1;
	_data_->_tmp18_ = NULL;
	_data_->_tmp18_ = g_new0 (gdouble, 0);
	_data_->self->io_stats = (g_free (_data_->self->io_stats), NULL);
	_data_->self->io_stats = _data_->_tmp18_;
	_data_->self->io_stats_length1 = 0;
	_data_->self->_io_stats_size_ = _data_->self->io_stats_length1;
	_data_->_tmp19_ = NULL;
	_data_->_tmp19_ = g_new0 (gdouble, 0);
	_data_->self->net_stats = (g_free (_data_->self->net_stats), NULL);
	_data_->self->net_stats = _data_->_tmp19_;
	_data_->self->net_stats_length1 = 0;
	_data_->self->_net_stats_size_ = _data_->self->net_stats_length1;
	_data_->_tmp20_ = _data_->self->priv->stats;
	_data_->_tmp20__length1 = _data_->self->priv->stats_length1;
	{
		_data_->stat_collection_length1 = 0;
		_data_->_stat_collection_size_ = 0;
		_data_->stat_collection = _data_->_tmp20_;
		_data_->stat_collection_length1 = _data_->_tmp20__length1;
		for (_data_->stat_it = 0; _data_->stat_it < _data_->_tmp20__length1; _data_->stat_it = _data_->stat_it + 1) {
			memset (&_data_->_tmp21_, 0, sizeof (BoxesLibvirtMachineMachineStat));
			boxes_libvirt_machine_machine_stat_copy (&_data_->stat_collection[_data_->stat_it], &_data_->_tmp21_);
			_data_->_vala1_stat = _data_->_tmp21_;
			{
				_data_->_tmp22_ = _data_->self->cpu_stats;
				_data_->_tmp22__length1 = _data_->self->cpu_stats_length1;
				_data_->_tmp23_ = _data_->_vala1_stat;
				_data_->_tmp24_ = _data_->_tmp23_.cpu_guest_percent;
				_vala_array_add3 (&_data_->self->cpu_stats, &_data_->self->cpu_stats_length1, &_data_->self->_cpu_stats_size_, _data_->_tmp24_);
				_data_->_tmp25_ = _data_->self->net_stats;
				_data_->_tmp25__length1 = _data_->self->net_stats_length1;
				_data_->_tmp26_ = _data_->_vala1_stat;
				_data_->_tmp27_ = _data_->_tmp26_.net_read;
				_data_->_tmp28_ = _data_->_vala1_stat;
				_data_->_tmp29_ = _data_->_tmp28_.net_write;
				_vala_array_add4 (&_data_->self->net_stats, &_data_->self->net_stats_length1, &_data_->self->_net_stats_size_, _data_->_tmp27_ + _data_->_tmp29_);
				_data_->_tmp30_ = _data_->self->io_stats;
				_data_->_tmp30__length1 = _data_->self->io_stats_length1;
				_data_->_tmp31_ = _data_->_vala1_stat;
				_data_->_tmp32_ = _data_->_tmp31_.disk_read;
				_data_->_tmp33_ = _data_->_vala1_stat;
				_data_->_tmp34_ = _data_->_tmp33_.disk_write;
				_vala_array_add5 (&_data_->self->io_stats, &_data_->self->io_stats_length1, &_data_->self->_io_stats_size_, _data_->_tmp32_ + _data_->_tmp34_);
				boxes_libvirt_machine_machine_stat_destroy (&_data_->_vala1_stat);
			}
		}
	}
	g_signal_emit_by_name (_data_->self, "stats-updated");
	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 Block14Data* block14_data_ref (Block14Data* _data14_) {
	g_atomic_int_inc (&_data14_->_ref_count_);
	return _data14_;
}


static void block14_data_unref (void * _userdata_) {
	Block14Data* _data14_;
	_data14_ = (Block14Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data14_->_ref_count_)) {
		BoxesLibvirtMachine * self;
		self = _data14_->self;
		_g_object_unref0 (self);
		g_slice_free (Block14Data, _data14_);
	}
}


static void __lambda77_ (Block14Data* _data14_) {
	BoxesLibvirtMachine * self;
	self = _data14_->self;
	_data14_->stats_updating = FALSE;
}


static void ___lambda77__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
	__lambda77_ (self);
	block14_data_unref (self);
}


static gboolean ___lambda72_ (Block14Data* _data14_) {
	BoxesLibvirtMachine * self;
	gboolean result = FALSE;
	gboolean _tmp0_;
	self = _data14_->self;
	_tmp0_ = _data14_->stats_updating;
	if (_tmp0_) {
		const gchar* _tmp1_;
		const gchar* _tmp2_;
		_tmp1_ = boxes_collection_item_get_name ((BoxesCollectionItem*) self);
		_tmp2_ = _tmp1_;
		g_warning ("libvirt-machine.vala:261: Fetching of stats for '%s' is taking too lon" \
"g. Probably a libvirt bug.", _tmp2_);
		result = TRUE;
		return result;
	}
	_data14_->stats_updating = TRUE;
	boxes_libvirt_machine_update_stats (self, ___lambda77__gasync_ready_callback, block14_data_ref (_data14_));
	result = TRUE;
	return result;
}


static gboolean ____lambda72__gsource_func (gpointer self) {
	gboolean result;
	result = ___lambda72_ (self);
	return result;
}


static void boxes_libvirt_machine_set_stats_enable (BoxesLibvirtMachine* self, gboolean enable) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = enable;
	if (_tmp0_) {
		Block14Data* _data14_;
		const gchar* _tmp1_;
		const gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		guint _tmp5_;
		GCancellable* _tmp6_;
		guint _tmp7_ = 0U;
		_data14_ = g_slice_new0 (Block14Data);
		_data14_->_ref_count_ = 1;
		_data14_->self = g_object_ref (self);
		_tmp1_ = boxes_collection_item_get_name ((BoxesCollectionItem*) self);
		_tmp2_ = _tmp1_;
		_tmp3_ = g_strconcat ("enable statistics for ", _tmp2_, NULL);
		_tmp4_ = _tmp3_;
		g_debug ("libvirt-machine.vala:253: %s", _tmp4_);
		_g_free0 (_tmp4_);
		_tmp5_ = self->priv->stats_update_timeout;
		if (_tmp5_ != ((guint) 0)) {
			block14_data_unref (_data14_);
			_data14_ = NULL;
			return;
		}
		_tmp6_ = self->priv->stats_cancellable;
		g_cancellable_reset (_tmp6_);
		_data14_->stats_updating = FALSE;
		_tmp7_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 1, ____lambda72__gsource_func, block14_data_ref (_data14_), block14_data_unref);
		self->priv->stats_update_timeout = _tmp7_;
		block14_data_unref (_data14_);
		_data14_ = NULL;
	} else {
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		guint _tmp12_;
		_tmp8_ = boxes_collection_item_get_name ((BoxesCollectionItem*) self);
		_tmp9_ = _tmp8_;
		_tmp10_ = g_strconcat ("disable statistics for ", _tmp9_, NULL);
		_tmp11_ = _tmp10_;
		g_debug ("libvirt-machine.vala:272: %s", _tmp11_);
		_g_free0 (_tmp11_);
		_tmp12_ = self->priv->stats_update_timeout;
		if (_tmp12_ != ((guint) 0)) {
			GCancellable* _tmp13_;
			guint _tmp14_;
			_tmp13_ = self->priv->stats_cancellable;
			g_cancellable_cancel (_tmp13_);
			_tmp14_ = self->priv->stats_update_timeout;
			g_source_remove (_tmp14_);
		}
		self->priv->stats_update_timeout = (guint) 0;
	}
}


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


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


static GList* boxes_libvirt_machine_real_get_properties (BoxesMachine* base, BoxesPropertiesPage page) {
	BoxesLibvirtMachine * self;
	GList* result = NULL;
	GList* list;
	BoxesPropertiesPage _tmp0_;
	BoxesDisplay* _tmp17_;
	BoxesDisplay* _tmp18_;
	BoxesPropertiesPage _tmp19_;
	GList* _tmp20_ = NULL;
	self = (BoxesLibvirtMachine*) base;
	list = NULL;
	_tmp0_ = page;
	switch (_tmp0_) {
		case BOXES_PROPERTIES_PAGE_LOGIN:
		{
			const gchar* _tmp1_ = NULL;
			BoxesCollectionSource* _tmp2_;
			gchar* _tmp3_;
			gchar* _tmp4_;
			gchar* _tmp5_;
			const gchar* _tmp6_ = NULL;
			BoxesDisplay* _tmp7_;
			BoxesDisplay* _tmp8_;
			gchar* _tmp9_;
			gchar* _tmp10_;
			gchar* _tmp11_;
			_tmp1_ = _ ("Virtualizer");
			_tmp2_ = ((BoxesMachine*) self)->source;
			_tmp3_ = boxes_collection_source_get_uri (_tmp2_);
			_tmp4_ = _tmp3_;
			_tmp5_ = _tmp4_;
			boxes_iproperties_provider_add_string_property ((BoxesIPropertiesProvider*) self, &list, _tmp1_, _tmp5_, NULL, NULL);
			_g_free0 (_tmp5_);
			_tmp6_ = _ ("URI");
			_tmp7_ = boxes_machine_get_display ((BoxesMachine*) self);
			_tmp8_ = _tmp7_;
			_tmp9_ = boxes_display_get_uri (_tmp8_);
			_tmp10_ = _tmp9_;
			_tmp11_ = _tmp10_;
			boxes_iproperties_provider_add_string_property ((BoxesIPropertiesProvider*) self, &list, _tmp6_, _tmp11_, NULL, NULL);
			_g_free0 (_tmp11_);
			break;
		}
		case BOXES_PROPERTIES_PAGE_SYSTEM:
		{
			boxes_libvirt_machine_add_ram_property (self, &list);
			boxes_libvirt_machine_add_storage_property (self, &list);
			break;
		}
		case BOXES_PROPERTIES_PAGE_DISPLAY:
		{
			const gchar* _tmp12_ = NULL;
			BoxesDisplay* _tmp13_;
			BoxesDisplay* _tmp14_;
			const gchar* _tmp15_;
			const gchar* _tmp16_;
			_tmp12_ = _ ("Protocol");
			_tmp13_ = boxes_machine_get_display ((BoxesMachine*) self);
			_tmp14_ = _tmp13_;
			_tmp15_ = boxes_display_get_protocol (_tmp14_);
			_tmp16_ = _tmp15_;
			boxes_iproperties_provider_add_string_property ((BoxesIPropertiesProvider*) self, &list, _tmp12_, _tmp16_, NULL, NULL);
			break;
		}
		default:
		break;
	}
	_tmp17_ = boxes_machine_get_display ((BoxesMachine*) self);
	_tmp18_ = _tmp17_;
	_tmp19_ = page;
	_tmp20_ = boxes_display_get_properties (_tmp18_, _tmp19_);
	list = g_list_concat (list, _tmp20_);
	result = list;
	return result;
}


static const gchar* string_to_string (const gchar* self) {
	const gchar* result = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}


static void boxes_libvirt_machine_update_display (BoxesLibvirtMachine* self) {
	gchar* type = NULL;
	gchar* port = NULL;
	gchar* socket = NULL;
	gchar* host = NULL;
	gboolean _tmp31_ = FALSE;
	const gchar* _tmp32_;
	gboolean _tmp34_;
	const gchar* _tmp36_;
	const gchar* _tmp37_;
	GQuark _tmp39_ = 0U;
	static GQuark _tmp38_label0 = 0;
	static GQuark _tmp38_label1 = 0;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	boxes_libvirt_machine_update_domain_config (self);
	{
		GVirConfigDomain* _tmp0_;
		gchar* _tmp1_ = NULL;
		gchar* xmldoc;
		const gchar* _tmp2_;
		gchar* _tmp3_ = NULL;
		gchar* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
		gchar* _tmp9_;
		gchar* _tmp10_ = NULL;
		gchar* _tmp11_;
		gchar* _tmp12_;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_ = NULL;
		gchar* _tmp16_ = NULL;
		gchar* _tmp17_;
		gchar* _tmp18_ = NULL;
		gchar* _tmp19_;
		gchar* _tmp20_;
		const gchar* _tmp21_;
		const gchar* _tmp22_;
		const gchar* _tmp23_ = NULL;
		gchar* _tmp24_ = NULL;
		gchar* _tmp25_;
		gchar* _tmp26_ = NULL;
		gchar* _tmp27_;
		gchar* _tmp28_;
		_tmp0_ = self->domain_config;
		_tmp1_ = gvir_config_object_to_xml ((GVirConfigObject*) _tmp0_);
		xmldoc = _tmp1_;
		_tmp2_ = xmldoc;
		_tmp3_ = boxes_extract_xpath (_tmp2_, "string(/domain/devices/graphics/@type)", TRUE, &_inner_error_);
		_tmp4_ = _tmp3_;
		if (_inner_error_ != NULL) {
			_g_free0 (xmldoc);
			goto __catch21_g_error;
		}
		_g_free0 (type);
		type = _tmp4_;
		_tmp5_ = xmldoc;
		_tmp6_ = type;
		_tmp7_ = string_to_string (_tmp6_);
		_tmp8_ = g_strconcat ("string(/domain/devices/graphics[@type='", _tmp7_, "']/@port)", NULL);
		_tmp9_ = _tmp8_;
		_tmp10_ = boxes_extract_xpath (_tmp5_, _tmp9_, FALSE, &_inner_error_);
		_tmp11_ = _tmp10_;
		_g_free0 (_tmp9_);
		_tmp12_ = _tmp11_;
		if (_inner_error_ != NULL) {
			_g_free0 (xmldoc);
			goto __catch21_g_error;
		}
		_g_free0 (port);
		port = _tmp12_;
		_tmp13_ = xmldoc;
		_tmp14_ = type;
		_tmp15_ = string_to_string (_tmp14_);
		_tmp16_ = g_strconcat ("string(/domain/devices/graphics[@type='", _tmp15_, "']/@socket)", NULL);
		_tmp17_ = _tmp16_;
		_tmp18_ = boxes_extract_xpath (_tmp13_, _tmp17_, FALSE, &_inner_error_);
		_tmp19_ = _tmp18_;
		_g_free0 (_tmp17_);
		_tmp20_ = _tmp19_;
		if (_inner_error_ != NULL) {
			_g_free0 (xmldoc);
			goto __catch21_g_error;
		}
		_g_free0 (socket);
		socket = _tmp20_;
		_tmp21_ = xmldoc;
		_tmp22_ = type;
		_tmp23_ = string_to_string (_tmp22_);
		_tmp24_ = g_strconcat ("string(/domain/devices/graphics[@type='", _tmp23_, "']/@listen)", NULL);
		_tmp25_ = _tmp24_;
		_tmp26_ = boxes_extract_xpath (_tmp21_, _tmp25_, FALSE, &_inner_error_);
		_tmp27_ = _tmp26_;
		_g_free0 (_tmp25_);
		_tmp28_ = _tmp27_;
		if (_inner_error_ != NULL) {
			_g_free0 (xmldoc);
			goto __catch21_g_error;
		}
		_g_free0 (host);
		host = _tmp28_;
		_g_free0 (xmldoc);
	}
	goto __finally21;
	__catch21_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp29_;
		const gchar* _tmp30_;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_tmp29_ = _error_;
		_tmp30_ = _tmp29_->message;
		g_warning ("libvirt-machine.vala:317: %s", _tmp30_);
		_g_error_free0 (_error_);
		_g_free0 (host);
		_g_free0 (socket);
		_g_free0 (port);
		_g_free0 (type);
		return;
	}
	__finally21:
	if (_inner_error_ != NULL) {
		_g_free0 (host);
		_g_free0 (socket);
		_g_free0 (port);
		_g_free0 (type);
		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;
	}
	_tmp32_ = host;
	if (_tmp32_ == NULL) {
		_tmp31_ = TRUE;
	} else {
		const gchar* _tmp33_;
		_tmp33_ = host;
		_tmp31_ = g_strcmp0 (_tmp33_, "") == 0;
	}
	_tmp34_ = _tmp31_;
	if (_tmp34_) {
		gchar* _tmp35_;
		_tmp35_ = g_strdup ("localhost");
		_g_free0 (host);
		host = _tmp35_;
	}
	_tmp36_ = type;
	_tmp37_ = _tmp36_;
	_tmp39_ = (NULL == _tmp37_) ? 0 : g_quark_from_string (_tmp37_);
	if (_tmp39_ == ((0 != _tmp38_label0) ? _tmp38_label0 : (_tmp38_label0 = g_quark_from_static_string ("spice")))) {
		switch (0) {
			default:
			{
				BoxesDisplayConfig* _tmp40_;
				const gchar* _tmp41_;
				const gchar* _tmp42_;
				gint _tmp43_ = 0;
				BoxesSpiceDisplay* _tmp44_;
				BoxesSpiceDisplay* _tmp45_;
				_tmp40_ = ((BoxesMachine*) self)->config;
				_tmp41_ = host;
				_tmp42_ = port;
				_tmp43_ = atoi (_tmp42_);
				_tmp44_ = boxes_spice_display_new (_tmp40_, _tmp41_, _tmp43_);
				_tmp45_ = _tmp44_;
				boxes_machine_set_display ((BoxesMachine*) self, (BoxesDisplay*) _tmp45_);
				_g_object_unref0 (_tmp45_);
				break;
			}
		}
	} else if (_tmp39_ == ((0 != _tmp38_label1) ? _tmp38_label1 : (_tmp38_label1 = g_quark_from_static_string ("vnc")))) {
		switch (0) {
			default:
			{
				BoxesDisplayConfig* _tmp46_;
				const gchar* _tmp47_;
				const gchar* _tmp48_;
				gint _tmp49_ = 0;
				BoxesVncDisplay* _tmp50_;
				BoxesVncDisplay* _tmp51_;
				_tmp46_ = ((BoxesMachine*) self)->config;
				_tmp47_ = host;
				_tmp48_ = port;
				_tmp49_ = atoi (_tmp48_);
				_tmp50_ = boxes_vnc_display_new (_tmp46_, _tmp47_, _tmp49_);
				_tmp51_ = _tmp50_;
				boxes_machine_set_display ((BoxesMachine*) self, (BoxesDisplay*) _tmp51_);
				_g_object_unref0 (_tmp51_);
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				const gchar* _tmp52_;
				gchar* _tmp53_;
				gchar* _tmp54_;
				_tmp52_ = type;
				_tmp53_ = g_strconcat ("unsupported display of type ", _tmp52_, NULL);
				_tmp54_ = _tmp53_;
				g_warning ("libvirt-machine.vala:334: %s", _tmp54_);
				_g_free0 (_tmp54_);
				break;
			}
		}
	}
	_g_free0 (host);
	_g_free0 (socket);
	_g_free0 (port);
	_g_free0 (type);
}


static gchar* boxes_libvirt_machine_real_get_screenshot_prefix (BoxesMachine* base) {
	BoxesLibvirtMachine * self;
	gchar* result = NULL;
	GVirDomain* _tmp0_;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_;
	self = (BoxesLibvirtMachine*) base;
	_tmp0_ = self->domain;
	_tmp1_ = gvir_domain_get_uuid (_tmp0_);
	_tmp2_ = g_strdup (_tmp1_);
	result = _tmp2_;
	return result;
}


static void boxes_libvirt_machine_real_take_screenshot_data_free (gpointer _data) {
	BoxesLibvirtMachineTakeScreenshotData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesLibvirtMachineTakeScreenshotData, _data_);
}


static void boxes_libvirt_machine_real_take_screenshot (BoxesMachine* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesLibvirtMachine * self;
	BoxesLibvirtMachineTakeScreenshotData* _data_;
	BoxesLibvirtMachine* _tmp0_;
	self = (BoxesLibvirtMachine*) base;
	_data_ = g_slice_new0 (BoxesLibvirtMachineTakeScreenshotData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_libvirt_machine_real_take_screenshot);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_libvirt_machine_real_take_screenshot_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	boxes_libvirt_machine_real_take_screenshot_co (_data_);
}


static gboolean boxes_libvirt_machine_real_take_screenshot_finish (BoxesMachine* base, GAsyncResult* _res_, GError** error) {
	gboolean result;
	BoxesLibvirtMachineTakeScreenshotData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return FALSE;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	return result;
}


static void boxes_libvirt_machine_take_screenshot_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesLibvirtMachineTakeScreenshotData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_libvirt_machine_real_take_screenshot_co (_data_);
}


static gboolean boxes_libvirt_machine_real_take_screenshot_co (BoxesLibvirtMachineTakeScreenshotData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->state = GVIR_DOMAIN_STATE_NONE;
	{
		_data_->_tmp0_ = _data_->self->domain;
		_data_->_state_ = 1;
		gvir_domain_get_info_async (_data_->_tmp0_, NULL, boxes_libvirt_machine_take_screenshot_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp1_ = NULL;
		_data_->_tmp1_ = gvir_domain_get_info_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error_);
		_data_->_tmp2_ = _data_->_tmp1_;
		if (_data_->_inner_error_ != NULL) {
			goto __catch22_g_error;
		}
		_data_->_tmp3_ = _data_->_tmp2_;
		_data_->_tmp4_ = _data_->_tmp3_->state;
		_data_->state = _data_->_tmp4_;
		__vala_GVirDomainInfo_free0 (_data_->_tmp3_);
	}
	goto __finally22;
	__catch22_g_error:
	{
		_data_->_error_ = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp5_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _data_->self);
		_data_->_tmp6_ = _data_->_tmp5_;
		g_warning ("libvirt-machine.vala:348: Failed to get information on '%s'", _data_->_tmp6_);
		_g_error_free0 (_data_->_error_);
	}
	__finally22:
	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_->_tmp8_ = _data_->state;
	if (_data_->_tmp8_ != GVIR_DOMAIN_STATE_RUNNING) {
		_data_->_tmp9_ = _data_->state;
		_data_->_tmp7_ = _data_->_tmp9_ != GVIR_DOMAIN_STATE_PAUSED;
	} else {
		_data_->_tmp7_ = FALSE;
	}
	_data_->_tmp10_ = _data_->_tmp7_;
	if (_data_->_tmp10_) {
		_data_->result = TRUE;
		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_->self->connection;
	_data_->_tmp12_ = NULL;
	_data_->_tmp12_ = gvir_connection_get_stream (_data_->_tmp11_, (guint) 0);
	_data_->stream = _data_->_tmp12_;
	_data_->_tmp13_ = NULL;
	_data_->_tmp13_ = boxes_machine_get_screenshot_filename ((BoxesMachine*) _data_->self, "ppm");
	_data_->file_name = _data_->_tmp13_;
	_data_->_tmp14_ = _data_->file_name;
	_data_->_tmp15_ = NULL;
	_data_->_tmp15_ = g_file_new_for_path (_data_->_tmp14_);
	_data_->file = _data_->_tmp15_;
	_data_->_tmp16_ = _data_->file;
	_data_->_state_ = 2;
	g_file_replace_async (_data_->_tmp16_, NULL, FALSE, G_FILE_CREATE_REPLACE_DESTINATION, G_PRIORITY_DEFAULT, NULL, boxes_libvirt_machine_take_screenshot_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp17_ = NULL;
	_data_->_tmp17_ = g_file_replace_finish (_data_->_tmp16_, _data_->_res_, &_data_->_inner_error_);
	_data_->output_stream = _data_->_tmp17_;
	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_->file);
		_g_free0 (_data_->file_name);
		_g_object_unref0 (_data_->stream);
		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_->_tmp18_ = _data_->stream;
	_data_->_tmp19_ = NULL;
	_data_->_tmp19_ = g_io_stream_get_input_stream ((GIOStream*) _data_->_tmp18_);
	_data_->_tmp20_ = _g_object_ref0 (_data_->_tmp19_);
	_data_->input_stream = _data_->_tmp20_;
	_data_->_tmp21_ = _data_->self->domain;
	_data_->_tmp22_ = _data_->stream;
	_data_->_tmp23_ = NULL;
	_data_->_tmp23_ = gvir_domain_screenshot (_data_->_tmp21_, _data_->_tmp22_, (guint) 0, (guint) 0, &_data_->_inner_error_);
	_data_->_tmp24_ = _data_->_tmp23_;
	_g_free0 (_data_->_tmp24_);
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_object_unref0 (_data_->input_stream);
		_g_object_unref0 (_data_->output_stream);
		_g_object_unref0 (_data_->file);
		_g_free0 (_data_->file_name);
		_g_object_unref0 (_data_->stream);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp25_ = NULL;
	_data_->_tmp25_ = g_new0 (guint8, 65535);
	_data_->buffer = _data_->_tmp25_;
	_data_->buffer_length1 = 65535;
	_data_->_buffer_size_ = _data_->buffer_length1;
	_data_->length = (gssize) 0;
	{
		_data_->_tmp26_ = TRUE;
		while (TRUE) {
			_data_->_tmp27_ = _data_->_tmp26_;
			if (!_data_->_tmp27_) {
				_data_->_tmp28_ = _data_->length;
				if (!(_data_->_tmp28_ > ((gssize) 0))) {
					break;
				}
			}
			_data_->_tmp26_ = FALSE;
			_data_->_tmp29_ = _data_->input_stream;
			_data_->_tmp30_ = _data_->buffer;
			_data_->_tmp30__length1 = _data_->buffer_length1;
			_data_->_state_ = 3;
			g_input_stream_read_async (_data_->_tmp29_, _data_->_tmp30_, (gsize) _data_->_tmp30__length1, G_PRIORITY_DEFAULT, NULL, boxes_libvirt_machine_take_screenshot_ready, _data_);
			return FALSE;
			_state_3:
			_data_->_tmp31_ = 0L;
			_data_->_tmp31_ = g_input_stream_read_finish (_data_->_tmp29_, _data_->_res_, &_data_->_inner_error_);
			_data_->_tmp32_ = _data_->_tmp31_;
			if (_data_->_inner_error_ != NULL) {
				g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
				g_error_free (_data_->_inner_error_);
				_data_->buffer = (g_free (_data_->buffer), NULL);
				_g_object_unref0 (_data_->input_stream);
				_g_object_unref0 (_data_->output_stream);
				_g_object_unref0 (_data_->file);
				_g_free0 (_data_->file_name);
				_g_object_unref0 (_data_->stream);
				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_->length = _data_->_tmp32_;
			_data_->_tmp33_ = _data_->output_stream;
			_data_->_tmp34_ = _data_->buffer;
			_data_->_tmp34__length1 = _data_->buffer_length1;
			_data_->_tmp35_ = _data_->length;
			_data_->_state_ = 4;
			boxes_output_stream_write ((GOutputStream*) _data_->_tmp33_, _data_->_tmp34_ + 0, _data_->_tmp35_ - 0, boxes_libvirt_machine_take_screenshot_ready, _data_);
			return FALSE;
			_state_4:
			boxes_output_stream_write_finish (_data_->_res_, &_data_->_inner_error_);
			if (_data_->_inner_error_ != NULL) {
				g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
				g_error_free (_data_->_inner_error_);
				_data_->buffer = (g_free (_data_->buffer), NULL);
				_g_object_unref0 (_data_->input_stream);
				_g_object_unref0 (_data_->output_stream);
				_g_object_unref0 (_data_->file);
				_g_free0 (_data_->file_name);
				_g_object_unref0 (_data_->stream);
				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 = TRUE;
	_data_->buffer = (g_free (_data_->buffer), NULL);
	_g_object_unref0 (_data_->input_stream);
	_g_object_unref0 (_data_->output_stream);
	_g_object_unref0 (_data_->file);
	_g_free0 (_data_->file_name);
	_g_object_unref0 (_data_->stream);
	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_->buffer = (g_free (_data_->buffer), NULL);
	_g_object_unref0 (_data_->input_stream);
	_g_object_unref0 (_data_->output_stream);
	_g_object_unref0 (_data_->file);
	_g_free0 (_data_->file_name);
	_g_object_unref0 (_data_->stream);
	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_libvirt_machine_real_delete (BoxesMachine* base, gboolean by_user) {
	BoxesLibvirtMachine * self;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	GError * _inner_error_ = NULL;
	self = (BoxesLibvirtMachine*) base;
	_tmp0_ = boxes_collection_item_get_name ((BoxesCollectionItem*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strconcat ("delete libvirt machine: ", _tmp1_, NULL);
	_tmp3_ = _tmp2_;
	g_debug ("libvirt-machine.vala:372: %s", _tmp3_);
	_g_free0 (_tmp3_);
	_tmp4_ = by_user;
	BOXES_MACHINE_CLASS (boxes_libvirt_machine_parent_class)->delete (BOXES_MACHINE (self), _tmp4_);
	boxes_libvirt_machine_set_stats_enable (self, FALSE);
	_tmp5_ = by_user;
	if (_tmp5_) {
		{
			gboolean _tmp6_ = FALSE;
			_tmp6_ = boxes_machine_is_running ((BoxesMachine*) self);
			if (_tmp6_) {
				GVirDomain* _tmp7_;
				_tmp7_ = self->domain;
				gvir_domain_stop (_tmp7_, (guint) 0, &_inner_error_);
				if (_inner_error_ != NULL) {
					goto __catch23_g_error;
				}
			}
		}
		goto __finally23;
		__catch23_g_error:
		{
			GError* err = NULL;
			err = _inner_error_;
			_inner_error_ = NULL;
			_g_error_free0 (err);
		}
		__finally23:
		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;
		}
		{
			GVirConnection* _tmp8_;
			BoxesApp* _tmp9_;
			GVirConnection* _tmp10_;
			GVirConnection* _tmp11_;
			GVirDomain* _tmp17_;
			_tmp8_ = self->connection;
			_tmp9_ = ((BoxesMachine*) self)->app;
			_tmp10_ = boxes_app_get_default_connection (_tmp9_);
			_tmp11_ = _tmp10_;
			if (_tmp8_ == _tmp11_) {
				GVirConnection* _tmp12_;
				GVirDomain* _tmp13_;
				GVirStorageVol* _tmp14_ = NULL;
				GVirStorageVol* volume;
				GVirStorageVol* _tmp15_;
				_tmp12_ = self->connection;
				_tmp13_ = self->domain;
				_tmp14_ = boxes_get_storage_volume (_tmp12_, _tmp13_, NULL);
				volume = _tmp14_;
				_tmp15_ = volume;
				if (_tmp15_ != NULL) {
					GVirStorageVol* _tmp16_;
					_tmp16_ = volume;
					gvir_storage_vol_delete (_tmp16_, (guint) 0, &_inner_error_);
					if (_inner_error_ != NULL) {
						_g_object_unref0 (volume);
						goto __catch24_g_error;
					}
				}
				_g_object_unref0 (volume);
			}
			_tmp17_ = self->domain;
			gvir_domain_delete (_tmp17_, (guint) GVIR_DOMAIN_DELETE_SAVED_STATE, &_inner_error_);
			if (_inner_error_ != NULL) {
				goto __catch24_g_error;
			}
		}
		goto __finally24;
		__catch24_g_error:
		{
			GError* err = NULL;
			GError* _tmp18_;
			const gchar* _tmp19_;
			err = _inner_error_;
			_inner_error_ = NULL;
			_tmp18_ = err;
			_tmp19_ = _tmp18_->message;
			g_warning ("libvirt-machine.vala:393: %s", _tmp19_);
			_g_error_free0 (err);
		}
		__finally24:
		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_libvirt_machine_suspend_data_free (gpointer _data) {
	BoxesLibvirtMachineSuspendData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesLibvirtMachineSuspendData, _data_);
}


void boxes_libvirt_machine_suspend (BoxesLibvirtMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesLibvirtMachineSuspendData* _data_;
	BoxesLibvirtMachine* _tmp0_;
	_data_ = g_slice_new0 (BoxesLibvirtMachineSuspendData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_libvirt_machine_suspend);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_libvirt_machine_suspend_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	boxes_libvirt_machine_suspend_co (_data_);
}


void boxes_libvirt_machine_suspend_finish (BoxesLibvirtMachine* self, GAsyncResult* _res_, GError** error) {
	BoxesLibvirtMachineSuspendData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void boxes_libvirt_machine_suspend_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesLibvirtMachineSuspendData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_libvirt_machine_suspend_co (_data_);
}


static gboolean boxes_libvirt_machine_suspend_co (BoxesLibvirtMachineSuspendData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp1_ = boxes_libvirt_machine_get_save_on_quit (_data_->self);
	_data_->_tmp2_ = _data_->_tmp1_;
	if (_data_->_tmp2_) {
		_data_->_tmp3_ = _data_->self->domain;
		_data_->_state_ = 1;
		gvir_domain_save_async (_data_->_tmp3_, (guint) 0, NULL, boxes_libvirt_machine_suspend_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp4_ = FALSE;
		_data_->_tmp4_ = gvir_domain_save_finish (_data_->_tmp3_, _data_->_res_, &_data_->_inner_error_);
		_data_->_tmp0_ = _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_);
			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;
		}
	} else {
		_data_->_tmp5_ = _data_->self->domain;
		_data_->_tmp6_ = FALSE;
		_data_->_tmp6_ = gvir_domain_suspend (_data_->_tmp5_, &_data_->_inner_error_);
		_data_->_tmp0_ = _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_);
			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_->_tmp7_ = _data_->_tmp0_;
	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 _g_object_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}


static void _g_list_free__g_object_unref0_ (GList* self) {
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
	g_list_free (self);
}


static GVirDomainDisk* boxes_libvirt_machine_get_domain_disk (BoxesLibvirtMachine* self, GError** error) {
	GVirDomainDisk* result = NULL;
	GVirDomainDisk* _tmp0_;
	GVirDomainDisk* disk;
	GVirConfigDomain* _tmp1_;
	GList* _tmp2_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = _g_object_ref0 (GVIR_IS_DOMAIN_DISK (NULL) ? ((GVirDomainDisk*) NULL) : NULL);
	disk = _tmp0_;
	_tmp1_ = self->domain_config;
	_tmp2_ = gvir_config_domain_get_devices (_tmp1_);
	{
		GList* device_config_collection = NULL;
		GList* device_config_it = NULL;
		device_config_collection = _tmp2_;
		for (device_config_it = device_config_collection; device_config_it != NULL; device_config_it = device_config_it->next) {
			GVirConfigDomainDevice* _tmp3_;
			GVirConfigDomainDevice* device_config = NULL;
			_tmp3_ = _g_object_ref0 ((GVirConfigDomainDevice*) device_config_it->data);
			device_config = _tmp3_;
			{
				GVirConfigDomainDevice* _tmp4_;
				_tmp4_ = device_config;
				if (GVIR_CONFIG_IS_DOMAIN_DISK (_tmp4_)) {
					GVirConfigDomainDevice* _tmp5_;
					GVirConfigDomainDisk* _tmp6_;
					GVirConfigDomainDisk* disk_config;
					GVirConfigDomainDisk* _tmp7_;
					GVirConfigDomainDiskGuestDeviceType _tmp8_ = 0;
					GVirConfigDomainDiskGuestDeviceType disk_type;
					gboolean _tmp9_ = FALSE;
					GVirConfigDomainDiskGuestDeviceType _tmp10_;
					gboolean _tmp14_;
					_tmp5_ = device_config;
					_tmp6_ = _g_object_ref0 (GVIR_CONFIG_IS_DOMAIN_DISK (_tmp5_) ? ((GVirConfigDomainDisk*) _tmp5_) : NULL);
					disk_config = _tmp6_;
					_tmp7_ = disk_config;
					_tmp8_ = gvir_config_domain_disk_get_guest_device_type (_tmp7_);
					disk_type = _tmp8_;
					_tmp10_ = disk_type;
					if (_tmp10_ == GVIR_CONFIG_DOMAIN_DISK_GUEST_DEVICE_DISK) {
						GVirConfigDomainDisk* _tmp11_;
						const gchar* _tmp12_ = NULL;
						const gchar* _tmp13_;
						_tmp11_ = disk_config;
						_tmp12_ = gvir_config_domain_disk_get_source (_tmp11_);
						_tmp13_ = self->priv->storage_volume_path;
						_tmp9_ = g_strcmp0 (_tmp12_, _tmp13_) == 0;
					} else {
						_tmp9_ = FALSE;
					}
					_tmp14_ = _tmp9_;
					if (_tmp14_) {
						GVirDomain* _tmp15_;
						GVirConfigDomainDevice* _tmp16_;
						GObject* _tmp17_ = NULL;
						GObject* _tmp18_;
						_tmp15_ = self->domain;
						_tmp16_ = device_config;
						_tmp17_ = g_object_new (gvir_domain_disk_get_type (), "domain", _tmp15_, "config", _tmp16_, NULL);
						_tmp18_ = G_IS_INITIALLY_UNOWNED (_tmp17_) ? g_object_ref_sink (_tmp17_) : _tmp17_;
						_g_object_unref0 (disk);
						disk = GVIR_IS_DOMAIN_DISK (_tmp18_) ? ((GVirDomainDisk*) _tmp18_) : NULL;
						_g_object_unref0 (disk_config);
						_g_object_unref0 (device_config);
						break;
					}
					_g_object_unref0 (disk_config);
				}
				_g_object_unref0 (device_config);
			}
		}
		__g_list_free__g_object_unref0_0 (device_config_collection);
	}
	result = disk;
	return result;
}


static GVirDomainInterface* boxes_libvirt_machine_get_domain_network_interface (BoxesLibvirtMachine* self, GError** error) {
	GVirDomainInterface* result = NULL;
	GVirDomainInterface* _tmp0_;
	GVirDomainInterface* net;
	GVirConfigDomain* _tmp1_;
	GList* _tmp2_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = _g_object_ref0 (GVIR_IS_DOMAIN_INTERFACE (NULL) ? ((GVirDomainInterface*) NULL) : NULL);
	net = _tmp0_;
	_tmp1_ = self->domain_config;
	_tmp2_ = gvir_config_domain_get_devices (_tmp1_);
	{
		GList* device_config_collection = NULL;
		GList* device_config_it = NULL;
		device_config_collection = _tmp2_;
		for (device_config_it = device_config_collection; device_config_it != NULL; device_config_it = device_config_it->next) {
			GVirConfigDomainDevice* _tmp3_;
			GVirConfigDomainDevice* device_config = NULL;
			_tmp3_ = _g_object_ref0 ((GVirConfigDomainDevice*) device_config_it->data);
			device_config = _tmp3_;
			{
				GVirConfigDomainDevice* _tmp4_;
				_tmp4_ = device_config;
				if (GVIR_CONFIG_IS_DOMAIN_INTERFACE (_tmp4_)) {
					GVirDomain* _tmp5_;
					GVirConfigDomainDevice* _tmp6_;
					GObject* _tmp7_ = NULL;
					GObject* _tmp8_;
					_tmp5_ = self->domain;
					_tmp6_ = device_config;
					_tmp7_ = g_object_new (gvir_domain_interface_get_type (), "domain", _tmp5_, "config", _tmp6_, NULL);
					_tmp8_ = G_IS_INITIALLY_UNOWNED (_tmp7_) ? g_object_ref_sink (_tmp7_) : _tmp7_;
					_g_object_unref0 (net);
					net = GVIR_IS_DOMAIN_INTERFACE (_tmp8_) ? ((GVirDomainInterface*) _tmp8_) : NULL;
					_g_object_unref0 (device_config);
					break;
				}
				_g_object_unref0 (device_config);
			}
		}
		__g_list_free__g_object_unref0_0 (device_config_collection);
	}
	result = net;
	return result;
}


static void _vala_GVirNodeInfo_free (GVirNodeInfo* self) {
	g_boxed_free (gvir_node_info_get_type (), self);
}


static void _boxes_libvirt_machine_on_ram_changed_property_size_changed (guint64 value, gpointer self) {
	boxes_libvirt_machine_on_ram_changed (self, value);
}


static void boxes_libvirt_machine_add_ram_property (BoxesLibvirtMachine* self, GList** list) {
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	{
		GVirConnection* _tmp0_;
		GVirNodeInfo* _tmp1_ = NULL;
		GVirNodeInfo* _tmp2_;
		GVirNodeInfo* _tmp3_;
		gulong _tmp4_;
		gulong _tmp5_;
		gulong max_ram;
		const gchar* _tmp6_ = NULL;
		GVirConfigDomain* _tmp7_;
		guint64 _tmp8_;
		guint64 _tmp9_;
		gulong _tmp10_;
		_tmp0_ = self->connection;
		_tmp1_ = gvir_connection_get_node_info (_tmp0_, &_inner_error_);
		_tmp2_ = _tmp1_;
		if (_inner_error_ != NULL) {
			goto __catch25_g_error;
		}
		_tmp3_ = _tmp2_;
		_tmp4_ = _tmp3_->memory;
		_tmp5_ = _tmp4_;
		__vala_GVirNodeInfo_free0 (_tmp3_);
		max_ram = _tmp5_;
		_tmp6_ = _ ("RAM");
		_tmp7_ = self->domain_config;
		_tmp8_ = gvir_config_domain_get_memory (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = max_ram;
		boxes_iproperties_provider_add_size_property ((BoxesIPropertiesProvider*) self, list, _tmp6_, _tmp9_, (guint64) (OSINFO_MEBIBYTES / OSINFO_KIBIBYTES), (guint64) _tmp10_, (guint64) (OSINFO_MEBIBYTES / OSINFO_KIBIBYTES), _boxes_libvirt_machine_on_ram_changed_property_size_changed, self);
	}
	goto __finally25;
	__catch25_g_error:
	{
		GError* _error_ = NULL;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (_error_);
	}
	__finally25:
	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 Block15Data* block15_data_ref (Block15Data* _data15_) {
	g_atomic_int_inc (&_data15_->_ref_count_);
	return _data15_;
}


static void block15_data_unref (void * _userdata_) {
	Block15Data* _data15_;
	_data15_ = (Block15Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data15_->_ref_count_)) {
		BoxesLibvirtMachine * self;
		self = _data15_->self;
		_g_object_unref0 (self);
		g_slice_free (Block15Data, _data15_);
	}
}


static gboolean __lambda78_ (Block15Data* _data15_) {
	BoxesLibvirtMachine * self;
	gboolean result = FALSE;
	GVirConfigDomain* _tmp0_;
	guint64 _tmp1_;
	GError * _inner_error_ = NULL;
	self = _data15_->self;
	_tmp0_ = self->domain_config;
	_tmp1_ = _data15_->value;
	gvir_config_domain_set_memory (_tmp0_, _tmp1_);
	{
		GVirDomain* _tmp2_;
		GVirConfigDomain* _tmp3_;
		guint64 _tmp4_;
		_tmp2_ = self->domain;
		_tmp3_ = self->domain_config;
		gvir_domain_set_config (_tmp2_, _tmp3_, &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch26_g_error;
		}
		_tmp4_ = _data15_->value;
		g_debug ("libvirt-machine.vala:460: RAM changed to %llu", _tmp4_);
		boxes_libvirt_machine_notify_reboot_required (self);
	}
	goto __finally26;
	__catch26_g_error:
	{
		GError* _error_ = NULL;
		GVirDomain* _tmp5_;
		const gchar* _tmp6_ = NULL;
		guint64 _tmp7_;
		GError* _tmp8_;
		const gchar* _tmp9_;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_tmp5_ = self->domain;
		_tmp6_ = gvir_domain_get_name (_tmp5_);
		_tmp7_ = _data15_->value;
		_tmp8_ = _error_;
		_tmp9_ = _tmp8_->message;
		g_warning ("libvirt-machine.vala:463: Failed to change RAM of box '%s' to %llu: %s", _tmp6_, _tmp7_, _tmp9_);
		_g_error_free0 (_error_);
	}
	__finally26:
	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 FALSE;
	}
	self->priv->ram_update_timeout = (guint) 0;
	result = FALSE;
	return result;
}


static gboolean ___lambda78__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda78_ (self);
	return result;
}


static void boxes_libvirt_machine_on_ram_changed (BoxesLibvirtMachine* self, guint64 value) {
	Block15Data* _data15_;
	guint64 _tmp0_;
	guint _tmp1_;
	guint _tmp3_ = 0U;
	g_return_if_fail (self != NULL);
	_data15_ = g_slice_new0 (Block15Data);
	_data15_->_ref_count_ = 1;
	_data15_->self = g_object_ref (self);
	_tmp0_ = value;
	_data15_->value = _tmp0_;
	_tmp1_ = self->priv->ram_update_timeout;
	if (_tmp1_ != ((guint) 0)) {
		guint _tmp2_;
		_tmp2_ = self->priv->ram_update_timeout;
		g_source_remove (_tmp2_);
	}
	_tmp3_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 1, ___lambda78__gsource_func, block15_data_ref (_data15_), block15_data_unref);
	self->priv->ram_update_timeout = _tmp3_;
	block15_data_unref (_data15_);
	_data15_ = NULL;
}


static void __lambda79_ (BoxesLibvirtMachine* self) {
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GError * _inner_error_ = NULL;
	_tmp0_ = boxes_collection_item_get_name ((BoxesCollectionItem*) self);
	_tmp1_ = _tmp0_;
	g_debug ("libvirt-machine.vala:476: Rebooting '%s'..", _tmp1_);
	{
		GVirDomain* _tmp2_;
		_tmp2_ = self->domain;
		gvir_domain_reboot (_tmp2_, (guint) 0, &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch27_g_error;
		}
	}
	goto __finally27;
	__catch27_g_error:
	{
		GError* _error_ = NULL;
		GVirDomain* _tmp3_;
		const gchar* _tmp4_ = NULL;
		GError* _tmp5_;
		const gchar* _tmp6_;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_tmp3_ = self->domain;
		_tmp4_ = gvir_domain_get_name (_tmp3_);
		_tmp5_ = _error_;
		_tmp6_ = _tmp5_->message;
		g_warning ("libvirt-machine.vala:480: Failed to reboot '%s': %s", _tmp4_, _tmp6_);
		_g_error_free0 (_error_);
	}
	__finally27:
	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 ___lambda79__boxes_notificationbar_ok_func (gpointer self) {
	__lambda79_ (self);
}


static void boxes_libvirt_machine_notify_reboot_required (BoxesLibvirtMachine* self) {
	BoxesNotificationbarOKFunc reboot;
	void* reboot_target;
	GDestroyNotify reboot_target_destroy_notify;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_ = NULL;
	gchar* message;
	BoxesApp* _tmp4_;
	BoxesNotificationbar* _tmp5_;
	BoxesNotificationbarOKFunc _tmp6_;
	void* _tmp6__target;
	GDestroyNotify _tmp6__target_destroy_notify;
	g_return_if_fail (self != NULL);
	reboot = ___lambda79__boxes_notificationbar_ok_func;
	reboot_target = g_object_ref (self);
	reboot_target_destroy_notify = g_object_unref;
	_tmp0_ = _ ("Changes require restart of '%s'. Attempt restart?");
	_tmp1_ = boxes_collection_item_get_name ((BoxesCollectionItem*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup_printf (_tmp0_, _tmp2_);
	message = _tmp3_;
	_tmp4_ = ((BoxesMachine*) self)->app;
	_tmp5_ = _tmp4_->notificationbar;
	_tmp6_ = reboot;
	_tmp6__target = reboot_target;
	_tmp6__target_destroy_notify = reboot_target_destroy_notify;
	reboot_target_destroy_notify = NULL;
	boxes_notificationbar_display_for_action (_tmp5_, message, GTK_STOCK_YES, _tmp6_, _tmp6__target, _tmp6__target_destroy_notify, NULL, NULL, NULL);
	_g_free0 (message);
	(reboot_target_destroy_notify == NULL) ? NULL : (reboot_target_destroy_notify (reboot_target), NULL);
	reboot = NULL;
	reboot_target = NULL;
	reboot_target_destroy_notify = NULL;
}


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


static void _boxes_libvirt_machine_on_storage_changed_property_size_changed (guint64 value, gpointer self) {
	boxes_libvirt_machine_on_storage_changed (self, value);
}


static void _vala_GVirStoragePoolInfo_free (GVirStoragePoolInfo* self) {
	g_boxed_free (gvir_storage_pool_info_get_type (), self);
}


static void boxes_libvirt_machine_add_storage_property (BoxesLibvirtMachine* self, GList** list) {
	GVirStoragePool* pool = NULL;
	GVirConnection* _tmp0_;
	GVirDomain* _tmp1_;
	GVirStoragePool* _tmp2_ = NULL;
	GVirStorageVol* _tmp3_ = NULL;
	GVirStorageVol* volume;
	GVirStorageVol* _tmp4_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->connection;
	_tmp1_ = self->domain;
	_tmp3_ = boxes_get_storage_volume (_tmp0_, _tmp1_, &_tmp2_);
	_g_object_unref0 (pool);
	pool = _tmp2_;
	volume = _tmp3_;
	_tmp4_ = volume;
	if (_tmp4_ == NULL) {
		_g_object_unref0 (volume);
		_g_object_unref0 (pool);
		return;
	}
	{
		GVirStorageVol* _tmp5_;
		GVirStorageVolInfo* _tmp6_ = NULL;
		GVirStorageVolInfo* volume_info;
		GVirStoragePool* _tmp7_;
		GVirStoragePoolInfo* _tmp8_ = NULL;
		GVirStoragePoolInfo* pool_info;
		GVirStorageVolInfo* _tmp9_;
		guint64 _tmp10_;
		GVirStoragePoolInfo* _tmp11_;
		guint64 _tmp12_;
		guint64 max_storage;
		const gchar* _tmp13_ = NULL;
		GVirStorageVolInfo* _tmp14_;
		guint64 _tmp15_;
		GVirStorageVolInfo* _tmp16_;
		guint64 _tmp17_;
		guint64 _tmp18_;
		_tmp5_ = volume;
		_tmp6_ = gvir_storage_vol_get_info (_tmp5_, &_inner_error_);
		volume_info = _tmp6_;
		if (_inner_error_ != NULL) {
			goto __catch28_g_error;
		}
		_tmp7_ = pool;
		_tmp8_ = gvir_storage_pool_get_info (_tmp7_, &_inner_error_);
		pool_info = _tmp8_;
		if (_inner_error_ != NULL) {
			__vala_GVirStorageVolInfo_free0 (volume_info);
			goto __catch28_g_error;
		}
		_tmp9_ = volume_info;
		_tmp10_ = _tmp9_->capacity;
		_tmp11_ = pool_info;
		_tmp12_ = _tmp11_->available;
		max_storage = (_tmp10_ + _tmp12_) / OSINFO_KIBIBYTES;
		_tmp13_ = _ ("Storage");
		_tmp14_ = volume_info;
		_tmp15_ = _tmp14_->capacity;
		_tmp16_ = volume_info;
		_tmp17_ = _tmp16_->capacity;
		_tmp18_ = max_storage;
		boxes_iproperties_provider_add_size_property ((BoxesIPropertiesProvider*) self, list, _tmp13_, _tmp15_ / OSINFO_KIBIBYTES, _tmp17_ / OSINFO_KIBIBYTES, _tmp18_, (guint64) (OSINFO_GIBIBYTES / OSINFO_KIBIBYTES), _boxes_libvirt_machine_on_storage_changed_property_size_changed, self);
		__vala_GVirStoragePoolInfo_free0 (pool_info);
		__vala_GVirStorageVolInfo_free0 (volume_info);
	}
	goto __finally28;
	__catch28_g_error:
	{
		GError* _error_ = NULL;
		GVirStorageVol* _tmp19_;
		const gchar* _tmp20_ = NULL;
		GError* _tmp21_;
		const gchar* _tmp22_;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_tmp19_ = volume;
		_tmp20_ = gvir_storage_vol_get_name (_tmp19_);
		_tmp21_ = _error_;
		_tmp22_ = _tmp21_->message;
		g_warning ("libvirt-machine.vala:507: Failed to get information on volume '%s' or " \
"it's parent pool: %s", _tmp20_, _tmp22_);
		_g_error_free0 (_error_);
	}
	__finally28:
	if (_inner_error_ != NULL) {
		_g_object_unref0 (volume);
		_g_object_unref0 (pool);
		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 (volume);
	_g_object_unref0 (pool);
}


static Block16Data* block16_data_ref (Block16Data* _data16_) {
	g_atomic_int_inc (&_data16_->_ref_count_);
	return _data16_;
}


static void block16_data_unref (void * _userdata_) {
	Block16Data* _data16_;
	_data16_ = (Block16Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data16_->_ref_count_)) {
		BoxesLibvirtMachine * self;
		self = _data16_->self;
		_g_object_unref0 (self);
		g_slice_free (Block16Data, _data16_);
	}
}


static gboolean __lambda84_ (Block16Data* _data16_) {
	BoxesLibvirtMachine * self;
	gboolean result = FALSE;
	GVirConnection* _tmp0_;
	GVirDomain* _tmp1_;
	GVirStorageVol* _tmp2_ = NULL;
	GVirStorageVol* volume;
	GVirStorageVol* _tmp3_;
	GError * _inner_error_ = NULL;
	self = _data16_->self;
	_tmp0_ = self->connection;
	_tmp1_ = self->domain;
	_tmp2_ = boxes_get_storage_volume (_tmp0_, _tmp1_, NULL);
	volume = _tmp2_;
	_tmp3_ = volume;
	if (_tmp3_ == NULL) {
		result = FALSE;
		_g_object_unref0 (volume);
		return result;
	}
	{
		gboolean _tmp4_ = FALSE;
		guint64 _tmp11_;
		_tmp4_ = boxes_machine_is_running ((BoxesMachine*) self);
		if (_tmp4_) {
			GVirDomainDisk* _tmp5_ = NULL;
			GVirDomainDisk* disk;
			GVirDomainDisk* _tmp6_;
			_tmp5_ = boxes_libvirt_machine_get_domain_disk (self, &_inner_error_);
			disk = _tmp5_;
			if (_inner_error_ != NULL) {
				goto __catch29_g_error;
			}
			_tmp6_ = disk;
			if (_tmp6_ != NULL) {
				GVirDomainDisk* _tmp7_;
				guint64 _tmp8_;
				_tmp7_ = disk;
				_tmp8_ = _data16_->value;
				gvir_domain_disk_resize (_tmp7_, _tmp8_, (guint) 0, &_inner_error_);
				if (_inner_error_ != NULL) {
					_g_object_unref0 (disk);
					goto __catch29_g_error;
				}
			}
			_g_object_unref0 (disk);
		} else {
			GVirStorageVol* _tmp9_;
			guint64 _tmp10_;
			_tmp9_ = volume;
			_tmp10_ = _data16_->value;
			gvir_storage_vol_resize (_tmp9_, _tmp10_ * OSINFO_KIBIBYTES, GVIR_STORAGE_VOL_RESIZE_NONE, &_inner_error_);
			if (_inner_error_ != NULL) {
				goto __catch29_g_error;
			}
		}
		_tmp11_ = _data16_->value;
		g_debug ("libvirt-machine.vala:531: Storage changed to %llu", _tmp11_);
	}
	goto __finally29;
	__catch29_g_error:
	{
		GError* _error_ = NULL;
		GVirStorageVol* _tmp12_;
		const gchar* _tmp13_ = NULL;
		guint64 _tmp14_;
		GError* _tmp15_;
		const gchar* _tmp16_;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_tmp12_ = volume;
		_tmp13_ = gvir_storage_vol_get_name (_tmp12_);
		_tmp14_ = _data16_->value;
		_tmp15_ = _error_;
		_tmp16_ = _tmp15_->message;
		g_warning ("libvirt-machine.vala:533: Failed to change storage capacity of volume " \
"'%s' to %llu: %s", _tmp13_, _tmp14_, _tmp16_);
		_g_error_free0 (_error_);
	}
	__finally29:
	if (_inner_error_ != NULL) {
		_g_object_unref0 (volume);
		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;
	}
	self->priv->storage_update_timeout = (guint) 0;
	result = FALSE;
	_g_object_unref0 (volume);
	return result;
}


static gboolean ___lambda84__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda84_ (self);
	return result;
}


static void boxes_libvirt_machine_on_storage_changed (BoxesLibvirtMachine* self, guint64 value) {
	Block16Data* _data16_;
	guint64 _tmp0_;
	guint _tmp1_;
	guint _tmp3_ = 0U;
	g_return_if_fail (self != NULL);
	_data16_ = g_slice_new0 (Block16Data);
	_data16_->_ref_count_ = 1;
	_data16_->self = g_object_ref (self);
	_tmp0_ = value;
	_data16_->value = _tmp0_;
	_tmp1_ = self->priv->storage_update_timeout;
	if (_tmp1_ != ((guint) 0)) {
		guint _tmp2_;
		_tmp2_ = self->priv->storage_update_timeout;
		g_source_remove (_tmp2_);
	}
	_tmp3_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 1, ___lambda84__gsource_func, block16_data_ref (_data16_), block16_data_unref);
	self->priv->storage_update_timeout = _tmp3_;
	block16_data_unref (_data16_);
	_data16_ = NULL;
}


gboolean boxes_libvirt_machine_get_save_on_quit (BoxesLibvirtMachine* self) {
	gboolean result;
	BoxesCollectionSource* _tmp0_;
	gboolean _tmp1_ = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = ((BoxesMachine*) self)->source;
	_tmp1_ = boxes_iconfig_get_boolean ((BoxesIConfig*) _tmp0_, "source", "save-on-quit", FALSE);
	result = _tmp1_;
	return result;
}


void boxes_libvirt_machine_set_save_on_quit (BoxesLibvirtMachine* self, gboolean value) {
	BoxesCollectionSource* _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = ((BoxesMachine*) self)->source;
	_tmp1_ = value;
	boxes_iconfig_set_boolean ((BoxesIConfig*) _tmp0_, "source", "save-on-quit", _tmp1_);
	g_object_notify ((GObject *) self, "save-on-quit");
}


static GObject * boxes_libvirt_machine_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	BoxesLibvirtMachine * self;
	BoxesLibvirtMachineMachineStat* _tmp0_ = NULL;
	GCancellable* _tmp1_;
	parent_class = G_OBJECT_CLASS (boxes_libvirt_machine_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = BOXES_LIBVIRT_MACHINE (obj);
	_tmp0_ = g_new0 (BoxesLibvirtMachineMachineStat, BOXES_LIBVIRT_MACHINE_STATS_SIZE);
	self->priv->stats = (_vala_BoxesLibvirtMachineMachineStat_array_free (self->priv->stats, self->priv->stats_length1), NULL);
	self->priv->stats = _tmp0_;
	self->priv->stats_length1 = BOXES_LIBVIRT_MACHINE_STATS_SIZE;
	self->priv->_stats_size_ = self->priv->stats_length1;
	_tmp1_ = g_cancellable_new ();
	_g_object_unref0 (self->priv->stats_cancellable);
	self->priv->stats_cancellable = _tmp1_;
	return obj;
}


static GVirDomainDiskStats* _vala_GVirDomainDiskStats_copy (GVirDomainDiskStats* self) {
	return g_boxed_copy (gvir_domain_disk_stats_get_type (), self);
}


static gpointer __vala_GVirDomainDiskStats_copy0 (gpointer self) {
	return self ? _vala_GVirDomainDiskStats_copy (self) : NULL;
}


static GVirDomainInterfaceStats* _vala_GVirDomainInterfaceStats_copy (GVirDomainInterfaceStats* self) {
	return g_boxed_copy (gvir_domain_interface_stats_get_type (), self);
}


static gpointer __vala_GVirDomainInterfaceStats_copy0 (gpointer self) {
	return self ? _vala_GVirDomainInterfaceStats_copy (self) : NULL;
}


static void boxes_libvirt_machine_machine_stat_copy (const BoxesLibvirtMachineMachineStat* self, BoxesLibvirtMachineMachineStat* dest) {
	gint64 _tmp0_;
	gdouble _tmp1_;
	gdouble _tmp2_;
	gdouble _tmp3_;
	gdouble _tmp4_;
	GVirDomainDiskStats* _tmp5_;
	GVirDomainDiskStats* _tmp6_;
	gdouble _tmp7_;
	gdouble _tmp8_;
	GVirDomainInterfaceStats* _tmp9_;
	GVirDomainInterfaceStats* _tmp10_;
	gdouble _tmp11_;
	gdouble _tmp12_;
	_tmp0_ = (*self).timestamp;
	(*dest).timestamp = _tmp0_;
	_tmp1_ = (*self).cpu_time;
	(*dest).cpu_time = _tmp1_;
	_tmp2_ = (*self).cpu_time_abs;
	(*dest).cpu_time_abs = _tmp2_;
	_tmp3_ = (*self).cpu_guest_percent;
	(*dest).cpu_guest_percent = _tmp3_;
	_tmp4_ = (*self).memory_percent;
	(*dest).memory_percent = _tmp4_;
	_tmp5_ = (*self).disk;
	_tmp6_ = __vala_GVirDomainDiskStats_copy0 (_tmp5_);
	__vala_GVirDomainDiskStats_free0 ((*dest).disk);
	(*dest).disk = _tmp6_;
	_tmp7_ = (*self).disk_read;
	(*dest).disk_read = _tmp7_;
	_tmp8_ = (*self).disk_write;
	(*dest).disk_write = _tmp8_;
	_tmp9_ = (*self).net;
	_tmp10_ = __vala_GVirDomainInterfaceStats_copy0 (_tmp9_);
	__vala_GVirDomainInterfaceStats_free0 ((*dest).net);
	(*dest).net = _tmp10_;
	_tmp11_ = (*self).net_read;
	(*dest).net_read = _tmp11_;
	_tmp12_ = (*self).net_write;
	(*dest).net_write = _tmp12_;
}


static void boxes_libvirt_machine_machine_stat_destroy (BoxesLibvirtMachineMachineStat* self) {
	__vala_GVirDomainDiskStats_free0 ((*self).disk);
	__vala_GVirDomainInterfaceStats_free0 ((*self).net);
}


static BoxesLibvirtMachineMachineStat* boxes_libvirt_machine_machine_stat_dup (const BoxesLibvirtMachineMachineStat* self) {
	BoxesLibvirtMachineMachineStat* dup;
	dup = g_new0 (BoxesLibvirtMachineMachineStat, 1);
	boxes_libvirt_machine_machine_stat_copy (self, dup);
	return dup;
}


static void boxes_libvirt_machine_machine_stat_free (BoxesLibvirtMachineMachineStat* self) {
	boxes_libvirt_machine_machine_stat_destroy (self);
	g_free (self);
}


static GType boxes_libvirt_machine_machine_stat_get_type (void) {
	static volatile gsize boxes_libvirt_machine_machine_stat_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_libvirt_machine_machine_stat_type_id__volatile)) {
		GType boxes_libvirt_machine_machine_stat_type_id;
		boxes_libvirt_machine_machine_stat_type_id = g_boxed_type_register_static ("BoxesLibvirtMachineMachineStat", (GBoxedCopyFunc) boxes_libvirt_machine_machine_stat_dup, (GBoxedFreeFunc) boxes_libvirt_machine_machine_stat_free);
		g_once_init_leave (&boxes_libvirt_machine_machine_stat_type_id__volatile, boxes_libvirt_machine_machine_stat_type_id);
	}
	return boxes_libvirt_machine_machine_stat_type_id__volatile;
}


static void boxes_libvirt_machine_class_init (BoxesLibvirtMachineClass * klass) {
	boxes_libvirt_machine_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BoxesLibvirtMachinePrivate));
	BOXES_MACHINE_CLASS (klass)->disconnect_display = boxes_libvirt_machine_real_disconnect_display;
	BOXES_MACHINE_CLASS (klass)->connect_display = boxes_libvirt_machine_real_connect_display;
	BOXES_MACHINE_CLASS (klass)->get_properties = boxes_libvirt_machine_real_get_properties;
	BOXES_MACHINE_CLASS (klass)->get_screenshot_prefix = boxes_libvirt_machine_real_get_screenshot_prefix;
	BOXES_MACHINE_CLASS (klass)->take_screenshot = boxes_libvirt_machine_real_take_screenshot;
	BOXES_MACHINE_CLASS (klass)->take_screenshot_finish = boxes_libvirt_machine_real_take_screenshot_finish;
	BOXES_MACHINE_CLASS (klass)->delete = boxes_libvirt_machine_real_delete;
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_libvirt_machine_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_libvirt_machine_set_property;
	G_OBJECT_CLASS (klass)->constructor = boxes_libvirt_machine_constructor;
	G_OBJECT_CLASS (klass)->finalize = boxes_libvirt_machine_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_LIBVIRT_MACHINE_SAVE_ON_QUIT, g_param_spec_boolean ("save-on-quit", "save-on-quit", "save-on-quit", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_signal_new ("stats_updated", BOXES_TYPE_LIBVIRT_MACHINE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}


static void boxes_libvirt_machine_instance_init (BoxesLibvirtMachine * self) {
	self->priv = BOXES_LIBVIRT_MACHINE_GET_PRIVATE (self);
	self->priv->ram_update_timeout = (guint) 0;
	self->priv->storage_update_timeout = (guint) 0;
}


static void boxes_libvirt_machine_finalize (GObject* obj) {
	BoxesLibvirtMachine * self;
	self = BOXES_LIBVIRT_MACHINE (obj);
	_g_object_unref0 (self->domain);
	_g_object_unref0 (self->domain_config);
	_g_object_unref0 (self->connection);
	_g_free0 (self->priv->storage_volume_path);
	_g_object_unref0 (self->priv->stats_cancellable);
	self->priv->stats = (_vala_BoxesLibvirtMachineMachineStat_array_free (self->priv->stats, self->priv->stats_length1), NULL);
	self->cpu_stats = (g_free (self->cpu_stats), NULL);
	self->io_stats = (g_free (self->io_stats), NULL);
	self->net_stats = (g_free (self->net_stats), NULL);
	G_OBJECT_CLASS (boxes_libvirt_machine_parent_class)->finalize (obj);
}


GType boxes_libvirt_machine_get_type (void) {
	static volatile gsize boxes_libvirt_machine_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_libvirt_machine_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesLibvirtMachineClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_libvirt_machine_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesLibvirtMachine), 0, (GInstanceInitFunc) boxes_libvirt_machine_instance_init, NULL };
		GType boxes_libvirt_machine_type_id;
		boxes_libvirt_machine_type_id = g_type_register_static (BOXES_TYPE_MACHINE, "BoxesLibvirtMachine", &g_define_type_info, 0);
		g_once_init_leave (&boxes_libvirt_machine_type_id__volatile, boxes_libvirt_machine_type_id);
	}
	return boxes_libvirt_machine_type_id__volatile;
}


static void _vala_boxes_libvirt_machine_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesLibvirtMachine * self;
	self = BOXES_LIBVIRT_MACHINE (object);
	switch (property_id) {
		case BOXES_LIBVIRT_MACHINE_SAVE_ON_QUIT:
		g_value_set_boolean (value, boxes_libvirt_machine_get_save_on_quit (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_boxes_libvirt_machine_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesLibvirtMachine * self;
	self = BOXES_LIBVIRT_MACHINE (object);
	switch (property_id) {
		case BOXES_LIBVIRT_MACHINE_SAVE_ON_QUIT:
		boxes_libvirt_machine_set_save_on_quit (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



