/* CameraTable.c generated by valac 0.34.2, the Vala compiler
 * generated from CameraTable.vala, do not modify */

/* Copyright 2016 Software Freedom Conservancy Inc.
 *
 * This software is licensed under the GNU Lesser General Public License
 * (version 2.1 or later).  See the COPYING file in this distribution.
 */

#include <glib.h>
#include <glib-object.h>
#include <gphoto2/gphoto2-camera.h>
#include <gphoto.h>
#include <stdlib.h>
#include <string.h>
#include <gudev/gudev.h>
#include <gphoto2/gphoto2-context.h>
#include <gphoto2/gphoto2-abilities-list.h>
#include <gio/gio.h>
#include <gee.h>
#include <gtk/gtk.h>
#include <gphoto2/gphoto2-result.h>
#include <gphoto2/gphoto2-port-result.h>
#include <stdio.h>
#include <gphoto2/gphoto2-port-info-list.h>
#include <gphoto2/gphoto2-list.h>
#include <gobject/gvaluecollector.h>


#define TYPE_DISCOVERED_CAMERA (discovered_camera_get_type ())
#define DISCOVERED_CAMERA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DISCOVERED_CAMERA, DiscoveredCamera))
#define DISCOVERED_CAMERA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DISCOVERED_CAMERA, DiscoveredCameraClass))
#define IS_DISCOVERED_CAMERA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DISCOVERED_CAMERA))
#define IS_DISCOVERED_CAMERA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DISCOVERED_CAMERA))
#define DISCOVERED_CAMERA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DISCOVERED_CAMERA, DiscoveredCameraClass))

typedef struct _DiscoveredCamera DiscoveredCamera;
typedef struct _DiscoveredCameraClass DiscoveredCameraClass;
typedef struct _DiscoveredCameraPrivate DiscoveredCameraPrivate;
#define _gp_camera_unref0(var) ((var == NULL) ? NULL : (var = (gp_camera_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _ParamSpecDiscoveredCamera ParamSpecDiscoveredCamera;

#define TYPE_CAMERA_TABLE (camera_table_get_type ())
#define CAMERA_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CAMERA_TABLE, CameraTable))
#define CAMERA_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CAMERA_TABLE, CameraTableClass))
#define IS_CAMERA_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CAMERA_TABLE))
#define IS_CAMERA_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CAMERA_TABLE))
#define CAMERA_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CAMERA_TABLE, CameraTableClass))

typedef struct _CameraTable CameraTable;
typedef struct _CameraTableClass CameraTableClass;
typedef struct _CameraTablePrivate CameraTablePrivate;

#define TYPE_ONE_SHOT_SCHEDULER (one_shot_scheduler_get_type ())
#define ONE_SHOT_SCHEDULER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ONE_SHOT_SCHEDULER, OneShotScheduler))
#define ONE_SHOT_SCHEDULER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ONE_SHOT_SCHEDULER, OneShotSchedulerClass))
#define IS_ONE_SHOT_SCHEDULER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ONE_SHOT_SCHEDULER))
#define IS_ONE_SHOT_SCHEDULER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ONE_SHOT_SCHEDULER))
#define ONE_SHOT_SCHEDULER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ONE_SHOT_SCHEDULER, OneShotSchedulerClass))

typedef struct _OneShotScheduler OneShotScheduler;
typedef struct _OneShotSchedulerClass OneShotSchedulerClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _one_shot_scheduler_unref0(var) ((var == NULL) ? NULL : (var = (one_shot_scheduler_unref (var), NULL)))
#define _gp_context_unref0(var) ((var == NULL) ? NULL : (var = (gp_context_unref (var), NULL)))
#define _gp_abilities_list_free0(var) ((var == NULL) ? NULL : (var = (gp_abilities_list_free (var), NULL)))

#define TYPE_PAGE_WINDOW (page_window_get_type ())
#define PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_WINDOW, PageWindow))
#define PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_WINDOW, PageWindowClass))
#define IS_PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_WINDOW))
#define IS_PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_WINDOW))
#define PAGE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_WINDOW, PageWindowClass))

typedef struct _PageWindow PageWindow;
typedef struct _PageWindowClass PageWindowClass;

#define TYPE_APP_WINDOW (app_window_get_type ())
#define APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APP_WINDOW, AppWindow))
#define APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APP_WINDOW, AppWindowClass))
#define IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APP_WINDOW))
#define IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APP_WINDOW))
#define APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APP_WINDOW, AppWindowClass))

typedef struct _AppWindow AppWindow;
typedef struct _AppWindowClass AppWindowClass;

#define TYPE_LIBRARY_WINDOW (library_window_get_type ())
#define LIBRARY_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_WINDOW, LibraryWindow))
#define LIBRARY_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_WINDOW, LibraryWindowClass))
#define IS_LIBRARY_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_WINDOW))
#define IS_LIBRARY_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_WINDOW))
#define LIBRARY_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_WINDOW, LibraryWindowClass))

typedef struct _LibraryWindow LibraryWindow;
typedef struct _LibraryWindowClass LibraryWindowClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _camera_table_unref0(var) ((var == NULL) ? NULL : (var = (camera_table_unref (var), NULL)))
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _gp_port_info_list_free0(var) ((var == NULL) ? NULL : (var = (gp_port_info_list_free (var), NULL)))
#define _gp_list_unref0(var) ((var == NULL) ? NULL : (var = (gp_list_unref (var), NULL)))
#define _discovered_camera_unref0(var) ((var == NULL) ? NULL : (var = (discovered_camera_unref (var), NULL)))
typedef struct _ParamSpecCameraTable ParamSpecCameraTable;
#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);

struct _DiscoveredCamera {
	GTypeInstance parent_instance;
	volatile int ref_count;
	DiscoveredCameraPrivate * priv;
	Camera* gcamera;
	gchar* uri;
	gchar* display_name;
	gchar* icon;
};

struct _DiscoveredCameraClass {
	GTypeClass parent_class;
	void (*finalize) (DiscoveredCamera *self);
};

struct _ParamSpecDiscoveredCamera {
	GParamSpec parent_instance;
};

struct _CameraTable {
	GTypeInstance parent_instance;
	volatile int ref_count;
	CameraTablePrivate * priv;
};

struct _CameraTableClass {
	GTypeClass parent_class;
	void (*finalize) (CameraTable *self);
};

struct _CameraTablePrivate {
	GUdevClient* client;
	OneShotScheduler* camera_update_scheduler;
	GPContext* null_context;
	CameraAbilitiesList* abilities_list;
	GVolumeMonitor* volume_monitor;
	GeeHashMap* camera_map;
};

typedef void (*OneShotCallback) (void* user_data);
typedef enum  {
	GPHOTO_ERROR_LIBRARY
} GPhotoError;
#define GPHOTO_ERROR gphoto_error_quark ()
struct _ParamSpecCameraTable {
	GParamSpec parent_instance;
};


static gpointer discovered_camera_parent_class = NULL;
static gpointer camera_table_parent_class = NULL;
static CameraTable* camera_table_instance;
static CameraTable* camera_table_instance = NULL;

gpointer discovered_camera_ref (gpointer instance);
void discovered_camera_unref (gpointer instance);
GParamSpec* param_spec_discovered_camera (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_discovered_camera (GValue* value, gpointer v_object);
void value_take_discovered_camera (GValue* value, gpointer v_object);
gpointer value_get_discovered_camera (const GValue* value);
GType discovered_camera_get_type (void) G_GNUC_CONST;
enum  {
	DISCOVERED_CAMERA_DUMMY_PROPERTY
};
DiscoveredCamera* discovered_camera_new (Camera* gcamera, const gchar* uri, const gchar* display_name, const gchar* icon);
DiscoveredCamera* discovered_camera_construct (GType object_type, Camera* gcamera, const gchar* uri, const gchar* display_name, const gchar* icon);
static void discovered_camera_finalize (DiscoveredCamera* obj);
gpointer camera_table_ref (gpointer instance);
void camera_table_unref (gpointer instance);
GParamSpec* param_spec_camera_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_camera_table (GValue* value, gpointer v_object);
void value_take_camera_table (GValue* value, gpointer v_object);
gpointer value_get_camera_table (const GValue* value);
GType camera_table_get_type (void) G_GNUC_CONST;
gpointer one_shot_scheduler_ref (gpointer instance);
void one_shot_scheduler_unref (gpointer instance);
GParamSpec* param_spec_one_shot_scheduler (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_one_shot_scheduler (GValue* value, gpointer v_object);
void value_take_one_shot_scheduler (GValue* value, gpointer v_object);
gpointer value_get_one_shot_scheduler (const GValue* value);
GType one_shot_scheduler_get_type (void) G_GNUC_CONST;
#define CAMERA_TABLE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_CAMERA_TABLE, CameraTablePrivate))
enum  {
	CAMERA_TABLE_DUMMY_PROPERTY
};
#define CAMERA_TABLE_UPDATE_DELAY_MSEC 1000
static CameraTable* camera_table_new (void);
static CameraTable* camera_table_construct (GType object_type);
static void camera_table_on_update_cameras (CameraTable* self);
static void _camera_table_on_update_cameras_one_shot_callback (gpointer self);
OneShotScheduler* one_shot_scheduler_new (const gchar* name, OneShotCallback callback, void* callback_target);
OneShotScheduler* one_shot_scheduler_construct (GType object_type, const gchar* name, OneShotCallback callback, void* callback_target);
static void camera_table_on_udev_event (CameraTable* self, const gchar* action, GUdevDevice* device);
static void _camera_table_on_udev_event_g_udev_client_uevent (GUdevClient* _sender, const gchar* action, GUdevDevice* device, gpointer self);
void camera_table_on_volume_changed (CameraTable* self, GVolume* volume);
static void _camera_table_on_volume_changed_g_volume_monitor_volume_changed (GVolumeMonitor* _sender, GVolume* volume, gpointer self);
static void _camera_table_on_volume_changed_g_volume_monitor_volume_added (GVolumeMonitor* _sender, GVolume* volume, gpointer self);
static gboolean camera_table_delayed_init (CameraTable* self);
static gboolean _camera_table_delayed_init_gsource_func (gpointer self);
GType page_window_get_type (void) G_GNUC_CONST;
GType app_window_get_type (void) G_GNUC_CONST;
AppWindow* app_window_get_instance (void);
GType library_window_get_type (void) G_GNUC_CONST;
void library_window_set_page_switching_enabled (LibraryWindow* self, gboolean should_enable);
GQuark gphoto_error_quark (void);
static void camera_table_init_camera_table (CameraTable* self, GError** error);
static void camera_table_update_camera_table (CameraTable* self, GError** error);
CameraTable* camera_table_get_instance (void);
GeeIterable* camera_table_get_cameras (CameraTable* self);
gint camera_table_get_count (CameraTable* self);
DiscoveredCamera* camera_table_get_for_uri (CameraTable* self, const gchar* uri);
static void camera_table_do_op (CameraTable* self, int res, const gchar* op, GError** error);
static gchar** camera_table_get_all_usb_cameras (CameraTable* self, int* result_length1);
static void _vala_array_add141 (gchar*** array, int* length, int* size, gchar* value);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
static gboolean camera_table_usb_esp (CameraTable* self, gint current_camera_count, gchar** usb_cameras, int usb_cameras_length1, const gchar* port, gchar** full_port);
gchar* camera_table_get_port_uri (const gchar* port);
gchar* camera_table_get_port_path (const gchar* port);
static gchar* camera_table_get_name_for_uuid (CameraTable* self, const gchar* uuid);
static gchar* camera_table_get_icon_for_uuid (CameraTable* self, const gchar* uuid);
static void _vala_array_add142 (DiscoveredCamera*** array, int* length, int* size, DiscoveredCamera* value);
void one_shot_scheduler_after_timeout (OneShotScheduler* self, guint msec, gboolean reschedule);
static void g_cclosure_user_marshal_VOID__DISCOVERED_CAMERA (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void camera_table_finalize (CameraTable* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);

static const gchar* CAMERA_TABLE_SUBSYSTEMS[3] = {"usb", "block", NULL};

static gpointer _GPHOTO_REF_CAMERA0 (gpointer self) {
#line 14 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return self ? GPHOTO_REF_CAMERA (self) : NULL;
#line 245 "CameraTable.c"
}


DiscoveredCamera* discovered_camera_construct (GType object_type, Camera* gcamera, const gchar* uri, const gchar* display_name, const gchar* icon) {
	DiscoveredCamera* self = NULL;
	Camera* _tmp0_ = NULL;
	Camera* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
#line 13 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (gcamera != NULL, NULL);
#line 13 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (uri != NULL, NULL);
#line 13 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (display_name != NULL, NULL);
#line 13 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	self = (DiscoveredCamera*) g_type_create_instance (object_type);
#line 14 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp0_ = gcamera;
#line 14 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp1_ = _GPHOTO_REF_CAMERA0 (_tmp0_);
#line 14 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_gp_camera_unref0 (self->gcamera);
#line 14 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	self->gcamera = _tmp1_;
#line 15 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp2_ = uri;
#line 15 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp3_ = g_strdup (_tmp2_);
#line 15 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_g_free0 (self->uri);
#line 15 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	self->uri = _tmp3_;
#line 16 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp4_ = display_name;
#line 16 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp5_ = g_strdup (_tmp4_);
#line 16 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_g_free0 (self->display_name);
#line 16 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	self->display_name = _tmp5_;
#line 17 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp6_ = icon;
#line 17 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp7_ = g_strdup (_tmp6_);
#line 17 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_g_free0 (self->icon);
#line 17 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	self->icon = _tmp7_;
#line 13 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return self;
#line 301 "CameraTable.c"
}


DiscoveredCamera* discovered_camera_new (Camera* gcamera, const gchar* uri, const gchar* display_name, const gchar* icon) {
#line 13 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return discovered_camera_construct (TYPE_DISCOVERED_CAMERA, gcamera, uri, display_name, icon);
#line 308 "CameraTable.c"
}


static void value_discovered_camera_init (GValue* value) {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	value->data[0].v_pointer = NULL;
#line 315 "CameraTable.c"
}


static void value_discovered_camera_free_value (GValue* value) {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (value->data[0].v_pointer) {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		discovered_camera_unref (value->data[0].v_pointer);
#line 324 "CameraTable.c"
	}
}


static void value_discovered_camera_copy_value (const GValue* src_value, GValue* dest_value) {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (src_value->data[0].v_pointer) {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		dest_value->data[0].v_pointer = discovered_camera_ref (src_value->data[0].v_pointer);
#line 334 "CameraTable.c"
	} else {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		dest_value->data[0].v_pointer = NULL;
#line 338 "CameraTable.c"
	}
}


static gpointer value_discovered_camera_peek_pointer (const GValue* value) {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return value->data[0].v_pointer;
#line 346 "CameraTable.c"
}


static gchar* value_discovered_camera_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (collect_values[0].v_pointer) {
#line 353 "CameraTable.c"
		DiscoveredCamera* object;
		object = collect_values[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		if (object->parent_instance.g_class == NULL) {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 360 "CameraTable.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 364 "CameraTable.c"
		}
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		value->data[0].v_pointer = discovered_camera_ref (object);
#line 368 "CameraTable.c"
	} else {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		value->data[0].v_pointer = NULL;
#line 372 "CameraTable.c"
	}
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return NULL;
#line 376 "CameraTable.c"
}


static gchar* value_discovered_camera_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	DiscoveredCamera** object_p;
	object_p = collect_values[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (!object_p) {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 387 "CameraTable.c"
	}
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (!value->data[0].v_pointer) {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		*object_p = NULL;
#line 393 "CameraTable.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		*object_p = value->data[0].v_pointer;
#line 397 "CameraTable.c"
	} else {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		*object_p = discovered_camera_ref (value->data[0].v_pointer);
#line 401 "CameraTable.c"
	}
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return NULL;
#line 405 "CameraTable.c"
}


GParamSpec* param_spec_discovered_camera (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ParamSpecDiscoveredCamera* spec;
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (g_type_is_a (object_type, TYPE_DISCOVERED_CAMERA), NULL);
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return G_PARAM_SPEC (spec);
#line 419 "CameraTable.c"
}


gpointer value_get_discovered_camera (const GValue* value) {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DISCOVERED_CAMERA), NULL);
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return value->data[0].v_pointer;
#line 428 "CameraTable.c"
}


void value_set_discovered_camera (GValue* value, gpointer v_object) {
	DiscoveredCamera* old;
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DISCOVERED_CAMERA));
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	old = value->data[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (v_object) {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_DISCOVERED_CAMERA));
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		value->data[0].v_pointer = v_object;
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		discovered_camera_ref (value->data[0].v_pointer);
#line 448 "CameraTable.c"
	} else {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		value->data[0].v_pointer = NULL;
#line 452 "CameraTable.c"
	}
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (old) {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		discovered_camera_unref (old);
#line 458 "CameraTable.c"
	}
}


void value_take_discovered_camera (GValue* value, gpointer v_object) {
	DiscoveredCamera* old;
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DISCOVERED_CAMERA));
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	old = value->data[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (v_object) {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_DISCOVERED_CAMERA));
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		value->data[0].v_pointer = v_object;
#line 477 "CameraTable.c"
	} else {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		value->data[0].v_pointer = NULL;
#line 481 "CameraTable.c"
	}
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (old) {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		discovered_camera_unref (old);
#line 487 "CameraTable.c"
	}
}


static void discovered_camera_class_init (DiscoveredCameraClass * klass) {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	discovered_camera_parent_class = g_type_class_peek_parent (klass);
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	((DiscoveredCameraClass *) klass)->finalize = discovered_camera_finalize;
#line 497 "CameraTable.c"
}


static void discovered_camera_instance_init (DiscoveredCamera * self) {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	self->ref_count = 1;
#line 504 "CameraTable.c"
}


static void discovered_camera_finalize (DiscoveredCamera* obj) {
	DiscoveredCamera * self;
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DISCOVERED_CAMERA, DiscoveredCamera);
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_signal_handlers_destroy (self);
#line 8 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_gp_camera_unref0 (self->gcamera);
#line 9 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_g_free0 (self->uri);
#line 10 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_g_free0 (self->display_name);
#line 11 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_g_free0 (self->icon);
#line 522 "CameraTable.c"
}


GType discovered_camera_get_type (void) {
	static volatile gsize discovered_camera_type_id__volatile = 0;
	if (g_once_init_enter (&discovered_camera_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { value_discovered_camera_init, value_discovered_camera_free_value, value_discovered_camera_copy_value, value_discovered_camera_peek_pointer, "p", value_discovered_camera_collect_value, "p", value_discovered_camera_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (DiscoveredCameraClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) discovered_camera_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DiscoveredCamera), 0, (GInstanceInitFunc) discovered_camera_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType discovered_camera_type_id;
		discovered_camera_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DiscoveredCamera", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&discovered_camera_type_id__volatile, discovered_camera_type_id);
	}
	return discovered_camera_type_id__volatile;
}


gpointer discovered_camera_ref (gpointer instance) {
	DiscoveredCamera* self;
	self = instance;
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_atomic_int_inc (&self->ref_count);
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return instance;
#line 547 "CameraTable.c"
}


void discovered_camera_unref (gpointer instance) {
	DiscoveredCamera* self;
	self = instance;
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		DISCOVERED_CAMERA_GET_CLASS (self)->finalize (self);
#line 7 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 560 "CameraTable.c"
	}
}


static void _camera_table_on_update_cameras_one_shot_callback (gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	camera_table_on_update_cameras ((CameraTable*) self);
#line 568 "CameraTable.c"
}


static void _camera_table_on_udev_event_g_udev_client_uevent (GUdevClient* _sender, const gchar* action, GUdevDevice* device, gpointer self) {
#line 46 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	camera_table_on_udev_event ((CameraTable*) self, action, device);
#line 575 "CameraTable.c"
}


static void _camera_table_on_volume_changed_g_volume_monitor_volume_changed (GVolumeMonitor* _sender, GVolume* volume, gpointer self) {
#line 48 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	camera_table_on_volume_changed ((CameraTable*) self, volume);
#line 582 "CameraTable.c"
}


static void _camera_table_on_volume_changed_g_volume_monitor_volume_added (GVolumeMonitor* _sender, GVolume* volume, gpointer self) {
#line 49 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	camera_table_on_volume_changed ((CameraTable*) self, volume);
#line 589 "CameraTable.c"
}


static gboolean _camera_table_delayed_init_gsource_func (gpointer self) {
	gboolean result;
	result = camera_table_delayed_init ((CameraTable*) self);
#line 54 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return result;
#line 598 "CameraTable.c"
}


static CameraTable* camera_table_construct (GType object_type) {
	CameraTable* self = NULL;
	OneShotScheduler* _tmp0_ = NULL;
	GUdevClient* _tmp1_ = NULL;
	GVolumeMonitor* _tmp2_ = NULL;
	GVolumeMonitor* _tmp3_ = NULL;
	GVolumeMonitor* _tmp4_ = NULL;
#line 41 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	self = (CameraTable*) g_type_create_instance (object_type);
#line 42 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp0_ = one_shot_scheduler_new ("CameraTable update scheduler", _camera_table_on_update_cameras_one_shot_callback, self);
#line 42 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_one_shot_scheduler_unref0 (self->priv->camera_update_scheduler);
#line 42 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	self->priv->camera_update_scheduler = _tmp0_;
#line 46 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp1_ = self->priv->client;
#line 46 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_signal_connect (_tmp1_, "uevent", (GCallback) _camera_table_on_udev_event_g_udev_client_uevent, self);
#line 47 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp2_ = g_volume_monitor_get ();
#line 47 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_g_object_unref0 (self->priv->volume_monitor);
#line 47 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	self->priv->volume_monitor = _tmp2_;
#line 48 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp3_ = self->priv->volume_monitor;
#line 48 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_signal_connect (_tmp3_, "volume-changed", (GCallback) _camera_table_on_volume_changed_g_volume_monitor_volume_changed, self);
#line 49 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp4_ = self->priv->volume_monitor;
#line 49 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_signal_connect (_tmp4_, "volume-added", (GCallback) _camera_table_on_volume_changed_g_volume_monitor_volume_added, self);
#line 54 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 500, _camera_table_delayed_init_gsource_func, camera_table_ref (self), camera_table_unref);
#line 41 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return self;
#line 639 "CameraTable.c"
}


static CameraTable* camera_table_new (void) {
#line 41 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return camera_table_construct (TYPE_CAMERA_TABLE);
#line 646 "CameraTable.c"
}


static gboolean camera_table_delayed_init (CameraTable* self) {
	gboolean result = FALSE;
	AppWindow* _tmp0_ = NULL;
	LibraryWindow* _tmp1_ = NULL;
	AppWindow* _tmp6_ = NULL;
	LibraryWindow* _tmp7_ = NULL;
	GError * _inner_error_ = NULL;
#line 57 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (IS_CAMERA_TABLE (self), FALSE);
#line 60 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp0_ = app_window_get_instance ();
#line 60 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_LIBRARY_WINDOW, LibraryWindow);
#line 60 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	library_window_set_page_switching_enabled (_tmp1_, FALSE);
#line 60 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_g_object_unref0 (_tmp1_);
#line 667 "CameraTable.c"
	{
#line 63 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		camera_table_init_camera_table (self, &_inner_error_);
#line 63 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 63 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			if (_inner_error_->domain == GPHOTO_ERROR) {
#line 675 "CameraTable.c"
				goto __catch55_gphoto_error;
			}
#line 63 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 63 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_clear_error (&_inner_error_);
#line 63 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return FALSE;
#line 684 "CameraTable.c"
		}
	}
	goto __finally55;
	__catch55_gphoto_error:
	{
		GError* err = NULL;
		GError* _tmp2_ = NULL;
		const gchar* _tmp3_ = NULL;
#line 62 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		err = _inner_error_;
#line 62 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_inner_error_ = NULL;
#line 65 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp2_ = err;
#line 65 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp3_ = _tmp2_->message;
#line 65 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		g_warning ("CameraTable.vala:65: Unable to initialize camera table: %s", _tmp3_);
#line 67 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		result = FALSE;
#line 67 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_g_error_free0 (err);
#line 67 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		return result;
#line 709 "CameraTable.c"
	}
	__finally55:
#line 62 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 62 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 62 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		g_clear_error (&_inner_error_);
#line 62 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		return FALSE;
#line 720 "CameraTable.c"
	}
	{
#line 71 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		camera_table_update_camera_table (self, &_inner_error_);
#line 71 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 71 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			if (_inner_error_->domain == GPHOTO_ERROR) {
#line 729 "CameraTable.c"
				goto __catch56_gphoto_error;
			}
#line 71 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 71 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_clear_error (&_inner_error_);
#line 71 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return FALSE;
#line 738 "CameraTable.c"
		}
	}
	goto __finally56;
	__catch56_gphoto_error:
	{
		GError* err = NULL;
		GError* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
#line 70 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		err = _inner_error_;
#line 70 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_inner_error_ = NULL;
#line 73 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp4_ = err;
#line 73 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp5_ = _tmp4_->message;
#line 73 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		g_warning ("CameraTable.vala:73: Unable to update camera table: %s", _tmp5_);
#line 70 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_g_error_free0 (err);
#line 759 "CameraTable.c"
	}
	__finally56:
#line 70 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 70 "/home/jens/Source/shotwell/src/camera/CameraTable.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 70 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		g_clear_error (&_inner_error_);
#line 70 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		return FALSE;
#line 770 "CameraTable.c"
	}
#line 78 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp6_ = app_window_get_instance ();
#line 78 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp7_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_LIBRARY_WINDOW, LibraryWindow);
#line 78 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	library_window_set_page_switching_enabled (_tmp7_, TRUE);
#line 78 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_g_object_unref0 (_tmp7_);
#line 79 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	result = FALSE;
#line 79 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return result;
#line 784 "CameraTable.c"
}


static gpointer _camera_table_ref0 (gpointer self) {
#line 86 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return self ? camera_table_ref (self) : NULL;
#line 791 "CameraTable.c"
}


CameraTable* camera_table_get_instance (void) {
	CameraTable* result = NULL;
	CameraTable* _tmp0_ = NULL;
	CameraTable* _tmp2_ = NULL;
	CameraTable* _tmp3_ = NULL;
#line 83 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp0_ = camera_table_instance;
#line 83 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (_tmp0_ == NULL) {
#line 804 "CameraTable.c"
		CameraTable* _tmp1_ = NULL;
#line 84 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp1_ = camera_table_new ();
#line 84 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_camera_table_unref0 (camera_table_instance);
#line 84 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		camera_table_instance = _tmp1_;
#line 812 "CameraTable.c"
	}
#line 86 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp2_ = camera_table_instance;
#line 86 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp3_ = _camera_table_ref0 (_tmp2_);
#line 86 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	result = _tmp3_;
#line 86 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return result;
#line 822 "CameraTable.c"
}


GeeIterable* camera_table_get_cameras (CameraTable* self) {
	GeeIterable* result = NULL;
	GeeHashMap* _tmp0_ = NULL;
	GeeCollection* _tmp1_ = NULL;
	GeeCollection* _tmp2_ = NULL;
#line 89 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (IS_CAMERA_TABLE (self), NULL);
#line 90 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp0_ = self->priv->camera_map;
#line 90 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp1_ = gee_abstract_map_get_values (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_MAP, GeeMap));
#line 90 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp2_ = _tmp1_;
#line 90 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ITERABLE, GeeIterable);
#line 90 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return result;
#line 843 "CameraTable.c"
}


gint camera_table_get_count (CameraTable* self) {
	gint result = 0;
	GeeHashMap* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
#line 93 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (IS_CAMERA_TABLE (self), 0);
#line 94 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp0_ = self->priv->camera_map;
#line 94 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp1_ = gee_abstract_map_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_MAP, GeeMap));
#line 94 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp2_ = _tmp1_;
#line 94 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	result = _tmp2_;
#line 94 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return result;
#line 864 "CameraTable.c"
}


DiscoveredCamera* camera_table_get_for_uri (CameraTable* self, const gchar* uri) {
	DiscoveredCamera* result = NULL;
	GeeHashMap* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gpointer _tmp2_ = NULL;
#line 97 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (IS_CAMERA_TABLE (self), NULL);
#line 97 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (uri != NULL, NULL);
#line 98 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp0_ = self->priv->camera_map;
#line 98 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp1_ = uri;
#line 98 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 98 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	result = (DiscoveredCamera*) _tmp2_;
#line 98 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return result;
#line 887 "CameraTable.c"
}


static void camera_table_do_op (CameraTable* self, int res, const gchar* op, GError** error) {
	int _tmp0_ = 0;
	GError * _inner_error_ = NULL;
#line 101 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_if_fail (IS_CAMERA_TABLE (self));
#line 101 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_if_fail (op != NULL);
#line 102 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp0_ = res;
#line 102 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (_tmp0_ != GP_OK) {
#line 902 "CameraTable.c"
		int _tmp1_ = 0;
		const gchar* _tmp2_ = NULL;
		int _tmp3_ = 0;
		const gchar* _tmp4_ = NULL;
		GError* _tmp5_ = NULL;
#line 103 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp1_ = res;
#line 103 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp2_ = op;
#line 103 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp3_ = res;
#line 103 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp4_ = gp_port_result_as_string (_tmp3_);
#line 103 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp5_ = g_error_new (GPHOTO_ERROR, GPHOTO_ERROR_LIBRARY, "[%d] Unable to %s: %s", (gint) _tmp1_, _tmp2_, _tmp4_);
#line 103 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_inner_error_ = _tmp5_;
#line 103 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		if (_inner_error_->domain == GPHOTO_ERROR) {
#line 103 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_propagate_error (error, _inner_error_);
#line 103 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return;
#line 926 "CameraTable.c"
		} else {
#line 103 "/home/jens/Source/shotwell/src/camera/CameraTable.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 103 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_clear_error (&_inner_error_);
#line 103 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return;
#line 934 "CameraTable.c"
		}
	}
}


static void camera_table_init_camera_table (CameraTable* self, GError** error) {
	CameraAbilitiesList* _tmp0_ = NULL;
	int _tmp1_ = 0;
	CameraAbilitiesList* _tmp2_ = NULL;
	GPContext* _tmp3_ = NULL;
	int _tmp4_ = 0;
	GError * _inner_error_ = NULL;
#line 106 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_if_fail (IS_CAMERA_TABLE (self));
#line 107 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp1_ = gp_abilities_list_new (&_tmp0_);
#line 107 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_gp_abilities_list_free0 (self->priv->abilities_list);
#line 107 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	self->priv->abilities_list = _tmp0_;
#line 107 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	camera_table_do_op (self, _tmp1_, "create camera abilities list", &_inner_error_);
#line 107 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 107 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		if (_inner_error_->domain == GPHOTO_ERROR) {
#line 107 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_propagate_error (error, _inner_error_);
#line 107 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return;
#line 965 "CameraTable.c"
		} else {
#line 107 "/home/jens/Source/shotwell/src/camera/CameraTable.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 107 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_clear_error (&_inner_error_);
#line 107 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return;
#line 973 "CameraTable.c"
		}
	}
#line 108 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp2_ = self->priv->abilities_list;
#line 108 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp3_ = self->priv->null_context;
#line 108 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp4_ = gp_abilities_list_load (_tmp2_, _tmp3_);
#line 108 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	camera_table_do_op (self, _tmp4_, "load camera abilities list", &_inner_error_);
#line 108 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 108 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		if (_inner_error_->domain == GPHOTO_ERROR) {
#line 108 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_propagate_error (error, _inner_error_);
#line 108 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return;
#line 992 "CameraTable.c"
		} else {
#line 108 "/home/jens/Source/shotwell/src/camera/CameraTable.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 108 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_clear_error (&_inner_error_);
#line 108 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return;
#line 1000 "CameraTable.c"
		}
	}
}


static gpointer _g_object_ref0 (gpointer self) {
#line 115 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return self ? g_object_ref (self) : NULL;
#line 1009 "CameraTable.c"
}


static void _vala_array_add141 (gchar*** array, int* length, int* size, gchar* value) {
#line 135 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if ((*length) == (*size)) {
#line 135 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 135 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 1020 "CameraTable.c"
	}
#line 135 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	(*array)[(*length)++] = value;
#line 135 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	(*array)[*length] = NULL;
#line 1026 "CameraTable.c"
}


static void _g_object_unref0_ (gpointer var) {
#line 139 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 1033 "CameraTable.c"
}


static void _g_list_free__g_object_unref0_ (GList* self) {
#line 139 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
#line 139 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_list_free (self);
#line 1042 "CameraTable.c"
}


static gchar** camera_table_get_all_usb_cameras (CameraTable* self, int* result_length1) {
	gchar** result = NULL;
	gchar** cameras = NULL;
	gchar** _tmp0_ = NULL;
	gint cameras_length1 = 0;
	gint _cameras_size_ = 0;
	GList* device_list = NULL;
	GUdevClient* _tmp1_ = NULL;
	GList* _tmp2_ = NULL;
	GList* _tmp3_ = NULL;
	gchar** _tmp25_ = NULL;
	gint _tmp25__length1 = 0;
#line 111 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (IS_CAMERA_TABLE (self), NULL);
#line 112 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp0_ = g_new0 (gchar*, 0 + 1);
#line 112 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	cameras = _tmp0_;
#line 112 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	cameras_length1 = 0;
#line 112 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_cameras_size_ = cameras_length1;
#line 114 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp1_ = self->priv->client;
#line 114 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp2_ = g_udev_client_query_by_subsystem (_tmp1_, NULL);
#line 114 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	device_list = _tmp2_;
#line 115 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp3_ = device_list;
#line 1076 "CameraTable.c"
	{
		GList* device_collection = NULL;
		GList* device_it = NULL;
#line 115 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		device_collection = _tmp3_;
#line 115 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		for (device_it = device_collection; device_it != NULL; device_it = device_it->next) {
#line 1084 "CameraTable.c"
			GUdevDevice* _tmp4_ = NULL;
			GUdevDevice* device = NULL;
#line 115 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp4_ = _g_object_ref0 ((GUdevDevice*) device_it->data);
#line 115 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			device = _tmp4_;
#line 1091 "CameraTable.c"
			{
				gchar* device_file = NULL;
				GUdevDevice* _tmp5_ = NULL;
				const gchar* _tmp6_ = NULL;
				gchar* _tmp7_ = NULL;
				gboolean _tmp8_ = FALSE;
				gboolean _tmp9_ = FALSE;
				const gchar* _tmp10_ = NULL;
#line 116 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp5_ = device;
#line 116 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp6_ = g_udev_device_get_device_file (_tmp5_);
#line 116 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp7_ = g_strdup (_tmp6_);
#line 116 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				device_file = _tmp7_;
#line 120 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp10_ = device_file;
#line 120 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (_tmp10_ != NULL) {
#line 1112 "CameraTable.c"
					GUdevDevice* _tmp11_ = NULL;
					gboolean _tmp12_ = FALSE;
#line 121 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp11_ = device;
#line 121 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp12_ = g_udev_device_has_property (_tmp11_, "ID_GPHOTO2");
#line 121 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp9_ = _tmp12_;
#line 1121 "CameraTable.c"
				} else {
#line 120 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp9_ = FALSE;
#line 1125 "CameraTable.c"
				}
#line 120 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (_tmp9_) {
#line 1129 "CameraTable.c"
					GUdevDevice* _tmp13_ = NULL;
					gboolean _tmp14_ = FALSE;
#line 122 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp13_ = device;
#line 122 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp14_ = g_udev_device_has_property (_tmp13_, "GPHOTO2_DRIVER");
#line 122 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp8_ = _tmp14_;
#line 1138 "CameraTable.c"
				} else {
#line 120 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp8_ = FALSE;
#line 1142 "CameraTable.c"
				}
#line 117 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (_tmp8_) {
#line 1146 "CameraTable.c"
					gint camera_bus = 0;
					gint camera_device = 0;
					const gchar* _tmp15_ = NULL;
					gint _tmp16_ = 0;
					gchar* camera = NULL;
					gint _tmp18_ = 0;
					gint _tmp19_ = 0;
					gchar* _tmp20_ = NULL;
					const gchar* _tmp21_ = NULL;
					gchar** _tmp22_ = NULL;
					gint _tmp22__length1 = 0;
					const gchar* _tmp23_ = NULL;
					gchar* _tmp24_ = NULL;
#line 128 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp15_ = device_file;
#line 128 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp16_ = sscanf (_tmp15_, "/dev/bus/usb/%d/%d", &camera_bus, &camera_device);
#line 128 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					if (_tmp16_ < 2) {
#line 1166 "CameraTable.c"
						const gchar* _tmp17_ = NULL;
#line 129 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_tmp17_ = device_file;
#line 129 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						g_critical ("CameraTable.vala:129: get_all_usb_cameras: Failed to scanf device file" \
" %s", _tmp17_);
#line 131 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (device_file);
#line 131 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_object_unref0 (device);
#line 131 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						continue;
#line 1178 "CameraTable.c"
					}
#line 133 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp18_ = camera_bus;
#line 133 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp19_ = camera_device;
#line 133 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp20_ = g_strdup_printf ("usb:%.3d,%.3d", _tmp18_, _tmp19_);
#line 133 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					camera = _tmp20_;
#line 134 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp21_ = camera;
#line 134 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					g_debug ("CameraTable.vala:134: USB camera detected at %s", _tmp21_);
#line 135 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp22_ = cameras;
#line 135 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp22__length1 = cameras_length1;
#line 135 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp23_ = camera;
#line 135 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp24_ = g_strdup (_tmp23_);
#line 135 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_vala_array_add141 (&cameras, &cameras_length1, &_cameras_size_, _tmp24_);
#line 117 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (camera);
#line 1204 "CameraTable.c"
				}
#line 115 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (device_file);
#line 115 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_object_unref0 (device);
#line 1210 "CameraTable.c"
			}
		}
	}
#line 139 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp25_ = cameras;
#line 139 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp25__length1 = cameras_length1;
#line 139 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (result_length1) {
#line 139 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		*result_length1 = _tmp25__length1;
#line 1222 "CameraTable.c"
	}
#line 139 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	result = _tmp25_;
#line 139 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	__g_list_free__g_object_unref0_0 (device_list);
#line 139 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return result;
#line 1230 "CameraTable.c"
}


static gboolean camera_table_usb_esp (CameraTable* self, gint current_camera_count, gchar** usb_cameras, int usb_cameras_length1, const gchar* port, gchar** full_port) {
	gchar* _vala_full_port = NULL;
	gboolean result = FALSE;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	const gchar* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	gint _tmp4_ = 0;
	const gchar* _tmp11_ = NULL;
	gint bus = 0;
	gint device = 0;
	const gchar* _tmp13_ = NULL;
	gint _tmp14_ = 0;
	gchar** _tmp16_ = NULL;
	gint _tmp16__length1 = 0;
	const gchar* _tmp30_ = NULL;
#line 150 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (IS_CAMERA_TABLE (self), FALSE);
#line 150 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (port != NULL, FALSE);
#line 153 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp0_ = current_camera_count;
#line 153 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_vala_assert (_tmp0_ > 0, "current_camera_count > 0");
#line 155 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp1_ = current_camera_count;
#line 155 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp2_ = port;
#line 155 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_debug ("CameraTable.vala:155: USB ESP: current_camera_count=%d port=%s", _tmp1_, _tmp2_);
#line 157 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_g_free0 (_vala_full_port);
#line 157 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_vala_full_port = NULL;
#line 160 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp4_ = current_camera_count;
#line 160 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (_tmp4_ == 1) {
#line 1272 "CameraTable.c"
		gchar** _tmp5_ = NULL;
		gint _tmp5__length1 = 0;
#line 160 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp5_ = usb_cameras;
#line 160 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp5__length1 = usb_cameras_length1;
#line 160 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp3_ = _tmp5__length1 == 1;
#line 1281 "CameraTable.c"
	} else {
#line 160 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp3_ = FALSE;
#line 1285 "CameraTable.c"
	}
#line 160 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (_tmp3_) {
#line 1289 "CameraTable.c"
		gchar** _tmp6_ = NULL;
		gint _tmp6__length1 = 0;
		const gchar* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
		const gchar* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
#line 161 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp6_ = usb_cameras;
#line 161 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp6__length1 = usb_cameras_length1;
#line 161 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp7_ = _tmp6_[0];
#line 161 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp8_ = g_strdup (_tmp7_);
#line 161 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_g_free0 (_vala_full_port);
#line 161 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_vala_full_port = _tmp8_;
#line 163 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp9_ = port;
#line 163 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp10_ = _vala_full_port;
#line 163 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		g_debug ("CameraTable.vala:163: USB ESP: port=%s full_port=%s", _tmp9_, _tmp10_);
#line 165 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		result = TRUE;
#line 165 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		if (full_port) {
#line 165 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			*full_port = _vala_full_port;
#line 1320 "CameraTable.c"
		} else {
#line 165 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_g_free0 (_vala_full_port);
#line 1324 "CameraTable.c"
		}
#line 165 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		return result;
#line 1328 "CameraTable.c"
	}
#line 169 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp11_ = port;
#line 169 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (g_strcmp0 (_tmp11_, "usb:") == 0) {
#line 1334 "CameraTable.c"
		const gchar* _tmp12_ = NULL;
#line 170 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp12_ = port;
#line 170 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		g_debug ("CameraTable.vala:170: USB ESP: Skipping %s", _tmp12_);
#line 172 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		result = FALSE;
#line 172 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		if (full_port) {
#line 172 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			*full_port = _vala_full_port;
#line 1346 "CameraTable.c"
		} else {
#line 172 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_g_free0 (_vala_full_port);
#line 1350 "CameraTable.c"
		}
#line 172 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		return result;
#line 1354 "CameraTable.c"
	}
#line 177 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp13_ = port;
#line 177 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp14_ = sscanf (_tmp13_, "usb:%d,%d", &bus, &device);
#line 177 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (_tmp14_ < 2) {
#line 1362 "CameraTable.c"
		const gchar* _tmp15_ = NULL;
#line 178 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp15_ = port;
#line 178 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		g_critical ("CameraTable.vala:178: USB ESP: Failed to scanf %s", _tmp15_);
#line 180 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		result = FALSE;
#line 180 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		if (full_port) {
#line 180 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			*full_port = _vala_full_port;
#line 1374 "CameraTable.c"
		} else {
#line 180 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_g_free0 (_vala_full_port);
#line 1378 "CameraTable.c"
		}
#line 180 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		return result;
#line 1382 "CameraTable.c"
	}
#line 183 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp16_ = usb_cameras;
#line 183 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp16__length1 = usb_cameras_length1;
#line 1388 "CameraTable.c"
	{
		gchar** usb_camera_collection = NULL;
		gint usb_camera_collection_length1 = 0;
		gint _usb_camera_collection_size_ = 0;
		gint usb_camera_it = 0;
#line 183 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		usb_camera_collection = _tmp16_;
#line 183 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		usb_camera_collection_length1 = _tmp16__length1;
#line 183 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		for (usb_camera_it = 0; usb_camera_it < _tmp16__length1; usb_camera_it = usb_camera_it + 1) {
#line 1400 "CameraTable.c"
			gchar* _tmp17_ = NULL;
			gchar* usb_camera = NULL;
#line 183 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp17_ = g_strdup (usb_camera_collection[usb_camera_it]);
#line 183 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			usb_camera = _tmp17_;
#line 1407 "CameraTable.c"
			{
				gint camera_bus = 0;
				gint camera_device = 0;
				const gchar* _tmp18_ = NULL;
				gint _tmp19_ = 0;
				gboolean _tmp21_ = FALSE;
				gint _tmp22_ = 0;
				gint _tmp23_ = 0;
#line 185 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp18_ = usb_camera;
#line 185 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp19_ = sscanf (_tmp18_, "usb:%d,%d", &camera_bus, &camera_device);
#line 185 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (_tmp19_ < 2) {
#line 1422 "CameraTable.c"
					const gchar* _tmp20_ = NULL;
#line 186 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp20_ = usb_camera;
#line 186 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					g_critical ("CameraTable.vala:186: USB ESP: Failed to scanf %s", _tmp20_);
#line 188 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (usb_camera);
#line 188 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					continue;
#line 1432 "CameraTable.c"
				}
#line 191 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp22_ = bus;
#line 191 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp23_ = camera_bus;
#line 191 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (_tmp22_ == _tmp23_) {
#line 1440 "CameraTable.c"
					gint _tmp24_ = 0;
					gint _tmp25_ = 0;
#line 191 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp24_ = device;
#line 191 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp25_ = camera_device;
#line 191 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp21_ = _tmp24_ == _tmp25_;
#line 1449 "CameraTable.c"
				} else {
#line 191 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp21_ = FALSE;
#line 1453 "CameraTable.c"
				}
#line 191 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (_tmp21_) {
#line 1457 "CameraTable.c"
					const gchar* _tmp26_ = NULL;
					gchar* _tmp27_ = NULL;
					const gchar* _tmp28_ = NULL;
					const gchar* _tmp29_ = NULL;
#line 192 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp26_ = port;
#line 192 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp27_ = g_strdup (_tmp26_);
#line 192 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (_vala_full_port);
#line 192 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_vala_full_port = _tmp27_;
#line 194 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp28_ = port;
#line 194 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp29_ = _vala_full_port;
#line 194 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					g_debug ("CameraTable.vala:194: USB ESP: port=%s full_port=%s", _tmp28_, _tmp29_);
#line 196 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					result = TRUE;
#line 196 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (usb_camera);
#line 196 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					if (full_port) {
#line 196 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						*full_port = _vala_full_port;
#line 1484 "CameraTable.c"
					} else {
#line 196 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (_vala_full_port);
#line 1488 "CameraTable.c"
					}
#line 196 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					return result;
#line 1492 "CameraTable.c"
				}
#line 183 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (usb_camera);
#line 1496 "CameraTable.c"
			}
		}
	}
#line 200 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp30_ = port;
#line 200 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_debug ("CameraTable.vala:200: USB ESP: No matching bus/device found for port=%" \
"s", _tmp30_);
#line 202 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	result = FALSE;
#line 202 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (full_port) {
#line 202 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		*full_port = _vala_full_port;
#line 1510 "CameraTable.c"
	} else {
#line 202 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_g_free0 (_vala_full_port);
#line 1514 "CameraTable.c"
	}
#line 202 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return result;
#line 1518 "CameraTable.c"
}


gchar* camera_table_get_port_uri (const gchar* port) {
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 205 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (port != NULL, NULL);
#line 206 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp0_ = port;
#line 206 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp1_ = g_strdup_printf ("gphoto2://[%s]/", _tmp0_);
#line 206 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	result = _tmp1_;
#line 206 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return result;
#line 1536 "CameraTable.c"
}


static glong string_strnlen (gchar* str, glong maxlen) {
	glong result = 0L;
	gchar* end = NULL;
	gchar* _tmp0_ = NULL;
	glong _tmp1_ = 0L;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
#line 1295 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp0_ = str;
#line 1295 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp1_ = maxlen;
#line 1295 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
#line 1295 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	end = _tmp2_;
#line 1296 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp3_ = end;
#line 1296 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	if (_tmp3_ == NULL) {
#line 1559 "CameraTable.c"
		glong _tmp4_ = 0L;
#line 1297 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp4_ = maxlen;
#line 1297 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		result = _tmp4_;
#line 1297 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		return result;
#line 1567 "CameraTable.c"
	} else {
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
#line 1299 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp5_ = end;
#line 1299 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp6_ = str;
#line 1299 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		result = (glong) (_tmp5_ - _tmp6_);
#line 1299 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		return result;
#line 1579 "CameraTable.c"
	}
}


static gchar* string_substring (const gchar* self, glong offset, glong len) {
	gchar* result = NULL;
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	glong _tmp1_ = 0L;
	glong _tmp8_ = 0L;
	glong _tmp14_ = 0L;
	glong _tmp17_ = 0L;
	glong _tmp18_ = 0L;
	glong _tmp19_ = 0L;
	glong _tmp20_ = 0L;
	glong _tmp21_ = 0L;
	gchar* _tmp22_ = NULL;
#line 1306 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1308 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp1_ = offset;
#line 1308 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	if (_tmp1_ >= ((glong) 0)) {
#line 1603 "CameraTable.c"
		glong _tmp2_ = 0L;
#line 1308 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp2_ = len;
#line 1308 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp0_ = _tmp2_ >= ((glong) 0);
#line 1609 "CameraTable.c"
	} else {
#line 1308 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp0_ = FALSE;
#line 1613 "CameraTable.c"
	}
#line 1308 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	if (_tmp0_) {
#line 1617 "CameraTable.c"
		glong _tmp3_ = 0L;
		glong _tmp4_ = 0L;
		glong _tmp5_ = 0L;
#line 1310 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp3_ = offset;
#line 1310 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp4_ = len;
#line 1310 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_);
#line 1310 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		string_length = _tmp5_;
#line 1629 "CameraTable.c"
	} else {
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
#line 1312 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp6_ = strlen (self);
#line 1312 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp7_ = _tmp6_;
#line 1312 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		string_length = (glong) _tmp7_;
#line 1639 "CameraTable.c"
	}
#line 1315 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp8_ = offset;
#line 1315 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	if (_tmp8_ < ((glong) 0)) {
#line 1645 "CameraTable.c"
		glong _tmp9_ = 0L;
		glong _tmp10_ = 0L;
		glong _tmp11_ = 0L;
#line 1316 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp9_ = string_length;
#line 1316 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp10_ = offset;
#line 1316 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		offset = _tmp9_ + _tmp10_;
#line 1317 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp11_ = offset;
#line 1317 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL);
#line 1659 "CameraTable.c"
	} else {
		glong _tmp12_ = 0L;
		glong _tmp13_ = 0L;
#line 1319 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp12_ = offset;
#line 1319 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp13_ = string_length;
#line 1319 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL);
#line 1669 "CameraTable.c"
	}
#line 1321 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp14_ = len;
#line 1321 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	if (_tmp14_ < ((glong) 0)) {
#line 1675 "CameraTable.c"
		glong _tmp15_ = 0L;
		glong _tmp16_ = 0L;
#line 1322 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp15_ = string_length;
#line 1322 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp16_ = offset;
#line 1322 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		len = _tmp15_ - _tmp16_;
#line 1684 "CameraTable.c"
	}
#line 1324 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp17_ = offset;
#line 1324 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp18_ = len;
#line 1324 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp19_ = string_length;
#line 1324 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL);
#line 1325 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp20_ = offset;
#line 1325 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp21_ = len;
#line 1325 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_);
#line 1325 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	result = _tmp22_;
#line 1325 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	return result;
#line 1704 "CameraTable.c"
}


static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) {
	gchar* result = NULL;
	GError * _inner_error_ = NULL;
#line 1380 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1380 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	g_return_val_if_fail (old != NULL, NULL);
#line 1380 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	g_return_val_if_fail (replacement != NULL, NULL);
#line 1717 "CameraTable.c"
	{
		GRegex* regex = NULL;
		const gchar* _tmp0_ = NULL;
		gchar* _tmp1_ = NULL;
		gchar* _tmp2_ = NULL;
		GRegex* _tmp3_ = NULL;
		GRegex* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
		GRegex* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
#line 1382 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp0_ = old;
#line 1382 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp1_ = g_regex_escape_string (_tmp0_, -1);
#line 1382 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp2_ = _tmp1_;
#line 1382 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp3_ = g_regex_new (_tmp2_, 0, 0, &_inner_error_);
#line 1382 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp4_ = _tmp3_;
#line 1382 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_g_free0 (_tmp2_);
#line 1382 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		regex = _tmp4_;
#line 1382 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1382 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
			if (_inner_error_->domain == G_REGEX_ERROR) {
#line 1748 "CameraTable.c"
				goto __catch57_g_regex_error;
			}
#line 1382 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 1382 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
			g_clear_error (&_inner_error_);
#line 1382 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
			return NULL;
#line 1757 "CameraTable.c"
		}
#line 1383 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp6_ = regex;
#line 1383 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp7_ = replacement;
#line 1383 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp8_ = g_regex_replace_literal (_tmp6_, self, (gssize) -1, 0, _tmp7_, 0, &_inner_error_);
#line 1383 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp5_ = _tmp8_;
#line 1383 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1383 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
			_g_regex_unref0 (regex);
#line 1383 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
			if (_inner_error_->domain == G_REGEX_ERROR) {
#line 1773 "CameraTable.c"
				goto __catch57_g_regex_error;
			}
#line 1383 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
			_g_regex_unref0 (regex);
#line 1383 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 1383 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
			g_clear_error (&_inner_error_);
#line 1383 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
			return NULL;
#line 1784 "CameraTable.c"
		}
#line 1383 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp9_ = _tmp5_;
#line 1383 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp5_ = NULL;
#line 1383 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		result = _tmp9_;
#line 1383 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_g_free0 (_tmp5_);
#line 1383 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_g_regex_unref0 (regex);
#line 1383 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		return result;
#line 1798 "CameraTable.c"
	}
	goto __finally57;
	__catch57_g_regex_error:
	{
		GError* e = NULL;
#line 1381 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		e = _inner_error_;
#line 1381 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_inner_error_ = NULL;
#line 1385 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		g_assert_not_reached ();
#line 1381 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		_g_error_free0 (e);
#line 1812 "CameraTable.c"
	}
	__finally57:
#line 1381 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1381 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		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 1381 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		g_clear_error (&_inner_error_);
#line 1381 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
		return NULL;
#line 1823 "CameraTable.c"
	}
}


gchar* camera_table_get_port_path (const gchar* port) {
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
#line 209 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (port != NULL, NULL);
#line 211 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp1_ = port;
#line 211 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp2_ = g_str_has_prefix (_tmp1_, "usb:");
#line 211 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (_tmp2_) {
#line 1841 "CameraTable.c"
		const gchar* _tmp3_ = NULL;
		gchar* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
#line 212 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp3_ = port;
#line 212 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp4_ = string_substring (_tmp3_, (glong) 4, (glong) -1);
#line 212 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp5_ = _tmp4_;
#line 212 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp6_ = string_replace (_tmp5_, ",", "/");
#line 212 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp7_ = _tmp6_;
#line 212 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp8_ = g_strdup_printf ("/dev/bus/usb/%s", _tmp7_);
#line 212 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_g_free0 (_tmp0_);
#line 212 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp0_ = _tmp8_;
#line 212 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_g_free0 (_tmp7_);
#line 212 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_g_free0 (_tmp5_);
#line 1868 "CameraTable.c"
	} else {
#line 212 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_g_free0 (_tmp0_);
#line 212 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp0_ = NULL;
#line 1874 "CameraTable.c"
	}
#line 211 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	result = _tmp0_;
#line 211 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return result;
#line 1880 "CameraTable.c"
}


static gchar* camera_table_get_name_for_uuid (CameraTable* self, const gchar* uuid) {
	gchar* result = NULL;
	GVolumeMonitor* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
#line 215 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (IS_CAMERA_TABLE (self), NULL);
#line 215 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (uuid != NULL, NULL);
#line 216 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp0_ = self->priv->volume_monitor;
#line 216 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp1_ = g_volume_monitor_get_volumes (_tmp0_);
#line 1896 "CameraTable.c"
	{
		GList* volume_collection = NULL;
		GList* volume_it = NULL;
#line 216 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		volume_collection = _tmp1_;
#line 216 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		for (volume_it = volume_collection; volume_it != NULL; volume_it = volume_it->next) {
#line 1904 "CameraTable.c"
			GVolume* _tmp2_ = NULL;
			GVolume* volume = NULL;
#line 216 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp2_ = _g_object_ref0 ((GVolume*) volume_it->data);
#line 216 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			volume = _tmp2_;
#line 1911 "CameraTable.c"
			{
				GVolume* _tmp3_ = NULL;
				gchar* _tmp4_ = NULL;
				gchar* _tmp5_ = NULL;
				const gchar* _tmp6_ = NULL;
				gboolean _tmp7_ = FALSE;
#line 217 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp3_ = volume;
#line 217 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp4_ = g_volume_get_identifier (_tmp3_, G_VOLUME_IDENTIFIER_KIND_UUID);
#line 217 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp5_ = _tmp4_;
#line 217 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp6_ = uuid;
#line 217 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp7_ = g_strcmp0 (_tmp5_, _tmp6_) == 0;
#line 217 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (_tmp5_);
#line 217 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (_tmp7_) {
#line 1932 "CameraTable.c"
					GVolume* _tmp8_ = NULL;
					gchar* _tmp9_ = NULL;
#line 218 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp8_ = volume;
#line 218 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp9_ = g_volume_get_name (_tmp8_);
#line 218 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					result = _tmp9_;
#line 218 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (volume);
#line 218 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					__g_list_free__g_object_unref0_0 (volume_collection);
#line 218 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					return result;
#line 1947 "CameraTable.c"
				}
#line 216 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_object_unref0 (volume);
#line 1951 "CameraTable.c"
			}
		}
#line 216 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		__g_list_free__g_object_unref0_0 (volume_collection);
#line 1956 "CameraTable.c"
	}
#line 221 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	result = NULL;
#line 221 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return result;
#line 1962 "CameraTable.c"
}


static gchar* camera_table_get_icon_for_uuid (CameraTable* self, const gchar* uuid) {
	gchar* result = NULL;
	GVolumeMonitor* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
#line 224 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (IS_CAMERA_TABLE (self), NULL);
#line 224 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (uuid != NULL, NULL);
#line 225 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp0_ = self->priv->volume_monitor;
#line 225 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp1_ = g_volume_monitor_get_volumes (_tmp0_);
#line 1978 "CameraTable.c"
	{
		GList* volume_collection = NULL;
		GList* volume_it = NULL;
#line 225 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		volume_collection = _tmp1_;
#line 225 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		for (volume_it = volume_collection; volume_it != NULL; volume_it = volume_it->next) {
#line 1986 "CameraTable.c"
			GVolume* _tmp2_ = NULL;
			GVolume* volume = NULL;
#line 225 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp2_ = _g_object_ref0 ((GVolume*) volume_it->data);
#line 225 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			volume = _tmp2_;
#line 1993 "CameraTable.c"
			{
				GVolume* _tmp3_ = NULL;
				gchar* _tmp4_ = NULL;
				gchar* _tmp5_ = NULL;
				const gchar* _tmp6_ = NULL;
				gboolean _tmp7_ = FALSE;
#line 226 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp3_ = volume;
#line 226 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp4_ = g_volume_get_identifier (_tmp3_, G_VOLUME_IDENTIFIER_KIND_UUID);
#line 226 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp5_ = _tmp4_;
#line 226 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp6_ = uuid;
#line 226 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp7_ = g_strcmp0 (_tmp5_, _tmp6_) == 0;
#line 226 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (_tmp5_);
#line 226 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (_tmp7_) {
#line 2014 "CameraTable.c"
					GVolume* _tmp8_ = NULL;
					GIcon* _tmp9_ = NULL;
					GIcon* _tmp10_ = NULL;
					gchar* _tmp11_ = NULL;
					gchar* _tmp12_ = NULL;
#line 227 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp8_ = volume;
#line 227 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp9_ = g_volume_get_icon (_tmp8_);
#line 227 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp10_ = _tmp9_;
#line 227 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp11_ = g_icon_to_string (_tmp10_);
#line 227 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp12_ = _tmp11_;
#line 227 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (_tmp10_);
#line 227 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					result = _tmp12_;
#line 227 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (volume);
#line 227 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					__g_list_free__g_object_unref0_0 (volume_collection);
#line 227 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					return result;
#line 2040 "CameraTable.c"
				}
#line 225 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_object_unref0 (volume);
#line 2044 "CameraTable.c"
			}
		}
#line 225 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		__g_list_free__g_object_unref0_0 (volume_collection);
#line 2049 "CameraTable.c"
	}
#line 230 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	result = NULL;
#line 230 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return result;
#line 2055 "CameraTable.c"
}


static gpointer _discovered_camera_ref0 (gpointer self) {
#line 292 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return self ? discovered_camera_ref (self) : NULL;
#line 2062 "CameraTable.c"
}


static void _vala_array_add142 (DiscoveredCamera*** array, int* length, int* size, DiscoveredCamera* value) {
#line 292 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if ((*length) == (*size)) {
#line 292 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 292 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		*array = g_renew (DiscoveredCamera*, *array, (*size) + 1);
#line 2073 "CameraTable.c"
	}
#line 292 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	(*array)[(*length)++] = value;
#line 292 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	(*array)[*length] = NULL;
#line 2079 "CameraTable.c"
}


static void camera_table_update_camera_table (CameraTable* self, GError** error) {
	GPPortInfoList* port_info_list = NULL;
	GPPortInfoList* _tmp0_ = NULL;
	int _tmp1_ = 0;
	GPPortInfoList* _tmp2_ = NULL;
	int _tmp3_ = 0;
	CameraList* camera_list = NULL;
	CameraList* _tmp4_ = NULL;
	int _tmp5_ = 0;
	CameraAbilitiesList* _tmp6_ = NULL;
	GPPortInfoList* _tmp7_ = NULL;
	CameraList* _tmp8_ = NULL;
	GPContext* _tmp9_ = NULL;
	int _tmp10_ = 0;
	GeeHashMap* detected_map = NULL;
	GeeHashMap* _tmp11_ = NULL;
	gchar** usb_cameras = NULL;
	gint _tmp12_ = 0;
	gchar** _tmp13_ = NULL;
	gint usb_cameras_length1 = 0;
	gint _usb_cameras_size_ = 0;
	DiscoveredCamera** missing = NULL;
	DiscoveredCamera** _tmp47_ = NULL;
	gint missing_length1 = 0;
	gint _missing_size_ = 0;
	DiscoveredCamera** _tmp80_ = NULL;
	gint _tmp80__length1 = 0;
	GError * _inner_error_ = NULL;
#line 233 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_if_fail (IS_CAMERA_TABLE (self));
#line 236 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp1_ = gp_port_info_list_new (&_tmp0_);
#line 236 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_gp_port_info_list_free0 (port_info_list);
#line 236 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	port_info_list = _tmp0_;
#line 236 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	camera_table_do_op (self, _tmp1_, "create port list", &_inner_error_);
#line 236 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 236 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		if (_inner_error_->domain == GPHOTO_ERROR) {
#line 236 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_propagate_error (error, _inner_error_);
#line 236 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_gp_port_info_list_free0 (port_info_list);
#line 236 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return;
#line 2131 "CameraTable.c"
		} else {
#line 236 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_gp_port_info_list_free0 (port_info_list);
#line 236 "/home/jens/Source/shotwell/src/camera/CameraTable.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 236 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_clear_error (&_inner_error_);
#line 236 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return;
#line 2141 "CameraTable.c"
		}
	}
#line 237 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp2_ = port_info_list;
#line 237 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp3_ = gp_port_info_list_load (_tmp2_);
#line 237 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	camera_table_do_op (self, _tmp3_, "load port list", &_inner_error_);
#line 237 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 237 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		if (_inner_error_->domain == GPHOTO_ERROR) {
#line 237 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_propagate_error (error, _inner_error_);
#line 237 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_gp_port_info_list_free0 (port_info_list);
#line 237 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return;
#line 2160 "CameraTable.c"
		} else {
#line 237 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_gp_port_info_list_free0 (port_info_list);
#line 237 "/home/jens/Source/shotwell/src/camera/CameraTable.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 237 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_clear_error (&_inner_error_);
#line 237 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return;
#line 2170 "CameraTable.c"
		}
	}
#line 240 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp5_ = gp_list_new (&_tmp4_);
#line 240 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_gp_list_unref0 (camera_list);
#line 240 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	camera_list = _tmp4_;
#line 240 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	camera_table_do_op (self, _tmp5_, "create camera list", &_inner_error_);
#line 240 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 240 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		if (_inner_error_->domain == GPHOTO_ERROR) {
#line 240 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_propagate_error (error, _inner_error_);
#line 240 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_gp_list_unref0 (camera_list);
#line 240 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_gp_port_info_list_free0 (port_info_list);
#line 240 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return;
#line 2193 "CameraTable.c"
		} else {
#line 240 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_gp_list_unref0 (camera_list);
#line 240 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_gp_port_info_list_free0 (port_info_list);
#line 240 "/home/jens/Source/shotwell/src/camera/CameraTable.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 240 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_clear_error (&_inner_error_);
#line 240 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return;
#line 2205 "CameraTable.c"
		}
	}
#line 241 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp6_ = self->priv->abilities_list;
#line 241 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp7_ = port_info_list;
#line 241 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp8_ = camera_list;
#line 241 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp9_ = self->priv->null_context;
#line 241 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp10_ = gp_abilities_list_detect (_tmp6_, _tmp7_, _tmp8_, _tmp9_);
#line 241 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	camera_table_do_op (self, _tmp10_, "detect cameras", &_inner_error_);
#line 241 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 241 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		if (_inner_error_->domain == GPHOTO_ERROR) {
#line 241 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_propagate_error (error, _inner_error_);
#line 241 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_gp_list_unref0 (camera_list);
#line 241 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_gp_port_info_list_free0 (port_info_list);
#line 241 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return;
#line 2232 "CameraTable.c"
		} else {
#line 241 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_gp_list_unref0 (camera_list);
#line 241 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_gp_port_info_list_free0 (port_info_list);
#line 241 "/home/jens/Source/shotwell/src/camera/CameraTable.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 241 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_clear_error (&_inner_error_);
#line 241 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return;
#line 2244 "CameraTable.c"
		}
	}
#line 243 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp11_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 243 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	detected_map = _tmp11_;
#line 246 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp13_ = camera_table_get_all_usb_cameras (self, &_tmp12_);
#line 246 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	usb_cameras = _tmp13_;
#line 246 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	usb_cameras_length1 = _tmp12_;
#line 246 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_usb_cameras_size_ = usb_cameras_length1;
#line 2259 "CameraTable.c"
	{
		gint ctr = 0;
#line 249 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		ctr = 0;
#line 2264 "CameraTable.c"
		{
			gboolean _tmp14_ = FALSE;
#line 249 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp14_ = TRUE;
#line 249 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			while (TRUE) {
#line 2271 "CameraTable.c"
				gint _tmp16_ = 0;
				CameraList* _tmp17_ = NULL;
				gint _tmp18_ = 0;
				gchar* name = NULL;
				CameraList* _tmp19_ = NULL;
				gint _tmp20_ = 0;
				const gchar* _tmp21_ = NULL;
				int _tmp22_ = 0;
				gchar* _tmp23_ = NULL;
				gchar* port = NULL;
				CameraList* _tmp24_ = NULL;
				gint _tmp25_ = 0;
				const gchar* _tmp26_ = NULL;
				int _tmp27_ = 0;
				gchar* _tmp28_ = NULL;
				gint _tmp29_ = 0;
				CameraList* _tmp30_ = NULL;
				gint _tmp31_ = 0;
				const gchar* _tmp32_ = NULL;
				const gchar* _tmp33_ = NULL;
				const gchar* _tmp34_ = NULL;
				gboolean _tmp35_ = FALSE;
				GeeHashMap* _tmp44_ = NULL;
				const gchar* _tmp45_ = NULL;
				const gchar* _tmp46_ = NULL;
#line 249 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (!_tmp14_) {
#line 2299 "CameraTable.c"
					gint _tmp15_ = 0;
#line 249 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp15_ = ctr;
#line 249 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					ctr = _tmp15_ + 1;
#line 2305 "CameraTable.c"
				}
#line 249 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp14_ = FALSE;
#line 249 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp16_ = ctr;
#line 249 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp17_ = camera_list;
#line 249 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp18_ = gp_list_count (_tmp17_);
#line 249 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (!(_tmp16_ < _tmp18_)) {
#line 249 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					break;
#line 2319 "CameraTable.c"
				}
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp19_ = camera_list;
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp20_ = ctr;
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp22_ = gp_list_get_name (_tmp19_, _tmp20_, &_tmp21_);
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (name);
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp23_ = g_strdup (_tmp21_);
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				name = _tmp23_;
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				camera_table_do_op (self, _tmp22_, "get detected camera name", &_inner_error_);
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					if (_inner_error_->domain == GPHOTO_ERROR) {
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						g_propagate_error (error, _inner_error_);
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (name);
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_object_unref0 (detected_map);
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_list_unref0 (camera_list);
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_port_info_list_free0 (port_info_list);
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						return;
#line 2353 "CameraTable.c"
					} else {
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (name);
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_object_unref0 (detected_map);
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_list_unref0 (camera_list);
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_port_info_list_free0 (port_info_list);
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.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 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						g_clear_error (&_inner_error_);
#line 251 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						return;
#line 2371 "CameraTable.c"
					}
				}
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp24_ = camera_list;
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp25_ = ctr;
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp27_ = gp_list_get_value (_tmp24_, _tmp25_, &_tmp26_);
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (port);
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp28_ = g_strdup (_tmp26_);
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				port = _tmp28_;
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				camera_table_do_op (self, _tmp27_, "get detected camera port", &_inner_error_);
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					if (_inner_error_->domain == GPHOTO_ERROR) {
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						g_propagate_error (error, _inner_error_);
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (port);
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (name);
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_object_unref0 (detected_map);
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_list_unref0 (camera_list);
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_port_info_list_free0 (port_info_list);
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						return;
#line 2408 "CameraTable.c"
					} else {
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (port);
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (name);
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_object_unref0 (detected_map);
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_list_unref0 (camera_list);
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_port_info_list_free0 (port_info_list);
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.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 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						g_clear_error (&_inner_error_);
#line 254 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						return;
#line 2428 "CameraTable.c"
					}
				}
#line 256 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp29_ = ctr;
#line 256 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp30_ = camera_list;
#line 256 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp31_ = gp_list_count (_tmp30_);
#line 256 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp32_ = name;
#line 256 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp33_ = port;
#line 256 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				g_debug ("CameraTable.vala:256: Detected %d/%d %s @ %s", _tmp29_ + 1, _tmp31_, _tmp32_, _tmp33_);
#line 259 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp34_ = port;
#line 259 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp35_ = g_str_has_prefix (_tmp34_, "usb:");
#line 259 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (_tmp35_) {
#line 2449 "CameraTable.c"
					gchar* full_port = NULL;
					CameraList* _tmp36_ = NULL;
					gint _tmp37_ = 0;
					gchar** _tmp38_ = NULL;
					gint _tmp38__length1 = 0;
					const gchar* _tmp39_ = NULL;
					gchar* _tmp40_ = NULL;
					gboolean _tmp41_ = FALSE;
					const gchar* _tmp42_ = NULL;
					gchar* _tmp43_ = NULL;
#line 261 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp36_ = camera_list;
#line 261 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp37_ = gp_list_count (_tmp36_);
#line 261 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp38_ = usb_cameras;
#line 261 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp38__length1 = usb_cameras_length1;
#line 261 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp39_ = port;
#line 261 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp41_ = camera_table_usb_esp (self, _tmp37_, _tmp38_, _tmp38__length1, _tmp39_, &_tmp40_);
#line 261 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (full_port);
#line 261 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					full_port = _tmp40_;
#line 261 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					if (!_tmp41_) {
#line 262 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (full_port);
#line 262 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (port);
#line 262 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (name);
#line 262 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						continue;
#line 2486 "CameraTable.c"
					}
#line 264 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp42_ = full_port;
#line 264 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp43_ = g_strdup (_tmp42_);
#line 264 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (port);
#line 264 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					port = _tmp43_;
#line 259 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (full_port);
#line 2498 "CameraTable.c"
				}
#line 267 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp44_ = detected_map;
#line 267 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp45_ = port;
#line 267 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp46_ = name;
#line 267 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp45_, _tmp46_);
#line 249 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (port);
#line 249 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (name);
#line 2512 "CameraTable.c"
			}
		}
	}
#line 271 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp47_ = g_new0 (DiscoveredCamera*, 0 + 1);
#line 271 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	missing = _tmp47_;
#line 271 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	missing_length1 = 0;
#line 271 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_missing_size_ = missing_length1;
#line 2524 "CameraTable.c"
	{
		GeeIterator* _camera_it = NULL;
		GeeHashMap* _tmp48_ = NULL;
		GeeCollection* _tmp49_ = NULL;
		GeeCollection* _tmp50_ = NULL;
		GeeCollection* _tmp51_ = NULL;
		GeeIterator* _tmp52_ = NULL;
		GeeIterator* _tmp53_ = NULL;
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp48_ = self->priv->camera_map;
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp49_ = gee_abstract_map_get_values (G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, GEE_TYPE_MAP, GeeMap));
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp50_ = _tmp49_;
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp51_ = _tmp50_;
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp52_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, GEE_TYPE_ITERABLE, GeeIterable));
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp53_ = _tmp52_;
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_g_object_unref0 (_tmp51_);
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_camera_it = _tmp53_;
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		while (TRUE) {
#line 2551 "CameraTable.c"
			GeeIterator* _tmp54_ = NULL;
			gboolean _tmp55_ = FALSE;
			DiscoveredCamera* camera = NULL;
			GeeIterator* _tmp56_ = NULL;
			gpointer _tmp57_ = NULL;
			GPPortInfo port_info = {0};
			gchar* tmp_path = NULL;
			DiscoveredCamera* _tmp58_ = NULL;
			Camera* _tmp59_ = NULL;
			GPPortInfo _tmp60_ = {0};
			int _tmp61_ = 0;
			const gchar* _tmp62_ = NULL;
			gchar* _tmp63_ = NULL;
			CameraAbilities abilities = {0};
			DiscoveredCamera* _tmp64_ = NULL;
			Camera* _tmp65_ = NULL;
			CameraAbilities _tmp66_ = {0};
			int _tmp67_ = 0;
			GeeHashMap* _tmp68_ = NULL;
			const gchar* _tmp69_ = NULL;
			gboolean _tmp70_ = FALSE;
			CameraAbilities _tmp74_ = {0};
			const gchar* _tmp75_ = NULL;
			const gchar* _tmp76_ = NULL;
			DiscoveredCamera** _tmp77_ = NULL;
			gint _tmp77__length1 = 0;
			DiscoveredCamera* _tmp78_ = NULL;
			DiscoveredCamera* _tmp79_ = NULL;
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp54_ = _camera_it;
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp55_ = gee_iterator_next (_tmp54_);
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			if (!_tmp55_) {
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				break;
#line 2588 "CameraTable.c"
			}
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp56_ = _camera_it;
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp57_ = gee_iterator_get (_tmp56_);
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			camera = (DiscoveredCamera*) _tmp57_;
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp58_ = camera;
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp59_ = _tmp58_->gcamera;
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp61_ = gp_camera_get_port_info (_tmp59_, &_tmp60_);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			 (port_info);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			port_info = _tmp60_;
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			camera_table_do_op (self, _tmp61_, "retrieve missing camera port information", &_inner_error_);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (_inner_error_->domain == GPHOTO_ERROR) {
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					g_propagate_error (error, _inner_error_);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (tmp_path);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (port_info);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_discovered_camera_unref0 (camera);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (_camera_it);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (detected_map);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_list_unref0 (camera_list);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_port_info_list_free0 (port_info_list);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					return;
#line 2634 "CameraTable.c"
				} else {
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (tmp_path);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (port_info);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_discovered_camera_unref0 (camera);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (_camera_it);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (detected_map);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_list_unref0 (camera_list);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_port_info_list_free0 (port_info_list);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.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 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					g_clear_error (&_inner_error_);
#line 276 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					return;
#line 2660 "CameraTable.c"
				}
			}
#line 279 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			gp_port_info_get_path (port_info, &_tmp62_);
#line 279 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_g_free0 (tmp_path);
#line 279 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp63_ = g_strdup (_tmp62_);
#line 279 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			tmp_path = _tmp63_;
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp64_ = camera;
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp65_ = _tmp64_->gcamera;
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp67_ = gp_camera_get_abilities (_tmp65_, &_tmp66_);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			 (abilities);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			abilities = _tmp66_;
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			camera_table_do_op (self, _tmp67_, "retrieve camera abilities", &_inner_error_);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (_inner_error_->domain == GPHOTO_ERROR) {
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					g_propagate_error (error, _inner_error_);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (abilities);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (tmp_path);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (port_info);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_discovered_camera_unref0 (camera);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (_camera_it);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (detected_map);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_list_unref0 (camera_list);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_port_info_list_free0 (port_info_list);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					return;
#line 2711 "CameraTable.c"
				} else {
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (abilities);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (tmp_path);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (port_info);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_discovered_camera_unref0 (camera);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (_camera_it);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (detected_map);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_list_unref0 (camera_list);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_port_info_list_free0 (port_info_list);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.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 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					g_clear_error (&_inner_error_);
#line 282 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					return;
#line 2739 "CameraTable.c"
				}
			}
#line 284 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp68_ = detected_map;
#line 284 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp69_ = tmp_path;
#line 284 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp70_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp68_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp69_);
#line 284 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			if (_tmp70_) {
#line 2750 "CameraTable.c"
				CameraAbilities _tmp71_ = {0};
				const gchar* _tmp72_ = NULL;
				const gchar* _tmp73_ = NULL;
#line 285 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp71_ = abilities;
#line 285 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp72_ = _tmp71_.model;
#line 285 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp73_ = tmp_path;
#line 285 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				g_debug ("CameraTable.vala:285: Found camera for %s @ %s in detected map", _tmp72_, _tmp73_);
#line 287 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				 (abilities);
#line 287 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (tmp_path);
#line 287 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				 (port_info);
#line 287 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_discovered_camera_unref0 (camera);
#line 287 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				continue;
#line 2772 "CameraTable.c"
			}
#line 290 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp74_ = abilities;
#line 290 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp75_ = _tmp74_.model;
#line 290 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp76_ = tmp_path;
#line 290 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_debug ("CameraTable.vala:290: %s @ %s missing", _tmp75_, _tmp76_);
#line 292 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp77_ = missing;
#line 292 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp77__length1 = missing_length1;
#line 292 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp78_ = camera;
#line 292 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp79_ = _discovered_camera_ref0 (_tmp78_);
#line 292 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_vala_array_add142 (&missing, &missing_length1, &_missing_size_, _tmp79_);
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			 (abilities);
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_g_free0 (tmp_path);
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			 (port_info);
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_discovered_camera_unref0 (camera);
#line 2800 "CameraTable.c"
		}
#line 272 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_g_object_unref0 (_camera_it);
#line 2804 "CameraTable.c"
	}
#line 296 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp80_ = missing;
#line 296 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp80__length1 = missing_length1;
#line 2810 "CameraTable.c"
	{
		DiscoveredCamera** camera_collection = NULL;
		gint camera_collection_length1 = 0;
		gint _camera_collection_size_ = 0;
		gint camera_it = 0;
#line 296 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		camera_collection = _tmp80_;
#line 296 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		camera_collection_length1 = _tmp80__length1;
#line 296 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		for (camera_it = 0; camera_it < _tmp80__length1; camera_it = camera_it + 1) {
#line 2822 "CameraTable.c"
			DiscoveredCamera* _tmp81_ = NULL;
			DiscoveredCamera* camera = NULL;
#line 296 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp81_ = _discovered_camera_ref0 (camera_collection[camera_it]);
#line 296 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			camera = _tmp81_;
#line 2829 "CameraTable.c"
			{
				GPPortInfo port_info = {0};
				gchar* tmp_path = NULL;
				DiscoveredCamera* _tmp82_ = NULL;
				Camera* _tmp83_ = NULL;
				GPPortInfo _tmp84_ = {0};
				int _tmp85_ = 0;
				const gchar* _tmp86_ = NULL;
				gchar* _tmp87_ = NULL;
				CameraAbilities abilities = {0};
				DiscoveredCamera* _tmp88_ = NULL;
				Camera* _tmp89_ = NULL;
				CameraAbilities _tmp90_ = {0};
				int _tmp91_ = 0;
				CameraAbilities _tmp92_ = {0};
				const gchar* _tmp93_ = NULL;
				const gchar* _tmp94_ = NULL;
				GeeHashMap* _tmp95_ = NULL;
				const gchar* _tmp96_ = NULL;
				gchar* _tmp97_ = NULL;
				gchar* _tmp98_ = NULL;
				DiscoveredCamera* _tmp99_ = NULL;
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp82_ = camera;
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp83_ = _tmp82_->gcamera;
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp85_ = gp_camera_get_port_info (_tmp83_, &_tmp84_);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				 (port_info);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				port_info = _tmp84_;
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				camera_table_do_op (self, _tmp85_, "retrieve missing camera port information", &_inner_error_);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					if (_inner_error_->domain == GPHOTO_ERROR) {
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						g_propagate_error (error, _inner_error_);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (tmp_path);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						 (port_info);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_discovered_camera_unref0 (camera);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_object_unref0 (detected_map);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_list_unref0 (camera_list);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_port_info_list_free0 (port_info_list);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						return;
#line 2888 "CameraTable.c"
					} else {
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (tmp_path);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						 (port_info);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_discovered_camera_unref0 (camera);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_object_unref0 (detected_map);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_list_unref0 (camera_list);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_port_info_list_free0 (port_info_list);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.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 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						g_clear_error (&_inner_error_);
#line 300 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						return;
#line 2912 "CameraTable.c"
					}
				}
#line 302 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				gp_port_info_get_path (port_info, &_tmp86_);
#line 302 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (tmp_path);
#line 302 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp87_ = g_strdup (_tmp86_);
#line 302 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				tmp_path = _tmp87_;
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp88_ = camera;
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp89_ = _tmp88_->gcamera;
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp91_ = gp_camera_get_abilities (_tmp89_, &_tmp90_);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				 (abilities);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				abilities = _tmp90_;
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				camera_table_do_op (self, _tmp91_, "retrieve missing camera abilities", &_inner_error_);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					if (_inner_error_->domain == GPHOTO_ERROR) {
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						g_propagate_error (error, _inner_error_);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						 (abilities);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (tmp_path);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						 (port_info);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_discovered_camera_unref0 (camera);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_object_unref0 (detected_map);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_list_unref0 (camera_list);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_port_info_list_free0 (port_info_list);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						return;
#line 2961 "CameraTable.c"
					} else {
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						 (abilities);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (tmp_path);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						 (port_info);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_discovered_camera_unref0 (camera);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_object_unref0 (detected_map);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_list_unref0 (camera_list);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_port_info_list_free0 (port_info_list);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.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 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						g_clear_error (&_inner_error_);
#line 305 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						return;
#line 2987 "CameraTable.c"
					}
				}
#line 307 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp92_ = abilities;
#line 307 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp93_ = _tmp92_.model;
#line 307 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp94_ = tmp_path;
#line 307 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				g_debug ("CameraTable.vala:307: Removing from camera table: %s @ %s", _tmp93_, _tmp94_);
#line 309 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp95_ = self->priv->camera_map;
#line 309 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp96_ = tmp_path;
#line 309 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp97_ = camera_table_get_port_uri (_tmp96_);
#line 309 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp98_ = _tmp97_;
#line 309 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp95_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp98_, NULL);
#line 309 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (_tmp98_);
#line 311 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp99_ = camera;
#line 311 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				g_signal_emit_by_name (self, "camera-removed", _tmp99_);
#line 296 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				 (abilities);
#line 296 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (tmp_path);
#line 296 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				 (port_info);
#line 296 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_discovered_camera_unref0 (camera);
#line 3022 "CameraTable.c"
			}
		}
	}
	{
		GeeIterator* _port_it = NULL;
		GeeHashMap* _tmp100_ = NULL;
		GeeSet* _tmp101_ = NULL;
		GeeSet* _tmp102_ = NULL;
		GeeSet* _tmp103_ = NULL;
		GeeIterator* _tmp104_ = NULL;
		GeeIterator* _tmp105_ = NULL;
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp100_ = detected_map;
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp101_ = gee_abstract_map_get_keys (G_TYPE_CHECK_INSTANCE_CAST (_tmp100_, GEE_TYPE_MAP, GeeMap));
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp102_ = _tmp101_;
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp103_ = _tmp102_;
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp104_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp103_, GEE_TYPE_ITERABLE, GeeIterable));
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp105_ = _tmp104_;
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_g_object_unref0 (_tmp103_);
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_port_it = _tmp105_;
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		while (TRUE) {
#line 3052 "CameraTable.c"
			GeeIterator* _tmp106_ = NULL;
			gboolean _tmp107_ = FALSE;
			gchar* port = NULL;
			GeeIterator* _tmp108_ = NULL;
			gpointer _tmp109_ = NULL;
			gchar* name = NULL;
			GeeHashMap* _tmp110_ = NULL;
			const gchar* _tmp111_ = NULL;
			gpointer _tmp112_ = NULL;
			gchar* display_name = NULL;
			gchar* icon = NULL;
			gchar* uri = NULL;
			const gchar* _tmp113_ = NULL;
			gchar* _tmp114_ = NULL;
			GeeHashMap* _tmp115_ = NULL;
			const gchar* _tmp116_ = NULL;
			gboolean _tmp117_ = FALSE;
			gchar* path = NULL;
			const gchar* _tmp120_ = NULL;
			gchar* _tmp121_ = NULL;
			const gchar* _tmp122_ = NULL;
			const gchar* _tmp142_ = NULL;
			gint index = 0;
			GPPortInfoList* _tmp145_ = NULL;
			const gchar* _tmp146_ = NULL;
			gint _tmp147_ = 0;
			gint _tmp148_ = 0;
			GPPortInfo port_info = {0};
			gchar* tmp_path = NULL;
			GPPortInfoList* _tmp153_ = NULL;
			gint _tmp154_ = 0;
			GPPortInfo _tmp155_ = {0};
			int _tmp156_ = 0;
			const gchar* _tmp157_ = NULL;
			gchar* _tmp158_ = NULL;
			gchar* _tmp159_ = NULL;
			const gchar* _tmp160_ = NULL;
			gchar* _tmp161_ = NULL;
			const gchar* _tmp162_ = NULL;
			const gchar* _tmp163_ = NULL;
			CameraAbilitiesList* _tmp164_ = NULL;
			const gchar* _tmp165_ = NULL;
			gint _tmp166_ = 0;
			gint _tmp167_ = 0;
			CameraAbilities camera_abilities = {0};
			CameraAbilitiesList* _tmp172_ = NULL;
			gint _tmp173_ = 0;
			CameraAbilities _tmp174_ = {0};
			int _tmp175_ = 0;
			const gchar* _tmp176_ = NULL;
			gchar* _tmp177_ = NULL;
			gchar* _tmp178_ = NULL;
			Camera* gcamera = NULL;
			Camera* _tmp179_ = NULL;
			int _tmp180_ = 0;
			const gchar* _tmp181_ = NULL;
			gchar* _tmp182_ = NULL;
			gchar* _tmp183_ = NULL;
			Camera* _tmp184_ = NULL;
			CameraAbilities _tmp185_ = {0};
			int _tmp186_ = 0;
			const gchar* _tmp187_ = NULL;
			gchar* _tmp188_ = NULL;
			gchar* _tmp189_ = NULL;
			Camera* _tmp190_ = NULL;
			GPPortInfo _tmp191_ = {0};
			int _tmp192_ = 0;
			const gchar* _tmp193_ = NULL;
			const gchar* _tmp194_ = NULL;
			gchar* _tmp195_ = NULL;
			gchar* _tmp196_ = NULL;
			const gchar* _tmp197_ = NULL;
			const gchar* _tmp198_ = NULL;
			DiscoveredCamera* camera = NULL;
			Camera* _tmp199_ = NULL;
			const gchar* _tmp200_ = NULL;
			const gchar* _tmp201_ = NULL;
			const gchar* _tmp202_ = NULL;
			DiscoveredCamera* _tmp203_ = NULL;
			GeeHashMap* _tmp204_ = NULL;
			const gchar* _tmp205_ = NULL;
			DiscoveredCamera* _tmp206_ = NULL;
			DiscoveredCamera* _tmp207_ = NULL;
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp106_ = _port_it;
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp107_ = gee_iterator_next (_tmp106_);
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			if (!_tmp107_) {
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				break;
#line 3144 "CameraTable.c"
			}
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp108_ = _port_it;
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp109_ = gee_iterator_get (_tmp108_);
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			port = (gchar*) _tmp109_;
#line 316 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp110_ = detected_map;
#line 316 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp111_ = port;
#line 316 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp112_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp110_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp111_);
#line 316 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			name = (gchar*) _tmp112_;
#line 317 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			display_name = NULL;
#line 318 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			icon = NULL;
#line 319 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp113_ = port;
#line 319 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp114_ = camera_table_get_port_uri (_tmp113_);
#line 319 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			uri = _tmp114_;
#line 321 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp115_ = self->priv->camera_map;
#line 321 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp116_ = uri;
#line 321 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp117_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp115_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp116_);
#line 321 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			if (_tmp117_) {
#line 3178 "CameraTable.c"
				const gchar* _tmp118_ = NULL;
				const gchar* _tmp119_ = NULL;
#line 323 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp118_ = name;
#line 323 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp119_ = port;
#line 323 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				g_debug ("CameraTable.vala:323: %s @ %s already registered, skipping", _tmp118_, _tmp119_);
#line 325 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (uri);
#line 325 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (icon);
#line 325 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (display_name);
#line 325 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (name);
#line 325 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (port);
#line 325 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				continue;
#line 3199 "CameraTable.c"
			}
#line 329 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp120_ = port;
#line 329 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp121_ = camera_table_get_port_path (_tmp120_);
#line 329 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			path = _tmp121_;
#line 330 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp122_ = path;
#line 330 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			if (NULL != _tmp122_) {
#line 3211 "CameraTable.c"
				GUdevDevice* device = NULL;
				GUdevClient* _tmp123_ = NULL;
				const gchar* _tmp124_ = NULL;
				GUdevDevice* _tmp125_ = NULL;
				gchar* serial = NULL;
				GUdevDevice* _tmp126_ = NULL;
				const gchar* _tmp127_ = NULL;
				gchar* _tmp128_ = NULL;
				const gchar* _tmp129_ = NULL;
				const gchar* _tmp134_ = NULL;
				const gchar* _tmp138_ = NULL;
#line 331 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp123_ = self->priv->client;
#line 331 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp124_ = path;
#line 331 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp125_ = g_udev_client_query_by_device_file (_tmp123_, _tmp124_);
#line 331 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				device = _tmp125_;
#line 332 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp126_ = device;
#line 332 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp127_ = g_udev_device_get_property (_tmp126_, "ID_SERIAL_SHORT");
#line 332 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp128_ = g_strdup (_tmp127_);
#line 332 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				serial = _tmp128_;
#line 333 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp129_ = serial;
#line 333 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (NULL != _tmp129_) {
#line 3243 "CameraTable.c"
					const gchar* _tmp130_ = NULL;
					gchar* _tmp131_ = NULL;
					const gchar* _tmp132_ = NULL;
					gchar* _tmp133_ = NULL;
#line 335 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp130_ = serial;
#line 335 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp131_ = camera_table_get_name_for_uuid (self, _tmp130_);
#line 335 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (display_name);
#line 335 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					display_name = _tmp131_;
#line 336 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp132_ = serial;
#line 336 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp133_ = camera_table_get_icon_for_uuid (self, _tmp132_);
#line 336 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (icon);
#line 336 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					icon = _tmp133_;
#line 3264 "CameraTable.c"
				}
#line 338 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp134_ = display_name;
#line 338 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (NULL == _tmp134_) {
#line 3270 "CameraTable.c"
					GUdevDevice* _tmp135_ = NULL;
					const gchar* _tmp136_ = NULL;
					gchar* _tmp137_ = NULL;
#line 339 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp135_ = device;
#line 339 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp136_ = g_udev_device_get_sysfs_attr (_tmp135_, "product");
#line 339 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp137_ = g_strdup (_tmp136_);
#line 339 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (display_name);
#line 339 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					display_name = _tmp137_;
#line 3284 "CameraTable.c"
				}
#line 341 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp138_ = display_name;
#line 341 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (NULL == _tmp138_) {
#line 3290 "CameraTable.c"
					GUdevDevice* _tmp139_ = NULL;
					const gchar* _tmp140_ = NULL;
					gchar* _tmp141_ = NULL;
#line 342 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp139_ = device;
#line 342 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp140_ = g_udev_device_get_property (_tmp139_, "ID_MODEL");
#line 342 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_tmp141_ = g_strdup (_tmp140_);
#line 342 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (display_name);
#line 342 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					display_name = _tmp141_;
#line 3304 "CameraTable.c"
				}
#line 330 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (serial);
#line 330 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_object_unref0 (device);
#line 3310 "CameraTable.c"
			}
#line 345 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp142_ = display_name;
#line 345 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			if (NULL == _tmp142_) {
#line 3316 "CameraTable.c"
				const gchar* _tmp143_ = NULL;
				gchar* _tmp144_ = NULL;
#line 347 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp143_ = name;
#line 347 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp144_ = g_strdup (_tmp143_);
#line 347 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (display_name);
#line 347 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				display_name = _tmp144_;
#line 3327 "CameraTable.c"
			}
#line 350 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp145_ = port_info_list;
#line 350 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp146_ = port;
#line 350 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp147_ = gp_port_info_list_lookup_path (_tmp145_, _tmp146_);
#line 350 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			index = _tmp147_;
#line 351 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp148_ = index;
#line 351 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			if (_tmp148_ < 0) {
#line 3341 "CameraTable.c"
				gint _tmp149_ = 0;
				const gchar* _tmp150_ = NULL;
				gchar* _tmp151_ = NULL;
				gchar* _tmp152_ = NULL;
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp149_ = index;
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp150_ = port;
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp151_ = g_strdup_printf ("lookup port %s", _tmp150_);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp152_ = _tmp151_;
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				camera_table_do_op (self, (int) _tmp149_, _tmp152_, &_inner_error_);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (_tmp152_);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					if (_inner_error_->domain == GPHOTO_ERROR) {
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						g_propagate_error (error, _inner_error_);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (path);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (uri);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (icon);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (display_name);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (name);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (port);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_object_unref0 (_port_it);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_object_unref0 (detected_map);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_list_unref0 (camera_list);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_port_info_list_free0 (port_info_list);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						return;
#line 3390 "CameraTable.c"
					} else {
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (path);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (uri);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (icon);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (display_name);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (name);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (port);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_object_unref0 (_port_it);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_object_unref0 (detected_map);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_list_unref0 (camera_list);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_port_info_list_free0 (port_info_list);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.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 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						g_clear_error (&_inner_error_);
#line 352 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						return;
#line 3422 "CameraTable.c"
					}
				}
			}
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp153_ = port_info_list;
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp154_ = index;
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp156_ = gp_port_info_list_get_info (_tmp153_, _tmp154_, &_tmp155_);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			 (port_info);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			port_info = _tmp155_;
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp157_ = port;
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp158_ = g_strdup_printf ("get port info for %s", _tmp157_);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp159_ = _tmp158_;
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			camera_table_do_op (self, _tmp156_, _tmp159_, &_inner_error_);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_g_free0 (_tmp159_);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (_inner_error_->domain == GPHOTO_ERROR) {
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					g_propagate_error (error, _inner_error_);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (tmp_path);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (port_info);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (path);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (uri);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (icon);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (display_name);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (name);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (port);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (_port_it);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (detected_map);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_list_unref0 (camera_list);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_port_info_list_free0 (port_info_list);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					return;
#line 3482 "CameraTable.c"
				} else {
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (tmp_path);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (port_info);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (path);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (uri);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (icon);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (display_name);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (name);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (port);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (_port_it);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (detected_map);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_list_unref0 (camera_list);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_port_info_list_free0 (port_info_list);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.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 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					g_clear_error (&_inner_error_);
#line 357 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					return;
#line 3518 "CameraTable.c"
				}
			}
#line 358 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			gp_port_info_get_path (port_info, &_tmp160_);
#line 358 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_g_free0 (tmp_path);
#line 358 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp161_ = g_strdup (_tmp160_);
#line 358 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			tmp_path = _tmp161_;
#line 361 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp162_ = port;
#line 361 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp163_ = tmp_path;
#line 361 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_vala_assert (g_strcmp0 (_tmp162_, _tmp163_) == 0, "port == tmp_path");
#line 363 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp164_ = self->priv->abilities_list;
#line 363 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp165_ = name;
#line 363 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp166_ = gp_abilities_list_lookup_model (_tmp164_, _tmp165_);
#line 363 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			index = _tmp166_;
#line 364 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp167_ = index;
#line 364 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			if (_tmp167_ < 0) {
#line 3547 "CameraTable.c"
				gint _tmp168_ = 0;
				const gchar* _tmp169_ = NULL;
				gchar* _tmp170_ = NULL;
				gchar* _tmp171_ = NULL;
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp168_ = index;
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp169_ = name;
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp170_ = g_strdup_printf ("lookup camera model %s", _tmp169_);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_tmp171_ = _tmp170_;
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				camera_table_do_op (self, (int) _tmp168_, _tmp171_, &_inner_error_);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				_g_free0 (_tmp171_);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					if (_inner_error_->domain == GPHOTO_ERROR) {
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						g_propagate_error (error, _inner_error_);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (tmp_path);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						 (port_info);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (path);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (uri);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (icon);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (display_name);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (name);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (port);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_object_unref0 (_port_it);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_object_unref0 (detected_map);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_list_unref0 (camera_list);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_port_info_list_free0 (port_info_list);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						return;
#line 3600 "CameraTable.c"
					} else {
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (tmp_path);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						 (port_info);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (path);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (uri);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (icon);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (display_name);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (name);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_free0 (port);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_object_unref0 (_port_it);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_g_object_unref0 (detected_map);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_list_unref0 (camera_list);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						_gp_port_info_list_free0 (port_info_list);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.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 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						g_clear_error (&_inner_error_);
#line 365 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
						return;
#line 3636 "CameraTable.c"
					}
				}
			}
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp172_ = self->priv->abilities_list;
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp173_ = index;
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp175_ = gp_abilities_list_get_abilities (_tmp172_, _tmp173_, &_tmp174_);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			 (camera_abilities);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			camera_abilities = _tmp174_;
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp176_ = name;
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp177_ = g_strdup_printf ("lookup camera abilities for %s", _tmp176_);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp178_ = _tmp177_;
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			camera_table_do_op (self, _tmp175_, _tmp178_, &_inner_error_);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_g_free0 (_tmp178_);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (_inner_error_->domain == GPHOTO_ERROR) {
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					g_propagate_error (error, _inner_error_);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (camera_abilities);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (tmp_path);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (port_info);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (path);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (uri);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (icon);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (display_name);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (name);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (port);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (_port_it);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (detected_map);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_list_unref0 (camera_list);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_port_info_list_free0 (port_info_list);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					return;
#line 3698 "CameraTable.c"
				} else {
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (camera_abilities);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (tmp_path);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (port_info);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (path);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (uri);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (icon);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (display_name);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (name);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (port);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (_port_it);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (detected_map);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_list_unref0 (camera_list);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_port_info_list_free0 (port_info_list);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.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 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					g_clear_error (&_inner_error_);
#line 368 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					return;
#line 3736 "CameraTable.c"
				}
			}
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp180_ = gp_camera_new (&_tmp179_);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_gp_camera_unref0 (gcamera);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			gcamera = _tmp179_;
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp181_ = name;
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp182_ = g_strdup_printf ("create camera object for %s", _tmp181_);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp183_ = _tmp182_;
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			camera_table_do_op (self, _tmp180_, _tmp183_, &_inner_error_);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_g_free0 (_tmp183_);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (_inner_error_->domain == GPHOTO_ERROR) {
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					g_propagate_error (error, _inner_error_);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_camera_unref0 (gcamera);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (camera_abilities);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (tmp_path);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (port_info);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (path);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (uri);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (icon);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (display_name);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (name);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (port);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (_port_it);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (detected_map);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_list_unref0 (camera_list);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_port_info_list_free0 (port_info_list);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					return;
#line 3795 "CameraTable.c"
				} else {
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_camera_unref0 (gcamera);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (camera_abilities);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (tmp_path);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (port_info);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (path);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (uri);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (icon);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (display_name);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (name);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (port);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (_port_it);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (detected_map);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_list_unref0 (camera_list);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_port_info_list_free0 (port_info_list);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.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 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					g_clear_error (&_inner_error_);
#line 372 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					return;
#line 3835 "CameraTable.c"
				}
			}
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp184_ = gcamera;
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp185_ = camera_abilities;
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp186_ = gp_camera_set_abilities (_tmp184_, _tmp185_);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp187_ = name;
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp188_ = g_strdup_printf ("set camera abilities for %s", _tmp187_);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp189_ = _tmp188_;
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			camera_table_do_op (self, _tmp186_, _tmp189_, &_inner_error_);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_g_free0 (_tmp189_);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (_inner_error_->domain == GPHOTO_ERROR) {
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					g_propagate_error (error, _inner_error_);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_camera_unref0 (gcamera);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (camera_abilities);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (tmp_path);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (port_info);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (path);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (uri);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (icon);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (display_name);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (name);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (port);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (_port_it);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (detected_map);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_list_unref0 (camera_list);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_port_info_list_free0 (port_info_list);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					return;
#line 3894 "CameraTable.c"
				} else {
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_camera_unref0 (gcamera);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (camera_abilities);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (tmp_path);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (port_info);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (path);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (uri);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (icon);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (display_name);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (name);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (port);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (_port_it);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (detected_map);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_list_unref0 (camera_list);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_port_info_list_free0 (port_info_list);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.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 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					g_clear_error (&_inner_error_);
#line 373 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					return;
#line 3934 "CameraTable.c"
				}
			}
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp190_ = gcamera;
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp191_ = port_info;
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp192_ = gp_camera_set_port_info (_tmp190_, _tmp191_);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp193_ = name;
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp194_ = port;
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp195_ = g_strdup_printf ("set port info for %s on %s", _tmp193_, _tmp194_);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp196_ = _tmp195_;
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			camera_table_do_op (self, _tmp192_, _tmp196_, &_inner_error_);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_g_free0 (_tmp196_);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
				if (_inner_error_->domain == GPHOTO_ERROR) {
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					g_propagate_error (error, _inner_error_);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_camera_unref0 (gcamera);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (camera_abilities);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (tmp_path);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (port_info);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (path);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (uri);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (icon);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (display_name);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (name);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (port);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (_port_it);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (detected_map);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_list_unref0 (camera_list);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_port_info_list_free0 (port_info_list);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					return;
#line 3995 "CameraTable.c"
				} else {
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_camera_unref0 (gcamera);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (camera_abilities);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (tmp_path);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					 (port_info);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (path);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (uri);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (icon);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (display_name);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (name);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_free0 (port);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (_port_it);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_g_object_unref0 (detected_map);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_list_unref0 (camera_list);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					_gp_port_info_list_free0 (port_info_list);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.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 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					g_clear_error (&_inner_error_);
#line 374 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
					return;
#line 4035 "CameraTable.c"
				}
			}
#line 376 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp197_ = name;
#line 376 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp198_ = port;
#line 376 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_debug ("CameraTable.vala:376: Adding to camera table: %s @ %s", _tmp197_, _tmp198_);
#line 378 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp199_ = gcamera;
#line 378 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp200_ = uri;
#line 378 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp201_ = display_name;
#line 378 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp202_ = icon;
#line 378 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp203_ = discovered_camera_new (_tmp199_, _tmp200_, _tmp201_, _tmp202_);
#line 378 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			camera = _tmp203_;
#line 379 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp204_ = self->priv->camera_map;
#line 379 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp205_ = uri;
#line 379 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp206_ = camera;
#line 379 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp204_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp205_, _tmp206_);
#line 381 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_tmp207_ = camera;
#line 381 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_signal_emit_by_name (self, "camera-added", _tmp207_);
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_discovered_camera_unref0 (camera);
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_gp_camera_unref0 (gcamera);
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			 (camera_abilities);
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_g_free0 (tmp_path);
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			 (port_info);
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_g_free0 (path);
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_g_free0 (uri);
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_g_free0 (icon);
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_g_free0 (display_name);
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_g_free0 (name);
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			_g_free0 (port);
#line 4090 "CameraTable.c"
		}
#line 315 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_g_object_unref0 (_port_it);
#line 4094 "CameraTable.c"
	}
#line 233 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	missing = (_vala_array_free (missing, missing_length1, (GDestroyNotify) discovered_camera_unref), NULL);
#line 233 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	usb_cameras = (_vala_array_free (usb_cameras, usb_cameras_length1, (GDestroyNotify) g_free), NULL);
#line 233 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_g_object_unref0 (detected_map);
#line 233 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_gp_list_unref0 (camera_list);
#line 233 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_gp_port_info_list_free0 (port_info_list);
#line 4106 "CameraTable.c"
}


static void camera_table_on_udev_event (CameraTable* self, const gchar* action, GUdevDevice* device) {
	const gchar* _tmp0_ = NULL;
	GUdevDevice* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	OneShotScheduler* _tmp3_ = NULL;
#line 385 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_if_fail (IS_CAMERA_TABLE (self));
#line 385 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_if_fail (action != NULL);
#line 385 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_if_fail (G_UDEV_IS_DEVICE (device));
#line 386 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp0_ = action;
#line 386 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp1_ = device;
#line 386 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp2_ = g_udev_device_get_name (_tmp1_);
#line 386 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_debug ("CameraTable.vala:386: udev event: %s on %s", _tmp0_, _tmp2_);
#line 390 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp3_ = self->priv->camera_update_scheduler;
#line 390 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	one_shot_scheduler_after_timeout (_tmp3_, (guint) CAMERA_TABLE_UPDATE_DELAY_MSEC, TRUE);
#line 4133 "CameraTable.c"
}


void camera_table_on_volume_changed (CameraTable* self, GVolume* volume) {
	OneShotScheduler* _tmp0_ = NULL;
#line 393 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_if_fail (IS_CAMERA_TABLE (self));
#line 393 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_if_fail (G_IS_VOLUME (volume));
#line 394 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp0_ = self->priv->camera_update_scheduler;
#line 394 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	one_shot_scheduler_after_timeout (_tmp0_, (guint) CAMERA_TABLE_UPDATE_DELAY_MSEC, TRUE);
#line 4147 "CameraTable.c"
}


static void camera_table_on_update_cameras (CameraTable* self) {
	GError * _inner_error_ = NULL;
#line 397 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_if_fail (IS_CAMERA_TABLE (self));
#line 4155 "CameraTable.c"
	{
		CameraTable* _tmp0_ = NULL;
		CameraTable* _tmp1_ = NULL;
#line 399 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp0_ = camera_table_get_instance ();
#line 399 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp1_ = _tmp0_;
#line 399 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		camera_table_update_camera_table (_tmp1_, &_inner_error_);
#line 399 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_camera_table_unref0 (_tmp1_);
#line 399 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 399 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			if (_inner_error_->domain == GPHOTO_ERROR) {
#line 4171 "CameraTable.c"
				goto __catch58_gphoto_error;
			}
#line 399 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 399 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			g_clear_error (&_inner_error_);
#line 399 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return;
#line 4180 "CameraTable.c"
		}
	}
	goto __finally58;
	__catch58_gphoto_error:
	{
		GError* err = NULL;
		GError* _tmp2_ = NULL;
		const gchar* _tmp3_ = NULL;
#line 398 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		err = _inner_error_;
#line 398 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_inner_error_ = NULL;
#line 401 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp2_ = err;
#line 401 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_tmp3_ = _tmp2_->message;
#line 401 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		g_warning ("CameraTable.vala:401: Error updating camera table: %s", _tmp3_);
#line 398 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		_g_error_free0 (err);
#line 4201 "CameraTable.c"
	}
	__finally58:
#line 398 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 398 "/home/jens/Source/shotwell/src/camera/CameraTable.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 398 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		g_clear_error (&_inner_error_);
#line 398 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		return;
#line 4212 "CameraTable.c"
	}
}


static void g_cclosure_user_marshal_VOID__DISCOVERED_CAMERA (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef void (*GMarshalFunc_VOID__DISCOVERED_CAMERA) (gpointer data1, gpointer arg_1, gpointer data2);
	register GMarshalFunc_VOID__DISCOVERED_CAMERA callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_if_fail (n_param_values == 2);
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		data1 = closure->data;
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		data2 = param_values->data[0].v_pointer;
#line 4232 "CameraTable.c"
	} else {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		data1 = param_values->data[0].v_pointer;
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		data2 = closure->data;
#line 4238 "CameraTable.c"
	}
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	callback = (GMarshalFunc_VOID__DISCOVERED_CAMERA) (marshal_data ? marshal_data : cc->callback);
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	callback (data1, value_get_discovered_camera (param_values + 1), data2);
#line 4244 "CameraTable.c"
}


static void value_camera_table_init (GValue* value) {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	value->data[0].v_pointer = NULL;
#line 4251 "CameraTable.c"
}


static void value_camera_table_free_value (GValue* value) {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (value->data[0].v_pointer) {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		camera_table_unref (value->data[0].v_pointer);
#line 4260 "CameraTable.c"
	}
}


static void value_camera_table_copy_value (const GValue* src_value, GValue* dest_value) {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (src_value->data[0].v_pointer) {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		dest_value->data[0].v_pointer = camera_table_ref (src_value->data[0].v_pointer);
#line 4270 "CameraTable.c"
	} else {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		dest_value->data[0].v_pointer = NULL;
#line 4274 "CameraTable.c"
	}
}


static gpointer value_camera_table_peek_pointer (const GValue* value) {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return value->data[0].v_pointer;
#line 4282 "CameraTable.c"
}


static gchar* value_camera_table_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (collect_values[0].v_pointer) {
#line 4289 "CameraTable.c"
		CameraTable* object;
		object = collect_values[0].v_pointer;
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		if (object->parent_instance.g_class == NULL) {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 4296 "CameraTable.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 4300 "CameraTable.c"
		}
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		value->data[0].v_pointer = camera_table_ref (object);
#line 4304 "CameraTable.c"
	} else {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		value->data[0].v_pointer = NULL;
#line 4308 "CameraTable.c"
	}
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return NULL;
#line 4312 "CameraTable.c"
}


static gchar* value_camera_table_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	CameraTable** object_p;
	object_p = collect_values[0].v_pointer;
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (!object_p) {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 4323 "CameraTable.c"
	}
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (!value->data[0].v_pointer) {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		*object_p = NULL;
#line 4329 "CameraTable.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		*object_p = value->data[0].v_pointer;
#line 4333 "CameraTable.c"
	} else {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		*object_p = camera_table_ref (value->data[0].v_pointer);
#line 4337 "CameraTable.c"
	}
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return NULL;
#line 4341 "CameraTable.c"
}


GParamSpec* param_spec_camera_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ParamSpecCameraTable* spec;
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (g_type_is_a (object_type, TYPE_CAMERA_TABLE), NULL);
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return G_PARAM_SPEC (spec);
#line 4355 "CameraTable.c"
}


gpointer value_get_camera_table (const GValue* value) {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_CAMERA_TABLE), NULL);
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return value->data[0].v_pointer;
#line 4364 "CameraTable.c"
}


void value_set_camera_table (GValue* value, gpointer v_object) {
	CameraTable* old;
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_CAMERA_TABLE));
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	old = value->data[0].v_pointer;
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (v_object) {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_CAMERA_TABLE));
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		value->data[0].v_pointer = v_object;
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		camera_table_ref (value->data[0].v_pointer);
#line 4384 "CameraTable.c"
	} else {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		value->data[0].v_pointer = NULL;
#line 4388 "CameraTable.c"
	}
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (old) {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		camera_table_unref (old);
#line 4394 "CameraTable.c"
	}
}


void value_take_camera_table (GValue* value, gpointer v_object) {
	CameraTable* old;
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_CAMERA_TABLE));
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	old = value->data[0].v_pointer;
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (v_object) {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_CAMERA_TABLE));
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		value->data[0].v_pointer = v_object;
#line 4413 "CameraTable.c"
	} else {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		value->data[0].v_pointer = NULL;
#line 4417 "CameraTable.c"
	}
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (old) {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		camera_table_unref (old);
#line 4423 "CameraTable.c"
	}
}


static void camera_table_class_init (CameraTableClass * klass) {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	camera_table_parent_class = g_type_class_peek_parent (klass);
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	((CameraTableClass *) klass)->finalize = camera_table_finalize;
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_type_class_add_private (klass, sizeof (CameraTablePrivate));
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_signal_new ("camera_added", TYPE_CAMERA_TABLE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__DISCOVERED_CAMERA, G_TYPE_NONE, 1, TYPE_DISCOVERED_CAMERA);
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_signal_new ("camera_removed", TYPE_CAMERA_TABLE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__DISCOVERED_CAMERA, G_TYPE_NONE, 1, TYPE_DISCOVERED_CAMERA);
#line 4439 "CameraTable.c"
}


static void camera_table_instance_init (CameraTable * self) {
	GUdevClient* _tmp0_ = NULL;
	GPContext* _tmp1_ = NULL;
	GeeHashMap* _tmp2_ = NULL;
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	self->priv = CAMERA_TABLE_GET_PRIVATE (self);
#line 29 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp0_ = g_udev_client_new (CAMERA_TABLE_SUBSYSTEMS);
#line 29 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	self->priv->client = _tmp0_;
#line 30 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	self->priv->camera_update_scheduler = NULL;
#line 31 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp1_ = gp_context_new ();
#line 31 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	self->priv->null_context = _tmp1_;
#line 35 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_tmp2_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, TYPE_DISCOVERED_CAMERA, (GBoxedCopyFunc) discovered_camera_ref, discovered_camera_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 35 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	self->priv->camera_map = _tmp2_;
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	self->ref_count = 1;
#line 4465 "CameraTable.c"
}


static void camera_table_finalize (CameraTable* obj) {
	CameraTable * self;
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_CAMERA_TABLE, CameraTable);
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_signal_handlers_destroy (self);
#line 29 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_g_object_unref0 (self->priv->client);
#line 30 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_one_shot_scheduler_unref0 (self->priv->camera_update_scheduler);
#line 31 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_gp_context_unref0 (self->priv->null_context);
#line 32 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_gp_abilities_list_free0 (self->priv->abilities_list);
#line 33 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_g_object_unref0 (self->priv->volume_monitor);
#line 35 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	_g_object_unref0 (self->priv->camera_map);
#line 4487 "CameraTable.c"
}


GType camera_table_get_type (void) {
	static volatile gsize camera_table_type_id__volatile = 0;
	if (g_once_init_enter (&camera_table_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { value_camera_table_init, value_camera_table_free_value, value_camera_table_copy_value, value_camera_table_peek_pointer, "p", value_camera_table_collect_value, "p", value_camera_table_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (CameraTableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) camera_table_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CameraTable), 0, (GInstanceInitFunc) camera_table_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType camera_table_type_id;
		camera_table_type_id = g_type_register_fundamental (g_type_fundamental_next (), "CameraTable", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&camera_table_type_id__volatile, camera_table_type_id);
	}
	return camera_table_type_id__volatile;
}


gpointer camera_table_ref (gpointer instance) {
	CameraTable* self;
	self = instance;
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	g_atomic_int_inc (&self->ref_count);
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	return instance;
#line 4512 "CameraTable.c"
}


void camera_table_unref (gpointer instance) {
	CameraTable* self;
	self = instance;
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		CAMERA_TABLE_GET_CLASS (self)->finalize (self);
#line 21 "/home/jens/Source/shotwell/src/camera/CameraTable.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 4525 "CameraTable.c"
	}
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}