/* spice-display.c generated by valac 0.36.1.38-6532, 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 <glib/gi18n-lib.h>
#include <gio/gio.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_DUMMY_PROPERTY,
	BOXES_SPICE_DISPLAY_PROTOCOL,
	BOXES_SPICE_DISPLAY_URI,
	BOXES_SPICE_DISPLAY_CA_CERT,
	BOXES_SPICE_DISPLAY_MAIN_CHANNEL,
	BOXES_SPICE_DISPLAY_LAST_PROPERTY
};
static GParamSpec* boxes_spice_display_properties[BOXES_SPICE_DISPLAY_LAST_PROPERTY];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (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_free0(var) (var = (g_free (var), NULL))
#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)))
typedef struct _Block78Data Block78Data;
typedef struct _Block79Data Block79Data;
typedef struct _Block80Data Block80Data;
#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 _BoxesSpiceChannelHandlerPrivate BoxesSpiceChannelHandlerPrivate;
enum  {
	BOXES_SPICE_CHANNEL_HANDLER_DUMMY_PROPERTY,
	BOXES_SPICE_CHANNEL_HANDLER_LAST_PROPERTY
};
static GParamSpec* boxes_spice_channel_handler_properties[BOXES_SPICE_CHANNEL_HANDLER_LAST_PROPERTY];
#define _xmlFreeURI0(var) ((var == NULL) ? NULL : (var = (xmlFreeURI (var), NULL)))
#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 (*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);
};

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

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
} 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 _Block78Data {
	int _ref_count_;
	BoxesSpiceDisplay* self;
	SpiceUsbDeviceManager* manager;
	BoxesProperty* usb_property;
};

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

struct _Block80Data {
	int _ref_count_;
	Block78Data * _data78_;
	SpiceUsbDevice* dev;
	GtkSwitch* dev_toggle;
};

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


static gpointer boxes_spice_display_parent_class = NULL;
static gpointer boxes_spice_channel_handler_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);
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 ___lambda73_ (BoxesSpiceDisplay* self, gint status);
void boxes_display_set_mouse_grabbed (BoxesDisplay* self, gboolean value);
static void ____lambda73__spice_display_mouse_grab (SpiceDisplay* _sender, gint status, gpointer self);
static void ___lambda74_ (BoxesSpiceDisplay* self, gint status);
void boxes_display_set_keyboard_grabbed (BoxesDisplay* self, gboolean value);
static void ____lambda74__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 void boxes_spice_display_main_event (BoxesSpiceDisplay* self, SpiceChannelEvent event);
void boxes_display_set_need_password (BoxesDisplay* self, gboolean value);
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 Block78Data* block78_data_ref (Block78Data* _data78_);
static void block78_data_unref (void * _userdata_);
static Block79Data* block79_data_ref (Block79Data* _data79_);
static void block79_data_unref (void * _userdata_);
static gint ___lambda1__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
static gint ____lambda75_ (SpiceUsbDevice* a, SpiceUsbDevice* b);
static gint _____lambda75__gcompare_func (gconstpointer a, gconstpointer b);
static Block80Data* block80_data_ref (Block80Data* _data80_);
static void block80_data_unref (void * _userdata_);
static void _______lambda76_ (Block80Data* _data80_);
static void ___lambda77_ (Block80Data* _data80_, GObject* obj, GAsyncResult* res);
static void ____lambda77__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static void ________lambda76__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void ____lambda78_ (Block78Data* _data78_, SpiceUsbDeviceManager* manager, SpiceUsbDevice* dev);
static void _____lambda78__spice_usb_device_manager_device_added (SpiceUsbDeviceManager* _sender, SpiceUsbDevice* device, gpointer self);
static void ____lambda79_ (Block78Data* _data78_, SpiceUsbDeviceManager* manager, SpiceUsbDevice* dev);
static void _____lambda79__spice_usb_device_manager_device_removed (SpiceUsbDeviceManager* _sender, SpiceUsbDevice* device, gpointer self);
static inline void _g_list_free__g_object_unref0_ (GList* 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);
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___lambda72_ (BoxesSpiceDisplay* self);
void boxes_display_set_can_grab_mouse (BoxesDisplay* self, gboolean value);
static void __boxes_spice_display_main_channel___lambda72__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static GObject * boxes_spice_display_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void _boxes_spice_display____lambda80_ (BoxesSpiceDisplay* self, SpiceUsbDevice* dev, GError* err);
static void __boxes_spice_display____lambda80__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);
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);


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


static void boxes_spice_display_ui_state_changed (BoxesSpiceDisplay* self) {
	BoxesMachine* _tmp0_;
	BoxesUIState _tmp1_;
	BoxesUIState _tmp2_;
#line 32 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 34 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->machine;
#line 34 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = boxes_ui_get_ui_state ((BoxesUI*) _tmp0_);
#line 34 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = _tmp1_;
#line 34 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp2_ == BOXES_UI_STATE_DISPLAY) {
#line 398 "spice-display.c"
		SpiceDisplay* display = NULL;
		GtkWidget* _tmp3_;
		SpiceDisplay* _tmp4_;
		SpiceDisplay* _tmp5_;
#line 36 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp3_ = boxes_display_get_display ((BoxesDisplay*) self, 0);
#line 36 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp4_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, spice_display_get_type ()) ? ((SpiceDisplay*) _tmp3_) : NULL;
#line 36 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp4_ == NULL) {
#line 36 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_object_unref0 (_tmp3_);
#line 411 "spice-display.c"
		}
#line 36 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		display = _tmp4_;
#line 37 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = display;
#line 37 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_set (_tmp5_, "resize-guest", TRUE, NULL);
#line 34 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (display);
#line 421 "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 41 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 43 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = boxes_display_get_config ((BoxesDisplay*) self);
#line 43 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = _tmp1_;
#line 43 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = boxes_box_config_get_last_seen_name (_tmp2_);
#line 43 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = _tmp3_;
#line 43 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = _tmp4_;
#line 43 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp0_ == NULL) {
#line 448 "spice-display.c"
		gchar* _tmp5_;
#line 43 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = g_strdup (_ ("Unknown"));
#line 43 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_tmp0_);
#line 43 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp0_ = _tmp5_;
#line 456 "spice-display.c"
	}
#line 43 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = _tmp0_;
#line 43 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = NULL;
#line 43 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = _tmp6_;
#line 43 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (_tmp0_);
#line 43 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 468 "spice-display.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 96 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return self ? g_object_ref (self) : NULL;
#line 475 "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_;
#line 92 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 93 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = boxes_spice_display_get_main_channel (self);
#line 93 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = _tmp0_;
#line 93 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp1_ == NULL) {
#line 94 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return;
#line 500 "spice-display.c"
	}
#line 96 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = boxes_spice_display_get_main_channel (self);
#line 96 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = _tmp2_;
#line 96 "/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 96 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	o = _tmp4_;
#line 97 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = o;
#line 97 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = self->priv->main_event_id;
#line 97 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_handler_disconnect (_tmp5_, _tmp6_);
#line 98 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->main_event_id = (gulong) 0;
#line 99 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = o;
#line 99 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = self->priv->main_mouse_mode_id;
#line 99 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_handler_disconnect (_tmp7_, _tmp8_);
#line 100 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->main_mouse_mode_id = (gulong) 0;
#line 101 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_set_main_channel (self, NULL);
#line 92 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (o);
#line 530 "spice-display.c"
}


static void _boxes_spice_display_ui_state_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 111 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_ui_state_changed ((BoxesSpiceDisplay*) self);
#line 537 "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;
	gint _tmp0_;
	gint _tmp1_;
	BoxesMachine* _tmp2_;
	BoxesMachine* _tmp3_;
	BoxesBoxConfig* _tmp4_;
	SpiceSession* _tmp5_;
	const gchar* _tmp6_;
	gint _tmp7_;
	gint _tmp12_;
	const gchar* _tmp17_;
	BoxesBoxConfig* _tmp22_;
	SpiceGtkSession* _tmp23_;
	BoxesBoxConfigSavedProperty* _tmp24_;
	gint _tmp24__length1;
#line 108 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (machine != NULL, NULL);
#line 108 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (config != NULL, NULL);
#line 108 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (host != NULL, NULL);
#line 108 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = port;
#line 108 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = tls_port;
#line 108 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_vala_return_val_if_fail ((_tmp0_ != 0) || (_tmp1_ != 0), "port != 0 || tls_port != 0", NULL);
#line 108 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) boxes_display_construct (object_type);
#line 110 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = machine;
#line 110 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->machine = _tmp2_;
#line 111 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = machine;
#line 111 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_connect_object ((GObject*) _tmp3_, "notify::ui-state", (GCallback) _boxes_spice_display_ui_state_changed_g_object_notify, self, 0);
#line 113 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = config;
#line 113 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_set_config ((BoxesDisplay*) self, _tmp4_);
#line 115 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = self->priv->session;
#line 115 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = host;
#line 115 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_set (_tmp5_, "host", _tmp6_, NULL);
#line 116 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = port;
#line 116 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp7_ != 0) {
#line 593 "spice-display.c"
		SpiceSession* _tmp8_;
		gint _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
#line 117 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp8_ = self->priv->session;
#line 117 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp9_ = port;
#line 117 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp10_ = g_strdup_printf ("%i", _tmp9_);
#line 117 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp11_ = _tmp10_;
#line 117 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_set (_tmp8_, "port", _tmp11_, NULL);
#line 117 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_tmp11_);
#line 610 "spice-display.c"
	}
#line 119 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp12_ = tls_port;
#line 119 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp12_ != 0) {
#line 616 "spice-display.c"
		SpiceSession* _tmp13_;
		gint _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_;
#line 120 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp13_ = self->priv->session;
#line 120 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp14_ = tls_port;
#line 120 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp15_ = g_strdup_printf ("%i", _tmp14_);
#line 120 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp16_ = _tmp15_;
#line 120 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_set (_tmp13_, "tls-port", _tmp16_, NULL);
#line 120 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_tmp16_);
#line 633 "spice-display.c"
	}
#line 126 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp17_ = host_subject;
#line 126 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp17_ != NULL) {
#line 639 "spice-display.c"
		SpiceSession* _tmp18_;
		const gchar* _tmp19_;
#line 127 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp18_ = self->priv->session;
#line 127 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp19_ = host_subject;
#line 127 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_set (_tmp18_, "cert-subject", _tmp19_, NULL);
#line 648 "spice-display.c"
	} else {
		SpiceSession* _tmp20_;
		const gchar* _tmp21_;
#line 129 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp20_ = self->priv->session;
#line 129 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp21_ = g_getenv ("BOXES_SPICE_HOST_SUBJECT");
#line 129 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_set (_tmp20_, "cert-subject", _tmp21_, NULL);
#line 658 "spice-display.c"
	}
#line 131 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp22_ = config;
#line 131 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp23_ = self->priv->gtk_session;
#line 131 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp24_ = self->priv->gtk_session_saved_properties;
#line 131 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp24__length1 = self->priv->gtk_session_saved_properties_length1;
#line 131 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_box_config_save_properties (_tmp22_, (GObject*) _tmp23_, _tmp24_, _tmp24__length1);
#line 108 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return self;
#line 672 "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 108 "/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 679 "spice-display.c"
}


BoxesSpiceDisplay* boxes_spice_display_construct_with_uri (GType object_type, BoxesMachine* machine, BoxesBoxConfig* config, const gchar* uri) {
	BoxesSpiceDisplay * self = NULL;
	BoxesMachine* _tmp0_;
	BoxesMachine* _tmp1_;
	BoxesBoxConfig* _tmp2_;
	SpiceSession* _tmp3_;
	const gchar* _tmp4_;
	BoxesBoxConfig* _tmp5_;
	SpiceGtkSession* _tmp6_;
	BoxesBoxConfigSavedProperty* _tmp7_;
	gint _tmp7__length1;
#line 134 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (machine != NULL, NULL);
#line 134 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (config != NULL, NULL);
#line 134 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (uri != NULL, NULL);
#line 134 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) boxes_display_construct (object_type);
#line 135 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = machine;
#line 135 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->machine = _tmp0_;
#line 136 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = machine;
#line 136 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_connect_object ((GObject*) _tmp1_, "notify::ui-state", (GCallback) _boxes_spice_display_ui_state_changed_g_object_notify, self, 0);
#line 138 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = config;
#line 138 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_set_config ((BoxesDisplay*) self, _tmp2_);
#line 140 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = self->priv->session;
#line 140 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = uri;
#line 140 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_set (_tmp3_, "uri", _tmp4_, NULL);
#line 142 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = config;
#line 142 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = self->priv->gtk_session;
#line 142 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = self->priv->gtk_session_saved_properties;
#line 142 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7__length1 = self->priv->gtk_session_saved_properties_length1;
#line 142 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_box_config_save_properties (_tmp5_, (GObject*) _tmp6_, _tmp7_, _tmp7__length1);
#line 134 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return self;
#line 732 "spice-display.c"
}


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


BoxesSpiceDisplay* boxes_spice_display_construct_priv (GType object_type, BoxesMachine* machine, BoxesBoxConfig* config) {
	BoxesSpiceDisplay * self = NULL;
	BoxesMachine* _tmp0_;
	BoxesMachine* _tmp1_;
	BoxesBoxConfig* _tmp2_;
	BoxesBoxConfig* _tmp3_;
	SpiceGtkSession* _tmp4_;
	BoxesBoxConfigSavedProperty* _tmp5_;
	gint _tmp5__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"
	self = (BoxesSpiceDisplay*) boxes_display_construct (object_type);
#line 146 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = machine;
#line 146 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->machine = _tmp0_;
#line 147 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = machine;
#line 147 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_connect_object ((GObject*) _tmp1_, "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"
	_tmp2_ = config;
#line 149 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_set_config ((BoxesDisplay*) self, _tmp2_);
#line 151 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = config;
#line 151 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = self->priv->gtk_session;
#line 151 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = self->priv->gtk_session_saved_properties;
#line 151 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5__length1 = self->priv->gtk_session_saved_properties_length1;
#line 151 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_box_config_save_properties (_tmp3_, (GObject*) _tmp4_, _tmp5_, _tmp5__length1);
#line 145 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return self;
#line 782 "spice-display.c"
}


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


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


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


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


static void ____lambda74__spice_display_keyboard_grab (SpiceDisplay* _sender, gint status, gpointer self) {
#line 163 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	___lambda74_ ((BoxesSpiceDisplay*) self, status);
#line 823 "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_;
	gint _tmp1_;
	gconstpointer _tmp2_;
	GtkWidget* _tmp3_;
	SpiceDisplay* _tmp4_;
	SpiceDisplay* _tmp5_;
#line 154 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 155 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = ((BoxesDisplay*) self)->displays;
#line 155 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = n;
#line 155 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = g_hash_table_lookup (_tmp0_, (gpointer) ((gintptr) _tmp1_));
#line 155 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = (GtkWidget*) _tmp2_;
#line 155 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, spice_display_get_type ()) ? ((SpiceDisplay*) _tmp3_) : NULL);
#line 155 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	display = _tmp4_;
#line 157 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = display;
#line 157 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp5_ == NULL) {
#line 855 "spice-display.c"
		SpiceSession* _tmp6_;
		gint _tmp7_;
		SpiceDisplay* _tmp8_;
		SpiceDisplay* _tmp9_;
		SpiceDisplay* _tmp10_;
		BoxesBoxConfig* _tmp11_;
		BoxesBoxConfig* _tmp12_;
		BoxesBoxConfigSavedProperty* _tmp13_;
		gint _tmp13__length1;
		SpiceDisplay* _tmp14_;
		GHashTable* _tmp15_;
		gint _tmp16_;
		SpiceDisplay* _tmp17_;
		GtkWidget* _tmp18_;
#line 158 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp6_ = self->priv->session;
#line 158 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp7_ = n;
#line 158 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp8_ = spice_display_new (_tmp6_, _tmp7_);
#line 158 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_ref_sink (_tmp8_);
#line 158 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (display);
#line 158 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		display = _tmp8_;
#line 160 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp9_ = display;
#line 160 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_connect_object (_tmp9_, "mouse-grab", (GCallback) ____lambda73__spice_display_mouse_grab, self, 0);
#line 163 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp10_ = display;
#line 163 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_connect_object (_tmp10_, "keyboard-grab", (GCallback) ____lambda74__spice_display_keyboard_grab, self, 0);
#line 166 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp11_ = boxes_display_get_config ((BoxesDisplay*) self);
#line 166 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp12_ = _tmp11_;
#line 166 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp13_ = self->priv->display_saved_properties;
#line 166 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp13__length1 = self->priv->display_saved_properties_length1;
#line 166 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		boxes_box_config_save_properties (_tmp12_, (GObject*) self, _tmp13_, _tmp13__length1);
#line 167 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp14_ = display;
#line 167 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_set (_tmp14_, "scaling", TRUE, NULL);
#line 169 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp15_ = ((BoxesDisplay*) self)->displays;
#line 169 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp16_ = n;
#line 169 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp17_ = display;
#line 169 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp18_ = _g_object_ref0 ((GtkWidget*) _tmp17_);
#line 169 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_hash_table_replace (_tmp15_, (gpointer) ((gintptr) _tmp16_), _tmp18_);
#line 914 "spice-display.c"
	}
#line 172 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = (GtkWidget*) display;
#line 172 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 920 "spice-display.c"
}


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


static void g_ptr_array_set_length (GPtrArray* self, gint value) {
	gint _tmp0_;
#line 4974 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_if_fail (self != NULL);
#line 4974 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp0_ = value;
#line 4974 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	g_ptr_array_set_size (self, _tmp0_);
#line 947 "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 175 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 958 "spice-display.c"
	{
		SpiceUsbDeviceManager* manager = NULL;
		SpiceSession* _tmp0_;
		SpiceUsbDeviceManager* _tmp1_;
		SpiceUsbDeviceManager* _tmp2_;
		GPtrArray* devs = NULL;
		GPtrArray* _tmp3_;
		gboolean _tmp4_ = FALSE;
		gboolean _tmp5_;
#line 177 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp0_ = self->priv->session;
#line 177 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp1_ = spice_usb_device_manager_get (_tmp0_, &_inner_error_);
#line 177 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp2_ = _g_object_ref0 (_tmp1_);
#line 177 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		manager = _tmp2_;
#line 177 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 978 "spice-display.c"
			goto __catch74_g_error;
		}
#line 178 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp3_ = boxes_spice_display_get_usb_devices (self, manager);
#line 178 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		devs = _tmp3_;
#line 180 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = self->priv->closed;
#line 180 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (!_tmp5_) {
#line 989 "spice-display.c"
			GPtrArray* _tmp6_;
			gint _tmp7_;
			gint _tmp8_;
#line 180 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp6_ = devs;
#line 180 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp7_ = g_ptr_array_get_length (_tmp6_);
#line 180 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp8_ = _tmp7_;
#line 180 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp4_ = _tmp8_ > 0;
#line 1001 "spice-display.c"
		} else {
#line 180 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp4_ = FALSE;
#line 1005 "spice-display.c"
		}
#line 180 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		result = _tmp4_;
#line 180 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_ptr_array_unref0 (devs);
#line 180 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (manager);
#line 180 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return result;
#line 1015 "spice-display.c"
	}
	goto __finally74;
	__catch74_g_error:
	{
		GError* _error_ = NULL;
#line 176 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_error_ = _inner_error_;
#line 176 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_inner_error_ = NULL;
#line 182 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		result = FALSE;
#line 182 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_error_free0 (_error_);
#line 182 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return result;
#line 1031 "spice-display.c"
	}
	__finally74:
#line 176 "/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 176 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_clear_error (&_inner_error_);
#line 176 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return _tmp9_;
#line 1040 "spice-display.c"
}


static void boxes_spice_display_real_set_enable_audio (BoxesDisplay* base, gboolean enable) {
	BoxesSpiceDisplay * self;
	SpiceSession* _tmp0_;
	gboolean _tmp1_;
#line 186 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 187 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->session;
#line 187 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = enable;
#line 187 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_set (_tmp0_, "enable-audio", _tmp1_, NULL);
#line 1056 "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;
	gint _tmp0_;
	GtkWidget* _tmp1_;
	SpiceDisplay* _tmp2_;
	SpiceDisplay* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	SpiceDisplay* _tmp6_;
	GdkPixbuf* _tmp7_;
#line 190 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 191 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = n;
#line 191 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = boxes_display_get_display ((BoxesDisplay*) self, _tmp0_);
#line 191 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, spice_display_get_type ()) ? ((SpiceDisplay*) _tmp1_) : NULL;
#line 191 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp2_ == NULL) {
#line 191 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (_tmp1_);
#line 1084 "spice-display.c"
	}
#line 191 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	display = _tmp2_;
#line 193 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = display;
#line 193 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_get (_tmp3_, "ready", &_tmp4_, NULL);
#line 193 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = _tmp4_;
#line 193 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (!_tmp5_) {
#line 194 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		result = NULL;
#line 194 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (display);
#line 194 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return result;
#line 1102 "spice-display.c"
	}
#line 196 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = display;
#line 196 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = spice_display_get_pixbuf (_tmp6_);
#line 196 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = _tmp7_;
#line 196 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (display);
#line 196 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 1114 "spice-display.c"
}


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


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


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


static void boxes_spice_display_real_collect_logs (BoxesDisplay* base, GString* builder) {
	BoxesSpiceDisplay * self;
	GString* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	SpiceGtkSession* _tmp4_;
	SpiceMainChannel* _tmp10_;
	SpiceMainChannel* _tmp11_;
	GError * _inner_error_ = NULL;
#line 199 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 199 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (builder != NULL);
#line 200 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = builder;
#line 200 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = boxes_display_get_uri ((BoxesDisplay*) self);
#line 200 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = _tmp1_;
#line 200 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = _tmp2_;
#line 200 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_string_append_printf (_tmp0_, "URL: %s\n", _tmp3_);
#line 200 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (_tmp3_);
#line 201 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = self->priv->gtk_session;
#line 201 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp4_ != NULL) {
#line 1169 "spice-display.c"
		const gchar* _tmp5_ = NULL;
		SpiceGtkSession* _tmp6_;
		gboolean _tmp7_;
		gboolean _tmp8_;
		GString* _tmp9_;
#line 202 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp6_ = self->priv->gtk_session;
#line 202 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_get (_tmp6_, "auto-clipboard", &_tmp7_, NULL);
#line 202 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp8_ = _tmp7_;
#line 202 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp8_) {
#line 202 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp5_ = "yes";
#line 1185 "spice-display.c"
		} else {
#line 202 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp5_ = "no";
#line 1189 "spice-display.c"
		}
#line 202 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp9_ = builder;
#line 202 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_string_append_printf (_tmp9_, "Auto clipboard sync: %s\n", _tmp5_);
#line 1195 "spice-display.c"
	}
#line 204 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp10_ = boxes_spice_display_get_main_channel (self);
#line 204 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp11_ = _tmp10_;
#line 204 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp11_ != NULL) {
#line 1203 "spice-display.c"
		GString* _tmp12_;
		const gchar* _tmp13_;
		const gchar* _tmp14_ = NULL;
		SpiceMainChannel* _tmp15_;
		SpiceMainChannel* _tmp16_;
		gint _tmp17_;
		gint _tmp18_;
		GString* _tmp19_;
		const gchar* _tmp20_ = NULL;
		SpiceMainChannel* _tmp21_;
		SpiceMainChannel* _tmp22_;
		gboolean _tmp23_;
		gboolean _tmp24_;
		GString* _tmp25_;
#line 205 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp12_ = builder;
#line 205 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp13_ = spice_util_get_version_string ();
#line 205 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_string_append_printf (_tmp12_, "Spice-gtk version %s\n", _tmp13_);
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp15_ = boxes_spice_display_get_main_channel (self);
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp16_ = _tmp15_;
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_get (_tmp16_, "mouse-mode", &_tmp17_, NULL);
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp18_ = _tmp17_;
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp18_ == 1) {
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp14_ = "server";
#line 1236 "spice-display.c"
		} else {
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp14_ = "client";
#line 1240 "spice-display.c"
		}
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp19_ = builder;
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_string_append_printf (_tmp19_, "Mouse mode: %s\n", _tmp14_);
#line 207 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp21_ = boxes_spice_display_get_main_channel (self);
#line 207 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp22_ = _tmp21_;
#line 207 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_get (_tmp22_, "agent-connected", &_tmp23_, NULL);
#line 207 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp24_ = _tmp23_;
#line 207 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp24_) {
#line 207 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp20_ = "connected";
#line 1258 "spice-display.c"
		} else {
#line 207 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp20_ = "disconnected";
#line 1262 "spice-display.c"
		}
#line 207 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp25_ = builder;
#line 207 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_string_append_printf (_tmp25_, "Agent: %s\n", _tmp20_);
#line 1268 "spice-display.c"
	}
	{
		SpiceUsbDeviceManager* manager = NULL;
		SpiceSession* _tmp26_;
		SpiceUsbDeviceManager* _tmp27_;
		SpiceUsbDeviceManager* _tmp28_;
		GPtrArray* devs = NULL;
		SpiceUsbDeviceManager* _tmp29_;
		GPtrArray* _tmp30_;
#line 211 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp26_ = self->priv->session;
#line 211 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp27_ = spice_usb_device_manager_get (_tmp26_, &_inner_error_);
#line 211 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp28_ = _g_object_ref0 (_tmp27_);
#line 211 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		manager = _tmp28_;
#line 211 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1288 "spice-display.c"
			goto __catch75_g_error;
		}
#line 212 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp29_ = manager;
#line 212 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp30_ = spice_usb_device_manager_get_devices (_tmp29_);
#line 212 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		devs = _tmp30_;
#line 1297 "spice-display.c"
		{
			gint i = 0;
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			i = 0;
#line 1302 "spice-display.c"
			{
				gboolean _tmp31_ = FALSE;
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp31_ = TRUE;
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				while (TRUE) {
#line 1309 "spice-display.c"
					gint _tmp33_;
					GPtrArray* _tmp34_;
					gint _tmp35_;
					gint _tmp36_;
					SpiceUsbDevice* dev = NULL;
					GPtrArray* _tmp37_;
					gint _tmp38_;
					gconstpointer _tmp39_;
					SpiceUsbDevice* _tmp40_;
					SpiceUsbDeviceManager* _tmp41_;
					SpiceUsbDevice* _tmp42_;
					gboolean _tmp43_;
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					if (!_tmp31_) {
#line 1324 "spice-display.c"
						gint _tmp32_;
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_tmp32_ = i;
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						i = _tmp32_ + 1;
#line 1330 "spice-display.c"
					}
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp31_ = FALSE;
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp33_ = i;
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp34_ = devs;
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp35_ = g_ptr_array_get_length (_tmp34_);
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp36_ = _tmp35_;
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					if (!(_tmp33_ < _tmp36_)) {
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						break;
#line 1346 "spice-display.c"
					}
#line 214 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp37_ = devs;
#line 214 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp38_ = i;
#line 214 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp39_ = g_ptr_array_index (_tmp37_, (guint) _tmp38_);
#line 214 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp40_ = __vala_SpiceUsbDevice_copy0 ((SpiceUsbDevice*) _tmp39_);
#line 214 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					dev = _tmp40_;
#line 215 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp41_ = manager;
#line 215 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp42_ = dev;
#line 215 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp43_ = spice_usb_device_manager_is_device_connected (_tmp41_, _tmp42_);
#line 215 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					if (_tmp43_) {
#line 1366 "spice-display.c"
						GString* _tmp44_;
						SpiceUsbDevice* _tmp45_;
						gchar* _tmp46_;
						gchar* _tmp47_;
#line 216 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_tmp44_ = builder;
#line 216 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_tmp45_ = dev;
#line 216 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_tmp46_ = spice_usb_device_get_description (_tmp45_, "%s %s %s at %d-%d");
#line 216 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_tmp47_ = _tmp46_;
#line 216 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						g_string_append_printf (_tmp44_, "USB device redirected: %s\n", _tmp47_);
#line 216 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_g_free0 (_tmp47_);
#line 1383 "spice-display.c"
					}
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					__vala_SpiceUsbDevice_free0 (dev);
#line 1387 "spice-display.c"
				}
			}
		}
#line 210 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_ptr_array_unref0 (devs);
#line 210 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (manager);
#line 1395 "spice-display.c"
	}
	goto __finally75;
	__catch75_g_error:
	{
		GError* _error_ = NULL;
#line 210 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_error_ = _inner_error_;
#line 210 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_inner_error_ = NULL;
#line 210 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_error_free0 (_error_);
#line 1407 "spice-display.c"
	}
	__finally75:
#line 210 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 210 "/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 210 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_clear_error (&_inner_error_);
#line 210 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return;
#line 1418 "spice-display.c"
	}
}


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


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


static void _boxes_spice_display_on_channel_destroy_spice_session_channel_destroy (SpiceSession* _sender, SpiceChannel* channel, gpointer self) {
#line 236 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_on_channel_destroy ((BoxesSpiceDisplay*) self, _sender, channel);
#line 1440 "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 222 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 224 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = ((BoxesDisplay*) self)->connected;
#line 224 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp0_) {
#line 225 "/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 225 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		open_fd = NULL;
#line 225 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		open_fd_target = NULL;
#line 225 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		open_fd_target_destroy_notify = NULL;
#line 225 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return;
#line 1476 "spice-display.c"
	}
#line 226 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	((BoxesDisplay*) self)->connected = TRUE;
#line 227 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = open_fd;
#line 227 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1__target = open_fd_target;
#line 227 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1__target_destroy_notify = open_fd_target_destroy_notify;
#line 227 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	open_fd = NULL;
#line 227 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	open_fd_target = NULL;
#line 227 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	open_fd_target_destroy_notify = NULL;
#line 227 "/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 227 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd = NULL;
#line 227 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target = NULL;
#line 227 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target_destroy_notify = NULL;
#line 227 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd = _tmp1_;
#line 227 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target = _tmp1__target;
#line 227 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target_destroy_notify = _tmp1__target_destroy_notify;
#line 229 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_main_cleanup (self);
#line 230 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = g_direct_hash;
#line 230 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = g_direct_equal;
#line 230 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = g_hash_table_new_full (_tmp2_, _tmp3_, _g_object_unref0_, _g_object_unref0_);
#line 230 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_hash_table_unref0 (self->priv->channel_handlers);
#line 230 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->channel_handlers = _tmp4_;
#line 233 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = self->priv->channel_new_id;
#line 233 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp5_ == ((gulong) 0)) {
#line 1522 "spice-display.c"
		SpiceSession* _tmp6_;
		gulong _tmp7_;
#line 234 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp6_ = self->priv->session;
#line 234 "/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 234 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		self->priv->channel_new_id = _tmp7_;
#line 1531 "spice-display.c"
	}
#line 235 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = self->priv->channel_destroy_id;
#line 235 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp8_ == ((gulong) 0)) {
#line 1537 "spice-display.c"
		SpiceSession* _tmp9_;
		gulong _tmp10_;
#line 236 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp9_ = self->priv->session;
#line 236 "/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 236 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		self->priv->channel_destroy_id = _tmp10_;
#line 1546 "spice-display.c"
	}
#line 238 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp11_ = self->priv->session;
#line 238 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp12_ = boxes_display_get_password ((BoxesDisplay*) self);
#line 238 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp13_ = _tmp12_;
#line 238 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_set (_tmp11_, "password", _tmp13_, NULL);
#line 239 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp14_ = self->priv->open_fd;
#line 239 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp14__target = self->priv->open_fd_target;
#line 239 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp14_ != NULL) {
#line 1562 "spice-display.c"
		SpiceSession* _tmp15_;
#line 240 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp15_ = self->priv->session;
#line 240 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		spice_session_open_fd (_tmp15_, -1);
#line 1568 "spice-display.c"
	} else {
		SpiceSession* _tmp16_;
#line 242 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp16_ = self->priv->session;
#line 242 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		spice_session_connect (_tmp16_);
#line 1575 "spice-display.c"
	}
#line 222 "/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 222 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	open_fd = NULL;
#line 222 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	open_fd_target = NULL;
#line 222 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	open_fd_target_destroy_notify = NULL;
#line 1585 "spice-display.c"
}


static void boxes_spice_display_real_disconnect_it (BoxesDisplay* base) {
	BoxesSpiceDisplay * self;
	gulong _tmp0_;
	gulong _tmp3_;
	SpiceSession* _tmp6_;
	GHashTable* _tmp7_;
#line 245 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 246 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->channel_new_id;
#line 246 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp0_ > ((gulong) 0)) {
#line 1601 "spice-display.c"
		SpiceSession* _tmp1_;
		gulong _tmp2_;
#line 247 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp1_ = self->priv->session;
#line 247 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp2_ = self->priv->channel_new_id;
#line 247 "/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 248 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		self->priv->channel_new_id = (gulong) 0;
#line 1612 "spice-display.c"
	}
#line 250 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = self->priv->channel_destroy_id;
#line 250 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp3_ > ((gulong) 0)) {
#line 1618 "spice-display.c"
		SpiceSession* _tmp4_;
		gulong _tmp5_;
#line 251 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp4_ = self->priv->session;
#line 251 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = self->priv->channel_destroy_id;
#line 251 "/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 252 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		self->priv->channel_destroy_id = (gulong) 0;
#line 1629 "spice-display.c"
	}
#line 254 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = self->priv->session;
#line 254 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	spice_session_disconnect (_tmp6_);
#line 255 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_main_cleanup (self);
#line 256 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_hash_table_unref0 (self->priv->channel_handlers);
#line 256 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->channel_handlers = NULL;
#line 257 "/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 257 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd = NULL;
#line 257 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target = NULL;
#line 257 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target_destroy_notify = NULL;
#line 257 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd = NULL;
#line 257 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target = NULL;
#line 257 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target_destroy_notify = NULL;
#line 258 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = ((BoxesDisplay*) self)->displays;
#line 258 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_hash_table_remove_all (_tmp7_);
#line 1659 "spice-display.c"
}


static void boxes_spice_display_on_channel_new (BoxesSpiceDisplay* self, SpiceSession* session, SpiceChannel* channel) {
	BoxesSpiceChannelHandler* handler = NULL;
	SpiceChannel* _tmp0_;
	BoxesDisplayOpenFDFunc _tmp1_;
	void* _tmp1__target;
	BoxesSpiceChannelHandler* _tmp2_;
	GHashTable* _tmp3_;
	SpiceChannel* _tmp4_;
	SpiceChannel* _tmp5_;
	BoxesSpiceChannelHandler* _tmp6_;
	BoxesSpiceChannelHandler* _tmp7_;
	SpiceChannel* _tmp8_;
#line 261 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 261 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (session != NULL);
#line 261 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (channel != NULL);
#line 262 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = channel;
#line 262 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = self->priv->open_fd;
#line 262 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1__target = self->priv->open_fd_target;
#line 262 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = boxes_spice_channel_handler_new (self, _tmp0_, _tmp1_, _tmp1__target);
#line 262 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	handler = _tmp2_;
#line 263 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = self->priv->channel_handlers;
#line 263 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = channel;
#line 263 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = _g_object_ref0 (_tmp4_);
#line 263 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = handler;
#line 263 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = _g_object_ref0 (_tmp6_);
#line 263 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_hash_table_insert (_tmp3_, _tmp5_, _tmp7_);
#line 265 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = channel;
#line 265 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, spice_display_channel_get_type ())) {
#line 1707 "spice-display.c"
		SpiceChannel* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
#line 266 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp9_ = channel;
#line 266 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_get (_tmp9_, "channel-id", &_tmp10_, NULL);
#line 266 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp11_ = _tmp10_;
#line 266 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp11_ != 0) {
#line 267 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_object_unref0 (handler);
#line 267 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			return;
#line 1723 "spice-display.c"
		}
#line 269 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		boxes_display_access_start ((BoxesDisplay*) self);
#line 1727 "spice-display.c"
	}
#line 261 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (handler);
#line 1731 "spice-display.c"
}


static void boxes_spice_display_on_channel_destroy (BoxesSpiceDisplay* self, SpiceSession* session, SpiceChannel* channel) {
	SpiceChannel* _tmp0_;
	SpiceDisplayChannel* display = NULL;
	SpiceChannel* _tmp1_;
	SpiceDisplayChannel* _tmp2_;
	SpiceDisplayChannel* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
#line 273 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 273 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (session != NULL);
#line 273 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (channel != NULL);
#line 274 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = channel;
#line 274 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, spice_display_channel_get_type ())) {
#line 275 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return;
#line 1755 "spice-display.c"
	}
#line 277 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = channel;
#line 277 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, spice_display_channel_get_type ()) ? ((SpiceDisplayChannel*) _tmp1_) : NULL);
#line 277 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	display = _tmp2_;
#line 278 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = display;
#line 278 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_get ((SpiceChannel*) _tmp3_, "channel-id", &_tmp4_, NULL);
#line 278 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = _tmp4_;
#line 278 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_emit_by_name ((BoxesDisplay*) self, "hide", _tmp5_);
#line 279 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_access_finish ((BoxesDisplay*) self);
#line 273 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (display);
#line 1775 "spice-display.c"
}


static void boxes_spice_display_main_event (BoxesSpiceDisplay* self, SpiceChannelEvent event) {
	SpiceChannelEvent _tmp0_;
#line 282 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 283 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = event;
#line 283 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	switch (_tmp0_) {
#line 283 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case SPICE_CHANNEL_CLOSED:
#line 1789 "spice-display.c"
		{
#line 285 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			self->priv->closed = TRUE;
#line 286 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_signal_emit_by_name ((BoxesDisplay*) self, "disconnected", FALSE);
#line 287 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			break;
#line 1797 "spice-display.c"
		}
#line 283 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case SPICE_CHANNEL_ERROR_AUTH:
#line 1801 "spice-display.c"
		{
#line 290 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			boxes_display_set_need_password ((BoxesDisplay*) self, TRUE);
#line 291 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			break;
#line 1807 "spice-display.c"
		}
#line 283 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case SPICE_CHANNEL_ERROR_CONNECT:
#line 283 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case SPICE_CHANNEL_ERROR_TLS:
#line 283 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case SPICE_CHANNEL_ERROR_LINK:
#line 283 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case SPICE_CHANNEL_ERROR_IO:
#line 1817 "spice-display.c"
		{
			SpiceChannelEvent _tmp1_;
#line 297 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp1_ = event;
#line 297 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_debug ("spice-display.vala:297: main SPICE channel error: %d", (gint) _tmp1_);
#line 298 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			self->priv->closed = TRUE;
#line 299 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_signal_emit_by_name ((BoxesDisplay*) self, "disconnected", TRUE);
#line 300 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			break;
#line 1830 "spice-display.c"
		}
#line 283 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case SPICE_CHANNEL_OPENED:
#line 1834 "spice-display.c"
		{
#line 303 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			break;
#line 1838 "spice-display.c"
		}
		default:
		{
			SpiceChannelEvent _tmp2_;
#line 306 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp2_ = event;
#line 306 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_debug ("spice-display.vala:306: unhandled main SPICE channel event: %d", (gint) _tmp2_);
#line 307 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			break;
#line 1849 "spice-display.c"
		}
	}
}


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


static void block78_data_unref (void * _userdata_) {
	Block78Data* _data78_;
	_data78_ = (Block78Data*) _userdata_;
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (g_atomic_int_dec_and_test (&_data78_->_ref_count_)) {
#line 1869 "spice-display.c"
		BoxesSpiceDisplay* self;
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		self = _data78_->self;
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (_data78_->usb_property);
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (_data78_->manager);
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (self);
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_slice_free (Block78Data, _data78_);
#line 1881 "spice-display.c"
	}
}


static Block79Data* block79_data_ref (Block79Data* _data79_) {
#line 4957 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	g_atomic_int_inc (&_data79_->_ref_count_);
#line 4957 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	return _data79_;
#line 1891 "spice-display.c"
}


static void block79_data_unref (void * _userdata_) {
	Block79Data* _data79_;
	_data79_ = (Block79Data*) _userdata_;
#line 4957 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	if (g_atomic_int_dec_and_test (&_data79_->_ref_count_)) {
#line 1900 "spice-display.c"
		GPtrArray* self;
#line 4957 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		self = _data79_->self;
#line 4957 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		_g_ptr_array_unref0 (self);
#line 4957 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		g_slice_free (Block79Data, _data79_);
#line 1908 "spice-display.c"
	}
}


static gint __lambda1_ (Block79Data* _data79_, gconstpointer** a, gconstpointer** b) {
	GPtrArray* self;
	gint result = 0;
	GCompareFunc _tmp0_;
	gconstpointer** _tmp1_;
	gconstpointer** _tmp2_;
	gint _tmp3_;
#line 4958 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	self = _data79_->self;
#line 4959 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp0_ = _data79_->compare_func;
#line 4959 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp1_ = a;
#line 4959 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp2_ = b;
#line 4959 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp3_ = _tmp0_ ((gconstpointer**) (*_tmp1_), (gconstpointer**) (*_tmp2_));
#line 4959 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	result = _tmp3_;
#line 4959 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	return result;
#line 1934 "spice-display.c"
}


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


static void vala_g_ptr_array_sort (GPtrArray* self, GCompareFunc compare_func) {
	Block79Data* _data79_;
	GCompareFunc _tmp0_;
#line 4957 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_if_fail (self != NULL);
#line 4957 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_data79_ = g_slice_new0 (Block79Data);
#line 4957 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_data79_->_ref_count_ = 1;
#line 4957 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_data79_->self = g_ptr_array_ref (self);
#line 4957 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp0_ = compare_func;
#line 4957 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_data79_->compare_func = _tmp0_;
#line 4958 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	g_ptr_array_sort_with_data (self, ___lambda1__gcompare_data_func, _data79_);
#line 4957 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	block79_data_unref (_data79_);
#line 4957 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_data79_ = NULL;
#line 1968 "spice-display.c"
}


static gint ____lambda75_ (SpiceUsbDevice* a, SpiceUsbDevice* b) {
	gint result = 0;
	gchar* str_a = NULL;
	SpiceUsbDevice* _tmp0_;
	gchar* _tmp1_;
	gchar* str_b = NULL;
	SpiceUsbDevice* _tmp2_;
	gchar* _tmp3_;
	GCompareFunc _tmp4_;
	gint _tmp5_;
#line 348 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (a != NULL, 0);
#line 348 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (b != NULL, 0);
#line 349 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = a;
#line 349 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = spice_usb_device_get_description (_tmp0_, "    %1$s %2$s");
#line 349 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	str_a = _tmp1_;
#line 350 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = b;
#line 350 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = spice_usb_device_get_description (_tmp2_, "    %1$s %2$s");
#line 350 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	str_b = _tmp3_;
#line 352 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = g_strcmp0;
#line 352 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = _tmp4_ (str_a, str_b);
#line 352 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = _tmp5_;
#line 352 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (str_b);
#line 352 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (str_a);
#line 352 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 2010 "spice-display.c"
}


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


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


static void block80_data_unref (void * _userdata_) {
	Block80Data* _data80_;
	_data80_ = (Block80Data*) _userdata_;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (g_atomic_int_dec_and_test (&_data80_->_ref_count_)) {
#line 2037 "spice-display.c"
		BoxesSpiceDisplay* self;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		self = _data80_->_data78_->self;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (_data80_->dev_toggle);
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		__vala_SpiceUsbDevice_free0 (_data80_->dev);
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		block78_data_unref (_data80_->_data78_);
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_data80_->_data78_ = NULL;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_slice_free (Block80Data, _data80_);
#line 2051 "spice-display.c"
	}
}


static void ___lambda77_ (Block80Data* _data80_, GObject* obj, GAsyncResult* res) {
	Block78Data* _data78_;
	BoxesSpiceDisplay* self;
	GError * _inner_error_ = NULL;
#line 380 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data78_ = _data80_->_data78_;
#line 380 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = _data78_->self;
#line 380 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (res != NULL);
#line 2066 "spice-display.c"
	{
		SpiceUsbDeviceManager* _tmp0_;
		GAsyncResult* _tmp1_;
#line 382 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp0_ = _data78_->manager;
#line 382 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp1_ = res;
#line 382 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		spice_usb_device_manager_connect_device_finish (_tmp0_, _tmp1_, &_inner_error_);
#line 382 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2078 "spice-display.c"
			goto __catch77_g_error;
		}
	}
	goto __finally77;
	__catch77_g_error:
	{
		GError* err = NULL;
		GtkSwitch* _tmp2_;
		gchar* device_desc = NULL;
		SpiceUsbDevice* _tmp3_;
		gchar* _tmp4_;
		gchar* box_name = NULL;
		gchar* _tmp5_;
		gchar* msg = NULL;
		gchar* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		GError* _tmp14_;
		const gchar* _tmp15_;
#line 381 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		err = _inner_error_;
#line 381 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_inner_error_ = NULL;
#line 384 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp2_ = _data80_->dev_toggle;
#line 384 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		gtk_switch_set_active (_tmp2_, FALSE);
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp3_ = _data80_->dev;
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp4_ = spice_usb_device_get_description (_tmp3_, "%1$s %2$s");
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		device_desc = _tmp4_;
#line 386 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = boxes_spice_display_get_box_name (self);
#line 386 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		box_name = _tmp5_;
#line 387 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp6_ = g_strdup (_ ("Redirection of USB device “%s” for “%s” failed"));
#line 387 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		msg = _tmp6_;
#line 388 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp7_ = msg;
#line 388 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp8_ = device_desc;
#line 388 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp9_ = box_name;
#line 388 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp10_ = g_strdup_printf (_tmp7_, _tmp8_, _tmp9_);
#line 388 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp11_ = _tmp10_;
#line 388 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_emit_by_name ((BoxesDisplay*) self, "got-error", _tmp11_);
#line 388 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_tmp11_);
#line 389 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp12_ = device_desc;
#line 389 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp13_ = box_name;
#line 389 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp14_ = err;
#line 389 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp15_ = _tmp14_->message;
#line 389 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_debug ("spice-display.vala:389: Error connecting %s to %s: %s", _tmp12_, _tmp13_, _tmp15_);
#line 381 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (msg);
#line 381 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (box_name);
#line 381 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (device_desc);
#line 381 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_error_free0 (err);
#line 2157 "spice-display.c"
	}
	__finally77:
#line 381 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 381 "/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 381 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_clear_error (&_inner_error_);
#line 381 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return;
#line 2168 "spice-display.c"
	}
}


static void ____lambda77__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
#line 380 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	___lambda77_ (self, source_object, res);
#line 380 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	block80_data_unref (self);
#line 2178 "spice-display.c"
}


static void _______lambda76_ (Block80Data* _data80_) {
	Block78Data* _data78_;
	BoxesSpiceDisplay* self;
	GtkSwitch* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
#line 378 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_data78_ = _data80_->_data78_;
#line 378 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = _data78_->self;
#line 379 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = _data80_->dev_toggle;
#line 379 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = gtk_switch_get_active (_tmp0_);
#line 379 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = _tmp1_;
#line 379 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp2_) {
#line 2200 "spice-display.c"
		SpiceUsbDeviceManager* _tmp3_;
		SpiceUsbDevice* _tmp4_;
#line 380 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp3_ = _data78_->manager;
#line 380 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp4_ = _data80_->dev;
#line 380 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		spice_usb_device_manager_connect_device_async (_tmp3_, _tmp4_, NULL, ____lambda77__gasync_ready_callback, block80_data_ref (_data80_));
#line 2209 "spice-display.c"
	} else {
		SpiceUsbDeviceManager* _tmp5_;
		SpiceUsbDevice* _tmp6_;
#line 395 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = _data78_->manager;
#line 395 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp6_ = _data80_->dev;
#line 395 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		spice_usb_device_manager_disconnect_device (_tmp5_, _tmp6_);
#line 2219 "spice-display.c"
	}
}


static void ________lambda76__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 378 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_______lambda76_ (self);
#line 2227 "spice-display.c"
}


static void ____lambda78_ (Block78Data* _data78_, SpiceUsbDeviceManager* manager, SpiceUsbDevice* dev) {
	BoxesSpiceDisplay* self;
	BoxesProperty* _tmp0_;
#line 402 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = _data78_->self;
#line 402 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (manager != NULL);
#line 402 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (dev != NULL);
#line 403 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = _data78_->usb_property;
#line 403 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_emit_by_name (_tmp0_, "refresh-properties");
#line 2244 "spice-display.c"
}


static void _____lambda78__spice_usb_device_manager_device_added (SpiceUsbDeviceManager* _sender, SpiceUsbDevice* device, gpointer self) {
#line 402 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	____lambda78_ (self, _sender, device);
#line 2251 "spice-display.c"
}


static void ____lambda79_ (Block78Data* _data78_, SpiceUsbDeviceManager* manager, SpiceUsbDevice* dev) {
	BoxesSpiceDisplay* self;
	BoxesProperty* _tmp0_;
#line 405 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = _data78_->self;
#line 405 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (manager != NULL);
#line 405 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (dev != NULL);
#line 406 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = _data78_->usb_property;
#line 406 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_emit_by_name (_tmp0_, "refresh-properties");
#line 2268 "spice-display.c"
}


static void _____lambda79__spice_usb_device_manager_device_removed (SpiceUsbDeviceManager* _sender, SpiceUsbDevice* device, gpointer self) {
#line 405 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	____lambda79_ (self, _sender, device);
#line 2275 "spice-display.c"
}


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


static GList* boxes_spice_display_real_get_properties (BoxesDisplay* base, BoxesPropertiesPage page) {
	BoxesSpiceDisplay * self;
	GList* result = NULL;
	GList* list = NULL;
	BoxesPropertiesPage _tmp0_;
	GError * _inner_error_ = NULL;
#line 311 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 312 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	list = NULL;
#line 314 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = page;
#line 314 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	switch (_tmp0_) {
#line 314 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_PROPERTIES_PAGE_GENERAL:
#line 2302 "spice-display.c"
		{
			GtkSwitch* toggle = NULL;
			GtkSwitch* _tmp1_;
			SpiceGtkSession* _tmp2_;
			GtkSwitch* _tmp3_;
			GtkSwitch* _tmp4_;
			GtkSwitch* _tmp5_;
			BoxesProperty* _tmp6_;
			BoxesProperty* _tmp7_;
			gboolean _tmp8_ = FALSE;
			gboolean _tmp9_;
			gchar* message = NULL;
			gchar* _tmp14_;
			GtkLabel* label = NULL;
			const gchar* _tmp15_;
			GtkLabel* _tmp16_;
			GtkLabel* _tmp17_;
			GtkLabel* _tmp18_;
			GtkLabel* _tmp19_;
			GtkLabel* _tmp20_;
			GtkLabel* _tmp21_;
			GtkLabel* _tmp22_;
			GtkStyleContext* _tmp23_;
			GtkLabel* _tmp24_;
			BoxesProperty* _tmp25_;
			BoxesProperty* _tmp26_;
#line 316 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp1_ = (GtkSwitch*) gtk_switch_new ();
#line 316 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_object_ref_sink (_tmp1_);
#line 316 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			toggle = _tmp1_;
#line 317 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp2_ = self->priv->gtk_session;
#line 317 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp3_ = toggle;
#line 317 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_object_bind_property_with_closures ((GObject*) _tmp2_, "auto-clipboard", (GObject*) _tmp3_, "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 319 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp4_ = toggle;
#line 319 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_START);
#line 320 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp5_ = toggle;
#line 320 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp6_ = boxes_iproperties_provider_add_property ((BoxesIPropertiesProvider*) self, &list, _ ("Share Clipboard"), (GtkWidget*) _tmp5_, NULL);
#line 320 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp7_ = _tmp6_;
#line 320 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_object_unref0 (_tmp7_);
#line 322 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp9_ = ((BoxesDisplay*) self)->connected;
#line 322 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (!_tmp9_) {
#line 322 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp8_ = TRUE;
#line 2359 "spice-display.c"
			} else {
				SpiceMainChannel* _tmp10_;
				SpiceMainChannel* _tmp11_;
				gboolean _tmp12_;
				gboolean _tmp13_;
#line 322 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp10_ = boxes_spice_display_get_main_channel (self);
#line 322 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp11_ = _tmp10_;
#line 322 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_object_get (_tmp11_, "agent-connected", &_tmp12_, NULL);
#line 322 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp13_ = _tmp12_;
#line 322 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp8_ = _tmp13_;
#line 2375 "spice-display.c"
			}
#line 322 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (_tmp8_) {
#line 323 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_object_unref0 (toggle);
#line 323 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 2383 "spice-display.c"
			}
#line 325 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp14_ = 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 325 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			message = _tmp14_;
#line 326 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp15_ = message;
#line 326 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp16_ = (GtkLabel*) gtk_label_new (_tmp15_);
#line 326 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_object_ref_sink (_tmp16_);
#line 326 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			label = _tmp16_;
#line 327 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp17_ = label;
#line 327 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			gtk_widget_set_vexpand ((GtkWidget*) _tmp17_, TRUE);
#line 328 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp18_ = label;
#line 328 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			gtk_widget_set_valign ((GtkWidget*) _tmp18_, GTK_ALIGN_END);
#line 329 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp19_ = label;
#line 329 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_object_set (_tmp19_, "wrap", TRUE, NULL);
#line 330 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp20_ = label;
#line 330 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			gtk_label_set_max_width_chars (_tmp20_, 80);
#line 331 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp21_ = label;
#line 331 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			gtk_label_set_use_markup (_tmp21_, TRUE);
#line 332 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp22_ = label;
#line 332 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp23_ = gtk_widget_get_style_context ((GtkWidget*) _tmp22_);
#line 332 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			gtk_style_context_add_class (_tmp23_, "boxes-spice-tools-notice-label");
#line 334 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp24_ = label;
#line 334 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp25_ = boxes_iproperties_provider_add_property ((BoxesIPropertiesProvider*) self, &list, NULL, (GtkWidget*) _tmp24_, NULL);
#line 334 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp26_ = _tmp25_;
#line 334 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_object_unref0 (_tmp26_);
#line 335 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_object_unref0 (label);
#line 335 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (message);
#line 335 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_object_unref0 (toggle);
#line 335 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			break;
#line 2439 "spice-display.c"
		}
#line 314 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_PROPERTIES_PAGE_DEVICES:
#line 2443 "spice-display.c"
		{
			gboolean _tmp27_;
#line 338 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp27_ = ((BoxesDisplay*) self)->connected;
#line 338 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (!_tmp27_) {
#line 339 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 2452 "spice-display.c"
			}
			{
				Block78Data* _data78_;
				SpiceSession* _tmp28_;
				SpiceUsbDeviceManager* _tmp29_;
				SpiceUsbDeviceManager* _tmp30_;
				GPtrArray* devs = NULL;
				SpiceUsbDeviceManager* _tmp31_;
				GPtrArray* _tmp32_;
				GPtrArray* _tmp33_;
				gint _tmp34_;
				gint _tmp35_;
				GPtrArray* _tmp36_;
				GtkFrame* frame = NULL;
				GtkFrame* _tmp37_;
				GtkListBox* listbox = NULL;
				GtkListBox* _tmp38_;
				GtkListBox* _tmp39_;
				GtkFrame* _tmp40_;
				GtkListBox* _tmp41_;
				GtkLabel* _tmp76_;
				GtkLabel* _tmp77_;
				GtkFrame* _tmp78_;
				BoxesProperty* _tmp79_;
				BoxesProperty* _tmp80_;
				SpiceUsbDeviceManager* _tmp81_;
				SpiceUsbDeviceManager* _tmp82_;
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_data78_ = g_slice_new0 (Block78Data);
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_data78_->_ref_count_ = 1;
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_data78_->self = g_object_ref (self);
#line 342 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp28_ = self->priv->session;
#line 342 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp29_ = spice_usb_device_manager_get (_tmp28_, &_inner_error_);
#line 342 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp30_ = _g_object_ref0 (_tmp29_);
#line 342 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_data78_->manager = _tmp30_;
#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"
					block78_data_unref (_data78_);
#line 342 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_data78_ = NULL;
#line 2500 "spice-display.c"
					goto __catch76_g_error;
				}
#line 343 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp31_ = _data78_->manager;
#line 343 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp32_ = boxes_spice_display_get_usb_devices (self, _tmp31_);
#line 343 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				devs = _tmp32_;
#line 345 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp33_ = devs;
#line 345 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp34_ = g_ptr_array_get_length (_tmp33_);
#line 345 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp35_ = _tmp34_;
#line 345 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_tmp35_ <= 0) {
#line 346 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					result = list;
#line 346 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_ptr_array_unref0 (devs);
#line 346 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					block78_data_unref (_data78_);
#line 346 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_data78_ = NULL;
#line 346 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					return result;
#line 2527 "spice-display.c"
				}
#line 348 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp36_ = devs;
#line 348 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				vala_g_ptr_array_sort (_tmp36_, _____lambda75__gcompare_func);
#line 355 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp37_ = (GtkFrame*) gtk_frame_new (NULL);
#line 355 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_object_ref_sink (_tmp37_);
#line 355 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				frame = _tmp37_;
#line 356 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp38_ = (GtkListBox*) gtk_list_box_new ();
#line 356 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_object_ref_sink (_tmp38_);
#line 356 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				listbox = _tmp38_;
#line 357 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp39_ = listbox;
#line 357 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				gtk_widget_set_hexpand ((GtkWidget*) _tmp39_, TRUE);
#line 358 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp40_ = frame;
#line 358 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp41_ = listbox;
#line 358 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				gtk_container_add ((GtkContainer*) _tmp40_, (GtkWidget*) _tmp41_);
#line 2555 "spice-display.c"
				{
					gint i = 0;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					i = 0;
#line 2560 "spice-display.c"
					{
						gboolean _tmp42_ = FALSE;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_tmp42_ = TRUE;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						while (TRUE) {
#line 2567 "spice-display.c"
							Block80Data* _data80_;
							gint _tmp44_;
							GPtrArray* _tmp45_;
							gint _tmp46_;
							gint _tmp47_;
							GPtrArray* _tmp48_;
							gint _tmp49_;
							gconstpointer _tmp50_;
							SpiceUsbDevice* _tmp51_;
							GtkBox* hbox = NULL;
							GtkBox* _tmp52_;
							GtkBox* _tmp53_;
							GtkBox* _tmp54_;
							GtkBox* _tmp55_;
							GtkBox* _tmp56_;
							GtkLabel* label = NULL;
							SpiceUsbDevice* _tmp57_;
							gchar* _tmp58_;
							gchar* _tmp59_;
							GtkLabel* _tmp60_;
							GtkLabel* _tmp61_;
							GtkLabel* _tmp62_;
							GtkBox* _tmp63_;
							GtkLabel* _tmp64_;
							GtkSwitch* _tmp65_;
							GtkSwitch* _tmp66_;
							GtkBox* _tmp67_;
							GtkSwitch* _tmp68_;
							GtkListBox* _tmp69_;
							GtkBox* _tmp70_;
							GtkSwitch* _tmp71_;
							SpiceUsbDeviceManager* _tmp72_;
							SpiceUsbDevice* _tmp73_;
							gboolean _tmp74_;
							GtkSwitch* _tmp75_;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_data80_ = g_slice_new0 (Block80Data);
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_data80_->_ref_count_ = 1;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_data80_->_data78_ = block78_data_ref (_data78_);
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							if (!_tmp42_) {
#line 2611 "spice-display.c"
								gint _tmp43_;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								_tmp43_ = i;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								i = _tmp43_ + 1;
#line 2617 "spice-display.c"
							}
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp42_ = FALSE;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp44_ = i;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp45_ = devs;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp46_ = g_ptr_array_get_length (_tmp45_);
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp47_ = _tmp46_;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							if (!(_tmp44_ < _tmp47_)) {
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								block80_data_unref (_data80_);
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								_data80_ = NULL;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								break;
#line 2637 "spice-display.c"
							}
#line 361 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp48_ = devs;
#line 361 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp49_ = i;
#line 361 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp50_ = g_ptr_array_index (_tmp48_, (guint) _tmp49_);
#line 361 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp51_ = __vala_SpiceUsbDevice_copy0 ((SpiceUsbDevice*) _tmp50_);
#line 361 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_data80_->dev = _tmp51_;
#line 363 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp52_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
#line 363 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							g_object_ref_sink (_tmp52_);
#line 363 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							hbox = _tmp52_;
#line 364 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp53_ = hbox;
#line 364 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							gtk_widget_set_margin_start ((GtkWidget*) _tmp53_, 12);
#line 365 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp54_ = hbox;
#line 365 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							gtk_widget_set_margin_end ((GtkWidget*) _tmp54_, 12);
#line 366 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp55_ = hbox;
#line 366 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							gtk_widget_set_margin_top ((GtkWidget*) _tmp55_, 6);
#line 367 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp56_ = hbox;
#line 367 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							gtk_widget_set_margin_bottom ((GtkWidget*) _tmp56_, 6);
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp57_ = _data80_->dev;
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp58_ = spice_usb_device_get_description (_tmp57_, "%1$s %2$s");
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp59_ = _tmp58_;
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp60_ = (GtkLabel*) gtk_label_new (_tmp59_);
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							g_object_ref_sink (_tmp60_);
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp61_ = _tmp60_;
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_g_free0 (_tmp59_);
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							label = _tmp61_;
#line 369 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp62_ = label;
#line 369 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							gtk_widget_set_halign ((GtkWidget*) _tmp62_, GTK_ALIGN_START);
#line 370 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp63_ = hbox;
#line 370 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp64_ = label;
#line 370 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							gtk_box_pack_start (_tmp63_, (GtkWidget*) _tmp64_, TRUE, TRUE, (guint) 0);
#line 371 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp65_ = (GtkSwitch*) gtk_switch_new ();
#line 371 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							g_object_ref_sink (_tmp65_);
#line 371 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_data80_->dev_toggle = _tmp65_;
#line 372 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp66_ = _data80_->dev_toggle;
#line 372 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							gtk_widget_set_halign ((GtkWidget*) _tmp66_, GTK_ALIGN_END);
#line 373 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp67_ = hbox;
#line 373 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp68_ = _data80_->dev_toggle;
#line 373 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							gtk_box_pack_start (_tmp67_, (GtkWidget*) _tmp68_, TRUE, TRUE, (guint) 0);
#line 374 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp69_ = listbox;
#line 374 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp70_ = hbox;
#line 374 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							gtk_list_box_prepend (_tmp69_, (GtkWidget*) _tmp70_);
#line 376 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp71_ = _data80_->dev_toggle;
#line 376 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp72_ = _data78_->manager;
#line 376 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp73_ = _data80_->dev;
#line 376 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp74_ = spice_usb_device_manager_is_device_connected (_tmp72_, _tmp73_);
#line 376 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							gtk_switch_set_active (_tmp71_, _tmp74_);
#line 378 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp75_ = _data80_->dev_toggle;
#line 378 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							g_signal_connect_data ((GObject*) _tmp75_, "notify::active", (GCallback) ________lambda76__g_object_notify, block80_data_ref (_data80_), (GClosureNotify) block80_data_unref, 0);
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_g_object_unref0 (label);
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_g_object_unref0 (hbox);
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							block80_data_unref (_data80_);
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_data80_ = NULL;
#line 2741 "spice-display.c"
						}
					}
				}
#line 400 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp76_ = (GtkLabel*) gtk_label_new ("");
#line 400 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_object_ref_sink (_tmp76_);
#line 400 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp77_ = _tmp76_;
#line 400 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp78_ = frame;
#line 400 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp79_ = boxes_iproperties_provider_add_property ((BoxesIPropertiesProvider*) self, &list, _ ("USB devices"), (GtkWidget*) _tmp77_, (GtkWidget*) _tmp78_);
#line 400 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp80_ = _tmp79_;
#line 400 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_object_unref0 (_tmp77_);
#line 400 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_data78_->usb_property = _tmp80_;
#line 402 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp81_ = _data78_->manager;
#line 402 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_signal_connect_data (_tmp81_, "device-added", (GCallback) _____lambda78__spice_usb_device_manager_device_added, block78_data_ref (_data78_), (GClosureNotify) block78_data_unref, 0);
#line 405 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp82_ = _data78_->manager;
#line 405 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_signal_connect_data (_tmp82_, "device-removed", (GCallback) _____lambda79__spice_usb_device_manager_device_removed, block78_data_ref (_data78_), (GClosureNotify) block78_data_unref, 0);
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_object_unref0 (listbox);
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_object_unref0 (frame);
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_ptr_array_unref0 (devs);
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				block78_data_unref (_data78_);
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_data78_ = NULL;
#line 2779 "spice-display.c"
			}
			goto __finally76;
			__catch76_g_error:
			{
				GError* _error_ = NULL;
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_error_ = _inner_error_;
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_inner_error_ = NULL;
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_error_free0 (_error_);
#line 2791 "spice-display.c"
			}
			__finally76:
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				__g_list_free__g_object_unref0_0 (list);
#line 341 "/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 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_clear_error (&_inner_error_);
#line 341 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				return NULL;
#line 2804 "spice-display.c"
			}
#line 410 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			break;
#line 2808 "spice-display.c"
		}
		default:
#line 314 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 2813 "spice-display.c"
	}
#line 413 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = list;
#line 413 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 2819 "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_;
	guint* _tmp2_;
	gint _tmp2__length1;
#line 416 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceDisplay*) base;
#line 418 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = boxes_display_get_display ((BoxesDisplay*) self, 0);
#line 418 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, spice_display_get_type ()) ? ((SpiceDisplay*) _tmp0_) : NULL;
#line 418 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp1_ == NULL) {
#line 418 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (_tmp0_);
#line 2840 "spice-display.c"
	}
#line 418 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	display = _tmp1_;
#line 420 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = keyvals;
#line 420 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2__length1 = keyvals_length1;
#line 420 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	spice_display_send_keys (display, _tmp2_, _tmp2__length1, SPICE_DISPLAY_KEY_EVENT_CLICK);
#line 416 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (display);
#line 2852 "spice-display.c"
}


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


static gpointer _libusb_ref_device0 (gpointer self) {
#line 432 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return self ? libusb_ref_device (self) : NULL;
#line 2866 "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;
	SpiceUsbDeviceManager* _tmp1_;
	GPtrArray* _tmp2_;
	const gchar* _tmp3_;
#line 423 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 423 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (manager != NULL, NULL);
#line 424 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = g_ptr_array_new_full ((guint) 0, __vala_SpiceUsbDevice_free0_);
#line 424 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	ret = _tmp0_;
#line 425 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = manager;
#line 425 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = spice_usb_device_manager_get_devices (_tmp1_);
#line 425 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	devs = _tmp2_;
#line 427 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = g_getenv ("BOXES_USB_REDIR_ALL");
#line 427 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp3_ != NULL) {
#line 428 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		result = devs;
#line 428 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_ptr_array_unref0 (ret);
#line 428 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return result;
#line 2902 "spice-display.c"
	}
	{
		gint i = 0;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		i = 0;
#line 2908 "spice-display.c"
		{
			gboolean _tmp4_ = FALSE;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp4_ = TRUE;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			while (TRUE) {
#line 2915 "spice-display.c"
				gint _tmp6_;
				GPtrArray* _tmp7_;
				gint _tmp8_;
				gint _tmp9_;
				SpiceUsbDevice* dev = NULL;
				GPtrArray* _tmp10_;
				gint _tmp11_;
				gconstpointer _tmp12_;
				SpiceUsbDevice* _tmp13_;
				libusb_device* libusb_dev = NULL;
				SpiceUsbDevice* _tmp14_;
				void* _tmp15_;
				libusb_device* _tmp16_;
				struct libusb_device_descriptor desc = {0};
				libusb_device* _tmp17_;
				struct libusb_device_descriptor _tmp18_ = {0};
				gint _tmp19_;
				struct libusb_device_descriptor _tmp20_;
				guint8 _tmp21_;
				struct libusb_device_descriptor _tmp22_;
				guint8 _tmp23_;
				struct libusb_device_descriptor _tmp24_;
				guint8 _tmp25_;
				gboolean _tmp26_;
				struct libusb_device_descriptor _tmp27_;
				guint8 _tmp28_;
				GPtrArray* _tmp78_;
				SpiceUsbDevice* _tmp79_;
				SpiceUsbDevice* _tmp80_;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (!_tmp4_) {
#line 2947 "spice-display.c"
					gint _tmp5_;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp5_ = i;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					i = _tmp5_ + 1;
#line 2953 "spice-display.c"
				}
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp4_ = FALSE;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp6_ = i;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp7_ = devs;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp8_ = g_ptr_array_get_length (_tmp7_);
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp9_ = _tmp8_;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (!(_tmp6_ < _tmp9_)) {
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					break;
#line 2969 "spice-display.c"
				}
#line 431 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp10_ = devs;
#line 431 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp11_ = i;
#line 431 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp12_ = g_ptr_array_index (_tmp10_, (guint) _tmp11_);
#line 431 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp13_ = __vala_SpiceUsbDevice_copy0 ((SpiceUsbDevice*) _tmp12_);
#line 431 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				dev = _tmp13_;
#line 432 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp14_ = dev;
#line 432 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp15_ = spice_usb_device_get_libusb_device (_tmp14_);
#line 432 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp16_ = _libusb_ref_device0 ((libusb_device*) _tmp15_);
#line 432 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				libusb_dev = _tmp16_;
#line 436 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp17_ = libusb_dev;
#line 436 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp19_ = libusb_get_device_descriptor (_tmp17_, &_tmp18_);
#line 436 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				desc = _tmp18_;
#line 436 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_tmp19_ != 0) {
#line 437 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_libusb_unref_device0 (libusb_dev);
#line 437 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					__vala_SpiceUsbDevice_free0 (dev);
#line 437 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					continue;
#line 3003 "spice-display.c"
				}
#line 439 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp20_ = desc;
#line 439 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp21_ = _tmp20_.bDeviceClass;
#line 439 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp22_ = desc;
#line 439 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp23_ = _tmp22_.bDeviceSubClass;
#line 439 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp24_ = desc;
#line 439 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp25_ = _tmp24_.bDeviceProtocol;
#line 439 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp26_ = boxes_spice_display_is_usb_kbd_or_mouse (self, _tmp21_, _tmp23_, _tmp25_);
#line 439 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_tmp26_) {
#line 440 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_libusb_unref_device0 (libusb_dev);
#line 440 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					__vala_SpiceUsbDevice_free0 (dev);
#line 440 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					continue;
#line 3027 "spice-display.c"
				}
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp27_ = desc;
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp28_ = _tmp27_.bDeviceClass;
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_tmp28_ == LIBUSB_CLASS_PER_INTERFACE) {
#line 3035 "spice-display.c"
					struct libusb_config_descriptor* config = NULL;
					libusb_device* _tmp29_;
					struct libusb_config_descriptor* _tmp30_ = NULL;
					gint _tmp31_;
					gboolean kbd_or_mouse = FALSE;
					gboolean _tmp77_;
#line 445 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp29_ = libusb_dev;
#line 445 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp31_ = libusb_get_active_config_descriptor (_tmp29_, &_tmp30_);
#line 445 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_libusb_free_config_descriptor0 (config);
#line 445 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					config = _tmp30_;
#line 445 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					if (_tmp31_ != 0) {
#line 446 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_libusb_free_config_descriptor0 (config);
#line 446 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_libusb_unref_device0 (libusb_dev);
#line 446 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						__vala_SpiceUsbDevice_free0 (dev);
#line 446 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						continue;
#line 3060 "spice-display.c"
					}
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					kbd_or_mouse = FALSE;
#line 3064 "spice-display.c"
					{
						gint j = 0;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						j = 0;
#line 3069 "spice-display.c"
						{
							gboolean _tmp32_ = FALSE;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp32_ = TRUE;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							while (TRUE) {
#line 3076 "spice-display.c"
								gboolean _tmp34_ = FALSE;
								gint _tmp35_;
								struct libusb_config_descriptor* _tmp36_;
								struct libusb_interface* _tmp37_;
								gint _tmp37__length1;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								if (!_tmp32_) {
#line 3084 "spice-display.c"
									gint _tmp33_;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									_tmp33_ = j;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									j = _tmp33_ + 1;
#line 3090 "spice-display.c"
								}
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								_tmp32_ = FALSE;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								_tmp35_ = j;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								_tmp36_ = config;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								_tmp37_ = _tmp36_->interface;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								_tmp37__length1 = _tmp36_->bNumInterfaces;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								if (_tmp35_ < _tmp37__length1) {
#line 3104 "spice-display.c"
									gboolean _tmp38_;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									_tmp38_ = kbd_or_mouse;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									_tmp34_ = !_tmp38_;
#line 3110 "spice-display.c"
								} else {
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									_tmp34_ = FALSE;
#line 3114 "spice-display.c"
								}
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								if (!_tmp34_) {
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									break;
#line 3120 "spice-display.c"
								}
								{
									gint k = 0;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									k = 0;
#line 3126 "spice-display.c"
									{
										gboolean _tmp39_ = FALSE;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
										_tmp39_ = TRUE;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
										while (TRUE) {
#line 3133 "spice-display.c"
											gboolean _tmp41_ = FALSE;
											gint _tmp42_;
											struct libusb_config_descriptor* _tmp43_;
											struct libusb_interface* _tmp44_;
											gint _tmp44__length1;
											gint _tmp45_;
											struct libusb_interface _tmp46_;
											struct libusb_interface_descriptor* _tmp47_;
											gint _tmp47__length1;
											guint8 class = 0U;
											struct libusb_config_descriptor* _tmp49_;
											struct libusb_interface* _tmp50_;
											gint _tmp50__length1;
											gint _tmp51_;
											struct libusb_interface _tmp52_;
											struct libusb_interface_descriptor* _tmp53_;
											gint _tmp53__length1;
											gint _tmp54_;
											struct libusb_interface_descriptor _tmp55_;
											guint8 _tmp56_;
											guint8 subclass = 0U;
											struct libusb_config_descriptor* _tmp57_;
											struct libusb_interface* _tmp58_;
											gint _tmp58__length1;
											gint _tmp59_;
											struct libusb_interface _tmp60_;
											struct libusb_interface_descriptor* _tmp61_;
											gint _tmp61__length1;
											gint _tmp62_;
											struct libusb_interface_descriptor _tmp63_;
											guint8 _tmp64_;
											guint8 protocol = 0U;
											struct libusb_config_descriptor* _tmp65_;
											struct libusb_interface* _tmp66_;
											gint _tmp66__length1;
											gint _tmp67_;
											struct libusb_interface _tmp68_;
											struct libusb_interface_descriptor* _tmp69_;
											gint _tmp69__length1;
											gint _tmp70_;
											struct libusb_interface_descriptor _tmp71_;
											guint8 _tmp72_;
											guint8 _tmp73_;
											guint8 _tmp74_;
											guint8 _tmp75_;
											gboolean _tmp76_;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											if (!_tmp39_) {
#line 3182 "spice-display.c"
												gint _tmp40_;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
												_tmp40_ = k;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
												k = _tmp40_ + 1;
#line 3188 "spice-display.c"
											}
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp39_ = FALSE;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp42_ = k;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp43_ = config;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp44_ = _tmp43_->interface;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp44__length1 = _tmp43_->bNumInterfaces;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp45_ = j;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp46_ = _tmp44_[_tmp45_];
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp47_ = _tmp46_.altsetting;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp47__length1 = _tmp46_.num_altsetting;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											if (_tmp42_ < _tmp47__length1) {
#line 3210 "spice-display.c"
												gboolean _tmp48_;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
												_tmp48_ = kbd_or_mouse;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
												_tmp41_ = !_tmp48_;
#line 3216 "spice-display.c"
											} else {
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
												_tmp41_ = FALSE;
#line 3220 "spice-display.c"
											}
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											if (!_tmp41_) {
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
												break;
#line 3226 "spice-display.c"
											}
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp49_ = config;
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp50_ = _tmp49_->interface;
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp50__length1 = _tmp49_->bNumInterfaces;
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp51_ = j;
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp52_ = _tmp50_[_tmp51_];
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp53_ = _tmp52_.altsetting;
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp53__length1 = _tmp52_.num_altsetting;
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp54_ = k;
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp55_ = _tmp53_[_tmp54_];
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp56_ = _tmp55_.bInterfaceClass;
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											class = _tmp56_;
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp57_ = config;
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp58_ = _tmp57_->interface;
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp58__length1 = _tmp57_->bNumInterfaces;
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp59_ = j;
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp60_ = _tmp58_[_tmp59_];
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp61_ = _tmp60_.altsetting;
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp61__length1 = _tmp60_.num_altsetting;
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp62_ = k;
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp63_ = _tmp61_[_tmp62_];
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp64_ = _tmp63_.bInterfaceSubClass;
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											subclass = _tmp64_;
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp65_ = config;
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp66_ = _tmp65_->interface;
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp66__length1 = _tmp65_->bNumInterfaces;
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp67_ = j;
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp68_ = _tmp66_[_tmp67_];
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp69_ = _tmp68_.altsetting;
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp69__length1 = _tmp68_.num_altsetting;
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp70_ = k;
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp71_ = _tmp69_[_tmp70_];
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp72_ = _tmp71_.bInterfaceProtocol;
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											protocol = _tmp72_;
#line 455 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp73_ = class;
#line 455 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp74_ = subclass;
#line 455 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp75_ = protocol;
#line 455 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp76_ = boxes_spice_display_is_usb_kbd_or_mouse (self, _tmp73_, _tmp74_, _tmp75_);
#line 455 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											kbd_or_mouse = _tmp76_;
#line 3304 "spice-display.c"
										}
									}
								}
							}
						}
					}
#line 459 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp77_ = kbd_or_mouse;
#line 459 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					if (_tmp77_) {
#line 460 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_libusb_free_config_descriptor0 (config);
#line 460 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_libusb_unref_device0 (libusb_dev);
#line 460 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						__vala_SpiceUsbDevice_free0 (dev);
#line 460 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						continue;
#line 3323 "spice-display.c"
					}
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_libusb_free_config_descriptor0 (config);
#line 3327 "spice-display.c"
				}
#line 463 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp78_ = ret;
#line 463 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp79_ = dev;
#line 463 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp80_ = __vala_SpiceUsbDevice_copy0 (_tmp79_);
#line 463 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_ptr_array_add (_tmp78_, _tmp80_);
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_libusb_unref_device0 (libusb_dev);
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				__vala_SpiceUsbDevice_free0 (dev);
#line 3341 "spice-display.c"
			}
		}
	}
#line 466 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = ret;
#line 466 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_ptr_array_unref0 (devs);
#line 466 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 3351 "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;
	guint8 _tmp0_;
#line 469 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 470 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	ret = FALSE;
#line 472 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = class;
#line 472 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp0_ == LIBUSB_CLASS_HID) {
#line 3367 "spice-display.c"
		guint8 _tmp1_;
#line 473 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp1_ = subclass;
#line 473 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		switch (_tmp1_) {
#line 473 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			case 0x00:
#line 3375 "spice-display.c"
			{
#line 475 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 3379 "spice-display.c"
			}
#line 473 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			case 0x01:
#line 3383 "spice-display.c"
			{
				guint8 _tmp2_;
#line 477 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp2_ = protocol;
#line 477 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				switch (_tmp2_) {
#line 477 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					case 0x00:
#line 3392 "spice-display.c"
					{
#line 479 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						break;
#line 3396 "spice-display.c"
					}
#line 477 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					case 0x01:
#line 477 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					case 0x02:
#line 3402 "spice-display.c"
					{
#line 482 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						ret = TRUE;
#line 483 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						break;
#line 3408 "spice-display.c"
					}
					default:
					{
#line 485 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						break;
#line 3414 "spice-display.c"
					}
				}
#line 487 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 3419 "spice-display.c"
			}
			default:
			{
#line 489 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 3425 "spice-display.c"
			}
		}
	}
#line 493 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = ret;
#line 493 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return result;
#line 3433 "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 3446 "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 3478 "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 3495 "spice-display.c"
	} else {
#line 10 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp0_ = FALSE;
#line 3499 "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 3507 "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 3519 "spice-display.c"
}


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


void boxes_spice_display_set_ca_cert (BoxesSpiceDisplay* self, GByteArray* value) {
	SpiceSession* _tmp0_;
	GByteArray* _tmp1_;
#line 16 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 16 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->session;
#line 16 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = value;
#line 16 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_set (_tmp0_, "ca", _tmp1_, NULL);
#line 16 "/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]);
#line 3557 "spice-display.c"
}


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


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


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


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


void boxes_spice_display_set_main_channel (BoxesSpiceDisplay* self, SpiceMainChannel* value) {
	SpiceMainChannel* _tmp0_;
	SpiceMainChannel* _tmp1_;
	SpiceMainChannel* _tmp2_;
	SpiceMainChannel* _tmp3_;
	SpiceMainChannel* _tmp4_;
	gulong _tmp5_;
	SpiceMainChannel* _tmp6_;
	SpiceMainChannel* _tmp7_;
	gulong _tmp8_;
	SpiceMainChannel* _tmp9_;
	SpiceMainChannel* _tmp10_;
	gint _tmp11_;
	gint _tmp12_;
#line 76 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 77 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = value;
#line 77 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 77 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (self->priv->_main_channel);
#line 77 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->_main_channel = _tmp1_;
#line 78 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = self->priv->_main_channel;
#line 78 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp2_ == NULL) {
#line 79 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return;
#line 3639 "spice-display.c"
	}
#line 81 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = boxes_spice_display_get_main_channel (self);
#line 81 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = _tmp3_;
#line 81 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = g_signal_connect_object ((SpiceChannel*) _tmp4_, "channel-event", (GCallback) _boxes_spice_display_main_event_spice_channel_channel_event, self, 0);
#line 81 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->main_event_id = _tmp5_;
#line 82 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = boxes_spice_display_get_main_channel (self);
#line 82 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = _tmp6_;
#line 82 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = g_signal_connect_object ((GObject*) _tmp7_, "notify::mouse-mode", (GCallback) __boxes_spice_display_main_channel___lambda72__g_object_notify, self, 0);
#line 82 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->main_mouse_mode_id = _tmp8_;
#line 86 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp9_ = boxes_spice_display_get_main_channel (self);
#line 86 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp10_ = _tmp9_;
#line 86 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_get (_tmp10_, "mouse-mode", &_tmp11_, NULL);
#line 86 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp12_ = _tmp11_;
#line 86 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_set_can_grab_mouse ((BoxesDisplay*) self, _tmp12_ != 2);
#line 76 "/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]);
#line 3669 "spice-display.c"
}


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


static void __boxes_spice_display____lambda80__spice_usb_device_manager_device_error (SpiceUsbDeviceManager* _sender, SpiceUsbDevice* device, GError* _error_, gpointer self) {
#line 60 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_boxes_spice_display____lambda80_ ((BoxesSpiceDisplay*) self, device, _error_);
#line 3732 "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 46 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	parent_class = G_OBJECT_CLASS (boxes_spice_display_parent_class);
#line 46 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 46 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_SPICE_DISPLAY, BoxesSpiceDisplay);
#line 47 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = g_strdup ("auto-clipboard");
#line 47 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_value_init (&_tmp1_, G_TYPE_BOOLEAN);
#line 47 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_value_set_boolean (&_tmp1_, TRUE);
#line 47 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	memset (&_tmp2_, 0, sizeof (BoxesBoxConfigSavedProperty));
#line 47 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (_tmp2_.name);
#line 47 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_.name = _tmp0_;
#line 47 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	G_IS_VALUE (&_tmp2_.default_value) ? (g_value_unset (&_tmp2_.default_value), NULL) : NULL;
#line 47 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_.default_value = _tmp1_;
#line 47 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = g_new0 (BoxesBoxConfigSavedProperty, 1);
#line 47 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_[0] = _tmp2_;
#line 47 "/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 47 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->gtk_session_saved_properties = _tmp3_;
#line 47 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->gtk_session_saved_properties_length1 = 1;
#line 47 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->_gtk_session_saved_properties_size_ = self->priv->gtk_session_saved_properties_length1;
#line 51 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_set_need_password ((BoxesDisplay*) self, FALSE);
#line 52 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = spice_session_new ();
#line 52 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (self->priv->session);
#line 52 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->session = _tmp4_;
#line 53 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = self->priv->session;
#line 53 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = spice_audio_get (_tmp5_, NULL);
#line 53 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->audio = _tmp6_;
#line 54 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = self->priv->session;
#line 54 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = spice_gtk_session_get (_tmp7_);
#line 54 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->gtk_session = _tmp8_;
#line 56 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp9_ = self->priv->session;
#line 56 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	spice_set_session_option (_tmp9_);
#line 3809 "spice-display.c"
	{
		SpiceUsbDeviceManager* manager = NULL;
		SpiceSession* _tmp10_;
		SpiceUsbDeviceManager* _tmp11_;
		SpiceUsbDeviceManager* _tmp12_;
		SpiceUsbDeviceManager* _tmp13_;
#line 58 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp10_ = self->priv->session;
#line 58 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp11_ = spice_usb_device_manager_get (_tmp10_, &_inner_error_);
#line 58 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp12_ = _g_object_ref0 (_tmp11_);
#line 58 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		manager = _tmp12_;
#line 58 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 3826 "spice-display.c"
			goto __catch78_g_error;
		}
#line 60 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp13_ = manager;
#line 60 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_connect_object (_tmp13_, "device-error", (GCallback) __boxes_spice_display____lambda80__spice_usb_device_manager_device_error, self, 0);
#line 57 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (manager);
#line 3835 "spice-display.c"
	}
	goto __finally78;
	__catch78_g_error:
	{
		GError* _error_ = NULL;
#line 57 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_error_ = _inner_error_;
#line 57 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_inner_error_ = NULL;
#line 57 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_error_free0 (_error_);
#line 3847 "spice-display.c"
	}
	__finally78:
#line 57 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 57 "/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 57 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_clear_error (&_inner_error_);
#line 3856 "spice-display.c"
	}
#line 46 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return obj;
#line 3860 "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)->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"
	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, boxes_spice_display_properties[BOXES_SPICE_DISPLAY_PROTOCOL] = 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, boxes_spice_display_properties[BOXES_SPICE_DISPLAY_URI] = 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_CA_CERT, boxes_spice_display_properties[BOXES_SPICE_DISPLAY_CA_CERT] = 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, boxes_spice_display_properties[BOXES_SPICE_DISPLAY_MAIN_CHANNEL] = 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 3907 "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 3914 "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 105 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_display_main_cleanup (self);
#line 20 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (self->priv->session);
#line 25 "/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 26 "/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 29 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_hash_table_unref0 (self->priv->channel_handlers);
#line 30 "/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 30 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd = NULL;
#line 30 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target = NULL;
#line 30 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target_destroy_notify = NULL;
#line 70 "/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 3944 "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:
#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:
#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_CA_CERT:
#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:
#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 3989 "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 3995 "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:
#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:
#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 4017 "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 4023 "spice-display.c"
	}
}


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


static void _boxes_spice_channel_handler_on_display_ready_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 519 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_spice_channel_handler_on_display_ready ((BoxesSpiceChannelHandler*) self, _sender, pspec);
#line 4038 "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;
	BoxesSpiceDisplay* _tmp0_;
	SpiceChannel* _tmp1_;
	SpiceChannel* _tmp2_;
	BoxesDisplayOpenFDFunc _tmp3_;
	void* _tmp3__target;
	gint id = 0;
	SpiceChannel* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	BoxesDisplayOpenFDFunc _tmp7_;
	void* _tmp7__target;
	SpiceChannel* _tmp9_;
	SpiceChannel* _tmp12_;
#line 502 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (display != NULL, NULL);
#line 502 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_val_if_fail (channel != NULL, NULL);
#line 502 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = (BoxesSpiceChannelHandler*) g_object_new (object_type, NULL);
#line 503 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = display;
#line 503 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->display = _tmp0_;
#line 504 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = channel;
#line 504 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 504 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (self->priv->channel);
#line 504 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->channel = _tmp2_;
#line 505 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = open_fd;
#line 505 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3__target = open_fd_target;
#line 505 "/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 505 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd = NULL;
#line 505 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target = NULL;
#line 505 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target_destroy_notify = NULL;
#line 505 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd = _tmp3_;
#line 505 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target = _tmp3__target;
#line 505 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target_destroy_notify = NULL;
#line 506 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = channel;
#line 506 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_get (_tmp4_, "channel-id", &_tmp5_, NULL);
#line 506 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = _tmp5_;
#line 506 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	id = _tmp6_;
#line 508 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = open_fd;
#line 508 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7__target = open_fd_target;
#line 508 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp7_ != NULL) {
#line 4107 "spice-display.c"
		SpiceChannel* _tmp8_;
#line 509 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp8_ = channel;
#line 509 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_connect_object (_tmp8_, "open-fd", (GCallback) _boxes_spice_channel_handler_on_open_fd_spice_channel_open_fd, self, 0);
#line 4113 "spice-display.c"
	}
#line 511 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp9_ = channel;
#line 511 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, spice_main_channel_get_type ())) {
#line 4119 "spice-display.c"
		BoxesSpiceDisplay* _tmp10_;
		SpiceChannel* _tmp11_;
#line 512 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp10_ = display;
#line 512 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp11_ = channel;
#line 512 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		boxes_spice_display_set_main_channel (_tmp10_, G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, spice_main_channel_get_type ()) ? ((SpiceMainChannel*) _tmp11_) : NULL);
#line 4128 "spice-display.c"
	}
#line 514 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp12_ = channel;
#line 514 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, spice_display_channel_get_type ())) {
#line 4134 "spice-display.c"
		gint _tmp13_;
		SpiceDisplay* spice_display = NULL;
		BoxesSpiceDisplay* _tmp14_;
		gint _tmp15_;
		GtkWidget* _tmp16_;
		SpiceDisplay* _tmp17_;
		SpiceDisplay* _tmp18_;
#line 515 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp13_ = id;
#line 515 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp13_ != 0) {
#line 516 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			return self;
#line 4148 "spice-display.c"
		}
#line 518 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp14_ = display;
#line 518 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp15_ = id;
#line 518 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp16_ = boxes_display_get_display ((BoxesDisplay*) _tmp14_, _tmp15_);
#line 518 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp17_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, spice_display_get_type ()) ? ((SpiceDisplay*) _tmp16_) : NULL;
#line 518 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp17_ == NULL) {
#line 518 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_object_unref0 (_tmp16_);
#line 4162 "spice-display.c"
		}
#line 518 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		spice_display = _tmp17_;
#line 519 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp18_ = spice_display;
#line 519 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_connect_object ((GObject*) _tmp18_, "notify::ready", (GCallback) _boxes_spice_channel_handler_on_display_ready_g_object_notify, self, 0);
#line 514 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (spice_display);
#line 4172 "spice-display.c"
	}
#line 502 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return self;
#line 4176 "spice-display.c"
}


BoxesSpiceChannelHandler* boxes_spice_channel_handler_new (BoxesSpiceDisplay* display, SpiceChannel* channel, BoxesDisplayOpenFDFunc open_fd, void* open_fd_target) {
#line 502 "/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 4183 "spice-display.c"
}


static void boxes_spice_channel_handler_on_display_ready (BoxesSpiceChannelHandler* self, GObject* object, GParamSpec* param_spec) {
	SpiceDisplay* spice_display = NULL;
	GObject* _tmp0_;
	SpiceDisplay* _tmp1_;
	SpiceDisplay* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
#line 523 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 523 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (object != NULL);
#line 523 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (param_spec != NULL);
#line 524 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = object;
#line 524 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, spice_display_get_type ()) ? ((SpiceDisplay*) _tmp0_) : NULL);
#line 524 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	spice_display = _tmp1_;
#line 525 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = spice_display;
#line 525 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_get (_tmp2_, "ready", &_tmp3_, NULL);
#line 525 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = _tmp3_;
#line 525 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp4_) {
#line 4214 "spice-display.c"
		BoxesSpiceDisplay* _tmp5_;
		SpiceDisplay* _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
#line 526 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = self->priv->display;
#line 526 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp6_ = spice_display;
#line 526 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_get (_tmp6_, "channel-id", &_tmp7_, NULL);
#line 526 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp8_ = _tmp7_;
#line 526 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_emit_by_name ((BoxesDisplay*) _tmp5_, "show", _tmp8_);
#line 4229 "spice-display.c"
	} else {
		BoxesSpiceDisplay* _tmp9_;
		SpiceDisplay* _tmp10_;
		gint _tmp11_;
		gint _tmp12_;
#line 528 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp9_ = self->priv->display;
#line 528 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp10_ = spice_display;
#line 528 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_get (_tmp10_, "channel-id", &_tmp11_, NULL);
#line 528 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp12_ = _tmp11_;
#line 528 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_emit_by_name ((BoxesDisplay*) _tmp9_, "hide", _tmp12_);
#line 4245 "spice-display.c"
	}
#line 523 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (spice_display);
#line 4249 "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;
	gint _tmp1_;
	SpiceChannel* _tmp2_;
#line 531 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (self != NULL);
#line 531 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (channel != NULL);
#line 534 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->open_fd;
#line 534 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0__target = self->priv->open_fd_target;
#line 534 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = _tmp0_ (_tmp0__target);
#line 534 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	fd = _tmp1_;
#line 535 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = channel;
#line 535 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	spice_channel_open_fd (_tmp2_, fd);
#line 4275 "spice-display.c"
}


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


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


static void boxes_spice_channel_handler_finalize (GObject * obj) {
	BoxesSpiceChannelHandler * self;
#line 497 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_SPICE_CHANNEL_HANDLER, BoxesSpiceChannelHandler);
#line 499 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (self->priv->channel);
#line 500 "/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 500 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd = NULL;
#line 500 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target = NULL;
#line 500 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target_destroy_notify = NULL;
#line 497 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	G_OBJECT_CLASS (boxes_spice_channel_handler_parent_class)->finalize (obj);
#line 4313 "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 548 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	dup = g_new0 (gint, 1);
#line 548 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	memcpy (dup, self, sizeof (gint));
#line 548 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return dup;
#line 4337 "spice-display.c"
}


static gpointer __int_dup0 (gpointer self) {
#line 548 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return self ? _int_dup (self) : NULL;
#line 4344 "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;
	const gchar* _tmp0_;
	xmlURI* _tmp1_;
	xmlURI* _tmp2_;
	gint _tmp4_;
	gint* _tmp5_;
	xmlURI* _tmp6_;
	gint _tmp7_;
	gint* _tmp8_;
	const gchar* _tmp9_ = NULL;
	xmlURI* _tmp10_;
	const gchar* _tmp11_;
	gchar* query_str = NULL;
	gchar* _tmp14_;
	const gchar* _tmp15_;
	xmlURI* _tmp38_;
	const gchar* _tmp39_;
	const gchar* _tmp40_;
	GQuark _tmp42_ = 0U;
#line 564 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	static GQuark _tmp41_label0 = 0;
#line 564 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	static GQuark _tmp41_label1 = 0;
#line 4374 "spice-display.c"
	GError * _inner_error_ = NULL;
#line 540 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_return_if_fail (uri_as_text != NULL);
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = uri_as_text;
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = xmlParseURI (_tmp0_);
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	uri = _tmp1_;
#line 545 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = uri;
#line 545 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp2_ == NULL) {
#line 4388 "spice-display.c"
		GError* _tmp3_;
#line 546 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp3_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, _ ("Invalid URL"));
#line 546 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_inner_error_ = _tmp3_;
#line 546 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_inner_error_->domain == BOXES_ERROR) {
#line 546 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_propagate_error (error, _inner_error_);
#line 546 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_xmlFreeURI0 (uri);
#line 546 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			return;
#line 4402 "spice-display.c"
		} else {
#line 546 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_xmlFreeURI0 (uri);
#line 546 "/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 546 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_clear_error (&_inner_error_);
#line 546 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			return;
#line 4412 "spice-display.c"
		}
	}
#line 548 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = 0;
#line 548 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = __int_dup0 (&_tmp4_);
#line 548 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (_vala_tls_port);
#line 548 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_vala_tls_port = _tmp5_;
#line 549 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = uri;
#line 549 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = _tmp6_->port;
#line 549 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = __int_dup0 (&_tmp7_);
#line 549 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (_vala_port);
#line 549 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_vala_port = _tmp8_;
#line 550 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp10_ = uri;
#line 550 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp11_ = _tmp10_->query_raw;
#line 550 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp9_ = _tmp11_;
#line 550 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp9_ == NULL) {
#line 4441 "spice-display.c"
		xmlURI* _tmp12_;
		const gchar* _tmp13_;
#line 550 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp12_ = uri;
#line 550 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp13_ = _tmp12_->query;
#line 550 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp9_ = _tmp13_;
#line 4450 "spice-display.c"
	}
#line 550 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp14_ = g_strdup (_tmp9_);
#line 550 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	query_str = _tmp14_;
#line 552 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp15_ = query_str;
#line 552 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp15_ != NULL) {
#line 4460 "spice-display.c"
		BoxesQuery* query = NULL;
		const gchar* _tmp16_;
		BoxesQuery* _tmp17_;
		BoxesQuery* _tmp18_;
		gchar* _tmp19_;
		gchar* _tmp20_;
		gboolean _tmp21_;
		BoxesQuery* _tmp29_;
		gchar* _tmp30_;
		gchar* _tmp31_;
		gboolean _tmp32_;
#line 553 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp16_ = query_str;
#line 553 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp17_ = boxes_query_new (_tmp16_);
#line 553 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		query = _tmp17_;
#line 554 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp18_ = query;
#line 554 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp19_ = boxes_query_get (_tmp18_, "port");
#line 554 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp20_ = _tmp19_;
#line 554 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp21_ = _tmp20_ != NULL;
#line 554 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_tmp20_);
#line 554 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp21_) {
#line 4490 "spice-display.c"
			gint* _tmp22_;
			BoxesQuery* _tmp24_;
			gchar* _tmp25_;
			gchar* _tmp26_;
			gint _tmp27_;
			gint* _tmp28_;
#line 555 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp22_ = _vala_port;
#line 555 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if ((*_tmp22_) > 0) {
#line 4501 "spice-display.c"
				GError* _tmp23_;
#line 556 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp23_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, _ ("The port must be specified once"));
#line 556 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_inner_error_ = _tmp23_;
#line 556 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_inner_error_->domain == BOXES_ERROR) {
#line 556 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					g_propagate_error (error, _inner_error_);
#line 556 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_object_unref0 (query);
#line 556 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_free0 (query_str);
#line 556 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_xmlFreeURI0 (uri);
#line 556 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					return;
#line 4519 "spice-display.c"
				} else {
#line 556 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_object_unref0 (query);
#line 556 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_free0 (query_str);
#line 556 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_xmlFreeURI0 (uri);
#line 556 "/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 556 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					g_clear_error (&_inner_error_);
#line 556 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					return;
#line 4533 "spice-display.c"
				}
			}
#line 557 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp24_ = query;
#line 557 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp25_ = boxes_query_get (_tmp24_, "port");
#line 557 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp26_ = _tmp25_;
#line 557 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp27_ = atoi (_tmp26_);
#line 557 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp28_ = __int_dup0 (&_tmp27_);
#line 557 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (_vala_port);
#line 557 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_vala_port = _tmp28_;
#line 557 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (_tmp26_);
#line 4552 "spice-display.c"
		}
#line 560 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp29_ = query;
#line 560 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp30_ = boxes_query_get (_tmp29_, "tls-port");
#line 560 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp31_ = _tmp30_;
#line 560 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp32_ = _tmp31_ != NULL;
#line 560 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_tmp31_);
#line 560 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp32_) {
#line 4566 "spice-display.c"
			BoxesQuery* _tmp33_;
			gchar* _tmp34_;
			gchar* _tmp35_;
			gint _tmp36_;
			gint* _tmp37_;
#line 561 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp33_ = query;
#line 561 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp34_ = boxes_query_get (_tmp33_, "tls-port");
#line 561 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp35_ = _tmp34_;
#line 561 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp36_ = atoi (_tmp35_);
#line 561 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp37_ = __int_dup0 (&_tmp36_);
#line 561 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (_vala_tls_port);
#line 561 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_vala_tls_port = _tmp37_;
#line 561 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (_tmp35_);
#line 4588 "spice-display.c"
		}
#line 552 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (query);
#line 4592 "spice-display.c"
	}
#line 564 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp38_ = uri;
#line 564 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp39_ = _tmp38_->scheme;
#line 564 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp40_ = _tmp39_;
#line 564 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp42_ = (NULL == _tmp40_) ? 0 : g_quark_from_string (_tmp40_);
#line 564 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp42_ == ((0 != _tmp41_label0) ? _tmp41_label0 : (_tmp41_label0 = g_quark_from_static_string ("spice")))) {
#line 564 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		switch (0) {
#line 4606 "spice-display.c"
			default:
			{
				gboolean _tmp43_ = FALSE;
				gint* _tmp44_;
#line 566 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp44_ = _vala_port;
#line 566 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if ((*_tmp44_) <= 0) {
#line 4615 "spice-display.c"
					gint* _tmp45_;
#line 566 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp45_ = _vala_tls_port;
#line 566 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp43_ = (*_tmp45_) <= 0;
#line 4621 "spice-display.c"
				} else {
#line 566 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp43_ = FALSE;
#line 4625 "spice-display.c"
				}
#line 566 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_tmp43_) {
#line 4629 "spice-display.c"
					GError* _tmp46_;
#line 567 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp46_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, _ ("Missing port in Spice URL"));
#line 567 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_inner_error_ = _tmp46_;
#line 567 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					if (_inner_error_->domain == BOXES_ERROR) {
#line 567 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						g_propagate_error (error, _inner_error_);
#line 567 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_g_free0 (query_str);
#line 567 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_xmlFreeURI0 (uri);
#line 567 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						return;
#line 4645 "spice-display.c"
					} else {
#line 567 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_g_free0 (query_str);
#line 567 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_xmlFreeURI0 (uri);
#line 567 "/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 567 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						g_clear_error (&_inner_error_);
#line 567 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						return;
#line 4657 "spice-display.c"
					}
				}
#line 568 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 4662 "spice-display.c"
			}
		}
	} else if (_tmp42_ == ((0 != _tmp41_label1) ? _tmp41_label1 : (_tmp41_label1 = g_quark_from_static_string ("spice+unix")))) {
#line 564 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		switch (0) {
#line 4668 "spice-display.c"
			default:
			{
				gboolean _tmp47_ = FALSE;
				gboolean _tmp48_ = FALSE;
				gint* _tmp49_;
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp49_ = _vala_port;
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if ((*_tmp49_) > 0) {
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp48_ = TRUE;
#line 4680 "spice-display.c"
				} else {
					xmlURI* _tmp50_;
					const gchar* _tmp51_;
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp50_ = uri;
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp51_ = _tmp50_->query_raw;
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp48_ = _tmp51_ != NULL;
#line 4690 "spice-display.c"
				}
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_tmp48_) {
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp47_ = TRUE;
#line 4696 "spice-display.c"
				} else {
					xmlURI* _tmp52_;
					const gchar* _tmp53_;
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp52_ = uri;
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp53_ = _tmp52_->query;
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp47_ = _tmp53_ != NULL;
#line 4706 "spice-display.c"
				}
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_tmp47_) {
#line 4710 "spice-display.c"
					GError* _tmp54_;
#line 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp54_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, _ ("Invalid URL"));
#line 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_inner_error_ = _tmp54_;
#line 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					if (_inner_error_->domain == BOXES_ERROR) {
#line 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						g_propagate_error (error, _inner_error_);
#line 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_g_free0 (query_str);
#line 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_xmlFreeURI0 (uri);
#line 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						return;
#line 4726 "spice-display.c"
					} else {
#line 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_g_free0 (query_str);
#line 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_xmlFreeURI0 (uri);
#line 571 "/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 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						g_clear_error (&_inner_error_);
#line 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						return;
#line 4738 "spice-display.c"
					}
				}
#line 572 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 4743 "spice-display.c"
			}
		}
	} else {
#line 564 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		switch (0) {
#line 4749 "spice-display.c"
			default:
			{
				GError* _tmp55_;
#line 574 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp55_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, _ ("Invalid URL"));
#line 574 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_inner_error_ = _tmp55_;
#line 574 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_inner_error_->domain == BOXES_ERROR) {
#line 574 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					g_propagate_error (error, _inner_error_);
#line 574 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_free0 (query_str);
#line 574 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_xmlFreeURI0 (uri);
#line 574 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					return;
#line 4767 "spice-display.c"
				} else {
#line 574 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_g_free0 (query_str);
#line 574 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_xmlFreeURI0 (uri);
#line 574 "/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 574 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					g_clear_error (&_inner_error_);
#line 574 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					return;
#line 4779 "spice-display.c"
				}
			}
		}
	}
#line 540 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (query_str);
#line 540 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_xmlFreeURI0 (uri);
#line 540 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (port) {
#line 540 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		*port = _vala_port;
#line 4792 "spice-display.c"
	} else {
#line 540 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_vala_port);
#line 4796 "spice-display.c"
	}
#line 540 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (tls_port) {
#line 540 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		*tls_port = _vala_tls_port;
#line 4802 "spice-display.c"
	} else {
#line 540 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_vala_tls_port);
#line 4806 "spice-display.c"
	}
}



