/* spice-display.c generated by valac 0.39.5, the Vala compiler
 * generated from spice-display.vala, do not modify */

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

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <libcommon.h>
#include <stdlib.h>
#include <string.h>
#include <spice-client.h>
#include <spice-widget.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>
#include <glib/gstdio.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>
#include <libusb.h>
#include <libxml/uri.h>


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

typedef struct _BoxesIPropertiesProvider BoxesIPropertiesProvider;
typedef struct _BoxesIPropertiesProviderIface BoxesIPropertiesProviderIface;

#define BOXES_TYPE_PROPERTIES_PAGE (boxes_properties_page_get_type ())

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

typedef struct _BoxesProperty BoxesProperty;
typedef struct _BoxesPropertyClass BoxesPropertyClass;

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

#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;
typedef struct _BoxesSpiceDisplayPrivate BoxesSpiceDisplayPrivate;

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

typedef struct _BoxesCollectionItem BoxesCollectionItem;
typedef struct _BoxesCollectionItemClass BoxesCollectionItemClass;

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

typedef struct _BoxesMachine BoxesMachine;
typedef struct _BoxesMachineClass BoxesMachineClass;

#define BOXES_TYPE_SPICE_CHANNEL_HANDLER (boxes_spice_channel_handler_get_type ())
#define BOXES_SPICE_CHANNEL_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SPICE_CHANNEL_HANDLER, BoxesSpiceChannelHandler))
#define BOXES_SPICE_CHANNEL_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SPICE_CHANNEL_HANDLER, BoxesSpiceChannelHandlerClass))
#define BOXES_IS_SPICE_CHANNEL_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SPICE_CHANNEL_HANDLER))
#define BOXES_IS_SPICE_CHANNEL_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SPICE_CHANNEL_HANDLER))
#define BOXES_SPICE_CHANNEL_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SPICE_CHANNEL_HANDLER, BoxesSpiceChannelHandlerClass))

typedef struct _BoxesSpiceChannelHandler BoxesSpiceChannelHandler;
typedef struct _BoxesSpiceChannelHandlerClass BoxesSpiceChannelHandlerClass;
enum  {
	BOXES_SPICE_DISPLAY_0_PROPERTY,
	BOXES_SPICE_DISPLAY_PROTOCOL_PROPERTY,
	BOXES_SPICE_DISPLAY_URI_PROPERTY,
	BOXES_SPICE_DISPLAY_CAN_TRANSFER_FILES_PROPERTY,
	BOXES_SPICE_DISPLAY_CA_CERT_PROPERTY,
	BOXES_SPICE_DISPLAY_MAIN_CHANNEL_PROPERTY,
	BOXES_SPICE_DISPLAY_NUM_PROPERTIES
};
static GParamSpec* boxes_spice_display_properties[BOXES_SPICE_DISPLAY_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))

#define BOXES_TYPE_UI (boxes_ui_get_type ())
#define BOXES_UI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UI, BoxesUI))
#define BOXES_IS_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UI))
#define BOXES_UI_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BOXES_TYPE_UI, BoxesUIIface))

typedef struct _BoxesUI BoxesUI;
typedef struct _BoxesUIIface BoxesUIIface;

#define BOXES_TYPE_UI_STATE (boxes_ui_state_get_type ())
#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define __vala_SpiceUsbDevice_free0(var) ((var == NULL) ? NULL : (var = (_vala_SpiceUsbDevice_free (var), NULL)))
#define _g_dir_close0(var) ((var == NULL) ? NULL : (var = (g_dir_close (var), NULL)))
typedef struct _BoxesCollectionItemPrivate BoxesCollectionItemPrivate;
typedef struct _BoxesMachinePrivate BoxesMachinePrivate;

#define BOXES_MACHINE_TYPE_CONNECT_FLAGS (boxes_machine_connect_flags_get_type ())
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
#define _g_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_variant_iter_free0(var) ((var == NULL) ? NULL : (var = (g_variant_iter_free (var), NULL)))
#define _g_variant_builder_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_builder_unref (var), NULL)))

#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_APP_WINDOW (boxes_app_window_get_type ())
#define BOXES_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_APP_WINDOW, BoxesAppWindow))
#define BOXES_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_APP_WINDOW, BoxesAppWindowClass))
#define BOXES_IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_APP_WINDOW))
#define BOXES_IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_APP_WINDOW))
#define BOXES_APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_APP_WINDOW, BoxesAppWindowClass))

typedef struct _BoxesAppWindow BoxesAppWindow;
typedef struct _BoxesAppWindowClass BoxesAppWindowClass;
typedef struct _BoxesAppWindowPrivate BoxesAppWindowPrivate;

#define BOXES_TYPE_WIZARD_WINDOW (boxes_wizard_window_get_type ())
#define BOXES_WIZARD_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_WIZARD_WINDOW, BoxesWizardWindow))
#define BOXES_WIZARD_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_WIZARD_WINDOW, BoxesWizardWindowClass))
#define BOXES_IS_WIZARD_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_WIZARD_WINDOW))
#define BOXES_IS_WIZARD_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_WIZARD_WINDOW))
#define BOXES_WIZARD_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_WIZARD_WINDOW, BoxesWizardWindowClass))

typedef struct _BoxesWizardWindow BoxesWizardWindow;
typedef struct _BoxesWizardWindowClass BoxesWizardWindowClass;

#define BOXES_TYPE_PROPERTIES_WINDOW (boxes_properties_window_get_type ())
#define BOXES_PROPERTIES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_PROPERTIES_WINDOW, BoxesPropertiesWindow))
#define BOXES_PROPERTIES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_PROPERTIES_WINDOW, BoxesPropertiesWindowClass))
#define BOXES_IS_PROPERTIES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_PROPERTIES_WINDOW))
#define BOXES_IS_PROPERTIES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_PROPERTIES_WINDOW))
#define BOXES_PROPERTIES_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_PROPERTIES_WINDOW, BoxesPropertiesWindowClass))

typedef struct _BoxesPropertiesWindow BoxesPropertiesWindow;
typedef struct _BoxesPropertiesWindowClass BoxesPropertiesWindowClass;

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

typedef struct _BoxesSearchbar BoxesSearchbar;
typedef struct _BoxesSearchbarClass BoxesSearchbarClass;

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

typedef struct _BoxesTopbar BoxesTopbar;
typedef struct _BoxesTopbarClass BoxesTopbarClass;

#define BOXES_TYPE_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_EMPTY_BOXES (boxes_empty_boxes_get_type ())
#define BOXES_EMPTY_BOXES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_EMPTY_BOXES, BoxesEmptyBoxes))
#define BOXES_EMPTY_BOXES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_EMPTY_BOXES, BoxesEmptyBoxesClass))
#define BOXES_IS_EMPTY_BOXES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_EMPTY_BOXES))
#define BOXES_IS_EMPTY_BOXES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_EMPTY_BOXES))
#define BOXES_EMPTY_BOXES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_EMPTY_BOXES, BoxesEmptyBoxesClass))

typedef struct _BoxesEmptyBoxes BoxesEmptyBoxes;
typedef struct _BoxesEmptyBoxesClass BoxesEmptyBoxesClass;

#define BOXES_TYPE_TROUBLESHOOT_VIEW (boxes_troubleshoot_view_get_type ())
#define BOXES_TROUBLESHOOT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_TROUBLESHOOT_VIEW, BoxesTroubleshootView))
#define BOXES_TROUBLESHOOT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_TROUBLESHOOT_VIEW, BoxesTroubleshootViewClass))
#define BOXES_IS_TROUBLESHOOT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_TROUBLESHOOT_VIEW))
#define BOXES_IS_TROUBLESHOOT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_TROUBLESHOOT_VIEW))
#define BOXES_TROUBLESHOOT_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_TROUBLESHOOT_VIEW, BoxesTroubleshootViewClass))

typedef struct _BoxesTroubleshootView BoxesTroubleshootView;
typedef struct _BoxesTroubleshootViewClass BoxesTroubleshootViewClass;
typedef struct _Block75Data Block75Data;
typedef struct _Block76Data Block76Data;
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
#define _libusb_unref_device0(var) ((var == NULL) ? NULL : (var = (libusb_unref_device (var), NULL)))
#define _libusb_free_config_descriptor0(var) ((var == NULL) ? NULL : (var = (libusb_free_config_descriptor (var), NULL)))
typedef struct _Block77Data Block77Data;
typedef struct _Block78Data Block78Data;

#define BOXES_TYPE_SHARED_FOLDER_POPOVER (boxes_shared_folder_popover_get_type ())
#define BOXES_SHARED_FOLDER_POPOVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SHARED_FOLDER_POPOVER, BoxesSharedFolderPopover))
#define BOXES_SHARED_FOLDER_POPOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SHARED_FOLDER_POPOVER, BoxesSharedFolderPopoverClass))
#define BOXES_IS_SHARED_FOLDER_POPOVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SHARED_FOLDER_POPOVER))
#define BOXES_IS_SHARED_FOLDER_POPOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SHARED_FOLDER_POPOVER))
#define BOXES_SHARED_FOLDER_POPOVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SHARED_FOLDER_POPOVER, BoxesSharedFolderPopoverClass))

typedef struct _BoxesSharedFolderPopover BoxesSharedFolderPopover;
typedef struct _BoxesSharedFolderPopoverClass BoxesSharedFolderPopoverClass;
typedef struct _Block79Data Block79Data;
typedef struct _BoxesSharedFolderPopoverPrivate BoxesSharedFolderPopoverPrivate;

#define BOXES_TYPE_SHARED_FOLDER_ROW (boxes_shared_folder_row_get_type ())
#define BOXES_SHARED_FOLDER_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SHARED_FOLDER_ROW, BoxesSharedFolderRow))
#define BOXES_SHARED_FOLDER_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SHARED_FOLDER_ROW, BoxesSharedFolderRowClass))
#define BOXES_IS_SHARED_FOLDER_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SHARED_FOLDER_ROW))
#define BOXES_IS_SHARED_FOLDER_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SHARED_FOLDER_ROW))
#define BOXES_SHARED_FOLDER_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SHARED_FOLDER_ROW, BoxesSharedFolderRowClass))

typedef struct _BoxesSharedFolderRow BoxesSharedFolderRow;
typedef struct _BoxesSharedFolderRowClass BoxesSharedFolderRowClass;
typedef struct _Block80Data Block80Data;
typedef struct _BoxesSpiceChannelHandlerPrivate BoxesSpiceChannelHandlerPrivate;
enum  {
	BOXES_SPICE_CHANNEL_HANDLER_0_PROPERTY,
	BOXES_SPICE_CHANNEL_HANDLER_NUM_PROPERTIES
};
static GParamSpec* boxes_spice_channel_handler_properties[BOXES_SPICE_CHANNEL_HANDLER_NUM_PROPERTIES];
#define _xmlFreeURI0(var) ((var == NULL) ? NULL : (var = (xmlFreeURI (var), NULL)))
typedef struct _BoxesSharedFolderRowPrivate BoxesSharedFolderRowPrivate;
enum  {
	BOXES_SHARED_FOLDER_ROW_0_PROPERTY,
	BOXES_SHARED_FOLDER_ROW_FOLDER_PATH_PROPERTY,
	BOXES_SHARED_FOLDER_ROW_FOLDER_NAME_PROPERTY,
	BOXES_SHARED_FOLDER_ROW_NUM_PROPERTIES
};
static GParamSpec* boxes_shared_folder_row_properties[BOXES_SHARED_FOLDER_ROW_NUM_PROPERTIES];
enum  {
	BOXES_SHARED_FOLDER_ROW_REMOVED_SIGNAL,
	BOXES_SHARED_FOLDER_ROW_NUM_SIGNALS
};
static guint boxes_shared_folder_row_signals[BOXES_SHARED_FOLDER_ROW_NUM_SIGNALS] = {0};
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

typedef enum  {
	BOXES_PROPERTIES_PAGE_GENERAL,
	BOXES_PROPERTIES_PAGE_SYSTEM,
	BOXES_PROPERTIES_PAGE_DEVICES,
	BOXES_PROPERTIES_PAGE_SNAPSHOTS,
	BOXES_PROPERTIES_PAGE_LAST
} BoxesPropertiesPage;

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

typedef gint (*BoxesDisplayOpenFDFunc) (void* user_data);
struct _BoxesDisplay {
	GObject parent_instance;
	BoxesDisplayPrivate * priv;
	gboolean connected;
	GHashTable* displays;
};

struct _BoxesDisplayClass {
	GObjectClass parent_class;
	GtkWidget* (*get_display) (BoxesDisplay* self, gint n);
	GdkPixbuf* (*get_pixbuf) (BoxesDisplay* self, gint n, GError** error);
	void (*set_enable_audio) (BoxesDisplay* self, gboolean enable);
	gboolean (*should_keep_alive) (BoxesDisplay* self);
	void (*connect_it) (BoxesDisplay* self, BoxesDisplayOpenFDFunc open_fd, void* open_fd_target, GDestroyNotify open_fd_target_destroy_notify, GError** error);
	void (*disconnect_it) (BoxesDisplay* self);
	void (*collect_logs) (BoxesDisplay* self, GString* builder);
	void (*transfer_files) (BoxesDisplay* self, GList* uris);
	void (*send_keys) (BoxesDisplay* self, guint* keyvals, int keyvals_length1);
	GList* (*get_properties) (BoxesDisplay* self, BoxesPropertiesPage page);
	const gchar* (*get_protocol) (BoxesDisplay* self);
	gchar* (*get_uri) (BoxesDisplay* self);
	gboolean (*get_can_transfer_files) (BoxesDisplay* self);
};

struct _BoxesSpiceDisplay {
	BoxesDisplay parent_instance;
	BoxesSpiceDisplayPrivate * priv;
};

struct _BoxesSpiceDisplayClass {
	BoxesDisplayClass parent_class;
};

struct _BoxesSpiceDisplayPrivate {
	BoxesMachine* machine;
	SpiceSession* session;
	SpiceGtkSession* gtk_session;
	SpiceAudio* audio;
	gulong channel_new_id;
	gulong channel_destroy_id;
	BoxesBoxConfigSavedProperty* display_saved_properties;
	gint display_saved_properties_length1;
	gint _display_saved_properties_size_;
	BoxesBoxConfigSavedProperty* gtk_session_saved_properties;
	gint gtk_session_saved_properties_length1;
	gint _gtk_session_saved_properties_size_;
	gboolean closed;
	SpicePortChannel* webdav_channel;
	gchar* shared_folder;
	GSettings* shared_folder_settings;
	GHashTable* channel_handlers;
	BoxesDisplayOpenFDFunc open_fd;
	gpointer open_fd_target;
	GDestroyNotify open_fd_target_destroy_notify;
	SpiceMainChannel* _main_channel;
	gulong main_event_id;
	gulong main_mouse_mode_id;
	gulong new_file_transfer_id;
};

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

struct _BoxesUIIface {
	GTypeInterface parent_iface;
	BoxesUIState (*get_previous_ui_state) (BoxesUI* self);
	void (*set_previous_ui_state) (BoxesUI* self, BoxesUIState value);
	BoxesUIState (*get_ui_state) (BoxesUI* self);
	void (*set_ui_state) (BoxesUI* self, BoxesUIState value);
};

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

struct _BoxesCollectionItemClass {
	GObjectClass parent_class;
	gint (*compare) (BoxesCollectionItem* self, BoxesCollectionItem* other);
};

typedef enum  {
	BOXES_MACHINE_CONNECT_FLAGS_NONE = 0,
	BOXES_MACHINE_CONNECT_FLAGS_IGNORE_SAVED_STATE = 1 << 0
} BoxesMachineConnectFlags;

struct _BoxesMachine {
	BoxesCollectionItem parent_instance;
	BoxesMachinePrivate * priv;
	BoxesCollectionSource* source;
	BoxesBoxConfig* config;
	gboolean stay_on_display;
};

struct _BoxesMachineClass {
	BoxesCollectionItemClass parent_class;
	void (*save_real) (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*save_real_finish) (BoxesMachine* self, GAsyncResult* _res_, GError** error);
	void (*take_screenshot) (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GdkPixbuf* (*take_screenshot_finish) (BoxesMachine* self, GAsyncResult* _res_, GError** error);
	GList* (*get_properties) (BoxesMachine* self, BoxesPropertiesPage page);
	void (*connect_display) (BoxesMachine* self, BoxesMachineConnectFlags flags, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*connect_display_finish) (BoxesMachine* self, GAsyncResult* _res_, GError** error);
	void (*restart) (BoxesMachine* self);
	void (*clone) (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*clone_finish) (BoxesMachine* self, GAsyncResult* _res_);
	void (*disconnect_display) (BoxesMachine* self);
	void (*update_status) (BoxesMachine* self);
	void (*delete) (BoxesMachine* self, gboolean by_user);
	gboolean (*get_suspend_at_exit) (BoxesMachine* self);
	gboolean (*get_can_save) (BoxesMachine* self);
	gboolean (*get_can_restart) (BoxesMachine* self);
	gboolean (*get_can_clone) (BoxesMachine* self);
	gboolean (*get_should_autosave) (BoxesMachine* self);
	gboolean (*get_is_local) (BoxesMachine* self);
};

struct _BoxesAppWindow {
	GtkApplicationWindow parent_instance;
	BoxesAppWindowPrivate * priv;
	BoxesWizardWindow* wizard_window;
	BoxesPropertiesWindow* props_window;
	BoxesSearchbar* searchbar;
	BoxesTopbar* topbar;
	BoxesSelectionbar* selectionbar;
	BoxesDisplayPage* display_page;
	BoxesEmptyBoxes* empty_boxes;
	BoxesTroubleshootView* troubleshoot_view;
	GtkStack* below_bin;
	GSettings* settings;
};

struct _BoxesAppWindowClass {
	GtkApplicationWindowClass parent_class;
};

struct _Block75Data {
	int _ref_count_;
	BoxesSpiceDisplay* self;
	BoxesProperty* usb_property;
};

struct _Block76Data {
	int _ref_count_;
	GPtrArray* self;
	GCompareFunc compare_func;
};

struct _Block77Data {
	int _ref_count_;
	BoxesSpiceDisplay* self;
	SpiceUsbDeviceManager* manager;
};

struct _Block78Data {
	int _ref_count_;
	Block77Data * _data77_;
	SpiceUsbDevice* dev;
	GtkSwitch* dev_toggle;
};

struct _Block79Data {
	int _ref_count_;
	BoxesSpiceDisplay* self;
	GtkListBox* listbox;
	GtkButton* button_plus;
	BoxesSharedFolderPopover* popover;
};

struct _BoxesSharedFolderPopover {
	GtkPopover parent_instance;
	BoxesSharedFolderPopoverPrivate * priv;
	GtkFileChooserButton* file_chooser_button;
	GtkEntry* name_entry;
	gint target_position;
};

struct _BoxesSharedFolderPopoverClass {
	GtkPopoverClass parent_class;
};

struct _Block80Data {
	int _ref_count_;
	BoxesSpiceDisplay* self;
	BoxesSharedFolderRow* listboxrow;
	GtkListBox* listbox;
	gchar* name;
};

struct _BoxesSpiceChannelHandler {
	GObject parent_instance;
	BoxesSpiceChannelHandlerPrivate * priv;
};

struct _BoxesSpiceChannelHandlerClass {
	GObjectClass parent_class;
};

struct _BoxesSpiceChannelHandlerPrivate {
	BoxesSpiceDisplay* display;
	SpiceChannel* channel;
	BoxesDisplayOpenFDFunc open_fd;
	gpointer open_fd_target;
	GDestroyNotify open_fd_target_destroy_notify;
};

struct _BoxesSharedFolderRow {
	GtkListBoxRow parent_instance;
	BoxesSharedFolderRowPrivate * priv;
};

struct _BoxesSharedFolderRowClass {
	GtkListBoxRowClass parent_class;
};

struct _BoxesSharedFolderRowPrivate {
	gchar* _folder_path;
	gchar* _folder_name;
	GtkLabel* folder_path_label;
	GtkLabel* folder_name_label;
};


static gpointer boxes_spice_display_parent_class = NULL;
static gpointer boxes_spice_channel_handler_parent_class = NULL;
static gpointer boxes_shared_folder_row_parent_class = NULL;

GType boxes_properties_page_get_type (void) G_GNUC_CONST;
GType boxes_property_get_type (void) G_GNUC_CONST;
GType boxes_iproperties_provider_get_type (void) G_GNUC_CONST;
GType boxes_display_get_type (void) G_GNUC_CONST;
GType boxes_spice_display_get_type (void) G_GNUC_CONST;
GType boxes_collection_item_get_type (void) G_GNUC_CONST;
GType boxes_machine_get_type (void) G_GNUC_CONST;
GType boxes_spice_channel_handler_get_type (void) G_GNUC_CONST;
#define BOXES_SPICE_DISPLAY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_SPICE_DISPLAY, BoxesSpiceDisplayPrivate))
static void boxes_spice_display_main_cleanup (BoxesSpiceDisplay* self);
static void _vala_BoxesBoxConfigSavedProperty_array_free (BoxesBoxConfigSavedProperty * array,
                                                   gint array_length);
static void boxes_spice_display_ui_state_changed (BoxesSpiceDisplay* self);
GType boxes_ui_state_get_type (void) G_GNUC_CONST;
GType boxes_ui_get_type (void) G_GNUC_CONST;
BoxesUIState boxes_ui_get_ui_state (BoxesUI* self);
GtkWidget* boxes_display_get_display (BoxesDisplay* self,
                                      gint n);
static gchar* boxes_spice_display_get_box_name (BoxesSpiceDisplay* self);
BoxesBoxConfig* boxes_display_get_config (BoxesDisplay* self);
SpiceMainChannel* boxes_spice_display_get_main_channel (BoxesSpiceDisplay* self);
void boxes_spice_display_set_main_channel (BoxesSpiceDisplay* self,
                                           SpiceMainChannel* value);
BoxesSpiceDisplay* boxes_spice_display_new (BoxesMachine* machine,
                                            BoxesBoxConfig* config,
                                            const gchar* host,
                                            gint port,
                                            gint tls_port,
                                            const gchar* host_subject);
BoxesSpiceDisplay* boxes_spice_display_construct (GType object_type,
                                                  BoxesMachine* machine,
                                                  BoxesBoxConfig* config,
                                                  const gchar* host,
                                                  gint port,
                                                  gint tls_port,
                                                  const gchar* host_subject);
BoxesDisplay* boxes_display_construct (GType object_type);
static void _boxes_spice_display_ui_state_changed_g_object_notify (GObject* _sender,
                                                            GParamSpec* pspec,
                                                            gpointer self);
void boxes_display_set_config (BoxesDisplay* self,
                               BoxesBoxConfig* value);
static void boxes_spice_display_init_shared_folders (BoxesSpiceDisplay* self);
BoxesSpiceDisplay* boxes_spice_display_new_with_uri (BoxesMachine* machine,
                                                     BoxesBoxConfig* config,
                                                     const gchar* uri);
BoxesSpiceDisplay* boxes_spice_display_construct_with_uri (GType object_type,
                                                           BoxesMachine* machine,
                                                           BoxesBoxConfig* config,
                                                           const gchar* uri);
BoxesSpiceDisplay* boxes_spice_display_new_priv (BoxesMachine* machine,
                                                 BoxesBoxConfig* config);
BoxesSpiceDisplay* boxes_spice_display_construct_priv (GType object_type,
                                                       BoxesMachine* machine,
                                                       BoxesBoxConfig* config);
static GtkWidget* boxes_spice_display_real_get_display (BoxesDisplay* base,
                                                 gint n);
static void ___lambda85_ (BoxesSpiceDisplay* self,
                   gint status);
void boxes_display_set_mouse_grabbed (BoxesDisplay* self,
                                      gboolean value);
static void ____lambda85__spice_display_mouse_grab (SpiceDisplay* _sender,
                                             gint status,
                                             gpointer self);
static void ___lambda86_ (BoxesSpiceDisplay* self,
                   gint status);
void boxes_display_set_keyboard_grabbed (BoxesDisplay* self,
                                         gboolean value);
static void ____lambda86__spice_display_keyboard_grab (SpiceDisplay* _sender,
                                                gint status,
                                                gpointer self);
static gboolean boxes_spice_display_real_should_keep_alive (BoxesDisplay* base);
static GPtrArray* boxes_spice_display_get_usb_devices (BoxesSpiceDisplay* self,
                                                SpiceUsbDeviceManager* manager);
static void boxes_spice_display_real_set_enable_audio (BoxesDisplay* base,
                                                gboolean enable);
static GdkPixbuf* boxes_spice_display_real_get_pixbuf (BoxesDisplay* base,
                                                gint n,
                                                GError** error);
static void boxes_spice_display_real_collect_logs (BoxesDisplay* base,
                                            GString* builder);
gchar* boxes_display_get_uri (BoxesDisplay* self);
static SpiceUsbDevice* _vala_SpiceUsbDevice_copy (SpiceUsbDevice* self);
static void _vala_SpiceUsbDevice_free (SpiceUsbDevice* self);
static void boxes_spice_display_real_connect_it (BoxesDisplay* base,
                                          BoxesDisplayOpenFDFunc open_fd,
                                          void* open_fd_target,
                                          GDestroyNotify open_fd_target_destroy_notify,
                                          GError** error);
static void _g_object_unref0_ (gpointer var);
static void boxes_spice_display_on_channel_new (BoxesSpiceDisplay* self,
                                         SpiceSession* session,
                                         SpiceChannel* channel);
static void _boxes_spice_display_on_channel_new_spice_session_channel_new (SpiceSession* _sender,
                                                                    SpiceChannel* channel,
                                                                    gpointer self);
static void boxes_spice_display_on_channel_destroy (BoxesSpiceDisplay* self,
                                             SpiceSession* session,
                                             SpiceChannel* channel);
static void _boxes_spice_display_on_channel_destroy_spice_session_channel_destroy (SpiceSession* _sender,
                                                                            SpiceChannel* channel,
                                                                            gpointer self);
const gchar* boxes_display_get_password (BoxesDisplay* self);
static void boxes_spice_display_real_disconnect_it (BoxesDisplay* base);
BoxesSpiceChannelHandler* boxes_spice_channel_handler_new (BoxesSpiceDisplay* display,
                                                           SpiceChannel* channel,
                                                           BoxesDisplayOpenFDFunc open_fd,
                                                           void* open_fd_target);
BoxesSpiceChannelHandler* boxes_spice_channel_handler_construct (GType object_type,
                                                                 BoxesSpiceDisplay* display,
                                                                 SpiceChannel* channel,
                                                                 BoxesDisplayOpenFDFunc open_fd,
                                                                 void* open_fd_target);
void boxes_display_access_start (BoxesDisplay* self);
void boxes_display_access_finish (BoxesDisplay* self);
static gboolean boxes_spice_display_add_shared_folder (BoxesSpiceDisplay* self,
                                                const gchar* path,
                                                const gchar* name);
static void boxes_spice_display_add_gsetting_shared_folder (BoxesSpiceDisplay* self,
                                                     const gchar* path,
                                                     const gchar* name);
static void boxes_spice_display_remove_shared_folder (BoxesSpiceDisplay* self,
                                               const gchar* name);
static void boxes_spice_display_remove_gsetting_shared_folder (BoxesSpiceDisplay* self,
                                                        const gchar* name);
static GHashTable* boxes_spice_display_get_shared_folders (BoxesSpiceDisplay* self);
static void _g_free0_ (gpointer var);
GType boxes_machine_connect_flags_get_type (void) G_GNUC_CONST;
static GHashTable* boxes_spice_display_parse_shared_folders (BoxesSpiceDisplay* self);
static void boxes_spice_display_main_event (BoxesSpiceDisplay* self,
                                     SpiceChannelEvent event);
void boxes_display_set_need_password (BoxesDisplay* self,
                                      gboolean value);
static void boxes_spice_display_real_transfer_files (BoxesDisplay* base,
                                              GList* uris);
static void _vala_array_add10 (GFile** * array,
                        int* length,
                        int* size,
                        GFile* value);
static void _vala_array_add11 (GFile** * array,
                        int* length,
                        int* size,
                        GFile* value);
static void boxes_spice_display_on_new_file_transfer (BoxesSpiceDisplay* self,
                                               SpiceMainChannel* main_channel,
                                               GObject* transfer_task);
GType boxes_display_page_get_type (void) G_GNUC_CONST;
GType boxes_app_window_get_type (void) G_GNUC_CONST;
BoxesAppWindow* boxes_machine_get_window (BoxesMachine* self);
GType boxes_wizard_window_get_type (void) G_GNUC_CONST;
GType boxes_properties_window_get_type (void) G_GNUC_CONST;
GType boxes_searchbar_get_type (void) G_GNUC_CONST;
GType boxes_topbar_get_type (void) G_GNUC_CONST;
GType boxes_selectionbar_get_type (void) G_GNUC_CONST;
GType boxes_empty_boxes_get_type (void) G_GNUC_CONST;
GType boxes_troubleshoot_view_get_type (void) G_GNUC_CONST;
void boxes_display_page_add_transfer (BoxesDisplayPage* self,
                                      GObject* transfer_task);
static GList* boxes_spice_display_real_get_properties (BoxesDisplay* base,
                                                BoxesPropertiesPage page);
BoxesProperty* boxes_iproperties_provider_add_property (BoxesIPropertiesProvider* self,
                                                        GList* * list,
                                                        const gchar* name,
                                                        GtkWidget* widget,
                                                        GtkWidget* extra_widget);
static Block75Data* block75_data_ref (Block75Data* _data75_);
static void block75_data_unref (void * _userdata_);
static Block76Data* block76_data_ref (Block76Data* _data76_);
static void block76_data_unref (void * _userdata_);
static gint ___lambda1__gcompare_data_func (gconstpointer a,
                                     gconstpointer b,
                                     gpointer self);
static gint _____lambda87_ (SpiceUsbDevice* a,
                     SpiceUsbDevice* b);
static gint ______lambda87__gcompare_func (gconstpointer a,
                                    gconstpointer b);
static GtkFrame* boxes_spice_display_create_usb_frame (BoxesSpiceDisplay* self,
                                                SpiceUsbDeviceManager* manager,
                                                GPtrArray* devs);
static void _____lambda90_ (Block75Data* _data75_,
                     SpiceUsbDeviceManager* manager,
                     SpiceUsbDevice* dev);
static void ______lambda90__spice_usb_device_manager_device_added (SpiceUsbDeviceManager* _sender,
                                                            SpiceUsbDevice* device,
                                                            gpointer self);
static void _____lambda91_ (Block75Data* _data75_,
                     SpiceUsbDeviceManager* manager,
                     SpiceUsbDevice* dev);
static void ______lambda91__spice_usb_device_manager_device_removed (SpiceUsbDeviceManager* _sender,
                                                              SpiceUsbDevice* device,
                                                              gpointer self);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static GtkFrame* boxes_spice_display_create_shared_folders_frame (BoxesSpiceDisplay* self);
static void boxes_spice_display_real_send_keys (BoxesDisplay* base,
                                         guint* keyvals,
                                         int keyvals_length1);
static void __vala_SpiceUsbDevice_free0_ (gpointer var);
static gboolean boxes_spice_display_is_usb_kbd_or_mouse (BoxesSpiceDisplay* self,
                                                  guint8 class,
                                                  guint8 subclass,
                                                  guint8 protocol);
static Block77Data* block77_data_ref (Block77Data* _data77_);
static void block77_data_unref (void * _userdata_);
static Block78Data* block78_data_ref (Block78Data* _data78_);
static void block78_data_unref (void * _userdata_);
static void _____lambda88_ (Block78Data* _data78_);
static void ___lambda89_ (Block78Data* _data78_,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda89__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ______lambda88__g_object_notify (GObject* _sender,
                                      GParamSpec* pspec,
                                      gpointer self);
GType boxes_shared_folder_popover_get_type (void) G_GNUC_CONST;
static Block79Data* block79_data_ref (Block79Data* _data79_);
static void block79_data_unref (void * _userdata_);
BoxesSharedFolderPopover* boxes_shared_folder_popover_new (void);
BoxesSharedFolderPopover* boxes_shared_folder_popover_construct (GType object_type);
static void __lambda92_ (Block79Data* _data79_);
static void ___lambda92__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda93_ (Block79Data* _data79_,
                  GtkListBoxRow* row);
GType boxes_shared_folder_row_get_type (void) G_GNUC_CONST;
const gchar* boxes_shared_folder_row_get_folder_path (BoxesSharedFolderRow* self);
const gchar* boxes_shared_folder_row_get_folder_name (BoxesSharedFolderRow* self);
static void ___lambda93__gtk_list_box_row_activated (GtkListBox* _sender,
                                              GtkListBoxRow* row,
                                              gpointer self);
static void boxes_spice_display_add_listbox_row (BoxesSpiceDisplay* self,
                                          GtkListBox* listbox,
                                          const gchar* path,
                                          const gchar* name,
                                          gint target_position);
static void __lambda95_ (Block79Data* _data79_,
                  const gchar* path,
                  const gchar* name,
                  gint target_position);
static void ___lambda95__boxes_shared_folder_popover_saved (BoxesSharedFolderPopover* _sender,
                                                     const gchar* local_folder,
                                                     const gchar* name,
                                                     gint target_position,
                                                     gpointer self);
static Block80Data* block80_data_ref (Block80Data* _data80_);
static void block80_data_unref (void * _userdata_);
BoxesSharedFolderRow* boxes_shared_folder_row_new (const gchar* path,
                                                   const gchar* name);
BoxesSharedFolderRow* boxes_shared_folder_row_construct (GType object_type,
                                                         const gchar* path,
                                                         const gchar* name);
static void __lambda94_ (Block80Data* _data80_);
static void ___lambda94__boxes_shared_folder_row_removed (BoxesSharedFolderRow* _sender,
                                                   gpointer self);
GByteArray* boxes_spice_display_get_ca_cert (BoxesSpiceDisplay* self);
void boxes_spice_display_set_ca_cert (BoxesSpiceDisplay* self,
                                      GByteArray* value);
static void _boxes_spice_display_main_event_spice_channel_channel_event (SpiceChannel* _sender,
                                                                  SpiceChannelEvent event,
                                                                  gpointer self);
static void _boxes_spice_display_main_channel___lambda77_ (BoxesSpiceDisplay* self);
void boxes_display_set_can_grab_mouse (BoxesDisplay* self,
                                       gboolean value);
static void __boxes_spice_display_main_channel___lambda77__g_object_notify (GObject* _sender,
                                                                     GParamSpec* pspec,
                                                                     gpointer self);
static void _boxes_spice_display_on_new_file_transfer_spice_main_channel_new_file_transfer (SpiceMainChannel* _sender,
                                                                                     GObject* task,
                                                                                     gpointer self);
static GObject * boxes_spice_display_constructor (GType type,
                                           guint n_construct_properties,
                                           GObjectConstructParam * construct_properties);
static void _boxes_spice_display____lambda96_ (BoxesSpiceDisplay* self,
                                        SpiceUsbDevice* dev,
                                        GError* err);
static void __boxes_spice_display____lambda96__spice_usb_device_manager_device_error (SpiceUsbDeviceManager* _sender,
                                                                               SpiceUsbDevice* device,
                                                                               GError* _error_,
                                                                               gpointer self);
static void boxes_spice_display_finalize (GObject * obj);
const gchar* boxes_display_get_protocol (BoxesDisplay* self);
gboolean boxes_display_get_can_transfer_files (BoxesDisplay* self);
static void _vala_boxes_spice_display_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec);
static void _vala_boxes_spice_display_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec);
#define BOXES_SPICE_CHANNEL_HANDLER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_SPICE_CHANNEL_HANDLER, BoxesSpiceChannelHandlerPrivate))
static void boxes_spice_channel_handler_on_open_fd (BoxesSpiceChannelHandler* self,
                                             SpiceChannel* channel,
                                             gint with_tls);
static void _boxes_spice_channel_handler_on_open_fd_spice_channel_open_fd (SpiceChannel* _sender,
                                                                    gint with_tls,
                                                                    gpointer self);
static void boxes_spice_channel_handler_on_display_ready (BoxesSpiceChannelHandler* self,
                                                   GObject* object,
                                                   GParamSpec* param_spec);
static void _boxes_spice_channel_handler_on_display_ready_g_object_notify (GObject* _sender,
                                                                    GParamSpec* pspec,
                                                                    gpointer self);
static void boxes_spice_channel_handler_finalize (GObject * obj);
void spice_validate_uri (const gchar* uri_as_text,
                         gint** port,
                         gint** tls_port,
                         GError** error);
static gint* _int_dup (gint* self);
#define BOXES_SHARED_FOLDER_ROW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_SHARED_FOLDER_ROW, BoxesSharedFolderRowPrivate))
void boxes_shared_folder_row_set_folder_path (BoxesSharedFolderRow* self,
                                              const gchar* value);
void boxes_shared_folder_row_set_folder_name (BoxesSharedFolderRow* self,
                                              const gchar* value);
static void boxes_shared_folder_row_on_delete_button_clicked (BoxesSharedFolderRow* self);
static void _boxes_shared_folder_row_on_delete_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                           gpointer self);
static void boxes_shared_folder_row_finalize (GObject * obj);
static void _vala_boxes_shared_folder_row_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec);
static void _vala_boxes_shared_folder_row_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gint array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gint array_length,
                       GDestroyNotify destroy_func);


static void
_vala_BoxesBoxConfigSavedProperty_array_free (BoxesBoxConfigSavedProperty * array,
                                              gint array_length)
{
#line 26 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (array != NULL) {
#line 869 "spice-display.c"
		int i;
#line 26 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		for (i = 0; i < array_length; i = i + 1) {
#line 26 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			boxes_box_config_saved_property_destroy (&array[i]);
#line 875 "spice-display.c"
		}
	}
#line 26 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_free (array);
#line 880 "spice-display.c"
}


static void
boxes_spice_display_ui_state_changed (BoxesSpiceDisplay* self)
{
	BoxesMachine* _tmp0_;
	BoxesUIState _tmp1_;
	BoxesUIState _tmp2_;
#line 37 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 39 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->machine;
#line 39 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = boxes_ui_get_ui_state ((BoxesUI*) _tmp0_);
#line 39 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = _tmp1_;
#line 39 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp2_ == BOXES_UI_STATE_DISPLAY) {
#line 900 "spice-display.c"
		SpiceDisplay* display = NULL;
		GtkWidget* _tmp3_;
		SpiceDisplay* _tmp4_;
		SpiceDisplay* _tmp5_;
#line 41 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp3_ = boxes_display_get_display ((BoxesDisplay*) self, 0);
#line 41 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp4_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, spice_display_get_type ()) ? ((SpiceDisplay*) _tmp3_) : NULL;
#line 41 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp4_ == NULL) {
#line 41 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_object_unref0 (_tmp3_);
#line 913 "spice-display.c"
		}
#line 41 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		display = _tmp4_;
#line 42 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = display;
#line 42 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_set (_tmp5_, "resize-guest", TRUE, NULL);
#line 39 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (display);
#line 923 "spice-display.c"
	}
}


static gchar*
boxes_spice_display_get_box_name (BoxesSpiceDisplay* self)
{
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	BoxesBoxConfig* _tmp1_;
	BoxesBoxConfig* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp6_;
#line 46 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 48 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = boxes_display_get_config ((BoxesDisplay*) self);
#line 48 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = _tmp1_;
#line 48 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = boxes_box_config_get_last_seen_name (_tmp2_);
#line 48 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = _tmp3_;
#line 48 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = _tmp4_;
#line 48 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp0_ == NULL) {
#line 952 "spice-display.c"
		gchar* _tmp5_;
#line 48 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = g_strdup (_ ("Unknown"));
#line 48 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_tmp0_);
#line 48 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp0_ = _tmp5_;
#line 960 "spice-display.c"
	}
#line 48 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = _tmp0_;
#line 48 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = NULL;
#line 48 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = _tmp6_;
#line 48 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (_tmp0_);
#line 48 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 972 "spice-display.c"
}


static gpointer
_g_object_ref0 (gpointer self)
{
#line 103 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return self ? g_object_ref (self) : NULL;
#line 981 "spice-display.c"
}


static void
boxes_spice_display_main_cleanup (BoxesSpiceDisplay* self)
{
	SpiceMainChannel* _tmp0_;
	SpiceMainChannel* _tmp1_;
	GObject* o = NULL;
	SpiceMainChannel* _tmp2_;
	SpiceMainChannel* _tmp3_;
	GObject* _tmp4_;
	GObject* _tmp5_;
	gulong _tmp6_;
	GObject* _tmp7_;
	gulong _tmp8_;
	GObject* _tmp9_;
	gulong _tmp10_;
#line 99 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 100 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = boxes_spice_display_get_main_channel (self);
#line 100 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = _tmp0_;
#line 100 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp1_ == NULL) {
#line 101 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return;
#line 1010 "spice-display.c"
	}
#line 103 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = boxes_spice_display_get_main_channel (self);
#line 103 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = _tmp2_;
#line 103 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, G_TYPE_OBJECT) ? ((GObject*) _tmp3_) : NULL);
#line 103 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	o = _tmp4_;
#line 104 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = o;
#line 104 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = self->priv->main_event_id;
#line 104 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_handler_disconnect (_tmp5_, _tmp6_);
#line 105 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->main_event_id = (gulong) 0;
#line 106 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = o;
#line 106 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = self->priv->main_mouse_mode_id;
#line 106 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_handler_disconnect (_tmp7_, _tmp8_);
#line 107 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->main_mouse_mode_id = (gulong) 0;
#line 108 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp9_ = o;
#line 108 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp10_ = self->priv->new_file_transfer_id;
#line 108 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_handler_disconnect (_tmp9_, _tmp10_);
#line 109 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->new_file_transfer_id = (gulong) 0;
#line 110 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_set_main_channel (self, NULL);
#line 99 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (o);
#line 1048 "spice-display.c"
}


static void
_boxes_spice_display_ui_state_changed_g_object_notify (GObject* _sender,
                                                       GParamSpec* pspec,
                                                       gpointer self)
{
#line 120 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_ui_state_changed ((BoxesSpiceDisplay*) self);
#line 1059 "spice-display.c"
}


BoxesSpiceDisplay*
boxes_spice_display_construct (GType object_type,
                               BoxesMachine* machine,
                               BoxesBoxConfig* config,
                               const gchar* host,
                               gint port,
                               gint tls_port,
                               const gchar* host_subject)
{
	BoxesSpiceDisplay * self = NULL;
	SpiceSession* _tmp0_;
	SpiceGtkSession* _tmp10_;
	BoxesBoxConfigSavedProperty* _tmp11_;
	gint _tmp11__length1;
#line 117 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (machine != NULL, NULL);
#line 117 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (config != NULL, NULL);
#line 117 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (host != NULL, NULL);
#line 117 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_vala_return_val_if_fail ((port != 0) || (tls_port != 0), "port != 0 || tls_port != 0", NULL);
#line 117 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) boxes_display_construct (object_type);
#line 119 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->machine = machine;
#line 120 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_connect_object ((GObject*) machine, "notify::ui-state", (GCallback) _boxes_spice_display_ui_state_changed_g_object_notify, self, 0);
#line 122 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_set_config ((BoxesDisplay*) self, config);
#line 124 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->session;
#line 124 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_set (_tmp0_, "host", host, NULL);
#line 125 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (port != 0) {
#line 1099 "spice-display.c"
		SpiceSession* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
#line 126 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp1_ = self->priv->session;
#line 126 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp2_ = g_strdup_printf ("%i", port);
#line 126 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp3_ = _tmp2_;
#line 126 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_set (_tmp1_, "port", _tmp3_, NULL);
#line 126 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_tmp3_);
#line 1113 "spice-display.c"
	}
#line 128 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (tls_port != 0) {
#line 1117 "spice-display.c"
		SpiceSession* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
#line 129 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp4_ = self->priv->session;
#line 129 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = g_strdup_printf ("%i", tls_port);
#line 129 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp6_ = _tmp5_;
#line 129 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_set (_tmp4_, "tls-port", _tmp6_, NULL);
#line 129 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_tmp6_);
#line 1131 "spice-display.c"
	}
#line 135 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (host_subject != NULL) {
#line 1135 "spice-display.c"
		SpiceSession* _tmp7_;
#line 136 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp7_ = self->priv->session;
#line 136 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_set (_tmp7_, "cert-subject", host_subject, NULL);
#line 1141 "spice-display.c"
	} else {
		SpiceSession* _tmp8_;
		const gchar* _tmp9_;
#line 138 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp8_ = self->priv->session;
#line 138 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp9_ = g_getenv ("BOXES_SPICE_HOST_SUBJECT");
#line 138 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_set (_tmp8_, "cert-subject", _tmp9_, NULL);
#line 1151 "spice-display.c"
	}
#line 140 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp10_ = self->priv->gtk_session;
#line 140 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp11_ = self->priv->gtk_session_saved_properties;
#line 140 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp11__length1 = self->priv->gtk_session_saved_properties_length1;
#line 140 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_box_config_save_properties (config, (GObject*) _tmp10_, _tmp11_, _tmp11__length1);
#line 142 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_init_shared_folders (self);
#line 117 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return self;
#line 1165 "spice-display.c"
}


BoxesSpiceDisplay*
boxes_spice_display_new (BoxesMachine* machine,
                         BoxesBoxConfig* config,
                         const gchar* host,
                         gint port,
                         gint tls_port,
                         const gchar* host_subject)
{
#line 117 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return boxes_spice_display_construct (BOXES_TYPE_SPICE_DISPLAY, machine, config, host, port, tls_port, host_subject);
#line 1179 "spice-display.c"
}


BoxesSpiceDisplay*
boxes_spice_display_construct_with_uri (GType object_type,
                                        BoxesMachine* machine,
                                        BoxesBoxConfig* config,
                                        const gchar* uri)
{
	BoxesSpiceDisplay * self = NULL;
	SpiceSession* _tmp0_;
	SpiceGtkSession* _tmp1_;
	BoxesBoxConfigSavedProperty* _tmp2_;
	gint _tmp2__length1;
#line 145 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (machine != NULL, NULL);
#line 145 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (config != NULL, NULL);
#line 145 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (uri != NULL, NULL);
#line 145 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) boxes_display_construct (object_type);
#line 146 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->machine = machine;
#line 147 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_connect_object ((GObject*) machine, "notify::ui-state", (GCallback) _boxes_spice_display_ui_state_changed_g_object_notify, self, 0);
#line 149 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_set_config ((BoxesDisplay*) self, config);
#line 151 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->session;
#line 151 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_set (_tmp0_, "uri", uri, NULL);
#line 153 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = self->priv->gtk_session;
#line 153 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = self->priv->gtk_session_saved_properties;
#line 153 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2__length1 = self->priv->gtk_session_saved_properties_length1;
#line 153 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_box_config_save_properties (config, (GObject*) _tmp1_, _tmp2_, _tmp2__length1);
#line 155 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_init_shared_folders (self);
#line 145 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return self;
#line 1224 "spice-display.c"
}


BoxesSpiceDisplay*
boxes_spice_display_new_with_uri (BoxesMachine* machine,
                                  BoxesBoxConfig* config,
                                  const gchar* uri)
{
#line 145 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return boxes_spice_display_construct_with_uri (BOXES_TYPE_SPICE_DISPLAY, machine, config, uri);
#line 1235 "spice-display.c"
}


BoxesSpiceDisplay*
boxes_spice_display_construct_priv (GType object_type,
                                    BoxesMachine* machine,
                                    BoxesBoxConfig* config)
{
	BoxesSpiceDisplay * self = NULL;
	SpiceGtkSession* _tmp0_;
	BoxesBoxConfigSavedProperty* _tmp1_;
	gint _tmp1__length1;
#line 158 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (machine != NULL, NULL);
#line 158 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (config != NULL, NULL);
#line 158 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) boxes_display_construct (object_type);
#line 159 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->machine = machine;
#line 160 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_connect_object ((GObject*) machine, "notify::ui-state", (GCallback) _boxes_spice_display_ui_state_changed_g_object_notify, self, 0);
#line 162 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_set_config ((BoxesDisplay*) self, config);
#line 164 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->gtk_session;
#line 164 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = self->priv->gtk_session_saved_properties;
#line 164 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1__length1 = self->priv->gtk_session_saved_properties_length1;
#line 164 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_box_config_save_properties (config, (GObject*) _tmp0_, _tmp1_, _tmp1__length1);
#line 166 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_init_shared_folders (self);
#line 158 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return self;
#line 1272 "spice-display.c"
}


BoxesSpiceDisplay*
boxes_spice_display_new_priv (BoxesMachine* machine,
                              BoxesBoxConfig* config)
{
#line 158 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return boxes_spice_display_construct_priv (BOXES_TYPE_SPICE_DISPLAY, machine, config);
#line 1282 "spice-display.c"
}


static void
___lambda85_ (BoxesSpiceDisplay* self,
              gint status)
{
#line 176 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_set_mouse_grabbed ((BoxesDisplay*) self, status != 0);
#line 1292 "spice-display.c"
}


static void
____lambda85__spice_display_mouse_grab (SpiceDisplay* _sender,
                                        gint status,
                                        gpointer self)
{
#line 175 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	___lambda85_ ((BoxesSpiceDisplay*) self, status);
#line 1303 "spice-display.c"
}


static void
___lambda86_ (BoxesSpiceDisplay* self,
              gint status)
{
#line 179 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_set_keyboard_grabbed ((BoxesDisplay*) self, status != 0);
#line 1313 "spice-display.c"
}


static void
____lambda86__spice_display_keyboard_grab (SpiceDisplay* _sender,
                                           gint status,
                                           gpointer self)
{
#line 178 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	___lambda86_ ((BoxesSpiceDisplay*) self, status);
#line 1324 "spice-display.c"
}


static GtkWidget*
boxes_spice_display_real_get_display (BoxesDisplay* base,
                                      gint n)
{
	BoxesSpiceDisplay * self;
	GtkWidget* result = NULL;
	SpiceDisplay* display = NULL;
	GHashTable* _tmp0_;
	gconstpointer _tmp1_;
	GtkWidget* _tmp2_;
	SpiceDisplay* _tmp3_;
	SpiceDisplay* _tmp4_;
#line 169 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 170 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = ((BoxesDisplay*) self)->displays;
#line 170 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = g_hash_table_lookup (_tmp0_, (gpointer) ((gintptr) n));
#line 170 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = (GtkWidget*) _tmp1_;
#line 170 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, spice_display_get_type ()) ? ((SpiceDisplay*) _tmp2_) : NULL);
#line 170 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	display = _tmp3_;
#line 172 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = display;
#line 172 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp4_ == NULL) {
#line 1356 "spice-display.c"
		SpiceSession* _tmp5_;
		SpiceDisplay* _tmp6_;
		SpiceDisplay* _tmp7_;
		SpiceDisplay* _tmp8_;
		BoxesBoxConfig* _tmp9_;
		BoxesBoxConfig* _tmp10_;
		BoxesBoxConfigSavedProperty* _tmp11_;
		gint _tmp11__length1;
		SpiceDisplay* _tmp12_;
		GHashTable* _tmp13_;
		SpiceDisplay* _tmp14_;
		GtkWidget* _tmp15_;
#line 173 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = self->priv->session;
#line 173 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp6_ = spice_display_new (_tmp5_, n);
#line 173 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_ref_sink (_tmp6_);
#line 173 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (display);
#line 173 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		display = _tmp6_;
#line 175 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp7_ = display;
#line 175 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_connect_object (_tmp7_, "mouse-grab", (GCallback) ____lambda85__spice_display_mouse_grab, self, 0);
#line 178 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp8_ = display;
#line 178 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_connect_object (_tmp8_, "keyboard-grab", (GCallback) ____lambda86__spice_display_keyboard_grab, self, 0);
#line 181 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp9_ = boxes_display_get_config ((BoxesDisplay*) self);
#line 181 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp10_ = _tmp9_;
#line 181 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp11_ = self->priv->display_saved_properties;
#line 181 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp11__length1 = self->priv->display_saved_properties_length1;
#line 181 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		boxes_box_config_save_properties (_tmp10_, (GObject*) self, _tmp11_, _tmp11__length1);
#line 182 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp12_ = display;
#line 182 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_set (_tmp12_, "scaling", TRUE, NULL);
#line 184 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp13_ = ((BoxesDisplay*) self)->displays;
#line 184 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp14_ = display;
#line 184 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp15_ = _g_object_ref0 ((GtkWidget*) _tmp14_);
#line 184 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_hash_table_replace (_tmp13_, (gpointer) ((gintptr) n), _tmp15_);
#line 1409 "spice-display.c"
	}
#line 187 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = (GtkWidget*) display;
#line 187 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 1415 "spice-display.c"
}


static gint
g_ptr_array_get_length (GPtrArray* self)
{
	gint result;
	guint _tmp0_;
#line 4999 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, 0);
#line 4999 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	_tmp0_ = self->len;
#line 4999 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	result = (gint) _tmp0_;
#line 4999 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	return result;
#line 1432 "spice-display.c"
}


static void
g_ptr_array_set_length (GPtrArray* self,
                        gint value)
{
#line 5000 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	g_return_if_fail (self != NULL);
#line 5000 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	g_ptr_array_set_size (self, value);
#line 1444 "spice-display.c"
}


static gboolean
boxes_spice_display_real_should_keep_alive (BoxesDisplay* base)
{
	BoxesSpiceDisplay * self;
	gboolean result = FALSE;
	gboolean _tmp9_ = FALSE;
	GError * _inner_error_ = NULL;
#line 190 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 1457 "spice-display.c"
	{
		SpiceUsbDeviceManager* manager = NULL;
		SpiceSession* _tmp0_;
		SpiceUsbDeviceManager* _tmp1_;
		SpiceUsbDeviceManager* _tmp2_;
		GPtrArray* devs = NULL;
		GPtrArray* _tmp3_;
		gboolean _tmp4_ = FALSE;
		gboolean _tmp5_;
#line 192 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp0_ = self->priv->session;
#line 192 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp1_ = spice_usb_device_manager_get (_tmp0_, &_inner_error_);
#line 192 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp2_ = _g_object_ref0 (_tmp1_);
#line 192 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		manager = _tmp2_;
#line 192 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1477 "spice-display.c"
			goto __catch79_g_error;
		}
#line 193 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp3_ = boxes_spice_display_get_usb_devices (self, manager);
#line 193 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		devs = _tmp3_;
#line 195 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = self->priv->closed;
#line 195 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (!_tmp5_) {
#line 1488 "spice-display.c"
			GPtrArray* _tmp6_;
			gint _tmp7_;
			gint _tmp8_;
#line 195 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp6_ = devs;
#line 195 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp7_ = g_ptr_array_get_length (_tmp6_);
#line 195 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp8_ = _tmp7_;
#line 195 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp4_ = _tmp8_ > 0;
#line 1500 "spice-display.c"
		} else {
#line 195 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp4_ = FALSE;
#line 1504 "spice-display.c"
		}
#line 195 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		result = _tmp4_;
#line 195 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_ptr_array_unref0 (devs);
#line 195 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (manager);
#line 195 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return result;
#line 1514 "spice-display.c"
	}
	goto __finally79;
	__catch79_g_error:
	{
		GError* _error_ = NULL;
#line 191 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_error_ = _inner_error_;
#line 191 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_inner_error_ = NULL;
#line 197 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		result = FALSE;
#line 197 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_error_free0 (_error_);
#line 197 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return result;
#line 1530 "spice-display.c"
	}
	__finally79:
#line 191 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	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);
#line 191 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_clear_error (&_inner_error_);
#line 191 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return _tmp9_;
#line 1539 "spice-display.c"
}


static void
boxes_spice_display_real_set_enable_audio (BoxesDisplay* base,
                                           gboolean enable)
{
	BoxesSpiceDisplay * self;
	SpiceSession* _tmp0_;
#line 201 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 202 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->session;
#line 202 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_set (_tmp0_, "enable-audio", enable, NULL);
#line 1555 "spice-display.c"
}


static GdkPixbuf*
boxes_spice_display_real_get_pixbuf (BoxesDisplay* base,
                                     gint n,
                                     GError** error)
{
	BoxesSpiceDisplay * self;
	GdkPixbuf* result = NULL;
	SpiceDisplay* display = NULL;
	GtkWidget* _tmp0_;
	SpiceDisplay* _tmp1_;
	SpiceDisplay* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	SpiceDisplay* _tmp5_;
	GdkPixbuf* _tmp6_;
#line 205 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = boxes_display_get_display ((BoxesDisplay*) self, n);
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, spice_display_get_type ()) ? ((SpiceDisplay*) _tmp0_) : NULL;
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp1_ == NULL) {
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (_tmp0_);
#line 1584 "spice-display.c"
	}
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	display = _tmp1_;
#line 208 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = display;
#line 208 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_get (_tmp2_, "ready", &_tmp3_, NULL);
#line 208 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = _tmp3_;
#line 208 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (!_tmp4_) {
#line 209 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		result = NULL;
#line 209 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (display);
#line 209 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return result;
#line 1602 "spice-display.c"
	}
#line 211 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = display;
#line 211 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = spice_display_get_pixbuf (_tmp5_);
#line 211 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = _tmp6_;
#line 211 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (display);
#line 211 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 1614 "spice-display.c"
}


static SpiceUsbDevice*
_vala_SpiceUsbDevice_copy (SpiceUsbDevice* self)
{
#line 229 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return g_boxed_copy (spice_usb_device_get_type (), self);
#line 1623 "spice-display.c"
}


static gpointer
__vala_SpiceUsbDevice_copy0 (gpointer self)
{
#line 229 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return self ? _vala_SpiceUsbDevice_copy (self) : NULL;
#line 1632 "spice-display.c"
}


static void
_vala_SpiceUsbDevice_free (SpiceUsbDevice* self)
{
#line 228 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_boxed_free (spice_usb_device_get_type (), self);
#line 1641 "spice-display.c"
}


static void
boxes_spice_display_real_collect_logs (BoxesDisplay* base,
                                       GString* builder)
{
	BoxesSpiceDisplay * self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	SpiceGtkSession* _tmp3_;
	SpiceMainChannel* _tmp8_;
	SpiceMainChannel* _tmp9_;
	GError * _inner_error_ = NULL;
#line 214 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 214 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (builder != NULL);
#line 215 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = boxes_display_get_uri ((BoxesDisplay*) self);
#line 215 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = _tmp0_;
#line 215 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = _tmp1_;
#line 215 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_string_append_printf (builder, "URL: %s\n", _tmp2_);
#line 215 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (_tmp2_);
#line 216 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = self->priv->gtk_session;
#line 216 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp3_ != NULL) {
#line 1675 "spice-display.c"
		const gchar* _tmp4_ = NULL;
		SpiceGtkSession* _tmp5_;
		gboolean _tmp6_;
		gboolean _tmp7_;
#line 217 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = self->priv->gtk_session;
#line 217 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_get (_tmp5_, "auto-clipboard", &_tmp6_, NULL);
#line 217 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp7_ = _tmp6_;
#line 217 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp7_) {
#line 217 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp4_ = "yes";
#line 1690 "spice-display.c"
		} else {
#line 217 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp4_ = "no";
#line 1694 "spice-display.c"
		}
#line 217 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_string_append_printf (builder, "Auto clipboard sync: %s\n", _tmp4_);
#line 1698 "spice-display.c"
	}
#line 219 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = boxes_spice_display_get_main_channel (self);
#line 219 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp9_ = _tmp8_;
#line 219 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp9_ != NULL) {
#line 1706 "spice-display.c"
		const gchar* _tmp10_;
		const gchar* _tmp11_ = NULL;
		SpiceMainChannel* _tmp12_;
		SpiceMainChannel* _tmp13_;
		gint _tmp14_;
		gint _tmp15_;
		const gchar* _tmp16_ = NULL;
		SpiceMainChannel* _tmp17_;
		SpiceMainChannel* _tmp18_;
		gboolean _tmp19_;
		gboolean _tmp20_;
#line 220 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp10_ = spice_util_get_version_string ();
#line 220 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_string_append_printf (builder, "Spice-gtk version %s\n", _tmp10_);
#line 221 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp12_ = boxes_spice_display_get_main_channel (self);
#line 221 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp13_ = _tmp12_;
#line 221 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_get (_tmp13_, "mouse-mode", &_tmp14_, NULL);
#line 221 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp15_ = _tmp14_;
#line 221 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp15_ == 1) {
#line 221 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp11_ = "server";
#line 1734 "spice-display.c"
		} else {
#line 221 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp11_ = "client";
#line 1738 "spice-display.c"
		}
#line 221 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_string_append_printf (builder, "Mouse mode: %s\n", _tmp11_);
#line 222 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp17_ = boxes_spice_display_get_main_channel (self);
#line 222 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp18_ = _tmp17_;
#line 222 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_get (_tmp18_, "agent-connected", &_tmp19_, NULL);
#line 222 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp20_ = _tmp19_;
#line 222 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp20_) {
#line 222 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp16_ = "connected";
#line 1754 "spice-display.c"
		} else {
#line 222 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp16_ = "disconnected";
#line 1758 "spice-display.c"
		}
#line 222 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_string_append_printf (builder, "Agent: %s\n", _tmp16_);
#line 1762 "spice-display.c"
	}
	{
		SpiceUsbDeviceManager* manager = NULL;
		SpiceSession* _tmp21_;
		SpiceUsbDeviceManager* _tmp22_;
		SpiceUsbDeviceManager* _tmp23_;
		GPtrArray* devs = NULL;
		SpiceUsbDeviceManager* _tmp24_;
		GPtrArray* _tmp25_;
#line 226 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp21_ = self->priv->session;
#line 226 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp22_ = spice_usb_device_manager_get (_tmp21_, &_inner_error_);
#line 226 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp23_ = _g_object_ref0 (_tmp22_);
#line 226 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		manager = _tmp23_;
#line 226 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1782 "spice-display.c"
			goto __catch80_g_error;
		}
#line 227 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp24_ = manager;
#line 227 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp25_ = spice_usb_device_manager_get_devices (_tmp24_);
#line 227 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		devs = _tmp25_;
#line 1791 "spice-display.c"
		{
			gint i = 0;
#line 228 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			i = 0;
#line 1796 "spice-display.c"
			{
				gboolean _tmp26_ = FALSE;
#line 228 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp26_ = TRUE;
#line 228 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				while (TRUE) {
#line 1803 "spice-display.c"
					gint _tmp28_;
					GPtrArray* _tmp29_;
					gint _tmp30_;
					gint _tmp31_;
					SpiceUsbDevice* dev = NULL;
					GPtrArray* _tmp32_;
					gint _tmp33_;
					gconstpointer _tmp34_;
					SpiceUsbDevice* _tmp35_;
					SpiceUsbDeviceManager* _tmp36_;
					SpiceUsbDevice* _tmp37_;
#line 228 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					if (!_tmp26_) {
#line 1817 "spice-display.c"
						gint _tmp27_;
#line 228 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_tmp27_ = i;
#line 228 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						i = _tmp27_ + 1;
#line 1823 "spice-display.c"
					}
#line 228 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp26_ = FALSE;
#line 228 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp28_ = i;
#line 228 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp29_ = devs;
#line 228 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp30_ = g_ptr_array_get_length (_tmp29_);
#line 228 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp31_ = _tmp30_;
#line 228 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					if (!(_tmp28_ < _tmp31_)) {
#line 228 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						break;
#line 1839 "spice-display.c"
					}
#line 229 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp32_ = devs;
#line 229 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp33_ = i;
#line 229 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp34_ = g_ptr_array_index (_tmp32_, (guint) _tmp33_);
#line 229 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp35_ = __vala_SpiceUsbDevice_copy0 ((SpiceUsbDevice*) _tmp34_);
#line 229 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					dev = _tmp35_;
#line 230 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp36_ = manager;
#line 230 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp37_ = dev;
#line 230 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					if (spice_usb_device_manager_is_device_connected (_tmp36_, _tmp37_)) {
#line 1857 "spice-display.c"
						SpiceUsbDevice* _tmp38_;
						gchar* _tmp39_;
						gchar* _tmp40_;
#line 231 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_tmp38_ = dev;
#line 231 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_tmp39_ = spice_usb_device_get_description (_tmp38_, "%s %s %s at %d-%d");
#line 231 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_tmp40_ = _tmp39_;
#line 231 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						g_string_append_printf (builder, "USB device redirected: %s\n", _tmp40_);
#line 231 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_g_free0 (_tmp40_);
#line 1871 "spice-display.c"
					}
#line 228 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					__vala_SpiceUsbDevice_free0 (dev);
#line 1875 "spice-display.c"
				}
			}
		}
#line 225 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_ptr_array_unref0 (devs);
#line 225 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (manager);
#line 1883 "spice-display.c"
	}
	goto __finally80;
	__catch80_g_error:
	{
		GError* _error_ = NULL;
#line 225 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_error_ = _inner_error_;
#line 225 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_inner_error_ = NULL;
#line 225 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_error_free0 (_error_);
#line 1895 "spice-display.c"
	}
	__finally80:
#line 225 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 225 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		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);
#line 225 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_clear_error (&_inner_error_);
#line 225 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return;
#line 1906 "spice-display.c"
	}
}


static void
_g_object_unref0_ (gpointer var)
{
#line 245 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 1916 "spice-display.c"
}


static void
_boxes_spice_display_on_channel_new_spice_session_channel_new (SpiceSession* _sender,
                                                               SpiceChannel* channel,
                                                               gpointer self)
{
#line 249 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_on_channel_new ((BoxesSpiceDisplay*) self, _sender, channel);
#line 1927 "spice-display.c"
}


static void
_boxes_spice_display_on_channel_destroy_spice_session_channel_destroy (SpiceSession* _sender,
                                                                       SpiceChannel* channel,
                                                                       gpointer self)
{
#line 251 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_on_channel_destroy ((BoxesSpiceDisplay*) self, _sender, channel);
#line 1938 "spice-display.c"
}


static void
boxes_spice_display_real_connect_it (BoxesDisplay* base,
                                     BoxesDisplayOpenFDFunc open_fd,
                                     void* open_fd_target,
                                     GDestroyNotify open_fd_target_destroy_notify,
                                     GError** error)
{
	BoxesSpiceDisplay * self;
	gboolean _tmp0_;
	BoxesDisplayOpenFDFunc _tmp1_;
	void* _tmp1__target;
	GDestroyNotify _tmp1__target_destroy_notify;
	GHashFunc _tmp2_;
	GEqualFunc _tmp3_;
	GHashTable* _tmp4_;
	gulong _tmp5_;
	gulong _tmp8_;
	SpiceSession* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	BoxesDisplayOpenFDFunc _tmp14_;
	void* _tmp14__target;
#line 237 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 239 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = ((BoxesDisplay*) self)->connected;
#line 239 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp0_) {
#line 240 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		(open_fd_target_destroy_notify == NULL) ? NULL : (open_fd_target_destroy_notify (open_fd_target), NULL);
#line 240 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		open_fd = NULL;
#line 240 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		open_fd_target = NULL;
#line 240 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		open_fd_target_destroy_notify = NULL;
#line 240 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return;
#line 1980 "spice-display.c"
	}
#line 241 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	((BoxesDisplay*) self)->connected = TRUE;
#line 242 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = open_fd;
#line 242 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1__target = open_fd_target;
#line 242 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1__target_destroy_notify = open_fd_target_destroy_notify;
#line 242 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	open_fd = NULL;
#line 242 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	open_fd_target = NULL;
#line 242 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	open_fd_target_destroy_notify = NULL;
#line 242 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	(self->priv->open_fd_target_destroy_notify == NULL) ? NULL : (self->priv->open_fd_target_destroy_notify (self->priv->open_fd_target), NULL);
#line 242 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd = NULL;
#line 242 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target = NULL;
#line 242 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target_destroy_notify = NULL;
#line 242 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd = _tmp1_;
#line 242 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target = _tmp1__target;
#line 242 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target_destroy_notify = _tmp1__target_destroy_notify;
#line 244 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_main_cleanup (self);
#line 245 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = g_direct_hash;
#line 245 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = g_direct_equal;
#line 245 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = g_hash_table_new_full (_tmp2_, _tmp3_, _g_object_unref0_, _g_object_unref0_);
#line 245 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_hash_table_unref0 (self->priv->channel_handlers);
#line 245 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->channel_handlers = _tmp4_;
#line 248 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = self->priv->channel_new_id;
#line 248 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp5_ == ((gulong) 0)) {
#line 2026 "spice-display.c"
		SpiceSession* _tmp6_;
		gulong _tmp7_;
#line 249 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp6_ = self->priv->session;
#line 249 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp7_ = g_signal_connect_object (_tmp6_, "channel-new", (GCallback) _boxes_spice_display_on_channel_new_spice_session_channel_new, self, 0);
#line 249 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		self->priv->channel_new_id = _tmp7_;
#line 2035 "spice-display.c"
	}
#line 250 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = self->priv->channel_destroy_id;
#line 250 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp8_ == ((gulong) 0)) {
#line 2041 "spice-display.c"
		SpiceSession* _tmp9_;
		gulong _tmp10_;
#line 251 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp9_ = self->priv->session;
#line 251 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp10_ = g_signal_connect_object (_tmp9_, "channel-destroy", (GCallback) _boxes_spice_display_on_channel_destroy_spice_session_channel_destroy, self, 0);
#line 251 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		self->priv->channel_destroy_id = _tmp10_;
#line 2050 "spice-display.c"
	}
#line 253 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp11_ = self->priv->session;
#line 253 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp12_ = boxes_display_get_password ((BoxesDisplay*) self);
#line 253 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp13_ = _tmp12_;
#line 253 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_set (_tmp11_, "password", _tmp13_, NULL);
#line 254 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp14_ = self->priv->open_fd;
#line 254 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp14__target = self->priv->open_fd_target;
#line 254 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp14_ != NULL) {
#line 2066 "spice-display.c"
		SpiceSession* _tmp15_;
#line 255 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp15_ = self->priv->session;
#line 255 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		spice_session_open_fd (_tmp15_, -1);
#line 2072 "spice-display.c"
	} else {
		SpiceSession* _tmp16_;
#line 257 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp16_ = self->priv->session;
#line 257 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		spice_session_connect (_tmp16_);
#line 2079 "spice-display.c"
	}
#line 237 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	(open_fd_target_destroy_notify == NULL) ? NULL : (open_fd_target_destroy_notify (open_fd_target), NULL);
#line 237 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	open_fd = NULL;
#line 237 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	open_fd_target = NULL;
#line 237 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	open_fd_target_destroy_notify = NULL;
#line 2089 "spice-display.c"
}


static void
boxes_spice_display_real_disconnect_it (BoxesDisplay* base)
{
	BoxesSpiceDisplay * self;
	gulong _tmp0_;
	gulong _tmp3_;
	SpiceSession* _tmp6_;
	GHashTable* _tmp7_;
#line 260 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 261 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->channel_new_id;
#line 261 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp0_ > ((gulong) 0)) {
#line 2107 "spice-display.c"
		SpiceSession* _tmp1_;
		gulong _tmp2_;
#line 262 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp1_ = self->priv->session;
#line 262 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp2_ = self->priv->channel_new_id;
#line 262 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_handler_disconnect (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, G_TYPE_OBJECT) ? ((GObject*) _tmp1_) : NULL, _tmp2_);
#line 263 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		self->priv->channel_new_id = (gulong) 0;
#line 2118 "spice-display.c"
	}
#line 265 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = self->priv->channel_destroy_id;
#line 265 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp3_ > ((gulong) 0)) {
#line 2124 "spice-display.c"
		SpiceSession* _tmp4_;
		gulong _tmp5_;
#line 266 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp4_ = self->priv->session;
#line 266 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = self->priv->channel_destroy_id;
#line 266 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_handler_disconnect (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, G_TYPE_OBJECT) ? ((GObject*) _tmp4_) : NULL, _tmp5_);
#line 267 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		self->priv->channel_destroy_id = (gulong) 0;
#line 2135 "spice-display.c"
	}
#line 269 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = self->priv->session;
#line 269 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	spice_session_disconnect (_tmp6_);
#line 270 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_main_cleanup (self);
#line 271 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_hash_table_unref0 (self->priv->channel_handlers);
#line 271 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->channel_handlers = NULL;
#line 272 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	(self->priv->open_fd_target_destroy_notify == NULL) ? NULL : (self->priv->open_fd_target_destroy_notify (self->priv->open_fd_target), NULL);
#line 272 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd = NULL;
#line 272 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target = NULL;
#line 272 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target_destroy_notify = NULL;
#line 272 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd = NULL;
#line 272 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target = NULL;
#line 272 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target_destroy_notify = NULL;
#line 273 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = ((BoxesDisplay*) self)->displays;
#line 273 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_hash_table_remove_all (_tmp7_);
#line 2165 "spice-display.c"
}


static void
boxes_spice_display_on_channel_new (BoxesSpiceDisplay* self,
                                    SpiceSession* session,
                                    SpiceChannel* channel)
{
	BoxesSpiceChannelHandler* handler = NULL;
	BoxesDisplayOpenFDFunc _tmp0_;
	void* _tmp0__target;
	BoxesSpiceChannelHandler* _tmp1_;
	GHashTable* _tmp2_;
	SpiceChannel* _tmp3_;
	BoxesSpiceChannelHandler* _tmp4_;
	BoxesSpiceChannelHandler* _tmp5_;
#line 276 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 276 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (session != NULL);
#line 276 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (channel != NULL);
#line 277 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->open_fd;
#line 277 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0__target = self->priv->open_fd_target;
#line 277 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = boxes_spice_channel_handler_new (self, channel, _tmp0_, _tmp0__target);
#line 277 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	handler = _tmp1_;
#line 278 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = self->priv->channel_handlers;
#line 278 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = _g_object_ref0 (channel);
#line 278 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = handler;
#line 278 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = _g_object_ref0 (_tmp4_);
#line 278 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_hash_table_insert (_tmp2_, _tmp3_, _tmp5_);
#line 280 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (channel, spice_display_channel_get_type ())) {
#line 2208 "spice-display.c"
		gint _tmp6_;
		gint _tmp7_;
#line 281 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_get (channel, "channel-id", &_tmp6_, NULL);
#line 281 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp7_ = _tmp6_;
#line 281 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp7_ != 0) {
#line 282 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_object_unref0 (handler);
#line 282 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			return;
#line 2221 "spice-display.c"
		}
#line 284 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		boxes_display_access_start ((BoxesDisplay*) self);
#line 2225 "spice-display.c"
	}
#line 287 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (channel, spice_webdav_channel_get_type ())) {
#line 2229 "spice-display.c"
		SpicePortChannel* _tmp8_;
#line 288 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (channel, spice_port_channel_get_type ()) ? ((SpicePortChannel*) channel) : NULL);
#line 288 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (self->priv->webdav_channel);
#line 288 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		self->priv->webdav_channel = _tmp8_;
#line 2237 "spice-display.c"
	}
#line 276 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (handler);
#line 2241 "spice-display.c"
}


static void
boxes_spice_display_on_channel_destroy (BoxesSpiceDisplay* self,
                                        SpiceSession* session,
                                        SpiceChannel* channel)
{
	SpiceDisplayChannel* display = NULL;
	SpiceDisplayChannel* _tmp0_;
	SpiceDisplayChannel* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
#line 291 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 291 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (session != NULL);
#line 291 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (channel != NULL);
#line 292 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (!G_TYPE_CHECK_INSTANCE_TYPE (channel, spice_display_channel_get_type ())) {
#line 293 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return;
#line 2265 "spice-display.c"
	}
#line 295 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (channel, spice_display_channel_get_type ()) ? ((SpiceDisplayChannel*) channel) : NULL);
#line 295 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	display = _tmp0_;
#line 296 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = display;
#line 296 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_get ((SpiceChannel*) _tmp1_, "channel-id", &_tmp2_, NULL);
#line 296 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = _tmp2_;
#line 296 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_emit_by_name ((BoxesDisplay*) self, "hide", _tmp3_);
#line 297 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_access_finish ((BoxesDisplay*) self);
#line 291 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (display);
#line 2283 "spice-display.c"
}


static gboolean
boxes_spice_display_add_shared_folder (BoxesSpiceDisplay* self,
                                       const gchar* path,
                                       const gchar* name)
{
	gboolean result = FALSE;
	const gchar* _tmp0_;
	const gchar* _tmp2_;
	gchar* link_path = NULL;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gint ret = 0;
	const gchar* _tmp9_;
	gint _tmp10_;
#line 300 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 300 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (path != NULL, FALSE);
#line 300 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (name != NULL, FALSE);
#line 301 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->shared_folder;
#line 301 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (!g_file_test (_tmp0_, G_FILE_TEST_IS_DIR)) {
#line 2311 "spice-display.c"
		const gchar* _tmp1_;
#line 302 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp1_ = self->priv->shared_folder;
#line 302 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		unlink (_tmp1_);
#line 2317 "spice-display.c"
	}
#line 304 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = self->priv->shared_folder;
#line 304 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (!g_file_test (_tmp2_, G_FILE_TEST_EXISTS)) {
#line 2323 "spice-display.c"
		gint ret = 0;
		const gchar* _tmp3_;
		gint _tmp4_;
#line 305 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp3_ = self->priv->shared_folder;
#line 305 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		ret = mkdir (_tmp3_, (mode_t) 0755);
#line 307 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp4_ = ret;
#line 307 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp4_ == -1) {
#line 2335 "spice-display.c"
			gint _tmp5_;
			const gchar* _tmp6_;
#line 308 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp5_ = errno;
#line 308 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp6_ = g_strerror (_tmp5_);
#line 308 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_warning ("spice-display.vala:308: %s", _tmp6_);
#line 310 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			result = FALSE;
#line 310 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			return result;
#line 2348 "spice-display.c"
		}
	}
#line 314 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = self->priv->shared_folder;
#line 314 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = g_build_filename (_tmp7_, name, NULL);
#line 314 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	link_path = _tmp8_;
#line 316 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp9_ = link_path;
#line 316 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	ret = symlink (path, _tmp9_);
#line 317 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp10_ = ret;
#line 317 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp10_ == -1) {
#line 2365 "spice-display.c"
		gint _tmp11_;
		const gchar* _tmp12_;
#line 318 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp11_ = errno;
#line 318 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp12_ = g_strerror (_tmp11_);
#line 318 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_warning ("spice-display.vala:318: %s", _tmp12_);
#line 320 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		result = FALSE;
#line 320 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (link_path);
#line 320 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return result;
#line 2380 "spice-display.c"
	}
#line 322 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_add_gsetting_shared_folder (self, path, name);
#line 324 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = TRUE;
#line 324 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (link_path);
#line 324 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 2390 "spice-display.c"
}


static void
boxes_spice_display_remove_shared_folder (BoxesSpiceDisplay* self,
                                          const gchar* name)
{
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp1_;
	gchar* to_remove = NULL;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_;
#line 327 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 327 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (name != NULL);
#line 328 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = self->priv->shared_folder;
#line 328 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (!g_file_test (_tmp1_, G_FILE_TEST_EXISTS)) {
#line 328 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp0_ = TRUE;
#line 2414 "spice-display.c"
	} else {
		const gchar* _tmp2_;
#line 328 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp2_ = self->priv->shared_folder;
#line 328 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp0_ = !g_file_test (_tmp2_, G_FILE_TEST_IS_DIR);
#line 2421 "spice-display.c"
	}
#line 328 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp0_) {
#line 329 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return;
#line 2427 "spice-display.c"
	}
#line 331 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = self->priv->shared_folder;
#line 331 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = g_build_filename (_tmp3_, name, NULL);
#line 331 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	to_remove = _tmp4_;
#line 332 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = to_remove;
#line 332 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	unlink (_tmp5_);
#line 334 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_remove_gsetting_shared_folder (self, name);
#line 327 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (to_remove);
#line 2443 "spice-display.c"
}


static void
_g_free0_ (gpointer var)
{
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	var = (g_free (var), NULL);
#line 2452 "spice-display.c"
}


static GHashTable*
boxes_spice_display_get_shared_folders (BoxesSpiceDisplay* self)
{
	GHashTable* result = NULL;
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp1_;
	GHashTable* hash = NULL;
	GHashFunc _tmp3_;
	GEqualFunc _tmp4_;
	GHashTable* _tmp5_;
	GError * _inner_error_ = NULL;
#line 337 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 338 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = self->priv->shared_folder;
#line 338 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (!g_file_test (_tmp1_, G_FILE_TEST_EXISTS)) {
#line 338 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp0_ = TRUE;
#line 2475 "spice-display.c"
	} else {
		const gchar* _tmp2_;
#line 338 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp2_ = self->priv->shared_folder;
#line 338 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp0_ = !g_file_test (_tmp2_, G_FILE_TEST_IS_DIR);
#line 2482 "spice-display.c"
	}
#line 338 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp0_) {
#line 339 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		result = NULL;
#line 339 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return result;
#line 2490 "spice-display.c"
	}
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = g_str_hash;
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = g_str_equal;
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = g_hash_table_new_full (_tmp3_, _tmp4_, _g_free0_, _g_free0_);
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	hash = _tmp5_;
#line 2500 "spice-display.c"
	{
		GDir* dir = NULL;
		const gchar* _tmp6_;
		GDir* _tmp7_;
		gchar* name = NULL;
#line 343 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp6_ = self->priv->shared_folder;
#line 343 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp7_ = g_dir_open (_tmp6_, (guint) 0, &_inner_error_);
#line 343 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		dir = _tmp7_;
#line 343 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 343 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (_inner_error_->domain == G_FILE_ERROR) {
#line 2516 "spice-display.c"
				goto __catch81_g_file_error;
			}
#line 343 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_hash_table_unref0 (hash);
#line 343 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 343 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_clear_error (&_inner_error_);
#line 343 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			return NULL;
#line 2527 "spice-display.c"
		}
#line 344 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		name = NULL;
#line 346 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		while (TRUE) {
#line 2533 "spice-display.c"
			GDir* _tmp8_;
			const gchar* _tmp9_;
			gchar* _tmp10_;
			const gchar* _tmp11_;
			gchar* path = NULL;
			const gchar* _tmp12_;
			const gchar* _tmp13_;
			gchar* _tmp14_;
			const gchar* _tmp15_;
#line 346 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp8_ = dir;
#line 346 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp9_ = g_dir_read_name (_tmp8_);
#line 346 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp10_ = g_strdup (_tmp9_);
#line 346 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (name);
#line 346 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			name = _tmp10_;
#line 346 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp11_ = name;
#line 346 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (!(_tmp11_ != NULL)) {
#line 346 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 2559 "spice-display.c"
			}
#line 347 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp12_ = self->priv->shared_folder;
#line 347 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp13_ = name;
#line 347 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp14_ = g_build_filename (_tmp12_, _tmp13_, NULL);
#line 347 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			path = _tmp14_;
#line 348 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp15_ = path;
#line 348 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (g_file_test (_tmp15_, G_FILE_TEST_IS_SYMLINK)) {
#line 2573 "spice-display.c"
				gchar* folder = NULL;
				const gchar* _tmp16_;
				gchar* _tmp17_;
				GHashTable* _tmp18_;
				const gchar* _tmp19_;
				gchar* _tmp20_;
				const gchar* _tmp21_;
				gchar* _tmp22_;
#line 349 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp16_ = path;
#line 349 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp17_ = g_file_read_link (_tmp16_, &_inner_error_);
#line 349 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				folder = _tmp17_;
#line 349 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 349 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_free0 (path);
#line 349 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_free0 (name);
#line 349 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_dir_close0 (dir);
#line 349 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					if (_inner_error_->domain == G_FILE_ERROR) {
#line 2598 "spice-display.c"
						goto __catch81_g_file_error;
					}
#line 349 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_free0 (path);
#line 349 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_free0 (name);
#line 349 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_dir_close0 (dir);
#line 349 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_hash_table_unref0 (hash);
#line 349 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 349 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					g_clear_error (&_inner_error_);
#line 349 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					return NULL;
#line 2615 "spice-display.c"
				}
#line 351 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp18_ = hash;
#line 351 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp19_ = name;
#line 351 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp20_ = g_strdup (_tmp19_);
#line 351 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp21_ = folder;
#line 351 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp22_ = g_strdup (_tmp21_);
#line 351 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_hash_table_insert (_tmp18_, _tmp20_, _tmp22_);
#line 348 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_free0 (folder);
#line 2631 "spice-display.c"
			}
#line 346 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (path);
#line 2635 "spice-display.c"
		}
#line 342 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (name);
#line 342 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_dir_close0 (dir);
#line 2641 "spice-display.c"
	}
	goto __finally81;
	__catch81_g_file_error:
	{
		GError* err = NULL;
		GError* _tmp23_;
		const gchar* _tmp24_;
#line 342 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		err = _inner_error_;
#line 342 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_inner_error_ = NULL;
#line 355 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp23_ = err;
#line 355 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp24_ = _tmp23_->message;
#line 355 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_warning ("spice-display.vala:355: %s", _tmp24_);
#line 342 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_error_free0 (err);
#line 2661 "spice-display.c"
	}
	__finally81:
#line 342 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 342 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_hash_table_unref0 (hash);
#line 342 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		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);
#line 342 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_clear_error (&_inner_error_);
#line 342 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return NULL;
#line 2674 "spice-display.c"
	}
#line 358 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = hash;
#line 358 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 2680 "spice-display.c"
}


static void
boxes_spice_display_init_shared_folders (BoxesSpiceDisplay* self)
{
	const gchar* _tmp0_;
	BoxesMachine* _tmp1_;
	BoxesBoxConfig* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GSettings* _tmp7_;
	GHashTable* hash = NULL;
	GHashTable* _tmp8_;
	GList* names = NULL;
	GHashTable* _tmp9_;
	GList* _tmp10_;
	GList* _tmp11_;
#line 361 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 362 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = g_get_user_config_dir ();
#line 362 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = self->priv->machine;
#line 362 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = _tmp1_->config;
#line 362 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = boxes_box_config_get_uuid (_tmp2_);
#line 362 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = _tmp3_;
#line 362 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = _tmp4_;
#line 362 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = g_build_filename (_tmp0_, "gnome-boxes", _tmp5_, NULL);
#line 362 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (self->priv->shared_folder);
#line 362 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->shared_folder = _tmp6_;
#line 362 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (_tmp5_);
#line 364 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = g_settings_new ("org.gnome.boxes");
#line 364 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (self->priv->shared_folder_settings);
#line 364 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->shared_folder_settings = _tmp7_;
#line 365 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = boxes_spice_display_parse_shared_folders (self);
#line 365 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	hash = _tmp8_;
#line 366 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp9_ = hash;
#line 366 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp10_ = g_hash_table_get_keys (_tmp9_);
#line 366 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	names = _tmp10_;
#line 367 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp11_ = names;
#line 2741 "spice-display.c"
	{
		GList* name_collection = NULL;
		GList* name_it = NULL;
#line 367 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		name_collection = _tmp11_;
#line 367 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		for (name_it = name_collection; name_it != NULL; name_it = name_it->next) {
#line 2749 "spice-display.c"
			const gchar* name = NULL;
#line 367 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			name = (const gchar*) name_it->data;
#line 2753 "spice-display.c"
			{
				GHashTable* _tmp12_;
				const gchar* _tmp13_;
				gconstpointer _tmp14_;
				const gchar* _tmp15_;
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp12_ = hash;
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp13_ = name;
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp14_ = g_hash_table_lookup (_tmp12_, _tmp13_);
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp15_ = name;
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				boxes_spice_display_add_shared_folder (self, (const gchar*) _tmp14_, _tmp15_);
#line 2769 "spice-display.c"
			}
		}
	}
#line 361 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_list_free0 (names);
#line 361 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_hash_table_unref0 (hash);
#line 2777 "spice-display.c"
}


static GHashTable*
boxes_spice_display_parse_shared_folders (BoxesSpiceDisplay* self)
{
	GHashTable* result = NULL;
	GHashTable* hash = NULL;
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	gchar* shared_folders = NULL;
	GSettings* _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_;
	GError * _inner_error_ = NULL;
#line 372 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 373 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = g_str_hash;
#line 373 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = g_str_equal;
#line 373 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, _g_free0_);
#line 373 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	hash = _tmp2_;
#line 375 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = self->priv->shared_folder_settings;
#line 375 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = g_settings_get_string (_tmp3_, "shared-folders");
#line 375 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	shared_folders = _tmp4_;
#line 376 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = shared_folders;
#line 376 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (g_strcmp0 (_tmp5_, "") == 0) {
#line 377 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		result = hash;
#line 377 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (shared_folders);
#line 377 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return result;
#line 2820 "spice-display.c"
	}
	{
		GVariant* entry = NULL;
		gchar* uuid_str = NULL;
		gchar* path_str = NULL;
		gchar* name_str = NULL;
		GVariant* variant = NULL;
		const GVariantType* _tmp6_;
		GVariantType* _tmp7_;
		GVariantType* _tmp8_;
		const gchar* _tmp9_;
		GVariant* _tmp10_;
		GVariant* _tmp11_;
		GVariantIter* iter = NULL;
		GVariant* _tmp12_;
		GVariantIter* _tmp13_;
#line 380 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		entry = NULL;
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp6_ = G_VARIANT_TYPE_VARIANT;
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp7_ = g_variant_type_new_array (_tmp6_);
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp8_ = _tmp7_;
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp9_ = shared_folders;
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp10_ = g_variant_parse (_tmp8_, _tmp9_, NULL, NULL, &_inner_error_);
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp11_ = _tmp10_;
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_variant_type_free0 (_tmp8_);
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		variant = _tmp11_;
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (name_str);
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (path_str);
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (uuid_str);
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_variant_unref0 (entry);
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (_inner_error_->domain == G_VARIANT_PARSE_ERROR) {
#line 2867 "spice-display.c"
				goto __catch82_g_variant_parse_error;
			}
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (name_str);
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (path_str);
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (uuid_str);
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_variant_unref0 (entry);
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (shared_folders);
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_hash_table_unref0 (hash);
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_clear_error (&_inner_error_);
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			return NULL;
#line 2888 "spice-display.c"
		}
#line 386 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp12_ = variant;
#line 386 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp13_ = g_variant_iter_new (_tmp12_);
#line 386 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		iter = _tmp13_;
#line 387 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		while (TRUE) {
#line 2898 "spice-display.c"
			GVariantIter* _tmp14_;
			GVariant* _tmp15_;
			GVariant* _tmp16_;
			GVariant* _tmp17_;
			BoxesMachine* _tmp18_;
			BoxesBoxConfig* _tmp19_;
			gchar* _tmp20_;
			gchar* _tmp21_;
			gchar* _tmp22_;
			const gchar* _tmp23_;
			gboolean _tmp24_;
#line 387 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp14_ = iter;
#line 387 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (!g_variant_iter_next (_tmp14_, "v", &entry, NULL)) {
#line 387 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 2916 "spice-display.c"
			}
#line 388 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp15_ = entry;
#line 388 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_variant_lookup (_tmp15_, "uuid", "s", &uuid_str, NULL);
#line 389 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp16_ = entry;
#line 389 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_variant_lookup (_tmp16_, "path", "s", &path_str, NULL);
#line 390 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp17_ = entry;
#line 390 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_variant_lookup (_tmp17_, "name", "s", &name_str, NULL);
#line 392 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp18_ = self->priv->machine;
#line 392 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp19_ = _tmp18_->config;
#line 392 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp20_ = boxes_box_config_get_uuid (_tmp19_);
#line 392 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp21_ = _tmp20_;
#line 392 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp22_ = _tmp21_;
#line 392 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp23_ = uuid_str;
#line 392 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp24_ = g_strcmp0 (_tmp22_, _tmp23_) == 0;
#line 392 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (_tmp22_);
#line 392 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (_tmp24_) {
#line 2948 "spice-display.c"
				GHashTable* _tmp25_;
				const gchar* _tmp26_;
				gchar* _tmp27_;
				const gchar* _tmp28_;
				gchar* _tmp29_;
#line 393 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp25_ = hash;
#line 393 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp26_ = name_str;
#line 393 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp27_ = g_strdup (_tmp26_);
#line 393 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp28_ = path_str;
#line 393 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp29_ = g_strdup (_tmp28_);
#line 393 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_hash_table_insert (_tmp25_, _tmp27_, _tmp29_);
#line 2966 "spice-display.c"
			}
		}
#line 379 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_variant_iter_free0 (iter);
#line 379 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_variant_unref0 (variant);
#line 379 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (name_str);
#line 379 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (path_str);
#line 379 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (uuid_str);
#line 379 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_variant_unref0 (entry);
#line 2981 "spice-display.c"
	}
	goto __finally82;
	__catch82_g_variant_parse_error:
	{
		GError* err = NULL;
		GError* _tmp30_;
		const gchar* _tmp31_;
#line 379 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		err = _inner_error_;
#line 379 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_inner_error_ = NULL;
#line 396 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp30_ = err;
#line 396 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp31_ = _tmp30_->message;
#line 396 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_warning ("spice-display.vala:396: %s", _tmp31_);
#line 379 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_error_free0 (err);
#line 3001 "spice-display.c"
	}
	__finally82:
#line 379 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 379 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (shared_folders);
#line 379 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_hash_table_unref0 (hash);
#line 379 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		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);
#line 379 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_clear_error (&_inner_error_);
#line 379 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return NULL;
#line 3016 "spice-display.c"
	}
#line 399 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = hash;
#line 399 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (shared_folders);
#line 399 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 3024 "spice-display.c"
}


static void
boxes_spice_display_add_gsetting_shared_folder (BoxesSpiceDisplay* self,
                                                const gchar* path,
                                                const gchar* name)
{
	GVariantBuilder* variant_builder = NULL;
	const GVariantType* _tmp0_;
	GVariantType* _tmp1_;
	GVariantType* _tmp2_;
	GVariantBuilder* _tmp3_;
	GVariantBuilder* _tmp4_;
	gchar* shared_folders = NULL;
	GSettings* _tmp5_;
	gchar* _tmp6_;
	const gchar* _tmp7_;
	GVariantBuilder* entry_variant_builder = NULL;
	const GVariantType* _tmp21_;
	GVariantBuilder* _tmp22_;
	GVariant* uuid_variant = NULL;
	BoxesMachine* _tmp23_;
	BoxesBoxConfig* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	GVariant* _tmp28_;
	GVariant* _tmp29_;
	GVariant* path_variant = NULL;
	GVariant* _tmp30_;
	GVariant* name_variant = NULL;
	GVariant* _tmp31_;
	GVariant* entry_variant = NULL;
	GVariant* _tmp32_;
	GVariantBuilder* _tmp33_;
	GVariant* variant = NULL;
	GVariantBuilder* _tmp34_;
	GVariant* _tmp35_;
	GSettings* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	GError * _inner_error_ = NULL;
#line 402 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 402 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (path != NULL);
#line 402 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (name != NULL);
#line 403 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = G_VARIANT_TYPE_VARIANT;
#line 403 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = g_variant_type_new_array (_tmp0_);
#line 403 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = _tmp1_;
#line 403 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = g_variant_builder_new (_tmp2_);
#line 403 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = _tmp3_;
#line 403 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_variant_type_free0 (_tmp2_);
#line 403 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	variant_builder = _tmp4_;
#line 405 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = self->priv->shared_folder_settings;
#line 405 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = g_settings_get_string (_tmp5_, "shared-folders");
#line 405 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	shared_folders = _tmp6_;
#line 406 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = shared_folders;
#line 406 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (g_strcmp0 (_tmp7_, "") != 0) {
#line 3098 "spice-display.c"
		{
			GVariant* entry = NULL;
			GVariant* variant = NULL;
			const GVariantType* _tmp8_;
			GVariantType* _tmp9_;
			GVariantType* _tmp10_;
			const gchar* _tmp11_;
			GVariant* _tmp12_;
			GVariant* _tmp13_;
			GVariantIter* iter = NULL;
			GVariant* _tmp14_;
			GVariantIter* _tmp15_;
#line 408 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			entry = NULL;
#line 410 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp8_ = G_VARIANT_TYPE_VARIANT;
#line 410 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp9_ = g_variant_type_new_array (_tmp8_);
#line 410 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp10_ = _tmp9_;
#line 410 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp11_ = shared_folders;
#line 410 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp12_ = g_variant_parse (_tmp10_, _tmp11_, NULL, NULL, &_inner_error_);
#line 410 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp13_ = _tmp12_;
#line 410 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_variant_type_free0 (_tmp10_);
#line 410 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			variant = _tmp13_;
#line 410 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 410 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_variant_unref0 (entry);
#line 410 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_inner_error_->domain == G_VARIANT_PARSE_ERROR) {
#line 3135 "spice-display.c"
					goto __catch83_g_variant_parse_error;
				}
#line 410 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_variant_unref0 (entry);
#line 410 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_free0 (shared_folders);
#line 410 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_variant_builder_unref0 (variant_builder);
#line 410 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 410 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_clear_error (&_inner_error_);
#line 410 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				return;
#line 3150 "spice-display.c"
			}
#line 411 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp14_ = variant;
#line 411 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp15_ = g_variant_iter_new (_tmp14_);
#line 411 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			iter = _tmp15_;
#line 412 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			while (TRUE) {
#line 3160 "spice-display.c"
				GVariantIter* _tmp16_;
				GVariantBuilder* _tmp17_;
				GVariant* _tmp18_;
#line 412 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp16_ = iter;
#line 412 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (!g_variant_iter_next (_tmp16_, "v", &entry, NULL)) {
#line 412 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					break;
#line 3170 "spice-display.c"
				}
#line 413 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp17_ = variant_builder;
#line 413 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp18_ = entry;
#line 413 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_variant_builder_add (_tmp17_, "v", _tmp18_, NULL);
#line 3178 "spice-display.c"
			}
#line 407 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_variant_iter_free0 (iter);
#line 407 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_variant_unref0 (variant);
#line 407 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_variant_unref0 (entry);
#line 3186 "spice-display.c"
		}
		goto __finally83;
		__catch83_g_variant_parse_error:
		{
			GError* err = NULL;
			GError* _tmp19_;
			const gchar* _tmp20_;
#line 407 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			err = _inner_error_;
#line 407 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_inner_error_ = NULL;
#line 416 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp19_ = err;
#line 416 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp20_ = _tmp19_->message;
#line 416 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_warning ("spice-display.vala:416: %s", _tmp20_);
#line 407 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_error_free0 (err);
#line 3206 "spice-display.c"
		}
		__finally83:
#line 407 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 407 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (shared_folders);
#line 407 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_variant_builder_unref0 (variant_builder);
#line 407 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			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);
#line 407 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_clear_error (&_inner_error_);
#line 407 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			return;
#line 3221 "spice-display.c"
		}
	}
#line 420 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp21_ = G_VARIANT_TYPE_VARDICT;
#line 420 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp22_ = g_variant_builder_new (_tmp21_);
#line 420 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	entry_variant_builder = _tmp22_;
#line 422 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp23_ = self->priv->machine;
#line 422 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp24_ = _tmp23_->config;
#line 422 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp25_ = boxes_box_config_get_uuid (_tmp24_);
#line 422 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp26_ = _tmp25_;
#line 422 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp27_ = _tmp26_;
#line 422 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp28_ = g_variant_new ("s", _tmp27_, NULL);
#line 422 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_variant_ref_sink (_tmp28_);
#line 422 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp29_ = _tmp28_;
#line 422 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (_tmp27_);
#line 422 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	uuid_variant = _tmp29_;
#line 423 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp30_ = g_variant_new ("s", path, NULL);
#line 423 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_variant_ref_sink (_tmp30_);
#line 423 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	path_variant = _tmp30_;
#line 424 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp31_ = g_variant_new ("s", name, NULL);
#line 424 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_variant_ref_sink (_tmp31_);
#line 424 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	name_variant = _tmp31_;
#line 425 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_variant_builder_add (entry_variant_builder, "{sv}", "uuid", uuid_variant, NULL);
#line 426 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_variant_builder_add (entry_variant_builder, "{sv}", "path", path_variant, NULL);
#line 427 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_variant_builder_add (entry_variant_builder, "{sv}", "name", name_variant, NULL);
#line 428 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp32_ = g_variant_builder_end (entry_variant_builder);
#line 428 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_variant_ref_sink (_tmp32_);
#line 428 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	entry_variant = _tmp32_;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp33_ = variant_builder;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_variant_builder_add (_tmp33_, "v", entry_variant, NULL);
#line 431 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp34_ = variant_builder;
#line 431 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp35_ = g_variant_builder_end (_tmp34_);
#line 431 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_variant_ref_sink (_tmp35_);
#line 431 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	variant = _tmp35_;
#line 433 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp36_ = self->priv->shared_folder_settings;
#line 433 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp37_ = g_variant_print (variant, TRUE);
#line 433 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp38_ = _tmp37_;
#line 433 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_settings_set_string (_tmp36_, "shared-folders", _tmp38_);
#line 433 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (_tmp38_);
#line 402 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_variant_unref0 (variant);
#line 402 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_variant_unref0 (entry_variant);
#line 402 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_variant_unref0 (name_variant);
#line 402 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_variant_unref0 (path_variant);
#line 402 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_variant_unref0 (uuid_variant);
#line 402 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_variant_builder_unref0 (entry_variant_builder);
#line 402 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (shared_folders);
#line 402 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_variant_builder_unref0 (variant_builder);
#line 3312 "spice-display.c"
}


static void
boxes_spice_display_remove_gsetting_shared_folder (BoxesSpiceDisplay* self,
                                                   const gchar* name)
{
	GVariantBuilder* variant_builder = NULL;
	const GVariantType* _tmp0_;
	GVariantType* _tmp1_;
	GVariantType* _tmp2_;
	GVariantBuilder* _tmp3_;
	GVariantBuilder* _tmp4_;
	gchar* shared_folders = NULL;
	GSettings* _tmp5_;
	gchar* _tmp6_;
	const gchar* _tmp7_;
	GError * _inner_error_ = NULL;
#line 436 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 436 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (name != NULL);
#line 437 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = G_VARIANT_TYPE_VARIANT;
#line 437 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = g_variant_type_new_array (_tmp0_);
#line 437 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = _tmp1_;
#line 437 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = g_variant_builder_new (_tmp2_);
#line 437 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = _tmp3_;
#line 437 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_variant_type_free0 (_tmp2_);
#line 437 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	variant_builder = _tmp4_;
#line 439 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = self->priv->shared_folder_settings;
#line 439 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = g_settings_get_string (_tmp5_, "shared-folders");
#line 439 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	shared_folders = _tmp6_;
#line 440 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = shared_folders;
#line 440 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (g_strcmp0 (_tmp7_, "") == 0) {
#line 441 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (shared_folders);
#line 441 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_variant_builder_unref0 (variant_builder);
#line 441 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return;
#line 3365 "spice-display.c"
	}
	{
		GVariant* entry = NULL;
		gchar* name_str = NULL;
		gchar* uuid_str = NULL;
		GVariant* variant = NULL;
		const GVariantType* _tmp8_;
		GVariantType* _tmp9_;
		GVariantType* _tmp10_;
		const gchar* _tmp11_;
		GVariant* _tmp12_;
		GVariant* _tmp13_;
		GVariantIter* iter = NULL;
		GVariant* _tmp14_;
		GVariantIter* _tmp15_;
		GVariantBuilder* _tmp30_;
		GVariant* _tmp31_;
		GSettings* _tmp32_;
		GVariant* _tmp33_;
		gchar* _tmp34_;
		gchar* _tmp35_;
#line 444 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		entry = NULL;
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp8_ = G_VARIANT_TYPE_VARIANT;
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp9_ = g_variant_type_new_array (_tmp8_);
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp10_ = _tmp9_;
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp11_ = shared_folders;
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp12_ = g_variant_parse (_tmp10_, _tmp11_, NULL, NULL, &_inner_error_);
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp13_ = _tmp12_;
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_variant_type_free0 (_tmp10_);
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		variant = _tmp13_;
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (uuid_str);
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (name_str);
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_variant_unref0 (entry);
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (_inner_error_->domain == G_VARIANT_PARSE_ERROR) {
#line 3415 "spice-display.c"
				goto __catch84_g_variant_parse_error;
			}
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (uuid_str);
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (name_str);
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_variant_unref0 (entry);
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (shared_folders);
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_variant_builder_unref0 (variant_builder);
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_clear_error (&_inner_error_);
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			return;
#line 3434 "spice-display.c"
		}
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp14_ = variant;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp15_ = g_variant_iter_new (_tmp14_);
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		iter = _tmp15_;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		while (TRUE) {
#line 3444 "spice-display.c"
			GVariantIter* _tmp16_;
			GVariant* _tmp17_;
			GVariant* _tmp18_;
			gboolean _tmp19_ = FALSE;
			const gchar* _tmp20_;
			BoxesMachine* _tmp21_;
			BoxesBoxConfig* _tmp22_;
			gchar* _tmp23_;
			gchar* _tmp24_;
			gchar* _tmp25_;
			gboolean _tmp26_;
			GVariantBuilder* _tmp28_;
			GVariant* _tmp29_;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp16_ = iter;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (!g_variant_iter_next (_tmp16_, "v", &entry, NULL)) {
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 3464 "spice-display.c"
			}
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp17_ = entry;
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_variant_lookup (_tmp17_, "uuid", "s", &uuid_str, NULL);
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp18_ = entry;
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_variant_lookup (_tmp18_, "name", "s", &name_str, NULL);
#line 454 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp20_ = uuid_str;
#line 454 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp21_ = self->priv->machine;
#line 454 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp22_ = _tmp21_->config;
#line 454 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp23_ = boxes_box_config_get_uuid (_tmp22_);
#line 454 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp24_ = _tmp23_;
#line 454 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp25_ = _tmp24_;
#line 454 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp26_ = g_strcmp0 (_tmp20_, _tmp25_) == 0;
#line 454 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (_tmp25_);
#line 454 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (_tmp26_) {
#line 3492 "spice-display.c"
				const gchar* _tmp27_;
#line 454 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp27_ = name_str;
#line 454 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp19_ = g_strcmp0 (_tmp27_, name) == 0;
#line 3498 "spice-display.c"
			} else {
#line 454 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp19_ = FALSE;
#line 3502 "spice-display.c"
			}
#line 454 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (_tmp19_) {
#line 455 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				continue;
#line 3508 "spice-display.c"
			}
#line 457 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp28_ = variant_builder;
#line 457 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp29_ = entry;
#line 457 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_variant_builder_add (_tmp28_, "v", _tmp29_, NULL);
#line 3516 "spice-display.c"
		}
#line 459 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp30_ = variant_builder;
#line 459 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp31_ = g_variant_builder_end (_tmp30_);
#line 459 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_variant_ref_sink (_tmp31_);
#line 459 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_variant_unref0 (variant);
#line 459 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		variant = _tmp31_;
#line 461 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp32_ = self->priv->shared_folder_settings;
#line 461 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp33_ = variant;
#line 461 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp34_ = g_variant_print (_tmp33_, TRUE);
#line 461 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp35_ = _tmp34_;
#line 461 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_settings_set_string (_tmp32_, "shared-folders", _tmp35_);
#line 461 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_tmp35_);
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_variant_iter_free0 (iter);
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_variant_unref0 (variant);
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (uuid_str);
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (name_str);
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_variant_unref0 (entry);
#line 3550 "spice-display.c"
	}
	goto __finally84;
	__catch84_g_variant_parse_error:
	{
		GError* err = NULL;
		GError* _tmp36_;
		const gchar* _tmp37_;
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		err = _inner_error_;
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_inner_error_ = NULL;
#line 463 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp36_ = err;
#line 463 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp37_ = _tmp36_->message;
#line 463 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_warning ("spice-display.vala:463: %s", _tmp37_);
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_error_free0 (err);
#line 3570 "spice-display.c"
	}
	__finally84:
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (shared_folders);
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_variant_builder_unref0 (variant_builder);
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		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);
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_clear_error (&_inner_error_);
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return;
#line 3585 "spice-display.c"
	}
#line 436 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (shared_folders);
#line 436 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_variant_builder_unref0 (variant_builder);
#line 3591 "spice-display.c"
}


static void
boxes_spice_display_main_event (BoxesSpiceDisplay* self,
                                SpiceChannelEvent event)
{
#line 467 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 468 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	switch (event) {
#line 468 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case SPICE_CHANNEL_CLOSED:
#line 3605 "spice-display.c"
		{
#line 470 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			self->priv->closed = TRUE;
#line 471 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_signal_emit_by_name ((BoxesDisplay*) self, "disconnected", FALSE);
#line 472 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			break;
#line 3613 "spice-display.c"
		}
#line 468 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case SPICE_CHANNEL_ERROR_AUTH:
#line 3617 "spice-display.c"
		{
#line 475 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			boxes_display_set_need_password ((BoxesDisplay*) self, TRUE);
#line 476 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			break;
#line 3623 "spice-display.c"
		}
#line 468 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case SPICE_CHANNEL_ERROR_CONNECT:
#line 468 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case SPICE_CHANNEL_ERROR_TLS:
#line 468 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case SPICE_CHANNEL_ERROR_LINK:
#line 468 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case SPICE_CHANNEL_ERROR_IO:
#line 3633 "spice-display.c"
		{
#line 482 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_debug ("spice-display.vala:482: main SPICE channel error: %d", (gint) event);
#line 483 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			self->priv->closed = TRUE;
#line 484 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_signal_emit_by_name ((BoxesDisplay*) self, "disconnected", TRUE);
#line 485 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			break;
#line 3643 "spice-display.c"
		}
#line 468 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case SPICE_CHANNEL_OPENED:
#line 3647 "spice-display.c"
		{
#line 488 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			break;
#line 3651 "spice-display.c"
		}
		default:
		{
#line 491 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_debug ("spice-display.vala:491: unhandled main SPICE channel event: %d", (gint) event);
#line 492 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			break;
#line 3659 "spice-display.c"
		}
	}
}


static void
_vala_array_add10 (GFile** * array,
                   int* length,
                   int* size,
                   GFile* value)
{
#line 500 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if ((*length) == (*size)) {
#line 500 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 500 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		*array = g_renew (GFile*, *array, (*size) + 1);
#line 3677 "spice-display.c"
	}
#line 500 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	(*array)[(*length)++] = value;
#line 500 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	(*array)[*length] = NULL;
#line 3683 "spice-display.c"
}


static void
_vala_array_add11 (GFile** * array,
                   int* length,
                   int* size,
                   GFile* value)
{
#line 502 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if ((*length) == (*size)) {
#line 502 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 502 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		*array = g_renew (GFile*, *array, (*size) + 1);
#line 3699 "spice-display.c"
	}
#line 502 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	(*array)[(*length)++] = value;
#line 502 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	(*array)[*length] = NULL;
#line 3705 "spice-display.c"
}


static void
boxes_spice_display_real_transfer_files (BoxesDisplay* base,
                                         GList* uris)
{
	BoxesSpiceDisplay * self;
	GFile** files = NULL;
	GFile** _tmp0_;
	gint files_length1;
	gint _files_size_;
	GFile** _tmp7_;
	gint _tmp7__length1;
	SpiceMainChannel* _tmp8_;
	SpiceMainChannel* _tmp9_;
	GFile** _tmp10_;
	gint _tmp10__length1;
#line 496 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 497 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = g_new0 (GFile*, 0 + 1);
#line 497 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	files = _tmp0_;
#line 497 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	files_length1 = 0;
#line 497 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_files_size_ = files_length1;
#line 3734 "spice-display.c"
	{
		GList* uri_collection = NULL;
		GList* uri_it = NULL;
#line 498 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		uri_collection = uris;
#line 498 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		for (uri_it = uri_collection; uri_it != NULL; uri_it = uri_it->next) {
#line 3742 "spice-display.c"
			gchar* _tmp1_;
			gchar* uri = NULL;
#line 498 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp1_ = g_strdup ((const gchar*) uri_it->data);
#line 498 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			uri = _tmp1_;
#line 3749 "spice-display.c"
			{
				GFile* file = NULL;
				const gchar* _tmp2_;
				GFile* _tmp3_;
				GFile** _tmp4_;
				gint _tmp4__length1;
				GFile* _tmp5_;
				GFile* _tmp6_;
#line 499 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp2_ = uri;
#line 499 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp3_ = g_file_new_for_uri (_tmp2_);
#line 499 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				file = _tmp3_;
#line 500 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp4_ = files;
#line 500 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp4__length1 = files_length1;
#line 500 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp5_ = file;
#line 500 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp6_ = _g_object_ref0 (_tmp5_);
#line 500 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_vala_array_add10 (&files, &files_length1, &_files_size_, _tmp6_);
#line 498 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_object_unref0 (file);
#line 498 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_free0 (uri);
#line 3778 "spice-display.c"
			}
		}
	}
#line 502 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = files;
#line 502 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7__length1 = files_length1;
#line 502 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_vala_array_add11 (&files, &files_length1, &_files_size_, NULL);
#line 504 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = boxes_spice_display_get_main_channel (self);
#line 504 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp9_ = _tmp8_;
#line 504 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp10_ = files;
#line 504 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp10__length1 = files_length1;
#line 504 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	spice_main_file_copy_async (_tmp9_, _tmp10_, G_FILE_COPY_NONE, NULL, NULL, NULL, NULL, NULL);
#line 496 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	files = (_vala_array_free (files, files_length1, (GDestroyNotify) g_object_unref), NULL);
#line 3800 "spice-display.c"
}


static void
boxes_spice_display_on_new_file_transfer (BoxesSpiceDisplay* self,
                                          SpiceMainChannel* main_channel,
                                          GObject* transfer_task)
{
	BoxesDisplayPage* page = NULL;
	BoxesMachine* _tmp0_;
	BoxesAppWindow* _tmp1_;
	BoxesAppWindow* _tmp2_;
	BoxesDisplayPage* _tmp3_;
	BoxesDisplayPage* _tmp4_;
#line 507 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 507 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (main_channel != NULL);
#line 507 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (transfer_task != NULL);
#line 508 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->machine;
#line 508 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = boxes_machine_get_window (_tmp0_);
#line 508 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = _tmp1_;
#line 508 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = _tmp2_->display_page;
#line 508 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 508 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	page = _tmp4_;
#line 509 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_page_add_transfer (page, transfer_task);
#line 507 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (page);
#line 3837 "spice-display.c"
}


static Block75Data*
block75_data_ref (Block75Data* _data75_)
{
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_atomic_int_inc (&_data75_->_ref_count_);
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return _data75_;
#line 3848 "spice-display.c"
}


static void
block75_data_unref (void * _userdata_)
{
	Block75Data* _data75_;
	_data75_ = (Block75Data*) _userdata_;
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (g_atomic_int_dec_and_test (&_data75_->_ref_count_)) {
#line 3859 "spice-display.c"
		BoxesSpiceDisplay* self;
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		self = _data75_->self;
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (_data75_->usb_property);
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (self);
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_slice_free (Block75Data, _data75_);
#line 3869 "spice-display.c"
	}
}


static Block76Data*
block76_data_ref (Block76Data* _data76_)
{
#line 4983 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	g_atomic_int_inc (&_data76_->_ref_count_);
#line 4983 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	return _data76_;
#line 3881 "spice-display.c"
}


static void
block76_data_unref (void * _userdata_)
{
	Block76Data* _data76_;
	_data76_ = (Block76Data*) _userdata_;
#line 4983 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	if (g_atomic_int_dec_and_test (&_data76_->_ref_count_)) {
#line 3892 "spice-display.c"
		GPtrArray* self;
#line 4983 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		self = _data76_->self;
#line 4983 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		_g_ptr_array_unref0 (self);
#line 4983 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
		g_slice_free (Block76Data, _data76_);
#line 3900 "spice-display.c"
	}
}


static gint
__lambda1_ (Block76Data* _data76_,
            gconstpointer** a,
            gconstpointer** b)
{
	GPtrArray* self;
	gint result = 0;
#line 4984 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	self = _data76_->self;
#line 4985 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	result = _data76_->compare_func ((gconstpointer**) (*a), (gconstpointer**) (*b));
#line 4985 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	return result;
#line 3918 "spice-display.c"
}


static gint
___lambda1__gcompare_data_func (gconstpointer a,
                                gconstpointer b,
                                gpointer self)
{
	gint result;
	result = __lambda1_ (self, a, b);
#line 4984 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	return result;
#line 3931 "spice-display.c"
}


static void
vala_g_ptr_array_sort (GPtrArray* self,
                       GCompareFunc compare_func)
{
	Block76Data* _data76_;
#line 4983 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	g_return_if_fail (self != NULL);
#line 4983 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	_data76_ = g_slice_new0 (Block76Data);
#line 4983 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	_data76_->_ref_count_ = 1;
#line 4983 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	_data76_->self = g_ptr_array_ref (self);
#line 4983 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	_data76_->compare_func = compare_func;
#line 4984 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	g_ptr_array_sort_with_data (self, ___lambda1__gcompare_data_func, _data76_);
#line 4983 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	block76_data_unref (_data76_);
#line 4983 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	_data76_ = NULL;
#line 3956 "spice-display.c"
}


static gint
_____lambda87_ (SpiceUsbDevice* a,
                SpiceUsbDevice* b)
{
	gint result = 0;
	gchar* str_a = NULL;
	gchar* _tmp0_;
	gchar* str_b = NULL;
	gchar* _tmp1_;
	GCompareFunc _tmp2_;
#line 544 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (a != NULL, 0);
#line 544 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (b != NULL, 0);
#line 545 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = spice_usb_device_get_description (a, "    %1$s %2$s");
#line 545 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	str_a = _tmp0_;
#line 546 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = spice_usb_device_get_description (b, "    %1$s %2$s");
#line 546 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	str_b = _tmp1_;
#line 548 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = g_strcmp0;
#line 548 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = _tmp2_ (str_a, str_b);
#line 548 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (str_b);
#line 548 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (str_a);
#line 548 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 3992 "spice-display.c"
}


static gint
______lambda87__gcompare_func (gconstpointer a,
                               gconstpointer b)
{
	gint result;
	result = _____lambda87_ ((SpiceUsbDevice*) a, (SpiceUsbDevice*) b);
#line 544 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 4004 "spice-display.c"
}


static void
_____lambda90_ (Block75Data* _data75_,
                SpiceUsbDeviceManager* manager,
                SpiceUsbDevice* dev)
{
	BoxesSpiceDisplay* self;
	BoxesProperty* _tmp0_;
#line 555 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = _data75_->self;
#line 555 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (manager != NULL);
#line 555 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (dev != NULL);
#line 556 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = _data75_->usb_property;
#line 556 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_emit_by_name (_tmp0_, "refresh-properties");
#line 4025 "spice-display.c"
}


static void
______lambda90__spice_usb_device_manager_device_added (SpiceUsbDeviceManager* _sender,
                                                       SpiceUsbDevice* device,
                                                       gpointer self)
{
#line 555 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_____lambda90_ (self, _sender, device);
#line 4036 "spice-display.c"
}


static void
_____lambda91_ (Block75Data* _data75_,
                SpiceUsbDeviceManager* manager,
                SpiceUsbDevice* dev)
{
	BoxesSpiceDisplay* self;
	BoxesProperty* _tmp0_;
#line 558 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = _data75_->self;
#line 558 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (manager != NULL);
#line 558 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (dev != NULL);
#line 559 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = _data75_->usb_property;
#line 559 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_emit_by_name (_tmp0_, "refresh-properties");
#line 4057 "spice-display.c"
}


static void
______lambda91__spice_usb_device_manager_device_removed (SpiceUsbDeviceManager* _sender,
                                                         SpiceUsbDevice* device,
                                                         gpointer self)
{
#line 558 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_____lambda91_ (self, _sender, device);
#line 4068 "spice-display.c"
}


static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
#line 539 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
#line 4077 "spice-display.c"
}


static GList*
boxes_spice_display_real_get_properties (BoxesDisplay* base,
                                         BoxesPropertiesPage page)
{
	BoxesSpiceDisplay * self;
	GList* result = NULL;
	GList* list = NULL;
	GError * _inner_error_ = NULL;
#line 512 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 513 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	list = NULL;
#line 515 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	switch (page) {
#line 515 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_PROPERTIES_PAGE_GENERAL:
#line 4097 "spice-display.c"
		{
			GtkSwitch* toggle = NULL;
			GtkSwitch* _tmp0_;
			SpiceGtkSession* _tmp1_;
			GtkSwitch* _tmp2_;
			GtkSwitch* _tmp3_;
			GtkSwitch* _tmp4_;
			BoxesProperty* _tmp5_;
			BoxesProperty* _tmp6_;
			gboolean _tmp7_ = FALSE;
			gboolean _tmp8_;
			gchar* message = NULL;
			gchar* _tmp13_;
			GtkLabel* label = NULL;
			const gchar* _tmp14_;
			GtkLabel* _tmp15_;
			GtkLabel* _tmp16_;
			GtkLabel* _tmp17_;
			GtkLabel* _tmp18_;
			GtkLabel* _tmp19_;
			GtkLabel* _tmp20_;
			GtkLabel* _tmp21_;
			GtkStyleContext* _tmp22_;
			GtkLabel* _tmp23_;
			BoxesProperty* _tmp24_;
			BoxesProperty* _tmp25_;
#line 517 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp0_ = (GtkSwitch*) gtk_switch_new ();
#line 517 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_object_ref_sink (_tmp0_);
#line 517 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			toggle = _tmp0_;
#line 518 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp1_ = self->priv->gtk_session;
#line 518 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp2_ = toggle;
#line 518 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_object_bind_property_with_closures ((GObject*) _tmp1_, "auto-clipboard", (GObject*) _tmp2_, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
#line 520 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp3_ = toggle;
#line 520 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_START);
#line 521 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp4_ = toggle;
#line 521 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp5_ = boxes_iproperties_provider_add_property ((BoxesIPropertiesProvider*) self, &list, _ ("Share Clipboard"), (GtkWidget*) _tmp4_, NULL);
#line 521 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp6_ = _tmp5_;
#line 521 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_object_unref0 (_tmp6_);
#line 523 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp8_ = ((BoxesDisplay*) self)->connected;
#line 523 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (!_tmp8_) {
#line 523 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp7_ = TRUE;
#line 4154 "spice-display.c"
			} else {
				SpiceMainChannel* _tmp9_;
				SpiceMainChannel* _tmp10_;
				gboolean _tmp11_;
				gboolean _tmp12_;
#line 523 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp9_ = boxes_spice_display_get_main_channel (self);
#line 523 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp10_ = _tmp9_;
#line 523 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_object_get (_tmp10_, "agent-connected", &_tmp11_, NULL);
#line 523 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp12_ = _tmp11_;
#line 523 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp7_ = _tmp12_;
#line 4170 "spice-display.c"
			}
#line 523 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (_tmp7_) {
#line 524 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_object_unref0 (toggle);
#line 524 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 4178 "spice-display.c"
			}
#line 526 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp13_ = g_strdup (_ ("SPICE guest tools are not installed. These tools improve user experien" \
"ce and enable host and box interactions, such as copy&amp;paste. Pleas" \
"e visit <a href=\"http://www.spice-space.org/download.html\">http://ww" \
"w.spice-space.org/download.html</a> to download and install these tool" \
"s from within the box."));
#line 526 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			message = _tmp13_;
#line 527 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp14_ = message;
#line 527 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp15_ = (GtkLabel*) gtk_label_new (_tmp14_);
#line 527 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_object_ref_sink (_tmp15_);
#line 527 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			label = _tmp15_;
#line 528 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp16_ = label;
#line 528 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			gtk_widget_set_vexpand ((GtkWidget*) _tmp16_, TRUE);
#line 529 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp17_ = label;
#line 529 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			gtk_widget_set_valign ((GtkWidget*) _tmp17_, GTK_ALIGN_END);
#line 530 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp18_ = label;
#line 530 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_object_set (_tmp18_, "wrap", TRUE, NULL);
#line 531 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp19_ = label;
#line 531 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			gtk_label_set_max_width_chars (_tmp19_, 80);
#line 532 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp20_ = label;
#line 532 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			gtk_label_set_use_markup (_tmp20_, TRUE);
#line 533 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp21_ = label;
#line 533 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp22_ = gtk_widget_get_style_context ((GtkWidget*) _tmp21_);
#line 533 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			gtk_style_context_add_class (_tmp22_, "boxes-spice-tools-notice-label");
#line 535 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp23_ = label;
#line 535 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp24_ = boxes_iproperties_provider_add_property ((BoxesIPropertiesProvider*) self, &list, NULL, (GtkWidget*) _tmp23_, NULL);
#line 535 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp25_ = _tmp24_;
#line 535 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_object_unref0 (_tmp25_);
#line 536 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_object_unref0 (label);
#line 536 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (message);
#line 536 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_object_unref0 (toggle);
#line 536 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			break;
#line 4234 "spice-display.c"
		}
#line 515 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_PROPERTIES_PAGE_DEVICES:
#line 4238 "spice-display.c"
		{
			gboolean _tmp47_ = FALSE;
			SpicePortChannel* _tmp48_;
			SpiceSession* _tmp52_;
			const gchar* _tmp53_;
			GtkFrame* frame = NULL;
			GtkFrame* _tmp54_;
			GtkLabel* _tmp55_;
			GtkLabel* _tmp56_;
			GtkFrame* _tmp57_;
			BoxesProperty* _tmp58_;
			BoxesProperty* _tmp59_;
			{
				SpiceUsbDeviceManager* manager = NULL;
				SpiceSession* _tmp26_;
				SpiceUsbDeviceManager* _tmp27_;
				SpiceUsbDeviceManager* _tmp28_;
				GPtrArray* devs = NULL;
				SpiceUsbDeviceManager* _tmp29_;
				GPtrArray* _tmp30_;
				gboolean _tmp31_ = FALSE;
				gboolean _tmp32_;
#line 540 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp26_ = self->priv->session;
#line 540 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp27_ = spice_usb_device_manager_get (_tmp26_, &_inner_error_);
#line 540 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp28_ = _g_object_ref0 (_tmp27_);
#line 540 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				manager = _tmp28_;
#line 540 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 4271 "spice-display.c"
					goto __catch85_g_error;
				}
#line 541 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp29_ = manager;
#line 541 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp30_ = boxes_spice_display_get_usb_devices (self, _tmp29_);
#line 541 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				devs = _tmp30_;
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp32_ = ((BoxesDisplay*) self)->connected;
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_tmp32_) {
#line 4284 "spice-display.c"
					GPtrArray* _tmp33_;
					gint _tmp34_;
					gint _tmp35_;
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp33_ = devs;
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp34_ = g_ptr_array_get_length (_tmp33_);
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp35_ = _tmp34_;
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp31_ = _tmp35_ > 0;
#line 4296 "spice-display.c"
				} else {
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp31_ = FALSE;
#line 4300 "spice-display.c"
				}
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_tmp31_) {
#line 4304 "spice-display.c"
					Block75Data* _data75_;
					GPtrArray* _tmp36_;
					GtkFrame* frame = NULL;
					SpiceUsbDeviceManager* _tmp37_;
					GPtrArray* _tmp38_;
					GtkFrame* _tmp39_;
					GtkLabel* _tmp40_;
					GtkLabel* _tmp41_;
					GtkFrame* _tmp42_;
					BoxesProperty* _tmp43_;
					BoxesProperty* _tmp44_;
					SpiceUsbDeviceManager* _tmp45_;
					SpiceUsbDeviceManager* _tmp46_;
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_data75_ = g_slice_new0 (Block75Data);
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_data75_->_ref_count_ = 1;
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_data75_->self = g_object_ref (self);
#line 544 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp36_ = devs;
#line 544 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					vala_g_ptr_array_sort (_tmp36_, ______lambda87__gcompare_func);
#line 551 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp37_ = manager;
#line 551 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp38_ = devs;
#line 551 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp39_ = boxes_spice_display_create_usb_frame (self, _tmp37_, _tmp38_);
#line 551 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					frame = _tmp39_;
#line 553 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp40_ = (GtkLabel*) gtk_label_new ("");
#line 553 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					g_object_ref_sink (_tmp40_);
#line 553 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp41_ = _tmp40_;
#line 553 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp42_ = frame;
#line 553 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp43_ = boxes_iproperties_provider_add_property ((BoxesIPropertiesProvider*) self, &list, _ ("USB devices"), (GtkWidget*) _tmp41_, (GtkWidget*) _tmp42_);
#line 553 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp44_ = _tmp43_;
#line 553 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_object_unref0 (_tmp41_);
#line 553 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_data75_->usb_property = _tmp44_;
#line 555 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp45_ = manager;
#line 555 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					g_signal_connect_data (_tmp45_, "device-added", (GCallback) ______lambda90__spice_usb_device_manager_device_added, block75_data_ref (_data75_), (GClosureNotify) block75_data_unref, 0);
#line 558 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp46_ = manager;
#line 558 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					g_signal_connect_data (_tmp46_, "device-removed", (GCallback) ______lambda91__spice_usb_device_manager_device_removed, block75_data_ref (_data75_), (GClosureNotify) block75_data_unref, 0);
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_object_unref0 (frame);
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					block75_data_unref (_data75_);
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_data75_ = NULL;
#line 4366 "spice-display.c"
				}
#line 539 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_ptr_array_unref0 (devs);
#line 539 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_object_unref0 (manager);
#line 4372 "spice-display.c"
			}
			goto __finally85;
			__catch85_g_error:
			{
				GError* _error_ = NULL;
#line 539 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_error_ = _inner_error_;
#line 539 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_inner_error_ = NULL;
#line 539 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_error_free0 (_error_);
#line 4384 "spice-display.c"
			}
			__finally85:
#line 539 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 539 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				__g_list_free__g_object_unref0_0 (list);
#line 539 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				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);
#line 539 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_clear_error (&_inner_error_);
#line 539 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				return NULL;
#line 4397 "spice-display.c"
			}
#line 565 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp48_ = self->priv->webdav_channel;
#line 565 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (_tmp48_ == NULL) {
#line 565 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp47_ = TRUE;
#line 4405 "spice-display.c"
			} else {
				SpicePortChannel* _tmp49_;
				gboolean _tmp50_;
				gboolean _tmp51_;
#line 565 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp49_ = self->priv->webdav_channel;
#line 565 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_object_get (_tmp49_, "port-opened", &_tmp50_, NULL);
#line 565 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp51_ = _tmp50_;
#line 565 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp47_ = !_tmp51_;
#line 4418 "spice-display.c"
			}
#line 565 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (_tmp47_) {
#line 566 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 4424 "spice-display.c"
			}
#line 568 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp52_ = self->priv->session;
#line 568 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp53_ = self->priv->shared_folder;
#line 568 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_object_set (_tmp52_, "shared-dir", _tmp53_, NULL);
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp54_ = boxes_spice_display_create_shared_folders_frame (self);
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			frame = _tmp54_;
#line 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp55_ = (GtkLabel*) gtk_label_new ("");
#line 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_object_ref_sink (_tmp55_);
#line 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp56_ = _tmp55_;
#line 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp57_ = frame;
#line 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp58_ = boxes_iproperties_provider_add_property ((BoxesIPropertiesProvider*) self, &list, _ ("Folder Shares"), (GtkWidget*) _tmp56_, (GtkWidget*) _tmp57_);
#line 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp59_ = _tmp58_;
#line 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_object_unref0 (_tmp59_);
#line 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_object_unref0 (_tmp56_);
#line 573 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_object_unref0 (frame);
#line 573 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			break;
#line 4456 "spice-display.c"
		}
		default:
#line 515 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 4461 "spice-display.c"
	}
#line 576 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = list;
#line 576 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 4467 "spice-display.c"
}


static void
boxes_spice_display_real_send_keys (BoxesDisplay* base,
                                    guint* keyvals,
                                    int keyvals_length1)
{
	BoxesSpiceDisplay * self;
	SpiceDisplay* display = NULL;
	GtkWidget* _tmp0_;
	SpiceDisplay* _tmp1_;
#line 579 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 581 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = boxes_display_get_display ((BoxesDisplay*) self, 0);
#line 581 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, spice_display_get_type ()) ? ((SpiceDisplay*) _tmp0_) : NULL;
#line 581 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp1_ == NULL) {
#line 581 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (_tmp0_);
#line 4490 "spice-display.c"
	}
#line 581 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	display = _tmp1_;
#line 583 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	spice_display_send_keys (display, keyvals, keyvals_length1, SPICE_DISPLAY_KEY_EVENT_CLICK);
#line 579 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (display);
#line 4498 "spice-display.c"
}


static void
__vala_SpiceUsbDevice_free0_ (gpointer var)
{
#line 587 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	(var == NULL) ? NULL : (var = (_vala_SpiceUsbDevice_free (var), NULL));
#line 4507 "spice-display.c"
}


static gpointer
_libusb_ref_device0 (gpointer self)
{
#line 595 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return self ? libusb_ref_device (self) : NULL;
#line 4516 "spice-display.c"
}


static GPtrArray*
boxes_spice_display_get_usb_devices (BoxesSpiceDisplay* self,
                                     SpiceUsbDeviceManager* manager)
{
	GPtrArray* result = NULL;
	GPtrArray* ret = NULL;
	GPtrArray* _tmp0_;
	GPtrArray* devs = NULL;
	GPtrArray* _tmp1_;
	const gchar* _tmp2_;
#line 586 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 586 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (manager != NULL, NULL);
#line 587 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = g_ptr_array_new_full ((guint) 0, __vala_SpiceUsbDevice_free0_);
#line 587 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	ret = _tmp0_;
#line 588 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = spice_usb_device_manager_get_devices (manager);
#line 588 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	devs = _tmp1_;
#line 590 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = g_getenv ("BOXES_USB_REDIR_ALL");
#line 590 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp2_ != NULL) {
#line 591 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		result = devs;
#line 591 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_ptr_array_unref0 (ret);
#line 591 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return result;
#line 4552 "spice-display.c"
	}
	{
		gint i = 0;
#line 593 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		i = 0;
#line 4558 "spice-display.c"
		{
			gboolean _tmp3_ = FALSE;
#line 593 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp3_ = TRUE;
#line 593 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			while (TRUE) {
#line 4565 "spice-display.c"
				gint _tmp5_;
				GPtrArray* _tmp6_;
				gint _tmp7_;
				gint _tmp8_;
				SpiceUsbDevice* dev = NULL;
				GPtrArray* _tmp9_;
				gint _tmp10_;
				gconstpointer _tmp11_;
				SpiceUsbDevice* _tmp12_;
				libusb_device* libusb_dev = NULL;
				SpiceUsbDevice* _tmp13_;
				void* _tmp14_;
				libusb_device* _tmp15_;
				struct libusb_device_descriptor desc = {0};
				libusb_device* _tmp16_;
				struct libusb_device_descriptor _tmp17_ = {0};
				gint _tmp18_;
				struct libusb_device_descriptor _tmp19_;
				guint8 _tmp20_;
				struct libusb_device_descriptor _tmp21_;
				guint8 _tmp22_;
				struct libusb_device_descriptor _tmp23_;
				guint8 _tmp24_;
				struct libusb_device_descriptor _tmp25_;
				guint8 _tmp26_;
				GPtrArray* _tmp75_;
				SpiceUsbDevice* _tmp76_;
				SpiceUsbDevice* _tmp77_;
#line 593 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (!_tmp3_) {
#line 4596 "spice-display.c"
					gint _tmp4_;
#line 593 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp4_ = i;
#line 593 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					i = _tmp4_ + 1;
#line 4602 "spice-display.c"
				}
#line 593 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp3_ = FALSE;
#line 593 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp5_ = i;
#line 593 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp6_ = devs;
#line 593 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp7_ = g_ptr_array_get_length (_tmp6_);
#line 593 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp8_ = _tmp7_;
#line 593 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (!(_tmp5_ < _tmp8_)) {
#line 593 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					break;
#line 4618 "spice-display.c"
				}
#line 594 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp9_ = devs;
#line 594 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp10_ = i;
#line 594 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp11_ = g_ptr_array_index (_tmp9_, (guint) _tmp10_);
#line 594 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp12_ = __vala_SpiceUsbDevice_copy0 ((SpiceUsbDevice*) _tmp11_);
#line 594 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				dev = _tmp12_;
#line 595 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp13_ = dev;
#line 595 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp14_ = spice_usb_device_get_libusb_device (_tmp13_);
#line 595 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp15_ = _libusb_ref_device0 ((libusb_device*) _tmp14_);
#line 595 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				libusb_dev = _tmp15_;
#line 599 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp16_ = libusb_dev;
#line 599 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp18_ = libusb_get_device_descriptor (_tmp16_, &_tmp17_);
#line 599 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				desc = _tmp17_;
#line 599 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_tmp18_ != 0) {
#line 600 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_libusb_unref_device0 (libusb_dev);
#line 600 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					__vala_SpiceUsbDevice_free0 (dev);
#line 600 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					continue;
#line 4652 "spice-display.c"
				}
#line 602 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp19_ = desc;
#line 602 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp20_ = _tmp19_.bDeviceClass;
#line 602 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp21_ = desc;
#line 602 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp22_ = _tmp21_.bDeviceSubClass;
#line 602 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp23_ = desc;
#line 602 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp24_ = _tmp23_.bDeviceProtocol;
#line 602 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (boxes_spice_display_is_usb_kbd_or_mouse (self, _tmp20_, _tmp22_, _tmp24_)) {
#line 603 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_libusb_unref_device0 (libusb_dev);
#line 603 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					__vala_SpiceUsbDevice_free0 (dev);
#line 603 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					continue;
#line 4674 "spice-display.c"
				}
#line 606 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp25_ = desc;
#line 606 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp26_ = _tmp25_.bDeviceClass;
#line 606 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_tmp26_ == LIBUSB_CLASS_PER_INTERFACE) {
#line 4682 "spice-display.c"
					struct libusb_config_descriptor* config = NULL;
					libusb_device* _tmp27_;
					struct libusb_config_descriptor* _tmp28_ = NULL;
					gint _tmp29_;
					gboolean kbd_or_mouse = FALSE;
					gboolean _tmp74_;
#line 608 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp27_ = libusb_dev;
#line 608 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp29_ = libusb_get_active_config_descriptor (_tmp27_, &_tmp28_);
#line 608 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_libusb_free_config_descriptor0 (config);
#line 608 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					config = _tmp28_;
#line 608 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					if (_tmp29_ != 0) {
#line 609 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_libusb_free_config_descriptor0 (config);
#line 609 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_libusb_unref_device0 (libusb_dev);
#line 609 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						__vala_SpiceUsbDevice_free0 (dev);
#line 609 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						continue;
#line 4707 "spice-display.c"
					}
#line 611 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					kbd_or_mouse = FALSE;
#line 4711 "spice-display.c"
					{
						gint j = 0;
#line 612 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						j = 0;
#line 4716 "spice-display.c"
						{
							gboolean _tmp30_ = FALSE;
#line 612 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp30_ = TRUE;
#line 612 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							while (TRUE) {
#line 4723 "spice-display.c"
								gboolean _tmp32_ = FALSE;
								gint _tmp33_;
								struct libusb_config_descriptor* _tmp34_;
								struct libusb_interface* _tmp35_;
								gint _tmp35__length1;
#line 612 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								if (!_tmp30_) {
#line 4731 "spice-display.c"
									gint _tmp31_;
#line 612 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									_tmp31_ = j;
#line 612 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									j = _tmp31_ + 1;
#line 4737 "spice-display.c"
								}
#line 612 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								_tmp30_ = FALSE;
#line 612 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								_tmp33_ = j;
#line 612 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								_tmp34_ = config;
#line 612 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								_tmp35_ = _tmp34_->interface;
#line 612 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								_tmp35__length1 = _tmp34_->bNumInterfaces;
#line 612 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								if (_tmp33_ < _tmp35__length1) {
#line 4751 "spice-display.c"
									gboolean _tmp36_;
#line 612 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									_tmp36_ = kbd_or_mouse;
#line 612 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									_tmp32_ = !_tmp36_;
#line 4757 "spice-display.c"
								} else {
#line 612 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									_tmp32_ = FALSE;
#line 4761 "spice-display.c"
								}
#line 612 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								if (!_tmp32_) {
#line 612 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									break;
#line 4767 "spice-display.c"
								}
								{
									gint k = 0;
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									k = 0;
#line 4773 "spice-display.c"
									{
										gboolean _tmp37_ = FALSE;
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
										_tmp37_ = TRUE;
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
										while (TRUE) {
#line 4780 "spice-display.c"
											gboolean _tmp39_ = FALSE;
											gint _tmp40_;
											struct libusb_config_descriptor* _tmp41_;
											struct libusb_interface* _tmp42_;
											gint _tmp42__length1;
											gint _tmp43_;
											struct libusb_interface _tmp44_;
											struct libusb_interface_descriptor* _tmp45_;
											gint _tmp45__length1;
											guint8 class = 0U;
											struct libusb_config_descriptor* _tmp47_;
											struct libusb_interface* _tmp48_;
											gint _tmp48__length1;
											gint _tmp49_;
											struct libusb_interface _tmp50_;
											struct libusb_interface_descriptor* _tmp51_;
											gint _tmp51__length1;
											gint _tmp52_;
											struct libusb_interface_descriptor _tmp53_;
											guint8 _tmp54_;
											guint8 subclass = 0U;
											struct libusb_config_descriptor* _tmp55_;
											struct libusb_interface* _tmp56_;
											gint _tmp56__length1;
											gint _tmp57_;
											struct libusb_interface _tmp58_;
											struct libusb_interface_descriptor* _tmp59_;
											gint _tmp59__length1;
											gint _tmp60_;
											struct libusb_interface_descriptor _tmp61_;
											guint8 _tmp62_;
											guint8 protocol = 0U;
											struct libusb_config_descriptor* _tmp63_;
											struct libusb_interface* _tmp64_;
											gint _tmp64__length1;
											gint _tmp65_;
											struct libusb_interface _tmp66_;
											struct libusb_interface_descriptor* _tmp67_;
											gint _tmp67__length1;
											gint _tmp68_;
											struct libusb_interface_descriptor _tmp69_;
											guint8 _tmp70_;
											guint8 _tmp71_;
											guint8 _tmp72_;
											guint8 _tmp73_;
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											if (!_tmp37_) {
#line 4828 "spice-display.c"
												gint _tmp38_;
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
												_tmp38_ = k;
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
												k = _tmp38_ + 1;
#line 4834 "spice-display.c"
											}
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp37_ = FALSE;
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp40_ = k;
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp41_ = config;
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp42_ = _tmp41_->interface;
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp42__length1 = _tmp41_->bNumInterfaces;
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp43_ = j;
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp44_ = _tmp42_[_tmp43_];
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp45_ = _tmp44_.altsetting;
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp45__length1 = _tmp44_.num_altsetting;
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											if (_tmp40_ < _tmp45__length1) {
#line 4856 "spice-display.c"
												gboolean _tmp46_;
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
												_tmp46_ = kbd_or_mouse;
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
												_tmp39_ = !_tmp46_;
#line 4862 "spice-display.c"
											} else {
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
												_tmp39_ = FALSE;
#line 4866 "spice-display.c"
											}
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											if (!_tmp39_) {
#line 613 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
												break;
#line 4872 "spice-display.c"
											}
#line 614 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp47_ = config;
#line 614 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp48_ = _tmp47_->interface;
#line 614 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp48__length1 = _tmp47_->bNumInterfaces;
#line 614 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp49_ = j;
#line 614 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp50_ = _tmp48_[_tmp49_];
#line 614 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp51_ = _tmp50_.altsetting;
#line 614 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp51__length1 = _tmp50_.num_altsetting;
#line 614 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp52_ = k;
#line 614 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp53_ = _tmp51_[_tmp52_];
#line 614 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp54_ = _tmp53_.bInterfaceClass;
#line 614 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											class = _tmp54_;
#line 615 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp55_ = config;
#line 615 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp56_ = _tmp55_->interface;
#line 615 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp56__length1 = _tmp55_->bNumInterfaces;
#line 615 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp57_ = j;
#line 615 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp58_ = _tmp56_[_tmp57_];
#line 615 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp59_ = _tmp58_.altsetting;
#line 615 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp59__length1 = _tmp58_.num_altsetting;
#line 615 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp60_ = k;
#line 615 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp61_ = _tmp59_[_tmp60_];
#line 615 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp62_ = _tmp61_.bInterfaceSubClass;
#line 615 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											subclass = _tmp62_;
#line 616 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp63_ = config;
#line 616 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp64_ = _tmp63_->interface;
#line 616 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp64__length1 = _tmp63_->bNumInterfaces;
#line 616 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp65_ = j;
#line 616 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp66_ = _tmp64_[_tmp65_];
#line 616 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp67_ = _tmp66_.altsetting;
#line 616 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp67__length1 = _tmp66_.num_altsetting;
#line 616 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp68_ = k;
#line 616 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp69_ = _tmp67_[_tmp68_];
#line 616 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp70_ = _tmp69_.bInterfaceProtocol;
#line 616 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											protocol = _tmp70_;
#line 618 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp71_ = class;
#line 618 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp72_ = subclass;
#line 618 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp73_ = protocol;
#line 618 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											kbd_or_mouse = boxes_spice_display_is_usb_kbd_or_mouse (self, _tmp71_, _tmp72_, _tmp73_);
#line 4948 "spice-display.c"
										}
									}
								}
							}
						}
					}
#line 622 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp74_ = kbd_or_mouse;
#line 622 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					if (_tmp74_) {
#line 623 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_libusb_free_config_descriptor0 (config);
#line 623 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_libusb_unref_device0 (libusb_dev);
#line 623 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						__vala_SpiceUsbDevice_free0 (dev);
#line 623 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						continue;
#line 4967 "spice-display.c"
					}
#line 606 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_libusb_free_config_descriptor0 (config);
#line 4971 "spice-display.c"
				}
#line 626 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp75_ = ret;
#line 626 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp76_ = dev;
#line 626 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp77_ = __vala_SpiceUsbDevice_copy0 (_tmp76_);
#line 626 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_ptr_array_add (_tmp75_, _tmp77_);
#line 593 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_libusb_unref_device0 (libusb_dev);
#line 593 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				__vala_SpiceUsbDevice_free0 (dev);
#line 4985 "spice-display.c"
			}
		}
	}
#line 629 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = ret;
#line 629 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_ptr_array_unref0 (devs);
#line 629 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 4995 "spice-display.c"
}


static Block77Data*
block77_data_ref (Block77Data* _data77_)
{
#line 632 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_atomic_int_inc (&_data77_->_ref_count_);
#line 632 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return _data77_;
#line 5006 "spice-display.c"
}


static void
block77_data_unref (void * _userdata_)
{
	Block77Data* _data77_;
	_data77_ = (Block77Data*) _userdata_;
#line 632 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (g_atomic_int_dec_and_test (&_data77_->_ref_count_)) {
#line 5017 "spice-display.c"
		BoxesSpiceDisplay* self;
#line 632 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		self = _data77_->self;
#line 632 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (_data77_->manager);
#line 632 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (self);
#line 632 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_slice_free (Block77Data, _data77_);
#line 5027 "spice-display.c"
	}
}


static Block78Data*
block78_data_ref (Block78Data* _data78_)
{
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_atomic_int_inc (&_data78_->_ref_count_);
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return _data78_;
#line 5039 "spice-display.c"
}


static void
block78_data_unref (void * _userdata_)
{
	Block78Data* _data78_;
	_data78_ = (Block78Data*) _userdata_;
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (g_atomic_int_dec_and_test (&_data78_->_ref_count_)) {
#line 5050 "spice-display.c"
		BoxesSpiceDisplay* self;
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		self = _data78_->_data77_->self;
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (_data78_->dev_toggle);
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		__vala_SpiceUsbDevice_free0 (_data78_->dev);
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		block77_data_unref (_data78_->_data77_);
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_data78_->_data77_ = NULL;
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_slice_free (Block78Data, _data78_);
#line 5064 "spice-display.c"
	}
}


static void
___lambda89_ (Block78Data* _data78_,
              GObject* obj,
              GAsyncResult* res)
{
	Block77Data* _data77_;
	BoxesSpiceDisplay* self;
	GError * _inner_error_ = NULL;
#line 658 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data77_ = _data78_->_data77_;
#line 658 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = _data77_->self;
#line 658 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (res != NULL);
#line 5083 "spice-display.c"
	{
#line 660 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		spice_usb_device_manager_connect_device_finish (_data77_->manager, res, &_inner_error_);
#line 660 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 5089 "spice-display.c"
			goto __catch86_g_error;
		}
	}
	goto __finally86;
	__catch86_g_error:
	{
		GError* err = NULL;
		GtkSwitch* _tmp0_;
		gchar* device_desc = NULL;
		SpiceUsbDevice* _tmp1_;
		gchar* _tmp2_;
		gchar* box_name = NULL;
		gchar* _tmp3_;
		gchar* msg = NULL;
		gchar* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		GError* _tmp12_;
		const gchar* _tmp13_;
#line 659 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		err = _inner_error_;
#line 659 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_inner_error_ = NULL;
#line 662 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp0_ = _data78_->dev_toggle;
#line 662 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		gtk_switch_set_active (_tmp0_, FALSE);
#line 663 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp1_ = _data78_->dev;
#line 663 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp2_ = spice_usb_device_get_description (_tmp1_, "%1$s %2$s");
#line 663 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		device_desc = _tmp2_;
#line 664 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp3_ = boxes_spice_display_get_box_name (self);
#line 664 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		box_name = _tmp3_;
#line 665 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp4_ = g_strdup (_ ("Redirection of USB device “%s” for “%s” failed"));
#line 665 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		msg = _tmp4_;
#line 666 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = msg;
#line 666 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp6_ = device_desc;
#line 666 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp7_ = box_name;
#line 666 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp8_ = g_strdup_printf (_tmp5_, _tmp6_, _tmp7_);
#line 666 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp9_ = _tmp8_;
#line 666 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_emit_by_name ((BoxesDisplay*) self, "got-error", _tmp9_);
#line 666 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_tmp9_);
#line 667 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp10_ = device_desc;
#line 667 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp11_ = box_name;
#line 667 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp12_ = err;
#line 667 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp13_ = _tmp12_->message;
#line 667 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_debug ("spice-display.vala:667: Error connecting %s to %s: %s", _tmp10_, _tmp11_, _tmp13_);
#line 659 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (msg);
#line 659 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (box_name);
#line 659 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (device_desc);
#line 659 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_error_free0 (err);
#line 5168 "spice-display.c"
	}
	__finally86:
#line 659 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 659 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		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);
#line 659 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_clear_error (&_inner_error_);
#line 659 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return;
#line 5179 "spice-display.c"
	}
}


static void
____lambda89__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
#line 658 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	___lambda89_ (self, source_object, res);
#line 658 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	block78_data_unref (self);
#line 5193 "spice-display.c"
}


static void
_____lambda88_ (Block78Data* _data78_)
{
	Block77Data* _data77_;
	BoxesSpiceDisplay* self;
	GtkSwitch* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
#line 656 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data77_ = _data78_->_data77_;
#line 656 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = _data77_->self;
#line 657 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = _data78_->dev_toggle;
#line 657 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = gtk_switch_get_active (_tmp0_);
#line 657 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = _tmp1_;
#line 657 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp2_) {
#line 5217 "spice-display.c"
		SpiceUsbDevice* _tmp3_;
#line 658 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp3_ = _data78_->dev;
#line 658 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		spice_usb_device_manager_connect_device_async (_data77_->manager, _tmp3_, NULL, ____lambda89__gasync_ready_callback, block78_data_ref (_data78_));
#line 5223 "spice-display.c"
	} else {
		SpiceUsbDevice* _tmp4_;
#line 673 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp4_ = _data78_->dev;
#line 673 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		spice_usb_device_manager_disconnect_device (_data77_->manager, _tmp4_);
#line 5230 "spice-display.c"
	}
}


static void
______lambda88__g_object_notify (GObject* _sender,
                                 GParamSpec* pspec,
                                 gpointer self)
{
#line 656 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_____lambda88_ (self);
#line 5242 "spice-display.c"
}


static GtkFrame*
boxes_spice_display_create_usb_frame (BoxesSpiceDisplay* self,
                                      SpiceUsbDeviceManager* manager,
                                      GPtrArray* devs)
{
	GtkFrame* result = NULL;
	Block77Data* _data77_;
	SpiceUsbDeviceManager* _tmp0_;
	GtkFrame* frame = NULL;
	GtkFrame* _tmp1_;
	GtkListBox* listbox = NULL;
	GtkListBox* _tmp2_;
	GtkListBox* _tmp3_;
	GtkFrame* _tmp4_;
	GtkListBox* _tmp5_;
#line 632 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 632 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (manager != NULL, NULL);
#line 632 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (devs != NULL, NULL);
#line 632 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data77_ = g_slice_new0 (Block77Data);
#line 632 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data77_->_ref_count_ = 1;
#line 632 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data77_->self = g_object_ref (self);
#line 632 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = _g_object_ref0 (manager);
#line 632 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (_data77_->manager);
#line 632 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data77_->manager = _tmp0_;
#line 633 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = (GtkFrame*) gtk_frame_new (NULL);
#line 633 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_ref_sink (_tmp1_);
#line 633 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	frame = _tmp1_;
#line 634 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = (GtkListBox*) gtk_list_box_new ();
#line 634 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_ref_sink (_tmp2_);
#line 634 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	listbox = _tmp2_;
#line 635 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = listbox;
#line 635 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	gtk_widget_set_hexpand ((GtkWidget*) _tmp3_, TRUE);
#line 636 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = frame;
#line 636 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = listbox;
#line 636 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	gtk_container_add ((GtkContainer*) _tmp4_, (GtkWidget*) _tmp5_);
#line 5301 "spice-display.c"
	{
		gint i = 0;
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		i = 0;
#line 5306 "spice-display.c"
		{
			gboolean _tmp6_ = FALSE;
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp6_ = TRUE;
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			while (TRUE) {
#line 5313 "spice-display.c"
				Block78Data* _data78_;
				gint _tmp8_;
				gint _tmp9_;
				gint _tmp10_;
				gint _tmp11_;
				gconstpointer _tmp12_;
				SpiceUsbDevice* _tmp13_;
				GtkBox* hbox = NULL;
				GtkBox* _tmp14_;
				GtkBox* _tmp15_;
				GtkBox* _tmp16_;
				GtkBox* _tmp17_;
				GtkBox* _tmp18_;
				GtkLabel* label = NULL;
				SpiceUsbDevice* _tmp19_;
				gchar* _tmp20_;
				gchar* _tmp21_;
				GtkLabel* _tmp22_;
				GtkLabel* _tmp23_;
				GtkLabel* _tmp24_;
				GtkBox* _tmp25_;
				GtkLabel* _tmp26_;
				GtkSwitch* _tmp27_;
				GtkSwitch* _tmp28_;
				GtkBox* _tmp29_;
				GtkSwitch* _tmp30_;
				GtkListBox* _tmp31_;
				GtkBox* _tmp32_;
				GtkSwitch* _tmp33_;
				SpiceUsbDevice* _tmp34_;
				GtkSwitch* _tmp35_;
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_data78_ = g_slice_new0 (Block78Data);
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_data78_->_ref_count_ = 1;
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_data78_->_data77_ = block77_data_ref (_data77_);
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (!_tmp6_) {
#line 5353 "spice-display.c"
					gint _tmp7_;
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp7_ = i;
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					i = _tmp7_ + 1;
#line 5359 "spice-display.c"
				}
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp6_ = FALSE;
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp8_ = i;
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp9_ = g_ptr_array_get_length (devs);
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp10_ = _tmp9_;
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (!(_tmp8_ < _tmp10_)) {
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					block78_data_unref (_data78_);
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_data78_ = NULL;
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					break;
#line 5377 "spice-display.c"
				}
#line 639 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp11_ = i;
#line 639 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp12_ = g_ptr_array_index (devs, (guint) _tmp11_);
#line 639 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp13_ = __vala_SpiceUsbDevice_copy0 ((SpiceUsbDevice*) _tmp12_);
#line 639 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_data78_->dev = _tmp13_;
#line 641 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp14_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
#line 641 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_object_ref_sink (_tmp14_);
#line 641 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				hbox = _tmp14_;
#line 642 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp15_ = hbox;
#line 642 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				gtk_widget_set_margin_start ((GtkWidget*) _tmp15_, 12);
#line 643 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp16_ = hbox;
#line 643 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				gtk_widget_set_margin_end ((GtkWidget*) _tmp16_, 12);
#line 644 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp17_ = hbox;
#line 644 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				gtk_widget_set_margin_top ((GtkWidget*) _tmp17_, 6);
#line 645 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp18_ = hbox;
#line 645 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				gtk_widget_set_margin_bottom ((GtkWidget*) _tmp18_, 6);
#line 646 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp19_ = _data78_->dev;
#line 646 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp20_ = spice_usb_device_get_description (_tmp19_, "%1$s %2$s");
#line 646 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp21_ = _tmp20_;
#line 646 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp22_ = (GtkLabel*) gtk_label_new (_tmp21_);
#line 646 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_object_ref_sink (_tmp22_);
#line 646 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp23_ = _tmp22_;
#line 646 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_free0 (_tmp21_);
#line 646 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				label = _tmp23_;
#line 647 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp24_ = label;
#line 647 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				gtk_widget_set_halign ((GtkWidget*) _tmp24_, GTK_ALIGN_START);
#line 648 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp25_ = hbox;
#line 648 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp26_ = label;
#line 648 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				gtk_box_pack_start (_tmp25_, (GtkWidget*) _tmp26_, TRUE, TRUE, (guint) 0);
#line 649 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp27_ = (GtkSwitch*) gtk_switch_new ();
#line 649 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_object_ref_sink (_tmp27_);
#line 649 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_data78_->dev_toggle = _tmp27_;
#line 650 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp28_ = _data78_->dev_toggle;
#line 650 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				gtk_widget_set_halign ((GtkWidget*) _tmp28_, GTK_ALIGN_END);
#line 651 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp29_ = hbox;
#line 651 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp30_ = _data78_->dev_toggle;
#line 651 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				gtk_box_pack_start (_tmp29_, (GtkWidget*) _tmp30_, TRUE, TRUE, (guint) 0);
#line 652 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp31_ = listbox;
#line 652 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp32_ = hbox;
#line 652 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				gtk_list_box_prepend (_tmp31_, (GtkWidget*) _tmp32_);
#line 654 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp33_ = _data78_->dev_toggle;
#line 654 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp34_ = _data78_->dev;
#line 654 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				gtk_switch_set_active (_tmp33_, spice_usb_device_manager_is_device_connected (_data77_->manager, _tmp34_));
#line 656 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp35_ = _data78_->dev_toggle;
#line 656 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_signal_connect_data ((GObject*) _tmp35_, "notify::active", (GCallback) ______lambda88__g_object_notify, block78_data_ref (_data78_), (GClosureNotify) block78_data_unref, 0);
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_object_unref0 (label);
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_object_unref0 (hbox);
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				block78_data_unref (_data78_);
#line 638 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_data78_ = NULL;
#line 5475 "spice-display.c"
			}
		}
	}
#line 678 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = frame;
#line 678 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (listbox);
#line 678 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	block77_data_unref (_data77_);
#line 678 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data77_ = NULL;
#line 678 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 5489 "spice-display.c"
}


static Block79Data*
block79_data_ref (Block79Data* _data79_)
{
#line 681 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_atomic_int_inc (&_data79_->_ref_count_);
#line 681 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return _data79_;
#line 5500 "spice-display.c"
}


static void
block79_data_unref (void * _userdata_)
{
	Block79Data* _data79_;
	_data79_ = (Block79Data*) _userdata_;
#line 681 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (g_atomic_int_dec_and_test (&_data79_->_ref_count_)) {
#line 5511 "spice-display.c"
		BoxesSpiceDisplay* self;
#line 681 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		self = _data79_->self;
#line 681 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (_data79_->popover);
#line 681 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (_data79_->button_plus);
#line 681 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (_data79_->listbox);
#line 681 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (self);
#line 681 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_slice_free (Block79Data, _data79_);
#line 5525 "spice-display.c"
	}
}


static void
__lambda92_ (Block79Data* _data79_)
{
	BoxesSpiceDisplay* self;
	BoxesSharedFolderPopover* _tmp0_;
	GtkButton* _tmp1_;
	BoxesSharedFolderPopover* _tmp2_;
	BoxesSharedFolderPopover* _tmp3_;
#line 695 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = _data79_->self;
#line 696 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = _data79_->popover;
#line 696 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = _data79_->button_plus;
#line 696 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	gtk_popover_set_relative_to ((GtkPopover*) _tmp0_, (GtkWidget*) _tmp1_);
#line 697 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = _data79_->popover;
#line 697 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_->target_position = -1;
#line 699 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = _data79_->popover;
#line 699 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	gtk_popover_popup ((GtkPopover*) _tmp3_);
#line 5554 "spice-display.c"
}


static void
___lambda92__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
#line 695 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	__lambda92_ (self);
#line 5564 "spice-display.c"
}


static void
__lambda93_ (Block79Data* _data79_,
             GtkListBoxRow* row)
{
	BoxesSpiceDisplay* self;
	BoxesSharedFolderPopover* _tmp0_;
	BoxesSharedFolderPopover* _tmp1_;
	BoxesSharedFolderRow* folder_row = NULL;
	BoxesSharedFolderRow* _tmp2_;
	BoxesSharedFolderPopover* _tmp3_;
	GtkFileChooserButton* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	BoxesSharedFolderPopover* _tmp9_;
	GtkEntry* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	BoxesSharedFolderPopover* _tmp13_;
#line 702 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = _data79_->self;
#line 702 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (row != NULL);
#line 703 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = _data79_->popover;
#line 703 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	gtk_popover_set_relative_to ((GtkPopover*) _tmp0_, (GtkWidget*) row);
#line 704 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = _data79_->popover;
#line 704 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_->target_position = gtk_list_box_row_get_index (row);
#line 706 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (row, BOXES_TYPE_SHARED_FOLDER_ROW) ? ((BoxesSharedFolderRow*) row) : NULL);
#line 706 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	folder_row = _tmp2_;
#line 707 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = _data79_->popover;
#line 707 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = _tmp3_->file_chooser_button;
#line 707 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = boxes_shared_folder_row_get_folder_path (folder_row);
#line 707 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = _tmp5_;
#line 707 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = g_strconcat ("file://", _tmp6_, NULL);
#line 707 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = _tmp7_;
#line 707 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	gtk_file_chooser_set_uri ((GtkFileChooser*) _tmp4_, _tmp8_);
#line 707 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (_tmp8_);
#line 708 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp9_ = _data79_->popover;
#line 708 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp10_ = _tmp9_->name_entry;
#line 708 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp11_ = boxes_shared_folder_row_get_folder_name (folder_row);
#line 708 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp12_ = _tmp11_;
#line 708 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	gtk_entry_set_text (_tmp10_, _tmp12_);
#line 710 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp13_ = _data79_->popover;
#line 710 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	gtk_popover_popup ((GtkPopover*) _tmp13_);
#line 702 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (folder_row);
#line 5636 "spice-display.c"
}


static void
___lambda93__gtk_list_box_row_activated (GtkListBox* _sender,
                                         GtkListBoxRow* row,
                                         gpointer self)
{
#line 702 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	__lambda93_ (self, row);
#line 5647 "spice-display.c"
}


static void
__lambda95_ (Block79Data* _data79_,
             const gchar* path,
             const gchar* name,
             gint target_position)
{
	BoxesSpiceDisplay* self;
#line 721 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = _data79_->self;
#line 721 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (path != NULL);
#line 721 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (name != NULL);
#line 723 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (target_position != -1) {
#line 5666 "spice-display.c"
		BoxesSharedFolderRow* row = NULL;
		GtkListBox* _tmp0_;
		GtkListBoxRow* _tmp1_;
		BoxesSharedFolderRow* _tmp2_;
		BoxesSharedFolderRow* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
#line 724 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp0_ = _data79_->listbox;
#line 724 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp1_ = gtk_list_box_get_row_at_index (_tmp0_, target_position);
#line 724 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, BOXES_TYPE_SHARED_FOLDER_ROW) ? ((BoxesSharedFolderRow*) _tmp1_) : NULL);
#line 724 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		row = _tmp2_;
#line 725 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp3_ = row;
#line 725 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp4_ = boxes_shared_folder_row_get_folder_name (_tmp3_);
#line 725 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = _tmp4_;
#line 725 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		boxes_spice_display_remove_shared_folder (self, _tmp5_);
#line 723 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (row);
#line 5692 "spice-display.c"
	}
#line 728 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (boxes_spice_display_add_shared_folder (self, path, name)) {
#line 5696 "spice-display.c"
		GtkListBox* _tmp6_;
#line 729 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp6_ = _data79_->listbox;
#line 729 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		boxes_spice_display_add_listbox_row (self, _tmp6_, path, name, target_position);
#line 5702 "spice-display.c"
	}
}


static void
___lambda95__boxes_shared_folder_popover_saved (BoxesSharedFolderPopover* _sender,
                                                const gchar* local_folder,
                                                const gchar* name,
                                                gint target_position,
                                                gpointer self)
{
#line 721 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	__lambda95_ (self, local_folder, name, target_position);
#line 5716 "spice-display.c"
}


static GtkFrame*
boxes_spice_display_create_shared_folders_frame (BoxesSpiceDisplay* self)
{
	GtkFrame* result = NULL;
	Block79Data* _data79_;
	GtkFrame* frame = NULL;
	GtkFrame* _tmp0_;
	GtkBox* box = NULL;
	GtkBox* _tmp1_;
	GtkListBox* _tmp2_;
	GtkButton* _tmp3_;
	GtkButton* _tmp4_;
	GtkButton* _tmp5_;
	GtkStyleContext* _tmp6_;
	GtkBox* _tmp7_;
	GtkListBox* _tmp8_;
	GtkBox* _tmp9_;
	GtkButton* _tmp10_;
	GtkFrame* _tmp11_;
	GtkBox* _tmp12_;
	BoxesSharedFolderPopover* _tmp13_;
	GtkButton* _tmp14_;
	GtkListBox* _tmp15_;
	GHashTable* hash = NULL;
	GHashTable* _tmp16_;
	GHashTable* _tmp17_;
	BoxesSharedFolderPopover* _tmp26_;
#line 681 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 681 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data79_ = g_slice_new0 (Block79Data);
#line 681 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data79_->_ref_count_ = 1;
#line 681 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data79_->self = g_object_ref (self);
#line 682 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = (GtkFrame*) gtk_frame_new (NULL);
#line 682 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_ref_sink (_tmp0_);
#line 682 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	frame = _tmp0_;
#line 683 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
#line 683 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_ref_sink (_tmp1_);
#line 683 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	box = _tmp1_;
#line 684 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = (GtkListBox*) gtk_list_box_new ();
#line 684 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_ref_sink (_tmp2_);
#line 684 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data79_->listbox = _tmp2_;
#line 685 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = (GtkButton*) gtk_button_new_from_icon_name ("list-add-symbolic", (GtkIconSize) GTK_ICON_SIZE_BUTTON);
#line 685 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_ref_sink (_tmp3_);
#line 685 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data79_->button_plus = _tmp3_;
#line 686 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = _data79_->button_plus;
#line 686 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_CENTER);
#line 687 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = _data79_->button_plus;
#line 687 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = gtk_widget_get_style_context ((GtkWidget*) _tmp5_);
#line 687 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	gtk_style_context_add_class (_tmp6_, "flat");
#line 689 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = box;
#line 689 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = _data79_->listbox;
#line 689 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	gtk_box_pack_start (_tmp7_, (GtkWidget*) _tmp8_, TRUE, TRUE, (guint) 0);
#line 690 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp9_ = box;
#line 690 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp10_ = _data79_->button_plus;
#line 690 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	gtk_box_pack_end (_tmp9_, (GtkWidget*) _tmp10_, FALSE, FALSE, (guint) 6);
#line 691 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp11_ = frame;
#line 691 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp12_ = box;
#line 691 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	gtk_container_add ((GtkContainer*) _tmp11_, (GtkWidget*) _tmp12_);
#line 693 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp13_ = boxes_shared_folder_popover_new ();
#line 693 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_ref_sink (_tmp13_);
#line 693 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data79_->popover = _tmp13_;
#line 695 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp14_ = _data79_->button_plus;
#line 695 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_connect_data (_tmp14_, "clicked", (GCallback) ___lambda92__gtk_button_clicked, block79_data_ref (_data79_), (GClosureNotify) block79_data_unref, 0);
#line 702 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp15_ = _data79_->listbox;
#line 702 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_connect_data (_tmp15_, "row-activated", (GCallback) ___lambda93__gtk_list_box_row_activated, block79_data_ref (_data79_), (GClosureNotify) block79_data_unref, 0);
#line 713 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp16_ = boxes_spice_display_get_shared_folders (self);
#line 713 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	hash = _tmp16_;
#line 714 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp17_ = hash;
#line 714 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp17_ != NULL) {
#line 5829 "spice-display.c"
		GList* keys = NULL;
		GHashTable* _tmp18_;
		GList* _tmp19_;
		GList* _tmp20_;
#line 715 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp18_ = hash;
#line 715 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp19_ = g_hash_table_get_keys (_tmp18_);
#line 715 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		keys = _tmp19_;
#line 716 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp20_ = keys;
#line 5842 "spice-display.c"
		{
			GList* key_collection = NULL;
			GList* key_it = NULL;
#line 716 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			key_collection = _tmp20_;
#line 716 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			for (key_it = key_collection; key_it != NULL; key_it = key_it->next) {
#line 5850 "spice-display.c"
				const gchar* key = NULL;
#line 716 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				key = (const gchar*) key_it->data;
#line 5854 "spice-display.c"
				{
					GtkListBox* _tmp21_;
					GHashTable* _tmp22_;
					const gchar* _tmp23_;
					gconstpointer _tmp24_;
					const gchar* _tmp25_;
#line 717 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp21_ = _data79_->listbox;
#line 717 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp22_ = hash;
#line 717 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp23_ = key;
#line 717 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp24_ = g_hash_table_lookup (_tmp22_, _tmp23_);
#line 717 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp25_ = key;
#line 717 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					boxes_spice_display_add_listbox_row (self, _tmp21_, (const gchar*) _tmp24_, _tmp25_, -1);
#line 5873 "spice-display.c"
				}
			}
		}
#line 714 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_list_free0 (keys);
#line 5879 "spice-display.c"
	}
#line 721 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp26_ = _data79_->popover;
#line 721 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_connect_data (_tmp26_, "saved", (GCallback) ___lambda95__boxes_shared_folder_popover_saved, block79_data_ref (_data79_), (GClosureNotify) block79_data_unref, 0);
#line 732 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = frame;
#line 732 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_hash_table_unref0 (hash);
#line 732 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (box);
#line 732 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	block79_data_unref (_data79_);
#line 732 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data79_ = NULL;
#line 732 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 5897 "spice-display.c"
}


static Block80Data*
block80_data_ref (Block80Data* _data80_)
{
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_atomic_int_inc (&_data80_->_ref_count_);
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return _data80_;
#line 5908 "spice-display.c"
}


static void
block80_data_unref (void * _userdata_)
{
	Block80Data* _data80_;
	_data80_ = (Block80Data*) _userdata_;
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (g_atomic_int_dec_and_test (&_data80_->_ref_count_)) {
#line 5919 "spice-display.c"
		BoxesSpiceDisplay* self;
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		self = _data80_->self;
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (_data80_->listboxrow);
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (_data80_->listbox);
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_data80_->name);
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (self);
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_slice_free (Block80Data, _data80_);
#line 5933 "spice-display.c"
	}
}


static void
__lambda94_ (Block80Data* _data80_)
{
	BoxesSpiceDisplay* self;
	BoxesSharedFolderRow* _tmp0_;
#line 743 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = _data80_->self;
#line 744 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = _data80_->listboxrow;
#line 744 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	gtk_container_remove ((GtkContainer*) _data80_->listbox, (GtkWidget*) _tmp0_);
#line 745 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_remove_shared_folder (self, _data80_->name);
#line 5951 "spice-display.c"
}


static void
___lambda94__boxes_shared_folder_row_removed (BoxesSharedFolderRow* _sender,
                                              gpointer self)
{
#line 743 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	__lambda94_ (self);
#line 5961 "spice-display.c"
}


static void
boxes_spice_display_add_listbox_row (BoxesSpiceDisplay* self,
                                     GtkListBox* listbox,
                                     const gchar* path,
                                     const gchar* name,
                                     gint target_position)
{
	Block80Data* _data80_;
	GtkListBox* _tmp0_;
	gchar* _tmp1_;
	BoxesSharedFolderRow* _tmp2_;
	BoxesSharedFolderRow* _tmp4_;
	BoxesSharedFolderRow* _tmp5_;
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (listbox != NULL);
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (path != NULL);
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (name != NULL);
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data80_ = g_slice_new0 (Block80Data);
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data80_->_ref_count_ = 1;
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data80_->self = g_object_ref (self);
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = _g_object_ref0 (listbox);
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (_data80_->listbox);
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data80_->listbox = _tmp0_;
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = g_strdup (name);
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (_data80_->name);
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data80_->name = _tmp1_;
#line 736 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = boxes_shared_folder_row_new (path, _data80_->name);
#line 736 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_ref_sink (_tmp2_);
#line 736 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data80_->listboxrow = _tmp2_;
#line 738 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (target_position != -1) {
#line 6012 "spice-display.c"
		GtkListBoxRow* _tmp3_;
#line 739 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp3_ = gtk_list_box_get_row_at_index (_data80_->listbox, target_position);
#line 739 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		gtk_container_remove ((GtkContainer*) _data80_->listbox, (GtkWidget*) _tmp3_);
#line 6018 "spice-display.c"
	}
#line 741 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = _data80_->listboxrow;
#line 741 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	gtk_list_box_insert (_data80_->listbox, (GtkWidget*) _tmp4_, target_position);
#line 743 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = _data80_->listboxrow;
#line 743 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_connect_data (_tmp5_, "removed", (GCallback) ___lambda94__boxes_shared_folder_row_removed, block80_data_ref (_data80_), (GClosureNotify) block80_data_unref, 0);
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	block80_data_unref (_data80_);
#line 735 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data80_ = NULL;
#line 6032 "spice-display.c"
}


static gboolean
boxes_spice_display_is_usb_kbd_or_mouse (BoxesSpiceDisplay* self,
                                         guint8 class,
                                         guint8 subclass,
                                         guint8 protocol)
{
	gboolean result = FALSE;
	gboolean ret = FALSE;
#line 749 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 750 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	ret = FALSE;
#line 752 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (class == LIBUSB_CLASS_HID) {
#line 753 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		switch (subclass) {
#line 753 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			case 0x00:
#line 6054 "spice-display.c"
			{
#line 755 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 6058 "spice-display.c"
			}
#line 753 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			case 0x01:
#line 6062 "spice-display.c"
			{
#line 757 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				switch (protocol) {
#line 757 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					case 0x00:
#line 6068 "spice-display.c"
					{
#line 759 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						break;
#line 6072 "spice-display.c"
					}
#line 757 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					case 0x01:
#line 757 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					case 0x02:
#line 6078 "spice-display.c"
					{
#line 762 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						ret = TRUE;
#line 763 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						break;
#line 6084 "spice-display.c"
					}
					default:
					{
#line 765 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						break;
#line 6090 "spice-display.c"
					}
				}
#line 767 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 6095 "spice-display.c"
			}
			default:
			{
#line 769 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 6101 "spice-display.c"
			}
		}
	}
#line 773 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = ret;
#line 773 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 6109 "spice-display.c"
}


static const gchar*
boxes_spice_display_real_get_protocol (BoxesDisplay* base)
{
	const gchar* result;
	BoxesSpiceDisplay* self;
#line 7 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 7 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = "SPICE";
#line 7 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 6124 "spice-display.c"
}


static gchar*
boxes_spice_display_real_get_uri (BoxesDisplay* base)
{
	gchar* result;
	BoxesSpiceDisplay* self;
	gboolean _tmp0_ = FALSE;
	SpiceSession* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gboolean _tmp5_;
	SpiceSession* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
#line 9 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 10 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = self->priv->session;
#line 10 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_get (_tmp1_, "port", &_tmp2_, NULL);
#line 10 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = _tmp2_;
#line 10 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = _tmp3_;
#line 10 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = _tmp4_ == NULL;
#line 10 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (_tmp4_);
#line 10 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp5_) {
#line 6158 "spice-display.c"
		SpiceSession* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
#line 10 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp6_ = self->priv->session;
#line 10 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_get (_tmp6_, "tls-port", &_tmp7_, NULL);
#line 10 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp8_ = _tmp7_;
#line 10 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp9_ = _tmp8_;
#line 10 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp0_ = _tmp9_ == NULL;
#line 10 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_tmp9_);
#line 6175 "spice-display.c"
	} else {
#line 10 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp0_ = FALSE;
#line 6179 "spice-display.c"
	}
#line 10 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp0_) {
#line 11 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		result = NULL;
#line 11 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return result;
#line 6187 "spice-display.c"
	}
#line 13 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp10_ = self->priv->session;
#line 13 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_get (_tmp10_, "uri", &_tmp11_, NULL);
#line 13 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp12_ = _tmp11_;
#line 13 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = _tmp12_;
#line 13 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 6199 "spice-display.c"
}


static gboolean
boxes_spice_display_real_get_can_transfer_files (BoxesDisplay* base)
{
	gboolean result;
	BoxesSpiceDisplay* self;
	SpiceMainChannel* _tmp0_;
	SpiceMainChannel* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
#line 16 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 16 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = boxes_spice_display_get_main_channel (self);
#line 16 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = _tmp0_;
#line 16 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_get (_tmp1_, "agent-connected", &_tmp2_, NULL);
#line 16 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = _tmp2_;
#line 16 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = _tmp3_;
#line 16 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 6226 "spice-display.c"
}


GByteArray*
boxes_spice_display_get_ca_cert (BoxesSpiceDisplay* self)
{
	GByteArray* result;
	SpiceSession* _tmp0_;
	GByteArray* _tmp1_;
	GByteArray* _tmp2_;
#line 17 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 17 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->session;
#line 17 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_get (_tmp0_, "ca", &_tmp1_, NULL);
#line 17 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = _tmp1_;
#line 17 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = _tmp2_;
#line 17 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 6249 "spice-display.c"
}


void
boxes_spice_display_set_ca_cert (BoxesSpiceDisplay* self,
                                 GByteArray* value)
{
	SpiceSession* _tmp0_;
#line 17 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 17 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->session;
#line 17 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_set (_tmp0_, "ca", value, NULL);
#line 17 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_notify_by_pspec ((GObject *) self, boxes_spice_display_properties[BOXES_SPICE_DISPLAY_CA_CERT_PROPERTY]);
#line 6266 "spice-display.c"
}


SpiceMainChannel*
boxes_spice_display_get_main_channel (BoxesSpiceDisplay* self)
{
	SpiceMainChannel* result;
	SpiceMainChannel* _tmp0_;
#line 77 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 78 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->_main_channel;
#line 78 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = _tmp0_;
#line 78 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 6283 "spice-display.c"
}


static void
_boxes_spice_display_main_event_spice_channel_channel_event (SpiceChannel* _sender,
                                                             SpiceChannelEvent event,
                                                             gpointer self)
{
#line 86 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_main_event ((BoxesSpiceDisplay*) self, event);
#line 6294 "spice-display.c"
}


static void
_boxes_spice_display_main_channel___lambda77_ (BoxesSpiceDisplay* self)
{
	SpiceMainChannel* _tmp0_;
	SpiceMainChannel* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
#line 88 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = boxes_spice_display_get_main_channel (self);
#line 88 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = _tmp0_;
#line 88 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_get (_tmp1_, "mouse-mode", &_tmp2_, NULL);
#line 88 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = _tmp2_;
#line 88 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_set_can_grab_mouse ((BoxesDisplay*) self, _tmp3_ != 2);
#line 6315 "spice-display.c"
}


static void
__boxes_spice_display_main_channel___lambda77__g_object_notify (GObject* _sender,
                                                                GParamSpec* pspec,
                                                                gpointer self)
{
#line 87 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_boxes_spice_display_main_channel___lambda77_ ((BoxesSpiceDisplay*) self);
#line 6326 "spice-display.c"
}


static void
_boxes_spice_display_on_new_file_transfer_spice_main_channel_new_file_transfer (SpiceMainChannel* _sender,
                                                                                GObject* task,
                                                                                gpointer self)
{
#line 92 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_on_new_file_transfer ((BoxesSpiceDisplay*) self, _sender, task);
#line 6337 "spice-display.c"
}


void
boxes_spice_display_set_main_channel (BoxesSpiceDisplay* self,
                                      SpiceMainChannel* value)
{
	SpiceMainChannel* _tmp0_;
	SpiceMainChannel* _tmp1_;
	SpiceMainChannel* _tmp2_;
	SpiceMainChannel* _tmp3_;
	gulong _tmp4_;
	SpiceMainChannel* _tmp5_;
	SpiceMainChannel* _tmp6_;
	gulong _tmp7_;
	SpiceMainChannel* _tmp8_;
	SpiceMainChannel* _tmp9_;
	gint _tmp10_;
	gint _tmp11_;
	SpiceMainChannel* _tmp12_;
	SpiceMainChannel* _tmp13_;
	gulong _tmp14_;
#line 81 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 82 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = _g_object_ref0 (value);
#line 82 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (self->priv->_main_channel);
#line 82 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->_main_channel = _tmp0_;
#line 83 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = self->priv->_main_channel;
#line 83 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp1_ == NULL) {
#line 84 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return;
#line 6374 "spice-display.c"
	}
#line 86 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = boxes_spice_display_get_main_channel (self);
#line 86 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = _tmp2_;
#line 86 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = g_signal_connect_object ((SpiceChannel*) _tmp3_, "channel-event", (GCallback) _boxes_spice_display_main_event_spice_channel_channel_event, self, 0);
#line 86 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->main_event_id = _tmp4_;
#line 87 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = boxes_spice_display_get_main_channel (self);
#line 87 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = _tmp5_;
#line 87 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = g_signal_connect_object ((GObject*) _tmp6_, "notify::mouse-mode", (GCallback) __boxes_spice_display_main_channel___lambda77__g_object_notify, self, 0);
#line 87 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->main_mouse_mode_id = _tmp7_;
#line 91 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = boxes_spice_display_get_main_channel (self);
#line 91 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp9_ = _tmp8_;
#line 91 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_get (_tmp9_, "mouse-mode", &_tmp10_, NULL);
#line 91 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp11_ = _tmp10_;
#line 91 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_set_can_grab_mouse ((BoxesDisplay*) self, _tmp11_ != 2);
#line 92 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp12_ = boxes_spice_display_get_main_channel (self);
#line 92 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp13_ = _tmp12_;
#line 92 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp14_ = g_signal_connect_object (_tmp13_, "new-file-transfer", (GCallback) _boxes_spice_display_on_new_file_transfer_spice_main_channel_new_file_transfer, self, 0);
#line 92 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->new_file_transfer_id = _tmp14_;
#line 81 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_notify_by_pspec ((GObject *) self, boxes_spice_display_properties[BOXES_SPICE_DISPLAY_MAIN_CHANNEL_PROPERTY]);
#line 6412 "spice-display.c"
}


static void
_boxes_spice_display____lambda96_ (BoxesSpiceDisplay* self,
                                   SpiceUsbDevice* dev,
                                   GError* err)
{
	gchar* device_description = NULL;
	gchar* _tmp0_;
	gchar* box_name = NULL;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
#line 65 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (dev != NULL);
#line 66 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = spice_usb_device_get_description (dev, "%1$s %2$s");
#line 66 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	device_description = _tmp0_;
#line 67 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = boxes_spice_display_get_box_name (self);
#line 67 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	box_name = _tmp1_;
#line 68 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = device_description;
#line 68 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = box_name;
#line 68 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = g_strdup_printf (_ ("Redirection of USB device “%s” for “%s” failed"), _tmp2_, _tmp3_);
#line 68 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = _tmp4_;
#line 68 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_emit_by_name ((BoxesDisplay*) self, "got-error", _tmp5_);
#line 68 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (_tmp5_);
#line 69 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = device_description;
#line 69 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = box_name;
#line 69 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = err->message;
#line 69 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_debug ("spice-display.vala:69: Error connecting %s to %s: %s", _tmp6_, _tmp7_, _tmp8_);
#line 65 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (box_name);
#line 65 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (device_description);
#line 6466 "spice-display.c"
}


static void
__boxes_spice_display____lambda96__spice_usb_device_manager_device_error (SpiceUsbDeviceManager* _sender,
                                                                          SpiceUsbDevice* device,
                                                                          GError* _error_,
                                                                          gpointer self)
{
#line 65 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_boxes_spice_display____lambda96_ ((BoxesSpiceDisplay*) self, device, _error_);
#line 6478 "spice-display.c"
}


static GObject *
boxes_spice_display_constructor (GType type,
                                 guint n_construct_properties,
                                 GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	BoxesSpiceDisplay * self;
	gchar* _tmp0_;
	GValue _tmp1_ = {0};
	BoxesBoxConfigSavedProperty _tmp2_ = {0};
	BoxesBoxConfigSavedProperty* _tmp3_;
	SpiceSession* _tmp4_;
	SpiceSession* _tmp5_;
	SpiceAudio* _tmp6_;
	SpiceSession* _tmp7_;
	SpiceGtkSession* _tmp8_;
	SpiceSession* _tmp9_;
	GError * _inner_error_ = NULL;
#line 51 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	parent_class = G_OBJECT_CLASS (boxes_spice_display_parent_class);
#line 51 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 51 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_SPICE_DISPLAY, BoxesSpiceDisplay);
#line 52 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = g_strdup ("auto-clipboard");
#line 52 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_value_init (&_tmp1_, G_TYPE_BOOLEAN);
#line 52 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_value_set_boolean (&_tmp1_, TRUE);
#line 52 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	memset (&_tmp2_, 0, sizeof (BoxesBoxConfigSavedProperty));
#line 52 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (_tmp2_.name);
#line 52 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_.name = _tmp0_;
#line 52 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	G_IS_VALUE (&_tmp2_.default_value) ? (g_value_unset (&_tmp2_.default_value), NULL) : NULL;
#line 52 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_.default_value = _tmp1_;
#line 52 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = g_new0 (BoxesBoxConfigSavedProperty, 1);
#line 52 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_[0] = _tmp2_;
#line 52 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->gtk_session_saved_properties = (_vala_BoxesBoxConfigSavedProperty_array_free (self->priv->gtk_session_saved_properties, self->priv->gtk_session_saved_properties_length1), NULL);
#line 52 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->gtk_session_saved_properties = _tmp3_;
#line 52 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->gtk_session_saved_properties_length1 = 1;
#line 52 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->_gtk_session_saved_properties_size_ = self->priv->gtk_session_saved_properties_length1;
#line 56 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_set_need_password ((BoxesDisplay*) self, FALSE);
#line 57 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = spice_session_new ();
#line 57 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (self->priv->session);
#line 57 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->session = _tmp4_;
#line 58 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = self->priv->session;
#line 58 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = spice_audio_get (_tmp5_, NULL);
#line 58 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->audio = _tmp6_;
#line 59 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = self->priv->session;
#line 59 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = spice_gtk_session_get (_tmp7_);
#line 59 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->gtk_session = _tmp8_;
#line 61 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp9_ = self->priv->session;
#line 61 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	spice_set_session_option (_tmp9_);
#line 6559 "spice-display.c"
	{
		SpiceUsbDeviceManager* manager = NULL;
		SpiceSession* _tmp10_;
		SpiceUsbDeviceManager* _tmp11_;
		SpiceUsbDeviceManager* _tmp12_;
		SpiceUsbDeviceManager* _tmp13_;
#line 63 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp10_ = self->priv->session;
#line 63 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp11_ = spice_usb_device_manager_get (_tmp10_, &_inner_error_);
#line 63 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp12_ = _g_object_ref0 (_tmp11_);
#line 63 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		manager = _tmp12_;
#line 63 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 6576 "spice-display.c"
			goto __catch87_g_error;
		}
#line 65 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp13_ = manager;
#line 65 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_connect_object (_tmp13_, "device-error", (GCallback) __boxes_spice_display____lambda96__spice_usb_device_manager_device_error, self, 0);
#line 62 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (manager);
#line 6585 "spice-display.c"
	}
	goto __finally87;
	__catch87_g_error:
	{
		GError* _error_ = NULL;
#line 62 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_error_ = _inner_error_;
#line 62 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_inner_error_ = NULL;
#line 62 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_error_free0 (_error_);
#line 6597 "spice-display.c"
	}
	__finally87:
#line 62 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 62 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		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);
#line 62 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_clear_error (&_inner_error_);
#line 6606 "spice-display.c"
	}
#line 51 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return obj;
#line 6610 "spice-display.c"
}


static void
boxes_spice_display_class_init (BoxesSpiceDisplayClass * klass)
{
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_parent_class = g_type_class_peek_parent (klass);
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_type_class_add_private (klass, sizeof (BoxesSpiceDisplayPrivate));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	((BoxesDisplayClass *) klass)->get_display = (GtkWidget* (*) (BoxesDisplay *, gint)) boxes_spice_display_real_get_display;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	((BoxesDisplayClass *) klass)->should_keep_alive = (gboolean (*) (BoxesDisplay *)) boxes_spice_display_real_should_keep_alive;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	((BoxesDisplayClass *) klass)->set_enable_audio = (void (*) (BoxesDisplay *, gboolean)) boxes_spice_display_real_set_enable_audio;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	((BoxesDisplayClass *) klass)->get_pixbuf = (GdkPixbuf* (*) (BoxesDisplay *, gint, GError**)) boxes_spice_display_real_get_pixbuf;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	((BoxesDisplayClass *) klass)->collect_logs = (void (*) (BoxesDisplay *, GString*)) boxes_spice_display_real_collect_logs;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	((BoxesDisplayClass *) klass)->connect_it = (void (*) (BoxesDisplay *, BoxesDisplayOpenFDFunc, void*, GDestroyNotify, GError**)) boxes_spice_display_real_connect_it;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	((BoxesDisplayClass *) klass)->disconnect_it = (void (*) (BoxesDisplay *)) boxes_spice_display_real_disconnect_it;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	((BoxesDisplayClass *) klass)->transfer_files = (void (*) (BoxesDisplay *, GList*)) boxes_spice_display_real_transfer_files;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	((BoxesDisplayClass *) klass)->get_properties = (GList* (*) (BoxesDisplay *, BoxesPropertiesPage)) boxes_spice_display_real_get_properties;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	((BoxesDisplayClass *) klass)->send_keys = (void (*) (BoxesDisplay *, guint*, int)) boxes_spice_display_real_send_keys;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	BOXES_DISPLAY_CLASS (klass)->get_protocol = boxes_spice_display_real_get_protocol;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	BOXES_DISPLAY_CLASS (klass)->get_uri = boxes_spice_display_real_get_uri;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	BOXES_DISPLAY_CLASS (klass)->get_can_transfer_files = boxes_spice_display_real_get_can_transfer_files;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_spice_display_get_property;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_spice_display_set_property;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	G_OBJECT_CLASS (klass)->constructor = boxes_spice_display_constructor;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_spice_display_finalize;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_SPICE_DISPLAY_PROTOCOL_PROPERTY, boxes_spice_display_properties[BOXES_SPICE_DISPLAY_PROTOCOL_PROPERTY] = g_param_spec_string ("protocol", "protocol", "protocol", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_SPICE_DISPLAY_URI_PROPERTY, boxes_spice_display_properties[BOXES_SPICE_DISPLAY_URI_PROPERTY] = g_param_spec_string ("uri", "uri", "uri", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_SPICE_DISPLAY_CAN_TRANSFER_FILES_PROPERTY, boxes_spice_display_properties[BOXES_SPICE_DISPLAY_CAN_TRANSFER_FILES_PROPERTY] = g_param_spec_boolean ("can-transfer-files", "can-transfer-files", "can-transfer-files", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_SPICE_DISPLAY_CA_CERT_PROPERTY, boxes_spice_display_properties[BOXES_SPICE_DISPLAY_CA_CERT_PROPERTY] = g_param_spec_boxed ("ca-cert", "ca-cert", "ca-cert", G_TYPE_BYTE_ARRAY, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_SPICE_DISPLAY_MAIN_CHANNEL_PROPERTY, boxes_spice_display_properties[BOXES_SPICE_DISPLAY_MAIN_CHANNEL_PROPERTY] = g_param_spec_object ("main-channel", "main-channel", "main-channel", spice_main_channel_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 6665 "spice-display.c"
}


static void
boxes_spice_display_instance_init (BoxesSpiceDisplay * self)
{
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv = BOXES_SPICE_DISPLAY_GET_PRIVATE (self);
#line 6674 "spice-display.c"
}


static void
boxes_spice_display_finalize (GObject * obj)
{
	BoxesSpiceDisplay * self;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_SPICE_DISPLAY, BoxesSpiceDisplay);
#line 114 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_main_cleanup (self);
#line 21 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (self->priv->session);
#line 26 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->display_saved_properties = (_vala_BoxesBoxConfigSavedProperty_array_free (self->priv->display_saved_properties, self->priv->display_saved_properties_length1), NULL);
#line 27 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->gtk_session_saved_properties = (_vala_BoxesBoxConfigSavedProperty_array_free (self->priv->gtk_session_saved_properties, self->priv->gtk_session_saved_properties_length1), NULL);
#line 30 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (self->priv->webdav_channel);
#line 31 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (self->priv->shared_folder);
#line 32 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (self->priv->shared_folder_settings);
#line 34 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_hash_table_unref0 (self->priv->channel_handlers);
#line 35 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	(self->priv->open_fd_target_destroy_notify == NULL) ? NULL : (self->priv->open_fd_target_destroy_notify (self->priv->open_fd_target), NULL);
#line 35 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd = NULL;
#line 35 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target = NULL;
#line 35 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target_destroy_notify = NULL;
#line 75 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (self->priv->_main_channel);
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	G_OBJECT_CLASS (boxes_spice_display_parent_class)->finalize (obj);
#line 6712 "spice-display.c"
}


GType
boxes_spice_display_get_type (void)
{
	static volatile gsize boxes_spice_display_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_spice_display_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesSpiceDisplayClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_spice_display_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesSpiceDisplay), 0, (GInstanceInitFunc) boxes_spice_display_instance_init, NULL };
		GType boxes_spice_display_type_id;
		boxes_spice_display_type_id = g_type_register_static (BOXES_TYPE_DISPLAY, "BoxesSpiceDisplay", &g_define_type_info, 0);
		g_once_init_leave (&boxes_spice_display_type_id__volatile, boxes_spice_display_type_id);
	}
	return boxes_spice_display_type_id__volatile;
}


static void
_vala_boxes_spice_display_get_property (GObject * object,
                                        guint property_id,
                                        GValue * value,
                                        GParamSpec * pspec)
{
	BoxesSpiceDisplay * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_SPICE_DISPLAY, BoxesSpiceDisplay);
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	switch (property_id) {
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_SPICE_DISPLAY_PROTOCOL_PROPERTY:
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_value_set_string (value, boxes_display_get_protocol ((BoxesDisplay*) self));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_SPICE_DISPLAY_URI_PROPERTY:
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_value_take_string (value, boxes_display_get_uri ((BoxesDisplay*) self));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_SPICE_DISPLAY_CAN_TRANSFER_FILES_PROPERTY:
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_value_set_boolean (value, boxes_display_get_can_transfer_files ((BoxesDisplay*) self));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_SPICE_DISPLAY_CA_CERT_PROPERTY:
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_value_take_boxed (value, boxes_spice_display_get_ca_cert (self));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_SPICE_DISPLAY_MAIN_CHANNEL_PROPERTY:
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_value_set_object (value, boxes_spice_display_get_main_channel (self));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 6770 "spice-display.c"
		default:
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 6776 "spice-display.c"
	}
}


static void
_vala_boxes_spice_display_set_property (GObject * object,
                                        guint property_id,
                                        const GValue * value,
                                        GParamSpec * pspec)
{
	BoxesSpiceDisplay * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_SPICE_DISPLAY, BoxesSpiceDisplay);
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	switch (property_id) {
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_SPICE_DISPLAY_CA_CERT_PROPERTY:
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		boxes_spice_display_set_ca_cert (self, g_value_get_boxed (value));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_SPICE_DISPLAY_MAIN_CHANNEL_PROPERTY:
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		boxes_spice_display_set_main_channel (self, g_value_get_object (value));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 6803 "spice-display.c"
		default:
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 6809 "spice-display.c"
	}
}


static void
_boxes_spice_channel_handler_on_open_fd_spice_channel_open_fd (SpiceChannel* _sender,
                                                               gint with_tls,
                                                               gpointer self)
{
#line 789 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_channel_handler_on_open_fd ((BoxesSpiceChannelHandler*) self, _sender, with_tls);
#line 6821 "spice-display.c"
}


static void
_boxes_spice_channel_handler_on_display_ready_g_object_notify (GObject* _sender,
                                                               GParamSpec* pspec,
                                                               gpointer self)
{
#line 799 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_channel_handler_on_display_ready ((BoxesSpiceChannelHandler*) self, _sender, pspec);
#line 6832 "spice-display.c"
}


BoxesSpiceChannelHandler*
boxes_spice_channel_handler_construct (GType object_type,
                                       BoxesSpiceDisplay* display,
                                       SpiceChannel* channel,
                                       BoxesDisplayOpenFDFunc open_fd,
                                       void* open_fd_target)
{
	BoxesSpiceChannelHandler * self = NULL;
	SpiceChannel* _tmp0_;
	gint id = 0;
	gint _tmp1_;
	gint _tmp2_;
#line 782 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (display != NULL, NULL);
#line 782 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (channel != NULL, NULL);
#line 782 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceChannelHandler*) g_object_new (object_type, NULL);
#line 783 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->display = display;
#line 784 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = _g_object_ref0 (channel);
#line 784 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (self->priv->channel);
#line 784 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->channel = _tmp0_;
#line 785 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	(self->priv->open_fd_target_destroy_notify == NULL) ? NULL : (self->priv->open_fd_target_destroy_notify (self->priv->open_fd_target), NULL);
#line 785 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd = NULL;
#line 785 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target = NULL;
#line 785 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target_destroy_notify = NULL;
#line 785 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd = open_fd;
#line 785 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target = open_fd_target;
#line 785 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target_destroy_notify = NULL;
#line 786 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_get (channel, "channel-id", &_tmp1_, NULL);
#line 786 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = _tmp1_;
#line 786 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	id = _tmp2_;
#line 788 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (open_fd != NULL) {
#line 789 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_connect_object (channel, "open-fd", (GCallback) _boxes_spice_channel_handler_on_open_fd_spice_channel_open_fd, self, 0);
#line 6886 "spice-display.c"
	}
#line 791 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (channel, spice_main_channel_get_type ())) {
#line 792 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		boxes_spice_display_set_main_channel (display, G_TYPE_CHECK_INSTANCE_TYPE (channel, spice_main_channel_get_type ()) ? ((SpiceMainChannel*) channel) : NULL);
#line 6892 "spice-display.c"
	}
#line 794 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (channel, spice_display_channel_get_type ())) {
#line 6896 "spice-display.c"
		gint _tmp3_;
		SpiceDisplay* spice_display = NULL;
		gint _tmp4_;
		GtkWidget* _tmp5_;
		SpiceDisplay* _tmp6_;
		SpiceDisplay* _tmp7_;
#line 795 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp3_ = id;
#line 795 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp3_ != 0) {
#line 796 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			return self;
#line 6909 "spice-display.c"
		}
#line 798 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp4_ = id;
#line 798 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = boxes_display_get_display ((BoxesDisplay*) display, _tmp4_);
#line 798 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp6_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, spice_display_get_type ()) ? ((SpiceDisplay*) _tmp5_) : NULL;
#line 798 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp6_ == NULL) {
#line 798 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_object_unref0 (_tmp5_);
#line 6921 "spice-display.c"
		}
#line 798 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		spice_display = _tmp6_;
#line 799 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp7_ = spice_display;
#line 799 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_connect_object ((GObject*) _tmp7_, "notify::ready", (GCallback) _boxes_spice_channel_handler_on_display_ready_g_object_notify, self, 0);
#line 794 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (spice_display);
#line 6931 "spice-display.c"
	}
#line 802 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (channel, spice_webdav_channel_get_type ())) {
#line 803 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (open_fd != NULL) {
#line 804 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			boxes_spice_channel_handler_on_open_fd (self, channel, 0);
#line 6939 "spice-display.c"
		} else {
#line 806 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			spice_channel_connect (channel);
#line 6943 "spice-display.c"
		}
	}
#line 782 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return self;
#line 6948 "spice-display.c"
}


BoxesSpiceChannelHandler*
boxes_spice_channel_handler_new (BoxesSpiceDisplay* display,
                                 SpiceChannel* channel,
                                 BoxesDisplayOpenFDFunc open_fd,
                                 void* open_fd_target)
{
#line 782 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return boxes_spice_channel_handler_construct (BOXES_TYPE_SPICE_CHANNEL_HANDLER, display, channel, open_fd, open_fd_target);
#line 6960 "spice-display.c"
}


static void
boxes_spice_channel_handler_on_display_ready (BoxesSpiceChannelHandler* self,
                                              GObject* object,
                                              GParamSpec* param_spec)
{
	SpiceDisplay* spice_display = NULL;
	SpiceDisplay* _tmp0_;
	SpiceDisplay* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
#line 810 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 810 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (object != NULL);
#line 810 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (param_spec != NULL);
#line 811 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, spice_display_get_type ()) ? ((SpiceDisplay*) object) : NULL);
#line 811 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	spice_display = _tmp0_;
#line 812 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = spice_display;
#line 812 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_get (_tmp1_, "ready", &_tmp2_, NULL);
#line 812 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = _tmp2_;
#line 812 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp3_) {
#line 6992 "spice-display.c"
		BoxesSpiceDisplay* _tmp4_;
		SpiceDisplay* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
#line 813 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp4_ = self->priv->display;
#line 813 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = spice_display;
#line 813 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_get (_tmp5_, "channel-id", &_tmp6_, NULL);
#line 813 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp7_ = _tmp6_;
#line 813 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_emit_by_name ((BoxesDisplay*) _tmp4_, "show", _tmp7_);
#line 7007 "spice-display.c"
	} else {
		BoxesSpiceDisplay* _tmp8_;
		SpiceDisplay* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
#line 815 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp8_ = self->priv->display;
#line 815 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp9_ = spice_display;
#line 815 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_get (_tmp9_, "channel-id", &_tmp10_, NULL);
#line 815 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp11_ = _tmp10_;
#line 815 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_emit_by_name ((BoxesDisplay*) _tmp8_, "hide", _tmp11_);
#line 7023 "spice-display.c"
	}
#line 810 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (spice_display);
#line 7027 "spice-display.c"
}


static void
boxes_spice_channel_handler_on_open_fd (BoxesSpiceChannelHandler* self,
                                        SpiceChannel* channel,
                                        gint with_tls)
{
	gint fd = 0;
	BoxesDisplayOpenFDFunc _tmp0_;
	void* _tmp0__target;
#line 818 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 818 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (channel != NULL);
#line 821 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->open_fd;
#line 821 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0__target = self->priv->open_fd_target;
#line 821 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	fd = _tmp0_ (_tmp0__target);
#line 822 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	spice_channel_open_fd (channel, fd);
#line 7051 "spice-display.c"
}


static void
boxes_spice_channel_handler_class_init (BoxesSpiceChannelHandlerClass * klass)
{
#line 777 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_channel_handler_parent_class = g_type_class_peek_parent (klass);
#line 777 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_type_class_add_private (klass, sizeof (BoxesSpiceChannelHandlerPrivate));
#line 777 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_spice_channel_handler_finalize;
#line 7064 "spice-display.c"
}


static void
boxes_spice_channel_handler_instance_init (BoxesSpiceChannelHandler * self)
{
#line 777 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv = BOXES_SPICE_CHANNEL_HANDLER_GET_PRIVATE (self);
#line 7073 "spice-display.c"
}


static void
boxes_spice_channel_handler_finalize (GObject * obj)
{
	BoxesSpiceChannelHandler * self;
#line 777 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_SPICE_CHANNEL_HANDLER, BoxesSpiceChannelHandler);
#line 779 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (self->priv->channel);
#line 780 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	(self->priv->open_fd_target_destroy_notify == NULL) ? NULL : (self->priv->open_fd_target_destroy_notify (self->priv->open_fd_target), NULL);
#line 780 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd = NULL;
#line 780 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target = NULL;
#line 780 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target_destroy_notify = NULL;
#line 777 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	G_OBJECT_CLASS (boxes_spice_channel_handler_parent_class)->finalize (obj);
#line 7095 "spice-display.c"
}


GType
boxes_spice_channel_handler_get_type (void)
{
	static volatile gsize boxes_spice_channel_handler_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_spice_channel_handler_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesSpiceChannelHandlerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_spice_channel_handler_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesSpiceChannelHandler), 0, (GInstanceInitFunc) boxes_spice_channel_handler_instance_init, NULL };
		GType boxes_spice_channel_handler_type_id;
		boxes_spice_channel_handler_type_id = g_type_register_static (G_TYPE_OBJECT, "BoxesSpiceChannelHandler", &g_define_type_info, 0);
		g_once_init_leave (&boxes_spice_channel_handler_type_id__volatile, boxes_spice_channel_handler_type_id);
	}
	return boxes_spice_channel_handler_type_id__volatile;
}


static gint*
_int_dup (gint* self)
{
	gint* dup;
#line 835 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	dup = g_new0 (gint, 1);
#line 835 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	memcpy (dup, self, sizeof (gint));
#line 835 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return dup;
#line 7123 "spice-display.c"
}


static gpointer
__int_dup0 (gpointer self)
{
#line 835 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return self ? _int_dup (self) : NULL;
#line 7132 "spice-display.c"
}


void
spice_validate_uri (const gchar* uri_as_text,
                    gint** port,
                    gint** tls_port,
                    GError** error)
{
	gint* _vala_port = NULL;
	gint* _vala_tls_port = NULL;
	xmlURI* uri = NULL;
	xmlURI* _tmp0_;
	xmlURI* _tmp1_;
	gint _tmp3_;
	gint* _tmp4_;
	xmlURI* _tmp5_;
	gint _tmp6_;
	gint* _tmp7_;
	const gchar* _tmp8_ = NULL;
	xmlURI* _tmp9_;
	const gchar* _tmp10_;
	gchar* query_str = NULL;
	gchar* _tmp13_;
	const gchar* _tmp14_;
	xmlURI* _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	GQuark _tmp41_ = 0U;
#line 851 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	static GQuark _tmp40_label0 = 0;
#line 851 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	static GQuark _tmp40_label1 = 0;
#line 7166 "spice-display.c"
	GError * _inner_error_ = NULL;
#line 827 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (uri_as_text != NULL);
#line 830 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = xmlParseURI (uri_as_text);
#line 830 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	uri = _tmp0_;
#line 832 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = uri;
#line 832 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp1_ == NULL) {
#line 7178 "spice-display.c"
		GError* _tmp2_;
#line 833 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp2_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, _ ("Invalid URL"));
#line 833 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_inner_error_ = _tmp2_;
#line 833 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_inner_error_->domain == BOXES_ERROR) {
#line 833 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_propagate_error (error, _inner_error_);
#line 833 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_xmlFreeURI0 (uri);
#line 833 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			return;
#line 7192 "spice-display.c"
		} else {
#line 833 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_xmlFreeURI0 (uri);
#line 833 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			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);
#line 833 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_clear_error (&_inner_error_);
#line 833 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			return;
#line 7202 "spice-display.c"
		}
	}
#line 835 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = 0;
#line 835 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = __int_dup0 (&_tmp3_);
#line 835 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (_vala_tls_port);
#line 835 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_vala_tls_port = _tmp4_;
#line 836 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = uri;
#line 836 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = _tmp5_->port;
#line 836 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = __int_dup0 (&_tmp6_);
#line 836 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (_vala_port);
#line 836 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_vala_port = _tmp7_;
#line 837 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp9_ = uri;
#line 837 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp10_ = _tmp9_->query_raw;
#line 837 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = _tmp10_;
#line 837 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp8_ == NULL) {
#line 7231 "spice-display.c"
		xmlURI* _tmp11_;
		const gchar* _tmp12_;
#line 837 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp11_ = uri;
#line 837 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp12_ = _tmp11_->query;
#line 837 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp8_ = _tmp12_;
#line 7240 "spice-display.c"
	}
#line 837 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp13_ = g_strdup (_tmp8_);
#line 837 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	query_str = _tmp13_;
#line 839 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp14_ = query_str;
#line 839 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp14_ != NULL) {
#line 7250 "spice-display.c"
		BoxesQuery* query = NULL;
		const gchar* _tmp15_;
		BoxesQuery* _tmp16_;
		BoxesQuery* _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp19_;
		gboolean _tmp20_;
		BoxesQuery* _tmp28_;
		gchar* _tmp29_;
		gchar* _tmp30_;
		gboolean _tmp31_;
#line 840 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp15_ = query_str;
#line 840 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp16_ = boxes_query_new (_tmp15_);
#line 840 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		query = _tmp16_;
#line 841 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp17_ = query;
#line 841 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp18_ = boxes_query_get (_tmp17_, "port");
#line 841 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp19_ = _tmp18_;
#line 841 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp20_ = _tmp19_ != NULL;
#line 841 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_tmp19_);
#line 841 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp20_) {
#line 7280 "spice-display.c"
			gint* _tmp21_;
			BoxesQuery* _tmp23_;
			gchar* _tmp24_;
			gchar* _tmp25_;
			gint _tmp26_;
			gint* _tmp27_;
#line 842 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp21_ = _vala_port;
#line 842 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if ((*_tmp21_) > 0) {
#line 7291 "spice-display.c"
				GError* _tmp22_;
#line 843 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp22_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, _ ("The port must be specified once"));
#line 843 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_inner_error_ = _tmp22_;
#line 843 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_inner_error_->domain == BOXES_ERROR) {
#line 843 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					g_propagate_error (error, _inner_error_);
#line 843 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_object_unref0 (query);
#line 843 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_free0 (query_str);
#line 843 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_xmlFreeURI0 (uri);
#line 843 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					return;
#line 7309 "spice-display.c"
				} else {
#line 843 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_object_unref0 (query);
#line 843 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_free0 (query_str);
#line 843 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_xmlFreeURI0 (uri);
#line 843 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					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);
#line 843 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					g_clear_error (&_inner_error_);
#line 843 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					return;
#line 7323 "spice-display.c"
				}
			}
#line 844 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp23_ = query;
#line 844 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp24_ = boxes_query_get (_tmp23_, "port");
#line 844 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp25_ = _tmp24_;
#line 844 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp26_ = atoi (_tmp25_);
#line 844 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp27_ = __int_dup0 (&_tmp26_);
#line 844 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (_vala_port);
#line 844 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_vala_port = _tmp27_;
#line 844 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (_tmp25_);
#line 7342 "spice-display.c"
		}
#line 847 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp28_ = query;
#line 847 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp29_ = boxes_query_get (_tmp28_, "tls-port");
#line 847 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp30_ = _tmp29_;
#line 847 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp31_ = _tmp30_ != NULL;
#line 847 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_tmp30_);
#line 847 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp31_) {
#line 7356 "spice-display.c"
			BoxesQuery* _tmp32_;
			gchar* _tmp33_;
			gchar* _tmp34_;
			gint _tmp35_;
			gint* _tmp36_;
#line 848 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp32_ = query;
#line 848 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp33_ = boxes_query_get (_tmp32_, "tls-port");
#line 848 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp34_ = _tmp33_;
#line 848 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp35_ = atoi (_tmp34_);
#line 848 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp36_ = __int_dup0 (&_tmp35_);
#line 848 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (_vala_tls_port);
#line 848 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_vala_tls_port = _tmp36_;
#line 848 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (_tmp34_);
#line 7378 "spice-display.c"
		}
#line 839 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (query);
#line 7382 "spice-display.c"
	}
#line 851 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp37_ = uri;
#line 851 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp38_ = _tmp37_->scheme;
#line 851 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp39_ = _tmp38_;
#line 851 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp41_ = (NULL == _tmp39_) ? 0 : g_quark_from_string (_tmp39_);
#line 851 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp41_ == ((0 != _tmp40_label0) ? _tmp40_label0 : (_tmp40_label0 = g_quark_from_static_string ("spice")))) {
#line 851 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		switch (0) {
#line 7396 "spice-display.c"
			default:
			{
				gboolean _tmp42_ = FALSE;
				gint* _tmp43_;
#line 853 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp43_ = _vala_port;
#line 853 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if ((*_tmp43_) <= 0) {
#line 7405 "spice-display.c"
					gint* _tmp44_;
#line 853 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp44_ = _vala_tls_port;
#line 853 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp42_ = (*_tmp44_) <= 0;
#line 7411 "spice-display.c"
				} else {
#line 853 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp42_ = FALSE;
#line 7415 "spice-display.c"
				}
#line 853 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_tmp42_) {
#line 7419 "spice-display.c"
					GError* _tmp45_;
#line 854 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp45_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, _ ("Missing port in Spice URL"));
#line 854 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_inner_error_ = _tmp45_;
#line 854 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					if (_inner_error_->domain == BOXES_ERROR) {
#line 854 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						g_propagate_error (error, _inner_error_);
#line 854 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_g_free0 (query_str);
#line 854 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_xmlFreeURI0 (uri);
#line 854 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						return;
#line 7435 "spice-display.c"
					} else {
#line 854 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_g_free0 (query_str);
#line 854 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_xmlFreeURI0 (uri);
#line 854 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						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);
#line 854 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						g_clear_error (&_inner_error_);
#line 854 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						return;
#line 7447 "spice-display.c"
					}
				}
#line 855 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 7452 "spice-display.c"
			}
		}
	} else if (_tmp41_ == ((0 != _tmp40_label1) ? _tmp40_label1 : (_tmp40_label1 = g_quark_from_static_string ("spice+unix")))) {
#line 851 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		switch (0) {
#line 7458 "spice-display.c"
			default:
			{
				gboolean _tmp46_ = FALSE;
				gboolean _tmp47_ = FALSE;
				gint* _tmp48_;
#line 857 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp48_ = _vala_port;
#line 857 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if ((*_tmp48_) > 0) {
#line 857 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp47_ = TRUE;
#line 7470 "spice-display.c"
				} else {
					xmlURI* _tmp49_;
					const gchar* _tmp50_;
#line 857 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp49_ = uri;
#line 857 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp50_ = _tmp49_->query_raw;
#line 857 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp47_ = _tmp50_ != NULL;
#line 7480 "spice-display.c"
				}
#line 857 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_tmp47_) {
#line 857 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp46_ = TRUE;
#line 7486 "spice-display.c"
				} else {
					xmlURI* _tmp51_;
					const gchar* _tmp52_;
#line 857 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp51_ = uri;
#line 857 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp52_ = _tmp51_->query;
#line 857 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp46_ = _tmp52_ != NULL;
#line 7496 "spice-display.c"
				}
#line 857 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_tmp46_) {
#line 7500 "spice-display.c"
					GError* _tmp53_;
#line 858 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp53_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, _ ("Invalid URL"));
#line 858 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_inner_error_ = _tmp53_;
#line 858 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					if (_inner_error_->domain == BOXES_ERROR) {
#line 858 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						g_propagate_error (error, _inner_error_);
#line 858 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_g_free0 (query_str);
#line 858 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_xmlFreeURI0 (uri);
#line 858 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						return;
#line 7516 "spice-display.c"
					} else {
#line 858 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_g_free0 (query_str);
#line 858 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_xmlFreeURI0 (uri);
#line 858 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						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);
#line 858 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						g_clear_error (&_inner_error_);
#line 858 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						return;
#line 7528 "spice-display.c"
					}
				}
#line 859 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 7533 "spice-display.c"
			}
		}
	} else {
#line 851 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		switch (0) {
#line 7539 "spice-display.c"
			default:
			{
				GError* _tmp54_;
#line 861 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp54_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, _ ("Invalid URL"));
#line 861 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_inner_error_ = _tmp54_;
#line 861 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_inner_error_->domain == BOXES_ERROR) {
#line 861 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					g_propagate_error (error, _inner_error_);
#line 861 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_free0 (query_str);
#line 861 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_xmlFreeURI0 (uri);
#line 861 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					return;
#line 7557 "spice-display.c"
				} else {
#line 861 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_free0 (query_str);
#line 861 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_xmlFreeURI0 (uri);
#line 861 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					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);
#line 861 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					g_clear_error (&_inner_error_);
#line 861 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					return;
#line 7569 "spice-display.c"
				}
			}
		}
	}
#line 827 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (query_str);
#line 827 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_xmlFreeURI0 (uri);
#line 827 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (port) {
#line 827 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		*port = _vala_port;
#line 7582 "spice-display.c"
	} else {
#line 827 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_vala_port);
#line 7586 "spice-display.c"
	}
#line 827 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (tls_port) {
#line 827 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		*tls_port = _vala_tls_port;
#line 7592 "spice-display.c"
	} else {
#line 827 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_vala_tls_port);
#line 7596 "spice-display.c"
	}
}


BoxesSharedFolderRow*
boxes_shared_folder_row_construct (GType object_type,
                                   const gchar* path,
                                   const gchar* name)
{
	BoxesSharedFolderRow * self = NULL;
	GtkLabel* _tmp0_;
	GtkLabel* _tmp1_;
#line 876 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (path != NULL, NULL);
#line 876 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 876 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSharedFolderRow*) g_object_new (object_type, NULL);
#line 877 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_shared_folder_row_set_folder_path (self, path);
#line 878 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_shared_folder_row_set_folder_name (self, name);
#line 880 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->folder_path_label;
#line 880 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_bind_property_with_closures ((GObject*) self, "folder_path", (GObject*) _tmp0_, "label", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
#line 881 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = self->priv->folder_name_label;
#line 881 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_bind_property_with_closures ((GObject*) self, "folder_name", (GObject*) _tmp1_, "label", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
#line 876 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return self;
#line 7629 "spice-display.c"
}


BoxesSharedFolderRow*
boxes_shared_folder_row_new (const gchar* path,
                             const gchar* name)
{
#line 876 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return boxes_shared_folder_row_construct (BOXES_TYPE_SHARED_FOLDER_ROW, path, name);
#line 7639 "spice-display.c"
}


static void
boxes_shared_folder_row_on_delete_button_clicked (BoxesSharedFolderRow* self)
{
#line 885 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 886 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_emit (self, boxes_shared_folder_row_signals[BOXES_SHARED_FOLDER_ROW_REMOVED_SIGNAL], 0);
#line 7650 "spice-display.c"
}


static void
_boxes_shared_folder_row_on_delete_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                      gpointer self)
{
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_shared_folder_row_on_delete_button_clicked ((BoxesSharedFolderRow*) self);
#line 7660 "spice-display.c"
}


const gchar*
boxes_shared_folder_row_get_folder_path (BoxesSharedFolderRow* self)
{
	const gchar* result;
	const gchar* _tmp0_;
#line 867 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 867 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->_folder_path;
#line 867 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = _tmp0_;
#line 867 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 7677 "spice-display.c"
}


void
boxes_shared_folder_row_set_folder_path (BoxesSharedFolderRow* self,
                                         const gchar* value)
{
#line 867 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 867 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (g_strcmp0 (value, boxes_shared_folder_row_get_folder_path (self)) != 0) {
#line 7689 "spice-display.c"
		gchar* _tmp0_;
#line 867 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp0_ = g_strdup (value);
#line 867 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (self->priv->_folder_path);
#line 867 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		self->priv->_folder_path = _tmp0_;
#line 867 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_notify_by_pspec ((GObject *) self, boxes_shared_folder_row_properties[BOXES_SHARED_FOLDER_ROW_FOLDER_PATH_PROPERTY]);
#line 7699 "spice-display.c"
	}
}


const gchar*
boxes_shared_folder_row_get_folder_name (BoxesSharedFolderRow* self)
{
	const gchar* result;
	const gchar* _tmp0_;
#line 868 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 868 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->_folder_name;
#line 868 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = _tmp0_;
#line 868 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 7717 "spice-display.c"
}


void
boxes_shared_folder_row_set_folder_name (BoxesSharedFolderRow* self,
                                         const gchar* value)
{
#line 868 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 868 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (g_strcmp0 (value, boxes_shared_folder_row_get_folder_name (self)) != 0) {
#line 7729 "spice-display.c"
		gchar* _tmp0_;
#line 868 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp0_ = g_strdup (value);
#line 868 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (self->priv->_folder_name);
#line 868 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		self->priv->_folder_name = _tmp0_;
#line 868 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_notify_by_pspec ((GObject *) self, boxes_shared_folder_row_properties[BOXES_SHARED_FOLDER_ROW_FOLDER_NAME_PROPERTY]);
#line 7739 "spice-display.c"
	}
}


static void
boxes_shared_folder_row_class_init (BoxesSharedFolderRowClass * klass)
{
	gint BoxesSharedFolderRow_private_offset;
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_shared_folder_row_parent_class = g_type_class_peek_parent (klass);
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_type_class_add_private (klass, sizeof (BoxesSharedFolderRowPrivate));
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_shared_folder_row_get_property;
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_shared_folder_row_set_property;
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_shared_folder_row_finalize;
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_SHARED_FOLDER_ROW_FOLDER_PATH_PROPERTY, boxes_shared_folder_row_properties[BOXES_SHARED_FOLDER_ROW_FOLDER_PATH_PROPERTY] = g_param_spec_string ("folder-path", "folder-path", "folder-path", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_SHARED_FOLDER_ROW_FOLDER_NAME_PROPERTY, boxes_shared_folder_row_properties[BOXES_SHARED_FOLDER_ROW_FOLDER_NAME_PROPERTY] = g_param_spec_string ("folder-name", "folder-name", "folder-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	BoxesSharedFolderRow_private_offset = g_type_class_get_instance_private_offset (klass);
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Boxes/ui/properties-shared-folder-row.ui");
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_shared_folder_row_signals[BOXES_SHARED_FOLDER_ROW_REMOVED_SIGNAL] = g_signal_new ("removed", BOXES_TYPE_SHARED_FOLDER_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "folder_path_label", FALSE, BoxesSharedFolderRow_private_offset + G_STRUCT_OFFSET (BoxesSharedFolderRowPrivate, folder_path_label));
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "folder_name_label", FALSE, BoxesSharedFolderRow_private_offset + G_STRUCT_OFFSET (BoxesSharedFolderRowPrivate, folder_name_label));
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_delete_button_clicked", G_CALLBACK(_boxes_shared_folder_row_on_delete_button_clicked_gtk_button_clicked));
#line 7774 "spice-display.c"
}


static void
boxes_shared_folder_row_instance_init (BoxesSharedFolderRow * self)
{
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv = BOXES_SHARED_FOLDER_ROW_GET_PRIVATE (self);
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	gtk_widget_init_template (GTK_WIDGET (self));
#line 7785 "spice-display.c"
}


static void
boxes_shared_folder_row_finalize (GObject * obj)
{
	BoxesSharedFolderRow * self;
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_SHARED_FOLDER_ROW, BoxesSharedFolderRow);
#line 867 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (self->priv->_folder_path);
#line 868 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (self->priv->_folder_name);
#line 872 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (self->priv->folder_path_label);
#line 874 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (self->priv->folder_name_label);
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	G_OBJECT_CLASS (boxes_shared_folder_row_parent_class)->finalize (obj);
#line 7805 "spice-display.c"
}


GType
boxes_shared_folder_row_get_type (void)
{
	static volatile gsize boxes_shared_folder_row_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_shared_folder_row_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesSharedFolderRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_shared_folder_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesSharedFolderRow), 0, (GInstanceInitFunc) boxes_shared_folder_row_instance_init, NULL };
		GType boxes_shared_folder_row_type_id;
		boxes_shared_folder_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "BoxesSharedFolderRow", &g_define_type_info, 0);
		g_once_init_leave (&boxes_shared_folder_row_type_id__volatile, boxes_shared_folder_row_type_id);
	}
	return boxes_shared_folder_row_type_id__volatile;
}


static void
_vala_boxes_shared_folder_row_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec)
{
	BoxesSharedFolderRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_SHARED_FOLDER_ROW, BoxesSharedFolderRow);
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	switch (property_id) {
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_SHARED_FOLDER_ROW_FOLDER_PATH_PROPERTY:
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_value_set_string (value, boxes_shared_folder_row_get_folder_path (self));
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_SHARED_FOLDER_ROW_FOLDER_NAME_PROPERTY:
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_value_set_string (value, boxes_shared_folder_row_get_folder_name (self));
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 7845 "spice-display.c"
		default:
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 7851 "spice-display.c"
	}
}


static void
_vala_boxes_shared_folder_row_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec)
{
	BoxesSharedFolderRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_SHARED_FOLDER_ROW, BoxesSharedFolderRow);
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	switch (property_id) {
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_SHARED_FOLDER_ROW_FOLDER_PATH_PROPERTY:
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		boxes_shared_folder_row_set_folder_path (self, g_value_get_string (value));
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_SHARED_FOLDER_ROW_FOLDER_NAME_PROPERTY:
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		boxes_shared_folder_row_set_folder_name (self, g_value_get_string (value));
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 7878 "spice-display.c"
		default:
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 866 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 7884 "spice-display.c"
	}
}


static void
_vala_array_destroy (gpointer array,
                     gint array_length,
                     GDestroyNotify destroy_func)
{
#line 535 "/home/fborges/checkout/gnome-boxes/src/libvirt-machine.vala"
	if ((array != NULL) && (destroy_func != NULL)) {
#line 7896 "spice-display.c"
		int i;
#line 535 "/home/fborges/checkout/gnome-boxes/src/libvirt-machine.vala"
		for (i = 0; i < array_length; i = i + 1) {
#line 535 "/home/fborges/checkout/gnome-boxes/src/libvirt-machine.vala"
			if (((gpointer*) array)[i] != NULL) {
#line 535 "/home/fborges/checkout/gnome-boxes/src/libvirt-machine.vala"
				destroy_func (((gpointer*) array)[i]);
#line 7904 "spice-display.c"
			}
		}
	}
}


static void
_vala_array_free (gpointer array,
                  gint array_length,
                  GDestroyNotify destroy_func)
{
#line 535 "/home/fborges/checkout/gnome-boxes/src/libvirt-machine.vala"
	_vala_array_destroy (array, array_length, destroy_func);
#line 535 "/home/fborges/checkout/gnome-boxes/src/libvirt-machine.vala"
	g_free (array);
#line 7920 "spice-display.c"
}



