diff options
Diffstat (limited to 'src/camera')
-rw-r--r-- | src/camera/Branch.c | 1222 | ||||
-rw-r--r-- | src/camera/Camera.c | 36 | ||||
-rw-r--r-- | src/camera/CameraTable.c | 4549 | ||||
-rw-r--r-- | src/camera/GPhoto.c | 2807 | ||||
-rw-r--r-- | src/camera/ImportPage.c | 13681 | ||||
-rw-r--r-- | src/camera/mk/camera.mk | 32 |
6 files changed, 22295 insertions, 32 deletions
diff --git a/src/camera/Branch.c b/src/camera/Branch.c new file mode 100644 index 0000000..7f2836e --- /dev/null +++ b/src/camera/Branch.c @@ -0,0 +1,1222 @@ +/* Branch.c generated by valac 0.32.1, the Vala compiler + * generated from Branch.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 <gee.h> +#include <stdlib.h> +#include <string.h> +#include <gtk/gtk.h> +#include <glib/gi18n-lib.h> +#include <gdk/gdk.h> +#include <gphoto2/gphoto2-camera.h> +#include <gphoto.h> + + +#define SIDEBAR_TYPE_BRANCH (sidebar_branch_get_type ()) +#define SIDEBAR_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_BRANCH, SidebarBranch)) +#define SIDEBAR_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_BRANCH, SidebarBranchClass)) +#define SIDEBAR_IS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_BRANCH)) +#define SIDEBAR_IS_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_BRANCH)) +#define SIDEBAR_BRANCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_BRANCH, SidebarBranchClass)) + +typedef struct _SidebarBranch SidebarBranch; +typedef struct _SidebarBranchClass SidebarBranchClass; +typedef struct _SidebarBranchPrivate SidebarBranchPrivate; + +#define CAMERA_TYPE_BRANCH (camera_branch_get_type ()) +#define CAMERA_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAMERA_TYPE_BRANCH, CameraBranch)) +#define CAMERA_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CAMERA_TYPE_BRANCH, CameraBranchClass)) +#define CAMERA_IS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAMERA_TYPE_BRANCH)) +#define CAMERA_IS_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CAMERA_TYPE_BRANCH)) +#define CAMERA_BRANCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CAMERA_TYPE_BRANCH, CameraBranchClass)) + +typedef struct _CameraBranch CameraBranch; +typedef struct _CameraBranchClass CameraBranchClass; +typedef struct _CameraBranchPrivate CameraBranchPrivate; + +#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; + +#define SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY (sidebar_simple_page_entry_get_type ()) +#define SIDEBAR_SIMPLE_PAGE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry)) +#define SIDEBAR_SIMPLE_PAGE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntryClass)) +#define SIDEBAR_IS_SIMPLE_PAGE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY)) +#define SIDEBAR_IS_SIMPLE_PAGE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY)) +#define SIDEBAR_SIMPLE_PAGE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntryClass)) + +typedef struct _SidebarSimplePageEntry SidebarSimplePageEntry; +typedef struct _SidebarSimplePageEntryClass SidebarSimplePageEntryClass; + +#define CAMERA_TYPE_SIDEBAR_ENTRY (camera_sidebar_entry_get_type ()) +#define CAMERA_SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAMERA_TYPE_SIDEBAR_ENTRY, CameraSidebarEntry)) +#define CAMERA_SIDEBAR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CAMERA_TYPE_SIDEBAR_ENTRY, CameraSidebarEntryClass)) +#define CAMERA_IS_SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAMERA_TYPE_SIDEBAR_ENTRY)) +#define CAMERA_IS_SIDEBAR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CAMERA_TYPE_SIDEBAR_ENTRY)) +#define CAMERA_SIDEBAR_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CAMERA_TYPE_SIDEBAR_ENTRY, CameraSidebarEntryClass)) + +typedef struct _CameraSidebarEntry CameraSidebarEntry; +typedef struct _CameraSidebarEntryClass CameraSidebarEntryClass; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +#define SIDEBAR_TYPE_GROUPING (sidebar_grouping_get_type ()) +#define SIDEBAR_GROUPING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_GROUPING, SidebarGrouping)) +#define SIDEBAR_GROUPING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_GROUPING, SidebarGroupingClass)) +#define SIDEBAR_IS_GROUPING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_GROUPING)) +#define SIDEBAR_IS_GROUPING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_GROUPING)) +#define SIDEBAR_GROUPING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_GROUPING, SidebarGroupingClass)) + +typedef struct _SidebarGrouping SidebarGrouping; +typedef struct _SidebarGroupingClass SidebarGroupingClass; + +#define SIDEBAR_TYPE_HEADER (sidebar_header_get_type ()) +#define SIDEBAR_HEADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_HEADER, SidebarHeader)) +#define SIDEBAR_HEADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_HEADER, SidebarHeaderClass)) +#define SIDEBAR_IS_HEADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_HEADER)) +#define SIDEBAR_IS_HEADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_HEADER)) +#define SIDEBAR_HEADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_HEADER, SidebarHeaderClass)) + +typedef struct _SidebarHeader SidebarHeader; +typedef struct _SidebarHeaderClass SidebarHeaderClass; + +#define CAMERA_TYPE_HEADER (camera_header_get_type ()) +#define CAMERA_HEADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAMERA_TYPE_HEADER, CameraHeader)) +#define CAMERA_HEADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CAMERA_TYPE_HEADER, CameraHeaderClass)) +#define CAMERA_IS_HEADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAMERA_TYPE_HEADER)) +#define CAMERA_IS_HEADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CAMERA_TYPE_HEADER)) +#define CAMERA_HEADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CAMERA_TYPE_HEADER, CameraHeaderClass)) + +typedef struct _CameraHeader CameraHeader; +typedef struct _CameraHeaderClass CameraHeaderClass; + +#define SIDEBAR_TYPE_ENTRY (sidebar_entry_get_type ()) +#define SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_ENTRY, SidebarEntry)) +#define SIDEBAR_IS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_ENTRY)) +#define SIDEBAR_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_ENTRY, SidebarEntryIface)) + +typedef struct _SidebarEntry SidebarEntry; +typedef struct _SidebarEntryIface SidebarEntryIface; + +#define SIDEBAR_TYPE_TREE (sidebar_tree_get_type ()) +#define SIDEBAR_TREE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_TREE, SidebarTree)) +#define SIDEBAR_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_TREE, SidebarTreeClass)) +#define SIDEBAR_IS_TREE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_TREE)) +#define SIDEBAR_IS_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_TREE)) +#define SIDEBAR_TREE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_TREE, SidebarTreeClass)) + +typedef struct _SidebarTree SidebarTree; +typedef struct _SidebarTreeClass SidebarTreeClass; + +#define SIDEBAR_BRANCH_TYPE_OPTIONS (sidebar_branch_options_get_type ()) + +#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; +#define _camera_table_unref0(var) ((var == NULL) ? NULL : (var = (camera_table_unref (var), NULL))) +#define _discovered_camera_unref0(var) ((var == NULL) ? NULL : (var = (discovered_camera_unref (var), NULL))) +#define _g_free0(var) (var = (g_free (var), NULL)) + +#define SIDEBAR_TYPE_EXPANDABLE_ENTRY (sidebar_expandable_entry_get_type ()) +#define SIDEBAR_EXPANDABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_EXPANDABLE_ENTRY, SidebarExpandableEntry)) +#define SIDEBAR_IS_EXPANDABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_EXPANDABLE_ENTRY)) +#define SIDEBAR_EXPANDABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_EXPANDABLE_ENTRY, SidebarExpandableEntryIface)) + +typedef struct _SidebarExpandableEntry SidebarExpandableEntry; +typedef struct _SidebarExpandableEntryIface SidebarExpandableEntryIface; + +#define SIDEBAR_TYPE_RENAMEABLE_ENTRY (sidebar_renameable_entry_get_type ()) +#define SIDEBAR_RENAMEABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_RENAMEABLE_ENTRY, SidebarRenameableEntry)) +#define SIDEBAR_IS_RENAMEABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_RENAMEABLE_ENTRY)) +#define SIDEBAR_RENAMEABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_RENAMEABLE_ENTRY, SidebarRenameableEntryIface)) + +typedef struct _SidebarRenameableEntry SidebarRenameableEntry; +typedef struct _SidebarRenameableEntryIface SidebarRenameableEntryIface; +typedef struct _SidebarGroupingPrivate SidebarGroupingPrivate; + +#define SIDEBAR_TYPE_EMPHASIZABLE_ENTRY (sidebar_emphasizable_entry_get_type ()) +#define SIDEBAR_EMPHASIZABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_EMPHASIZABLE_ENTRY, SidebarEmphasizableEntry)) +#define SIDEBAR_IS_EMPHASIZABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_EMPHASIZABLE_ENTRY)) +#define SIDEBAR_EMPHASIZABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_EMPHASIZABLE_ENTRY, SidebarEmphasizableEntryIface)) + +typedef struct _SidebarEmphasizableEntry SidebarEmphasizableEntry; +typedef struct _SidebarEmphasizableEntryIface SidebarEmphasizableEntryIface; +typedef struct _SidebarHeaderPrivate SidebarHeaderPrivate; +typedef struct _CameraHeaderPrivate CameraHeaderPrivate; + +#define SIDEBAR_TYPE_SELECTABLE_ENTRY (sidebar_selectable_entry_get_type ()) +#define SIDEBAR_SELECTABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY, SidebarSelectableEntry)) +#define SIDEBAR_IS_SELECTABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY)) +#define SIDEBAR_SELECTABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY, SidebarSelectableEntryIface)) + +typedef struct _SidebarSelectableEntry SidebarSelectableEntry; +typedef struct _SidebarSelectableEntryIface SidebarSelectableEntryIface; + +#define SIDEBAR_TYPE_PAGE_REPRESENTATIVE (sidebar_page_representative_get_type ()) +#define SIDEBAR_PAGE_REPRESENTATIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE, SidebarPageRepresentative)) +#define SIDEBAR_IS_PAGE_REPRESENTATIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE)) +#define SIDEBAR_PAGE_REPRESENTATIVE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE, SidebarPageRepresentativeIface)) + +typedef struct _SidebarPageRepresentative SidebarPageRepresentative; +typedef struct _SidebarPageRepresentativeIface SidebarPageRepresentativeIface; + +#define TYPE_PAGE (page_get_type ()) +#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE, Page)) +#define PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE, PageClass)) +#define IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE)) +#define IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE)) +#define PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE, PageClass)) + +typedef struct _Page Page; +typedef struct _PageClass PageClass; + +#define SIDEBAR_TYPE_CONTEXTABLE (sidebar_contextable_get_type ()) +#define SIDEBAR_CONTEXTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_CONTEXTABLE, SidebarContextable)) +#define SIDEBAR_IS_CONTEXTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_CONTEXTABLE)) +#define SIDEBAR_CONTEXTABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_CONTEXTABLE, SidebarContextableIface)) + +typedef struct _SidebarContextable SidebarContextable; +typedef struct _SidebarContextableIface SidebarContextableIface; +typedef struct _SidebarSimplePageEntryPrivate SidebarSimplePageEntryPrivate; +typedef struct _CameraSidebarEntryPrivate CameraSidebarEntryPrivate; +typedef struct _DiscoveredCameraPrivate DiscoveredCameraPrivate; + +#define TYPE_CHECKERBOARD_PAGE (checkerboard_page_get_type ()) +#define CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPage)) +#define CHECKERBOARD_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CHECKERBOARD_PAGE, CheckerboardPageClass)) +#define IS_CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CHECKERBOARD_PAGE)) +#define IS_CHECKERBOARD_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CHECKERBOARD_PAGE)) +#define CHECKERBOARD_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPageClass)) + +typedef struct _CheckerboardPage CheckerboardPage; +typedef struct _CheckerboardPageClass CheckerboardPageClass; + +#define TYPE_IMPORT_PAGE (import_page_get_type ()) +#define IMPORT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORT_PAGE, ImportPage)) +#define IMPORT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORT_PAGE, ImportPageClass)) +#define IS_IMPORT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORT_PAGE)) +#define IS_IMPORT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORT_PAGE)) +#define IMPORT_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORT_PAGE, ImportPageClass)) + +typedef struct _ImportPage ImportPage; +typedef struct _ImportPageClass ImportPageClass; +#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 _SidebarBranch { + GObject parent_instance; + SidebarBranchPrivate * priv; +}; + +struct _SidebarBranchClass { + GObjectClass parent_class; +}; + +struct _CameraBranch { + SidebarBranch parent_instance; + CameraBranchPrivate * priv; +}; + +struct _CameraBranchClass { + SidebarBranchClass parent_class; +}; + +struct _CameraBranchPrivate { + GeeHashMap* camera_map; +}; + +struct _SidebarEntryIface { + GTypeInterface parent_iface; + gchar* (*get_sidebar_name) (SidebarEntry* self); + gchar* (*get_sidebar_tooltip) (SidebarEntry* self); + gchar* (*get_sidebar_icon) (SidebarEntry* self); + gchar* (*to_string) (SidebarEntry* self); + void (*grafted) (SidebarEntry* self, SidebarTree* tree); + void (*pruned) (SidebarEntry* self, SidebarTree* tree); +}; + +typedef enum { + SIDEBAR_BRANCH_OPTIONS_NONE = 0, + SIDEBAR_BRANCH_OPTIONS_HIDE_IF_EMPTY = 1 << 0, + SIDEBAR_BRANCH_OPTIONS_AUTO_OPEN_ON_NEW_CHILD = 1 << 1, + SIDEBAR_BRANCH_OPTIONS_STARTUP_EXPAND_TO_FIRST_CHILD = 1 << 2, + SIDEBAR_BRANCH_OPTIONS_STARTUP_OPEN_GROUPING = 1 << 3 +} SidebarBranchOptions; + +struct _SidebarExpandableEntryIface { + GTypeInterface parent_iface; + gboolean (*expand_on_select) (SidebarExpandableEntry* self); +}; + +struct _SidebarRenameableEntryIface { + GTypeInterface parent_iface; + void (*rename) (SidebarRenameableEntry* self, const gchar* new_name); + gboolean (*is_user_renameable) (SidebarRenameableEntry* self); +}; + +struct _SidebarGrouping { + GObject parent_instance; + SidebarGroupingPrivate * priv; +}; + +struct _SidebarGroupingClass { + GObjectClass parent_class; +}; + +struct _SidebarEmphasizableEntryIface { + GTypeInterface parent_iface; + gboolean (*is_emphasized) (SidebarEmphasizableEntry* self); +}; + +struct _SidebarHeader { + SidebarGrouping parent_instance; + SidebarHeaderPrivate * priv; +}; + +struct _SidebarHeaderClass { + SidebarGroupingClass parent_class; +}; + +struct _CameraHeader { + SidebarHeader parent_instance; + CameraHeaderPrivate * priv; +}; + +struct _CameraHeaderClass { + SidebarHeaderClass parent_class; +}; + +struct _SidebarSelectableEntryIface { + GTypeInterface parent_iface; +}; + +struct _SidebarPageRepresentativeIface { + GTypeInterface parent_iface; + gboolean (*has_page) (SidebarPageRepresentative* self); + Page* (*get_page) (SidebarPageRepresentative* self); +}; + +struct _SidebarContextableIface { + GTypeInterface parent_iface; + GtkMenu* (*get_sidebar_context_menu) (SidebarContextable* self, GdkEventButton* event); +}; + +struct _SidebarSimplePageEntry { + GObject parent_instance; + SidebarSimplePageEntryPrivate * priv; +}; + +struct _SidebarSimplePageEntryClass { + GObjectClass parent_class; + gchar* (*get_sidebar_name) (SidebarSimplePageEntry* self); + gchar* (*get_sidebar_tooltip) (SidebarSimplePageEntry* self); + gchar* (*get_sidebar_icon) (SidebarSimplePageEntry* self); + gchar* (*to_string) (SidebarSimplePageEntry* self); + Page* (*create_page) (SidebarSimplePageEntry* self); +}; + +struct _CameraSidebarEntry { + SidebarSimplePageEntry parent_instance; + CameraSidebarEntryPrivate * priv; +}; + +struct _CameraSidebarEntryClass { + SidebarSimplePageEntryClass parent_class; +}; + +struct _CameraSidebarEntryPrivate { + DiscoveredCamera* camera; + gchar* uri; +}; + +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); +}; + + +static gpointer camera_branch_parent_class = NULL; +extern gchar* camera_branch_cameras_icon; +gchar* camera_branch_cameras_icon = NULL; +static gpointer camera_header_parent_class = NULL; +static gpointer camera_sidebar_entry_parent_class = NULL; + +GType sidebar_branch_get_type (void) G_GNUC_CONST; +GType camera_branch_get_type (void) G_GNUC_CONST; +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; +GType sidebar_simple_page_entry_get_type (void) G_GNUC_CONST; +GType camera_sidebar_entry_get_type (void) G_GNUC_CONST; +#define CAMERA_BRANCH_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CAMERA_TYPE_BRANCH, CameraBranchPrivate)) +enum { + CAMERA_BRANCH_DUMMY_PROPERTY +}; +#define RESOURCES_ICON_CAMERAS "camera-photo" +CameraBranch* camera_branch_new (void); +CameraBranch* camera_branch_construct (GType object_type); +CameraHeader* camera_header_new (void); +CameraHeader* camera_header_construct (GType object_type); +GType sidebar_grouping_get_type (void) G_GNUC_CONST; +GType sidebar_header_get_type (void) G_GNUC_CONST; +GType camera_header_get_type (void) G_GNUC_CONST; +GType sidebar_tree_get_type (void) G_GNUC_CONST; +GType sidebar_entry_get_type (void) G_GNUC_CONST; +GType sidebar_branch_options_get_type (void) G_GNUC_CONST; +static gint camera_branch_camera_comparator (SidebarEntry* a, SidebarEntry* b); +static gint _camera_branch_camera_comparator_gcompare_func (gconstpointer a, gconstpointer b); +SidebarBranch* sidebar_branch_new (SidebarEntry* root, SidebarBranchOptions options, GCompareFunc default_comparator, GCompareFunc root_comparator); +SidebarBranch* sidebar_branch_construct (GType object_type, SidebarEntry* root, SidebarBranchOptions options, GCompareFunc default_comparator, GCompareFunc root_comparator); +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; +CameraTable* camera_table_get_instance (void); +GeeIterable* camera_table_get_cameras (CameraTable* self); +static void camera_branch_add_camera (CameraBranch* self, DiscoveredCamera* camera); +static void camera_branch_on_camera_added (CameraBranch* self, DiscoveredCamera* camera); +static void _camera_branch_on_camera_added_camera_table_camera_added (CameraTable* _sender, DiscoveredCamera* camera, gpointer self); +static void camera_branch_on_camera_removed (CameraBranch* self, DiscoveredCamera* camera); +static void _camera_branch_on_camera_removed_camera_table_camera_removed (CameraTable* _sender, DiscoveredCamera* camera, gpointer self); +void camera_branch_init (void); +void camera_branch_terminate (void); +gchar* sidebar_entry_get_sidebar_name (SidebarEntry* self); +gchar* camera_sidebar_entry_get_uri (CameraSidebarEntry* self); +CameraSidebarEntry* camera_branch_get_entry_for_camera (CameraBranch* self, DiscoveredCamera* camera); +static void camera_branch_remove_camera (CameraBranch* self, DiscoveredCamera* camera); +CameraSidebarEntry* camera_sidebar_entry_new (DiscoveredCamera* camera); +CameraSidebarEntry* camera_sidebar_entry_construct (GType object_type, DiscoveredCamera* camera); +void sidebar_branch_graft (SidebarBranch* self, SidebarEntry* parent, SidebarEntry* entry, GCompareFunc comparator); +SidebarEntry* sidebar_branch_get_root (SidebarBranch* self); +void sidebar_branch_prune (SidebarBranch* self, SidebarEntry* entry); +static void camera_branch_finalize (GObject* obj); +GType sidebar_expandable_entry_get_type (void) G_GNUC_CONST; +GType sidebar_renameable_entry_get_type (void) G_GNUC_CONST; +GType sidebar_emphasizable_entry_get_type (void) G_GNUC_CONST; +enum { + CAMERA_HEADER_DUMMY_PROPERTY +}; +SidebarHeader* sidebar_header_new (const gchar* name, gboolean emphasized); +SidebarHeader* sidebar_header_construct (GType object_type, const gchar* name, gboolean emphasized); +GType sidebar_selectable_entry_get_type (void) G_GNUC_CONST; +GType page_get_type (void) G_GNUC_CONST; +GType sidebar_page_representative_get_type (void) G_GNUC_CONST; +GType sidebar_contextable_get_type (void) G_GNUC_CONST; +#define CAMERA_SIDEBAR_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CAMERA_TYPE_SIDEBAR_ENTRY, CameraSidebarEntryPrivate)) +enum { + CAMERA_SIDEBAR_ENTRY_DUMMY_PROPERTY +}; +SidebarSimplePageEntry* sidebar_simple_page_entry_construct (GType object_type); +static gchar* camera_sidebar_entry_real_get_sidebar_name (SidebarSimplePageEntry* base); +static gchar* camera_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base); +static Page* camera_sidebar_entry_real_create_page (SidebarSimplePageEntry* base); +gchar* sidebar_simple_page_entry_get_sidebar_name (SidebarSimplePageEntry* self); +gchar* sidebar_simple_page_entry_get_sidebar_icon (SidebarSimplePageEntry* self); +ImportPage* import_page_new (Camera* camera, const gchar* uri, const gchar* display_name, const gchar* icon); +ImportPage* import_page_construct (GType object_type, Camera* camera, const gchar* uri, const gchar* display_name, const gchar* icon); +GType checkerboard_page_get_type (void) G_GNUC_CONST; +GType import_page_get_type (void) G_GNUC_CONST; +static void camera_sidebar_entry_finalize (GObject* obj); + + +static gint _camera_branch_camera_comparator_gcompare_func (gconstpointer a, gconstpointer b) { + gint result; + result = camera_branch_camera_comparator ((SidebarEntry*) a, (SidebarEntry*) b); +#line 14 "/home/jens/Source/shotwell/src/camera/Branch.vala" + return result; +#line 465 "Branch.c" +} + + +static void _camera_branch_on_camera_added_camera_table_camera_added (CameraTable* _sender, DiscoveredCamera* camera, gpointer self) { +#line 21 "/home/jens/Source/shotwell/src/camera/Branch.vala" + camera_branch_on_camera_added ((CameraBranch*) self, camera); +#line 472 "Branch.c" +} + + +static void _camera_branch_on_camera_removed_camera_table_camera_removed (CameraTable* _sender, DiscoveredCamera* camera, gpointer self) { +#line 22 "/home/jens/Source/shotwell/src/camera/Branch.vala" + camera_branch_on_camera_removed ((CameraBranch*) self, camera); +#line 479 "Branch.c" +} + + +CameraBranch* camera_branch_construct (GType object_type) { + CameraBranch * self = NULL; + CameraHeader* _tmp0_ = NULL; + CameraHeader* _tmp1_ = NULL; + CameraTable* _tmp13_ = NULL; + CameraTable* _tmp14_ = NULL; + CameraTable* _tmp15_ = NULL; + CameraTable* _tmp16_ = NULL; +#line 14 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp0_ = camera_header_new (); +#line 14 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp1_ = _tmp0_; +#line 14 "/home/jens/Source/shotwell/src/camera/Branch.vala" + self = (CameraBranch*) sidebar_branch_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SIDEBAR_TYPE_ENTRY, SidebarEntry), SIDEBAR_BRANCH_OPTIONS_HIDE_IF_EMPTY | SIDEBAR_BRANCH_OPTIONS_AUTO_OPEN_ON_NEW_CHILD, _camera_branch_camera_comparator_gcompare_func, NULL); +#line 14 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _g_object_unref0 (_tmp1_); +#line 499 "Branch.c" + { + GeeIterator* _camera_it = NULL; + CameraTable* _tmp2_ = NULL; + CameraTable* _tmp3_ = NULL; + GeeIterable* _tmp4_ = NULL; + GeeIterable* _tmp5_ = NULL; + GeeIterator* _tmp6_ = NULL; + GeeIterator* _tmp7_ = NULL; +#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp2_ = camera_table_get_instance (); +#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp3_ = _tmp2_; +#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp4_ = camera_table_get_cameras (_tmp3_); +#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp5_ = _tmp4_; +#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp6_ = gee_iterable_iterator (_tmp5_); +#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp7_ = _tmp6_; +#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _g_object_unref0 (_tmp5_); +#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _camera_table_unref0 (_tmp3_); +#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _camera_it = _tmp7_; +#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala" + while (TRUE) { +#line 528 "Branch.c" + GeeIterator* _tmp8_ = NULL; + gboolean _tmp9_ = FALSE; + DiscoveredCamera* camera = NULL; + GeeIterator* _tmp10_ = NULL; + gpointer _tmp11_ = NULL; + DiscoveredCamera* _tmp12_ = NULL; +#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp8_ = _camera_it; +#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp9_ = gee_iterator_next (_tmp8_); +#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala" + if (!_tmp9_) { +#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala" + break; +#line 543 "Branch.c" + } +#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp10_ = _camera_it; +#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp11_ = gee_iterator_get (_tmp10_); +#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala" + camera = (DiscoveredCamera*) _tmp11_; +#line 19 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp12_ = camera; +#line 19 "/home/jens/Source/shotwell/src/camera/Branch.vala" + camera_branch_add_camera (self, _tmp12_); +#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _discovered_camera_unref0 (camera); +#line 557 "Branch.c" + } +#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _g_object_unref0 (_camera_it); +#line 561 "Branch.c" + } +#line 21 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp13_ = camera_table_get_instance (); +#line 21 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp14_ = _tmp13_; +#line 21 "/home/jens/Source/shotwell/src/camera/Branch.vala" + g_signal_connect_object (_tmp14_, "camera-added", (GCallback) _camera_branch_on_camera_added_camera_table_camera_added, self, 0); +#line 21 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _camera_table_unref0 (_tmp14_); +#line 22 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp15_ = camera_table_get_instance (); +#line 22 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp16_ = _tmp15_; +#line 22 "/home/jens/Source/shotwell/src/camera/Branch.vala" + g_signal_connect_object (_tmp16_, "camera-removed", (GCallback) _camera_branch_on_camera_removed_camera_table_camera_removed, self, 0); +#line 22 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _camera_table_unref0 (_tmp16_); +#line 13 "/home/jens/Source/shotwell/src/camera/Branch.vala" + return self; +#line 581 "Branch.c" +} + + +CameraBranch* camera_branch_new (void) { +#line 13 "/home/jens/Source/shotwell/src/camera/Branch.vala" + return camera_branch_construct (CAMERA_TYPE_BRANCH); +#line 588 "Branch.c" +} + + +void camera_branch_init (void) { +} + + +void camera_branch_terminate (void) { +} + + +static gpointer _g_object_ref0 (gpointer self) { +#line 39 "/home/jens/Source/shotwell/src/camera/Branch.vala" + return self ? g_object_ref (self) : NULL; +#line 603 "Branch.c" +} + + +static gint camera_branch_camera_comparator (SidebarEntry* a, SidebarEntry* b) { + gint result = 0; + SidebarEntry* _tmp0_ = NULL; + SidebarEntry* _tmp1_ = NULL; + gint ret = 0; + SidebarEntry* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + SidebarEntry* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gint _tmp8_ = 0; + gint _tmp9_ = 0; + gint _tmp10_ = 0; +#line 31 "/home/jens/Source/shotwell/src/camera/Branch.vala" + g_return_val_if_fail (SIDEBAR_IS_ENTRY (a), 0); +#line 31 "/home/jens/Source/shotwell/src/camera/Branch.vala" + g_return_val_if_fail (SIDEBAR_IS_ENTRY (b), 0); +#line 32 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp0_ = a; +#line 32 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp1_ = b; +#line 32 "/home/jens/Source/shotwell/src/camera/Branch.vala" + if (_tmp0_ == _tmp1_) { +#line 33 "/home/jens/Source/shotwell/src/camera/Branch.vala" + result = 0; +#line 33 "/home/jens/Source/shotwell/src/camera/Branch.vala" + return result; +#line 635 "Branch.c" + } +#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp2_ = a; +#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp3_ = sidebar_entry_get_sidebar_name (_tmp2_); +#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp4_ = _tmp3_; +#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp5_ = b; +#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp6_ = sidebar_entry_get_sidebar_name (_tmp5_); +#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp7_ = _tmp6_; +#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp8_ = g_utf8_collate (_tmp4_, _tmp7_); +#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp9_ = _tmp8_; +#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _g_free0 (_tmp7_); +#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _g_free0 (_tmp4_); +#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala" + ret = _tmp9_; +#line 37 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp10_ = ret; +#line 37 "/home/jens/Source/shotwell/src/camera/Branch.vala" + if (_tmp10_ == 0) { +#line 663 "Branch.c" + CameraSidebarEntry* cam_a = NULL; + SidebarEntry* _tmp11_ = NULL; + CameraSidebarEntry* _tmp12_ = NULL; + CameraSidebarEntry* cam_b = NULL; + SidebarEntry* _tmp13_ = NULL; + CameraSidebarEntry* _tmp14_ = NULL; + gboolean _tmp15_ = FALSE; + CameraSidebarEntry* _tmp16_ = NULL; + CameraSidebarEntry* _tmp18_ = NULL; + gchar* _tmp19_ = NULL; + gchar* _tmp20_ = NULL; + CameraSidebarEntry* _tmp21_ = NULL; + gchar* _tmp22_ = NULL; + gchar* _tmp23_ = NULL; + gint _tmp24_ = 0; +#line 39 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp11_ = a; +#line 39 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, CAMERA_TYPE_SIDEBAR_ENTRY) ? ((CameraSidebarEntry*) _tmp11_) : NULL); +#line 39 "/home/jens/Source/shotwell/src/camera/Branch.vala" + cam_a = _tmp12_; +#line 40 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp13_ = b; +#line 40 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp14_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp13_, CAMERA_TYPE_SIDEBAR_ENTRY) ? ((CameraSidebarEntry*) _tmp13_) : NULL); +#line 40 "/home/jens/Source/shotwell/src/camera/Branch.vala" + cam_b = _tmp14_; +#line 41 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp16_ = cam_a; +#line 41 "/home/jens/Source/shotwell/src/camera/Branch.vala" + if (_tmp16_ != NULL) { +#line 695 "Branch.c" + CameraSidebarEntry* _tmp17_ = NULL; +#line 41 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp17_ = cam_b; +#line 41 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp15_ = _tmp17_ != NULL; +#line 701 "Branch.c" + } else { +#line 41 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp15_ = FALSE; +#line 705 "Branch.c" + } +#line 41 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _vala_assert (_tmp15_, "cam_a != null && cam_b != null"); +#line 42 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp18_ = cam_a; +#line 42 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp19_ = camera_sidebar_entry_get_uri (_tmp18_); +#line 42 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp20_ = _tmp19_; +#line 42 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp21_ = cam_b; +#line 42 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp22_ = camera_sidebar_entry_get_uri (_tmp21_); +#line 42 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp23_ = _tmp22_; +#line 42 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp24_ = g_utf8_collate (_tmp20_, _tmp23_); +#line 42 "/home/jens/Source/shotwell/src/camera/Branch.vala" + ret = _tmp24_; +#line 42 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _g_free0 (_tmp23_); +#line 42 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _g_free0 (_tmp20_); +#line 37 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _g_object_unref0 (cam_b); +#line 37 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _g_object_unref0 (cam_a); +#line 733 "Branch.c" + } +#line 45 "/home/jens/Source/shotwell/src/camera/Branch.vala" + result = ret; +#line 45 "/home/jens/Source/shotwell/src/camera/Branch.vala" + return result; +#line 739 "Branch.c" +} + + +CameraSidebarEntry* camera_branch_get_entry_for_camera (CameraBranch* self, DiscoveredCamera* camera) { + CameraSidebarEntry* result = NULL; + GeeHashMap* _tmp0_ = NULL; + DiscoveredCamera* _tmp1_ = NULL; + gpointer _tmp2_ = NULL; +#line 48 "/home/jens/Source/shotwell/src/camera/Branch.vala" + g_return_val_if_fail (CAMERA_IS_BRANCH (self), NULL); +#line 48 "/home/jens/Source/shotwell/src/camera/Branch.vala" + g_return_val_if_fail (IS_DISCOVERED_CAMERA (camera), NULL); +#line 49 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp0_ = self->priv->camera_map; +#line 49 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp1_ = camera; +#line 49 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_); +#line 49 "/home/jens/Source/shotwell/src/camera/Branch.vala" + result = (CameraSidebarEntry*) _tmp2_; +#line 49 "/home/jens/Source/shotwell/src/camera/Branch.vala" + return result; +#line 762 "Branch.c" +} + + +static void camera_branch_on_camera_added (CameraBranch* self, DiscoveredCamera* camera) { + DiscoveredCamera* _tmp0_ = NULL; +#line 52 "/home/jens/Source/shotwell/src/camera/Branch.vala" + g_return_if_fail (CAMERA_IS_BRANCH (self)); +#line 52 "/home/jens/Source/shotwell/src/camera/Branch.vala" + g_return_if_fail (IS_DISCOVERED_CAMERA (camera)); +#line 53 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp0_ = camera; +#line 53 "/home/jens/Source/shotwell/src/camera/Branch.vala" + camera_branch_add_camera (self, _tmp0_); +#line 776 "Branch.c" +} + + +static void camera_branch_on_camera_removed (CameraBranch* self, DiscoveredCamera* camera) { + DiscoveredCamera* _tmp0_ = NULL; +#line 56 "/home/jens/Source/shotwell/src/camera/Branch.vala" + g_return_if_fail (CAMERA_IS_BRANCH (self)); +#line 56 "/home/jens/Source/shotwell/src/camera/Branch.vala" + g_return_if_fail (IS_DISCOVERED_CAMERA (camera)); +#line 57 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp0_ = camera; +#line 57 "/home/jens/Source/shotwell/src/camera/Branch.vala" + camera_branch_remove_camera (self, _tmp0_); +#line 790 "Branch.c" +} + + +static void camera_branch_add_camera (CameraBranch* self, DiscoveredCamera* camera) { + GeeHashMap* _tmp0_ = NULL; + DiscoveredCamera* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + CameraSidebarEntry* entry = NULL; + DiscoveredCamera* _tmp3_ = NULL; + CameraSidebarEntry* _tmp4_ = NULL; + GeeHashMap* _tmp5_ = NULL; + DiscoveredCamera* _tmp6_ = NULL; + SidebarEntry* _tmp7_ = NULL; + SidebarEntry* _tmp8_ = NULL; +#line 60 "/home/jens/Source/shotwell/src/camera/Branch.vala" + g_return_if_fail (CAMERA_IS_BRANCH (self)); +#line 60 "/home/jens/Source/shotwell/src/camera/Branch.vala" + g_return_if_fail (IS_DISCOVERED_CAMERA (camera)); +#line 61 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp0_ = self->priv->camera_map; +#line 61 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp1_ = camera; +#line 61 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp2_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_); +#line 61 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _vala_assert (!_tmp2_, "!camera_map.has_key(camera)"); +#line 63 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp3_ = camera; +#line 63 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp4_ = camera_sidebar_entry_new (_tmp3_); +#line 63 "/home/jens/Source/shotwell/src/camera/Branch.vala" + entry = _tmp4_; +#line 64 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp5_ = self->priv->camera_map; +#line 64 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp6_ = camera; +#line 64 "/home/jens/Source/shotwell/src/camera/Branch.vala" + gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp6_, entry); +#line 67 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp7_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); +#line 67 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp8_ = _tmp7_; +#line 67 "/home/jens/Source/shotwell/src/camera/Branch.vala" + sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp8_, G_TYPE_CHECK_INSTANCE_CAST (entry, SIDEBAR_TYPE_ENTRY, SidebarEntry), NULL); +#line 67 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _g_object_unref0 (_tmp8_); +#line 60 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _g_object_unref0 (entry); +#line 839 "Branch.c" +} + + +static void camera_branch_remove_camera (CameraBranch* self, DiscoveredCamera* camera) { + GeeHashMap* _tmp0_ = NULL; + DiscoveredCamera* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + CameraSidebarEntry* entry = NULL; + GeeHashMap* _tmp3_ = NULL; + DiscoveredCamera* _tmp4_ = NULL; + gpointer _tmp5_ = NULL; + gboolean removed = FALSE; + GeeHashMap* _tmp6_ = NULL; + DiscoveredCamera* _tmp7_ = NULL; + gboolean _tmp8_ = FALSE; +#line 70 "/home/jens/Source/shotwell/src/camera/Branch.vala" + g_return_if_fail (CAMERA_IS_BRANCH (self)); +#line 70 "/home/jens/Source/shotwell/src/camera/Branch.vala" + g_return_if_fail (IS_DISCOVERED_CAMERA (camera)); +#line 71 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp0_ = self->priv->camera_map; +#line 71 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp1_ = camera; +#line 71 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp2_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_); +#line 71 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _vala_assert (_tmp2_, "camera_map.has_key(camera)"); +#line 73 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp3_ = self->priv->camera_map; +#line 73 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp4_ = camera; +#line 73 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp5_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp4_); +#line 73 "/home/jens/Source/shotwell/src/camera/Branch.vala" + entry = (CameraSidebarEntry*) _tmp5_; +#line 74 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _vala_assert (entry != NULL, "entry != null"); +#line 76 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp6_ = self->priv->camera_map; +#line 76 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp7_ = camera; +#line 76 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp8_ = gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp7_, NULL); +#line 76 "/home/jens/Source/shotwell/src/camera/Branch.vala" + removed = _tmp8_; +#line 77 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _vala_assert (removed, "removed"); +#line 79 "/home/jens/Source/shotwell/src/camera/Branch.vala" + sidebar_branch_prune (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (entry, SIDEBAR_TYPE_ENTRY, SidebarEntry)); +#line 70 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _g_object_unref0 (entry); +#line 891 "Branch.c" +} + + +static void camera_branch_class_init (CameraBranchClass * klass) { + gchar* _tmp0_ = NULL; +#line 7 "/home/jens/Source/shotwell/src/camera/Branch.vala" + camera_branch_parent_class = g_type_class_peek_parent (klass); +#line 7 "/home/jens/Source/shotwell/src/camera/Branch.vala" + g_type_class_add_private (klass, sizeof (CameraBranchPrivate)); +#line 7 "/home/jens/Source/shotwell/src/camera/Branch.vala" + G_OBJECT_CLASS (klass)->finalize = camera_branch_finalize; +#line 8 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp0_ = g_strdup (RESOURCES_ICON_CAMERAS); +#line 8 "/home/jens/Source/shotwell/src/camera/Branch.vala" + camera_branch_cameras_icon = _tmp0_; +#line 907 "Branch.c" +} + + +static void camera_branch_instance_init (CameraBranch * self) { + GeeHashMap* _tmp0_ = NULL; +#line 7 "/home/jens/Source/shotwell/src/camera/Branch.vala" + self->priv = CAMERA_BRANCH_GET_PRIVATE (self); +#line 10 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp0_ = gee_hash_map_new (TYPE_DISCOVERED_CAMERA, (GBoxedCopyFunc) discovered_camera_ref, discovered_camera_unref, CAMERA_TYPE_SIDEBAR_ENTRY, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +#line 10 "/home/jens/Source/shotwell/src/camera/Branch.vala" + self->priv->camera_map = _tmp0_; +#line 919 "Branch.c" +} + + +static void camera_branch_finalize (GObject* obj) { + CameraBranch * self; +#line 7 "/home/jens/Source/shotwell/src/camera/Branch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, CAMERA_TYPE_BRANCH, CameraBranch); +#line 10 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _g_object_unref0 (self->priv->camera_map); +#line 7 "/home/jens/Source/shotwell/src/camera/Branch.vala" + G_OBJECT_CLASS (camera_branch_parent_class)->finalize (obj); +#line 931 "Branch.c" +} + + +GType camera_branch_get_type (void) { + static volatile gsize camera_branch_type_id__volatile = 0; + if (g_once_init_enter (&camera_branch_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (CameraBranchClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) camera_branch_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CameraBranch), 0, (GInstanceInitFunc) camera_branch_instance_init, NULL }; + GType camera_branch_type_id; + camera_branch_type_id = g_type_register_static (SIDEBAR_TYPE_BRANCH, "CameraBranch", &g_define_type_info, 0); + g_once_init_leave (&camera_branch_type_id__volatile, camera_branch_type_id); + } + return camera_branch_type_id__volatile; +} + + +CameraHeader* camera_header_construct (GType object_type) { + CameraHeader * self = NULL; + const gchar* _tmp0_ = NULL; +#line 85 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp0_ = _ ("Cameras"); +#line 85 "/home/jens/Source/shotwell/src/camera/Branch.vala" + self = (CameraHeader*) sidebar_header_construct (object_type, _tmp0_, TRUE); +#line 84 "/home/jens/Source/shotwell/src/camera/Branch.vala" + return self; +#line 956 "Branch.c" +} + + +CameraHeader* camera_header_new (void) { +#line 84 "/home/jens/Source/shotwell/src/camera/Branch.vala" + return camera_header_construct (CAMERA_TYPE_HEADER); +#line 963 "Branch.c" +} + + +static void camera_header_class_init (CameraHeaderClass * klass) { +#line 83 "/home/jens/Source/shotwell/src/camera/Branch.vala" + camera_header_parent_class = g_type_class_peek_parent (klass); +#line 970 "Branch.c" +} + + +static void camera_header_instance_init (CameraHeader * self) { +} + + +GType camera_header_get_type (void) { + static volatile gsize camera_header_type_id__volatile = 0; + if (g_once_init_enter (&camera_header_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (CameraHeaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) camera_header_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CameraHeader), 0, (GInstanceInitFunc) camera_header_instance_init, NULL }; + GType camera_header_type_id; + camera_header_type_id = g_type_register_static (SIDEBAR_TYPE_HEADER, "CameraHeader", &g_define_type_info, 0); + g_once_init_leave (&camera_header_type_id__volatile, camera_header_type_id); + } + return camera_header_type_id__volatile; +} + + +static gpointer _discovered_camera_ref0 (gpointer self) { +#line 94 "/home/jens/Source/shotwell/src/camera/Branch.vala" + return self ? discovered_camera_ref (self) : NULL; +#line 993 "Branch.c" +} + + +CameraSidebarEntry* camera_sidebar_entry_construct (GType object_type, DiscoveredCamera* camera) { + CameraSidebarEntry * self = NULL; + DiscoveredCamera* _tmp0_ = NULL; + DiscoveredCamera* _tmp1_ = NULL; + DiscoveredCamera* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; +#line 93 "/home/jens/Source/shotwell/src/camera/Branch.vala" + g_return_val_if_fail (IS_DISCOVERED_CAMERA (camera), NULL); +#line 93 "/home/jens/Source/shotwell/src/camera/Branch.vala" + self = (CameraSidebarEntry*) sidebar_simple_page_entry_construct (object_type); +#line 94 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp0_ = camera; +#line 94 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp1_ = _discovered_camera_ref0 (_tmp0_); +#line 94 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _discovered_camera_unref0 (self->priv->camera); +#line 94 "/home/jens/Source/shotwell/src/camera/Branch.vala" + self->priv->camera = _tmp1_; +#line 95 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp2_ = camera; +#line 95 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp3_ = _tmp2_->uri; +#line 95 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp4_ = g_strdup (_tmp3_); +#line 95 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _g_free0 (self->priv->uri); +#line 95 "/home/jens/Source/shotwell/src/camera/Branch.vala" + self->priv->uri = _tmp4_; +#line 93 "/home/jens/Source/shotwell/src/camera/Branch.vala" + return self; +#line 1028 "Branch.c" +} + + +CameraSidebarEntry* camera_sidebar_entry_new (DiscoveredCamera* camera) { +#line 93 "/home/jens/Source/shotwell/src/camera/Branch.vala" + return camera_sidebar_entry_construct (CAMERA_TYPE_SIDEBAR_ENTRY, camera); +#line 1035 "Branch.c" +} + + +static gchar* camera_sidebar_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) { + CameraSidebarEntry * self; + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + DiscoveredCamera* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gchar* _tmp4_ = NULL; +#line 98 "/home/jens/Source/shotwell/src/camera/Branch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, CAMERA_TYPE_SIDEBAR_ENTRY, CameraSidebarEntry); +#line 99 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp1_ = self->priv->camera; +#line 99 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp2_ = _tmp1_->display_name; +#line 99 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp0_ = _tmp2_; +#line 99 "/home/jens/Source/shotwell/src/camera/Branch.vala" + if (_tmp0_ == NULL) { +#line 1056 "Branch.c" + const gchar* _tmp3_ = NULL; +#line 99 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp3_ = _ ("Camera"); +#line 99 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp0_ = _tmp3_; +#line 1062 "Branch.c" + } +#line 99 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp4_ = g_strdup (_tmp0_); +#line 99 "/home/jens/Source/shotwell/src/camera/Branch.vala" + result = _tmp4_; +#line 99 "/home/jens/Source/shotwell/src/camera/Branch.vala" + return result; +#line 1070 "Branch.c" +} + + +static gchar* camera_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base) { + CameraSidebarEntry * self; + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + DiscoveredCamera* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gchar* _tmp4_ = NULL; +#line 102 "/home/jens/Source/shotwell/src/camera/Branch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, CAMERA_TYPE_SIDEBAR_ENTRY, CameraSidebarEntry); +#line 103 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp1_ = self->priv->camera; +#line 103 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp2_ = _tmp1_->icon; +#line 103 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp0_ = _tmp2_; +#line 103 "/home/jens/Source/shotwell/src/camera/Branch.vala" + if (_tmp0_ == NULL) { +#line 1091 "Branch.c" + const gchar* _tmp3_ = NULL; +#line 103 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp3_ = camera_branch_cameras_icon; +#line 103 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp0_ = _tmp3_; +#line 1097 "Branch.c" + } +#line 103 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp4_ = g_strdup (_tmp0_); +#line 103 "/home/jens/Source/shotwell/src/camera/Branch.vala" + result = _tmp4_; +#line 103 "/home/jens/Source/shotwell/src/camera/Branch.vala" + return result; +#line 1105 "Branch.c" +} + + +static Page* camera_sidebar_entry_real_create_page (SidebarSimplePageEntry* base) { + CameraSidebarEntry * self; + Page* result = NULL; + DiscoveredCamera* _tmp0_ = NULL; + Camera* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + ImportPage* _tmp7_ = NULL; + Page* _tmp8_ = NULL; +#line 106 "/home/jens/Source/shotwell/src/camera/Branch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, CAMERA_TYPE_SIDEBAR_ENTRY, CameraSidebarEntry); +#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp0_ = self->priv->camera; +#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp1_ = _tmp0_->gcamera; +#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp2_ = self->priv->uri; +#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp3_ = sidebar_simple_page_entry_get_sidebar_name (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry)); +#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp4_ = _tmp3_; +#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp5_ = sidebar_simple_page_entry_get_sidebar_icon (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry)); +#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp6_ = _tmp5_; +#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp7_ = import_page_new (_tmp1_, _tmp2_, _tmp4_, _tmp6_); +#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala" + g_object_ref_sink (_tmp7_); +#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_PAGE, Page); +#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _g_free0 (_tmp6_); +#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _g_free0 (_tmp4_); +#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala" + result = _tmp8_; +#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala" + return result; +#line 1151 "Branch.c" +} + + +gchar* camera_sidebar_entry_get_uri (CameraSidebarEntry* self) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 110 "/home/jens/Source/shotwell/src/camera/Branch.vala" + g_return_val_if_fail (CAMERA_IS_SIDEBAR_ENTRY (self), NULL); +#line 111 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp0_ = self->priv->uri; +#line 111 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 111 "/home/jens/Source/shotwell/src/camera/Branch.vala" + result = _tmp1_; +#line 111 "/home/jens/Source/shotwell/src/camera/Branch.vala" + return result; +#line 1169 "Branch.c" +} + + +static void camera_sidebar_entry_class_init (CameraSidebarEntryClass * klass) { +#line 89 "/home/jens/Source/shotwell/src/camera/Branch.vala" + camera_sidebar_entry_parent_class = g_type_class_peek_parent (klass); +#line 89 "/home/jens/Source/shotwell/src/camera/Branch.vala" + g_type_class_add_private (klass, sizeof (CameraSidebarEntryPrivate)); +#line 89 "/home/jens/Source/shotwell/src/camera/Branch.vala" + ((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = camera_sidebar_entry_real_get_sidebar_name; +#line 89 "/home/jens/Source/shotwell/src/camera/Branch.vala" + ((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = camera_sidebar_entry_real_get_sidebar_icon; +#line 89 "/home/jens/Source/shotwell/src/camera/Branch.vala" + ((SidebarSimplePageEntryClass *) klass)->create_page = camera_sidebar_entry_real_create_page; +#line 89 "/home/jens/Source/shotwell/src/camera/Branch.vala" + G_OBJECT_CLASS (klass)->finalize = camera_sidebar_entry_finalize; +#line 1186 "Branch.c" +} + + +static void camera_sidebar_entry_instance_init (CameraSidebarEntry * self) { +#line 89 "/home/jens/Source/shotwell/src/camera/Branch.vala" + self->priv = CAMERA_SIDEBAR_ENTRY_GET_PRIVATE (self); +#line 1193 "Branch.c" +} + + +static void camera_sidebar_entry_finalize (GObject* obj) { + CameraSidebarEntry * self; +#line 89 "/home/jens/Source/shotwell/src/camera/Branch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, CAMERA_TYPE_SIDEBAR_ENTRY, CameraSidebarEntry); +#line 90 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _discovered_camera_unref0 (self->priv->camera); +#line 91 "/home/jens/Source/shotwell/src/camera/Branch.vala" + _g_free0 (self->priv->uri); +#line 89 "/home/jens/Source/shotwell/src/camera/Branch.vala" + G_OBJECT_CLASS (camera_sidebar_entry_parent_class)->finalize (obj); +#line 1207 "Branch.c" +} + + +GType camera_sidebar_entry_get_type (void) { + static volatile gsize camera_sidebar_entry_type_id__volatile = 0; + if (g_once_init_enter (&camera_sidebar_entry_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (CameraSidebarEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) camera_sidebar_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CameraSidebarEntry), 0, (GInstanceInitFunc) camera_sidebar_entry_instance_init, NULL }; + GType camera_sidebar_entry_type_id; + camera_sidebar_entry_type_id = g_type_register_static (SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, "CameraSidebarEntry", &g_define_type_info, 0); + g_once_init_leave (&camera_sidebar_entry_type_id__volatile, camera_sidebar_entry_type_id); + } + return camera_sidebar_entry_type_id__volatile; +} + + + diff --git a/src/camera/Camera.c b/src/camera/Camera.c new file mode 100644 index 0000000..71768fa --- /dev/null +++ b/src/camera/Camera.c @@ -0,0 +1,36 @@ +/* Camera.c generated by valac 0.32.1, the Vala compiler + * generated from Camera.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> + + + + +void camera_init (GError** error); +void camera_branch_init (void); +void camera_terminate (void); +void camera_branch_terminate (void); + + +void camera_init (GError** error) { +#line 10 "/home/jens/Source/shotwell/src/camera/Camera.vala" + camera_branch_init (); +#line 26 "Camera.c" +} + + +void camera_terminate (void) { +#line 14 "/home/jens/Source/shotwell/src/camera/Camera.vala" + camera_branch_terminate (); +#line 33 "Camera.c" +} + + + diff --git a/src/camera/CameraTable.c b/src/camera/CameraTable.c new file mode 100644 index 0000000..f758943 --- /dev/null +++ b/src/camera/CameraTable.c @@ -0,0 +1,4549 @@ +/* CameraTable.c generated by valac 0.32.1, 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 __catch54_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 __finally54; + __catch54_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" + } + __finally54: +#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 __catch55_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 __finally55; + __catch55_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" + } + __finally55: +#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.32/vapi/glib-2.0.vapi" + _tmp0_ = str; +#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = maxlen; +#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_); +#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + end = _tmp2_; +#line 1296 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3_ = end; +#line 1296 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp3_ == NULL) { +#line 1559 "CameraTable.c" + glong _tmp4_ = 0L; +#line 1297 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = maxlen; +#line 1297 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp4_; +#line 1297 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 1567 "CameraTable.c" + } else { + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; +#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = end; +#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp6_ = str; +#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = (glong) (_tmp5_ - _tmp6_); +#line 1299 "/usr/share/vala-0.32/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.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = offset; +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp1_ >= ((glong) 0)) { +#line 1603 "CameraTable.c" + glong _tmp2_ = 0L; +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = len; +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = _tmp2_ >= ((glong) 0); +#line 1609 "CameraTable.c" + } else { +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = FALSE; +#line 1613 "CameraTable.c" + } +#line 1308 "/usr/share/vala-0.32/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.32/vapi/glib-2.0.vapi" + _tmp3_ = offset; +#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = len; +#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_); +#line 1310 "/usr/share/vala-0.32/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.32/vapi/glib-2.0.vapi" + _tmp6_ = strlen (self); +#line 1312 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp7_ = _tmp6_; +#line 1312 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + string_length = (glong) _tmp7_; +#line 1639 "CameraTable.c" + } +#line 1315 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp8_ = offset; +#line 1315 "/usr/share/vala-0.32/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.32/vapi/glib-2.0.vapi" + _tmp9_ = string_length; +#line 1316 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp10_ = offset; +#line 1316 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + offset = _tmp9_ + _tmp10_; +#line 1317 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp11_ = offset; +#line 1317 "/usr/share/vala-0.32/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.32/vapi/glib-2.0.vapi" + _tmp12_ = offset; +#line 1319 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp13_ = string_length; +#line 1319 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL); +#line 1669 "CameraTable.c" + } +#line 1321 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp14_ = len; +#line 1321 "/usr/share/vala-0.32/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.32/vapi/glib-2.0.vapi" + _tmp15_ = string_length; +#line 1322 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp16_ = offset; +#line 1322 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + len = _tmp15_ - _tmp16_; +#line 1684 "CameraTable.c" + } +#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp17_ = offset; +#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp18_ = len; +#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp19_ = string_length; +#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL); +#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp20_ = offset; +#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp21_ = len; +#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_); +#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp22_; +#line 1325 "/usr/share/vala-0.32/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.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 1380 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (old != NULL, NULL); +#line 1380 "/usr/share/vala-0.32/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.32/vapi/glib-2.0.vapi" + _tmp0_ = old; +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = g_regex_escape_string (_tmp0_, -1); +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = _tmp1_; +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3_ = g_regex_new (_tmp2_, 0, 0, &_inner_error_); +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = _tmp3_; +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_free0 (_tmp2_); +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + regex = _tmp4_; +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_inner_error_->domain == G_REGEX_ERROR) { +#line 1748 "CameraTable.c" + goto __catch56_g_regex_error; + } +#line 1382 "/usr/share/vala-0.32/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.32/vapi/glib-2.0.vapi" + g_clear_error (&_inner_error_); +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return NULL; +#line 1757 "CameraTable.c" + } +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp6_ = regex; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp7_ = replacement; +#line 1383 "/usr/share/vala-0.32/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.32/vapi/glib-2.0.vapi" + _tmp5_ = _tmp8_; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_regex_unref0 (regex); +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_inner_error_->domain == G_REGEX_ERROR) { +#line 1773 "CameraTable.c" + goto __catch56_g_regex_error; + } +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_regex_unref0 (regex); +#line 1383 "/usr/share/vala-0.32/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.32/vapi/glib-2.0.vapi" + g_clear_error (&_inner_error_); +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return NULL; +#line 1784 "CameraTable.c" + } +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp9_ = _tmp5_; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = NULL; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp9_; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_free0 (_tmp5_); +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_regex_unref0 (regex); +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 1798 "CameraTable.c" + } + goto __finally56; + __catch56_g_regex_error: + { + GError* e = NULL; +#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + e = _inner_error_; +#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _inner_error_ = NULL; +#line 1385 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_assert_not_reached (); +#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_error_free0 (e); +#line 1812 "CameraTable.c" + } + __finally56: +#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1381 "/usr/share/vala-0.32/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.32/vapi/glib-2.0.vapi" + g_clear_error (&_inner_error_); +#line 1381 "/usr/share/vala-0.32/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 __catch57_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 __finally57; + __catch57_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" + } + __finally57: +#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); +} + + + diff --git a/src/camera/GPhoto.c b/src/camera/GPhoto.c new file mode 100644 index 0000000..a703945 --- /dev/null +++ b/src/camera/GPhoto.c @@ -0,0 +1,2807 @@ +/* GPhoto.c generated by valac 0.32.1, the Vala compiler + * generated from GPhoto.vala, do not modify */ + +/* Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU LGPL (version 2.1 or later). + * See the COPYING file in this distribution. + */ + +#include <glib.h> +#include <glib-object.h> +#include <stdlib.h> +#include <string.h> +#include <float.h> +#include <math.h> +#include <gphoto2/gphoto2-context.h> +#include <gphoto.h> +#include <gphoto2/gphoto2-camera.h> +#include <gphoto2/gphoto2-filesys.h> +#include <gphoto2/gphoto2-result.h> +#include <gphoto2/gphoto2-port-result.h> +#include <gphoto2/gphoto2-port-info-list.h> +#include <gio/gio.h> +#include <gdk-pixbuf/gdk-pixbuf.h> +#include <gphoto2/gphoto2-file.h> +#include <gobject/gvaluecollector.h> + + +#define GP_TYPE_CONTEXT_WRAPPER (gp_context_wrapper_get_type ()) +#define GP_CONTEXT_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GP_TYPE_CONTEXT_WRAPPER, GPContextWrapper)) +#define GP_CONTEXT_WRAPPER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GP_TYPE_CONTEXT_WRAPPER, GPContextWrapperClass)) +#define GP_IS_CONTEXT_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GP_TYPE_CONTEXT_WRAPPER)) +#define GP_IS_CONTEXT_WRAPPER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GP_TYPE_CONTEXT_WRAPPER)) +#define GP_CONTEXT_WRAPPER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GP_TYPE_CONTEXT_WRAPPER, GPContextWrapperClass)) + +typedef struct _GPContextWrapper GPContextWrapper; +typedef struct _GPContextWrapperClass GPContextWrapperClass; +typedef struct _GPContextWrapperPrivate GPContextWrapperPrivate; +#define _gp_context_unref0(var) ((var == NULL) ? NULL : (var = (gp_context_unref (var), NULL))) +typedef struct _GPParamSpecContextWrapper GPParamSpecContextWrapper; + +#define GP_TYPE_SPIN_IDLE_WRAPPER (gp_spin_idle_wrapper_get_type ()) +#define GP_SPIN_IDLE_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GP_TYPE_SPIN_IDLE_WRAPPER, GPSpinIdleWrapper)) +#define GP_SPIN_IDLE_WRAPPER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GP_TYPE_SPIN_IDLE_WRAPPER, GPSpinIdleWrapperClass)) +#define GP_IS_SPIN_IDLE_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GP_TYPE_SPIN_IDLE_WRAPPER)) +#define GP_IS_SPIN_IDLE_WRAPPER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GP_TYPE_SPIN_IDLE_WRAPPER)) +#define GP_SPIN_IDLE_WRAPPER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GP_TYPE_SPIN_IDLE_WRAPPER, GPSpinIdleWrapperClass)) + +typedef struct _GPSpinIdleWrapper GPSpinIdleWrapper; +typedef struct _GPSpinIdleWrapperClass GPSpinIdleWrapperClass; +typedef struct _GPSpinIdleWrapperPrivate GPSpinIdleWrapperPrivate; + +#define TYPE_MEDIA_METADATA (media_metadata_get_type ()) +#define MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_METADATA, MediaMetadata)) +#define MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_METADATA, MediaMetadataClass)) +#define IS_MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_METADATA)) +#define IS_MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_METADATA)) +#define MEDIA_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_METADATA, MediaMetadataClass)) + +typedef struct _MediaMetadata MediaMetadata; +typedef struct _MediaMetadataClass MediaMetadataClass; + +#define TYPE_PHOTO_METADATA (photo_metadata_get_type ()) +#define PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_METADATA, PhotoMetadata)) +#define PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_METADATA, PhotoMetadataClass)) +#define IS_PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_METADATA)) +#define IS_PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_METADATA)) +#define PHOTO_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_METADATA, PhotoMetadataClass)) + +typedef struct _PhotoMetadata PhotoMetadata; +typedef struct _PhotoMetadataClass PhotoMetadataClass; +#define _g_free0(var) (var = (g_free (var), NULL)) +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _media_metadata_unref0(var) ((var == NULL) ? NULL : (var = (media_metadata_unref (var), NULL))) + +#define TYPE_PHOTO_PREVIEW (photo_preview_get_type ()) +#define PHOTO_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_PREVIEW, PhotoPreview)) +#define PHOTO_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_PREVIEW, PhotoPreviewClass)) +#define IS_PHOTO_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_PREVIEW)) +#define IS_PHOTO_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_PREVIEW)) +#define PHOTO_PREVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_PREVIEW, PhotoPreviewClass)) + +typedef struct _PhotoPreview PhotoPreview; +typedef struct _PhotoPreviewClass PhotoPreviewClass; +#define _photo_preview_unref0(var) ((var == NULL) ? NULL : (var = (photo_preview_unref (var), NULL))) + +#define JPEG_TYPE_MARKER (jpeg_marker_get_type ()) +#define _gp_file_unref0(var) ((var == NULL) ? NULL : (var = (gp_file_unref (var), NULL))) + +typedef enum { + GPHOTO_ERROR_LIBRARY +} GPhotoError; +#define GPHOTO_ERROR gphoto_error_quark () +struct _GPContextWrapper { + GTypeInstance parent_instance; + volatile int ref_count; + GPContextWrapperPrivate * priv; + GPContext* context; +}; + +struct _GPContextWrapperClass { + GTypeClass parent_class; + void (*finalize) (GPContextWrapper *self); + void (*idle) (GPContextWrapper* self); + void (*error) (GPContextWrapper* self, const gchar* text, void* data); + void (*status) (GPContextWrapper* self, const gchar* text, void* data); + void (*message) (GPContextWrapper* self, const gchar* text, void* data); + void (*progress_start) (GPContextWrapper* self, gfloat current, const gchar* text, void* data); + void (*progress_update) (GPContextWrapper* self, gfloat current, void* data); + void (*progress_stop) (GPContextWrapper* self); +}; + +struct _GPParamSpecContextWrapper { + GParamSpec parent_instance; +}; + +struct _GPSpinIdleWrapper { + GPContextWrapper parent_instance; + GPSpinIdleWrapperPrivate * priv; +}; + +struct _GPSpinIdleWrapperClass { + GPContextWrapperClass parent_class; +}; + +typedef enum { + JPEG_MARKER_INVALID = 0x00, + JPEG_MARKER_SOI = 0xD8, + JPEG_MARKER_EOI = 0xD9, + JPEG_MARKER_APP0 = 0xE0, + JPEG_MARKER_APP1 = 0xE1 +} JpegMarker; + + +static gpointer gp_context_wrapper_parent_class = NULL; +static gpointer gp_spin_idle_wrapper_parent_class = NULL; + +GQuark gphoto_error_quark (void); +gpointer gp_context_wrapper_ref (gpointer instance); +void gp_context_wrapper_unref (gpointer instance); +GParamSpec* gp_param_spec_context_wrapper (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void gp_value_set_context_wrapper (GValue* value, gpointer v_object); +void gp_value_take_context_wrapper (GValue* value, gpointer v_object); +gpointer gp_value_get_context_wrapper (const GValue* value); +GType gp_context_wrapper_get_type (void) G_GNUC_CONST; +enum { + GP_CONTEXT_WRAPPER_DUMMY_PROPERTY +}; +GPContextWrapper* gp_context_wrapper_new (void); +GPContextWrapper* gp_context_wrapper_construct (GType object_type); +static void gp_context_wrapper_on_idle (GPContextWrapper* self, GPContext* context); +static void _gp_context_wrapper_on_idle_gp_context_idle_func (GPContext* context, gpointer self); +static void gp_context_wrapper_on_error (GPContextWrapper* self, GPContext* context, const gchar* text); +static void _gp_context_wrapper_on_error_gp_context_error_func (GPContext* context, const gchar* text, gpointer self); +static void gp_context_wrapper_on_status (GPContextWrapper* self, GPContext* context, const gchar* text); +static void _gp_context_wrapper_on_status_gp_context_status_func (GPContext* context, const gchar* text, gpointer self); +static void gp_context_wrapper_on_message (GPContextWrapper* self, GPContext* context, const gchar* text); +static void _gp_context_wrapper_on_message_gp_context_message_func (GPContext* context, const gchar* text, gpointer self); +static guint gp_context_wrapper_on_progress_start (GPContextWrapper* self, GPContext* context, gfloat target, const gchar* text); +static guint _gp_context_wrapper_on_progress_start_gp_context_progress_start_func (GPContext* context, gfloat target, const gchar* text, gpointer self); +static void gp_context_wrapper_on_progress_update (GPContextWrapper* self, GPContext* context, guint id, gfloat current); +static void _gp_context_wrapper_on_progress_update_gp_context_progress_update_func (GPContext* context, guint id, gfloat current, gpointer self); +static void gp_context_wrapper_on_progress_stop (GPContextWrapper* self, GPContext* context, guint id); +static void _gp_context_wrapper_on_progress_stop_gp_context_progress_stop_func (GPContext* context, guint id, gpointer self); +void gp_context_wrapper_idle (GPContextWrapper* self); +static void gp_context_wrapper_real_idle (GPContextWrapper* self); +void gp_context_wrapper_error (GPContextWrapper* self, const gchar* text, void* data); +static void gp_context_wrapper_real_error (GPContextWrapper* self, const gchar* text, void* data); +void gp_context_wrapper_status (GPContextWrapper* self, const gchar* text, void* data); +static void gp_context_wrapper_real_status (GPContextWrapper* self, const gchar* text, void* data); +void gp_context_wrapper_message (GPContextWrapper* self, const gchar* text, void* data); +static void gp_context_wrapper_real_message (GPContextWrapper* self, const gchar* text, void* data); +void gp_context_wrapper_progress_start (GPContextWrapper* self, gfloat current, const gchar* text, void* data); +static void gp_context_wrapper_real_progress_start (GPContextWrapper* self, gfloat current, const gchar* text, void* data); +void gp_context_wrapper_progress_update (GPContextWrapper* self, gfloat current, void* data); +static void gp_context_wrapper_real_progress_update (GPContextWrapper* self, gfloat current, void* data); +void gp_context_wrapper_progress_stop (GPContextWrapper* self); +static void gp_context_wrapper_real_progress_stop (GPContextWrapper* self); +static void gp_context_wrapper_finalize (GPContextWrapper* obj); +GType gp_spin_idle_wrapper_get_type (void) G_GNUC_CONST; +enum { + GP_SPIN_IDLE_WRAPPER_DUMMY_PROPERTY +}; +GPSpinIdleWrapper* gp_spin_idle_wrapper_new (void); +GPSpinIdleWrapper* gp_spin_idle_wrapper_construct (GType object_type); +static void gp_spin_idle_wrapper_real_idle (GPContextWrapper* base); +void spin_event_loop (void); +static void gp_spin_idle_wrapper_real_progress_update (GPContextWrapper* base, gfloat current, void* data); +#define GP_MAX_FILENAME_LENGTH 63 +#define GP_MAX_BASEDIR_LENGTH 255 +gboolean gp_get_info (GPContext* context, Camera* camera, const gchar* folder, const gchar* filename, CameraFileInfo* info, GError** error); +gpointer media_metadata_ref (gpointer instance); +void media_metadata_unref (gpointer instance); +GParamSpec* param_spec_media_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_media_metadata (GValue* value, gpointer v_object); +void value_take_media_metadata (GValue* value, gpointer v_object); +gpointer value_get_media_metadata (const GValue* value); +GType media_metadata_get_type (void) G_GNUC_CONST; +GType photo_metadata_get_type (void) G_GNUC_CONST; +PhotoMetadata* gp_get_fallback_metadata (Camera* camera, GPContext* context, const gchar* folder, const gchar* filename); +PhotoMetadata* photo_metadata_new (void); +PhotoMetadata* photo_metadata_construct (GType object_type); +void media_metadata_read_from_file (MediaMetadata* self, GFile* file, GError** error); +GdkPixbuf* gp_load_preview (GPContext* context, Camera* camera, const gchar* folder, const gchar* filename, guint8** raw, int* raw_length1, gsize* raw_length, GError** error); +guint8* gp_load_file_into_buffer (GPContext* context, Camera* camera, const gchar* folder, const gchar* filename, CameraFileType filetype, int* result_length1, GError** error); +guint photo_metadata_get_preview_count (PhotoMetadata* self); +gpointer photo_preview_ref (gpointer instance); +void photo_preview_unref (gpointer instance); +GParamSpec* param_spec_photo_preview (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_photo_preview (GValue* value, gpointer v_object); +void value_take_photo_preview (GValue* value, gpointer v_object); +gpointer value_get_photo_preview (const GValue* value); +GType photo_preview_get_type (void) G_GNUC_CONST; +PhotoPreview* photo_metadata_get_preview (PhotoMetadata* self, guint number); +guint8* photo_preview_flatten (PhotoPreview* self, int* result_length1, GError** error); +#define JPEG_MARKER_PREFIX ((guint8) 0xFF) +GType jpeg_marker_get_type (void) G_GNUC_CONST; +static guint8* _vala_array_dup23 (guint8* self, int length); +#define IMPORT_PREVIEW_MAX_SCALE 128 +GdkPixbuf* gp_load_image (GPContext* context, Camera* camera, const gchar* folder, const gchar* filename, GError** error); +GInputStream* gp_load_file_into_stream (GPContext* context, Camera* camera, const gchar* folder, const gchar* filename, CameraFileType filetype, GError** error); +void gp_save_image (GPContext* context, Camera* camera, const gchar* folder, const gchar* filename, GFile* dest_file, GError** error); +PhotoMetadata* gp_load_metadata (GPContext* context, Camera* camera, const gchar* folder, const gchar* filename, GError** error); +void photo_metadata_read_from_app1_segment (PhotoMetadata* self, guint8* buffer, int buffer_length1, gint length, GError** error); +static guint8* _vala_array_dup24 (guint8* self, int length); +void gp_on_mins_destroyed (void* data); +static void _gp_on_mins_destroyed_gdestroy_notify (void* data); +GFile* app_dirs_get_temp_dir (void); + + +GQuark gphoto_error_quark (void) { + return g_quark_from_static_string ("gphoto_error-quark"); +} + + +static void _gp_context_wrapper_on_idle_gp_context_idle_func (GPContext* context, gpointer self) { +#line 18 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_wrapper_on_idle ((GPContextWrapper*) self, context); +#line 240 "GPhoto.c" +} + + +static void _gp_context_wrapper_on_error_gp_context_error_func (GPContext* context, const gchar* text, gpointer self) { +#line 19 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_wrapper_on_error ((GPContextWrapper*) self, context, text); +#line 247 "GPhoto.c" +} + + +static void _gp_context_wrapper_on_status_gp_context_status_func (GPContext* context, const gchar* text, gpointer self) { +#line 20 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_wrapper_on_status ((GPContextWrapper*) self, context, text); +#line 254 "GPhoto.c" +} + + +static void _gp_context_wrapper_on_message_gp_context_message_func (GPContext* context, const gchar* text, gpointer self) { +#line 21 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_wrapper_on_message ((GPContextWrapper*) self, context, text); +#line 261 "GPhoto.c" +} + + +static guint _gp_context_wrapper_on_progress_start_gp_context_progress_start_func (GPContext* context, gfloat target, const gchar* text, gpointer self) { + guint result; + result = gp_context_wrapper_on_progress_start ((GPContextWrapper*) self, context, target, text); +#line 22 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return result; +#line 270 "GPhoto.c" +} + + +static void _gp_context_wrapper_on_progress_update_gp_context_progress_update_func (GPContext* context, guint id, gfloat current, gpointer self) { +#line 22 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_wrapper_on_progress_update ((GPContextWrapper*) self, context, id, current); +#line 277 "GPhoto.c" +} + + +static void _gp_context_wrapper_on_progress_stop_gp_context_progress_stop_func (GPContext* context, guint id, gpointer self) { +#line 22 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_wrapper_on_progress_stop ((GPContextWrapper*) self, context, id); +#line 284 "GPhoto.c" +} + + +GPContextWrapper* gp_context_wrapper_construct (GType object_type) { + GPContextWrapper* self = NULL; + GPContext* _tmp0_ = NULL; + GPContext* _tmp1_ = NULL; + GPContext* _tmp2_ = NULL; + GPContext* _tmp3_ = NULL; + GPContext* _tmp4_ = NULL; +#line 17 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + self = (GPContextWrapper*) g_type_create_instance (object_type); +#line 18 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0_ = self->context; +#line 18 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_set_idle_func (_tmp0_, _gp_context_wrapper_on_idle_gp_context_idle_func, self); +#line 19 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp1_ = self->context; +#line 19 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_set_error_func (_tmp1_, _gp_context_wrapper_on_error_gp_context_error_func, self); +#line 20 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp2_ = self->context; +#line 20 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_set_status_func (_tmp2_, _gp_context_wrapper_on_status_gp_context_status_func, self); +#line 21 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp3_ = self->context; +#line 21 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_set_message_func (_tmp3_, _gp_context_wrapper_on_message_gp_context_message_func, self); +#line 22 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp4_ = self->context; +#line 22 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_set_progress_funcs (_tmp4_, _gp_context_wrapper_on_progress_start_gp_context_progress_start_func, _gp_context_wrapper_on_progress_update_gp_context_progress_update_func, _gp_context_wrapper_on_progress_stop_gp_context_progress_stop_func, self); +#line 17 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return self; +#line 319 "GPhoto.c" +} + + +GPContextWrapper* gp_context_wrapper_new (void) { +#line 17 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return gp_context_wrapper_construct (GP_TYPE_CONTEXT_WRAPPER); +#line 326 "GPhoto.c" +} + + +static void gp_context_wrapper_real_idle (GPContextWrapper* self) { +} + + +void gp_context_wrapper_idle (GPContextWrapper* self) { +#line 25 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (GP_IS_CONTEXT_WRAPPER (self)); +#line 25 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + GP_CONTEXT_WRAPPER_GET_CLASS (self)->idle (self); +#line 339 "GPhoto.c" +} + + +static void gp_context_wrapper_real_error (GPContextWrapper* self, const gchar* text, void* data) { +#line 28 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (text != NULL); +#line 346 "GPhoto.c" +} + + +void gp_context_wrapper_error (GPContextWrapper* self, const gchar* text, void* data) { +#line 28 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (GP_IS_CONTEXT_WRAPPER (self)); +#line 28 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + GP_CONTEXT_WRAPPER_GET_CLASS (self)->error (self, text, data); +#line 355 "GPhoto.c" +} + + +static void gp_context_wrapper_real_status (GPContextWrapper* self, const gchar* text, void* data) { +#line 31 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (text != NULL); +#line 362 "GPhoto.c" +} + + +void gp_context_wrapper_status (GPContextWrapper* self, const gchar* text, void* data) { +#line 31 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (GP_IS_CONTEXT_WRAPPER (self)); +#line 31 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + GP_CONTEXT_WRAPPER_GET_CLASS (self)->status (self, text, data); +#line 371 "GPhoto.c" +} + + +static void gp_context_wrapper_real_message (GPContextWrapper* self, const gchar* text, void* data) { +#line 34 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (text != NULL); +#line 378 "GPhoto.c" +} + + +void gp_context_wrapper_message (GPContextWrapper* self, const gchar* text, void* data) { +#line 34 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (GP_IS_CONTEXT_WRAPPER (self)); +#line 34 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + GP_CONTEXT_WRAPPER_GET_CLASS (self)->message (self, text, data); +#line 387 "GPhoto.c" +} + + +static void gp_context_wrapper_real_progress_start (GPContextWrapper* self, gfloat current, const gchar* text, void* data) { +#line 37 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (text != NULL); +#line 394 "GPhoto.c" +} + + +void gp_context_wrapper_progress_start (GPContextWrapper* self, gfloat current, const gchar* text, void* data) { +#line 37 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (GP_IS_CONTEXT_WRAPPER (self)); +#line 37 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + GP_CONTEXT_WRAPPER_GET_CLASS (self)->progress_start (self, current, text, data); +#line 403 "GPhoto.c" +} + + +static void gp_context_wrapper_real_progress_update (GPContextWrapper* self, gfloat current, void* data) { +} + + +void gp_context_wrapper_progress_update (GPContextWrapper* self, gfloat current, void* data) { +#line 40 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (GP_IS_CONTEXT_WRAPPER (self)); +#line 40 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + GP_CONTEXT_WRAPPER_GET_CLASS (self)->progress_update (self, current, data); +#line 416 "GPhoto.c" +} + + +static void gp_context_wrapper_real_progress_stop (GPContextWrapper* self) { +} + + +void gp_context_wrapper_progress_stop (GPContextWrapper* self) { +#line 43 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (GP_IS_CONTEXT_WRAPPER (self)); +#line 43 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + GP_CONTEXT_WRAPPER_GET_CLASS (self)->progress_stop (self); +#line 429 "GPhoto.c" +} + + +static void gp_context_wrapper_on_idle (GPContextWrapper* self, GPContext* context) { +#line 46 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (GP_IS_CONTEXT_WRAPPER (self)); +#line 46 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (context != NULL); +#line 47 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_wrapper_idle (self); +#line 440 "GPhoto.c" +} + + +static void gp_context_wrapper_on_error (GPContextWrapper* self, GPContext* context, const gchar* text) { + const gchar* _tmp0_ = NULL; +#line 50 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (GP_IS_CONTEXT_WRAPPER (self)); +#line 50 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (context != NULL); +#line 50 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (text != NULL); +#line 51 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0_ = text; +#line 51 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_wrapper_error (self, _tmp0_, NULL); +#line 456 "GPhoto.c" +} + + +static void gp_context_wrapper_on_status (GPContextWrapper* self, GPContext* context, const gchar* text) { + const gchar* _tmp0_ = NULL; +#line 54 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (GP_IS_CONTEXT_WRAPPER (self)); +#line 54 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (context != NULL); +#line 54 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (text != NULL); +#line 55 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0_ = text; +#line 55 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_wrapper_status (self, _tmp0_, NULL); +#line 472 "GPhoto.c" +} + + +static void gp_context_wrapper_on_message (GPContextWrapper* self, GPContext* context, const gchar* text) { + const gchar* _tmp0_ = NULL; +#line 58 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (GP_IS_CONTEXT_WRAPPER (self)); +#line 58 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (context != NULL); +#line 58 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (text != NULL); +#line 59 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0_ = text; +#line 59 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_wrapper_message (self, _tmp0_, NULL); +#line 488 "GPhoto.c" +} + + +static guint gp_context_wrapper_on_progress_start (GPContextWrapper* self, GPContext* context, gfloat target, const gchar* text) { + guint result = 0U; + gfloat _tmp0_ = 0.0F; + const gchar* _tmp1_ = NULL; +#line 62 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (GP_IS_CONTEXT_WRAPPER (self), 0U); +#line 62 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (context != NULL, 0U); +#line 62 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (text != NULL, 0U); +#line 63 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0_ = target; +#line 63 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp1_ = text; +#line 63 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_wrapper_progress_start (self, _tmp0_, _tmp1_, NULL); +#line 65 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + result = (guint) 0; +#line 65 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return result; +#line 512 "GPhoto.c" +} + + +static void gp_context_wrapper_on_progress_update (GPContextWrapper* self, GPContext* context, guint id, gfloat current) { + gfloat _tmp0_ = 0.0F; +#line 68 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (GP_IS_CONTEXT_WRAPPER (self)); +#line 68 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (context != NULL); +#line 69 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0_ = current; +#line 69 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_wrapper_progress_update (self, _tmp0_, NULL); +#line 526 "GPhoto.c" +} + + +static void gp_context_wrapper_on_progress_stop (GPContextWrapper* self, GPContext* context, guint id) { +#line 72 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (GP_IS_CONTEXT_WRAPPER (self)); +#line 72 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (context != NULL); +#line 73 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_wrapper_progress_stop (self); +#line 537 "GPhoto.c" +} + + +static void gp_value_context_wrapper_init (GValue* value) { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + value->data[0].v_pointer = NULL; +#line 544 "GPhoto.c" +} + + +static void gp_value_context_wrapper_free_value (GValue* value) { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (value->data[0].v_pointer) { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_wrapper_unref (value->data[0].v_pointer); +#line 553 "GPhoto.c" + } +} + + +static void gp_value_context_wrapper_copy_value (const GValue* src_value, GValue* dest_value) { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (src_value->data[0].v_pointer) { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + dest_value->data[0].v_pointer = gp_context_wrapper_ref (src_value->data[0].v_pointer); +#line 563 "GPhoto.c" + } else { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + dest_value->data[0].v_pointer = NULL; +#line 567 "GPhoto.c" + } +} + + +static gpointer gp_value_context_wrapper_peek_pointer (const GValue* value) { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return value->data[0].v_pointer; +#line 575 "GPhoto.c" +} + + +static gchar* gp_value_context_wrapper_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (collect_values[0].v_pointer) { +#line 582 "GPhoto.c" + GPContextWrapper* object; + object = collect_values[0].v_pointer; +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (object->parent_instance.g_class == NULL) { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 589 "GPhoto.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.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 593 "GPhoto.c" + } +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + value->data[0].v_pointer = gp_context_wrapper_ref (object); +#line 597 "GPhoto.c" + } else { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + value->data[0].v_pointer = NULL; +#line 601 "GPhoto.c" + } +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return NULL; +#line 605 "GPhoto.c" +} + + +static gchar* gp_value_context_wrapper_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + GPContextWrapper** object_p; + object_p = collect_values[0].v_pointer; +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (!object_p) { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 616 "GPhoto.c" + } +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (!value->data[0].v_pointer) { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + *object_p = NULL; +#line 622 "GPhoto.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + *object_p = value->data[0].v_pointer; +#line 626 "GPhoto.c" + } else { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + *object_p = gp_context_wrapper_ref (value->data[0].v_pointer); +#line 630 "GPhoto.c" + } +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return NULL; +#line 634 "GPhoto.c" +} + + +GParamSpec* gp_param_spec_context_wrapper (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + GPParamSpecContextWrapper* spec; +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (g_type_is_a (object_type, GP_TYPE_CONTEXT_WRAPPER), NULL); +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return G_PARAM_SPEC (spec); +#line 648 "GPhoto.c" +} + + +gpointer gp_value_get_context_wrapper (const GValue* value) { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GP_TYPE_CONTEXT_WRAPPER), NULL); +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return value->data[0].v_pointer; +#line 657 "GPhoto.c" +} + + +void gp_value_set_context_wrapper (GValue* value, gpointer v_object) { + GPContextWrapper* old; +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GP_TYPE_CONTEXT_WRAPPER)); +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + old = value->data[0].v_pointer; +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (v_object) { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GP_TYPE_CONTEXT_WRAPPER)); +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + value->data[0].v_pointer = v_object; +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_wrapper_ref (value->data[0].v_pointer); +#line 677 "GPhoto.c" + } else { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + value->data[0].v_pointer = NULL; +#line 681 "GPhoto.c" + } +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (old) { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_wrapper_unref (old); +#line 687 "GPhoto.c" + } +} + + +void gp_value_take_context_wrapper (GValue* value, gpointer v_object) { + GPContextWrapper* old; +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GP_TYPE_CONTEXT_WRAPPER)); +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + old = value->data[0].v_pointer; +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (v_object) { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GP_TYPE_CONTEXT_WRAPPER)); +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + value->data[0].v_pointer = v_object; +#line 706 "GPhoto.c" + } else { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + value->data[0].v_pointer = NULL; +#line 710 "GPhoto.c" + } +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (old) { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_wrapper_unref (old); +#line 716 "GPhoto.c" + } +} + + +static void gp_context_wrapper_class_init (GPContextWrapperClass * klass) { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_context_wrapper_parent_class = g_type_class_peek_parent (klass); +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + ((GPContextWrapperClass *) klass)->finalize = gp_context_wrapper_finalize; +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + ((GPContextWrapperClass *) klass)->idle = gp_context_wrapper_real_idle; +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + ((GPContextWrapperClass *) klass)->error = gp_context_wrapper_real_error; +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + ((GPContextWrapperClass *) klass)->status = gp_context_wrapper_real_status; +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + ((GPContextWrapperClass *) klass)->message = gp_context_wrapper_real_message; +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + ((GPContextWrapperClass *) klass)->progress_start = gp_context_wrapper_real_progress_start; +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + ((GPContextWrapperClass *) klass)->progress_update = gp_context_wrapper_real_progress_update; +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + ((GPContextWrapperClass *) klass)->progress_stop = gp_context_wrapper_real_progress_stop; +#line 740 "GPhoto.c" +} + + +static void gp_context_wrapper_instance_init (GPContextWrapper * self) { + GPContext* _tmp0_ = NULL; +#line 15 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0_ = gp_context_new (); +#line 15 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + self->context = _tmp0_; +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + self->ref_count = 1; +#line 752 "GPhoto.c" +} + + +static void gp_context_wrapper_finalize (GPContextWrapper* obj) { + GPContextWrapper * self; +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, GP_TYPE_CONTEXT_WRAPPER, GPContextWrapper); +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_signal_handlers_destroy (self); +#line 15 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _gp_context_unref0 (self->context); +#line 764 "GPhoto.c" +} + + +GType gp_context_wrapper_get_type (void) { + static volatile gsize gp_context_wrapper_type_id__volatile = 0; + if (g_once_init_enter (&gp_context_wrapper_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { gp_value_context_wrapper_init, gp_value_context_wrapper_free_value, gp_value_context_wrapper_copy_value, gp_value_context_wrapper_peek_pointer, "p", gp_value_context_wrapper_collect_value, "p", gp_value_context_wrapper_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (GPContextWrapperClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gp_context_wrapper_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GPContextWrapper), 0, (GInstanceInitFunc) gp_context_wrapper_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 gp_context_wrapper_type_id; + gp_context_wrapper_type_id = g_type_register_fundamental (g_type_fundamental_next (), "GPContextWrapper", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&gp_context_wrapper_type_id__volatile, gp_context_wrapper_type_id); + } + return gp_context_wrapper_type_id__volatile; +} + + +gpointer gp_context_wrapper_ref (gpointer instance) { + GPContextWrapper* self; + self = instance; +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_atomic_int_inc (&self->ref_count); +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return instance; +#line 789 "GPhoto.c" +} + + +void gp_context_wrapper_unref (gpointer instance) { + GPContextWrapper* self; + self = instance; +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + GP_CONTEXT_WRAPPER_GET_CLASS (self)->finalize (self); +#line 14 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 802 "GPhoto.c" + } +} + + +GPSpinIdleWrapper* gp_spin_idle_wrapper_construct (GType object_type) { + GPSpinIdleWrapper* self = NULL; +#line 79 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + self = (GPSpinIdleWrapper*) gp_context_wrapper_construct (object_type); +#line 79 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return self; +#line 813 "GPhoto.c" +} + + +GPSpinIdleWrapper* gp_spin_idle_wrapper_new (void) { +#line 79 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return gp_spin_idle_wrapper_construct (GP_TYPE_SPIN_IDLE_WRAPPER); +#line 820 "GPhoto.c" +} + + +static void gp_spin_idle_wrapper_real_idle (GPContextWrapper* base) { + GPSpinIdleWrapper * self; +#line 82 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, GP_TYPE_SPIN_IDLE_WRAPPER, GPSpinIdleWrapper); +#line 83 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + GP_CONTEXT_WRAPPER_CLASS (gp_spin_idle_wrapper_parent_class)->idle (G_TYPE_CHECK_INSTANCE_CAST (self, GP_TYPE_CONTEXT_WRAPPER, GPContextWrapper)); +#line 85 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + spin_event_loop (); +#line 832 "GPhoto.c" +} + + +static void gp_spin_idle_wrapper_real_progress_update (GPContextWrapper* base, gfloat current, void* data) { + GPSpinIdleWrapper * self; + gfloat _tmp0_ = 0.0F; + void* _tmp1_ = NULL; +#line 88 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, GP_TYPE_SPIN_IDLE_WRAPPER, GPSpinIdleWrapper); +#line 89 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0_ = current; +#line 89 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp1_ = data; +#line 89 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + GP_CONTEXT_WRAPPER_CLASS (gp_spin_idle_wrapper_parent_class)->progress_update (G_TYPE_CHECK_INSTANCE_CAST (self, GP_TYPE_CONTEXT_WRAPPER, GPContextWrapper), _tmp0_, _tmp1_); +#line 91 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + spin_event_loop (); +#line 850 "GPhoto.c" +} + + +static void gp_spin_idle_wrapper_class_init (GPSpinIdleWrapperClass * klass) { +#line 78 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_spin_idle_wrapper_parent_class = g_type_class_peek_parent (klass); +#line 78 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + ((GPContextWrapperClass *) klass)->idle = gp_spin_idle_wrapper_real_idle; +#line 78 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + ((GPContextWrapperClass *) klass)->progress_update = gp_spin_idle_wrapper_real_progress_update; +#line 861 "GPhoto.c" +} + + +static void gp_spin_idle_wrapper_instance_init (GPSpinIdleWrapper * self) { +} + + +GType gp_spin_idle_wrapper_get_type (void) { + static volatile gsize gp_spin_idle_wrapper_type_id__volatile = 0; + if (g_once_init_enter (&gp_spin_idle_wrapper_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (GPSpinIdleWrapperClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gp_spin_idle_wrapper_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GPSpinIdleWrapper), 0, (GInstanceInitFunc) gp_spin_idle_wrapper_instance_init, NULL }; + GType gp_spin_idle_wrapper_type_id; + gp_spin_idle_wrapper_type_id = g_type_register_static (GP_TYPE_CONTEXT_WRAPPER, "GPSpinIdleWrapper", &g_define_type_info, 0); + g_once_init_leave (&gp_spin_idle_wrapper_type_id__volatile, gp_spin_idle_wrapper_type_id); + } + return gp_spin_idle_wrapper_type_id__volatile; +} + + +gboolean gp_get_info (GPContext* context, Camera* camera, const gchar* folder, const gchar* filename, CameraFileInfo* info, GError** error) { + CameraFileInfo _vala_info = {0}; + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; + const gchar* _tmp1_ = NULL; + gint _tmp2_ = 0; + gint _tmp3_ = 0; + int res = 0; + Camera* _tmp8_ = NULL; + const gchar* _tmp9_ = NULL; + const gchar* _tmp10_ = NULL; + GPContext* _tmp11_ = NULL; + CameraFileInfo _tmp12_ = {0}; + int _tmp13_ = 0; + int _tmp14_ = 0; + GError * _inner_error_ = NULL; +#line 102 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (context != NULL, FALSE); +#line 102 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (camera != NULL, FALSE); +#line 102 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (folder != NULL, FALSE); +#line 102 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (filename != NULL, FALSE); +#line 104 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp1_ = folder; +#line 104 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp2_ = strlen (_tmp1_); +#line 104 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp3_ = _tmp2_; +#line 104 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp3_ > GP_MAX_BASEDIR_LENGTH) { +#line 104 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0_ = TRUE; +#line 915 "GPhoto.c" + } else { + const gchar* _tmp4_ = NULL; + gint _tmp5_ = 0; + gint _tmp6_ = 0; +#line 104 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp4_ = filename; +#line 104 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp5_ = strlen (_tmp4_); +#line 104 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp6_ = _tmp5_; +#line 104 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0_ = _tmp6_ > GP_MAX_FILENAME_LENGTH; +#line 928 "GPhoto.c" + } +#line 104 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp0_) { +#line 932 "GPhoto.c" + CameraFileInfo _tmp7_ = {0}; +#line 105 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + (_vala_info); +#line 105 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _vala_info = _tmp7_; +#line 107 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + result = FALSE; +#line 107 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (info) { +#line 107 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + *info = _vala_info; +#line 944 "GPhoto.c" + } else { +#line 107 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + (_vala_info); +#line 948 "GPhoto.c" + } +#line 107 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return result; +#line 952 "GPhoto.c" + } +#line 110 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp8_ = camera; +#line 110 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp9_ = folder; +#line 110 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp10_ = filename; +#line 110 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp11_ = context; +#line 110 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp13_ = gp_camera_file_get_info (_tmp8_, _tmp9_, _tmp10_, &_tmp12_, _tmp11_); +#line 110 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + (_vala_info); +#line 110 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _vala_info = _tmp12_; +#line 110 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + res = _tmp13_; +#line 111 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp14_ = res; +#line 111 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp14_ != GP_OK) { +#line 974 "GPhoto.c" + int _tmp15_ = 0; + const gchar* _tmp16_ = NULL; + const gchar* _tmp17_ = NULL; + int _tmp18_ = 0; + const gchar* _tmp19_ = NULL; + GError* _tmp20_ = NULL; +#line 112 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp15_ = res; +#line 112 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp16_ = folder; +#line 112 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp17_ = filename; +#line 112 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp18_ = res; +#line 112 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp19_ = gp_port_result_as_string (_tmp18_); +#line 112 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp20_ = g_error_new (GPHOTO_ERROR, GPHOTO_ERROR_LIBRARY, "[%d] Error retrieving file information for %s/%s: %s", (gint) _tmp15_, _tmp16_, _tmp17_, _tmp19_); +#line 112 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _inner_error_ = _tmp20_; +#line 112 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_propagate_error (error, _inner_error_); +#line 112 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return FALSE; +#line 999 "GPhoto.c" + } +#line 115 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + result = TRUE; +#line 115 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (info) { +#line 115 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + *info = _vala_info; +#line 1007 "GPhoto.c" + } else { +#line 115 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + (_vala_info); +#line 1011 "GPhoto.c" + } +#line 115 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return result; +#line 1015 "GPhoto.c" +} + + +static gchar* string_slice (const gchar* self, glong start, glong end) { + gchar* result = NULL; + glong string_length = 0L; + gint _tmp0_ = 0; + gint _tmp1_ = 0; + glong _tmp2_ = 0L; + glong _tmp5_ = 0L; + gboolean _tmp8_ = FALSE; + glong _tmp9_ = 0L; + gboolean _tmp12_ = FALSE; + glong _tmp13_ = 0L; + glong _tmp16_ = 0L; + glong _tmp17_ = 0L; + glong _tmp18_ = 0L; + glong _tmp19_ = 0L; + glong _tmp20_ = 0L; + gchar* _tmp21_ = NULL; +#line 1328 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 1329 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = strlen (self); +#line 1329 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = _tmp0_; +#line 1329 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + string_length = (glong) _tmp1_; +#line 1330 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = start; +#line 1330 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp2_ < ((glong) 0)) { +#line 1048 "GPhoto.c" + glong _tmp3_ = 0L; + glong _tmp4_ = 0L; +#line 1331 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3_ = string_length; +#line 1331 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = start; +#line 1331 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + start = _tmp3_ + _tmp4_; +#line 1057 "GPhoto.c" + } +#line 1333 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = end; +#line 1333 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp5_ < ((glong) 0)) { +#line 1063 "GPhoto.c" + glong _tmp6_ = 0L; + glong _tmp7_ = 0L; +#line 1334 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp6_ = string_length; +#line 1334 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp7_ = end; +#line 1334 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + end = _tmp6_ + _tmp7_; +#line 1072 "GPhoto.c" + } +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp9_ = start; +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp9_ >= ((glong) 0)) { +#line 1078 "GPhoto.c" + glong _tmp10_ = 0L; + glong _tmp11_ = 0L; +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp10_ = start; +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp11_ = string_length; +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp8_ = _tmp10_ <= _tmp11_; +#line 1087 "GPhoto.c" + } else { +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp8_ = FALSE; +#line 1091 "GPhoto.c" + } +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (_tmp8_, NULL); +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp13_ = end; +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp13_ >= ((glong) 0)) { +#line 1099 "GPhoto.c" + glong _tmp14_ = 0L; + glong _tmp15_ = 0L; +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp14_ = end; +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp15_ = string_length; +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp12_ = _tmp14_ <= _tmp15_; +#line 1108 "GPhoto.c" + } else { +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp12_ = FALSE; +#line 1112 "GPhoto.c" + } +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (_tmp12_, NULL); +#line 1338 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp16_ = start; +#line 1338 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp17_ = end; +#line 1338 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (_tmp16_ <= _tmp17_, NULL); +#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp18_ = start; +#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp19_ = end; +#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp20_ = start; +#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp21_ = g_strndup (((gchar*) self) + _tmp18_, (gsize) (_tmp19_ - _tmp20_)); +#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp21_; +#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 1134 "GPhoto.c" +} + + +PhotoMetadata* gp_get_fallback_metadata (Camera* camera, GPContext* context, const gchar* folder, const gchar* filename) { + PhotoMetadata* result = NULL; + CameraStorageInformation* sifs = NULL; + gint count = 0; + Camera* _tmp0_ = NULL; + GPContext* _tmp1_ = NULL; + gint _tmp2_ = 0; + GPPortInfo port_info = {0}; + Camera* _tmp3_ = NULL; + GPPortInfo _tmp4_ = {0}; + gchar* path = NULL; + const gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* prefix = NULL; + gchar* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; + gboolean _tmp9_ = FALSE; + PhotoMetadata* metadata = NULL; + PhotoMetadata* _tmp17_ = NULL; + GError * _inner_error_ = NULL; +#line 121 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (camera != NULL, NULL); +#line 121 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (context != NULL, NULL); +#line 121 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (folder != NULL, NULL); +#line 121 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (filename != NULL, NULL); +#line 122 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + sifs = NULL; +#line 123 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + count = 0; +#line 124 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0_ = camera; +#line 124 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp1_ = context; +#line 124 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_camera_get_storageinfo (_tmp0_, &sifs, &_tmp2_, _tmp1_); +#line 124 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + count = _tmp2_; +#line 127 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp3_ = camera; +#line 127 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_camera_get_port_info (_tmp3_, &_tmp4_); +#line 127 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + (port_info); +#line 127 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + port_info = _tmp4_; +#line 130 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_port_info_get_path (port_info, &_tmp5_); +#line 130 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_free0 (path); +#line 130 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp6_ = g_strdup (_tmp5_); +#line 130 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + path = _tmp6_; +#line 132 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp7_ = g_strdup ("disk:"); +#line 132 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + prefix = _tmp7_; +#line 133 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp8_ = path; +#line 133 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp9_ = g_str_has_prefix (_tmp8_, prefix); +#line 133 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp9_) { +#line 1204 "GPhoto.c" + const gchar* _tmp10_ = NULL; + gint _tmp11_ = 0; + gint _tmp12_ = 0; + const gchar* _tmp13_ = NULL; + gint _tmp14_ = 0; + gint _tmp15_ = 0; + gchar* _tmp16_ = NULL; +#line 134 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp10_ = path; +#line 134 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp11_ = strlen (prefix); +#line 134 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp12_ = _tmp11_; +#line 134 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp13_ = path; +#line 134 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp14_ = strlen (_tmp13_); +#line 134 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp15_ = _tmp14_; +#line 134 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp16_ = string_slice (_tmp10_, (glong) _tmp12_, (glong) _tmp15_); +#line 134 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_free0 (path); +#line 134 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + path = _tmp16_; +#line 1230 "GPhoto.c" + } else { +#line 136 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + result = NULL; +#line 136 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_free0 (prefix); +#line 136 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_free0 (path); +#line 136 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + (port_info); +#line 136 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return result; +#line 1242 "GPhoto.c" + } +#line 138 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp17_ = photo_metadata_new (); +#line 138 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + metadata = _tmp17_; +#line 1248 "GPhoto.c" + { + PhotoMetadata* _tmp18_ = NULL; + const gchar* _tmp19_ = NULL; + const gchar* _tmp20_ = NULL; + gchar* _tmp21_ = NULL; + gchar* _tmp22_ = NULL; + gchar* _tmp23_ = NULL; + gchar* _tmp24_ = NULL; + const gchar* _tmp25_ = NULL; + gchar* _tmp26_ = NULL; + gchar* _tmp27_ = NULL; + GFile* _tmp28_ = NULL; + GFile* _tmp29_ = NULL; +#line 140 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp18_ = metadata; +#line 140 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp19_ = path; +#line 140 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp20_ = folder; +#line 140 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp21_ = g_strconcat (_tmp19_, _tmp20_, NULL); +#line 140 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp22_ = _tmp21_; +#line 140 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp23_ = g_strconcat (_tmp22_, "/", NULL); +#line 140 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp24_ = _tmp23_; +#line 140 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp25_ = filename; +#line 140 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp26_ = g_strconcat (_tmp24_, _tmp25_, NULL); +#line 140 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp27_ = _tmp26_; +#line 140 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp28_ = g_file_new_for_path (_tmp27_); +#line 140 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp29_ = _tmp28_; +#line 140 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + media_metadata_read_from_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_MEDIA_METADATA, MediaMetadata), _tmp29_, &_inner_error_); +#line 140 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_object_unref0 (_tmp29_); +#line 140 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_free0 (_tmp27_); +#line 140 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_free0 (_tmp24_); +#line 140 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_free0 (_tmp22_); +#line 140 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1298 "GPhoto.c" + goto __catch58_g_error; + } + } + goto __finally58; + __catch58_g_error: + { +#line 139 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_clear_error (&_inner_error_); +#line 139 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _inner_error_ = NULL; +#line 142 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _media_metadata_unref0 (metadata); +#line 142 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + metadata = NULL; +#line 1313 "GPhoto.c" + } + __finally58: +#line 139 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 139 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _media_metadata_unref0 (metadata); +#line 139 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_free0 (prefix); +#line 139 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_free0 (path); +#line 139 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + (port_info); +#line 139 "/home/jens/Source/shotwell/src/camera/GPhoto.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 139 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_clear_error (&_inner_error_); +#line 139 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return NULL; +#line 1332 "GPhoto.c" + } +#line 145 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + result = metadata; +#line 145 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_free0 (prefix); +#line 145 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_free0 (path); +#line 145 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + (port_info); +#line 145 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return result; +#line 1344 "GPhoto.c" +} + + +static guint8* _vala_array_dup23 (guint8* self, int length) { +#line 186 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return g_memdup (self, length * sizeof (guint8)); +#line 1351 "GPhoto.c" +} + + +GdkPixbuf* gp_load_preview (GPContext* context, Camera* camera, const gchar* folder, const gchar* filename, guint8** raw, int* raw_length1, gsize* raw_length, GError** error) { + guint8* _vala_raw = NULL; + int _vala_raw_length1 = 0; + gsize _vala_raw_length = 0UL; + GdkPixbuf* result = NULL; + guint8* _tmp25_ = NULL; + gint _tmp25__length1 = 0; + guint8* _tmp26_ = NULL; + gint _tmp26__length1 = 0; + gsize _tmp27_ = 0UL; + GMemoryInputStream* mins = NULL; + guint8* _tmp42_ = NULL; + gint _tmp42__length1 = 0; + guint8* _tmp43_ = NULL; + gint _tmp43__length1 = 0; + GMemoryInputStream* _tmp44_ = NULL; + GdkPixbuf* _tmp45_ = NULL; + GMemoryInputStream* _tmp46_ = NULL; + GdkPixbuf* _tmp47_ = NULL; + GdkPixbuf* _tmp48_ = NULL; + GError * _inner_error_ = NULL; +#line 148 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (context != NULL, NULL); +#line 148 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (camera != NULL, NULL); +#line 148 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (folder != NULL, NULL); +#line 148 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (filename != NULL, NULL); +#line 150 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _vala_raw = (g_free (_vala_raw), NULL); +#line 150 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _vala_raw = NULL; +#line 150 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _vala_raw_length1 = 0; +#line 151 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _vala_raw_length = (gsize) 0; +#line 1392 "GPhoto.c" + { + guint8* _tmp0_ = NULL; + GPContext* _tmp1_ = NULL; + Camera* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + gint _tmp5_ = 0; + guint8* _tmp6_ = NULL; + gint _tmp0__length1 = 0; + gint __tmp0__size_ = 0; + guint8* _tmp7_ = NULL; + gint _tmp7__length1 = 0; +#line 154 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp1_ = context; +#line 154 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp2_ = camera; +#line 154 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp3_ = folder; +#line 154 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp4_ = filename; +#line 154 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp6_ = gp_load_file_into_buffer (_tmp1_, _tmp2_, _tmp3_, _tmp4_, GP_FILE_TYPE_PREVIEW, &_tmp5_, &_inner_error_); +#line 154 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0_ = _tmp6_; +#line 154 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0__length1 = _tmp5_; +#line 154 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + __tmp0__size_ = _tmp0__length1; +#line 154 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1423 "GPhoto.c" + goto __catch59_g_error; + } +#line 154 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp7_ = _tmp0_; +#line 154 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp7__length1 = _tmp0__length1; +#line 154 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0_ = NULL; +#line 154 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0__length1 = 0; +#line 154 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _vala_raw = (g_free (_vala_raw), NULL); +#line 154 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _vala_raw = _tmp7_; +#line 154 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _vala_raw_length1 = _tmp7__length1; +#line 153 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0_ = (g_free (_tmp0_), NULL); +#line 1442 "GPhoto.c" + } + goto __finally59; + __catch59_g_error: + { + PhotoMetadata* metadata = NULL; + Camera* _tmp8_ = NULL; + GPContext* _tmp9_ = NULL; + const gchar* _tmp10_ = NULL; + const gchar* _tmp11_ = NULL; + PhotoMetadata* _tmp12_ = NULL; + PhotoMetadata* _tmp13_ = NULL; + PhotoMetadata* _tmp14_ = NULL; + guint _tmp15_ = 0U; + PhotoPreview* preview = NULL; + PhotoMetadata* _tmp16_ = NULL; + PhotoMetadata* _tmp17_ = NULL; + guint _tmp18_ = 0U; + PhotoPreview* _tmp19_ = NULL; + guint8* _tmp20_ = NULL; + PhotoPreview* _tmp21_ = NULL; + gint _tmp22_ = 0; + guint8* _tmp23_ = NULL; + gint _tmp20__length1 = 0; + gint __tmp20__size_ = 0; + guint8* _tmp24_ = NULL; + gint _tmp24__length1 = 0; +#line 153 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_clear_error (&_inner_error_); +#line 153 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _inner_error_ = NULL; +#line 156 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp8_ = camera; +#line 156 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp9_ = context; +#line 156 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp10_ = folder; +#line 156 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp11_ = filename; +#line 156 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp12_ = gp_get_fallback_metadata (_tmp8_, _tmp9_, _tmp10_, _tmp11_); +#line 156 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + metadata = _tmp12_; +#line 157 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp13_ = metadata; +#line 157 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (NULL == _tmp13_) { +#line 158 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + result = NULL; +#line 158 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _media_metadata_unref0 (metadata); +#line 158 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (raw) { +#line 158 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + *raw = _vala_raw; +#line 1497 "GPhoto.c" + } else { +#line 158 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _vala_raw = (g_free (_vala_raw), NULL); +#line 1501 "GPhoto.c" + } +#line 158 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (raw_length1) { +#line 158 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + *raw_length1 = _vala_raw_length1; +#line 1507 "GPhoto.c" + } +#line 158 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (raw_length) { +#line 158 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + *raw_length = _vala_raw_length; +#line 1513 "GPhoto.c" + } +#line 158 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return result; +#line 1517 "GPhoto.c" + } +#line 159 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp14_ = metadata; +#line 159 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp15_ = photo_metadata_get_preview_count (_tmp14_); +#line 159 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (((guint) 0) == _tmp15_) { +#line 160 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + result = NULL; +#line 160 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _media_metadata_unref0 (metadata); +#line 160 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (raw) { +#line 160 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + *raw = _vala_raw; +#line 1533 "GPhoto.c" + } else { +#line 160 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _vala_raw = (g_free (_vala_raw), NULL); +#line 1537 "GPhoto.c" + } +#line 160 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (raw_length1) { +#line 160 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + *raw_length1 = _vala_raw_length1; +#line 1543 "GPhoto.c" + } +#line 160 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (raw_length) { +#line 160 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + *raw_length = _vala_raw_length; +#line 1549 "GPhoto.c" + } +#line 160 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return result; +#line 1553 "GPhoto.c" + } +#line 161 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp16_ = metadata; +#line 161 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp17_ = metadata; +#line 161 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp18_ = photo_metadata_get_preview_count (_tmp17_); +#line 161 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp19_ = photo_metadata_get_preview (_tmp16_, _tmp18_ - 1); +#line 161 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + preview = _tmp19_; +#line 162 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp21_ = preview; +#line 162 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp23_ = photo_preview_flatten (_tmp21_, &_tmp22_, &_inner_error_); +#line 162 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp20_ = _tmp23_; +#line 162 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp20__length1 = _tmp22_; +#line 162 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + __tmp20__size_ = _tmp20__length1; +#line 162 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 162 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _photo_preview_unref0 (preview); +#line 162 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _media_metadata_unref0 (metadata); +#line 1581 "GPhoto.c" + goto __finally59; + } +#line 162 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp24_ = _tmp20_; +#line 162 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp24__length1 = _tmp20__length1; +#line 162 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp20_ = NULL; +#line 162 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp20__length1 = 0; +#line 162 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _vala_raw = (g_free (_vala_raw), NULL); +#line 162 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _vala_raw = _tmp24_; +#line 162 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _vala_raw_length1 = _tmp24__length1; +#line 153 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp20_ = (g_free (_tmp20_), NULL); +#line 153 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _photo_preview_unref0 (preview); +#line 153 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _media_metadata_unref0 (metadata); +#line 1604 "GPhoto.c" + } + __finally59: +#line 153 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 153 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_propagate_error (error, _inner_error_); +#line 153 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return NULL; +#line 1613 "GPhoto.c" + } +#line 165 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp25_ = _vala_raw; +#line 165 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp25__length1 = _vala_raw_length1; +#line 165 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp25_ == NULL) { +#line 166 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _vala_raw_length = (gsize) 0; +#line 167 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + result = NULL; +#line 167 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (raw) { +#line 167 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + *raw = _vala_raw; +#line 1629 "GPhoto.c" + } else { +#line 167 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _vala_raw = (g_free (_vala_raw), NULL); +#line 1633 "GPhoto.c" + } +#line 167 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (raw_length1) { +#line 167 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + *raw_length1 = _vala_raw_length1; +#line 1639 "GPhoto.c" + } +#line 167 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (raw_length) { +#line 167 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + *raw_length = _vala_raw_length; +#line 1645 "GPhoto.c" + } +#line 167 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return result; +#line 1649 "GPhoto.c" + } +#line 170 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp26_ = _vala_raw; +#line 170 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp26__length1 = _vala_raw_length1; +#line 170 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _vala_raw_length = (gsize) _tmp26__length1; +#line 176 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp27_ = _vala_raw_length; +#line 176 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp27_ > ((gsize) 32)) { +#line 1661 "GPhoto.c" + { + gsize i = 0UL; + gsize _tmp28_ = 0UL; +#line 177 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp28_ = _vala_raw_length; +#line 177 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + i = _tmp28_ - 2; +#line 1669 "GPhoto.c" + { + gboolean _tmp29_ = FALSE; +#line 177 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp29_ = TRUE; +#line 177 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + while (TRUE) { +#line 1676 "GPhoto.c" + gsize _tmp31_ = 0UL; + gsize _tmp32_ = 0UL; + gboolean _tmp33_ = FALSE; + guint8* _tmp34_ = NULL; + gint _tmp34__length1 = 0; + gsize _tmp35_ = 0UL; + guint8 _tmp36_ = 0U; +#line 177 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (!_tmp29_) { +#line 1686 "GPhoto.c" + gsize _tmp30_ = 0UL; +#line 177 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp30_ = i; +#line 177 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + i = _tmp30_ - 1; +#line 1692 "GPhoto.c" + } +#line 177 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp29_ = FALSE; +#line 177 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp31_ = i; +#line 177 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp32_ = _vala_raw_length; +#line 177 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (!(_tmp31_ > (_tmp32_ - 32))) { +#line 177 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + break; +#line 1704 "GPhoto.c" + } +#line 178 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp34_ = _vala_raw; +#line 178 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp34__length1 = _vala_raw_length1; +#line 178 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp35_ = i; +#line 178 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp36_ = _tmp34_[_tmp35_]; +#line 178 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp36_ == JPEG_MARKER_PREFIX) { +#line 1716 "GPhoto.c" + guint8* _tmp37_ = NULL; + gint _tmp37__length1 = 0; + gsize _tmp38_ = 0UL; + guint8 _tmp39_ = 0U; +#line 178 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp37_ = _vala_raw; +#line 178 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp37__length1 = _vala_raw_length1; +#line 178 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp38_ = i; +#line 178 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp39_ = _tmp37_[_tmp38_ + 1]; +#line 178 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp33_ = _tmp39_ == JPEG_MARKER_EOI; +#line 1731 "GPhoto.c" + } else { +#line 178 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp33_ = FALSE; +#line 1735 "GPhoto.c" + } +#line 178 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp33_) { +#line 1739 "GPhoto.c" + const gchar* _tmp40_ = NULL; + gsize _tmp41_ = 0UL; +#line 179 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp40_ = filename; +#line 179 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_debug ("GPhoto.vala:179: Adjusted length of thumbnail for: %s", _tmp40_); +#line 180 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp41_ = i; +#line 180 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _vala_raw_length = _tmp41_ + 2; +#line 181 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + break; +#line 1752 "GPhoto.c" + } + } + } + } + } +#line 186 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp42_ = _vala_raw; +#line 186 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp42__length1 = _vala_raw_length1; +#line 186 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp43_ = (_tmp42_ != NULL) ? _vala_array_dup23 (_tmp42_, _tmp42__length1) : ((gpointer) _tmp42_); +#line 186 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp43__length1 = _tmp42__length1; +#line 186 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp44_ = (GMemoryInputStream*) g_memory_input_stream_new_from_data (_tmp43_, _tmp43__length1, NULL); +#line 186 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + mins = _tmp44_; +#line 187 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp46_ = mins; +#line 187 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp47_ = gdk_pixbuf_new_from_stream_at_scale (G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, G_TYPE_INPUT_STREAM, GInputStream), IMPORT_PREVIEW_MAX_SCALE, IMPORT_PREVIEW_MAX_SCALE, TRUE, NULL, &_inner_error_); +#line 187 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp45_ = _tmp47_; +#line 187 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 187 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_propagate_error (error, _inner_error_); +#line 187 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_object_unref0 (mins); +#line 187 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return NULL; +#line 1784 "GPhoto.c" + } +#line 187 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp48_ = _tmp45_; +#line 187 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp45_ = NULL; +#line 187 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + result = _tmp48_; +#line 187 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_object_unref0 (_tmp45_); +#line 187 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_object_unref0 (mins); +#line 187 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (raw) { +#line 187 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + *raw = _vala_raw; +#line 1800 "GPhoto.c" + } else { +#line 187 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _vala_raw = (g_free (_vala_raw), NULL); +#line 1804 "GPhoto.c" + } +#line 187 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (raw_length1) { +#line 187 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + *raw_length1 = _vala_raw_length1; +#line 1810 "GPhoto.c" + } +#line 187 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (raw_length) { +#line 187 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + *raw_length = _vala_raw_length; +#line 1816 "GPhoto.c" + } +#line 187 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return result; +#line 1820 "GPhoto.c" +} + + +GdkPixbuf* gp_load_image (GPContext* context, Camera* camera, const gchar* folder, const gchar* filename, GError** error) { + GdkPixbuf* result = NULL; + GInputStream* ins = NULL; + GPContext* _tmp0_ = NULL; + Camera* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + GInputStream* _tmp4_ = NULL; + GInputStream* _tmp5_ = NULL; + GdkPixbuf* _tmp6_ = NULL; + GInputStream* _tmp7_ = NULL; + GdkPixbuf* _tmp8_ = NULL; + GdkPixbuf* _tmp9_ = NULL; + GError * _inner_error_ = NULL; +#line 190 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (context != NULL, NULL); +#line 190 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (camera != NULL, NULL); +#line 190 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (folder != NULL, NULL); +#line 190 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (filename != NULL, NULL); +#line 192 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0_ = context; +#line 192 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp1_ = camera; +#line 192 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp2_ = folder; +#line 192 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp3_ = filename; +#line 192 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp4_ = gp_load_file_into_stream (_tmp0_, _tmp1_, _tmp2_, _tmp3_, GP_FILE_TYPE_NORMAL, &_inner_error_); +#line 192 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + ins = _tmp4_; +#line 192 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 192 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_propagate_error (error, _inner_error_); +#line 192 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return NULL; +#line 1864 "GPhoto.c" + } +#line 193 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp5_ = ins; +#line 193 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp5_ == NULL) { +#line 194 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + result = NULL; +#line 194 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_object_unref0 (ins); +#line 194 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return result; +#line 1876 "GPhoto.c" + } +#line 196 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp7_ = ins; +#line 196 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp8_ = gdk_pixbuf_new_from_stream (_tmp7_, NULL, &_inner_error_); +#line 196 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp6_ = _tmp8_; +#line 196 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 196 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_propagate_error (error, _inner_error_); +#line 196 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_object_unref0 (ins); +#line 196 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return NULL; +#line 1892 "GPhoto.c" + } +#line 196 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp9_ = _tmp6_; +#line 196 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp6_ = NULL; +#line 196 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + result = _tmp9_; +#line 196 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_object_unref0 (_tmp6_); +#line 196 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_object_unref0 (ins); +#line 196 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return result; +#line 1906 "GPhoto.c" +} + + +void gp_save_image (GPContext* context, Camera* camera, const gchar* folder, const gchar* filename, GFile* dest_file, GError** error) { + CameraFile* camera_file = NULL; + int res = 0; + CameraFile* _tmp0_ = NULL; + int _tmp1_ = 0; + int _tmp2_ = 0; + Camera* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; + const gchar* _tmp9_ = NULL; + CameraFile* _tmp10_ = NULL; + GPContext* _tmp11_ = NULL; + int _tmp12_ = 0; + int _tmp13_ = 0; + CameraFile* _tmp20_ = NULL; + GFile* _tmp21_ = NULL; + gchar* _tmp22_ = NULL; + gchar* _tmp23_ = NULL; + int _tmp24_ = 0; + int _tmp25_ = 0; + GError * _inner_error_ = NULL; +#line 199 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (context != NULL); +#line 199 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (camera != NULL); +#line 199 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (folder != NULL); +#line 199 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (filename != NULL); +#line 199 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_if_fail (G_IS_FILE (dest_file)); +#line 202 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp1_ = gp_file_new (&_tmp0_); +#line 202 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _gp_file_unref0 (camera_file); +#line 202 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + camera_file = _tmp0_; +#line 202 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + res = _tmp1_; +#line 203 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp2_ = res; +#line 203 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp2_ != GP_OK) { +#line 1952 "GPhoto.c" + int _tmp3_ = 0; + int _tmp4_ = 0; + const gchar* _tmp5_ = NULL; + GError* _tmp6_ = NULL; +#line 204 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp3_ = res; +#line 204 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp4_ = res; +#line 204 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp5_ = gp_port_result_as_string (_tmp4_); +#line 204 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp6_ = g_error_new (GPHOTO_ERROR, GPHOTO_ERROR_LIBRARY, "[%d] Error allocating camera file: %s", (gint) _tmp3_, _tmp5_); +#line 204 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _inner_error_ = _tmp6_; +#line 204 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_propagate_error (error, _inner_error_); +#line 204 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _gp_file_unref0 (camera_file); +#line 204 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return; +#line 1973 "GPhoto.c" + } +#line 206 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp7_ = camera; +#line 206 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp8_ = folder; +#line 206 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp9_ = filename; +#line 206 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp10_ = camera_file; +#line 206 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp11_ = context; +#line 206 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp12_ = gp_camera_file_get (_tmp7_, _tmp8_, _tmp9_, GP_FILE_TYPE_NORMAL, _tmp10_, _tmp11_); +#line 206 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + res = _tmp12_; +#line 207 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp13_ = res; +#line 207 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp13_ != GP_OK) { +#line 1993 "GPhoto.c" + int _tmp14_ = 0; + const gchar* _tmp15_ = NULL; + const gchar* _tmp16_ = NULL; + int _tmp17_ = 0; + const gchar* _tmp18_ = NULL; + GError* _tmp19_ = NULL; +#line 208 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp14_ = res; +#line 208 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp15_ = folder; +#line 208 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp16_ = filename; +#line 208 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp17_ = res; +#line 208 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp18_ = gp_port_result_as_string (_tmp17_); +#line 208 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp19_ = g_error_new (GPHOTO_ERROR, GPHOTO_ERROR_LIBRARY, "[%d] Error retrieving file object for %s/%s: %s", (gint) _tmp14_, _tmp15_, _tmp16_, _tmp18_); +#line 208 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _inner_error_ = _tmp19_; +#line 208 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_propagate_error (error, _inner_error_); +#line 208 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _gp_file_unref0 (camera_file); +#line 208 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return; +#line 2020 "GPhoto.c" + } +#line 211 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp20_ = camera_file; +#line 211 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp21_ = dest_file; +#line 211 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp22_ = g_file_get_path (_tmp21_); +#line 211 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp23_ = _tmp22_; +#line 211 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp24_ = gp_file_save (_tmp20_, _tmp23_); +#line 211 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + res = _tmp24_; +#line 211 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_free0 (_tmp23_); +#line 212 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp25_ = res; +#line 212 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp25_ != GP_OK) { +#line 2040 "GPhoto.c" + int _tmp26_ = 0; + const gchar* _tmp27_ = NULL; + const gchar* _tmp28_ = NULL; + GFile* _tmp29_ = NULL; + gchar* _tmp30_ = NULL; + gchar* _tmp31_ = NULL; + int _tmp32_ = 0; + const gchar* _tmp33_ = NULL; + GError* _tmp34_ = NULL; + GError* _tmp35_ = NULL; +#line 213 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp26_ = res; +#line 213 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp27_ = folder; +#line 213 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp28_ = filename; +#line 213 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp29_ = dest_file; +#line 213 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp30_ = g_file_get_path (_tmp29_); +#line 213 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp31_ = _tmp30_; +#line 213 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp32_ = res; +#line 213 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp33_ = gp_port_result_as_string (_tmp32_); +#line 213 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp34_ = g_error_new (GPHOTO_ERROR, GPHOTO_ERROR_LIBRARY, "[%d] Error copying file %s/%s to %s: %s", (gint) _tmp26_, _tmp27_, _tmp28_, _tmp31_, _tmp33_); +#line 213 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp35_ = _tmp34_; +#line 213 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_free0 (_tmp31_); +#line 213 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _inner_error_ = _tmp35_; +#line 213 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_propagate_error (error, _inner_error_); +#line 213 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _gp_file_unref0 (camera_file); +#line 213 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return; +#line 2081 "GPhoto.c" + } +#line 199 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _gp_file_unref0 (camera_file); +#line 2085 "GPhoto.c" +} + + +PhotoMetadata* gp_load_metadata (GPContext* context, Camera* camera, const gchar* folder, const gchar* filename, GError** error) { + PhotoMetadata* result = NULL; + guint8* camera_raw = NULL; + gint camera_raw_length1 = 0; + gint _camera_raw_size_ = 0; + gboolean _tmp13_ = FALSE; + guint8* _tmp14_ = NULL; + gint _tmp14__length1 = 0; + PhotoMetadata* metadata = NULL; + PhotoMetadata* _tmp16_ = NULL; + PhotoMetadata* _tmp17_ = NULL; + guint8* _tmp18_ = NULL; + gint _tmp18__length1 = 0; + GError * _inner_error_ = NULL; +#line 217 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (context != NULL, NULL); +#line 217 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (camera != NULL, NULL); +#line 217 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (folder != NULL, NULL); +#line 217 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (filename != NULL, NULL); +#line 219 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + camera_raw = NULL; +#line 219 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + camera_raw_length1 = 0; +#line 219 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _camera_raw_size_ = camera_raw_length1; +#line 2117 "GPhoto.c" + { + guint8* _tmp0_ = NULL; + GPContext* _tmp1_ = NULL; + Camera* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + gint _tmp5_ = 0; + guint8* _tmp6_ = NULL; + gint _tmp0__length1 = 0; + gint __tmp0__size_ = 0; + guint8* _tmp7_ = NULL; + gint _tmp7__length1 = 0; +#line 221 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp1_ = context; +#line 221 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp2_ = camera; +#line 221 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp3_ = folder; +#line 221 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp4_ = filename; +#line 221 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp6_ = gp_load_file_into_buffer (_tmp1_, _tmp2_, _tmp3_, _tmp4_, GP_FILE_TYPE_EXIF, &_tmp5_, &_inner_error_); +#line 221 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0_ = _tmp6_; +#line 221 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0__length1 = _tmp5_; +#line 221 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + __tmp0__size_ = _tmp0__length1; +#line 221 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 2148 "GPhoto.c" + goto __catch60_g_error; + } +#line 221 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp7_ = _tmp0_; +#line 221 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp7__length1 = _tmp0__length1; +#line 221 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0_ = NULL; +#line 221 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0__length1 = 0; +#line 221 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + camera_raw = (g_free (camera_raw), NULL); +#line 221 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + camera_raw = _tmp7_; +#line 221 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + camera_raw_length1 = _tmp7__length1; +#line 221 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _camera_raw_size_ = camera_raw_length1; +#line 220 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0_ = (g_free (_tmp0_), NULL); +#line 2169 "GPhoto.c" + } + goto __finally60; + __catch60_g_error: + { + Camera* _tmp8_ = NULL; + GPContext* _tmp9_ = NULL; + const gchar* _tmp10_ = NULL; + const gchar* _tmp11_ = NULL; + PhotoMetadata* _tmp12_ = NULL; +#line 220 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_clear_error (&_inner_error_); +#line 220 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _inner_error_ = NULL; +#line 223 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp8_ = camera; +#line 223 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp9_ = context; +#line 223 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp10_ = folder; +#line 223 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp11_ = filename; +#line 223 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp12_ = gp_get_fallback_metadata (_tmp8_, _tmp9_, _tmp10_, _tmp11_); +#line 223 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + result = _tmp12_; +#line 223 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + camera_raw = (g_free (camera_raw), NULL); +#line 223 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return result; +#line 2199 "GPhoto.c" + } + __finally60: +#line 220 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 220 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_propagate_error (error, _inner_error_); +#line 220 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + camera_raw = (g_free (camera_raw), NULL); +#line 220 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return NULL; +#line 2210 "GPhoto.c" + } +#line 226 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp14_ = camera_raw; +#line 226 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp14__length1 = camera_raw_length1; +#line 226 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp14_ == NULL) { +#line 226 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp13_ = TRUE; +#line 2220 "GPhoto.c" + } else { + guint8* _tmp15_ = NULL; + gint _tmp15__length1 = 0; +#line 226 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp15_ = camera_raw; +#line 226 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp15__length1 = camera_raw_length1; +#line 226 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp13_ = _tmp15__length1 == 0; +#line 2230 "GPhoto.c" + } +#line 226 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp13_) { +#line 227 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + result = NULL; +#line 227 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + camera_raw = (g_free (camera_raw), NULL); +#line 227 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return result; +#line 2240 "GPhoto.c" + } +#line 229 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp16_ = photo_metadata_new (); +#line 229 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + metadata = _tmp16_; +#line 230 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp17_ = metadata; +#line 230 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp18_ = camera_raw; +#line 230 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp18__length1 = camera_raw_length1; +#line 230 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + photo_metadata_read_from_app1_segment (_tmp17_, _tmp18_, _tmp18__length1, 0, &_inner_error_); +#line 230 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 230 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_propagate_error (error, _inner_error_); +#line 230 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _media_metadata_unref0 (metadata); +#line 230 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + camera_raw = (g_free (camera_raw), NULL); +#line 230 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return NULL; +#line 2264 "GPhoto.c" + } +#line 232 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + result = metadata; +#line 232 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + camera_raw = (g_free (camera_raw), NULL); +#line 232 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return result; +#line 2272 "GPhoto.c" +} + + +static guint8* _vala_array_dup24 (guint8* self, int length) { +#line 259 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return g_memdup (self, length * sizeof (guint8)); +#line 2279 "GPhoto.c" +} + + +static void _gp_on_mins_destroyed_gdestroy_notify (void* data) { +#line 259 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + gp_on_mins_destroyed (data); +#line 2286 "GPhoto.c" +} + + +GInputStream* gp_load_file_into_stream (GPContext* context, Camera* camera, const gchar* folder, const gchar* filename, CameraFileType filetype, GError** error) { + GInputStream* result = NULL; + CameraFile* camera_file = NULL; + int res = 0; + CameraFile* _tmp0_ = NULL; + int _tmp1_ = 0; + int _tmp2_ = 0; + Camera* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; + const gchar* _tmp9_ = NULL; + CameraFileType _tmp10_ = 0; + GPContext* _tmp11_ = NULL; + int _tmp12_ = 0; + int _tmp13_ = 0; + guint8* data = NULL; + gulong data_len = 0UL; + guint8* _tmp20_ = NULL; + gulong _tmp21_ = 0UL; + int _tmp22_ = 0; + int _tmp23_ = 0; + GFile* temp = NULL; + GFile* _tmp32_ = NULL; + GFile* _tmp33_ = NULL; + GFile* _tmp34_ = NULL; + GFile* _tmp35_ = NULL; + GFile* _tmp36_ = NULL; + gchar* _tmp37_ = NULL; + gchar* _tmp38_ = NULL; + int _tmp39_ = 0; + int _tmp40_ = 0; + GFileInputStream* _tmp51_ = NULL; + GFile* _tmp52_ = NULL; + GFileInputStream* _tmp53_ = NULL; + GFileInputStream* _tmp54_ = NULL; + GError * _inner_error_ = NULL; +#line 237 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (context != NULL, NULL); +#line 237 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (camera != NULL, NULL); +#line 237 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (folder != NULL, NULL); +#line 237 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (filename != NULL, NULL); +#line 240 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp1_ = gp_file_new (&_tmp0_); +#line 240 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _gp_file_unref0 (camera_file); +#line 240 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + camera_file = _tmp0_; +#line 240 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + res = _tmp1_; +#line 241 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp2_ = res; +#line 241 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp2_ != GP_OK) { +#line 2345 "GPhoto.c" + int _tmp3_ = 0; + int _tmp4_ = 0; + const gchar* _tmp5_ = NULL; + GError* _tmp6_ = NULL; +#line 242 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp3_ = res; +#line 242 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp4_ = res; +#line 242 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp5_ = gp_port_result_as_string (_tmp4_); +#line 242 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp6_ = g_error_new (GPHOTO_ERROR, GPHOTO_ERROR_LIBRARY, "[%d] Error allocating camera file: %s", (gint) _tmp3_, _tmp5_); +#line 242 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _inner_error_ = _tmp6_; +#line 242 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_propagate_error (error, _inner_error_); +#line 242 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _gp_file_unref0 (camera_file); +#line 242 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return NULL; +#line 2366 "GPhoto.c" + } +#line 244 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp7_ = camera; +#line 244 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp8_ = folder; +#line 244 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp9_ = filename; +#line 244 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp10_ = filetype; +#line 244 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp11_ = context; +#line 244 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp12_ = gp_camera_file_get (_tmp7_, _tmp8_, _tmp9_, _tmp10_, camera_file, _tmp11_); +#line 244 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + res = _tmp12_; +#line 245 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp13_ = res; +#line 245 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp13_ != GP_OK) { +#line 2386 "GPhoto.c" + int _tmp14_ = 0; + const gchar* _tmp15_ = NULL; + const gchar* _tmp16_ = NULL; + int _tmp17_ = 0; + const gchar* _tmp18_ = NULL; + GError* _tmp19_ = NULL; +#line 246 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp14_ = res; +#line 246 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp15_ = folder; +#line 246 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp16_ = filename; +#line 246 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp17_ = res; +#line 246 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp18_ = gp_port_result_as_string (_tmp17_); +#line 246 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp19_ = g_error_new (GPHOTO_ERROR, GPHOTO_ERROR_LIBRARY, "[%d] Error retrieving file object for %s/%s: %s", (gint) _tmp14_, _tmp15_, _tmp16_, _tmp18_); +#line 246 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _inner_error_ = _tmp19_; +#line 246 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_propagate_error (error, _inner_error_); +#line 246 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _gp_file_unref0 (camera_file); +#line 246 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return NULL; +#line 2413 "GPhoto.c" + } +#line 254 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp22_ = gp_file_get_data_and_size (camera_file, &_tmp20_, &_tmp21_); +#line 254 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + data = _tmp20_; +#line 254 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + data_len = _tmp21_; +#line 254 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + res = _tmp22_; +#line 255 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp23_ = res; +#line 255 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp23_ == GP_OK) { +#line 2427 "GPhoto.c" + guint8* buffer = NULL; + gulong _tmp24_ = 0UL; + guint8* _tmp25_ = NULL; + gint buffer_length1 = 0; + gint _buffer_size_ = 0; + guint8* _tmp26_ = NULL; + gint _tmp26__length1 = 0; + guint8* _tmp27_ = NULL; + guint8* _tmp28_ = NULL; + gint _tmp28__length1 = 0; + guint8* _tmp29_ = NULL; + gint _tmp29__length1 = 0; + guint8* _tmp30_ = NULL; + gint _tmp30__length1 = 0; + GMemoryInputStream* _tmp31_ = NULL; +#line 256 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp24_ = data_len; +#line 256 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp25_ = g_new0 (guint8, _tmp24_); +#line 256 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + buffer = _tmp25_; +#line 256 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + buffer_length1 = _tmp24_; +#line 256 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _buffer_size_ = buffer_length1; +#line 257 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp26_ = buffer; +#line 257 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp26__length1 = buffer_length1; +#line 257 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp27_ = data; +#line 257 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp28_ = buffer; +#line 257 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp28__length1 = buffer_length1; +#line 257 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + memcpy (_tmp26_, _tmp27_, (gsize) _tmp28__length1); +#line 259 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp29_ = buffer; +#line 259 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp29__length1 = buffer_length1; +#line 259 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp30_ = (_tmp29_ != NULL) ? _vala_array_dup24 (_tmp29_, _tmp29__length1) : ((gpointer) _tmp29_); +#line 259 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp30__length1 = _tmp29__length1; +#line 259 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp31_ = (GMemoryInputStream*) g_memory_input_stream_new_from_data (_tmp30_, _tmp30__length1, _gp_on_mins_destroyed_gdestroy_notify); +#line 259 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, G_TYPE_INPUT_STREAM, GInputStream); +#line 259 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + buffer = (g_free (buffer), NULL); +#line 259 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _gp_file_unref0 (camera_file); +#line 259 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return result; +#line 2483 "GPhoto.c" + } +#line 263 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp32_ = app_dirs_get_temp_dir (); +#line 263 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp33_ = _tmp32_; +#line 263 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp34_ = g_file_get_child (_tmp33_, "import.tmp"); +#line 263 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp35_ = _tmp34_; +#line 263 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_object_unref0 (_tmp33_); +#line 263 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + temp = _tmp35_; +#line 264 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp36_ = temp; +#line 264 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp37_ = g_file_get_path (_tmp36_); +#line 264 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp38_ = _tmp37_; +#line 264 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp39_ = gp_file_save (camera_file, _tmp38_); +#line 264 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + res = _tmp39_; +#line 264 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_free0 (_tmp38_); +#line 265 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp40_ = res; +#line 265 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp40_ != GP_OK) { +#line 2513 "GPhoto.c" + int _tmp41_ = 0; + const gchar* _tmp42_ = NULL; + const gchar* _tmp43_ = NULL; + GFile* _tmp44_ = NULL; + gchar* _tmp45_ = NULL; + gchar* _tmp46_ = NULL; + int _tmp47_ = 0; + const gchar* _tmp48_ = NULL; + GError* _tmp49_ = NULL; + GError* _tmp50_ = NULL; +#line 266 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp41_ = res; +#line 266 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp42_ = folder; +#line 266 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp43_ = filename; +#line 266 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp44_ = temp; +#line 266 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp45_ = g_file_get_path (_tmp44_); +#line 266 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp46_ = _tmp45_; +#line 266 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp47_ = res; +#line 266 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp48_ = gp_port_result_as_string (_tmp47_); +#line 266 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp49_ = g_error_new (GPHOTO_ERROR, GPHOTO_ERROR_LIBRARY, "[%d] Error copying file %s/%s to %s: %s", (gint) _tmp41_, _tmp42_, _tmp43_, _tmp46_, _tmp48_); +#line 266 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp50_ = _tmp49_; +#line 266 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_free0 (_tmp46_); +#line 266 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _inner_error_ = _tmp50_; +#line 266 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_propagate_error (error, _inner_error_); +#line 266 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_object_unref0 (temp); +#line 266 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _gp_file_unref0 (camera_file); +#line 266 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return NULL; +#line 2556 "GPhoto.c" + } +#line 269 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp52_ = temp; +#line 269 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp53_ = g_file_read (_tmp52_, NULL, &_inner_error_); +#line 269 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp51_ = _tmp53_; +#line 269 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 269 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_propagate_error (error, _inner_error_); +#line 269 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_object_unref0 (temp); +#line 269 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _gp_file_unref0 (camera_file); +#line 269 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return NULL; +#line 2574 "GPhoto.c" + } +#line 269 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp54_ = _tmp51_; +#line 269 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp51_ = NULL; +#line 269 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp54_, G_TYPE_INPUT_STREAM, GInputStream); +#line 269 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_object_unref0 (_tmp51_); +#line 269 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _g_object_unref0 (temp); +#line 269 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _gp_file_unref0 (camera_file); +#line 269 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return result; +#line 2590 "GPhoto.c" +} + + +void gp_on_mins_destroyed (void* data) { + void* _tmp0_ = NULL; +#line 273 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp0_ = data; +#line 273 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_free (_tmp0_); +#line 2600 "GPhoto.c" +} + + +guint8* gp_load_file_into_buffer (GPContext* context, Camera* camera, const gchar* folder, const gchar* filename, CameraFileType filetype, int* result_length1, GError** error) { + guint8* result = NULL; + CameraFile* camera_file = NULL; + int res = 0; + CameraFile* _tmp0_ = NULL; + int _tmp1_ = 0; + int _tmp2_ = 0; + Camera* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; + const gchar* _tmp9_ = NULL; + CameraFileType _tmp10_ = 0; + CameraFile* _tmp11_ = NULL; + GPContext* _tmp12_ = NULL; + int _tmp13_ = 0; + int _tmp14_ = 0; + guint8* data = NULL; + gulong data_len = 0UL; + CameraFile* _tmp21_ = NULL; + guint8* _tmp22_ = NULL; + gulong _tmp23_ = 0UL; + int _tmp24_ = 0; + int _tmp25_ = 0; + guint8* buffer = NULL; + gulong _tmp27_ = 0UL; + guint8* _tmp28_ = NULL; + gint buffer_length1 = 0; + gint _buffer_size_ = 0; + guint8* _tmp29_ = NULL; + gint _tmp29__length1 = 0; + guint8* _tmp30_ = NULL; + guint8* _tmp31_ = NULL; + gint _tmp31__length1 = 0; + guint8* _tmp32_ = NULL; + gint _tmp32__length1 = 0; + GError * _inner_error_ = NULL; +#line 277 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (context != NULL, NULL); +#line 277 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (camera != NULL, NULL); +#line 277 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (folder != NULL, NULL); +#line 277 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_return_val_if_fail (filename != NULL, NULL); +#line 280 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp1_ = gp_file_new (&_tmp0_); +#line 280 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _gp_file_unref0 (camera_file); +#line 280 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + camera_file = _tmp0_; +#line 280 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + res = _tmp1_; +#line 281 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp2_ = res; +#line 281 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp2_ != GP_OK) { +#line 2659 "GPhoto.c" + int _tmp3_ = 0; + int _tmp4_ = 0; + const gchar* _tmp5_ = NULL; + GError* _tmp6_ = NULL; +#line 282 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp3_ = res; +#line 282 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp4_ = res; +#line 282 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp5_ = gp_port_result_as_string (_tmp4_); +#line 282 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp6_ = g_error_new (GPHOTO_ERROR, GPHOTO_ERROR_LIBRARY, "[%d] Error allocating camera file: %s", (gint) _tmp3_, _tmp5_); +#line 282 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _inner_error_ = _tmp6_; +#line 282 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_propagate_error (error, _inner_error_); +#line 282 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _gp_file_unref0 (camera_file); +#line 282 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return NULL; +#line 2680 "GPhoto.c" + } +#line 284 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp7_ = camera; +#line 284 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp8_ = folder; +#line 284 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp9_ = filename; +#line 284 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp10_ = filetype; +#line 284 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp11_ = camera_file; +#line 284 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp12_ = context; +#line 284 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp13_ = gp_camera_file_get (_tmp7_, _tmp8_, _tmp9_, _tmp10_, _tmp11_, _tmp12_); +#line 284 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + res = _tmp13_; +#line 285 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp14_ = res; +#line 285 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp14_ != GP_OK) { +#line 2702 "GPhoto.c" + int _tmp15_ = 0; + const gchar* _tmp16_ = NULL; + const gchar* _tmp17_ = NULL; + int _tmp18_ = 0; + const gchar* _tmp19_ = NULL; + GError* _tmp20_ = NULL; +#line 286 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp15_ = res; +#line 286 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp16_ = folder; +#line 286 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp17_ = filename; +#line 286 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp18_ = res; +#line 286 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp19_ = gp_port_result_as_string (_tmp18_); +#line 286 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp20_ = g_error_new (GPHOTO_ERROR, GPHOTO_ERROR_LIBRARY, "[%d] Error retrieving file object for %s/%s: %s", (gint) _tmp15_, _tmp16_, _tmp17_, _tmp19_); +#line 286 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _inner_error_ = _tmp20_; +#line 286 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + g_propagate_error (error, _inner_error_); +#line 286 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _gp_file_unref0 (camera_file); +#line 286 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return NULL; +#line 2729 "GPhoto.c" + } +#line 293 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp21_ = camera_file; +#line 293 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp24_ = gp_file_get_data_and_size (_tmp21_, &_tmp22_, &_tmp23_); +#line 293 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + data = _tmp22_; +#line 293 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + data_len = _tmp23_; +#line 293 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + res = _tmp24_; +#line 294 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp25_ = res; +#line 294 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (_tmp25_ != GP_OK) { +#line 2745 "GPhoto.c" + guint8* _tmp26_ = NULL; + gint _tmp26__length1 = 0; +#line 295 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp26_ = NULL; +#line 295 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp26__length1 = 0; +#line 295 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (result_length1) { +#line 295 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + *result_length1 = _tmp26__length1; +#line 2756 "GPhoto.c" + } +#line 295 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + result = _tmp26_; +#line 295 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _gp_file_unref0 (camera_file); +#line 295 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return result; +#line 2764 "GPhoto.c" + } +#line 297 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp27_ = data_len; +#line 297 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp28_ = g_new0 (guint8, _tmp27_); +#line 297 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + buffer = _tmp28_; +#line 297 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + buffer_length1 = _tmp27_; +#line 297 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _buffer_size_ = buffer_length1; +#line 298 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp29_ = buffer; +#line 298 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp29__length1 = buffer_length1; +#line 298 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp30_ = data; +#line 298 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp31_ = buffer; +#line 298 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp31__length1 = buffer_length1; +#line 298 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + memcpy (_tmp29_, _tmp30_, (gsize) _tmp31__length1); +#line 300 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp32_ = buffer; +#line 300 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _tmp32__length1 = buffer_length1; +#line 300 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + if (result_length1) { +#line 300 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + *result_length1 = _tmp32__length1; +#line 2796 "GPhoto.c" + } +#line 300 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + result = _tmp32_; +#line 300 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + _gp_file_unref0 (camera_file); +#line 300 "/home/jens/Source/shotwell/src/camera/GPhoto.vala" + return result; +#line 2804 "GPhoto.c" +} + + + diff --git a/src/camera/ImportPage.c b/src/camera/ImportPage.c new file mode 100644 index 0000000..810c2b6 --- /dev/null +++ b/src/camera/ImportPage.c @@ -0,0 +1,13681 @@ +/* ImportPage.c generated by valac 0.32.1, the Vala compiler + * generated from ImportPage.vala, do not modify */ + +/* Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU LGPL (version 2.1 or later). + * See the COPYING file in this distribution. + */ + +#include <glib.h> +#include <glib-object.h> +#include <stdlib.h> +#include <string.h> +#include <gee.h> +#include <gdk-pixbuf/gdk-pixbuf.h> +#include <time.h> +#include <gphoto2/gphoto2-camera.h> +#include <gphoto.h> +#include <gphoto2/gphoto2-result.h> +#include <gphoto2/gphoto2-port-result.h> +#include <float.h> +#include <math.h> +#include <gphoto2/gphoto2-context.h> +#include <cairo.h> +#include <gdk/gdk.h> +#include <pango/pango.h> +#include <glib/gi18n-lib.h> +#include <gio/gio.h> +#include <gtk/gtk.h> +#include <gphoto2/gphoto2-abilities-list.h> +#include <gphoto2/gphoto2-list.h> +#include <gphoto2/gphoto2-filesys.h> + + +#define TYPE_DATA_COLLECTION (data_collection_get_type ()) +#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection)) +#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass)) +#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION)) +#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION)) +#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass)) + +typedef struct _DataCollection DataCollection; +typedef struct _DataCollectionClass DataCollectionClass; +typedef struct _DataCollectionPrivate DataCollectionPrivate; + +#define TYPE_DATA_OBJECT (data_object_get_type ()) +#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject)) +#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass)) +#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT)) +#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT)) +#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass)) + +typedef struct _DataObject DataObject; +typedef struct _DataObjectClass DataObjectClass; + +#define TYPE_ALTERATION (alteration_get_type ()) +#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) +#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) +#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) +#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) +#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) + +typedef struct _Alteration Alteration; +typedef struct _AlterationClass AlterationClass; + +#define TYPE_MARKER (marker_get_type ()) +#define MARKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MARKER, Marker)) +#define IS_MARKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MARKER)) +#define MARKER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MARKER, MarkerIface)) + +typedef struct _Marker Marker; +typedef struct _MarkerIface MarkerIface; + +#define TYPE_SOURCE_COLLECTION (source_collection_get_type ()) +#define SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_COLLECTION, SourceCollection)) +#define SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_COLLECTION, SourceCollectionClass)) +#define IS_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_COLLECTION)) +#define IS_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_COLLECTION)) +#define SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_COLLECTION, SourceCollectionClass)) + +typedef struct _SourceCollection SourceCollection; +typedef struct _SourceCollectionClass SourceCollectionClass; +typedef struct _SourceCollectionPrivate SourceCollectionPrivate; + +#define TYPE_DATA_SOURCE (data_source_get_type ()) +#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource)) +#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass)) +#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE)) +#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE)) +#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass)) + +typedef struct _DataSource DataSource; +typedef struct _DataSourceClass DataSourceClass; + +#define TYPE_SOURCE_BACKLINK (source_backlink_get_type ()) +#define SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_BACKLINK, SourceBacklink)) +#define SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_BACKLINK, SourceBacklinkClass)) +#define IS_SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_BACKLINK)) +#define IS_SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_BACKLINK)) +#define SOURCE_BACKLINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_BACKLINK, SourceBacklinkClass)) + +typedef struct _SourceBacklink SourceBacklink; +typedef struct _SourceBacklinkClass SourceBacklinkClass; + +#define TYPE_IMPORT_SOURCE_COLLECTION (import_source_collection_get_type ()) +#define IMPORT_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORT_SOURCE_COLLECTION, ImportSourceCollection)) +#define IMPORT_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORT_SOURCE_COLLECTION, ImportSourceCollectionClass)) +#define IS_IMPORT_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORT_SOURCE_COLLECTION)) +#define IS_IMPORT_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORT_SOURCE_COLLECTION)) +#define IMPORT_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORT_SOURCE_COLLECTION, ImportSourceCollectionClass)) + +typedef struct _ImportSourceCollection ImportSourceCollection; +typedef struct _ImportSourceCollectionClass ImportSourceCollectionClass; +typedef struct _ImportSourceCollectionPrivate ImportSourceCollectionPrivate; + +#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ()) +#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource)) +#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) +#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE)) +#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE)) +#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) + +typedef struct _ThumbnailSource ThumbnailSource; +typedef struct _ThumbnailSourceClass ThumbnailSourceClass; + +#define TYPE_IMPORT_SOURCE (import_source_get_type ()) +#define IMPORT_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORT_SOURCE, ImportSource)) +#define IMPORT_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORT_SOURCE, ImportSourceClass)) +#define IS_IMPORT_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORT_SOURCE)) +#define IS_IMPORT_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORT_SOURCE)) +#define IMPORT_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORT_SOURCE, ImportSourceClass)) + +typedef struct _ImportSource ImportSource; +typedef struct _ImportSourceClass ImportSourceClass; +typedef struct _DataObjectPrivate DataObjectPrivate; +typedef struct _DataSourcePrivate DataSourcePrivate; + +#define TYPE_SOURCE_HOLDING_TANK (source_holding_tank_get_type ()) +#define SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTank)) +#define SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTankClass)) +#define IS_SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_HOLDING_TANK)) +#define IS_SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_HOLDING_TANK)) +#define SOURCE_HOLDING_TANK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTankClass)) + +typedef struct _SourceHoldingTank SourceHoldingTank; +typedef struct _SourceHoldingTankClass SourceHoldingTankClass; + +#define TYPE_SOURCE_SNAPSHOT (source_snapshot_get_type ()) +#define SOURCE_SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_SNAPSHOT, SourceSnapshot)) +#define SOURCE_SNAPSHOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_SNAPSHOT, SourceSnapshotClass)) +#define IS_SOURCE_SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_SNAPSHOT)) +#define IS_SOURCE_SNAPSHOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_SNAPSHOT)) +#define SOURCE_SNAPSHOT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_SNAPSHOT, SourceSnapshotClass)) + +typedef struct _SourceSnapshot SourceSnapshot; +typedef struct _SourceSnapshotClass SourceSnapshotClass; +typedef struct _ThumbnailSourcePrivate ThumbnailSourcePrivate; + +#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ()) + +#define TYPE_INDEXABLE (indexable_get_type ()) +#define INDEXABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_INDEXABLE, Indexable)) +#define IS_INDEXABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_INDEXABLE)) +#define INDEXABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_INDEXABLE, IndexableIface)) + +typedef struct _Indexable Indexable; +typedef struct _IndexableIface IndexableIface; +typedef struct _ImportSourcePrivate ImportSourcePrivate; +#define _g_free0(var) (var = (g_free (var), NULL)) +#define _gp_camera_unref0(var) ((var == NULL) ? NULL : (var = (gp_camera_unref (var), NULL))) +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +#define GP_TYPE_CONTEXT_WRAPPER (gp_context_wrapper_get_type ()) +#define GP_CONTEXT_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GP_TYPE_CONTEXT_WRAPPER, GPContextWrapper)) +#define GP_CONTEXT_WRAPPER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GP_TYPE_CONTEXT_WRAPPER, GPContextWrapperClass)) +#define GP_IS_CONTEXT_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GP_TYPE_CONTEXT_WRAPPER)) +#define GP_IS_CONTEXT_WRAPPER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GP_TYPE_CONTEXT_WRAPPER)) +#define GP_CONTEXT_WRAPPER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GP_TYPE_CONTEXT_WRAPPER, GPContextWrapperClass)) + +typedef struct _GPContextWrapper GPContextWrapper; +typedef struct _GPContextWrapperClass GPContextWrapperClass; + +#define GP_TYPE_SPIN_IDLE_WRAPPER (gp_spin_idle_wrapper_get_type ()) +#define GP_SPIN_IDLE_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GP_TYPE_SPIN_IDLE_WRAPPER, GPSpinIdleWrapper)) +#define GP_SPIN_IDLE_WRAPPER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GP_TYPE_SPIN_IDLE_WRAPPER, GPSpinIdleWrapperClass)) +#define GP_IS_SPIN_IDLE_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GP_TYPE_SPIN_IDLE_WRAPPER)) +#define GP_IS_SPIN_IDLE_WRAPPER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GP_TYPE_SPIN_IDLE_WRAPPER)) +#define GP_SPIN_IDLE_WRAPPER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GP_TYPE_SPIN_IDLE_WRAPPER, GPSpinIdleWrapperClass)) + +typedef struct _GPSpinIdleWrapper GPSpinIdleWrapper; +typedef struct _GPSpinIdleWrapperClass GPSpinIdleWrapperClass; +typedef struct _GPContextWrapperPrivate GPContextWrapperPrivate; + +#define TYPE_VIDEO_IMPORT_SOURCE (video_import_source_get_type ()) +#define VIDEO_IMPORT_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_IMPORT_SOURCE, VideoImportSource)) +#define VIDEO_IMPORT_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_IMPORT_SOURCE, VideoImportSourceClass)) +#define IS_VIDEO_IMPORT_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_IMPORT_SOURCE)) +#define IS_VIDEO_IMPORT_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_IMPORT_SOURCE)) +#define VIDEO_IMPORT_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_IMPORT_SOURCE, VideoImportSourceClass)) + +typedef struct _VideoImportSource VideoImportSource; +typedef struct _VideoImportSourceClass VideoImportSourceClass; +typedef struct _VideoImportSourcePrivate VideoImportSourcePrivate; + +#define TYPE_PHOTO_IMPORT_SOURCE (photo_import_source_get_type ()) +#define PHOTO_IMPORT_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_IMPORT_SOURCE, PhotoImportSource)) +#define PHOTO_IMPORT_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_IMPORT_SOURCE, PhotoImportSourceClass)) +#define IS_PHOTO_IMPORT_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_IMPORT_SOURCE)) +#define IS_PHOTO_IMPORT_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_IMPORT_SOURCE)) +#define PHOTO_IMPORT_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_IMPORT_SOURCE, PhotoImportSourceClass)) + +typedef struct _PhotoImportSource PhotoImportSource; +typedef struct _PhotoImportSourceClass PhotoImportSourceClass; +typedef struct _PhotoImportSourcePrivate PhotoImportSourcePrivate; + +#define TYPE_MEDIA_METADATA (media_metadata_get_type ()) +#define MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_METADATA, MediaMetadata)) +#define MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_METADATA, MediaMetadataClass)) +#define IS_MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_METADATA)) +#define IS_MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_METADATA)) +#define MEDIA_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_METADATA, MediaMetadataClass)) + +typedef struct _MediaMetadata MediaMetadata; +typedef struct _MediaMetadataClass MediaMetadataClass; + +#define TYPE_PHOTO_METADATA (photo_metadata_get_type ()) +#define PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_METADATA, PhotoMetadata)) +#define PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_METADATA, PhotoMetadataClass)) +#define IS_PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_METADATA)) +#define IS_PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_METADATA)) +#define PHOTO_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_METADATA, PhotoMetadataClass)) + +typedef struct _PhotoMetadata PhotoMetadata; +typedef struct _PhotoMetadataClass PhotoMetadataClass; +#define _media_metadata_unref0(var) ((var == NULL) ? NULL : (var = (media_metadata_unref (var), NULL))) + +#define TYPE_METADATA_DATE_TIME (metadata_date_time_get_type ()) +#define METADATA_DATE_TIME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_METADATA_DATE_TIME, MetadataDateTime)) +#define METADATA_DATE_TIME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_METADATA_DATE_TIME, MetadataDateTimeClass)) +#define IS_METADATA_DATE_TIME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_METADATA_DATE_TIME)) +#define IS_METADATA_DATE_TIME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_METADATA_DATE_TIME)) +#define METADATA_DATE_TIME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_METADATA_DATE_TIME, MetadataDateTimeClass)) + +typedef struct _MetadataDateTime MetadataDateTime; +typedef struct _MetadataDateTimeClass MetadataDateTimeClass; +#define _metadata_date_time_unref0(var) ((var == NULL) ? NULL : (var = (metadata_date_time_unref (var), NULL))) + +#define TYPE_DATA_VIEW (data_view_get_type ()) +#define DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_VIEW, DataView)) +#define DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_VIEW, DataViewClass)) +#define IS_DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_VIEW)) +#define IS_DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_VIEW)) +#define DATA_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_VIEW, DataViewClass)) + +typedef struct _DataView DataView; +typedef struct _DataViewClass DataViewClass; +typedef struct _DataViewPrivate DataViewPrivate; + +#define TYPE_THUMBNAIL_VIEW (thumbnail_view_get_type ()) +#define THUMBNAIL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_VIEW, ThumbnailView)) +#define THUMBNAIL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_VIEW, ThumbnailViewClass)) +#define IS_THUMBNAIL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_VIEW)) +#define IS_THUMBNAIL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_VIEW)) +#define THUMBNAIL_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_VIEW, ThumbnailViewClass)) + +typedef struct _ThumbnailView ThumbnailView; +typedef struct _ThumbnailViewClass ThumbnailViewClass; +typedef struct _ThumbnailViewPrivate ThumbnailViewPrivate; + +#define TYPE_CHECKERBOARD_ITEM (checkerboard_item_get_type ()) +#define CHECKERBOARD_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHECKERBOARD_ITEM, CheckerboardItem)) +#define CHECKERBOARD_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CHECKERBOARD_ITEM, CheckerboardItemClass)) +#define IS_CHECKERBOARD_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CHECKERBOARD_ITEM)) +#define IS_CHECKERBOARD_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CHECKERBOARD_ITEM)) +#define CHECKERBOARD_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CHECKERBOARD_ITEM, CheckerboardItemClass)) + +typedef struct _CheckerboardItem CheckerboardItem; +typedef struct _CheckerboardItemClass CheckerboardItemClass; +typedef struct _CheckerboardItemPrivate CheckerboardItemPrivate; + +#define TYPE_DIMENSIONS (dimensions_get_type ()) +typedef struct _Dimensions Dimensions; + +#define TYPE_MEDIA_SOURCE_ITEM (media_source_item_get_type ()) +#define MEDIA_SOURCE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE_ITEM, MediaSourceItem)) +#define MEDIA_SOURCE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE_ITEM, MediaSourceItemClass)) +#define IS_MEDIA_SOURCE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE_ITEM)) +#define IS_MEDIA_SOURCE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE_ITEM)) +#define MEDIA_SOURCE_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE_ITEM, MediaSourceItemClass)) + +typedef struct _MediaSourceItem MediaSourceItem; +typedef struct _MediaSourceItemClass MediaSourceItemClass; +typedef struct _MediaSourceItemPrivate MediaSourceItemPrivate; + +#define TYPE_IMPORT_PREVIEW (import_preview_get_type ()) +#define IMPORT_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORT_PREVIEW, ImportPreview)) +#define IMPORT_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORT_PREVIEW, ImportPreviewClass)) +#define IS_IMPORT_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORT_PREVIEW)) +#define IS_IMPORT_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORT_PREVIEW)) +#define IMPORT_PREVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORT_PREVIEW, ImportPreviewClass)) + +typedef struct _ImportPreview ImportPreview; +typedef struct _ImportPreviewClass ImportPreviewClass; +typedef struct _ImportPreviewPrivate ImportPreviewPrivate; + +#define TYPE_DUPLICATED_FILE (duplicated_file_get_type ()) +#define DUPLICATED_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DUPLICATED_FILE, DuplicatedFile)) +#define DUPLICATED_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DUPLICATED_FILE, DuplicatedFileClass)) +#define IS_DUPLICATED_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DUPLICATED_FILE)) +#define IS_DUPLICATED_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DUPLICATED_FILE)) +#define DUPLICATED_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DUPLICATED_FILE, DuplicatedFileClass)) + +typedef struct _DuplicatedFile DuplicatedFile; +typedef struct _DuplicatedFileClass DuplicatedFileClass; +#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) + +#define TYPE_ORIENTATION (orientation_get_type ()) + +#define TYPE_PHOTO_ID (photo_id_get_type ()) +typedef struct _PhotoID PhotoID; + +#define TYPE_DATABASE_SOURCE_COLLECTION (database_source_collection_get_type ()) +#define DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection)) +#define DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass)) +#define IS_DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_SOURCE_COLLECTION)) +#define IS_DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_SOURCE_COLLECTION)) +#define DATABASE_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass)) + +typedef struct _DatabaseSourceCollection DatabaseSourceCollection; +typedef struct _DatabaseSourceCollectionClass DatabaseSourceCollectionClass; + +#define TYPE_MEDIA_SOURCE_COLLECTION (media_source_collection_get_type ()) +#define MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection)) +#define MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass)) +#define IS_MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE_COLLECTION)) +#define IS_MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE_COLLECTION)) +#define MEDIA_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass)) + +typedef struct _MediaSourceCollection MediaSourceCollection; +typedef struct _MediaSourceCollectionClass MediaSourceCollectionClass; + +#define TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION (library_photo_source_collection_get_type ()) +#define LIBRARY_PHOTO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION, LibraryPhotoSourceCollection)) +#define LIBRARY_PHOTO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION, LibraryPhotoSourceCollectionClass)) +#define IS_LIBRARY_PHOTO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION)) +#define IS_LIBRARY_PHOTO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION)) +#define LIBRARY_PHOTO_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION, LibraryPhotoSourceCollectionClass)) + +typedef struct _LibraryPhotoSourceCollection LibraryPhotoSourceCollection; +typedef struct _LibraryPhotoSourceCollectionClass LibraryPhotoSourceCollectionClass; + +#define TYPE_VIDEO_SOURCE_COLLECTION (video_source_collection_get_type ()) +#define VIDEO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollection)) +#define VIDEO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollectionClass)) +#define IS_VIDEO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_SOURCE_COLLECTION)) +#define IS_VIDEO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_SOURCE_COLLECTION)) +#define VIDEO_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollectionClass)) + +typedef struct _VideoSourceCollection VideoSourceCollection; +typedef struct _VideoSourceCollectionClass VideoSourceCollectionClass; + +#define TYPE_VIDEO_ID (video_id_get_type ()) +typedef struct _VideoID VideoID; + +#define CORE_TYPE_TRACKER (core_tracker_get_type ()) +#define CORE_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CORE_TYPE_TRACKER, CoreTracker)) +#define CORE_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CORE_TYPE_TRACKER, CoreTrackerClass)) +#define CORE_IS_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CORE_TYPE_TRACKER)) +#define CORE_IS_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CORE_TYPE_TRACKER)) +#define CORE_TRACKER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CORE_TYPE_TRACKER, CoreTrackerClass)) + +typedef struct _CoreTracker CoreTracker; +typedef struct _CoreTrackerClass CoreTrackerClass; +typedef struct _CoreTrackerPrivate CoreTrackerPrivate; + +#define CORE_TYPE_VIEW_TRACKER (core_view_tracker_get_type ()) +#define CORE_VIEW_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CORE_TYPE_VIEW_TRACKER, CoreViewTracker)) +#define CORE_VIEW_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CORE_TYPE_VIEW_TRACKER, CoreViewTrackerClass)) +#define CORE_IS_VIEW_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CORE_TYPE_VIEW_TRACKER)) +#define CORE_IS_VIEW_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CORE_TYPE_VIEW_TRACKER)) +#define CORE_VIEW_TRACKER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CORE_TYPE_VIEW_TRACKER, CoreViewTrackerClass)) + +typedef struct _CoreViewTracker CoreViewTracker; +typedef struct _CoreViewTrackerClass CoreViewTrackerClass; +typedef struct _CoreViewTrackerPrivate CoreViewTrackerPrivate; + +#define TYPE_CAMERA_VIEW_TRACKER (camera_view_tracker_get_type ()) +#define CAMERA_VIEW_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CAMERA_VIEW_TRACKER, CameraViewTracker)) +#define CAMERA_VIEW_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CAMERA_VIEW_TRACKER, CameraViewTrackerClass)) +#define IS_CAMERA_VIEW_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CAMERA_VIEW_TRACKER)) +#define IS_CAMERA_VIEW_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CAMERA_VIEW_TRACKER)) +#define CAMERA_VIEW_TRACKER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CAMERA_VIEW_TRACKER, CameraViewTrackerClass)) + +typedef struct _CameraViewTracker CameraViewTracker; +typedef struct _CameraViewTrackerClass CameraViewTrackerClass; +typedef struct _CameraViewTrackerPrivate CameraViewTrackerPrivate; + +#define TYPE_CAMERA_ACCUMULATOR (camera_accumulator_get_type ()) +#define CAMERA_ACCUMULATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CAMERA_ACCUMULATOR, CameraAccumulator)) +#define CAMERA_ACCUMULATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CAMERA_ACCUMULATOR, CameraAccumulatorClass)) +#define IS_CAMERA_ACCUMULATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CAMERA_ACCUMULATOR)) +#define IS_CAMERA_ACCUMULATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CAMERA_ACCUMULATOR)) +#define CAMERA_ACCUMULATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CAMERA_ACCUMULATOR, CameraAccumulatorClass)) + +typedef struct _CameraAccumulator CameraAccumulator; +typedef struct _CameraAccumulatorClass CameraAccumulatorClass; + +#define TYPE_VIEW_COLLECTION (view_collection_get_type ()) +#define VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_COLLECTION, ViewCollection)) +#define VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_COLLECTION, ViewCollectionClass)) +#define IS_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_COLLECTION)) +#define IS_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_COLLECTION)) +#define VIEW_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_COLLECTION, ViewCollectionClass)) + +typedef struct _ViewCollection ViewCollection; +typedef struct _ViewCollectionClass ViewCollectionClass; + +#define CORE_TYPE_TRACKER_ACCUMULATOR (core_tracker_accumulator_get_type ()) +#define CORE_TRACKER_ACCUMULATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CORE_TYPE_TRACKER_ACCUMULATOR, CoreTrackerAccumulator)) +#define CORE_IS_TRACKER_ACCUMULATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CORE_TYPE_TRACKER_ACCUMULATOR)) +#define CORE_TRACKER_ACCUMULATOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), CORE_TYPE_TRACKER_ACCUMULATOR, CoreTrackerAccumulatorIface)) + +typedef struct _CoreTrackerAccumulator CoreTrackerAccumulator; +typedef struct _CoreTrackerAccumulatorIface CoreTrackerAccumulatorIface; +typedef struct _CameraAccumulatorPrivate CameraAccumulatorPrivate; + +#define TYPE_PAGE (page_get_type ()) +#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE, Page)) +#define PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE, PageClass)) +#define IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE)) +#define IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE)) +#define PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE, PageClass)) + +typedef struct _Page Page; +typedef struct _PageClass PageClass; +typedef struct _PagePrivate PagePrivate; + +#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_FULLSCREEN_WINDOW (fullscreen_window_get_type ()) +#define FULLSCREEN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FULLSCREEN_WINDOW, FullscreenWindow)) +#define FULLSCREEN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FULLSCREEN_WINDOW, FullscreenWindowClass)) +#define IS_FULLSCREEN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FULLSCREEN_WINDOW)) +#define IS_FULLSCREEN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FULLSCREEN_WINDOW)) +#define FULLSCREEN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FULLSCREEN_WINDOW, FullscreenWindowClass)) + +typedef struct _FullscreenWindow FullscreenWindow; +typedef struct _FullscreenWindowClass FullscreenWindowClass; + +#define TYPE_INJECTION_GROUP (injection_group_get_type ()) +#define INJECTION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_INJECTION_GROUP, InjectionGroup)) +#define INJECTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_INJECTION_GROUP, InjectionGroupClass)) +#define IS_INJECTION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_INJECTION_GROUP)) +#define IS_INJECTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_INJECTION_GROUP)) +#define INJECTION_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_INJECTION_GROUP, InjectionGroupClass)) + +typedef struct _InjectionGroup InjectionGroup; +typedef struct _InjectionGroupClass InjectionGroupClass; + +#define TYPE_CHECKERBOARD_PAGE (checkerboard_page_get_type ()) +#define CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPage)) +#define CHECKERBOARD_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CHECKERBOARD_PAGE, CheckerboardPageClass)) +#define IS_CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CHECKERBOARD_PAGE)) +#define IS_CHECKERBOARD_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CHECKERBOARD_PAGE)) +#define CHECKERBOARD_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPageClass)) + +typedef struct _CheckerboardPage CheckerboardPage; +typedef struct _CheckerboardPageClass CheckerboardPageClass; +typedef struct _CheckerboardPagePrivate CheckerboardPagePrivate; + +#define CHECKERBOARD_PAGE_TYPE_ACTIVATOR (checkerboard_page_activator_get_type ()) + +#define CHECKERBOARD_PAGE_TYPE_KEYBOARD_MODIFIERS (checkerboard_page_keyboard_modifiers_get_type ()) +typedef struct _CheckerboardPageKeyboardModifiers CheckerboardPageKeyboardModifiers; + +#define TYPE_VIEW_FILTER (view_filter_get_type ()) +#define VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_FILTER, ViewFilter)) +#define VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_FILTER, ViewFilterClass)) +#define IS_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_FILTER)) +#define IS_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_FILTER)) +#define VIEW_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_FILTER, ViewFilterClass)) + +typedef struct _ViewFilter ViewFilter; +typedef struct _ViewFilterClass ViewFilterClass; + +#define TYPE_SEARCH_VIEW_FILTER (search_view_filter_get_type ()) +#define SEARCH_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SEARCH_VIEW_FILTER, SearchViewFilter)) +#define SEARCH_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SEARCH_VIEW_FILTER, SearchViewFilterClass)) +#define IS_SEARCH_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SEARCH_VIEW_FILTER)) +#define IS_SEARCH_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SEARCH_VIEW_FILTER)) +#define SEARCH_VIEW_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SEARCH_VIEW_FILTER, SearchViewFilterClass)) + +typedef struct _SearchViewFilter SearchViewFilter; +typedef struct _SearchViewFilterClass SearchViewFilterClass; + +#define TYPE_IMPORT_PAGE (import_page_get_type ()) +#define IMPORT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORT_PAGE, ImportPage)) +#define IMPORT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORT_PAGE, ImportPageClass)) +#define IS_IMPORT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORT_PAGE)) +#define IS_IMPORT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORT_PAGE)) +#define IMPORT_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORT_PAGE, ImportPageClass)) + +typedef struct _ImportPage ImportPage; +typedef struct _ImportPageClass ImportPageClass; +typedef struct _ImportPagePrivate ImportPagePrivate; + +#define IMPORT_PAGE_TYPE_IMPORT_PAGE_SEARCH_VIEW_FILTER (import_page_import_page_search_view_filter_get_type ()) +#define IMPORT_PAGE_IMPORT_PAGE_SEARCH_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IMPORT_PAGE_TYPE_IMPORT_PAGE_SEARCH_VIEW_FILTER, ImportPageImportPageSearchViewFilter)) +#define IMPORT_PAGE_IMPORT_PAGE_SEARCH_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IMPORT_PAGE_TYPE_IMPORT_PAGE_SEARCH_VIEW_FILTER, ImportPageImportPageSearchViewFilterClass)) +#define IMPORT_PAGE_IS_IMPORT_PAGE_SEARCH_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IMPORT_PAGE_TYPE_IMPORT_PAGE_SEARCH_VIEW_FILTER)) +#define IMPORT_PAGE_IS_IMPORT_PAGE_SEARCH_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IMPORT_PAGE_TYPE_IMPORT_PAGE_SEARCH_VIEW_FILTER)) +#define IMPORT_PAGE_IMPORT_PAGE_SEARCH_VIEW_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IMPORT_PAGE_TYPE_IMPORT_PAGE_SEARCH_VIEW_FILTER, ImportPageImportPageSearchViewFilterClass)) + +typedef struct _ImportPageImportPageSearchViewFilter ImportPageImportPageSearchViewFilter; +typedef struct _ImportPageImportPageSearchViewFilterClass ImportPageImportPageSearchViewFilterClass; + +#define IMPORT_PAGE_TYPE_HIDE_IMPORTED_VIEW_FILTER (import_page_hide_imported_view_filter_get_type ()) +#define IMPORT_PAGE_HIDE_IMPORTED_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IMPORT_PAGE_TYPE_HIDE_IMPORTED_VIEW_FILTER, ImportPageHideImportedViewFilter)) +#define IMPORT_PAGE_HIDE_IMPORTED_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IMPORT_PAGE_TYPE_HIDE_IMPORTED_VIEW_FILTER, ImportPageHideImportedViewFilterClass)) +#define IMPORT_PAGE_IS_HIDE_IMPORTED_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IMPORT_PAGE_TYPE_HIDE_IMPORTED_VIEW_FILTER)) +#define IMPORT_PAGE_IS_HIDE_IMPORTED_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IMPORT_PAGE_TYPE_HIDE_IMPORTED_VIEW_FILTER)) +#define IMPORT_PAGE_HIDE_IMPORTED_VIEW_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IMPORT_PAGE_TYPE_HIDE_IMPORTED_VIEW_FILTER, ImportPageHideImportedViewFilterClass)) + +typedef struct _ImportPageHideImportedViewFilter ImportPageHideImportedViewFilter; +typedef struct _ImportPageHideImportedViewFilterClass ImportPageHideImportedViewFilterClass; + +#define IMPORT_PAGE_TYPE_REFRESH_RESULT (import_page_refresh_result_get_type ()) +#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL))) +#define _view_filter_unref0(var) ((var == NULL) ? NULL : (var = (view_filter_unref (var), NULL))) +#define _core_tracker_unref0(var) ((var == NULL) ? NULL : (var = (core_tracker_unref (var), NULL))) +#define _gp_context_wrapper_unref0(var) ((var == NULL) ? NULL : (var = (gp_context_wrapper_unref (var), NULL))) + +#define TYPE_VIEW_MANAGER (view_manager_get_type ()) +#define VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_MANAGER, ViewManager)) +#define VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_MANAGER, ViewManagerClass)) +#define IS_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_MANAGER)) +#define IS_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_MANAGER)) +#define VIEW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_MANAGER, ViewManagerClass)) + +typedef struct _ViewManager ViewManager; +typedef struct _ViewManagerClass ViewManagerClass; + +#define VIEW_COLLECTION_TYPE_MONITOR (view_collection_monitor_get_type ()) +#define VIEW_COLLECTION_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIEW_COLLECTION_TYPE_MONITOR, ViewCollectionMonitor)) +#define VIEW_COLLECTION_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIEW_COLLECTION_TYPE_MONITOR, ViewCollectionMonitorClass)) +#define VIEW_COLLECTION_IS_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIEW_COLLECTION_TYPE_MONITOR)) +#define VIEW_COLLECTION_IS_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIEW_COLLECTION_TYPE_MONITOR)) +#define VIEW_COLLECTION_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIEW_COLLECTION_TYPE_MONITOR, ViewCollectionMonitorClass)) + +typedef struct _ViewCollectionMonitor ViewCollectionMonitor; +typedef struct _ViewCollectionMonitorClass ViewCollectionMonitorClass; + +#define IMPORT_PAGE_TYPE_IMPORT_VIEW_MANAGER (import_page_import_view_manager_get_type ()) +#define IMPORT_PAGE_IMPORT_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IMPORT_PAGE_TYPE_IMPORT_VIEW_MANAGER, ImportPageImportViewManager)) +#define IMPORT_PAGE_IMPORT_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IMPORT_PAGE_TYPE_IMPORT_VIEW_MANAGER, ImportPageImportViewManagerClass)) +#define IMPORT_PAGE_IS_IMPORT_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IMPORT_PAGE_TYPE_IMPORT_VIEW_MANAGER)) +#define IMPORT_PAGE_IS_IMPORT_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IMPORT_PAGE_TYPE_IMPORT_VIEW_MANAGER)) +#define IMPORT_PAGE_IMPORT_VIEW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IMPORT_PAGE_TYPE_IMPORT_VIEW_MANAGER, ImportPageImportViewManagerClass)) + +typedef struct _ImportPageImportViewManager ImportPageImportViewManager; +typedef struct _ImportPageImportViewManagerClass ImportPageImportViewManagerClass; +#define _view_collection_monitor_unref0(var) ((var == NULL) ? NULL : (var = (view_collection_monitor_unref (var), NULL))) +#define _view_manager_unref0(var) ((var == NULL) ? NULL : (var = (view_manager_unref (var), NULL))) + +#define TYPE_CONFIGURATION_FACADE (configuration_facade_get_type ()) +#define CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacade)) +#define CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass)) +#define IS_CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIGURATION_FACADE)) +#define IS_CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIGURATION_FACADE)) +#define CONFIGURATION_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass)) + +typedef struct _ConfigurationFacade ConfigurationFacade; +typedef struct _ConfigurationFacadeClass ConfigurationFacadeClass; + +#define CONFIG_TYPE_FACADE (config_facade_get_type ()) +#define CONFIG_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONFIG_TYPE_FACADE, ConfigFacade)) +#define CONFIG_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIG_TYPE_FACADE, ConfigFacadeClass)) +#define CONFIG_IS_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONFIG_TYPE_FACADE)) +#define CONFIG_IS_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIG_TYPE_FACADE)) +#define CONFIG_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIG_TYPE_FACADE, ConfigFacadeClass)) + +typedef struct _ConfigFacade ConfigFacade; +typedef struct _ConfigFacadeClass ConfigFacadeClass; + +#define TYPE_BATCH_IMPORT_JOB (batch_import_job_get_type ()) +#define BATCH_IMPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BATCH_IMPORT_JOB, BatchImportJob)) +#define BATCH_IMPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BATCH_IMPORT_JOB, BatchImportJobClass)) +#define IS_BATCH_IMPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BATCH_IMPORT_JOB)) +#define IS_BATCH_IMPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BATCH_IMPORT_JOB)) +#define BATCH_IMPORT_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BATCH_IMPORT_JOB, BatchImportJobClass)) + +typedef struct _BatchImportJob BatchImportJob; +typedef struct _BatchImportJobClass BatchImportJobClass; + +#define IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB (import_page_camera_import_job_get_type ()) +#define IMPORT_PAGE_CAMERA_IMPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, ImportPageCameraImportJob)) +#define IMPORT_PAGE_CAMERA_IMPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, ImportPageCameraImportJobClass)) +#define IMPORT_PAGE_IS_CAMERA_IMPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB)) +#define IMPORT_PAGE_IS_CAMERA_IMPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB)) +#define IMPORT_PAGE_CAMERA_IMPORT_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, ImportPageCameraImportJobClass)) + +typedef struct _ImportPageCameraImportJob ImportPageCameraImportJob; +typedef struct _ImportPageCameraImportJobClass ImportPageCameraImportJobClass; + +#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_MEDIA_SOURCE (media_source_get_type ()) +#define MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE, MediaSource)) +#define MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE, MediaSourceClass)) +#define IS_MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE)) +#define IS_MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE)) +#define MEDIA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE, MediaSourceClass)) + +typedef struct _MediaSource MediaSource; +typedef struct _MediaSourceClass MediaSourceClass; +#define _gp_list_unref0(var) ((var == NULL) ? NULL : (var = (gp_list_unref (var), NULL))) + +#define TYPE_SORTED_LIST (sorted_list_get_type ()) +#define SORTED_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SORTED_LIST, SortedList)) +#define SORTED_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SORTED_LIST, SortedListClass)) +#define IS_SORTED_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SORTED_LIST)) +#define IS_SORTED_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SORTED_LIST)) +#define SORTED_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SORTED_LIST, SortedListClass)) + +typedef struct _SortedList SortedList; +typedef struct _SortedListClass SortedListClass; +#define _batch_import_job_unref0(var) ((var == NULL) ? NULL : (var = (batch_import_job_unref (var), NULL))) + +#define TYPE_BATCH_IMPORT (batch_import_get_type ()) +#define BATCH_IMPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BATCH_IMPORT, BatchImport)) +#define BATCH_IMPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BATCH_IMPORT, BatchImportClass)) +#define IS_BATCH_IMPORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BATCH_IMPORT)) +#define IS_BATCH_IMPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BATCH_IMPORT)) +#define BATCH_IMPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BATCH_IMPORT, BatchImportClass)) + +typedef struct _BatchImport BatchImport; +typedef struct _BatchImportClass BatchImportClass; + +#define TYPE_IMPORT_MANIFEST (import_manifest_get_type ()) +#define IMPORT_MANIFEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORT_MANIFEST, ImportManifest)) +#define IMPORT_MANIFEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORT_MANIFEST, ImportManifestClass)) +#define IS_IMPORT_MANIFEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORT_MANIFEST)) +#define IS_IMPORT_MANIFEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORT_MANIFEST)) +#define IMPORT_MANIFEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORT_MANIFEST, ImportManifestClass)) + +typedef struct _ImportManifest ImportManifest; +typedef struct _ImportManifestClass ImportManifestClass; + +#define TYPE_BATCH_IMPORT_ROLL (batch_import_roll_get_type ()) +#define BATCH_IMPORT_ROLL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BATCH_IMPORT_ROLL, BatchImportRoll)) +#define BATCH_IMPORT_ROLL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BATCH_IMPORT_ROLL, BatchImportRollClass)) +#define IS_BATCH_IMPORT_ROLL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BATCH_IMPORT_ROLL)) +#define IS_BATCH_IMPORT_ROLL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BATCH_IMPORT_ROLL)) +#define BATCH_IMPORT_ROLL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BATCH_IMPORT_ROLL, BatchImportRollClass)) + +typedef struct _BatchImportRoll BatchImportRoll; +typedef struct _BatchImportRollClass BatchImportRollClass; + +#define TYPE_BATCH_IMPORT_RESULT (batch_import_result_get_type ()) +#define BATCH_IMPORT_RESULT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BATCH_IMPORT_RESULT, BatchImportResult)) +#define BATCH_IMPORT_RESULT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BATCH_IMPORT_RESULT, BatchImportResultClass)) +#define IS_BATCH_IMPORT_RESULT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BATCH_IMPORT_RESULT)) +#define IS_BATCH_IMPORT_RESULT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BATCH_IMPORT_RESULT)) +#define BATCH_IMPORT_RESULT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BATCH_IMPORT_RESULT, BatchImportResultClass)) + +typedef struct _BatchImportResult BatchImportResult; +typedef struct _BatchImportResultClass BatchImportResultClass; + +#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 _import_manifest_unref0(var) ((var == NULL) ? NULL : (var = (import_manifest_unref (var), NULL))) +typedef struct _BatchImportResultPrivate BatchImportResultPrivate; + +#define TYPE_IMPORT_RESULT (import_result_get_type ()) +typedef struct _ImportManifestPrivate ImportManifestPrivate; + +#define IMPORT_UI_TYPE_QUESTION_PARAMS (import_ui_question_params_get_type ()) +#define IMPORT_UI_QUESTION_PARAMS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IMPORT_UI_TYPE_QUESTION_PARAMS, ImportUIQuestionParams)) +#define IMPORT_UI_QUESTION_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IMPORT_UI_TYPE_QUESTION_PARAMS, ImportUIQuestionParamsClass)) +#define IMPORT_UI_IS_QUESTION_PARAMS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IMPORT_UI_TYPE_QUESTION_PARAMS)) +#define IMPORT_UI_IS_QUESTION_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IMPORT_UI_TYPE_QUESTION_PARAMS)) +#define IMPORT_UI_QUESTION_PARAMS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IMPORT_UI_TYPE_QUESTION_PARAMS, ImportUIQuestionParamsClass)) + +typedef struct _ImportUIQuestionParams ImportUIQuestionParams; +typedef struct _ImportUIQuestionParamsClass ImportUIQuestionParamsClass; +#define _import_ui_question_params_unref0(var) ((var == NULL) ? NULL : (var = (import_ui_question_params_unref (var), NULL))) +#define _batch_import_result_unref0(var) ((var == NULL) ? NULL : (var = (batch_import_result_unref (var), NULL))) + +#define TYPE_PROGRESS_DIALOG (progress_dialog_get_type ()) +#define PROGRESS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PROGRESS_DIALOG, ProgressDialog)) +#define PROGRESS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PROGRESS_DIALOG, ProgressDialogClass)) +#define IS_PROGRESS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PROGRESS_DIALOG)) +#define IS_PROGRESS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PROGRESS_DIALOG)) +#define PROGRESS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PROGRESS_DIALOG, ProgressDialogClass)) + +typedef struct _ProgressDialog ProgressDialog; +typedef struct _ProgressDialogClass ProgressDialogClass; +typedef struct _ViewManagerPrivate ViewManagerPrivate; +typedef struct _ImportPageImportViewManagerPrivate ImportPageImportViewManagerPrivate; +typedef struct _BatchImportJobPrivate BatchImportJobPrivate; +typedef struct _ImportPageCameraImportJobPrivate ImportPageCameraImportJobPrivate; + +#define TYPE_BACKING_PHOTO_ROW (backing_photo_row_get_type ()) +#define BACKING_PHOTO_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BACKING_PHOTO_ROW, BackingPhotoRow)) +#define BACKING_PHOTO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BACKING_PHOTO_ROW, BackingPhotoRowClass)) +#define IS_BACKING_PHOTO_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BACKING_PHOTO_ROW)) +#define IS_BACKING_PHOTO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BACKING_PHOTO_ROW)) +#define BACKING_PHOTO_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BACKING_PHOTO_ROW, BackingPhotoRowClass)) + +typedef struct _BackingPhotoRow BackingPhotoRow; +typedef struct _BackingPhotoRowClass BackingPhotoRowClass; +#define _backing_photo_row_unref0(var) ((var == NULL) ? NULL : (var = (backing_photo_row_unref (var), NULL))) + +#define TYPE_RAW_DEVELOPER (raw_developer_get_type ()) +typedef struct _BackingPhotoRowPrivate BackingPhotoRowPrivate; + +#define TYPE_BACKING_PHOTO_ID (backing_photo_id_get_type ()) +typedef struct _BackingPhotoID BackingPhotoID; + +#define TYPE_PHOTO_SOURCE (photo_source_get_type ()) +#define PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_SOURCE, PhotoSource)) +#define PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_SOURCE, PhotoSourceClass)) +#define IS_PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_SOURCE)) +#define IS_PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_SOURCE)) +#define PHOTO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_SOURCE, PhotoSourceClass)) + +typedef struct _PhotoSource PhotoSource; +typedef struct _PhotoSourceClass PhotoSourceClass; + +#define TYPE_PHOTO (photo_get_type ()) +#define PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO, Photo)) +#define PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO, PhotoClass)) +#define IS_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO)) +#define IS_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO)) +#define PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO, PhotoClass)) + +typedef struct _Photo Photo; +typedef struct _PhotoClass PhotoClass; +typedef struct _ViewFilterPrivate ViewFilterPrivate; +typedef struct _SearchViewFilterPrivate SearchViewFilterPrivate; +typedef struct _ImportPageImportPageSearchViewFilterPrivate ImportPageImportPageSearchViewFilterPrivate; + +#define TYPE_SEARCH_FILTER_CRITERIA (search_filter_criteria_get_type ()) +typedef struct _ImportPageHideImportedViewFilterPrivate ImportPageHideImportedViewFilterPrivate; +#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); +#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } +#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } +#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); + +typedef gint64 (*Comparator) (void* a, void* b, void* user_data); +typedef gboolean (*ComparatorPredicate) (DataObject* object, Alteration* alteration, void* user_data); +typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data); +struct _MarkerIface { + GTypeInterface parent_iface; + void (*mark) (Marker* self, DataObject* object); + void (*unmark) (Marker* self, DataObject* object); + gboolean (*toggle) (Marker* self, DataObject* object); + void (*mark_many) (Marker* self, GeeCollection* list); + void (*unmark_many) (Marker* self, GeeCollection* list); + void (*mark_all) (Marker* self); + gint (*get_count) (Marker* self); + GeeCollection* (*get_all) (Marker* self); +}; + +struct _DataCollection { + GTypeInstance parent_instance; + volatile int ref_count; + DataCollectionPrivate * priv; +}; + +struct _DataCollectionClass { + GTypeClass parent_class; + void (*finalize) (DataCollection *self); + gchar* (*to_string) (DataCollection* self); + void (*notify_items_added) (DataCollection* self, GeeIterable* added); + void (*notify_items_removed) (DataCollection* self, GeeIterable* removed); + void (*notify_contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed); + void (*notify_items_altered) (DataCollection* self, GeeMap* items); + void (*notify_ordering_changed) (DataCollection* self); + void (*notify_property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val); + void (*notify_property_cleared) (DataCollection* self, const gchar* name); + gboolean (*valid_type) (DataCollection* self, DataObject* object); + void (*set_comparator) (DataCollection* self, Comparator comparator, void* comparator_target, ComparatorPredicate predicate, void* predicate_target); + void (*reset_comparator) (DataCollection* self); + GeeCollection* (*get_all) (DataCollection* self); + gint (*get_count) (DataCollection* self); + DataObject* (*get_at) (DataCollection* self, gint index); + gint (*index_of) (DataCollection* self, DataObject* object); + gboolean (*contains) (DataCollection* self, DataObject* object); + gboolean (*add) (DataCollection* self, DataObject* object); + GeeCollection* (*add_many) (DataCollection* self, GeeCollection* objects, ProgressMonitor monitor, void* monitor_target); + void (*remove_marked) (DataCollection* self, Marker* m); + void (*clear) (DataCollection* self); + void (*close) (DataCollection* self); + void (*notify_frozen) (DataCollection* self); + void (*notify_thawed) (DataCollection* self); + void (*items_added) (DataCollection* self, GeeIterable* added); + void (*items_removed) (DataCollection* self, GeeIterable* removed); + void (*contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed); + void (*items_altered) (DataCollection* self, GeeMap* items); + void (*ordering_changed) (DataCollection* self); + void (*property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val); + void (*property_cleared) (DataCollection* self, const gchar* name); + void (*frozen) (DataCollection* self); + void (*thawed) (DataCollection* self); +}; + +struct _SourceCollection { + DataCollection parent_instance; + SourceCollectionPrivate * priv; +}; + +struct _SourceCollectionClass { + DataCollectionClass parent_class; + gboolean (*holds_type_of_source) (SourceCollection* self, DataSource* source); + void (*notify_items_unlinking) (SourceCollection* self, GeeCollection* unlinking); + void (*notify_items_relinked) (SourceCollection* self, GeeCollection* relinked); + void (*notify_item_destroyed) (SourceCollection* self, DataSource* source); + void (*notify_items_destroyed) (SourceCollection* self, GeeCollection* destroyed); + void (*notify_unlinked_destroyed) (SourceCollection* self, DataSource* unlinked); + void (*notify_backlink_removed) (SourceCollection* self, SourceBacklink* backlink, GeeCollection* sources); + gboolean (*has_backlink) (SourceCollection* self, SourceBacklink* backlink); + void (*remove_backlink) (SourceCollection* self, SourceBacklink* backlink); + void (*items_unlinking) (SourceCollection* self, GeeCollection* unlinking); + void (*items_relinked) (SourceCollection* self, GeeCollection* relinked); + void (*item_destroyed) (SourceCollection* self, DataSource* source); + void (*items_destroyed) (SourceCollection* self, GeeCollection* destroyed); + void (*unlinked_destroyed) (SourceCollection* self, DataSource* source); + void (*backlink_removed) (SourceCollection* self, SourceBacklink* backlink, GeeCollection* sources); +}; + +struct _ImportSourceCollection { + SourceCollection parent_instance; + ImportSourceCollectionPrivate * priv; +}; + +struct _ImportSourceCollectionClass { + SourceCollectionClass parent_class; +}; + +struct _DataObject { + GObject parent_instance; + DataObjectPrivate * priv; +}; + +struct _DataObjectClass { + GObjectClass parent_class; + void (*notify_altered) (DataObject* self, Alteration* alteration); + void (*notify_membership_changed) (DataObject* self, DataCollection* collection); + void (*notify_collection_property_set) (DataObject* self, const gchar* name, GValue* old, GValue* val); + void (*notify_collection_property_cleared) (DataObject* self, const gchar* name); + gchar* (*get_name) (DataObject* self); + gchar* (*to_string) (DataObject* self); +}; + +struct _DataSource { + DataObject parent_instance; + DataSourcePrivate * priv; +}; + +struct _DataSourceClass { + DataObjectClass parent_class; + void (*notify_held_in_tank) (DataSource* self, SourceHoldingTank* holding_tank); + void (*notify_unlinking) (DataSource* self, SourceCollection* collection); + void (*notify_unlinked) (DataSource* self); + void (*notify_relinking) (DataSource* self, SourceCollection* collection); + void (*notify_relinked) (DataSource* self); + gchar* (*get_typename) (DataSource* self); + gint64 (*get_instance_id) (DataSource* self); + gchar* (*get_source_id) (DataSource* self); + void (*commit_backlinks) (DataSource* self, SourceCollection* sources, const gchar* dehydrated); + SourceSnapshot* (*save_snapshot) (DataSource* self); + gboolean (*internal_delete_backing) (DataSource* self, GError** error); + gboolean (*equals) (DataSource* self, DataSource* source); + void (*destroy) (DataSource* self); + void (*unlinked) (DataSource* self, SourceCollection* sources); + void (*relinked) (DataSource* self, SourceCollection* sources); + void (*destroyed) (DataSource* self); +}; + +typedef enum { + PHOTO_FILE_FORMAT_JFIF, + PHOTO_FILE_FORMAT_RAW, + PHOTO_FILE_FORMAT_PNG, + PHOTO_FILE_FORMAT_TIFF, + PHOTO_FILE_FORMAT_BMP, + PHOTO_FILE_FORMAT_UNKNOWN +} PhotoFileFormat; + +struct _ThumbnailSource { + DataSource parent_instance; + ThumbnailSourcePrivate * priv; +}; + +struct _ThumbnailSourceClass { + DataSourceClass parent_class; + void (*notify_thumbnail_altered) (ThumbnailSource* self); + GdkPixbuf* (*get_thumbnail) (ThumbnailSource* self, gint scale, GError** error); + GdkPixbuf* (*create_thumbnail) (ThumbnailSource* self, gint scale, GError** error); + gchar* (*get_representative_id) (ThumbnailSource* self); + PhotoFileFormat (*get_preferred_thumbnail_format) (ThumbnailSource* self); + void (*thumbnail_altered) (ThumbnailSource* self); +}; + +struct _IndexableIface { + GTypeInterface parent_iface; + const gchar* (*get_indexable_keywords) (Indexable* self); +}; + +struct _ImportSource { + ThumbnailSource parent_instance; + ImportSourcePrivate * priv; +}; + +struct _ImportSourceClass { + ThumbnailSourceClass parent_class; + GdkPixbuf* (*get_preview) (ImportSource* self); + time_t (*get_exposure_time) (ImportSource* self); +}; + +struct _ImportSourcePrivate { + gchar* camera_name; + Camera* camera; + gint fsid; + gchar* folder; + gchar* filename; + gulong file_size; + time_t modification_time; + GdkPixbuf* preview; + gchar* indexable_keywords; +}; + +struct _GPContextWrapper { + GTypeInstance parent_instance; + volatile int ref_count; + GPContextWrapperPrivate * priv; + GPContext* context; +}; + +struct _GPContextWrapperClass { + GTypeClass parent_class; + void (*finalize) (GPContextWrapper *self); + void (*idle) (GPContextWrapper* self); + void (*error) (GPContextWrapper* self, const gchar* text, void* data); + void (*status) (GPContextWrapper* self, const gchar* text, void* data); + void (*message) (GPContextWrapper* self, const gchar* text, void* data); + void (*progress_start) (GPContextWrapper* self, gfloat current, const gchar* text, void* data); + void (*progress_update) (GPContextWrapper* self, gfloat current, void* data); + void (*progress_stop) (GPContextWrapper* self); +}; + +struct _VideoImportSource { + ImportSource parent_instance; + VideoImportSourcePrivate * priv; +}; + +struct _VideoImportSourceClass { + ImportSourceClass parent_class; +}; + +struct _PhotoImportSource { + ImportSource parent_instance; + PhotoImportSourcePrivate * priv; +}; + +struct _PhotoImportSourceClass { + ImportSourceClass parent_class; +}; + +struct _PhotoImportSourcePrivate { + PhotoFileFormat file_format; + gchar* preview_md5; + PhotoMetadata* metadata; + gchar* exif_md5; + PhotoImportSource* associated; +}; + +struct _DataView { + DataObject parent_instance; + DataViewPrivate * priv; +}; + +struct _DataViewClass { + DataObjectClass parent_class; + void (*notify_view_altered) (DataView* self); + void (*notify_geometry_altered) (DataView* self); + void (*notify_unsubscribed) (DataView* self, DataSource* source); + void (*state_changed) (DataView* self, gboolean selected); + void (*visibility_changed) (DataView* self, gboolean visible); + void (*view_altered) (DataView* self); + void (*geometry_altered) (DataView* self); + void (*unsubscribed) (DataView* self, DataSource* source); +}; + +struct _ThumbnailView { + DataView parent_instance; + ThumbnailViewPrivate * priv; +}; + +struct _ThumbnailViewClass { + DataViewClass parent_class; + void (*notify_thumbnail_altered) (ThumbnailView* self); + void (*thumbnail_altered) (ThumbnailView* self); +}; + +struct _Dimensions { + gint width; + gint height; +}; + +struct _CheckerboardItem { + ThumbnailView parent_instance; + CheckerboardItemPrivate * priv; + Dimensions requisition; + GdkRectangle allocation; +}; + +struct _CheckerboardItemClass { + ThumbnailViewClass parent_class; + void (*exposed) (CheckerboardItem* self); + void (*unexposed) (CheckerboardItem* self); + gboolean (*is_exposed) (CheckerboardItem* self); + void (*paint_shadow) (CheckerboardItem* self, cairo_t* ctx, Dimensions* dimensions, GdkPoint* origin, gint radius, gfloat initial_alpha); + void (*paint_border) (CheckerboardItem* self, cairo_t* ctx, Dimensions* object_dimensions, GdkPoint* object_origin, gint border_width); + void (*paint_image) (CheckerboardItem* self, cairo_t* ctx, GdkPixbuf* pixbuf, GdkPoint* origin); + GdkPixbuf* (*get_top_left_trinket) (CheckerboardItem* self, gint scale); + GdkPixbuf* (*get_top_right_trinket) (CheckerboardItem* self, gint scale); + GdkPixbuf* (*get_bottom_left_trinket) (CheckerboardItem* self, gint scale); + GdkPixbuf* (*get_bottom_right_trinket) (CheckerboardItem* self, gint scale); +}; + +struct _MediaSourceItem { + CheckerboardItem parent_instance; + MediaSourceItemPrivate * priv; +}; + +struct _MediaSourceItemClass { + CheckerboardItemClass parent_class; +}; + +struct _ImportPreview { + MediaSourceItem parent_instance; + ImportPreviewPrivate * priv; +}; + +struct _ImportPreviewClass { + MediaSourceItemClass parent_class; +}; + +struct _ImportPreviewPrivate { + DuplicatedFile* duplicated_file; +}; + +typedef enum { + ORIENTATION_MIN = 1, + ORIENTATION_TOP_LEFT = 1, + ORIENTATION_TOP_RIGHT = 2, + ORIENTATION_BOTTOM_RIGHT = 3, + ORIENTATION_BOTTOM_LEFT = 4, + ORIENTATION_LEFT_TOP = 5, + ORIENTATION_RIGHT_TOP = 6, + ORIENTATION_RIGHT_BOTTOM = 7, + ORIENTATION_LEFT_BOTTOM = 8, + ORIENTATION_MAX = 8 +} Orientation; + +struct _PhotoID { + gint64 id; +}; + +struct _VideoID { + gint64 id; +}; + +struct _CoreTracker { + GTypeInstance parent_instance; + volatile int ref_count; + CoreTrackerPrivate * priv; +}; + +struct _CoreTrackerClass { + GTypeClass parent_class; + void (*finalize) (CoreTracker *self); + void (*updated) (CoreTracker* self); +}; + +struct _CoreViewTracker { + CoreTracker parent_instance; + CoreViewTrackerPrivate * priv; +}; + +struct _CoreViewTrackerClass { + CoreTrackerClass parent_class; +}; + +struct _CameraViewTracker { + CoreViewTracker parent_instance; + CameraViewTrackerPrivate * priv; + CameraAccumulator* all; + CameraAccumulator* visible; + CameraAccumulator* selected; +}; + +struct _CameraViewTrackerClass { + CoreViewTrackerClass parent_class; +}; + +struct _CoreTrackerAccumulatorIface { + GTypeInterface parent_iface; + gboolean (*include) (CoreTrackerAccumulator* self, DataObject* object); + gboolean (*uninclude) (CoreTrackerAccumulator* self, DataObject* object); + gboolean (*altered) (CoreTrackerAccumulator* self, DataObject* object, Alteration* alteration); +}; + +struct _CameraAccumulator { + GObject parent_instance; + CameraAccumulatorPrivate * priv; +}; + +struct _CameraAccumulatorClass { + GObjectClass parent_class; +}; + +struct _CameraAccumulatorPrivate { + gint _total; + gint _photos; + gint _videos; + gint _raw; +}; + +struct _Page { + GtkScrolledWindow parent_instance; + PagePrivate * priv; + GtkUIManager* ui; + GtkToolbar* toolbar; + gboolean in_view; +}; + +struct _PageClass { + GtkScrolledWindowClass parent_class; + void (*set_page_name) (Page* self, const gchar* page_name); + void (*set_container) (Page* self, GtkWindow* container); + void (*clear_container) (Page* self); + GtkMenuBar* (*get_menubar) (Page* self); + GtkWidget* (*get_page_ui_widget) (Page* self, const gchar* path); + GtkToolbar* (*get_toolbar) (Page* self); + GtkMenu* (*get_page_context_menu) (Page* self); + void (*switching_from) (Page* self); + void (*switched_to) (Page* self); + void (*ready) (Page* self); + void (*switching_to_fullscreen) (Page* self, FullscreenWindow* fsw); + void (*returning_from_fullscreen) (Page* self, FullscreenWindow* fsw); + void (*init_collect_ui_filenames) (Page* self, GeeList* ui_filenames); + GtkActionEntry* (*init_collect_action_entries) (Page* self, int* result_length1); + GtkToggleActionEntry* (*init_collect_toggle_action_entries) (Page* self, int* result_length1); + void (*register_radio_actions) (Page* self, GtkActionGroup* action_group); + InjectionGroup** (*init_collect_injection_groups) (Page* self, int* result_length1); + void (*init_actions) (Page* self, gint selected_count, gint count); + void (*update_actions) (Page* self, gint selected_count, gint count); + gboolean (*source_drag_failed) (Page* self, GdkDragContext* context, GtkDragResult drag_result); + gboolean (*on_left_click) (Page* self, GdkEventButton* event); + gboolean (*on_middle_click) (Page* self, GdkEventButton* event); + gboolean (*on_right_click) (Page* self, GdkEventButton* event); + gboolean (*on_left_released) (Page* self, GdkEventButton* event); + gboolean (*on_middle_released) (Page* self, GdkEventButton* event); + gboolean (*on_right_released) (Page* self, GdkEventButton* event); + gboolean (*on_ctrl_pressed) (Page* self, GdkEventKey* event); + gboolean (*on_ctrl_released) (Page* self, GdkEventKey* event); + gboolean (*on_alt_pressed) (Page* self, GdkEventKey* event); + gboolean (*on_alt_released) (Page* self, GdkEventKey* event); + gboolean (*on_shift_pressed) (Page* self, GdkEventKey* event); + gboolean (*on_shift_released) (Page* self, GdkEventKey* event); + gboolean (*on_super_pressed) (Page* self, GdkEventKey* event); + gboolean (*on_super_released) (Page* self, GdkEventKey* event); + gboolean (*on_app_key_pressed) (Page* self, GdkEventKey* event); + gboolean (*on_app_key_released) (Page* self, GdkEventKey* event); + void (*on_move) (Page* self, GdkRectangle* rect); + void (*on_move_start) (Page* self, GdkRectangle* rect); + void (*on_move_finished) (Page* self, GdkRectangle* rect); + void (*on_resize) (Page* self, GdkRectangle* rect); + void (*on_resize_start) (Page* self, GdkRectangle* rect); + void (*on_resize_finished) (Page* self, GdkRectangle* rect); + gboolean (*on_configure) (Page* self, GdkEventConfigure* event, GdkRectangle* rect); + gboolean (*on_motion) (Page* self, GdkEventMotion* event, gint x, gint y, GdkModifierType mask); + gboolean (*on_leave_notify_event) (Page* self); + gboolean (*on_mousewheel_up) (Page* self, GdkEventScroll* event); + gboolean (*on_mousewheel_down) (Page* self, GdkEventScroll* event); + gboolean (*on_mousewheel_left) (Page* self, GdkEventScroll* event); + gboolean (*on_mousewheel_right) (Page* self, GdkEventScroll* event); + gboolean (*on_context_keypress) (Page* self); + gboolean (*on_context_buttonpress) (Page* self, GdkEventButton* event); + gboolean (*on_context_invoked) (Page* self); + void (*set_page_cursor) (Page* self, GdkCursorType cursor_type); +}; + +typedef enum { + CHECKERBOARD_PAGE_ACTIVATOR_KEYBOARD, + CHECKERBOARD_PAGE_ACTIVATOR_MOUSE +} CheckerboardPageActivator; + +struct _CheckerboardPageKeyboardModifiers { + gboolean ctrl_pressed; + gboolean alt_pressed; + gboolean shift_pressed; + gboolean super_pressed; +}; + +struct _CheckerboardPage { + Page parent_instance; + CheckerboardPagePrivate * priv; + CheckerboardItem* anchor; + CheckerboardItem* cursor; +}; + +struct _CheckerboardPageClass { + PageClass parent_class; + GtkMenu* (*get_item_context_menu) (CheckerboardPage* self); + gchar* (*get_view_empty_message) (CheckerboardPage* self); + gchar* (*get_filter_no_match_message) (CheckerboardPage* self); + void (*on_item_activated) (CheckerboardPage* self, CheckerboardItem* item, CheckerboardPageActivator activator, CheckerboardPageKeyboardModifiers* modifiers); + SearchViewFilter* (*get_search_view_filter) (CheckerboardPage* self); + CoreViewTracker* (*get_view_tracker) (CheckerboardPage* self); + gboolean (*on_mouse_over) (CheckerboardPage* self, CheckerboardItem* item, gint x, gint y, GdkModifierType mask); + void (*set_display_titles) (CheckerboardPage* self, gboolean display); + void (*set_display_comments) (CheckerboardPage* self, gboolean display); +}; + +struct _ImportPage { + CheckerboardPage parent_instance; + ImportPagePrivate * priv; +}; + +struct _ImportPageClass { + CheckerboardPageClass parent_class; +}; + +struct _ImportPagePrivate { + SourceCollection* import_sources; + GtkLabel* camera_label; + GtkCheckButton* hide_imported; + GtkProgressBar* progress_bar; + Camera* camera; + gchar* uri; + gboolean busy; + gboolean refreshed; + int refresh_result; + gchar* refresh_error; + gchar* camera_name; + GVolumeMonitor* volume_monitor; + ImportPage* local_ref; + gchar* icon; + ImportPageImportPageSearchViewFilter* search_filter; + ImportPageHideImportedViewFilter* hide_imported_filter; + CameraViewTracker* tracker; +}; + +typedef enum { + IMPORT_PAGE_REFRESH_RESULT_OK, + IMPORT_PAGE_REFRESH_RESULT_BUSY, + IMPORT_PAGE_REFRESH_RESULT_LOCKED, + IMPORT_PAGE_REFRESH_RESULT_LIBRARY_ERROR +} ImportPageRefreshResult; + +typedef gboolean (*ValueEqualFunc) (GValue* a, GValue* b, void* user_data); +typedef void (*BatchImportImportReporter) (ImportManifest* manifest, BatchImportRoll* import_roll, void* user_data); +typedef enum { + IMPORT_RESULT_SUCCESS, + IMPORT_RESULT_FILE_ERROR, + IMPORT_RESULT_DECODE_ERROR, + IMPORT_RESULT_DATABASE_ERROR, + IMPORT_RESULT_USER_ABORT, + IMPORT_RESULT_NOT_A_FILE, + IMPORT_RESULT_PHOTO_EXISTS, + IMPORT_RESULT_UNSUPPORTED_FORMAT, + IMPORT_RESULT_NOT_AN_IMAGE, + IMPORT_RESULT_DISK_FAILURE, + IMPORT_RESULT_DISK_FULL, + IMPORT_RESULT_CAMERA_ERROR, + IMPORT_RESULT_FILE_WRITE_ERROR, + IMPORT_RESULT_PIXBUF_CORRUPT_IMAGE +} ImportResult; + +struct _BatchImportResult { + GTypeInstance parent_instance; + volatile int ref_count; + BatchImportResultPrivate * priv; + BatchImportJob* job; + GFile* file; + gchar* src_identifier; + gchar* dest_identifier; + ImportResult result; + gchar* errmsg; + DuplicatedFile* duplicate_of; +}; + +struct _BatchImportResultClass { + GTypeClass parent_class; + void (*finalize) (BatchImportResult *self); +}; + +struct _ImportManifest { + GTypeInstance parent_instance; + volatile int ref_count; + ImportManifestPrivate * priv; + GeeList* imported; + GeeList* success; + GeeList* camera_failed; + GeeList* failed; + GeeList* write_failed; + GeeList* skipped_photos; + GeeList* skipped_files; + GeeList* aborted; + GeeList* already_imported; + GeeList* corrupt_files; + GeeList* all; +}; + +struct _ImportManifestClass { + GTypeClass parent_class; + void (*finalize) (ImportManifest *self); +}; + +struct _ViewManager { + GTypeInstance parent_instance; + volatile int ref_count; + ViewManagerPrivate * priv; +}; + +struct _ViewManagerClass { + GTypeClass parent_class; + void (*finalize) (ViewManager *self); + gboolean (*include_in_view) (ViewManager* self, DataSource* source); + DataView* (*create_view) (ViewManager* self, DataSource* source); +}; + +struct _ImportPageImportViewManager { + ViewManager parent_instance; + ImportPageImportViewManagerPrivate * priv; +}; + +struct _ImportPageImportViewManagerClass { + ViewManagerClass parent_class; +}; + +struct _ImportPageImportViewManagerPrivate { + ImportPage* owner; +}; + +struct _BatchImportJob { + GTypeInstance parent_instance; + volatile int ref_count; + BatchImportJobPrivate * priv; +}; + +struct _BatchImportJobClass { + GTypeClass parent_class; + void (*finalize) (BatchImportJob *self); + gchar* (*get_dest_identifier) (BatchImportJob* self); + gchar* (*get_source_identifier) (BatchImportJob* self); + gboolean (*is_directory) (BatchImportJob* self); + gchar* (*get_basename) (BatchImportJob* self); + gchar* (*get_path) (BatchImportJob* self); + DuplicatedFile* (*get_duplicated_file) (BatchImportJob* self); + void (*set_associated) (BatchImportJob* self, BatchImportJob* associated); + gboolean (*determine_file_size) (BatchImportJob* self, guint64* filesize, GFile** file_or_dir); + gboolean (*prepare) (BatchImportJob* self, GFile** file_to_import, gboolean* copy_to_library, GError** error); + gboolean (*complete) (BatchImportJob* self, MediaSource* source, BatchImportRoll* import_roll, GError** error); + time_t (*get_exposure_time_override) (BatchImportJob* self); +}; + +struct _ImportPageCameraImportJob { + BatchImportJob parent_instance; + ImportPageCameraImportJobPrivate * priv; +}; + +struct _ImportPageCameraImportJobClass { + BatchImportJobClass parent_class; +}; + +struct _ImportPageCameraImportJobPrivate { + GPContextWrapper* context; + ImportSource* import_file; + Camera* camera; + gchar* fulldir; + gchar* filename; + guint64 filesize; + PhotoMetadata* metadata; + time_t exposure_time; + ImportPageCameraImportJob* associated; + BackingPhotoRow* associated_file; + DuplicatedFile* duplicated_file; +}; + +typedef enum { + RAW_DEVELOPER_SHOTWELL = 0, + RAW_DEVELOPER_CAMERA, + RAW_DEVELOPER_EMBEDDED +} RawDeveloper; + +struct _BackingPhotoID { + gint64 id; +}; + +struct _BackingPhotoRow { + GTypeInstance parent_instance; + volatile int ref_count; + BackingPhotoRowPrivate * priv; + BackingPhotoID id; + time_t time_created; + gchar* filepath; + gint64 filesize; + time_t timestamp; + PhotoFileFormat file_format; + Dimensions dim; + Orientation original_orientation; +}; + +struct _BackingPhotoRowClass { + GTypeClass parent_class; + void (*finalize) (BackingPhotoRow *self); +}; + +struct _ViewFilter { + GTypeInstance parent_instance; + volatile int ref_count; + ViewFilterPrivate * priv; +}; + +struct _ViewFilterClass { + GTypeClass parent_class; + void (*finalize) (ViewFilter *self); + gboolean (*predicate) (ViewFilter* self, DataView* view); + void (*refresh) (ViewFilter* self); +}; + +struct _SearchViewFilter { + ViewFilter parent_instance; + SearchViewFilterPrivate * priv; +}; + +struct _SearchViewFilterClass { + ViewFilterClass parent_class; + guint (*get_criteria) (SearchViewFilter* self); +}; + +struct _ImportPageImportPageSearchViewFilter { + SearchViewFilter parent_instance; + ImportPageImportPageSearchViewFilterPrivate * priv; +}; + +struct _ImportPageImportPageSearchViewFilterClass { + SearchViewFilterClass parent_class; +}; + +typedef enum { + SEARCH_FILTER_CRITERIA_NONE = 0, + SEARCH_FILTER_CRITERIA_RECURSIVE = 1 << 0, + SEARCH_FILTER_CRITERIA_TEXT = 1 << 1, + SEARCH_FILTER_CRITERIA_FLAG = 1 << 2, + SEARCH_FILTER_CRITERIA_MEDIA = 1 << 3, + SEARCH_FILTER_CRITERIA_RATING = 1 << 4, + SEARCH_FILTER_CRITERIA_SAVEDSEARCH = 1 << 5, + SEARCH_FILTER_CRITERIA_ALL = 0xFFFFFFFFLL +} SearchFilterCriteria; + +struct _ImportPageHideImportedViewFilter { + ViewFilter parent_instance; + ImportPageHideImportedViewFilterPrivate * priv; +}; + +struct _ImportPageHideImportedViewFilterClass { + ViewFilterClass parent_class; +}; + + +static gpointer import_source_collection_parent_class = NULL; +static gpointer import_source_parent_class = NULL; +extern GPSpinIdleWrapper* import_page_spin_idle_context; +static IndexableIface* import_source_indexable_parent_iface = NULL; +static gpointer video_import_source_parent_class = NULL; +static gpointer photo_import_source_parent_class = NULL; +static gpointer import_preview_parent_class = NULL; +static GdkPixbuf* import_preview_placeholder_preview; +static GdkPixbuf* import_preview_placeholder_preview = NULL; +extern LibraryPhotoSourceCollection* library_photo_global; +extern VideoSourceCollection* video_global; +static gpointer camera_view_tracker_parent_class = NULL; +static gpointer camera_accumulator_parent_class = NULL; +static CoreTrackerAccumulatorIface* camera_accumulator_core_tracker_accumulator_parent_iface = NULL; +static gpointer import_page_parent_class = NULL; +extern GPContextWrapper* import_page_null_context; +GPContextWrapper* import_page_null_context = NULL; +GPSpinIdleWrapper* import_page_spin_idle_context = NULL; +static gpointer import_page_import_view_manager_parent_class = NULL; +static gpointer import_page_camera_import_job_parent_class = NULL; +static gpointer import_page_import_page_search_view_filter_parent_class = NULL; +static gpointer import_page_hide_imported_view_filter_parent_class = NULL; + +gpointer data_collection_ref (gpointer instance); +void data_collection_unref (gpointer instance); +GParamSpec* param_spec_data_collection (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_data_collection (GValue* value, gpointer v_object); +void value_take_data_collection (GValue* value, gpointer v_object); +gpointer value_get_data_collection (const GValue* value); +GType data_collection_get_type (void) G_GNUC_CONST; +GType data_object_get_type (void) G_GNUC_CONST; +gpointer alteration_ref (gpointer instance); +void alteration_unref (gpointer instance); +GParamSpec* param_spec_alteration (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_alteration (GValue* value, gpointer v_object); +void value_take_alteration (GValue* value, gpointer v_object); +gpointer value_get_alteration (const GValue* value); +GType alteration_get_type (void) G_GNUC_CONST; +GType marker_get_type (void) G_GNUC_CONST; +GType source_collection_get_type (void) G_GNUC_CONST; +GType data_source_get_type (void) G_GNUC_CONST; +gpointer source_backlink_ref (gpointer instance); +void source_backlink_unref (gpointer instance); +GParamSpec* param_spec_source_backlink (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_source_backlink (GValue* value, gpointer v_object); +void value_take_source_backlink (GValue* value, gpointer v_object); +gpointer value_get_source_backlink (const GValue* value); +GType source_backlink_get_type (void) G_GNUC_CONST; +GType import_source_collection_get_type (void) G_GNUC_CONST; +enum { + IMPORT_SOURCE_COLLECTION_DUMMY_PROPERTY +}; +ImportSourceCollection* import_source_collection_new (const gchar* name); +ImportSourceCollection* import_source_collection_construct (GType object_type, const gchar* name); +SourceCollection* source_collection_construct (GType object_type, const gchar* name); +static gboolean import_source_collection_real_holds_type_of_source (SourceCollection* base, DataSource* source); +GType thumbnail_source_get_type (void) G_GNUC_CONST; +GType import_source_get_type (void) G_GNUC_CONST; +gpointer source_holding_tank_ref (gpointer instance); +void source_holding_tank_unref (gpointer instance); +GParamSpec* param_spec_source_holding_tank (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_source_holding_tank (GValue* value, gpointer v_object); +void value_take_source_holding_tank (GValue* value, gpointer v_object); +gpointer value_get_source_holding_tank (const GValue* value); +GType source_holding_tank_get_type (void) G_GNUC_CONST; +gpointer source_snapshot_ref (gpointer instance); +void source_snapshot_unref (gpointer instance); +GParamSpec* param_spec_source_snapshot (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_source_snapshot (GValue* value, gpointer v_object); +void value_take_source_snapshot (GValue* value, gpointer v_object); +gpointer value_get_source_snapshot (const GValue* value); +GType source_snapshot_get_type (void) G_GNUC_CONST; +GType photo_file_format_get_type (void) G_GNUC_CONST; +GType indexable_get_type (void) G_GNUC_CONST; +#define IMPORT_SOURCE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_IMPORT_SOURCE, ImportSourcePrivate)) +enum { + IMPORT_SOURCE_DUMMY_PROPERTY +}; +ImportSource* import_source_construct (GType object_type, const gchar* camera_name, Camera* camera, gint fsid, const gchar* folder, const gchar* filename, gulong file_size, time_t modification_time); +#define DATA_OBJECT_INVALID_OBJECT_ID ((gint64) -1) +ThumbnailSource* thumbnail_source_construct (GType object_type, gint64 object_id); +gchar* indexable_prepare_indexable_string (const gchar* str); +void import_source_set_preview (ImportSource* self, GdkPixbuf* preview); +gchar* import_source_get_camera_name (ImportSource* self); +Camera* import_source_get_camera (ImportSource* self); +gint import_source_get_fsid (ImportSource* self); +gchar* import_source_get_folder (ImportSource* self); +gchar* import_source_get_filename (ImportSource* self); +gulong import_source_get_filesize (ImportSource* self); +time_t import_source_get_modification_time (ImportSource* self); +GdkPixbuf* import_source_get_preview (ImportSource* self); +static GdkPixbuf* import_source_real_get_preview (ImportSource* self); +time_t import_source_get_exposure_time (ImportSource* self); +static time_t import_source_real_get_exposure_time (ImportSource* self); +gchar* import_source_get_fulldir (ImportSource* self); +gchar* import_page_get_fulldir (Camera* camera, const gchar* camera_name, gint fsid, const gchar* folder); +static gchar* import_source_real_to_string (DataObject* base); +static gboolean import_source_real_internal_delete_backing (DataSource* base, GError** error); +gchar* data_object_to_string (DataObject* self); +gboolean data_source_internal_delete_backing (DataSource* self, GError** error); +gpointer gp_context_wrapper_ref (gpointer instance); +void gp_context_wrapper_unref (gpointer instance); +GParamSpec* gp_param_spec_context_wrapper (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void gp_value_set_context_wrapper (GValue* value, gpointer v_object); +void gp_value_take_context_wrapper (GValue* value, gpointer v_object); +gpointer gp_value_get_context_wrapper (const GValue* value); +GType gp_context_wrapper_get_type (void) G_GNUC_CONST; +GType gp_spin_idle_wrapper_get_type (void) G_GNUC_CONST; +static const gchar* import_source_real_get_indexable_keywords (Indexable* base); +static void import_source_finalize (GObject* obj); +GType video_import_source_get_type (void) G_GNUC_CONST; +enum { + VIDEO_IMPORT_SOURCE_DUMMY_PROPERTY +}; +VideoImportSource* video_import_source_new (const gchar* camera_name, Camera* camera, gint fsid, const gchar* folder, const gchar* filename, gulong file_size, time_t modification_time); +VideoImportSource* video_import_source_construct (GType object_type, const gchar* camera_name, Camera* camera, gint fsid, const gchar* folder, const gchar* filename, gulong file_size, time_t modification_time); +static GdkPixbuf* video_import_source_real_get_thumbnail (ThumbnailSource* base, gint scale, GError** error); +GdkPixbuf* thumbnail_source_create_thumbnail (ThumbnailSource* self, gint scale, GError** error); +static GdkPixbuf* video_import_source_real_create_thumbnail (ThumbnailSource* base, gint scale, GError** error); +GdkPixbuf* scale_pixbuf (GdkPixbuf* pixbuf, gint scale, GdkInterpType interp, gboolean scale_up); +static gchar* video_import_source_real_get_typename (DataSource* base); +static gint64 video_import_source_real_get_instance_id (DataSource* base); +gint64 data_object_get_object_id (DataObject* self); +static PhotoFileFormat video_import_source_real_get_preferred_thumbnail_format (ThumbnailSource* base); +PhotoFileFormat photo_file_format_get_system_default_format (void); +static gchar* video_import_source_real_get_name (DataObject* base); +void video_import_source_update (VideoImportSource* self, GdkPixbuf* preview); +GdkPixbuf* resources_get_noninterpretable_badge_pixbuf (void); +GType photo_import_source_get_type (void) G_GNUC_CONST; +gpointer media_metadata_ref (gpointer instance); +void media_metadata_unref (gpointer instance); +GParamSpec* param_spec_media_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_media_metadata (GValue* value, gpointer v_object); +void value_take_media_metadata (GValue* value, gpointer v_object); +gpointer value_get_media_metadata (const GValue* value); +GType media_metadata_get_type (void) G_GNUC_CONST; +GType photo_metadata_get_type (void) G_GNUC_CONST; +#define PHOTO_IMPORT_SOURCE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_PHOTO_IMPORT_SOURCE, PhotoImportSourcePrivate)) +enum { + PHOTO_IMPORT_SOURCE_DUMMY_PROPERTY +}; +#define PHOTO_IMPORT_SOURCE_INTERP GDK_INTERP_BILINEAR +PhotoImportSource* photo_import_source_new (const gchar* camera_name, Camera* camera, gint fsid, const gchar* folder, const gchar* filename, gulong file_size, time_t modification_time, PhotoFileFormat file_format); +PhotoImportSource* photo_import_source_construct (GType object_type, const gchar* camera_name, Camera* camera, gint fsid, const gchar* folder, const gchar* filename, gulong file_size, time_t modification_time, PhotoFileFormat file_format); +static gchar* photo_import_source_real_get_name (DataObject* base); +gchar* photo_import_source_get_title (PhotoImportSource* self); +gboolean is_string_empty (const gchar* s); +static gchar* photo_import_source_real_get_typename (DataSource* base); +static gint64 photo_import_source_real_get_instance_id (DataSource* base); +static PhotoFileFormat photo_import_source_real_get_preferred_thumbnail_format (ThumbnailSource* base); +gboolean photo_file_format_can_write (PhotoFileFormat self); +static GdkPixbuf* photo_import_source_real_create_thumbnail (ThumbnailSource* base, gint scale, GError** error); +void photo_import_source_update (PhotoImportSource* self, GdkPixbuf* preview, const gchar* preview_md5, PhotoMetadata* metadata, const gchar* exif_md5); +static time_t photo_import_source_real_get_exposure_time (ImportSource* base); +gpointer metadata_date_time_ref (gpointer instance); +void metadata_date_time_unref (gpointer instance); +GParamSpec* param_spec_metadata_date_time (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_metadata_date_time (GValue* value, gpointer v_object); +void value_take_metadata_date_time (GValue* value, gpointer v_object); +gpointer value_get_metadata_date_time (const GValue* value); +GType metadata_date_time_get_type (void) G_GNUC_CONST; +MetadataDateTime* photo_metadata_get_exposure_date_time (PhotoMetadata* self); +time_t metadata_date_time_get_timestamp (MetadataDateTime* self); +gchar* media_metadata_get_title (MediaMetadata* self); +PhotoMetadata* photo_import_source_get_metadata (PhotoImportSource* self); +static GdkPixbuf* photo_import_source_real_get_preview (ImportSource* base); +static GdkPixbuf* photo_import_source_real_get_thumbnail (ThumbnailSource* base, gint scale, GError** error); +PhotoFileFormat photo_import_source_get_file_format (PhotoImportSource* self); +gchar* photo_import_source_get_preview_md5 (PhotoImportSource* self); +void photo_import_source_set_associated (PhotoImportSource* self, PhotoImportSource* associated); +PhotoImportSource* photo_import_source_get_associated (PhotoImportSource* self); +static gboolean photo_import_source_real_internal_delete_backing (DataSource* base, GError** error); +static void photo_import_source_finalize (GObject* obj); +GType data_view_get_type (void) G_GNUC_CONST; +GType thumbnail_view_get_type (void) G_GNUC_CONST; +GType checkerboard_item_get_type (void) G_GNUC_CONST; +GType dimensions_get_type (void) G_GNUC_CONST; +Dimensions* dimensions_dup (const Dimensions* self); +void dimensions_free (Dimensions* self); +GType media_source_item_get_type (void) G_GNUC_CONST; +GType import_preview_get_type (void) G_GNUC_CONST; +GType duplicated_file_get_type (void) G_GNUC_CONST; +#define IMPORT_PREVIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_IMPORT_PREVIEW, ImportPreviewPrivate)) +enum { + IMPORT_PREVIEW_DUMMY_PROPERTY +}; +#define IMPORT_PREVIEW_MAX_SCALE 128 +ImportPreview* import_preview_new (ImportSource* source); +ImportPreview* import_preview_construct (GType object_type, ImportSource* source); +void dimensions_init (Dimensions *self, gint width, gint height); +gchar* data_object_get_name (DataObject* self); +MediaSourceItem* media_source_item_new (ThumbnailSource* source, Dimensions* initial_pixbuf_dim, const gchar* title, const gchar* comment, gboolean marked_up, PangoAlignment alignment); +MediaSourceItem* media_source_item_construct (GType object_type, ThumbnailSource* source, Dimensions* initial_pixbuf_dim, const gchar* title, const gchar* comment, gboolean marked_up, PangoAlignment alignment); +void media_source_item_set_enable_sprockets (MediaSourceItem* self, gboolean enable_sprockets); +GdkPixbuf* thumbnail_source_get_thumbnail (ThumbnailSource* self, gint scale, GError** error); +GdkPixbuf* get_placeholder_pixbuf (void); +GType orientation_get_type (void) G_GNUC_CONST; +Orientation photo_metadata_get_orientation (PhotoMetadata* self); +GdkPixbuf* orientation_rotate_pixbuf (Orientation self, GdkPixbuf* pixbuf); +void checkerboard_item_set_subtitle (CheckerboardItem* self, const gchar* text, gboolean marked_up, PangoAlignment alignment); +void checkerboard_item_set_image (CheckerboardItem* self, GdkPixbuf* pixbuf); +gboolean import_preview_is_already_imported (ImportPreview* self); +ImportSource* import_preview_get_import_source (ImportPreview* self); +gboolean library_photo_has_nontrash_duplicate (GFile* file, const gchar* thumbnail_md5, const gchar* full_md5, PhotoFileFormat file_format); +GType photo_id_get_type (void) G_GNUC_CONST; +PhotoID* photo_id_dup (const PhotoID* self); +void photo_id_free (PhotoID* self); +DuplicatedFile* duplicated_file_create_from_photo_id (PhotoID* photo_id); +void library_photo_get_nontrash_duplicate (GFile* file, const gchar* thumbnail_md5, const gchar* full_md5, PhotoFileFormat file_format, PhotoID* result); +GType database_source_collection_get_type (void) G_GNUC_CONST; +GType media_source_collection_get_type (void) G_GNUC_CONST; +GType library_photo_source_collection_get_type (void) G_GNUC_CONST; +gboolean library_photo_source_collection_has_basename_filesize_duplicate (LibraryPhotoSourceCollection* self, const gchar* basename, gint64 filesize); +void library_photo_source_collection_get_basename_filesize_duplicate (LibraryPhotoSourceCollection* self, const gchar* basename, gint64 filesize, PhotoID* result); +GType video_source_collection_get_type (void) G_GNUC_CONST; +gboolean video_source_collection_has_basename_filesize_duplicate (VideoSourceCollection* self, const gchar* basename, guint64 filesize); +GType video_id_get_type (void) G_GNUC_CONST; +VideoID* video_id_dup (const VideoID* self); +void video_id_free (VideoID* self); +DuplicatedFile* duplicated_file_create_from_video_id (VideoID* video_id); +void video_source_collection_get_basename_filesize_duplicate (VideoSourceCollection* self, const gchar* basename, guint64 filesize, VideoID* result); +DuplicatedFile* import_preview_get_duplicated_file (ImportPreview* self); +DataSource* data_view_get_source (DataView* self); +static void import_preview_finalize (GObject* obj); +gpointer core_tracker_ref (gpointer instance); +void core_tracker_unref (gpointer instance); +GParamSpec* core_param_spec_tracker (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void core_value_set_tracker (GValue* value, gpointer v_object); +void core_value_take_tracker (GValue* value, gpointer v_object); +gpointer core_value_get_tracker (const GValue* value); +GType core_tracker_get_type (void) G_GNUC_CONST; +GType core_view_tracker_get_type (void) G_GNUC_CONST; +GType camera_view_tracker_get_type (void) G_GNUC_CONST; +GType camera_accumulator_get_type (void) G_GNUC_CONST; +enum { + CAMERA_VIEW_TRACKER_DUMMY_PROPERTY +}; +CameraAccumulator* camera_accumulator_new (void); +CameraAccumulator* camera_accumulator_construct (GType object_type); +GType view_collection_get_type (void) G_GNUC_CONST; +CameraViewTracker* camera_view_tracker_new (ViewCollection* collection); +CameraViewTracker* camera_view_tracker_construct (GType object_type, ViewCollection* collection); +CoreViewTracker* core_view_tracker_new (ViewCollection* collection); +CoreViewTracker* core_view_tracker_construct (GType object_type, ViewCollection* collection); +GType core_tracker_accumulator_get_type (void) G_GNUC_CONST; +void core_view_tracker_start (CoreViewTracker* self, CoreTrackerAccumulator* all, CoreTrackerAccumulator* visible, CoreTrackerAccumulator* selected); +static void camera_view_tracker_finalize (CoreTracker* obj); +#define CAMERA_ACCUMULATOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_CAMERA_ACCUMULATOR, CameraAccumulatorPrivate)) +enum { + CAMERA_ACCUMULATOR_DUMMY_PROPERTY, + CAMERA_ACCUMULATOR_TOTAL, + CAMERA_ACCUMULATOR_PHOTOS, + CAMERA_ACCUMULATOR_VIDEOS, + CAMERA_ACCUMULATOR_RAW +}; +static gboolean camera_accumulator_real_include (CoreTrackerAccumulator* base, DataObject* object); +gint camera_accumulator_get_total (CameraAccumulator* self); +static void camera_accumulator_set_total (CameraAccumulator* self, gint value); +gint camera_accumulator_get_photos (CameraAccumulator* self); +static void camera_accumulator_set_photos (CameraAccumulator* self, gint value); +gint camera_accumulator_get_raw (CameraAccumulator* self); +static void camera_accumulator_set_raw (CameraAccumulator* self, gint value); +gint camera_accumulator_get_videos (CameraAccumulator* self); +static void camera_accumulator_set_videos (CameraAccumulator* self, gint value); +static gboolean camera_accumulator_real_uninclude (CoreTrackerAccumulator* base, DataObject* object); +static gboolean camera_accumulator_real_altered (CoreTrackerAccumulator* base, DataObject* object, Alteration* alteration); +gchar* camera_accumulator_to_string (CameraAccumulator* self); +static void camera_accumulator_finalize (GObject* obj); +static void _vala_camera_accumulator_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); +static void _vala_camera_accumulator_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); +GType page_get_type (void) G_GNUC_CONST; +GType page_window_get_type (void) G_GNUC_CONST; +GType fullscreen_window_get_type (void) G_GNUC_CONST; +gpointer injection_group_ref (gpointer instance); +void injection_group_unref (gpointer instance); +GParamSpec* param_spec_injection_group (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_injection_group (GValue* value, gpointer v_object); +void value_take_injection_group (GValue* value, gpointer v_object); +gpointer value_get_injection_group (const GValue* value); +GType injection_group_get_type (void) G_GNUC_CONST; +GType checkerboard_page_get_type (void) G_GNUC_CONST; +GType checkerboard_page_activator_get_type (void) G_GNUC_CONST; +GType checkerboard_page_keyboard_modifiers_get_type (void) G_GNUC_CONST; +CheckerboardPageKeyboardModifiers* checkerboard_page_keyboard_modifiers_dup (const CheckerboardPageKeyboardModifiers* self); +void checkerboard_page_keyboard_modifiers_free (CheckerboardPageKeyboardModifiers* self); +gpointer view_filter_ref (gpointer instance); +void view_filter_unref (gpointer instance); +GParamSpec* param_spec_view_filter (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_view_filter (GValue* value, gpointer v_object); +void value_take_view_filter (GValue* value, gpointer v_object); +gpointer value_get_view_filter (const GValue* value); +GType view_filter_get_type (void) G_GNUC_CONST; +GType search_view_filter_get_type (void) G_GNUC_CONST; +GType import_page_get_type (void) G_GNUC_CONST; +static GType import_page_import_page_search_view_filter_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +static GType import_page_hide_imported_view_filter_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +#define IMPORT_PAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_IMPORT_PAGE, ImportPagePrivate)) +enum { + IMPORT_PAGE_DUMMY_PROPERTY +}; +static void import_page_on_media_added_removed (ImportPage* self); +static void _import_page_on_media_added_removed_data_collection_contents_altered (DataCollection* _sender, GeeIterable* added, GeeIterable* removed, gpointer self); +GType import_page_refresh_result_get_type (void) G_GNUC_CONST; +static ImportPageImportPageSearchViewFilter* import_page_import_page_search_view_filter_new (void); +static ImportPageImportPageSearchViewFilter* import_page_import_page_search_view_filter_construct (GType object_type); +static ImportPageHideImportedViewFilter* import_page_hide_imported_view_filter_new (void); +static ImportPageHideImportedViewFilter* import_page_hide_imported_view_filter_construct (GType object_type); +#define IMPORT_PAGE_UNMOUNT_FAILED_MSG _ ("Unable to unmount camera. Try unmounting the camera from the file man" \ +"ager.") +ImportPage* import_page_new (Camera* camera, const gchar* uri, const gchar* display_name, const gchar* icon); +ImportPage* import_page_construct (GType object_type, Camera* camera, const gchar* uri, const gchar* display_name, const gchar* icon); +CheckerboardPage* checkerboard_page_construct (GType object_type, const gchar* page_name); +ViewCollection* page_get_view (Page* self); +void page_set_page_name (Page* self, const gchar* page_name); +GPContextWrapper* gp_context_wrapper_new (void); +GPContextWrapper* gp_context_wrapper_construct (GType object_type); +GPSpinIdleWrapper* gp_spin_idle_wrapper_new (void); +GPSpinIdleWrapper* gp_spin_idle_wrapper_construct (GType object_type); +gpointer view_manager_ref (gpointer instance); +void view_manager_unref (gpointer instance); +GParamSpec* param_spec_view_manager (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_view_manager (GValue* value, gpointer v_object); +void value_take_view_manager (GValue* value, gpointer v_object); +gpointer value_get_view_manager (const GValue* value); +GType view_manager_get_type (void) G_GNUC_CONST; +gpointer view_collection_monitor_ref (gpointer instance); +void view_collection_monitor_unref (gpointer instance); +GParamSpec* view_collection_param_spec_monitor (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void view_collection_value_set_monitor (GValue* value, gpointer v_object); +void view_collection_value_take_monitor (GValue* value, gpointer v_object); +gpointer view_collection_value_get_monitor (const GValue* value); +GType view_collection_monitor_get_type (void) G_GNUC_CONST; +ViewCollectionMonitor* view_collection_monitor_source_collection (ViewCollection* self, SourceCollection* sources, ViewManager* manager, Alteration* prereq, GeeCollection* initial, ProgressMonitor progress_monitor, void* progress_monitor_target); +static ImportPageImportViewManager* import_page_import_view_manager_new (ImportPage* owner); +static ImportPageImportViewManager* import_page_import_view_manager_construct (GType object_type, ImportPage* owner); +static GType import_page_import_view_manager_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +void data_collection_set_comparator (DataCollection* self, Comparator comparator, void* comparator_target, ComparatorPredicate predicate, void* predicate_target); +static gint64 import_page_preview_comparator (void* a, void* b); +static gint64 _import_page_preview_comparator_comparator (void* a, void* b, gpointer self); +static gboolean import_page_preview_comparator_predicate (DataObject* object, Alteration* alteration); +static gboolean _import_page_preview_comparator_predicate_comparator_predicate (DataObject* object, Alteration* alteration, gpointer self); +static void import_page_on_view_changed (ImportPage* self); +static void _import_page_on_view_changed_view_collection_items_state_changed (ViewCollection* _sender, GeeIterable* changed, gpointer self); +static void _import_page_on_view_changed_data_collection_contents_altered (DataCollection* _sender, GeeIterable* added, GeeIterable* removed, gpointer self); +static void _import_page_on_view_changed_view_collection_items_visibility_changed (ViewCollection* _sender, GeeCollection* changed, gpointer self); +void data_collection_set_property (DataCollection* self, const gchar* name, GValue* val, ValueEqualFunc value_equals, void* value_equals_target); +#define CHECKERBOARD_ITEM_PROP_SHOW_SUBTITLES "show-subtitles" +void checkerboard_page_init_item_context_menu (CheckerboardPage* self, const gchar* path); +void checkerboard_page_init_page_context_menu (CheckerboardPage* self, const gchar* path); +static GtkToolbar* import_page_real_get_toolbar (Page* base); +GtkToolbar* page_get_toolbar (Page* self); +static void import_page_on_hide_imported (ImportPage* self); +static void _import_page_on_hide_imported_gtk_button_clicked (GtkButton* _sender, gpointer self); +GType configuration_facade_get_type (void) G_GNUC_CONST; +GType config_facade_get_type (void) G_GNUC_CONST; +ConfigFacade* config_facade_get_instance (void); +gboolean configuration_facade_get_hide_photos_already_imported (ConfigurationFacade* self); +GtkAction* page_get_action (Page* self, const gchar* name); +#define RESOURCES_IMPORT "shotwell-import" +#define RESOURCES_IMPORT_ALL "shotwell-import-all" +static void import_page_update_toolbar_state (ImportPage* self); +static CoreViewTracker* import_page_real_get_view_tracker (CheckerboardPage* base); +static gchar* import_page_real_get_view_empty_message (CheckerboardPage* base); +gboolean alteration_has_detail (Alteration* self, const gchar* subject, const gchar* detail); +static gint64 import_page_import_job_comparator (ImportPage* self, void* a, void* b); +gpointer batch_import_job_ref (gpointer instance); +void batch_import_job_unref (gpointer instance); +GParamSpec* param_spec_batch_import_job (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_batch_import_job (GValue* value, gpointer v_object); +void value_take_batch_import_job (GValue* value, gpointer v_object); +gpointer value_get_batch_import_job (const GValue* value); +GType batch_import_job_get_type (void) G_GNUC_CONST; +static GType import_page_camera_import_job_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +static time_t import_page_camera_import_job_get_exposure_time (ImportPageCameraImportJob* self); +static void import_page_real_init_collect_ui_filenames (Page* base, GeeList* ui_filenames); +void page_init_collect_ui_filenames (Page* self, GeeList* ui_filenames); +static GtkToggleActionEntry* import_page_real_init_collect_toggle_action_entries (Page* base, int* result_length1); +GtkToggleActionEntry* page_init_collect_toggle_action_entries (Page* self, int* result_length1); +#define TRANSLATABLE "translatable" +static void import_page_on_display_titles (ImportPage* self, GtkAction* action); +static void _import_page_on_display_titles_gtk_action_callback (GtkAction* action, gpointer self); +gboolean configuration_facade_get_display_photo_titles (ConfigurationFacade* self); +static void _vala_array_add143 (GtkToggleActionEntry** array, int* length, int* size, const GtkToggleActionEntry* value); +static GtkActionEntry* import_page_real_init_collect_action_entries (Page* base, int* result_length1); +GtkActionEntry* page_init_collect_action_entries (Page* self, int* result_length1); +static void import_page_on_import_selected (ImportPage* self); +static void _import_page_on_import_selected_gtk_action_callback (GtkAction* action, gpointer self); +static void _vala_array_add144 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +static void import_page_on_import_all (ImportPage* self); +static void _import_page_on_import_all_gtk_action_callback (GtkAction* action, gpointer self); +static void _vala_array_add145 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +Camera* import_page_get_camera (ImportPage* self); +gchar* import_page_get_uri (ImportPage* self); +gboolean import_page_is_busy (ImportPage* self); +static void import_page_real_init_actions (Page* base, gint selected_count, gint count); +void page_set_action_important (Page* self, const gchar* name, gboolean important); +void page_init_actions (Page* self, gint selected_count, gint count); +gboolean import_page_is_refreshed (ImportPage* self); +gchar* import_page_get_refresh_message (ImportPage* self); +static void import_page_update_status (ImportPage* self, gboolean busy, gboolean refreshed); +gint view_collection_get_unfiltered_count (ViewCollection* self); +gint view_collection_get_selected_count (ViewCollection* self); +void page_set_action_sensitive (Page* self, const gchar* name, gboolean sensitive); +gint data_collection_get_count (DataCollection* self); +GType app_window_get_type (void) G_GNUC_CONST; +AppWindow* app_window_get_instance (void); +void app_window_set_common_action_sensitive (AppWindow* self, const gchar* name, gboolean sensitive); +void checkerboard_page_set_display_titles (CheckerboardPage* self, gboolean display); +void configuration_facade_set_display_photo_titles (ConfigurationFacade* self, gboolean display); +static void import_page_real_switched_to (Page* base); +void page_switched_to (Page* self); +static void import_page_real_ready (Page* base); +static void import_page_try_refreshing_camera (ImportPage* self, gboolean fail_on_locked); +static ImportPageRefreshResult import_page_refresh_camera (ImportPage* self); +void app_window_error_message (const gchar* message, GtkWindow* parent); +#define RESOURCES_APP_TITLE "Shotwell" +void checkerboard_page_set_page_message (CheckerboardPage* self, const gchar* message); +gboolean import_page_unmount_camera (ImportPage* self, GMount* mount); +static void import_page_on_unmounted (ImportPage* self, GMount* mount); +static void _import_page_on_unmounted_g_mount_unmounted (GMount* _sender, gpointer self); +static void import_page_on_unmount_finished (ImportPage* self, GObject* source, GAsyncResult* aresult); +static void _import_page_on_unmount_finished_gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self); +static void import_page_clear_all_import_sources (ImportPage* self); +Marker* data_collection_start_marking (DataCollection* self); +void marker_mark_all (Marker* self); +GType media_source_get_type (void) G_GNUC_CONST; +gint source_collection_destroy_marked (SourceCollection* self, Marker* marker, gboolean delete_backing, ProgressMonitor monitor, void* monitor_target, GeeList* not_removed); +static gboolean import_page_check_directory_exists (ImportPage* self, gint fsid, const gchar* dir, const gchar* search_target); +static gboolean import_page_enumerate_files (ImportPage* self, gint fsid, const gchar* dir, GeeArrayList* import_list); +static void import_page_auto_match_raw_jpeg (ImportPage* self, GeeArrayList* import_list); +static void import_page_load_previews_and_metadata (ImportPage* self, GeeList* import_list); +static gchar* import_page_chomp_ch (const gchar* str, gchar ch); +gchar* import_page_append_path (const gchar* basepath, const gchar* addition); +gchar* import_page_get_fs_basedir (Camera* camera, gint fsid); +#define GP_MAX_BASEDIR_LENGTH 255 +gboolean gp_get_info (GPContext* context, Camera* camera, const gchar* folder, const gchar* filename, CameraFileInfo* info, GError** error); +gboolean video_reader_is_supported_video_filename (const gchar* filename); +PhotoFileFormat photo_file_format_from_gphoto_type (const gchar* type); +PhotoFileFormat photo_file_format_get_by_basename_extension (const gchar* basename); +void spin_event_loop (void); +void disassemble_filename (const gchar* basename, gchar** name, gchar** ext); +PhotoMetadata* gp_load_metadata (GPContext* context, Camera* camera, const gchar* folder, const gchar* filename, GError** error); +guint8* photo_metadata_flatten_exif (PhotoMetadata* self, gboolean include_preview, int* result_length1); +gchar* md5_binary (guint8* buffer, gsize length); +GdkPixbuf* gp_load_preview (GPContext* context, Camera* camera, const gchar* folder, const gchar* filename, guint8** raw, int* raw_length1, gsize* raw_length, GError** error); +gboolean data_collection_add (DataCollection* self, DataObject* object); +void view_collection_install_view_filter (ViewCollection* self, ViewFilter* f); +void view_collection_remove_view_filter (ViewCollection* self, ViewFilter* f); +void configuration_facade_set_hide_photos_already_imported (ConfigurationFacade* self, gboolean hide_imported); +static void import_page_import (ImportPage* self, GeeIterable* items); +GeeList* view_collection_get_selected (ViewCollection* self); +GeeCollection* data_collection_get_all (DataCollection* self); +GType sorted_list_get_type (void) G_GNUC_CONST; +static gint64 _import_page_import_job_comparator_comparator (void* a, void* b, gpointer self); +SortedList* sorted_list_new (GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, Comparator cmp, void* cmp_target); +SortedList* sorted_list_construct (GType object_type, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, Comparator cmp, void* cmp_target); +static ImportPageCameraImportJob* import_page_camera_import_job_new (GPContextWrapper* context, ImportSource* import_file, DuplicatedFile* duplicated_file); +static ImportPageCameraImportJob* import_page_camera_import_job_construct (GType object_type, GPContextWrapper* context, ImportSource* import_file, DuplicatedFile* duplicated_file); +void batch_import_job_set_associated (BatchImportJob* self, BatchImportJob* associated); +GType batch_import_get_type (void) G_GNUC_CONST; +gpointer import_manifest_ref (gpointer instance); +void import_manifest_unref (gpointer instance); +GParamSpec* param_spec_import_manifest (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_import_manifest (GValue* value, gpointer v_object); +void value_take_import_manifest (GValue* value, gpointer v_object); +gpointer value_get_import_manifest (const GValue* value); +GType import_manifest_get_type (void) G_GNUC_CONST; +static void import_page_import_reporter (ImportPage* self, ImportManifest* manifest); +gpointer batch_import_roll_ref (gpointer instance); +void batch_import_roll_unref (gpointer instance); +GParamSpec* param_spec_batch_import_roll (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_batch_import_roll (GValue* value, gpointer v_object); +void value_take_batch_import_roll (GValue* value, gpointer v_object); +gpointer value_get_batch_import_roll (const GValue* value); +GType batch_import_roll_get_type (void) G_GNUC_CONST; +static void _import_page_import_reporter_batch_import_import_reporter (ImportManifest* manifest, BatchImportRoll* import_roll, gpointer self); +BatchImport* batch_import_new (GeeIterable* jobs, const gchar* name, BatchImportImportReporter reporter, void* reporter_target, GeeArrayList* prefailed, GeeArrayList* pre_already_imported, GCancellable* cancellable, BatchImportRoll* import_roll, ImportManifest* skip_manifest); +BatchImport* batch_import_construct (GType object_type, GeeIterable* jobs, const gchar* name, BatchImportImportReporter reporter, void* reporter_target, GeeArrayList* prefailed, GeeArrayList* pre_already_imported, GCancellable* cancellable, BatchImportRoll* import_roll, ImportManifest* skip_manifest); +gpointer batch_import_result_ref (gpointer instance); +void batch_import_result_unref (gpointer instance); +GParamSpec* param_spec_batch_import_result (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_batch_import_result (GValue* value, gpointer v_object); +void value_take_batch_import_result (GValue* value, gpointer v_object); +gpointer value_get_batch_import_result (const GValue* value); +GType batch_import_result_get_type (void) G_GNUC_CONST; +static void import_page_on_import_job_failed (ImportPage* self, BatchImportResult* _result_); +static void _import_page_on_import_job_failed_batch_import_import_job_failed (BatchImport* _sender, BatchImportResult* _result_, gpointer self); +static void import_page_close_import (ImportPage* self); +static void _import_page_close_import_batch_import_import_complete (BatchImport* _sender, ImportManifest* manifest, BatchImportRoll* import_roll, gpointer self); +GType library_window_get_type (void) G_GNUC_CONST; +LibraryWindow* library_window_get_app (void); +void library_window_enqueue_batch_import (LibraryWindow* self, BatchImport* batch_import, gboolean allow_user_cancel); +void library_window_switch_to_import_queue_page (LibraryWindow* self); +ImportManifest* import_manifest_new (GeeList* prefailed, GeeList* pre_already_imported); +ImportManifest* import_manifest_construct (GType object_type, GeeList* prefailed, GeeList* pre_already_imported); +GType import_result_get_type (void) G_GNUC_CONST; +gchar* import_ui_get_media_specific_string (GeeCollection* import_collection, const gchar* photos_msg, const gchar* videos_msg, const gchar* both_msg, const gchar* neither_msg); +gpointer import_ui_question_params_ref (gpointer instance); +void import_ui_question_params_unref (gpointer instance); +GParamSpec* import_ui_param_spec_question_params (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void import_ui_value_set_question_params (GValue* value, gpointer v_object); +void import_ui_value_take_question_params (GValue* value, gpointer v_object); +gpointer import_ui_value_get_question_params (const GValue* value); +GType import_ui_question_params_get_type (void) G_GNUC_CONST; +#define RESOURCES_DELETE_LABEL _ ("_Delete") +ImportUIQuestionParams* import_ui_question_params_new (const gchar* question, const gchar* yes_button, const gchar* no_button); +ImportUIQuestionParams* import_ui_question_params_construct (GType object_type, const gchar* question, const gchar* yes_button, const gchar* no_button); +gboolean import_ui_report_manifest (ImportManifest* manifest, gboolean show_dest_id, ImportUIQuestionParams* question); +void marker_mark (Marker* self, DataObject* object); +static ImportSource* import_page_camera_import_job_get_source (ImportPageCameraImportJob* self); +GType progress_dialog_get_type (void) G_GNUC_CONST; +ProgressDialog* progress_dialog_new (GtkWindow* owner, const gchar* text, GCancellable* cancellable); +ProgressDialog* progress_dialog_construct (GType object_type, GtkWindow* owner, const gchar* text, GCancellable* cancellable); +gboolean progress_dialog_monitor (ProgressDialog* self, guint64 count, guint64 total, gboolean do_event_loop); +static gboolean _progress_dialog_monitor_progress_monitor (guint64 current, guint64 total, gboolean do_event_loop, gpointer self); +void progress_dialog_close (ProgressDialog* self); +static void import_page_real_set_display_titles (CheckerboardPage* base, gboolean display); +static SearchViewFilter* import_page_real_get_search_view_filter (CheckerboardPage* base); +#define IMPORT_PAGE_IMPORT_VIEW_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), IMPORT_PAGE_TYPE_IMPORT_VIEW_MANAGER, ImportPageImportViewManagerPrivate)) +enum { + IMPORT_PAGE_IMPORT_VIEW_MANAGER_DUMMY_PROPERTY +}; +ViewManager* view_manager_construct (GType object_type); +static DataView* import_page_import_view_manager_real_create_view (ViewManager* base, DataSource* source); +static void import_page_import_view_manager_finalize (ViewManager* obj); +gpointer backing_photo_row_ref (gpointer instance); +void backing_photo_row_unref (gpointer instance); +GParamSpec* param_spec_backing_photo_row (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_backing_photo_row (GValue* value, gpointer v_object); +void value_take_backing_photo_row (GValue* value, gpointer v_object); +gpointer value_get_backing_photo_row (const GValue* value); +GType backing_photo_row_get_type (void) G_GNUC_CONST; +#define IMPORT_PAGE_CAMERA_IMPORT_JOB_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, ImportPageCameraImportJobPrivate)) +enum { + IMPORT_PAGE_CAMERA_IMPORT_JOB_DUMMY_PROPERTY +}; +BatchImportJob* batch_import_job_construct (GType object_type); +static DuplicatedFile* import_page_camera_import_job_real_get_duplicated_file (BatchImportJob* base); +static time_t import_page_camera_import_job_real_get_exposure_time_override (BatchImportJob* base); +static gchar* import_page_camera_import_job_real_get_dest_identifier (BatchImportJob* base); +static gchar* import_page_camera_import_job_real_get_source_identifier (BatchImportJob* base); +static gchar* import_page_camera_import_job_real_get_basename (BatchImportJob* base); +static gchar* import_page_camera_import_job_real_get_path (BatchImportJob* base); +static void import_page_camera_import_job_real_set_associated (BatchImportJob* base, BatchImportJob* associated); +static gboolean import_page_camera_import_job_real_is_directory (BatchImportJob* base); +static gboolean import_page_camera_import_job_real_determine_file_size (BatchImportJob* base, guint64* filesize, GFile** file); +static gboolean import_page_camera_import_job_real_prepare (BatchImportJob* base, GFile** file_to_import, gboolean* copy_to_library, GError** error); +GFile* library_files_generate_unique_file (const gchar* basename, MediaMetadata* metadata, time_t ts, gboolean* collision, GError** error); +void library_monitor_blacklist_file (GFile* file, const gchar* reason); +void gp_save_image (GPContext* context, Camera* camera, const gchar* folder, const gchar* filename, GFile* dest_file, GError** error); +void library_monitor_unblacklist_file (GFile* file); +GType raw_developer_get_type (void) G_GNUC_CONST; +BackingPhotoRow* raw_developer_create_backing_row_for_development (RawDeveloper self, const gchar* raw_filepath, const gchar* camera_development_filename, GError** error); +gchar* batch_import_job_get_basename (BatchImportJob* self); +GType backing_photo_id_get_type (void) G_GNUC_CONST; +BackingPhotoID* backing_photo_id_dup (const BackingPhotoID* self); +void backing_photo_id_free (BackingPhotoID* self); +static gboolean import_page_camera_import_job_real_complete (BatchImportJob* base, MediaSource* source, BatchImportRoll* import_roll, GError** error); +GType photo_source_get_type (void) G_GNUC_CONST; +GType photo_get_type (void) G_GNUC_CONST; +void photo_add_backing_photo_for_development (Photo* self, RawDeveloper d, BackingPhotoRow* bpr, GError** error); +void photo_set_raw_developer (Photo* self, RawDeveloper d); +RawDeveloper configuration_facade_get_default_raw_developer (ConfigurationFacade* self); +static void import_page_camera_import_job_finalize (BatchImportJob* obj); +enum { + IMPORT_PAGE_IMPORT_PAGE_SEARCH_VIEW_FILTER_DUMMY_PROPERTY +}; +static guint import_page_import_page_search_view_filter_real_get_criteria (SearchViewFilter* base); +GType search_filter_criteria_get_type (void) G_GNUC_CONST; +static gboolean import_page_import_page_search_view_filter_real_predicate (ViewFilter* base, DataView* view); +guint search_view_filter_get_criteria (SearchViewFilter* self); +gboolean search_view_filter_filter_by_media_type (SearchViewFilter* self); +gboolean search_view_filter_get_show_media_video (SearchViewFilter* self); +gboolean search_view_filter_get_show_media_photos (SearchViewFilter* self); +gboolean search_view_filter_get_show_media_raw (SearchViewFilter* self); +const gchar* indexable_get_indexable_keywords (Indexable* self); +gchar** search_view_filter_get_search_filter_words (SearchViewFilter* self, int* result_length1); +SearchViewFilter* search_view_filter_construct (GType object_type); +enum { + IMPORT_PAGE_HIDE_IMPORTED_VIEW_FILTER_DUMMY_PROPERTY +}; +static gboolean import_page_hide_imported_view_filter_real_predicate (ViewFilter* base, DataView* view); +ViewFilter* view_filter_construct (GType object_type); +static void import_page_finalize (GObject* obj); + + +ImportSourceCollection* import_source_collection_construct (GType object_type, const gchar* name) { + ImportSourceCollection* self = NULL; + const gchar* _tmp0_ = NULL; +#line 8 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (name != NULL, NULL); +#line 9 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = name; +#line 9 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = (ImportSourceCollection*) source_collection_construct (object_type, _tmp0_); +#line 8 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return self; +#line 2096 "ImportPage.c" +} + + +ImportSourceCollection* import_source_collection_new (const gchar* name) { +#line 8 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return import_source_collection_construct (TYPE_IMPORT_SOURCE_COLLECTION, name); +#line 2103 "ImportPage.c" +} + + +static gboolean import_source_collection_real_holds_type_of_source (SourceCollection* base, DataSource* source) { + ImportSourceCollection * self; + gboolean result = FALSE; + DataSource* _tmp0_ = NULL; +#line 12 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_IMPORT_SOURCE_COLLECTION, ImportSourceCollection); +#line 12 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_DATA_SOURCE (source), FALSE); +#line 13 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = source; +#line 13 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_IMPORT_SOURCE); +#line 13 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2121 "ImportPage.c" +} + + +static void import_source_collection_class_init (ImportSourceCollectionClass * klass) { +#line 7 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_source_collection_parent_class = g_type_class_peek_parent (klass); +#line 7 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((SourceCollectionClass *) klass)->holds_type_of_source = import_source_collection_real_holds_type_of_source; +#line 2130 "ImportPage.c" +} + + +static void import_source_collection_instance_init (ImportSourceCollection * self) { +} + + +GType import_source_collection_get_type (void) { + static volatile gsize import_source_collection_type_id__volatile = 0; + if (g_once_init_enter (&import_source_collection_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (ImportSourceCollectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) import_source_collection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ImportSourceCollection), 0, (GInstanceInitFunc) import_source_collection_instance_init, NULL }; + GType import_source_collection_type_id; + import_source_collection_type_id = g_type_register_static (TYPE_SOURCE_COLLECTION, "ImportSourceCollection", &g_define_type_info, 0); + g_once_init_leave (&import_source_collection_type_id__volatile, import_source_collection_type_id); + } + return import_source_collection_type_id__volatile; +} + + +static gpointer _GPHOTO_REF_CAMERA0 (gpointer self) { +#line 31 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return self ? GPHOTO_REF_CAMERA (self) : NULL; +#line 2153 "ImportPage.c" +} + + +ImportSource* import_source_construct (GType object_type, const gchar* camera_name, Camera* camera, gint fsid, const gchar* folder, const gchar* filename, gulong file_size, time_t modification_time) { + ImportSource * self = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + Camera* _tmp2_ = NULL; + Camera* _tmp3_ = NULL; + gint _tmp4_ = 0; + const gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + const gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gulong _tmp9_ = 0UL; + time_t _tmp10_ = 0; + const gchar* _tmp11_ = NULL; + gchar* _tmp12_ = NULL; +#line 28 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (camera_name != NULL, NULL); +#line 28 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (camera != NULL, NULL); +#line 28 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (folder != NULL, NULL); +#line 28 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (filename != NULL, NULL); +#line 28 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = (ImportSource*) thumbnail_source_construct (object_type, DATA_OBJECT_INVALID_OBJECT_ID); +#line 30 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = camera_name; +#line 30 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 30 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->camera_name); +#line 30 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->camera_name = _tmp1_; +#line 31 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = camera; +#line 31 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _GPHOTO_REF_CAMERA0 (_tmp2_); +#line 31 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_camera_unref0 (self->priv->camera); +#line 31 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->camera = _tmp3_; +#line 32 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = fsid; +#line 32 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->fsid = _tmp4_; +#line 33 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = folder; +#line 33 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = g_strdup (_tmp5_); +#line 33 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->folder); +#line 33 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->folder = _tmp6_; +#line 34 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = filename; +#line 34 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = g_strdup (_tmp7_); +#line 34 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->filename); +#line 34 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->filename = _tmp8_; +#line 35 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = file_size; +#line 35 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->file_size = _tmp9_; +#line 36 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = modification_time; +#line 36 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->modification_time = _tmp10_; +#line 37 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = filename; +#line 37 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = indexable_prepare_indexable_string (_tmp11_); +#line 37 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->indexable_keywords); +#line 37 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->indexable_keywords = _tmp12_; +#line 28 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return self; +#line 2236 "ImportPage.c" +} + + +static gpointer _g_object_ref0 (gpointer self) { +#line 41 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return self ? g_object_ref (self) : NULL; +#line 2243 "ImportPage.c" +} + + +void import_source_set_preview (ImportSource* self, GdkPixbuf* preview) { + GdkPixbuf* _tmp0_ = NULL; + GdkPixbuf* _tmp1_ = NULL; +#line 40 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_IMPORT_SOURCE (self)); +#line 40 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail ((preview == NULL) || GDK_IS_PIXBUF (preview)); +#line 41 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = preview; +#line 41 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 41 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->preview); +#line 41 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->preview = _tmp1_; +#line 2262 "ImportPage.c" +} + + +gchar* import_source_get_camera_name (ImportSource* self) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 44 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_SOURCE (self), NULL); +#line 45 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->camera_name; +#line 45 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 45 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 45 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2280 "ImportPage.c" +} + + +Camera* import_source_get_camera (ImportSource* self) { + Camera* result = NULL; + Camera* _tmp0_ = NULL; + Camera* _tmp1_ = NULL; +#line 48 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_SOURCE (self), NULL); +#line 49 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->camera; +#line 49 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _GPHOTO_REF_CAMERA0 (_tmp0_); +#line 49 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 49 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2298 "ImportPage.c" +} + + +gint import_source_get_fsid (ImportSource* self) { + gint result = 0; + gint _tmp0_ = 0; +#line 52 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_SOURCE (self), 0); +#line 53 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->fsid; +#line 53 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 53 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2313 "ImportPage.c" +} + + +gchar* import_source_get_folder (ImportSource* self) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 56 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_SOURCE (self), NULL); +#line 57 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->folder; +#line 57 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 57 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 57 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2331 "ImportPage.c" +} + + +gchar* import_source_get_filename (ImportSource* self) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 60 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_SOURCE (self), NULL); +#line 61 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->filename; +#line 61 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 61 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 61 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2349 "ImportPage.c" +} + + +gulong import_source_get_filesize (ImportSource* self) { + gulong result = 0UL; + gulong _tmp0_ = 0UL; +#line 64 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_SOURCE (self), 0UL); +#line 65 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->file_size; +#line 65 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 65 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2364 "ImportPage.c" +} + + +time_t import_source_get_modification_time (ImportSource* self) { + time_t result = 0; + time_t _tmp0_ = 0; +#line 68 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_SOURCE (self), 0); +#line 69 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->modification_time; +#line 69 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 69 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2379 "ImportPage.c" +} + + +static GdkPixbuf* import_source_real_get_preview (ImportSource* self) { + GdkPixbuf* result = NULL; + GdkPixbuf* _tmp0_ = NULL; + GdkPixbuf* _tmp1_ = NULL; +#line 73 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->preview; +#line 73 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 73 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 73 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2395 "ImportPage.c" +} + + +GdkPixbuf* import_source_get_preview (ImportSource* self) { +#line 72 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_SOURCE (self), NULL); +#line 72 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return IMPORT_SOURCE_GET_CLASS (self)->get_preview (self); +#line 2404 "ImportPage.c" +} + + +static time_t import_source_real_get_exposure_time (ImportSource* self) { + time_t result = 0; + time_t _tmp0_ = 0; +#line 77 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = import_source_get_modification_time (self); +#line 77 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 77 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2417 "ImportPage.c" +} + + +time_t import_source_get_exposure_time (ImportSource* self) { +#line 76 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_SOURCE (self), 0); +#line 76 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return IMPORT_SOURCE_GET_CLASS (self)->get_exposure_time (self); +#line 2426 "ImportPage.c" +} + + +gchar* import_source_get_fulldir (ImportSource* self) { + gchar* result = NULL; + Camera* _tmp0_ = NULL; + Camera* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gint _tmp4_ = 0; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; +#line 80 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_SOURCE (self), NULL); +#line 81 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = import_source_get_camera (self); +#line 81 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _tmp0_; +#line 81 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = import_source_get_camera_name (self); +#line 81 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _tmp2_; +#line 81 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = import_source_get_fsid (self); +#line 81 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = import_source_get_folder (self); +#line 81 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = _tmp5_; +#line 81 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = import_page_get_fulldir (_tmp1_, _tmp3_, _tmp4_, _tmp6_); +#line 81 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = _tmp7_; +#line 81 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp6_); +#line 81 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp3_); +#line 81 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_camera_unref0 (_tmp1_); +#line 81 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp8_; +#line 81 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2471 "ImportPage.c" +} + + +static gchar* import_source_real_to_string (DataObject* base) { + ImportSource * self; + gchar* result = NULL; + gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; +#line 84 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_IMPORT_SOURCE, ImportSource); +#line 85 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = import_source_get_camera_name (self); +#line 85 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _tmp0_; +#line 85 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = import_source_get_folder (self); +#line 85 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _tmp2_; +#line 85 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = import_source_get_filename (self); +#line 85 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = _tmp4_; +#line 85 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = g_strdup_printf ("%s %s/%s", _tmp1_, _tmp3_, _tmp5_); +#line 85 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = _tmp6_; +#line 85 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp5_); +#line 85 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp3_); +#line 85 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp1_); +#line 85 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp7_; +#line 85 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2514 "ImportPage.c" +} + + +static gchar* gp_result_to_full_string (int self) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 480 "/home/jens/Source/shotwell/vapi/libgphoto2.vapi" + _tmp0_ = gp_port_result_as_string (self); +#line 480 "/home/jens/Source/shotwell/vapi/libgphoto2.vapi" + _tmp1_ = g_strdup_printf ("%s (%d)", _tmp0_, (gint) self); +#line 480 "/home/jens/Source/shotwell/vapi/libgphoto2.vapi" + result = _tmp1_; +#line 480 "/home/jens/Source/shotwell/vapi/libgphoto2.vapi" + return result; +#line 2530 "ImportPage.c" +} + + +static gboolean import_source_real_internal_delete_backing (DataSource* base, GError** error) { + ImportSource * self; + gboolean result = FALSE; + gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gchar* fulldir = NULL; + gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + int _result_ = 0; + Camera* _tmp10_ = NULL; + Camera* _tmp11_ = NULL; + const gchar* _tmp12_ = NULL; + gchar* _tmp13_ = NULL; + gchar* _tmp14_ = NULL; + GPSpinIdleWrapper* _tmp15_ = NULL; + GPContext* _tmp16_ = NULL; + int _tmp17_ = 0; + int _tmp18_ = 0; + int _tmp19_ = 0; + gboolean _tmp26_ = FALSE; + gboolean _tmp27_ = FALSE; + gboolean _tmp28_ = FALSE; + GError * _inner_error_ = NULL; +#line 88 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_IMPORT_SOURCE, ImportSource); +#line 89 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject)); +#line 89 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _tmp0_; +#line 89 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = self->priv->camera_name; +#line 89 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_debug ("ImportPage.vala:89: Deleting %s from %s", _tmp1_, _tmp2_); +#line 89 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp1_); +#line 91 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = import_source_get_fulldir (self); +#line 91 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + fulldir = _tmp3_; +#line 92 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = fulldir; +#line 92 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp4_ == NULL) { +#line 2578 "ImportPage.c" + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + const gchar* _tmp7_ = NULL; + gboolean _tmp8_ = FALSE; + gboolean _tmp9_ = FALSE; +#line 93 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject)); +#line 93 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = _tmp5_; +#line 93 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = self->priv->camera_name; +#line 93 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_warning ("ImportPage.vala:93: Skipping deleting %s from %s: invalid folder name", _tmp6_, _tmp7_); +#line 93 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp6_); +#line 95 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = DATA_SOURCE_CLASS (import_source_parent_class)->internal_delete_backing (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), TYPE_DATA_SOURCE, DataSource), &_inner_error_); +#line 95 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = _tmp9_; +#line 95 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 95 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_propagate_error (error, _inner_error_); +#line 95 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 95 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return FALSE; +#line 2606 "ImportPage.c" + } +#line 95 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp8_; +#line 95 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 95 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2614 "ImportPage.c" + } +#line 98 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = import_source_get_camera (self); +#line 98 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = _tmp10_; +#line 98 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = fulldir; +#line 98 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = import_source_get_filename (self); +#line 98 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = _tmp13_; +#line 98 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = import_page_spin_idle_context; +#line 98 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp16_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GP_TYPE_CONTEXT_WRAPPER, GPContextWrapper)->context; +#line 98 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = gp_camera_file_delete (_tmp11_, _tmp12_, _tmp14_, _tmp16_); +#line 98 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp18_ = _tmp17_; +#line 98 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp14_); +#line 98 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_camera_unref0 (_tmp11_); +#line 98 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _result_ = _tmp18_; +#line 100 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp19_ = _result_; +#line 100 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp19_ != GP_OK) { +#line 2644 "ImportPage.c" + gchar* _tmp20_ = NULL; + gchar* _tmp21_ = NULL; + const gchar* _tmp22_ = NULL; + int _tmp23_ = 0; + gchar* _tmp24_ = NULL; + gchar* _tmp25_ = NULL; +#line 101 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp20_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject)); +#line 101 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp21_ = _tmp20_; +#line 101 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp22_ = self->priv->camera_name; +#line 101 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp23_ = _result_; +#line 101 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp24_ = gp_result_to_full_string (_tmp23_); +#line 101 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp25_ = _tmp24_; +#line 101 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_warning ("ImportPage.vala:101: Error deleting %s from %s: %s", _tmp21_, _tmp22_, _tmp25_); +#line 101 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp25_); +#line 101 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp21_); +#line 2669 "ImportPage.c" + } +#line 103 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp28_ = DATA_SOURCE_CLASS (import_source_parent_class)->internal_delete_backing (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), TYPE_DATA_SOURCE, DataSource), &_inner_error_); +#line 103 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp27_ = _tmp28_; +#line 103 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 103 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_propagate_error (error, _inner_error_); +#line 103 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 103 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return FALSE; +#line 2683 "ImportPage.c" + } +#line 103 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp27_) { +#line 2687 "ImportPage.c" + int _tmp29_ = 0; +#line 103 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp29_ = _result_; +#line 103 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp26_ = _tmp29_ == GP_OK; +#line 2693 "ImportPage.c" + } else { +#line 103 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp26_ = FALSE; +#line 2697 "ImportPage.c" + } +#line 103 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp26_; +#line 103 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 103 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2705 "ImportPage.c" +} + + +static const gchar* import_source_real_get_indexable_keywords (Indexable* base) { + ImportSource * self; + const gchar* result = NULL; + const gchar* _tmp0_ = NULL; +#line 106 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_IMPORT_SOURCE, ImportSource); +#line 107 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->indexable_keywords; +#line 107 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 107 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2721 "ImportPage.c" +} + + +static void import_source_class_init (ImportSourceClass * klass) { +#line 17 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_source_parent_class = g_type_class_peek_parent (klass); +#line 17 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_type_class_add_private (klass, sizeof (ImportSourcePrivate)); +#line 17 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((ImportSourceClass *) klass)->get_preview = import_source_real_get_preview; +#line 17 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((ImportSourceClass *) klass)->get_exposure_time = import_source_real_get_exposure_time; +#line 17 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((DataObjectClass *) klass)->to_string = import_source_real_to_string; +#line 17 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((DataSourceClass *) klass)->internal_delete_backing = import_source_real_internal_delete_backing; +#line 17 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + G_OBJECT_CLASS (klass)->finalize = import_source_finalize; +#line 2740 "ImportPage.c" +} + + +static void import_source_indexable_interface_init (IndexableIface * iface) { +#line 17 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_source_indexable_parent_iface = g_type_interface_peek_parent (iface); +#line 17 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + iface->get_indexable_keywords = (const gchar* (*)(Indexable*)) import_source_real_get_indexable_keywords; +#line 2749 "ImportPage.c" +} + + +static void import_source_instance_init (ImportSource * self) { +#line 17 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv = IMPORT_SOURCE_GET_PRIVATE (self); +#line 25 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->preview = NULL; +#line 26 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->indexable_keywords = NULL; +#line 2760 "ImportPage.c" +} + + +static void import_source_finalize (GObject* obj) { + ImportSource * self; +#line 17 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_IMPORT_SOURCE, ImportSource); +#line 18 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->camera_name); +#line 19 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_camera_unref0 (self->priv->camera); +#line 21 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->folder); +#line 22 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->filename); +#line 25 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->preview); +#line 26 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->indexable_keywords); +#line 17 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + G_OBJECT_CLASS (import_source_parent_class)->finalize (obj); +#line 2782 "ImportPage.c" +} + + +GType import_source_get_type (void) { + static volatile gsize import_source_type_id__volatile = 0; + if (g_once_init_enter (&import_source_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (ImportSourceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) import_source_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ImportSource), 0, (GInstanceInitFunc) import_source_instance_init, NULL }; + static const GInterfaceInfo indexable_info = { (GInterfaceInitFunc) import_source_indexable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType import_source_type_id; + import_source_type_id = g_type_register_static (TYPE_THUMBNAIL_SOURCE, "ImportSource", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); + g_type_add_interface_static (import_source_type_id, TYPE_INDEXABLE, &indexable_info); + g_once_init_leave (&import_source_type_id__volatile, import_source_type_id); + } + return import_source_type_id__volatile; +} + + +VideoImportSource* video_import_source_construct (GType object_type, const gchar* camera_name, Camera* camera, gint fsid, const gchar* folder, const gchar* filename, gulong file_size, time_t modification_time) { + VideoImportSource * self = NULL; + const gchar* _tmp0_ = NULL; + Camera* _tmp1_ = NULL; + gint _tmp2_ = 0; + const gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + gulong _tmp5_ = 0UL; + time_t _tmp6_ = 0; +#line 112 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (camera_name != NULL, NULL); +#line 112 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (camera != NULL, NULL); +#line 112 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (folder != NULL, NULL); +#line 112 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (filename != NULL, NULL); +#line 114 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = camera_name; +#line 114 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = camera; +#line 114 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = fsid; +#line 114 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = folder; +#line 114 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = filename; +#line 114 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = file_size; +#line 114 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = modification_time; +#line 114 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = (VideoImportSource*) import_source_construct (object_type, _tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp4_, _tmp5_, _tmp6_); +#line 112 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return self; +#line 2835 "ImportPage.c" +} + + +VideoImportSource* video_import_source_new (const gchar* camera_name, Camera* camera, gint fsid, const gchar* folder, const gchar* filename, gulong file_size, time_t modification_time) { +#line 112 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return video_import_source_construct (TYPE_VIDEO_IMPORT_SOURCE, camera_name, camera, fsid, folder, filename, file_size, modification_time); +#line 2842 "ImportPage.c" +} + + +static GdkPixbuf* video_import_source_real_get_thumbnail (ThumbnailSource* base, gint scale, GError** error) { + VideoImportSource * self; + GdkPixbuf* result = NULL; + GdkPixbuf* _tmp0_ = NULL; + gint _tmp1_ = 0; + GdkPixbuf* _tmp2_ = NULL; + GdkPixbuf* _tmp3_ = NULL; + GError * _inner_error_ = NULL; +#line 117 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_IMPORT_SOURCE, VideoImportSource); +#line 118 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = scale; +#line 118 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = thumbnail_source_create_thumbnail (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), _tmp1_, &_inner_error_); +#line 118 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = _tmp2_; +#line 118 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 118 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_propagate_error (error, _inner_error_); +#line 118 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return NULL; +#line 2868 "ImportPage.c" + } +#line 118 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _tmp0_; +#line 118 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = NULL; +#line 118 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp3_; +#line 118 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp0_); +#line 118 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2880 "ImportPage.c" +} + + +static GdkPixbuf* video_import_source_real_create_thumbnail (ThumbnailSource* base, gint scale, GError** error) { + VideoImportSource * self; + GdkPixbuf* result = NULL; + GdkPixbuf* _tmp0_ = NULL; + GdkPixbuf* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + GdkPixbuf* _tmp3_ = NULL; + gint _tmp4_ = 0; +#line 121 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_IMPORT_SOURCE, VideoImportSource); +#line 122 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = import_source_get_preview (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORT_SOURCE, ImportSource)); +#line 122 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _tmp0_; +#line 122 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = _tmp1_ == NULL; +#line 122 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp1_); +#line 122 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp2_) { +#line 123 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = NULL; +#line 123 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2908 "ImportPage.c" + } +#line 127 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = scale; +#line 127 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp4_ > 0) { +#line 2914 "ImportPage.c" + GdkPixbuf* _tmp5_ = NULL; + GdkPixbuf* _tmp6_ = NULL; + gint _tmp7_ = 0; + GdkPixbuf* _tmp8_ = NULL; +#line 127 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = import_source_get_preview (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORT_SOURCE, ImportSource)); +#line 127 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = _tmp5_; +#line 127 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = scale; +#line 127 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = scale_pixbuf (_tmp6_, _tmp7_, GDK_INTERP_BILINEAR, TRUE); +#line 127 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp3_); +#line 127 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _tmp8_; +#line 127 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp6_); +#line 2933 "ImportPage.c" + } else { + GdkPixbuf* _tmp9_ = NULL; +#line 128 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = import_source_get_preview (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORT_SOURCE, ImportSource)); +#line 128 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp3_); +#line 128 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _tmp9_; +#line 2942 "ImportPage.c" + } +#line 127 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp3_; +#line 127 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2948 "ImportPage.c" +} + + +static gchar* video_import_source_real_get_typename (DataSource* base) { + VideoImportSource * self; + gchar* result = NULL; + gchar* _tmp0_ = NULL; +#line 131 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_IMPORT_SOURCE, VideoImportSource); +#line 132 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = g_strdup ("videoimport"); +#line 132 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 132 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2964 "ImportPage.c" +} + + +static gint64 video_import_source_real_get_instance_id (DataSource* base) { + VideoImportSource * self; + gint64 result = 0LL; + gint64 _tmp0_ = 0LL; +#line 135 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_IMPORT_SOURCE, VideoImportSource); +#line 136 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = data_object_get_object_id (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject)); +#line 136 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 136 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2980 "ImportPage.c" +} + + +static PhotoFileFormat video_import_source_real_get_preferred_thumbnail_format (ThumbnailSource* base) { + VideoImportSource * self; + PhotoFileFormat result = 0; + PhotoFileFormat _tmp0_ = 0; +#line 139 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_IMPORT_SOURCE, VideoImportSource); +#line 140 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = photo_file_format_get_system_default_format (); +#line 140 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 140 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 2996 "ImportPage.c" +} + + +static gchar* video_import_source_real_get_name (DataObject* base) { + VideoImportSource * self; + gchar* result = NULL; + gchar* _tmp0_ = NULL; +#line 143 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_IMPORT_SOURCE, VideoImportSource); +#line 144 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = import_source_get_filename (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORT_SOURCE, ImportSource)); +#line 144 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 144 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3012 "ImportPage.c" +} + + +void video_import_source_update (VideoImportSource* self, GdkPixbuf* preview) { + GdkPixbuf* _tmp0_ = NULL; + GdkPixbuf* _tmp1_ = NULL; +#line 147 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_VIDEO_IMPORT_SOURCE (self)); +#line 147 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail ((preview == NULL) || GDK_IS_PIXBUF (preview)); +#line 148 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = preview; +#line 148 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp1_ != NULL) { +#line 3027 "ImportPage.c" + GdkPixbuf* _tmp2_ = NULL; + GdkPixbuf* _tmp3_ = NULL; +#line 148 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = preview; +#line 148 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _g_object_ref0 (_tmp2_); +#line 148 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp0_); +#line 148 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = _tmp3_; +#line 3038 "ImportPage.c" + } else { + GdkPixbuf* _tmp4_ = NULL; +#line 148 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = resources_get_noninterpretable_badge_pixbuf (); +#line 148 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp0_); +#line 148 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = _tmp4_; +#line 3047 "ImportPage.c" + } +#line 148 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_source_set_preview (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORT_SOURCE, ImportSource), _tmp0_); +#line 147 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp0_); +#line 3053 "ImportPage.c" +} + + +static void video_import_source_class_init (VideoImportSourceClass * klass) { +#line 111 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + video_import_source_parent_class = g_type_class_peek_parent (klass); +#line 111 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((ThumbnailSourceClass *) klass)->get_thumbnail = video_import_source_real_get_thumbnail; +#line 111 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((ThumbnailSourceClass *) klass)->create_thumbnail = video_import_source_real_create_thumbnail; +#line 111 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((DataSourceClass *) klass)->get_typename = video_import_source_real_get_typename; +#line 111 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((DataSourceClass *) klass)->get_instance_id = video_import_source_real_get_instance_id; +#line 111 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((ThumbnailSourceClass *) klass)->get_preferred_thumbnail_format = video_import_source_real_get_preferred_thumbnail_format; +#line 111 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((DataObjectClass *) klass)->get_name = video_import_source_real_get_name; +#line 3072 "ImportPage.c" +} + + +static void video_import_source_instance_init (VideoImportSource * self) { +} + + +GType video_import_source_get_type (void) { + static volatile gsize video_import_source_type_id__volatile = 0; + if (g_once_init_enter (&video_import_source_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (VideoImportSourceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) video_import_source_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (VideoImportSource), 0, (GInstanceInitFunc) video_import_source_instance_init, NULL }; + GType video_import_source_type_id; + video_import_source_type_id = g_type_register_static (TYPE_IMPORT_SOURCE, "VideoImportSource", &g_define_type_info, 0); + g_once_init_leave (&video_import_source_type_id__volatile, video_import_source_type_id); + } + return video_import_source_type_id__volatile; +} + + +PhotoImportSource* photo_import_source_construct (GType object_type, const gchar* camera_name, Camera* camera, gint fsid, const gchar* folder, const gchar* filename, gulong file_size, time_t modification_time, PhotoFileFormat file_format) { + PhotoImportSource * self = NULL; + const gchar* _tmp0_ = NULL; + Camera* _tmp1_ = NULL; + gint _tmp2_ = 0; + const gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + gulong _tmp5_ = 0UL; + time_t _tmp6_ = 0; + PhotoFileFormat _tmp7_ = 0; +#line 161 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (camera_name != NULL, NULL); +#line 161 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (camera != NULL, NULL); +#line 161 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (folder != NULL, NULL); +#line 161 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (filename != NULL, NULL); +#line 163 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = camera_name; +#line 163 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = camera; +#line 163 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = fsid; +#line 163 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = folder; +#line 163 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = filename; +#line 163 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = file_size; +#line 163 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = modification_time; +#line 163 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = (PhotoImportSource*) import_source_construct (object_type, _tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp4_, _tmp5_, _tmp6_); +#line 164 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = file_format; +#line 164 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->file_format = _tmp7_; +#line 161 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return self; +#line 3132 "ImportPage.c" +} + + +PhotoImportSource* photo_import_source_new (const gchar* camera_name, Camera* camera, gint fsid, const gchar* folder, const gchar* filename, gulong file_size, time_t modification_time, PhotoFileFormat file_format) { +#line 161 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return photo_import_source_construct (TYPE_PHOTO_IMPORT_SOURCE, camera_name, camera, fsid, folder, filename, file_size, modification_time, file_format); +#line 3139 "ImportPage.c" +} + + +static gchar* photo_import_source_real_get_name (DataObject* base) { + PhotoImportSource * self; + gchar* result = NULL; + gchar* title = NULL; + gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; +#line 167 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PHOTO_IMPORT_SOURCE, PhotoImportSource); +#line 168 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = photo_import_source_get_title (self); +#line 168 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + title = _tmp0_; +#line 170 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = title; +#line 170 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = is_string_empty (_tmp2_); +#line 170 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp3_) { +#line 3163 "ImportPage.c" + const gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; +#line 170 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = title; +#line 170 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = g_strdup (_tmp4_); +#line 170 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp1_); +#line 170 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _tmp5_; +#line 3174 "ImportPage.c" + } else { + gchar* _tmp6_ = NULL; +#line 170 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = import_source_get_filename (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORT_SOURCE, ImportSource)); +#line 170 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp1_); +#line 170 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _tmp6_; +#line 3183 "ImportPage.c" + } +#line 170 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 170 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (title); +#line 170 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3191 "ImportPage.c" +} + + +static gchar* photo_import_source_real_get_typename (DataSource* base) { + PhotoImportSource * self; + gchar* result = NULL; + gchar* _tmp0_ = NULL; +#line 173 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PHOTO_IMPORT_SOURCE, PhotoImportSource); +#line 174 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = g_strdup ("photoimport"); +#line 174 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 174 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3207 "ImportPage.c" +} + + +static gint64 photo_import_source_real_get_instance_id (DataSource* base) { + PhotoImportSource * self; + gint64 result = 0LL; + gint64 _tmp0_ = 0LL; +#line 177 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PHOTO_IMPORT_SOURCE, PhotoImportSource); +#line 178 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = data_object_get_object_id (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject)); +#line 178 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 178 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3223 "ImportPage.c" +} + + +static PhotoFileFormat photo_import_source_real_get_preferred_thumbnail_format (ThumbnailSource* base) { + PhotoImportSource * self; + PhotoFileFormat result = 0; + PhotoFileFormat _tmp0_ = 0; + PhotoFileFormat _tmp1_ = 0; + gboolean _tmp2_ = FALSE; +#line 181 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PHOTO_IMPORT_SOURCE, PhotoImportSource); +#line 182 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = self->priv->file_format; +#line 182 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = photo_file_format_can_write (_tmp1_); +#line 182 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp2_) { +#line 3241 "ImportPage.c" + PhotoFileFormat _tmp3_ = 0; +#line 182 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = self->priv->file_format; +#line 182 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = _tmp3_; +#line 3247 "ImportPage.c" + } else { + PhotoFileFormat _tmp4_ = 0; +#line 183 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = photo_file_format_get_system_default_format (); +#line 183 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = _tmp4_; +#line 3254 "ImportPage.c" + } +#line 182 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 182 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3260 "ImportPage.c" +} + + +static GdkPixbuf* photo_import_source_real_create_thumbnail (ThumbnailSource* base, gint scale, GError** error) { + PhotoImportSource * self; + GdkPixbuf* result = NULL; + GdkPixbuf* _tmp0_ = NULL; + GdkPixbuf* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + GdkPixbuf* _tmp3_ = NULL; + gint _tmp4_ = 0; +#line 186 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PHOTO_IMPORT_SOURCE, PhotoImportSource); +#line 187 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = import_source_get_preview (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORT_SOURCE, ImportSource)); +#line 187 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _tmp0_; +#line 187 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = _tmp1_ == NULL; +#line 187 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp1_); +#line 187 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp2_) { +#line 188 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = NULL; +#line 188 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3288 "ImportPage.c" + } +#line 192 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = scale; +#line 192 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp4_ > 0) { +#line 3294 "ImportPage.c" + GdkPixbuf* _tmp5_ = NULL; + GdkPixbuf* _tmp6_ = NULL; + gint _tmp7_ = 0; + GdkPixbuf* _tmp8_ = NULL; +#line 192 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = import_source_get_preview (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORT_SOURCE, ImportSource)); +#line 192 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = _tmp5_; +#line 192 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = scale; +#line 192 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = scale_pixbuf (_tmp6_, _tmp7_, PHOTO_IMPORT_SOURCE_INTERP, TRUE); +#line 192 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp3_); +#line 192 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _tmp8_; +#line 192 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp6_); +#line 3313 "ImportPage.c" + } else { + GdkPixbuf* _tmp9_ = NULL; +#line 192 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = import_source_get_preview (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORT_SOURCE, ImportSource)); +#line 192 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp3_); +#line 192 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _tmp9_; +#line 3322 "ImportPage.c" + } +#line 192 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp3_; +#line 192 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3328 "ImportPage.c" +} + + +static gpointer _media_metadata_ref0 (gpointer self) { +#line 199 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return self ? media_metadata_ref (self) : NULL; +#line 3335 "ImportPage.c" +} + + +void photo_import_source_update (PhotoImportSource* self, GdkPixbuf* preview, const gchar* preview_md5, PhotoMetadata* metadata, const gchar* exif_md5) { + GdkPixbuf* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + PhotoMetadata* _tmp3_ = NULL; + PhotoMetadata* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; +#line 196 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_PHOTO_IMPORT_SOURCE (self)); +#line 196 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail ((preview == NULL) || GDK_IS_PIXBUF (preview)); +#line 196 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail ((metadata == NULL) || IS_PHOTO_METADATA (metadata)); +#line 197 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = preview; +#line 197 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_source_set_preview (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORT_SOURCE, ImportSource), _tmp0_); +#line 198 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = preview_md5; +#line 198 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 198 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->preview_md5); +#line 198 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->preview_md5 = _tmp2_; +#line 199 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = metadata; +#line 199 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = _media_metadata_ref0 (_tmp3_); +#line 199 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _media_metadata_unref0 (self->priv->metadata); +#line 199 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->metadata = _tmp4_; +#line 200 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = exif_md5; +#line 200 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = g_strdup (_tmp5_); +#line 200 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->exif_md5); +#line 200 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->exif_md5 = _tmp6_; +#line 3381 "ImportPage.c" +} + + +static time_t photo_import_source_real_get_exposure_time (ImportSource* base) { + PhotoImportSource * self; + time_t result = 0; + PhotoMetadata* _tmp0_ = NULL; + MetadataDateTime* date_time = NULL; + PhotoMetadata* _tmp2_ = NULL; + MetadataDateTime* _tmp3_ = NULL; + time_t _tmp4_ = 0; + MetadataDateTime* _tmp5_ = NULL; +#line 203 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PHOTO_IMPORT_SOURCE, PhotoImportSource); +#line 204 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->metadata; +#line 204 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp0_ == NULL) { +#line 3400 "ImportPage.c" + time_t _tmp1_ = 0; +#line 205 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = import_source_get_modification_time (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORT_SOURCE, ImportSource)); +#line 205 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 205 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3408 "ImportPage.c" + } +#line 207 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = self->priv->metadata; +#line 207 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = photo_metadata_get_exposure_date_time (_tmp2_); +#line 207 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + date_time = _tmp3_; +#line 209 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = date_time; +#line 209 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp5_ != NULL) { +#line 3420 "ImportPage.c" + MetadataDateTime* _tmp6_ = NULL; + time_t _tmp7_ = 0; +#line 209 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = date_time; +#line 209 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = metadata_date_time_get_timestamp (_tmp6_); +#line 209 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = _tmp7_; +#line 3429 "ImportPage.c" + } else { + time_t _tmp8_ = 0; +#line 209 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = import_source_get_modification_time (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORT_SOURCE, ImportSource)); +#line 209 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = _tmp8_; +#line 3436 "ImportPage.c" + } +#line 209 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp4_; +#line 209 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _metadata_date_time_unref0 (date_time); +#line 209 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3444 "ImportPage.c" +} + + +gchar* photo_import_source_get_title (PhotoImportSource* self) { + gchar* result = NULL; + gchar* _tmp0_ = NULL; + PhotoMetadata* _tmp1_ = NULL; +#line 212 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_PHOTO_IMPORT_SOURCE (self), NULL); +#line 213 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = self->priv->metadata; +#line 213 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp1_ != NULL) { +#line 3458 "ImportPage.c" + PhotoMetadata* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; +#line 213 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = self->priv->metadata; +#line 213 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = media_metadata_get_title (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_MEDIA_METADATA, MediaMetadata)); +#line 213 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp0_); +#line 213 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = _tmp3_; +#line 3469 "ImportPage.c" + } else { +#line 213 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp0_); +#line 213 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = NULL; +#line 3475 "ImportPage.c" + } +#line 213 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 213 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3481 "ImportPage.c" +} + + +PhotoMetadata* photo_import_source_get_metadata (PhotoImportSource* self) { + PhotoMetadata* result = NULL; + PhotoImportSource* _tmp0_ = NULL; + PhotoMetadata* _tmp3_ = NULL; + PhotoMetadata* _tmp4_ = NULL; +#line 216 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_PHOTO_IMPORT_SOURCE (self), NULL); +#line 217 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->associated; +#line 217 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp0_ != NULL) { +#line 3496 "ImportPage.c" + PhotoImportSource* _tmp1_ = NULL; + PhotoMetadata* _tmp2_ = NULL; +#line 218 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = self->priv->associated; +#line 218 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = photo_import_source_get_metadata (_tmp1_); +#line 218 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp2_; +#line 218 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3507 "ImportPage.c" + } +#line 220 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = self->priv->metadata; +#line 220 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = _media_metadata_ref0 (_tmp3_); +#line 220 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp4_; +#line 220 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3517 "ImportPage.c" +} + + +static GdkPixbuf* photo_import_source_real_get_preview (ImportSource* base) { + PhotoImportSource * self; + GdkPixbuf* result = NULL; + PhotoImportSource* _tmp0_ = NULL; + GdkPixbuf* _tmp3_ = NULL; + GdkPixbuf* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; +#line 223 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PHOTO_IMPORT_SOURCE, PhotoImportSource); +#line 224 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->associated; +#line 224 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp0_ != NULL) { +#line 3534 "ImportPage.c" + PhotoImportSource* _tmp1_ = NULL; + GdkPixbuf* _tmp2_ = NULL; +#line 225 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = self->priv->associated; +#line 225 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = import_source_get_preview (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_IMPORT_SOURCE, ImportSource)); +#line 225 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp2_; +#line 225 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3545 "ImportPage.c" + } +#line 227 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = IMPORT_SOURCE_CLASS (photo_import_source_parent_class)->get_preview (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORT_SOURCE, ImportSource)); +#line 227 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = _tmp3_; +#line 227 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = _tmp4_ != NULL; +#line 227 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp4_); +#line 227 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp5_) { +#line 3557 "ImportPage.c" + GdkPixbuf* _tmp6_ = NULL; +#line 228 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = IMPORT_SOURCE_CLASS (photo_import_source_parent_class)->get_preview (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORT_SOURCE, ImportSource)); +#line 228 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp6_; +#line 228 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3565 "ImportPage.c" + } +#line 230 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = NULL; +#line 230 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3571 "ImportPage.c" +} + + +static GdkPixbuf* photo_import_source_real_get_thumbnail (ThumbnailSource* base, gint scale, GError** error) { + PhotoImportSource * self; + GdkPixbuf* result = NULL; + GdkPixbuf* _tmp0_ = NULL; + GdkPixbuf* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + GdkPixbuf* _tmp3_ = NULL; + gint _tmp4_ = 0; +#line 233 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PHOTO_IMPORT_SOURCE, PhotoImportSource); +#line 234 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = import_source_get_preview (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORT_SOURCE, ImportSource)); +#line 234 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _tmp0_; +#line 234 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = _tmp1_ == NULL; +#line 234 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp1_); +#line 234 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp2_) { +#line 235 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = NULL; +#line 235 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3599 "ImportPage.c" + } +#line 237 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = scale; +#line 237 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp4_ > 0) { +#line 3605 "ImportPage.c" + GdkPixbuf* _tmp5_ = NULL; + GdkPixbuf* _tmp6_ = NULL; + gint _tmp7_ = 0; + GdkPixbuf* _tmp8_ = NULL; +#line 237 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = import_source_get_preview (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORT_SOURCE, ImportSource)); +#line 237 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = _tmp5_; +#line 237 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = scale; +#line 237 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = scale_pixbuf (_tmp6_, _tmp7_, PHOTO_IMPORT_SOURCE_INTERP, TRUE); +#line 237 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp3_); +#line 237 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _tmp8_; +#line 237 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp6_); +#line 3624 "ImportPage.c" + } else { + GdkPixbuf* _tmp9_ = NULL; +#line 237 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = import_source_get_preview (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORT_SOURCE, ImportSource)); +#line 237 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp3_); +#line 237 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _tmp9_; +#line 3633 "ImportPage.c" + } +#line 237 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp3_; +#line 237 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3639 "ImportPage.c" +} + + +PhotoFileFormat photo_import_source_get_file_format (PhotoImportSource* self) { + PhotoFileFormat result = 0; + PhotoFileFormat _tmp0_ = 0; +#line 240 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_PHOTO_IMPORT_SOURCE (self), 0); +#line 241 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->file_format; +#line 241 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 241 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3654 "ImportPage.c" +} + + +gchar* photo_import_source_get_preview_md5 (PhotoImportSource* self) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 244 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_PHOTO_IMPORT_SOURCE (self), NULL); +#line 245 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->preview_md5; +#line 245 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 245 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 245 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3672 "ImportPage.c" +} + + +void photo_import_source_set_associated (PhotoImportSource* self, PhotoImportSource* associated) { + PhotoImportSource* _tmp0_ = NULL; + PhotoImportSource* _tmp1_ = NULL; +#line 248 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_PHOTO_IMPORT_SOURCE (self)); +#line 248 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail ((associated == NULL) || IS_PHOTO_IMPORT_SOURCE (associated)); +#line 249 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = associated; +#line 249 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 249 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->associated); +#line 249 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->associated = _tmp1_; +#line 3691 "ImportPage.c" +} + + +PhotoImportSource* photo_import_source_get_associated (PhotoImportSource* self) { + PhotoImportSource* result = NULL; + PhotoImportSource* _tmp0_ = NULL; + PhotoImportSource* _tmp1_ = NULL; +#line 252 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_PHOTO_IMPORT_SOURCE (self), NULL); +#line 253 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->associated; +#line 253 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 253 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 253 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3709 "ImportPage.c" +} + + +static gboolean photo_import_source_real_internal_delete_backing (DataSource* base, GError** error) { + PhotoImportSource * self; + gboolean result = FALSE; + gboolean ret = FALSE; + gboolean _tmp0_ = FALSE; + PhotoImportSource* _tmp1_ = NULL; + GError * _inner_error_ = NULL; +#line 256 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PHOTO_IMPORT_SOURCE, PhotoImportSource); +#line 257 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = DATA_SOURCE_CLASS (photo_import_source_parent_class)->internal_delete_backing (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORT_SOURCE, ImportSource), TYPE_DATA_SOURCE, DataSource), &_inner_error_); +#line 257 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ret = _tmp0_; +#line 257 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 257 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_propagate_error (error, _inner_error_); +#line 257 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return FALSE; +#line 3732 "ImportPage.c" + } +#line 258 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = self->priv->associated; +#line 258 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp1_ != NULL) { +#line 3738 "ImportPage.c" + gboolean _tmp2_ = FALSE; + PhotoImportSource* _tmp3_ = NULL; + gboolean _tmp4_ = FALSE; + gboolean _tmp5_ = FALSE; +#line 259 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = self->priv->associated; +#line 259 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = data_source_internal_delete_backing (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_SOURCE, DataSource), &_inner_error_); +#line 259 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = _tmp4_; +#line 259 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 259 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_propagate_error (error, _inner_error_); +#line 259 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return FALSE; +#line 3755 "ImportPage.c" + } +#line 259 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = ret; +#line 259 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ret = _tmp5_ & _tmp2_; +#line 3761 "ImportPage.c" + } +#line 260 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = ret; +#line 260 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 3767 "ImportPage.c" +} + + +static void photo_import_source_class_init (PhotoImportSourceClass * klass) { +#line 152 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + photo_import_source_parent_class = g_type_class_peek_parent (klass); +#line 152 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_type_class_add_private (klass, sizeof (PhotoImportSourcePrivate)); +#line 152 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((DataObjectClass *) klass)->get_name = photo_import_source_real_get_name; +#line 152 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((DataSourceClass *) klass)->get_typename = photo_import_source_real_get_typename; +#line 152 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((DataSourceClass *) klass)->get_instance_id = photo_import_source_real_get_instance_id; +#line 152 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((ThumbnailSourceClass *) klass)->get_preferred_thumbnail_format = photo_import_source_real_get_preferred_thumbnail_format; +#line 152 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((ThumbnailSourceClass *) klass)->create_thumbnail = photo_import_source_real_create_thumbnail; +#line 152 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((ImportSourceClass *) klass)->get_exposure_time = photo_import_source_real_get_exposure_time; +#line 152 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((ImportSourceClass *) klass)->get_preview = photo_import_source_real_get_preview; +#line 152 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((ThumbnailSourceClass *) klass)->get_thumbnail = photo_import_source_real_get_thumbnail; +#line 152 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((DataSourceClass *) klass)->internal_delete_backing = photo_import_source_real_internal_delete_backing; +#line 152 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + G_OBJECT_CLASS (klass)->finalize = photo_import_source_finalize; +#line 3796 "ImportPage.c" +} + + +static void photo_import_source_instance_init (PhotoImportSource * self) { +#line 152 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv = PHOTO_IMPORT_SOURCE_GET_PRIVATE (self); +#line 156 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->preview_md5 = NULL; +#line 157 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->metadata = NULL; +#line 158 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->exif_md5 = NULL; +#line 159 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->associated = NULL; +#line 3811 "ImportPage.c" +} + + +static void photo_import_source_finalize (GObject* obj) { + PhotoImportSource * self; +#line 152 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PHOTO_IMPORT_SOURCE, PhotoImportSource); +#line 156 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->preview_md5); +#line 157 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _media_metadata_unref0 (self->priv->metadata); +#line 158 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->exif_md5); +#line 159 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->associated); +#line 152 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + G_OBJECT_CLASS (photo_import_source_parent_class)->finalize (obj); +#line 3829 "ImportPage.c" +} + + +GType photo_import_source_get_type (void) { + static volatile gsize photo_import_source_type_id__volatile = 0; + if (g_once_init_enter (&photo_import_source_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (PhotoImportSourceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photo_import_source_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotoImportSource), 0, (GInstanceInitFunc) photo_import_source_instance_init, NULL }; + GType photo_import_source_type_id; + photo_import_source_type_id = g_type_register_static (TYPE_IMPORT_SOURCE, "PhotoImportSource", &g_define_type_info, 0); + g_once_init_leave (&photo_import_source_type_id__volatile, photo_import_source_type_id); + } + return photo_import_source_type_id__volatile; +} + + +ImportPreview* import_preview_construct (GType object_type, ImportSource* source) { + ImportPreview * self = NULL; + ImportSource* _tmp0_ = NULL; + Dimensions _tmp1_ = {0}; + ImportSource* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + ImportSource* _tmp5_ = NULL; + GdkPixbuf* pixbuf = NULL; + gboolean using_placeholder = FALSE; + GdkPixbuf* _tmp14_ = NULL; + GdkPixbuf* _tmp15_ = NULL; + gboolean _tmp22_ = FALSE; + GdkPixbuf* _tmp23_ = NULL; + gint _tmp24_ = 0; + ImportSource* _tmp29_ = NULL; + GdkPixbuf* _tmp50_ = NULL; + GError * _inner_error_ = NULL; +#line 271 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_SOURCE (source), NULL); +#line 272 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = source; +#line 272 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + dimensions_init (&_tmp1_, 0, 0); +#line 272 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = source; +#line 272 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_OBJECT, DataObject)); +#line 272 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = _tmp3_; +#line 272 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = (ImportPreview*) media_source_item_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), &_tmp1_, _tmp4_, NULL, FALSE, PANGO_ALIGN_LEFT); +#line 272 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp4_); +#line 274 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->duplicated_file); +#line 274 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->duplicated_file = NULL; +#line 277 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = source; +#line 277 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, TYPE_VIDEO_IMPORT_SOURCE)) { +#line 278 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + media_source_item_set_enable_sprockets (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE_ITEM, MediaSourceItem), TRUE); +#line 3889 "ImportPage.c" + } +#line 281 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + pixbuf = NULL; +#line 3893 "ImportPage.c" + { + GdkPixbuf* _tmp6_ = NULL; + ImportSource* _tmp7_ = NULL; + GdkPixbuf* _tmp8_ = NULL; + GdkPixbuf* _tmp9_ = NULL; +#line 283 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = source; +#line 283 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = thumbnail_source_get_thumbnail (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), 0, &_inner_error_); +#line 283 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = _tmp8_; +#line 283 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 3907 "ImportPage.c" + goto __catch61_g_error; + } +#line 283 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = _tmp6_; +#line 283 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = NULL; +#line 283 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (pixbuf); +#line 283 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + pixbuf = _tmp9_; +#line 282 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp6_); +#line 3920 "ImportPage.c" + } + goto __finally61; + __catch61_g_error: + { + GError* err = NULL; + gchar* _tmp10_ = NULL; + gchar* _tmp11_ = NULL; + GError* _tmp12_ = NULL; + const gchar* _tmp13_ = NULL; +#line 282 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + err = _inner_error_; +#line 282 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _inner_error_ = NULL; +#line 285 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject)); +#line 285 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = _tmp10_; +#line 285 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = err; +#line 285 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = _tmp12_->message; +#line 285 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_warning ("ImportPage.vala:285: Unable to fetch loaded import preview for %s: %s", _tmp11_, _tmp13_); +#line 285 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp11_); +#line 282 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_error_free0 (err); +#line 3948 "ImportPage.c" + } + __finally61: +#line 282 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 282 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (pixbuf); +#line 282 "/home/jens/Source/shotwell/src/camera/ImportPage.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/ImportPage.vala" + g_clear_error (&_inner_error_); +#line 282 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return NULL; +#line 3961 "ImportPage.c" + } +#line 289 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = pixbuf; +#line 289 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + using_placeholder = _tmp14_ == NULL; +#line 290 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = pixbuf; +#line 290 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp15_ == NULL) { +#line 3971 "ImportPage.c" + GdkPixbuf* _tmp16_ = NULL; + GdkPixbuf* _tmp20_ = NULL; + GdkPixbuf* _tmp21_ = NULL; +#line 291 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp16_ = import_preview_placeholder_preview; +#line 291 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp16_ == NULL) { +#line 3979 "ImportPage.c" + GdkPixbuf* _tmp17_ = NULL; + GdkPixbuf* _tmp18_ = NULL; + GdkPixbuf* _tmp19_ = NULL; +#line 292 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = get_placeholder_pixbuf (); +#line 292 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (import_preview_placeholder_preview); +#line 292 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_preview_placeholder_preview = _tmp17_; +#line 293 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp18_ = import_preview_placeholder_preview; +#line 293 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp19_ = scale_pixbuf (_tmp18_, IMPORT_PREVIEW_MAX_SCALE, GDK_INTERP_BILINEAR, TRUE); +#line 293 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (import_preview_placeholder_preview); +#line 293 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_preview_placeholder_preview = _tmp19_; +#line 3997 "ImportPage.c" + } +#line 297 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp20_ = import_preview_placeholder_preview; +#line 297 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp21_ = _g_object_ref0 (_tmp20_); +#line 297 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (pixbuf); +#line 297 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + pixbuf = _tmp21_; +#line 4007 "ImportPage.c" + } +#line 301 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp23_ = pixbuf; +#line 301 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp24_ = gdk_pixbuf_get_width (_tmp23_); +#line 301 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp24_ > IMPORT_PREVIEW_MAX_SCALE) { +#line 301 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp22_ = TRUE; +#line 4017 "ImportPage.c" + } else { + GdkPixbuf* _tmp25_ = NULL; + gint _tmp26_ = 0; +#line 301 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp25_ = pixbuf; +#line 301 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp26_ = gdk_pixbuf_get_height (_tmp25_); +#line 301 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp22_ = _tmp26_ > IMPORT_PREVIEW_MAX_SCALE; +#line 4027 "ImportPage.c" + } +#line 301 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp22_) { +#line 4031 "ImportPage.c" + GdkPixbuf* _tmp27_ = NULL; + GdkPixbuf* _tmp28_ = NULL; +#line 302 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp27_ = pixbuf; +#line 302 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp28_ = scale_pixbuf (_tmp27_, IMPORT_PREVIEW_MAX_SCALE, PHOTO_IMPORT_SOURCE_INTERP, FALSE); +#line 302 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (pixbuf); +#line 302 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + pixbuf = _tmp28_; +#line 4042 "ImportPage.c" + } +#line 304 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp29_ = source; +#line 304 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp29_, TYPE_PHOTO_IMPORT_SOURCE)) { +#line 4048 "ImportPage.c" + PhotoImportSource* photo_import_source = NULL; + ImportSource* _tmp30_ = NULL; + PhotoImportSource* _tmp31_ = NULL; + gboolean _tmp32_ = FALSE; + gboolean _tmp33_ = FALSE; + PhotoImportSource* _tmp43_ = NULL; + PhotoImportSource* _tmp44_ = NULL; + PhotoImportSource* _tmp45_ = NULL; + gboolean _tmp46_ = FALSE; +#line 306 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp30_ = source; +#line 306 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp31_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp30_, TYPE_PHOTO_IMPORT_SOURCE) ? ((PhotoImportSource*) _tmp30_) : NULL); +#line 306 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + photo_import_source = _tmp31_; +#line 307 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp33_ = using_placeholder; +#line 307 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp33_) { +#line 4068 "ImportPage.c" + PhotoImportSource* _tmp34_ = NULL; + PhotoMetadata* _tmp35_ = NULL; + PhotoMetadata* _tmp36_ = NULL; +#line 307 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp34_ = photo_import_source; +#line 307 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp35_ = photo_import_source_get_metadata (_tmp34_); +#line 307 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp36_ = _tmp35_; +#line 307 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp32_ = _tmp36_ != NULL; +#line 307 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _media_metadata_unref0 (_tmp36_); +#line 4082 "ImportPage.c" + } else { +#line 307 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp32_ = FALSE; +#line 4086 "ImportPage.c" + } +#line 307 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp32_) { +#line 4090 "ImportPage.c" + PhotoImportSource* _tmp37_ = NULL; + PhotoMetadata* _tmp38_ = NULL; + PhotoMetadata* _tmp39_ = NULL; + Orientation _tmp40_ = 0; + GdkPixbuf* _tmp41_ = NULL; + GdkPixbuf* _tmp42_ = NULL; +#line 308 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp37_ = photo_import_source; +#line 308 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp38_ = photo_import_source_get_metadata (_tmp37_); +#line 308 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp39_ = _tmp38_; +#line 308 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp40_ = photo_metadata_get_orientation (_tmp39_); +#line 308 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp41_ = pixbuf; +#line 308 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp42_ = orientation_rotate_pixbuf (_tmp40_, _tmp41_); +#line 308 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (pixbuf); +#line 308 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + pixbuf = _tmp42_; +#line 308 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _media_metadata_unref0 (_tmp39_); +#line 4115 "ImportPage.c" + } +#line 310 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp43_ = photo_import_source; +#line 310 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp44_ = photo_import_source_get_associated (_tmp43_); +#line 310 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp45_ = _tmp44_; +#line 310 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp46_ = _tmp45_ != NULL; +#line 310 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp45_); +#line 310 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp46_) { +#line 4129 "ImportPage.c" + const gchar* _tmp47_ = NULL; + gchar* _tmp48_ = NULL; + gchar* _tmp49_ = NULL; +#line 311 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp47_ = _ ("RAW+JPEG"); +#line 311 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp48_ = g_strdup_printf ("<small>%s</small>", _tmp47_); +#line 311 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp49_ = _tmp48_; +#line 311 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + checkerboard_item_set_subtitle (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_ITEM, CheckerboardItem), _tmp49_, TRUE, PANGO_ALIGN_LEFT); +#line 311 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp49_); +#line 4143 "ImportPage.c" + } +#line 304 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (photo_import_source); +#line 4147 "ImportPage.c" + } +#line 315 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp50_ = pixbuf; +#line 315 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + checkerboard_item_set_image (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_ITEM, CheckerboardItem), _tmp50_); +#line 271 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (pixbuf); +#line 271 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return self; +#line 4157 "ImportPage.c" +} + + +ImportPreview* import_preview_new (ImportSource* source) { +#line 271 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return import_preview_construct (TYPE_IMPORT_PREVIEW, source); +#line 4164 "ImportPage.c" +} + + +gboolean import_preview_is_already_imported (ImportPreview* self) { + gboolean result = FALSE; + PhotoImportSource* photo_import_source = NULL; + ImportSource* _tmp0_ = NULL; + PhotoImportSource* _tmp1_ = NULL; + PhotoImportSource* _tmp2_ = NULL; + VideoImportSource* video_import_source = NULL; + ImportSource* _tmp39_ = NULL; + VideoImportSource* _tmp40_ = NULL; + VideoImportSource* _tmp41_ = NULL; +#line 318 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_PREVIEW (self), FALSE); +#line 319 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = import_preview_get_import_source (self); +#line 319 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_PHOTO_IMPORT_SOURCE) ? ((PhotoImportSource*) _tmp0_) : NULL; +#line 319 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp1_ == NULL) { +#line 319 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp0_); +#line 4188 "ImportPage.c" + } +#line 319 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + photo_import_source = _tmp1_; +#line 320 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = photo_import_source; +#line 320 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp2_ != NULL) { +#line 4196 "ImportPage.c" + gchar* preview_md5 = NULL; + PhotoImportSource* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + PhotoFileFormat file_format = 0; + PhotoImportSource* _tmp5_ = NULL; + PhotoFileFormat _tmp6_ = 0; + gboolean _tmp7_ = FALSE; + const gchar* _tmp8_ = NULL; + gboolean _tmp9_ = FALSE; + PhotoFileFormat _tmp17_ = 0; +#line 321 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = photo_import_source; +#line 321 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = photo_import_source_get_preview_md5 (_tmp3_); +#line 321 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + preview_md5 = _tmp4_; +#line 322 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = photo_import_source; +#line 322 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = photo_import_source_get_file_format (_tmp5_); +#line 322 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + file_format = _tmp6_; +#line 325 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = preview_md5; +#line 325 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = is_string_empty (_tmp8_); +#line 325 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp9_) { +#line 4225 "ImportPage.c" + const gchar* _tmp10_ = NULL; + PhotoFileFormat _tmp11_ = 0; + gboolean _tmp12_ = FALSE; +#line 326 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = preview_md5; +#line 326 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = file_format; +#line 326 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = library_photo_has_nontrash_duplicate (NULL, _tmp10_, NULL, _tmp11_); +#line 326 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = _tmp12_; +#line 4237 "ImportPage.c" + } else { +#line 325 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = FALSE; +#line 4241 "ImportPage.c" + } +#line 325 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp7_) { +#line 4245 "ImportPage.c" + const gchar* _tmp13_ = NULL; + PhotoFileFormat _tmp14_ = 0; + PhotoID _tmp15_ = {0}; + DuplicatedFile* _tmp16_ = NULL; +#line 328 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = preview_md5; +#line 328 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = file_format; +#line 328 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + library_photo_get_nontrash_duplicate (NULL, _tmp13_, NULL, _tmp14_, &_tmp15_); +#line 328 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp16_ = duplicated_file_create_from_photo_id (&_tmp15_); +#line 328 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->duplicated_file); +#line 328 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->duplicated_file = _tmp16_; +#line 331 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = TRUE; +#line 331 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (preview_md5); +#line 331 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (photo_import_source); +#line 331 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 4270 "ImportPage.c" + } +#line 337 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = file_format; +#line 337 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp17_ == PHOTO_FILE_FORMAT_RAW) { +#line 4276 "ImportPage.c" + guint64 filesize = 0ULL; + ImportSource* _tmp18_ = NULL; + ImportSource* _tmp19_ = NULL; + gulong _tmp20_ = 0UL; + guint64 _tmp21_ = 0ULL; + guint64 _tmp22_ = 0ULL; +#line 338 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp18_ = import_preview_get_import_source (self); +#line 338 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp19_ = _tmp18_; +#line 338 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp20_ = import_source_get_filesize (_tmp19_); +#line 338 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp21_ = (guint64) _tmp20_; +#line 338 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp19_); +#line 338 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + filesize = _tmp21_; +#line 340 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp22_ = filesize; +#line 340 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp22_ <= ((guint64) G_MAXINT64)) { +#line 4299 "ImportPage.c" + LibraryPhotoSourceCollection* _tmp23_ = NULL; + ImportSource* _tmp24_ = NULL; + ImportSource* _tmp25_ = NULL; + gchar* _tmp26_ = NULL; + gchar* _tmp27_ = NULL; + guint64 _tmp28_ = 0ULL; + gboolean _tmp29_ = FALSE; + gboolean _tmp30_ = FALSE; +#line 341 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp23_ = library_photo_global; +#line 341 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp24_ = import_preview_get_import_source (self); +#line 341 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp25_ = _tmp24_; +#line 341 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp26_ = import_source_get_filename (_tmp25_); +#line 341 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp27_ = _tmp26_; +#line 341 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp28_ = filesize; +#line 341 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp29_ = library_photo_source_collection_has_basename_filesize_duplicate (_tmp23_, _tmp27_, (gint64) _tmp28_); +#line 341 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp30_ = _tmp29_; +#line 341 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp27_); +#line 341 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp25_); +#line 341 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp30_) { +#line 4330 "ImportPage.c" + LibraryPhotoSourceCollection* _tmp31_ = NULL; + ImportSource* _tmp32_ = NULL; + ImportSource* _tmp33_ = NULL; + gchar* _tmp34_ = NULL; + gchar* _tmp35_ = NULL; + guint64 _tmp36_ = 0ULL; + PhotoID _tmp37_ = {0}; + DuplicatedFile* _tmp38_ = NULL; +#line 344 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp31_ = library_photo_global; +#line 344 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp32_ = import_preview_get_import_source (self); +#line 344 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp33_ = _tmp32_; +#line 344 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp34_ = import_source_get_filename (_tmp33_); +#line 344 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp35_ = _tmp34_; +#line 344 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp36_ = filesize; +#line 344 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + library_photo_source_collection_get_basename_filesize_duplicate (_tmp31_, _tmp35_, (gint64) _tmp36_, &_tmp37_); +#line 344 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp38_ = duplicated_file_create_from_photo_id (&_tmp37_); +#line 344 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->duplicated_file); +#line 344 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->duplicated_file = _tmp38_; +#line 344 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp35_); +#line 344 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp33_); +#line 348 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = TRUE; +#line 348 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (preview_md5); +#line 348 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (photo_import_source); +#line 348 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 4371 "ImportPage.c" + } + } + } +#line 353 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 353 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (preview_md5); +#line 353 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (photo_import_source); +#line 353 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 4383 "ImportPage.c" + } +#line 356 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp39_ = import_preview_get_import_source (self); +#line 356 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp40_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp39_, TYPE_VIDEO_IMPORT_SOURCE) ? ((VideoImportSource*) _tmp39_) : NULL; +#line 356 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp40_ == NULL) { +#line 356 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp39_); +#line 4393 "ImportPage.c" + } +#line 356 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + video_import_source = _tmp40_; +#line 357 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp41_ = video_import_source; +#line 357 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp41_ != NULL) { +#line 4401 "ImportPage.c" + VideoSourceCollection* _tmp42_ = NULL; + VideoImportSource* _tmp43_ = NULL; + gchar* _tmp44_ = NULL; + gchar* _tmp45_ = NULL; + VideoImportSource* _tmp46_ = NULL; + gulong _tmp47_ = 0UL; + gboolean _tmp48_ = FALSE; + gboolean _tmp49_ = FALSE; +#line 362 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp42_ = video_global; +#line 362 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp43_ = video_import_source; +#line 362 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp44_ = import_source_get_filename (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, TYPE_IMPORT_SOURCE, ImportSource)); +#line 362 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp45_ = _tmp44_; +#line 362 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp46_ = video_import_source; +#line 362 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp47_ = import_source_get_filesize (G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, TYPE_IMPORT_SOURCE, ImportSource)); +#line 362 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp48_ = video_source_collection_has_basename_filesize_duplicate (_tmp42_, _tmp45_, (guint64) _tmp47_); +#line 362 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp49_ = _tmp48_; +#line 362 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp45_); +#line 362 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp49_) { +#line 4430 "ImportPage.c" + VideoSourceCollection* _tmp50_ = NULL; + VideoImportSource* _tmp51_ = NULL; + gchar* _tmp52_ = NULL; + gchar* _tmp53_ = NULL; + VideoImportSource* _tmp54_ = NULL; + gulong _tmp55_ = 0UL; + VideoID _tmp56_ = {0}; + DuplicatedFile* _tmp57_ = NULL; +#line 365 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp50_ = video_global; +#line 365 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp51_ = video_import_source; +#line 365 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp52_ = import_source_get_filename (G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, TYPE_IMPORT_SOURCE, ImportSource)); +#line 365 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp53_ = _tmp52_; +#line 365 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp54_ = video_import_source; +#line 365 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp55_ = import_source_get_filesize (G_TYPE_CHECK_INSTANCE_CAST (_tmp54_, TYPE_IMPORT_SOURCE, ImportSource)); +#line 365 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + video_source_collection_get_basename_filesize_duplicate (_tmp50_, _tmp53_, (guint64) _tmp55_, &_tmp56_); +#line 365 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp57_ = duplicated_file_create_from_video_id (&_tmp56_); +#line 365 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->duplicated_file); +#line 365 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->duplicated_file = _tmp57_; +#line 365 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp53_); +#line 370 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = TRUE; +#line 370 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (video_import_source); +#line 370 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (photo_import_source); +#line 370 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 4469 "ImportPage.c" + } +#line 373 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 373 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (video_import_source); +#line 373 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (photo_import_source); +#line 373 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 4479 "ImportPage.c" + } +#line 376 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 376 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (video_import_source); +#line 376 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (photo_import_source); +#line 376 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 4489 "ImportPage.c" +} + + +DuplicatedFile* import_preview_get_duplicated_file (ImportPreview* self) { + DuplicatedFile* result = NULL; + gboolean _tmp0_ = FALSE; + DuplicatedFile* _tmp1_ = NULL; + DuplicatedFile* _tmp2_ = NULL; +#line 379 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_PREVIEW (self), NULL); +#line 380 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = import_preview_is_already_imported (self); +#line 380 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp0_) { +#line 381 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = NULL; +#line 381 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 4508 "ImportPage.c" + } +#line 383 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = self->priv->duplicated_file; +#line 383 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = _g_object_ref0 (_tmp1_); +#line 383 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp2_; +#line 383 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 4518 "ImportPage.c" +} + + +ImportSource* import_preview_get_import_source (ImportPreview* self) { + ImportSource* result = NULL; + DataSource* _tmp0_ = NULL; +#line 386 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_PREVIEW (self), NULL); +#line 387 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = data_view_get_source (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_VIEW, DataView)); +#line 387 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_IMPORT_SOURCE, ImportSource); +#line 387 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 4533 "ImportPage.c" +} + + +static void import_preview_class_init (ImportPreviewClass * klass) { +#line 264 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_preview_parent_class = g_type_class_peek_parent (klass); +#line 264 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_type_class_add_private (klass, sizeof (ImportPreviewPrivate)); +#line 264 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + G_OBJECT_CLASS (klass)->finalize = import_preview_finalize; +#line 4544 "ImportPage.c" +} + + +static void import_preview_instance_init (ImportPreview * self) { +#line 264 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv = IMPORT_PREVIEW_GET_PRIVATE (self); +#line 4551 "ImportPage.c" +} + + +static void import_preview_finalize (GObject* obj) { + ImportPreview * self; +#line 264 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_IMPORT_PREVIEW, ImportPreview); +#line 269 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->duplicated_file); +#line 264 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + G_OBJECT_CLASS (import_preview_parent_class)->finalize (obj); +#line 4563 "ImportPage.c" +} + + +GType import_preview_get_type (void) { + static volatile gsize import_preview_type_id__volatile = 0; + if (g_once_init_enter (&import_preview_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (ImportPreviewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) import_preview_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ImportPreview), 0, (GInstanceInitFunc) import_preview_instance_init, NULL }; + GType import_preview_type_id; + import_preview_type_id = g_type_register_static (TYPE_MEDIA_SOURCE_ITEM, "ImportPreview", &g_define_type_info, 0); + g_once_init_leave (&import_preview_type_id__volatile, import_preview_type_id); + } + return import_preview_type_id__volatile; +} + + +CameraViewTracker* camera_view_tracker_construct (GType object_type, ViewCollection* collection) { + CameraViewTracker* self = NULL; + ViewCollection* _tmp0_ = NULL; + CameraAccumulator* _tmp1_ = NULL; + CameraAccumulator* _tmp2_ = NULL; + CameraAccumulator* _tmp3_ = NULL; +#line 396 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_VIEW_COLLECTION (collection), NULL); +#line 397 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = collection; +#line 397 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = (CameraViewTracker*) core_view_tracker_construct (object_type, _tmp0_); +#line 399 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = self->all; +#line 399 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = self->visible; +#line 399 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = self->selected; +#line 399 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + core_view_tracker_start (G_TYPE_CHECK_INSTANCE_CAST (self, CORE_TYPE_VIEW_TRACKER, CoreViewTracker), G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, CORE_TYPE_TRACKER_ACCUMULATOR, CoreTrackerAccumulator), G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, CORE_TYPE_TRACKER_ACCUMULATOR, CoreTrackerAccumulator), G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, CORE_TYPE_TRACKER_ACCUMULATOR, CoreTrackerAccumulator)); +#line 396 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return self; +#line 4601 "ImportPage.c" +} + + +CameraViewTracker* camera_view_tracker_new (ViewCollection* collection) { +#line 396 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return camera_view_tracker_construct (TYPE_CAMERA_VIEW_TRACKER, collection); +#line 4608 "ImportPage.c" +} + + +static void camera_view_tracker_class_init (CameraViewTrackerClass * klass) { +#line 391 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + camera_view_tracker_parent_class = g_type_class_peek_parent (klass); +#line 391 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((CoreTrackerClass *) klass)->finalize = camera_view_tracker_finalize; +#line 4617 "ImportPage.c" +} + + +static void camera_view_tracker_instance_init (CameraViewTracker * self) { + CameraAccumulator* _tmp0_ = NULL; + CameraAccumulator* _tmp1_ = NULL; + CameraAccumulator* _tmp2_ = NULL; +#line 392 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = camera_accumulator_new (); +#line 392 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->all = _tmp0_; +#line 393 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = camera_accumulator_new (); +#line 393 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->visible = _tmp1_; +#line 394 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = camera_accumulator_new (); +#line 394 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->selected = _tmp2_; +#line 4637 "ImportPage.c" +} + + +static void camera_view_tracker_finalize (CoreTracker* obj) { + CameraViewTracker * self; +#line 391 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_CAMERA_VIEW_TRACKER, CameraViewTracker); +#line 392 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->all); +#line 393 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->visible); +#line 394 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->selected); +#line 391 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + CORE_TRACKER_CLASS (camera_view_tracker_parent_class)->finalize (obj); +#line 4653 "ImportPage.c" +} + + +GType camera_view_tracker_get_type (void) { + static volatile gsize camera_view_tracker_type_id__volatile = 0; + if (g_once_init_enter (&camera_view_tracker_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (CameraViewTrackerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) camera_view_tracker_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CameraViewTracker), 0, (GInstanceInitFunc) camera_view_tracker_instance_init, NULL }; + GType camera_view_tracker_type_id; + camera_view_tracker_type_id = g_type_register_static (CORE_TYPE_VIEW_TRACKER, "CameraViewTracker", &g_define_type_info, 0); + g_once_init_leave (&camera_view_tracker_type_id__volatile, camera_view_tracker_type_id); + } + return camera_view_tracker_type_id__volatile; +} + + +static gboolean camera_accumulator_real_include (CoreTrackerAccumulator* base, DataObject* object) { + CameraAccumulator * self; + gboolean result = FALSE; + ImportSource* source = NULL; + DataObject* _tmp0_ = NULL; + DataSource* _tmp1_ = NULL; + gint _tmp2_ = 0; + PhotoImportSource* photo = NULL; + ImportSource* _tmp3_ = NULL; + PhotoImportSource* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; + PhotoImportSource* _tmp6_ = NULL; +#line 409 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CAMERA_ACCUMULATOR, CameraAccumulator); +#line 409 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); +#line 410 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = object; +#line 410 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = data_view_get_source (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_VIEW, DataView)); +#line 410 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + source = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_IMPORT_SOURCE, ImportSource); +#line 412 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = self->priv->_total; +#line 412 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + camera_accumulator_set_total (self, _tmp2_ + 1); +#line 414 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = source; +#line 414 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, TYPE_PHOTO_IMPORT_SOURCE) ? ((PhotoImportSource*) _tmp3_) : NULL); +#line 414 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + photo = _tmp4_; +#line 415 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = photo; +#line 415 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp6_ != NULL) { +#line 4705 "ImportPage.c" + PhotoImportSource* _tmp7_ = NULL; + PhotoFileFormat _tmp8_ = 0; +#line 415 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = photo; +#line 415 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = photo_import_source_get_file_format (_tmp7_); +#line 415 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = _tmp8_ != PHOTO_FILE_FORMAT_RAW; +#line 4714 "ImportPage.c" + } else { +#line 415 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = FALSE; +#line 4718 "ImportPage.c" + } +#line 415 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp5_) { +#line 4722 "ImportPage.c" + gint _tmp9_ = 0; +#line 416 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = self->priv->_photos; +#line 416 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + camera_accumulator_set_photos (self, _tmp9_ + 1); +#line 4728 "ImportPage.c" + } else { + gboolean _tmp10_ = FALSE; + PhotoImportSource* _tmp11_ = NULL; +#line 417 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = photo; +#line 417 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp11_ != NULL) { +#line 4736 "ImportPage.c" + PhotoImportSource* _tmp12_ = NULL; + PhotoFileFormat _tmp13_ = 0; +#line 417 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = photo; +#line 417 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = photo_import_source_get_file_format (_tmp12_); +#line 417 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = _tmp13_ == PHOTO_FILE_FORMAT_RAW; +#line 4745 "ImportPage.c" + } else { +#line 417 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = FALSE; +#line 4749 "ImportPage.c" + } +#line 417 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp10_) { +#line 4753 "ImportPage.c" + gint _tmp14_ = 0; +#line 418 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = self->priv->_raw; +#line 418 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + camera_accumulator_set_raw (self, _tmp14_ + 1); +#line 4759 "ImportPage.c" + } else { + ImportSource* _tmp15_ = NULL; +#line 419 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = source; +#line 419 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp15_, TYPE_VIDEO_IMPORT_SOURCE)) { +#line 4766 "ImportPage.c" + gint _tmp16_ = 0; +#line 420 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp16_ = self->priv->_videos; +#line 420 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + camera_accumulator_set_videos (self, _tmp16_ + 1); +#line 4772 "ImportPage.c" + } + } + } +#line 423 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = TRUE; +#line 423 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (photo); +#line 423 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (source); +#line 423 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 4784 "ImportPage.c" +} + + +static gboolean camera_accumulator_real_uninclude (CoreTrackerAccumulator* base, DataObject* object) { + CameraAccumulator * self; + gboolean result = FALSE; + ImportSource* source = NULL; + DataObject* _tmp0_ = NULL; + DataSource* _tmp1_ = NULL; + gint _tmp2_ = 0; + PhotoImportSource* photo = NULL; + ImportSource* _tmp3_ = NULL; + PhotoImportSource* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; + PhotoImportSource* _tmp6_ = NULL; +#line 426 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CAMERA_ACCUMULATOR, CameraAccumulator); +#line 426 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); +#line 427 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = object; +#line 427 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = data_view_get_source (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_VIEW, DataView)); +#line 427 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + source = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_IMPORT_SOURCE, ImportSource); +#line 429 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = self->priv->_total; +#line 429 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + camera_accumulator_set_total (self, _tmp2_ + 1); +#line 431 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = source; +#line 431 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, TYPE_PHOTO_IMPORT_SOURCE) ? ((PhotoImportSource*) _tmp3_) : NULL); +#line 431 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + photo = _tmp4_; +#line 432 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = photo; +#line 432 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp6_ != NULL) { +#line 4824 "ImportPage.c" + PhotoImportSource* _tmp7_ = NULL; + PhotoFileFormat _tmp8_ = 0; +#line 432 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = photo; +#line 432 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = photo_import_source_get_file_format (_tmp7_); +#line 432 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = _tmp8_ != PHOTO_FILE_FORMAT_RAW; +#line 4833 "ImportPage.c" + } else { +#line 432 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = FALSE; +#line 4837 "ImportPage.c" + } +#line 432 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp5_) { +#line 4841 "ImportPage.c" + gint _tmp9_ = 0; + gint _tmp10_ = 0; +#line 433 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = self->priv->_photos; +#line 433 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _vala_assert (_tmp9_ > 0, "photos > 0"); +#line 434 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = self->priv->_photos; +#line 434 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + camera_accumulator_set_photos (self, _tmp10_ - 1); +#line 4852 "ImportPage.c" + } else { + gboolean _tmp11_ = FALSE; + PhotoImportSource* _tmp12_ = NULL; +#line 435 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = photo; +#line 435 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp12_ != NULL) { +#line 4860 "ImportPage.c" + PhotoImportSource* _tmp13_ = NULL; + PhotoFileFormat _tmp14_ = 0; +#line 435 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = photo; +#line 435 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = photo_import_source_get_file_format (_tmp13_); +#line 435 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = _tmp14_ == PHOTO_FILE_FORMAT_RAW; +#line 4869 "ImportPage.c" + } else { +#line 435 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = FALSE; +#line 4873 "ImportPage.c" + } +#line 435 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp11_) { +#line 4877 "ImportPage.c" + gint _tmp15_ = 0; + gint _tmp16_ = 0; +#line 436 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = self->priv->_raw; +#line 436 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _vala_assert (_tmp15_ > 0, "raw > 0"); +#line 437 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp16_ = self->priv->_raw; +#line 437 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + camera_accumulator_set_raw (self, _tmp16_ - 1); +#line 4888 "ImportPage.c" + } else { + ImportSource* _tmp17_ = NULL; +#line 438 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = source; +#line 438 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, TYPE_VIDEO_IMPORT_SOURCE)) { +#line 4895 "ImportPage.c" + gint _tmp18_ = 0; + gint _tmp19_ = 0; +#line 439 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp18_ = self->priv->_videos; +#line 439 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _vala_assert (_tmp18_ > 0, "videos > 0"); +#line 440 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp19_ = self->priv->_videos; +#line 440 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + camera_accumulator_set_videos (self, _tmp19_ - 1); +#line 4906 "ImportPage.c" + } + } + } +#line 444 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = TRUE; +#line 444 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (photo); +#line 444 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (source); +#line 444 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 4918 "ImportPage.c" +} + + +static gboolean camera_accumulator_real_altered (CoreTrackerAccumulator* base, DataObject* object, Alteration* alteration) { + CameraAccumulator * self; + gboolean result = FALSE; +#line 447 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CAMERA_ACCUMULATOR, CameraAccumulator); +#line 447 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); +#line 447 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_ALTERATION (alteration), FALSE); +#line 449 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 449 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 4935 "ImportPage.c" +} + + +gchar* camera_accumulator_to_string (CameraAccumulator* self) { + gchar* result = NULL; + gint _tmp0_ = 0; + gint _tmp1_ = 0; + gint _tmp2_ = 0; + gint _tmp3_ = 0; + gchar* _tmp4_ = NULL; +#line 452 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_CAMERA_ACCUMULATOR (self), NULL); +#line 453 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->_total; +#line 453 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = self->priv->_photos; +#line 453 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = self->priv->_videos; +#line 453 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = self->priv->_raw; +#line 453 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = g_strdup_printf ("%d total/%d photos/%d videos/%d raw", _tmp0_, _tmp1_, _tmp2_, _tmp3_); +#line 453 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp4_; +#line 453 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 4962 "ImportPage.c" +} + + +CameraAccumulator* camera_accumulator_construct (GType object_type) { + CameraAccumulator * self = NULL; +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = (CameraAccumulator*) g_object_new (object_type, NULL); +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return self; +#line 4972 "ImportPage.c" +} + + +CameraAccumulator* camera_accumulator_new (void) { +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return camera_accumulator_construct (TYPE_CAMERA_ACCUMULATOR); +#line 4979 "ImportPage.c" +} + + +gint camera_accumulator_get_total (CameraAccumulator* self) { + gint result; + gint _tmp0_ = 0; +#line 404 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_CAMERA_ACCUMULATOR (self), 0); +#line 404 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->_total; +#line 404 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 404 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 4994 "ImportPage.c" +} + + +static void camera_accumulator_set_total (CameraAccumulator* self, gint value) { + gint _tmp0_ = 0; +#line 404 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_CAMERA_ACCUMULATOR (self)); +#line 404 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = value; +#line 404 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->_total = _tmp0_; +#line 404 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_notify ((GObject *) self, "total"); +#line 5008 "ImportPage.c" +} + + +gint camera_accumulator_get_photos (CameraAccumulator* self) { + gint result; + gint _tmp0_ = 0; +#line 405 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_CAMERA_ACCUMULATOR (self), 0); +#line 405 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->_photos; +#line 405 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 405 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 5023 "ImportPage.c" +} + + +static void camera_accumulator_set_photos (CameraAccumulator* self, gint value) { + gint _tmp0_ = 0; +#line 405 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_CAMERA_ACCUMULATOR (self)); +#line 405 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = value; +#line 405 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->_photos = _tmp0_; +#line 405 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_notify ((GObject *) self, "photos"); +#line 5037 "ImportPage.c" +} + + +gint camera_accumulator_get_videos (CameraAccumulator* self) { + gint result; + gint _tmp0_ = 0; +#line 406 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_CAMERA_ACCUMULATOR (self), 0); +#line 406 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->_videos; +#line 406 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 406 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 5052 "ImportPage.c" +} + + +static void camera_accumulator_set_videos (CameraAccumulator* self, gint value) { + gint _tmp0_ = 0; +#line 406 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_CAMERA_ACCUMULATOR (self)); +#line 406 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = value; +#line 406 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->_videos = _tmp0_; +#line 406 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_notify ((GObject *) self, "videos"); +#line 5066 "ImportPage.c" +} + + +gint camera_accumulator_get_raw (CameraAccumulator* self) { + gint result; + gint _tmp0_ = 0; +#line 407 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_CAMERA_ACCUMULATOR (self), 0); +#line 407 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->_raw; +#line 407 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 407 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 5081 "ImportPage.c" +} + + +static void camera_accumulator_set_raw (CameraAccumulator* self, gint value) { + gint _tmp0_ = 0; +#line 407 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_CAMERA_ACCUMULATOR (self)); +#line 407 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = value; +#line 407 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->_raw = _tmp0_; +#line 407 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_notify ((GObject *) self, "raw"); +#line 5095 "ImportPage.c" +} + + +static void camera_accumulator_class_init (CameraAccumulatorClass * klass) { +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + camera_accumulator_parent_class = g_type_class_peek_parent (klass); +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_type_class_add_private (klass, sizeof (CameraAccumulatorPrivate)); +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_camera_accumulator_get_property; +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_camera_accumulator_set_property; +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + G_OBJECT_CLASS (klass)->finalize = camera_accumulator_finalize; +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), CAMERA_ACCUMULATOR_TOTAL, g_param_spec_int ("total", "total", "total", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), CAMERA_ACCUMULATOR_PHOTOS, g_param_spec_int ("photos", "photos", "photos", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), CAMERA_ACCUMULATOR_VIDEOS, g_param_spec_int ("videos", "videos", "videos", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), CAMERA_ACCUMULATOR_RAW, g_param_spec_int ("raw", "raw", "raw", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); +#line 5118 "ImportPage.c" +} + + +static void camera_accumulator_core_tracker_accumulator_interface_init (CoreTrackerAccumulatorIface * iface) { +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + camera_accumulator_core_tracker_accumulator_parent_iface = g_type_interface_peek_parent (iface); +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + iface->include = (gboolean (*)(CoreTrackerAccumulator*, DataObject*)) camera_accumulator_real_include; +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + iface->uninclude = (gboolean (*)(CoreTrackerAccumulator*, DataObject*)) camera_accumulator_real_uninclude; +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + iface->altered = (gboolean (*)(CoreTrackerAccumulator*, DataObject*, Alteration*)) camera_accumulator_real_altered; +#line 5131 "ImportPage.c" +} + + +static void camera_accumulator_instance_init (CameraAccumulator * self) { +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv = CAMERA_ACCUMULATOR_GET_PRIVATE (self); +#line 404 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->_total = 0; +#line 405 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->_photos = 0; +#line 406 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->_videos = 0; +#line 407 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->_raw = 0; +#line 5146 "ImportPage.c" +} + + +static void camera_accumulator_finalize (GObject* obj) { + CameraAccumulator * self; +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_CAMERA_ACCUMULATOR, CameraAccumulator); +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + G_OBJECT_CLASS (camera_accumulator_parent_class)->finalize (obj); +#line 5156 "ImportPage.c" +} + + +GType camera_accumulator_get_type (void) { + static volatile gsize camera_accumulator_type_id__volatile = 0; + if (g_once_init_enter (&camera_accumulator_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (CameraAccumulatorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) camera_accumulator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CameraAccumulator), 0, (GInstanceInitFunc) camera_accumulator_instance_init, NULL }; + static const GInterfaceInfo core_tracker_accumulator_info = { (GInterfaceInitFunc) camera_accumulator_core_tracker_accumulator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType camera_accumulator_type_id; + camera_accumulator_type_id = g_type_register_static (G_TYPE_OBJECT, "CameraAccumulator", &g_define_type_info, 0); + g_type_add_interface_static (camera_accumulator_type_id, CORE_TYPE_TRACKER_ACCUMULATOR, &core_tracker_accumulator_info); + g_once_init_leave (&camera_accumulator_type_id__volatile, camera_accumulator_type_id); + } + return camera_accumulator_type_id__volatile; +} + + +static void _vala_camera_accumulator_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { + CameraAccumulator * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_CAMERA_ACCUMULATOR, CameraAccumulator); +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + switch (property_id) { +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + case CAMERA_ACCUMULATOR_TOTAL: +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_value_set_int (value, camera_accumulator_get_total (self)); +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + case CAMERA_ACCUMULATOR_PHOTOS: +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_value_set_int (value, camera_accumulator_get_photos (self)); +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + case CAMERA_ACCUMULATOR_VIDEOS: +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_value_set_int (value, camera_accumulator_get_videos (self)); +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + case CAMERA_ACCUMULATOR_RAW: +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_value_set_int (value, camera_accumulator_get_raw (self)); +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 5203 "ImportPage.c" + default: +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 5209 "ImportPage.c" + } +} + + +static void _vala_camera_accumulator_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { + CameraAccumulator * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_CAMERA_ACCUMULATOR, CameraAccumulator); +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + switch (property_id) { +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + case CAMERA_ACCUMULATOR_TOTAL: +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + camera_accumulator_set_total (self, g_value_get_int (value)); +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + case CAMERA_ACCUMULATOR_PHOTOS: +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + camera_accumulator_set_photos (self, g_value_get_int (value)); +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + case CAMERA_ACCUMULATOR_VIDEOS: +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + camera_accumulator_set_videos (self, g_value_get_int (value)); +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + case CAMERA_ACCUMULATOR_RAW: +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + camera_accumulator_set_raw (self, g_value_get_int (value)); +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 5243 "ImportPage.c" + default: +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 5249 "ImportPage.c" + } +} + + +static void _import_page_on_media_added_removed_data_collection_contents_altered (DataCollection* _sender, GeeIterable* added, GeeIterable* removed, gpointer self) { +#line 766 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_on_media_added_removed ((ImportPage*) self); +#line 5257 "ImportPage.c" +} + + +GType import_page_refresh_result_get_type (void) { + static volatile gsize import_page_refresh_result_type_id__volatile = 0; + if (g_once_init_enter (&import_page_refresh_result_type_id__volatile)) { + static const GEnumValue values[] = {{IMPORT_PAGE_REFRESH_RESULT_OK, "IMPORT_PAGE_REFRESH_RESULT_OK", "ok"}, {IMPORT_PAGE_REFRESH_RESULT_BUSY, "IMPORT_PAGE_REFRESH_RESULT_BUSY", "busy"}, {IMPORT_PAGE_REFRESH_RESULT_LOCKED, "IMPORT_PAGE_REFRESH_RESULT_LOCKED", "locked"}, {IMPORT_PAGE_REFRESH_RESULT_LIBRARY_ERROR, "IMPORT_PAGE_REFRESH_RESULT_LIBRARY_ERROR", "library-error"}, {0, NULL, NULL}}; + GType import_page_refresh_result_type_id; + import_page_refresh_result_type_id = g_enum_register_static ("ImportPageRefreshResult", values); + g_once_init_leave (&import_page_refresh_result_type_id__volatile, import_page_refresh_result_type_id); + } + return import_page_refresh_result_type_id__volatile; +} + + +static gint64 _import_page_preview_comparator_comparator (void* a, void* b, gpointer self) { + gint64 result; + result = import_page_preview_comparator (a, b); +#line 747 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 5278 "ImportPage.c" +} + + +static gboolean _import_page_preview_comparator_predicate_comparator_predicate (DataObject* object, Alteration* alteration, gpointer self) { + gboolean result; + result = import_page_preview_comparator_predicate (object, alteration); +#line 747 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 5287 "ImportPage.c" +} + + +static void _import_page_on_view_changed_view_collection_items_state_changed (ViewCollection* _sender, GeeIterable* changed, gpointer self) { +#line 750 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_on_view_changed ((ImportPage*) self); +#line 5294 "ImportPage.c" +} + + +static void _import_page_on_view_changed_data_collection_contents_altered (DataCollection* _sender, GeeIterable* added, GeeIterable* removed, gpointer self) { +#line 751 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_on_view_changed ((ImportPage*) self); +#line 5301 "ImportPage.c" +} + + +static void _import_page_on_view_changed_view_collection_items_visibility_changed (ViewCollection* _sender, GeeCollection* changed, gpointer self) { +#line 752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_on_view_changed ((ImportPage*) self); +#line 5308 "ImportPage.c" +} + + +ImportPage* import_page_construct (GType object_type, Camera* camera, const gchar* uri, const gchar* display_name, const gchar* icon) { + ImportPage * self = NULL; + const gchar* _tmp0_ = NULL; + Camera* _tmp1_ = NULL; + Camera* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + ImportSourceCollection* _tmp8_ = NULL; + const gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; + ViewCollection* _tmp11_ = NULL; + ViewCollection* _tmp12_ = NULL; + CameraViewTracker* _tmp13_ = NULL; + const gchar* _tmp14_ = NULL; + GtkLabel* _tmp26_ = NULL; + const gchar* _tmp27_ = NULL; + const gchar* _tmp28_ = NULL; + GVolumeMonitor* _tmp29_ = NULL; + GPContextWrapper* _tmp30_ = NULL; + GPSpinIdleWrapper* _tmp32_ = NULL; + ViewCollection* _tmp34_ = NULL; + ViewCollection* _tmp35_ = NULL; + SourceCollection* _tmp36_ = NULL; + ImportPageImportViewManager* _tmp37_ = NULL; + ImportPageImportViewManager* _tmp38_ = NULL; + ViewCollectionMonitor* _tmp39_ = NULL; + ViewCollectionMonitor* _tmp40_ = NULL; + ViewCollection* _tmp41_ = NULL; + ViewCollection* _tmp42_ = NULL; + ViewCollection* _tmp43_ = NULL; + ViewCollection* _tmp44_ = NULL; + ViewCollection* _tmp45_ = NULL; + ViewCollection* _tmp46_ = NULL; + ViewCollection* _tmp47_ = NULL; + ViewCollection* _tmp48_ = NULL; + ViewCollection* _tmp49_ = NULL; + ViewCollection* _tmp50_ = NULL; + GValue _tmp51_ = {0}; + LibraryPhotoSourceCollection* _tmp52_ = NULL; + VideoSourceCollection* _tmp53_ = NULL; +#line 709 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (camera != NULL, NULL); +#line 709 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (uri != NULL, NULL); +#line 710 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = _ ("Camera"); +#line 710 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = (ImportPage*) checkerboard_page_construct (object_type, _tmp0_); +#line 711 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = camera; +#line 711 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = _GPHOTO_REF_CAMERA0 (_tmp1_); +#line 711 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_camera_unref0 (self->priv->camera); +#line 711 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->camera = _tmp2_; +#line 712 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = uri; +#line 712 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = g_strdup (_tmp3_); +#line 712 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->uri); +#line 712 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->uri = _tmp4_; +#line 713 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = uri; +#line 713 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = g_strdup_printf ("ImportSources for %s", _tmp5_); +#line 713 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = _tmp6_; +#line 713 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = import_source_collection_new (_tmp7_); +#line 713 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _data_collection_unref0 (self->priv->import_sources); +#line 713 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->import_sources = G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_SOURCE_COLLECTION, SourceCollection); +#line 713 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp7_); +#line 714 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = icon; +#line 714 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = g_strdup (_tmp9_); +#line 714 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->icon); +#line 714 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->icon = _tmp10_; +#line 716 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 716 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = _tmp11_; +#line 716 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = camera_view_tracker_new (_tmp12_); +#line 716 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _core_tracker_unref0 (self->priv->tracker); +#line 716 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->tracker = _tmp13_; +#line 716 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _data_collection_unref0 (_tmp12_); +#line 719 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = display_name; +#line 719 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (NULL != _tmp14_) { +#line 5417 "ImportPage.c" + const gchar* _tmp15_ = NULL; + gchar* _tmp16_ = NULL; +#line 720 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = display_name; +#line 720 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp16_ = g_strdup (_tmp15_); +#line 720 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->camera_name); +#line 720 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->camera_name = _tmp16_; +#line 5428 "ImportPage.c" + } else { + CameraAbilities abilities = {0}; + int res = 0; + Camera* _tmp17_ = NULL; + CameraAbilities _tmp18_ = {0}; + int _tmp19_ = 0; + int _tmp20_ = 0; +#line 723 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = camera; +#line 723 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp19_ = gp_camera_get_abilities (_tmp17_, &_tmp18_); +#line 723 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + (abilities); +#line 723 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + abilities = _tmp18_; +#line 723 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + res = _tmp19_; +#line 724 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp20_ = res; +#line 724 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp20_ != GP_OK) { +#line 5450 "ImportPage.c" + int _tmp21_ = 0; + gchar* _tmp22_ = NULL; + gchar* _tmp23_ = NULL; + const gchar* _tmp24_ = NULL; + gchar* _tmp25_ = NULL; +#line 725 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp21_ = res; +#line 725 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp22_ = gp_result_to_full_string (_tmp21_); +#line 725 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp23_ = _tmp22_; +#line 725 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_debug ("ImportPage.vala:725: Unable to get camera abilities: %s", _tmp23_); +#line 725 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp23_); +#line 726 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp24_ = _ ("Camera"); +#line 726 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp25_ = g_strdup (_tmp24_); +#line 726 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->camera_name); +#line 726 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->camera_name = _tmp25_; +#line 5474 "ImportPage.c" + } +#line 719 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + (abilities); +#line 5478 "ImportPage.c" + } +#line 729 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp26_ = self->priv->camera_label; +#line 729 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp27_ = self->priv->camera_name; +#line 729 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_label_set_text (_tmp26_, _tmp27_); +#line 730 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp28_ = self->priv->camera_name; +#line 730 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + page_set_page_name (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), _tmp28_); +#line 733 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp29_ = g_volume_monitor_get (); +#line 733 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->volume_monitor); +#line 733 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->volume_monitor = _tmp29_; +#line 736 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp30_ = import_page_null_context; +#line 736 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp30_ == NULL) { +#line 5500 "ImportPage.c" + GPContextWrapper* _tmp31_ = NULL; +#line 737 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp31_ = gp_context_wrapper_new (); +#line 737 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_context_wrapper_unref0 (import_page_null_context); +#line 737 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_null_context = _tmp31_; +#line 5508 "ImportPage.c" + } +#line 740 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp32_ = import_page_spin_idle_context; +#line 740 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp32_ == NULL) { +#line 5514 "ImportPage.c" + GPSpinIdleWrapper* _tmp33_ = NULL; +#line 741 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp33_ = gp_spin_idle_wrapper_new (); +#line 741 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_context_wrapper_unref0 (import_page_spin_idle_context); +#line 741 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_spin_idle_context = _tmp33_; +#line 5522 "ImportPage.c" + } +#line 744 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp34_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 744 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp35_ = _tmp34_; +#line 744 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp36_ = self->priv->import_sources; +#line 744 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp37_ = import_page_import_view_manager_new (self); +#line 744 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp38_ = _tmp37_; +#line 744 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp39_ = view_collection_monitor_source_collection (_tmp35_, _tmp36_, G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, TYPE_VIEW_MANAGER, ViewManager), NULL, NULL, NULL, NULL); +#line 744 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp40_ = _tmp39_; +#line 744 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _view_collection_monitor_unref0 (_tmp40_); +#line 744 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _view_manager_unref0 (_tmp38_); +#line 744 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _data_collection_unref0 (_tmp35_); +#line 747 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp41_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 747 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp42_ = _tmp41_; +#line 747 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + data_collection_set_comparator (G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, TYPE_DATA_COLLECTION, DataCollection), _import_page_preview_comparator_comparator, NULL, _import_page_preview_comparator_predicate_comparator_predicate, NULL); +#line 747 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _data_collection_unref0 (_tmp42_); +#line 750 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp43_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 750 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp44_ = _tmp43_; +#line 750 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_signal_connect_object (_tmp44_, "items-state-changed", (GCallback) _import_page_on_view_changed_view_collection_items_state_changed, self, 0); +#line 750 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _data_collection_unref0 (_tmp44_); +#line 751 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp45_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 751 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp46_ = _tmp45_; +#line 751 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, TYPE_DATA_COLLECTION, DataCollection), "contents-altered", (GCallback) _import_page_on_view_changed_data_collection_contents_altered, self, 0); +#line 751 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _data_collection_unref0 (_tmp46_); +#line 752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp47_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp48_ = _tmp47_; +#line 752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_signal_connect_object (_tmp48_, "items-visibility-changed", (GCallback) _import_page_on_view_changed_view_collection_items_visibility_changed, self, 0); +#line 752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _data_collection_unref0 (_tmp48_); +#line 755 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp49_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 755 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp50_ = _tmp49_; +#line 755 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_value_init (&_tmp51_, G_TYPE_BOOLEAN); +#line 755 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_value_set_boolean (&_tmp51_, TRUE); +#line 755 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + data_collection_set_property (G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, TYPE_DATA_COLLECTION, DataCollection), CHECKERBOARD_ITEM_PROP_SHOW_SUBTITLES, &_tmp51_, NULL, NULL); +#line 755 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + G_IS_VALUE (&_tmp51_) ? (g_value_unset (&_tmp51_), NULL) : NULL; +#line 755 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _data_collection_unref0 (_tmp50_); +#line 758 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp52_ = library_photo_global; +#line 758 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, TYPE_DATA_COLLECTION, DataCollection), "contents-altered", (GCallback) _import_page_on_media_added_removed_data_collection_contents_altered, self, 0); +#line 759 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp53_ = video_global; +#line 759 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, TYPE_DATA_COLLECTION, DataCollection), "contents-altered", (GCallback) _import_page_on_media_added_removed_data_collection_contents_altered, self, 0); +#line 761 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + checkerboard_page_init_item_context_menu (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_PAGE, CheckerboardPage), "/ImportContextMenu"); +#line 762 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + checkerboard_page_init_page_context_menu (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_PAGE, CheckerboardPage), "/ImportContextMenu"); +#line 709 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return self; +#line 5604 "ImportPage.c" +} + + +ImportPage* import_page_new (Camera* camera, const gchar* uri, const gchar* display_name, const gchar* icon) { +#line 709 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return import_page_construct (TYPE_IMPORT_PAGE, camera, uri, display_name, icon); +#line 5611 "ImportPage.c" +} + + +static void _import_page_on_hide_imported_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 777 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_on_hide_imported ((ImportPage*) self); +#line 5618 "ImportPage.c" +} + + +static GtkToolbar* import_page_real_get_toolbar (Page* base) { + ImportPage * self; + GtkToolbar* result = NULL; + GtkToolbar* _tmp0_ = NULL; + GtkToolbar* _tmp56_ = NULL; + GtkToolbar* _tmp57_ = NULL; +#line 770 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_IMPORT_PAGE, ImportPage); +#line 771 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)->toolbar; +#line 771 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp0_ == NULL) { +#line 5634 "ImportPage.c" + GtkToolbar* _tmp1_ = NULL; + GtkToolbar* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + GtkCheckButton* _tmp4_ = NULL; + GtkCheckButton* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + GtkCheckButton* _tmp7_ = NULL; + GtkCheckButton* _tmp8_ = NULL; + GtkCheckButton* _tmp9_ = NULL; + ConfigFacade* _tmp10_ = NULL; + ConfigFacade* _tmp11_ = NULL; + gboolean _tmp12_ = FALSE; + GtkToolItem* hide_item = NULL; + GtkToolItem* _tmp13_ = NULL; + GtkToolItem* _tmp14_ = NULL; + GtkToolItem* _tmp15_ = NULL; + GtkCheckButton* _tmp16_ = NULL; + GtkToolbar* _tmp17_ = NULL; + GtkToolItem* _tmp18_ = NULL; + GtkSeparatorToolItem* separator = NULL; + GtkSeparatorToolItem* _tmp19_ = NULL; + GtkSeparatorToolItem* _tmp20_ = NULL; + GtkToolbar* _tmp21_ = NULL; + GtkSeparatorToolItem* _tmp22_ = NULL; + GtkProgressBar* _tmp23_ = NULL; + GtkProgressBar* _tmp24_ = NULL; + GtkToolItem* progress_item = NULL; + GtkToolItem* _tmp25_ = NULL; + GtkToolItem* _tmp26_ = NULL; + GtkToolItem* _tmp27_ = NULL; + GtkProgressBar* _tmp28_ = NULL; + GtkProgressBar* _tmp29_ = NULL; + GtkToolbar* _tmp30_ = NULL; + GtkToolItem* _tmp31_ = NULL; + GtkToggleToolButton* find_button = NULL; + GtkToggleToolButton* _tmp32_ = NULL; + GtkToggleToolButton* _tmp33_ = NULL; + GtkAction* _tmp34_ = NULL; + GtkAction* _tmp35_ = NULL; + GtkToolbar* _tmp36_ = NULL; + GtkToggleToolButton* _tmp37_ = NULL; + GtkToolbar* _tmp38_ = NULL; + GtkSeparatorToolItem* _tmp39_ = NULL; + GtkSeparatorToolItem* _tmp40_ = NULL; + GtkToolButton* import_selected_button = NULL; + GtkToolButton* _tmp41_ = NULL; + GtkToolButton* _tmp42_ = NULL; + GtkToolButton* _tmp43_ = NULL; + GtkAction* _tmp44_ = NULL; + GtkAction* _tmp45_ = NULL; + GtkToolbar* _tmp46_ = NULL; + GtkToolButton* _tmp47_ = NULL; + GtkToolButton* import_all_button = NULL; + GtkToolButton* _tmp48_ = NULL; + GtkToolButton* _tmp49_ = NULL; + GtkToolButton* _tmp50_ = NULL; + GtkAction* _tmp51_ = NULL; + GtkAction* _tmp52_ = NULL; + GtkToolbar* _tmp53_ = NULL; + GtkToolButton* _tmp54_ = NULL; + GtkProgressBar* _tmp55_ = NULL; +#line 772 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = PAGE_CLASS (import_page_parent_class)->get_toolbar (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_PAGE, CheckerboardPage), TYPE_PAGE, Page)); +#line 772 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = _tmp1_; +#line 772 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp2_); +#line 775 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _ ("Hide photos already imported"); +#line 775 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = (GtkCheckButton*) gtk_check_button_new_with_label (_tmp3_); +#line 775 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_ref_sink (_tmp4_); +#line 775 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->hide_imported); +#line 775 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->hide_imported = _tmp4_; +#line 776 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = self->priv->hide_imported; +#line 776 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = _ ("Only display photos that have not been imported"); +#line 776 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_widget_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget), _tmp6_); +#line 777 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = self->priv->hide_imported; +#line 777 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_button_get_type (), GtkButton), "clicked", (GCallback) _import_page_on_hide_imported_gtk_button_clicked, self, 0); +#line 778 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = self->priv->hide_imported; +#line 778 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 779 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = self->priv->hide_imported; +#line 779 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = config_facade_get_instance (); +#line 779 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = _tmp10_; +#line 779 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = configuration_facade_get_hide_photos_already_imported (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); +#line 779 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_toggle_button_get_type (), GtkToggleButton), _tmp12_); +#line 779 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp11_); +#line 780 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = gtk_tool_item_new (); +#line 780 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_ref_sink (_tmp13_); +#line 780 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + hide_item = _tmp13_; +#line 781 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = hide_item; +#line 781 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_tool_item_set_is_important (_tmp14_, TRUE); +#line 782 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = hide_item; +#line 782 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp16_ = self->priv->hide_imported; +#line 782 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_widget_get_type (), GtkWidget)); +#line 784 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)->toolbar; +#line 784 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp18_ = hide_item; +#line 784 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_toolbar_insert (_tmp17_, _tmp18_, -1); +#line 787 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp19_ = (GtkSeparatorToolItem*) gtk_separator_tool_item_new (); +#line 787 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_ref_sink (_tmp19_); +#line 787 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + separator = _tmp19_; +#line 788 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp20_ = separator; +#line 788 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_separator_tool_item_set_draw (_tmp20_, FALSE); +#line 790 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp21_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)->toolbar; +#line 790 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp22_ = separator; +#line 790 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_toolbar_insert (_tmp21_, G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_tool_item_get_type (), GtkToolItem), -1); +#line 793 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp23_ = self->priv->progress_bar; +#line 793 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_orientable_set_orientation (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, GTK_TYPE_ORIENTABLE, GtkOrientable), GTK_ORIENTATION_HORIZONTAL); +#line 794 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp24_ = self->priv->progress_bar; +#line 794 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 795 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp25_ = gtk_tool_item_new (); +#line 795 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_ref_sink (_tmp25_); +#line 795 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + progress_item = _tmp25_; +#line 796 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp26_ = progress_item; +#line 796 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_tool_item_set_expand (_tmp26_, TRUE); +#line 797 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp27_ = progress_item; +#line 797 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp28_ = self->priv->progress_bar; +#line 797 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, gtk_widget_get_type (), GtkWidget)); +#line 798 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp29_ = self->priv->progress_bar; +#line 798 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_progress_bar_set_show_text (_tmp29_, TRUE); +#line 800 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp30_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)->toolbar; +#line 800 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp31_ = progress_item; +#line 800 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_toolbar_insert (_tmp30_, _tmp31_, -1); +#line 803 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp32_ = (GtkToggleToolButton*) gtk_toggle_tool_button_new (); +#line 803 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_ref_sink (_tmp32_); +#line 803 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + find_button = _tmp32_; +#line 804 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp33_ = find_button; +#line 804 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp34_ = page_get_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "CommonDisplaySearchbar"); +#line 804 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp35_ = _tmp34_; +#line 804 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_activatable_set_related_action (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, GTK_TYPE_ACTIVATABLE, GtkActivatable), _tmp35_); +#line 804 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp35_); +#line 806 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp36_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)->toolbar; +#line 806 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp37_ = find_button; +#line 806 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_toolbar_insert (_tmp36_, G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, gtk_tool_item_get_type (), GtkToolItem), -1); +#line 809 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp38_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)->toolbar; +#line 809 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp39_ = (GtkSeparatorToolItem*) gtk_separator_tool_item_new (); +#line 809 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_ref_sink (_tmp39_); +#line 809 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp40_ = _tmp39_; +#line 809 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_toolbar_insert (_tmp38_, G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, gtk_tool_item_get_type (), GtkToolItem), -1); +#line 809 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp40_); +#line 812 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp41_ = (GtkToolButton*) gtk_tool_button_new (NULL, NULL); +#line 812 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_ref_sink (_tmp41_); +#line 812 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_selected_button = _tmp41_; +#line 813 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp42_ = import_selected_button; +#line 813 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_tool_button_set_icon_name (_tmp42_, RESOURCES_IMPORT); +#line 814 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp43_ = import_selected_button; +#line 814 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp44_ = page_get_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ImportSelected"); +#line 814 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp45_ = _tmp44_; +#line 814 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_activatable_set_related_action (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, GTK_TYPE_ACTIVATABLE, GtkActivatable), _tmp45_); +#line 814 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp45_); +#line 816 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp46_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)->toolbar; +#line 816 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp47_ = import_selected_button; +#line 816 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_toolbar_insert (_tmp46_, G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, gtk_tool_item_get_type (), GtkToolItem), -1); +#line 819 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp48_ = (GtkToolButton*) gtk_tool_button_new (NULL, NULL); +#line 819 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_ref_sink (_tmp48_); +#line 819 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_all_button = _tmp48_; +#line 820 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp49_ = import_all_button; +#line 820 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_tool_button_set_icon_name (_tmp49_, RESOURCES_IMPORT_ALL); +#line 821 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp50_ = import_all_button; +#line 821 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp51_ = page_get_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ImportAll"); +#line 821 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp52_ = _tmp51_; +#line 821 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_activatable_set_related_action (G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, GTK_TYPE_ACTIVATABLE, GtkActivatable), _tmp52_); +#line 821 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp52_); +#line 823 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp53_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)->toolbar; +#line 823 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp54_ = import_all_button; +#line 823 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_toolbar_insert (_tmp53_, G_TYPE_CHECK_INSTANCE_CAST (_tmp54_, gtk_tool_item_get_type (), GtkToolItem), -1); +#line 827 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp55_ = self->priv->progress_bar; +#line 827 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_widget_set_no_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp55_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 829 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_update_toolbar_state (self); +#line 831 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget)); +#line 771 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (import_all_button); +#line 771 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (import_selected_button); +#line 771 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (find_button); +#line 771 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (progress_item); +#line 771 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (separator); +#line 771 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (hide_item); +#line 5916 "ImportPage.c" + } +#line 834 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp56_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)->toolbar; +#line 834 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp57_ = _g_object_ref0 (_tmp56_); +#line 834 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp57_; +#line 834 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 5926 "ImportPage.c" +} + + +static gpointer _core_tracker_ref0 (gpointer self) { +#line 838 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return self ? core_tracker_ref (self) : NULL; +#line 5933 "ImportPage.c" +} + + +static CoreViewTracker* import_page_real_get_view_tracker (CheckerboardPage* base) { + ImportPage * self; + CoreViewTracker* result = NULL; + CameraViewTracker* _tmp0_ = NULL; + CoreViewTracker* _tmp1_ = NULL; +#line 837 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_IMPORT_PAGE, ImportPage); +#line 838 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->tracker; +#line 838 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _core_tracker_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, CORE_TYPE_VIEW_TRACKER, CoreViewTracker)); +#line 838 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 838 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 5952 "ImportPage.c" +} + + +static gchar* import_page_real_get_view_empty_message (CheckerboardPage* base) { + ImportPage * self; + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 845 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_IMPORT_PAGE, ImportPage); +#line 846 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = _ ("Starting import, please wait..."); +#line 846 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 846 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 846 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 5971 "ImportPage.c" +} + + +static gint64 import_page_preview_comparator (void* a, void* b) { + gint64 result = 0LL; + void* _tmp0_ = NULL; + ImportSource* _tmp1_ = NULL; + ImportSource* _tmp2_ = NULL; + time_t _tmp3_ = 0; + void* _tmp4_ = NULL; + ImportSource* _tmp5_ = NULL; + ImportSource* _tmp6_ = NULL; + time_t _tmp7_ = 0; + gint64 _tmp8_ = 0LL; +#line 850 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = a; +#line 850 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = import_preview_get_import_source (G_TYPE_CHECK_INSTANCE_CAST ((ImportPreview*) _tmp0_, TYPE_IMPORT_PREVIEW, ImportPreview)); +#line 850 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = _tmp1_; +#line 850 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = import_source_get_exposure_time (_tmp2_); +#line 850 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = b; +#line 850 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = import_preview_get_import_source (G_TYPE_CHECK_INSTANCE_CAST ((ImportPreview*) _tmp4_, TYPE_IMPORT_PREVIEW, ImportPreview)); +#line 850 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = _tmp5_; +#line 850 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = import_source_get_exposure_time (_tmp6_); +#line 850 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = (gint64) (_tmp3_ - _tmp7_); +#line 850 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp6_); +#line 850 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp2_); +#line 850 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp8_; +#line 850 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 6012 "ImportPage.c" +} + + +static gboolean import_page_preview_comparator_predicate (DataObject* object, Alteration* alteration) { + gboolean result = FALSE; + Alteration* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; +#line 854 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); +#line 854 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_ALTERATION (alteration), FALSE); +#line 855 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = alteration; +#line 855 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = alteration_has_detail (_tmp0_, "metadata", "exposure-time"); +#line 855 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 855 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 6032 "ImportPage.c" +} + + +static gint64 import_page_import_job_comparator (ImportPage* self, void* a, void* b) { + gint64 result = 0LL; + void* _tmp0_ = NULL; + time_t _tmp1_ = 0; + void* _tmp2_ = NULL; + time_t _tmp3_ = 0; +#line 858 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_PAGE (self), 0LL); +#line 859 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = a; +#line 859 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = import_page_camera_import_job_get_exposure_time (G_TYPE_CHECK_INSTANCE_CAST ((ImportPageCameraImportJob*) _tmp0_, IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, ImportPageCameraImportJob)); +#line 859 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = b; +#line 859 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = import_page_camera_import_job_get_exposure_time (G_TYPE_CHECK_INSTANCE_CAST ((ImportPageCameraImportJob*) _tmp2_, IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, ImportPageCameraImportJob)); +#line 859 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = (gint64) (_tmp1_ - _tmp3_); +#line 859 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 6056 "ImportPage.c" +} + + +static void import_page_real_init_collect_ui_filenames (Page* base, GeeList* ui_filenames) { + ImportPage * self; + GeeList* _tmp0_ = NULL; + GeeList* _tmp1_ = NULL; +#line 862 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_IMPORT_PAGE, ImportPage); +#line 862 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (GEE_IS_LIST (ui_filenames)); +#line 863 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = ui_filenames; +#line 863 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + PAGE_CLASS (import_page_parent_class)->init_collect_ui_filenames (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_PAGE, CheckerboardPage), TYPE_PAGE, Page), _tmp0_); +#line 865 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = ui_filenames; +#line 865 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection), "import.ui"); +#line 6076 "ImportPage.c" +} + + +static void _import_page_on_display_titles_gtk_action_callback (GtkAction* action, gpointer self) { +#line 871 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_on_display_titles ((ImportPage*) self, action); +#line 6083 "ImportPage.c" +} + + +static void _vala_array_add143 (GtkToggleActionEntry** array, int* length, int* size, const GtkToggleActionEntry* value) { +#line 875 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if ((*length) == (*size)) { +#line 875 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 875 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + *array = g_renew (GtkToggleActionEntry, *array, *size); +#line 6094 "ImportPage.c" + } +#line 875 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + (*array)[(*length)++] = *value; +#line 6098 "ImportPage.c" +} + + +static GtkToggleActionEntry* import_page_real_init_collect_toggle_action_entries (Page* base, int* result_length1) { + ImportPage * self; + GtkToggleActionEntry* result = NULL; + GtkToggleActionEntry* toggle_actions = NULL; + gint _tmp0_ = 0; + GtkToggleActionEntry* _tmp1_ = NULL; + gint toggle_actions_length1 = 0; + gint _toggle_actions_size_ = 0; + GtkToggleActionEntry titles = {0}; + ConfigFacade* _tmp2_ = NULL; + ConfigFacade* _tmp3_ = NULL; + gboolean _tmp4_ = FALSE; + GtkToggleActionEntry _tmp5_ = {0}; + GtkToggleActionEntry _tmp6_ = {0}; + const gchar* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; + GtkToggleActionEntry* _tmp9_ = NULL; + gint _tmp9__length1 = 0; + GtkToggleActionEntry _tmp10_ = {0}; + GtkToggleActionEntry* _tmp11_ = NULL; + gint _tmp11__length1 = 0; +#line 868 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_IMPORT_PAGE, ImportPage); +#line 869 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = PAGE_CLASS (import_page_parent_class)->init_collect_toggle_action_entries (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_PAGE, CheckerboardPage), TYPE_PAGE, Page), &_tmp0_); +#line 869 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + toggle_actions = _tmp1_; +#line 869 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + toggle_actions_length1 = _tmp0_; +#line 869 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _toggle_actions_size_ = toggle_actions_length1; +#line 871 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = config_facade_get_instance (); +#line 871 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _tmp2_; +#line 871 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = configuration_facade_get_display_photo_titles (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); +#line 871 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_.name = "ViewTitle"; +#line 871 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_.stock_id = NULL; +#line 871 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_.label = TRANSLATABLE; +#line 871 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_.accelerator = "<Ctrl><Shift>T"; +#line 871 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_.tooltip = TRANSLATABLE; +#line 871 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_.callback = (GCallback) _import_page_on_display_titles_gtk_action_callback; +#line 871 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_.is_active = _tmp4_; +#line 871 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = _tmp5_; +#line 871 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp3_); +#line 871 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + titles = _tmp6_; +#line 873 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = _ ("_Titles"); +#line 873 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + titles.label = _tmp7_; +#line 874 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = _ ("Display the title of each photo"); +#line 874 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + titles.tooltip = _tmp8_; +#line 875 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = toggle_actions; +#line 875 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9__length1 = toggle_actions_length1; +#line 875 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = titles; +#line 875 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _vala_array_add143 (&toggle_actions, &toggle_actions_length1, &_toggle_actions_size_, &_tmp10_); +#line 877 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = toggle_actions; +#line 877 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11__length1 = toggle_actions_length1; +#line 877 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (result_length1) { +#line 877 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + *result_length1 = _tmp11__length1; +#line 6183 "ImportPage.c" + } +#line 877 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp11_; +#line 877 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 6189 "ImportPage.c" +} + + +static void _import_page_on_import_selected_gtk_action_callback (GtkAction* action, gpointer self) { +#line 883 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_on_import_selected ((ImportPage*) self); +#line 6196 "ImportPage.c" +} + + +static void _vala_array_add144 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 887 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if ((*length) == (*size)) { +#line 887 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 887 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 6207 "ImportPage.c" + } +#line 887 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + (*array)[(*length)++] = *value; +#line 6211 "ImportPage.c" +} + + +static void _import_page_on_import_all_gtk_action_callback (GtkAction* action, gpointer self) { +#line 889 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_on_import_all ((ImportPage*) self); +#line 6218 "ImportPage.c" +} + + +static void _vala_array_add145 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 893 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if ((*length) == (*size)) { +#line 893 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 893 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 6229 "ImportPage.c" + } +#line 893 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + (*array)[(*length)++] = *value; +#line 6233 "ImportPage.c" +} + + +static GtkActionEntry* import_page_real_init_collect_action_entries (Page* base, int* result_length1) { + ImportPage * self; + GtkActionEntry* result = NULL; + GtkActionEntry* actions = NULL; + gint _tmp0_ = 0; + GtkActionEntry* _tmp1_ = NULL; + gint actions_length1 = 0; + gint _actions_size_ = 0; + GtkActionEntry import_selected = {0}; + GtkActionEntry _tmp2_ = {0}; + const gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + GtkActionEntry* _tmp5_ = NULL; + gint _tmp5__length1 = 0; + GtkActionEntry _tmp6_ = {0}; + GtkActionEntry import_all = {0}; + GtkActionEntry _tmp7_ = {0}; + const gchar* _tmp8_ = NULL; + const gchar* _tmp9_ = NULL; + GtkActionEntry* _tmp10_ = NULL; + gint _tmp10__length1 = 0; + GtkActionEntry _tmp11_ = {0}; + GtkActionEntry* _tmp12_ = NULL; + gint _tmp12__length1 = 0; +#line 880 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_IMPORT_PAGE, ImportPage); +#line 881 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = PAGE_CLASS (import_page_parent_class)->init_collect_action_entries (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_PAGE, CheckerboardPage), TYPE_PAGE, Page), &_tmp0_); +#line 881 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + actions = _tmp1_; +#line 881 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + actions_length1 = _tmp0_; +#line 881 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _actions_size_ = actions_length1; +#line 883 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_.name = "ImportSelected"; +#line 883 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_.stock_id = RESOURCES_IMPORT; +#line 883 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_.label = TRANSLATABLE; +#line 883 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_.accelerator = NULL; +#line 883 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_.tooltip = NULL; +#line 883 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_.callback = (GCallback) _import_page_on_import_selected_gtk_action_callback; +#line 883 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_selected = _tmp2_; +#line 885 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _ ("Import _Selected"); +#line 885 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_selected.label = _tmp3_; +#line 886 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = _ ("Import the selected photos into your library"); +#line 886 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_selected.tooltip = _tmp4_; +#line 887 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = actions; +#line 887 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5__length1 = actions_length1; +#line 887 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = import_selected; +#line 887 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _vala_array_add144 (&actions, &actions_length1, &_actions_size_, &_tmp6_); +#line 889 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_.name = "ImportAll"; +#line 889 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_.stock_id = RESOURCES_IMPORT_ALL; +#line 889 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_.label = TRANSLATABLE; +#line 889 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_.accelerator = NULL; +#line 889 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_.tooltip = NULL; +#line 889 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_.callback = (GCallback) _import_page_on_import_all_gtk_action_callback; +#line 889 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_all = _tmp7_; +#line 891 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = _ ("Import _All"); +#line 891 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_all.label = _tmp8_; +#line 892 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = _ ("Import all the photos into your library"); +#line 892 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_all.tooltip = _tmp9_; +#line 893 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = actions; +#line 893 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10__length1 = actions_length1; +#line 893 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = import_all; +#line 893 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _vala_array_add145 (&actions, &actions_length1, &_actions_size_, &_tmp11_); +#line 895 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = actions; +#line 895 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12__length1 = actions_length1; +#line 895 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (result_length1) { +#line 895 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + *result_length1 = _tmp12__length1; +#line 6339 "ImportPage.c" + } +#line 895 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp12_; +#line 895 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 6345 "ImportPage.c" +} + + +Camera* import_page_get_camera (ImportPage* self) { + Camera* result = NULL; + Camera* _tmp0_ = NULL; + Camera* _tmp1_ = NULL; +#line 898 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_PAGE (self), NULL); +#line 899 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->camera; +#line 899 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _GPHOTO_REF_CAMERA0 (_tmp0_); +#line 899 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 899 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 6363 "ImportPage.c" +} + + +gchar* import_page_get_uri (ImportPage* self) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 902 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_PAGE (self), NULL); +#line 903 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->uri; +#line 903 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 903 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 903 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 6381 "ImportPage.c" +} + + +gboolean import_page_is_busy (ImportPage* self) { + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; +#line 906 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_PAGE (self), FALSE); +#line 907 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->busy; +#line 907 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 907 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 6396 "ImportPage.c" +} + + +static void import_page_real_init_actions (Page* base, gint selected_count, gint count) { + ImportPage * self; + gint _tmp0_ = 0; + gint _tmp1_ = 0; +#line 910 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_IMPORT_PAGE, ImportPage); +#line 911 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_on_view_changed (self); +#line 913 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + page_set_action_important (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ImportSelected", TRUE); +#line 914 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + page_set_action_important (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ImportAll", TRUE); +#line 916 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = selected_count; +#line 916 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = count; +#line 916 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + PAGE_CLASS (import_page_parent_class)->init_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_PAGE, CheckerboardPage), TYPE_PAGE, Page), _tmp0_, _tmp1_); +#line 6418 "ImportPage.c" +} + + +gboolean import_page_is_refreshed (ImportPage* self) { + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; +#line 919 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_PAGE (self), FALSE); +#line 920 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = self->priv->refreshed; +#line 920 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp1_) { +#line 6432 "ImportPage.c" + gboolean _tmp2_ = FALSE; +#line 920 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = self->priv->busy; +#line 920 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = !_tmp2_; +#line 6438 "ImportPage.c" + } else { +#line 920 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = FALSE; +#line 6442 "ImportPage.c" + } +#line 920 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 920 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 6448 "ImportPage.c" +} + + +gchar* import_page_get_refresh_message (ImportPage* self) { + gchar* result = NULL; + gchar* msg = NULL; + const gchar* _tmp0_ = NULL; +#line 923 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_PAGE (self), NULL); +#line 924 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + msg = NULL; +#line 925 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->refresh_error; +#line 925 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp0_ != NULL) { +#line 6464 "ImportPage.c" + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; +#line 926 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = self->priv->refresh_error; +#line 926 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 926 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (msg); +#line 926 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + msg = _tmp2_; +#line 6475 "ImportPage.c" + } else { + int _tmp3_ = 0; +#line 927 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = self->priv->refresh_result; +#line 927 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp3_ == GP_OK) { +#line 6482 "ImportPage.c" + } else { + int _tmp4_ = 0; + gchar* _tmp5_ = NULL; +#line 930 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = self->priv->refresh_result; +#line 930 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = gp_result_to_full_string (_tmp4_); +#line 930 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (msg); +#line 930 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + msg = _tmp5_; +#line 6494 "ImportPage.c" + } + } +#line 933 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = msg; +#line 933 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 6501 "ImportPage.c" +} + + +static void import_page_update_status (ImportPage* self, gboolean busy, gboolean refreshed) { + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; +#line 936 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_IMPORT_PAGE (self)); +#line 937 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = busy; +#line 937 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->busy = _tmp0_; +#line 938 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = refreshed; +#line 938 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->refreshed = _tmp1_; +#line 940 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_on_view_changed (self); +#line 6520 "ImportPage.c" +} + + +static void import_page_update_toolbar_state (ImportPage* self) { + GtkCheckButton* _tmp0_ = NULL; +#line 943 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_IMPORT_PAGE (self)); +#line 944 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->hide_imported; +#line 944 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp0_ != NULL) { +#line 6532 "ImportPage.c" + gboolean _tmp1_ = FALSE; + gboolean _tmp2_ = FALSE; + gboolean _tmp3_ = FALSE; + GtkCheckButton* _tmp8_ = NULL; +#line 945 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = self->priv->busy; +#line 945 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp3_) { +#line 6541 "ImportPage.c" + gboolean _tmp4_ = FALSE; +#line 945 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = self->priv->refreshed; +#line 945 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = _tmp4_; +#line 6547 "ImportPage.c" + } else { +#line 945 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = FALSE; +#line 6551 "ImportPage.c" + } +#line 945 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp2_) { +#line 6555 "ImportPage.c" + ViewCollection* _tmp5_ = NULL; + ViewCollection* _tmp6_ = NULL; + gint _tmp7_ = 0; +#line 945 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 945 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = _tmp5_; +#line 945 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = view_collection_get_unfiltered_count (_tmp6_); +#line 945 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _tmp7_ > 0; +#line 945 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _data_collection_unref0 (_tmp6_); +#line 6569 "ImportPage.c" + } else { +#line 945 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = FALSE; +#line 6573 "ImportPage.c" + } +#line 945 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = self->priv->hide_imported; +#line 945 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget), _tmp1_); +#line 6579 "ImportPage.c" + } +} + + +static void import_page_on_view_changed (ImportPage* self) { + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + gboolean _tmp2_ = FALSE; + gboolean _tmp7_ = FALSE; + gboolean _tmp8_ = FALSE; + gboolean _tmp9_ = FALSE; + gboolean _tmp14_ = FALSE; + gboolean _tmp15_ = FALSE; + AppWindow* _tmp19_ = NULL; + AppWindow* _tmp20_ = NULL; +#line 948 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_IMPORT_PAGE (self)); +#line 949 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = self->priv->busy; +#line 949 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp2_) { +#line 6601 "ImportPage.c" + gboolean _tmp3_ = FALSE; +#line 949 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = self->priv->refreshed; +#line 949 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _tmp3_; +#line 6607 "ImportPage.c" + } else { +#line 949 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = FALSE; +#line 6611 "ImportPage.c" + } +#line 949 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp1_) { +#line 6615 "ImportPage.c" + ViewCollection* _tmp4_ = NULL; + ViewCollection* _tmp5_ = NULL; + gint _tmp6_ = 0; +#line 949 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 949 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = _tmp4_; +#line 949 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = view_collection_get_selected_count (_tmp5_); +#line 949 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = _tmp6_ > 0; +#line 949 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _data_collection_unref0 (_tmp5_); +#line 6629 "ImportPage.c" + } else { +#line 949 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = FALSE; +#line 6633 "ImportPage.c" + } +#line 949 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ImportSelected", _tmp0_); +#line 950 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = self->priv->busy; +#line 950 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp9_) { +#line 6641 "ImportPage.c" + gboolean _tmp10_ = FALSE; +#line 950 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = self->priv->refreshed; +#line 950 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = _tmp10_; +#line 6647 "ImportPage.c" + } else { +#line 950 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = FALSE; +#line 6651 "ImportPage.c" + } +#line 950 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp8_) { +#line 6655 "ImportPage.c" + ViewCollection* _tmp11_ = NULL; + ViewCollection* _tmp12_ = NULL; + gint _tmp13_ = 0; +#line 950 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 950 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = _tmp11_; +#line 950 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_DATA_COLLECTION, DataCollection)); +#line 950 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = _tmp13_ > 0; +#line 950 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _data_collection_unref0 (_tmp12_); +#line 6669 "ImportPage.c" + } else { +#line 950 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = FALSE; +#line 6673 "ImportPage.c" + } +#line 950 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ImportAll", _tmp7_); +#line 952 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = self->priv->busy; +#line 952 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp15_) { +#line 6681 "ImportPage.c" + ViewCollection* _tmp16_ = NULL; + ViewCollection* _tmp17_ = NULL; + gint _tmp18_ = 0; +#line 952 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp16_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 952 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = _tmp16_; +#line 952 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp18_ = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_DATA_COLLECTION, DataCollection)); +#line 952 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = _tmp18_ > 0; +#line 952 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _data_collection_unref0 (_tmp17_); +#line 6695 "ImportPage.c" + } else { +#line 952 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = FALSE; +#line 6699 "ImportPage.c" + } +#line 951 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp19_ = app_window_get_instance (); +#line 951 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp20_ = _tmp19_; +#line 951 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + app_window_set_common_action_sensitive (_tmp20_, "CommonSelectAll", _tmp14_); +#line 951 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp20_); +#line 954 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_update_toolbar_state (self); +#line 6711 "ImportPage.c" +} + + +static void import_page_on_media_added_removed (ImportPage* self) { + ImportPageImportPageSearchViewFilter* _tmp0_ = NULL; +#line 957 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_IMPORT_PAGE (self)); +#line 958 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->search_filter; +#line 958 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_VIEW_FILTER, ViewFilter), "refresh"); +#line 6723 "ImportPage.c" +} + + +static void import_page_on_display_titles (ImportPage* self, GtkAction* action) { + gboolean display = FALSE; + GtkAction* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; + ConfigFacade* _tmp2_ = NULL; + ConfigFacade* _tmp3_ = NULL; +#line 961 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_IMPORT_PAGE (self)); +#line 961 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (GTK_IS_ACTION (action)); +#line 962 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = action; +#line 962 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = gtk_toggle_action_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_toggle_action_get_type (), GtkToggleAction)); +#line 962 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + display = _tmp1_; +#line 964 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + checkerboard_page_set_display_titles (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_PAGE, CheckerboardPage), display); +#line 965 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = config_facade_get_instance (); +#line 965 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _tmp2_; +#line 965 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + configuration_facade_set_display_photo_titles (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), display); +#line 965 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp3_); +#line 6753 "ImportPage.c" +} + + +static void import_page_real_switched_to (Page* base) { + ImportPage * self; + ConfigFacade* _tmp0_ = NULL; + ConfigFacade* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; +#line 968 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_IMPORT_PAGE, ImportPage); +#line 969 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = config_facade_get_instance (); +#line 969 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _tmp0_; +#line 969 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = configuration_facade_get_display_photo_titles (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); +#line 969 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + checkerboard_page_set_display_titles (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_PAGE, CheckerboardPage), _tmp2_); +#line 969 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp1_); +#line 971 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + PAGE_CLASS (import_page_parent_class)->switched_to (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_PAGE, CheckerboardPage), TYPE_PAGE, Page)); +#line 6776 "ImportPage.c" +} + + +static void import_page_real_ready (Page* base) { + ImportPage * self; + ImportPageHideImportedViewFilter* _tmp0_ = NULL; +#line 974 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_IMPORT_PAGE, ImportPage); +#line 975 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_try_refreshing_camera (self, FALSE); +#line 976 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->hide_imported_filter; +#line 976 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_VIEW_FILTER, ViewFilter), "refresh"); +#line 6791 "ImportPage.c" +} + + +static void import_page_try_refreshing_camera (ImportPage* self, gboolean fail_on_locked) { + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + ImportPageRefreshResult res = 0; + ImportPageRefreshResult _tmp3_ = 0; + ImportPageRefreshResult _tmp4_ = 0; + GError * _inner_error_ = NULL; +#line 979 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_IMPORT_PAGE (self)); +#line 981 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = self->priv->refreshed; +#line 981 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp1_) { +#line 981 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = TRUE; +#line 6810 "ImportPage.c" + } else { + gboolean _tmp2_ = FALSE; +#line 981 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = self->priv->busy; +#line 981 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = _tmp2_; +#line 6817 "ImportPage.c" + } +#line 981 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp0_) { +#line 982 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return; +#line 6823 "ImportPage.c" + } +#line 984 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = import_page_refresh_camera (self); +#line 984 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + res = _tmp3_; +#line 985 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = res; +#line 985 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + switch (_tmp4_) { +#line 985 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + case IMPORT_PAGE_REFRESH_RESULT_OK: +#line 985 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + case IMPORT_PAGE_REFRESH_RESULT_BUSY: +#line 6837 "ImportPage.c" + { +#line 990 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 6841 "ImportPage.c" + } +#line 985 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + case IMPORT_PAGE_REFRESH_RESULT_LOCKED: +#line 6845 "ImportPage.c" + { + gboolean _tmp5_ = FALSE; + const gchar* _tmp6_ = NULL; + GFile* uri = NULL; + const gchar* _tmp7_ = NULL; + GFile* _tmp8_ = NULL; + GMount* mount = NULL; + GMount* _tmp13_ = NULL; +#line 993 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = fail_on_locked; +#line 993 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp5_) { +#line 994 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + app_window_error_message (IMPORT_PAGE_UNMOUNT_FAILED_MSG, NULL); +#line 996 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 6862 "ImportPage.c" + } +#line 1000 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = self->priv->uri; +#line 1000 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_debug ("ImportPage.vala:1000: Checking if %s is mounted ...", _tmp6_); +#line 1002 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = self->priv->uri; +#line 1002 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = g_file_new_for_uri (_tmp7_); +#line 1002 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + uri = _tmp8_; +#line 1004 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + mount = NULL; +#line 6876 "ImportPage.c" + { + GMount* _tmp9_ = NULL; + GFile* _tmp10_ = NULL; + GMount* _tmp11_ = NULL; + GMount* _tmp12_ = NULL; +#line 1006 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = uri; +#line 1006 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = g_file_find_enclosing_mount (_tmp10_, NULL, &_inner_error_); +#line 1006 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = _tmp11_; +#line 1006 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 6890 "ImportPage.c" + goto __catch62_g_error; + } +#line 1006 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = _tmp9_; +#line 1006 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = NULL; +#line 1006 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (mount); +#line 1006 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + mount = _tmp12_; +#line 1005 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp9_); +#line 6903 "ImportPage.c" + } + goto __finally62; + __catch62_g_error: + { + GError* err = NULL; +#line 1005 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + err = _inner_error_; +#line 1005 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _inner_error_ = NULL; +#line 1005 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_error_free0 (err); +#line 6915 "ImportPage.c" + } + __finally62: +#line 1005 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1005 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (mount); +#line 1005 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (uri); +#line 1005 "/home/jens/Source/shotwell/src/camera/ImportPage.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 1005 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_clear_error (&_inner_error_); +#line 1005 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return; +#line 6930 "ImportPage.c" + } +#line 1011 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = mount; +#line 1011 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp13_ != NULL) { +#line 6936 "ImportPage.c" + gchar* mounted_message = NULL; + const gchar* _tmp14_ = NULL; + gchar* _tmp15_ = NULL; + GtkMessageDialog* dialog = NULL; + AppWindow* _tmp16_ = NULL; + AppWindow* _tmp17_ = NULL; + const gchar* _tmp18_ = NULL; + GtkMessageDialog* _tmp19_ = NULL; + GtkMessageDialog* _tmp20_ = NULL; + GtkMessageDialog* _tmp21_ = NULL; + GtkMessageDialog* _tmp22_ = NULL; + const gchar* _tmp23_ = NULL; + gint dialog_res = 0; + GtkMessageDialog* _tmp24_ = NULL; + gint _tmp25_ = 0; + GtkMessageDialog* _tmp26_ = NULL; + gint _tmp27_ = 0; +#line 1013 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = _ ("Shotwell needs to unmount the camera from the filesystem in order to a" \ +"ccess it. Continue?"); +#line 1013 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = g_strdup (_tmp14_); +#line 1013 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + mounted_message = _tmp15_; +#line 1015 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp16_ = app_window_get_instance (); +#line 1015 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = _tmp16_; +#line 1015 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp18_ = mounted_message; +#line 1015 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp19_ = (GtkMessageDialog*) gtk_message_dialog_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_window_get_type (), GtkWindow), GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_CANCEL, "%s", _tmp18_); +#line 1015 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_ref_sink (_tmp19_); +#line 1015 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp20_ = _tmp19_; +#line 1015 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp17_); +#line 1015 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + dialog = _tmp20_; +#line 1018 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp21_ = dialog; +#line 1018 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_window_set_title (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, gtk_window_get_type (), GtkWindow), RESOURCES_APP_TITLE); +#line 1019 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp22_ = dialog; +#line 1019 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp23_ = _ ("_Unmount"); +#line 1019 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_dialog_add_button (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_dialog_get_type (), GtkDialog), _tmp23_, (gint) GTK_RESPONSE_YES); +#line 1020 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp24_ = dialog; +#line 1020 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp25_ = gtk_dialog_run (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, gtk_dialog_get_type (), GtkDialog)); +#line 1020 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + dialog_res = _tmp25_; +#line 1021 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp26_ = dialog; +#line 1021 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_widget_get_type (), GtkWidget)); +#line 1023 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp27_ = dialog_res; +#line 1023 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp27_ != ((gint) GTK_RESPONSE_YES)) { +#line 7000 "ImportPage.c" + const gchar* _tmp28_ = NULL; +#line 1024 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp28_ = _ ("Please unmount the camera."); +#line 1024 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + checkerboard_page_set_page_message (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_PAGE, CheckerboardPage), _tmp28_); +#line 7006 "ImportPage.c" + } else { + GMount* _tmp29_ = NULL; +#line 1026 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp29_ = mount; +#line 1026 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_unmount_camera (self, _tmp29_); +#line 7013 "ImportPage.c" + } +#line 1011 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (dialog); +#line 1011 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (mounted_message); +#line 7019 "ImportPage.c" + } else { + gchar* locked_message = NULL; + const gchar* _tmp30_ = NULL; + gchar* _tmp31_ = NULL; + GtkMessageDialog* dialog = NULL; + AppWindow* _tmp32_ = NULL; + AppWindow* _tmp33_ = NULL; + const gchar* _tmp34_ = NULL; + GtkMessageDialog* _tmp35_ = NULL; + GtkMessageDialog* _tmp36_ = NULL; + GtkMessageDialog* _tmp37_ = NULL; + GtkMessageDialog* _tmp38_ = NULL; + GtkMessageDialog* _tmp39_ = NULL; + const gchar* _tmp40_ = NULL; +#line 1029 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp30_ = _ ("The camera is locked by another application. Shotwell can only access" \ +" the camera when it's unlocked. Please close any other application us" \ +"ing the camera and try again."); +#line 1029 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp31_ = g_strdup (_tmp30_); +#line 1029 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + locked_message = _tmp31_; +#line 1032 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp32_ = app_window_get_instance (); +#line 1032 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp33_ = _tmp32_; +#line 1032 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp34_ = locked_message; +#line 1032 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp35_ = (GtkMessageDialog*) gtk_message_dialog_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, gtk_window_get_type (), GtkWindow), GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, "%s", _tmp34_); +#line 1032 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_ref_sink (_tmp35_); +#line 1032 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp36_ = _tmp35_; +#line 1032 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp33_); +#line 1032 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + dialog = _tmp36_; +#line 1035 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp37_ = dialog; +#line 1035 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_window_set_title (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, gtk_window_get_type (), GtkWindow), RESOURCES_APP_TITLE); +#line 1036 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp38_ = dialog; +#line 1036 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_dialog_run (G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, gtk_dialog_get_type (), GtkDialog)); +#line 1037 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp39_ = dialog; +#line 1037 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, gtk_widget_get_type (), GtkWidget)); +#line 1039 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp40_ = _ ("Please close any other application using the camera."); +#line 1039 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + checkerboard_page_set_page_message (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_PAGE, CheckerboardPage), _tmp40_); +#line 1011 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (dialog); +#line 1011 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (locked_message); +#line 7076 "ImportPage.c" + } +#line 1041 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (mount); +#line 1041 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (uri); +#line 1041 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 7084 "ImportPage.c" + } +#line 985 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + case IMPORT_PAGE_REFRESH_RESULT_LIBRARY_ERROR: +#line 7088 "ImportPage.c" + { + const gchar* _tmp41_ = NULL; + gchar* _tmp42_ = NULL; + gchar* _tmp43_ = NULL; + gchar* _tmp44_ = NULL; + gchar* _tmp45_ = NULL; +#line 1044 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp41_ = _ ("Unable to fetch previews from the camera:\n%s"); +#line 1044 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp42_ = import_page_get_refresh_message (self); +#line 1044 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp43_ = _tmp42_; +#line 1044 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp44_ = g_strdup_printf (_tmp41_, _tmp43_); +#line 1044 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp45_ = _tmp44_; +#line 1044 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + app_window_error_message (_tmp45_, NULL); +#line 1044 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp45_); +#line 1044 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp43_); +#line 1046 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 7113 "ImportPage.c" + } + default: + { + ImportPageRefreshResult _tmp46_ = 0; +#line 1049 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp46_ = res; +#line 1049 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_error ("ImportPage.vala:1049: Unknown result type %d", (gint) _tmp46_); +#line 7122 "ImportPage.c" + } + } +} + + +static void _import_page_on_unmounted_g_mount_unmounted (GMount* _sender, gpointer self) { +#line 1066 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_on_unmounted ((ImportPage*) self, _sender); +#line 7131 "ImportPage.c" +} + + +static void _import_page_on_unmount_finished_gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) { +#line 1069 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_on_unmount_finished ((ImportPage*) self, source_object, res); +#line 1069 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_unref (self); +#line 7140 "ImportPage.c" +} + + +gboolean import_page_unmount_camera (ImportPage* self, GMount* mount) { + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; + GtkProgressBar* _tmp1_ = NULL; + GtkProgressBar* _tmp2_ = NULL; + GtkProgressBar* _tmp3_ = NULL; + GtkProgressBar* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + GMount* _tmp6_ = NULL; + GMount* _tmp7_ = NULL; + AppWindow* _tmp8_ = NULL; + AppWindow* _tmp9_ = NULL; + GtkMountOperation* _tmp10_ = NULL; + GtkMountOperation* _tmp11_ = NULL; +#line 1053 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_PAGE (self), FALSE); +#line 1053 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (G_IS_MOUNT (mount), FALSE); +#line 1054 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->busy; +#line 1054 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp0_) { +#line 1055 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 1055 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 7170 "ImportPage.c" + } +#line 1057 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_update_status (self, TRUE, FALSE); +#line 1058 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = self->priv->progress_bar; +#line 1058 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 1059 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = self->priv->progress_bar; +#line 1059 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_progress_bar_set_fraction (_tmp2_, 0.0); +#line 1060 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = self->priv->progress_bar; +#line 1060 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_progress_bar_set_ellipsize (_tmp3_, PANGO_ELLIPSIZE_NONE); +#line 1061 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = self->priv->progress_bar; +#line 1061 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = _ ("Unmounting..."); +#line 1061 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_progress_bar_set_text (_tmp4_, _tmp5_); +#line 1066 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = mount; +#line 1066 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_signal_connect_object (_tmp6_, "unmounted", (GCallback) _import_page_on_unmounted_g_mount_unmounted, self, 0); +#line 1068 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_debug ("ImportPage.vala:1068: Unmounting camera ..."); +#line 1069 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = mount; +#line 1069 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = app_window_get_instance (); +#line 1069 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = _tmp8_; +#line 1069 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = (GtkMountOperation*) gtk_mount_operation_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_window_get_type (), GtkWindow)); +#line 1069 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = _tmp10_; +#line 1069 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_mount_unmount_with_operation (_tmp7_, G_MOUNT_UNMOUNT_NONE, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, g_mount_operation_get_type (), GMountOperation), NULL, _import_page_on_unmount_finished_gasync_ready_callback, g_object_ref (self)); +#line 1069 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp11_); +#line 1069 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp9_); +#line 1072 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = TRUE; +#line 1072 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 7218 "ImportPage.c" +} + + +static void import_page_on_unmount_finished (ImportPage* self, GObject* source, GAsyncResult* aresult) { + GMount* mount = NULL; + GObject* _tmp0_ = NULL; + GMount* _tmp1_ = NULL; + GError * _inner_error_ = NULL; +#line 1075 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_IMPORT_PAGE (self)); +#line 1075 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail ((source == NULL) || G_IS_OBJECT (source)); +#line 1075 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (G_IS_ASYNC_RESULT (aresult)); +#line 1076 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_debug ("ImportPage.vala:1076: Async unmount finished"); +#line 1078 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = source; +#line 1078 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, g_mount_get_type (), GMount)); +#line 1078 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + mount = _tmp1_; +#line 7241 "ImportPage.c" + { + GAsyncResult* _tmp2_ = NULL; +#line 1080 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = aresult; +#line 1080 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_mount_unmount_with_operation_finish (mount, _tmp2_, &_inner_error_); +#line 1080 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 7250 "ImportPage.c" + goto __catch63_g_error; + } + } + goto __finally63; + __catch63_g_error: + { + GError* err = NULL; + guint _tmp3_ = 0U; + gboolean _tmp4_ = FALSE; + GtkProgressBar* _tmp5_ = NULL; + GtkProgressBar* _tmp6_ = NULL; + GtkProgressBar* _tmp7_ = NULL; +#line 1079 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + err = _inner_error_; +#line 1079 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _inner_error_ = NULL; +#line 1082 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + app_window_error_message (IMPORT_PAGE_UNMOUNT_FAILED_MSG, NULL); +#line 1085 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_signal_parse_name ("unmounted", g_mount_get_type (), &_tmp3_, NULL, FALSE); +#line 1085 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_signal_handlers_disconnect_matched (mount, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _import_page_on_unmounted_g_mount_unmounted, self); +#line 1087 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = self->priv->refreshed; +#line 1087 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_update_status (self, FALSE, _tmp4_); +#line 1088 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = self->priv->progress_bar; +#line 1088 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_progress_bar_set_ellipsize (_tmp5_, PANGO_ELLIPSIZE_NONE); +#line 1089 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = self->priv->progress_bar; +#line 1089 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_progress_bar_set_text (_tmp6_, ""); +#line 1090 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = self->priv->progress_bar; +#line 1090 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1079 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_error_free0 (err); +#line 7291 "ImportPage.c" + } + __finally63: +#line 1079 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1079 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (mount); +#line 1079 "/home/jens/Source/shotwell/src/camera/ImportPage.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 1079 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_clear_error (&_inner_error_); +#line 1079 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return; +#line 7304 "ImportPage.c" + } +#line 1075 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (mount); +#line 7308 "ImportPage.c" +} + + +static void import_page_on_unmounted (ImportPage* self, GMount* mount) { + gboolean _tmp0_ = FALSE; + GtkProgressBar* _tmp1_ = NULL; + GtkProgressBar* _tmp2_ = NULL; + GtkProgressBar* _tmp3_ = NULL; +#line 1094 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_IMPORT_PAGE (self)); +#line 1094 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (G_IS_MOUNT (mount)); +#line 1095 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_debug ("ImportPage.vala:1095: on_unmounted"); +#line 1097 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->refreshed; +#line 1097 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_update_status (self, FALSE, _tmp0_); +#line 1098 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = self->priv->progress_bar; +#line 1098 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_progress_bar_set_ellipsize (_tmp1_, PANGO_ELLIPSIZE_NONE); +#line 1099 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = self->priv->progress_bar; +#line 1099 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_progress_bar_set_text (_tmp2_, ""); +#line 1100 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = self->priv->progress_bar; +#line 1100 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1102 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_try_refreshing_camera (self, TRUE); +#line 7341 "ImportPage.c" +} + + +static void import_page_clear_all_import_sources (ImportPage* self) { + Marker* marker = NULL; + SourceCollection* _tmp0_ = NULL; + Marker* _tmp1_ = NULL; + SourceCollection* _tmp2_ = NULL; +#line 1105 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_IMPORT_PAGE (self)); +#line 1106 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->import_sources; +#line 1106 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = data_collection_start_marking (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_COLLECTION, DataCollection)); +#line 1106 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + marker = _tmp1_; +#line 1107 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + marker_mark_all (marker); +#line 1108 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = self->priv->import_sources; +#line 1108 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + source_collection_destroy_marked (_tmp2_, marker, FALSE, NULL, NULL, NULL); +#line 1105 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (marker); +#line 7366 "ImportPage.c" +} + + +/** + * @brief Returns whether the current device has a given directory or not. + * + * @param fsid The file system id of the camera or other device to search. + * @param dir The path to start searching from. + * @param search_target The name of the directory to look for. + */ +static gboolean import_page_check_directory_exists (ImportPage* self, gint fsid, const gchar* dir, const gchar* search_target) { + gboolean result = FALSE; + gchar* fulldir = NULL; + Camera* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gint _tmp2_ = 0; + const gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + int _result_ = 0; + CameraList* folders = NULL; + CameraList* _tmp5_ = NULL; + int _tmp6_ = 0; + int _tmp7_ = 0; + Camera* _tmp8_ = NULL; + const gchar* _tmp9_ = NULL; + CameraList* _tmp10_ = NULL; + GPSpinIdleWrapper* _tmp11_ = NULL; + GPContext* _tmp12_ = NULL; + int _tmp13_ = 0; + int _tmp14_ = 0; + gint list_len = 0; + CameraList* _tmp15_ = NULL; + gint _tmp16_ = 0; +#line 1118 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_PAGE (self), FALSE); +#line 1118 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (dir != NULL, FALSE); +#line 1118 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (search_target != NULL, FALSE); +#line 1119 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->camera; +#line 1119 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = self->priv->camera_name; +#line 1119 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = fsid; +#line 1119 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = dir; +#line 1119 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = import_page_get_fulldir (_tmp0_, _tmp1_, _tmp2_, _tmp3_); +#line 1119 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + fulldir = _tmp4_; +#line 1123 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = gp_list_new (&_tmp5_); +#line 1123 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (folders); +#line 1123 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + folders = _tmp5_; +#line 1123 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _result_ = _tmp6_; +#line 1124 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = _result_; +#line 1124 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp7_ != GP_OK) { +#line 1126 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 1126 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (folders); +#line 1126 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 1126 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 7438 "ImportPage.c" + } +#line 1129 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = self->priv->camera; +#line 1129 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = fulldir; +#line 1129 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = folders; +#line 1129 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = import_page_spin_idle_context; +#line 1129 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GP_TYPE_CONTEXT_WRAPPER, GPContextWrapper)->context; +#line 1129 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = gp_camera_folder_list_folders (_tmp8_, _tmp9_, _tmp10_, _tmp12_); +#line 1129 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _result_ = _tmp13_; +#line 1130 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = _result_; +#line 1130 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp14_ != GP_OK) { +#line 1132 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 1132 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (folders); +#line 1132 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 1132 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 7466 "ImportPage.c" + } +#line 1135 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = folders; +#line 1135 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp16_ = gp_list_count (_tmp15_); +#line 1135 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + list_len = _tmp16_; +#line 7474 "ImportPage.c" + { + gint list_index = 0; +#line 1137 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + list_index = 0; +#line 7479 "ImportPage.c" + { + gboolean _tmp17_ = FALSE; +#line 1137 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = TRUE; +#line 1137 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + while (TRUE) { +#line 7486 "ImportPage.c" + gint _tmp19_ = 0; + gint _tmp20_ = 0; + gchar* tmp = NULL; + CameraList* _tmp21_ = NULL; + gint _tmp22_ = 0; + const gchar* _tmp23_ = NULL; + gchar* _tmp24_ = NULL; + const gchar* _tmp25_ = NULL; + const gchar* _tmp26_ = NULL; +#line 1137 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp17_) { +#line 7498 "ImportPage.c" + gint _tmp18_ = 0; +#line 1137 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp18_ = list_index; +#line 1137 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + list_index = _tmp18_ + 1; +#line 7504 "ImportPage.c" + } +#line 1137 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = FALSE; +#line 1137 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp19_ = list_index; +#line 1137 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp20_ = list_len; +#line 1137 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!(_tmp19_ < _tmp20_)) { +#line 1137 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 7516 "ImportPage.c" + } +#line 1140 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp21_ = folders; +#line 1140 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp22_ = list_index; +#line 1140 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gp_list_get_name (_tmp21_, _tmp22_, &_tmp23_); +#line 1140 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (tmp); +#line 1140 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp24_ = g_strdup (_tmp23_); +#line 1140 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + tmp = _tmp24_; +#line 1141 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp25_ = tmp; +#line 1141 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp26_ = search_target; +#line 1141 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (g_strcmp0 (_tmp25_, _tmp26_) == 0) { +#line 1142 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = TRUE; +#line 1142 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (tmp); +#line 1142 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (folders); +#line 1142 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 1142 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 7546 "ImportPage.c" + } +#line 1137 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (tmp); +#line 7550 "ImportPage.c" + } + } + } +#line 1145 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 1145 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (folders); +#line 1145 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 1145 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 7562 "ImportPage.c" +} + + +static ImportPageRefreshResult import_page_refresh_camera (ImportPage* self) { + ImportPageRefreshResult result = 0; + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + Camera* _tmp2_ = NULL; + GPSpinIdleWrapper* _tmp3_ = NULL; + GPContext* _tmp4_ = NULL; + int _tmp5_ = 0; + int _tmp6_ = 0; + gboolean _tmp12_ = FALSE; + GtkProgressBar* _tmp13_ = NULL; + GtkProgressBar* _tmp14_ = NULL; + const gchar* _tmp15_ = NULL; + GtkProgressBar* _tmp16_ = NULL; + GtkProgressBar* _tmp17_ = NULL; + GtkProgressBar* _tmp18_ = NULL; + GeeArrayList* import_list = NULL; + GeeArrayList* _tmp19_ = NULL; + CameraStorageInformation* sifs = NULL; + gint count = 0; + Camera* _tmp20_ = NULL; + GPSpinIdleWrapper* _tmp21_ = NULL; + GPContext* _tmp22_ = NULL; + gint _tmp23_ = 0; + int _tmp24_ = 0; + int _tmp25_ = 0; + GeeArrayList* _tmp74_ = NULL; + GeeArrayList* _tmp75_ = NULL; + GtkProgressBar* _tmp76_ = NULL; + GtkProgressBar* _tmp77_ = NULL; + GtkProgressBar* _tmp78_ = NULL; + GtkProgressBar* _tmp79_ = NULL; + int res = 0; + Camera* _tmp80_ = NULL; + GPSpinIdleWrapper* _tmp81_ = NULL; + GPContext* _tmp82_ = NULL; + int _tmp83_ = 0; + int _tmp84_ = 0; + int _tmp88_ = 0; + int _tmp89_ = 0; +#line 1148 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_PAGE (self), 0); +#line 1149 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->busy; +#line 1149 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp0_) { +#line 1150 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = IMPORT_PAGE_REFRESH_RESULT_BUSY; +#line 1150 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 7616 "ImportPage.c" + } +#line 1152 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = self->priv->busy; +#line 1152 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_update_status (self, _tmp1_, FALSE); +#line 1154 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->refresh_error); +#line 1154 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->refresh_error = NULL; +#line 1155 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = self->priv->camera; +#line 1155 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = import_page_spin_idle_context; +#line 1155 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GP_TYPE_CONTEXT_WRAPPER, GPContextWrapper)->context; +#line 1155 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = gp_camera_init (_tmp2_, _tmp4_); +#line 1155 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->refresh_result = _tmp5_; +#line 1156 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = self->priv->refresh_result; +#line 1156 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp6_ != GP_OK) { +#line 7640 "ImportPage.c" + int _tmp7_ = 0; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + ImportPageRefreshResult _tmp10_ = 0; + int _tmp11_ = 0; +#line 1157 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = self->priv->refresh_result; +#line 1157 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = gp_result_to_full_string (_tmp7_); +#line 1157 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = _tmp8_; +#line 1157 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_warning ("ImportPage.vala:1157: Unable to initialize camera: %s", _tmp9_); +#line 1157 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp9_); +#line 1159 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = self->priv->refresh_result; +#line 1159 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp11_ == GP_ERROR_IO_LOCK) { +#line 1159 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = IMPORT_PAGE_REFRESH_RESULT_LOCKED; +#line 7662 "ImportPage.c" + } else { +#line 1159 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = IMPORT_PAGE_REFRESH_RESULT_LIBRARY_ERROR; +#line 7666 "ImportPage.c" + } +#line 1159 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp10_; +#line 1159 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 7672 "ImportPage.c" + } +#line 1162 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = self->priv->refreshed; +#line 1162 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_update_status (self, TRUE, _tmp12_); +#line 1164 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_on_view_changed (self); +#line 1166 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = self->priv->progress_bar; +#line 1166 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_progress_bar_set_ellipsize (_tmp13_, PANGO_ELLIPSIZE_NONE); +#line 1167 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = self->priv->progress_bar; +#line 1167 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = _ ("Fetching photo information"); +#line 1167 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_progress_bar_set_text (_tmp14_, _tmp15_); +#line 1168 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp16_ = self->priv->progress_bar; +#line 1168 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_progress_bar_set_fraction (_tmp16_, 0.0); +#line 1169 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = self->priv->progress_bar; +#line 1169 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_progress_bar_set_pulse_step (_tmp17_, 0.01); +#line 1170 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp18_ = self->priv->progress_bar; +#line 1170 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_widget_get_type (), GtkWidget), TRUE); +#line 1172 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp19_ = gee_array_list_new (TYPE_IMPORT_SOURCE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL); +#line 1172 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_list = _tmp19_; +#line 1174 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + sifs = NULL; +#line 1175 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + count = 0; +#line 1176 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp20_ = self->priv->camera; +#line 1176 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp21_ = import_page_spin_idle_context; +#line 1176 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp22_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GP_TYPE_CONTEXT_WRAPPER, GPContextWrapper)->context; +#line 1176 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp24_ = gp_camera_get_storageinfo (_tmp20_, &sifs, &_tmp23_, _tmp22_); +#line 1176 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + count = _tmp23_; +#line 1176 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->refresh_result = _tmp24_; +#line 1177 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp25_ = self->priv->refresh_result; +#line 1177 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp25_ == GP_OK) { +#line 7726 "ImportPage.c" + { + gint fsid = 0; +#line 1178 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + fsid = 0; +#line 7731 "ImportPage.c" + { + gboolean _tmp26_ = FALSE; +#line 1178 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp26_ = TRUE; +#line 1178 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + while (TRUE) { +#line 7738 "ImportPage.c" + gint _tmp28_ = 0; + gint _tmp29_ = 0; + gboolean got_well_known_dir = FALSE; + gint _tmp30_ = 0; + gboolean _tmp31_ = FALSE; + gint _tmp34_ = 0; + gboolean _tmp35_ = FALSE; + gint _tmp38_ = 0; + gboolean _tmp39_ = FALSE; + gint _tmp42_ = 0; + gboolean _tmp43_ = FALSE; + gint _tmp46_ = 0; + gboolean _tmp47_ = FALSE; + gint _tmp50_ = 0; + gboolean _tmp51_ = FALSE; + gint _tmp54_ = 0; + gboolean _tmp55_ = FALSE; + gint _tmp58_ = 0; + gboolean _tmp59_ = FALSE; + gint _tmp62_ = 0; + gboolean _tmp63_ = FALSE; + gint _tmp66_ = 0; + gboolean _tmp67_ = FALSE; + gboolean _tmp70_ = FALSE; +#line 1178 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp26_) { +#line 7765 "ImportPage.c" + gint _tmp27_ = 0; +#line 1178 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp27_ = fsid; +#line 1178 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + fsid = _tmp27_ + 1; +#line 7771 "ImportPage.c" + } +#line 1178 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp26_ = FALSE; +#line 1178 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp28_ = fsid; +#line 1178 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp29_ = count; +#line 1178 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!(_tmp28_ < _tmp29_)) { +#line 1178 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 7783 "ImportPage.c" + } +#line 1182 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + got_well_known_dir = FALSE; +#line 1185 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp30_ = fsid; +#line 1185 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp31_ = import_page_check_directory_exists (self, _tmp30_, "/", "DCIM"); +#line 1185 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp31_) { +#line 7793 "ImportPage.c" + gint _tmp32_ = 0; + GeeArrayList* _tmp33_ = NULL; +#line 1186 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp32_ = fsid; +#line 1186 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp33_ = import_list; +#line 1186 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_enumerate_files (self, _tmp32_, "/DCIM", _tmp33_); +#line 1187 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + got_well_known_dir = TRUE; +#line 7804 "ImportPage.c" + } +#line 1189 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp34_ = fsid; +#line 1189 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp35_ = import_page_check_directory_exists (self, _tmp34_, "/", "dcim"); +#line 1189 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp35_) { +#line 7812 "ImportPage.c" + gint _tmp36_ = 0; + GeeArrayList* _tmp37_ = NULL; +#line 1190 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp36_ = fsid; +#line 1190 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp37_ = import_list; +#line 1190 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_enumerate_files (self, _tmp36_, "/dcim", _tmp37_); +#line 1191 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + got_well_known_dir = TRUE; +#line 7823 "ImportPage.c" + } +#line 1196 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp38_ = fsid; +#line 1196 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp39_ = import_page_check_directory_exists (self, _tmp38_, "/PRIVATE/", "AVCHD"); +#line 1196 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp39_) { +#line 7831 "ImportPage.c" + gint _tmp40_ = 0; + GeeArrayList* _tmp41_ = NULL; +#line 1197 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp40_ = fsid; +#line 1197 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp41_ = import_list; +#line 1197 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_enumerate_files (self, _tmp40_, "/PRIVATE/AVCHD", _tmp41_); +#line 1198 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + got_well_known_dir = TRUE; +#line 7842 "ImportPage.c" + } +#line 1200 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp42_ = fsid; +#line 1200 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp43_ = import_page_check_directory_exists (self, _tmp42_, "/private/", "avchd"); +#line 1200 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp43_) { +#line 7850 "ImportPage.c" + gint _tmp44_ = 0; + GeeArrayList* _tmp45_ = NULL; +#line 1201 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp44_ = fsid; +#line 1201 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp45_ = import_list; +#line 1201 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_enumerate_files (self, _tmp44_, "/private/avchd", _tmp45_); +#line 1202 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + got_well_known_dir = TRUE; +#line 7861 "ImportPage.c" + } +#line 1204 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp46_ = fsid; +#line 1204 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp47_ = import_page_check_directory_exists (self, _tmp46_, "/", "AVCHD"); +#line 1204 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp47_) { +#line 7869 "ImportPage.c" + gint _tmp48_ = 0; + GeeArrayList* _tmp49_ = NULL; +#line 1205 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp48_ = fsid; +#line 1205 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp49_ = import_list; +#line 1205 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_enumerate_files (self, _tmp48_, "/AVCHD", _tmp49_); +#line 1206 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + got_well_known_dir = TRUE; +#line 7880 "ImportPage.c" + } +#line 1208 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp50_ = fsid; +#line 1208 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp51_ = import_page_check_directory_exists (self, _tmp50_, "/", "avchd"); +#line 1208 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp51_) { +#line 7888 "ImportPage.c" + gint _tmp52_ = 0; + GeeArrayList* _tmp53_ = NULL; +#line 1209 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp52_ = fsid; +#line 1209 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp53_ = import_list; +#line 1209 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_enumerate_files (self, _tmp52_, "/avchd", _tmp53_); +#line 1210 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + got_well_known_dir = TRUE; +#line 7899 "ImportPage.c" + } +#line 1215 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp54_ = fsid; +#line 1215 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp55_ = import_page_check_directory_exists (self, _tmp54_, "/PRIVATE/", "SONY"); +#line 1215 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp55_) { +#line 7907 "ImportPage.c" + gint _tmp56_ = 0; + GeeArrayList* _tmp57_ = NULL; +#line 1216 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp56_ = fsid; +#line 1216 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp57_ = import_list; +#line 1216 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_enumerate_files (self, _tmp56_, "/PRIVATE/SONY", _tmp57_); +#line 1217 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + got_well_known_dir = TRUE; +#line 7918 "ImportPage.c" + } +#line 1219 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp58_ = fsid; +#line 1219 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp59_ = import_page_check_directory_exists (self, _tmp58_, "/private/", "sony"); +#line 1219 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp59_) { +#line 7926 "ImportPage.c" + gint _tmp60_ = 0; + GeeArrayList* _tmp61_ = NULL; +#line 1220 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp60_ = fsid; +#line 1220 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp61_ = import_list; +#line 1220 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_enumerate_files (self, _tmp60_, "/private/sony", _tmp61_); +#line 1221 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + got_well_known_dir = TRUE; +#line 7937 "ImportPage.c" + } +#line 1225 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp62_ = fsid; +#line 1225 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp63_ = import_page_check_directory_exists (self, _tmp62_, "/", "MP_ROOT"); +#line 1225 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp63_) { +#line 7945 "ImportPage.c" + gint _tmp64_ = 0; + GeeArrayList* _tmp65_ = NULL; +#line 1226 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp64_ = fsid; +#line 1226 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp65_ = import_list; +#line 1226 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_enumerate_files (self, _tmp64_, "/MP_ROOT", _tmp65_); +#line 1227 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + got_well_known_dir = TRUE; +#line 7956 "ImportPage.c" + } +#line 1229 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp66_ = fsid; +#line 1229 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp67_ = import_page_check_directory_exists (self, _tmp66_, "/", "mp_root"); +#line 1229 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp67_) { +#line 7964 "ImportPage.c" + gint _tmp68_ = 0; + GeeArrayList* _tmp69_ = NULL; +#line 1230 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp68_ = fsid; +#line 1230 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp69_ = import_list; +#line 1230 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_enumerate_files (self, _tmp68_, "/mp_root", _tmp69_); +#line 1231 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + got_well_known_dir = TRUE; +#line 7975 "ImportPage.c" + } +#line 1236 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp70_ = got_well_known_dir; +#line 1236 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp70_) { +#line 7981 "ImportPage.c" + gint _tmp71_ = 0; + GeeArrayList* _tmp72_ = NULL; + gboolean _tmp73_ = FALSE; +#line 1237 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp71_ = fsid; +#line 1237 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp72_ = import_list; +#line 1237 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp73_ = import_page_enumerate_files (self, _tmp71_, "/", _tmp72_); +#line 1237 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp73_) { +#line 1238 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 7995 "ImportPage.c" + } + } + } + } + } + } +#line 1243 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_clear_all_import_sources (self); +#line 1246 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp74_ = import_list; +#line 1246 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_auto_match_raw_jpeg (self, _tmp74_); +#line 1253 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp75_ = import_list; +#line 1253 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_load_previews_and_metadata (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp75_, GEE_TYPE_LIST, GeeList)); +#line 1260 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp76_ = self->priv->progress_bar; +#line 1260 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp76_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1261 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp77_ = self->priv->progress_bar; +#line 1261 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_progress_bar_set_ellipsize (_tmp77_, PANGO_ELLIPSIZE_NONE); +#line 1262 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp78_ = self->priv->progress_bar; +#line 1262 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_progress_bar_set_text (_tmp78_, ""); +#line 1263 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp79_ = self->priv->progress_bar; +#line 1263 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_progress_bar_set_fraction (_tmp79_, 0.0); +#line 1265 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp80_ = self->priv->camera; +#line 1265 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp81_ = import_page_spin_idle_context; +#line 1265 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp82_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp81_, GP_TYPE_CONTEXT_WRAPPER, GPContextWrapper)->context; +#line 1265 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp83_ = gp_camera_exit (_tmp80_, _tmp82_); +#line 1265 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + res = _tmp83_; +#line 1266 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp84_ = res; +#line 1266 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp84_ != GP_OK) { +#line 8042 "ImportPage.c" + int _tmp85_ = 0; + gchar* _tmp86_ = NULL; + gchar* _tmp87_ = NULL; +#line 1268 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp85_ = res; +#line 1268 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp86_ = gp_result_to_full_string (_tmp85_); +#line 1268 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp87_ = _tmp86_; +#line 1268 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_warning ("ImportPage.vala:1268: Unable to unlock camera: %s", _tmp87_); +#line 1268 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp87_); +#line 8056 "ImportPage.c" + } +#line 1271 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp88_ = self->priv->refresh_result; +#line 1271 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp88_ == GP_OK) { +#line 1272 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_update_status (self, FALSE, TRUE); +#line 8064 "ImportPage.c" + } else { +#line 1274 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_update_status (self, FALSE, FALSE); +#line 1277 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_clear_all_import_sources (self); +#line 8070 "ImportPage.c" + } +#line 1280 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_on_view_changed (self); +#line 1282 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp89_ = self->priv->refresh_result; +#line 1282 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + switch (_tmp89_) { +#line 1282 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + case GP_OK: +#line 8080 "ImportPage.c" + { +#line 1284 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = IMPORT_PAGE_REFRESH_RESULT_OK; +#line 1284 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (import_list); +#line 1284 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 8088 "ImportPage.c" + } +#line 1282 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + case GP_ERROR_IO_LOCK: +#line 8092 "ImportPage.c" + { +#line 1287 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = IMPORT_PAGE_REFRESH_RESULT_LOCKED; +#line 1287 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (import_list); +#line 1287 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 8100 "ImportPage.c" + } + default: + { +#line 1290 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = IMPORT_PAGE_REFRESH_RESULT_LIBRARY_ERROR; +#line 1290 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (import_list); +#line 1290 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 8110 "ImportPage.c" + } + } +#line 1148 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (import_list); +#line 8115 "ImportPage.c" +} + + +static gchar string_get (const gchar* self, glong index) { + gchar result = '\0'; + glong _tmp0_ = 0L; + gchar _tmp1_ = '\0'; +#line 1086 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, '\0'); +#line 1087 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = index; +#line 1087 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = ((gchar*) self)[_tmp0_]; +#line 1087 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp1_; +#line 1087 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 8133 "ImportPage.c" +} + + +static gchar* string_slice (const gchar* self, glong start, glong end) { + gchar* result = NULL; + glong string_length = 0L; + gint _tmp0_ = 0; + gint _tmp1_ = 0; + glong _tmp2_ = 0L; + glong _tmp5_ = 0L; + gboolean _tmp8_ = FALSE; + glong _tmp9_ = 0L; + gboolean _tmp12_ = FALSE; + glong _tmp13_ = 0L; + glong _tmp16_ = 0L; + glong _tmp17_ = 0L; + glong _tmp18_ = 0L; + glong _tmp19_ = 0L; + glong _tmp20_ = 0L; + gchar* _tmp21_ = NULL; +#line 1328 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 1329 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = strlen (self); +#line 1329 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = _tmp0_; +#line 1329 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + string_length = (glong) _tmp1_; +#line 1330 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = start; +#line 1330 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp2_ < ((glong) 0)) { +#line 8166 "ImportPage.c" + glong _tmp3_ = 0L; + glong _tmp4_ = 0L; +#line 1331 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3_ = string_length; +#line 1331 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = start; +#line 1331 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + start = _tmp3_ + _tmp4_; +#line 8175 "ImportPage.c" + } +#line 1333 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = end; +#line 1333 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp5_ < ((glong) 0)) { +#line 8181 "ImportPage.c" + glong _tmp6_ = 0L; + glong _tmp7_ = 0L; +#line 1334 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp6_ = string_length; +#line 1334 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp7_ = end; +#line 1334 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + end = _tmp6_ + _tmp7_; +#line 8190 "ImportPage.c" + } +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp9_ = start; +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp9_ >= ((glong) 0)) { +#line 8196 "ImportPage.c" + glong _tmp10_ = 0L; + glong _tmp11_ = 0L; +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp10_ = start; +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp11_ = string_length; +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp8_ = _tmp10_ <= _tmp11_; +#line 8205 "ImportPage.c" + } else { +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp8_ = FALSE; +#line 8209 "ImportPage.c" + } +#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (_tmp8_, NULL); +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp13_ = end; +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp13_ >= ((glong) 0)) { +#line 8217 "ImportPage.c" + glong _tmp14_ = 0L; + glong _tmp15_ = 0L; +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp14_ = end; +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp15_ = string_length; +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp12_ = _tmp14_ <= _tmp15_; +#line 8226 "ImportPage.c" + } else { +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp12_ = FALSE; +#line 8230 "ImportPage.c" + } +#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (_tmp12_, NULL); +#line 1338 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp16_ = start; +#line 1338 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp17_ = end; +#line 1338 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (_tmp16_ <= _tmp17_, NULL); +#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp18_ = start; +#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp19_ = end; +#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp20_ = start; +#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp21_ = g_strndup (((gchar*) self) + _tmp18_, (gsize) (_tmp19_ - _tmp20_)); +#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp21_; +#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 8252 "ImportPage.c" +} + + +static gchar* import_page_chomp_ch (const gchar* str, gchar ch) { + gchar* result = NULL; + glong offset = 0L; + const gchar* _tmp0_ = NULL; + gint _tmp1_ = 0; + gint _tmp2_ = 0; + gchar* _tmp12_ = NULL; +#line 1294 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (str != NULL, NULL); +#line 1295 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = str; +#line 1295 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = strlen (_tmp0_); +#line 1295 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = _tmp1_; +#line 1295 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + offset = (glong) _tmp2_; +#line 1296 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + while (TRUE) { +#line 8275 "ImportPage.c" + glong _tmp3_ = 0L; + glong _tmp4_ = 0L; + const gchar* _tmp5_ = NULL; + glong _tmp6_ = 0L; + gchar _tmp7_ = '\0'; + gchar _tmp8_ = '\0'; +#line 1296 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = offset; +#line 1296 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + offset = _tmp3_ - 1; +#line 1296 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = offset; +#line 1296 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!(_tmp4_ >= ((glong) 0))) { +#line 1296 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 8292 "ImportPage.c" + } +#line 1297 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = str; +#line 1297 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = offset; +#line 1297 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = string_get (_tmp5_, _tmp6_); +#line 1297 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = ch; +#line 1297 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp7_ != _tmp8_) { +#line 8304 "ImportPage.c" + const gchar* _tmp9_ = NULL; + glong _tmp10_ = 0L; + gchar* _tmp11_ = NULL; +#line 1298 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = str; +#line 1298 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = offset; +#line 1298 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = string_slice (_tmp9_, (glong) 0, _tmp10_); +#line 1298 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp11_; +#line 1298 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 8318 "ImportPage.c" + } + } +#line 1301 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = g_strdup (""); +#line 1301 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp12_; +#line 1301 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 8327 "ImportPage.c" +} + + +gchar* import_page_append_path (const gchar* basepath, const gchar* addition) { + gchar* result = NULL; + gboolean _tmp0_ = FALSE; + const gchar* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; +#line 1304 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (basepath != NULL, NULL); +#line 1304 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (addition != NULL, NULL); +#line 1305 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = basepath; +#line 1305 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = g_str_has_suffix (_tmp1_, "/"); +#line 1305 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp2_) { +#line 8346 "ImportPage.c" + const gchar* _tmp3_ = NULL; + gboolean _tmp4_ = FALSE; +#line 1305 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = addition; +#line 1305 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = g_str_has_prefix (_tmp3_, "/"); +#line 1305 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = !_tmp4_; +#line 8355 "ImportPage.c" + } else { +#line 1305 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = FALSE; +#line 8359 "ImportPage.c" + } +#line 1305 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp0_) { +#line 8363 "ImportPage.c" + const gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; +#line 1306 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = basepath; +#line 1306 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = g_strconcat (_tmp5_, "/", NULL); +#line 1306 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = _tmp6_; +#line 1306 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = addition; +#line 1306 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = g_strconcat (_tmp7_, _tmp8_, NULL); +#line 1306 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = _tmp9_; +#line 1306 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp7_); +#line 1306 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp10_; +#line 1306 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 8388 "ImportPage.c" + } else { + gboolean _tmp11_ = FALSE; + const gchar* _tmp12_ = NULL; + gboolean _tmp13_ = FALSE; +#line 1307 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = basepath; +#line 1307 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = g_str_has_suffix (_tmp12_, "/"); +#line 1307 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp13_) { +#line 8399 "ImportPage.c" + const gchar* _tmp14_ = NULL; + gboolean _tmp15_ = FALSE; +#line 1307 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = addition; +#line 1307 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = g_str_has_prefix (_tmp14_, "/"); +#line 1307 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = _tmp15_; +#line 8408 "ImportPage.c" + } else { +#line 1307 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = FALSE; +#line 8412 "ImportPage.c" + } +#line 1307 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp11_) { +#line 8416 "ImportPage.c" + const gchar* _tmp16_ = NULL; + gchar* _tmp17_ = NULL; + gchar* _tmp18_ = NULL; + const gchar* _tmp19_ = NULL; + gchar* _tmp20_ = NULL; + gchar* _tmp21_ = NULL; +#line 1308 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp16_ = basepath; +#line 1308 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = import_page_chomp_ch (_tmp16_, '/'); +#line 1308 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp18_ = _tmp17_; +#line 1308 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp19_ = addition; +#line 1308 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp20_ = g_strconcat (_tmp18_, _tmp19_, NULL); +#line 1308 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp21_ = _tmp20_; +#line 1308 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp18_); +#line 1308 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp21_; +#line 1308 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 8441 "ImportPage.c" + } else { + const gchar* _tmp22_ = NULL; + const gchar* _tmp23_ = NULL; + gchar* _tmp24_ = NULL; +#line 1310 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp22_ = basepath; +#line 1310 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp23_ = addition; +#line 1310 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp24_ = g_strconcat (_tmp22_, _tmp23_, NULL); +#line 1310 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp24_; +#line 1310 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 8456 "ImportPage.c" + } + } +} + + +gchar* import_page_get_fs_basedir (Camera* camera, gint fsid) { + gchar* result = NULL; + CameraStorageInformation* sifs = NULL; + gint count = 0; + int res = 0; + Camera* _tmp0_ = NULL; + GPContextWrapper* _tmp1_ = NULL; + GPContext* _tmp2_ = NULL; + gint _tmp3_ = 0; + int _tmp4_ = 0; + int _tmp5_ = 0; + gint _tmp6_ = 0; + gint _tmp7_ = 0; + CameraStorageInformation* ifs = NULL; + CameraStorageInformation* _tmp8_ = NULL; + gint _tmp9_ = 0; + const gchar* _tmp10_ = NULL; + CameraStorageInformation* _tmp11_ = NULL; + CameraStorageInfoFields _tmp12_ = 0; + gchar* _tmp15_ = NULL; +#line 1315 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (camera != NULL, NULL); +#line 1316 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + sifs = NULL; +#line 1317 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + count = 0; +#line 1318 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = camera; +#line 1318 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = import_page_null_context; +#line 1318 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = _tmp1_->context; +#line 1318 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = gp_camera_get_storageinfo (_tmp0_, &sifs, &_tmp3_, _tmp2_); +#line 1318 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + count = _tmp3_; +#line 1318 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + res = _tmp4_; +#line 1319 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = res; +#line 1319 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp5_ != GP_OK) { +#line 1320 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = NULL; +#line 1320 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 8508 "ImportPage.c" + } +#line 1322 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = fsid; +#line 1322 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = count; +#line 1322 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp6_ >= _tmp7_) { +#line 1323 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = NULL; +#line 1323 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 8520 "ImportPage.c" + } +#line 1325 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = sifs; +#line 1325 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = fsid; +#line 1325 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ifs = _tmp8_ + _tmp9_; +#line 1327 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = ifs; +#line 1327 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = (*_tmp11_).fields; +#line 1327 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if ((_tmp12_ & GP_STORAGEINFO_BASE) != 0) { +#line 8534 "ImportPage.c" + CameraStorageInformation* _tmp13_ = NULL; + const gchar* _tmp14_ = NULL; +#line 1327 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = ifs; +#line 1327 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = (*_tmp13_).basedir; +#line 1327 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = _tmp14_; +#line 8543 "ImportPage.c" + } else { +#line 1327 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = "/"; +#line 8547 "ImportPage.c" + } +#line 1327 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = g_strdup (_tmp10_); +#line 1327 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp15_; +#line 1327 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 8555 "ImportPage.c" +} + + +gchar* import_page_get_fulldir (Camera* camera, const gchar* camera_name, gint fsid, const gchar* folder) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gint _tmp1_ = 0; + gint _tmp2_ = 0; + gchar* basedir = NULL; + Camera* _tmp3_ = NULL; + gint _tmp4_ = 0; + gchar* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + const gchar* _tmp11_ = NULL; + const gchar* _tmp12_ = NULL; + gchar* _tmp13_ = NULL; +#line 1330 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (camera != NULL, NULL); +#line 1330 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (camera_name != NULL, NULL); +#line 1330 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (folder != NULL, NULL); +#line 1331 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = folder; +#line 1331 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = strlen (_tmp0_); +#line 1331 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = _tmp1_; +#line 1331 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp2_ > GP_MAX_BASEDIR_LENGTH) { +#line 1332 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = NULL; +#line 1332 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 8590 "ImportPage.c" + } +#line 1334 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = camera; +#line 1334 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = fsid; +#line 1334 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = import_page_get_fs_basedir (_tmp3_, _tmp4_); +#line 1334 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + basedir = _tmp5_; +#line 1335 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = basedir; +#line 1335 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp6_ == NULL) { +#line 8604 "ImportPage.c" + const gchar* _tmp7_ = NULL; + gint _tmp8_ = 0; + const gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; +#line 1336 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = camera_name; +#line 1336 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = fsid; +#line 1336 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_debug ("ImportPage.vala:1336: Unable to find base directory for %s fsid %d", _tmp7_, _tmp8_); +#line 1338 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = folder; +#line 1338 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = g_strdup (_tmp9_); +#line 1338 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp10_; +#line 1338 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (basedir); +#line 1338 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 8625 "ImportPage.c" + } +#line 1341 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = basedir; +#line 1341 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = folder; +#line 1341 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = import_page_append_path (_tmp11_, _tmp12_); +#line 1341 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp13_; +#line 1341 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (basedir); +#line 1341 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 8639 "ImportPage.c" +} + + +static gboolean import_page_enumerate_files (ImportPage* self, gint fsid, const gchar* dir, GeeArrayList* import_list) { + gboolean result = FALSE; + gchar* fulldir = NULL; + Camera* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gint _tmp2_ = 0; + const gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + CameraList* files = NULL; + CameraList* _tmp7_ = NULL; + int _tmp8_ = 0; + int _tmp9_ = 0; + Camera* _tmp13_ = NULL; + const gchar* _tmp14_ = NULL; + CameraList* _tmp15_ = NULL; + GPSpinIdleWrapper* _tmp16_ = NULL; + GPContext* _tmp17_ = NULL; + int _tmp18_ = 0; + int _tmp19_ = 0; + CameraList* folders = NULL; + CameraList* _tmp109_ = NULL; + int _tmp110_ = 0; + int _tmp111_ = 0; + Camera* _tmp115_ = NULL; + const gchar* _tmp116_ = NULL; + CameraList* _tmp117_ = NULL; + GPSpinIdleWrapper* _tmp118_ = NULL; + GPContext* _tmp119_ = NULL; + int _tmp120_ = 0; + int _tmp121_ = 0; + GError * _inner_error_ = NULL; +#line 1344 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_PAGE (self), FALSE); +#line 1344 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (dir != NULL, FALSE); +#line 1344 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (GEE_IS_ARRAY_LIST (import_list), FALSE); +#line 1345 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->camera; +#line 1345 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = self->priv->camera_name; +#line 1345 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = fsid; +#line 1345 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = dir; +#line 1345 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = import_page_get_fulldir (_tmp0_, _tmp1_, _tmp2_, _tmp3_); +#line 1345 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + fulldir = _tmp4_; +#line 1346 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = fulldir; +#line 1346 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp5_ == NULL) { +#line 8697 "ImportPage.c" + const gchar* _tmp6_ = NULL; +#line 1347 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = dir; +#line 1347 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_warning ("ImportPage.vala:1347: Skipping enumerating %s: invalid folder name", _tmp6_); +#line 1349 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = TRUE; +#line 1349 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 1349 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 8709 "ImportPage.c" + } +#line 1353 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = gp_list_new (&_tmp7_); +#line 1353 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (files); +#line 1353 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + files = _tmp7_; +#line 1353 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->refresh_result = _tmp8_; +#line 1354 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = self->priv->refresh_result; +#line 1354 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp9_ != GP_OK) { +#line 8723 "ImportPage.c" + int _tmp10_ = 0; + gchar* _tmp11_ = NULL; + gchar* _tmp12_ = NULL; +#line 1355 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = self->priv->refresh_result; +#line 1355 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = gp_result_to_full_string (_tmp10_); +#line 1355 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = _tmp11_; +#line 1355 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_warning ("ImportPage.vala:1355: Unable to create file list: %s", _tmp12_); +#line 1355 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp12_); +#line 1357 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 1357 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (files); +#line 1357 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 1357 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 8745 "ImportPage.c" + } +#line 1360 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = self->priv->camera; +#line 1360 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = fulldir; +#line 1360 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = files; +#line 1360 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp16_ = import_page_spin_idle_context; +#line 1360 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GP_TYPE_CONTEXT_WRAPPER, GPContextWrapper)->context; +#line 1360 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp18_ = gp_camera_folder_list_files (_tmp13_, _tmp14_, _tmp15_, _tmp17_); +#line 1360 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->refresh_result = _tmp18_; +#line 1361 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp19_ = self->priv->refresh_result; +#line 1361 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp19_ != GP_OK) { +#line 8765 "ImportPage.c" + const gchar* _tmp20_ = NULL; + int _tmp21_ = 0; + gchar* _tmp22_ = NULL; + gchar* _tmp23_ = NULL; +#line 1362 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp20_ = fulldir; +#line 1362 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp21_ = self->priv->refresh_result; +#line 1362 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp22_ = gp_result_to_full_string (_tmp21_); +#line 1362 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp23_ = _tmp22_; +#line 1362 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_warning ("ImportPage.vala:1362: Unable to list files in %s: %s", _tmp20_, _tmp23_); +#line 1362 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp23_); +#line 1365 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->refresh_result = GP_OK; +#line 1367 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = TRUE; +#line 1367 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (files); +#line 1367 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 1367 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 8792 "ImportPage.c" + } + { + gint ctr = 0; +#line 1370 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ctr = 0; +#line 8798 "ImportPage.c" + { + gboolean _tmp24_ = FALSE; +#line 1370 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp24_ = TRUE; +#line 1370 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + while (TRUE) { +#line 8805 "ImportPage.c" + gint _tmp26_ = 0; + CameraList* _tmp27_ = NULL; + gint _tmp28_ = 0; + gchar* filename = NULL; + CameraList* _tmp29_ = NULL; + gint _tmp30_ = 0; + const gchar* _tmp31_ = NULL; + int _tmp32_ = 0; + gchar* _tmp33_ = NULL; + int _tmp34_ = 0; +#line 1370 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp24_) { +#line 8818 "ImportPage.c" + gint _tmp25_ = 0; +#line 1370 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp25_ = ctr; +#line 1370 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ctr = _tmp25_ + 1; +#line 8824 "ImportPage.c" + } +#line 1370 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp24_ = FALSE; +#line 1370 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp26_ = ctr; +#line 1370 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp27_ = files; +#line 1370 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp28_ = gp_list_count (_tmp27_); +#line 1370 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!(_tmp26_ < _tmp28_)) { +#line 1370 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 8838 "ImportPage.c" + } +#line 1372 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp29_ = files; +#line 1372 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp30_ = ctr; +#line 1372 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp32_ = gp_list_get_name (_tmp29_, _tmp30_, &_tmp31_); +#line 1372 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (filename); +#line 1372 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp33_ = g_strdup (_tmp31_); +#line 1372 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + filename = _tmp33_; +#line 1372 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->refresh_result = _tmp32_; +#line 1373 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp34_ = self->priv->refresh_result; +#line 1373 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp34_ != GP_OK) { +#line 8858 "ImportPage.c" + gint _tmp35_ = 0; + const gchar* _tmp36_ = NULL; + int _tmp37_ = 0; + gchar* _tmp38_ = NULL; + gchar* _tmp39_ = NULL; +#line 1374 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp35_ = ctr; +#line 1374 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp36_ = fulldir; +#line 1374 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp37_ = self->priv->refresh_result; +#line 1374 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp38_ = gp_result_to_full_string (_tmp37_); +#line 1374 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp39_ = _tmp38_; +#line 1374 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_warning ("ImportPage.vala:1374: Unable to get the name of file %d in %s: %s", _tmp35_, _tmp36_, _tmp39_); +#line 1374 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp39_); +#line 1377 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 1377 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (filename); +#line 1377 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (files); +#line 1377 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 1377 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 8888 "ImportPage.c" + } + { + CameraFileInfo info = {0}; + gboolean _tmp40_ = FALSE; + GPSpinIdleWrapper* _tmp41_ = NULL; + GPContext* _tmp42_ = NULL; + Camera* _tmp43_ = NULL; + const gchar* _tmp44_ = NULL; + const gchar* _tmp45_ = NULL; + CameraFileInfo _tmp46_ = {0}; + gboolean _tmp47_ = FALSE; + CameraFileInfo _tmp50_ = {0}; + CameraFileInfoFile _tmp51_ = {0}; + CameraFileInfoFields _tmp52_ = 0; + const gchar* _tmp58_ = NULL; + gboolean _tmp59_ = FALSE; + GtkProgressBar* _tmp102_ = NULL; +#line 1382 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp41_ = import_page_spin_idle_context; +#line 1382 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp42_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, GP_TYPE_CONTEXT_WRAPPER, GPContextWrapper)->context; +#line 1382 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp43_ = self->priv->camera; +#line 1382 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp44_ = fulldir; +#line 1382 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp45_ = filename; +#line 1382 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp47_ = gp_get_info (_tmp42_, _tmp43_, _tmp44_, _tmp45_, &_tmp46_, &_inner_error_); +#line 1382 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + (info); +#line 1382 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + info = _tmp46_; +#line 1382 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp40_ = _tmp47_; +#line 1382 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1382 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + (info); +#line 8928 "ImportPage.c" + goto __catch64_g_error; + } +#line 1382 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp40_) { +#line 8933 "ImportPage.c" + const gchar* _tmp48_ = NULL; + const gchar* _tmp49_ = NULL; +#line 1383 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp48_ = fulldir; +#line 1383 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp49_ = filename; +#line 1383 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_warning ("ImportPage.vala:1383: Skipping import of %s/%s: name too long", _tmp48_, _tmp49_); +#line 1385 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + (info); +#line 1385 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (filename); +#line 1385 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + continue; +#line 8948 "ImportPage.c" + } +#line 1388 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp50_ = info; +#line 1388 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp51_ = _tmp50_.file; +#line 1388 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp52_ = _tmp51_.fields; +#line 1388 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if ((_tmp52_ & GP_FILE_INFO_TYPE) == 0) { +#line 8958 "ImportPage.c" + const gchar* _tmp53_ = NULL; + const gchar* _tmp54_ = NULL; + CameraFileInfo _tmp55_ = {0}; + CameraFileInfoFile _tmp56_ = {0}; + CameraFileInfoFields _tmp57_ = 0; +#line 1389 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp53_ = fulldir; +#line 1389 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp54_ = filename; +#line 1389 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp55_ = info; +#line 1389 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp56_ = _tmp55_.file; +#line 1389 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp57_ = _tmp56_.fields; +#line 1389 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_message ("ImportPage.vala:1389: Skipping %s/%s: No file (file=%02Xh)", _tmp53_, _tmp54_, (guint) _tmp57_); +#line 1392 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + (info); +#line 1392 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (filename); +#line 1392 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + continue; +#line 8982 "ImportPage.c" + } +#line 1395 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp58_ = filename; +#line 1395 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp59_ = video_reader_is_supported_video_filename (_tmp58_); +#line 1395 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp59_) { +#line 8990 "ImportPage.c" + VideoImportSource* video_source = NULL; + const gchar* _tmp60_ = NULL; + Camera* _tmp61_ = NULL; + gint _tmp62_ = 0; + const gchar* _tmp63_ = NULL; + const gchar* _tmp64_ = NULL; + CameraFileInfo _tmp65_ = {0}; + CameraFileInfoFile _tmp66_ = {0}; + gulong _tmp67_ = 0UL; + CameraFileInfo _tmp68_ = {0}; + CameraFileInfoFile _tmp69_ = {0}; + time_t _tmp70_ = 0; + VideoImportSource* _tmp71_ = NULL; + GeeArrayList* _tmp72_ = NULL; + VideoImportSource* _tmp73_ = NULL; +#line 1396 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp60_ = self->priv->camera_name; +#line 1396 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp61_ = self->priv->camera; +#line 1396 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp62_ = fsid; +#line 1396 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp63_ = dir; +#line 1396 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp64_ = filename; +#line 1396 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp65_ = info; +#line 1396 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp66_ = _tmp65_.file; +#line 1396 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp67_ = _tmp66_.size; +#line 1396 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp68_ = info; +#line 1396 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp69_ = _tmp68_.file; +#line 1396 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp70_ = _tmp69_.mtime; +#line 1396 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp71_ = video_import_source_new (_tmp60_, _tmp61_, _tmp62_, _tmp63_, _tmp64_, _tmp67_, _tmp70_); +#line 1396 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + video_source = _tmp71_; +#line 1398 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp72_ = import_list; +#line 1398 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp73_ = video_source; +#line 1398 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp72_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp73_, TYPE_IMPORT_SOURCE, ImportSource)); +#line 1395 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (video_source); +#line 9040 "ImportPage.c" + } else { + PhotoFileFormat file_format = 0; + CameraFileInfo _tmp74_ = {0}; + CameraFileInfoFile _tmp75_ = {0}; + const gchar* _tmp76_ = NULL; + PhotoFileFormat _tmp77_ = 0; + PhotoFileFormat _tmp78_ = 0; + GeeArrayList* _tmp87_ = NULL; + const gchar* _tmp88_ = NULL; + Camera* _tmp89_ = NULL; + gint _tmp90_ = 0; + const gchar* _tmp91_ = NULL; + const gchar* _tmp92_ = NULL; + CameraFileInfo _tmp93_ = {0}; + CameraFileInfoFile _tmp94_ = {0}; + gulong _tmp95_ = 0UL; + CameraFileInfo _tmp96_ = {0}; + CameraFileInfoFile _tmp97_ = {0}; + time_t _tmp98_ = 0; + PhotoFileFormat _tmp99_ = 0; + PhotoImportSource* _tmp100_ = NULL; + PhotoImportSource* _tmp101_ = NULL; +#line 1401 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp74_ = info; +#line 1401 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp75_ = _tmp74_.file; +#line 1401 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp76_ = _tmp75_.type; +#line 1401 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp77_ = photo_file_format_from_gphoto_type (_tmp76_); +#line 1401 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + file_format = _tmp77_; +#line 1402 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp78_ = file_format; +#line 1402 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp78_ == PHOTO_FILE_FORMAT_UNKNOWN) { +#line 9077 "ImportPage.c" + const gchar* _tmp79_ = NULL; + PhotoFileFormat _tmp80_ = 0; + PhotoFileFormat _tmp81_ = 0; +#line 1403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp79_ = filename; +#line 1403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp80_ = photo_file_format_get_by_basename_extension (_tmp79_); +#line 1403 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + file_format = _tmp80_; +#line 1404 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp81_ = file_format; +#line 1404 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp81_ == PHOTO_FILE_FORMAT_UNKNOWN) { +#line 9091 "ImportPage.c" + const gchar* _tmp82_ = NULL; + const gchar* _tmp83_ = NULL; + CameraFileInfo _tmp84_ = {0}; + CameraFileInfoFile _tmp85_ = {0}; + const gchar* _tmp86_ = NULL; +#line 1405 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp82_ = fulldir; +#line 1405 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp83_ = filename; +#line 1405 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp84_ = info; +#line 1405 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp85_ = _tmp84_.file; +#line 1405 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp86_ = _tmp85_.type; +#line 1405 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_message ("ImportPage.vala:1405: Skipping %s/%s: Not a supported file extension (" \ +"%s)", _tmp82_, _tmp83_, _tmp86_); +#line 1408 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + (info); +#line 1408 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (filename); +#line 1408 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + continue; +#line 9115 "ImportPage.c" + } + } +#line 1411 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp87_ = import_list; +#line 1411 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp88_ = self->priv->camera_name; +#line 1411 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp89_ = self->priv->camera; +#line 1411 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp90_ = fsid; +#line 1411 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp91_ = dir; +#line 1411 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp92_ = filename; +#line 1411 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp93_ = info; +#line 1411 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp94_ = _tmp93_.file; +#line 1411 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp95_ = _tmp94_.size; +#line 1411 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp96_ = info; +#line 1411 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp97_ = _tmp96_.file; +#line 1411 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp98_ = _tmp97_.mtime; +#line 1411 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp99_ = file_format; +#line 1411 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp100_ = photo_import_source_new (_tmp88_, _tmp89_, _tmp90_, _tmp91_, _tmp92_, _tmp95_, _tmp98_, _tmp99_); +#line 1411 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp101_ = _tmp100_; +#line 1411 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp87_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp101_, TYPE_IMPORT_SOURCE, ImportSource)); +#line 1411 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp101_); +#line 9152 "ImportPage.c" + } +#line 1415 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp102_ = self->priv->progress_bar; +#line 1415 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_progress_bar_pulse (_tmp102_); +#line 1418 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + spin_event_loop (); +#line 1380 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + (info); +#line 9162 "ImportPage.c" + } + goto __finally64; + __catch64_g_error: + { + GError* err = NULL; + const gchar* _tmp103_ = NULL; + GError* _tmp104_ = NULL; + const gchar* _tmp105_ = NULL; + GError* _tmp106_ = NULL; + const gchar* _tmp107_ = NULL; + gchar* _tmp108_ = NULL; +#line 1380 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + err = _inner_error_; +#line 1380 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _inner_error_ = NULL; +#line 1420 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp103_ = fulldir; +#line 1420 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp104_ = err; +#line 1420 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp105_ = _tmp104_->message; +#line 1420 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_warning ("ImportPage.vala:1420: Error while enumerating files in %s: %s", _tmp103_, _tmp105_); +#line 1422 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp106_ = err; +#line 1422 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp107_ = _tmp106_->message; +#line 1422 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp108_ = g_strdup (_tmp107_); +#line 1422 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->refresh_error); +#line 1422 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->refresh_error = _tmp108_; +#line 1424 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 1424 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_error_free0 (err); +#line 1424 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (filename); +#line 1424 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (files); +#line 1424 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 1424 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 9208 "ImportPage.c" + } + __finally64: +#line 1380 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1380 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (filename); +#line 1380 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (files); +#line 1380 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 1380 "/home/jens/Source/shotwell/src/camera/ImportPage.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 1380 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_clear_error (&_inner_error_); +#line 1380 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return FALSE; +#line 9225 "ImportPage.c" + } +#line 1370 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (filename); +#line 9229 "ImportPage.c" + } + } + } +#line 1429 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp110_ = gp_list_new (&_tmp109_); +#line 1429 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (folders); +#line 1429 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + folders = _tmp109_; +#line 1429 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->refresh_result = _tmp110_; +#line 1430 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp111_ = self->priv->refresh_result; +#line 1430 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp111_ != GP_OK) { +#line 9245 "ImportPage.c" + int _tmp112_ = 0; + gchar* _tmp113_ = NULL; + gchar* _tmp114_ = NULL; +#line 1431 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp112_ = self->priv->refresh_result; +#line 1431 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp113_ = gp_result_to_full_string (_tmp112_); +#line 1431 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp114_ = _tmp113_; +#line 1431 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_warning ("ImportPage.vala:1431: Unable to create folder list: %s", _tmp114_); +#line 1431 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp114_); +#line 1433 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 1433 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (folders); +#line 1433 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (files); +#line 1433 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 1433 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 9269 "ImportPage.c" + } +#line 1436 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp115_ = self->priv->camera; +#line 1436 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp116_ = fulldir; +#line 1436 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp117_ = folders; +#line 1436 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp118_ = import_page_spin_idle_context; +#line 1436 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp119_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp118_, GP_TYPE_CONTEXT_WRAPPER, GPContextWrapper)->context; +#line 1436 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp120_ = gp_camera_folder_list_folders (_tmp115_, _tmp116_, _tmp117_, _tmp119_); +#line 1436 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->refresh_result = _tmp120_; +#line 1437 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp121_ = self->priv->refresh_result; +#line 1437 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp121_ != GP_OK) { +#line 9289 "ImportPage.c" + const gchar* _tmp122_ = NULL; + int _tmp123_ = 0; + gchar* _tmp124_ = NULL; + gchar* _tmp125_ = NULL; +#line 1438 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp122_ = fulldir; +#line 1438 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp123_ = self->priv->refresh_result; +#line 1438 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp124_ = gp_result_to_full_string (_tmp123_); +#line 1438 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp125_ = _tmp124_; +#line 1438 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_warning ("ImportPage.vala:1438: Unable to list folders in %s: %s", _tmp122_, _tmp125_); +#line 1438 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp125_); +#line 1441 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->refresh_result = GP_OK; +#line 1443 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = TRUE; +#line 1443 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (folders); +#line 1443 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (files); +#line 1443 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 1443 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 9318 "ImportPage.c" + } + { + gint ctr = 0; +#line 1446 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ctr = 0; +#line 9324 "ImportPage.c" + { + gboolean _tmp126_ = FALSE; +#line 1446 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp126_ = TRUE; +#line 1446 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + while (TRUE) { +#line 9331 "ImportPage.c" + gint _tmp128_ = 0; + CameraList* _tmp129_ = NULL; + gint _tmp130_ = 0; + gchar* subdir = NULL; + CameraList* _tmp131_ = NULL; + gint _tmp132_ = 0; + const gchar* _tmp133_ = NULL; + int _tmp134_ = 0; + gchar* _tmp135_ = NULL; + int _tmp136_ = 0; + gint _tmp141_ = 0; + const gchar* _tmp142_ = NULL; + const gchar* _tmp143_ = NULL; + gchar* _tmp144_ = NULL; + gchar* _tmp145_ = NULL; + GeeArrayList* _tmp146_ = NULL; + gboolean _tmp147_ = FALSE; + gboolean _tmp148_ = FALSE; +#line 1446 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp126_) { +#line 9352 "ImportPage.c" + gint _tmp127_ = 0; +#line 1446 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp127_ = ctr; +#line 1446 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ctr = _tmp127_ + 1; +#line 9358 "ImportPage.c" + } +#line 1446 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp126_ = FALSE; +#line 1446 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp128_ = ctr; +#line 1446 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp129_ = folders; +#line 1446 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp130_ = gp_list_count (_tmp129_); +#line 1446 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!(_tmp128_ < _tmp130_)) { +#line 1446 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 9372 "ImportPage.c" + } +#line 1448 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp131_ = folders; +#line 1448 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp132_ = ctr; +#line 1448 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp134_ = gp_list_get_name (_tmp131_, _tmp132_, &_tmp133_); +#line 1448 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (subdir); +#line 1448 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp135_ = g_strdup (_tmp133_); +#line 1448 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + subdir = _tmp135_; +#line 1448 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->refresh_result = _tmp134_; +#line 1449 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp136_ = self->priv->refresh_result; +#line 1449 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp136_ != GP_OK) { +#line 9392 "ImportPage.c" + gint _tmp137_ = 0; + int _tmp138_ = 0; + gchar* _tmp139_ = NULL; + gchar* _tmp140_ = NULL; +#line 1450 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp137_ = ctr; +#line 1450 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp138_ = self->priv->refresh_result; +#line 1450 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp139_ = gp_result_to_full_string (_tmp138_); +#line 1450 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp140_ = _tmp139_; +#line 1450 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_warning ("ImportPage.vala:1450: Unable to get name of folder %d: %s", _tmp137_, _tmp140_); +#line 1450 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp140_); +#line 1452 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 1452 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (subdir); +#line 1452 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (folders); +#line 1452 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (files); +#line 1452 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 1452 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 9421 "ImportPage.c" + } +#line 1455 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp141_ = fsid; +#line 1455 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp142_ = dir; +#line 1455 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp143_ = subdir; +#line 1455 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp144_ = import_page_append_path (_tmp142_, _tmp143_); +#line 1455 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp145_ = _tmp144_; +#line 1455 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp146_ = import_list; +#line 1455 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp147_ = import_page_enumerate_files (self, _tmp141_, _tmp145_, _tmp146_); +#line 1455 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp148_ = !_tmp147_; +#line 1455 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp145_); +#line 1455 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp148_) { +#line 1456 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 1456 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (subdir); +#line 1456 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (folders); +#line 1456 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (files); +#line 1456 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 1456 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 9455 "ImportPage.c" + } +#line 1446 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (subdir); +#line 9459 "ImportPage.c" + } + } + } +#line 1459 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = TRUE; +#line 1459 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (folders); +#line 1459 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_list_unref0 (files); +#line 1459 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 1459 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 9473 "ImportPage.c" +} + + +static void import_page_auto_match_raw_jpeg (ImportPage* self, GeeArrayList* import_list) { +#line 1463 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_IMPORT_PAGE (self)); +#line 1463 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (GEE_IS_ARRAY_LIST (import_list)); +#line 9482 "ImportPage.c" + { + gint i = 0; +#line 1464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + i = 0; +#line 9487 "ImportPage.c" + { + gboolean _tmp0_ = FALSE; +#line 1464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = TRUE; +#line 1464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + while (TRUE) { +#line 9494 "ImportPage.c" + gint _tmp2_ = 0; + GeeArrayList* _tmp3_ = NULL; + gint _tmp4_ = 0; + gint _tmp5_ = 0; + PhotoImportSource* current = NULL; + GeeArrayList* _tmp6_ = NULL; + gint _tmp7_ = 0; + gpointer _tmp8_ = NULL; + ImportSource* _tmp9_ = NULL; + PhotoImportSource* _tmp10_ = NULL; + PhotoImportSource* _tmp11_ = NULL; + gint _tmp12_ = 0; + GeeArrayList* _tmp13_ = NULL; + gint _tmp14_ = 0; + gint _tmp15_ = 0; + PhotoImportSource* next = NULL; + PhotoImportSource* _tmp21_ = NULL; + PhotoImportSource* _tmp22_ = NULL; + gint _tmp23_ = 0; + PhotoImportSource* prev = NULL; + PhotoImportSource* _tmp29_ = NULL; + gboolean _tmp30_ = FALSE; + PhotoImportSource* _tmp31_ = NULL; +#line 1464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp0_) { +#line 9520 "ImportPage.c" + gint _tmp1_ = 0; +#line 1464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = i; +#line 1464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + i = _tmp1_ + 1; +#line 9526 "ImportPage.c" + } +#line 1464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = FALSE; +#line 1464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = i; +#line 1464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = import_list; +#line 1464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection)); +#line 1464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = _tmp4_; +#line 1464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!(_tmp2_ < _tmp5_)) { +#line 1464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 9542 "ImportPage.c" + } +#line 1465 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = import_list; +#line 1465 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = i; +#line 1465 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp7_); +#line 1465 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = (ImportSource*) _tmp8_; +#line 1465 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, TYPE_PHOTO_IMPORT_SOURCE) ? ((PhotoImportSource*) _tmp9_) : NULL; +#line 1465 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp10_ == NULL) { +#line 1465 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp9_); +#line 9558 "ImportPage.c" + } +#line 1465 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + current = _tmp10_; +#line 1466 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = i; +#line 1466 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = import_list; +#line 1466 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_COLLECTION, GeeCollection)); +#line 1466 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = _tmp14_; +#line 1466 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if ((_tmp12_ + 1) < _tmp15_) { +#line 9572 "ImportPage.c" + GeeArrayList* _tmp16_ = NULL; + gint _tmp17_ = 0; + gpointer _tmp18_ = NULL; + ImportSource* _tmp19_ = NULL; + PhotoImportSource* _tmp20_ = NULL; +#line 1467 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp16_ = import_list; +#line 1467 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = i; +#line 1467 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp18_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp17_ + 1); +#line 1467 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp19_ = (ImportSource*) _tmp18_; +#line 1467 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp20_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, TYPE_PHOTO_IMPORT_SOURCE) ? ((PhotoImportSource*) _tmp19_) : NULL; +#line 1467 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp20_ == NULL) { +#line 1467 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp19_); +#line 9592 "ImportPage.c" + } +#line 1467 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp11_); +#line 1467 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = _tmp20_; +#line 9598 "ImportPage.c" + } else { +#line 1467 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp11_); +#line 1467 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = NULL; +#line 9604 "ImportPage.c" + } +#line 1466 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp21_ = _g_object_ref0 (_tmp11_); +#line 1466 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + next = _tmp21_; +#line 1468 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp23_ = i; +#line 1468 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp23_ > 0) { +#line 9614 "ImportPage.c" + GeeArrayList* _tmp24_ = NULL; + gint _tmp25_ = 0; + gpointer _tmp26_ = NULL; + ImportSource* _tmp27_ = NULL; + PhotoImportSource* _tmp28_ = NULL; +#line 1469 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp24_ = import_list; +#line 1469 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp25_ = i; +#line 1469 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp26_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp25_ - 1); +#line 1469 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp27_ = (ImportSource*) _tmp26_; +#line 1469 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp28_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp27_, TYPE_PHOTO_IMPORT_SOURCE) ? ((PhotoImportSource*) _tmp27_) : NULL; +#line 1469 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp28_ == NULL) { +#line 1469 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp27_); +#line 9634 "ImportPage.c" + } +#line 1469 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp22_); +#line 1469 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp22_ = _tmp28_; +#line 9640 "ImportPage.c" + } else { +#line 1469 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp22_); +#line 1469 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp22_ = NULL; +#line 9646 "ImportPage.c" + } +#line 1468 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp29_ = _g_object_ref0 (_tmp22_); +#line 1468 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + prev = _tmp29_; +#line 1470 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp31_ = current; +#line 1470 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp31_ != NULL) { +#line 9656 "ImportPage.c" + PhotoImportSource* _tmp32_ = NULL; + PhotoFileFormat _tmp33_ = 0; +#line 1470 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp32_ = current; +#line 1470 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp33_ = photo_import_source_get_file_format (_tmp32_); +#line 1470 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp30_ = _tmp33_ == PHOTO_FILE_FORMAT_RAW; +#line 9665 "ImportPage.c" + } else { +#line 1470 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp30_ = FALSE; +#line 9669 "ImportPage.c" + } +#line 1470 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp30_) { +#line 9673 "ImportPage.c" + gchar* current_name = NULL; + gchar* ext = NULL; + PhotoImportSource* _tmp34_ = NULL; + gchar* _tmp35_ = NULL; + gchar* _tmp36_ = NULL; + gchar* _tmp37_ = NULL; + gchar* _tmp38_ = NULL; + PhotoImportSource* associated = NULL; + gboolean _tmp39_ = FALSE; + PhotoImportSource* _tmp40_ = NULL; + gboolean _tmp52_ = FALSE; + PhotoImportSource* _tmp53_ = NULL; + PhotoImportSource* _tmp65_ = NULL; +#line 1473 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp34_ = current; +#line 1473 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp35_ = import_source_get_filename (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, TYPE_IMPORT_SOURCE, ImportSource)); +#line 1473 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp36_ = _tmp35_; +#line 1473 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + disassemble_filename (_tmp36_, &_tmp37_, &_tmp38_); +#line 1473 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (current_name); +#line 1473 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + current_name = _tmp37_; +#line 1473 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (ext); +#line 1473 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ext = _tmp38_; +#line 1473 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp36_); +#line 1476 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + associated = NULL; +#line 1477 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp40_ = next; +#line 1477 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp40_ != NULL) { +#line 9711 "ImportPage.c" + PhotoImportSource* _tmp41_ = NULL; + PhotoFileFormat _tmp42_ = 0; +#line 1477 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp41_ = next; +#line 1477 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp42_ = photo_import_source_get_file_format (_tmp41_); +#line 1477 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp39_ = _tmp42_ == PHOTO_FILE_FORMAT_JFIF; +#line 9720 "ImportPage.c" + } else { +#line 1477 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp39_ = FALSE; +#line 9724 "ImportPage.c" + } +#line 1477 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp39_) { +#line 9728 "ImportPage.c" + gchar* next_name = NULL; + PhotoImportSource* _tmp43_ = NULL; + gchar* _tmp44_ = NULL; + gchar* _tmp45_ = NULL; + gchar* _tmp46_ = NULL; + gchar* _tmp47_ = NULL; + const gchar* _tmp48_ = NULL; + const gchar* _tmp49_ = NULL; +#line 1479 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp43_ = next; +#line 1479 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp44_ = import_source_get_filename (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, TYPE_IMPORT_SOURCE, ImportSource)); +#line 1479 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp45_ = _tmp44_; +#line 1479 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + disassemble_filename (_tmp45_, &_tmp46_, &_tmp47_); +#line 1479 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (next_name); +#line 1479 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + next_name = _tmp46_; +#line 1479 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (ext); +#line 1479 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ext = _tmp47_; +#line 1479 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp45_); +#line 1480 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp48_ = next_name; +#line 1480 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp49_ = current_name; +#line 1480 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (g_strcmp0 (_tmp48_, _tmp49_) == 0) { +#line 9761 "ImportPage.c" + PhotoImportSource* _tmp50_ = NULL; + PhotoImportSource* _tmp51_ = NULL; +#line 1481 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp50_ = next; +#line 1481 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp51_ = _g_object_ref0 (_tmp50_); +#line 1481 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (associated); +#line 1481 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + associated = _tmp51_; +#line 9772 "ImportPage.c" + } +#line 1477 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (next_name); +#line 9776 "ImportPage.c" + } +#line 1483 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp53_ = prev; +#line 1483 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp53_ != NULL) { +#line 9782 "ImportPage.c" + PhotoImportSource* _tmp54_ = NULL; + PhotoFileFormat _tmp55_ = 0; +#line 1483 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp54_ = prev; +#line 1483 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp55_ = photo_import_source_get_file_format (_tmp54_); +#line 1483 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp52_ = _tmp55_ == PHOTO_FILE_FORMAT_JFIF; +#line 9791 "ImportPage.c" + } else { +#line 1483 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp52_ = FALSE; +#line 9795 "ImportPage.c" + } +#line 1483 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp52_) { +#line 9799 "ImportPage.c" + gchar* prev_name = NULL; + PhotoImportSource* _tmp56_ = NULL; + gchar* _tmp57_ = NULL; + gchar* _tmp58_ = NULL; + gchar* _tmp59_ = NULL; + gchar* _tmp60_ = NULL; + const gchar* _tmp61_ = NULL; + const gchar* _tmp62_ = NULL; +#line 1485 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp56_ = prev; +#line 1485 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp57_ = import_source_get_filename (G_TYPE_CHECK_INSTANCE_CAST (_tmp56_, TYPE_IMPORT_SOURCE, ImportSource)); +#line 1485 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp58_ = _tmp57_; +#line 1485 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + disassemble_filename (_tmp58_, &_tmp59_, &_tmp60_); +#line 1485 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (prev_name); +#line 1485 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + prev_name = _tmp59_; +#line 1485 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (ext); +#line 1485 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ext = _tmp60_; +#line 1485 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp58_); +#line 1486 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp61_ = prev_name; +#line 1486 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp62_ = current_name; +#line 1486 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (g_strcmp0 (_tmp61_, _tmp62_) == 0) { +#line 9832 "ImportPage.c" + PhotoImportSource* _tmp63_ = NULL; + PhotoImportSource* _tmp64_ = NULL; +#line 1487 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp63_ = prev; +#line 1487 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp64_ = _g_object_ref0 (_tmp63_); +#line 1487 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (associated); +#line 1487 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + associated = _tmp64_; +#line 9843 "ImportPage.c" + } +#line 1483 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (prev_name); +#line 9847 "ImportPage.c" + } +#line 1491 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp65_ = associated; +#line 1491 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp65_ != NULL) { +#line 9853 "ImportPage.c" + PhotoImportSource* _tmp66_ = NULL; + gchar* _tmp67_ = NULL; + gchar* _tmp68_ = NULL; + PhotoImportSource* _tmp69_ = NULL; + gchar* _tmp70_ = NULL; + gchar* _tmp71_ = NULL; + PhotoImportSource* _tmp72_ = NULL; + PhotoImportSource* _tmp73_ = NULL; + GeeArrayList* _tmp74_ = NULL; + PhotoImportSource* _tmp75_ = NULL; + gboolean _tmp76_ = FALSE; +#line 1492 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp66_ = current; +#line 1492 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp67_ = import_source_get_filename (G_TYPE_CHECK_INSTANCE_CAST (_tmp66_, TYPE_IMPORT_SOURCE, ImportSource)); +#line 1492 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp68_ = _tmp67_; +#line 1492 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp69_ = associated; +#line 1492 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp70_ = import_source_get_filename (G_TYPE_CHECK_INSTANCE_CAST (_tmp69_, TYPE_IMPORT_SOURCE, ImportSource)); +#line 1492 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp71_ = _tmp70_; +#line 1492 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_debug ("ImportPage.vala:1492: Found RAW+JPEG pair: %s and %s", _tmp68_, _tmp71_); +#line 1492 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp71_); +#line 1492 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp68_); +#line 1493 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp72_ = current; +#line 1493 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp73_ = associated; +#line 1493 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + photo_import_source_set_associated (_tmp72_, _tmp73_); +#line 1494 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp74_ = import_list; +#line 1494 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp75_ = associated; +#line 1494 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp76_ = gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp74_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp75_, TYPE_IMPORT_SOURCE, ImportSource)); +#line 1494 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp76_) { +#line 9897 "ImportPage.c" + PhotoImportSource* _tmp77_ = NULL; +#line 1495 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_debug ("ImportPage.vala:1495: Unable to associate files"); +#line 1496 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp77_ = current; +#line 1496 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + photo_import_source_set_associated (_tmp77_, NULL); +#line 9905 "ImportPage.c" + } + } +#line 1470 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (associated); +#line 1470 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (ext); +#line 1470 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (current_name); +#line 9914 "ImportPage.c" + } +#line 1464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (prev); +#line 1464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp22_); +#line 1464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (next); +#line 1464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp11_); +#line 1464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (current); +#line 9926 "ImportPage.c" + } + } + } +} + + +static void import_page_load_previews_and_metadata (ImportPage* self, GeeList* import_list) { + gint loaded_photos = 0; + GError * _inner_error_ = NULL; +#line 1503 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_IMPORT_PAGE (self)); +#line 1503 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (GEE_IS_LIST (import_list)); +#line 1504 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + loaded_photos = 0; +#line 9942 "ImportPage.c" + { + GeeList* _import_source_list = NULL; + GeeList* _tmp0_ = NULL; + GeeList* _tmp1_ = NULL; + gint _import_source_size = 0; + GeeList* _tmp2_ = NULL; + gint _tmp3_ = 0; + gint _tmp4_ = 0; + gint _import_source_index = 0; +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = import_list; +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _import_source_list = _tmp1_; +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = _import_source_list; +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection)); +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = _tmp3_; +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _import_source_size = _tmp4_; +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _import_source_index = -1; +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + while (TRUE) { +#line 9970 "ImportPage.c" + gint _tmp5_ = 0; + gint _tmp6_ = 0; + gint _tmp7_ = 0; + ImportSource* import_source = NULL; + GeeList* _tmp8_ = NULL; + gint _tmp9_ = 0; + gpointer _tmp10_ = NULL; + gchar* filename = NULL; + ImportSource* _tmp11_ = NULL; + gchar* _tmp12_ = NULL; + gchar* fulldir = NULL; + ImportSource* _tmp13_ = NULL; + gchar* _tmp14_ = NULL; + const gchar* _tmp15_ = NULL; + PhotoImportSource* associated = NULL; + gboolean _tmp19_ = FALSE; + ImportSource* _tmp20_ = NULL; + GtkProgressBar* _tmp26_ = NULL; + GtkProgressBar* _tmp27_ = NULL; + const gchar* _tmp28_ = NULL; + ImportSource* _tmp29_ = NULL; + gchar* _tmp30_ = NULL; + gchar* _tmp31_ = NULL; + gchar* _tmp32_ = NULL; + gchar* _tmp33_ = NULL; + PhotoMetadata* metadata = NULL; + const gchar* _tmp34_ = NULL; + gboolean _tmp35_ = FALSE; + gchar* exif_only_md5 = NULL; + PhotoMetadata* _tmp48_ = NULL; + guint8* preview_raw = NULL; + gint preview_raw_length1 = 0; + gint _preview_raw_size_ = 0; + gsize preview_raw_length = 0UL; + GdkPixbuf* preview = NULL; + gchar* preview_md5 = NULL; + gboolean _tmp84_ = FALSE; + gboolean _tmp85_ = FALSE; + GdkPixbuf* _tmp86_ = NULL; + ImportSource* _tmp92_ = NULL; + ImportSource* _tmp95_ = NULL; + PhotoImportSource* _tmp101_ = NULL; + SourceCollection* _tmp125_ = NULL; + ImportSource* _tmp126_ = NULL; + GtkProgressBar* _tmp127_ = NULL; + gint _tmp128_ = 0; + gint _tmp129_ = 0; + GeeList* _tmp130_ = NULL; + gint _tmp131_ = 0; + gint _tmp132_ = 0; +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = _import_source_index; +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _import_source_index = _tmp5_ + 1; +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = _import_source_index; +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = _import_source_size; +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!(_tmp6_ < _tmp7_)) { +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 10033 "ImportPage.c" + } +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = _import_source_list; +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = _import_source_index; +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = gee_list_get (_tmp8_, _tmp9_); +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_source = (ImportSource*) _tmp10_; +#line 1506 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = import_source; +#line 1506 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = import_source_get_filename (_tmp11_); +#line 1506 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + filename = _tmp12_; +#line 1507 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = import_source; +#line 1507 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = import_source_get_fulldir (_tmp13_); +#line 1507 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + fulldir = _tmp14_; +#line 1508 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = fulldir; +#line 1508 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp15_ == NULL) { +#line 10059 "ImportPage.c" + ImportSource* _tmp16_ = NULL; + gchar* _tmp17_ = NULL; + gchar* _tmp18_ = NULL; +#line 1509 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp16_ = import_source; +#line 1509 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_DATA_OBJECT, DataObject)); +#line 1509 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp18_ = _tmp17_; +#line 1509 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_warning ("ImportPage.vala:1509: Skipping loading preview of %s: invalid folder n" \ +"ame", _tmp18_); +#line 1509 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp18_); +#line 1511 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 1511 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (filename); +#line 1511 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (import_source); +#line 1511 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + continue; +#line 10081 "ImportPage.c" + } +#line 1515 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + associated = NULL; +#line 1516 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp20_ = import_source; +#line 1516 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp20_, TYPE_PHOTO_IMPORT_SOURCE)) { +#line 10089 "ImportPage.c" + ImportSource* _tmp21_ = NULL; + PhotoImportSource* _tmp22_ = NULL; + PhotoImportSource* _tmp23_ = NULL; +#line 1517 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp21_ = import_source; +#line 1517 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp22_ = photo_import_source_get_associated (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, TYPE_PHOTO_IMPORT_SOURCE, PhotoImportSource)); +#line 1517 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp23_ = _tmp22_; +#line 1517 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp19_ = _tmp23_ != NULL; +#line 1517 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp23_); +#line 10103 "ImportPage.c" + } else { +#line 1516 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp19_ = FALSE; +#line 10107 "ImportPage.c" + } +#line 1516 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp19_) { +#line 10111 "ImportPage.c" + ImportSource* _tmp24_ = NULL; + PhotoImportSource* _tmp25_ = NULL; +#line 1518 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp24_ = import_source; +#line 1518 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp25_ = photo_import_source_get_associated (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, TYPE_PHOTO_IMPORT_SOURCE, PhotoImportSource)); +#line 1518 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (associated); +#line 1518 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + associated = _tmp25_; +#line 10122 "ImportPage.c" + } +#line 1521 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp26_ = self->priv->progress_bar; +#line 1521 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_progress_bar_set_ellipsize (_tmp26_, PANGO_ELLIPSIZE_MIDDLE); +#line 1522 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp27_ = self->priv->progress_bar; +#line 1522 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp28_ = _ ("Fetching preview for %s"); +#line 1522 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp29_ = import_source; +#line 1522 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp30_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_DATA_OBJECT, DataObject)); +#line 1522 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp31_ = _tmp30_; +#line 1522 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp32_ = g_strdup_printf (_tmp28_, _tmp31_); +#line 1522 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp33_ = _tmp32_; +#line 1522 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_progress_bar_set_text (_tmp27_, _tmp33_); +#line 1522 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp33_); +#line 1522 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp31_); +#line 1529 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + metadata = NULL; +#line 1530 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp34_ = filename; +#line 1530 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp35_ = video_reader_is_supported_video_filename (_tmp34_); +#line 1530 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp35_) { +#line 10156 "ImportPage.c" + { + PhotoMetadata* _tmp36_ = NULL; + GPSpinIdleWrapper* _tmp37_ = NULL; + GPContext* _tmp38_ = NULL; + Camera* _tmp39_ = NULL; + const gchar* _tmp40_ = NULL; + const gchar* _tmp41_ = NULL; + PhotoMetadata* _tmp42_ = NULL; + PhotoMetadata* _tmp43_ = NULL; +#line 1532 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp37_ = import_page_spin_idle_context; +#line 1532 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp38_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, GP_TYPE_CONTEXT_WRAPPER, GPContextWrapper)->context; +#line 1532 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp39_ = self->priv->camera; +#line 1532 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp40_ = fulldir; +#line 1532 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp41_ = filename; +#line 1532 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp42_ = gp_load_metadata (_tmp38_, _tmp39_, _tmp40_, _tmp41_, &_inner_error_); +#line 1532 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp36_ = _tmp42_; +#line 1532 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 10182 "ImportPage.c" + goto __catch65_g_error; + } +#line 1532 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp43_ = _tmp36_; +#line 1532 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp36_ = NULL; +#line 1532 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _media_metadata_unref0 (metadata); +#line 1532 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + metadata = _tmp43_; +#line 1531 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _media_metadata_unref0 (_tmp36_); +#line 10195 "ImportPage.c" + } + goto __finally65; + __catch65_g_error: + { + GError* err = NULL; + const gchar* _tmp44_ = NULL; + const gchar* _tmp45_ = NULL; + GError* _tmp46_ = NULL; + const gchar* _tmp47_ = NULL; +#line 1531 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + err = _inner_error_; +#line 1531 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _inner_error_ = NULL; +#line 1535 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp44_ = fulldir; +#line 1535 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp45_ = filename; +#line 1535 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp46_ = err; +#line 1535 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp47_ = _tmp46_->message; +#line 1535 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_warning ("ImportPage.vala:1535: Unable to fetch metadata for %s/%s: %s", _tmp44_, _tmp45_, _tmp47_); +#line 1531 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_error_free0 (err); +#line 10221 "ImportPage.c" + } + __finally65: +#line 1531 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1531 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _media_metadata_unref0 (metadata); +#line 1531 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (associated); +#line 1531 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 1531 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (filename); +#line 1531 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (import_source); +#line 1531 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_import_source_list); +#line 1531 "/home/jens/Source/shotwell/src/camera/ImportPage.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 1531 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_clear_error (&_inner_error_); +#line 1531 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return; +#line 10244 "ImportPage.c" + } + } +#line 1541 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + exif_only_md5 = NULL; +#line 1542 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp48_ = metadata; +#line 1542 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp48_ != NULL) { +#line 10253 "ImportPage.c" + guint8* flattened_sans_thumbnail = NULL; + PhotoMetadata* _tmp49_ = NULL; + gint _tmp50_ = 0; + guint8* _tmp51_ = NULL; + gint flattened_sans_thumbnail_length1 = 0; + gint _flattened_sans_thumbnail_size_ = 0; + gboolean _tmp52_ = FALSE; + guint8* _tmp53_ = NULL; + gint _tmp53__length1 = 0; +#line 1543 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp49_ = metadata; +#line 1543 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp51_ = photo_metadata_flatten_exif (_tmp49_, FALSE, &_tmp50_); +#line 1543 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + flattened_sans_thumbnail = _tmp51_; +#line 1543 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + flattened_sans_thumbnail_length1 = _tmp50_; +#line 1543 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _flattened_sans_thumbnail_size_ = flattened_sans_thumbnail_length1; +#line 1544 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp53_ = flattened_sans_thumbnail; +#line 1544 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp53__length1 = flattened_sans_thumbnail_length1; +#line 1544 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp53_ != NULL) { +#line 10279 "ImportPage.c" + guint8* _tmp54_ = NULL; + gint _tmp54__length1 = 0; +#line 1544 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp54_ = flattened_sans_thumbnail; +#line 1544 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp54__length1 = flattened_sans_thumbnail_length1; +#line 1544 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp52_ = _tmp54__length1 > 0; +#line 10288 "ImportPage.c" + } else { +#line 1544 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp52_ = FALSE; +#line 10292 "ImportPage.c" + } +#line 1544 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp52_) { +#line 10296 "ImportPage.c" + guint8* _tmp55_ = NULL; + gint _tmp55__length1 = 0; + guint8* _tmp56_ = NULL; + gint _tmp56__length1 = 0; + gchar* _tmp57_ = NULL; +#line 1545 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp55_ = flattened_sans_thumbnail; +#line 1545 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp55__length1 = flattened_sans_thumbnail_length1; +#line 1545 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp56_ = flattened_sans_thumbnail; +#line 1545 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp56__length1 = flattened_sans_thumbnail_length1; +#line 1545 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp57_ = md5_binary (_tmp55_, (gsize) _tmp56__length1); +#line 1545 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (exif_only_md5); +#line 1545 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + exif_only_md5 = _tmp57_; +#line 10316 "ImportPage.c" + } +#line 1542 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + flattened_sans_thumbnail = (g_free (flattened_sans_thumbnail), NULL); +#line 10320 "ImportPage.c" + } +#line 1554 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + preview_raw = NULL; +#line 1554 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + preview_raw_length1 = 0; +#line 1554 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _preview_raw_size_ = preview_raw_length1; +#line 1555 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + preview_raw_length = (gsize) 0; +#line 1556 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + preview = NULL; +#line 10332 "ImportPage.c" + { + gchar* preview_fulldir = NULL; + const gchar* _tmp58_ = NULL; + gchar* _tmp59_ = NULL; + gchar* preview_filename = NULL; + const gchar* _tmp60_ = NULL; + gchar* _tmp61_ = NULL; + PhotoImportSource* _tmp62_ = NULL; + GdkPixbuf* _tmp67_ = NULL; + GPSpinIdleWrapper* _tmp68_ = NULL; + GPContext* _tmp69_ = NULL; + Camera* _tmp70_ = NULL; + const gchar* _tmp71_ = NULL; + const gchar* _tmp72_ = NULL; + guint8* _tmp73_ = NULL; + gint _tmp74_ = 0; + gsize _tmp75_ = 0UL; + GdkPixbuf* _tmp76_ = NULL; + GdkPixbuf* _tmp77_ = NULL; +#line 1558 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp58_ = fulldir; +#line 1558 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp59_ = g_strdup (_tmp58_); +#line 1558 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + preview_fulldir = _tmp59_; +#line 1559 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp60_ = filename; +#line 1559 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp61_ = g_strdup (_tmp60_); +#line 1559 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + preview_filename = _tmp61_; +#line 1560 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp62_ = associated; +#line 1560 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp62_ != NULL) { +#line 10368 "ImportPage.c" + PhotoImportSource* _tmp63_ = NULL; + gchar* _tmp64_ = NULL; + PhotoImportSource* _tmp65_ = NULL; + gchar* _tmp66_ = NULL; +#line 1561 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp63_ = associated; +#line 1561 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp64_ = import_source_get_fulldir (G_TYPE_CHECK_INSTANCE_CAST (_tmp63_, TYPE_IMPORT_SOURCE, ImportSource)); +#line 1561 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (preview_fulldir); +#line 1561 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + preview_fulldir = _tmp64_; +#line 1562 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp65_ = associated; +#line 1562 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp66_ = import_source_get_filename (G_TYPE_CHECK_INSTANCE_CAST (_tmp65_, TYPE_IMPORT_SOURCE, ImportSource)); +#line 1562 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (preview_filename); +#line 1562 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + preview_filename = _tmp66_; +#line 10389 "ImportPage.c" + } +#line 1564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp68_ = import_page_spin_idle_context; +#line 1564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp69_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp68_, GP_TYPE_CONTEXT_WRAPPER, GPContextWrapper)->context; +#line 1564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp70_ = self->priv->camera; +#line 1564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp71_ = preview_fulldir; +#line 1564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp72_ = preview_filename; +#line 1564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp76_ = gp_load_preview (_tmp69_, _tmp70_, _tmp71_, _tmp72_, &_tmp73_, &_tmp74_, &_tmp75_, &_inner_error_); +#line 1564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + preview_raw = (g_free (preview_raw), NULL); +#line 1564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + preview_raw = _tmp73_; +#line 1564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + preview_raw_length1 = _tmp74_; +#line 1564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _preview_raw_size_ = preview_raw_length1; +#line 1564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + preview_raw_length = _tmp75_; +#line 1564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp67_ = _tmp76_; +#line 1564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (preview_filename); +#line 1564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (preview_fulldir); +#line 10421 "ImportPage.c" + goto __catch66_g_error; + } +#line 1564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp77_ = _tmp67_; +#line 1564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp67_ = NULL; +#line 1564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (preview); +#line 1564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + preview = _tmp77_; +#line 1557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp67_); +#line 1557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (preview_filename); +#line 1557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (preview_fulldir); +#line 10438 "ImportPage.c" + } + goto __finally66; + __catch66_g_error: + { + GError* err = NULL; + const gchar* _tmp78_ = NULL; + gboolean _tmp79_ = FALSE; +#line 1557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + err = _inner_error_; +#line 1557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _inner_error_ = NULL; +#line 1572 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp78_ = filename; +#line 1572 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp79_ = video_reader_is_supported_video_filename (_tmp78_); +#line 1572 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp79_) { +#line 10456 "ImportPage.c" + const gchar* _tmp80_ = NULL; + const gchar* _tmp81_ = NULL; + GError* _tmp82_ = NULL; + const gchar* _tmp83_ = NULL; +#line 1573 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp80_ = fulldir; +#line 1573 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp81_ = filename; +#line 1573 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp82_ = err; +#line 1573 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp83_ = _tmp82_->message; +#line 1573 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_warning ("ImportPage.vala:1573: Unable to fetch preview for %s/%s: %s", _tmp80_, _tmp81_, _tmp83_); +#line 10471 "ImportPage.c" + } +#line 1557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_error_free0 (err); +#line 10475 "ImportPage.c" + } + __finally66: +#line 1557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (preview); +#line 1557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + preview_raw = (g_free (preview_raw), NULL); +#line 1557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (exif_only_md5); +#line 1557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _media_metadata_unref0 (metadata); +#line 1557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (associated); +#line 1557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 1557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (filename); +#line 1557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (import_source); +#line 1557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_import_source_list); +#line 1557 "/home/jens/Source/shotwell/src/camera/ImportPage.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 1557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_clear_error (&_inner_error_); +#line 1557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return; +#line 10504 "ImportPage.c" + } +#line 1578 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + preview_md5 = NULL; +#line 1579 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp86_ = preview; +#line 1579 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp86_ != NULL) { +#line 10512 "ImportPage.c" + guint8* _tmp87_ = NULL; + gint _tmp87__length1 = 0; +#line 1579 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp87_ = preview_raw; +#line 1579 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp87__length1 = preview_raw_length1; +#line 1579 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp85_ = _tmp87_ != NULL; +#line 10521 "ImportPage.c" + } else { +#line 1579 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp85_ = FALSE; +#line 10525 "ImportPage.c" + } +#line 1579 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp85_) { +#line 10529 "ImportPage.c" + gsize _tmp88_ = 0UL; +#line 1579 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp88_ = preview_raw_length; +#line 1579 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp84_ = _tmp88_ > ((gsize) 0); +#line 10535 "ImportPage.c" + } else { +#line 1579 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp84_ = FALSE; +#line 10539 "ImportPage.c" + } +#line 1579 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp84_) { +#line 10543 "ImportPage.c" + guint8* _tmp89_ = NULL; + gint _tmp89__length1 = 0; + gsize _tmp90_ = 0UL; + gchar* _tmp91_ = NULL; +#line 1580 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp89_ = preview_raw; +#line 1580 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp89__length1 = preview_raw_length1; +#line 1580 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp90_ = preview_raw_length; +#line 1580 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp91_ = md5_binary (_tmp89_, _tmp90_); +#line 1580 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (preview_md5); +#line 1580 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + preview_md5 = _tmp91_; +#line 10560 "ImportPage.c" + } +#line 1586 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp92_ = import_source; +#line 1586 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp92_, TYPE_VIDEO_IMPORT_SOURCE)) { +#line 10566 "ImportPage.c" + ImportSource* _tmp93_ = NULL; + GdkPixbuf* _tmp94_ = NULL; +#line 1587 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp93_ = import_source; +#line 1587 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp94_ = preview; +#line 1587 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + video_import_source_update (G_TYPE_CHECK_INSTANCE_TYPE (_tmp93_, TYPE_VIDEO_IMPORT_SOURCE) ? ((VideoImportSource*) _tmp93_) : NULL, _tmp94_); +#line 10575 "ImportPage.c" + } +#line 1589 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp95_ = import_source; +#line 1589 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp95_, TYPE_PHOTO_IMPORT_SOURCE)) { +#line 10581 "ImportPage.c" + ImportSource* _tmp96_ = NULL; + GdkPixbuf* _tmp97_ = NULL; + const gchar* _tmp98_ = NULL; + PhotoMetadata* _tmp99_ = NULL; + const gchar* _tmp100_ = NULL; +#line 1590 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp96_ = import_source; +#line 1590 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp97_ = preview; +#line 1590 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp98_ = preview_md5; +#line 1590 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp99_ = metadata; +#line 1590 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp100_ = exif_only_md5; +#line 1590 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + photo_import_source_update (G_TYPE_CHECK_INSTANCE_TYPE (_tmp96_, TYPE_PHOTO_IMPORT_SOURCE) ? ((PhotoImportSource*) _tmp96_) : NULL, _tmp97_, _tmp98_, _tmp99_, _tmp100_); +#line 10599 "ImportPage.c" + } +#line 1593 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp101_ = associated; +#line 1593 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp101_ != NULL) { +#line 10605 "ImportPage.c" + { + PhotoMetadata* associated_metadata = NULL; + GPSpinIdleWrapper* _tmp102_ = NULL; + GPContext* _tmp103_ = NULL; + Camera* _tmp104_ = NULL; + PhotoImportSource* _tmp105_ = NULL; + gchar* _tmp106_ = NULL; + gchar* _tmp107_ = NULL; + PhotoImportSource* _tmp108_ = NULL; + gchar* _tmp109_ = NULL; + gchar* _tmp110_ = NULL; + PhotoMetadata* _tmp111_ = NULL; + PhotoMetadata* _tmp112_ = NULL; + PhotoImportSource* _tmp113_ = NULL; + GdkPixbuf* _tmp114_ = NULL; + const gchar* _tmp115_ = NULL; + PhotoMetadata* _tmp116_ = NULL; +#line 1595 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp102_ = import_page_spin_idle_context; +#line 1595 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp103_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp102_, GP_TYPE_CONTEXT_WRAPPER, GPContextWrapper)->context; +#line 1595 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp104_ = self->priv->camera; +#line 1595 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp105_ = associated; +#line 1595 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp106_ = import_source_get_fulldir (G_TYPE_CHECK_INSTANCE_CAST (_tmp105_, TYPE_IMPORT_SOURCE, ImportSource)); +#line 1595 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp107_ = _tmp106_; +#line 1595 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp108_ = associated; +#line 1595 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp109_ = import_source_get_filename (G_TYPE_CHECK_INSTANCE_CAST (_tmp108_, TYPE_IMPORT_SOURCE, ImportSource)); +#line 1595 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp110_ = _tmp109_; +#line 1595 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp111_ = gp_load_metadata (_tmp103_, _tmp104_, _tmp107_, _tmp110_, &_inner_error_); +#line 1595 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp112_ = _tmp111_; +#line 1595 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp110_); +#line 1595 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp107_); +#line 1595 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + associated_metadata = _tmp112_; +#line 1595 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 10653 "ImportPage.c" + goto __catch67_g_error; + } +#line 1597 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp113_ = associated; +#line 1597 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp114_ = preview; +#line 1597 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp115_ = preview_md5; +#line 1597 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp116_ = associated_metadata; +#line 1597 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + photo_import_source_update (_tmp113_, _tmp114_, _tmp115_, _tmp116_, NULL); +#line 1594 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _media_metadata_unref0 (associated_metadata); +#line 10668 "ImportPage.c" + } + goto __finally67; + __catch67_g_error: + { + GError* err = NULL; + PhotoImportSource* _tmp117_ = NULL; + gchar* _tmp118_ = NULL; + gchar* _tmp119_ = NULL; + PhotoImportSource* _tmp120_ = NULL; + gchar* _tmp121_ = NULL; + gchar* _tmp122_ = NULL; + GError* _tmp123_ = NULL; + const gchar* _tmp124_ = NULL; +#line 1594 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + err = _inner_error_; +#line 1594 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _inner_error_ = NULL; +#line 1599 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp117_ = associated; +#line 1599 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp118_ = import_source_get_fulldir (G_TYPE_CHECK_INSTANCE_CAST (_tmp117_, TYPE_IMPORT_SOURCE, ImportSource)); +#line 1599 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp119_ = _tmp118_; +#line 1599 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp120_ = associated; +#line 1599 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp121_ = import_source_get_filename (G_TYPE_CHECK_INSTANCE_CAST (_tmp120_, TYPE_IMPORT_SOURCE, ImportSource)); +#line 1599 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp122_ = _tmp121_; +#line 1599 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp123_ = err; +#line 1599 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp124_ = _tmp123_->message; +#line 1599 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_warning ("ImportPage.vala:1599: Unable to fetch metadata for %s/%s: %s", _tmp119_, _tmp122_, _tmp124_); +#line 1599 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp122_); +#line 1599 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp119_); +#line 1594 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_error_free0 (err); +#line 10710 "ImportPage.c" + } + __finally67: +#line 1594 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1594 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (preview_md5); +#line 1594 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (preview); +#line 1594 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + preview_raw = (g_free (preview_raw), NULL); +#line 1594 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (exif_only_md5); +#line 1594 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _media_metadata_unref0 (metadata); +#line 1594 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (associated); +#line 1594 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 1594 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (filename); +#line 1594 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (import_source); +#line 1594 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_import_source_list); +#line 1594 "/home/jens/Source/shotwell/src/camera/ImportPage.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 1594 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_clear_error (&_inner_error_); +#line 1594 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return; +#line 10741 "ImportPage.c" + } + } +#line 1605 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp125_ = self->priv->import_sources; +#line 1605 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp126_ = import_source; +#line 1605 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp125_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp126_, TYPE_DATA_OBJECT, DataObject)); +#line 1607 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp127_ = self->priv->progress_bar; +#line 1607 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp128_ = loaded_photos; +#line 1607 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + loaded_photos = _tmp128_ + 1; +#line 1607 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp129_ = loaded_photos; +#line 1607 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp130_ = import_list; +#line 1607 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp131_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp130_, GEE_TYPE_COLLECTION, GeeCollection)); +#line 1607 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp132_ = _tmp131_; +#line 1607 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_progress_bar_set_fraction (_tmp127_, ((gdouble) _tmp129_) / ((gdouble) _tmp132_)); +#line 1614 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + spin_event_loop (); +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (preview_md5); +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (preview); +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + preview_raw = (g_free (preview_raw), NULL); +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (exif_only_md5); +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _media_metadata_unref0 (metadata); +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (associated); +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (fulldir); +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (filename); +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (import_source); +#line 10786 "ImportPage.c" + } +#line 1505 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_import_source_list); +#line 10790 "ImportPage.c" + } +} + + +static void import_page_on_hide_imported (ImportPage* self) { + GtkCheckButton* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; + ConfigFacade* _tmp8_ = NULL; + ConfigFacade* _tmp9_ = NULL; + GtkCheckButton* _tmp10_ = NULL; + gboolean _tmp11_ = FALSE; +#line 1618 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_IMPORT_PAGE (self)); +#line 1619 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->hide_imported; +#line 1619 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 1619 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp1_) { +#line 10810 "ImportPage.c" + ViewCollection* _tmp2_ = NULL; + ViewCollection* _tmp3_ = NULL; + ImportPageHideImportedViewFilter* _tmp4_ = NULL; +#line 1620 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 1620 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _tmp2_; +#line 1620 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = self->priv->hide_imported_filter; +#line 1620 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + view_collection_install_view_filter (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_VIEW_FILTER, ViewFilter)); +#line 1620 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _data_collection_unref0 (_tmp3_); +#line 10824 "ImportPage.c" + } else { + ViewCollection* _tmp5_ = NULL; + ViewCollection* _tmp6_ = NULL; + ImportPageHideImportedViewFilter* _tmp7_ = NULL; +#line 1622 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 1622 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = _tmp5_; +#line 1622 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = self->priv->hide_imported_filter; +#line 1622 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + view_collection_remove_view_filter (_tmp6_, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_VIEW_FILTER, ViewFilter)); +#line 1622 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _data_collection_unref0 (_tmp6_); +#line 10839 "ImportPage.c" + } +#line 1624 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = config_facade_get_instance (); +#line 1624 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = _tmp8_; +#line 1624 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = self->priv->hide_imported; +#line 1624 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 1624 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + configuration_facade_set_hide_photos_already_imported (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp11_); +#line 1624 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp9_); +#line 10853 "ImportPage.c" +} + + +static void import_page_on_import_selected (ImportPage* self) { + ViewCollection* _tmp0_ = NULL; + ViewCollection* _tmp1_ = NULL; + GeeList* _tmp2_ = NULL; + GeeList* _tmp3_ = NULL; +#line 1627 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_IMPORT_PAGE (self)); +#line 1628 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 1628 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _tmp0_; +#line 1628 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = view_collection_get_selected (_tmp1_); +#line 1628 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _tmp2_; +#line 1628 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_import (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable)); +#line 1628 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp3_); +#line 1628 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _data_collection_unref0 (_tmp1_); +#line 10878 "ImportPage.c" +} + + +static void import_page_on_import_all (ImportPage* self) { + ViewCollection* _tmp0_ = NULL; + ViewCollection* _tmp1_ = NULL; + GeeCollection* _tmp2_ = NULL; + GeeCollection* _tmp3_ = NULL; +#line 1631 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_IMPORT_PAGE (self)); +#line 1632 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 1632 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _tmp0_; +#line 1632 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_COLLECTION, DataCollection)); +#line 1632 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _tmp2_; +#line 1632 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_import (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable)); +#line 1632 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp3_); +#line 1632 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _data_collection_unref0 (_tmp1_); +#line 10903 "ImportPage.c" +} + + +static gint64 _import_page_import_job_comparator_comparator (void* a, void* b, gpointer self) { + gint64 result; + result = import_page_import_job_comparator ((ImportPage*) self, a, b); +#line 1648 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 10912 "ImportPage.c" +} + + +static void _import_page_import_reporter_batch_import_import_reporter (ImportManifest* manifest, BatchImportRoll* import_roll, gpointer self) { +#line 1684 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_import_reporter ((ImportPage*) self, manifest); +#line 10919 "ImportPage.c" +} + + +static void _import_page_on_import_job_failed_batch_import_import_job_failed (BatchImport* _sender, BatchImportResult* _result_, gpointer self) { +#line 1686 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_on_import_job_failed ((ImportPage*) self, _result_); +#line 10926 "ImportPage.c" +} + + +static void _import_page_close_import_batch_import_import_complete (BatchImport* _sender, ImportManifest* manifest, BatchImportRoll* import_roll, gpointer self) { +#line 1687 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_close_import ((ImportPage*) self); +#line 10933 "ImportPage.c" +} + + +static void import_page_import (ImportPage* self, GeeIterable* items) { + int res = 0; + Camera* _tmp0_ = NULL; + GPSpinIdleWrapper* _tmp1_ = NULL; + GPContext* _tmp2_ = NULL; + int _tmp3_ = 0; + int _tmp4_ = 0; + gboolean _tmp11_ = FALSE; + GtkProgressBar* _tmp12_ = NULL; + SortedList* jobs = NULL; + SortedList* _tmp13_ = NULL; + GeeArrayList* already_imported = NULL; + GeeArrayList* _tmp14_ = NULL; + SortedList* _tmp55_ = NULL; + gint _tmp56_ = 0; + gint _tmp57_ = 0; + const gchar* _tmp58_ = NULL; + SortedList* _tmp59_ = NULL; + gint _tmp60_ = 0; + gint _tmp61_ = 0; +#line 1635 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_IMPORT_PAGE (self)); +#line 1635 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (GEE_IS_ITERABLE (items)); +#line 1636 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->camera; +#line 1636 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = import_page_spin_idle_context; +#line 1636 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GP_TYPE_CONTEXT_WRAPPER, GPContextWrapper)->context; +#line 1636 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = gp_camera_init (_tmp0_, _tmp2_); +#line 1636 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + res = _tmp3_; +#line 1637 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = res; +#line 1637 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp4_ != GP_OK) { +#line 10975 "ImportPage.c" + const gchar* _tmp5_ = NULL; + int _tmp6_ = 0; + gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; +#line 1638 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = _ ("Unable to lock camera: %s"); +#line 1638 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = res; +#line 1638 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = gp_result_to_full_string (_tmp6_); +#line 1638 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = _tmp7_; +#line 1638 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = g_strdup_printf (_tmp5_, _tmp8_); +#line 1638 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = _tmp9_; +#line 1638 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + app_window_error_message (_tmp10_, NULL); +#line 1638 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp10_); +#line 1638 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp8_); +#line 1640 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return; +#line 11002 "ImportPage.c" + } +#line 1643 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = self->priv->refreshed; +#line 1643 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_update_status (self, TRUE, _tmp11_); +#line 1645 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_on_view_changed (self); +#line 1646 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = self->priv->progress_bar; +#line 1646 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 1648 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = sorted_list_new (IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, (GBoxedCopyFunc) batch_import_job_ref, batch_import_job_unref, _import_page_import_job_comparator_comparator, self); +#line 1648 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + jobs = _tmp13_; +#line 1649 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = gee_array_list_new (IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, (GBoxedCopyFunc) batch_import_job_ref, batch_import_job_unref, NULL, NULL, NULL); +#line 1649 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + already_imported = _tmp14_; +#line 11022 "ImportPage.c" + { + GeeIterator* _object_it = NULL; + GeeIterable* _tmp15_ = NULL; + GeeIterator* _tmp16_ = NULL; +#line 1651 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = items; +#line 1651 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp16_ = gee_iterable_iterator (_tmp15_); +#line 1651 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _object_it = _tmp16_; +#line 1651 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + while (TRUE) { +#line 11035 "ImportPage.c" + GeeIterator* _tmp17_ = NULL; + gboolean _tmp18_ = FALSE; + DataObject* object = NULL; + GeeIterator* _tmp19_ = NULL; + gpointer _tmp20_ = NULL; + ImportPreview* preview = NULL; + DataObject* _tmp21_ = NULL; + ImportPreview* _tmp22_ = NULL; + ImportSource* import_file = NULL; + ImportPreview* _tmp23_ = NULL; + DataSource* _tmp24_ = NULL; + ImportPreview* _tmp25_ = NULL; + gboolean _tmp26_ = FALSE; + ImportPageCameraImportJob* import_job = NULL; + GPContextWrapper* _tmp38_ = NULL; + ImportSource* _tmp39_ = NULL; + ImportPageCameraImportJob* _tmp40_ = NULL; + gboolean _tmp41_ = FALSE; + ImportSource* _tmp42_ = NULL; + SortedList* _tmp53_ = NULL; + ImportPageCameraImportJob* _tmp54_ = NULL; +#line 1651 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = _object_it; +#line 1651 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp18_ = gee_iterator_next (_tmp17_); +#line 1651 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp18_) { +#line 1651 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 11065 "ImportPage.c" + } +#line 1651 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp19_ = _object_it; +#line 1651 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp20_ = gee_iterator_get (_tmp19_); +#line 1651 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + object = (DataObject*) _tmp20_; +#line 1652 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp21_ = object; +#line 1652 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp22_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, TYPE_IMPORT_PREVIEW, ImportPreview)); +#line 1652 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + preview = _tmp22_; +#line 1653 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp23_ = preview; +#line 1653 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp24_ = data_view_get_source (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, TYPE_DATA_VIEW, DataView)); +#line 1653 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_file = G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, TYPE_IMPORT_SOURCE, ImportSource); +#line 1655 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp25_ = preview; +#line 1655 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp26_ = import_preview_is_already_imported (_tmp25_); +#line 1655 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp26_) { +#line 11091 "ImportPage.c" + ImportSource* _tmp27_ = NULL; + gchar* _tmp28_ = NULL; + gchar* _tmp29_ = NULL; + GeeArrayList* _tmp30_ = NULL; + GPContextWrapper* _tmp31_ = NULL; + ImportSource* _tmp32_ = NULL; + ImportPreview* _tmp33_ = NULL; + DuplicatedFile* _tmp34_ = NULL; + DuplicatedFile* _tmp35_ = NULL; + ImportPageCameraImportJob* _tmp36_ = NULL; + ImportPageCameraImportJob* _tmp37_ = NULL; +#line 1656 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp27_ = import_file; +#line 1656 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp28_ = import_source_get_filename (_tmp27_); +#line 1656 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp29_ = _tmp28_; +#line 1656 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_message ("ImportPage.vala:1656: Skipping import of %s: checksum detected in libr" \ +"ary", _tmp29_); +#line 1656 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp29_); +#line 1659 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp30_ = already_imported; +#line 1659 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp31_ = import_page_null_context; +#line 1659 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp32_ = import_file; +#line 1659 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp33_ = preview; +#line 1659 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp34_ = import_preview_get_duplicated_file (_tmp33_); +#line 1659 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp35_ = _tmp34_; +#line 1659 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp36_ = import_page_camera_import_job_new (_tmp31_, _tmp32_, _tmp35_); +#line 1659 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp37_ = _tmp36_; +#line 1659 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp37_); +#line 1659 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _batch_import_job_unref0 (_tmp37_); +#line 1659 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp35_); +#line 1662 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (import_file); +#line 1662 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (preview); +#line 1662 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (object); +#line 1662 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + continue; +#line 11143 "ImportPage.c" + } +#line 1665 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp38_ = import_page_null_context; +#line 1665 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp39_ = import_file; +#line 1665 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp40_ = import_page_camera_import_job_new (_tmp38_, _tmp39_, NULL); +#line 1665 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_job = _tmp40_; +#line 1668 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp42_ = import_file; +#line 1668 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp42_, TYPE_PHOTO_IMPORT_SOURCE)) { +#line 11157 "ImportPage.c" + ImportSource* _tmp43_ = NULL; + PhotoImportSource* _tmp44_ = NULL; + PhotoImportSource* _tmp45_ = NULL; +#line 1669 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp43_ = import_file; +#line 1669 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp44_ = photo_import_source_get_associated (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, TYPE_PHOTO_IMPORT_SOURCE, PhotoImportSource)); +#line 1669 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp45_ = _tmp44_; +#line 1669 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp41_ = _tmp45_ != NULL; +#line 1669 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp45_); +#line 11171 "ImportPage.c" + } else { +#line 1668 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp41_ = FALSE; +#line 11175 "ImportPage.c" + } +#line 1668 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp41_) { +#line 11179 "ImportPage.c" + ImportPageCameraImportJob* _tmp46_ = NULL; + GPContextWrapper* _tmp47_ = NULL; + ImportSource* _tmp48_ = NULL; + PhotoImportSource* _tmp49_ = NULL; + PhotoImportSource* _tmp50_ = NULL; + ImportPageCameraImportJob* _tmp51_ = NULL; + ImportPageCameraImportJob* _tmp52_ = NULL; +#line 1670 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp46_ = import_job; +#line 1670 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp47_ = import_page_null_context; +#line 1670 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp48_ = import_file; +#line 1670 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp49_ = photo_import_source_get_associated (G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, TYPE_PHOTO_IMPORT_SOURCE, PhotoImportSource)); +#line 1670 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp50_ = _tmp49_; +#line 1670 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp51_ = import_page_camera_import_job_new (_tmp47_, G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, TYPE_IMPORT_SOURCE, ImportSource), NULL); +#line 1670 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp52_ = _tmp51_; +#line 1670 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + batch_import_job_set_associated (G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, TYPE_BATCH_IMPORT_JOB, BatchImportJob), G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, TYPE_BATCH_IMPORT_JOB, BatchImportJob)); +#line 1670 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _batch_import_job_unref0 (_tmp52_); +#line 1670 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp50_); +#line 11207 "ImportPage.c" + } +#line 1674 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp53_ = jobs; +#line 1674 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp54_ = import_job; +#line 1674 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, GEE_TYPE_COLLECTION, GeeCollection), _tmp54_); +#line 1651 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _batch_import_job_unref0 (import_job); +#line 1651 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (import_file); +#line 1651 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (preview); +#line 1651 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (object); +#line 11223 "ImportPage.c" + } +#line 1651 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_object_it); +#line 11227 "ImportPage.c" + } +#line 1677 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp55_ = jobs; +#line 1677 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp56_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp55_, GEE_TYPE_COLLECTION, GeeCollection)); +#line 1677 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp57_ = _tmp56_; +#line 1677 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp58_ = self->priv->camera_name; +#line 1677 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_debug ("ImportPage.vala:1677: Importing %d files from %s", _tmp57_, _tmp58_); +#line 1679 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp59_ = jobs; +#line 1679 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp60_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp59_, GEE_TYPE_COLLECTION, GeeCollection)); +#line 1679 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp61_ = _tmp60_; +#line 1679 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp61_ > 0) { +#line 11247 "ImportPage.c" + ImportPage* _tmp62_ = NULL; + ImportPage* _tmp63_ = NULL; + BatchImport* batch_import = NULL; + SortedList* _tmp64_ = NULL; + const gchar* _tmp65_ = NULL; + GeeArrayList* _tmp66_ = NULL; + BatchImport* _tmp67_ = NULL; + BatchImport* _tmp68_ = NULL; + BatchImport* _tmp69_ = NULL; + LibraryWindow* _tmp70_ = NULL; + LibraryWindow* _tmp71_ = NULL; + BatchImport* _tmp72_ = NULL; + LibraryWindow* _tmp73_ = NULL; + LibraryWindow* _tmp74_ = NULL; +#line 1681 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp62_ = self->priv->local_ref; +#line 1681 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _vala_assert (_tmp62_ == NULL, "local_ref == null"); +#line 1682 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp63_ = _g_object_ref0 (self); +#line 1682 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->local_ref); +#line 1682 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->local_ref = _tmp63_; +#line 1684 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp64_ = jobs; +#line 1684 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp65_ = self->priv->camera_name; +#line 1684 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp66_ = already_imported; +#line 1684 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp67_ = batch_import_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp64_, GEE_TYPE_ITERABLE, GeeIterable), _tmp65_, _import_page_import_reporter_batch_import_import_reporter, self, NULL, _tmp66_, NULL, NULL, NULL); +#line 1684 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + batch_import = _tmp67_; +#line 1686 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp68_ = batch_import; +#line 1686 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_signal_connect_object (_tmp68_, "import-job-failed", (GCallback) _import_page_on_import_job_failed_batch_import_import_job_failed, self, 0); +#line 1687 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp69_ = batch_import; +#line 1687 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_signal_connect_object (_tmp69_, "import-complete", (GCallback) _import_page_close_import_batch_import_import_complete, self, 0); +#line 1689 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp70_ = library_window_get_app (); +#line 1689 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp71_ = _tmp70_; +#line 1689 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp72_ = batch_import; +#line 1689 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + library_window_enqueue_batch_import (_tmp71_, _tmp72_, TRUE); +#line 1689 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp71_); +#line 1690 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp73_ = library_window_get_app (); +#line 1690 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp74_ = _tmp73_; +#line 1690 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + library_window_switch_to_import_queue_page (_tmp74_); +#line 1690 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp74_); +#line 1679 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (batch_import); +#line 11310 "ImportPage.c" + } else { + GeeArrayList* _tmp75_ = NULL; + gint _tmp76_ = 0; + gint _tmp77_ = 0; +#line 1694 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp75_ = already_imported; +#line 1694 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp76_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp75_, GEE_TYPE_COLLECTION, GeeCollection)); +#line 1694 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp77_ = _tmp76_; +#line 1694 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp77_ > 0) { +#line 11323 "ImportPage.c" + GeeArrayList* _tmp78_ = NULL; + ImportManifest* _tmp79_ = NULL; + ImportManifest* _tmp80_ = NULL; +#line 1695 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp78_ = already_imported; +#line 1695 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp79_ = import_manifest_new (NULL, G_TYPE_CHECK_INSTANCE_CAST (_tmp78_, GEE_TYPE_LIST, GeeList)); +#line 1695 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp80_ = _tmp79_; +#line 1695 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_import_reporter (self, _tmp80_); +#line 1695 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _import_manifest_unref0 (_tmp80_); +#line 11337 "ImportPage.c" + } +#line 1697 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_close_import (self); +#line 11341 "ImportPage.c" + } +#line 1635 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (already_imported); +#line 1635 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (jobs); +#line 11347 "ImportPage.c" +} + + +static void import_page_on_import_job_failed (ImportPage* self, BatchImportResult* _result_) { + gboolean _tmp0_ = FALSE; + BatchImportResult* _tmp1_ = NULL; + GFile* _tmp2_ = NULL; + GError * _inner_error_ = NULL; +#line 1701 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_IMPORT_PAGE (self)); +#line 1701 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_BATCH_IMPORT_RESULT (_result_)); +#line 1702 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _result_; +#line 1702 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = _tmp1_->file; +#line 1702 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp2_ == NULL) { +#line 1702 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = TRUE; +#line 11368 "ImportPage.c" + } else { + BatchImportResult* _tmp3_ = NULL; + ImportResult _tmp4_ = 0; +#line 1702 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _result_; +#line 1702 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = _tmp3_->result; +#line 1702 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = _tmp4_ == IMPORT_RESULT_SUCCESS; +#line 11378 "ImportPage.c" + } +#line 1702 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp0_) { +#line 1703 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return; +#line 11384 "ImportPage.c" + } + { + BatchImportResult* _tmp5_ = NULL; + GFile* _tmp6_ = NULL; +#line 1707 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = _result_; +#line 1707 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = _tmp5_->file; +#line 1707 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_file_delete (_tmp6_, NULL, &_inner_error_); +#line 1707 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 11397 "ImportPage.c" + goto __catch68_g_error; + } + } + goto __finally68; + __catch68_g_error: + { + GError* err = NULL; + BatchImportResult* _tmp7_ = NULL; + GFile* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; + GError* _tmp11_ = NULL; + const gchar* _tmp12_ = NULL; +#line 1706 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + err = _inner_error_; +#line 1706 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _inner_error_ = NULL; +#line 1709 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = _result_; +#line 1709 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = _tmp7_->file; +#line 1709 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = g_file_get_path (_tmp8_); +#line 1709 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = _tmp9_; +#line 1709 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = err; +#line 1709 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = _tmp11_->message; +#line 1709 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_message ("ImportPage.vala:1709: Unable to delete downloaded file %s: %s", _tmp10_, _tmp12_); +#line 1709 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp10_); +#line 1706 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_error_free0 (err); +#line 11433 "ImportPage.c" + } + __finally68: +#line 1706 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1706 "/home/jens/Source/shotwell/src/camera/ImportPage.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 1706 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_clear_error (&_inner_error_); +#line 1706 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return; +#line 11444 "ImportPage.c" + } +} + + +static gpointer _batch_import_job_ref0 (gpointer self) { +#line 1753 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return self ? batch_import_job_ref (self) : NULL; +#line 11452 "ImportPage.c" +} + + +static gboolean _progress_dialog_monitor_progress_monitor (guint64 current, guint64 total, gboolean do_event_loop, gpointer self) { + gboolean result; + result = progress_dialog_monitor ((ProgressDialog*) self, current, total, do_event_loop); +#line 1760 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 11461 "ImportPage.c" +} + + +static void import_page_import_reporter (ImportPage* self, ImportManifest* manifest) { + ImportPage* local_ref = NULL; + ImportPage* _tmp0_ = NULL; + ImportPage* _tmp1_ = NULL; + ImportManifest* _tmp2_ = NULL; + GeeList* _tmp3_ = NULL; + gint _tmp4_ = 0; + gint _tmp5_ = 0; + Marker* marker = NULL; + SourceCollection* _tmp60_ = NULL; + Marker* _tmp61_ = NULL; + ProgressDialog* progress = NULL; + AppWindow* _tmp81_ = NULL; + AppWindow* _tmp82_ = NULL; + const gchar* _tmp83_ = NULL; + GCancellable* _tmp84_ = NULL; + GCancellable* _tmp85_ = NULL; + ProgressDialog* _tmp86_ = NULL; + ProgressDialog* _tmp87_ = NULL; + gint error_count = 0; + SourceCollection* _tmp88_ = NULL; + Marker* _tmp89_ = NULL; + ProgressDialog* _tmp90_ = NULL; + gint _tmp91_ = 0; + gint _tmp92_ = 0; + ProgressDialog* _tmp98_ = NULL; +#line 1713 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_IMPORT_PAGE (self)); +#line 1713 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_IMPORT_MANIFEST (manifest)); +#line 1719 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->local_ref; +#line 1719 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 1719 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + local_ref = _tmp1_; +#line 1720 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->local_ref); +#line 1720 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->local_ref = NULL; +#line 1722 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = manifest; +#line 1722 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _tmp2_->success; +#line 1722 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection)); +#line 1722 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = _tmp4_; +#line 1722 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp5_ > 0) { +#line 11515 "ImportPage.c" + gchar* photos_string = NULL; + ImportManifest* _tmp6_ = NULL; + GeeList* _tmp7_ = NULL; + gint _tmp8_ = 0; + gint _tmp9_ = 0; + const gchar* _tmp10_ = NULL; + ImportManifest* _tmp11_ = NULL; + GeeList* _tmp12_ = NULL; + gint _tmp13_ = 0; + gint _tmp14_ = 0; + gchar* _tmp15_ = NULL; + gchar* videos_string = NULL; + ImportManifest* _tmp16_ = NULL; + GeeList* _tmp17_ = NULL; + gint _tmp18_ = 0; + gint _tmp19_ = 0; + const gchar* _tmp20_ = NULL; + ImportManifest* _tmp21_ = NULL; + GeeList* _tmp22_ = NULL; + gint _tmp23_ = 0; + gint _tmp24_ = 0; + gchar* _tmp25_ = NULL; + gchar* both_string = NULL; + ImportManifest* _tmp26_ = NULL; + GeeList* _tmp27_ = NULL; + gint _tmp28_ = 0; + gint _tmp29_ = 0; + const gchar* _tmp30_ = NULL; + ImportManifest* _tmp31_ = NULL; + GeeList* _tmp32_ = NULL; + gint _tmp33_ = 0; + gint _tmp34_ = 0; + gchar* _tmp35_ = NULL; + gchar* neither_string = NULL; + ImportManifest* _tmp36_ = NULL; + GeeList* _tmp37_ = NULL; + gint _tmp38_ = 0; + gint _tmp39_ = 0; + const gchar* _tmp40_ = NULL; + ImportManifest* _tmp41_ = NULL; + GeeList* _tmp42_ = NULL; + gint _tmp43_ = 0; + gint _tmp44_ = 0; + gchar* _tmp45_ = NULL; + gchar* question_string = NULL; + ImportManifest* _tmp46_ = NULL; + GeeList* _tmp47_ = NULL; + const gchar* _tmp48_ = NULL; + const gchar* _tmp49_ = NULL; + const gchar* _tmp50_ = NULL; + const gchar* _tmp51_ = NULL; + gchar* _tmp52_ = NULL; + ImportUIQuestionParams* question = NULL; + const gchar* _tmp53_ = NULL; + const gchar* _tmp54_ = NULL; + ImportUIQuestionParams* _tmp55_ = NULL; + ImportManifest* _tmp56_ = NULL; + ImportUIQuestionParams* _tmp57_ = NULL; + gboolean _tmp58_ = FALSE; +#line 1723 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = manifest; +#line 1723 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = _tmp6_->success; +#line 1723 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_COLLECTION, GeeCollection)); +#line 1723 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = _tmp8_; +#line 1723 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = ngettext ("Delete this photo from camera?", "Delete these %d photos from camera?", (gulong) _tmp9_); +#line 1723 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = manifest; +#line 1723 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = _tmp11_->success; +#line 1723 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_COLLECTION, GeeCollection)); +#line 1723 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = _tmp13_; +#line 1723 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = g_strdup_printf (_tmp10_, _tmp14_); +#line 1723 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + photos_string = _tmp15_; +#line 1726 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp16_ = manifest; +#line 1726 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = _tmp16_->success; +#line 1726 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp18_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, GEE_TYPE_COLLECTION, GeeCollection)); +#line 1726 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp19_ = _tmp18_; +#line 1726 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp20_ = ngettext ("Delete this video from camera?", "Delete these %d videos from camera?", (gulong) _tmp19_); +#line 1726 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp21_ = manifest; +#line 1726 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp22_ = _tmp21_->success; +#line 1726 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp23_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, GEE_TYPE_COLLECTION, GeeCollection)); +#line 1726 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp24_ = _tmp23_; +#line 1726 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp25_ = g_strdup_printf (_tmp20_, _tmp24_); +#line 1726 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + videos_string = _tmp25_; +#line 1729 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp26_ = manifest; +#line 1729 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp27_ = _tmp26_->success; +#line 1729 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp28_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_COLLECTION, GeeCollection)); +#line 1729 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp29_ = _tmp28_; +#line 1729 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp30_ = ngettext ("Delete this photo/video from camera?", "Delete these %d photos/videos from camera?", (gulong) _tmp29_); +#line 1729 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp31_ = manifest; +#line 1729 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp32_ = _tmp31_->success; +#line 1729 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp33_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, GEE_TYPE_COLLECTION, GeeCollection)); +#line 1729 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp34_ = _tmp33_; +#line 1729 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp35_ = g_strdup_printf (_tmp30_, _tmp34_); +#line 1729 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + both_string = _tmp35_; +#line 1732 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp36_ = manifest; +#line 1732 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp37_ = _tmp36_->success; +#line 1732 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp38_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, GEE_TYPE_COLLECTION, GeeCollection)); +#line 1732 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp39_ = _tmp38_; +#line 1732 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp40_ = ngettext ("Delete these files from camera?", "Delete these %d files from camera?", (gulong) _tmp39_); +#line 1732 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp41_ = manifest; +#line 1732 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp42_ = _tmp41_->success; +#line 1732 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp43_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, GEE_TYPE_COLLECTION, GeeCollection)); +#line 1732 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp44_ = _tmp43_; +#line 1732 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp45_ = g_strdup_printf (_tmp40_, _tmp44_); +#line 1732 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + neither_string = _tmp45_; +#line 1736 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp46_ = manifest; +#line 1736 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp47_ = _tmp46_->success; +#line 1736 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp48_ = photos_string; +#line 1736 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp49_ = videos_string; +#line 1736 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp50_ = both_string; +#line 1736 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp51_ = neither_string; +#line 1736 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp52_ = import_ui_get_media_specific_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, GEE_TYPE_COLLECTION, GeeCollection), _tmp48_, _tmp49_, _tmp50_, _tmp51_); +#line 1736 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + question_string = _tmp52_; +#line 1739 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp53_ = question_string; +#line 1739 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp54_ = _ ("_Keep"); +#line 1739 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp55_ = import_ui_question_params_new (_tmp53_, RESOURCES_DELETE_LABEL, _tmp54_); +#line 1739 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + question = _tmp55_; +#line 1742 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp56_ = manifest; +#line 1742 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp57_ = question; +#line 1742 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp58_ = import_ui_report_manifest (_tmp56_, FALSE, _tmp57_); +#line 1742 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp58_) { +#line 1743 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _import_ui_question_params_unref0 (question); +#line 1743 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (question_string); +#line 1743 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (neither_string); +#line 1743 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (both_string); +#line 1743 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (videos_string); +#line 1743 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (photos_string); +#line 1743 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (local_ref); +#line 1743 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return; +#line 11711 "ImportPage.c" + } +#line 1722 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _import_ui_question_params_unref0 (question); +#line 1722 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (question_string); +#line 1722 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (neither_string); +#line 1722 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (both_string); +#line 1722 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (videos_string); +#line 1722 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (photos_string); +#line 11725 "ImportPage.c" + } else { + ImportManifest* _tmp59_ = NULL; +#line 1745 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp59_ = manifest; +#line 1745 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_ui_report_manifest (_tmp59_, FALSE, NULL); +#line 1746 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (local_ref); +#line 1746 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return; +#line 11736 "ImportPage.c" + } +#line 1751 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp60_ = self->priv->import_sources; +#line 1751 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp61_ = data_collection_start_marking (G_TYPE_CHECK_INSTANCE_CAST (_tmp60_, TYPE_DATA_COLLECTION, DataCollection)); +#line 1751 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + marker = _tmp61_; +#line 11744 "ImportPage.c" + { + GeeList* _batch_result_list = NULL; + ImportManifest* _tmp62_ = NULL; + GeeList* _tmp63_ = NULL; + GeeList* _tmp64_ = NULL; + gint _batch_result_size = 0; + GeeList* _tmp65_ = NULL; + gint _tmp66_ = 0; + gint _tmp67_ = 0; + gint _batch_result_index = 0; +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp62_ = manifest; +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp63_ = _tmp62_->success; +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp64_ = _g_object_ref0 (_tmp63_); +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _batch_result_list = _tmp64_; +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp65_ = _batch_result_list; +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp66_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp65_, GEE_TYPE_COLLECTION, GeeCollection)); +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp67_ = _tmp66_; +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _batch_result_size = _tmp67_; +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _batch_result_index = -1; +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + while (TRUE) { +#line 11775 "ImportPage.c" + gint _tmp68_ = 0; + gint _tmp69_ = 0; + gint _tmp70_ = 0; + BatchImportResult* batch_result = NULL; + GeeList* _tmp71_ = NULL; + gint _tmp72_ = 0; + gpointer _tmp73_ = NULL; + ImportPageCameraImportJob* job = NULL; + BatchImportResult* _tmp74_ = NULL; + BatchImportJob* _tmp75_ = NULL; + ImportPageCameraImportJob* _tmp76_ = NULL; + Marker* _tmp77_ = NULL; + ImportPageCameraImportJob* _tmp78_ = NULL; + ImportSource* _tmp79_ = NULL; + ImportSource* _tmp80_ = NULL; +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp68_ = _batch_result_index; +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _batch_result_index = _tmp68_ + 1; +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp69_ = _batch_result_index; +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp70_ = _batch_result_size; +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!(_tmp69_ < _tmp70_)) { +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + break; +#line 11803 "ImportPage.c" + } +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp71_ = _batch_result_list; +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp72_ = _batch_result_index; +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp73_ = gee_list_get (_tmp71_, _tmp72_); +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + batch_result = (BatchImportResult*) _tmp73_; +#line 1753 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp74_ = batch_result; +#line 1753 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp75_ = _tmp74_->job; +#line 1753 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp76_ = _batch_import_job_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp75_, IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB) ? ((ImportPageCameraImportJob*) _tmp75_) : NULL); +#line 1753 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + job = _tmp76_; +#line 1755 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp77_ = marker; +#line 1755 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp78_ = job; +#line 1755 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp79_ = import_page_camera_import_job_get_source (_tmp78_); +#line 1755 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp80_ = _tmp79_; +#line 1755 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + marker_mark (_tmp77_, G_TYPE_CHECK_INSTANCE_CAST (_tmp80_, TYPE_DATA_OBJECT, DataObject)); +#line 1755 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp80_); +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _batch_import_job_unref0 (job); +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _batch_import_result_unref0 (batch_result); +#line 11837 "ImportPage.c" + } +#line 1752 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_batch_result_list); +#line 11841 "ImportPage.c" + } +#line 1758 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp81_ = app_window_get_instance (); +#line 1758 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp82_ = _tmp81_; +#line 1758 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp83_ = _ ("Removing photos/videos from camera"); +#line 1758 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp84_ = g_cancellable_new (); +#line 1758 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp85_ = _tmp84_; +#line 1758 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp86_ = progress_dialog_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp82_, gtk_window_get_type (), GtkWindow), _tmp83_, _tmp85_); +#line 1758 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_ref_sink (_tmp86_); +#line 1758 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp87_ = _tmp86_; +#line 1758 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp85_); +#line 1758 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp82_); +#line 1758 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + progress = _tmp87_; +#line 1760 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp88_ = self->priv->import_sources; +#line 1760 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp89_ = marker; +#line 1760 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp90_ = progress; +#line 1760 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp91_ = source_collection_destroy_marked (_tmp88_, _tmp89_, TRUE, _progress_dialog_monitor_progress_monitor, _tmp90_, NULL); +#line 1760 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + error_count = _tmp91_; +#line 1761 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp92_ = error_count; +#line 1761 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp92_ > 0) { +#line 11879 "ImportPage.c" + gchar* error_string = NULL; + gint _tmp93_ = 0; + const gchar* _tmp94_ = NULL; + gint _tmp95_ = 0; + gchar* _tmp96_ = NULL; + const gchar* _tmp97_ = NULL; +#line 1762 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp93_ = error_count; +#line 1762 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp94_ = ngettext ("Unable to delete %d photo/video from the camera due to errors.", "Unable to delete %d photos/videos from the camera due to errors.", (gulong) _tmp93_); +#line 1762 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp95_ = error_count; +#line 1762 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp96_ = g_strdup_printf (_tmp94_, _tmp95_); +#line 1762 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + error_string = _tmp96_; +#line 1766 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp97_ = error_string; +#line 1766 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + app_window_error_message (_tmp97_, NULL); +#line 1761 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (error_string); +#line 11902 "ImportPage.c" + } +#line 1769 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp98_ = progress; +#line 1769 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + progress_dialog_close (_tmp98_); +#line 1772 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (local_ref); +#line 1772 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + local_ref = NULL; +#line 1713 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (progress); +#line 1713 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (marker); +#line 1713 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (local_ref); +#line 11918 "ImportPage.c" +} + + +static void import_page_close_import (ImportPage* self) { + int res = 0; + Camera* _tmp0_ = NULL; + GPSpinIdleWrapper* _tmp1_ = NULL; + GPContext* _tmp2_ = NULL; + int _tmp3_ = 0; + int _tmp4_ = 0; + gboolean _tmp8_ = FALSE; +#line 1775 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_IMPORT_PAGE (self)); +#line 1776 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->camera; +#line 1776 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = import_page_spin_idle_context; +#line 1776 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GP_TYPE_CONTEXT_WRAPPER, GPContextWrapper)->context; +#line 1776 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = gp_camera_exit (_tmp0_, _tmp2_); +#line 1776 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + res = _tmp3_; +#line 1777 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = res; +#line 1777 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp4_ != GP_OK) { +#line 11946 "ImportPage.c" + int _tmp5_ = 0; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; +#line 1779 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = res; +#line 1779 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = gp_result_to_full_string (_tmp5_); +#line 1779 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = _tmp6_; +#line 1779 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_message ("ImportPage.vala:1779: Unable to unlock camera: %s", _tmp7_); +#line 1779 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp7_); +#line 11960 "ImportPage.c" + } +#line 1782 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = self->priv->refreshed; +#line 1782 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_update_status (self, FALSE, _tmp8_); +#line 1784 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_on_view_changed (self); +#line 11968 "ImportPage.c" +} + + +static void import_page_real_set_display_titles (CheckerboardPage* base, gboolean display) { + ImportPage * self; + gboolean _tmp0_ = FALSE; + GtkToggleAction* action = NULL; + GtkAction* _tmp1_ = NULL; + GtkToggleAction* _tmp2_ = NULL; + GtkToggleAction* _tmp3_ = NULL; +#line 1787 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_IMPORT_PAGE, ImportPage); +#line 1788 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = display; +#line 1788 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + CHECKERBOARD_PAGE_CLASS (import_page_parent_class)->set_display_titles (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_PAGE, CheckerboardPage), _tmp0_); +#line 1790 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = page_get_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ViewTitle"); +#line 1790 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, gtk_toggle_action_get_type ()) ? ((GtkToggleAction*) _tmp1_) : NULL; +#line 1790 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp2_ == NULL) { +#line 1790 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp1_); +#line 11993 "ImportPage.c" + } +#line 1790 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + action = _tmp2_; +#line 1791 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = action; +#line 1791 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp3_ != NULL) { +#line 12001 "ImportPage.c" + GtkToggleAction* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; +#line 1792 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = action; +#line 1792 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = display; +#line 1792 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gtk_toggle_action_set_active (_tmp4_, _tmp5_); +#line 12010 "ImportPage.c" + } +#line 1787 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (action); +#line 12014 "ImportPage.c" +} + + +static gpointer _view_filter_ref0 (gpointer self) { +#line 1797 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return self ? view_filter_ref (self) : NULL; +#line 12021 "ImportPage.c" +} + + +static SearchViewFilter* import_page_real_get_search_view_filter (CheckerboardPage* base) { + ImportPage * self; + SearchViewFilter* result = NULL; + ImportPageImportPageSearchViewFilter* _tmp0_ = NULL; + SearchViewFilter* _tmp1_ = NULL; +#line 1796 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_IMPORT_PAGE, ImportPage); +#line 1797 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->search_filter; +#line 1797 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _view_filter_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SEARCH_VIEW_FILTER, SearchViewFilter)); +#line 1797 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 1797 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 12040 "ImportPage.c" +} + + +static ImportPageImportViewManager* import_page_import_view_manager_construct (GType object_type, ImportPage* owner) { + ImportPageImportViewManager* self = NULL; + ImportPage* _tmp0_ = NULL; + ImportPage* _tmp1_ = NULL; +#line 463 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_PAGE (owner), NULL); +#line 463 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = (ImportPageImportViewManager*) view_manager_construct (object_type); +#line 464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = owner; +#line 464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->owner); +#line 464 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->owner = _tmp1_; +#line 463 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return self; +#line 12062 "ImportPage.c" +} + + +static ImportPageImportViewManager* import_page_import_view_manager_new (ImportPage* owner) { +#line 463 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return import_page_import_view_manager_construct (IMPORT_PAGE_TYPE_IMPORT_VIEW_MANAGER, owner); +#line 12069 "ImportPage.c" +} + + +static DataView* import_page_import_view_manager_real_create_view (ViewManager* base, DataSource* source) { + ImportPageImportViewManager * self; + DataView* result = NULL; + DataSource* _tmp0_ = NULL; + ImportPreview* _tmp1_ = NULL; +#line 467 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, IMPORT_PAGE_TYPE_IMPORT_VIEW_MANAGER, ImportPageImportViewManager); +#line 467 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_DATA_SOURCE (source), NULL); +#line 468 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = source; +#line 468 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = import_preview_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_IMPORT_SOURCE, ImportSource)); +#line 468 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_VIEW, DataView); +#line 468 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 12090 "ImportPage.c" +} + + +static void import_page_import_view_manager_class_init (ImportPageImportViewManagerClass * klass) { +#line 460 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_import_view_manager_parent_class = g_type_class_peek_parent (klass); +#line 460 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((ViewManagerClass *) klass)->finalize = import_page_import_view_manager_finalize; +#line 460 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_type_class_add_private (klass, sizeof (ImportPageImportViewManagerPrivate)); +#line 460 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((ViewManagerClass *) klass)->create_view = import_page_import_view_manager_real_create_view; +#line 12103 "ImportPage.c" +} + + +static void import_page_import_view_manager_instance_init (ImportPageImportViewManager * self) { +#line 460 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv = IMPORT_PAGE_IMPORT_VIEW_MANAGER_GET_PRIVATE (self); +#line 12110 "ImportPage.c" +} + + +static void import_page_import_view_manager_finalize (ViewManager* obj) { + ImportPageImportViewManager * self; +#line 460 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, IMPORT_PAGE_TYPE_IMPORT_VIEW_MANAGER, ImportPageImportViewManager); +#line 461 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->owner); +#line 460 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + VIEW_MANAGER_CLASS (import_page_import_view_manager_parent_class)->finalize (obj); +#line 12122 "ImportPage.c" +} + + +static GType import_page_import_view_manager_get_type (void) { + static volatile gsize import_page_import_view_manager_type_id__volatile = 0; + if (g_once_init_enter (&import_page_import_view_manager_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (ImportPageImportViewManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) import_page_import_view_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ImportPageImportViewManager), 0, (GInstanceInitFunc) import_page_import_view_manager_instance_init, NULL }; + GType import_page_import_view_manager_type_id; + import_page_import_view_manager_type_id = g_type_register_static (TYPE_VIEW_MANAGER, "ImportPageImportViewManager", &g_define_type_info, 0); + g_once_init_leave (&import_page_import_view_manager_type_id__volatile, import_page_import_view_manager_type_id); + } + return import_page_import_view_manager_type_id__volatile; +} + + +static gpointer _gp_context_wrapper_ref0 (gpointer self) { +#line 487 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return self ? gp_context_wrapper_ref (self) : NULL; +#line 12141 "ImportPage.c" +} + + +static ImportPageCameraImportJob* import_page_camera_import_job_construct (GType object_type, GPContextWrapper* context, ImportSource* import_file, DuplicatedFile* duplicated_file) { + ImportPageCameraImportJob* self = NULL; + GPContextWrapper* _tmp0_ = NULL; + GPContextWrapper* _tmp1_ = NULL; + ImportSource* _tmp2_ = NULL; + ImportSource* _tmp3_ = NULL; + DuplicatedFile* _tmp4_ = NULL; + DuplicatedFile* _tmp5_ = NULL; + ImportSource* _tmp6_ = NULL; + Camera* _tmp7_ = NULL; + ImportSource* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + const gchar* _tmp10_ = NULL; + ImportSource* _tmp11_ = NULL; + gchar* _tmp12_ = NULL; + ImportSource* _tmp13_ = NULL; + gulong _tmp14_ = 0UL; + PhotoMetadata* _tmp15_ = NULL; + ImportSource* _tmp16_ = NULL; + PhotoMetadata* _tmp19_ = NULL; + ImportSource* _tmp20_ = NULL; + time_t _tmp21_ = 0; +#line 485 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (GP_IS_CONTEXT_WRAPPER (context), NULL); +#line 485 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_IMPORT_SOURCE (import_file), NULL); +#line 485 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail ((duplicated_file == NULL) || IS_DUPLICATED_FILE (duplicated_file), NULL); +#line 485 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = (ImportPageCameraImportJob*) batch_import_job_construct (object_type); +#line 487 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = context; +#line 487 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _gp_context_wrapper_ref0 (_tmp0_); +#line 487 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_context_wrapper_unref0 (self->priv->context); +#line 487 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->context = _tmp1_; +#line 488 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = import_file; +#line 488 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = _g_object_ref0 (_tmp2_); +#line 488 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->import_file); +#line 488 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->import_file = _tmp3_; +#line 489 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = duplicated_file; +#line 489 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = _g_object_ref0 (_tmp4_); +#line 489 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->duplicated_file); +#line 489 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->duplicated_file = _tmp5_; +#line 492 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = import_file; +#line 492 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = import_source_get_camera (_tmp6_); +#line 492 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_camera_unref0 (self->priv->camera); +#line 492 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->camera = _tmp7_; +#line 493 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = import_file; +#line 493 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = import_source_get_fulldir (_tmp8_); +#line 493 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->fulldir); +#line 493 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->fulldir = _tmp9_; +#line 495 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = self->priv->fulldir; +#line 495 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _vala_assert (_tmp10_ != NULL, "fulldir != null"); +#line 496 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = import_file; +#line 496 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = import_source_get_filename (_tmp11_); +#line 496 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->filename); +#line 496 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->filename = _tmp12_; +#line 497 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = import_file; +#line 497 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = import_source_get_filesize (_tmp13_); +#line 497 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->filesize = (guint64) _tmp14_; +#line 498 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp16_ = import_file; +#line 498 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, TYPE_PHOTO_IMPORT_SOURCE)) { +#line 12237 "ImportPage.c" + ImportSource* _tmp17_ = NULL; + PhotoMetadata* _tmp18_ = NULL; +#line 499 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = import_file; +#line 499 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp18_ = photo_import_source_get_metadata (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, TYPE_PHOTO_IMPORT_SOURCE) ? ((PhotoImportSource*) _tmp17_) : NULL); +#line 499 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _media_metadata_unref0 (_tmp15_); +#line 499 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = _tmp18_; +#line 12248 "ImportPage.c" + } else { +#line 499 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _media_metadata_unref0 (_tmp15_); +#line 499 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = NULL; +#line 12254 "ImportPage.c" + } +#line 498 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp19_ = _media_metadata_ref0 (_tmp15_); +#line 498 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _media_metadata_unref0 (self->priv->metadata); +#line 498 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->metadata = _tmp19_; +#line 500 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp20_ = import_file; +#line 500 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp21_ = import_source_get_exposure_time (_tmp20_); +#line 500 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->exposure_time = _tmp21_; +#line 485 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _media_metadata_unref0 (_tmp15_); +#line 485 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return self; +#line 12272 "ImportPage.c" +} + + +static ImportPageCameraImportJob* import_page_camera_import_job_new (GPContextWrapper* context, ImportSource* import_file, DuplicatedFile* duplicated_file) { +#line 485 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return import_page_camera_import_job_construct (IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, context, import_file, duplicated_file); +#line 12279 "ImportPage.c" +} + + +static time_t import_page_camera_import_job_get_exposure_time (ImportPageCameraImportJob* self) { + time_t result = 0; + time_t _tmp0_ = 0; +#line 503 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IMPORT_PAGE_IS_CAMERA_IMPORT_JOB (self), 0); +#line 504 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->exposure_time; +#line 504 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 504 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 12294 "ImportPage.c" +} + + +static DuplicatedFile* import_page_camera_import_job_real_get_duplicated_file (BatchImportJob* base) { + ImportPageCameraImportJob * self; + DuplicatedFile* result = NULL; + DuplicatedFile* _tmp0_ = NULL; + DuplicatedFile* _tmp1_ = NULL; +#line 507 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, ImportPageCameraImportJob); +#line 508 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->duplicated_file; +#line 508 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 508 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 508 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 12313 "ImportPage.c" +} + + +static time_t import_page_camera_import_job_real_get_exposure_time_override (BatchImportJob* base) { + ImportPageCameraImportJob * self; + time_t result = 0; + time_t _tmp0_ = 0; + ImportSource* _tmp1_ = NULL; +#line 511 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, ImportPageCameraImportJob); +#line 512 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = self->priv->import_file; +#line 512 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, TYPE_VIDEO_IMPORT_SOURCE)) { +#line 12328 "ImportPage.c" + time_t _tmp2_ = 0; +#line 512 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = import_page_camera_import_job_get_exposure_time (self); +#line 512 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = _tmp2_; +#line 12334 "ImportPage.c" + } else { +#line 512 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = (time_t) 0; +#line 12338 "ImportPage.c" + } +#line 512 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp0_; +#line 512 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 12344 "ImportPage.c" +} + + +static gchar* import_page_camera_import_job_real_get_dest_identifier (BatchImportJob* base) { + ImportPageCameraImportJob * self; + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 515 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, ImportPageCameraImportJob); +#line 516 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->filename; +#line 516 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 516 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 516 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 12363 "ImportPage.c" +} + + +static gchar* import_page_camera_import_job_real_get_source_identifier (BatchImportJob* base) { + ImportPageCameraImportJob * self; + gchar* result = NULL; + ImportSource* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 519 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, ImportPageCameraImportJob); +#line 520 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->import_file; +#line 520 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = import_source_get_filename (_tmp0_); +#line 520 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 520 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 12382 "ImportPage.c" +} + + +static gchar* import_page_camera_import_job_real_get_basename (BatchImportJob* base) { + ImportPageCameraImportJob * self; + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 523 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, ImportPageCameraImportJob); +#line 524 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->filename; +#line 524 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 524 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 524 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 12401 "ImportPage.c" +} + + +static gchar* import_page_camera_import_job_real_get_path (BatchImportJob* base) { + ImportPageCameraImportJob * self; + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 527 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, ImportPageCameraImportJob); +#line 528 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->fulldir; +#line 528 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 528 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 528 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 12420 "ImportPage.c" +} + + +static void import_page_camera_import_job_real_set_associated (BatchImportJob* base, BatchImportJob* associated) { + ImportPageCameraImportJob * self; + BatchImportJob* _tmp0_ = NULL; + ImportPageCameraImportJob* _tmp1_ = NULL; +#line 531 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, ImportPageCameraImportJob); +#line 531 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_if_fail (IS_BATCH_IMPORT_JOB (associated)); +#line 532 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = associated; +#line 532 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _batch_import_job_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB) ? ((ImportPageCameraImportJob*) _tmp0_) : NULL); +#line 532 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _batch_import_job_unref0 (self->priv->associated); +#line 532 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->associated = _tmp1_; +#line 12440 "ImportPage.c" +} + + +static ImportSource* import_page_camera_import_job_get_source (ImportPageCameraImportJob* self) { + ImportSource* result = NULL; + ImportSource* _tmp0_ = NULL; + ImportSource* _tmp1_ = NULL; +#line 535 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IMPORT_PAGE_IS_CAMERA_IMPORT_JOB (self), NULL); +#line 536 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->import_file; +#line 536 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 536 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = _tmp1_; +#line 536 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 12458 "ImportPage.c" +} + + +static gboolean import_page_camera_import_job_real_is_directory (BatchImportJob* base) { + ImportPageCameraImportJob * self; + gboolean result = FALSE; +#line 539 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, ImportPageCameraImportJob); +#line 540 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 540 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 12471 "ImportPage.c" +} + + +static gboolean import_page_camera_import_job_real_determine_file_size (BatchImportJob* base, guint64* filesize, GFile** file) { + ImportPageCameraImportJob * self; + guint64 _vala_filesize = 0ULL; + GFile* _vala_file = NULL; + gboolean result = FALSE; + guint64 _tmp0_ = 0ULL; +#line 543 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, ImportPageCameraImportJob); +#line 544 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_vala_file); +#line 544 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _vala_file = NULL; +#line 545 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = self->priv->filesize; +#line 545 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _vala_filesize = _tmp0_; +#line 547 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = TRUE; +#line 547 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (filesize) { +#line 547 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + *filesize = _vala_filesize; +#line 12497 "ImportPage.c" + } +#line 547 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (file) { +#line 547 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + *file = _vala_file; +#line 12503 "ImportPage.c" + } else { +#line 547 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_vala_file); +#line 12507 "ImportPage.c" + } +#line 547 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 12511 "ImportPage.c" +} + + +static gboolean import_page_camera_import_job_real_prepare (BatchImportJob* base, GFile** file_to_import, gboolean* copy_to_library, GError** error) { + ImportPageCameraImportJob * self; + GFile* _vala_file_to_import = NULL; + gboolean _vala_copy_to_library = FALSE; + gboolean result = FALSE; + GFile* dest_file = NULL; + GFile* _tmp12_ = NULL; + GFile* _tmp16_ = NULL; + ImportPageCameraImportJob* _tmp24_ = NULL; + GFile* _tmp55_ = NULL; + GFile* _tmp56_ = NULL; + GError * _inner_error_ = NULL; +#line 550 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, ImportPageCameraImportJob); +#line 551 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_vala_file_to_import); +#line 551 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _vala_file_to_import = NULL; +#line 552 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _vala_copy_to_library = FALSE; +#line 554 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + dest_file = NULL; +#line 12537 "ImportPage.c" + { + gboolean collision = FALSE; + GFile* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + PhotoMetadata* _tmp2_ = NULL; + time_t _tmp3_ = 0; + gboolean _tmp4_ = FALSE; + GFile* _tmp5_ = NULL; + GFile* _tmp6_ = NULL; +#line 557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = self->priv->filename; +#line 557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = self->priv->metadata; +#line 557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = self->priv->exposure_time; +#line 557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = library_files_generate_unique_file (_tmp1_, G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_MEDIA_METADATA, MediaMetadata), _tmp3_, &_tmp4_, &_inner_error_); +#line 557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + collision = _tmp4_; +#line 557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = _tmp5_; +#line 557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 12561 "ImportPage.c" + goto __catch69_g_error; + } +#line 557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = _tmp0_; +#line 557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = NULL; +#line 557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (dest_file); +#line 557 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + dest_file = _tmp6_; +#line 555 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp0_); +#line 12574 "ImportPage.c" + } + goto __finally69; + __catch69_g_error: + { + GError* err = NULL; + ImportSource* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + GError* _tmp10_ = NULL; + const gchar* _tmp11_ = NULL; +#line 555 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + err = _inner_error_; +#line 555 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _inner_error_ = NULL; +#line 560 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = self->priv->import_file; +#line 560 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = import_source_get_filename (_tmp7_); +#line 560 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = _tmp8_; +#line 560 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = err; +#line 560 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = _tmp10_->message; +#line 560 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_warning ("ImportPage.vala:560: Unable to generate local file for %s: %s", _tmp9_, _tmp11_); +#line 560 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp9_); +#line 555 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_error_free0 (err); +#line 12605 "ImportPage.c" + } + __finally69: +#line 555 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 555 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_propagate_error (error, _inner_error_); +#line 555 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (dest_file); +#line 555 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return FALSE; +#line 12616 "ImportPage.c" + } +#line 564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = dest_file; +#line 564 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp12_ == NULL) { +#line 12622 "ImportPage.c" + ImportSource* _tmp13_ = NULL; + gchar* _tmp14_ = NULL; + gchar* _tmp15_ = NULL; +#line 565 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = self->priv->import_file; +#line 565 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = import_source_get_filename (_tmp13_); +#line 565 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = _tmp14_; +#line 565 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_message ("ImportPage.vala:565: Unable to generate local file for %s", _tmp15_); +#line 565 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp15_); +#line 567 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 567 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (dest_file); +#line 567 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (file_to_import) { +#line 567 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + *file_to_import = _vala_file_to_import; +#line 12644 "ImportPage.c" + } else { +#line 567 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_vala_file_to_import); +#line 12648 "ImportPage.c" + } +#line 567 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (copy_to_library) { +#line 567 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + *copy_to_library = _vala_copy_to_library; +#line 12654 "ImportPage.c" + } +#line 567 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 12658 "ImportPage.c" + } +#line 572 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp16_ = dest_file; +#line 572 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + library_monitor_blacklist_file (_tmp16_, "CameraImportJob.prepare"); +#line 12664 "ImportPage.c" + { + GPContextWrapper* _tmp17_ = NULL; + GPContext* _tmp18_ = NULL; + Camera* _tmp19_ = NULL; + const gchar* _tmp20_ = NULL; + const gchar* _tmp21_ = NULL; + GFile* _tmp22_ = NULL; +#line 574 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = self->priv->context; +#line 574 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp18_ = _tmp17_->context; +#line 574 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp19_ = self->priv->camera; +#line 574 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp20_ = self->priv->fulldir; +#line 574 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp21_ = self->priv->filename; +#line 574 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp22_ = dest_file; +#line 574 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gp_save_image (_tmp18_, _tmp19_, _tmp20_, _tmp21_, _tmp22_, &_inner_error_); +#line 574 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 12688 "ImportPage.c" + goto __finally70; + } + } + __finally70: + { + GFile* _tmp23_ = NULL; +#line 576 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp23_ = dest_file; +#line 576 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + library_monitor_unblacklist_file (_tmp23_); +#line 12699 "ImportPage.c" + } +#line 573 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 573 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_propagate_error (error, _inner_error_); +#line 573 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (dest_file); +#line 573 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return FALSE; +#line 12709 "ImportPage.c" + } +#line 580 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp24_ = self->priv->associated; +#line 580 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp24_ != NULL) { +#line 12715 "ImportPage.c" + BackingPhotoRow* _tmp39_ = NULL; + GFile* assoc_dest = NULL; + BackingPhotoRow* _tmp42_ = NULL; + const gchar* _tmp43_ = NULL; + GFile* _tmp44_ = NULL; + GFile* _tmp45_ = NULL; + { + BackingPhotoRow* _tmp25_ = NULL; + GFile* _tmp26_ = NULL; + gchar* _tmp27_ = NULL; + gchar* _tmp28_ = NULL; + ImportPageCameraImportJob* _tmp29_ = NULL; + gchar* _tmp30_ = NULL; + gchar* _tmp31_ = NULL; + BackingPhotoRow* _tmp32_ = NULL; + BackingPhotoRow* _tmp33_ = NULL; + BackingPhotoRow* _tmp34_ = NULL; +#line 583 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp26_ = dest_file; +#line 583 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp27_ = g_file_get_path (_tmp26_); +#line 583 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp28_ = _tmp27_; +#line 583 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp29_ = self->priv->associated; +#line 583 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp30_ = batch_import_job_get_basename (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_BATCH_IMPORT_JOB, BatchImportJob)); +#line 583 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp31_ = _tmp30_; +#line 583 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp32_ = raw_developer_create_backing_row_for_development (RAW_DEVELOPER_CAMERA, _tmp28_, _tmp31_, &_inner_error_); +#line 583 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp33_ = _tmp32_; +#line 583 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp31_); +#line 583 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (_tmp28_); +#line 583 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp25_ = _tmp33_; +#line 583 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 12757 "ImportPage.c" + goto __catch71_g_error; + } +#line 582 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp34_ = _tmp25_; +#line 582 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp25_ = NULL; +#line 582 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _backing_photo_row_unref0 (self->priv->associated_file); +#line 582 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->associated_file = _tmp34_; +#line 581 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _backing_photo_row_unref0 (_tmp25_); +#line 12770 "ImportPage.c" + } + goto __finally71; + __catch71_g_error: + { + GError* err = NULL; + ImportPageCameraImportJob* _tmp35_ = NULL; + const gchar* _tmp36_ = NULL; + GError* _tmp37_ = NULL; + const gchar* _tmp38_ = NULL; +#line 581 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + err = _inner_error_; +#line 581 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _inner_error_ = NULL; +#line 586 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp35_ = self->priv->associated; +#line 586 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp36_ = _tmp35_->priv->filename; +#line 586 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp37_ = err; +#line 586 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp38_ = _tmp37_->message; +#line 586 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_warning ("ImportPage.vala:586: Unable to generate backing associated file for %s" \ +": %s", _tmp36_, _tmp38_); +#line 581 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_error_free0 (err); +#line 12796 "ImportPage.c" + } + __finally71: +#line 581 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 581 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_propagate_error (error, _inner_error_); +#line 581 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (dest_file); +#line 581 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return FALSE; +#line 12807 "ImportPage.c" + } +#line 590 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp39_ = self->priv->associated_file; +#line 590 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp39_ == NULL) { +#line 12813 "ImportPage.c" + ImportPageCameraImportJob* _tmp40_ = NULL; + const gchar* _tmp41_ = NULL; +#line 591 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp40_ = self->priv->associated; +#line 591 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp41_ = _tmp40_->priv->filename; +#line 591 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_message ("ImportPage.vala:591: Unable to generate backing associated file for %s", _tmp41_); +#line 592 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 592 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (dest_file); +#line 592 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (file_to_import) { +#line 592 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + *file_to_import = _vala_file_to_import; +#line 12830 "ImportPage.c" + } else { +#line 592 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_vala_file_to_import); +#line 12834 "ImportPage.c" + } +#line 592 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (copy_to_library) { +#line 592 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + *copy_to_library = _vala_copy_to_library; +#line 12840 "ImportPage.c" + } +#line 592 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 12844 "ImportPage.c" + } +#line 595 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp42_ = self->priv->associated_file; +#line 595 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp43_ = _tmp42_->filepath; +#line 595 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp44_ = g_file_new_for_path (_tmp43_); +#line 595 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + assoc_dest = _tmp44_; +#line 596 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp45_ = assoc_dest; +#line 596 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + library_monitor_blacklist_file (_tmp45_, "CameraImportJob.prepare"); +#line 12858 "ImportPage.c" + { + GPContextWrapper* _tmp46_ = NULL; + GPContext* _tmp47_ = NULL; + Camera* _tmp48_ = NULL; + ImportPageCameraImportJob* _tmp49_ = NULL; + const gchar* _tmp50_ = NULL; + ImportPageCameraImportJob* _tmp51_ = NULL; + const gchar* _tmp52_ = NULL; + GFile* _tmp53_ = NULL; +#line 598 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp46_ = self->priv->context; +#line 598 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp47_ = _tmp46_->context; +#line 598 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp48_ = self->priv->camera; +#line 598 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp49_ = self->priv->associated; +#line 598 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp50_ = _tmp49_->priv->fulldir; +#line 598 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp51_ = self->priv->associated; +#line 598 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp52_ = _tmp51_->priv->filename; +#line 598 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp53_ = assoc_dest; +#line 598 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + gp_save_image (_tmp47_, _tmp48_, _tmp50_, _tmp52_, _tmp53_, &_inner_error_); +#line 598 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 12888 "ImportPage.c" + goto __finally72; + } + } + __finally72: + { + GFile* _tmp54_ = NULL; +#line 601 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp54_ = assoc_dest; +#line 601 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + library_monitor_unblacklist_file (_tmp54_); +#line 12899 "ImportPage.c" + } +#line 597 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 597 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_propagate_error (error, _inner_error_); +#line 597 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (assoc_dest); +#line 597 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (dest_file); +#line 597 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return FALSE; +#line 12911 "ImportPage.c" + } +#line 580 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (assoc_dest); +#line 12915 "ImportPage.c" + } +#line 605 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp55_ = dest_file; +#line 605 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp56_ = _g_object_ref0 (_tmp55_); +#line 605 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_vala_file_to_import); +#line 605 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _vala_file_to_import = _tmp56_; +#line 606 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _vala_copy_to_library = FALSE; +#line 608 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = TRUE; +#line 608 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (dest_file); +#line 608 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (file_to_import) { +#line 608 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + *file_to_import = _vala_file_to_import; +#line 12935 "ImportPage.c" + } else { +#line 608 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_vala_file_to_import); +#line 12939 "ImportPage.c" + } +#line 608 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (copy_to_library) { +#line 608 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + *copy_to_library = _vala_copy_to_library; +#line 12945 "ImportPage.c" + } +#line 608 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 12949 "ImportPage.c" +} + + +static gboolean import_page_camera_import_job_real_complete (BatchImportJob* base, MediaSource* source, BatchImportRoll* import_roll, GError** error) { + ImportPageCameraImportJob * self; + gboolean result = FALSE; + gboolean ret = FALSE; + MediaSource* _tmp0_ = NULL; + GError * _inner_error_ = NULL; +#line 611 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, ImportPageCameraImportJob); +#line 611 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_MEDIA_SOURCE (source), FALSE); +#line 611 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_BATCH_IMPORT_ROLL (import_roll), FALSE); +#line 612 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ret = FALSE; +#line 613 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = source; +#line 613 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_PHOTO)) { +#line 12971 "ImportPage.c" + Photo* photo = NULL; + MediaSource* _tmp1_ = NULL; + Photo* _tmp2_ = NULL; + BackingPhotoRow* _tmp3_ = NULL; +#line 614 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = source; +#line 614 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, TYPE_PHOTO) ? ((Photo*) _tmp1_) : NULL); +#line 614 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + photo = _tmp2_; +#line 617 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = self->priv->associated_file; +#line 617 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp3_ != NULL) { +#line 12986 "ImportPage.c" + Photo* _tmp4_ = NULL; + BackingPhotoRow* _tmp5_ = NULL; + Photo* _tmp6_ = NULL; + ConfigFacade* _tmp7_ = NULL; + ConfigFacade* _tmp8_ = NULL; + RawDeveloper _tmp9_ = 0; +#line 618 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = photo; +#line 618 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = self->priv->associated_file; +#line 618 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + photo_add_backing_photo_for_development (_tmp4_, RAW_DEVELOPER_CAMERA, _tmp5_, &_inner_error_); +#line 618 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 618 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_propagate_error (error, _inner_error_); +#line 618 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (photo); +#line 618 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return FALSE; +#line 13007 "ImportPage.c" + } +#line 619 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ret = TRUE; +#line 620 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = photo; +#line 620 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = config_facade_get_instance (); +#line 620 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = _tmp7_; +#line 620 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = configuration_facade_get_default_raw_developer (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); +#line 620 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + photo_set_raw_developer (_tmp6_, _tmp9_); +#line 620 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp8_); +#line 13023 "ImportPage.c" + } +#line 613 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (photo); +#line 13027 "ImportPage.c" + } +#line 623 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = ret; +#line 623 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 13033 "ImportPage.c" +} + + +static void import_page_camera_import_job_class_init (ImportPageCameraImportJobClass * klass) { +#line 472 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_camera_import_job_parent_class = g_type_class_peek_parent (klass); +#line 472 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((BatchImportJobClass *) klass)->finalize = import_page_camera_import_job_finalize; +#line 472 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_type_class_add_private (klass, sizeof (ImportPageCameraImportJobPrivate)); +#line 472 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((BatchImportJobClass *) klass)->get_duplicated_file = import_page_camera_import_job_real_get_duplicated_file; +#line 472 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((BatchImportJobClass *) klass)->get_exposure_time_override = import_page_camera_import_job_real_get_exposure_time_override; +#line 472 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((BatchImportJobClass *) klass)->get_dest_identifier = import_page_camera_import_job_real_get_dest_identifier; +#line 472 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((BatchImportJobClass *) klass)->get_source_identifier = import_page_camera_import_job_real_get_source_identifier; +#line 472 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((BatchImportJobClass *) klass)->get_basename = import_page_camera_import_job_real_get_basename; +#line 472 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((BatchImportJobClass *) klass)->get_path = import_page_camera_import_job_real_get_path; +#line 472 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((BatchImportJobClass *) klass)->set_associated = import_page_camera_import_job_real_set_associated; +#line 472 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((BatchImportJobClass *) klass)->is_directory = import_page_camera_import_job_real_is_directory; +#line 472 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((BatchImportJobClass *) klass)->determine_file_size = import_page_camera_import_job_real_determine_file_size; +#line 472 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((BatchImportJobClass *) klass)->prepare = import_page_camera_import_job_real_prepare; +#line 472 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((BatchImportJobClass *) klass)->complete = import_page_camera_import_job_real_complete; +#line 13066 "ImportPage.c" +} + + +static void import_page_camera_import_job_instance_init (ImportPageCameraImportJob * self) { +#line 472 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv = IMPORT_PAGE_CAMERA_IMPORT_JOB_GET_PRIVATE (self); +#line 481 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->associated = NULL; +#line 482 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->associated_file = NULL; +#line 13077 "ImportPage.c" +} + + +static void import_page_camera_import_job_finalize (BatchImportJob* obj) { + ImportPageCameraImportJob * self; +#line 472 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, IMPORT_PAGE_TYPE_CAMERA_IMPORT_JOB, ImportPageCameraImportJob); +#line 473 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_context_wrapper_unref0 (self->priv->context); +#line 474 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->import_file); +#line 475 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_camera_unref0 (self->priv->camera); +#line 476 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->fulldir); +#line 477 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->filename); +#line 479 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _media_metadata_unref0 (self->priv->metadata); +#line 481 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _batch_import_job_unref0 (self->priv->associated); +#line 482 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _backing_photo_row_unref0 (self->priv->associated_file); +#line 483 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->duplicated_file); +#line 472 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + BATCH_IMPORT_JOB_CLASS (import_page_camera_import_job_parent_class)->finalize (obj); +#line 13105 "ImportPage.c" +} + + +static GType import_page_camera_import_job_get_type (void) { + static volatile gsize import_page_camera_import_job_type_id__volatile = 0; + if (g_once_init_enter (&import_page_camera_import_job_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (ImportPageCameraImportJobClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) import_page_camera_import_job_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ImportPageCameraImportJob), 0, (GInstanceInitFunc) import_page_camera_import_job_instance_init, NULL }; + GType import_page_camera_import_job_type_id; + import_page_camera_import_job_type_id = g_type_register_static (TYPE_BATCH_IMPORT_JOB, "ImportPageCameraImportJob", &g_define_type_info, 0); + g_once_init_leave (&import_page_camera_import_job_type_id__volatile, import_page_camera_import_job_type_id); + } + return import_page_camera_import_job_type_id__volatile; +} + + +static guint import_page_import_page_search_view_filter_real_get_criteria (SearchViewFilter* base) { + ImportPageImportPageSearchViewFilter * self; + guint result = 0U; +#line 628 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, IMPORT_PAGE_TYPE_IMPORT_PAGE_SEARCH_VIEW_FILTER, ImportPageImportPageSearchViewFilter); +#line 629 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = (guint) (SEARCH_FILTER_CRITERIA_TEXT | SEARCH_FILTER_CRITERIA_MEDIA); +#line 629 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 13130 "ImportPage.c" +} + + +static gboolean string_contains (const gchar* self, const gchar* needle) { + gboolean result = FALSE; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 1376 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, FALSE); +#line 1376 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (needle != NULL, FALSE); +#line 1377 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = needle; +#line 1377 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_); +#line 1377 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp1_ != NULL; +#line 1377 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 13150 "ImportPage.c" +} + + +static gboolean import_page_import_page_search_view_filter_real_predicate (ViewFilter* base, DataView* view) { + ImportPageImportPageSearchViewFilter * self; + gboolean result = FALSE; + ImportSource* source = NULL; + DataView* _tmp0_ = NULL; + ImportSource* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + guint _tmp3_ = 0U; + guint _tmp26_ = 0U; +#line 632 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, IMPORT_PAGE_TYPE_IMPORT_PAGE_SEARCH_VIEW_FILTER, ImportPageImportPageSearchViewFilter); +#line 632 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_DATA_VIEW (view), FALSE); +#line 633 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = view; +#line 633 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = import_preview_get_import_source (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_IMPORT_PREVIEW, ImportPreview)); +#line 633 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + source = _tmp1_; +#line 636 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = search_view_filter_get_criteria (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SEARCH_VIEW_FILTER, SearchViewFilter)); +#line 636 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if ((gboolean) (SEARCH_FILTER_CRITERIA_MEDIA & _tmp3_)) { +#line 13177 "ImportPage.c" + gboolean _tmp4_ = FALSE; +#line 636 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp4_ = search_view_filter_filter_by_media_type (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SEARCH_VIEW_FILTER, SearchViewFilter)); +#line 636 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = _tmp4_; +#line 13183 "ImportPage.c" + } else { +#line 636 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = FALSE; +#line 13187 "ImportPage.c" + } +#line 636 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp2_) { +#line 13191 "ImportPage.c" + ImportSource* _tmp5_ = NULL; +#line 637 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp5_ = source; +#line 637 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, TYPE_VIDEO_IMPORT_SOURCE)) { +#line 13197 "ImportPage.c" + gboolean _tmp6_ = FALSE; + gboolean _tmp7_ = FALSE; +#line 638 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp6_ = search_view_filter_get_show_media_video (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SEARCH_VIEW_FILTER, SearchViewFilter)); +#line 638 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp7_ = _tmp6_; +#line 638 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp7_) { +#line 639 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 639 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (source); +#line 639 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 13212 "ImportPage.c" + } + } else { + ImportSource* _tmp8_ = NULL; +#line 640 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp8_ = source; +#line 640 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, TYPE_PHOTO_IMPORT_SOURCE)) { +#line 13220 "ImportPage.c" + PhotoImportSource* photo = NULL; + ImportSource* _tmp9_ = NULL; + PhotoImportSource* _tmp10_ = NULL; + PhotoImportSource* _tmp11_ = NULL; + PhotoFileFormat _tmp12_ = 0; +#line 641 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp9_ = source; +#line 641 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, TYPE_PHOTO_IMPORT_SOURCE) ? ((PhotoImportSource*) _tmp9_) : NULL); +#line 641 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + photo = _tmp10_; +#line 642 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp11_ = photo; +#line 642 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp12_ = photo_import_source_get_file_format (_tmp11_); +#line 642 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp12_ == PHOTO_FILE_FORMAT_RAW) { +#line 13238 "ImportPage.c" + PhotoImportSource* _tmp13_ = NULL; + PhotoImportSource* _tmp14_ = NULL; + PhotoImportSource* _tmp15_ = NULL; + gboolean _tmp16_ = FALSE; +#line 643 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp13_ = photo; +#line 643 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp14_ = photo_import_source_get_associated (_tmp13_); +#line 643 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp15_ = _tmp14_; +#line 643 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp16_ = _tmp15_ != NULL; +#line 643 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (_tmp15_); +#line 643 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp16_) { +#line 13255 "ImportPage.c" + gboolean _tmp17_ = FALSE; + gboolean _tmp18_ = FALSE; + gboolean _tmp19_ = FALSE; +#line 644 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp18_ = search_view_filter_get_show_media_photos (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SEARCH_VIEW_FILTER, SearchViewFilter)); +#line 644 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp19_ = _tmp18_; +#line 644 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp19_) { +#line 13265 "ImportPage.c" + gboolean _tmp20_ = FALSE; + gboolean _tmp21_ = FALSE; +#line 644 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp20_ = search_view_filter_get_show_media_raw (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SEARCH_VIEW_FILTER, SearchViewFilter)); +#line 644 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp21_ = _tmp20_; +#line 644 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = !_tmp21_; +#line 13274 "ImportPage.c" + } else { +#line 644 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp17_ = FALSE; +#line 13278 "ImportPage.c" + } +#line 644 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp17_) { +#line 645 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 645 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (photo); +#line 645 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (source); +#line 645 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 13290 "ImportPage.c" + } + } else { + gboolean _tmp22_ = FALSE; + gboolean _tmp23_ = FALSE; +#line 646 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp22_ = search_view_filter_get_show_media_raw (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SEARCH_VIEW_FILTER, SearchViewFilter)); +#line 646 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp23_ = _tmp22_; +#line 646 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp23_) { +#line 647 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 647 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (photo); +#line 647 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (source); +#line 647 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 13309 "ImportPage.c" + } + } + } else { + gboolean _tmp24_ = FALSE; + gboolean _tmp25_ = FALSE; +#line 649 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp24_ = search_view_filter_get_show_media_photos (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SEARCH_VIEW_FILTER, SearchViewFilter)); +#line 649 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp25_ = _tmp24_; +#line 649 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp25_) { +#line 650 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 650 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (photo); +#line 650 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (source); +#line 650 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 13329 "ImportPage.c" + } + } +#line 640 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (photo); +#line 13334 "ImportPage.c" + } + } + } +#line 654 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp26_ = search_view_filter_get_criteria (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SEARCH_VIEW_FILTER, SearchViewFilter)); +#line 654 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if ((gboolean) (SEARCH_FILTER_CRITERIA_TEXT & _tmp26_)) { +#line 13342 "ImportPage.c" + const gchar* keywords = NULL; + ImportSource* _tmp27_ = NULL; + const gchar* _tmp28_ = NULL; + const gchar* _tmp29_ = NULL; + gboolean _tmp30_ = FALSE; + gint _tmp31_ = 0; + gchar** _tmp32_ = NULL; +#line 655 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp27_ = source; +#line 655 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp28_ = indexable_get_indexable_keywords (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, TYPE_INDEXABLE, Indexable)); +#line 655 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + keywords = _tmp28_; +#line 656 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp29_ = keywords; +#line 656 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp30_ = is_string_empty (_tmp29_); +#line 656 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (_tmp30_) { +#line 657 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 657 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (source); +#line 657 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 13368 "ImportPage.c" + } +#line 660 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp32_ = search_view_filter_get_search_filter_words (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SEARCH_VIEW_FILTER, SearchViewFilter), &_tmp31_); +#line 13372 "ImportPage.c" + { + gchar** word_collection = NULL; + gint word_collection_length1 = 0; + gint _word_collection_size_ = 0; + gint word_it = 0; +#line 660 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + word_collection = _tmp32_; +#line 660 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + word_collection_length1 = _tmp31_; +#line 660 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + for (word_it = 0; word_it < _tmp31_; word_it = word_it + 1) { +#line 13384 "ImportPage.c" + const gchar* word = NULL; +#line 660 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + word = word_collection[word_it]; +#line 13388 "ImportPage.c" + { + const gchar* _tmp33_ = NULL; + const gchar* _tmp34_ = NULL; + gboolean _tmp35_ = FALSE; +#line 661 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp33_ = keywords; +#line 661 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp34_ = word; +#line 661 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp35_ = string_contains (_tmp33_, _tmp34_); +#line 661 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + if (!_tmp35_) { +#line 662 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = FALSE; +#line 662 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (source); +#line 662 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 13407 "ImportPage.c" + } + } + } + } + } +#line 666 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = TRUE; +#line 666 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (source); +#line 666 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 13419 "ImportPage.c" +} + + +static ImportPageImportPageSearchViewFilter* import_page_import_page_search_view_filter_construct (GType object_type) { + ImportPageImportPageSearchViewFilter* self = NULL; +#line 627 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = (ImportPageImportPageSearchViewFilter*) search_view_filter_construct (object_type); +#line 627 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return self; +#line 13429 "ImportPage.c" +} + + +static ImportPageImportPageSearchViewFilter* import_page_import_page_search_view_filter_new (void) { +#line 627 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return import_page_import_page_search_view_filter_construct (IMPORT_PAGE_TYPE_IMPORT_PAGE_SEARCH_VIEW_FILTER); +#line 13436 "ImportPage.c" +} + + +static void import_page_import_page_search_view_filter_class_init (ImportPageImportPageSearchViewFilterClass * klass) { +#line 627 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_import_page_search_view_filter_parent_class = g_type_class_peek_parent (klass); +#line 627 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((SearchViewFilterClass *) klass)->get_criteria = import_page_import_page_search_view_filter_real_get_criteria; +#line 627 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((ViewFilterClass *) klass)->predicate = import_page_import_page_search_view_filter_real_predicate; +#line 13447 "ImportPage.c" +} + + +static void import_page_import_page_search_view_filter_instance_init (ImportPageImportPageSearchViewFilter * self) { +} + + +static GType import_page_import_page_search_view_filter_get_type (void) { + static volatile gsize import_page_import_page_search_view_filter_type_id__volatile = 0; + if (g_once_init_enter (&import_page_import_page_search_view_filter_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (ImportPageImportPageSearchViewFilterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) import_page_import_page_search_view_filter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ImportPageImportPageSearchViewFilter), 0, (GInstanceInitFunc) import_page_import_page_search_view_filter_instance_init, NULL }; + GType import_page_import_page_search_view_filter_type_id; + import_page_import_page_search_view_filter_type_id = g_type_register_static (TYPE_SEARCH_VIEW_FILTER, "ImportPageImportPageSearchViewFilter", &g_define_type_info, 0); + g_once_init_leave (&import_page_import_page_search_view_filter_type_id__volatile, import_page_import_page_search_view_filter_type_id); + } + return import_page_import_page_search_view_filter_type_id__volatile; +} + + +static gboolean import_page_hide_imported_view_filter_real_predicate (ViewFilter* base, DataView* view) { + ImportPageHideImportedViewFilter * self; + gboolean result = FALSE; + DataView* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; +#line 672 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, IMPORT_PAGE_TYPE_HIDE_IMPORTED_VIEW_FILTER, ImportPageHideImportedViewFilter); +#line 672 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_return_val_if_fail (IS_DATA_VIEW (view), FALSE); +#line 673 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = view; +#line 673 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = import_preview_is_already_imported (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_IMPORT_PREVIEW, ImportPreview)); +#line 673 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + result = !_tmp1_; +#line 673 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return result; +#line 13484 "ImportPage.c" +} + + +static ImportPageHideImportedViewFilter* import_page_hide_imported_view_filter_construct (GType object_type) { + ImportPageHideImportedViewFilter* self = NULL; +#line 671 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = (ImportPageHideImportedViewFilter*) view_filter_construct (object_type); +#line 671 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return self; +#line 13494 "ImportPage.c" +} + + +static ImportPageHideImportedViewFilter* import_page_hide_imported_view_filter_new (void) { +#line 671 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + return import_page_hide_imported_view_filter_construct (IMPORT_PAGE_TYPE_HIDE_IMPORTED_VIEW_FILTER); +#line 13501 "ImportPage.c" +} + + +static void import_page_hide_imported_view_filter_class_init (ImportPageHideImportedViewFilterClass * klass) { +#line 671 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_hide_imported_view_filter_parent_class = g_type_class_peek_parent (klass); +#line 671 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((ViewFilterClass *) klass)->predicate = import_page_hide_imported_view_filter_real_predicate; +#line 13510 "ImportPage.c" +} + + +static void import_page_hide_imported_view_filter_instance_init (ImportPageHideImportedViewFilter * self) { +} + + +static GType import_page_hide_imported_view_filter_get_type (void) { + static volatile gsize import_page_hide_imported_view_filter_type_id__volatile = 0; + if (g_once_init_enter (&import_page_hide_imported_view_filter_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (ImportPageHideImportedViewFilterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) import_page_hide_imported_view_filter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ImportPageHideImportedViewFilter), 0, (GInstanceInitFunc) import_page_hide_imported_view_filter_instance_init, NULL }; + GType import_page_hide_imported_view_filter_type_id; + import_page_hide_imported_view_filter_type_id = g_type_register_static (TYPE_VIEW_FILTER, "ImportPageHideImportedViewFilter", &g_define_type_info, 0); + g_once_init_leave (&import_page_hide_imported_view_filter_type_id__volatile, import_page_hide_imported_view_filter_type_id); + } + return import_page_hide_imported_view_filter_type_id__volatile; +} + + +static void import_page_class_init (ImportPageClass * klass) { +#line 457 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + import_page_parent_class = g_type_class_peek_parent (klass); +#line 457 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_type_class_add_private (klass, sizeof (ImportPagePrivate)); +#line 457 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((PageClass *) klass)->get_toolbar = import_page_real_get_toolbar; +#line 457 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((CheckerboardPageClass *) klass)->get_view_tracker = import_page_real_get_view_tracker; +#line 457 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((CheckerboardPageClass *) klass)->get_view_empty_message = import_page_real_get_view_empty_message; +#line 457 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((PageClass *) klass)->init_collect_ui_filenames = import_page_real_init_collect_ui_filenames; +#line 457 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((PageClass *) klass)->init_collect_toggle_action_entries = import_page_real_init_collect_toggle_action_entries; +#line 457 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((PageClass *) klass)->init_collect_action_entries = import_page_real_init_collect_action_entries; +#line 457 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((PageClass *) klass)->init_actions = import_page_real_init_actions; +#line 457 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((PageClass *) klass)->switched_to = import_page_real_switched_to; +#line 457 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((PageClass *) klass)->ready = import_page_real_ready; +#line 457 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((CheckerboardPageClass *) klass)->set_display_titles = import_page_real_set_display_titles; +#line 457 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + ((CheckerboardPageClass *) klass)->get_search_view_filter = import_page_real_get_search_view_filter; +#line 457 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + G_OBJECT_CLASS (klass)->finalize = import_page_finalize; +#line 13559 "ImportPage.c" +} + + +static void import_page_instance_init (ImportPage * self) { + GtkLabel* _tmp0_ = NULL; + GtkProgressBar* _tmp1_ = NULL; + ImportPageImportPageSearchViewFilter* _tmp2_ = NULL; + ImportPageHideImportedViewFilter* _tmp3_ = NULL; +#line 457 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv = IMPORT_PAGE_GET_PRIVATE (self); +#line 680 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->import_sources = NULL; +#line 681 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = (GtkLabel*) gtk_label_new (NULL); +#line 681 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_ref_sink (_tmp0_); +#line 681 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->camera_label = _tmp0_; +#line 683 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp1_ = (GtkProgressBar*) gtk_progress_bar_new (); +#line 683 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_object_ref_sink (_tmp1_); +#line 683 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->progress_bar = _tmp1_; +#line 686 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->busy = FALSE; +#line 687 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->refreshed = FALSE; +#line 688 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->refresh_result = GP_OK; +#line 689 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->refresh_error = NULL; +#line 691 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->volume_monitor = NULL; +#line 692 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->local_ref = NULL; +#line 694 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = import_page_import_page_search_view_filter_new (); +#line 694 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->search_filter = _tmp2_; +#line 695 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp3_ = import_page_hide_imported_view_filter_new (); +#line 695 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self->priv->hide_imported_filter = _tmp3_; +#line 13604 "ImportPage.c" +} + + +static void import_page_finalize (GObject* obj) { + ImportPage * self; + LibraryPhotoSourceCollection* _tmp0_ = NULL; + guint _tmp1_ = 0U; + VideoSourceCollection* _tmp2_ = NULL; + guint _tmp3_ = 0U; +#line 457 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_IMPORT_PAGE, ImportPage); +#line 766 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp0_ = library_photo_global; +#line 766 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_signal_parse_name ("contents-altered", TYPE_DATA_COLLECTION, &_tmp1_, NULL, FALSE); +#line 766 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _import_page_on_media_added_removed_data_collection_contents_altered, self); +#line 767 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _tmp2_ = video_global; +#line 767 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_signal_parse_name ("contents-altered", TYPE_DATA_COLLECTION, &_tmp3_, NULL, FALSE); +#line 767 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _import_page_on_media_added_removed_data_collection_contents_altered, self); +#line 680 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _data_collection_unref0 (self->priv->import_sources); +#line 681 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->camera_label); +#line 682 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->hide_imported); +#line 683 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->progress_bar); +#line 684 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _gp_camera_unref0 (self->priv->camera); +#line 685 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->uri); +#line 689 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->refresh_error); +#line 690 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->camera_name); +#line 691 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->volume_monitor); +#line 692 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_object_unref0 (self->priv->local_ref); +#line 693 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _g_free0 (self->priv->icon); +#line 694 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _view_filter_unref0 (self->priv->search_filter); +#line 695 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _view_filter_unref0 (self->priv->hide_imported_filter); +#line 696 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + _core_tracker_unref0 (self->priv->tracker); +#line 457 "/home/jens/Source/shotwell/src/camera/ImportPage.vala" + G_OBJECT_CLASS (import_page_parent_class)->finalize (obj); +#line 13658 "ImportPage.c" +} + + +GType import_page_get_type (void) { + static volatile gsize import_page_type_id__volatile = 0; + if (g_once_init_enter (&import_page_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (ImportPageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) import_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ImportPage), 0, (GInstanceInitFunc) import_page_instance_init, NULL }; + GType import_page_type_id; + import_page_type_id = g_type_register_static (TYPE_CHECKERBOARD_PAGE, "ImportPage", &g_define_type_info, 0); + g_once_init_leave (&import_page_type_id__volatile, import_page_type_id); + } + return import_page_type_id__volatile; +} + + + diff --git a/src/camera/mk/camera.mk b/src/camera/mk/camera.mk deleted file mode 100644 index 1812a42..0000000 --- a/src/camera/mk/camera.mk +++ /dev/null @@ -1,32 +0,0 @@ - -# UNIT_NAME is the Vala namespace. A file named UNIT_NAME.vala must be in this directory with -# a init() and terminate() function declared in the namespace. -UNIT_NAME := Camera - -# UNIT_DIR should match the subdirectory the files are located in. Generally UNIT_NAME in all -# lowercase. The name of this file should be UNIT_DIR.mk. -UNIT_DIR := camera - -# All Vala files in the unit should be listed here with no subdirectory prefix. -# -# NOTE: Do *not* include the unit's master file, i.e. UNIT_NAME.vala. -UNIT_FILES := \ - Branch.vala \ - CameraTable.vala \ - GPhoto.vala \ - ImportPage.vala - -# Any unit this unit relies upon (and should be initialized before it's initialized) should -# be listed here using its Vala namespace. -# -# NOTE: All units are assumed to rely upon the unit-unit. Do not include that here. -UNIT_USES := \ - Sidebar - -# List any additional files that are used in the build process as a part of this unit that should -# be packaged in the tarball. File names should be relative to the unit's home directory. -UNIT_RC := - -# unitize.mk must be called at the end of each UNIT_DIR.mk file. -include unitize.mk - |