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

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

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <libcommon.h>
#include <stdlib.h>
#include <string.h>
#include <spice-client.h>
#include <spice-widget.h>
#include <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_0_PROPERTY,
	BOXES_SPICE_DISPLAY_PROTOCOL_PROPERTY,
	BOXES_SPICE_DISPLAY_URI_PROPERTY,
	BOXES_SPICE_DISPLAY_CA_CERT_PROPERTY,
	BOXES_SPICE_DISPLAY_MAIN_CHANNEL_PROPERTY,
	BOXES_SPICE_DISPLAY_NUM_PROPERTIES
};
static GParamSpec* boxes_spice_display_properties[BOXES_SPICE_DISPLAY_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_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_0_PROPERTY,
	BOXES_SPICE_CHANNEL_HANDLER_NUM_PROPERTIES
};
static GParamSpec* boxes_spice_channel_handler_properties[BOXES_SPICE_CHANNEL_HANDLER_NUM_PROPERTIES];
#define _xmlFreeURI0(var) ((var == NULL) ? NULL : (var = (xmlFreeURI (var), NULL)))
#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,
                                                           GDestroyNotify open_fd_target_destroy_notify);
BoxesSpiceChannelHandler* boxes_spice_channel_handler_construct (GType object_type,
                                                                 BoxesSpiceDisplay* display,
                                                                 SpiceChannel* channel,
                                                                 BoxesDisplayOpenFDFunc open_fd,
                                                                 void* open_fd_target,
                                                                 GDestroyNotify open_fd_target_destroy_notify);
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 492 "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 498 "spice-display.c"
		}
	}
#line 25 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_free (array);
#line 503 "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 523 "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 536 "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 546 "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 575 "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 583 "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 595 "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 604 "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 631 "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 661 "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 672 "spice-display.c"
}


BoxesSpiceDisplay*
boxes_spice_display_construct (GType object_type,
                               BoxesMachine* machine,
                               BoxesBoxConfig* config,
                               const gchar* host,
                               gint port,
                               gint tls_port,
                               const gchar* host_subject)
{
	BoxesSpiceDisplay * self = NULL;
	SpiceSession* _tmp0_;
	SpiceGtkSession* _tmp10_;
	BoxesBoxConfigSavedProperty* _tmp11_;
	gint _tmp11__length1;
#line 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"
	_vala_return_val_if_fail ((port != 0) || (tls_port != 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"
	self->priv->machine = machine;
#line 111 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_connect_object ((GObject*) machine, "notify::ui-state", (GCallback) _boxes_spice_display_ui_state_changed_g_object_notify, self, 0);
#line 113 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_set_config ((BoxesDisplay*) self, config);
#line 115 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->session;
#line 115 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_set (_tmp0_, "host", host, NULL);
#line 116 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (port != 0) {
#line 712 "spice-display.c"
		SpiceSession* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
#line 117 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp1_ = self->priv->session;
#line 117 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp2_ = g_strdup_printf ("%i", port);
#line 117 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp3_ = _tmp2_;
#line 117 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_set (_tmp1_, "port", _tmp3_, NULL);
#line 117 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_tmp3_);
#line 726 "spice-display.c"
	}
#line 119 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (tls_port != 0) {
#line 730 "spice-display.c"
		SpiceSession* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
#line 120 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp4_ = self->priv->session;
#line 120 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = g_strdup_printf ("%i", tls_port);
#line 120 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp6_ = _tmp5_;
#line 120 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_set (_tmp4_, "tls-port", _tmp6_, NULL);
#line 120 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_tmp6_);
#line 744 "spice-display.c"
	}
#line 126 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (host_subject != NULL) {
#line 748 "spice-display.c"
		SpiceSession* _tmp7_;
#line 127 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp7_ = self->priv->session;
#line 127 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_set (_tmp7_, "cert-subject", host_subject, NULL);
#line 754 "spice-display.c"
	} else {
		SpiceSession* _tmp8_;
		const gchar* _tmp9_;
#line 129 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp8_ = self->priv->session;
#line 129 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp9_ = g_getenv ("BOXES_SPICE_HOST_SUBJECT");
#line 129 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_set (_tmp8_, "cert-subject", _tmp9_, NULL);
#line 764 "spice-display.c"
	}
#line 131 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp10_ = self->priv->gtk_session;
#line 131 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp11_ = self->priv->gtk_session_saved_properties;
#line 131 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp11__length1 = self->priv->gtk_session_saved_properties_length1;
#line 131 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_box_config_save_properties (config, (GObject*) _tmp10_, _tmp11_, _tmp11__length1);
#line 108 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return self;
#line 776 "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 790 "spice-display.c"
}


BoxesSpiceDisplay*
boxes_spice_display_construct_with_uri (GType object_type,
                                        BoxesMachine* machine,
                                        BoxesBoxConfig* config,
                                        const gchar* uri)
{
	BoxesSpiceDisplay * self = NULL;
	SpiceSession* _tmp0_;
	SpiceGtkSession* _tmp1_;
	BoxesBoxConfigSavedProperty* _tmp2_;
	gint _tmp2__length1;
#line 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"
	self->priv->machine = machine;
#line 136 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_connect_object ((GObject*) machine, "notify::ui-state", (GCallback) _boxes_spice_display_ui_state_changed_g_object_notify, self, 0);
#line 138 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_set_config ((BoxesDisplay*) self, config);
#line 140 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->session;
#line 140 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_set (_tmp0_, "uri", uri, NULL);
#line 142 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = self->priv->gtk_session;
#line 142 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = self->priv->gtk_session_saved_properties;
#line 142 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2__length1 = self->priv->gtk_session_saved_properties_length1;
#line 142 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_box_config_save_properties (config, (GObject*) _tmp1_, _tmp2_, _tmp2__length1);
#line 134 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return self;
#line 833 "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 844 "spice-display.c"
}


BoxesSpiceDisplay*
boxes_spice_display_construct_priv (GType object_type,
                                    BoxesMachine* machine,
                                    BoxesBoxConfig* config)
{
	BoxesSpiceDisplay * self = NULL;
	SpiceGtkSession* _tmp0_;
	BoxesBoxConfigSavedProperty* _tmp1_;
	gint _tmp1__length1;
#line 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"
	self->priv->machine = machine;
#line 147 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_connect_object ((GObject*) machine, "notify::ui-state", (GCallback) _boxes_spice_display_ui_state_changed_g_object_notify, self, 0);
#line 149 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_set_config ((BoxesDisplay*) self, config);
#line 151 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = self->priv->gtk_session;
#line 151 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = self->priv->gtk_session_saved_properties;
#line 151 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1__length1 = self->priv->gtk_session_saved_properties_length1;
#line 151 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_box_config_save_properties (config, (GObject*) _tmp0_, _tmp1_, _tmp1__length1);
#line 145 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return self;
#line 879 "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 889 "spice-display.c"
}


static void
___lambda73_ (BoxesSpiceDisplay* self,
              gint status)
{
#line 161 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_set_mouse_grabbed ((BoxesDisplay*) self, status != 0);
#line 899 "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 910 "spice-display.c"
}


static void
___lambda74_ (BoxesSpiceDisplay* self,
              gint status)
{
#line 164 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	boxes_display_set_keyboard_grabbed ((BoxesDisplay*) self, status != 0);
#line 920 "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 931 "spice-display.c"
}


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


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


static void
g_ptr_array_set_length (GPtrArray* self,
                        gint value)
{
#line 5000 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	g_return_if_fail (self != NULL);
#line 5000 "/home/fborges/jhbuild/install/share/vala-0.40/vapi/glib-2.0.vapi"
	g_ptr_array_set_size (self, value);
#line 1051 "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 1064 "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 1084 "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 1095 "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 1107 "spice-display.c"
		} else {
#line 180 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp4_ = FALSE;
#line 1111 "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 1121 "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 1137 "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 1146 "spice-display.c"
}


static void
boxes_spice_display_real_set_enable_audio (BoxesDisplay* base,
                                           gboolean enable)
{
	BoxesSpiceDisplay * self;
	SpiceSession* _tmp0_;
#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"
	g_object_set (_tmp0_, "enable-audio", enable, NULL);
#line 1162 "spice-display.c"
}


static GdkPixbuf*
boxes_spice_display_real_get_pixbuf (BoxesDisplay* base,
                                     gint n,
                                     GError** error)
{
	BoxesSpiceDisplay * self;
	GdkPixbuf* result = NULL;
	SpiceDisplay* display = NULL;
	GtkWidget* _tmp0_;
	SpiceDisplay* _tmp1_;
	SpiceDisplay* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	SpiceDisplay* _tmp5_;
	GdkPixbuf* _tmp6_;
#line 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_ = boxes_display_get_display ((BoxesDisplay*) self, n);
#line 191 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, spice_display_get_type ()) ? ((SpiceDisplay*) _tmp0_) : NULL;
#line 191 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp1_ == NULL) {
#line 191 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (_tmp0_);
#line 1191 "spice-display.c"
	}
#line 191 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	display = _tmp1_;
#line 193 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = display;
#line 193 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_get (_tmp2_, "ready", &_tmp3_, NULL);
#line 193 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = _tmp3_;
#line 193 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (!_tmp4_) {
#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 1209 "spice-display.c"
	}
#line 196 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = display;
#line 196 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = spice_display_get_pixbuf (_tmp5_);
#line 196 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = _tmp6_;
#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 1221 "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 1230 "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 1239 "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 1248 "spice-display.c"
}


static void
boxes_spice_display_real_collect_logs (BoxesDisplay* base,
                                       GString* builder)
{
	BoxesSpiceDisplay * self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	SpiceGtkSession* _tmp3_;
	SpiceMainChannel* _tmp8_;
	SpiceMainChannel* _tmp9_;
	GError * _inner_error_ = NULL;
#line 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_ = boxes_display_get_uri ((BoxesDisplay*) self);
#line 200 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = _tmp0_;
#line 200 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = _tmp1_;
#line 200 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_string_append_printf (builder, "URL: %s\n", _tmp2_);
#line 200 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (_tmp2_);
#line 201 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = self->priv->gtk_session;
#line 201 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp3_ != NULL) {
#line 1282 "spice-display.c"
		const gchar* _tmp4_ = NULL;
		SpiceGtkSession* _tmp5_;
		gboolean _tmp6_;
		gboolean _tmp7_;
#line 202 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = self->priv->gtk_session;
#line 202 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_get (_tmp5_, "auto-clipboard", &_tmp6_, NULL);
#line 202 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp7_ = _tmp6_;
#line 202 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp7_) {
#line 202 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp4_ = "yes";
#line 1297 "spice-display.c"
		} else {
#line 202 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp4_ = "no";
#line 1301 "spice-display.c"
		}
#line 202 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_string_append_printf (builder, "Auto clipboard sync: %s\n", _tmp4_);
#line 1305 "spice-display.c"
	}
#line 204 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = boxes_spice_display_get_main_channel (self);
#line 204 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp9_ = _tmp8_;
#line 204 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp9_ != NULL) {
#line 1313 "spice-display.c"
		const gchar* _tmp10_;
		const gchar* _tmp11_ = NULL;
		SpiceMainChannel* _tmp12_;
		SpiceMainChannel* _tmp13_;
		gint _tmp14_;
		gint _tmp15_;
		const gchar* _tmp16_ = NULL;
		SpiceMainChannel* _tmp17_;
		SpiceMainChannel* _tmp18_;
		gboolean _tmp19_;
		gboolean _tmp20_;
#line 205 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp10_ = spice_util_get_version_string ();
#line 205 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_string_append_printf (builder, "Spice-gtk version %s\n", _tmp10_);
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp12_ = boxes_spice_display_get_main_channel (self);
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp13_ = _tmp12_;
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_get (_tmp13_, "mouse-mode", &_tmp14_, NULL);
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp15_ = _tmp14_;
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp15_ == 1) {
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp11_ = "server";
#line 1341 "spice-display.c"
		} else {
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp11_ = "client";
#line 1345 "spice-display.c"
		}
#line 206 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_string_append_printf (builder, "Mouse mode: %s\n", _tmp11_);
#line 207 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp17_ = boxes_spice_display_get_main_channel (self);
#line 207 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp18_ = _tmp17_;
#line 207 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_get (_tmp18_, "agent-connected", &_tmp19_, NULL);
#line 207 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp20_ = _tmp19_;
#line 207 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp20_) {
#line 207 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp16_ = "connected";
#line 1361 "spice-display.c"
		} else {
#line 207 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp16_ = "disconnected";
#line 1365 "spice-display.c"
		}
#line 207 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_string_append_printf (builder, "Agent: %s\n", _tmp16_);
#line 1369 "spice-display.c"
	}
	{
		SpiceUsbDeviceManager* manager = NULL;
		SpiceSession* _tmp21_;
		SpiceUsbDeviceManager* _tmp22_;
		SpiceUsbDeviceManager* _tmp23_;
		GPtrArray* devs = NULL;
		SpiceUsbDeviceManager* _tmp24_;
		GPtrArray* _tmp25_;
#line 211 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp21_ = self->priv->session;
#line 211 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp22_ = spice_usb_device_manager_get (_tmp21_, &_inner_error_);
#line 211 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp23_ = _g_object_ref0 (_tmp22_);
#line 211 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		manager = _tmp23_;
#line 211 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1389 "spice-display.c"
			goto __catch75_g_error;
		}
#line 212 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp24_ = manager;
#line 212 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp25_ = spice_usb_device_manager_get_devices (_tmp24_);
#line 212 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		devs = _tmp25_;
#line 1398 "spice-display.c"
		{
			gint i = 0;
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			i = 0;
#line 1403 "spice-display.c"
			{
				gboolean _tmp26_ = FALSE;
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp26_ = TRUE;
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				while (TRUE) {
#line 1410 "spice-display.c"
					gint _tmp28_;
					GPtrArray* _tmp29_;
					gint _tmp30_;
					gint _tmp31_;
					SpiceUsbDevice* dev = NULL;
					GPtrArray* _tmp32_;
					gint _tmp33_;
					gconstpointer _tmp34_;
					SpiceUsbDevice* _tmp35_;
					SpiceUsbDeviceManager* _tmp36_;
					SpiceUsbDevice* _tmp37_;
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					if (!_tmp26_) {
#line 1424 "spice-display.c"
						gint _tmp27_;
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_tmp27_ = i;
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						i = _tmp27_ + 1;
#line 1430 "spice-display.c"
					}
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp26_ = FALSE;
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp28_ = i;
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp29_ = devs;
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp30_ = g_ptr_array_get_length (_tmp29_);
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp31_ = _tmp30_;
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					if (!(_tmp28_ < _tmp31_)) {
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						break;
#line 1446 "spice-display.c"
					}
#line 214 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp32_ = devs;
#line 214 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp33_ = i;
#line 214 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp34_ = g_ptr_array_index (_tmp32_, (guint) _tmp33_);
#line 214 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp35_ = __vala_SpiceUsbDevice_copy0 ((SpiceUsbDevice*) _tmp34_);
#line 214 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					dev = _tmp35_;
#line 215 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp36_ = manager;
#line 215 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp37_ = dev;
#line 215 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					if (spice_usb_device_manager_is_device_connected (_tmp36_, _tmp37_)) {
#line 1464 "spice-display.c"
						SpiceUsbDevice* _tmp38_;
						gchar* _tmp39_;
						gchar* _tmp40_;
#line 216 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_tmp38_ = dev;
#line 216 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_tmp39_ = spice_usb_device_get_description (_tmp38_, "%s %s %s at %d-%d");
#line 216 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_tmp40_ = _tmp39_;
#line 216 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						g_string_append_printf (builder, "USB device redirected: %s\n", _tmp40_);
#line 216 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_g_free0 (_tmp40_);
#line 1478 "spice-display.c"
					}
#line 213 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					__vala_SpiceUsbDevice_free0 (dev);
#line 1482 "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 1490 "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 1502 "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 1513 "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 1523 "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 1534 "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 1545 "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_;
#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 1585 "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 1631 "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 1640 "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 1646 "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 1655 "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"
	if (open_fd != NULL) {
#line 1667 "spice-display.c"
		SpiceSession* _tmp14_;
#line 240 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp14_ = self->priv->session;
#line 240 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		spice_session_open_fd (_tmp14_, -1);
#line 1673 "spice-display.c"
	} else {
		SpiceSession* _tmp15_;
#line 242 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp15_ = self->priv->session;
#line 242 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		spice_session_connect (_tmp15_);
#line 1680 "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 1690 "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 1708 "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 1719 "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 1725 "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 1736 "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 1766 "spice-display.c"
}


static void
boxes_spice_display_on_channel_new (BoxesSpiceDisplay* self,
                                    SpiceSession* session,
                                    SpiceChannel* channel)
{
	BoxesSpiceChannelHandler* handler = NULL;
	BoxesDisplayOpenFDFunc _tmp0_;
	void* _tmp0__target;
	GDestroyNotify _tmp0__target_destroy_notify;
	BoxesSpiceChannelHandler* _tmp1_;
	GHashTable* _tmp2_;
	SpiceChannel* _tmp3_;
	BoxesSpiceChannelHandler* _tmp4_;
	BoxesSpiceChannelHandler* _tmp5_;
#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_ = self->priv->open_fd;
#line 262 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0__target = self->priv->open_fd_target;
#line 262 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0__target_destroy_notify = self->priv->open_fd_target_destroy_notify;
#line 262 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd = NULL;
#line 262 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target = NULL;
#line 262 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target_destroy_notify = NULL;
#line 262 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = boxes_spice_channel_handler_new (self, channel, _tmp0_, _tmp0__target, _tmp0__target_destroy_notify);
#line 262 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	handler = _tmp1_;
#line 263 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = self->priv->channel_handlers;
#line 263 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = _g_object_ref0 (channel);
#line 263 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = handler;
#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"
	g_hash_table_insert (_tmp2_, _tmp3_, _tmp5_);
#line 265 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (channel, spice_display_channel_get_type ())) {
#line 1818 "spice-display.c"
		gint _tmp6_;
		gint _tmp7_;
#line 266 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_get (channel, "channel-id", &_tmp6_, NULL);
#line 266 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp7_ = _tmp6_;
#line 266 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp7_ != 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 1831 "spice-display.c"
		}
#line 269 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		boxes_display_access_start ((BoxesDisplay*) self);
#line 1835 "spice-display.c"
	}
#line 261 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (handler);
#line 1839 "spice-display.c"
}


static void
boxes_spice_display_on_channel_destroy (BoxesSpiceDisplay* self,
                                        SpiceSession* session,
                                        SpiceChannel* channel)
{
	SpiceDisplayChannel* display = NULL;
	SpiceDisplayChannel* _tmp0_;
	SpiceDisplayChannel* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
#line 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"
	if (!G_TYPE_CHECK_INSTANCE_TYPE (channel, spice_display_channel_get_type ())) {
#line 275 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		return;
#line 1863 "spice-display.c"
	}
#line 277 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (channel, spice_display_channel_get_type ()) ? ((SpiceDisplayChannel*) channel) : NULL);
#line 277 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	display = _tmp0_;
#line 278 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = display;
#line 278 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_get ((SpiceChannel*) _tmp1_, "channel-id", &_tmp2_, NULL);
#line 278 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = _tmp2_;
#line 278 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_emit_by_name ((BoxesDisplay*) self, "hide", _tmp3_);
#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 1881 "spice-display.c"
}


static void
boxes_spice_display_main_event (BoxesSpiceDisplay* self,
                                SpiceChannelEvent event)
{
#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"
	switch (event) {
#line 283 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case SPICE_CHANNEL_CLOSED:
#line 1895 "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 1903 "spice-display.c"
		}
#line 283 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case SPICE_CHANNEL_ERROR_AUTH:
#line 1907 "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 1913 "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 1923 "spice-display.c"
		{
#line 297 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_debug ("spice-display.vala:297: main SPICE channel error: %d", (gint) event);
#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 1933 "spice-display.c"
		}
#line 283 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case SPICE_CHANNEL_OPENED:
#line 1937 "spice-display.c"
		{
#line 303 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			break;
#line 1941 "spice-display.c"
		}
		default:
		{
#line 306 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_debug ("spice-display.vala:306: unhandled main SPICE channel event: %d", (gint) event);
#line 307 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			break;
#line 1949 "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 1962 "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 1973 "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 1985 "spice-display.c"
	}
}


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


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


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


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


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


static gint
____lambda75_ (SpiceUsbDevice* a,
               SpiceUsbDevice* b)
{
	gint result = 0;
	gchar* str_a = NULL;
	gchar* _tmp0_;
	gchar* str_b = NULL;
	gchar* _tmp1_;
	GCompareFunc _tmp2_;
#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_ = spice_usb_device_get_description (a, "    %1$s %2$s");
#line 349 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	str_a = _tmp0_;
#line 350 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = spice_usb_device_get_description (b, "    %1$s %2$s");
#line 350 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	str_b = _tmp1_;
#line 352 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = g_strcmp0;
#line 352 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	result = _tmp2_ (str_a, str_b);
#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 2108 "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 2120 "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 2131 "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 2142 "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 2156 "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 2175 "spice-display.c"
	{
		SpiceUsbDeviceManager* _tmp0_;
#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"
		spice_usb_device_manager_connect_device_finish (_tmp0_, res, &_inner_error_);
#line 382 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2184 "spice-display.c"
			goto __catch77_g_error;
		}
	}
	goto __finally77;
	__catch77_g_error:
	{
		GError* err = NULL;
		GtkSwitch* _tmp1_;
		gchar* device_desc = NULL;
		SpiceUsbDevice* _tmp2_;
		gchar* _tmp3_;
		gchar* box_name = NULL;
		gchar* _tmp4_;
		gchar* msg = NULL;
		gchar* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		GError* _tmp13_;
		const gchar* _tmp14_;
#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"
		_tmp1_ = _data80_->dev_toggle;
#line 384 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		gtk_switch_set_active (_tmp1_, FALSE);
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp2_ = _data80_->dev;
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp3_ = spice_usb_device_get_description (_tmp2_, "%1$s %2$s");
#line 385 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		device_desc = _tmp3_;
#line 386 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp4_ = boxes_spice_display_get_box_name (self);
#line 386 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		box_name = _tmp4_;
#line 387 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = g_strdup (_ ("Redirection of USB device “%s” for “%s” failed"));
#line 387 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		msg = _tmp5_;
#line 388 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp6_ = msg;
#line 388 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp7_ = device_desc;
#line 388 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp8_ = box_name;
#line 388 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp9_ = g_strdup_printf (_tmp6_, _tmp7_, _tmp8_);
#line 388 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp10_ = _tmp9_;
#line 388 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_emit_by_name ((BoxesDisplay*) self, "got-error", _tmp10_);
#line 388 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_tmp10_);
#line 389 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp11_ = device_desc;
#line 389 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp12_ = box_name;
#line 389 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp13_ = err;
#line 389 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp14_ = _tmp13_->message;
#line 389 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_debug ("spice-display.vala:389: Error connecting %s to %s: %s", _tmp11_, _tmp12_, _tmp14_);
#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 2263 "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 2274 "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 2288 "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 2312 "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 2321 "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 2331 "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 2343 "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 2364 "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 2375 "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 2396 "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 2407 "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 2416 "spice-display.c"
}


static GList*
boxes_spice_display_real_get_properties (BoxesDisplay* base,
                                         BoxesPropertiesPage page)
{
	BoxesSpiceDisplay * self;
	GList* result = NULL;
	GList* list = NULL;
	GError * _inner_error_ = NULL;
#line 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"
	switch (page) {
#line 314 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_PROPERTIES_PAGE_GENERAL:
#line 2436 "spice-display.c"
		{
			GtkSwitch* toggle = NULL;
			GtkSwitch* _tmp0_;
			SpiceGtkSession* _tmp1_;
			GtkSwitch* _tmp2_;
			GtkSwitch* _tmp3_;
			GtkSwitch* _tmp4_;
			BoxesProperty* _tmp5_;
			BoxesProperty* _tmp6_;
			gboolean _tmp7_ = FALSE;
			gboolean _tmp8_;
			gchar* message = NULL;
			gchar* _tmp13_;
			GtkLabel* label = NULL;
			const gchar* _tmp14_;
			GtkLabel* _tmp15_;
			GtkLabel* _tmp16_;
			GtkLabel* _tmp17_;
			GtkLabel* _tmp18_;
			GtkLabel* _tmp19_;
			GtkLabel* _tmp20_;
			GtkLabel* _tmp21_;
			GtkStyleContext* _tmp22_;
			GtkLabel* _tmp23_;
			BoxesProperty* _tmp24_;
			BoxesProperty* _tmp25_;
#line 316 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp0_ = (GtkSwitch*) gtk_switch_new ();
#line 316 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_object_ref_sink (_tmp0_);
#line 316 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			toggle = _tmp0_;
#line 317 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp1_ = self->priv->gtk_session;
#line 317 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp2_ = toggle;
#line 317 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_object_bind_property_with_closures ((GObject*) _tmp1_, "auto-clipboard", (GObject*) _tmp2_, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
#line 319 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp3_ = toggle;
#line 319 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_START);
#line 320 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp4_ = toggle;
#line 320 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp5_ = boxes_iproperties_provider_add_property ((BoxesIPropertiesProvider*) self, &list, _ ("Share Clipboard"), (GtkWidget*) _tmp4_, NULL);
#line 320 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp6_ = _tmp5_;
#line 320 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_object_unref0 (_tmp6_);
#line 322 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp8_ = ((BoxesDisplay*) self)->connected;
#line 322 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (!_tmp8_) {
#line 322 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp7_ = TRUE;
#line 2493 "spice-display.c"
			} else {
				SpiceMainChannel* _tmp9_;
				SpiceMainChannel* _tmp10_;
				gboolean _tmp11_;
				gboolean _tmp12_;
#line 322 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp9_ = boxes_spice_display_get_main_channel (self);
#line 322 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp10_ = _tmp9_;
#line 322 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_object_get (_tmp10_, "agent-connected", &_tmp11_, NULL);
#line 322 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp12_ = _tmp11_;
#line 322 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp7_ = _tmp12_;
#line 2509 "spice-display.c"
			}
#line 322 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (_tmp7_) {
#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 2517 "spice-display.c"
			}
#line 325 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp13_ = g_strdup (_ ("SPICE guest tools are not installed. These tools improve user experien" \
"ce and enable host and box interactions, such as copy&amp;paste. Pleas" \
"e visit <a href=\"http://www.spice-space.org/download.html\">http://ww" \
"w.spice-space.org/download.html</a> to download and install these tool" \
"s from within the box."));
#line 325 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			message = _tmp13_;
#line 326 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp14_ = message;
#line 326 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp15_ = (GtkLabel*) gtk_label_new (_tmp14_);
#line 326 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_object_ref_sink (_tmp15_);
#line 326 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			label = _tmp15_;
#line 327 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp16_ = label;
#line 327 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			gtk_widget_set_vexpand ((GtkWidget*) _tmp16_, TRUE);
#line 328 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp17_ = label;
#line 328 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			gtk_widget_set_valign ((GtkWidget*) _tmp17_, GTK_ALIGN_END);
#line 329 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp18_ = label;
#line 329 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			g_object_set (_tmp18_, "wrap", TRUE, NULL);
#line 330 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp19_ = label;
#line 330 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			gtk_label_set_max_width_chars (_tmp19_, 80);
#line 331 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp20_ = label;
#line 331 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			gtk_label_set_use_markup (_tmp20_, TRUE);
#line 332 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp21_ = label;
#line 332 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp22_ = gtk_widget_get_style_context ((GtkWidget*) _tmp21_);
#line 332 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			gtk_style_context_add_class (_tmp22_, "boxes-spice-tools-notice-label");
#line 334 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp23_ = label;
#line 334 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp24_ = boxes_iproperties_provider_add_property ((BoxesIPropertiesProvider*) self, &list, NULL, (GtkWidget*) _tmp23_, NULL);
#line 334 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp25_ = _tmp24_;
#line 334 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_object_unref0 (_tmp25_);
#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 2573 "spice-display.c"
		}
#line 314 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_PROPERTIES_PAGE_DEVICES:
#line 2577 "spice-display.c"
		{
			gboolean _tmp26_;
#line 338 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp26_ = ((BoxesDisplay*) self)->connected;
#line 338 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if (!_tmp26_) {
#line 339 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 2586 "spice-display.c"
			}
			{
				Block78Data* _data78_;
				SpiceSession* _tmp27_;
				SpiceUsbDeviceManager* _tmp28_;
				SpiceUsbDeviceManager* _tmp29_;
				GPtrArray* devs = NULL;
				SpiceUsbDeviceManager* _tmp30_;
				GPtrArray* _tmp31_;
				GPtrArray* _tmp32_;
				gint _tmp33_;
				gint _tmp34_;
				GPtrArray* _tmp35_;
				GtkFrame* frame = NULL;
				GtkFrame* _tmp36_;
				GtkListBox* listbox = NULL;
				GtkListBox* _tmp37_;
				GtkListBox* _tmp38_;
				GtkFrame* _tmp39_;
				GtkListBox* _tmp40_;
				GtkLabel* _tmp74_;
				GtkLabel* _tmp75_;
				GtkFrame* _tmp76_;
				BoxesProperty* _tmp77_;
				BoxesProperty* _tmp78_;
				SpiceUsbDeviceManager* _tmp79_;
				SpiceUsbDeviceManager* _tmp80_;
#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"
				_tmp27_ = self->priv->session;
#line 342 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp28_ = spice_usb_device_manager_get (_tmp27_, &_inner_error_);
#line 342 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp29_ = _g_object_ref0 (_tmp28_);
#line 342 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_data78_->manager = _tmp29_;
#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 2634 "spice-display.c"
					goto __catch76_g_error;
				}
#line 343 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp30_ = _data78_->manager;
#line 343 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp31_ = boxes_spice_display_get_usb_devices (self, _tmp30_);
#line 343 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				devs = _tmp31_;
#line 345 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp32_ = devs;
#line 345 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp33_ = g_ptr_array_get_length (_tmp32_);
#line 345 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp34_ = _tmp33_;
#line 345 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_tmp34_ <= 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 2661 "spice-display.c"
				}
#line 348 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp35_ = devs;
#line 348 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				vala_g_ptr_array_sort (_tmp35_, _____lambda75__gcompare_func);
#line 355 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp36_ = (GtkFrame*) gtk_frame_new (NULL);
#line 355 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_object_ref_sink (_tmp36_);
#line 355 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				frame = _tmp36_;
#line 356 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp37_ = (GtkListBox*) gtk_list_box_new ();
#line 356 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_object_ref_sink (_tmp37_);
#line 356 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				listbox = _tmp37_;
#line 357 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp38_ = listbox;
#line 357 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				gtk_widget_set_hexpand ((GtkWidget*) _tmp38_, TRUE);
#line 358 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp39_ = frame;
#line 358 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp40_ = listbox;
#line 358 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				gtk_container_add ((GtkContainer*) _tmp39_, (GtkWidget*) _tmp40_);
#line 2689 "spice-display.c"
				{
					gint i = 0;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					i = 0;
#line 2694 "spice-display.c"
					{
						gboolean _tmp41_ = FALSE;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						_tmp41_ = TRUE;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						while (TRUE) {
#line 2701 "spice-display.c"
							Block80Data* _data80_;
							gint _tmp43_;
							GPtrArray* _tmp44_;
							gint _tmp45_;
							gint _tmp46_;
							GPtrArray* _tmp47_;
							gint _tmp48_;
							gconstpointer _tmp49_;
							SpiceUsbDevice* _tmp50_;
							GtkBox* hbox = NULL;
							GtkBox* _tmp51_;
							GtkBox* _tmp52_;
							GtkBox* _tmp53_;
							GtkBox* _tmp54_;
							GtkBox* _tmp55_;
							GtkLabel* label = NULL;
							SpiceUsbDevice* _tmp56_;
							gchar* _tmp57_;
							gchar* _tmp58_;
							GtkLabel* _tmp59_;
							GtkLabel* _tmp60_;
							GtkLabel* _tmp61_;
							GtkBox* _tmp62_;
							GtkLabel* _tmp63_;
							GtkSwitch* _tmp64_;
							GtkSwitch* _tmp65_;
							GtkBox* _tmp66_;
							GtkSwitch* _tmp67_;
							GtkListBox* _tmp68_;
							GtkBox* _tmp69_;
							GtkSwitch* _tmp70_;
							SpiceUsbDeviceManager* _tmp71_;
							SpiceUsbDevice* _tmp72_;
							GtkSwitch* _tmp73_;
#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 (!_tmp41_) {
#line 2744 "spice-display.c"
								gint _tmp42_;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								_tmp42_ = i;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								i = _tmp42_ + 1;
#line 2750 "spice-display.c"
							}
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp41_ = FALSE;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp43_ = i;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp44_ = devs;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp45_ = g_ptr_array_get_length (_tmp44_);
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp46_ = _tmp45_;
#line 360 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							if (!(_tmp43_ < _tmp46_)) {
#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 2770 "spice-display.c"
							}
#line 361 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp47_ = devs;
#line 361 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp48_ = i;
#line 361 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp49_ = g_ptr_array_index (_tmp47_, (guint) _tmp48_);
#line 361 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp50_ = __vala_SpiceUsbDevice_copy0 ((SpiceUsbDevice*) _tmp49_);
#line 361 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_data80_->dev = _tmp50_;
#line 363 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp51_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
#line 363 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							g_object_ref_sink (_tmp51_);
#line 363 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							hbox = _tmp51_;
#line 364 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp52_ = hbox;
#line 364 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							gtk_widget_set_margin_start ((GtkWidget*) _tmp52_, 12);
#line 365 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp53_ = hbox;
#line 365 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							gtk_widget_set_margin_end ((GtkWidget*) _tmp53_, 12);
#line 366 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp54_ = hbox;
#line 366 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							gtk_widget_set_margin_top ((GtkWidget*) _tmp54_, 6);
#line 367 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp55_ = hbox;
#line 367 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							gtk_widget_set_margin_bottom ((GtkWidget*) _tmp55_, 6);
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp56_ = _data80_->dev;
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp57_ = spice_usb_device_get_description (_tmp56_, "%1$s %2$s");
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp58_ = _tmp57_;
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp59_ = (GtkLabel*) gtk_label_new (_tmp58_);
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							g_object_ref_sink (_tmp59_);
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp60_ = _tmp59_;
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_g_free0 (_tmp58_);
#line 368 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							label = _tmp60_;
#line 369 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp61_ = label;
#line 369 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							gtk_widget_set_halign ((GtkWidget*) _tmp61_, GTK_ALIGN_START);
#line 370 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp62_ = hbox;
#line 370 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp63_ = label;
#line 370 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							gtk_box_pack_start (_tmp62_, (GtkWidget*) _tmp63_, TRUE, TRUE, (guint) 0);
#line 371 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp64_ = (GtkSwitch*) gtk_switch_new ();
#line 371 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							g_object_ref_sink (_tmp64_);
#line 371 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_data80_->dev_toggle = _tmp64_;
#line 372 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp65_ = _data80_->dev_toggle;
#line 372 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							gtk_widget_set_halign ((GtkWidget*) _tmp65_, GTK_ALIGN_END);
#line 373 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp66_ = hbox;
#line 373 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp67_ = _data80_->dev_toggle;
#line 373 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							gtk_box_pack_start (_tmp66_, (GtkWidget*) _tmp67_, TRUE, TRUE, (guint) 0);
#line 374 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp68_ = listbox;
#line 374 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp69_ = hbox;
#line 374 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							gtk_list_box_prepend (_tmp68_, (GtkWidget*) _tmp69_);
#line 376 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp70_ = _data80_->dev_toggle;
#line 376 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp71_ = _data78_->manager;
#line 376 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp72_ = _data80_->dev;
#line 376 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							gtk_switch_set_active (_tmp70_, spice_usb_device_manager_is_device_connected (_tmp71_, _tmp72_));
#line 378 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp73_ = _data80_->dev_toggle;
#line 378 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							g_signal_connect_data ((GObject*) _tmp73_, "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 2872 "spice-display.c"
						}
					}
				}
#line 400 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp74_ = (GtkLabel*) gtk_label_new ("");
#line 400 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_object_ref_sink (_tmp74_);
#line 400 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp75_ = _tmp74_;
#line 400 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp76_ = frame;
#line 400 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp77_ = boxes_iproperties_provider_add_property ((BoxesIPropertiesProvider*) self, &list, _ ("USB devices"), (GtkWidget*) _tmp75_, (GtkWidget*) _tmp76_);
#line 400 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp78_ = _tmp77_;
#line 400 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_g_object_unref0 (_tmp75_);
#line 400 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_data78_->usb_property = _tmp78_;
#line 402 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp79_ = _data78_->manager;
#line 402 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_signal_connect_data (_tmp79_, "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"
				_tmp80_ = _data78_->manager;
#line 405 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_signal_connect_data (_tmp80_, "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 2910 "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 2922 "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 2935 "spice-display.c"
			}
#line 410 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			break;
#line 2939 "spice-display.c"
		}
		default:
#line 314 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 2944 "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 2950 "spice-display.c"
}


static void
boxes_spice_display_real_send_keys (BoxesDisplay* base,
                                    guint* keyvals,
                                    int keyvals_length1)
{
	BoxesSpiceDisplay * self;
	SpiceDisplay* display = NULL;
	GtkWidget* _tmp0_;
	SpiceDisplay* _tmp1_;
#line 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 2973 "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"
	spice_display_send_keys (display, keyvals, keyvals_length1, SPICE_DISPLAY_KEY_EVENT_CLICK);
#line 416 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (display);
#line 2981 "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 2990 "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 2999 "spice-display.c"
}


static GPtrArray*
boxes_spice_display_get_usb_devices (BoxesSpiceDisplay* self,
                                     SpiceUsbDeviceManager* manager)
{
	GPtrArray* result = NULL;
	GPtrArray* ret = NULL;
	GPtrArray* _tmp0_;
	GPtrArray* devs = NULL;
	GPtrArray* _tmp1_;
	const gchar* _tmp2_;
#line 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_ = spice_usb_device_manager_get_devices (manager);
#line 425 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	devs = _tmp1_;
#line 427 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = g_getenv ("BOXES_USB_REDIR_ALL");
#line 427 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp2_ != 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 3035 "spice-display.c"
	}
	{
		gint i = 0;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		i = 0;
#line 3041 "spice-display.c"
		{
			gboolean _tmp3_ = FALSE;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp3_ = TRUE;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			while (TRUE) {
#line 3048 "spice-display.c"
				gint _tmp5_;
				GPtrArray* _tmp6_;
				gint _tmp7_;
				gint _tmp8_;
				SpiceUsbDevice* dev = NULL;
				GPtrArray* _tmp9_;
				gint _tmp10_;
				gconstpointer _tmp11_;
				SpiceUsbDevice* _tmp12_;
				libusb_device* libusb_dev = NULL;
				SpiceUsbDevice* _tmp13_;
				void* _tmp14_;
				libusb_device* _tmp15_;
				struct libusb_device_descriptor desc = {0};
				libusb_device* _tmp16_;
				struct libusb_device_descriptor _tmp17_ = {0};
				gint _tmp18_;
				struct libusb_device_descriptor _tmp19_;
				guint8 _tmp20_;
				struct libusb_device_descriptor _tmp21_;
				guint8 _tmp22_;
				struct libusb_device_descriptor _tmp23_;
				guint8 _tmp24_;
				struct libusb_device_descriptor _tmp25_;
				guint8 _tmp26_;
				GPtrArray* _tmp75_;
				SpiceUsbDevice* _tmp76_;
				SpiceUsbDevice* _tmp77_;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (!_tmp3_) {
#line 3079 "spice-display.c"
					gint _tmp4_;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp4_ = i;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					i = _tmp4_ + 1;
#line 3085 "spice-display.c"
				}
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp3_ = FALSE;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp5_ = i;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp6_ = devs;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp7_ = g_ptr_array_get_length (_tmp6_);
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp8_ = _tmp7_;
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (!(_tmp5_ < _tmp8_)) {
#line 430 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					break;
#line 3101 "spice-display.c"
				}
#line 431 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp9_ = devs;
#line 431 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp10_ = i;
#line 431 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp11_ = g_ptr_array_index (_tmp9_, (guint) _tmp10_);
#line 431 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp12_ = __vala_SpiceUsbDevice_copy0 ((SpiceUsbDevice*) _tmp11_);
#line 431 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				dev = _tmp12_;
#line 432 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp13_ = dev;
#line 432 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp14_ = spice_usb_device_get_libusb_device (_tmp13_);
#line 432 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp15_ = _libusb_ref_device0 ((libusb_device*) _tmp14_);
#line 432 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				libusb_dev = _tmp15_;
#line 436 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp16_ = libusb_dev;
#line 436 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp18_ = libusb_get_device_descriptor (_tmp16_, &_tmp17_);
#line 436 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				desc = _tmp17_;
#line 436 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_tmp18_ != 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 3135 "spice-display.c"
				}
#line 439 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp19_ = desc;
#line 439 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp20_ = _tmp19_.bDeviceClass;
#line 439 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp21_ = desc;
#line 439 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp22_ = _tmp21_.bDeviceSubClass;
#line 439 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp23_ = desc;
#line 439 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp24_ = _tmp23_.bDeviceProtocol;
#line 439 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (boxes_spice_display_is_usb_kbd_or_mouse (self, _tmp20_, _tmp22_, _tmp24_)) {
#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 3157 "spice-display.c"
				}
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp25_ = desc;
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp26_ = _tmp25_.bDeviceClass;
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_tmp26_ == LIBUSB_CLASS_PER_INTERFACE) {
#line 3165 "spice-display.c"
					struct libusb_config_descriptor* config = NULL;
					libusb_device* _tmp27_;
					struct libusb_config_descriptor* _tmp28_ = NULL;
					gint _tmp29_;
					gboolean kbd_or_mouse = FALSE;
					gboolean _tmp74_;
#line 445 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp27_ = libusb_dev;
#line 445 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp29_ = libusb_get_active_config_descriptor (_tmp27_, &_tmp28_);
#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 = _tmp28_;
#line 445 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					if (_tmp29_ != 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 3190 "spice-display.c"
					}
#line 448 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					kbd_or_mouse = FALSE;
#line 3194 "spice-display.c"
					{
						gint j = 0;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						j = 0;
#line 3199 "spice-display.c"
						{
							gboolean _tmp30_ = FALSE;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							_tmp30_ = TRUE;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
							while (TRUE) {
#line 3206 "spice-display.c"
								gboolean _tmp32_ = FALSE;
								gint _tmp33_;
								struct libusb_config_descriptor* _tmp34_;
								struct libusb_interface* _tmp35_;
								gint _tmp35__length1;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								if (!_tmp30_) {
#line 3214 "spice-display.c"
									gint _tmp31_;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									_tmp31_ = j;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									j = _tmp31_ + 1;
#line 3220 "spice-display.c"
								}
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								_tmp30_ = FALSE;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								_tmp33_ = j;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								_tmp34_ = config;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								_tmp35_ = _tmp34_->interface;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								_tmp35__length1 = _tmp34_->bNumInterfaces;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								if (_tmp33_ < _tmp35__length1) {
#line 3234 "spice-display.c"
									gboolean _tmp36_;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									_tmp36_ = kbd_or_mouse;
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									_tmp32_ = !_tmp36_;
#line 3240 "spice-display.c"
								} else {
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									_tmp32_ = FALSE;
#line 3244 "spice-display.c"
								}
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
								if (!_tmp32_) {
#line 449 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									break;
#line 3250 "spice-display.c"
								}
								{
									gint k = 0;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
									k = 0;
#line 3256 "spice-display.c"
									{
										gboolean _tmp37_ = FALSE;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
										_tmp37_ = TRUE;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
										while (TRUE) {
#line 3263 "spice-display.c"
											gboolean _tmp39_ = FALSE;
											gint _tmp40_;
											struct libusb_config_descriptor* _tmp41_;
											struct libusb_interface* _tmp42_;
											gint _tmp42__length1;
											gint _tmp43_;
											struct libusb_interface _tmp44_;
											struct libusb_interface_descriptor* _tmp45_;
											gint _tmp45__length1;
											guint8 class = 0U;
											struct libusb_config_descriptor* _tmp47_;
											struct libusb_interface* _tmp48_;
											gint _tmp48__length1;
											gint _tmp49_;
											struct libusb_interface _tmp50_;
											struct libusb_interface_descriptor* _tmp51_;
											gint _tmp51__length1;
											gint _tmp52_;
											struct libusb_interface_descriptor _tmp53_;
											guint8 _tmp54_;
											guint8 subclass = 0U;
											struct libusb_config_descriptor* _tmp55_;
											struct libusb_interface* _tmp56_;
											gint _tmp56__length1;
											gint _tmp57_;
											struct libusb_interface _tmp58_;
											struct libusb_interface_descriptor* _tmp59_;
											gint _tmp59__length1;
											gint _tmp60_;
											struct libusb_interface_descriptor _tmp61_;
											guint8 _tmp62_;
											guint8 protocol = 0U;
											struct libusb_config_descriptor* _tmp63_;
											struct libusb_interface* _tmp64_;
											gint _tmp64__length1;
											gint _tmp65_;
											struct libusb_interface _tmp66_;
											struct libusb_interface_descriptor* _tmp67_;
											gint _tmp67__length1;
											gint _tmp68_;
											struct libusb_interface_descriptor _tmp69_;
											guint8 _tmp70_;
											guint8 _tmp71_;
											guint8 _tmp72_;
											guint8 _tmp73_;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											if (!_tmp37_) {
#line 3311 "spice-display.c"
												gint _tmp38_;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
												_tmp38_ = k;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
												k = _tmp38_ + 1;
#line 3317 "spice-display.c"
											}
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp37_ = FALSE;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp40_ = k;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp41_ = config;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp42_ = _tmp41_->interface;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp42__length1 = _tmp41_->bNumInterfaces;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp43_ = j;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp44_ = _tmp42_[_tmp43_];
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp45_ = _tmp44_.altsetting;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp45__length1 = _tmp44_.num_altsetting;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											if (_tmp40_ < _tmp45__length1) {
#line 3339 "spice-display.c"
												gboolean _tmp46_;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
												_tmp46_ = kbd_or_mouse;
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
												_tmp39_ = !_tmp46_;
#line 3345 "spice-display.c"
											} else {
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
												_tmp39_ = FALSE;
#line 3349 "spice-display.c"
											}
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											if (!_tmp39_) {
#line 450 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
												break;
#line 3355 "spice-display.c"
											}
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp47_ = config;
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp48_ = _tmp47_->interface;
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp48__length1 = _tmp47_->bNumInterfaces;
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp49_ = j;
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp50_ = _tmp48_[_tmp49_];
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp51_ = _tmp50_.altsetting;
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp51__length1 = _tmp50_.num_altsetting;
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp52_ = k;
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp53_ = _tmp51_[_tmp52_];
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp54_ = _tmp53_.bInterfaceClass;
#line 451 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											class = _tmp54_;
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp55_ = config;
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp56_ = _tmp55_->interface;
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp56__length1 = _tmp55_->bNumInterfaces;
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp57_ = j;
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp58_ = _tmp56_[_tmp57_];
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp59_ = _tmp58_.altsetting;
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp59__length1 = _tmp58_.num_altsetting;
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp60_ = k;
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp61_ = _tmp59_[_tmp60_];
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp62_ = _tmp61_.bInterfaceSubClass;
#line 452 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											subclass = _tmp62_;
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp63_ = config;
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp64_ = _tmp63_->interface;
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp64__length1 = _tmp63_->bNumInterfaces;
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp65_ = j;
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp66_ = _tmp64_[_tmp65_];
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp67_ = _tmp66_.altsetting;
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp67__length1 = _tmp66_.num_altsetting;
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp68_ = k;
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp69_ = _tmp67_[_tmp68_];
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp70_ = _tmp69_.bInterfaceProtocol;
#line 453 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											protocol = _tmp70_;
#line 455 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp71_ = class;
#line 455 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp72_ = subclass;
#line 455 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											_tmp73_ = protocol;
#line 455 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
											kbd_or_mouse = boxes_spice_display_is_usb_kbd_or_mouse (self, _tmp71_, _tmp72_, _tmp73_);
#line 3431 "spice-display.c"
										}
									}
								}
							}
						}
					}
#line 459 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp74_ = kbd_or_mouse;
#line 459 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					if (_tmp74_) {
#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 3450 "spice-display.c"
					}
#line 443 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_libusb_free_config_descriptor0 (config);
#line 3454 "spice-display.c"
				}
#line 463 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp75_ = ret;
#line 463 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp76_ = dev;
#line 463 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp77_ = __vala_SpiceUsbDevice_copy0 (_tmp76_);
#line 463 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				g_ptr_array_add (_tmp75_, _tmp77_);
#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 3468 "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 3478 "spice-display.c"
}


static gboolean
boxes_spice_display_is_usb_kbd_or_mouse (BoxesSpiceDisplay* self,
                                         guint8 class,
                                         guint8 subclass,
                                         guint8 protocol)
{
	gboolean result = FALSE;
	gboolean ret = FALSE;
#line 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"
	if (class == LIBUSB_CLASS_HID) {
#line 473 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		switch (subclass) {
#line 473 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			case 0x00:
#line 3500 "spice-display.c"
			{
#line 475 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 3504 "spice-display.c"
			}
#line 473 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			case 0x01:
#line 3508 "spice-display.c"
			{
#line 477 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				switch (protocol) {
#line 477 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					case 0x00:
#line 3514 "spice-display.c"
					{
#line 479 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						break;
#line 3518 "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 3524 "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 3530 "spice-display.c"
					}
					default:
					{
#line 485 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
						break;
#line 3536 "spice-display.c"
					}
				}
#line 487 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 3541 "spice-display.c"
			}
			default:
			{
#line 489 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 3547 "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 3555 "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 3570 "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 3604 "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 3621 "spice-display.c"
	} else {
#line 10 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp0_ = FALSE;
#line 3625 "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 3633 "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 3645 "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 3668 "spice-display.c"
}


void
boxes_spice_display_set_ca_cert (BoxesSpiceDisplay* self,
                                 GByteArray* value)
{
	SpiceSession* _tmp0_;
#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"
	g_object_set (_tmp0_, "ca", value, 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_PROPERTY]);
#line 3685 "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 3702 "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 3713 "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 3734 "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 3745 "spice-display.c"
}


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


static void
_boxes_spice_display____lambda80_ (BoxesSpiceDisplay* self,
                                   SpiceUsbDevice* dev,
                                   GError* err)
{
	gchar* device_description = NULL;
	gchar* _tmp0_;
	gchar* box_name = NULL;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
#line 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_ = spice_usb_device_get_description (dev, "%1$s %2$s");
#line 61 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	device_description = _tmp0_;
#line 62 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = boxes_spice_display_get_box_name (self);
#line 62 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	box_name = _tmp1_;
#line 63 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp2_ = device_description;
#line 63 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = box_name;
#line 63 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = g_strdup_printf (_ ("Redirection of USB device “%s” for “%s” failed"), _tmp2_, _tmp3_);
#line 63 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = _tmp4_;
#line 63 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_signal_emit_by_name ((BoxesDisplay*) self, "got-error", _tmp5_);
#line 63 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_free0 (_tmp5_);
#line 64 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = device_description;
#line 64 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = box_name;
#line 64 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = err->message;
#line 64 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_debug ("spice-display.vala:64: Error connecting %s to %s: %s", _tmp6_, _tmp7_, _tmp8_);
#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 3863 "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 3875 "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 3956 "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 3973 "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 3982 "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 3994 "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 4003 "spice-display.c"
	}
#line 46 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return obj;
#line 4007 "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_PROPERTY, boxes_spice_display_properties[BOXES_SPICE_DISPLAY_PROTOCOL_PROPERTY] = g_param_spec_string ("protocol", "protocol", "protocol", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_SPICE_DISPLAY_URI_PROPERTY, boxes_spice_display_properties[BOXES_SPICE_DISPLAY_URI_PROPERTY] = g_param_spec_string ("uri", "uri", "uri", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_SPICE_DISPLAY_CA_CERT_PROPERTY, boxes_spice_display_properties[BOXES_SPICE_DISPLAY_CA_CERT_PROPERTY] = g_param_spec_boxed ("ca-cert", "ca-cert", "ca-cert", G_TYPE_BYTE_ARRAY, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_SPICE_DISPLAY_MAIN_CHANNEL_PROPERTY, boxes_spice_display_properties[BOXES_SPICE_DISPLAY_MAIN_CHANNEL_PROPERTY] = g_param_spec_object ("main-channel", "main-channel", "main-channel", spice_main_channel_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 4056 "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 4065 "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 4097 "spice-display.c"
}


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


static void
_vala_boxes_spice_display_get_property (GObject * object,
                                        guint property_id,
                                        GValue * value,
                                        GParamSpec * pspec)
{
	BoxesSpiceDisplay * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_SPICE_DISPLAY, BoxesSpiceDisplay);
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	switch (property_id) {
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_SPICE_DISPLAY_PROTOCOL_PROPERTY:
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_value_set_string (value, boxes_display_get_protocol ((BoxesDisplay*) self));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_SPICE_DISPLAY_URI_PROPERTY:
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_value_take_string (value, boxes_display_get_uri ((BoxesDisplay*) self));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_SPICE_DISPLAY_CA_CERT_PROPERTY:
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_value_take_boxed (value, boxes_spice_display_get_ca_cert (self));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_SPICE_DISPLAY_MAIN_CHANNEL_PROPERTY:
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_value_set_object (value, boxes_spice_display_get_main_channel (self));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 4149 "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 4155 "spice-display.c"
	}
}


static void
_vala_boxes_spice_display_set_property (GObject * object,
                                        guint property_id,
                                        const GValue * value,
                                        GParamSpec * pspec)
{
	BoxesSpiceDisplay * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_SPICE_DISPLAY, BoxesSpiceDisplay);
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	switch (property_id) {
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_SPICE_DISPLAY_CA_CERT_PROPERTY:
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		boxes_spice_display_set_ca_cert (self, g_value_get_boxed (value));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		case BOXES_SPICE_DISPLAY_MAIN_CHANNEL_PROPERTY:
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		boxes_spice_display_set_main_channel (self, g_value_get_object (value));
#line 6 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		break;
#line 4182 "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 4188 "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 4200 "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 4211 "spice-display.c"
}


BoxesSpiceChannelHandler*
boxes_spice_channel_handler_construct (GType object_type,
                                       BoxesSpiceDisplay* display,
                                       SpiceChannel* channel,
                                       BoxesDisplayOpenFDFunc open_fd,
                                       void* open_fd_target,
                                       GDestroyNotify open_fd_target_destroy_notify)
{
	BoxesSpiceChannelHandler * self = NULL;
	SpiceChannel* _tmp0_;
	BoxesDisplayOpenFDFunc _tmp1_;
	void* _tmp1__target;
	GDestroyNotify _tmp1__target_destroy_notify;
	gint id = 0;
	gint _tmp2_;
	gint _tmp3_;
#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"
	self->priv->display = display;
#line 504 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp0_ = _g_object_ref0 (channel);
#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 = _tmp0_;
#line 505 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = open_fd;
#line 505 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1__target = open_fd_target;
#line 505 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1__target_destroy_notify = open_fd_target_destroy_notify;
#line 505 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	open_fd = NULL;
#line 505 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	open_fd_target = NULL;
#line 505 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	open_fd_target_destroy_notify = NULL;
#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 = _tmp1_;
#line 505 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target = _tmp1__target;
#line 505 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	self->priv->open_fd_target_destroy_notify = _tmp1__target_destroy_notify;
#line 506 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_get (channel, "channel-id", &_tmp2_, NULL);
#line 506 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = _tmp2_;
#line 506 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	id = _tmp3_;
#line 508 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (open_fd != NULL) {
#line 509 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_connect_object (channel, "open-fd", (GCallback) _boxes_spice_channel_handler_on_open_fd_spice_channel_open_fd, self, 0);
#line 4281 "spice-display.c"
	}
#line 511 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (channel, spice_main_channel_get_type ())) {
#line 512 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		boxes_spice_display_set_main_channel (display, G_TYPE_CHECK_INSTANCE_TYPE (channel, spice_main_channel_get_type ()) ? ((SpiceMainChannel*) channel) : NULL);
#line 4287 "spice-display.c"
	}
#line 514 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (channel, spice_display_channel_get_type ())) {
#line 4291 "spice-display.c"
		gint _tmp4_;
		SpiceDisplay* spice_display = NULL;
		gint _tmp5_;
		GtkWidget* _tmp6_;
		SpiceDisplay* _tmp7_;
		SpiceDisplay* _tmp8_;
#line 515 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp4_ = id;
#line 515 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp4_ != 0) {
#line 516 "/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 516 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			open_fd = NULL;
#line 516 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			open_fd_target = NULL;
#line 516 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			open_fd_target_destroy_notify = NULL;
#line 516 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			return self;
#line 4312 "spice-display.c"
		}
#line 518 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = id;
#line 518 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp6_ = boxes_display_get_display ((BoxesDisplay*) display, _tmp5_);
#line 518 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp7_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, spice_display_get_type ()) ? ((SpiceDisplay*) _tmp6_) : NULL;
#line 518 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp7_ == NULL) {
#line 518 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_object_unref0 (_tmp6_);
#line 4324 "spice-display.c"
		}
#line 518 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		spice_display = _tmp7_;
#line 519 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp8_ = spice_display;
#line 519 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_connect_object ((GObject*) _tmp8_, "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 4334 "spice-display.c"
	}
#line 502 "/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 502 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	open_fd = NULL;
#line 502 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	open_fd_target = NULL;
#line 502 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	open_fd_target_destroy_notify = NULL;
#line 502 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	return self;
#line 4346 "spice-display.c"
}


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


static void
boxes_spice_channel_handler_on_display_ready (BoxesSpiceChannelHandler* self,
                                              GObject* object,
                                              GParamSpec* param_spec)
{
	SpiceDisplay* spice_display = NULL;
	SpiceDisplay* _tmp0_;
	SpiceDisplay* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
#line 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_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, spice_display_get_type ()) ? ((SpiceDisplay*) object) : NULL);
#line 524 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	spice_display = _tmp0_;
#line 525 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = spice_display;
#line 525 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	g_object_get (_tmp1_, "ready", &_tmp2_, NULL);
#line 525 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = _tmp2_;
#line 525 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp3_) {
#line 4391 "spice-display.c"
		BoxesSpiceDisplay* _tmp4_;
		SpiceDisplay* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
#line 526 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp4_ = self->priv->display;
#line 526 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp5_ = spice_display;
#line 526 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_get (_tmp5_, "channel-id", &_tmp6_, NULL);
#line 526 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp7_ = _tmp6_;
#line 526 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_emit_by_name ((BoxesDisplay*) _tmp4_, "show", _tmp7_);
#line 4406 "spice-display.c"
	} else {
		BoxesSpiceDisplay* _tmp8_;
		SpiceDisplay* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
#line 528 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp8_ = self->priv->display;
#line 528 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp9_ = spice_display;
#line 528 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_object_get (_tmp9_, "channel-id", &_tmp10_, NULL);
#line 528 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp11_ = _tmp10_;
#line 528 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		g_signal_emit_by_name ((BoxesDisplay*) _tmp8_, "hide", _tmp11_);
#line 4422 "spice-display.c"
	}
#line 523 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_g_object_unref0 (spice_display);
#line 4426 "spice-display.c"
}


static void
boxes_spice_channel_handler_on_open_fd (BoxesSpiceChannelHandler* self,
                                        SpiceChannel* channel,
                                        gint with_tls)
{
	gint fd = 0;
	BoxesDisplayOpenFDFunc _tmp0_;
	void* _tmp0__target;
#line 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"
	fd = _tmp0_ (_tmp0__target);
#line 535 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	spice_channel_open_fd (channel, fd);
#line 4450 "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 4463 "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 4472 "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 4494 "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 4522 "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 4531 "spice-display.c"
}


void
spice_validate_uri (const gchar* uri_as_text,
                    gint** port,
                    gint** tls_port,
                    GError** error)
{
	gint* _vala_port = NULL;
	gint* _vala_tls_port = NULL;
	xmlURI* uri = NULL;
	xmlURI* _tmp0_;
	xmlURI* _tmp1_;
	gint _tmp3_;
	gint* _tmp4_;
	xmlURI* _tmp5_;
	gint _tmp6_;
	gint* _tmp7_;
	const gchar* _tmp8_ = NULL;
	xmlURI* _tmp9_;
	const gchar* _tmp10_;
	gchar* query_str = NULL;
	gchar* _tmp13_;
	const gchar* _tmp14_;
	xmlURI* _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	GQuark _tmp41_ = 0U;
#line 564 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	static GQuark _tmp40_label0 = 0;
#line 564 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	static GQuark _tmp40_label1 = 0;
#line 4565 "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_ = xmlParseURI (uri_as_text);
#line 543 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	uri = _tmp0_;
#line 545 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp1_ = uri;
#line 545 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp1_ == NULL) {
#line 4577 "spice-display.c"
		GError* _tmp2_;
#line 546 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp2_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, _ ("Invalid URL"));
#line 546 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_inner_error_ = _tmp2_;
#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 4591 "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 4601 "spice-display.c"
		}
	}
#line 548 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp3_ = 0;
#line 548 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp4_ = __int_dup0 (&_tmp3_);
#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 = _tmp4_;
#line 549 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp5_ = uri;
#line 549 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp6_ = _tmp5_->port;
#line 549 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp7_ = __int_dup0 (&_tmp6_);
#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 = _tmp7_;
#line 550 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp9_ = uri;
#line 550 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp10_ = _tmp9_->query_raw;
#line 550 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp8_ = _tmp10_;
#line 550 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp8_ == NULL) {
#line 4630 "spice-display.c"
		xmlURI* _tmp11_;
		const gchar* _tmp12_;
#line 550 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp11_ = uri;
#line 550 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp12_ = _tmp11_->query;
#line 550 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp8_ = _tmp12_;
#line 4639 "spice-display.c"
	}
#line 550 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp13_ = g_strdup (_tmp8_);
#line 550 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	query_str = _tmp13_;
#line 552 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp14_ = query_str;
#line 552 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp14_ != NULL) {
#line 4649 "spice-display.c"
		BoxesQuery* query = NULL;
		const gchar* _tmp15_;
		BoxesQuery* _tmp16_;
		BoxesQuery* _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp19_;
		gboolean _tmp20_;
		BoxesQuery* _tmp28_;
		gchar* _tmp29_;
		gchar* _tmp30_;
		gboolean _tmp31_;
#line 553 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp15_ = query_str;
#line 553 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp16_ = boxes_query_new (_tmp15_);
#line 553 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		query = _tmp16_;
#line 554 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp17_ = query;
#line 554 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp18_ = boxes_query_get (_tmp17_, "port");
#line 554 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp19_ = _tmp18_;
#line 554 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp20_ = _tmp19_ != NULL;
#line 554 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_tmp19_);
#line 554 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp20_) {
#line 4679 "spice-display.c"
			gint* _tmp21_;
			BoxesQuery* _tmp23_;
			gchar* _tmp24_;
			gchar* _tmp25_;
			gint _tmp26_;
			gint* _tmp27_;
#line 555 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp21_ = _vala_port;
#line 555 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			if ((*_tmp21_) > 0) {
#line 4690 "spice-display.c"
				GError* _tmp22_;
#line 556 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp22_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, _ ("The port must be specified once"));
#line 556 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_inner_error_ = _tmp22_;
#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 4708 "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 4722 "spice-display.c"
				}
			}
#line 557 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp23_ = query;
#line 557 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp24_ = boxes_query_get (_tmp23_, "port");
#line 557 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp25_ = _tmp24_;
#line 557 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp26_ = atoi (_tmp25_);
#line 557 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp27_ = __int_dup0 (&_tmp26_);
#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 = _tmp27_;
#line 557 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (_tmp25_);
#line 4741 "spice-display.c"
		}
#line 560 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp28_ = query;
#line 560 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp29_ = boxes_query_get (_tmp28_, "tls-port");
#line 560 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp30_ = _tmp29_;
#line 560 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_tmp31_ = _tmp30_ != NULL;
#line 560 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_tmp30_);
#line 560 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		if (_tmp31_) {
#line 4755 "spice-display.c"
			BoxesQuery* _tmp32_;
			gchar* _tmp33_;
			gchar* _tmp34_;
			gint _tmp35_;
			gint* _tmp36_;
#line 561 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp32_ = query;
#line 561 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp33_ = boxes_query_get (_tmp32_, "tls-port");
#line 561 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp34_ = _tmp33_;
#line 561 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp35_ = atoi (_tmp34_);
#line 561 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_tmp36_ = __int_dup0 (&_tmp35_);
#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 = _tmp36_;
#line 561 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
			_g_free0 (_tmp34_);
#line 4777 "spice-display.c"
		}
#line 552 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_object_unref0 (query);
#line 4781 "spice-display.c"
	}
#line 564 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp37_ = uri;
#line 564 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp38_ = _tmp37_->scheme;
#line 564 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp39_ = _tmp38_;
#line 564 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	_tmp41_ = (NULL == _tmp39_) ? 0 : g_quark_from_string (_tmp39_);
#line 564 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
	if (_tmp41_ == ((0 != _tmp40_label0) ? _tmp40_label0 : (_tmp40_label0 = g_quark_from_static_string ("spice")))) {
#line 564 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		switch (0) {
#line 4795 "spice-display.c"
			default:
			{
				gboolean _tmp42_ = FALSE;
				gint* _tmp43_;
#line 566 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp43_ = _vala_port;
#line 566 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if ((*_tmp43_) <= 0) {
#line 4804 "spice-display.c"
					gint* _tmp44_;
#line 566 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp44_ = _vala_tls_port;
#line 566 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp42_ = (*_tmp44_) <= 0;
#line 4810 "spice-display.c"
				} else {
#line 566 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp42_ = FALSE;
#line 4814 "spice-display.c"
				}
#line 566 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_tmp42_) {
#line 4818 "spice-display.c"
					GError* _tmp45_;
#line 567 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp45_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, _ ("Missing port in Spice URL"));
#line 567 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_inner_error_ = _tmp45_;
#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 4834 "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 4846 "spice-display.c"
					}
				}
#line 568 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 4851 "spice-display.c"
			}
		}
	} else if (_tmp41_ == ((0 != _tmp40_label1) ? _tmp40_label1 : (_tmp40_label1 = g_quark_from_static_string ("spice+unix")))) {
#line 564 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		switch (0) {
#line 4857 "spice-display.c"
			default:
			{
				gboolean _tmp46_ = FALSE;
				gboolean _tmp47_ = FALSE;
				gint* _tmp48_;
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp48_ = _vala_port;
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if ((*_tmp48_) > 0) {
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp47_ = TRUE;
#line 4869 "spice-display.c"
				} else {
					xmlURI* _tmp49_;
					const gchar* _tmp50_;
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp49_ = uri;
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp50_ = _tmp49_->query_raw;
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp47_ = _tmp50_ != NULL;
#line 4879 "spice-display.c"
				}
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_tmp47_) {
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp46_ = TRUE;
#line 4885 "spice-display.c"
				} else {
					xmlURI* _tmp51_;
					const gchar* _tmp52_;
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp51_ = uri;
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp52_ = _tmp51_->query;
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp46_ = _tmp52_ != NULL;
#line 4895 "spice-display.c"
				}
#line 570 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				if (_tmp46_) {
#line 4899 "spice-display.c"
					GError* _tmp53_;
#line 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_tmp53_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, _ ("Invalid URL"));
#line 571 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
					_inner_error_ = _tmp53_;
#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 4915 "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 4927 "spice-display.c"
					}
				}
#line 572 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				break;
#line 4932 "spice-display.c"
			}
		}
	} else {
#line 564 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		switch (0) {
#line 4938 "spice-display.c"
			default:
			{
				GError* _tmp54_;
#line 574 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_tmp54_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, _ ("Invalid URL"));
#line 574 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
				_inner_error_ = _tmp54_;
#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 4956 "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 4968 "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 4981 "spice-display.c"
	} else {
#line 540 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_vala_port);
#line 4985 "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 4991 "spice-display.c"
	} else {
#line 540 "/home/fborges/checkout/gnome-boxes/src/spice-display.vala"
		_g_free0 (_vala_tls_port);
#line 4995 "spice-display.c"
	}
}



