/* BatchImport.c generated by valac 0.34.7, the Vala compiler
 * generated from BatchImport.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 <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <time.h>
#include <gee.h>
#include <float.h>
#include <math.h>
#include <gobject/gvaluecollector.h>


#define TYPE_IMPORT_RESULT (import_result_get_type ())
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#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;
typedef struct _BatchImportJobPrivate BatchImportJobPrivate;

#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 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_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_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_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 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;
typedef struct _ParamSpecBatchImportJob ParamSpecBatchImportJob;

#define TYPE_FILE_IMPORT_JOB (file_import_job_get_type ())
#define FILE_IMPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FILE_IMPORT_JOB, FileImportJob))
#define FILE_IMPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FILE_IMPORT_JOB, FileImportJobClass))
#define IS_FILE_IMPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FILE_IMPORT_JOB))
#define IS_FILE_IMPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FILE_IMPORT_JOB))
#define FILE_IMPORT_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FILE_IMPORT_JOB, FileImportJobClass))

typedef struct _FileImportJob FileImportJob;
typedef struct _FileImportJobClass FileImportJobClass;
typedef struct _FileImportJobPrivate FileImportJobPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _batch_import_job_unref0(var) ((var == NULL) ? NULL : (var = (batch_import_job_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _BatchImportRollPrivate BatchImportRollPrivate;

#define TYPE_IMPORT_ID (import_id_get_type ())
typedef struct _ImportID ImportID;

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

#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 _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL)))
typedef struct _ParamSpecBatchImportRoll ParamSpecBatchImportRoll;

#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;
typedef struct _BatchImportResultPrivate BatchImportResultPrivate;
typedef struct _ParamSpecBatchImportResult ParamSpecBatchImportResult;

#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;
typedef struct _ImportManifestPrivate ImportManifestPrivate;
#define _batch_import_result_unref0(var) ((var == NULL) ? NULL : (var = (batch_import_result_unref (var), NULL)))
typedef struct _ParamSpecImportManifest ParamSpecImportManifest;

#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;
typedef struct _BatchImportPrivate BatchImportPrivate;

#define TYPE_PREPARED_FILE (prepared_file_get_type ())
#define PREPARED_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PREPARED_FILE, PreparedFile))
#define PREPARED_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PREPARED_FILE, PreparedFileClass))
#define IS_PREPARED_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PREPARED_FILE))
#define IS_PREPARED_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PREPARED_FILE))
#define PREPARED_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PREPARED_FILE, PreparedFileClass))

typedef struct _PreparedFile PreparedFile;
typedef struct _PreparedFileClass PreparedFileClass;

#define TYPE_COMPLETED_IMPORT_OBJECT (completed_import_object_get_type ())
#define COMPLETED_IMPORT_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMPLETED_IMPORT_OBJECT, CompletedImportObject))
#define COMPLETED_IMPORT_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COMPLETED_IMPORT_OBJECT, CompletedImportObjectClass))
#define IS_COMPLETED_IMPORT_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMPLETED_IMPORT_OBJECT))
#define IS_COMPLETED_IMPORT_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COMPLETED_IMPORT_OBJECT))
#define COMPLETED_IMPORT_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COMPLETED_IMPORT_OBJECT, CompletedImportObjectClass))

typedef struct _CompletedImportObject CompletedImportObject;
typedef struct _CompletedImportObjectClass CompletedImportObjectClass;

#define TYPE_APPLICATION (application_get_type ())
#define APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APPLICATION, Application))
#define APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APPLICATION, ApplicationClass))
#define IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APPLICATION))
#define IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APPLICATION))
#define APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APPLICATION, ApplicationClass))

typedef struct _Application Application;
typedef struct _ApplicationClass ApplicationClass;
#define _application_unref0(var) ((var == NULL) ? NULL : (var = (application_unref (var), NULL)))

#define TYPE_WORKERS (workers_get_type ())
#define WORKERS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_WORKERS, Workers))
#define WORKERS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_WORKERS, WorkersClass))
#define IS_WORKERS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_WORKERS))
#define IS_WORKERS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_WORKERS))
#define WORKERS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_WORKERS, WorkersClass))

typedef struct _Workers Workers;
typedef struct _WorkersClass WorkersClass;
#define _batch_import_roll_unref0(var) ((var == NULL) ? NULL : (var = (batch_import_roll_unref (var), NULL)))
#define _import_manifest_unref0(var) ((var == NULL) ? NULL : (var = (import_manifest_unref (var), NULL)))

#define TYPE_BACKGROUND_JOB (background_job_get_type ())
#define BACKGROUND_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BACKGROUND_JOB, BackgroundJob))
#define BACKGROUND_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BACKGROUND_JOB, BackgroundJobClass))
#define IS_BACKGROUND_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BACKGROUND_JOB))
#define IS_BACKGROUND_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BACKGROUND_JOB))
#define BACKGROUND_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BACKGROUND_JOB, BackgroundJobClass))

typedef struct _BackgroundJob BackgroundJob;
typedef struct _BackgroundJobClass BackgroundJobClass;

#define TYPE_BACKGROUND_IMPORT_JOB (background_import_job_get_type ())
#define BACKGROUND_IMPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BACKGROUND_IMPORT_JOB, BackgroundImportJob))
#define BACKGROUND_IMPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BACKGROUND_IMPORT_JOB, BackgroundImportJobClass))
#define IS_BACKGROUND_IMPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BACKGROUND_IMPORT_JOB))
#define IS_BACKGROUND_IMPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BACKGROUND_IMPORT_JOB))
#define BACKGROUND_IMPORT_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BACKGROUND_IMPORT_JOB, BackgroundImportJobClass))

typedef struct _BackgroundImportJob BackgroundImportJob;
typedef struct _BackgroundImportJobClass BackgroundImportJobClass;
typedef struct _BackgroundJobPrivate BackgroundJobPrivate;

#define BACKGROUND_JOB_TYPE_JOB_PRIORITY (background_job_job_priority_get_type ())
typedef struct _BackgroundImportJobPrivate BackgroundImportJobPrivate;

#define TYPE_WORK_SNIFFER (work_sniffer_get_type ())
#define WORK_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_WORK_SNIFFER, WorkSniffer))
#define WORK_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_WORK_SNIFFER, WorkSnifferClass))
#define IS_WORK_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_WORK_SNIFFER))
#define IS_WORK_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_WORK_SNIFFER))
#define WORK_SNIFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_WORK_SNIFFER, WorkSnifferClass))

typedef struct _WorkSniffer WorkSniffer;
typedef struct _WorkSnifferClass WorkSnifferClass;
#define _background_job_unref0(var) ((var == NULL) ? NULL : (var = (background_job_unref (var), NULL)))
typedef struct _WorkSnifferPrivate WorkSnifferPrivate;

#define TYPE_FILE_TO_PREPARE (file_to_prepare_get_type ())
#define FILE_TO_PREPARE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FILE_TO_PREPARE, FileToPrepare))
#define FILE_TO_PREPARE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FILE_TO_PREPARE, FileToPrepareClass))
#define IS_FILE_TO_PREPARE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FILE_TO_PREPARE))
#define IS_FILE_TO_PREPARE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FILE_TO_PREPARE))
#define FILE_TO_PREPARE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FILE_TO_PREPARE, FileToPrepareClass))

typedef struct _FileToPrepare FileToPrepare;
typedef struct _FileToPrepareClass FileToPrepareClass;

#define TYPE_PREPARE_FILES_JOB (prepare_files_job_get_type ())
#define PREPARE_FILES_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PREPARE_FILES_JOB, PrepareFilesJob))
#define PREPARE_FILES_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PREPARE_FILES_JOB, PrepareFilesJobClass))
#define IS_PREPARE_FILES_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PREPARE_FILES_JOB))
#define IS_PREPARE_FILES_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PREPARE_FILES_JOB))
#define PREPARE_FILES_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PREPARE_FILES_JOB, PrepareFilesJobClass))

typedef struct _PrepareFilesJob PrepareFilesJob;
typedef struct _PrepareFilesJobClass PrepareFilesJobClass;

#define TYPE_NOTIFICATION_OBJECT (notification_object_get_type ())
#define NOTIFICATION_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NOTIFICATION_OBJECT, NotificationObject))
#define NOTIFICATION_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NOTIFICATION_OBJECT, NotificationObjectClass))
#define IS_NOTIFICATION_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NOTIFICATION_OBJECT))
#define IS_NOTIFICATION_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NOTIFICATION_OBJECT))
#define NOTIFICATION_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NOTIFICATION_OBJECT, NotificationObjectClass))

typedef struct _NotificationObject NotificationObject;
typedef struct _NotificationObjectClass NotificationObjectClass;

#define TYPE_THUMBNAIL_WRITER_JOB (thumbnail_writer_job_get_type ())
#define THUMBNAIL_WRITER_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_WRITER_JOB, ThumbnailWriterJob))
#define THUMBNAIL_WRITER_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_WRITER_JOB, ThumbnailWriterJobClass))
#define IS_THUMBNAIL_WRITER_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_WRITER_JOB))
#define IS_THUMBNAIL_WRITER_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_WRITER_JOB))
#define THUMBNAIL_WRITER_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_WRITER_JOB, ThumbnailWriterJobClass))

typedef struct _ThumbnailWriterJob ThumbnailWriterJob;
typedef struct _ThumbnailWriterJobClass ThumbnailWriterJobClass;
#define _completed_import_object_unref0(var) ((var == NULL) ? NULL : (var = (completed_import_object_unref (var), NULL)))

#define TYPE_PREPARED_FILE_IMPORT_JOB (prepared_file_import_job_get_type ())
#define PREPARED_FILE_IMPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PREPARED_FILE_IMPORT_JOB, PreparedFileImportJob))
#define PREPARED_FILE_IMPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PREPARED_FILE_IMPORT_JOB, PreparedFileImportJobClass))
#define IS_PREPARED_FILE_IMPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PREPARED_FILE_IMPORT_JOB))
#define IS_PREPARED_FILE_IMPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PREPARED_FILE_IMPORT_JOB))
#define PREPARED_FILE_IMPORT_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PREPARED_FILE_IMPORT_JOB, PreparedFileImportJobClass))

typedef struct _PreparedFileImportJob PreparedFileImportJob;
typedef struct _PreparedFileImportJobClass PreparedFileImportJobClass;
#define _prepared_file_unref0(var) ((var == NULL) ? NULL : (var = (prepared_file_unref (var), NULL)))
typedef struct _PreparedFilePrivate PreparedFilePrivate;

#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ())

#define TYPE_INTERLOCKED_NOTIFICATION_OBJECT (interlocked_notification_object_get_type ())
#define INTERLOCKED_NOTIFICATION_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_INTERLOCKED_NOTIFICATION_OBJECT, InterlockedNotificationObject))
#define INTERLOCKED_NOTIFICATION_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_INTERLOCKED_NOTIFICATION_OBJECT, InterlockedNotificationObjectClass))
#define IS_INTERLOCKED_NOTIFICATION_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_INTERLOCKED_NOTIFICATION_OBJECT))
#define IS_INTERLOCKED_NOTIFICATION_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_INTERLOCKED_NOTIFICATION_OBJECT))
#define INTERLOCKED_NOTIFICATION_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_INTERLOCKED_NOTIFICATION_OBJECT, InterlockedNotificationObjectClass))

typedef struct _InterlockedNotificationObject InterlockedNotificationObject;
typedef struct _InterlockedNotificationObjectClass InterlockedNotificationObjectClass;

#define TYPE_PREPARED_FILE_CLUSTER (prepared_file_cluster_get_type ())
#define PREPARED_FILE_CLUSTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PREPARED_FILE_CLUSTER, PreparedFileCluster))
#define PREPARED_FILE_CLUSTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PREPARED_FILE_CLUSTER, PreparedFileClusterClass))
#define IS_PREPARED_FILE_CLUSTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PREPARED_FILE_CLUSTER))
#define IS_PREPARED_FILE_CLUSTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PREPARED_FILE_CLUSTER))
#define PREPARED_FILE_CLUSTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PREPARED_FILE_CLUSTER, PreparedFileClusterClass))

typedef struct _PreparedFileCluster PreparedFileCluster;
typedef struct _PreparedFileClusterClass PreparedFileClusterClass;
typedef struct _NotificationObjectPrivate NotificationObjectPrivate;
typedef struct _InterlockedNotificationObjectPrivate InterlockedNotificationObjectPrivate;
typedef struct _PreparedFileClusterPrivate PreparedFileClusterPrivate;
#define _notification_object_unref0(var) ((var == NULL) ? NULL : (var = (notification_object_unref (var), NULL)))

#define LIBRARY_PHOTO_SOURCE_COLLECTION_TYPE_STATE (library_photo_source_collection_state_get_type ())

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

#define TYPE_LIBRARY_PHOTO (library_photo_get_type ())
#define LIBRARY_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_PHOTO, LibraryPhoto))
#define LIBRARY_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_PHOTO, LibraryPhotoClass))
#define IS_LIBRARY_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_PHOTO))
#define IS_LIBRARY_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_PHOTO))
#define LIBRARY_PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_PHOTO, LibraryPhotoClass))

typedef struct _LibraryPhoto LibraryPhoto;
typedef struct _LibraryPhotoClass LibraryPhotoClass;

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

#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 VIDEO_SOURCE_COLLECTION_TYPE_STATE (video_source_collection_state_get_type ())

#define TYPE_VIDEO_SOURCE (video_source_get_type ())
#define VIDEO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_SOURCE, VideoSource))
#define VIDEO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_SOURCE, VideoSourceClass))
#define IS_VIDEO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_SOURCE))
#define IS_VIDEO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_SOURCE))
#define VIDEO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_SOURCE, VideoSourceClass))

typedef struct _VideoSource VideoSource;
typedef struct _VideoSourceClass VideoSourceClass;

#define TYPE_VIDEO (video_get_type ())
#define VIDEO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO, Video))
#define VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO, VideoClass))
#define IS_VIDEO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO))
#define IS_VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO))
#define VIDEO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO, VideoClass))

typedef struct _Video Video;
typedef struct _VideoClass VideoClass;

#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 TYPE_DATABASE_TABLE (database_table_get_type ())
#define DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_TABLE, DatabaseTable))
#define DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_TABLE, DatabaseTableClass))
#define IS_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_TABLE))
#define IS_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_TABLE))
#define DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_TABLE, DatabaseTableClass))

typedef struct _DatabaseTable DatabaseTable;
typedef struct _DatabaseTableClass DatabaseTableClass;

#define TYPE_VIDEO_TABLE (video_table_get_type ())
#define VIDEO_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_TABLE, VideoTable))
#define VIDEO_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_TABLE, VideoTableClass))
#define IS_VIDEO_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_TABLE))
#define IS_VIDEO_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_TABLE))
#define VIDEO_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_TABLE, VideoTableClass))

typedef struct _VideoTable VideoTable;
typedef struct _VideoTableClass VideoTableClass;
#define _database_table_unref0(var) ((var == NULL) ? NULL : (var = (database_table_unref (var), NULL)))

#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_DATABASE_SOURCE_HOLDING_TANK (database_source_holding_tank_get_type ())
#define DATABASE_SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_SOURCE_HOLDING_TANK, DatabaseSourceHoldingTank))
#define DATABASE_SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_SOURCE_HOLDING_TANK, DatabaseSourceHoldingTankClass))
#define IS_DATABASE_SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_SOURCE_HOLDING_TANK))
#define IS_DATABASE_SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_SOURCE_HOLDING_TANK))
#define DATABASE_SOURCE_HOLDING_TANK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_SOURCE_HOLDING_TANK, DatabaseSourceHoldingTankClass))

typedef struct _DatabaseSourceHoldingTank DatabaseSourceHoldingTank;
typedef struct _DatabaseSourceHoldingTankClass DatabaseSourceHoldingTankClass;

#define TYPE_MEDIA_SOURCE_HOLDING_TANK (media_source_holding_tank_get_type ())
#define MEDIA_SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE_HOLDING_TANK, MediaSourceHoldingTank))
#define MEDIA_SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE_HOLDING_TANK, MediaSourceHoldingTankClass))
#define IS_MEDIA_SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE_HOLDING_TANK))
#define IS_MEDIA_SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE_HOLDING_TANK))
#define MEDIA_SOURCE_HOLDING_TANK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE_HOLDING_TANK, MediaSourceHoldingTankClass))

typedef struct _MediaSourceHoldingTank MediaSourceHoldingTank;
typedef struct _MediaSourceHoldingTankClass MediaSourceHoldingTankClass;
#define _source_holding_tank_unref0(var) ((var == NULL) ? NULL : (var = (source_holding_tank_unref (var), NULL)))

#define TYPE_MONITORABLE (monitorable_get_type ())
#define MONITORABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MONITORABLE, Monitorable))
#define IS_MONITORABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MONITORABLE))
#define MONITORABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MONITORABLE, MonitorableIface))

typedef struct _Monitorable Monitorable;
typedef struct _MonitorableIface MonitorableIface;

#define TYPE_PHOTO_ID (photo_id_get_type ())
typedef struct _PhotoID PhotoID;

#define TYPE_PHOTO_TABLE (photo_table_get_type ())
#define PHOTO_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_TABLE, PhotoTable))
#define PHOTO_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_TABLE, PhotoTableClass))
#define IS_PHOTO_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_TABLE))
#define IS_PHOTO_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_TABLE))
#define PHOTO_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_TABLE, PhotoTableClass))

typedef struct _PhotoTable PhotoTable;
typedef struct _PhotoTableClass PhotoTableClass;
typedef struct _BatchImportProcessPreparedFilesData BatchImportProcessPreparedFilesData;
typedef struct _PrepareFilesJobPrivate PrepareFilesJobPrivate;
typedef struct _PreparedFileImportJobPrivate PreparedFileImportJobPrivate;

#define TYPE_READY_FOR_IMPORT (ready_for_import_get_type ())
#define READY_FOR_IMPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_READY_FOR_IMPORT, ReadyForImport))
#define READY_FOR_IMPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_READY_FOR_IMPORT, ReadyForImportClass))
#define IS_READY_FOR_IMPORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_READY_FOR_IMPORT))
#define IS_READY_FOR_IMPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_READY_FOR_IMPORT))
#define READY_FOR_IMPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_READY_FOR_IMPORT, ReadyForImportClass))

typedef struct _ReadyForImport ReadyForImport;
typedef struct _ReadyForImportClass ReadyForImportClass;
typedef struct _ReadyForImportPrivate ReadyForImportPrivate;

#define TYPE_PHOTO_IMPORT_PARAMS (photo_import_params_get_type ())
#define PHOTO_IMPORT_PARAMS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_IMPORT_PARAMS, PhotoImportParams))
#define PHOTO_IMPORT_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_IMPORT_PARAMS, PhotoImportParamsClass))
#define IS_PHOTO_IMPORT_PARAMS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_IMPORT_PARAMS))
#define IS_PHOTO_IMPORT_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_IMPORT_PARAMS))
#define PHOTO_IMPORT_PARAMS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_IMPORT_PARAMS, PhotoImportParamsClass))

typedef struct _PhotoImportParams PhotoImportParams;
typedef struct _PhotoImportParamsClass PhotoImportParamsClass;

#define TYPE_VIDEO_IMPORT_PARAMS (video_import_params_get_type ())
#define VIDEO_IMPORT_PARAMS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_IMPORT_PARAMS, VideoImportParams))
#define VIDEO_IMPORT_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_IMPORT_PARAMS, VideoImportParamsClass))
#define IS_VIDEO_IMPORT_PARAMS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_IMPORT_PARAMS))
#define IS_VIDEO_IMPORT_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_IMPORT_PARAMS))
#define VIDEO_IMPORT_PARAMS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_IMPORT_PARAMS, VideoImportParamsClass))

typedef struct _VideoImportParams VideoImportParams;
typedef struct _VideoImportParamsClass VideoImportParamsClass;

#define TYPE_TOMBSTONE (tombstone_get_type ())
#define TOMBSTONE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TOMBSTONE, Tombstone))
#define TOMBSTONE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TOMBSTONE, TombstoneClass))
#define IS_TOMBSTONE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TOMBSTONE))
#define IS_TOMBSTONE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TOMBSTONE))
#define TOMBSTONE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TOMBSTONE, TombstoneClass))

typedef struct _Tombstone Tombstone;
typedef struct _TombstoneClass TombstoneClass;

#define TYPE_TOMBSTONE_SOURCE_COLLECTION (tombstone_source_collection_get_type ())
#define TOMBSTONE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TOMBSTONE_SOURCE_COLLECTION, TombstoneSourceCollection))
#define TOMBSTONE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TOMBSTONE_SOURCE_COLLECTION, TombstoneSourceCollectionClass))
#define IS_TOMBSTONE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TOMBSTONE_SOURCE_COLLECTION))
#define IS_TOMBSTONE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TOMBSTONE_SOURCE_COLLECTION))
#define TOMBSTONE_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TOMBSTONE_SOURCE_COLLECTION, TombstoneSourceCollectionClass))

typedef struct _TombstoneSourceCollection TombstoneSourceCollection;
typedef struct _TombstoneSourceCollectionClass TombstoneSourceCollectionClass;
typedef struct _PhotoImportParamsPrivate PhotoImportParamsPrivate;

#define PHOTO_FILE_SNIFFER_TYPE_OPTIONS (photo_file_sniffer_options_get_type ())

#define TYPE_THUMBNAILS (thumbnails_get_type ())
#define THUMBNAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAILS, Thumbnails))
#define THUMBNAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAILS, ThumbnailsClass))
#define IS_THUMBNAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAILS))
#define IS_THUMBNAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAILS))
#define THUMBNAILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAILS, ThumbnailsClass))

typedef struct _Thumbnails Thumbnails;
typedef struct _ThumbnailsClass ThumbnailsClass;

#define TYPE_PHOTO_ROW (photo_row_get_type ())
#define PHOTO_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_ROW, PhotoRow))
#define PHOTO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_ROW, PhotoRowClass))
#define IS_PHOTO_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_ROW))
#define IS_PHOTO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_ROW))
#define PHOTO_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_ROW, PhotoRowClass))

typedef struct _PhotoRow PhotoRow;
typedef struct _PhotoRowClass PhotoRowClass;

#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;
typedef struct _BackingPhotoRowPrivate BackingPhotoRowPrivate;

#define TYPE_BACKING_PHOTO_ID (backing_photo_id_get_type ())
typedef struct _BackingPhotoID BackingPhotoID;

#define TYPE_DIMENSIONS (dimensions_get_type ())
typedef struct _Dimensions Dimensions;

#define TYPE_ORIENTATION (orientation_get_type ())

#define TYPE_RAW_DEVELOPER (raw_developer_get_type ())
#define _backing_photo_row_unref0(var) ((var == NULL) ? NULL : (var = (backing_photo_row_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 _thumbnails_unref0(var) ((var == NULL) ? NULL : (var = (thumbnails_unref (var), NULL)))
typedef struct _ThumbnailWriterJobPrivate ThumbnailWriterJobPrivate;
typedef struct _CompletedImportObjectPrivate CompletedImportObjectPrivate;

#define TYPE_MEDIA_COLLECTION_REGISTRY (media_collection_registry_get_type ())
#define MEDIA_COLLECTION_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistry))
#define MEDIA_COLLECTION_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistryClass))
#define IS_MEDIA_COLLECTION_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_COLLECTION_REGISTRY))
#define IS_MEDIA_COLLECTION_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_COLLECTION_REGISTRY))
#define MEDIA_COLLECTION_REGISTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistryClass))

typedef struct _MediaCollectionRegistry MediaCollectionRegistry;
typedef struct _MediaCollectionRegistryClass MediaCollectionRegistryClass;
#define _media_collection_registry_unref0(var) ((var == NULL) ? NULL : (var = (media_collection_registry_unref (var), NULL)))

#define TYPE_CONTAINER_SOURCE_COLLECTION (container_source_collection_get_type ())
#define CONTAINER_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection))
#define CONTAINER_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollectionClass))
#define IS_CONTAINER_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONTAINER_SOURCE_COLLECTION))
#define IS_CONTAINER_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONTAINER_SOURCE_COLLECTION))
#define CONTAINER_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollectionClass))

typedef struct _ContainerSourceCollection ContainerSourceCollection;
typedef struct _ContainerSourceCollectionClass ContainerSourceCollectionClass;

#define TYPE_EVENT_SOURCE_COLLECTION (event_source_collection_get_type ())
#define EVENT_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT_SOURCE_COLLECTION, EventSourceCollection))
#define EVENT_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT_SOURCE_COLLECTION, EventSourceCollectionClass))
#define IS_EVENT_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT_SOURCE_COLLECTION))
#define IS_EVENT_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENT_SOURCE_COLLECTION))
#define EVENT_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENT_SOURCE_COLLECTION, EventSourceCollectionClass))

typedef struct _EventSourceCollection EventSourceCollection;
typedef struct _EventSourceCollectionClass EventSourceCollectionClass;

#define TYPE_TAG_SOURCE_COLLECTION (tag_source_collection_get_type ())
#define TAG_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TAG_SOURCE_COLLECTION, TagSourceCollection))
#define TAG_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TAG_SOURCE_COLLECTION, TagSourceCollectionClass))
#define IS_TAG_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TAG_SOURCE_COLLECTION))
#define IS_TAG_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TAG_SOURCE_COLLECTION))
#define TAG_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TAG_SOURCE_COLLECTION, TagSourceCollectionClass))

typedef struct _TagSourceCollection TagSourceCollection;
typedef struct _TagSourceCollectionClass TagSourceCollectionClass;
typedef struct _DuplicatedFilePrivate DuplicatedFilePrivate;
#define _video_id_free0(var) ((var == NULL) ? NULL : (var = (video_id_free (var), NULL)))
#define _photo_id_free0(var) ((var == NULL) ? NULL : (var = (photo_id_free (var), NULL)))

#define TYPE_ABSTRACT_SEMAPHORE (abstract_semaphore_get_type ())
#define ABSTRACT_SEMAPHORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphore))
#define ABSTRACT_SEMAPHORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphoreClass))
#define IS_ABSTRACT_SEMAPHORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ABSTRACT_SEMAPHORE))
#define IS_ABSTRACT_SEMAPHORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ABSTRACT_SEMAPHORE))
#define ABSTRACT_SEMAPHORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphoreClass))

typedef struct _AbstractSemaphore AbstractSemaphore;
typedef struct _AbstractSemaphoreClass AbstractSemaphoreClass;
typedef struct _FileToPreparePrivate FileToPreparePrivate;
#define _file_to_prepare_unref0(var) ((var == NULL) ? NULL : (var = (file_to_prepare_unref (var), NULL)))
typedef struct _ParamSpecFileToPrepare ParamSpecFileToPrepare;

#define TYPE_PHOTO_FILE_FORMAT_PROPERTIES (photo_file_format_properties_get_type ())
#define PHOTO_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatProperties))
#define PHOTO_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatPropertiesClass))
#define IS_PHOTO_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES))
#define IS_PHOTO_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_FORMAT_PROPERTIES))
#define PHOTO_FILE_FORMAT_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatPropertiesClass))

typedef struct _PhotoFileFormatProperties PhotoFileFormatProperties;
typedef struct _PhotoFileFormatPropertiesClass PhotoFileFormatPropertiesClass;

#define TYPE_RAW_FILE_FORMAT_PROPERTIES (raw_file_format_properties_get_type ())
#define RAW_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RAW_FILE_FORMAT_PROPERTIES, RawFileFormatProperties))
#define RAW_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RAW_FILE_FORMAT_PROPERTIES, RawFileFormatPropertiesClass))
#define IS_RAW_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RAW_FILE_FORMAT_PROPERTIES))
#define IS_RAW_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RAW_FILE_FORMAT_PROPERTIES))
#define RAW_FILE_FORMAT_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RAW_FILE_FORMAT_PROPERTIES, RawFileFormatPropertiesClass))

typedef struct _RawFileFormatProperties RawFileFormatProperties;
typedef struct _RawFileFormatPropertiesClass RawFileFormatPropertiesClass;
#define _photo_file_format_properties_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_format_properties_unref (var), NULL)))

#define TYPE_JFIF_FILE_FORMAT_PROPERTIES (jfif_file_format_properties_get_type ())
#define JFIF_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_JFIF_FILE_FORMAT_PROPERTIES, JfifFileFormatProperties))
#define JFIF_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_JFIF_FILE_FORMAT_PROPERTIES, JfifFileFormatPropertiesClass))
#define IS_JFIF_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_JFIF_FILE_FORMAT_PROPERTIES))
#define IS_JFIF_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_JFIF_FILE_FORMAT_PROPERTIES))
#define JFIF_FILE_FORMAT_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_JFIF_FILE_FORMAT_PROPERTIES, JfifFileFormatPropertiesClass))

typedef struct _JfifFileFormatProperties JfifFileFormatProperties;
typedef struct _JfifFileFormatPropertiesClass JfifFileFormatPropertiesClass;
typedef struct _ParamSpecPreparedFile ParamSpecPreparedFile;
#define _g_timer_destroy0(var) ((var == NULL) ? NULL : (var = (g_timer_destroy (var), NULL)))

#define TYPE_PHOTO_FILE_ADAPTER (photo_file_adapter_get_type ())
#define PHOTO_FILE_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter))
#define PHOTO_FILE_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapterClass))
#define IS_PHOTO_FILE_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_ADAPTER))
#define IS_PHOTO_FILE_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_ADAPTER))
#define PHOTO_FILE_ADAPTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapterClass))

typedef struct _PhotoFileAdapter PhotoFileAdapter;
typedef struct _PhotoFileAdapterClass PhotoFileAdapterClass;

#define TYPE_PHOTO_FILE_READER (photo_file_reader_get_type ())
#define PHOTO_FILE_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_READER, PhotoFileReader))
#define PHOTO_FILE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_READER, PhotoFileReaderClass))
#define IS_PHOTO_FILE_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_READER))
#define IS_PHOTO_FILE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_READER))
#define PHOTO_FILE_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_READER, PhotoFileReaderClass))

typedef struct _PhotoFileReader PhotoFileReader;
typedef struct _PhotoFileReaderClass PhotoFileReaderClass;

#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 _photo_file_adapter_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_adapter_unref (var), NULL)))
#define _photo_import_params_unref0(var) ((var == NULL) ? NULL : (var = (photo_import_params_unref (var), NULL)))
#define _video_import_params_unref0(var) ((var == NULL) ? NULL : (var = (video_import_params_unref (var), NULL)))
typedef struct _VideoImportParamsPrivate VideoImportParamsPrivate;

#define TYPE_VIDEO_ROW (video_row_get_type ())
#define VIDEO_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_ROW, VideoRow))
#define VIDEO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_ROW, VideoRowClass))
#define IS_VIDEO_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_ROW))
#define IS_VIDEO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_ROW))
#define VIDEO_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_ROW, VideoRowClass))

typedef struct _VideoRow VideoRow;
typedef struct _VideoRowClass VideoRowClass;
typedef struct _ParamSpecReadyForImport ParamSpecReadyForImport;
#define _ready_for_import_unref0(var) ((var == NULL) ? NULL : (var = (ready_for_import_unref (var), NULL)))

#define THUMBNAIL_CACHE_TYPE_SIZE (thumbnail_cache_size_get_type ())
typedef struct _ParamSpecCompletedImportObject ParamSpecCompletedImportObject;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

typedef enum  {
	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;

typedef enum  {
	GPHOTO_ERROR_LIBRARY
} GPhotoError;
#define GPHOTO_ERROR gphoto_error_quark ()
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);
	gboolean (*recurse) (BatchImportJob* self);
};

struct _ParamSpecBatchImportJob {
	GParamSpec parent_instance;
};

struct _FileImportJob {
	BatchImportJob parent_instance;
	FileImportJobPrivate * priv;
};

struct _FileImportJobClass {
	BatchImportJobClass parent_class;
};

struct _FileImportJobPrivate {
	GFile* file_or_dir;
	gboolean copy_to_library;
	FileImportJob* associated;
	gboolean _recurse;
};

struct _ImportID {
	gint64 id;
};

struct _BatchImportRoll {
	GTypeInstance parent_instance;
	volatile int ref_count;
	BatchImportRollPrivate * priv;
	ImportID import_id;
	ViewCollection* generated_events;
};

struct _BatchImportRollClass {
	GTypeClass parent_class;
	void (*finalize) (BatchImportRoll *self);
};

struct _ParamSpecBatchImportRoll {
	GParamSpec parent_instance;
};

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 _ParamSpecBatchImportResult {
	GParamSpec parent_instance;
};

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 _ParamSpecImportManifest {
	GParamSpec parent_instance;
};

struct _BatchImport {
	GObject parent_instance;
	BatchImportPrivate * priv;
};

struct _BatchImportClass {
	GObjectClass parent_class;
};

typedef void (*BatchImportImportReporter) (ImportManifest* manifest, BatchImportRoll* import_roll, void* user_data);
struct _BatchImportPrivate {
	GeeIterable* jobs;
	BatchImportRoll* import_roll;
	gchar* name;
	guint64 completed_bytes;
	guint64 total_bytes;
	BatchImportImportReporter reporter;
	gpointer reporter_target;
	ImportManifest* manifest;
	gboolean scheduled;
	gboolean completed;
	gint file_imports_to_perform;
	gint file_imports_completed;
	GCancellable* cancellable;
	gulong last_preparing_ms;
	GeeHashSet* skipset;
	GeeHashMap* imported_full_md5_table;
	guint throbber_id;
	guint max_outstanding_import_jobs;
	gboolean untrash_duplicates;
	gboolean mark_duplicates_online;
	GeeList* ready_files;
	GeeList* ready_thumbnails;
	GeeList* display_imported_queue;
	GeeList* ready_sources;
};

typedef enum  {
	BACKGROUND_JOB_JOB_PRIORITY_HIGHEST = 100,
	BACKGROUND_JOB_JOB_PRIORITY_HIGH = 75,
	BACKGROUND_JOB_JOB_PRIORITY_NORMAL = 50,
	BACKGROUND_JOB_JOB_PRIORITY_LOW = 25,
	BACKGROUND_JOB_JOB_PRIORITY_LOWEST = 0
} BackgroundJobJobPriority;

struct _BackgroundJob {
	GTypeInstance parent_instance;
	volatile int ref_count;
	BackgroundJobPrivate * priv;
};

struct _BackgroundJobClass {
	GTypeClass parent_class;
	void (*finalize) (BackgroundJob *self);
	void (*execute) (BackgroundJob* self);
	BackgroundJobJobPriority (*get_priority) (BackgroundJob* self);
};

struct _BackgroundImportJob {
	BackgroundJob parent_instance;
	BackgroundImportJobPrivate * priv;
	ImportResult abort_flag;
	GeeList* failed;
};

struct _BackgroundImportJobClass {
	BackgroundJobClass parent_class;
};

typedef void (*CompletionCallback) (BackgroundJob* job, void* user_data);
typedef void (*CancellationCallback) (BackgroundJob* job, void* user_data);
struct _WorkSniffer {
	BackgroundImportJob parent_instance;
	WorkSnifferPrivate * priv;
	GeeList* files_to_prepare;
	guint64 total_bytes;
};

struct _WorkSnifferClass {
	BackgroundImportJobClass parent_class;
};

typedef void (*NotificationCallback) (BackgroundJob* job, NotificationObject* user, void* user_data);
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 _PreparedFile {
	GTypeInstance parent_instance;
	volatile int ref_count;
	PreparedFilePrivate * priv;
	BatchImportJob* job;
	ImportResult result;
	GFile* file;
	GFile* associated_file;
	gchar* source_id;
	gchar* dest_id;
	gboolean copy_to_library;
	gchar* exif_md5;
	gchar* thumbnail_md5;
	gchar* full_md5;
	PhotoFileFormat file_format;
	guint64 filesize;
	gboolean is_video;
};

struct _PreparedFileClass {
	GTypeClass parent_class;
	void (*finalize) (PreparedFile *self);
};

struct _NotificationObject {
	GTypeInstance parent_instance;
	volatile int ref_count;
	NotificationObjectPrivate * priv;
};

struct _NotificationObjectClass {
	GTypeClass parent_class;
	void (*finalize) (NotificationObject *self);
};

struct _InterlockedNotificationObject {
	NotificationObject parent_instance;
	InterlockedNotificationObjectPrivate * priv;
};

struct _InterlockedNotificationObjectClass {
	NotificationObjectClass parent_class;
};

struct _PreparedFileCluster {
	InterlockedNotificationObject parent_instance;
	PreparedFileClusterPrivate * priv;
	GeeArrayList* list;
};

struct _PreparedFileClusterClass {
	InterlockedNotificationObjectClass parent_class;
};

typedef enum  {
	LIBRARY_PHOTO_SOURCE_COLLECTION_STATE_UNKNOWN,
	LIBRARY_PHOTO_SOURCE_COLLECTION_STATE_ONLINE,
	LIBRARY_PHOTO_SOURCE_COLLECTION_STATE_OFFLINE,
	LIBRARY_PHOTO_SOURCE_COLLECTION_STATE_TRASH,
	LIBRARY_PHOTO_SOURCE_COLLECTION_STATE_EDITABLE,
	LIBRARY_PHOTO_SOURCE_COLLECTION_STATE_DEVELOPER
} LibraryPhotoSourceCollectionState;

typedef enum  {
	VIDEO_SOURCE_COLLECTION_STATE_UNKNOWN,
	VIDEO_SOURCE_COLLECTION_STATE_ONLINE,
	VIDEO_SOURCE_COLLECTION_STATE_OFFLINE,
	VIDEO_SOURCE_COLLECTION_STATE_TRASH
} VideoSourceCollectionState;

struct _VideoID {
	gint64 id;
};

struct _MonitorableIface {
	GTypeInterface parent_iface;
	gboolean (*is_offline) (Monitorable* self);
	void (*mark_online) (Monitorable* self);
	void (*mark_offline) (Monitorable* self);
	void (*set_master_file) (Monitorable* self, GFile* file);
	void (*set_master_timestamp) (Monitorable* self, GFileInfo* info);
};

struct _PhotoID {
	gint64 id;
};

struct _BatchImportProcessPreparedFilesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BatchImport* self;
	GeeList* list;
	GeeList* _prepared_file_list;
	GeeList* _tmp0_;
	GeeList* _tmp1_;
	gint _prepared_file_size;
	GeeList* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gint _prepared_file_index;
	gint _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	PreparedFile* prepared_file;
	GeeList* _tmp8_;
	gint _tmp9_;
	gpointer _tmp10_;
	BatchImportResult* import_result;
	LibraryPhotoSourceCollectionState photo_state;
	LibraryPhoto* photo;
	LibraryPhotoSourceCollection* _tmp11_;
	PreparedFile* _tmp12_;
	GFile* _tmp13_;
	LibraryPhotoSourceCollectionState _tmp14_;
	LibraryPhoto* _tmp15_;
	LibraryPhoto* _tmp16_;
	LibraryPhotoSourceCollectionState _tmp17_;
	PreparedFile* _tmp18_;
	BatchImportJob* _tmp19_;
	PreparedFile* _tmp20_;
	GFile* _tmp21_;
	PreparedFile* _tmp22_;
	GFile* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	PreparedFile* _tmp26_;
	GFile* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	LibraryPhoto* _tmp30_;
	GFile* _tmp31_;
	GFile* _tmp32_;
	DuplicatedFile* _tmp33_;
	DuplicatedFile* _tmp34_;
	BatchImportResult* _tmp35_;
	LibraryPhotoSourceCollectionState _tmp36_;
	LibraryPhoto* _tmp37_;
	LibraryPhotoSourceCollectionState _tmp38_;
	GEnumValue* _tmp39_;
	BatchImportResult* _tmp40_;
	BatchImportResult* _tmp41_;
	VideoSourceCollectionState video_state;
	Video* video;
	VideoSourceCollection* _tmp42_;
	PreparedFile* _tmp43_;
	GFile* _tmp44_;
	VideoSourceCollectionState _tmp45_;
	Video* _tmp46_;
	Video* _tmp47_;
	VideoSourceCollectionState _tmp48_;
	PreparedFile* _tmp49_;
	BatchImportJob* _tmp50_;
	PreparedFile* _tmp51_;
	GFile* _tmp52_;
	PreparedFile* _tmp53_;
	GFile* _tmp54_;
	gchar* _tmp55_;
	gchar* _tmp56_;
	PreparedFile* _tmp57_;
	GFile* _tmp58_;
	gchar* _tmp59_;
	gchar* _tmp60_;
	Video* _tmp61_;
	GFile* _tmp62_;
	GFile* _tmp63_;
	DuplicatedFile* _tmp64_;
	DuplicatedFile* _tmp65_;
	BatchImportResult* _tmp66_;
	VideoSourceCollectionState _tmp67_;
	Video* _tmp68_;
	VideoSourceCollectionState _tmp69_;
	GEnumValue* _tmp70_;
	BatchImportResult* _tmp71_;
	BatchImportResult* _tmp72_;
	gboolean _tmp73_;
	PreparedFile* _tmp74_;
	gboolean _tmp75_;
	PreparedFile* _tmp76_;
	GFile* _tmp77_;
	PreparedFile* _tmp78_;
	const gchar* _tmp79_;
	gboolean _tmp80_;
	VideoID* duplicate_ids;
	VideoTable* _tmp81_;
	VideoTable* _tmp82_;
	PreparedFile* _tmp83_;
	GFile* _tmp84_;
	PreparedFile* _tmp85_;
	const gchar* _tmp86_;
	gint _tmp87_;
	VideoID* _tmp88_;
	VideoID* _tmp89_;
	gint _tmp89__length1;
	gint duplicate_ids_length1;
	gint _duplicate_ids_size_;
	VideoID* _tmp90_;
	gint _tmp90__length1;
	DuplicatedFile* duplicated_file;
	VideoID* _tmp91_;
	gint _tmp91__length1;
	VideoID _tmp92_;
	DuplicatedFile* _tmp93_;
	ImportResult result_code;
	gboolean _tmp94_;
	Video* dupe_video;
	VideoSourceCollection* _tmp95_;
	MediaSourceHoldingTank* _tmp96_;
	MediaSourceHoldingTank* _tmp97_;
	PreparedFile* _tmp98_;
	GFile* _tmp99_;
	MediaSource* _tmp100_;
	Video* _tmp101_;
	Video* _tmp102_;
	VideoSourceCollection* _tmp103_;
	MediaSourceHoldingTank* _tmp104_;
	MediaSourceHoldingTank* _tmp105_;
	PreparedFile* _tmp106_;
	const gchar* _tmp107_;
	MediaSource* _tmp108_;
	Video* _tmp109_;
	PreparedFile* _tmp110_;
	GFile* _tmp111_;
	gchar* _tmp112_;
	gchar* _tmp113_;
	Video* _tmp114_;
	PreparedFile* _tmp115_;
	GFile* _tmp116_;
	Video* _tmp117_;
	ImportManifest* _tmp118_;
	GeeList* _tmp119_;
	Video* _tmp120_;
	Video* _tmp121_;
	guint64 _tmp122_;
	PreparedFile* _tmp123_;
	BatchImportJob* _tmp124_;
	PreparedFile* _tmp125_;
	GFile* _tmp126_;
	PreparedFile* _tmp127_;
	GFile* _tmp128_;
	gchar* _tmp129_;
	gchar* _tmp130_;
	PreparedFile* _tmp131_;
	GFile* _tmp132_;
	gchar* _tmp133_;
	gchar* _tmp134_;
	DuplicatedFile* _tmp135_;
	ImportResult _tmp136_;
	BatchImportResult* _tmp137_;
	ImportResult _tmp138_;
	ImportManifest* _tmp139_;
	BatchImportResult* _tmp140_;
	PreparedFile* _tmp141_;
	GFile* _tmp142_;
	GFile* _tmp143_;
	gboolean _tmp144_;
	PreparedFile* _tmp145_;
	BatchImportJob* _tmp146_;
	PreparedFile* _tmp147_;
	GFile* _tmp148_;
	PreparedFile* _tmp149_;
	GFile* _tmp150_;
	gchar* _tmp151_;
	gchar* _tmp152_;
	PreparedFile* _tmp153_;
	GFile* _tmp154_;
	gchar* _tmp155_;
	gchar* _tmp156_;
	PreparedFile* _tmp157_;
	GFile* _tmp158_;
	GFile* _tmp159_;
	DuplicatedFile* _tmp160_;
	DuplicatedFile* _tmp161_;
	BatchImportResult* _tmp162_;
	PreparedFile* _tmp163_;
	GFile* _tmp164_;
	PreparedFile* _tmp165_;
	const gchar* _tmp166_;
	PreparedFile* _tmp167_;
	PhotoFileFormat _tmp168_;
	gboolean _tmp169_;
	gboolean _tmp170_;
	LibraryPhotoSourceCollection* _tmp171_;
	PreparedFile* _tmp172_;
	GFile* _tmp173_;
	LibraryPhoto* _tmp174_;
	gboolean _tmp175_;
	LibraryPhoto* _tmp176_;
	PreparedFile* _tmp177_;
	const gchar* _tmp178_;
	LibraryPhotoSourceCollection* _tmp179_;
	PreparedFile* _tmp180_;
	const gchar* _tmp181_;
	LibraryPhoto* _tmp182_;
	LibraryPhoto* _tmp183_;
	PreparedFile* _tmp184_;
	GFile* _tmp185_;
	gchar* _tmp186_;
	gchar* _tmp187_;
	LibraryPhoto* _tmp188_;
	PreparedFile* _tmp189_;
	GFile* _tmp190_;
	LibraryPhoto* _tmp191_;
	LibraryPhoto* _tmp192_;
	gboolean _tmp193_;
	LibraryPhoto* _tmp194_;
	gboolean _tmp195_;
	LibraryPhotoSourceCollection* _tmp196_;
	PreparedFile* _tmp197_;
	GFile* _tmp198_;
	LibraryPhoto* _tmp199_;
	gboolean _tmp200_;
	LibraryPhoto* _tmp201_;
	PreparedFile* _tmp202_;
	const gchar* _tmp203_;
	LibraryPhotoSourceCollection* _tmp204_;
	PreparedFile* _tmp205_;
	const gchar* _tmp206_;
	LibraryPhoto* _tmp207_;
	LibraryPhoto* _tmp208_;
	PreparedFile* _tmp209_;
	GFile* _tmp210_;
	gchar* _tmp211_;
	gchar* _tmp212_;
	LibraryPhoto* _tmp213_;
	PreparedFile* _tmp214_;
	GFile* _tmp215_;
	LibraryPhoto* _tmp216_;
	LibraryPhoto* _tmp217_;
	PreparedFile* _tmp218_;
	BatchImportJob* _tmp219_;
	PreparedFile* _tmp220_;
	GFile* _tmp221_;
	PreparedFile* _tmp222_;
	GFile* _tmp223_;
	gchar* _tmp224_;
	gchar* _tmp225_;
	PreparedFile* _tmp226_;
	GFile* _tmp227_;
	gchar* _tmp228_;
	gchar* _tmp229_;
	BatchImportResult* _tmp230_;
	ImportManifest* _tmp231_;
	GeeList* _tmp232_;
	LibraryPhoto* _tmp233_;
	ImportManifest* _tmp234_;
	BatchImportResult* _tmp235_;
	LibraryPhoto* _tmp236_;
	guint64 _tmp237_;
	PreparedFile* _tmp238_;
	GFile* _tmp239_;
	gchar* _tmp240_;
	gchar* _tmp241_;
	PhotoID* photo_ids;
	PhotoTable* _tmp242_;
	PhotoTable* _tmp243_;
	PreparedFile* _tmp244_;
	GFile* _tmp245_;
	PreparedFile* _tmp246_;
	const gchar* _tmp247_;
	PreparedFile* _tmp248_;
	PhotoFileFormat _tmp249_;
	gint _tmp250_;
	PhotoID* _tmp251_;
	PhotoID* _tmp252_;
	gint _tmp252__length1;
	gint photo_ids_length1;
	gint _photo_ids_size_;
	PhotoID* _tmp253_;
	gint _tmp253__length1;
	DuplicatedFile* _vala1_duplicated_file;
	PhotoID* _tmp254_;
	gint _tmp254__length1;
	PhotoID _tmp255_;
	DuplicatedFile* _tmp256_;
	PreparedFile* _tmp257_;
	BatchImportJob* _tmp258_;
	PreparedFile* _tmp259_;
	GFile* _tmp260_;
	PreparedFile* _tmp261_;
	GFile* _tmp262_;
	gchar* _tmp263_;
	gchar* _tmp264_;
	PreparedFile* _tmp265_;
	GFile* _tmp266_;
	gchar* _tmp267_;
	gchar* _tmp268_;
	DuplicatedFile* _tmp269_;
	BatchImportResult* _tmp270_;
	BatchImportResult* _tmp271_;
	BatchImportResult* _tmp272_;
	GeeList* _tmp273_;
	PreparedFile* _tmp274_;
};

struct _PrepareFilesJob {
	BackgroundImportJob parent_instance;
	PrepareFilesJobPrivate * priv;
	gint prepared_files;
};

struct _PrepareFilesJobClass {
	BackgroundImportJobClass parent_class;
};

struct _PreparedFileImportJob {
	BackgroundJob parent_instance;
	PreparedFileImportJobPrivate * priv;
	PreparedFile* not_ready;
	ReadyForImport* ready;
	BatchImportResult* failed;
};

struct _PreparedFileImportJobClass {
	BackgroundJobClass parent_class;
};

struct _ReadyForImport {
	GTypeInstance parent_instance;
	volatile int ref_count;
	ReadyForImportPrivate * priv;
	GFile* final_file;
	PreparedFile* prepared_file;
	PhotoImportParams* photo_import_params;
	VideoImportParams* video_import_params;
	BatchImportResult* batch_result;
	gboolean is_video;
};

struct _ReadyForImportClass {
	GTypeClass parent_class;
	void (*finalize) (ReadyForImport *self);
};

typedef enum  {
	PHOTO_FILE_SNIFFER_OPTIONS_GET_ALL = 0x00000000,
	PHOTO_FILE_SNIFFER_OPTIONS_NO_MD5 = 0x00000001
} PhotoFileSnifferOptions;

struct _PhotoImportParams {
	GTypeInstance parent_instance;
	volatile int ref_count;
	PhotoImportParamsPrivate * priv;
	GFile* file;
	GFile* final_associated_file;
	ImportID import_id;
	PhotoFileSnifferOptions sniffer_options;
	gchar* exif_md5;
	gchar* thumbnail_md5;
	gchar* full_md5;
	Thumbnails* thumbnails;
	PhotoRow* row;
	GeeCollection* keywords;
};

struct _PhotoImportParamsClass {
	GTypeClass parent_class;
	void (*finalize) (PhotoImportParams *self);
};

struct _BackingPhotoID {
	gint64 id;
};

struct _Dimensions {
	gint width;
	gint height;
};

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

typedef enum  {
	RAW_DEVELOPER_SHOTWELL = 0,
	RAW_DEVELOPER_CAMERA,
	RAW_DEVELOPER_EMBEDDED
} RawDeveloper;

struct _ThumbnailWriterJob {
	BackgroundImportJob parent_instance;
	ThumbnailWriterJobPrivate * priv;
	CompletedImportObject* completed_import_source;
};

struct _ThumbnailWriterJobClass {
	BackgroundImportJobClass parent_class;
};

struct _CompletedImportObject {
	GTypeInstance parent_instance;
	volatile int ref_count;
	CompletedImportObjectPrivate * priv;
	Thumbnails* thumbnails;
	BatchImportResult* batch_result;
	MediaSource* source;
	BatchImportJob* original_job;
	GdkPixbuf* user_preview;
};

struct _CompletedImportObjectClass {
	GTypeClass parent_class;
	void (*finalize) (CompletedImportObject *self);
};

struct _DuplicatedFile {
	GObject parent_instance;
	DuplicatedFilePrivate * priv;
};

struct _DuplicatedFileClass {
	GObjectClass parent_class;
};

struct _DuplicatedFilePrivate {
	VideoID* video_id;
	PhotoID* photo_id;
	GFile* file;
};

struct _FileToPrepare {
	GTypeInstance parent_instance;
	volatile int ref_count;
	FileToPreparePrivate * priv;
	BatchImportJob* job;
	GFile* file;
	gboolean copy_to_library;
	FileToPrepare* associated;
};

struct _FileToPrepareClass {
	GTypeClass parent_class;
	void (*finalize) (FileToPrepare *self);
};

struct _ParamSpecFileToPrepare {
	GParamSpec parent_instance;
};

struct _WorkSnifferPrivate {
	GeeIterable* jobs;
	GeeHashSet* skipset;
};

struct _ParamSpecPreparedFile {
	GParamSpec parent_instance;
};

struct _PrepareFilesJobPrivate {
	GeeList* files_to_prepare;
	NotificationCallback notification;
	gpointer notification_target;
	GFile* library_dir;
	gint import_file_count;
	gint fail_every;
	gint skip_every;
};

struct _VideoImportParams {
	GTypeInstance parent_instance;
	volatile int ref_count;
	VideoImportParamsPrivate * priv;
	GFile* file;
	ImportID import_id;
	gchar* md5;
	time_t exposure_time_override;
	Thumbnails* thumbnails;
	VideoRow* row;
};

struct _VideoImportParamsClass {
	GTypeClass parent_class;
	void (*finalize) (VideoImportParams *self);
};

struct _ParamSpecReadyForImport {
	GParamSpec parent_instance;
};

struct _PreparedFileImportJobPrivate {
	ImportID import_id;
};

typedef enum  {
	THUMBNAIL_CACHE_SIZE_LARGEST = 360,
	THUMBNAIL_CACHE_SIZE_BIG = 360,
	THUMBNAIL_CACHE_SIZE_MEDIUM = 128,
	THUMBNAIL_CACHE_SIZE_SMALLEST = 128
} ThumbnailCacheSize;

struct _ParamSpecCompletedImportObject {
	GParamSpec parent_instance;
};


static gpointer batch_import_job_parent_class = NULL;
static gpointer file_import_job_parent_class = NULL;
static gpointer batch_import_roll_parent_class = NULL;
static gpointer batch_import_result_parent_class = NULL;
static gpointer import_manifest_parent_class = NULL;
static gpointer batch_import_parent_class = NULL;
static Workers* batch_import_feeder_workers;
static Workers* batch_import_feeder_workers = NULL;
static Workers* batch_import_import_workers;
static Workers* batch_import_import_workers = NULL;
extern LibraryPhotoSourceCollection* library_photo_global;
extern VideoSourceCollection* video_global;
extern TombstoneSourceCollection* tombstone_global;
extern EventSourceCollection* event_global;
extern TagSourceCollection* tag_global;
static gpointer duplicated_file_parent_class = NULL;
static gpointer background_import_job_parent_class = NULL;
static gpointer file_to_prepare_parent_class = NULL;
static gpointer work_sniffer_parent_class = NULL;
static gpointer prepared_file_parent_class = NULL;
static gpointer prepared_file_cluster_parent_class = NULL;
static gpointer prepare_files_job_parent_class = NULL;
static gpointer ready_for_import_parent_class = NULL;
static gpointer prepared_file_import_job_parent_class = NULL;
static gpointer completed_import_object_parent_class = NULL;
static gpointer thumbnail_writer_job_parent_class = NULL;

GType import_result_get_type (void) G_GNUC_CONST;
gchar* import_result_to_string (ImportResult self);
gboolean import_result_is_abort (ImportResult self);
gboolean import_result_is_nonuser_abort (ImportResult self);
ImportResult import_result_convert_error (GError* err, ImportResult default_result);
GQuark gphoto_error_quark (void);
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;
GType duplicated_file_get_type (void) G_GNUC_CONST;
GType data_object_get_type (void) G_GNUC_CONST;
GType data_source_get_type (void) G_GNUC_CONST;
GType thumbnail_source_get_type (void) G_GNUC_CONST;
GType media_source_get_type (void) G_GNUC_CONST;
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;
enum  {
	BATCH_IMPORT_JOB_DUMMY_PROPERTY
};
gchar* batch_import_job_get_dest_identifier (BatchImportJob* self);
static gchar* batch_import_job_real_get_dest_identifier (BatchImportJob* self);
gchar* batch_import_job_get_source_identifier (BatchImportJob* self);
static gchar* batch_import_job_real_get_source_identifier (BatchImportJob* self);
gboolean batch_import_job_is_directory (BatchImportJob* self);
static gboolean batch_import_job_real_is_directory (BatchImportJob* self);
gchar* batch_import_job_get_basename (BatchImportJob* self);
static gchar* batch_import_job_real_get_basename (BatchImportJob* self);
gchar* batch_import_job_get_path (BatchImportJob* self);
static gchar* batch_import_job_real_get_path (BatchImportJob* self);
DuplicatedFile* batch_import_job_get_duplicated_file (BatchImportJob* self);
static DuplicatedFile* batch_import_job_real_get_duplicated_file (BatchImportJob* self);
void batch_import_job_set_associated (BatchImportJob* self, BatchImportJob* associated);
static void batch_import_job_real_set_associated (BatchImportJob* self, BatchImportJob* associated);
gboolean batch_import_job_determine_file_size (BatchImportJob* self, guint64* filesize, GFile** file_or_dir);
static gboolean batch_import_job_real_determine_file_size (BatchImportJob* self, guint64* filesize, GFile** file_or_dir);
gboolean batch_import_job_prepare (BatchImportJob* self, GFile** file_to_import, gboolean* copy_to_library, GError** error);
static gboolean batch_import_job_real_prepare (BatchImportJob* self, GFile** file_to_import, gboolean* copy_to_library, GError** error);
gboolean batch_import_job_complete (BatchImportJob* self, MediaSource* source, BatchImportRoll* import_roll, GError** error);
static gboolean batch_import_job_real_complete (BatchImportJob* self, MediaSource* source, BatchImportRoll* import_roll, GError** error);
time_t batch_import_job_get_exposure_time_override (BatchImportJob* self);
static time_t batch_import_job_real_get_exposure_time_override (BatchImportJob* self);
gboolean batch_import_job_recurse (BatchImportJob* self);
static gboolean batch_import_job_real_recurse (BatchImportJob* self);
BatchImportJob* batch_import_job_construct (GType object_type);
static void batch_import_job_finalize (BatchImportJob* obj);
GType file_import_job_get_type (void) G_GNUC_CONST;
#define FILE_IMPORT_JOB_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_FILE_IMPORT_JOB, FileImportJobPrivate))
enum  {
	FILE_IMPORT_JOB_DUMMY_PROPERTY
};
FileImportJob* file_import_job_new (GFile* file_or_dir, gboolean copy_to_library, gboolean recurse);
FileImportJob* file_import_job_construct (GType object_type, GFile* file_or_dir, gboolean copy_to_library, gboolean recurse);
static gchar* file_import_job_real_get_dest_identifier (BatchImportJob* base);
static gchar* file_import_job_real_get_source_identifier (BatchImportJob* base);
static gboolean file_import_job_real_is_directory (BatchImportJob* base);
gboolean query_is_directory (GFile* file);
static gchar* file_import_job_real_get_basename (BatchImportJob* base);
static gchar* file_import_job_real_get_path (BatchImportJob* base);
static void file_import_job_real_set_associated (BatchImportJob* base, BatchImportJob* associated);
static gboolean file_import_job_real_determine_file_size (BatchImportJob* base, guint64* filesize, GFile** file);
static gboolean file_import_job_real_prepare (BatchImportJob* base, GFile** file_to_import, gboolean* copy, GError** error);
GFile* file_import_job_get_file (FileImportJob* self);
static gboolean file_import_job_real_recurse (BatchImportJob* base);
static void file_import_job_finalize (BatchImportJob* obj);
GType import_id_get_type (void) G_GNUC_CONST;
ImportID* import_id_dup (const ImportID* self);
void import_id_free (ImportID* self);
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 view_collection_get_type (void) G_GNUC_CONST;
enum  {
	BATCH_IMPORT_ROLL_DUMMY_PROPERTY
};
ViewCollection* view_collection_new (const gchar* name);
ViewCollection* view_collection_construct (GType object_type, const gchar* name);
BatchImportRoll* batch_import_roll_new (void);
BatchImportRoll* batch_import_roll_construct (GType object_type);
void import_id_generate (ImportID* result);
static void batch_import_roll_finalize (BatchImportRoll* obj);
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;
enum  {
	BATCH_IMPORT_RESULT_DUMMY_PROPERTY
};
BatchImportResult* batch_import_result_new (BatchImportJob* job, GFile* file, const gchar* src_identifier, const gchar* dest_identifier, DuplicatedFile* duplicate_of, ImportResult _result_);
BatchImportResult* batch_import_result_construct (GType object_type, BatchImportJob* job, GFile* file, const gchar* src_identifier, const gchar* dest_identifier, DuplicatedFile* duplicate_of, ImportResult _result_);
BatchImportResult* batch_import_result_new_from_error (BatchImportJob* job, GFile* file, const gchar* src_identifier, const gchar* dest_identifier, GError* err, ImportResult default_result);
BatchImportResult* batch_import_result_construct_from_error (GType object_type, BatchImportJob* job, GFile* file, const gchar* src_identifier, const gchar* dest_identifier, GError* err, ImportResult default_result);
static void batch_import_result_finalize (BatchImportResult* obj);
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;
enum  {
	IMPORT_MANIFEST_DUMMY_PROPERTY
};
ImportManifest* import_manifest_new (GeeList* prefailed, GeeList* pre_already_imported);
ImportManifest* import_manifest_construct (GType object_type, GeeList* prefailed, GeeList* pre_already_imported);
void import_manifest_add_result (ImportManifest* self, BatchImportResult* batch_result);
static void import_manifest_finalize (ImportManifest* obj);
GType batch_import_get_type (void) G_GNUC_CONST;
gpointer prepared_file_ref (gpointer instance);
void prepared_file_unref (gpointer instance);
GParamSpec* param_spec_prepared_file (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_prepared_file (GValue* value, gpointer v_object);
void value_take_prepared_file (GValue* value, gpointer v_object);
gpointer value_get_prepared_file (const GValue* value);
GType prepared_file_get_type (void) G_GNUC_CONST;
gpointer completed_import_object_ref (gpointer instance);
void completed_import_object_unref (gpointer instance);
GParamSpec* param_spec_completed_import_object (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_completed_import_object (GValue* value, gpointer v_object);
void value_take_completed_import_object (GValue* value, gpointer v_object);
gpointer value_get_completed_import_object (const GValue* value);
GType completed_import_object_get_type (void) G_GNUC_CONST;
#define BATCH_IMPORT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_BATCH_IMPORT, BatchImportPrivate))
enum  {
	BATCH_IMPORT_DUMMY_PROPERTY
};
gpointer application_ref (gpointer instance);
void application_unref (gpointer instance);
GParamSpec* param_spec_application (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_application (GValue* value, gpointer v_object);
void value_take_application (GValue* value, gpointer v_object);
gpointer value_get_application (const GValue* value);
GType application_get_type (void) G_GNUC_CONST;
Application* application_get_instance (void);
void batch_import_user_halt (BatchImport* self);
static void _batch_import_user_halt_application_exiting (Application* _sender, gboolean panicked, gpointer self);
gpointer workers_ref (gpointer instance);
void workers_unref (gpointer instance);
GParamSpec* param_spec_workers (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_workers (GValue* value, gpointer v_object);
void value_take_workers (GValue* value, gpointer v_object);
gpointer value_get_workers (const GValue* value);
GType workers_get_type (void) G_GNUC_CONST;
Workers* workers_new (guint max_threads, gboolean exclusive);
Workers* workers_construct (GType object_type, guint max_threads, gboolean exclusive);
guint workers_thread_per_cpu_minus_one (void);
#define BATCH_IMPORT_WORK_SNIFFER_THROBBER_MSEC 125
#define BATCH_IMPORT_REPORT_EVERY_N_PREPARED_FILES 100
#define BATCH_IMPORT_REPORT_PREPARED_FILES_EVERY_N_MSEC 3000
#define BATCH_IMPORT_READY_SOURCES_COUNT_OVERFLOW 10
#define BATCH_IMPORT_DISPLAY_QUEUE_TIMER_MSEC 125
#define BATCH_IMPORT_DISPLAY_QUEUE_HYSTERESIS_OVERFLOW ((3 * 1000) / BATCH_IMPORT_DISPLAY_QUEUE_TIMER_MSEC)
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);
guint file_hash (GFile* file);
static guint _file_hash_gee_hash_data_func (gconstpointer v, gpointer self);
gboolean file_equal (GFile* a, GFile* b);
static gboolean _file_equal_gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self);
GFile* media_source_get_file (MediaSource* self);
static gboolean batch_import_display_imported_timer (BatchImport* self);
static gboolean _batch_import_display_imported_timer_gsource_func (gpointer self);
gchar* batch_import_get_name (BatchImport* self);
gboolean batch_import_get_untrash_duplicates (BatchImport* self);
void batch_import_set_untrash_duplicates (BatchImport* self, gboolean untrash_duplicates);
gboolean batch_import_get_mark_duplicates_online (BatchImport* self);
void batch_import_set_mark_duplicates_online (BatchImport* self, gboolean mark_duplicates_online);
static void batch_import_log_status (BatchImport* self, const gchar* where);
static gboolean batch_import_report_failure (BatchImport* self, BatchImportResult* import_result);
guint64 query_total_file_size (GFile* file_or_dir, GCancellable* cancellable, GError** error);
static void batch_import_report_progress (BatchImport* self, guint64 increment_of_progress);
gulong now_ms (void);
gpointer background_job_ref (gpointer instance);
void background_job_unref (gpointer instance);
GParamSpec* param_spec_background_job (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_background_job (GValue* value, gpointer v_object);
void value_take_background_job (GValue* value, gpointer v_object);
gpointer value_get_background_job (const GValue* value);
GType background_job_get_type (void) G_GNUC_CONST;
GType background_import_job_get_type (void) G_GNUC_CONST;
static gboolean batch_import_report_failures (BatchImport* self, BackgroundImportJob* background_job);
GType background_job_job_priority_get_type (void) G_GNUC_CONST;
static void batch_import_report_completed (BatchImport* self, const gchar* where);
static void batch_import_flush_ready_sources (BatchImport* self);
static void batch_import_file_import_complete (BatchImport* self);
void batch_import_schedule (BatchImport* self);
void workers_enqueue (Workers* self, BackgroundJob* job);
static void batch_import_on_work_sniffed_out (BatchImport* self, BackgroundJob* j);
static void _batch_import_on_work_sniffed_out_completion_callback (BackgroundJob* job, gpointer self);
static void batch_import_on_sniffer_cancelled (BatchImport* self, BackgroundJob* j);
static void _batch_import_on_sniffer_cancelled_cancellation_callback (BackgroundJob* job, gpointer self);
WorkSniffer* work_sniffer_new (BatchImport* owner, GeeIterable* jobs, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancellation, void* cancellation_target, GeeHashSet* skipset);
WorkSniffer* work_sniffer_construct (GType object_type, BatchImport* owner, GeeIterable* jobs, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancellation, void* cancellation_target, GeeHashSet* skipset);
GType work_sniffer_get_type (void) G_GNUC_CONST;
static gboolean batch_import_on_sniffer_working (BatchImport* self);
static gboolean _batch_import_on_sniffer_working_gsource_func (gpointer self);
gpointer file_to_prepare_ref (gpointer instance);
void file_to_prepare_unref (gpointer instance);
GParamSpec* param_spec_file_to_prepare (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_file_to_prepare (GValue* value, gpointer v_object);
void value_take_file_to_prepare (GValue* value, gpointer v_object);
gpointer value_get_file_to_prepare (const GValue* value);
GType file_to_prepare_get_type (void) G_GNUC_CONST;
GType prepare_files_job_get_type (void) G_GNUC_CONST;
gpointer notification_object_ref (gpointer instance);
void notification_object_unref (gpointer instance);
GParamSpec* param_spec_notification_object (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_notification_object (GValue* value, gpointer v_object);
void value_take_notification_object (GValue* value, gpointer v_object);
gpointer value_get_notification_object (const GValue* value);
GType notification_object_get_type (void) G_GNUC_CONST;
static void batch_import_on_file_prepared (BatchImport* self, BackgroundJob* j, NotificationObject* user);
static void _batch_import_on_file_prepared_notification_callback (BackgroundJob* job, NotificationObject* user, gpointer self);
static void batch_import_on_files_prepared (BatchImport* self, BackgroundJob* j);
static void _batch_import_on_files_prepared_completion_callback (BackgroundJob* job, gpointer self);
static void batch_import_on_file_prepare_cancelled (BatchImport* self, BackgroundJob* j);
static void _batch_import_on_file_prepare_cancelled_cancellation_callback (BackgroundJob* job, gpointer self);
PrepareFilesJob* prepare_files_job_new (BatchImport* owner, GeeList* files_to_prepare, NotificationCallback notification, void* notification_target, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancellation, void* cancellation_target);
PrepareFilesJob* prepare_files_job_construct (GType object_type, BatchImport* owner, GeeList* files_to_prepare, NotificationCallback notification, void* notification_target, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancellation, void* cancellation_target);
static void batch_import_flush_import_jobs (BatchImport* self);
gint workers_get_pending_job_count (Workers* self);
static void batch_import_on_thumbnail_writer_completed (BatchImport* self, BackgroundJob* j);
static void _batch_import_on_thumbnail_writer_completed_completion_callback (BackgroundJob* job, gpointer self);
static void batch_import_on_thumbnail_writer_cancelled (BatchImport* self, BackgroundJob* j);
static void _batch_import_on_thumbnail_writer_cancelled_cancellation_callback (BackgroundJob* job, gpointer self);
ThumbnailWriterJob* thumbnail_writer_job_new (BatchImport* owner, CompletedImportObject* completed_import_source, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancel_callback, void* cancel_callback_target);
ThumbnailWriterJob* thumbnail_writer_job_construct (GType object_type, BatchImport* owner, CompletedImportObject* completed_import_source, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancel_callback, void* cancel_callback_target);
GType thumbnail_writer_job_get_type (void) G_GNUC_CONST;
static void batch_import_on_import_files_completed (BatchImport* self, BackgroundJob* j);
static void _batch_import_on_import_files_completed_completion_callback (BackgroundJob* job, gpointer self);
static void batch_import_on_import_files_cancelled (BatchImport* self, BackgroundJob* j);
static void _batch_import_on_import_files_cancelled_cancellation_callback (BackgroundJob* job, gpointer self);
PreparedFileImportJob* prepared_file_import_job_new (BatchImport* owner, PreparedFile* prepared_file, ImportID* import_id, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancellation, void* cancellation_target);
PreparedFileImportJob* prepared_file_import_job_construct (GType object_type, BatchImport* owner, PreparedFile* prepared_file, ImportID* import_id, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancellation, void* cancellation_target);
GType prepared_file_import_job_get_type (void) G_GNUC_CONST;
static GFile* batch_import_get_in_current_import (BatchImport* self, PreparedFile* prepared_file);
GType photo_file_format_get_type (void) G_GNUC_CONST;
GType interlocked_notification_object_get_type (void) G_GNUC_CONST;
GType prepared_file_cluster_get_type (void) G_GNUC_CONST;
static void batch_import_process_prepared_files (BatchImport* self, GeeList* list, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void batch_import_process_prepared_files_finish (BatchImport* self, GAsyncResult* _res_);
static void batch_import_process_prepared_files_data_free (gpointer _data);
static gboolean batch_import_process_prepared_files_co (BatchImportProcessPreparedFilesData* _data_);
static gboolean _batch_import_process_prepared_files_co_gsource_func (gpointer self);
GType library_photo_source_collection_state_get_type (void) G_GNUC_CONST;
GType photo_source_get_type (void) G_GNUC_CONST;
GType photo_get_type (void) G_GNUC_CONST;
GType library_photo_get_type (void) G_GNUC_CONST;
GType source_collection_get_type (void) G_GNUC_CONST;
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;
LibraryPhoto* library_photo_source_collection_get_state_by_file (LibraryPhotoSourceCollection* self, GFile* file, LibraryPhotoSourceCollectionState* state);
DuplicatedFile* duplicated_file_create_from_file (GFile* file);
GFile* media_source_get_master_file (MediaSource* self);
void media_source_mark_online (MediaSource* self);
const gchar* library_photo_source_collection_state_to_string (LibraryPhotoSourceCollectionState self);
GType video_source_collection_state_get_type (void) G_GNUC_CONST;
GType video_source_get_type (void) G_GNUC_CONST;
GType video_get_type (void) G_GNUC_CONST;
GType video_source_collection_get_type (void) G_GNUC_CONST;
Video* video_source_collection_get_state_by_file (VideoSourceCollection* self, GFile* file, VideoSourceCollectionState* state);
const gchar* video_source_collection_state_to_string (VideoSourceCollectionState self);
gboolean video_is_duplicate (GFile* file, const gchar* full_md5);
GType video_id_get_type (void) G_GNUC_CONST;
VideoID* video_id_dup (const VideoID* self);
void video_id_free (VideoID* self);
gpointer database_table_ref (gpointer instance);
void database_table_unref (gpointer instance);
GParamSpec* param_spec_database_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_database_table (GValue* value, gpointer v_object);
void value_take_database_table (GValue* value, gpointer v_object);
gpointer value_get_database_table (const GValue* value);
GType database_table_get_type (void) G_GNUC_CONST;
GType video_table_get_type (void) G_GNUC_CONST;
VideoTable* video_table_get_instance (void);
VideoID* video_table_get_duplicate_ids (VideoTable* self, GFile* file, const gchar* md5, int* result_length1);
DuplicatedFile* duplicated_file_create_from_video_id (VideoID* video_id);
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;
GType database_source_holding_tank_get_type (void) G_GNUC_CONST;
GType media_source_holding_tank_get_type (void) G_GNUC_CONST;
MediaSourceHoldingTank* media_source_collection_get_offline_bin (MediaSourceCollection* self);
MediaSource* media_source_holding_tank_fetch_by_master_file (MediaSourceHoldingTank* self, GFile* file);
MediaSource* media_source_holding_tank_fetch_by_md5 (MediaSourceHoldingTank* self, const gchar* md5);
GType monitorable_get_type (void) G_GNUC_CONST;
void monitorable_set_master_file (Monitorable* self, GFile* file);
guint64 media_source_get_filesize (MediaSource* self);
gboolean photo_is_duplicate (GFile* file, const gchar* thumbnail_md5, const gchar* full_md5, PhotoFileFormat file_format);
LibraryPhoto* library_photo_source_collection_get_trashed_by_file (LibraryPhotoSourceCollection* self, GFile* file);
LibraryPhoto* library_photo_source_collection_get_trashed_by_md5 (LibraryPhotoSourceCollection* self, const gchar* md5);
void media_source_untrash (MediaSource* self);
void photo_remove_all_transformations (Photo* self);
LibraryPhoto* library_photo_source_collection_get_offline_by_file (LibraryPhotoSourceCollection* self, GFile* file);
LibraryPhoto* library_photo_source_collection_get_offline_by_md5 (LibraryPhotoSourceCollection* self, const gchar* md5);
GType photo_id_get_type (void) G_GNUC_CONST;
PhotoID* photo_id_dup (const PhotoID* self);
void photo_id_free (PhotoID* self);
GType photo_table_get_type (void) G_GNUC_CONST;
PhotoTable* photo_table_get_instance (void);
PhotoID* photo_table_get_duplicate_ids (PhotoTable* self, GFile* file, const gchar* thumbnail_md5, const gchar* md5, PhotoFileFormat file_format, int* result_length1);
DuplicatedFile* duplicated_file_create_from_photo_id (PhotoID* photo_id);
static void batch_import_done_preparing_files (BatchImport* self, BackgroundJob* j, const gchar* caller);
gpointer ready_for_import_ref (gpointer instance);
void ready_for_import_unref (gpointer instance);
GParamSpec* param_spec_ready_for_import (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_ready_for_import (GValue* value, gpointer v_object);
void value_take_ready_for_import (GValue* value, gpointer v_object);
gpointer value_get_ready_for_import (const GValue* value);
GType ready_for_import_get_type (void) G_GNUC_CONST;
gpointer photo_import_params_ref (gpointer instance);
void photo_import_params_unref (gpointer instance);
GParamSpec* param_spec_photo_import_params (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_photo_import_params (GValue* value, gpointer v_object);
void value_take_photo_import_params (GValue* value, gpointer v_object);
gpointer value_get_photo_import_params (const GValue* value);
GType photo_import_params_get_type (void) G_GNUC_CONST;
gpointer video_import_params_ref (gpointer instance);
void video_import_params_unref (gpointer instance);
GParamSpec* param_spec_video_import_params (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_video_import_params (GValue* value, gpointer v_object);
void value_take_video_import_params (GValue* value, gpointer v_object);
gpointer value_get_video_import_params (const GValue* value);
GType video_import_params_get_type (void) G_GNUC_CONST;
GType tombstone_get_type (void) G_GNUC_CONST;
GType tombstone_source_collection_get_type (void) G_GNUC_CONST;
Tombstone* tombstone_source_collection_locate (TombstoneSourceCollection* self, GFile* file);
void tombstone_source_collection_resurrect (TombstoneSourceCollection* self, Tombstone* tombstone);
ImportResult video_import_create (VideoImportParams* params, Video** video);
ImportResult library_photo_import_create (PhotoImportParams* params, LibraryPhoto** photo);
GType photo_file_sniffer_options_get_type (void) G_GNUC_CONST;
gpointer thumbnails_ref (gpointer instance);
void thumbnails_unref (gpointer instance);
GParamSpec* param_spec_thumbnails (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_thumbnails (GValue* value, gpointer v_object);
void value_take_thumbnails (GValue* value, gpointer v_object);
gpointer value_get_thumbnails (const GValue* value);
GType thumbnails_get_type (void) G_GNUC_CONST;
gpointer photo_row_ref (gpointer instance);
void photo_row_unref (gpointer instance);
GParamSpec* param_spec_photo_row (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_photo_row (GValue* value, gpointer v_object);
void value_take_photo_row (GValue* value, gpointer v_object);
gpointer value_get_photo_row (const GValue* value);
GType photo_row_get_type (void) G_GNUC_CONST;
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;
BackingPhotoRow* backing_photo_row_new (void);
BackingPhotoRow* backing_photo_row_construct (GType object_type);
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);
GType dimensions_get_type (void) G_GNUC_CONST;
Dimensions* dimensions_dup (const Dimensions* self);
void dimensions_free (Dimensions* self);
GType orientation_get_type (void) G_GNUC_CONST;
GType raw_developer_get_type (void) G_GNUC_CONST;
void photo_add_backing_photo_for_development (Photo* self, RawDeveloper d, BackingPhotoRow* bpr, GError** error);
PhotoFileFormat photo_get_master_file_format (Photo* 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);
RawDeveloper configuration_facade_get_default_raw_developer (ConfigurationFacade* self);
gboolean photo_is_raw_developer_available (Photo* self, RawDeveloper d);
void photo_set_default_raw_developer (Photo* self, RawDeveloper d);
void photo_set_raw_developer (Photo* self, RawDeveloper d);
Thumbnails* ready_for_import_get_thumbnails (ReadyForImport* self);
CompletedImportObject* completed_import_object_new (MediaSource* source, Thumbnails* thumbnails, BatchImportJob* original_job, BatchImportResult* import_result);
CompletedImportObject* completed_import_object_construct (GType object_type, MediaSource* source, Thumbnails* thumbnails, BatchImportJob* original_job, BatchImportResult* import_result);
BatchImportResult* ready_for_import_abort (ReadyForImport* self);
gchar* data_object_to_string (DataObject* self);
void library_photo_import_failed (LibraryPhoto* photo);
void video_import_failed (Video* video);
gpointer media_collection_registry_ref (gpointer instance);
void media_collection_registry_unref (gpointer instance);
GParamSpec* param_spec_media_collection_registry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_media_collection_registry (GValue* value, gpointer v_object);
void value_take_media_collection_registry (GValue* value, gpointer v_object);
gpointer value_get_media_collection_registry (const GValue* value);
GType media_collection_registry_get_type (void) G_GNUC_CONST;
MediaCollectionRegistry* media_collection_registry_get_instance (void);
void media_collection_registry_begin_transaction_on_all (MediaCollectionRegistry* self);
GType container_source_collection_get_type (void) G_GNUC_CONST;
GType event_source_collection_get_type (void) G_GNUC_CONST;
void data_collection_freeze_notifications (DataCollection* self);
GType tag_source_collection_get_type (void) G_GNUC_CONST;
void media_source_collection_import_many (MediaSourceCollection* self, GeeCollection* media);
void event_generate_many_events (GeeCollection* sources, ViewCollection* events_so_far);
void data_collection_thaw_notifications (DataCollection* self);
void media_collection_registry_commit_transaction_on_all (MediaCollectionRegistry* self);
static void g_cclosure_user_marshal_VOID__UINT64_UINT64 (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__ENUM_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__BATCH_IMPORT_RESULT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__IMPORT_MANIFEST_BATCH_IMPORT_ROLL (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void batch_import_finalize (GObject* obj);
#define DUPLICATED_FILE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DUPLICATED_FILE, DuplicatedFilePrivate))
enum  {
	DUPLICATED_FILE_DUMMY_PROPERTY
};
static DuplicatedFile* duplicated_file_new (void);
static DuplicatedFile* duplicated_file_construct (GType object_type);
gboolean photo_id_is_valid (PhotoID *self);
gboolean video_id_is_valid (VideoID *self);
GFile* duplicated_file_get_file (DuplicatedFile* self);
LibraryPhoto* library_photo_source_collection_fetch (LibraryPhotoSourceCollection* self, PhotoID* photo_id);
Video* video_source_collection_fetch (VideoSourceCollection* self, VideoID* video_id);
static void duplicated_file_finalize (GObject* obj);
enum  {
	BACKGROUND_IMPORT_JOB_DUMMY_PROPERTY
};
BackgroundImportJob* background_import_job_construct (GType object_type, BatchImport* owner, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancellation, void* cancellation_target);
gpointer abstract_semaphore_ref (gpointer instance);
void abstract_semaphore_unref (gpointer instance);
GParamSpec* param_spec_abstract_semaphore (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_abstract_semaphore (GValue* value, gpointer v_object);
void value_take_abstract_semaphore (GValue* value, gpointer v_object);
gpointer value_get_abstract_semaphore (const GValue* value);
GType abstract_semaphore_get_type (void) G_GNUC_CONST;
BackgroundJob* background_job_construct (GType object_type, GObject* owner, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancellation, void* cancellation_target, AbstractSemaphore* completion_semaphore);
ImportResult background_import_job_abort_check (BackgroundImportJob* self);
gboolean background_job_is_cancelled (BackgroundJob* self);
void background_import_job_abort (BackgroundImportJob* self, ImportResult _result_);
void background_import_job_report_failure (BackgroundImportJob* self, BatchImportJob* job, GFile* file, const gchar* src_identifier, const gchar* dest_identifier, ImportResult _result_);
void background_import_job_report_error (BackgroundImportJob* self, BatchImportJob* job, GFile* file, const gchar* src_identifier, const gchar* dest_identifier, GError* err, ImportResult default_result);
static void background_import_job_finalize (BackgroundJob* obj);
enum  {
	FILE_TO_PREPARE_DUMMY_PROPERTY
};
FileToPrepare* file_to_prepare_new (BatchImportJob* job, GFile* file, gboolean copy_to_library);
FileToPrepare* file_to_prepare_construct (GType object_type, BatchImportJob* job, GFile* file, gboolean copy_to_library);
void file_to_prepare_set_associated (FileToPrepare* self, FileToPrepare* a);
gchar* file_to_prepare_get_parent_path (FileToPrepare* self);
gchar* file_to_prepare_get_path (FileToPrepare* self);
gchar* file_to_prepare_get_basename (FileToPrepare* self);
gboolean file_to_prepare_is_directory (FileToPrepare* self);
static void file_to_prepare_finalize (FileToPrepare* obj);
#define WORK_SNIFFER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_WORK_SNIFFER, WorkSnifferPrivate))
enum  {
	WORK_SNIFFER_DUMMY_PROPERTY
};
static void work_sniffer_real_execute (BackgroundJob* base);
static void work_sniffer_sniff_job (WorkSniffer* self, BatchImportJob* job, GError** error);
static gint __lambda11_ (WorkSniffer* self, FileToPrepare* a, FileToPrepare* b);
gint utf8_cs_compare (void* a, void* b);
static gint ___lambda11__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
void disassemble_filename (const gchar* basename, gchar** name, gchar** ext);
gboolean is_string_empty (const gchar* s);
gpointer photo_file_format_properties_ref (gpointer instance);
void photo_file_format_properties_unref (gpointer instance);
GParamSpec* param_spec_photo_file_format_properties (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_photo_file_format_properties (GValue* value, gpointer v_object);
void value_take_photo_file_format_properties (GValue* value, gpointer v_object);
gpointer value_get_photo_file_format_properties (const GValue* value);
GType photo_file_format_properties_get_type (void) G_GNUC_CONST;
GType raw_file_format_properties_get_type (void) G_GNUC_CONST;
RawFileFormatProperties* raw_file_format_properties_get_instance (void);
gboolean photo_file_format_properties_is_recognized_extension (PhotoFileFormatProperties* self, const gchar* ext);
static gboolean work_sniffer_is_paired (WorkSniffer* self, FileToPrepare* raw, FileToPrepare* maybe_paired);
GType jfif_file_format_properties_get_type (void) G_GNUC_CONST;
JfifFileFormatProperties* jfif_file_format_properties_get_instance (void);
void work_sniffer_search_dir (WorkSniffer* self, BatchImportJob* job, GFile* dir, gboolean copy_to_library, gboolean recurse, GError** error);
GCancellable* background_job_get_cancellable (BackgroundJob* self);
gboolean photo_is_file_image (GFile* file);
gboolean photo_file_format_is_file_supported (GFile* file);
gboolean video_reader_is_supported_video_file (GFile* file);
static void work_sniffer_finalize (BackgroundJob* obj);
enum  {
	PREPARED_FILE_DUMMY_PROPERTY
};
PreparedFile* prepared_file_new (BatchImportJob* job, GFile* file, GFile* associated_file, const gchar* source_id, const gchar* dest_id, gboolean copy_to_library, const gchar* exif_md5, const gchar* thumbnail_md5, const gchar* full_md5, PhotoFileFormat file_format, guint64 filesize, gboolean is_video);
PreparedFile* prepared_file_construct (GType object_type, BatchImportJob* job, GFile* file, GFile* associated_file, const gchar* source_id, const gchar* dest_id, gboolean copy_to_library, const gchar* exif_md5, const gchar* thumbnail_md5, const gchar* full_md5, PhotoFileFormat file_format, guint64 filesize, gboolean is_video);
static void prepared_file_finalize (PreparedFile* obj);
enum  {
	PREPARED_FILE_CLUSTER_DUMMY_PROPERTY
};
PreparedFileCluster* prepared_file_cluster_new (GeeArrayList* list);
PreparedFileCluster* prepared_file_cluster_construct (GType object_type, GeeArrayList* list);
InterlockedNotificationObject* interlocked_notification_object_construct (GType object_type);
static void prepared_file_cluster_finalize (NotificationObject* obj);
#define PREPARE_FILES_JOB_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_PREPARE_FILES_JOB, PrepareFilesJobPrivate))
enum  {
	PREPARE_FILES_JOB_DUMMY_PROPERTY
};
GFile* app_dirs_get_import_dir (void);
static gint prepare_files_job_get_test_variable (const gchar* name);
void background_job_set_notification_priority (BackgroundJob* self, gint priority);
static void prepare_files_job_real_execute (BackgroundJob* base);
static gboolean prepare_files_job_create_file (PrepareFilesJob* self, BatchImportJob* job, GFile** file, gboolean* copy_to_library);
static ImportResult prepare_files_job_prepare_file (PrepareFilesJob* self, BatchImportJob* job, GFile* file, GFile* associated_file, gboolean copy_to_library, PreparedFile** prepared_file);
void background_job_notify (BackgroundJob* self, NotificationCallback callback, void* callback_target, NotificationObject* user);
gchar* md5_file (GFile* file, GError** error);
PhotoFileFormat photo_file_format_get_by_file_extension (GFile* file);
gpointer photo_file_adapter_ref (gpointer instance);
void photo_file_adapter_unref (gpointer instance);
GParamSpec* param_spec_photo_file_adapter (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_photo_file_adapter (GValue* value, gpointer v_object);
void value_take_photo_file_adapter (GValue* value, gpointer v_object);
gpointer value_get_photo_file_adapter (const GValue* value);
GType photo_file_adapter_get_type (void) G_GNUC_CONST;
GType photo_file_reader_get_type (void) G_GNUC_CONST;
PhotoFileReader* photo_file_format_create_reader (PhotoFileFormat self, const gchar* filepath);
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* photo_file_reader_read_metadata (PhotoFileReader* self, GError** error);
gchar* photo_metadata_exif_hash (PhotoMetadata* self);
gchar* photo_metadata_thumbnail_hash (PhotoMetadata* self);
static void prepare_files_job_finalize (BackgroundJob* obj);
enum  {
	READY_FOR_IMPORT_DUMMY_PROPERTY
};
ReadyForImport* ready_for_import_new (GFile* final_file, PreparedFile* prepared_file, PhotoImportParams* photo_import_params, VideoImportParams* video_import_params, BatchImportResult* batch_result);
ReadyForImport* ready_for_import_construct (GType object_type, GFile* final_file, PreparedFile* prepared_file, PhotoImportParams* photo_import_params, VideoImportParams* video_import_params, BatchImportResult* batch_result);
gpointer video_row_ref (gpointer instance);
void video_row_unref (gpointer instance);
GParamSpec* param_spec_video_row (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_video_row (GValue* value, gpointer v_object);
void value_take_video_row (GValue* value, gpointer v_object);
gpointer value_get_video_row (const GValue* value);
GType video_row_get_type (void) G_GNUC_CONST;
static void ready_for_import_finalize (ReadyForImport* obj);
#define PREPARED_FILE_IMPORT_JOB_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_PREPARED_FILE_IMPORT_JOB, PreparedFileImportJobPrivate))
enum  {
	PREPARED_FILE_IMPORT_JOB_DUMMY_PROPERTY
};
void background_job_set_completion_priority (BackgroundJob* self, gint priority);
static void prepared_file_import_job_real_execute (BackgroundJob* base);
GFile* library_files_duplicate (GFile* src, GFileProgressCallback progress_callback, void* progress_callback_target, gboolean blacklist, GError** error);
Thumbnails* thumbnails_new (void);
Thumbnails* thumbnails_construct (GType object_type);
VideoImportParams* video_import_params_new (GFile* file, ImportID* import_id, const gchar* md5, Thumbnails* thumbnails, time_t exposure_time_override);
VideoImportParams* video_import_params_construct (GType object_type, GFile* file, ImportID* import_id, const gchar* md5, Thumbnails* thumbnails, time_t exposure_time_override);
ImportResult video_reader_prepare_for_import (VideoImportParams* params);
PhotoImportParams* photo_import_params_new (GFile* file, GFile* final_associated_file, ImportID* import_id, PhotoFileSnifferOptions sniffer_options, const gchar* exif_md5, const gchar* thumbnail_md5, const gchar* full_md5, Thumbnails* thumbnails);
PhotoImportParams* photo_import_params_construct (GType object_type, GFile* file, GFile* final_associated_file, ImportID* import_id, PhotoFileSnifferOptions sniffer_options, const gchar* exif_md5, const gchar* thumbnail_md5, const gchar* full_md5, Thumbnails* thumbnails);
ImportResult photo_prepare_for_import (PhotoImportParams* params);
static void prepared_file_import_job_finalize (BackgroundJob* obj);
enum  {
	COMPLETED_IMPORT_OBJECT_DUMMY_PROPERTY
};
GType thumbnail_cache_size_get_type (void) G_GNUC_CONST;
GdkPixbuf* thumbnails_get (Thumbnails* self, ThumbnailCacheSize size);
static void completed_import_object_finalize (CompletedImportObject* obj);
enum  {
	THUMBNAIL_WRITER_JOB_DUMMY_PROPERTY
};
static void thumbnail_writer_job_real_execute (BackgroundJob* base);
void thumbnail_cache_import_thumbnails (ThumbnailSource* source, Thumbnails* thumbnails, gboolean force, GError** error);
static void thumbnail_writer_job_finalize (BackgroundJob* obj);


gchar* import_result_to_string (ImportResult self) {
	gchar* result = NULL;
#line 24 "/home/jens/Source/shotwell/src/BatchImport.vala"
	switch (self) {
#line 24 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_SUCCESS:
#line 2253 "BatchImport.c"
		{
			const gchar* _tmp0_ = NULL;
			gchar* _tmp1_ = NULL;
#line 26 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp0_ = _ ("Success");
#line 26 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp1_ = g_strdup (_tmp0_);
#line 26 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = _tmp1_;
#line 26 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 2265 "BatchImport.c"
		}
#line 24 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_FILE_ERROR:
#line 2269 "BatchImport.c"
		{
			const gchar* _tmp2_ = NULL;
			gchar* _tmp3_ = NULL;
#line 29 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp2_ = _ ("File error");
#line 29 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp3_ = g_strdup (_tmp2_);
#line 29 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = _tmp3_;
#line 29 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 2281 "BatchImport.c"
		}
#line 24 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_DECODE_ERROR:
#line 2285 "BatchImport.c"
		{
			const gchar* _tmp4_ = NULL;
			gchar* _tmp5_ = NULL;
#line 32 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp4_ = _ ("Unable to decode file");
#line 32 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp5_ = g_strdup (_tmp4_);
#line 32 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = _tmp5_;
#line 32 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 2297 "BatchImport.c"
		}
#line 24 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_DATABASE_ERROR:
#line 2301 "BatchImport.c"
		{
			const gchar* _tmp6_ = NULL;
			gchar* _tmp7_ = NULL;
#line 35 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp6_ = _ ("Database error");
#line 35 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp7_ = g_strdup (_tmp6_);
#line 35 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = _tmp7_;
#line 35 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 2313 "BatchImport.c"
		}
#line 24 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_USER_ABORT:
#line 2317 "BatchImport.c"
		{
			const gchar* _tmp8_ = NULL;
			gchar* _tmp9_ = NULL;
#line 38 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp8_ = _ ("User aborted import");
#line 38 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp9_ = g_strdup (_tmp8_);
#line 38 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = _tmp9_;
#line 38 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 2329 "BatchImport.c"
		}
#line 24 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_NOT_A_FILE:
#line 2333 "BatchImport.c"
		{
			const gchar* _tmp10_ = NULL;
			gchar* _tmp11_ = NULL;
#line 41 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp10_ = _ ("Not a file");
#line 41 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp11_ = g_strdup (_tmp10_);
#line 41 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = _tmp11_;
#line 41 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 2345 "BatchImport.c"
		}
#line 24 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_PHOTO_EXISTS:
#line 2349 "BatchImport.c"
		{
			const gchar* _tmp12_ = NULL;
			gchar* _tmp13_ = NULL;
#line 44 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp12_ = _ ("File already exists in database");
#line 44 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp13_ = g_strdup (_tmp12_);
#line 44 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = _tmp13_;
#line 44 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 2361 "BatchImport.c"
		}
#line 24 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_UNSUPPORTED_FORMAT:
#line 2365 "BatchImport.c"
		{
			const gchar* _tmp14_ = NULL;
			gchar* _tmp15_ = NULL;
#line 47 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp14_ = _ ("Unsupported file format");
#line 47 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp15_ = g_strdup (_tmp14_);
#line 47 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = _tmp15_;
#line 47 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 2377 "BatchImport.c"
		}
#line 24 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_NOT_AN_IMAGE:
#line 2381 "BatchImport.c"
		{
			const gchar* _tmp16_ = NULL;
			gchar* _tmp17_ = NULL;
#line 50 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp16_ = _ ("Not an image file");
#line 50 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp17_ = g_strdup (_tmp16_);
#line 50 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = _tmp17_;
#line 50 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 2393 "BatchImport.c"
		}
#line 24 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_DISK_FAILURE:
#line 2397 "BatchImport.c"
		{
			const gchar* _tmp18_ = NULL;
			gchar* _tmp19_ = NULL;
#line 53 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp18_ = _ ("Disk failure");
#line 53 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp19_ = g_strdup (_tmp18_);
#line 53 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = _tmp19_;
#line 53 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 2409 "BatchImport.c"
		}
#line 24 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_DISK_FULL:
#line 2413 "BatchImport.c"
		{
			const gchar* _tmp20_ = NULL;
			gchar* _tmp21_ = NULL;
#line 56 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp20_ = _ ("Disk full");
#line 56 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp21_ = g_strdup (_tmp20_);
#line 56 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = _tmp21_;
#line 56 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 2425 "BatchImport.c"
		}
#line 24 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_CAMERA_ERROR:
#line 2429 "BatchImport.c"
		{
			const gchar* _tmp22_ = NULL;
			gchar* _tmp23_ = NULL;
#line 59 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp22_ = _ ("Camera error");
#line 59 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp23_ = g_strdup (_tmp22_);
#line 59 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = _tmp23_;
#line 59 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 2441 "BatchImport.c"
		}
#line 24 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_FILE_WRITE_ERROR:
#line 2445 "BatchImport.c"
		{
			const gchar* _tmp24_ = NULL;
			gchar* _tmp25_ = NULL;
#line 62 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp24_ = _ ("File write error");
#line 62 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp25_ = g_strdup (_tmp24_);
#line 62 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = _tmp25_;
#line 62 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 2457 "BatchImport.c"
		}
#line 24 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_PIXBUF_CORRUPT_IMAGE:
#line 2461 "BatchImport.c"
		{
			const gchar* _tmp26_ = NULL;
			gchar* _tmp27_ = NULL;
#line 65 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp26_ = _ ("Corrupt image file");
#line 65 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp27_ = g_strdup (_tmp26_);
#line 65 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = _tmp27_;
#line 65 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 2473 "BatchImport.c"
		}
		default:
		{
			const gchar* _tmp28_ = NULL;
			gchar* _tmp29_ = NULL;
#line 68 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp28_ = _ ("Imported failed (%d)");
#line 68 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp29_ = g_strdup_printf (_tmp28_, (gint) self);
#line 68 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = _tmp29_;
#line 68 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 2487 "BatchImport.c"
		}
	}
}


gboolean import_result_is_abort (ImportResult self) {
	gboolean result = FALSE;
#line 73 "/home/jens/Source/shotwell/src/BatchImport.vala"
	switch (self) {
#line 73 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_DISK_FULL:
#line 73 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_DISK_FAILURE:
#line 73 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_USER_ABORT:
#line 2503 "BatchImport.c"
		{
#line 77 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = TRUE;
#line 77 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 2509 "BatchImport.c"
		}
		default:
		{
#line 80 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = FALSE;
#line 80 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 2517 "BatchImport.c"
		}
	}
}


gboolean import_result_is_nonuser_abort (ImportResult self) {
	gboolean result = FALSE;
#line 85 "/home/jens/Source/shotwell/src/BatchImport.vala"
	switch (self) {
#line 85 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_DISK_FULL:
#line 85 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_DISK_FAILURE:
#line 2531 "BatchImport.c"
		{
#line 88 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = TRUE;
#line 88 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 2537 "BatchImport.c"
		}
		default:
		{
#line 91 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = FALSE;
#line 91 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 2545 "BatchImport.c"
		}
	}
}


static gpointer _g_error_copy0 (gpointer self) {
#line 97 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self ? g_error_copy (self) : NULL;
#line 2554 "BatchImport.c"
}


ImportResult import_result_convert_error (GError* err, ImportResult default_result) {
	ImportResult result = 0;
	GError* _tmp0_ = NULL;
	ImportResult _tmp32_ = 0;
#line 96 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = err;
#line 96 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp0_->domain == G_FILE_ERROR) {
#line 2566 "BatchImport.c"
		GError* ferr = NULL;
		GError* _tmp1_ = NULL;
		GError* _tmp2_ = NULL;
		GError* _tmp3_ = NULL;
#line 97 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp1_ = err;
#line 97 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp2_ = _g_error_copy0 ((GError*) _tmp1_);
#line 97 "/home/jens/Source/shotwell/src/BatchImport.vala"
		ferr = _tmp2_;
#line 99 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = ferr;
#line 99 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (g_error_matches (_tmp3_, G_FILE_ERROR, G_FILE_ERROR_NOSPC)) {
#line 100 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = IMPORT_RESULT_DISK_FULL;
#line 100 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_error_free0 (ferr);
#line 100 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 2587 "BatchImport.c"
		} else {
			GError* _tmp4_ = NULL;
#line 101 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp4_ = ferr;
#line 101 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (g_error_matches (_tmp4_, G_FILE_ERROR, G_FILE_ERROR_IO)) {
#line 102 "/home/jens/Source/shotwell/src/BatchImport.vala"
				result = IMPORT_RESULT_DISK_FAILURE;
#line 102 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_error_free0 (ferr);
#line 102 "/home/jens/Source/shotwell/src/BatchImport.vala"
				return result;
#line 2600 "BatchImport.c"
			} else {
				GError* _tmp5_ = NULL;
#line 103 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp5_ = ferr;
#line 103 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (g_error_matches (_tmp5_, G_FILE_ERROR, G_FILE_ERROR_ISDIR)) {
#line 104 "/home/jens/Source/shotwell/src/BatchImport.vala"
					result = IMPORT_RESULT_NOT_A_FILE;
#line 104 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_error_free0 (ferr);
#line 104 "/home/jens/Source/shotwell/src/BatchImport.vala"
					return result;
#line 2613 "BatchImport.c"
				} else {
					GError* _tmp6_ = NULL;
#line 105 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp6_ = ferr;
#line 105 "/home/jens/Source/shotwell/src/BatchImport.vala"
					if (g_error_matches (_tmp6_, G_FILE_ERROR, G_FILE_ERROR_ACCES)) {
#line 106 "/home/jens/Source/shotwell/src/BatchImport.vala"
						result = IMPORT_RESULT_FILE_WRITE_ERROR;
#line 106 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_g_error_free0 (ferr);
#line 106 "/home/jens/Source/shotwell/src/BatchImport.vala"
						return result;
#line 2626 "BatchImport.c"
					} else {
						GError* _tmp7_ = NULL;
#line 107 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp7_ = ferr;
#line 107 "/home/jens/Source/shotwell/src/BatchImport.vala"
						if (g_error_matches (_tmp7_, G_FILE_ERROR, G_FILE_ERROR_PERM)) {
#line 108 "/home/jens/Source/shotwell/src/BatchImport.vala"
							result = IMPORT_RESULT_FILE_WRITE_ERROR;
#line 108 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_g_error_free0 (ferr);
#line 108 "/home/jens/Source/shotwell/src/BatchImport.vala"
							return result;
#line 2639 "BatchImport.c"
						} else {
#line 110 "/home/jens/Source/shotwell/src/BatchImport.vala"
							result = IMPORT_RESULT_FILE_ERROR;
#line 110 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_g_error_free0 (ferr);
#line 110 "/home/jens/Source/shotwell/src/BatchImport.vala"
							return result;
#line 2647 "BatchImport.c"
						}
					}
				}
			}
		}
#line 96 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_error_free0 (ferr);
#line 2655 "BatchImport.c"
	} else {
		GError* _tmp8_ = NULL;
#line 111 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp8_ = err;
#line 111 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp8_->domain == G_IO_ERROR) {
#line 2662 "BatchImport.c"
			GError* ioerr = NULL;
			GError* _tmp9_ = NULL;
			GError* _tmp10_ = NULL;
			GError* _tmp11_ = NULL;
#line 112 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp9_ = err;
#line 112 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp10_ = _g_error_copy0 ((GError*) _tmp9_);
#line 112 "/home/jens/Source/shotwell/src/BatchImport.vala"
			ioerr = _tmp10_;
#line 114 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp11_ = ioerr;
#line 114 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (g_error_matches (_tmp11_, G_IO_ERROR, G_IO_ERROR_NO_SPACE)) {
#line 115 "/home/jens/Source/shotwell/src/BatchImport.vala"
				result = IMPORT_RESULT_DISK_FULL;
#line 115 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_error_free0 (ioerr);
#line 115 "/home/jens/Source/shotwell/src/BatchImport.vala"
				return result;
#line 2683 "BatchImport.c"
			} else {
				GError* _tmp12_ = NULL;
#line 116 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp12_ = ioerr;
#line 116 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (g_error_matches (_tmp12_, G_IO_ERROR, G_IO_ERROR_FAILED)) {
#line 117 "/home/jens/Source/shotwell/src/BatchImport.vala"
					result = IMPORT_RESULT_DISK_FAILURE;
#line 117 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_error_free0 (ioerr);
#line 117 "/home/jens/Source/shotwell/src/BatchImport.vala"
					return result;
#line 2696 "BatchImport.c"
				} else {
					GError* _tmp13_ = NULL;
#line 118 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp13_ = ioerr;
#line 118 "/home/jens/Source/shotwell/src/BatchImport.vala"
					if (g_error_matches (_tmp13_, G_IO_ERROR, G_IO_ERROR_IS_DIRECTORY)) {
#line 119 "/home/jens/Source/shotwell/src/BatchImport.vala"
						result = IMPORT_RESULT_NOT_A_FILE;
#line 119 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_g_error_free0 (ioerr);
#line 119 "/home/jens/Source/shotwell/src/BatchImport.vala"
						return result;
#line 2709 "BatchImport.c"
					} else {
						GError* _tmp14_ = NULL;
#line 120 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp14_ = ioerr;
#line 120 "/home/jens/Source/shotwell/src/BatchImport.vala"
						if (g_error_matches (_tmp14_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
#line 121 "/home/jens/Source/shotwell/src/BatchImport.vala"
							result = IMPORT_RESULT_USER_ABORT;
#line 121 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_g_error_free0 (ioerr);
#line 121 "/home/jens/Source/shotwell/src/BatchImport.vala"
							return result;
#line 2722 "BatchImport.c"
						} else {
							GError* _tmp15_ = NULL;
#line 122 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_tmp15_ = ioerr;
#line 122 "/home/jens/Source/shotwell/src/BatchImport.vala"
							if (g_error_matches (_tmp15_, G_IO_ERROR, G_IO_ERROR_READ_ONLY)) {
#line 123 "/home/jens/Source/shotwell/src/BatchImport.vala"
								result = IMPORT_RESULT_FILE_WRITE_ERROR;
#line 123 "/home/jens/Source/shotwell/src/BatchImport.vala"
								_g_error_free0 (ioerr);
#line 123 "/home/jens/Source/shotwell/src/BatchImport.vala"
								return result;
#line 2735 "BatchImport.c"
							} else {
								GError* _tmp16_ = NULL;
#line 124 "/home/jens/Source/shotwell/src/BatchImport.vala"
								_tmp16_ = ioerr;
#line 124 "/home/jens/Source/shotwell/src/BatchImport.vala"
								if (g_error_matches (_tmp16_, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED)) {
#line 125 "/home/jens/Source/shotwell/src/BatchImport.vala"
									result = IMPORT_RESULT_FILE_WRITE_ERROR;
#line 125 "/home/jens/Source/shotwell/src/BatchImport.vala"
									_g_error_free0 (ioerr);
#line 125 "/home/jens/Source/shotwell/src/BatchImport.vala"
									return result;
#line 2748 "BatchImport.c"
								} else {
#line 127 "/home/jens/Source/shotwell/src/BatchImport.vala"
									result = IMPORT_RESULT_FILE_ERROR;
#line 127 "/home/jens/Source/shotwell/src/BatchImport.vala"
									_g_error_free0 (ioerr);
#line 127 "/home/jens/Source/shotwell/src/BatchImport.vala"
									return result;
#line 2756 "BatchImport.c"
								}
							}
						}
					}
				}
			}
#line 111 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_error_free0 (ioerr);
#line 2765 "BatchImport.c"
		} else {
			GError* _tmp17_ = NULL;
#line 128 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp17_ = err;
#line 128 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp17_->domain == GPHOTO_ERROR) {
#line 129 "/home/jens/Source/shotwell/src/BatchImport.vala"
				result = IMPORT_RESULT_CAMERA_ERROR;
#line 129 "/home/jens/Source/shotwell/src/BatchImport.vala"
				return result;
#line 2776 "BatchImport.c"
			} else {
				GError* _tmp18_ = NULL;
#line 130 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp18_ = err;
#line 130 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (_tmp18_->domain == GDK_PIXBUF_ERROR) {
#line 2783 "BatchImport.c"
					GError* pixbuferr = NULL;
					GError* _tmp19_ = NULL;
					GError* _tmp20_ = NULL;
					GError* _tmp21_ = NULL;
#line 131 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp19_ = err;
#line 131 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp20_ = _g_error_copy0 ((GError*) _tmp19_);
#line 131 "/home/jens/Source/shotwell/src/BatchImport.vala"
					pixbuferr = _tmp20_;
#line 133 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp21_ = pixbuferr;
#line 133 "/home/jens/Source/shotwell/src/BatchImport.vala"
					if (g_error_matches (_tmp21_, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_CORRUPT_IMAGE)) {
#line 134 "/home/jens/Source/shotwell/src/BatchImport.vala"
						result = IMPORT_RESULT_PIXBUF_CORRUPT_IMAGE;
#line 134 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_g_error_free0 (pixbuferr);
#line 134 "/home/jens/Source/shotwell/src/BatchImport.vala"
						return result;
#line 2804 "BatchImport.c"
					} else {
						GError* _tmp22_ = NULL;
#line 135 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp22_ = pixbuferr;
#line 135 "/home/jens/Source/shotwell/src/BatchImport.vala"
						if (g_error_matches (_tmp22_, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY)) {
#line 2811 "BatchImport.c"
							ImportResult _tmp23_ = 0;
#line 136 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_tmp23_ = default_result;
#line 136 "/home/jens/Source/shotwell/src/BatchImport.vala"
							result = _tmp23_;
#line 136 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_g_error_free0 (pixbuferr);
#line 136 "/home/jens/Source/shotwell/src/BatchImport.vala"
							return result;
#line 2821 "BatchImport.c"
						} else {
							GError* _tmp24_ = NULL;
#line 137 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_tmp24_ = pixbuferr;
#line 137 "/home/jens/Source/shotwell/src/BatchImport.vala"
							if (g_error_matches (_tmp24_, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_BAD_OPTION)) {
#line 2828 "BatchImport.c"
								ImportResult _tmp25_ = 0;
#line 138 "/home/jens/Source/shotwell/src/BatchImport.vala"
								_tmp25_ = default_result;
#line 138 "/home/jens/Source/shotwell/src/BatchImport.vala"
								result = _tmp25_;
#line 138 "/home/jens/Source/shotwell/src/BatchImport.vala"
								_g_error_free0 (pixbuferr);
#line 138 "/home/jens/Source/shotwell/src/BatchImport.vala"
								return result;
#line 2838 "BatchImport.c"
							} else {
								GError* _tmp26_ = NULL;
#line 139 "/home/jens/Source/shotwell/src/BatchImport.vala"
								_tmp26_ = pixbuferr;
#line 139 "/home/jens/Source/shotwell/src/BatchImport.vala"
								if (g_error_matches (_tmp26_, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_UNKNOWN_TYPE)) {
#line 140 "/home/jens/Source/shotwell/src/BatchImport.vala"
									result = IMPORT_RESULT_UNSUPPORTED_FORMAT;
#line 140 "/home/jens/Source/shotwell/src/BatchImport.vala"
									_g_error_free0 (pixbuferr);
#line 140 "/home/jens/Source/shotwell/src/BatchImport.vala"
									return result;
#line 2851 "BatchImport.c"
								} else {
									GError* _tmp27_ = NULL;
#line 141 "/home/jens/Source/shotwell/src/BatchImport.vala"
									_tmp27_ = pixbuferr;
#line 141 "/home/jens/Source/shotwell/src/BatchImport.vala"
									if (g_error_matches (_tmp27_, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION)) {
#line 2858 "BatchImport.c"
										ImportResult _tmp28_ = 0;
#line 142 "/home/jens/Source/shotwell/src/BatchImport.vala"
										_tmp28_ = default_result;
#line 142 "/home/jens/Source/shotwell/src/BatchImport.vala"
										result = _tmp28_;
#line 142 "/home/jens/Source/shotwell/src/BatchImport.vala"
										_g_error_free0 (pixbuferr);
#line 142 "/home/jens/Source/shotwell/src/BatchImport.vala"
										return result;
#line 2868 "BatchImport.c"
									} else {
										GError* _tmp29_ = NULL;
#line 143 "/home/jens/Source/shotwell/src/BatchImport.vala"
										_tmp29_ = pixbuferr;
#line 143 "/home/jens/Source/shotwell/src/BatchImport.vala"
										if (g_error_matches (_tmp29_, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_FAILED)) {
#line 2875 "BatchImport.c"
											ImportResult _tmp30_ = 0;
#line 144 "/home/jens/Source/shotwell/src/BatchImport.vala"
											_tmp30_ = default_result;
#line 144 "/home/jens/Source/shotwell/src/BatchImport.vala"
											result = _tmp30_;
#line 144 "/home/jens/Source/shotwell/src/BatchImport.vala"
											_g_error_free0 (pixbuferr);
#line 144 "/home/jens/Source/shotwell/src/BatchImport.vala"
											return result;
#line 2885 "BatchImport.c"
										} else {
											ImportResult _tmp31_ = 0;
#line 146 "/home/jens/Source/shotwell/src/BatchImport.vala"
											_tmp31_ = default_result;
#line 146 "/home/jens/Source/shotwell/src/BatchImport.vala"
											result = _tmp31_;
#line 146 "/home/jens/Source/shotwell/src/BatchImport.vala"
											_g_error_free0 (pixbuferr);
#line 146 "/home/jens/Source/shotwell/src/BatchImport.vala"
											return result;
#line 2896 "BatchImport.c"
										}
									}
								}
							}
						}
					}
#line 130 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_error_free0 (pixbuferr);
#line 2905 "BatchImport.c"
				}
			}
		}
	}
#line 149 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp32_ = default_result;
#line 149 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _tmp32_;
#line 149 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 2916 "BatchImport.c"
}


GType import_result_get_type (void) {
	static volatile gsize import_result_type_id__volatile = 0;
	if (g_once_init_enter (&import_result_type_id__volatile)) {
		static const GEnumValue values[] = {{IMPORT_RESULT_SUCCESS, "IMPORT_RESULT_SUCCESS", "success"}, {IMPORT_RESULT_FILE_ERROR, "IMPORT_RESULT_FILE_ERROR", "file-error"}, {IMPORT_RESULT_DECODE_ERROR, "IMPORT_RESULT_DECODE_ERROR", "decode-error"}, {IMPORT_RESULT_DATABASE_ERROR, "IMPORT_RESULT_DATABASE_ERROR", "database-error"}, {IMPORT_RESULT_USER_ABORT, "IMPORT_RESULT_USER_ABORT", "user-abort"}, {IMPORT_RESULT_NOT_A_FILE, "IMPORT_RESULT_NOT_A_FILE", "not-a-file"}, {IMPORT_RESULT_PHOTO_EXISTS, "IMPORT_RESULT_PHOTO_EXISTS", "photo-exists"}, {IMPORT_RESULT_UNSUPPORTED_FORMAT, "IMPORT_RESULT_UNSUPPORTED_FORMAT", "unsupported-format"}, {IMPORT_RESULT_NOT_AN_IMAGE, "IMPORT_RESULT_NOT_AN_IMAGE", "not-an-image"}, {IMPORT_RESULT_DISK_FAILURE, "IMPORT_RESULT_DISK_FAILURE", "disk-failure"}, {IMPORT_RESULT_DISK_FULL, "IMPORT_RESULT_DISK_FULL", "disk-full"}, {IMPORT_RESULT_CAMERA_ERROR, "IMPORT_RESULT_CAMERA_ERROR", "camera-error"}, {IMPORT_RESULT_FILE_WRITE_ERROR, "IMPORT_RESULT_FILE_WRITE_ERROR", "file-write-error"}, {IMPORT_RESULT_PIXBUF_CORRUPT_IMAGE, "IMPORT_RESULT_PIXBUF_CORRUPT_IMAGE", "pixbuf-corrupt-image"}, {0, NULL, NULL}};
		GType import_result_type_id;
		import_result_type_id = g_enum_register_static ("ImportResult", values);
		g_once_init_leave (&import_result_type_id__volatile, import_result_type_id);
	}
	return import_result_type_id__volatile;
}


static gchar* batch_import_job_real_get_dest_identifier (BatchImportJob* self) {
#line 161 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_critical ("Type `%s' does not implement abstract method `batch_import_job_get_dest_identifier'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 161 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return NULL;
#line 2937 "BatchImport.c"
}


gchar* batch_import_job_get_dest_identifier (BatchImportJob* self) {
#line 161 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_JOB (self), NULL);
#line 161 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return BATCH_IMPORT_JOB_GET_CLASS (self)->get_dest_identifier (self);
#line 2946 "BatchImport.c"
}


static gchar* batch_import_job_real_get_source_identifier (BatchImportJob* self) {
#line 163 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_critical ("Type `%s' does not implement abstract method `batch_import_job_get_source_identifier'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 163 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return NULL;
#line 2955 "BatchImport.c"
}


gchar* batch_import_job_get_source_identifier (BatchImportJob* self) {
#line 163 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_JOB (self), NULL);
#line 163 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return BATCH_IMPORT_JOB_GET_CLASS (self)->get_source_identifier (self);
#line 2964 "BatchImport.c"
}


static gboolean batch_import_job_real_is_directory (BatchImportJob* self) {
	gboolean _tmp0_ = FALSE;
#line 165 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_critical ("Type `%s' does not implement abstract method `batch_import_job_is_directory'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 165 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return _tmp0_;
#line 2974 "BatchImport.c"
}


gboolean batch_import_job_is_directory (BatchImportJob* self) {
#line 165 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_JOB (self), FALSE);
#line 165 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return BATCH_IMPORT_JOB_GET_CLASS (self)->is_directory (self);
#line 2983 "BatchImport.c"
}


static gchar* batch_import_job_real_get_basename (BatchImportJob* self) {
#line 167 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_critical ("Type `%s' does not implement abstract method `batch_import_job_get_basename'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 167 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return NULL;
#line 2992 "BatchImport.c"
}


gchar* batch_import_job_get_basename (BatchImportJob* self) {
#line 167 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_JOB (self), NULL);
#line 167 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return BATCH_IMPORT_JOB_GET_CLASS (self)->get_basename (self);
#line 3001 "BatchImport.c"
}


static gchar* batch_import_job_real_get_path (BatchImportJob* self) {
#line 169 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_critical ("Type `%s' does not implement abstract method `batch_import_job_get_path'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 169 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return NULL;
#line 3010 "BatchImport.c"
}


gchar* batch_import_job_get_path (BatchImportJob* self) {
#line 169 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_JOB (self), NULL);
#line 169 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return BATCH_IMPORT_JOB_GET_CLASS (self)->get_path (self);
#line 3019 "BatchImport.c"
}


static DuplicatedFile* batch_import_job_real_get_duplicated_file (BatchImportJob* self) {
	DuplicatedFile* result = NULL;
#line 172 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = NULL;
#line 172 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 3029 "BatchImport.c"
}


DuplicatedFile* batch_import_job_get_duplicated_file (BatchImportJob* self) {
#line 171 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_JOB (self), NULL);
#line 171 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return BATCH_IMPORT_JOB_GET_CLASS (self)->get_duplicated_file (self);
#line 3038 "BatchImport.c"
}


static void batch_import_job_real_set_associated (BatchImportJob* self, BatchImportJob* associated) {
#line 176 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_critical ("Type `%s' does not implement abstract method `batch_import_job_set_associated'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 176 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return;
#line 3047 "BatchImport.c"
}


void batch_import_job_set_associated (BatchImportJob* self, BatchImportJob* associated) {
#line 176 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT_JOB (self));
#line 176 "/home/jens/Source/shotwell/src/BatchImport.vala"
	BATCH_IMPORT_JOB_GET_CLASS (self)->set_associated (self, associated);
#line 3056 "BatchImport.c"
}


static gboolean batch_import_job_real_determine_file_size (BatchImportJob* self, guint64* filesize, GFile** file_or_dir) {
	gboolean _tmp0_ = FALSE;
#line 183 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_critical ("Type `%s' does not implement abstract method `batch_import_job_determine_file_size'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 183 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return _tmp0_;
#line 3066 "BatchImport.c"
}


gboolean batch_import_job_determine_file_size (BatchImportJob* self, guint64* filesize, GFile** file_or_dir) {
#line 183 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_JOB (self), FALSE);
#line 183 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return BATCH_IMPORT_JOB_GET_CLASS (self)->determine_file_size (self, filesize, file_or_dir);
#line 3075 "BatchImport.c"
}


static gboolean batch_import_job_real_prepare (BatchImportJob* self, GFile** file_to_import, gboolean* copy_to_library, GError** error) {
	gboolean _tmp0_ = FALSE;
#line 186 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_critical ("Type `%s' does not implement abstract method `batch_import_job_prepare'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 186 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return _tmp0_;
#line 3085 "BatchImport.c"
}


gboolean batch_import_job_prepare (BatchImportJob* self, GFile** file_to_import, gboolean* copy_to_library, GError** error) {
#line 186 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_JOB (self), FALSE);
#line 186 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return BATCH_IMPORT_JOB_GET_CLASS (self)->prepare (self, file_to_import, copy_to_library, error);
#line 3094 "BatchImport.c"
}


static gboolean batch_import_job_real_complete (BatchImportJob* self, MediaSource* source, BatchImportRoll* import_roll, GError** error) {
	gboolean result = FALSE;
#line 196 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_MEDIA_SOURCE (source), FALSE);
#line 196 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_ROLL (import_roll), FALSE);
#line 197 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = FALSE;
#line 197 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 3108 "BatchImport.c"
}


gboolean batch_import_job_complete (BatchImportJob* self, MediaSource* source, BatchImportRoll* import_roll, GError** error) {
#line 196 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_JOB (self), FALSE);
#line 196 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return BATCH_IMPORT_JOB_GET_CLASS (self)->complete (self, source, import_roll, error);
#line 3117 "BatchImport.c"
}


static time_t batch_import_job_real_get_exposure_time_override (BatchImportJob* self) {
	time_t result = 0;
#line 203 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = (time_t) 0;
#line 203 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 3127 "BatchImport.c"
}


time_t batch_import_job_get_exposure_time_override (BatchImportJob* self) {
#line 202 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_JOB (self), 0);
#line 202 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return BATCH_IMPORT_JOB_GET_CLASS (self)->get_exposure_time_override (self);
#line 3136 "BatchImport.c"
}


static gboolean batch_import_job_real_recurse (BatchImportJob* self) {
	gboolean result = FALSE;
#line 207 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = TRUE;
#line 207 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 3146 "BatchImport.c"
}


gboolean batch_import_job_recurse (BatchImportJob* self) {
#line 206 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_JOB (self), FALSE);
#line 206 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return BATCH_IMPORT_JOB_GET_CLASS (self)->recurse (self);
#line 3155 "BatchImport.c"
}


BatchImportJob* batch_import_job_construct (GType object_type) {
	BatchImportJob* self = NULL;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = (BatchImportJob*) g_type_create_instance (object_type);
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self;
#line 3165 "BatchImport.c"
}


static void value_batch_import_job_init (GValue* value) {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	value->data[0].v_pointer = NULL;
#line 3172 "BatchImport.c"
}


static void value_batch_import_job_free_value (GValue* value) {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (value->data[0].v_pointer) {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_job_unref (value->data[0].v_pointer);
#line 3181 "BatchImport.c"
	}
}


static void value_batch_import_job_copy_value (const GValue* src_value, GValue* dest_value) {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (src_value->data[0].v_pointer) {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		dest_value->data[0].v_pointer = batch_import_job_ref (src_value->data[0].v_pointer);
#line 3191 "BatchImport.c"
	} else {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		dest_value->data[0].v_pointer = NULL;
#line 3195 "BatchImport.c"
	}
}


static gpointer value_batch_import_job_peek_pointer (const GValue* value) {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return value->data[0].v_pointer;
#line 3203 "BatchImport.c"
}


static gchar* value_batch_import_job_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (collect_values[0].v_pointer) {
#line 3210 "BatchImport.c"
		BatchImportJob* object;
		object = collect_values[0].v_pointer;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (object->parent_instance.g_class == NULL) {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 3217 "BatchImport.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.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 3221 "BatchImport.c"
		}
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = batch_import_job_ref (object);
#line 3225 "BatchImport.c"
	} else {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 3229 "BatchImport.c"
	}
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return NULL;
#line 3233 "BatchImport.c"
}


static gchar* value_batch_import_job_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	BatchImportJob** object_p;
	object_p = collect_values[0].v_pointer;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!object_p) {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 3244 "BatchImport.c"
	}
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!value->data[0].v_pointer) {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = NULL;
#line 3250 "BatchImport.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = value->data[0].v_pointer;
#line 3254 "BatchImport.c"
	} else {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = batch_import_job_ref (value->data[0].v_pointer);
#line 3258 "BatchImport.c"
	}
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return NULL;
#line 3262 "BatchImport.c"
}


GParamSpec* param_spec_batch_import_job (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ParamSpecBatchImportJob* spec;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (g_type_is_a (object_type, TYPE_BATCH_IMPORT_JOB), NULL);
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return G_PARAM_SPEC (spec);
#line 3276 "BatchImport.c"
}


gpointer value_get_batch_import_job (const GValue* value) {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_BATCH_IMPORT_JOB), NULL);
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return value->data[0].v_pointer;
#line 3285 "BatchImport.c"
}


void value_set_batch_import_job (GValue* value, gpointer v_object) {
	BatchImportJob* old;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_BATCH_IMPORT_JOB));
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	old = value->data[0].v_pointer;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (v_object) {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_BATCH_IMPORT_JOB));
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = v_object;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_job_ref (value->data[0].v_pointer);
#line 3305 "BatchImport.c"
	} else {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 3309 "BatchImport.c"
	}
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (old) {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_job_unref (old);
#line 3315 "BatchImport.c"
	}
}


void value_take_batch_import_job (GValue* value, gpointer v_object) {
	BatchImportJob* old;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_BATCH_IMPORT_JOB));
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	old = value->data[0].v_pointer;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (v_object) {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_BATCH_IMPORT_JOB));
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = v_object;
#line 3334 "BatchImport.c"
	} else {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 3338 "BatchImport.c"
	}
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (old) {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_job_unref (old);
#line 3344 "BatchImport.c"
	}
}


static void batch_import_job_class_init (BatchImportJobClass * klass) {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_job_parent_class = g_type_class_peek_parent (klass);
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->finalize = batch_import_job_finalize;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->get_dest_identifier = (gchar* (*)(BatchImportJob*)) batch_import_job_real_get_dest_identifier;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->get_source_identifier = (gchar* (*)(BatchImportJob*)) batch_import_job_real_get_source_identifier;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->is_directory = (gboolean (*)(BatchImportJob*)) batch_import_job_real_is_directory;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->get_basename = (gchar* (*)(BatchImportJob*)) batch_import_job_real_get_basename;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->get_path = (gchar* (*)(BatchImportJob*)) batch_import_job_real_get_path;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->get_duplicated_file = (DuplicatedFile* (*)(BatchImportJob*)) batch_import_job_real_get_duplicated_file;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->set_associated = (void (*)(BatchImportJob*, BatchImportJob*)) batch_import_job_real_set_associated;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->determine_file_size = (gboolean (*)(BatchImportJob*, guint64*, GFile**)) batch_import_job_real_determine_file_size;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->prepare = (gboolean (*)(BatchImportJob*, GFile**, gboolean*, GError**)) batch_import_job_real_prepare;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->complete = (gboolean (*)(BatchImportJob*, MediaSource*, BatchImportRoll*, GError**)) batch_import_job_real_complete;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->get_exposure_time_override = (time_t (*)(BatchImportJob*)) batch_import_job_real_get_exposure_time_override;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->recurse = (gboolean (*)(BatchImportJob*)) batch_import_job_real_recurse;
#line 3378 "BatchImport.c"
}


static void batch_import_job_instance_init (BatchImportJob * self) {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->ref_count = 1;
#line 3385 "BatchImport.c"
}


static void batch_import_job_finalize (BatchImportJob* obj) {
	BatchImportJob * self;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_BATCH_IMPORT_JOB, BatchImportJob);
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_signal_handlers_destroy (self);
#line 3395 "BatchImport.c"
}


GType batch_import_job_get_type (void) {
	static volatile gsize batch_import_job_type_id__volatile = 0;
	if (g_once_init_enter (&batch_import_job_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { value_batch_import_job_init, value_batch_import_job_free_value, value_batch_import_job_copy_value, value_batch_import_job_peek_pointer, "p", value_batch_import_job_collect_value, "p", value_batch_import_job_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (BatchImportJobClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) batch_import_job_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BatchImportJob), 0, (GInstanceInitFunc) batch_import_job_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 batch_import_job_type_id;
		batch_import_job_type_id = g_type_register_fundamental (g_type_fundamental_next (), "BatchImportJob", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&batch_import_job_type_id__volatile, batch_import_job_type_id);
	}
	return batch_import_job_type_id__volatile;
}


gpointer batch_import_job_ref (gpointer instance) {
	BatchImportJob* self;
	self = instance;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_atomic_int_inc (&self->ref_count);
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return instance;
#line 3420 "BatchImport.c"
}


void batch_import_job_unref (gpointer instance) {
	BatchImportJob* self;
	self = instance;
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		BATCH_IMPORT_JOB_GET_CLASS (self)->finalize (self);
#line 160 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 3433 "BatchImport.c"
	}
}


static gpointer _g_object_ref0 (gpointer self) {
#line 218 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self ? g_object_ref (self) : NULL;
#line 3441 "BatchImport.c"
}


FileImportJob* file_import_job_construct (GType object_type, GFile* file_or_dir, gboolean copy_to_library, gboolean recurse) {
	FileImportJob* self = NULL;
	GFile* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
#line 217 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (G_IS_FILE (file_or_dir), NULL);
#line 217 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = (FileImportJob*) batch_import_job_construct (object_type);
#line 218 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = file_or_dir;
#line 218 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 218 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->file_or_dir);
#line 218 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->file_or_dir = _tmp1_;
#line 219 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = copy_to_library;
#line 219 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->copy_to_library = _tmp2_;
#line 220 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = recurse;
#line 220 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->_recurse = _tmp3_;
#line 217 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self;
#line 3473 "BatchImport.c"
}


FileImportJob* file_import_job_new (GFile* file_or_dir, gboolean copy_to_library, gboolean recurse) {
#line 217 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return file_import_job_construct (TYPE_FILE_IMPORT_JOB, file_or_dir, copy_to_library, recurse);
#line 3480 "BatchImport.c"
}


static gchar* file_import_job_real_get_dest_identifier (BatchImportJob* base) {
	FileImportJob * self;
	gchar* result = NULL;
	GFile* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 223 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FILE_IMPORT_JOB, FileImportJob);
#line 224 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->file_or_dir;
#line 224 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = g_file_get_path (_tmp0_);
#line 224 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _tmp1_;
#line 224 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 3499 "BatchImport.c"
}


static gchar* file_import_job_real_get_source_identifier (BatchImportJob* base) {
	FileImportJob * self;
	gchar* result = NULL;
	GFile* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 227 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FILE_IMPORT_JOB, FileImportJob);
#line 228 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->file_or_dir;
#line 228 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = g_file_get_path (_tmp0_);
#line 228 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _tmp1_;
#line 228 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 3518 "BatchImport.c"
}


static gboolean file_import_job_real_is_directory (BatchImportJob* base) {
	FileImportJob * self;
	gboolean result = FALSE;
	GFile* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
#line 231 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FILE_IMPORT_JOB, FileImportJob);
#line 232 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->file_or_dir;
#line 232 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = query_is_directory (_tmp0_);
#line 232 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _tmp1_;
#line 232 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 3537 "BatchImport.c"
}


static gchar* file_import_job_real_get_basename (BatchImportJob* base) {
	FileImportJob * self;
	gchar* result = NULL;
	GFile* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 235 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FILE_IMPORT_JOB, FileImportJob);
#line 236 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->file_or_dir;
#line 236 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = g_file_get_basename (_tmp0_);
#line 236 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _tmp1_;
#line 236 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 3556 "BatchImport.c"
}


static gchar* file_import_job_real_get_path (BatchImportJob* base) {
	FileImportJob * self;
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
#line 239 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FILE_IMPORT_JOB, FileImportJob);
#line 240 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = batch_import_job_is_directory (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BATCH_IMPORT_JOB, BatchImportJob));
#line 240 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp1_) {
#line 3571 "BatchImport.c"
		GFile* _tmp2_ = NULL;
		gchar* _tmp3_ = NULL;
#line 240 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp2_ = self->priv->file_or_dir;
#line 240 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = g_file_get_path (_tmp2_);
#line 240 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp0_);
#line 240 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = _tmp3_;
#line 3582 "BatchImport.c"
	} else {
		GFile* _tmp4_ = NULL;
		GFile* _tmp5_ = NULL;
		GFile* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
#line 240 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = self->priv->file_or_dir;
#line 240 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp5_ = g_file_get_parent (_tmp4_);
#line 240 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ = _tmp5_;
#line 240 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp7_ = g_file_get_path (_tmp6_);
#line 240 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp0_);
#line 240 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = _tmp7_;
#line 240 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_tmp6_);
#line 3602 "BatchImport.c"
	}
#line 240 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _tmp0_;
#line 240 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 3608 "BatchImport.c"
}


static gpointer _batch_import_job_ref0 (gpointer self) {
#line 244 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self ? batch_import_job_ref (self) : NULL;
#line 3615 "BatchImport.c"
}


static void file_import_job_real_set_associated (BatchImportJob* base, BatchImportJob* associated) {
	FileImportJob * self;
	BatchImportJob* _tmp0_ = NULL;
	FileImportJob* _tmp1_ = NULL;
#line 243 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FILE_IMPORT_JOB, FileImportJob);
#line 243 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT_JOB (associated));
#line 244 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = associated;
#line 244 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = _batch_import_job_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_FILE_IMPORT_JOB) ? ((FileImportJob*) _tmp0_) : NULL);
#line 244 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_job_unref0 (self->priv->associated);
#line 244 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->associated = _tmp1_;
#line 3635 "BatchImport.c"
}


static gboolean file_import_job_real_determine_file_size (BatchImportJob* base, guint64* filesize, GFile** file) {
	FileImportJob * self;
	guint64 _vala_filesize = 0ULL;
	GFile* _vala_file = NULL;
	gboolean result = FALSE;
	GFile* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
#line 247 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FILE_IMPORT_JOB, FileImportJob);
#line 248 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_filesize = (guint64) 0;
#line 249 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->file_or_dir;
#line 249 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 249 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (_vala_file);
#line 249 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_file = _tmp1_;
#line 251 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = FALSE;
#line 251 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (filesize) {
#line 251 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*filesize = _vala_filesize;
#line 3664 "BatchImport.c"
	}
#line 251 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (file) {
#line 251 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*file = _vala_file;
#line 3670 "BatchImport.c"
	} else {
#line 251 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_vala_file);
#line 3674 "BatchImport.c"
	}
#line 251 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 3678 "BatchImport.c"
}


static gboolean file_import_job_real_prepare (BatchImportJob* base, GFile** file_to_import, gboolean* copy, GError** error) {
	FileImportJob * self;
	GFile* _vala_file_to_import = NULL;
	gboolean _vala_copy = FALSE;
	gboolean result = FALSE;
	GFile* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
#line 254 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FILE_IMPORT_JOB, FileImportJob);
#line 255 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->file_or_dir;
#line 255 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 255 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (_vala_file_to_import);
#line 255 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_file_to_import = _tmp1_;
#line 256 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = self->priv->copy_to_library;
#line 256 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_copy = _tmp2_;
#line 258 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = TRUE;
#line 258 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (file_to_import) {
#line 258 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*file_to_import = _vala_file_to_import;
#line 3710 "BatchImport.c"
	} else {
#line 258 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_vala_file_to_import);
#line 3714 "BatchImport.c"
	}
#line 258 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (copy) {
#line 258 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*copy = _vala_copy;
#line 3720 "BatchImport.c"
	}
#line 258 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 3724 "BatchImport.c"
}


GFile* file_import_job_get_file (FileImportJob* self) {
	GFile* result = NULL;
	GFile* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
#line 261 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_FILE_IMPORT_JOB (self), NULL);
#line 262 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->file_or_dir;
#line 262 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 262 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _tmp1_;
#line 262 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 3742 "BatchImport.c"
}


static gboolean file_import_job_real_recurse (BatchImportJob* base) {
	FileImportJob * self;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
#line 265 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FILE_IMPORT_JOB, FileImportJob);
#line 266 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->_recurse;
#line 266 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _tmp0_;
#line 266 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 3758 "BatchImport.c"
}


static void file_import_job_class_init (FileImportJobClass * klass) {
#line 211 "/home/jens/Source/shotwell/src/BatchImport.vala"
	file_import_job_parent_class = g_type_class_peek_parent (klass);
#line 211 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->finalize = file_import_job_finalize;
#line 211 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_type_class_add_private (klass, sizeof (FileImportJobPrivate));
#line 211 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->get_dest_identifier = (gchar* (*)(BatchImportJob*)) file_import_job_real_get_dest_identifier;
#line 211 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->get_source_identifier = (gchar* (*)(BatchImportJob*)) file_import_job_real_get_source_identifier;
#line 211 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->is_directory = (gboolean (*)(BatchImportJob*)) file_import_job_real_is_directory;
#line 211 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->get_basename = (gchar* (*)(BatchImportJob*)) file_import_job_real_get_basename;
#line 211 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->get_path = (gchar* (*)(BatchImportJob*)) file_import_job_real_get_path;
#line 211 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->set_associated = (void (*)(BatchImportJob*, BatchImportJob*)) file_import_job_real_set_associated;
#line 211 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->determine_file_size = (gboolean (*)(BatchImportJob*, guint64*, GFile**)) file_import_job_real_determine_file_size;
#line 211 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->prepare = (gboolean (*)(BatchImportJob*, GFile**, gboolean*, GError**)) file_import_job_real_prepare;
#line 211 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportJobClass *) klass)->recurse = (gboolean (*)(BatchImportJob*)) file_import_job_real_recurse;
#line 3787 "BatchImport.c"
}


static void file_import_job_instance_init (FileImportJob * self) {
#line 211 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv = FILE_IMPORT_JOB_GET_PRIVATE (self);
#line 214 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->associated = NULL;
#line 3796 "BatchImport.c"
}


static void file_import_job_finalize (BatchImportJob* obj) {
	FileImportJob * self;
#line 211 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_FILE_IMPORT_JOB, FileImportJob);
#line 212 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->file_or_dir);
#line 214 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_job_unref0 (self->priv->associated);
#line 211 "/home/jens/Source/shotwell/src/BatchImport.vala"
	BATCH_IMPORT_JOB_CLASS (file_import_job_parent_class)->finalize (obj);
#line 3810 "BatchImport.c"
}


GType file_import_job_get_type (void) {
	static volatile gsize file_import_job_type_id__volatile = 0;
	if (g_once_init_enter (&file_import_job_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FileImportJobClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) file_import_job_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FileImportJob), 0, (GInstanceInitFunc) file_import_job_instance_init, NULL };
		GType file_import_job_type_id;
		file_import_job_type_id = g_type_register_static (TYPE_BATCH_IMPORT_JOB, "FileImportJob", &g_define_type_info, 0);
		g_once_init_leave (&file_import_job_type_id__volatile, file_import_job_type_id);
	}
	return file_import_job_type_id__volatile;
}


BatchImportRoll* batch_import_roll_construct (GType object_type) {
	BatchImportRoll* self = NULL;
	ImportID _tmp0_ = {0};
#line 277 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = (BatchImportRoll*) g_type_create_instance (object_type);
#line 278 "/home/jens/Source/shotwell/src/BatchImport.vala"
	import_id_generate (&_tmp0_);
#line 278 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->import_id = _tmp0_;
#line 277 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self;
#line 3837 "BatchImport.c"
}


BatchImportRoll* batch_import_roll_new (void) {
#line 277 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return batch_import_roll_construct (TYPE_BATCH_IMPORT_ROLL);
#line 3844 "BatchImport.c"
}


static void value_batch_import_roll_init (GValue* value) {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	value->data[0].v_pointer = NULL;
#line 3851 "BatchImport.c"
}


static void value_batch_import_roll_free_value (GValue* value) {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (value->data[0].v_pointer) {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_roll_unref (value->data[0].v_pointer);
#line 3860 "BatchImport.c"
	}
}


static void value_batch_import_roll_copy_value (const GValue* src_value, GValue* dest_value) {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (src_value->data[0].v_pointer) {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		dest_value->data[0].v_pointer = batch_import_roll_ref (src_value->data[0].v_pointer);
#line 3870 "BatchImport.c"
	} else {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		dest_value->data[0].v_pointer = NULL;
#line 3874 "BatchImport.c"
	}
}


static gpointer value_batch_import_roll_peek_pointer (const GValue* value) {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return value->data[0].v_pointer;
#line 3882 "BatchImport.c"
}


static gchar* value_batch_import_roll_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (collect_values[0].v_pointer) {
#line 3889 "BatchImport.c"
		BatchImportRoll* object;
		object = collect_values[0].v_pointer;
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (object->parent_instance.g_class == NULL) {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 3896 "BatchImport.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.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 3900 "BatchImport.c"
		}
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = batch_import_roll_ref (object);
#line 3904 "BatchImport.c"
	} else {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 3908 "BatchImport.c"
	}
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return NULL;
#line 3912 "BatchImport.c"
}


static gchar* value_batch_import_roll_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	BatchImportRoll** object_p;
	object_p = collect_values[0].v_pointer;
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!object_p) {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 3923 "BatchImport.c"
	}
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!value->data[0].v_pointer) {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = NULL;
#line 3929 "BatchImport.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = value->data[0].v_pointer;
#line 3933 "BatchImport.c"
	} else {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = batch_import_roll_ref (value->data[0].v_pointer);
#line 3937 "BatchImport.c"
	}
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return NULL;
#line 3941 "BatchImport.c"
}


GParamSpec* param_spec_batch_import_roll (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ParamSpecBatchImportRoll* spec;
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (g_type_is_a (object_type, TYPE_BATCH_IMPORT_ROLL), NULL);
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return G_PARAM_SPEC (spec);
#line 3955 "BatchImport.c"
}


gpointer value_get_batch_import_roll (const GValue* value) {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_BATCH_IMPORT_ROLL), NULL);
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return value->data[0].v_pointer;
#line 3964 "BatchImport.c"
}


void value_set_batch_import_roll (GValue* value, gpointer v_object) {
	BatchImportRoll* old;
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_BATCH_IMPORT_ROLL));
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	old = value->data[0].v_pointer;
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (v_object) {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_BATCH_IMPORT_ROLL));
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = v_object;
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_roll_ref (value->data[0].v_pointer);
#line 3984 "BatchImport.c"
	} else {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 3988 "BatchImport.c"
	}
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (old) {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_roll_unref (old);
#line 3994 "BatchImport.c"
	}
}


void value_take_batch_import_roll (GValue* value, gpointer v_object) {
	BatchImportRoll* old;
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_BATCH_IMPORT_ROLL));
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	old = value->data[0].v_pointer;
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (v_object) {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_BATCH_IMPORT_ROLL));
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = v_object;
#line 4013 "BatchImport.c"
	} else {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 4017 "BatchImport.c"
	}
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (old) {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_roll_unref (old);
#line 4023 "BatchImport.c"
	}
}


static void batch_import_roll_class_init (BatchImportRollClass * klass) {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_roll_parent_class = g_type_class_peek_parent (klass);
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportRollClass *) klass)->finalize = batch_import_roll_finalize;
#line 4033 "BatchImport.c"
}


static void batch_import_roll_instance_init (BatchImportRoll * self) {
	ViewCollection* _tmp0_ = NULL;
#line 275 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = view_collection_new ("BatchImportRoll generated events");
#line 275 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->generated_events = _tmp0_;
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->ref_count = 1;
#line 4045 "BatchImport.c"
}


static void batch_import_roll_finalize (BatchImportRoll* obj) {
	BatchImportRoll * self;
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_BATCH_IMPORT_ROLL, BatchImportRoll);
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_signal_handlers_destroy (self);
#line 275 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_data_collection_unref0 (self->generated_events);
#line 4057 "BatchImport.c"
}


GType batch_import_roll_get_type (void) {
	static volatile gsize batch_import_roll_type_id__volatile = 0;
	if (g_once_init_enter (&batch_import_roll_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { value_batch_import_roll_init, value_batch_import_roll_free_value, value_batch_import_roll_copy_value, value_batch_import_roll_peek_pointer, "p", value_batch_import_roll_collect_value, "p", value_batch_import_roll_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (BatchImportRollClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) batch_import_roll_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BatchImportRoll), 0, (GInstanceInitFunc) batch_import_roll_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 batch_import_roll_type_id;
		batch_import_roll_type_id = g_type_register_fundamental (g_type_fundamental_next (), "BatchImportRoll", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&batch_import_roll_type_id__volatile, batch_import_roll_type_id);
	}
	return batch_import_roll_type_id__volatile;
}


gpointer batch_import_roll_ref (gpointer instance) {
	BatchImportRoll* self;
	self = instance;
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_atomic_int_inc (&self->ref_count);
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return instance;
#line 4082 "BatchImport.c"
}


void batch_import_roll_unref (gpointer instance) {
	BatchImportRoll* self;
	self = instance;
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		BATCH_IMPORT_ROLL_GET_CLASS (self)->finalize (self);
#line 273 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 4095 "BatchImport.c"
	}
}


BatchImportResult* batch_import_result_construct (GType object_type, BatchImportJob* job, GFile* file, const gchar* src_identifier, const gchar* dest_identifier, DuplicatedFile* duplicate_of, ImportResult _result_) {
	BatchImportResult* self = NULL;
	BatchImportJob* _tmp0_ = NULL;
	BatchImportJob* _tmp1_ = NULL;
	GFile* _tmp2_ = NULL;
	GFile* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	DuplicatedFile* _tmp8_ = NULL;
	DuplicatedFile* _tmp9_ = NULL;
	ImportResult _tmp10_ = 0;
#line 297 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_JOB (job), NULL);
#line 297 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail ((file == NULL) || G_IS_FILE (file), NULL);
#line 297 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (src_identifier != NULL, NULL);
#line 297 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (dest_identifier != NULL, NULL);
#line 297 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail ((duplicate_of == NULL) || IS_DUPLICATED_FILE (duplicate_of), NULL);
#line 297 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = (BatchImportResult*) g_type_create_instance (object_type);
#line 299 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = job;
#line 299 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = _batch_import_job_ref0 (_tmp0_);
#line 299 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_job_unref0 (self->job);
#line 299 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->job = _tmp1_;
#line 300 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = file;
#line 300 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 300 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->file);
#line 300 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->file = _tmp3_;
#line 301 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = src_identifier;
#line 301 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = g_strdup (_tmp4_);
#line 301 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (self->src_identifier);
#line 301 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->src_identifier = _tmp5_;
#line 302 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = dest_identifier;
#line 302 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp7_ = g_strdup (_tmp6_);
#line 302 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (self->dest_identifier);
#line 302 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->dest_identifier = _tmp7_;
#line 303 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp8_ = duplicate_of;
#line 303 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp9_ = _g_object_ref0 (_tmp8_);
#line 303 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->duplicate_of);
#line 303 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->duplicate_of = _tmp9_;
#line 304 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp10_ = _result_;
#line 304 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->result = _tmp10_;
#line 297 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self;
#line 4171 "BatchImport.c"
}


BatchImportResult* batch_import_result_new (BatchImportJob* job, GFile* file, const gchar* src_identifier, const gchar* dest_identifier, DuplicatedFile* duplicate_of, ImportResult _result_) {
#line 297 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return batch_import_result_construct (TYPE_BATCH_IMPORT_RESULT, job, file, src_identifier, dest_identifier, duplicate_of, _result_);
#line 4178 "BatchImport.c"
}


BatchImportResult* batch_import_result_construct_from_error (GType object_type, BatchImportJob* job, GFile* file, const gchar* src_identifier, const gchar* dest_identifier, GError* err, ImportResult default_result) {
	BatchImportResult* self = NULL;
	BatchImportJob* _tmp0_ = NULL;
	BatchImportJob* _tmp1_ = NULL;
	GFile* _tmp2_ = NULL;
	GFile* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	GError* _tmp8_ = NULL;
	ImportResult _tmp9_ = 0;
	ImportResult _tmp10_ = 0;
	GError* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
	gchar* _tmp13_ = NULL;
#line 307 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_JOB (job), NULL);
#line 307 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail ((file == NULL) || G_IS_FILE (file), NULL);
#line 307 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (src_identifier != NULL, NULL);
#line 307 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (dest_identifier != NULL, NULL);
#line 307 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = (BatchImportResult*) g_type_create_instance (object_type);
#line 309 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = job;
#line 309 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = _batch_import_job_ref0 (_tmp0_);
#line 309 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_job_unref0 (self->job);
#line 309 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->job = _tmp1_;
#line 310 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = file;
#line 310 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 310 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->file);
#line 310 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->file = _tmp3_;
#line 311 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = src_identifier;
#line 311 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = g_strdup (_tmp4_);
#line 311 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (self->src_identifier);
#line 311 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->src_identifier = _tmp5_;
#line 312 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = dest_identifier;
#line 312 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp7_ = g_strdup (_tmp6_);
#line 312 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (self->dest_identifier);
#line 312 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->dest_identifier = _tmp7_;
#line 313 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp8_ = err;
#line 313 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp9_ = default_result;
#line 313 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp10_ = import_result_convert_error (_tmp8_, _tmp9_);
#line 313 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->result = _tmp10_;
#line 314 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp11_ = err;
#line 314 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp12_ = _tmp11_->message;
#line 314 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp13_ = g_strdup (_tmp12_);
#line 314 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (self->errmsg);
#line 314 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->errmsg = _tmp13_;
#line 307 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self;
#line 4260 "BatchImport.c"
}


BatchImportResult* batch_import_result_new_from_error (BatchImportJob* job, GFile* file, const gchar* src_identifier, const gchar* dest_identifier, GError* err, ImportResult default_result) {
#line 307 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return batch_import_result_construct_from_error (TYPE_BATCH_IMPORT_RESULT, job, file, src_identifier, dest_identifier, err, default_result);
#line 4267 "BatchImport.c"
}


static void value_batch_import_result_init (GValue* value) {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	value->data[0].v_pointer = NULL;
#line 4274 "BatchImport.c"
}


static void value_batch_import_result_free_value (GValue* value) {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (value->data[0].v_pointer) {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_result_unref (value->data[0].v_pointer);
#line 4283 "BatchImport.c"
	}
}


static void value_batch_import_result_copy_value (const GValue* src_value, GValue* dest_value) {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (src_value->data[0].v_pointer) {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		dest_value->data[0].v_pointer = batch_import_result_ref (src_value->data[0].v_pointer);
#line 4293 "BatchImport.c"
	} else {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		dest_value->data[0].v_pointer = NULL;
#line 4297 "BatchImport.c"
	}
}


static gpointer value_batch_import_result_peek_pointer (const GValue* value) {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return value->data[0].v_pointer;
#line 4305 "BatchImport.c"
}


static gchar* value_batch_import_result_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (collect_values[0].v_pointer) {
#line 4312 "BatchImport.c"
		BatchImportResult* object;
		object = collect_values[0].v_pointer;
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (object->parent_instance.g_class == NULL) {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 4319 "BatchImport.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.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 4323 "BatchImport.c"
		}
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = batch_import_result_ref (object);
#line 4327 "BatchImport.c"
	} else {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 4331 "BatchImport.c"
	}
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return NULL;
#line 4335 "BatchImport.c"
}


static gchar* value_batch_import_result_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	BatchImportResult** object_p;
	object_p = collect_values[0].v_pointer;
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!object_p) {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 4346 "BatchImport.c"
	}
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!value->data[0].v_pointer) {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = NULL;
#line 4352 "BatchImport.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = value->data[0].v_pointer;
#line 4356 "BatchImport.c"
	} else {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = batch_import_result_ref (value->data[0].v_pointer);
#line 4360 "BatchImport.c"
	}
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return NULL;
#line 4364 "BatchImport.c"
}


GParamSpec* param_spec_batch_import_result (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ParamSpecBatchImportResult* spec;
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (g_type_is_a (object_type, TYPE_BATCH_IMPORT_RESULT), NULL);
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return G_PARAM_SPEC (spec);
#line 4378 "BatchImport.c"
}


gpointer value_get_batch_import_result (const GValue* value) {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_BATCH_IMPORT_RESULT), NULL);
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return value->data[0].v_pointer;
#line 4387 "BatchImport.c"
}


void value_set_batch_import_result (GValue* value, gpointer v_object) {
	BatchImportResult* old;
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_BATCH_IMPORT_RESULT));
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	old = value->data[0].v_pointer;
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (v_object) {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_BATCH_IMPORT_RESULT));
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = v_object;
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_result_ref (value->data[0].v_pointer);
#line 4407 "BatchImport.c"
	} else {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 4411 "BatchImport.c"
	}
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (old) {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_result_unref (old);
#line 4417 "BatchImport.c"
	}
}


void value_take_batch_import_result (GValue* value, gpointer v_object) {
	BatchImportResult* old;
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_BATCH_IMPORT_RESULT));
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	old = value->data[0].v_pointer;
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (v_object) {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_BATCH_IMPORT_RESULT));
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = v_object;
#line 4436 "BatchImport.c"
	} else {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 4440 "BatchImport.c"
	}
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (old) {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_result_unref (old);
#line 4446 "BatchImport.c"
	}
}


static void batch_import_result_class_init (BatchImportResultClass * klass) {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_result_parent_class = g_type_class_peek_parent (klass);
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BatchImportResultClass *) klass)->finalize = batch_import_result_finalize;
#line 4456 "BatchImport.c"
}


static void batch_import_result_instance_init (BatchImportResult * self) {
#line 294 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->errmsg = NULL;
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->ref_count = 1;
#line 4465 "BatchImport.c"
}


static void batch_import_result_finalize (BatchImportResult* obj) {
	BatchImportResult * self;
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_BATCH_IMPORT_RESULT, BatchImportResult);
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_signal_handlers_destroy (self);
#line 289 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_job_unref0 (self->job);
#line 290 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->file);
#line 291 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (self->src_identifier);
#line 292 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (self->dest_identifier);
#line 294 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (self->errmsg);
#line 295 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->duplicate_of);
#line 4487 "BatchImport.c"
}


GType batch_import_result_get_type (void) {
	static volatile gsize batch_import_result_type_id__volatile = 0;
	if (g_once_init_enter (&batch_import_result_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { value_batch_import_result_init, value_batch_import_result_free_value, value_batch_import_result_copy_value, value_batch_import_result_peek_pointer, "p", value_batch_import_result_collect_value, "p", value_batch_import_result_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (BatchImportResultClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) batch_import_result_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BatchImportResult), 0, (GInstanceInitFunc) batch_import_result_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 batch_import_result_type_id;
		batch_import_result_type_id = g_type_register_fundamental (g_type_fundamental_next (), "BatchImportResult", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&batch_import_result_type_id__volatile, batch_import_result_type_id);
	}
	return batch_import_result_type_id__volatile;
}


gpointer batch_import_result_ref (gpointer instance) {
	BatchImportResult* self;
	self = instance;
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_atomic_int_inc (&self->ref_count);
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return instance;
#line 4512 "BatchImport.c"
}


void batch_import_result_unref (gpointer instance) {
	BatchImportResult* self;
	self = instance;
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		BATCH_IMPORT_RESULT_GET_CLASS (self)->finalize (self);
#line 288 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 4525 "BatchImport.c"
	}
}


ImportManifest* import_manifest_construct (GType object_type, GeeList* prefailed, GeeList* pre_already_imported) {
	ImportManifest* self = NULL;
	GeeList* _tmp0_ = NULL;
	GeeList* _tmp22_ = NULL;
#line 331 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail ((prefailed == NULL) || GEE_IS_LIST (prefailed), NULL);
#line 331 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail ((pre_already_imported == NULL) || GEE_IS_LIST (pre_already_imported), NULL);
#line 331 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = (ImportManifest*) g_type_create_instance (object_type);
#line 333 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = prefailed;
#line 333 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp0_ != NULL) {
#line 4544 "BatchImport.c"
		{
			GeeList* _job_list = NULL;
			GeeList* _tmp1_ = NULL;
			GeeList* _tmp2_ = NULL;
			gint _job_size = 0;
			GeeList* _tmp3_ = NULL;
			gint _tmp4_ = 0;
			gint _tmp5_ = 0;
			gint _job_index = 0;
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp1_ = prefailed;
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp2_ = _g_object_ref0 (_tmp1_);
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_job_list = _tmp2_;
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp3_ = _job_list;
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp4_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection));
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp5_ = _tmp4_;
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_job_size = _tmp5_;
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_job_index = -1;
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
			while (TRUE) {
#line 4572 "BatchImport.c"
				gint _tmp6_ = 0;
				gint _tmp7_ = 0;
				gint _tmp8_ = 0;
				BatchImportJob* job = NULL;
				GeeList* _tmp9_ = NULL;
				gint _tmp10_ = 0;
				gpointer _tmp11_ = NULL;
				BatchImportResult* batch_result = NULL;
				BatchImportJob* _tmp12_ = NULL;
				BatchImportJob* _tmp13_ = NULL;
				gchar* _tmp14_ = NULL;
				gchar* _tmp15_ = NULL;
				BatchImportJob* _tmp16_ = NULL;
				gchar* _tmp17_ = NULL;
				gchar* _tmp18_ = NULL;
				BatchImportResult* _tmp19_ = NULL;
				BatchImportResult* _tmp20_ = NULL;
				BatchImportResult* _tmp21_ = NULL;
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp6_ = _job_index;
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_job_index = _tmp6_ + 1;
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp7_ = _job_index;
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp8_ = _job_size;
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (!(_tmp7_ < _tmp8_)) {
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
					break;
#line 4603 "BatchImport.c"
				}
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp9_ = _job_list;
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp10_ = _job_index;
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp11_ = gee_list_get (_tmp9_, _tmp10_);
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
				job = (BatchImportJob*) _tmp11_;
#line 335 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp12_ = job;
#line 335 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp13_ = job;
#line 335 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp14_ = batch_import_job_get_source_identifier (_tmp13_);
#line 335 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp15_ = _tmp14_;
#line 335 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp16_ = job;
#line 335 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp17_ = batch_import_job_get_dest_identifier (_tmp16_);
#line 335 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp18_ = _tmp17_;
#line 335 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp19_ = batch_import_result_new (_tmp12_, NULL, _tmp15_, _tmp18_, NULL, IMPORT_RESULT_FILE_ERROR);
#line 335 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp20_ = _tmp19_;
#line 335 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp18_);
#line 335 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp15_);
#line 335 "/home/jens/Source/shotwell/src/BatchImport.vala"
				batch_result = _tmp20_;
#line 339 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp21_ = batch_result;
#line 339 "/home/jens/Source/shotwell/src/BatchImport.vala"
				import_manifest_add_result (self, _tmp21_);
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_batch_import_result_unref0 (batch_result);
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_batch_import_job_unref0 (job);
#line 4645 "BatchImport.c"
			}
#line 334 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (_job_list);
#line 4649 "BatchImport.c"
		}
	}
#line 343 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp22_ = pre_already_imported;
#line 343 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp22_ != NULL) {
#line 4656 "BatchImport.c"
		{
			GeeList* _job_list = NULL;
			GeeList* _tmp23_ = NULL;
			GeeList* _tmp24_ = NULL;
			gint _job_size = 0;
			GeeList* _tmp25_ = NULL;
			gint _tmp26_ = 0;
			gint _tmp27_ = 0;
			gint _job_index = 0;
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp23_ = pre_already_imported;
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp24_ = _g_object_ref0 (_tmp23_);
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_job_list = _tmp24_;
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp25_ = _job_list;
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp26_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, GEE_TYPE_COLLECTION, GeeCollection));
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp27_ = _tmp26_;
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_job_size = _tmp27_;
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_job_index = -1;
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
			while (TRUE) {
#line 4684 "BatchImport.c"
				gint _tmp28_ = 0;
				gint _tmp29_ = 0;
				gint _tmp30_ = 0;
				BatchImportJob* job = NULL;
				GeeList* _tmp31_ = NULL;
				gint _tmp32_ = 0;
				gpointer _tmp33_ = NULL;
				BatchImportResult* batch_result = NULL;
				BatchImportJob* _tmp34_ = NULL;
				BatchImportJob* _tmp35_ = NULL;
				gchar* _tmp36_ = NULL;
				gchar* _tmp37_ = NULL;
				GFile* _tmp38_ = NULL;
				GFile* _tmp39_ = NULL;
				BatchImportJob* _tmp40_ = NULL;
				gchar* _tmp41_ = NULL;
				gchar* _tmp42_ = NULL;
				BatchImportJob* _tmp43_ = NULL;
				gchar* _tmp44_ = NULL;
				gchar* _tmp45_ = NULL;
				BatchImportJob* _tmp46_ = NULL;
				DuplicatedFile* _tmp47_ = NULL;
				DuplicatedFile* _tmp48_ = NULL;
				BatchImportResult* _tmp49_ = NULL;
				BatchImportResult* _tmp50_ = NULL;
				BatchImportResult* _tmp51_ = NULL;
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp28_ = _job_index;
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_job_index = _tmp28_ + 1;
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp29_ = _job_index;
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp30_ = _job_size;
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (!(_tmp29_ < _tmp30_)) {
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
					break;
#line 4723 "BatchImport.c"
				}
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp31_ = _job_list;
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp32_ = _job_index;
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp33_ = gee_list_get (_tmp31_, _tmp32_);
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
				job = (BatchImportJob*) _tmp33_;
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp34_ = job;
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp35_ = job;
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp36_ = batch_import_job_get_basename (_tmp35_);
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp37_ = _tmp36_;
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp38_ = g_file_new_for_path (_tmp37_);
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp39_ = _tmp38_;
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp40_ = job;
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp41_ = batch_import_job_get_source_identifier (_tmp40_);
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp42_ = _tmp41_;
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp43_ = job;
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp44_ = batch_import_job_get_dest_identifier (_tmp43_);
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp45_ = _tmp44_;
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp46_ = job;
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp47_ = batch_import_job_get_duplicated_file (_tmp46_);
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp48_ = _tmp47_;
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp49_ = batch_import_result_new (_tmp34_, _tmp39_, _tmp42_, _tmp45_, _tmp48_, IMPORT_RESULT_PHOTO_EXISTS);
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp50_ = _tmp49_;
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_tmp48_);
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp45_);
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp42_);
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_tmp39_);
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp37_);
#line 345 "/home/jens/Source/shotwell/src/BatchImport.vala"
				batch_result = _tmp50_;
#line 350 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp51_ = batch_result;
#line 350 "/home/jens/Source/shotwell/src/BatchImport.vala"
				import_manifest_add_result (self, _tmp51_);
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_batch_import_result_unref0 (batch_result);
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_batch_import_job_unref0 (job);
#line 4787 "BatchImport.c"
			}
#line 344 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (_job_list);
#line 4791 "BatchImport.c"
		}
	}
#line 331 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self;
#line 4796 "BatchImport.c"
}


ImportManifest* import_manifest_new (GeeList* prefailed, GeeList* pre_already_imported) {
#line 331 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return import_manifest_construct (TYPE_IMPORT_MANIFEST, prefailed, pre_already_imported);
#line 4803 "BatchImport.c"
}


void import_manifest_add_result (ImportManifest* self, BatchImportResult* batch_result) {
	gboolean reported = FALSE;
	BatchImportResult* _tmp0_ = NULL;
	ImportResult _tmp1_ = 0;
	gboolean _tmp26_ = FALSE;
#line 355 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_IMPORT_MANIFEST (self));
#line 355 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT_RESULT (batch_result));
#line 356 "/home/jens/Source/shotwell/src/BatchImport.vala"
	reported = TRUE;
#line 357 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = batch_result;
#line 357 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = _tmp0_->result;
#line 357 "/home/jens/Source/shotwell/src/BatchImport.vala"
	switch (_tmp1_) {
#line 357 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_SUCCESS:
#line 4826 "BatchImport.c"
		{
			GeeList* _tmp2_ = NULL;
			BatchImportResult* _tmp3_ = NULL;
#line 359 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp2_ = self->success;
#line 359 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp3_ = batch_result;
#line 359 "/home/jens/Source/shotwell/src/BatchImport.vala"
			gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection), _tmp3_);
#line 360 "/home/jens/Source/shotwell/src/BatchImport.vala"
			break;
#line 4838 "BatchImport.c"
		}
#line 357 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_USER_ABORT:
#line 4842 "BatchImport.c"
		{
			gboolean _tmp4_ = FALSE;
			BatchImportResult* _tmp5_ = NULL;
			GFile* _tmp6_ = NULL;
#line 363 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp5_ = batch_result;
#line 363 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp6_ = _tmp5_->file;
#line 363 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp6_ != NULL) {
#line 4853 "BatchImport.c"
				BatchImportResult* _tmp7_ = NULL;
				GFile* _tmp8_ = NULL;
				gboolean _tmp9_ = FALSE;
#line 363 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp7_ = batch_result;
#line 363 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp8_ = _tmp7_->file;
#line 363 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp9_ = query_is_directory (_tmp8_);
#line 363 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp4_ = !_tmp9_;
#line 4865 "BatchImport.c"
			} else {
#line 363 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp4_ = FALSE;
#line 4869 "BatchImport.c"
			}
#line 363 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp4_) {
#line 4873 "BatchImport.c"
				GeeList* _tmp10_ = NULL;
				BatchImportResult* _tmp11_ = NULL;
#line 364 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp10_ = self->aborted;
#line 364 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp11_ = batch_result;
#line 364 "/home/jens/Source/shotwell/src/BatchImport.vala"
				gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_COLLECTION, GeeCollection), _tmp11_);
#line 4882 "BatchImport.c"
			} else {
#line 366 "/home/jens/Source/shotwell/src/BatchImport.vala"
				reported = FALSE;
#line 4886 "BatchImport.c"
			}
#line 367 "/home/jens/Source/shotwell/src/BatchImport.vala"
			break;
#line 4890 "BatchImport.c"
		}
#line 357 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_UNSUPPORTED_FORMAT:
#line 4894 "BatchImport.c"
		{
			GeeList* _tmp12_ = NULL;
			BatchImportResult* _tmp13_ = NULL;
#line 370 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp12_ = self->skipped_photos;
#line 370 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp13_ = batch_result;
#line 370 "/home/jens/Source/shotwell/src/BatchImport.vala"
			gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_COLLECTION, GeeCollection), _tmp13_);
#line 371 "/home/jens/Source/shotwell/src/BatchImport.vala"
			break;
#line 4906 "BatchImport.c"
		}
#line 357 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_NOT_A_FILE:
#line 357 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_NOT_AN_IMAGE:
#line 4912 "BatchImport.c"
		{
			GeeList* _tmp14_ = NULL;
			BatchImportResult* _tmp15_ = NULL;
#line 375 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp14_ = self->skipped_files;
#line 375 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp15_ = batch_result;
#line 375 "/home/jens/Source/shotwell/src/BatchImport.vala"
			gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_COLLECTION, GeeCollection), _tmp15_);
#line 376 "/home/jens/Source/shotwell/src/BatchImport.vala"
			break;
#line 4924 "BatchImport.c"
		}
#line 357 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_PHOTO_EXISTS:
#line 4928 "BatchImport.c"
		{
			GeeList* _tmp16_ = NULL;
			BatchImportResult* _tmp17_ = NULL;
#line 379 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp16_ = self->already_imported;
#line 379 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp17_ = batch_result;
#line 379 "/home/jens/Source/shotwell/src/BatchImport.vala"
			gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_COLLECTION, GeeCollection), _tmp17_);
#line 380 "/home/jens/Source/shotwell/src/BatchImport.vala"
			break;
#line 4940 "BatchImport.c"
		}
#line 357 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_CAMERA_ERROR:
#line 4944 "BatchImport.c"
		{
			GeeList* _tmp18_ = NULL;
			BatchImportResult* _tmp19_ = NULL;
#line 383 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp18_ = self->camera_failed;
#line 383 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp19_ = batch_result;
#line 383 "/home/jens/Source/shotwell/src/BatchImport.vala"
			gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_COLLECTION, GeeCollection), _tmp19_);
#line 384 "/home/jens/Source/shotwell/src/BatchImport.vala"
			break;
#line 4956 "BatchImport.c"
		}
#line 357 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_FILE_WRITE_ERROR:
#line 4960 "BatchImport.c"
		{
			GeeList* _tmp20_ = NULL;
			BatchImportResult* _tmp21_ = NULL;
#line 387 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp20_ = self->write_failed;
#line 387 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp21_ = batch_result;
#line 387 "/home/jens/Source/shotwell/src/BatchImport.vala"
			gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_COLLECTION, GeeCollection), _tmp21_);
#line 388 "/home/jens/Source/shotwell/src/BatchImport.vala"
			break;
#line 4972 "BatchImport.c"
		}
#line 357 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case IMPORT_RESULT_PIXBUF_CORRUPT_IMAGE:
#line 4976 "BatchImport.c"
		{
			GeeList* _tmp22_ = NULL;
			BatchImportResult* _tmp23_ = NULL;
#line 391 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp22_ = self->corrupt_files;
#line 391 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp23_ = batch_result;
#line 391 "/home/jens/Source/shotwell/src/BatchImport.vala"
			gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, GEE_TYPE_COLLECTION, GeeCollection), _tmp23_);
#line 392 "/home/jens/Source/shotwell/src/BatchImport.vala"
			break;
#line 4988 "BatchImport.c"
		}
		default:
		{
			GeeList* _tmp24_ = NULL;
			BatchImportResult* _tmp25_ = NULL;
#line 395 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp24_ = self->failed;
#line 395 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp25_ = batch_result;
#line 395 "/home/jens/Source/shotwell/src/BatchImport.vala"
			gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GEE_TYPE_COLLECTION, GeeCollection), _tmp25_);
#line 396 "/home/jens/Source/shotwell/src/BatchImport.vala"
			break;
#line 5002 "BatchImport.c"
		}
	}
#line 399 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp26_ = reported;
#line 399 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp26_) {
#line 5009 "BatchImport.c"
		GeeList* _tmp27_ = NULL;
		BatchImportResult* _tmp28_ = NULL;
#line 400 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp27_ = self->all;
#line 400 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp28_ = batch_result;
#line 400 "/home/jens/Source/shotwell/src/BatchImport.vala"
		gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_COLLECTION, GeeCollection), _tmp28_);
#line 5018 "BatchImport.c"
	}
}


static void value_import_manifest_init (GValue* value) {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	value->data[0].v_pointer = NULL;
#line 5026 "BatchImport.c"
}


static void value_import_manifest_free_value (GValue* value) {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (value->data[0].v_pointer) {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		import_manifest_unref (value->data[0].v_pointer);
#line 5035 "BatchImport.c"
	}
}


static void value_import_manifest_copy_value (const GValue* src_value, GValue* dest_value) {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (src_value->data[0].v_pointer) {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		dest_value->data[0].v_pointer = import_manifest_ref (src_value->data[0].v_pointer);
#line 5045 "BatchImport.c"
	} else {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		dest_value->data[0].v_pointer = NULL;
#line 5049 "BatchImport.c"
	}
}


static gpointer value_import_manifest_peek_pointer (const GValue* value) {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return value->data[0].v_pointer;
#line 5057 "BatchImport.c"
}


static gchar* value_import_manifest_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (collect_values[0].v_pointer) {
#line 5064 "BatchImport.c"
		ImportManifest* object;
		object = collect_values[0].v_pointer;
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (object->parent_instance.g_class == NULL) {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 5071 "BatchImport.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.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 5075 "BatchImport.c"
		}
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = import_manifest_ref (object);
#line 5079 "BatchImport.c"
	} else {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 5083 "BatchImport.c"
	}
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return NULL;
#line 5087 "BatchImport.c"
}


static gchar* value_import_manifest_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	ImportManifest** object_p;
	object_p = collect_values[0].v_pointer;
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!object_p) {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 5098 "BatchImport.c"
	}
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!value->data[0].v_pointer) {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = NULL;
#line 5104 "BatchImport.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = value->data[0].v_pointer;
#line 5108 "BatchImport.c"
	} else {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = import_manifest_ref (value->data[0].v_pointer);
#line 5112 "BatchImport.c"
	}
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return NULL;
#line 5116 "BatchImport.c"
}


GParamSpec* param_spec_import_manifest (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ParamSpecImportManifest* spec;
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (g_type_is_a (object_type, TYPE_IMPORT_MANIFEST), NULL);
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return G_PARAM_SPEC (spec);
#line 5130 "BatchImport.c"
}


gpointer value_get_import_manifest (const GValue* value) {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_IMPORT_MANIFEST), NULL);
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return value->data[0].v_pointer;
#line 5139 "BatchImport.c"
}


void value_set_import_manifest (GValue* value, gpointer v_object) {
	ImportManifest* old;
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_IMPORT_MANIFEST));
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	old = value->data[0].v_pointer;
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (v_object) {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_IMPORT_MANIFEST));
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = v_object;
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		import_manifest_ref (value->data[0].v_pointer);
#line 5159 "BatchImport.c"
	} else {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 5163 "BatchImport.c"
	}
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (old) {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		import_manifest_unref (old);
#line 5169 "BatchImport.c"
	}
}


void value_take_import_manifest (GValue* value, gpointer v_object) {
	ImportManifest* old;
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_IMPORT_MANIFEST));
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	old = value->data[0].v_pointer;
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (v_object) {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_IMPORT_MANIFEST));
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = v_object;
#line 5188 "BatchImport.c"
	} else {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 5192 "BatchImport.c"
	}
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (old) {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		import_manifest_unref (old);
#line 5198 "BatchImport.c"
	}
}


static void import_manifest_class_init (ImportManifestClass * klass) {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	import_manifest_parent_class = g_type_class_peek_parent (klass);
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((ImportManifestClass *) klass)->finalize = import_manifest_finalize;
#line 5208 "BatchImport.c"
}


static void import_manifest_instance_init (ImportManifest * self) {
	GeeArrayList* _tmp0_ = NULL;
	GeeArrayList* _tmp1_ = NULL;
	GeeArrayList* _tmp2_ = NULL;
	GeeArrayList* _tmp3_ = NULL;
	GeeArrayList* _tmp4_ = NULL;
	GeeArrayList* _tmp5_ = NULL;
	GeeArrayList* _tmp6_ = NULL;
	GeeArrayList* _tmp7_ = NULL;
	GeeArrayList* _tmp8_ = NULL;
	GeeArrayList* _tmp9_ = NULL;
	GeeArrayList* _tmp10_ = NULL;
#line 319 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = gee_array_list_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 319 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->imported = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_LIST, GeeList);
#line 320 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = gee_array_list_new (TYPE_BATCH_IMPORT_RESULT, (GBoxedCopyFunc) batch_import_result_ref, (GDestroyNotify) batch_import_result_unref, NULL, NULL, NULL);
#line 320 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->success = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_LIST, GeeList);
#line 321 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = gee_array_list_new (TYPE_BATCH_IMPORT_RESULT, (GBoxedCopyFunc) batch_import_result_ref, (GDestroyNotify) batch_import_result_unref, NULL, NULL, NULL);
#line 321 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->camera_failed = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_LIST, GeeList);
#line 322 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = gee_array_list_new (TYPE_BATCH_IMPORT_RESULT, (GBoxedCopyFunc) batch_import_result_ref, (GDestroyNotify) batch_import_result_unref, NULL, NULL, NULL);
#line 322 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->failed = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_LIST, GeeList);
#line 323 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = gee_array_list_new (TYPE_BATCH_IMPORT_RESULT, (GBoxedCopyFunc) batch_import_result_ref, (GDestroyNotify) batch_import_result_unref, NULL, NULL, NULL);
#line 323 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->write_failed = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_LIST, GeeList);
#line 324 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = gee_array_list_new (TYPE_BATCH_IMPORT_RESULT, (GBoxedCopyFunc) batch_import_result_ref, (GDestroyNotify) batch_import_result_unref, NULL, NULL, NULL);
#line 324 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->skipped_photos = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_LIST, GeeList);
#line 325 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = gee_array_list_new (TYPE_BATCH_IMPORT_RESULT, (GBoxedCopyFunc) batch_import_result_ref, (GDestroyNotify) batch_import_result_unref, NULL, NULL, NULL);
#line 325 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->skipped_files = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_LIST, GeeList);
#line 326 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp7_ = gee_array_list_new (TYPE_BATCH_IMPORT_RESULT, (GBoxedCopyFunc) batch_import_result_ref, (GDestroyNotify) batch_import_result_unref, NULL, NULL, NULL);
#line 326 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->aborted = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_LIST, GeeList);
#line 327 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp8_ = gee_array_list_new (TYPE_BATCH_IMPORT_RESULT, (GBoxedCopyFunc) batch_import_result_ref, (GDestroyNotify) batch_import_result_unref, NULL, NULL, NULL);
#line 327 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->already_imported = G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_LIST, GeeList);
#line 328 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp9_ = gee_array_list_new (TYPE_BATCH_IMPORT_RESULT, (GBoxedCopyFunc) batch_import_result_ref, (GDestroyNotify) batch_import_result_unref, NULL, NULL, NULL);
#line 328 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->corrupt_files = G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_LIST, GeeList);
#line 329 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp10_ = gee_array_list_new (TYPE_BATCH_IMPORT_RESULT, (GBoxedCopyFunc) batch_import_result_ref, (GDestroyNotify) batch_import_result_unref, NULL, NULL, NULL);
#line 329 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->all = G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_LIST, GeeList);
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->ref_count = 1;
#line 5270 "BatchImport.c"
}


static void import_manifest_finalize (ImportManifest* obj) {
	ImportManifest * self;
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_IMPORT_MANIFEST, ImportManifest);
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_signal_handlers_destroy (self);
#line 319 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->imported);
#line 320 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->success);
#line 321 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->camera_failed);
#line 322 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->failed);
#line 323 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->write_failed);
#line 324 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->skipped_photos);
#line 325 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->skipped_files);
#line 326 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->aborted);
#line 327 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->already_imported);
#line 328 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->corrupt_files);
#line 329 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->all);
#line 5302 "BatchImport.c"
}


GType import_manifest_get_type (void) {
	static volatile gsize import_manifest_type_id__volatile = 0;
	if (g_once_init_enter (&import_manifest_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { value_import_manifest_init, value_import_manifest_free_value, value_import_manifest_copy_value, value_import_manifest_peek_pointer, "p", value_import_manifest_collect_value, "p", value_import_manifest_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (ImportManifestClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) import_manifest_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ImportManifest), 0, (GInstanceInitFunc) import_manifest_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 import_manifest_type_id;
		import_manifest_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ImportManifest", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&import_manifest_type_id__volatile, import_manifest_type_id);
	}
	return import_manifest_type_id__volatile;
}


gpointer import_manifest_ref (gpointer instance) {
	ImportManifest* self;
	self = instance;
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_atomic_int_inc (&self->ref_count);
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return instance;
#line 5327 "BatchImport.c"
}


void import_manifest_unref (gpointer instance) {
	ImportManifest* self;
	self = instance;
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		IMPORT_MANIFEST_GET_CLASS (self)->finalize (self);
#line 318 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 5340 "BatchImport.c"
	}
}


static void _batch_import_user_halt_application_exiting (Application* _sender, gboolean panicked, gpointer self) {
#line 518 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_user_halt ((BatchImport*) self);
#line 5348 "BatchImport.c"
}


static gpointer _batch_import_roll_ref0 (gpointer self) {
#line 498 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self ? batch_import_roll_ref (self) : NULL;
#line 5355 "BatchImport.c"
}


static guint _file_hash_gee_hash_data_func (gconstpointer v, gpointer self) {
	guint result;
	result = file_hash ((GFile*) v);
#line 501 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 5364 "BatchImport.c"
}


static gboolean _file_equal_gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self) {
	gboolean result;
	result = file_equal ((GFile*) a, (GFile*) b);
#line 501 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 5373 "BatchImport.c"
}


static gboolean _batch_import_display_imported_timer_gsource_func (gpointer self) {
	gboolean result;
	result = batch_import_display_imported_timer ((BatchImport*) self);
#line 511 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 5382 "BatchImport.c"
}


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) {
	BatchImport * self = NULL;
	GeeIterable* _tmp0_ = NULL;
	GeeIterable* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	BatchImportImportReporter _tmp4_ = NULL;
	void* _tmp4__target = NULL;
	GeeArrayList* _tmp5_ = NULL;
	GeeArrayList* _tmp6_ = NULL;
	ImportManifest* _tmp7_ = NULL;
	GCancellable* _tmp8_ = NULL;
	GCancellable* _tmp9_ = NULL;
	GCancellable* _tmp13_ = NULL;
	BatchImportRoll* _tmp14_ = NULL;
	BatchImportRoll* _tmp15_ = NULL;
	BatchImportRoll* _tmp19_ = NULL;
	ImportManifest* _tmp20_ = NULL;
	Application* _tmp38_ = NULL;
	Application* _tmp39_ = NULL;
#line 488 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (GEE_IS_ITERABLE (jobs), NULL);
#line 488 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 488 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail ((prefailed == NULL) || GEE_IS_ARRAY_LIST (prefailed), NULL);
#line 488 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail ((pre_already_imported == NULL) || GEE_IS_ARRAY_LIST (pre_already_imported), NULL);
#line 488 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail ((cancellable == NULL) || G_IS_CANCELLABLE (cancellable), NULL);
#line 488 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail ((import_roll == NULL) || IS_BATCH_IMPORT_ROLL (import_roll), NULL);
#line 488 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail ((skip_manifest == NULL) || IS_IMPORT_MANIFEST (skip_manifest), NULL);
#line 488 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = (BatchImport*) g_object_new (object_type, NULL);
#line 493 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = jobs;
#line 493 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 493 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->jobs);
#line 493 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->jobs = _tmp1_;
#line 494 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = name;
#line 494 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = g_strdup (_tmp2_);
#line 494 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (self->priv->name);
#line 494 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->name = _tmp3_;
#line 495 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = reporter;
#line 495 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4__target = reporter_target;
#line 495 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->reporter = _tmp4_;
#line 495 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->reporter_target = _tmp4__target;
#line 496 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = prefailed;
#line 496 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = pre_already_imported;
#line 496 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp7_ = import_manifest_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_LIST, GeeList), G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_LIST, GeeList));
#line 496 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_import_manifest_unref0 (self->priv->manifest);
#line 496 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->manifest = _tmp7_;
#line 497 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp9_ = cancellable;
#line 497 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp9_ != NULL) {
#line 5460 "BatchImport.c"
		GCancellable* _tmp10_ = NULL;
		GCancellable* _tmp11_ = NULL;
#line 497 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp10_ = cancellable;
#line 497 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp11_ = _g_object_ref0 (_tmp10_);
#line 497 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_tmp8_);
#line 497 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp8_ = _tmp11_;
#line 5471 "BatchImport.c"
	} else {
		GCancellable* _tmp12_ = NULL;
#line 497 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp12_ = g_cancellable_new ();
#line 497 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_tmp8_);
#line 497 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp8_ = _tmp12_;
#line 5480 "BatchImport.c"
	}
#line 497 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp13_ = _g_object_ref0 (_tmp8_);
#line 497 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->cancellable);
#line 497 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->cancellable = _tmp13_;
#line 498 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp15_ = import_roll;
#line 498 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp15_ != NULL) {
#line 5492 "BatchImport.c"
		BatchImportRoll* _tmp16_ = NULL;
		BatchImportRoll* _tmp17_ = NULL;
#line 498 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp16_ = import_roll;
#line 498 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp17_ = _batch_import_roll_ref0 (_tmp16_);
#line 498 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_batch_import_roll_unref0 (_tmp14_);
#line 498 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp14_ = _tmp17_;
#line 5503 "BatchImport.c"
	} else {
		BatchImportRoll* _tmp18_ = NULL;
#line 498 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp18_ = batch_import_roll_new ();
#line 498 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_batch_import_roll_unref0 (_tmp14_);
#line 498 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp14_ = _tmp18_;
#line 5512 "BatchImport.c"
	}
#line 498 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp19_ = _batch_import_roll_ref0 (_tmp14_);
#line 498 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_roll_unref0 (self->priv->import_roll);
#line 498 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->import_roll = _tmp19_;
#line 500 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp20_ = skip_manifest;
#line 500 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp20_ != NULL) {
#line 5524 "BatchImport.c"
		GeeHashSet* _tmp21_ = NULL;
#line 501 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp21_ = gee_hash_set_new (g_file_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _file_hash_gee_hash_data_func, NULL, NULL, _file_equal_gee_equal_data_func, NULL, NULL);
#line 501 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (self->priv->skipset);
#line 501 "/home/jens/Source/shotwell/src/BatchImport.vala"
		self->priv->skipset = _tmp21_;
#line 5532 "BatchImport.c"
		{
			GeeList* _source_list = NULL;
			ImportManifest* _tmp22_ = NULL;
			GeeList* _tmp23_ = NULL;
			GeeList* _tmp24_ = NULL;
			gint _source_size = 0;
			GeeList* _tmp25_ = NULL;
			gint _tmp26_ = 0;
			gint _tmp27_ = 0;
			gint _source_index = 0;
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp22_ = skip_manifest;
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp23_ = _tmp22_->imported;
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp24_ = _g_object_ref0 (_tmp23_);
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_source_list = _tmp24_;
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp25_ = _source_list;
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp26_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, GEE_TYPE_COLLECTION, GeeCollection));
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp27_ = _tmp26_;
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_source_size = _tmp27_;
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_source_index = -1;
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
			while (TRUE) {
#line 5563 "BatchImport.c"
				gint _tmp28_ = 0;
				gint _tmp29_ = 0;
				gint _tmp30_ = 0;
				MediaSource* source = NULL;
				GeeList* _tmp31_ = NULL;
				gint _tmp32_ = 0;
				gpointer _tmp33_ = NULL;
				GeeHashSet* _tmp34_ = NULL;
				MediaSource* _tmp35_ = NULL;
				GFile* _tmp36_ = NULL;
				GFile* _tmp37_ = NULL;
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp28_ = _source_index;
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_source_index = _tmp28_ + 1;
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp29_ = _source_index;
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp30_ = _source_size;
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (!(_tmp29_ < _tmp30_)) {
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
					break;
#line 5587 "BatchImport.c"
				}
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp31_ = _source_list;
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp32_ = _source_index;
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp33_ = gee_list_get (_tmp31_, _tmp32_);
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
				source = (MediaSource*) _tmp33_;
#line 503 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp34_ = self->priv->skipset;
#line 503 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp35_ = source;
#line 503 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp36_ = media_source_get_file (_tmp35_);
#line 503 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp37_ = _tmp36_;
#line 503 "/home/jens/Source/shotwell/src/BatchImport.vala"
				gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp37_);
#line 503 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_tmp37_);
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (source);
#line 5611 "BatchImport.c"
			}
#line 502 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (_source_list);
#line 5615 "BatchImport.c"
		}
	}
#line 508 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp38_ = application_get_instance ();
#line 508 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp39_ = _tmp38_;
#line 508 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_signal_connect_object (_tmp39_, "exiting", (GCallback) _batch_import_user_halt_application_exiting, self, 0);
#line 508 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_application_unref0 (_tmp39_);
#line 511 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) BATCH_IMPORT_DISPLAY_QUEUE_TIMER_MSEC, _batch_import_display_imported_timer_gsource_func, g_object_ref (self), g_object_unref);
#line 488 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_roll_unref0 (_tmp14_);
#line 488 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (_tmp8_);
#line 488 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self;
#line 5634 "BatchImport.c"
}


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) {
#line 488 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return batch_import_construct (TYPE_BATCH_IMPORT, jobs, name, reporter, reporter_target, prefailed, pre_already_imported, cancellable, import_roll, skip_manifest);
#line 5641 "BatchImport.c"
}


gchar* batch_import_get_name (BatchImport* self) {
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 521 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT (self), NULL);
#line 522 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->name;
#line 522 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 522 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _tmp1_;
#line 522 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 5659 "BatchImport.c"
}


void batch_import_user_halt (BatchImport* self) {
	GCancellable* _tmp0_ = NULL;
#line 525 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT (self));
#line 526 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->cancellable;
#line 526 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_cancellable_cancel (_tmp0_);
#line 5671 "BatchImport.c"
}


gboolean batch_import_get_untrash_duplicates (BatchImport* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
#line 529 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT (self), FALSE);
#line 530 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->untrash_duplicates;
#line 530 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _tmp0_;
#line 530 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 5686 "BatchImport.c"
}


void batch_import_set_untrash_duplicates (BatchImport* self, gboolean untrash_duplicates) {
	gboolean _tmp0_ = FALSE;
#line 533 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT (self));
#line 534 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = untrash_duplicates;
#line 534 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->untrash_duplicates = _tmp0_;
#line 5698 "BatchImport.c"
}


gboolean batch_import_get_mark_duplicates_online (BatchImport* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
#line 537 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT (self), FALSE);
#line 538 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->mark_duplicates_online;
#line 538 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _tmp0_;
#line 538 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 5713 "BatchImport.c"
}


void batch_import_set_mark_duplicates_online (BatchImport* self, gboolean mark_duplicates_online) {
	gboolean _tmp0_ = FALSE;
#line 541 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT (self));
#line 542 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = mark_duplicates_online;
#line 542 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->mark_duplicates_online = _tmp0_;
#line 5725 "BatchImport.c"
}


static void batch_import_log_status (BatchImport* self, const gchar* where) {
#line 545 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT (self));
#line 545 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (where != NULL);
#line 5734 "BatchImport.c"
}


static gboolean batch_import_report_failure (BatchImport* self, BatchImportResult* import_result) {
	gboolean result = FALSE;
	gboolean proceed = FALSE;
	ImportManifest* _tmp0_ = NULL;
	BatchImportResult* _tmp1_ = NULL;
	BatchImportResult* _tmp2_ = NULL;
	ImportResult _tmp3_ = 0;
	gboolean _tmp23_ = FALSE;
	BatchImportResult* _tmp24_ = NULL;
	ImportResult _tmp25_ = 0;
	gboolean _tmp26_ = FALSE;
	GError * _inner_error_ = NULL;
#line 555 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT (self), FALSE);
#line 555 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_RESULT (import_result), FALSE);
#line 556 "/home/jens/Source/shotwell/src/BatchImport.vala"
	proceed = TRUE;
#line 558 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->manifest;
#line 558 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = import_result;
#line 558 "/home/jens/Source/shotwell/src/BatchImport.vala"
	import_manifest_add_result (_tmp0_, _tmp1_);
#line 560 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = import_result;
#line 560 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = _tmp2_->result;
#line 560 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp3_ != IMPORT_RESULT_SUCCESS) {
#line 5768 "BatchImport.c"
		BatchImportResult* _tmp4_ = NULL;
		gboolean _tmp5_ = FALSE;
		BatchImportResult* _tmp6_ = NULL;
		GFile* _tmp7_ = NULL;
#line 561 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = import_result;
#line 561 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_signal_emit_by_name (self, "import-job-failed", _tmp4_);
#line 563 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ = import_result;
#line 563 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp7_ = _tmp6_->file;
#line 563 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp7_ != NULL) {
#line 5783 "BatchImport.c"
			BatchImportResult* _tmp8_ = NULL;
			ImportResult _tmp9_ = 0;
			gboolean _tmp10_ = FALSE;
#line 563 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp8_ = import_result;
#line 563 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp9_ = _tmp8_->result;
#line 563 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp10_ = import_result_is_abort (_tmp9_);
#line 563 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp5_ = !_tmp10_;
#line 5795 "BatchImport.c"
		} else {
#line 563 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp5_ = FALSE;
#line 5799 "BatchImport.c"
		}
#line 563 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp5_) {
#line 5803 "BatchImport.c"
			guint64 filesize = 0ULL;
			guint64 _tmp22_ = 0ULL;
#line 564 "/home/jens/Source/shotwell/src/BatchImport.vala"
			filesize = (guint64) 0;
#line 5808 "BatchImport.c"
			{
				guint64 _tmp11_ = 0ULL;
				BatchImportResult* _tmp12_ = NULL;
				GFile* _tmp13_ = NULL;
				guint64 _tmp14_ = 0ULL;
#line 567 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp12_ = import_result;
#line 567 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp13_ = _tmp12_->file;
#line 567 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp14_ = query_total_file_size (_tmp13_, NULL, &_inner_error_);
#line 567 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp11_ = _tmp14_;
#line 567 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 5824 "BatchImport.c"
					goto __catch413_g_error;
				}
#line 567 "/home/jens/Source/shotwell/src/BatchImport.vala"
				filesize = _tmp11_;
#line 5829 "BatchImport.c"
			}
			goto __finally413;
			__catch413_g_error:
			{
				GError* err = NULL;
				BatchImportResult* _tmp15_ = NULL;
				GFile* _tmp16_ = NULL;
				gchar* _tmp17_ = NULL;
				gchar* _tmp18_ = NULL;
				GError* _tmp19_ = NULL;
				const gchar* _tmp20_ = NULL;
#line 565 "/home/jens/Source/shotwell/src/BatchImport.vala"
				err = _inner_error_;
#line 565 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_inner_error_ = NULL;
#line 569 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp15_ = import_result;
#line 569 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp16_ = _tmp15_->file;
#line 569 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp17_ = g_file_get_path (_tmp16_);
#line 569 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp18_ = _tmp17_;
#line 569 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp19_ = err;
#line 569 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp20_ = _tmp19_->message;
#line 569 "/home/jens/Source/shotwell/src/BatchImport.vala"
				g_warning ("BatchImport.vala:569: Unable to query file size of %s: %s", _tmp18_, _tmp20_);
#line 569 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp18_);
#line 565 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_error_free0 (err);
#line 5863 "BatchImport.c"
			}
			__finally413:
#line 565 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 5868 "BatchImport.c"
				gboolean _tmp21_ = FALSE;
#line 565 "/home/jens/Source/shotwell/src/BatchImport.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 565 "/home/jens/Source/shotwell/src/BatchImport.vala"
				g_clear_error (&_inner_error_);
#line 565 "/home/jens/Source/shotwell/src/BatchImport.vala"
				return _tmp21_;
#line 5876 "BatchImport.c"
			}
#line 573 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp22_ = filesize;
#line 573 "/home/jens/Source/shotwell/src/BatchImport.vala"
			batch_import_report_progress (self, _tmp22_);
#line 5882 "BatchImport.c"
		}
	}
#line 578 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp24_ = import_result;
#line 578 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp25_ = _tmp24_->result;
#line 578 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp26_ = import_result_is_nonuser_abort (_tmp25_);
#line 578 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp26_) {
#line 5893 "BatchImport.c"
		gboolean _tmp27_ = FALSE;
#line 578 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp27_ = proceed;
#line 578 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp23_ = _tmp27_;
#line 5899 "BatchImport.c"
	} else {
#line 578 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp23_ = FALSE;
#line 5903 "BatchImport.c"
	}
#line 578 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp23_) {
#line 5907 "BatchImport.c"
		BatchImportResult* _tmp28_ = NULL;
		ImportResult _tmp29_ = 0;
		BatchImportResult* _tmp30_ = NULL;
		const gchar* _tmp31_ = NULL;
#line 579 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp28_ = import_result;
#line 579 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp29_ = _tmp28_->result;
#line 579 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp30_ = import_result;
#line 579 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp31_ = _tmp30_->errmsg;
#line 579 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_signal_emit_by_name (self, "fatal-error", _tmp29_, _tmp31_);
#line 580 "/home/jens/Source/shotwell/src/BatchImport.vala"
		proceed = FALSE;
#line 5924 "BatchImport.c"
	}
#line 583 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = proceed;
#line 583 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 5930 "BatchImport.c"
}


static void batch_import_report_progress (BatchImport* self, guint64 increment_of_progress) {
	guint64 _tmp0_ = 0ULL;
	guint64 _tmp1_ = 0ULL;
	guint64 _tmp2_ = 0ULL;
#line 586 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT (self));
#line 587 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->completed_bytes;
#line 587 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = increment_of_progress;
#line 587 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->completed_bytes = _tmp0_ + _tmp1_;
#line 591 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = self->priv->completed_bytes;
#line 591 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp2_ == ((guint64) 0)) {
#line 5950 "BatchImport.c"
		gulong now = 0UL;
		gulong _tmp3_ = 0UL;
		gulong _tmp4_ = 0UL;
		gulong _tmp5_ = 0UL;
#line 592 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = now_ms ();
#line 592 "/home/jens/Source/shotwell/src/BatchImport.vala"
		now = _tmp3_;
#line 593 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = now;
#line 593 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp5_ = self->priv->last_preparing_ms;
#line 593 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if ((_tmp4_ - _tmp5_) > ((gulong) 250)) {
#line 5965 "BatchImport.c"
			gulong _tmp6_ = 0UL;
#line 594 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp6_ = now;
#line 594 "/home/jens/Source/shotwell/src/BatchImport.vala"
			self->priv->last_preparing_ms = _tmp6_;
#line 595 "/home/jens/Source/shotwell/src/BatchImport.vala"
			g_signal_emit_by_name (self, "preparing");
#line 5973 "BatchImport.c"
		}
	} else {
		guint64 _tmp7_ = 0ULL;
#line 597 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp7_ = increment_of_progress;
#line 597 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp7_ > ((guint64) 0)) {
#line 5981 "BatchImport.c"
			gulong now = 0UL;
			gulong _tmp8_ = 0UL;
			gulong _tmp9_ = 0UL;
			gulong _tmp10_ = 0UL;
#line 598 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp8_ = now_ms ();
#line 598 "/home/jens/Source/shotwell/src/BatchImport.vala"
			now = _tmp8_;
#line 599 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp9_ = now;
#line 599 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp10_ = self->priv->last_preparing_ms;
#line 599 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if ((_tmp9_ - _tmp10_) > ((gulong) 250)) {
#line 5996 "BatchImport.c"
				gulong _tmp11_ = 0UL;
				guint64 _tmp12_ = 0ULL;
				guint64 _tmp13_ = 0ULL;
#line 600 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp11_ = now;
#line 600 "/home/jens/Source/shotwell/src/BatchImport.vala"
				self->priv->last_preparing_ms = _tmp11_;
#line 601 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp12_ = self->priv->completed_bytes;
#line 601 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp13_ = self->priv->total_bytes;
#line 601 "/home/jens/Source/shotwell/src/BatchImport.vala"
				g_signal_emit_by_name (self, "progress", _tmp12_, _tmp13_);
#line 6010 "BatchImport.c"
			}
		}
	}
}


static gboolean batch_import_report_failures (BatchImport* self, BackgroundImportJob* background_job) {
	gboolean result = FALSE;
	gboolean proceed = FALSE;
#line 606 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT (self), FALSE);
#line 606 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BACKGROUND_IMPORT_JOB (background_job), FALSE);
#line 607 "/home/jens/Source/shotwell/src/BatchImport.vala"
	proceed = TRUE;
#line 6026 "BatchImport.c"
	{
		GeeList* _import_result_list = NULL;
		BackgroundImportJob* _tmp0_ = NULL;
		GeeList* _tmp1_ = NULL;
		GeeList* _tmp2_ = NULL;
		gint _import_result_size = 0;
		GeeList* _tmp3_ = NULL;
		gint _tmp4_ = 0;
		gint _tmp5_ = 0;
		gint _import_result_index = 0;
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = background_job;
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp1_ = _tmp0_->failed;
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp2_ = _g_object_ref0 (_tmp1_);
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_import_result_list = _tmp2_;
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = _import_result_list;
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection));
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp5_ = _tmp4_;
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_import_result_size = _tmp5_;
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_import_result_index = -1;
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
		while (TRUE) {
#line 6057 "BatchImport.c"
			gint _tmp6_ = 0;
			gint _tmp7_ = 0;
			gint _tmp8_ = 0;
			BatchImportResult* import_result = NULL;
			GeeList* _tmp9_ = NULL;
			gint _tmp10_ = 0;
			gpointer _tmp11_ = NULL;
			BatchImportResult* _tmp12_ = NULL;
			gboolean _tmp13_ = FALSE;
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp6_ = _import_result_index;
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_import_result_index = _tmp6_ + 1;
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp7_ = _import_result_index;
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp8_ = _import_result_size;
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (!(_tmp7_ < _tmp8_)) {
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
				break;
#line 6079 "BatchImport.c"
			}
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp9_ = _import_result_list;
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp10_ = _import_result_index;
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp11_ = gee_list_get (_tmp9_, _tmp10_);
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
			import_result = (BatchImportResult*) _tmp11_;
#line 610 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp12_ = import_result;
#line 610 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp13_ = batch_import_report_failure (self, _tmp12_);
#line 610 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (!_tmp13_) {
#line 611 "/home/jens/Source/shotwell/src/BatchImport.vala"
				proceed = FALSE;
#line 6097 "BatchImport.c"
			}
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_batch_import_result_unref0 (import_result);
#line 6101 "BatchImport.c"
		}
#line 609 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_import_result_list);
#line 6105 "BatchImport.c"
	}
#line 614 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = proceed;
#line 614 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 6111 "BatchImport.c"
}


static void batch_import_report_completed (BatchImport* self, const gchar* where) {
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	BatchImportImportReporter _tmp5_ = NULL;
	void* _tmp5__target = NULL;
	ImportManifest* _tmp9_ = NULL;
	BatchImportRoll* _tmp10_ = NULL;
#line 617 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT (self));
#line 617 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (where != NULL);
#line 618 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->completed;
#line 618 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp0_) {
#line 6132 "BatchImport.c"
		const gchar* _tmp1_ = NULL;
#line 619 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp1_ = where;
#line 619 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_error ("BatchImport.vala:619: Attempted to complete already-completed import: " \
"%s", _tmp1_);
#line 6138 "BatchImport.c"
	}
#line 621 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->completed = TRUE;
#line 623 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_flush_ready_sources (self);
#line 625 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = where;
#line 625 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = g_strdup_printf ("Import completed: %s", _tmp2_);
#line 625 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = _tmp3_;
#line 625 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_log_status (self, _tmp4_);
#line 625 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (_tmp4_);
#line 628 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = self->priv->reporter;
#line 628 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5__target = self->priv->reporter_target;
#line 628 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp5_ != NULL) {
#line 6160 "BatchImport.c"
		BatchImportImportReporter _tmp6_ = NULL;
		void* _tmp6__target = NULL;
		ImportManifest* _tmp7_ = NULL;
		BatchImportRoll* _tmp8_ = NULL;
#line 629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ = self->priv->reporter;
#line 629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6__target = self->priv->reporter_target;
#line 629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp7_ = self->priv->manifest;
#line 629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp8_ = self->priv->import_roll;
#line 629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ (_tmp7_, _tmp8_, _tmp6__target);
#line 6175 "BatchImport.c"
	}
#line 631 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp9_ = self->priv->manifest;
#line 631 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp10_ = self->priv->import_roll;
#line 631 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_signal_emit_by_name (self, "import-complete", _tmp9_, _tmp10_);
#line 6183 "BatchImport.c"
}


static void batch_import_file_import_complete (BatchImport* self) {
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	gboolean _tmp4_ = FALSE;
	gint _tmp5_ = 0;
#line 635 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT (self));
#line 637 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->file_imports_completed;
#line 637 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->file_imports_completed = _tmp0_ + 1;
#line 638 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = self->priv->file_imports_to_perform;
#line 638 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp1_ != -1) {
#line 6202 "BatchImport.c"
		gint _tmp2_ = 0;
		gint _tmp3_ = 0;
#line 639 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp2_ = self->priv->file_imports_completed;
#line 639 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = self->priv->file_imports_to_perform;
#line 639 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_vala_assert (_tmp2_ <= _tmp3_, "file_imports_completed <= file_imports_to_perform");
#line 6211 "BatchImport.c"
	}
#line 643 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = self->priv->file_imports_to_perform;
#line 643 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp5_ != -1) {
#line 6217 "BatchImport.c"
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
#line 643 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ = self->priv->file_imports_completed;
#line 643 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp7_ = self->priv->file_imports_to_perform;
#line 643 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = _tmp6_ == _tmp7_;
#line 6226 "BatchImport.c"
	} else {
#line 643 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = FALSE;
#line 6230 "BatchImport.c"
	}
#line 643 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp4_) {
#line 644 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_report_completed (self, "completed preparing files, all outstanding imports completed");
#line 6236 "BatchImport.c"
	}
}


static void _batch_import_on_work_sniffed_out_completion_callback (BackgroundJob* job, gpointer self) {
#line 654 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_on_work_sniffed_out ((BatchImport*) self, job);
#line 6244 "BatchImport.c"
}


static void _batch_import_on_sniffer_cancelled_cancellation_callback (BackgroundJob* job, gpointer self) {
#line 654 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_on_sniffer_cancelled ((BatchImport*) self, job);
#line 6251 "BatchImport.c"
}


static gboolean _batch_import_on_sniffer_working_gsource_func (gpointer self) {
	gboolean result;
	result = batch_import_on_sniffer_working ((BatchImport*) self);
#line 656 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 6260 "BatchImport.c"
}


void batch_import_schedule (BatchImport* self) {
	gboolean _tmp0_ = FALSE;
	Workers* _tmp1_ = NULL;
	GeeIterable* _tmp2_ = NULL;
	GCancellable* _tmp3_ = NULL;
	GeeHashSet* _tmp4_ = NULL;
	WorkSniffer* _tmp5_ = NULL;
	WorkSniffer* _tmp6_ = NULL;
	guint _tmp7_ = 0U;
#line 647 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT (self));
#line 648 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->scheduled;
#line 648 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_assert (_tmp0_ == FALSE, "scheduled == false");
#line 649 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->scheduled = TRUE;
#line 651 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_signal_emit_by_name (self, "starting");
#line 654 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = batch_import_feeder_workers;
#line 654 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = self->priv->jobs;
#line 654 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = self->priv->cancellable;
#line 654 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = self->priv->skipset;
#line 654 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = work_sniffer_new (self, _tmp2_, _batch_import_on_work_sniffed_out_completion_callback, self, _tmp3_, _batch_import_on_sniffer_cancelled_cancellation_callback, self, _tmp4_);
#line 654 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = _tmp5_;
#line 654 "/home/jens/Source/shotwell/src/BatchImport.vala"
	workers_enqueue (_tmp1_, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_BACKGROUND_JOB, BackgroundJob));
#line 654 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_background_job_unref0 (_tmp6_);
#line 656 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp7_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) BATCH_IMPORT_WORK_SNIFFER_THROBBER_MSEC, _batch_import_on_sniffer_working_gsource_func, g_object_ref (self), g_object_unref);
#line 656 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->throbber_id = _tmp7_;
#line 6303 "BatchImport.c"
}


static gboolean batch_import_on_sniffer_working (BatchImport* self) {
	gboolean result = FALSE;
#line 663 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT (self), FALSE);
#line 664 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_report_progress (self, (guint64) 0);
#line 666 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = TRUE;
#line 666 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 6317 "BatchImport.c"
}


static gpointer _background_job_ref0 (gpointer self) {
#line 672 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self ? background_job_ref (self) : NULL;
#line 6324 "BatchImport.c"
}


static void _batch_import_on_file_prepared_notification_callback (BackgroundJob* job, NotificationObject* user, gpointer self) {
#line 689 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_on_file_prepared ((BatchImport*) self, job, user);
#line 6331 "BatchImport.c"
}


static void _batch_import_on_files_prepared_completion_callback (BackgroundJob* job, gpointer self) {
#line 689 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_on_files_prepared ((BatchImport*) self, job);
#line 6338 "BatchImport.c"
}


static void _batch_import_on_file_prepare_cancelled_cancellation_callback (BackgroundJob* job, gpointer self) {
#line 689 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_on_file_prepare_cancelled ((BatchImport*) self, job);
#line 6345 "BatchImport.c"
}


static void batch_import_on_work_sniffed_out (BatchImport* self, BackgroundJob* j) {
	gboolean _tmp0_ = FALSE;
	WorkSniffer* sniffer = NULL;
	BackgroundJob* _tmp1_ = NULL;
	WorkSniffer* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	WorkSniffer* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	WorkSniffer* _tmp10_ = NULL;
	guint64 _tmp11_ = 0ULL;
	PrepareFilesJob* prepare_files_job = NULL;
	WorkSniffer* _tmp12_ = NULL;
	GeeList* _tmp13_ = NULL;
	GCancellable* _tmp14_ = NULL;
	PrepareFilesJob* _tmp15_ = NULL;
	Workers* _tmp16_ = NULL;
	PrepareFilesJob* _tmp17_ = NULL;
	guint _tmp18_ = 0U;
#line 669 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT (self));
#line 669 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BACKGROUND_JOB (j));
#line 670 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->completed;
#line 670 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_assert (!_tmp0_, "!completed");
#line 672 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = j;
#line 672 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = _background_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_WORK_SNIFFER, WorkSniffer));
#line 672 "/home/jens/Source/shotwell/src/BatchImport.vala"
	sniffer = _tmp2_;
#line 674 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_log_status (self, "on_work_sniffed_out");
#line 676 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = sniffer;
#line 676 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = batch_import_report_failures (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_BACKGROUND_IMPORT_JOB, BackgroundImportJob));
#line 676 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!_tmp5_) {
#line 676 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = TRUE;
#line 6391 "BatchImport.c"
	} else {
		WorkSniffer* _tmp6_ = NULL;
		GeeList* _tmp7_ = NULL;
		gint _tmp8_ = 0;
		gint _tmp9_ = 0;
#line 676 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ = sniffer;
#line 676 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp7_ = _tmp6_->files_to_prepare;
#line 676 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp8_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_COLLECTION, GeeCollection));
#line 676 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp9_ = _tmp8_;
#line 676 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = _tmp9_ == 0;
#line 6407 "BatchImport.c"
	}
#line 676 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp3_) {
#line 677 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_report_completed (self, "work sniffed out: nothing to do");
#line 679 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_background_job_unref0 (sniffer);
#line 679 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return;
#line 6417 "BatchImport.c"
	}
#line 682 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp10_ = sniffer;
#line 682 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp11_ = _tmp10_->total_bytes;
#line 682 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->total_bytes = _tmp11_;
#line 689 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp12_ = sniffer;
#line 689 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp13_ = _tmp12_->files_to_prepare;
#line 689 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp14_ = self->priv->cancellable;
#line 689 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp15_ = prepare_files_job_new (self, _tmp13_, _batch_import_on_file_prepared_notification_callback, self, _batch_import_on_files_prepared_completion_callback, self, _tmp14_, _batch_import_on_file_prepare_cancelled_cancellation_callback, self);
#line 689 "/home/jens/Source/shotwell/src/BatchImport.vala"
	prepare_files_job = _tmp15_;
#line 692 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp16_ = batch_import_feeder_workers;
#line 692 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp17_ = prepare_files_job;
#line 692 "/home/jens/Source/shotwell/src/BatchImport.vala"
	workers_enqueue (_tmp16_, G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_BACKGROUND_JOB, BackgroundJob));
#line 694 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp18_ = self->priv->throbber_id;
#line 694 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp18_ > ((guint) 0)) {
#line 6445 "BatchImport.c"
		guint _tmp19_ = 0U;
#line 695 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp19_ = self->priv->throbber_id;
#line 695 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_source_remove (_tmp19_);
#line 696 "/home/jens/Source/shotwell/src/BatchImport.vala"
		self->priv->throbber_id = (guint) 0;
#line 6453 "BatchImport.c"
	}
#line 669 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_background_job_unref0 (prepare_files_job);
#line 669 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_background_job_unref0 (sniffer);
#line 6459 "BatchImport.c"
}


static void batch_import_on_sniffer_cancelled (BatchImport* self, BackgroundJob* j) {
	gboolean _tmp0_ = FALSE;
	WorkSniffer* sniffer = NULL;
	BackgroundJob* _tmp1_ = NULL;
	WorkSniffer* _tmp2_ = NULL;
	WorkSniffer* _tmp3_ = NULL;
	guint _tmp4_ = 0U;
#line 700 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT (self));
#line 700 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BACKGROUND_JOB (j));
#line 701 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->completed;
#line 701 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_assert (!_tmp0_, "!completed");
#line 703 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = j;
#line 703 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = _background_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_WORK_SNIFFER, WorkSniffer));
#line 703 "/home/jens/Source/shotwell/src/BatchImport.vala"
	sniffer = _tmp2_;
#line 705 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_log_status (self, "on_sniffer_cancelled");
#line 707 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = sniffer;
#line 707 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_report_failures (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_BACKGROUND_IMPORT_JOB, BackgroundImportJob));
#line 708 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_report_completed (self, "work sniffer cancelled");
#line 710 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = self->priv->throbber_id;
#line 710 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp4_ > ((guint) 0)) {
#line 6496 "BatchImport.c"
		guint _tmp5_ = 0U;
#line 711 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp5_ = self->priv->throbber_id;
#line 711 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_source_remove (_tmp5_);
#line 712 "/home/jens/Source/shotwell/src/BatchImport.vala"
		self->priv->throbber_id = (guint) 0;
#line 6504 "BatchImport.c"
	}
#line 700 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_background_job_unref0 (sniffer);
#line 6508 "BatchImport.c"
}


static void _batch_import_on_thumbnail_writer_completed_completion_callback (BackgroundJob* job, gpointer self) {
#line 726 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_on_thumbnail_writer_completed ((BatchImport*) self, job);
#line 6515 "BatchImport.c"
}


static void _batch_import_on_thumbnail_writer_cancelled_cancellation_callback (BackgroundJob* job, gpointer self) {
#line 726 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_on_thumbnail_writer_cancelled ((BatchImport*) self, job);
#line 6522 "BatchImport.c"
}


static void _batch_import_on_import_files_completed_completion_callback (BackgroundJob* job, gpointer self) {
#line 731 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_on_import_files_completed ((BatchImport*) self, job);
#line 6529 "BatchImport.c"
}


static void _batch_import_on_import_files_cancelled_cancellation_callback (BackgroundJob* job, gpointer self) {
#line 731 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_on_import_files_cancelled ((BatchImport*) self, job);
#line 6536 "BatchImport.c"
}


static void batch_import_flush_import_jobs (BatchImport* self) {
#line 720 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT (self));
#line 725 "/home/jens/Source/shotwell/src/BatchImport.vala"
	while (TRUE) {
#line 6545 "BatchImport.c"
		gboolean _tmp0_ = FALSE;
		GeeList* _tmp1_ = NULL;
		gint _tmp2_ = 0;
		gint _tmp3_ = 0;
		Workers* _tmp7_ = NULL;
		GeeList* _tmp8_ = NULL;
		gpointer _tmp9_ = NULL;
		CompletedImportObject* _tmp10_ = NULL;
		GCancellable* _tmp11_ = NULL;
		ThumbnailWriterJob* _tmp12_ = NULL;
		ThumbnailWriterJob* _tmp13_ = NULL;
#line 725 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp1_ = self->priv->ready_thumbnails;
#line 725 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp2_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection));
#line 725 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = _tmp2_;
#line 725 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp3_ > 0) {
#line 6565 "BatchImport.c"
			Workers* _tmp4_ = NULL;
			gint _tmp5_ = 0;
			guint _tmp6_ = 0U;
#line 725 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp4_ = batch_import_import_workers;
#line 725 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp5_ = workers_get_pending_job_count (_tmp4_);
#line 725 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp6_ = self->priv->max_outstanding_import_jobs;
#line 725 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp0_ = ((guint) _tmp5_) < _tmp6_;
#line 6577 "BatchImport.c"
		} else {
#line 725 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp0_ = FALSE;
#line 6581 "BatchImport.c"
		}
#line 725 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (!_tmp0_) {
#line 725 "/home/jens/Source/shotwell/src/BatchImport.vala"
			break;
#line 6587 "BatchImport.c"
		}
#line 726 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp7_ = batch_import_import_workers;
#line 726 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp8_ = self->priv->ready_thumbnails;
#line 726 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp9_ = gee_list_remove_at (_tmp8_, 0);
#line 726 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp10_ = (CompletedImportObject*) _tmp9_;
#line 726 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp11_ = self->priv->cancellable;
#line 726 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp12_ = thumbnail_writer_job_new (self, _tmp10_, _batch_import_on_thumbnail_writer_completed_completion_callback, self, _tmp11_, _batch_import_on_thumbnail_writer_cancelled_cancellation_callback, self);
#line 726 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp13_ = _tmp12_;
#line 726 "/home/jens/Source/shotwell/src/BatchImport.vala"
		workers_enqueue (_tmp7_, G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_BACKGROUND_JOB, BackgroundJob));
#line 726 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_background_job_unref0 (_tmp13_);
#line 726 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_completed_import_object_unref0 (_tmp10_);
#line 6609 "BatchImport.c"
	}
#line 730 "/home/jens/Source/shotwell/src/BatchImport.vala"
	while (TRUE) {
#line 6613 "BatchImport.c"
		gboolean _tmp14_ = FALSE;
		GeeList* _tmp15_ = NULL;
		gint _tmp16_ = 0;
		gint _tmp17_ = 0;
		Workers* _tmp21_ = NULL;
		GeeList* _tmp22_ = NULL;
		gpointer _tmp23_ = NULL;
		PreparedFile* _tmp24_ = NULL;
		BatchImportRoll* _tmp25_ = NULL;
		ImportID _tmp26_ = {0};
		GCancellable* _tmp27_ = NULL;
		PreparedFileImportJob* _tmp28_ = NULL;
		PreparedFileImportJob* _tmp29_ = NULL;
#line 730 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp15_ = self->priv->ready_files;
#line 730 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp16_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_COLLECTION, GeeCollection));
#line 730 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp17_ = _tmp16_;
#line 730 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp17_ > 0) {
#line 6635 "BatchImport.c"
			Workers* _tmp18_ = NULL;
			gint _tmp19_ = 0;
			guint _tmp20_ = 0U;
#line 730 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp18_ = batch_import_import_workers;
#line 730 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp19_ = workers_get_pending_job_count (_tmp18_);
#line 730 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp20_ = self->priv->max_outstanding_import_jobs;
#line 730 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp14_ = ((guint) _tmp19_) < _tmp20_;
#line 6647 "BatchImport.c"
		} else {
#line 730 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp14_ = FALSE;
#line 6651 "BatchImport.c"
		}
#line 730 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (!_tmp14_) {
#line 730 "/home/jens/Source/shotwell/src/BatchImport.vala"
			break;
#line 6657 "BatchImport.c"
		}
#line 731 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp21_ = batch_import_import_workers;
#line 731 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp22_ = self->priv->ready_files;
#line 731 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp23_ = gee_list_remove_at (_tmp22_, 0);
#line 731 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp24_ = (PreparedFile*) _tmp23_;
#line 731 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp25_ = self->priv->import_roll;
#line 731 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp26_ = _tmp25_->import_id;
#line 731 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp27_ = self->priv->cancellable;
#line 731 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp28_ = prepared_file_import_job_new (self, _tmp24_, &_tmp26_, _batch_import_on_import_files_completed_completion_callback, self, _tmp27_, _batch_import_on_import_files_cancelled_cancellation_callback, self);
#line 731 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp29_ = _tmp28_;
#line 731 "/home/jens/Source/shotwell/src/BatchImport.vala"
		workers_enqueue (_tmp21_, G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_BACKGROUND_JOB, BackgroundJob));
#line 731 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_background_job_unref0 (_tmp29_);
#line 731 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_prepared_file_unref0 (_tmp24_);
#line 6683 "BatchImport.c"
	}
}


static GFile* batch_import_get_in_current_import (BatchImport* self, PreparedFile* prepared_file) {
	GFile* result = NULL;
	gboolean _tmp0_ = FALSE;
	PreparedFile* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	PreparedFile* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
#line 739 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT (self), NULL);
#line 739 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_PREPARED_FILE (prepared_file), NULL);
#line 741 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = prepared_file;
#line 741 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = _tmp1_->full_md5;
#line 741 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp2_ != NULL) {
#line 6705 "BatchImport.c"
		GeeHashMap* _tmp3_ = NULL;
		PreparedFile* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		gboolean _tmp6_ = FALSE;
#line 742 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = self->priv->imported_full_md5_table;
#line 742 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = prepared_file;
#line 742 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp5_ = _tmp4_->full_md5;
#line 742 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp5_);
#line 742 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = _tmp6_;
#line 6720 "BatchImport.c"
	} else {
#line 741 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = FALSE;
#line 6724 "BatchImport.c"
	}
#line 741 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp0_) {
#line 6728 "BatchImport.c"
		GeeHashMap* _tmp7_ = NULL;
		PreparedFile* _tmp8_ = NULL;
		const gchar* _tmp9_ = NULL;
		gpointer _tmp10_ = NULL;
#line 744 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp7_ = self->priv->imported_full_md5_table;
#line 744 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp8_ = prepared_file;
#line 744 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp9_ = _tmp8_->full_md5;
#line 744 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp10_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp9_);
#line 744 "/home/jens/Source/shotwell/src/BatchImport.vala"
		result = (GFile*) _tmp10_;
#line 744 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return result;
#line 6745 "BatchImport.c"
	}
#line 748 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp11_ = prepared_file;
#line 748 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp12_ = _tmp11_->full_md5;
#line 748 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp12_ != NULL) {
#line 6753 "BatchImport.c"
		GeeHashMap* _tmp13_ = NULL;
		PreparedFile* _tmp14_ = NULL;
		const gchar* _tmp15_ = NULL;
		PreparedFile* _tmp16_ = NULL;
		GFile* _tmp17_ = NULL;
#line 749 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp13_ = self->priv->imported_full_md5_table;
#line 749 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp14_ = prepared_file;
#line 749 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp15_ = _tmp14_->full_md5;
#line 749 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp16_ = prepared_file;
#line 749 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp17_ = _tmp16_->file;
#line 749 "/home/jens/Source/shotwell/src/BatchImport.vala"
		gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp15_, _tmp17_);
#line 6771 "BatchImport.c"
	}
#line 751 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = NULL;
#line 751 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 6777 "BatchImport.c"
}


static gpointer _notification_object_ref0 (gpointer self) {
#line 758 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self ? notification_object_ref (self) : NULL;
#line 6784 "BatchImport.c"
}


static void batch_import_on_file_prepared (BatchImport* self, BackgroundJob* j, NotificationObject* user) {
	gboolean _tmp0_ = FALSE;
	PreparedFileCluster* cluster = NULL;
	NotificationObject* _tmp1_ = NULL;
	PreparedFileCluster* _tmp2_ = NULL;
	GeeArrayList* _tmp3_ = NULL;
	gint _tmp4_ = 0;
	gint _tmp5_ = 0;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	GeeArrayList* _tmp8_ = NULL;
#line 755 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT (self));
#line 755 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BACKGROUND_JOB (j));
#line 755 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail ((user == NULL) || IS_NOTIFICATION_OBJECT (user));
#line 756 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->completed;
#line 756 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_assert (!_tmp0_, "!completed");
#line 758 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = user;
#line 758 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = _notification_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PREPARED_FILE_CLUSTER, PreparedFileCluster));
#line 758 "/home/jens/Source/shotwell/src/BatchImport.vala"
	cluster = _tmp2_;
#line 760 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = cluster->list;
#line 760 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 760 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = _tmp4_;
#line 760 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = g_strdup_printf ("on_file_prepared (%d files)", _tmp5_);
#line 760 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp7_ = _tmp6_;
#line 760 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_log_status (self, _tmp7_);
#line 760 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (_tmp7_);
#line 762 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp8_ = cluster->list;
#line 762 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_process_prepared_files (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_LIST, GeeList), NULL, NULL);
#line 755 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_notification_object_unref0 (cluster);
#line 6835 "BatchImport.c"
}


static void batch_import_process_prepared_files_data_free (gpointer _data) {
	BatchImportProcessPreparedFilesData* _data_;
	_data_ = _data;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (_data_->list);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (_data_->self);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_slice_free (BatchImportProcessPreparedFilesData, _data_);
#line 6848 "BatchImport.c"
}


static void batch_import_process_prepared_files (BatchImport* self, GeeList* list, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BatchImportProcessPreparedFilesData* _data_;
	BatchImport* _tmp0_ = NULL;
	GeeList* _tmp1_ = NULL;
	GeeList* _tmp2_ = NULL;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_data_ = g_slice_new0 (BatchImportProcessPreparedFilesData);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, batch_import_process_prepared_files);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, batch_import_process_prepared_files_data_free);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_data_->self = _tmp0_;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = list;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (_data_->list);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_data_->list = _tmp2_;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_process_prepared_files_co (_data_);
#line 6877 "BatchImport.c"
}


static void batch_import_process_prepared_files_finish (BatchImport* self, GAsyncResult* _res_) {
	BatchImportProcessPreparedFilesData* _data_;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 6885 "BatchImport.c"
}


static gboolean _batch_import_process_prepared_files_co_gsource_func (gpointer self) {
	gboolean result;
	result = batch_import_process_prepared_files_co (self);
#line 769 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 6894 "BatchImport.c"
}


static gboolean batch_import_process_prepared_files_co (BatchImportProcessPreparedFilesData* _data_) {
#line 767 "/home/jens/Source/shotwell/src/BatchImport.vala"
	switch (_data_->_state_) {
#line 767 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case 0:
#line 6903 "BatchImport.c"
		goto _state_0;
#line 767 "/home/jens/Source/shotwell/src/BatchImport.vala"
		case 1:
#line 6907 "BatchImport.c"
		goto _state_1;
		default:
#line 767 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_assert_not_reached ();
#line 6912 "BatchImport.c"
	}
	_state_0:
	{
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_data_->_tmp0_ = NULL;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_data_->_tmp0_ = _data_->list;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_data_->_tmp1_ = NULL;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_data_->_tmp1_ = _g_object_ref0 (_data_->_tmp0_);
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_data_->_prepared_file_list = _data_->_tmp1_;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_data_->_tmp2_ = NULL;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_data_->_tmp2_ = _data_->_prepared_file_list;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_data_->_tmp3_ = 0;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_data_->_tmp3_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp2_, GEE_TYPE_COLLECTION, GeeCollection));
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_data_->_tmp4_ = 0;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_data_->_tmp4_ = _data_->_tmp3_;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_data_->_prepared_file_size = _data_->_tmp4_;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_data_->_prepared_file_index = -1;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
		while (TRUE) {
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp5_ = 0;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp5_ = _data_->_prepared_file_index;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_prepared_file_index = _data_->_tmp5_ + 1;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp6_ = 0;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp6_ = _data_->_prepared_file_index;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp7_ = 0;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp7_ = _data_->_prepared_file_size;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (!(_data_->_tmp6_ < _data_->_tmp7_)) {
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
				break;
#line 6962 "BatchImport.c"
			}
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp8_ = NULL;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp8_ = _data_->_prepared_file_list;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp9_ = 0;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp9_ = _data_->_prepared_file_index;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp10_ = NULL;
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp10_ = gee_list_get (_data_->_tmp8_, _data_->_tmp9_);
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->prepared_file = (PreparedFile*) _data_->_tmp10_;
#line 769 "/home/jens/Source/shotwell/src/BatchImport.vala"
			g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _batch_import_process_prepared_files_co_gsource_func, _data_, NULL);
#line 770 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_state_ = 1;
#line 770 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return FALSE;
#line 6984 "BatchImport.c"
			_state_1:
			;
#line 772 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->import_result = NULL;
#line 777 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp11_ = NULL;
#line 777 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp11_ = library_photo_global;
#line 777 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp12_ = NULL;
#line 777 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp12_ = _data_->prepared_file;
#line 777 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp13_ = NULL;
#line 777 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp13_ = _data_->_tmp12_->file;
#line 777 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp14_ = 0;
#line 777 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp15_ = NULL;
#line 777 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp15_ = library_photo_source_collection_get_state_by_file (_data_->_tmp11_, _data_->_tmp13_, &_data_->_tmp14_);
#line 777 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->photo_state = _data_->_tmp14_;
#line 777 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->photo = _data_->_tmp15_;
#line 779 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp16_ = NULL;
#line 779 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp16_ = _data_->photo;
#line 779 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_data_->_tmp16_ != NULL) {
#line 780 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp17_ = 0;
#line 780 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp17_ = _data_->photo_state;
#line 780 "/home/jens/Source/shotwell/src/BatchImport.vala"
				switch (_data_->_tmp17_) {
#line 780 "/home/jens/Source/shotwell/src/BatchImport.vala"
					case LIBRARY_PHOTO_SOURCE_COLLECTION_STATE_ONLINE:
#line 780 "/home/jens/Source/shotwell/src/BatchImport.vala"
					case LIBRARY_PHOTO_SOURCE_COLLECTION_STATE_OFFLINE:
#line 780 "/home/jens/Source/shotwell/src/BatchImport.vala"
					case LIBRARY_PHOTO_SOURCE_COLLECTION_STATE_EDITABLE:
#line 780 "/home/jens/Source/shotwell/src/BatchImport.vala"
					case LIBRARY_PHOTO_SOURCE_COLLECTION_STATE_DEVELOPER:
#line 7031 "BatchImport.c"
					{
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp18_ = NULL;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp18_ = _data_->prepared_file;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp19_ = NULL;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp19_ = _data_->_tmp18_->job;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp20_ = NULL;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp20_ = _data_->prepared_file;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp21_ = NULL;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp21_ = _data_->_tmp20_->file;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp22_ = NULL;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp22_ = _data_->prepared_file;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp23_ = NULL;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp23_ = _data_->_tmp22_->file;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp24_ = NULL;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp24_ = g_file_get_path (_data_->_tmp23_);
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp25_ = NULL;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp25_ = _data_->_tmp24_;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp26_ = NULL;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp26_ = _data_->prepared_file;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp27_ = NULL;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp27_ = _data_->_tmp26_->file;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp28_ = NULL;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp28_ = g_file_get_path (_data_->_tmp27_);
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp29_ = NULL;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp29_ = _data_->_tmp28_;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp30_ = NULL;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp30_ = _data_->photo;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp31_ = NULL;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp31_ = media_source_get_master_file (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp30_, TYPE_MEDIA_SOURCE, MediaSource));
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp32_ = NULL;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp32_ = _data_->_tmp31_;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp33_ = NULL;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp33_ = duplicated_file_create_from_file (_data_->_tmp32_);
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp34_ = NULL;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp34_ = _data_->_tmp33_;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp35_ = NULL;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp35_ = batch_import_result_new (_data_->_tmp19_, _data_->_tmp21_, _data_->_tmp25_, _data_->_tmp29_, _data_->_tmp34_, IMPORT_RESULT_PHOTO_EXISTS);
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_batch_import_result_unref0 (_data_->import_result);
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->import_result = _data_->_tmp35_;
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_g_object_unref0 (_data_->_tmp34_);
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_g_object_unref0 (_data_->_tmp32_);
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_g_free0 (_data_->_tmp29_);
#line 785 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_g_free0 (_data_->_tmp25_);
#line 790 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp36_ = 0;
#line 790 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp36_ = _data_->photo_state;
#line 790 "/home/jens/Source/shotwell/src/BatchImport.vala"
						if (_data_->_tmp36_ == LIBRARY_PHOTO_SOURCE_COLLECTION_STATE_OFFLINE) {
#line 791 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp37_ = NULL;
#line 791 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp37_ = _data_->photo;
#line 791 "/home/jens/Source/shotwell/src/BatchImport.vala"
							media_source_mark_online (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp37_, TYPE_MEDIA_SOURCE, MediaSource));
#line 7129 "BatchImport.c"
						}
#line 792 "/home/jens/Source/shotwell/src/BatchImport.vala"
						break;
#line 7133 "BatchImport.c"
					}
#line 780 "/home/jens/Source/shotwell/src/BatchImport.vala"
					case LIBRARY_PHOTO_SOURCE_COLLECTION_STATE_TRASH:
#line 7137 "BatchImport.c"
					{
#line 796 "/home/jens/Source/shotwell/src/BatchImport.vala"
						break;
#line 7141 "BatchImport.c"
					}
					default:
					{
#line 799 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp38_ = 0;
#line 799 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp38_ = _data_->photo_state;
#line 799 "/home/jens/Source/shotwell/src/BatchImport.vala"
						memset (&_data_->_tmp39_, 0, sizeof (GEnumValue*));
#line 799 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp39_ = g_enum_get_value (g_type_class_ref (LIBRARY_PHOTO_SOURCE_COLLECTION_TYPE_STATE), _data_->_tmp38_);
#line 799 "/home/jens/Source/shotwell/src/BatchImport.vala"
						g_error ("BatchImport.vala:799: Unknown LibraryPhotoSourceCollection state: %s", (_data_->_tmp39_ != NULL) ? _data_->_tmp39_->value_name : NULL);
#line 7155 "BatchImport.c"
					}
				}
			}
#line 803 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp40_ = NULL;
#line 803 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp40_ = _data_->import_result;
#line 803 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_data_->_tmp40_ != NULL) {
#line 804 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp41_ = NULL;
#line 804 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp41_ = _data_->import_result;
#line 804 "/home/jens/Source/shotwell/src/BatchImport.vala"
				batch_import_report_failure (_data_->self, _data_->_tmp41_);
#line 805 "/home/jens/Source/shotwell/src/BatchImport.vala"
				batch_import_file_import_complete (_data_->self);
#line 807 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_data_->photo);
#line 807 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_batch_import_result_unref0 (_data_->import_result);
#line 807 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_prepared_file_unref0 (_data_->prepared_file);
#line 807 "/home/jens/Source/shotwell/src/BatchImport.vala"
				continue;
#line 7181 "BatchImport.c"
			}
#line 811 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp42_ = NULL;
#line 811 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp42_ = video_global;
#line 811 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp43_ = NULL;
#line 811 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp43_ = _data_->prepared_file;
#line 811 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp44_ = NULL;
#line 811 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp44_ = _data_->_tmp43_->file;
#line 811 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp45_ = 0;
#line 811 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp46_ = NULL;
#line 811 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp46_ = video_source_collection_get_state_by_file (_data_->_tmp42_, _data_->_tmp44_, &_data_->_tmp45_);
#line 811 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->video_state = _data_->_tmp45_;
#line 811 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->video = _data_->_tmp46_;
#line 812 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp47_ = NULL;
#line 812 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp47_ = _data_->video;
#line 812 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_data_->_tmp47_ != NULL) {
#line 813 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp48_ = 0;
#line 813 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp48_ = _data_->video_state;
#line 813 "/home/jens/Source/shotwell/src/BatchImport.vala"
				switch (_data_->_tmp48_) {
#line 813 "/home/jens/Source/shotwell/src/BatchImport.vala"
					case VIDEO_SOURCE_COLLECTION_STATE_ONLINE:
#line 813 "/home/jens/Source/shotwell/src/BatchImport.vala"
					case VIDEO_SOURCE_COLLECTION_STATE_OFFLINE:
#line 7221 "BatchImport.c"
					{
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp49_ = NULL;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp49_ = _data_->prepared_file;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp50_ = NULL;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp50_ = _data_->_tmp49_->job;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp51_ = NULL;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp51_ = _data_->prepared_file;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp52_ = NULL;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp52_ = _data_->_tmp51_->file;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp53_ = NULL;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp53_ = _data_->prepared_file;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp54_ = NULL;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp54_ = _data_->_tmp53_->file;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp55_ = NULL;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp55_ = g_file_get_path (_data_->_tmp54_);
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp56_ = NULL;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp56_ = _data_->_tmp55_;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp57_ = NULL;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp57_ = _data_->prepared_file;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp58_ = NULL;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp58_ = _data_->_tmp57_->file;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp59_ = NULL;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp59_ = g_file_get_path (_data_->_tmp58_);
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp60_ = NULL;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp60_ = _data_->_tmp59_;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp61_ = NULL;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp61_ = _data_->video;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp62_ = NULL;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp62_ = media_source_get_master_file (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp61_, TYPE_MEDIA_SOURCE, MediaSource));
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp63_ = NULL;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp63_ = _data_->_tmp62_;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp64_ = NULL;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp64_ = duplicated_file_create_from_file (_data_->_tmp63_);
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp65_ = NULL;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp65_ = _data_->_tmp64_;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp66_ = NULL;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp66_ = batch_import_result_new (_data_->_tmp50_, _data_->_tmp52_, _data_->_tmp56_, _data_->_tmp60_, _data_->_tmp65_, IMPORT_RESULT_PHOTO_EXISTS);
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_batch_import_result_unref0 (_data_->import_result);
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->import_result = _data_->_tmp66_;
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_g_object_unref0 (_data_->_tmp65_);
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_g_object_unref0 (_data_->_tmp63_);
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_g_free0 (_data_->_tmp60_);
#line 816 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_g_free0 (_data_->_tmp56_);
#line 821 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp67_ = 0;
#line 821 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp67_ = _data_->video_state;
#line 821 "/home/jens/Source/shotwell/src/BatchImport.vala"
						if (_data_->_tmp67_ == VIDEO_SOURCE_COLLECTION_STATE_OFFLINE) {
#line 822 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp68_ = NULL;
#line 822 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp68_ = _data_->video;
#line 822 "/home/jens/Source/shotwell/src/BatchImport.vala"
							media_source_mark_online (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp68_, TYPE_MEDIA_SOURCE, MediaSource));
#line 7319 "BatchImport.c"
						}
#line 823 "/home/jens/Source/shotwell/src/BatchImport.vala"
						break;
#line 7323 "BatchImport.c"
					}
#line 813 "/home/jens/Source/shotwell/src/BatchImport.vala"
					case VIDEO_SOURCE_COLLECTION_STATE_TRASH:
#line 7327 "BatchImport.c"
					{
#line 827 "/home/jens/Source/shotwell/src/BatchImport.vala"
						break;
#line 7331 "BatchImport.c"
					}
					default:
					{
#line 830 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp69_ = 0;
#line 830 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp69_ = _data_->video_state;
#line 830 "/home/jens/Source/shotwell/src/BatchImport.vala"
						memset (&_data_->_tmp70_, 0, sizeof (GEnumValue*));
#line 830 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp70_ = g_enum_get_value (g_type_class_ref (VIDEO_SOURCE_COLLECTION_TYPE_STATE), _data_->_tmp69_);
#line 830 "/home/jens/Source/shotwell/src/BatchImport.vala"
						g_error ("BatchImport.vala:830: Unknown VideoSourceCollection state: %s", (_data_->_tmp70_ != NULL) ? _data_->_tmp70_->value_name : NULL);
#line 7345 "BatchImport.c"
					}
				}
			}
#line 834 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp71_ = NULL;
#line 834 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp71_ = _data_->import_result;
#line 834 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_data_->_tmp71_ != NULL) {
#line 835 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp72_ = NULL;
#line 835 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp72_ = _data_->import_result;
#line 835 "/home/jens/Source/shotwell/src/BatchImport.vala"
				batch_import_report_failure (_data_->self, _data_->_tmp72_);
#line 836 "/home/jens/Source/shotwell/src/BatchImport.vala"
				batch_import_file_import_complete (_data_->self);
#line 838 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_data_->video);
#line 838 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_data_->photo);
#line 838 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_batch_import_result_unref0 (_data_->import_result);
#line 838 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_prepared_file_unref0 (_data_->prepared_file);
#line 838 "/home/jens/Source/shotwell/src/BatchImport.vala"
				continue;
#line 7373 "BatchImport.c"
			}
#line 843 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp74_ = NULL;
#line 843 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp74_ = _data_->prepared_file;
#line 843 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp75_ = FALSE;
#line 843 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp75_ = _data_->_tmp74_->is_video;
#line 843 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_data_->_tmp75_) {
#line 843 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp76_ = NULL;
#line 843 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp76_ = _data_->prepared_file;
#line 843 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp77_ = NULL;
#line 843 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp77_ = _data_->_tmp76_->file;
#line 843 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp78_ = NULL;
#line 843 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp78_ = _data_->prepared_file;
#line 843 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp79_ = NULL;
#line 843 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp79_ = _data_->_tmp78_->full_md5;
#line 843 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp80_ = FALSE;
#line 843 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp80_ = video_is_duplicate (_data_->_tmp77_, _data_->_tmp79_);
#line 843 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp73_ = _data_->_tmp80_;
#line 7407 "BatchImport.c"
			} else {
#line 843 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp73_ = FALSE;
#line 7411 "BatchImport.c"
			}
#line 843 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_data_->_tmp73_) {
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp81_ = NULL;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp81_ = video_table_get_instance ();
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp82_ = NULL;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp82_ = _data_->_tmp81_;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp83_ = NULL;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp83_ = _data_->prepared_file;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp84_ = NULL;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp84_ = _data_->_tmp83_->file;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp85_ = NULL;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp85_ = _data_->prepared_file;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp86_ = NULL;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp86_ = _data_->_tmp85_->full_md5;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp87_ = 0;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp88_ = NULL;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp88_ = video_table_get_duplicate_ids (_data_->_tmp82_, _data_->_tmp84_, _data_->_tmp86_, &_data_->_tmp87_);
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp89_ = NULL;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp89__length1 = 0;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp89_ = _data_->_tmp88_;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp89__length1 = _data_->_tmp87_;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_database_table_unref0 (_data_->_tmp82_);
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->duplicate_ids_length1 = 0;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_duplicate_ids_size_ = 0;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->duplicate_ids = _data_->_tmp89_;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->duplicate_ids_length1 = _data_->_tmp89__length1;
#line 844 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_duplicate_ids_size_ = _data_->duplicate_ids_length1;
#line 847 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp90_ = NULL;
#line 847 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp90__length1 = 0;
#line 847 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp90_ = _data_->duplicate_ids;
#line 847 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp90__length1 = _data_->duplicate_ids_length1;
#line 847 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_vala_assert (_data_->_tmp90__length1 > 0, "duplicate_ids.length > 0");
#line 849 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp91_ = NULL;
#line 849 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp91__length1 = 0;
#line 849 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp91_ = _data_->duplicate_ids;
#line 849 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp91__length1 = _data_->duplicate_ids_length1;
#line 849 "/home/jens/Source/shotwell/src/BatchImport.vala"
				memset (&_data_->_tmp92_, 0, sizeof (VideoID));
#line 849 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp92_ = _data_->_tmp91_[0];
#line 849 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp93_ = NULL;
#line 849 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp93_ = duplicated_file_create_from_video_id (&_data_->_tmp92_);
#line 849 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->duplicated_file = _data_->_tmp93_;
#line 852 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->result_code = IMPORT_RESULT_PHOTO_EXISTS;
#line 853 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp94_ = FALSE;
#line 853 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp94_ = _data_->self->priv->mark_duplicates_online;
#line 853 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (_data_->_tmp94_) {
#line 854 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp95_ = NULL;
#line 854 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp95_ = video_global;
#line 854 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp96_ = NULL;
#line 854 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp96_ = media_source_collection_get_offline_bin (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp95_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection));
#line 854 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp97_ = NULL;
#line 854 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp97_ = _data_->_tmp96_;
#line 854 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp98_ = NULL;
#line 854 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp98_ = _data_->prepared_file;
#line 854 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp99_ = NULL;
#line 854 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp99_ = _data_->_tmp98_->file;
#line 854 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp100_ = NULL;
#line 854 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp100_ = media_source_holding_tank_fetch_by_master_file (_data_->_tmp97_, _data_->_tmp99_);
#line 854 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp101_ = NULL;
#line 854 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp101_ = G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp100_, TYPE_VIDEO, Video);
#line 854 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_source_holding_tank_unref0 (_data_->_tmp97_);
#line 854 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->dupe_video = _data_->_tmp101_;
#line 856 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp102_ = NULL;
#line 856 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp102_ = _data_->dupe_video;
#line 856 "/home/jens/Source/shotwell/src/BatchImport.vala"
					if (_data_->_tmp102_ == NULL) {
#line 857 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp103_ = NULL;
#line 857 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp103_ = video_global;
#line 857 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp104_ = NULL;
#line 857 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp104_ = media_source_collection_get_offline_bin (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp103_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection));
#line 857 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp105_ = NULL;
#line 857 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp105_ = _data_->_tmp104_;
#line 857 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp106_ = NULL;
#line 857 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp106_ = _data_->prepared_file;
#line 857 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp107_ = NULL;
#line 857 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp107_ = _data_->_tmp106_->full_md5;
#line 857 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp108_ = NULL;
#line 857 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp108_ = media_source_holding_tank_fetch_by_md5 (_data_->_tmp105_, _data_->_tmp107_);
#line 857 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_g_object_unref0 (_data_->dupe_video);
#line 857 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->dupe_video = G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp108_, TYPE_VIDEO, Video);
#line 857 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_source_holding_tank_unref0 (_data_->_tmp105_);
#line 7569 "BatchImport.c"
					}
#line 859 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp109_ = NULL;
#line 859 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp109_ = _data_->dupe_video;
#line 859 "/home/jens/Source/shotwell/src/BatchImport.vala"
					if (_data_->_tmp109_ != NULL) {
#line 860 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp110_ = NULL;
#line 860 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp110_ = _data_->prepared_file;
#line 860 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp111_ = NULL;
#line 860 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp111_ = _data_->_tmp110_->file;
#line 860 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp112_ = NULL;
#line 860 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp112_ = g_file_get_path (_data_->_tmp111_);
#line 860 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp113_ = NULL;
#line 860 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp113_ = _data_->_tmp112_;
#line 860 "/home/jens/Source/shotwell/src/BatchImport.vala"
						g_debug ("BatchImport.vala:860: duplicate video found offline, marking as online" \
": %s", _data_->_tmp113_);
#line 860 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_g_free0 (_data_->_tmp113_);
#line 863 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp114_ = NULL;
#line 863 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp114_ = _data_->dupe_video;
#line 863 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp115_ = NULL;
#line 863 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp115_ = _data_->prepared_file;
#line 863 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp116_ = NULL;
#line 863 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp116_ = _data_->_tmp115_->file;
#line 863 "/home/jens/Source/shotwell/src/BatchImport.vala"
						monitorable_set_master_file (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp114_, TYPE_MONITORABLE, Monitorable), _data_->_tmp116_);
#line 864 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp117_ = NULL;
#line 864 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp117_ = _data_->dupe_video;
#line 864 "/home/jens/Source/shotwell/src/BatchImport.vala"
						media_source_mark_online (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp117_, TYPE_MEDIA_SOURCE, MediaSource));
#line 866 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_g_object_unref0 (_data_->duplicated_file);
#line 866 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->duplicated_file = NULL;
#line 868 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp118_ = NULL;
#line 868 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp118_ = _data_->self->priv->manifest;
#line 868 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp119_ = NULL;
#line 868 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp119_ = _data_->_tmp118_->imported;
#line 868 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp120_ = NULL;
#line 868 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp120_ = _data_->dupe_video;
#line 868 "/home/jens/Source/shotwell/src/BatchImport.vala"
						gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp119_, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp120_, TYPE_MEDIA_SOURCE, MediaSource));
#line 869 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp121_ = NULL;
#line 869 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp121_ = _data_->dupe_video;
#line 869 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp122_ = 0ULL;
#line 869 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp122_ = media_source_get_filesize (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp121_, TYPE_MEDIA_SOURCE, MediaSource));
#line 869 "/home/jens/Source/shotwell/src/BatchImport.vala"
						batch_import_report_progress (_data_->self, _data_->_tmp122_);
#line 870 "/home/jens/Source/shotwell/src/BatchImport.vala"
						batch_import_file_import_complete (_data_->self);
#line 872 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->result_code = IMPORT_RESULT_SUCCESS;
#line 7649 "BatchImport.c"
					}
#line 853 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_object_unref0 (_data_->dupe_video);
#line 7653 "BatchImport.c"
				}
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp123_ = NULL;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp123_ = _data_->prepared_file;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp124_ = NULL;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp124_ = _data_->_tmp123_->job;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp125_ = NULL;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp125_ = _data_->prepared_file;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp126_ = NULL;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp126_ = _data_->_tmp125_->file;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp127_ = NULL;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp127_ = _data_->prepared_file;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp128_ = NULL;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp128_ = _data_->_tmp127_->file;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp129_ = NULL;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp129_ = g_file_get_path (_data_->_tmp128_);
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp130_ = NULL;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp130_ = _data_->_tmp129_;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp131_ = NULL;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp131_ = _data_->prepared_file;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp132_ = NULL;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp132_ = _data_->_tmp131_->file;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp133_ = NULL;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp133_ = g_file_get_path (_data_->_tmp132_);
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp134_ = NULL;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp134_ = _data_->_tmp133_;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp135_ = NULL;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp135_ = _data_->duplicated_file;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp136_ = 0;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp136_ = _data_->result_code;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp137_ = NULL;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp137_ = batch_import_result_new (_data_->_tmp124_, _data_->_tmp126_, _data_->_tmp130_, _data_->_tmp134_, _data_->_tmp135_, _data_->_tmp136_);
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_batch_import_result_unref0 (_data_->import_result);
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->import_result = _data_->_tmp137_;
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_data_->_tmp134_);
#line 876 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_data_->_tmp130_);
#line 880 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp138_ = 0;
#line 880 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp138_ = _data_->result_code;
#line 880 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (_data_->_tmp138_ == IMPORT_RESULT_SUCCESS) {
#line 881 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp139_ = NULL;
#line 881 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp139_ = _data_->self->priv->manifest;
#line 881 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp140_ = NULL;
#line 881 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp140_ = _data_->import_result;
#line 881 "/home/jens/Source/shotwell/src/BatchImport.vala"
					import_manifest_add_result (_data_->_tmp139_, _data_->_tmp140_);
#line 883 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_object_unref0 (_data_->duplicated_file);
#line 883 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->duplicate_ids = (g_free (_data_->duplicate_ids), NULL);
#line 883 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_object_unref0 (_data_->video);
#line 883 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_object_unref0 (_data_->photo);
#line 883 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_batch_import_result_unref0 (_data_->import_result);
#line 883 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_prepared_file_unref0 (_data_->prepared_file);
#line 883 "/home/jens/Source/shotwell/src/BatchImport.vala"
					continue;
#line 7753 "BatchImport.c"
				}
#line 843 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_data_->duplicated_file);
#line 843 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->duplicate_ids = (g_free (_data_->duplicate_ids), NULL);
#line 7759 "BatchImport.c"
			}
#line 887 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp141_ = NULL;
#line 887 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp141_ = _data_->prepared_file;
#line 887 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp142_ = NULL;
#line 887 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp142_ = batch_import_get_in_current_import (_data_->self, _data_->_tmp141_);
#line 887 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp143_ = NULL;
#line 887 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp143_ = _data_->_tmp142_;
#line 887 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp144_ = FALSE;
#line 887 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp144_ = _data_->_tmp143_ != NULL;
#line 887 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (_data_->_tmp143_);
#line 887 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_data_->_tmp144_) {
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp145_ = NULL;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp145_ = _data_->prepared_file;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp146_ = NULL;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp146_ = _data_->_tmp145_->job;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp147_ = NULL;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp147_ = _data_->prepared_file;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp148_ = NULL;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp148_ = _data_->_tmp147_->file;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp149_ = NULL;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp149_ = _data_->prepared_file;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp150_ = NULL;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp150_ = _data_->_tmp149_->file;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp151_ = NULL;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp151_ = g_file_get_path (_data_->_tmp150_);
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp152_ = NULL;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp152_ = _data_->_tmp151_;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp153_ = NULL;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp153_ = _data_->prepared_file;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp154_ = NULL;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp154_ = _data_->_tmp153_->file;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp155_ = NULL;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp155_ = g_file_get_path (_data_->_tmp154_);
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp156_ = NULL;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp156_ = _data_->_tmp155_;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp157_ = NULL;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp157_ = _data_->prepared_file;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp158_ = NULL;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp158_ = batch_import_get_in_current_import (_data_->self, _data_->_tmp157_);
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp159_ = NULL;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp159_ = _data_->_tmp158_;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp160_ = NULL;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp160_ = duplicated_file_create_from_file (_data_->_tmp159_);
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp161_ = NULL;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp161_ = _data_->_tmp160_;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp162_ = NULL;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp162_ = batch_import_result_new (_data_->_tmp146_, _data_->_tmp148_, _data_->_tmp152_, _data_->_tmp156_, _data_->_tmp161_, IMPORT_RESULT_PHOTO_EXISTS);
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_batch_import_result_unref0 (_data_->import_result);
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->import_result = _data_->_tmp162_;
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_data_->_tmp161_);
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_data_->_tmp159_);
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_data_->_tmp156_);
#line 890 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_data_->_tmp152_);
#line 7865 "BatchImport.c"
			} else {
#line 894 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp163_ = NULL;
#line 894 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp163_ = _data_->prepared_file;
#line 894 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp164_ = NULL;
#line 894 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp164_ = _data_->_tmp163_->file;
#line 894 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp165_ = NULL;
#line 894 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp165_ = _data_->prepared_file;
#line 894 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp166_ = NULL;
#line 894 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp166_ = _data_->_tmp165_->full_md5;
#line 894 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp167_ = NULL;
#line 894 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp167_ = _data_->prepared_file;
#line 894 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp168_ = 0;
#line 894 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp168_ = _data_->_tmp167_->file_format;
#line 894 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp169_ = FALSE;
#line 894 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp169_ = photo_is_duplicate (_data_->_tmp164_, NULL, _data_->_tmp166_, _data_->_tmp168_);
#line 894 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (_data_->_tmp169_) {
#line 896 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp170_ = FALSE;
#line 896 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp170_ = _data_->self->priv->untrash_duplicates;
#line 896 "/home/jens/Source/shotwell/src/BatchImport.vala"
					if (_data_->_tmp170_) {
#line 899 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp171_ = NULL;
#line 899 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp171_ = library_photo_global;
#line 899 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp172_ = NULL;
#line 899 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp172_ = _data_->prepared_file;
#line 899 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp173_ = NULL;
#line 899 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp173_ = _data_->_tmp172_->file;
#line 899 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp174_ = NULL;
#line 899 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp174_ = library_photo_source_collection_get_trashed_by_file (_data_->_tmp171_, _data_->_tmp173_);
#line 899 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_g_object_unref0 (_data_->photo);
#line 899 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->photo = _data_->_tmp174_;
#line 901 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp176_ = NULL;
#line 901 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp176_ = _data_->photo;
#line 901 "/home/jens/Source/shotwell/src/BatchImport.vala"
						if (_data_->_tmp176_ == NULL) {
#line 901 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp177_ = NULL;
#line 901 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp177_ = _data_->prepared_file;
#line 901 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp178_ = NULL;
#line 901 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp178_ = _data_->_tmp177_->full_md5;
#line 901 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp175_ = _data_->_tmp178_ != NULL;
#line 7939 "BatchImport.c"
						} else {
#line 901 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp175_ = FALSE;
#line 7943 "BatchImport.c"
						}
#line 901 "/home/jens/Source/shotwell/src/BatchImport.vala"
						if (_data_->_tmp175_) {
#line 902 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp179_ = NULL;
#line 902 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp179_ = library_photo_global;
#line 902 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp180_ = NULL;
#line 902 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp180_ = _data_->prepared_file;
#line 902 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp181_ = NULL;
#line 902 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp181_ = _data_->_tmp180_->full_md5;
#line 902 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp182_ = NULL;
#line 902 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp182_ = library_photo_source_collection_get_trashed_by_md5 (_data_->_tmp179_, _data_->_tmp181_);
#line 902 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_g_object_unref0 (_data_->photo);
#line 902 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->photo = _data_->_tmp182_;
#line 7967 "BatchImport.c"
						}
#line 904 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp183_ = NULL;
#line 904 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp183_ = _data_->photo;
#line 904 "/home/jens/Source/shotwell/src/BatchImport.vala"
						if (_data_->_tmp183_ != NULL) {
#line 905 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp184_ = NULL;
#line 905 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp184_ = _data_->prepared_file;
#line 905 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp185_ = NULL;
#line 905 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp185_ = _data_->_tmp184_->file;
#line 905 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp186_ = NULL;
#line 905 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp186_ = g_file_get_path (_data_->_tmp185_);
#line 905 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp187_ = NULL;
#line 905 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp187_ = _data_->_tmp186_;
#line 905 "/home/jens/Source/shotwell/src/BatchImport.vala"
							g_debug ("BatchImport.vala:905: duplicate linked photo found in trash, untrashin" \
"g and removing transforms for %s", _data_->_tmp187_);
#line 905 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_g_free0 (_data_->_tmp187_);
#line 908 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp188_ = NULL;
#line 908 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp188_ = _data_->photo;
#line 908 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp189_ = NULL;
#line 908 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp189_ = _data_->prepared_file;
#line 908 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp190_ = NULL;
#line 908 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp190_ = _data_->_tmp189_->file;
#line 908 "/home/jens/Source/shotwell/src/BatchImport.vala"
							monitorable_set_master_file (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp188_, TYPE_MONITORABLE, Monitorable), _data_->_tmp190_);
#line 909 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp191_ = NULL;
#line 909 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp191_ = _data_->photo;
#line 909 "/home/jens/Source/shotwell/src/BatchImport.vala"
							media_source_untrash (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp191_, TYPE_MEDIA_SOURCE, MediaSource));
#line 910 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp192_ = NULL;
#line 910 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp192_ = _data_->photo;
#line 910 "/home/jens/Source/shotwell/src/BatchImport.vala"
							photo_remove_all_transformations (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp192_, TYPE_PHOTO, Photo));
#line 8021 "BatchImport.c"
						}
					}
#line 914 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp194_ = NULL;
#line 914 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp194_ = _data_->photo;
#line 914 "/home/jens/Source/shotwell/src/BatchImport.vala"
					if (_data_->_tmp194_ == NULL) {
#line 914 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp195_ = FALSE;
#line 914 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp195_ = _data_->self->priv->mark_duplicates_online;
#line 914 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp193_ = _data_->_tmp195_;
#line 8036 "BatchImport.c"
					} else {
#line 914 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp193_ = FALSE;
#line 8040 "BatchImport.c"
					}
#line 914 "/home/jens/Source/shotwell/src/BatchImport.vala"
					if (_data_->_tmp193_) {
#line 916 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp196_ = NULL;
#line 916 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp196_ = library_photo_global;
#line 916 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp197_ = NULL;
#line 916 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp197_ = _data_->prepared_file;
#line 916 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp198_ = NULL;
#line 916 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp198_ = _data_->_tmp197_->file;
#line 916 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp199_ = NULL;
#line 916 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp199_ = library_photo_source_collection_get_offline_by_file (_data_->_tmp196_, _data_->_tmp198_);
#line 916 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_g_object_unref0 (_data_->photo);
#line 916 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->photo = _data_->_tmp199_;
#line 918 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp201_ = NULL;
#line 918 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp201_ = _data_->photo;
#line 918 "/home/jens/Source/shotwell/src/BatchImport.vala"
						if (_data_->_tmp201_ == NULL) {
#line 918 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp202_ = NULL;
#line 918 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp202_ = _data_->prepared_file;
#line 918 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp203_ = NULL;
#line 918 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp203_ = _data_->_tmp202_->full_md5;
#line 918 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp200_ = _data_->_tmp203_ != NULL;
#line 8080 "BatchImport.c"
						} else {
#line 918 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp200_ = FALSE;
#line 8084 "BatchImport.c"
						}
#line 918 "/home/jens/Source/shotwell/src/BatchImport.vala"
						if (_data_->_tmp200_) {
#line 919 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp204_ = NULL;
#line 919 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp204_ = library_photo_global;
#line 919 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp205_ = NULL;
#line 919 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp205_ = _data_->prepared_file;
#line 919 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp206_ = NULL;
#line 919 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp206_ = _data_->_tmp205_->full_md5;
#line 919 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp207_ = NULL;
#line 919 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp207_ = library_photo_source_collection_get_offline_by_md5 (_data_->_tmp204_, _data_->_tmp206_);
#line 919 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_g_object_unref0 (_data_->photo);
#line 919 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->photo = _data_->_tmp207_;
#line 8108 "BatchImport.c"
						}
#line 921 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp208_ = NULL;
#line 921 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp208_ = _data_->photo;
#line 921 "/home/jens/Source/shotwell/src/BatchImport.vala"
						if (_data_->_tmp208_ != NULL) {
#line 922 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp209_ = NULL;
#line 922 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp209_ = _data_->prepared_file;
#line 922 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp210_ = NULL;
#line 922 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp210_ = _data_->_tmp209_->file;
#line 922 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp211_ = NULL;
#line 922 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp211_ = g_file_get_path (_data_->_tmp210_);
#line 922 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp212_ = NULL;
#line 922 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp212_ = _data_->_tmp211_;
#line 922 "/home/jens/Source/shotwell/src/BatchImport.vala"
							g_debug ("BatchImport.vala:922: duplicate photo found marked offline, marking on" \
"line: %s", _data_->_tmp212_);
#line 922 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_g_free0 (_data_->_tmp212_);
#line 925 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp213_ = NULL;
#line 925 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp213_ = _data_->photo;
#line 925 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp214_ = NULL;
#line 925 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp214_ = _data_->prepared_file;
#line 925 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp215_ = NULL;
#line 925 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp215_ = _data_->_tmp214_->file;
#line 925 "/home/jens/Source/shotwell/src/BatchImport.vala"
							monitorable_set_master_file (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp213_, TYPE_MONITORABLE, Monitorable), _data_->_tmp215_);
#line 926 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp216_ = NULL;
#line 926 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_data_->_tmp216_ = _data_->photo;
#line 926 "/home/jens/Source/shotwell/src/BatchImport.vala"
							media_source_mark_online (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp216_, TYPE_MEDIA_SOURCE, MediaSource));
#line 8156 "BatchImport.c"
						}
					}
#line 930 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp217_ = NULL;
#line 930 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp217_ = _data_->photo;
#line 930 "/home/jens/Source/shotwell/src/BatchImport.vala"
					if (_data_->_tmp217_ != NULL) {
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp218_ = NULL;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp218_ = _data_->prepared_file;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp219_ = NULL;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp219_ = _data_->_tmp218_->job;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp220_ = NULL;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp220_ = _data_->prepared_file;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp221_ = NULL;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp221_ = _data_->_tmp220_->file;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp222_ = NULL;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp222_ = _data_->prepared_file;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp223_ = NULL;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp223_ = _data_->_tmp222_->file;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp224_ = NULL;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp224_ = g_file_get_path (_data_->_tmp223_);
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp225_ = NULL;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp225_ = _data_->_tmp224_;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp226_ = NULL;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp226_ = _data_->prepared_file;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp227_ = NULL;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp227_ = _data_->_tmp226_->file;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp228_ = NULL;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp228_ = g_file_get_path (_data_->_tmp227_);
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp229_ = NULL;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp229_ = _data_->_tmp228_;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp230_ = NULL;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp230_ = batch_import_result_new (_data_->_tmp219_, _data_->_tmp221_, _data_->_tmp225_, _data_->_tmp229_, NULL, IMPORT_RESULT_SUCCESS);
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_batch_import_result_unref0 (_data_->import_result);
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->import_result = _data_->_tmp230_;
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_g_free0 (_data_->_tmp229_);
#line 931 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_g_free0 (_data_->_tmp225_);
#line 935 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp231_ = NULL;
#line 935 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp231_ = _data_->self->priv->manifest;
#line 935 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp232_ = NULL;
#line 935 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp232_ = _data_->_tmp231_->imported;
#line 935 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp233_ = NULL;
#line 935 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp233_ = _data_->photo;
#line 935 "/home/jens/Source/shotwell/src/BatchImport.vala"
						gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp232_, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp233_, TYPE_MEDIA_SOURCE, MediaSource));
#line 936 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp234_ = NULL;
#line 936 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp234_ = _data_->self->priv->manifest;
#line 936 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp235_ = NULL;
#line 936 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp235_ = _data_->import_result;
#line 936 "/home/jens/Source/shotwell/src/BatchImport.vala"
						import_manifest_add_result (_data_->_tmp234_, _data_->_tmp235_);
#line 938 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp236_ = NULL;
#line 938 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp236_ = _data_->photo;
#line 938 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp237_ = 0ULL;
#line 938 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_data_->_tmp237_ = media_source_get_filesize (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp236_, TYPE_MEDIA_SOURCE, MediaSource));
#line 938 "/home/jens/Source/shotwell/src/BatchImport.vala"
						batch_import_report_progress (_data_->self, _data_->_tmp237_);
#line 939 "/home/jens/Source/shotwell/src/BatchImport.vala"
						batch_import_file_import_complete (_data_->self);
#line 941 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_g_object_unref0 (_data_->video);
#line 941 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_g_object_unref0 (_data_->photo);
#line 941 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_batch_import_result_unref0 (_data_->import_result);
#line 941 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_prepared_file_unref0 (_data_->prepared_file);
#line 941 "/home/jens/Source/shotwell/src/BatchImport.vala"
						continue;
#line 8271 "BatchImport.c"
					}
#line 944 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp238_ = NULL;
#line 944 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp238_ = _data_->prepared_file;
#line 944 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp239_ = NULL;
#line 944 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp239_ = _data_->_tmp238_->file;
#line 944 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp240_ = NULL;
#line 944 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp240_ = g_file_get_path (_data_->_tmp239_);
#line 944 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp241_ = NULL;
#line 944 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp241_ = _data_->_tmp240_;
#line 944 "/home/jens/Source/shotwell/src/BatchImport.vala"
					g_debug ("BatchImport.vala:944: duplicate photo detected, not importing %s", _data_->_tmp241_);
#line 944 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_free0 (_data_->_tmp241_);
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp242_ = NULL;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp242_ = photo_table_get_instance ();
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp243_ = NULL;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp243_ = _data_->_tmp242_;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp244_ = NULL;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp244_ = _data_->prepared_file;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp245_ = NULL;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp245_ = _data_->_tmp244_->file;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp246_ = NULL;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp246_ = _data_->prepared_file;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp247_ = NULL;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp247_ = _data_->_tmp246_->full_md5;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp248_ = NULL;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp248_ = _data_->prepared_file;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp249_ = 0;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp249_ = _data_->_tmp248_->file_format;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp250_ = 0;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp251_ = NULL;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp251_ = photo_table_get_duplicate_ids (_data_->_tmp243_, _data_->_tmp245_, NULL, _data_->_tmp247_, _data_->_tmp249_, &_data_->_tmp250_);
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp252_ = NULL;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp252__length1 = 0;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp252_ = _data_->_tmp251_;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp252__length1 = _data_->_tmp250_;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_database_table_unref0 (_data_->_tmp243_);
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->photo_ids_length1 = 0;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_photo_ids_size_ = 0;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->photo_ids = _data_->_tmp252_;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->photo_ids_length1 = _data_->_tmp252__length1;
#line 946 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_photo_ids_size_ = _data_->photo_ids_length1;
#line 949 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp253_ = NULL;
#line 949 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp253__length1 = 0;
#line 949 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp253_ = _data_->photo_ids;
#line 949 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp253__length1 = _data_->photo_ids_length1;
#line 949 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_vala_assert (_data_->_tmp253__length1 > 0, "photo_ids.length > 0");
#line 951 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp254_ = NULL;
#line 951 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp254__length1 = 0;
#line 951 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp254_ = _data_->photo_ids;
#line 951 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp254__length1 = _data_->photo_ids_length1;
#line 951 "/home/jens/Source/shotwell/src/BatchImport.vala"
					memset (&_data_->_tmp255_, 0, sizeof (PhotoID));
#line 951 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp255_ = _data_->_tmp254_[0];
#line 951 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp256_ = NULL;
#line 951 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp256_ = duplicated_file_create_from_photo_id (&_data_->_tmp255_);
#line 951 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_vala1_duplicated_file = _data_->_tmp256_;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp257_ = NULL;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp257_ = _data_->prepared_file;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp258_ = NULL;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp258_ = _data_->_tmp257_->job;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp259_ = NULL;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp259_ = _data_->prepared_file;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp260_ = NULL;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp260_ = _data_->_tmp259_->file;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp261_ = NULL;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp261_ = _data_->prepared_file;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp262_ = NULL;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp262_ = _data_->_tmp261_->file;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp263_ = NULL;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp263_ = g_file_get_path (_data_->_tmp262_);
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp264_ = NULL;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp264_ = _data_->_tmp263_;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp265_ = NULL;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp265_ = _data_->prepared_file;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp266_ = NULL;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp266_ = _data_->_tmp265_->file;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp267_ = NULL;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp267_ = g_file_get_path (_data_->_tmp266_);
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp268_ = NULL;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp268_ = _data_->_tmp267_;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp269_ = NULL;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp269_ = _data_->_vala1_duplicated_file;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp270_ = NULL;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->_tmp270_ = batch_import_result_new (_data_->_tmp258_, _data_->_tmp260_, _data_->_tmp264_, _data_->_tmp268_, _data_->_tmp269_, IMPORT_RESULT_PHOTO_EXISTS);
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_batch_import_result_unref0 (_data_->import_result);
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->import_result = _data_->_tmp270_;
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_free0 (_data_->_tmp268_);
#line 953 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_free0 (_data_->_tmp264_);
#line 894 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_object_unref0 (_data_->_vala1_duplicated_file);
#line 894 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_data_->photo_ids = (g_free (_data_->photo_ids), NULL);
#line 8447 "BatchImport.c"
				}
			}
#line 958 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp271_ = NULL;
#line 958 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp271_ = _data_->import_result;
#line 958 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_data_->_tmp271_ != NULL) {
#line 959 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp272_ = NULL;
#line 959 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_data_->_tmp272_ = _data_->import_result;
#line 959 "/home/jens/Source/shotwell/src/BatchImport.vala"
				batch_import_report_failure (_data_->self, _data_->_tmp272_);
#line 960 "/home/jens/Source/shotwell/src/BatchImport.vala"
				batch_import_file_import_complete (_data_->self);
#line 962 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_data_->video);
#line 962 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_data_->photo);
#line 962 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_batch_import_result_unref0 (_data_->import_result);
#line 962 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_prepared_file_unref0 (_data_->prepared_file);
#line 962 "/home/jens/Source/shotwell/src/BatchImport.vala"
				continue;
#line 8474 "BatchImport.c"
			}
#line 965 "/home/jens/Source/shotwell/src/BatchImport.vala"
			batch_import_report_progress (_data_->self, (guint64) 0);
#line 966 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp273_ = NULL;
#line 966 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp273_ = _data_->self->priv->ready_files;
#line 966 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp274_ = NULL;
#line 966 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_data_->_tmp274_ = _data_->prepared_file;
#line 966 "/home/jens/Source/shotwell/src/BatchImport.vala"
			gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp273_, GEE_TYPE_COLLECTION, GeeCollection), _data_->_tmp274_);
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (_data_->video);
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (_data_->photo);
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_batch_import_result_unref0 (_data_->import_result);
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_prepared_file_unref0 (_data_->prepared_file);
#line 8496 "BatchImport.c"
		}
#line 768 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_data_->_prepared_file_list);
#line 8500 "BatchImport.c"
	}
#line 969 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_flush_import_jobs (_data_->self);
#line 767 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_data_->_state_ == 0) {
#line 767 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 8508 "BatchImport.c"
	} else {
#line 767 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 8512 "BatchImport.c"
	}
#line 767 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_object_unref (_data_->_async_result);
#line 767 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return FALSE;
#line 8518 "BatchImport.c"
}


static void batch_import_done_preparing_files (BatchImport* self, BackgroundJob* j, const gchar* caller) {
	gboolean _tmp0_ = FALSE;
	PrepareFilesJob* prepare_files_job = NULL;
	BackgroundJob* _tmp1_ = NULL;
	PrepareFilesJob* _tmp2_ = NULL;
	PrepareFilesJob* _tmp3_ = NULL;
	PrepareFilesJob* _tmp4_ = NULL;
	gint _tmp5_ = 0;
	gint _tmp6_ = 0;
	gint _tmp7_ = 0;
	const gchar* _tmp8_ = NULL;
	gboolean _tmp9_ = FALSE;
	gint _tmp10_ = 0;
#line 972 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT (self));
#line 972 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BACKGROUND_JOB (j));
#line 972 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (caller != NULL);
#line 973 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->completed;
#line 973 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_assert (!_tmp0_, "!completed");
#line 975 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = j;
#line 975 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = _background_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PREPARE_FILES_JOB, PrepareFilesJob));
#line 975 "/home/jens/Source/shotwell/src/BatchImport.vala"
	prepare_files_job = _tmp2_;
#line 977 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = prepare_files_job;
#line 977 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_report_failures (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_BACKGROUND_IMPORT_JOB, BackgroundImportJob));
#line 980 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = prepare_files_job;
#line 980 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = _tmp4_->prepared_files;
#line 980 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->file_imports_to_perform = _tmp5_;
#line 981 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = self->priv->file_imports_to_perform;
#line 981 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp7_ = self->priv->file_imports_completed;
#line 981 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_assert (_tmp6_ >= _tmp7_, "file_imports_to_perform >= file_imports_completed");
#line 983 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp8_ = caller;
#line 983 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_log_status (self, _tmp8_);
#line 986 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_flush_import_jobs (self);
#line 990 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp10_ = self->priv->file_imports_to_perform;
#line 990 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp10_ == 0) {
#line 8577 "BatchImport.c"
		gboolean _tmp11_ = FALSE;
#line 990 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp11_ = self->priv->completed;
#line 990 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp9_ = !_tmp11_;
#line 8583 "BatchImport.c"
	} else {
#line 990 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp9_ = FALSE;
#line 8587 "BatchImport.c"
	}
#line 990 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp9_) {
#line 991 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_report_completed (self, "no files prepared for import");
#line 8593 "BatchImport.c"
	} else {
		gboolean _tmp12_ = FALSE;
		gint _tmp13_ = 0;
		gint _tmp14_ = 0;
#line 992 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp13_ = self->priv->file_imports_completed;
#line 992 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp14_ = self->priv->file_imports_to_perform;
#line 992 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp13_ == _tmp14_) {
#line 8604 "BatchImport.c"
			gboolean _tmp15_ = FALSE;
#line 992 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp15_ = self->priv->completed;
#line 992 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp12_ = !_tmp15_;
#line 8610 "BatchImport.c"
		} else {
#line 992 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp12_ = FALSE;
#line 8614 "BatchImport.c"
		}
#line 992 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp12_) {
#line 993 "/home/jens/Source/shotwell/src/BatchImport.vala"
			batch_import_report_completed (self, "completed preparing files, all outstanding imports completed");
#line 8620 "BatchImport.c"
		}
	}
#line 972 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_background_job_unref0 (prepare_files_job);
#line 8625 "BatchImport.c"
}


static void batch_import_on_files_prepared (BatchImport* self, BackgroundJob* j) {
	BackgroundJob* _tmp0_ = NULL;
#line 996 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT (self));
#line 996 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BACKGROUND_JOB (j));
#line 997 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = j;
#line 997 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_done_preparing_files (self, _tmp0_, "on_files_prepared");
#line 8639 "BatchImport.c"
}


static void batch_import_on_file_prepare_cancelled (BatchImport* self, BackgroundJob* j) {
	BackgroundJob* _tmp0_ = NULL;
#line 1000 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT (self));
#line 1000 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BACKGROUND_JOB (j));
#line 1001 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = j;
#line 1001 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_done_preparing_files (self, _tmp0_, "on_file_prepare_cancelled");
#line 8653 "BatchImport.c"
}


static void batch_import_on_import_files_completed (BatchImport* self, BackgroundJob* j) {
	gboolean _tmp0_ = FALSE;
	PreparedFileImportJob* job = NULL;
	BackgroundJob* _tmp1_ = NULL;
	PreparedFileImportJob* _tmp2_ = NULL;
	PreparedFileImportJob* _tmp3_ = NULL;
	PreparedFile* _tmp4_ = NULL;
	PreparedFileImportJob* _tmp5_ = NULL;
	BatchImportResult* _tmp6_ = NULL;
	PreparedFileImportJob* _tmp12_ = NULL;
	ReadyForImport* _tmp13_ = NULL;
	GError * _inner_error_ = NULL;
#line 1008 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT (self));
#line 1008 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BACKGROUND_JOB (j));
#line 1009 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->completed;
#line 1009 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_assert (!_tmp0_, "!completed");
#line 1011 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = j;
#line 1011 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = _background_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PREPARED_FILE_IMPORT_JOB, PreparedFileImportJob));
#line 1011 "/home/jens/Source/shotwell/src/BatchImport.vala"
	job = _tmp2_;
#line 1013 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_log_status (self, "on_import_files_completed");
#line 1016 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = job;
#line 1016 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = _tmp3_->not_ready;
#line 1016 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_assert (_tmp4_ == NULL, "job.not_ready == null");
#line 1019 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = job;
#line 1019 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = _tmp5_->failed;
#line 1019 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp6_ != NULL) {
#line 8697 "BatchImport.c"
		PreparedFileImportJob* _tmp7_ = NULL;
		BatchImportResult* _tmp8_ = NULL;
		ImportResult _tmp9_ = 0;
		PreparedFileImportJob* _tmp10_ = NULL;
		BatchImportResult* _tmp11_ = NULL;
#line 1020 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp7_ = job;
#line 1020 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp8_ = _tmp7_->failed;
#line 1020 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp9_ = _tmp8_->result;
#line 1020 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_vala_assert (_tmp9_ != IMPORT_RESULT_SUCCESS, "job.failed.result != ImportResult.SUCCESS");
#line 1022 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp10_ = job;
#line 1022 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp11_ = _tmp10_->failed;
#line 1022 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_report_failure (self, _tmp11_);
#line 1023 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_file_import_complete (self);
#line 8719 "BatchImport.c"
	}
#line 1028 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp12_ = job;
#line 1028 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp13_ = _tmp12_->ready;
#line 1028 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp13_ != NULL) {
#line 8727 "BatchImport.c"
		PreparedFileImportJob* _tmp14_ = NULL;
		ReadyForImport* _tmp15_ = NULL;
		BatchImportResult* _tmp16_ = NULL;
		ImportResult _tmp17_ = 0;
		Tombstone* tombstone = NULL;
		TombstoneSourceCollection* _tmp18_ = NULL;
		PreparedFileImportJob* _tmp19_ = NULL;
		ReadyForImport* _tmp20_ = NULL;
		GFile* _tmp21_ = NULL;
		Tombstone* _tmp22_ = NULL;
		Tombstone* _tmp23_ = NULL;
		MediaSource* source = NULL;
		PreparedFileImportJob* _tmp26_ = NULL;
		ReadyForImport* _tmp27_ = NULL;
		gboolean _tmp28_ = FALSE;
		PreparedFileImportJob* _tmp87_ = NULL;
		ReadyForImport* _tmp88_ = NULL;
		BatchImportResult* _tmp89_ = NULL;
		ImportResult _tmp90_ = 0;
#line 1029 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp14_ = job;
#line 1029 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp15_ = _tmp14_->ready;
#line 1029 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp16_ = _tmp15_->batch_result;
#line 1029 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp17_ = _tmp16_->result;
#line 1029 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_vala_assert (_tmp17_ == IMPORT_RESULT_SUCCESS, "job.ready.batch_result.result == ImportResult.SUCCESS");
#line 1031 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp18_ = tombstone_global;
#line 1031 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp19_ = job;
#line 1031 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp20_ = _tmp19_->ready;
#line 1031 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp21_ = _tmp20_->final_file;
#line 1031 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp22_ = tombstone_source_collection_locate (_tmp18_, _tmp21_);
#line 1031 "/home/jens/Source/shotwell/src/BatchImport.vala"
		tombstone = _tmp22_;
#line 1032 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp23_ = tombstone;
#line 1032 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp23_ != NULL) {
#line 8773 "BatchImport.c"
			TombstoneSourceCollection* _tmp24_ = NULL;
			Tombstone* _tmp25_ = NULL;
#line 1033 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp24_ = tombstone_global;
#line 1033 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp25_ = tombstone;
#line 1033 "/home/jens/Source/shotwell/src/BatchImport.vala"
			tombstone_source_collection_resurrect (_tmp24_, _tmp25_);
#line 8782 "BatchImport.c"
		}
#line 1036 "/home/jens/Source/shotwell/src/BatchImport.vala"
		source = NULL;
#line 1037 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp26_ = job;
#line 1037 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp27_ = _tmp26_->ready;
#line 1037 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp28_ = _tmp27_->is_video;
#line 1037 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp28_) {
#line 8794 "BatchImport.c"
			PreparedFileImportJob* _tmp29_ = NULL;
			ReadyForImport* _tmp30_ = NULL;
			BatchImportResult* _tmp31_ = NULL;
			PreparedFileImportJob* _tmp32_ = NULL;
			ReadyForImport* _tmp33_ = NULL;
			VideoImportParams* _tmp34_ = NULL;
			Video* _tmp35_ = NULL;
			ImportResult _tmp36_ = 0;
#line 1038 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp29_ = job;
#line 1038 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp30_ = _tmp29_->ready;
#line 1038 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp31_ = _tmp30_->batch_result;
#line 1038 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp32_ = job;
#line 1038 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp33_ = _tmp32_->ready;
#line 1038 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp34_ = _tmp33_->video_import_params;
#line 1038 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp36_ = video_import_create (_tmp34_, &_tmp35_);
#line 1038 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (source);
#line 1038 "/home/jens/Source/shotwell/src/BatchImport.vala"
			source = G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, TYPE_MEDIA_SOURCE, MediaSource);
#line 1038 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp31_->result = _tmp36_;
#line 8823 "BatchImport.c"
		} else {
			PreparedFileImportJob* _tmp37_ = NULL;
			ReadyForImport* _tmp38_ = NULL;
			BatchImportResult* _tmp39_ = NULL;
			PreparedFileImportJob* _tmp40_ = NULL;
			ReadyForImport* _tmp41_ = NULL;
			PhotoImportParams* _tmp42_ = NULL;
			LibraryPhoto* _tmp43_ = NULL;
			ImportResult _tmp44_ = 0;
			Photo* photo = NULL;
			MediaSource* _tmp45_ = NULL;
			Photo* _tmp46_ = NULL;
			PreparedFileImportJob* _tmp47_ = NULL;
			ReadyForImport* _tmp48_ = NULL;
			PhotoImportParams* _tmp49_ = NULL;
			GFile* _tmp50_ = NULL;
			Photo* _tmp72_ = NULL;
			PhotoFileFormat _tmp73_ = 0;
#line 1041 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp37_ = job;
#line 1041 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp38_ = _tmp37_->ready;
#line 1041 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp39_ = _tmp38_->batch_result;
#line 1041 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp40_ = job;
#line 1041 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp41_ = _tmp40_->ready;
#line 1041 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp42_ = _tmp41_->photo_import_params;
#line 1041 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp44_ = library_photo_import_create (_tmp42_, &_tmp43_);
#line 1041 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (source);
#line 1041 "/home/jens/Source/shotwell/src/BatchImport.vala"
			source = G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, TYPE_MEDIA_SOURCE, MediaSource);
#line 1041 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp39_->result = _tmp44_;
#line 1043 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp45_ = source;
#line 1043 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp46_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp45_, TYPE_PHOTO) ? ((Photo*) _tmp45_) : NULL);
#line 1043 "/home/jens/Source/shotwell/src/BatchImport.vala"
			photo = _tmp46_;
#line 1045 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp47_ = job;
#line 1045 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp48_ = _tmp47_->ready;
#line 1045 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp49_ = _tmp48_->photo_import_params;
#line 1045 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp50_ = _tmp49_->final_associated_file;
#line 1045 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp50_ != NULL) {
#line 8878 "BatchImport.c"
				BackingPhotoRow* bpr = NULL;
				BackingPhotoRow* _tmp51_ = NULL;
				BackingPhotoRow* _tmp52_ = NULL;
				BackingPhotoRow* _tmp53_ = NULL;
				PreparedFileImportJob* _tmp54_ = NULL;
				ReadyForImport* _tmp55_ = NULL;
				PhotoImportParams* _tmp56_ = NULL;
				GFile* _tmp57_ = NULL;
				gchar* _tmp58_ = NULL;
				MediaSource* _tmp59_ = NULL;
				GFile* _tmp60_ = NULL;
				GFile* _tmp61_ = NULL;
				gchar* _tmp62_ = NULL;
				gchar* _tmp63_ = NULL;
				BackingPhotoRow* _tmp64_ = NULL;
				const gchar* _tmp65_ = NULL;
#line 1047 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp51_ = backing_photo_row_new ();
#line 1047 "/home/jens/Source/shotwell/src/BatchImport.vala"
				bpr = _tmp51_;
#line 1048 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp52_ = bpr;
#line 1048 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp52_->file_format = PHOTO_FILE_FORMAT_JFIF;
#line 1049 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp53_ = bpr;
#line 1049 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp54_ = job;
#line 1049 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp55_ = _tmp54_->ready;
#line 1049 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp56_ = _tmp55_->photo_import_params;
#line 1049 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp57_ = _tmp56_->final_associated_file;
#line 1049 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp58_ = g_file_get_path (_tmp57_);
#line 1049 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp53_->filepath);
#line 1049 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp53_->filepath = _tmp58_;
#line 1050 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp59_ = source;
#line 1050 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp60_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp59_, TYPE_PHOTO, Photo), TYPE_MEDIA_SOURCE, MediaSource));
#line 1050 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp61_ = _tmp60_;
#line 1050 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp62_ = g_file_get_path (_tmp61_);
#line 1050 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp63_ = _tmp62_;
#line 1050 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp64_ = bpr;
#line 1050 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp65_ = _tmp64_->filepath;
#line 1050 "/home/jens/Source/shotwell/src/BatchImport.vala"
				g_debug ("BatchImport.vala:1050: Associating %s with sibling %s", _tmp63_, _tmp65_);
#line 1050 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp63_);
#line 1050 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_tmp61_);
#line 8939 "BatchImport.c"
				{
					MediaSource* _tmp66_ = NULL;
					BackingPhotoRow* _tmp67_ = NULL;
#line 1053 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp66_ = source;
#line 1053 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp67_ = bpr;
#line 1053 "/home/jens/Source/shotwell/src/BatchImport.vala"
					photo_add_backing_photo_for_development (G_TYPE_CHECK_INSTANCE_CAST (_tmp66_, TYPE_PHOTO, Photo), RAW_DEVELOPER_CAMERA, _tmp67_, &_inner_error_);
#line 1053 "/home/jens/Source/shotwell/src/BatchImport.vala"
					if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 8951 "BatchImport.c"
						goto __catch414_g_error;
					}
				}
				goto __finally414;
				__catch414_g_error:
				{
					GError* e = NULL;
					BackingPhotoRow* _tmp68_ = NULL;
					const gchar* _tmp69_ = NULL;
					GError* _tmp70_ = NULL;
					const gchar* _tmp71_ = NULL;
#line 1052 "/home/jens/Source/shotwell/src/BatchImport.vala"
					e = _inner_error_;
#line 1052 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_inner_error_ = NULL;
#line 1055 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp68_ = bpr;
#line 1055 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp69_ = _tmp68_->filepath;
#line 1055 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp70_ = e;
#line 1055 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp71_ = _tmp70_->message;
#line 1055 "/home/jens/Source/shotwell/src/BatchImport.vala"
					g_warning ("BatchImport.vala:1055: Unable to associate JPEG with RAW. File: %s Err" \
"or: %s", _tmp69_, _tmp71_);
#line 1052 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_error_free0 (e);
#line 8979 "BatchImport.c"
				}
				__finally414:
#line 1052 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1052 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_backing_photo_row_unref0 (bpr);
#line 1052 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_object_unref0 (photo);
#line 1052 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_object_unref0 (source);
#line 1052 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_object_unref0 (tombstone);
#line 1052 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_background_job_unref0 (job);
#line 1052 "/home/jens/Source/shotwell/src/BatchImport.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 1052 "/home/jens/Source/shotwell/src/BatchImport.vala"
					g_clear_error (&_inner_error_);
#line 1052 "/home/jens/Source/shotwell/src/BatchImport.vala"
					return;
#line 9000 "BatchImport.c"
				}
#line 1045 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_backing_photo_row_unref0 (bpr);
#line 9004 "BatchImport.c"
			}
#line 1061 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp72_ = photo;
#line 1061 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp73_ = photo_get_master_file_format (_tmp72_);
#line 1061 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp73_ == PHOTO_FILE_FORMAT_RAW) {
#line 9012 "BatchImport.c"
				RawDeveloper d = 0;
				ConfigFacade* _tmp74_ = NULL;
				ConfigFacade* _tmp75_ = NULL;
				RawDeveloper _tmp76_ = 0;
				RawDeveloper _tmp77_ = 0;
				gboolean _tmp78_ = FALSE;
				RawDeveloper _tmp79_ = 0;
				Photo* _tmp83_ = NULL;
				RawDeveloper _tmp84_ = 0;
				Photo* _tmp85_ = NULL;
				RawDeveloper _tmp86_ = 0;
#line 1062 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp74_ = config_facade_get_instance ();
#line 1062 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp75_ = _tmp74_;
#line 1062 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp76_ = configuration_facade_get_default_raw_developer (G_TYPE_CHECK_INSTANCE_CAST (_tmp75_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
#line 1062 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp77_ = _tmp76_;
#line 1062 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_tmp75_);
#line 1062 "/home/jens/Source/shotwell/src/BatchImport.vala"
				d = _tmp77_;
#line 1063 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp79_ = d;
#line 1063 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (_tmp79_ == RAW_DEVELOPER_CAMERA) {
#line 9040 "BatchImport.c"
					Photo* _tmp80_ = NULL;
					RawDeveloper _tmp81_ = 0;
					gboolean _tmp82_ = FALSE;
#line 1063 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp80_ = photo;
#line 1063 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp81_ = d;
#line 1063 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp82_ = photo_is_raw_developer_available (_tmp80_, _tmp81_);
#line 1063 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp78_ = !_tmp82_;
#line 9052 "BatchImport.c"
				} else {
#line 1063 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp78_ = FALSE;
#line 9056 "BatchImport.c"
				}
#line 1063 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (_tmp78_) {
#line 1064 "/home/jens/Source/shotwell/src/BatchImport.vala"
					d = RAW_DEVELOPER_EMBEDDED;
#line 9062 "BatchImport.c"
				}
#line 1066 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp83_ = photo;
#line 1066 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp84_ = d;
#line 1066 "/home/jens/Source/shotwell/src/BatchImport.vala"
				photo_set_default_raw_developer (_tmp83_, _tmp84_);
#line 1067 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp85_ = photo;
#line 1067 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp86_ = d;
#line 1067 "/home/jens/Source/shotwell/src/BatchImport.vala"
				photo_set_raw_developer (_tmp85_, _tmp86_);
#line 9076 "BatchImport.c"
			}
#line 1037 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (photo);
#line 9080 "BatchImport.c"
		}
#line 1071 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp87_ = job;
#line 1071 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp88_ = _tmp87_->ready;
#line 1071 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp89_ = _tmp88_->batch_result;
#line 1071 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp90_ = _tmp89_->result;
#line 1071 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp90_ != IMPORT_RESULT_SUCCESS) {
#line 9092 "BatchImport.c"
			PreparedFileImportJob* _tmp91_ = NULL;
			ReadyForImport* _tmp92_ = NULL;
			BatchImportResult* _tmp93_ = NULL;
			ImportResult _tmp94_ = 0;
			gchar* _tmp95_ = NULL;
			gchar* _tmp96_ = NULL;
			PreparedFileImportJob* _tmp97_ = NULL;
			ReadyForImport* _tmp98_ = NULL;
			BatchImportResult* _tmp99_ = NULL;
#line 1072 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp91_ = job;
#line 1072 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp92_ = _tmp91_->ready;
#line 1072 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp93_ = _tmp92_->batch_result;
#line 1072 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp94_ = _tmp93_->result;
#line 1072 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp95_ = import_result_to_string (_tmp94_);
#line 1072 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp96_ = _tmp95_;
#line 1072 "/home/jens/Source/shotwell/src/BatchImport.vala"
			g_debug ("BatchImport.vala:1072: on_import_file_completed: %s", _tmp96_);
#line 1072 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (_tmp96_);
#line 1074 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp97_ = job;
#line 1074 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp98_ = _tmp97_->ready;
#line 1074 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp99_ = _tmp98_->batch_result;
#line 1074 "/home/jens/Source/shotwell/src/BatchImport.vala"
			batch_import_report_failure (self, _tmp99_);
#line 1075 "/home/jens/Source/shotwell/src/BatchImport.vala"
			batch_import_file_import_complete (self);
#line 9128 "BatchImport.c"
		} else {
			GeeList* _tmp100_ = NULL;
			MediaSource* _tmp101_ = NULL;
			PreparedFileImportJob* _tmp102_ = NULL;
			ReadyForImport* _tmp103_ = NULL;
			Thumbnails* _tmp104_ = NULL;
			Thumbnails* _tmp105_ = NULL;
			PreparedFileImportJob* _tmp106_ = NULL;
			ReadyForImport* _tmp107_ = NULL;
			PreparedFile* _tmp108_ = NULL;
			BatchImportJob* _tmp109_ = NULL;
			PreparedFileImportJob* _tmp110_ = NULL;
			ReadyForImport* _tmp111_ = NULL;
			BatchImportResult* _tmp112_ = NULL;
			CompletedImportObject* _tmp113_ = NULL;
			CompletedImportObject* _tmp114_ = NULL;
#line 1077 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp100_ = self->priv->ready_thumbnails;
#line 1077 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp101_ = source;
#line 1077 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp102_ = job;
#line 1077 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp103_ = _tmp102_->ready;
#line 1077 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp104_ = ready_for_import_get_thumbnails (_tmp103_);
#line 1077 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp105_ = _tmp104_;
#line 1077 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp106_ = job;
#line 1077 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp107_ = _tmp106_->ready;
#line 1077 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp108_ = _tmp107_->prepared_file;
#line 1077 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp109_ = _tmp108_->job;
#line 1077 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp110_ = job;
#line 1077 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp111_ = _tmp110_->ready;
#line 1077 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp112_ = _tmp111_->batch_result;
#line 1077 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp113_ = completed_import_object_new (_tmp101_, _tmp105_, _tmp109_, _tmp112_);
#line 1077 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp114_ = _tmp113_;
#line 1077 "/home/jens/Source/shotwell/src/BatchImport.vala"
			gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp100_, GEE_TYPE_COLLECTION, GeeCollection), _tmp114_);
#line 1077 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_completed_import_object_unref0 (_tmp114_);
#line 1077 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_thumbnails_unref0 (_tmp105_);
#line 9181 "BatchImport.c"
		}
#line 1028 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (source);
#line 1028 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (tombstone);
#line 9187 "BatchImport.c"
	}
#line 1082 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_flush_import_jobs (self);
#line 1008 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_background_job_unref0 (job);
#line 9193 "BatchImport.c"
}


static void batch_import_on_import_files_cancelled (BatchImport* self, BackgroundJob* j) {
	gboolean _tmp0_ = FALSE;
	PreparedFileImportJob* job = NULL;
	BackgroundJob* _tmp1_ = NULL;
	PreparedFileImportJob* _tmp2_ = NULL;
	PreparedFileImportJob* _tmp3_ = NULL;
	PreparedFile* _tmp4_ = NULL;
	PreparedFileImportJob* _tmp23_ = NULL;
	BatchImportResult* _tmp24_ = NULL;
	PreparedFileImportJob* _tmp27_ = NULL;
	ReadyForImport* _tmp28_ = NULL;
#line 1085 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT (self));
#line 1085 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BACKGROUND_JOB (j));
#line 1086 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->completed;
#line 1086 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_assert (!_tmp0_, "!completed");
#line 1088 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = j;
#line 1088 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = _background_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PREPARED_FILE_IMPORT_JOB, PreparedFileImportJob));
#line 1088 "/home/jens/Source/shotwell/src/BatchImport.vala"
	job = _tmp2_;
#line 1090 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_log_status (self, "on_import_files_cancelled");
#line 1092 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = job;
#line 1092 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = _tmp3_->not_ready;
#line 1092 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp4_ != NULL) {
#line 9230 "BatchImport.c"
		PreparedFileImportJob* _tmp5_ = NULL;
		PreparedFile* _tmp6_ = NULL;
		BatchImportJob* _tmp7_ = NULL;
		PreparedFileImportJob* _tmp8_ = NULL;
		PreparedFile* _tmp9_ = NULL;
		GFile* _tmp10_ = NULL;
		PreparedFileImportJob* _tmp11_ = NULL;
		PreparedFile* _tmp12_ = NULL;
		GFile* _tmp13_ = NULL;
		gchar* _tmp14_ = NULL;
		gchar* _tmp15_ = NULL;
		PreparedFileImportJob* _tmp16_ = NULL;
		PreparedFile* _tmp17_ = NULL;
		GFile* _tmp18_ = NULL;
		gchar* _tmp19_ = NULL;
		gchar* _tmp20_ = NULL;
		BatchImportResult* _tmp21_ = NULL;
		BatchImportResult* _tmp22_ = NULL;
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp5_ = job;
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ = _tmp5_->not_ready;
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp7_ = _tmp6_->job;
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp8_ = job;
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp9_ = _tmp8_->not_ready;
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp10_ = _tmp9_->file;
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp11_ = job;
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp12_ = _tmp11_->not_ready;
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp13_ = _tmp12_->file;
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp14_ = g_file_get_path (_tmp13_);
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp15_ = _tmp14_;
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp16_ = job;
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp17_ = _tmp16_->not_ready;
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp18_ = _tmp17_->file;
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp19_ = g_file_get_path (_tmp18_);
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp20_ = _tmp19_;
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp21_ = batch_import_result_new (_tmp7_, _tmp10_, _tmp15_, _tmp20_, NULL, IMPORT_RESULT_USER_ABORT);
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp22_ = _tmp21_;
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_report_failure (self, _tmp22_);
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_batch_import_result_unref0 (_tmp22_);
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp20_);
#line 1093 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp15_);
#line 1096 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_file_import_complete (self);
#line 9295 "BatchImport.c"
	}
#line 1099 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp23_ = job;
#line 1099 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp24_ = _tmp23_->failed;
#line 1099 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp24_ != NULL) {
#line 9303 "BatchImport.c"
		PreparedFileImportJob* _tmp25_ = NULL;
		BatchImportResult* _tmp26_ = NULL;
#line 1100 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp25_ = job;
#line 1100 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp26_ = _tmp25_->failed;
#line 1100 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_report_failure (self, _tmp26_);
#line 1101 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_file_import_complete (self);
#line 9314 "BatchImport.c"
	}
#line 1104 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp27_ = job;
#line 1104 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp28_ = _tmp27_->ready;
#line 1104 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp28_ != NULL) {
#line 9322 "BatchImport.c"
		PreparedFileImportJob* _tmp29_ = NULL;
		ReadyForImport* _tmp30_ = NULL;
		BatchImportResult* _tmp31_ = NULL;
		BatchImportResult* _tmp32_ = NULL;
#line 1105 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp29_ = job;
#line 1105 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp30_ = _tmp29_->ready;
#line 1105 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp31_ = ready_for_import_abort (_tmp30_);
#line 1105 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp32_ = _tmp31_;
#line 1105 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_report_failure (self, _tmp32_);
#line 1105 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_batch_import_result_unref0 (_tmp32_);
#line 1106 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_file_import_complete (self);
#line 9341 "BatchImport.c"
	}
#line 1109 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_flush_import_jobs (self);
#line 1085 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_background_job_unref0 (job);
#line 9347 "BatchImport.c"
}


static gpointer _completed_import_object_ref0 (gpointer self) {
#line 1123 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self ? completed_import_object_ref (self) : NULL;
#line 9354 "BatchImport.c"
}


static void batch_import_on_thumbnail_writer_completed (BatchImport* self, BackgroundJob* j) {
	gboolean _tmp0_ = FALSE;
	ThumbnailWriterJob* job = NULL;
	BackgroundJob* _tmp1_ = NULL;
	ThumbnailWriterJob* _tmp2_ = NULL;
	CompletedImportObject* completed = NULL;
	ThumbnailWriterJob* _tmp3_ = NULL;
	CompletedImportObject* _tmp4_ = NULL;
	CompletedImportObject* _tmp5_ = NULL;
	CompletedImportObject* _tmp6_ = NULL;
	BatchImportResult* _tmp7_ = NULL;
	ImportResult _tmp8_ = 0;
#line 1119 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT (self));
#line 1119 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BACKGROUND_JOB (j));
#line 1120 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->completed;
#line 1120 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_assert (!_tmp0_, "!completed");
#line 1122 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = j;
#line 1122 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = _background_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_THUMBNAIL_WRITER_JOB, ThumbnailWriterJob));
#line 1122 "/home/jens/Source/shotwell/src/BatchImport.vala"
	job = _tmp2_;
#line 1123 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = job;
#line 1123 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = _tmp3_->completed_import_source;
#line 1123 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = _completed_import_object_ref0 (_tmp4_);
#line 1123 "/home/jens/Source/shotwell/src/BatchImport.vala"
	completed = _tmp5_;
#line 1125 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_log_status (self, "on_thumbnail_writer_completed");
#line 1127 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = completed;
#line 1127 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp7_ = _tmp6_->batch_result;
#line 1127 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp8_ = _tmp7_->result;
#line 1127 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp8_ != IMPORT_RESULT_SUCCESS) {
#line 9402 "BatchImport.c"
		CompletedImportObject* _tmp9_ = NULL;
		MediaSource* _tmp10_ = NULL;
		gchar* _tmp11_ = NULL;
		gchar* _tmp12_ = NULL;
		CompletedImportObject* _tmp13_ = NULL;
		BatchImportResult* _tmp14_ = NULL;
		ImportResult _tmp15_ = 0;
		gchar* _tmp16_ = NULL;
		gchar* _tmp17_ = NULL;
		CompletedImportObject* _tmp18_ = NULL;
		MediaSource* _tmp19_ = NULL;
		CompletedImportObject* _tmp26_ = NULL;
		BatchImportResult* _tmp27_ = NULL;
#line 1128 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp9_ = completed;
#line 1128 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp10_ = _tmp9_->source;
#line 1128 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp11_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_DATA_OBJECT, DataObject));
#line 1128 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp12_ = _tmp11_;
#line 1128 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp13_ = completed;
#line 1128 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp14_ = _tmp13_->batch_result;
#line 1128 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp15_ = _tmp14_->result;
#line 1128 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp16_ = import_result_to_string (_tmp15_);
#line 1128 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp17_ = _tmp16_;
#line 1128 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_warning ("BatchImport.vala:1128: Failed to import %s: unable to write thumbnails" \
" (%s)", _tmp12_, _tmp17_);
#line 1128 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp17_);
#line 1128 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp12_);
#line 1131 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp18_ = completed;
#line 1131 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp19_ = _tmp18_->source;
#line 1131 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, TYPE_LIBRARY_PHOTO)) {
#line 9446 "BatchImport.c"
			CompletedImportObject* _tmp20_ = NULL;
			MediaSource* _tmp21_ = NULL;
#line 1132 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp20_ = completed;
#line 1132 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp21_ = _tmp20_->source;
#line 1132 "/home/jens/Source/shotwell/src/BatchImport.vala"
			library_photo_import_failed (G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, TYPE_LIBRARY_PHOTO) ? ((LibraryPhoto*) _tmp21_) : NULL);
#line 9455 "BatchImport.c"
		} else {
			CompletedImportObject* _tmp22_ = NULL;
			MediaSource* _tmp23_ = NULL;
#line 1133 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp22_ = completed;
#line 1133 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp23_ = _tmp22_->source;
#line 1133 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp23_, TYPE_VIDEO)) {
#line 9465 "BatchImport.c"
				CompletedImportObject* _tmp24_ = NULL;
				MediaSource* _tmp25_ = NULL;
#line 1134 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp24_ = completed;
#line 1134 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp25_ = _tmp24_->source;
#line 1134 "/home/jens/Source/shotwell/src/BatchImport.vala"
				video_import_failed (G_TYPE_CHECK_INSTANCE_TYPE (_tmp25_, TYPE_VIDEO) ? ((Video*) _tmp25_) : NULL);
#line 9474 "BatchImport.c"
			}
		}
#line 1136 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp26_ = completed;
#line 1136 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp27_ = _tmp26_->batch_result;
#line 1136 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_report_failure (self, _tmp27_);
#line 1137 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_file_import_complete (self);
#line 9485 "BatchImport.c"
	} else {
		ImportManifest* _tmp28_ = NULL;
		GeeList* _tmp29_ = NULL;
		CompletedImportObject* _tmp30_ = NULL;
		MediaSource* _tmp31_ = NULL;
		ImportManifest* _tmp32_ = NULL;
		CompletedImportObject* _tmp33_ = NULL;
		BatchImportResult* _tmp34_ = NULL;
		GeeList* _tmp35_ = NULL;
		CompletedImportObject* _tmp36_ = NULL;
#line 1139 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp28_ = self->priv->manifest;
#line 1139 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp29_ = _tmp28_->imported;
#line 1139 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp30_ = completed;
#line 1139 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp31_ = _tmp30_->source;
#line 1139 "/home/jens/Source/shotwell/src/BatchImport.vala"
		gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, GEE_TYPE_COLLECTION, GeeCollection), _tmp31_);
#line 1140 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp32_ = self->priv->manifest;
#line 1140 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp33_ = completed;
#line 1140 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp34_ = _tmp33_->batch_result;
#line 1140 "/home/jens/Source/shotwell/src/BatchImport.vala"
		import_manifest_add_result (_tmp32_, _tmp34_);
#line 1142 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp35_ = self->priv->display_imported_queue;
#line 1142 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp36_ = completed;
#line 1142 "/home/jens/Source/shotwell/src/BatchImport.vala"
		gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, GEE_TYPE_COLLECTION, GeeCollection), _tmp36_);
#line 9520 "BatchImport.c"
	}
#line 1145 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_flush_import_jobs (self);
#line 1119 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_completed_import_object_unref0 (completed);
#line 1119 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_background_job_unref0 (job);
#line 9528 "BatchImport.c"
}


static void batch_import_on_thumbnail_writer_cancelled (BatchImport* self, BackgroundJob* j) {
	gboolean _tmp0_ = FALSE;
	ThumbnailWriterJob* job = NULL;
	BackgroundJob* _tmp1_ = NULL;
	ThumbnailWriterJob* _tmp2_ = NULL;
	CompletedImportObject* completed = NULL;
	ThumbnailWriterJob* _tmp3_ = NULL;
	CompletedImportObject* _tmp4_ = NULL;
	CompletedImportObject* _tmp5_ = NULL;
	CompletedImportObject* _tmp6_ = NULL;
	MediaSource* _tmp7_ = NULL;
	CompletedImportObject* _tmp14_ = NULL;
	BatchImportResult* _tmp15_ = NULL;
#line 1148 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT (self));
#line 1148 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BACKGROUND_JOB (j));
#line 1149 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->completed;
#line 1149 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_assert (!_tmp0_, "!completed");
#line 1151 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = j;
#line 1151 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = _background_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_THUMBNAIL_WRITER_JOB, ThumbnailWriterJob));
#line 1151 "/home/jens/Source/shotwell/src/BatchImport.vala"
	job = _tmp2_;
#line 1152 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = job;
#line 1152 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = _tmp3_->completed_import_source;
#line 1152 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = _completed_import_object_ref0 (_tmp4_);
#line 1152 "/home/jens/Source/shotwell/src/BatchImport.vala"
	completed = _tmp5_;
#line 1154 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_log_status (self, "on_thumbnail_writer_cancelled");
#line 1156 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = completed;
#line 1156 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp7_ = _tmp6_->source;
#line 1156 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, TYPE_LIBRARY_PHOTO)) {
#line 9575 "BatchImport.c"
		CompletedImportObject* _tmp8_ = NULL;
		MediaSource* _tmp9_ = NULL;
#line 1157 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp8_ = completed;
#line 1157 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp9_ = _tmp8_->source;
#line 1157 "/home/jens/Source/shotwell/src/BatchImport.vala"
		library_photo_import_failed (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, TYPE_LIBRARY_PHOTO) ? ((LibraryPhoto*) _tmp9_) : NULL);
#line 9584 "BatchImport.c"
	} else {
		CompletedImportObject* _tmp10_ = NULL;
		MediaSource* _tmp11_ = NULL;
#line 1158 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp10_ = completed;
#line 1158 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp11_ = _tmp10_->source;
#line 1158 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, TYPE_VIDEO)) {
#line 9594 "BatchImport.c"
			CompletedImportObject* _tmp12_ = NULL;
			MediaSource* _tmp13_ = NULL;
#line 1159 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp12_ = completed;
#line 1159 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp13_ = _tmp12_->source;
#line 1159 "/home/jens/Source/shotwell/src/BatchImport.vala"
			video_import_failed (G_TYPE_CHECK_INSTANCE_TYPE (_tmp13_, TYPE_VIDEO) ? ((Video*) _tmp13_) : NULL);
#line 9603 "BatchImport.c"
		}
	}
#line 1161 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp14_ = completed;
#line 1161 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp15_ = _tmp14_->batch_result;
#line 1161 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_report_failure (self, _tmp15_);
#line 1162 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_file_import_complete (self);
#line 1164 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_flush_import_jobs (self);
#line 1148 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_completed_import_object_unref0 (completed);
#line 1148 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_background_job_unref0 (job);
#line 9620 "BatchImport.c"
}


static void batch_import_flush_ready_sources (BatchImport* self) {
	GeeList* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	GeeList* _tmp3_ = NULL;
	gint _tmp4_ = 0;
	gint _tmp5_ = 0;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	GeeArrayList* all = NULL;
	GeeArrayList* _tmp8_ = NULL;
	GeeArrayList* photos = NULL;
	GeeArrayList* _tmp9_ = NULL;
	GeeArrayList* videos = NULL;
	GeeArrayList* _tmp10_ = NULL;
	GeeHashMap* completion_list = NULL;
	GeeHashMap* _tmp11_ = NULL;
	MediaCollectionRegistry* _tmp41_ = NULL;
	MediaCollectionRegistry* _tmp42_ = NULL;
	EventSourceCollection* _tmp43_ = NULL;
	TagSourceCollection* _tmp44_ = NULL;
	LibraryPhotoSourceCollection* _tmp45_ = NULL;
	GeeArrayList* _tmp46_ = NULL;
	VideoSourceCollection* _tmp47_ = NULL;
	GeeArrayList* _tmp48_ = NULL;
	GeeArrayList* _tmp70_ = NULL;
	BatchImportRoll* _tmp71_ = NULL;
	ViewCollection* _tmp72_ = NULL;
	TagSourceCollection* _tmp73_ = NULL;
	EventSourceCollection* _tmp74_ = NULL;
	MediaCollectionRegistry* _tmp75_ = NULL;
	MediaCollectionRegistry* _tmp76_ = NULL;
	GeeList* _tmp77_ = NULL;
	GError * _inner_error_ = NULL;
#line 1171 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT (self));
#line 1172 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->ready_sources;
#line 1172 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1172 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = _tmp1_;
#line 1172 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp2_ == 0) {
#line 1173 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return;
#line 9670 "BatchImport.c"
	}
#line 1178 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = self->priv->ready_sources;
#line 1178 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1178 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = _tmp4_;
#line 1178 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = g_strdup_printf ("flush_ready_sources (%d)", _tmp5_);
#line 1178 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp7_ = _tmp6_;
#line 1178 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_log_status (self, _tmp7_);
#line 1178 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (_tmp7_);
#line 1180 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp8_ = gee_array_list_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 1180 "/home/jens/Source/shotwell/src/BatchImport.vala"
	all = _tmp8_;
#line 1181 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp9_ = gee_array_list_new (TYPE_LIBRARY_PHOTO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 1181 "/home/jens/Source/shotwell/src/BatchImport.vala"
	photos = _tmp9_;
#line 1182 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp10_ = gee_array_list_new (TYPE_VIDEO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 1182 "/home/jens/Source/shotwell/src/BatchImport.vala"
	videos = _tmp10_;
#line 1183 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp11_ = gee_hash_map_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_BATCH_IMPORT_JOB, (GBoxedCopyFunc) batch_import_job_ref, (GDestroyNotify) batch_import_job_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 1183 "/home/jens/Source/shotwell/src/BatchImport.vala"
	completion_list = _tmp11_;
#line 9702 "BatchImport.c"
	{
		GeeList* _completed_list = NULL;
		GeeList* _tmp12_ = NULL;
		GeeList* _tmp13_ = NULL;
		gint _completed_size = 0;
		GeeList* _tmp14_ = NULL;
		gint _tmp15_ = 0;
		gint _tmp16_ = 0;
		gint _completed_index = 0;
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp12_ = self->priv->ready_sources;
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp13_ = _g_object_ref0 (_tmp12_);
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_completed_list = _tmp13_;
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp14_ = _completed_list;
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp15_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp16_ = _tmp15_;
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_completed_size = _tmp16_;
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_completed_index = -1;
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
		while (TRUE) {
#line 9730 "BatchImport.c"
			gint _tmp17_ = 0;
			gint _tmp18_ = 0;
			gint _tmp19_ = 0;
			CompletedImportObject* completed = NULL;
			GeeList* _tmp20_ = NULL;
			gint _tmp21_ = 0;
			gpointer _tmp22_ = NULL;
			GeeArrayList* _tmp23_ = NULL;
			CompletedImportObject* _tmp24_ = NULL;
			MediaSource* _tmp25_ = NULL;
			CompletedImportObject* _tmp26_ = NULL;
			MediaSource* _tmp27_ = NULL;
			GeeHashMap* _tmp36_ = NULL;
			CompletedImportObject* _tmp37_ = NULL;
			MediaSource* _tmp38_ = NULL;
			CompletedImportObject* _tmp39_ = NULL;
			BatchImportJob* _tmp40_ = NULL;
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp17_ = _completed_index;
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_completed_index = _tmp17_ + 1;
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp18_ = _completed_index;
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp19_ = _completed_size;
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (!(_tmp18_ < _tmp19_)) {
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
				break;
#line 9760 "BatchImport.c"
			}
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp20_ = _completed_list;
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp21_ = _completed_index;
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp22_ = gee_list_get (_tmp20_, _tmp21_);
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
			completed = (CompletedImportObject*) _tmp22_;
#line 1186 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp23_ = all;
#line 1186 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp24_ = completed;
#line 1186 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp25_ = _tmp24_->source;
#line 1186 "/home/jens/Source/shotwell/src/BatchImport.vala"
			gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp25_);
#line 1188 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp26_ = completed;
#line 1188 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp27_ = _tmp26_->source;
#line 1188 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp27_, TYPE_LIBRARY_PHOTO)) {
#line 9784 "BatchImport.c"
				GeeArrayList* _tmp28_ = NULL;
				CompletedImportObject* _tmp29_ = NULL;
				MediaSource* _tmp30_ = NULL;
#line 1189 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp28_ = photos;
#line 1189 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp29_ = completed;
#line 1189 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp30_ = _tmp29_->source;
#line 1189 "/home/jens/Source/shotwell/src/BatchImport.vala"
				gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, TYPE_LIBRARY_PHOTO, LibraryPhoto));
#line 9796 "BatchImport.c"
			} else {
				CompletedImportObject* _tmp31_ = NULL;
				MediaSource* _tmp32_ = NULL;
#line 1190 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp31_ = completed;
#line 1190 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp32_ = _tmp31_->source;
#line 1190 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp32_, TYPE_VIDEO)) {
#line 9806 "BatchImport.c"
					GeeArrayList* _tmp33_ = NULL;
					CompletedImportObject* _tmp34_ = NULL;
					MediaSource* _tmp35_ = NULL;
#line 1191 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp33_ = videos;
#line 1191 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp34_ = completed;
#line 1191 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp35_ = _tmp34_->source;
#line 1191 "/home/jens/Source/shotwell/src/BatchImport.vala"
					gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, TYPE_VIDEO, Video));
#line 9818 "BatchImport.c"
				}
			}
#line 1193 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp36_ = completion_list;
#line 1193 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp37_ = completed;
#line 1193 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp38_ = _tmp37_->source;
#line 1193 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp39_ = completed;
#line 1193 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp40_ = _tmp39_->original_job;
#line 1193 "/home/jens/Source/shotwell/src/BatchImport.vala"
			gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp38_, _tmp40_);
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_completed_import_object_unref0 (completed);
#line 9835 "BatchImport.c"
		}
#line 1185 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_completed_list);
#line 9839 "BatchImport.c"
	}
#line 1196 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp41_ = media_collection_registry_get_instance ();
#line 1196 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp42_ = _tmp41_;
#line 1196 "/home/jens/Source/shotwell/src/BatchImport.vala"
	media_collection_registry_begin_transaction_on_all (_tmp42_);
#line 1196 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_media_collection_registry_unref0 (_tmp42_);
#line 1197 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp43_ = event_global;
#line 1197 "/home/jens/Source/shotwell/src/BatchImport.vala"
	data_collection_freeze_notifications (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, TYPE_DATA_COLLECTION, DataCollection));
#line 1198 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp44_ = tag_global;
#line 1198 "/home/jens/Source/shotwell/src/BatchImport.vala"
	data_collection_freeze_notifications (G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, TYPE_DATA_COLLECTION, DataCollection));
#line 1200 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp45_ = library_photo_global;
#line 1200 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp46_ = photos;
#line 1200 "/home/jens/Source/shotwell/src/BatchImport.vala"
	media_source_collection_import_many (G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1201 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp47_ = video_global;
#line 1201 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp48_ = videos;
#line 1201 "/home/jens/Source/shotwell/src/BatchImport.vala"
	media_source_collection_import_many (G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, GEE_TYPE_COLLECTION, GeeCollection));
#line 9869 "BatchImport.c"
	{
		GeeIterator* _media_it = NULL;
		GeeHashMap* _tmp49_ = NULL;
		GeeSet* _tmp50_ = NULL;
		GeeSet* _tmp51_ = NULL;
		GeeSet* _tmp52_ = NULL;
		GeeIterator* _tmp53_ = NULL;
		GeeIterator* _tmp54_ = NULL;
#line 1204 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp49_ = completion_list;
#line 1204 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp50_ = gee_abstract_map_get_keys (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap));
#line 1204 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp51_ = _tmp50_;
#line 1204 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp52_ = _tmp51_;
#line 1204 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp53_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, GEE_TYPE_ITERABLE, GeeIterable));
#line 1204 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp54_ = _tmp53_;
#line 1204 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_tmp52_);
#line 1204 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_media_it = _tmp54_;
#line 1204 "/home/jens/Source/shotwell/src/BatchImport.vala"
		while (TRUE) {
#line 9896 "BatchImport.c"
			GeeIterator* _tmp55_ = NULL;
			gboolean _tmp56_ = FALSE;
			MediaSource* media = NULL;
			GeeIterator* _tmp57_ = NULL;
			gpointer _tmp58_ = NULL;
#line 1204 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp55_ = _media_it;
#line 1204 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp56_ = gee_iterator_next (_tmp55_);
#line 1204 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (!_tmp56_) {
#line 1204 "/home/jens/Source/shotwell/src/BatchImport.vala"
				break;
#line 9910 "BatchImport.c"
			}
#line 1204 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp57_ = _media_it;
#line 1204 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp58_ = gee_iterator_get (_tmp57_);
#line 1204 "/home/jens/Source/shotwell/src/BatchImport.vala"
			media = (MediaSource*) _tmp58_;
#line 9918 "BatchImport.c"
			{
				GeeHashMap* _tmp59_ = NULL;
				MediaSource* _tmp60_ = NULL;
				gpointer _tmp61_ = NULL;
				BatchImportJob* _tmp62_ = NULL;
				MediaSource* _tmp63_ = NULL;
				BatchImportRoll* _tmp64_ = NULL;
#line 1206 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp59_ = completion_list;
#line 1206 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp60_ = media;
#line 1206 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp61_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp59_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp60_);
#line 1206 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp62_ = (BatchImportJob*) _tmp61_;
#line 1206 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp63_ = media;
#line 1206 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp64_ = self->priv->import_roll;
#line 1206 "/home/jens/Source/shotwell/src/BatchImport.vala"
				batch_import_job_complete (_tmp62_, _tmp63_, _tmp64_, &_inner_error_);
#line 1206 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_batch_import_job_unref0 (_tmp62_);
#line 1206 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 9944 "BatchImport.c"
					goto __catch415_g_error;
				}
			}
			goto __finally415;
			__catch415_g_error:
			{
				GError* err = NULL;
				MediaSource* _tmp65_ = NULL;
				gchar* _tmp66_ = NULL;
				gchar* _tmp67_ = NULL;
				GError* _tmp68_ = NULL;
				const gchar* _tmp69_ = NULL;
#line 1205 "/home/jens/Source/shotwell/src/BatchImport.vala"
				err = _inner_error_;
#line 1205 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_inner_error_ = NULL;
#line 1208 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp65_ = media;
#line 1208 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp66_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp65_, TYPE_DATA_OBJECT, DataObject));
#line 1208 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp67_ = _tmp66_;
#line 1208 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp68_ = err;
#line 1208 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp69_ = _tmp68_->message;
#line 1208 "/home/jens/Source/shotwell/src/BatchImport.vala"
				g_warning ("BatchImport.vala:1208: Completion error when finalizing import of %s: " \
"%s", _tmp67_, _tmp69_);
#line 1208 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp67_);
#line 1205 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_error_free0 (err);
#line 9977 "BatchImport.c"
			}
			__finally415:
#line 1205 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1205 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (media);
#line 1205 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_media_it);
#line 1205 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (completion_list);
#line 1205 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (videos);
#line 1205 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (photos);
#line 1205 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (all);
#line 1205 "/home/jens/Source/shotwell/src/BatchImport.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 1205 "/home/jens/Source/shotwell/src/BatchImport.vala"
				g_clear_error (&_inner_error_);
#line 1205 "/home/jens/Source/shotwell/src/BatchImport.vala"
				return;
#line 10000 "BatchImport.c"
			}
#line 1204 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (media);
#line 10004 "BatchImport.c"
		}
#line 1204 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_media_it);
#line 10008 "BatchImport.c"
	}
#line 1214 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp70_ = all;
#line 1214 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp71_ = self->priv->import_roll;
#line 1214 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp72_ = _tmp71_->generated_events;
#line 1214 "/home/jens/Source/shotwell/src/BatchImport.vala"
	event_generate_many_events (G_TYPE_CHECK_INSTANCE_CAST (_tmp70_, GEE_TYPE_COLLECTION, GeeCollection), _tmp72_);
#line 1216 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp73_ = tag_global;
#line 1216 "/home/jens/Source/shotwell/src/BatchImport.vala"
	data_collection_thaw_notifications (G_TYPE_CHECK_INSTANCE_CAST (_tmp73_, TYPE_DATA_COLLECTION, DataCollection));
#line 1217 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp74_ = event_global;
#line 1217 "/home/jens/Source/shotwell/src/BatchImport.vala"
	data_collection_thaw_notifications (G_TYPE_CHECK_INSTANCE_CAST (_tmp74_, TYPE_DATA_COLLECTION, DataCollection));
#line 1218 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp75_ = media_collection_registry_get_instance ();
#line 1218 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp76_ = _tmp75_;
#line 1218 "/home/jens/Source/shotwell/src/BatchImport.vala"
	media_collection_registry_commit_transaction_on_all (_tmp76_);
#line 1218 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_media_collection_registry_unref0 (_tmp76_);
#line 1220 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp77_ = self->priv->ready_sources;
#line 1220 "/home/jens/Source/shotwell/src/BatchImport.vala"
	gee_collection_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp77_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1171 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (completion_list);
#line 1171 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (videos);
#line 1171 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (photos);
#line 1171 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (all);
#line 10046 "BatchImport.c"
}


static gboolean batch_import_display_imported_timer (BatchImport* self) {
	gboolean result = FALSE;
	GeeList* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	GCancellable* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	gint total = 0;
	GCancellable* _tmp9_ = NULL;
	gboolean _tmp10_ = FALSE;
	gint _tmp18_ = 0;
	GeeList* _tmp19_ = NULL;
	gint _tmp20_ = 0;
	gint _tmp21_ = 0;
	gint _tmp22_ = 0;
	gboolean _tmp40_ = FALSE;
	GeeList* _tmp41_ = NULL;
	gint _tmp42_ = 0;
	gint _tmp43_ = 0;
#line 1225 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT (self), FALSE);
#line 1226 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->display_imported_queue;
#line 1226 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1226 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = _tmp1_;
#line 1226 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp2_ == 0) {
#line 10079 "BatchImport.c"
		gboolean _tmp3_ = FALSE;
#line 1227 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = self->priv->completed;
#line 1227 "/home/jens/Source/shotwell/src/BatchImport.vala"
		result = !_tmp3_;
#line 1227 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return result;
#line 10087 "BatchImport.c"
	}
#line 1229 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = self->priv->cancellable;
#line 1229 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = g_cancellable_is_cancelled (_tmp4_);
#line 1229 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp5_) {
#line 10095 "BatchImport.c"
		GeeList* _tmp6_ = NULL;
		gint _tmp7_ = 0;
		gint _tmp8_ = 0;
#line 1230 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ = self->priv->display_imported_queue;
#line 1230 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp7_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1230 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp8_ = _tmp7_;
#line 1230 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_debug ("BatchImport.vala:1230: Importing %d photos at once", _tmp8_);
#line 10107 "BatchImport.c"
	}
#line 1232 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_log_status (self, "display_imported_timer");
#line 1242 "/home/jens/Source/shotwell/src/BatchImport.vala"
	total = 1;
#line 1243 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp9_ = self->priv->cancellable;
#line 1243 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp10_ = g_cancellable_is_cancelled (_tmp9_);
#line 1243 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!_tmp10_) {
#line 10119 "BatchImport.c"
		GeeList* _tmp11_ = NULL;
		gint _tmp12_ = 0;
		gint _tmp13_ = 0;
#line 1244 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp11_ = self->priv->display_imported_queue;
#line 1244 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp12_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1244 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp13_ = _tmp12_;
#line 1244 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp13_ > BATCH_IMPORT_DISPLAY_QUEUE_HYSTERESIS_OVERFLOW) {
#line 10131 "BatchImport.c"
			GeeList* _tmp14_ = NULL;
			gint _tmp15_ = 0;
			gint _tmp16_ = 0;
			gint _tmp17_ = 0;
#line 1245 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp14_ = self->priv->display_imported_queue;
#line 1245 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp15_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1245 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp16_ = _tmp15_;
#line 1245 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp17_ = CLAMP ((_tmp16_ / BATCH_IMPORT_DISPLAY_QUEUE_HYSTERESIS_OVERFLOW) + 2, 0, 16);
#line 1245 "/home/jens/Source/shotwell/src/BatchImport.vala"
			total = 1 << _tmp17_;
#line 10146 "BatchImport.c"
		}
	} else {
#line 1249 "/home/jens/Source/shotwell/src/BatchImport.vala"
		total = BATCH_IMPORT_DISPLAY_QUEUE_HYSTERESIS_OVERFLOW;
#line 10151 "BatchImport.c"
	}
#line 1252 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp18_ = total;
#line 1252 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp19_ = self->priv->display_imported_queue;
#line 1252 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp20_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1252 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp21_ = _tmp20_;
#line 1252 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp22_ = MIN (_tmp18_, _tmp21_);
#line 1252 "/home/jens/Source/shotwell/src/BatchImport.vala"
	total = _tmp22_;
#line 1262 "/home/jens/Source/shotwell/src/BatchImport.vala"
	while (TRUE) {
#line 10167 "BatchImport.c"
		gint _tmp23_ = 0;
		CompletedImportObject* completed_object = NULL;
		GeeList* _tmp24_ = NULL;
		gpointer _tmp25_ = NULL;
		GdkPixbuf* user_preview = NULL;
		CompletedImportObject* _tmp26_ = NULL;
		GdkPixbuf* _tmp27_ = NULL;
		GdkPixbuf* _tmp28_ = NULL;
		CompletedImportObject* _tmp29_ = NULL;
		CompletedImportObject* _tmp30_ = NULL;
		GeeList* _tmp31_ = NULL;
		CompletedImportObject* _tmp32_ = NULL;
		CompletedImportObject* _tmp33_ = NULL;
		MediaSource* _tmp34_ = NULL;
		GdkPixbuf* _tmp35_ = NULL;
		gint _tmp36_ = 0;
		CompletedImportObject* _tmp37_ = NULL;
		MediaSource* _tmp38_ = NULL;
		guint64 _tmp39_ = 0ULL;
#line 1262 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp23_ = total;
#line 1262 "/home/jens/Source/shotwell/src/BatchImport.vala"
		total = _tmp23_ - 1;
#line 1262 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (!(_tmp23_ > 0)) {
#line 1262 "/home/jens/Source/shotwell/src/BatchImport.vala"
			break;
#line 10195 "BatchImport.c"
		}
#line 1263 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp24_ = self->priv->display_imported_queue;
#line 1263 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp25_ = gee_list_remove_at (_tmp24_, 0);
#line 1263 "/home/jens/Source/shotwell/src/BatchImport.vala"
		completed_object = (CompletedImportObject*) _tmp25_;
#line 1266 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp26_ = completed_object;
#line 1266 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp27_ = _tmp26_->user_preview;
#line 1266 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp28_ = _g_object_ref0 (_tmp27_);
#line 1266 "/home/jens/Source/shotwell/src/BatchImport.vala"
		user_preview = _tmp28_;
#line 1269 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp29_ = completed_object;
#line 1269 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_tmp29_->user_preview);
#line 1269 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp29_->user_preview = NULL;
#line 1270 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp30_ = completed_object;
#line 1270 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_thumbnails_unref0 (_tmp30_->thumbnails);
#line 1270 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp30_->thumbnails = NULL;
#line 1275 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp31_ = self->priv->ready_sources;
#line 1275 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp32_ = completed_object;
#line 1275 "/home/jens/Source/shotwell/src/BatchImport.vala"
		gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, GEE_TYPE_COLLECTION, GeeCollection), _tmp32_);
#line 1277 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp33_ = completed_object;
#line 1277 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp34_ = _tmp33_->source;
#line 1277 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp35_ = user_preview;
#line 1277 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp36_ = total;
#line 1277 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_signal_emit_by_name (self, "imported", _tmp34_, _tmp35_, _tmp36_);
#line 1278 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp37_ = completed_object;
#line 1278 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp38_ = _tmp37_->source;
#line 1278 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp39_ = media_source_get_filesize (_tmp38_);
#line 1278 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_report_progress (self, _tmp39_);
#line 1279 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_file_import_complete (self);
#line 1262 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (user_preview);
#line 1262 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_completed_import_object_unref0 (completed_object);
#line 10253 "BatchImport.c"
	}
#line 1282 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp41_ = self->priv->ready_sources;
#line 1282 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp42_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1282 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp43_ = _tmp42_;
#line 1282 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp43_ >= BATCH_IMPORT_READY_SOURCES_COUNT_OVERFLOW) {
#line 1282 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp40_ = TRUE;
#line 10265 "BatchImport.c"
	} else {
		GCancellable* _tmp44_ = NULL;
		gboolean _tmp45_ = FALSE;
#line 1282 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp44_ = self->priv->cancellable;
#line 1282 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp45_ = g_cancellable_is_cancelled (_tmp44_);
#line 1282 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp40_ = _tmp45_;
#line 10275 "BatchImport.c"
	}
#line 1282 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp40_) {
#line 1283 "/home/jens/Source/shotwell/src/BatchImport.vala"
		batch_import_flush_ready_sources (self);
#line 10281 "BatchImport.c"
	}
#line 1285 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = TRUE;
#line 1285 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 10287 "BatchImport.c"
}


static void g_cclosure_user_marshal_VOID__UINT64_UINT64 (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef void (*GMarshalFunc_VOID__UINT64_UINT64) (gpointer data1, guint64 arg_1, guint64 arg_2, gpointer data2);
	register GMarshalFunc_VOID__UINT64_UINT64 callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (n_param_values == 3);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
		data1 = closure->data;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
		data2 = param_values->data[0].v_pointer;
#line 10306 "BatchImport.c"
	} else {
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
		data1 = param_values->data[0].v_pointer;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
		data2 = closure->data;
#line 10312 "BatchImport.c"
	}
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	callback = (GMarshalFunc_VOID__UINT64_UINT64) (marshal_data ? marshal_data : cc->callback);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	callback (data1, g_value_get_uint64 (param_values + 1), g_value_get_uint64 (param_values + 2), data2);
#line 10318 "BatchImport.c"
}


static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT_INT) (gpointer data1, gpointer arg_1, gpointer arg_2, gint arg_3, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_OBJECT_INT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (n_param_values == 4);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
		data1 = closure->data;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
		data2 = param_values->data[0].v_pointer;
#line 10337 "BatchImport.c"
	} else {
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
		data1 = param_values->data[0].v_pointer;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
		data2 = closure->data;
#line 10343 "BatchImport.c"
	}
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	callback = (GMarshalFunc_VOID__OBJECT_OBJECT_INT) (marshal_data ? marshal_data : cc->callback);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), g_value_get_int (param_values + 3), data2);
#line 10349 "BatchImport.c"
}


static void g_cclosure_user_marshal_VOID__ENUM_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef void (*GMarshalFunc_VOID__ENUM_STRING) (gpointer data1, gint arg_1, const char* arg_2, gpointer data2);
	register GMarshalFunc_VOID__ENUM_STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (n_param_values == 3);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
		data1 = closure->data;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
		data2 = param_values->data[0].v_pointer;
#line 10368 "BatchImport.c"
	} else {
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
		data1 = param_values->data[0].v_pointer;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
		data2 = closure->data;
#line 10374 "BatchImport.c"
	}
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	callback = (GMarshalFunc_VOID__ENUM_STRING) (marshal_data ? marshal_data : cc->callback);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	callback (data1, g_value_get_enum (param_values + 1), g_value_get_string (param_values + 2), data2);
#line 10380 "BatchImport.c"
}


static void g_cclosure_user_marshal_VOID__BATCH_IMPORT_RESULT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef void (*GMarshalFunc_VOID__BATCH_IMPORT_RESULT) (gpointer data1, gpointer arg_1, gpointer data2);
	register GMarshalFunc_VOID__BATCH_IMPORT_RESULT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (n_param_values == 2);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
		data1 = closure->data;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
		data2 = param_values->data[0].v_pointer;
#line 10399 "BatchImport.c"
	} else {
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
		data1 = param_values->data[0].v_pointer;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
		data2 = closure->data;
#line 10405 "BatchImport.c"
	}
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	callback = (GMarshalFunc_VOID__BATCH_IMPORT_RESULT) (marshal_data ? marshal_data : cc->callback);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	callback (data1, value_get_batch_import_result (param_values + 1), data2);
#line 10411 "BatchImport.c"
}


static void g_cclosure_user_marshal_VOID__IMPORT_MANIFEST_BATCH_IMPORT_ROLL (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef void (*GMarshalFunc_VOID__IMPORT_MANIFEST_BATCH_IMPORT_ROLL) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__IMPORT_MANIFEST_BATCH_IMPORT_ROLL callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (n_param_values == 3);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
		data1 = closure->data;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
		data2 = param_values->data[0].v_pointer;
#line 10430 "BatchImport.c"
	} else {
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
		data1 = param_values->data[0].v_pointer;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
		data2 = closure->data;
#line 10436 "BatchImport.c"
	}
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	callback = (GMarshalFunc_VOID__IMPORT_MANIFEST_BATCH_IMPORT_ROLL) (marshal_data ? marshal_data : cc->callback);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	callback (data1, value_get_import_manifest (param_values + 1), value_get_batch_import_roll (param_values + 2), data2);
#line 10442 "BatchImport.c"
}


static void batch_import_class_init (BatchImportClass * klass) {
	Workers* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	Workers* _tmp2_ = NULL;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_parent_class = g_type_class_peek_parent (klass);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_type_class_add_private (klass, sizeof (BatchImportPrivate));
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	G_OBJECT_CLASS (klass)->finalize = batch_import_finalize;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_signal_new ("starting", TYPE_BATCH_IMPORT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_signal_new ("preparing", TYPE_BATCH_IMPORT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_signal_new ("progress", TYPE_BATCH_IMPORT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT64_UINT64, G_TYPE_NONE, 2, G_TYPE_UINT64, G_TYPE_UINT64);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_signal_new ("imported", TYPE_BATCH_IMPORT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT_INT, G_TYPE_NONE, 3, TYPE_MEDIA_SOURCE, gdk_pixbuf_get_type (), G_TYPE_INT);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_signal_new ("fatal_error", TYPE_BATCH_IMPORT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__ENUM_STRING, G_TYPE_NONE, 2, TYPE_IMPORT_RESULT, G_TYPE_STRING);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_signal_new ("import_job_failed", TYPE_BATCH_IMPORT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__BATCH_IMPORT_RESULT, G_TYPE_NONE, 1, TYPE_BATCH_IMPORT_RESULT);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_signal_new ("import_complete", TYPE_BATCH_IMPORT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__IMPORT_MANIFEST_BATCH_IMPORT_ROLL, G_TYPE_NONE, 2, TYPE_IMPORT_MANIFEST, TYPE_BATCH_IMPORT_ROLL);
#line 423 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = workers_new ((guint) 1, FALSE);
#line 423 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_feeder_workers = _tmp0_;
#line 424 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = workers_thread_per_cpu_minus_one ();
#line 424 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = workers_new (_tmp1_, FALSE);
#line 424 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_import_import_workers = _tmp2_;
#line 10480 "BatchImport.c"
}


static void batch_import_instance_init (BatchImport * self) {
	GeeHashMap* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	GeeLinkedList* _tmp2_ = NULL;
	GeeLinkedList* _tmp3_ = NULL;
	GeeLinkedList* _tmp4_ = NULL;
	GeeLinkedList* _tmp5_ = NULL;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv = BATCH_IMPORT_GET_PRIVATE (self);
#line 429 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->completed_bytes = (guint64) 0;
#line 430 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->total_bytes = (guint64) 0;
#line 433 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->scheduled = FALSE;
#line 434 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->completed = FALSE;
#line 435 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->file_imports_to_perform = -1;
#line 436 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->file_imports_completed = 0;
#line 437 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->cancellable = NULL;
#line 438 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->last_preparing_ms = (gulong) 0;
#line 441 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, g_file_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 441 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->imported_full_md5_table = _tmp0_;
#line 443 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->throbber_id = (guint) 0;
#line 444 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = workers_thread_per_cpu_minus_one ();
#line 444 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->max_outstanding_import_jobs = _tmp1_;
#line 445 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->untrash_duplicates = TRUE;
#line 446 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->mark_duplicates_online = TRUE;
#line 450 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = gee_linked_list_new (TYPE_PREPARED_FILE, (GBoxedCopyFunc) prepared_file_ref, (GDestroyNotify) prepared_file_unref, NULL, NULL, NULL);
#line 450 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->ready_files = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_LIST, GeeList);
#line 451 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = gee_linked_list_new (TYPE_COMPLETED_IMPORT_OBJECT, (GBoxedCopyFunc) completed_import_object_ref, (GDestroyNotify) completed_import_object_unref, NULL, NULL, NULL);
#line 451 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->ready_thumbnails = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_LIST, GeeList);
#line 453 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = gee_linked_list_new (TYPE_COMPLETED_IMPORT_OBJECT, (GBoxedCopyFunc) completed_import_object_ref, (GDestroyNotify) completed_import_object_unref, NULL, NULL, NULL);
#line 453 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->display_imported_queue = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_LIST, GeeList);
#line 455 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = gee_linked_list_new (TYPE_COMPLETED_IMPORT_OBJECT, (GBoxedCopyFunc) completed_import_object_ref, (GDestroyNotify) completed_import_object_unref, NULL, NULL, NULL);
#line 455 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->ready_sources = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_LIST, GeeList);
#line 10539 "BatchImport.c"
}


static void batch_import_finalize (GObject* obj) {
	BatchImport * self;
	Application* _tmp0_ = NULL;
	Application* _tmp1_ = NULL;
	guint _tmp2_ = 0U;
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_BATCH_IMPORT, BatchImport);
#line 518 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = application_get_instance ();
#line 518 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = _tmp0_;
#line 518 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_signal_parse_name ("exiting", TYPE_APPLICATION, &_tmp2_, NULL, FALSE);
#line 518 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _batch_import_user_halt_application_exiting, self);
#line 518 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_application_unref0 (_tmp1_);
#line 426 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->jobs);
#line 427 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_roll_unref0 (self->priv->import_roll);
#line 428 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (self->priv->name);
#line 432 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_import_manifest_unref0 (self->priv->manifest);
#line 437 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->cancellable);
#line 439 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->skipset);
#line 441 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->imported_full_md5_table);
#line 450 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->ready_files);
#line 451 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->ready_thumbnails);
#line 453 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->display_imported_queue);
#line 455 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->ready_sources);
#line 412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	G_OBJECT_CLASS (batch_import_parent_class)->finalize (obj);
#line 10584 "BatchImport.c"
}


GType batch_import_get_type (void) {
	static volatile gsize batch_import_type_id__volatile = 0;
	if (g_once_init_enter (&batch_import_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BatchImportClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) batch_import_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BatchImport), 0, (GInstanceInitFunc) batch_import_instance_init, NULL };
		GType batch_import_type_id;
		batch_import_type_id = g_type_register_static (G_TYPE_OBJECT, "BatchImport", &g_define_type_info, 0);
		g_once_init_leave (&batch_import_type_id__volatile, batch_import_type_id);
	}
	return batch_import_type_id__volatile;
}


static DuplicatedFile* duplicated_file_construct (GType object_type) {
	DuplicatedFile * self = NULL;
#line 1294 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = (DuplicatedFile*) g_object_new (object_type, NULL);
#line 1295 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_video_id_free0 (self->priv->video_id);
#line 1295 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->video_id = NULL;
#line 1296 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_photo_id_free0 (self->priv->photo_id);
#line 1296 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->photo_id = NULL;
#line 1297 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->file);
#line 1297 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->file = NULL;
#line 1294 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self;
#line 10618 "BatchImport.c"
}


static DuplicatedFile* duplicated_file_new (void) {
#line 1294 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return duplicated_file_construct (TYPE_DUPLICATED_FILE);
#line 10625 "BatchImport.c"
}


static gpointer _photo_id_dup0 (gpointer self) {
#line 1304 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self ? photo_id_dup (self) : NULL;
#line 10632 "BatchImport.c"
}


DuplicatedFile* duplicated_file_create_from_photo_id (PhotoID* photo_id) {
	DuplicatedFile* result = NULL;
	gboolean _tmp0_ = FALSE;
	DuplicatedFile* _result_ = NULL;
	DuplicatedFile* _tmp1_ = NULL;
	PhotoID _tmp2_ = {0};
	PhotoID* _tmp3_ = NULL;
#line 1300 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (photo_id != NULL, NULL);
#line 1301 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = photo_id_is_valid (photo_id);
#line 1301 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_assert (_tmp0_, "photo_id.is_valid()");
#line 1303 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = duplicated_file_new ();
#line 1303 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_result_ = _tmp1_;
#line 1304 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = *photo_id;
#line 1304 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = _photo_id_dup0 (&_tmp2_);
#line 1304 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_photo_id_free0 (_result_->priv->photo_id);
#line 1304 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_result_->priv->photo_id = _tmp3_;
#line 1305 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _result_;
#line 1305 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 10665 "BatchImport.c"
}


static gpointer _video_id_dup0 (gpointer self) {
#line 1312 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self ? video_id_dup (self) : NULL;
#line 10672 "BatchImport.c"
}


DuplicatedFile* duplicated_file_create_from_video_id (VideoID* video_id) {
	DuplicatedFile* result = NULL;
	gboolean _tmp0_ = FALSE;
	DuplicatedFile* _result_ = NULL;
	DuplicatedFile* _tmp1_ = NULL;
	VideoID _tmp2_ = {0};
	VideoID* _tmp3_ = NULL;
#line 1308 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (video_id != NULL, NULL);
#line 1309 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = video_id_is_valid (video_id);
#line 1309 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_assert (_tmp0_, "video_id.is_valid()");
#line 1311 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = duplicated_file_new ();
#line 1311 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_result_ = _tmp1_;
#line 1312 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = *video_id;
#line 1312 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = _video_id_dup0 (&_tmp2_);
#line 1312 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_video_id_free0 (_result_->priv->video_id);
#line 1312 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_result_->priv->video_id = _tmp3_;
#line 1313 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _result_;
#line 1313 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 10705 "BatchImport.c"
}


DuplicatedFile* duplicated_file_create_from_file (GFile* file) {
	DuplicatedFile* result = NULL;
	DuplicatedFile* _result_ = NULL;
	DuplicatedFile* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
	GFile* _tmp2_ = NULL;
#line 1316 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (G_IS_FILE (file), NULL);
#line 1317 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = duplicated_file_new ();
#line 1317 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_result_ = _tmp0_;
#line 1319 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = file;
#line 1319 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 1319 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (_result_->priv->file);
#line 1319 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_result_->priv->file = _tmp2_;
#line 1321 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _result_;
#line 1321 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 10733 "BatchImport.c"
}


GFile* duplicated_file_get_file (DuplicatedFile* self) {
	GFile* result = NULL;
	GFile* _tmp0_ = NULL;
#line 1324 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_DUPLICATED_FILE (self), NULL);
#line 1325 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->priv->file;
#line 1325 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp0_ != NULL) {
#line 10746 "BatchImport.c"
		GFile* _tmp1_ = NULL;
		GFile* _tmp2_ = NULL;
#line 1326 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp1_ = self->priv->file;
#line 1326 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp2_ = _g_object_ref0 (_tmp1_);
#line 1326 "/home/jens/Source/shotwell/src/BatchImport.vala"
		result = _tmp2_;
#line 1326 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return result;
#line 10757 "BatchImport.c"
	} else {
		PhotoID* _tmp3_ = NULL;
#line 1327 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = self->priv->photo_id;
#line 1327 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp3_ != NULL) {
#line 10764 "BatchImport.c"
			Photo* photo_object = NULL;
			LibraryPhotoSourceCollection* _tmp4_ = NULL;
			PhotoID* _tmp5_ = NULL;
			PhotoID _tmp6_ = {0};
			LibraryPhoto* _tmp7_ = NULL;
			Photo* _tmp8_ = NULL;
			GFile* _tmp9_ = NULL;
			GFile* _tmp10_ = NULL;
			GFile* _tmp11_ = NULL;
#line 1328 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp4_ = library_photo_global;
#line 1328 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp5_ = self->priv->photo_id;
#line 1328 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp6_ = *_tmp5_;
#line 1328 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp7_ = library_photo_source_collection_fetch (_tmp4_, &_tmp6_);
#line 1328 "/home/jens/Source/shotwell/src/BatchImport.vala"
			photo_object = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_PHOTO, Photo);
#line 1329 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp8_ = photo_object;
#line 1329 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp9_ = media_source_get_master_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_MEDIA_SOURCE, MediaSource));
#line 1329 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (self->priv->file);
#line 1329 "/home/jens/Source/shotwell/src/BatchImport.vala"
			self->priv->file = _tmp9_;
#line 1330 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp10_ = self->priv->file;
#line 1330 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp11_ = _g_object_ref0 (_tmp10_);
#line 1330 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = _tmp11_;
#line 1330 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (photo_object);
#line 1330 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 10802 "BatchImport.c"
		} else {
			VideoID* _tmp12_ = NULL;
#line 1331 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp12_ = self->priv->video_id;
#line 1331 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp12_ != NULL) {
#line 10809 "BatchImport.c"
				Video* video_object = NULL;
				VideoSourceCollection* _tmp13_ = NULL;
				VideoID* _tmp14_ = NULL;
				VideoID _tmp15_ = {0};
				Video* _tmp16_ = NULL;
				Video* _tmp17_ = NULL;
				GFile* _tmp18_ = NULL;
				GFile* _tmp19_ = NULL;
				GFile* _tmp20_ = NULL;
#line 1332 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp13_ = video_global;
#line 1332 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp14_ = self->priv->video_id;
#line 1332 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp15_ = *_tmp14_;
#line 1332 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp16_ = video_source_collection_fetch (_tmp13_, &_tmp15_);
#line 1332 "/home/jens/Source/shotwell/src/BatchImport.vala"
				video_object = G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_VIDEO, Video);
#line 1333 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp17_ = video_object;
#line 1333 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp18_ = media_source_get_master_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_MEDIA_SOURCE, MediaSource));
#line 1333 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (self->priv->file);
#line 1333 "/home/jens/Source/shotwell/src/BatchImport.vala"
				self->priv->file = _tmp18_;
#line 1334 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp19_ = self->priv->file;
#line 1334 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp20_ = _g_object_ref0 (_tmp19_);
#line 1334 "/home/jens/Source/shotwell/src/BatchImport.vala"
				result = _tmp20_;
#line 1334 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (video_object);
#line 1334 "/home/jens/Source/shotwell/src/BatchImport.vala"
				return result;
#line 10847 "BatchImport.c"
			} else {
#line 1336 "/home/jens/Source/shotwell/src/BatchImport.vala"
				g_assert_not_reached ();
#line 10851 "BatchImport.c"
			}
		}
	}
}


static void duplicated_file_class_init (DuplicatedFileClass * klass) {
#line 1289 "/home/jens/Source/shotwell/src/BatchImport.vala"
	duplicated_file_parent_class = g_type_class_peek_parent (klass);
#line 1289 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_type_class_add_private (klass, sizeof (DuplicatedFilePrivate));
#line 1289 "/home/jens/Source/shotwell/src/BatchImport.vala"
	G_OBJECT_CLASS (klass)->finalize = duplicated_file_finalize;
#line 10865 "BatchImport.c"
}


static void duplicated_file_instance_init (DuplicatedFile * self) {
#line 1289 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv = DUPLICATED_FILE_GET_PRIVATE (self);
#line 10872 "BatchImport.c"
}


static void duplicated_file_finalize (GObject* obj) {
	DuplicatedFile * self;
#line 1289 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DUPLICATED_FILE, DuplicatedFile);
#line 1290 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_video_id_free0 (self->priv->video_id);
#line 1291 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_photo_id_free0 (self->priv->photo_id);
#line 1292 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->file);
#line 1289 "/home/jens/Source/shotwell/src/BatchImport.vala"
	G_OBJECT_CLASS (duplicated_file_parent_class)->finalize (obj);
#line 10888 "BatchImport.c"
}


GType duplicated_file_get_type (void) {
	static volatile gsize duplicated_file_type_id__volatile = 0;
	if (g_once_init_enter (&duplicated_file_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DuplicatedFileClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) duplicated_file_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DuplicatedFile), 0, (GInstanceInitFunc) duplicated_file_instance_init, NULL };
		GType duplicated_file_type_id;
		duplicated_file_type_id = g_type_register_static (G_TYPE_OBJECT, "DuplicatedFile", &g_define_type_info, 0);
		g_once_init_leave (&duplicated_file_type_id__volatile, duplicated_file_type_id);
	}
	return duplicated_file_type_id__volatile;
}


BackgroundImportJob* background_import_job_construct (GType object_type, BatchImport* owner, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancellation, void* cancellation_target) {
	BackgroundImportJob* self = NULL;
	BatchImport* _tmp0_ = NULL;
	CompletionCallback _tmp1_ = NULL;
	void* _tmp1__target = NULL;
	GCancellable* _tmp2_ = NULL;
	CancellationCallback _tmp3_ = NULL;
	void* _tmp3__target = NULL;
#line 1363 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT (owner), NULL);
#line 1363 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (G_IS_CANCELLABLE (cancellable), NULL);
#line 1365 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = owner;
#line 1365 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = callback;
#line 1365 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1__target = callback_target;
#line 1365 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = cancellable;
#line 1365 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = cancellation;
#line 1365 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3__target = cancellation_target;
#line 1365 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = (BackgroundImportJob*) background_job_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, G_TYPE_OBJECT, GObject), _tmp1_, _tmp1__target, _tmp2_, _tmp3_, _tmp3__target, NULL);
#line 1363 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self;
#line 10932 "BatchImport.c"
}


ImportResult background_import_job_abort_check (BackgroundImportJob* self) {
	ImportResult result = 0;
	gboolean _tmp0_ = FALSE;
	ImportResult _tmp1_ = 0;
	ImportResult _tmp3_ = 0;
#line 1370 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BACKGROUND_IMPORT_JOB (self), 0);
#line 1371 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = self->abort_flag;
#line 1371 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp1_ == IMPORT_RESULT_SUCCESS) {
#line 10947 "BatchImport.c"
		gboolean _tmp2_ = FALSE;
#line 1371 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp2_ = background_job_is_cancelled (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_JOB, BackgroundJob));
#line 1371 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = _tmp2_;
#line 10953 "BatchImport.c"
	} else {
#line 1371 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = FALSE;
#line 10957 "BatchImport.c"
	}
#line 1371 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp0_) {
#line 1372 "/home/jens/Source/shotwell/src/BatchImport.vala"
		self->abort_flag = IMPORT_RESULT_USER_ABORT;
#line 10963 "BatchImport.c"
	}
#line 1374 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = self->abort_flag;
#line 1374 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _tmp3_;
#line 1374 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 10971 "BatchImport.c"
}


void background_import_job_abort (BackgroundImportJob* self, ImportResult _result_) {
	ImportResult _tmp0_ = 0;
#line 1377 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BACKGROUND_IMPORT_JOB (self));
#line 1379 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->abort_flag;
#line 1379 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp0_ == IMPORT_RESULT_SUCCESS) {
#line 10983 "BatchImport.c"
		ImportResult _tmp1_ = 0;
#line 1380 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp1_ = _result_;
#line 1380 "/home/jens/Source/shotwell/src/BatchImport.vala"
		self->abort_flag = _tmp1_;
#line 10989 "BatchImport.c"
	}
}


void background_import_job_report_failure (BackgroundImportJob* self, BatchImportJob* job, GFile* file, const gchar* src_identifier, const gchar* dest_identifier, ImportResult _result_) {
	ImportResult _tmp0_ = 0;
	ImportResult _tmp1_ = 0;
	gboolean _tmp2_ = FALSE;
	GeeList* _tmp8_ = NULL;
	BatchImportJob* _tmp9_ = NULL;
	GFile* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
	ImportResult _tmp13_ = 0;
	BatchImportResult* _tmp14_ = NULL;
	BatchImportResult* _tmp15_ = NULL;
#line 1383 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BACKGROUND_IMPORT_JOB (self));
#line 1383 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT_JOB (job));
#line 1383 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail ((file == NULL) || G_IS_FILE (file));
#line 1383 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (src_identifier != NULL);
#line 1383 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (dest_identifier != NULL);
#line 1385 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = _result_;
#line 1385 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_assert (_tmp0_ != IMPORT_RESULT_SUCCESS, "result != ImportResult.SUCCESS");
#line 1388 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = _result_;
#line 1388 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = import_result_is_abort (_tmp1_);
#line 1388 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp2_) {
#line 11026 "BatchImport.c"
		ImportResult _tmp3_ = 0;
#line 1389 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = _result_;
#line 1389 "/home/jens/Source/shotwell/src/BatchImport.vala"
		background_import_job_abort (self, _tmp3_);
#line 11032 "BatchImport.c"
	} else {
		const gchar* _tmp4_ = NULL;
		ImportResult _tmp5_ = 0;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
#line 1391 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = src_identifier;
#line 1391 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp5_ = _result_;
#line 1391 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ = import_result_to_string (_tmp5_);
#line 1391 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp7_ = _tmp6_;
#line 1391 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_warning ("BatchImport.vala:1391: Import failure %s: %s", _tmp4_, _tmp7_);
#line 1391 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp7_);
#line 11050 "BatchImport.c"
	}
#line 1393 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp8_ = self->failed;
#line 1393 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp9_ = job;
#line 1393 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp10_ = file;
#line 1393 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp11_ = src_identifier;
#line 1393 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp12_ = dest_identifier;
#line 1393 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp13_ = _result_;
#line 1393 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp14_ = batch_import_result_new (_tmp9_, _tmp10_, _tmp11_, _tmp12_, NULL, _tmp13_);
#line 1393 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp15_ = _tmp14_;
#line 1393 "/home/jens/Source/shotwell/src/BatchImport.vala"
	gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_COLLECTION, GeeCollection), _tmp15_);
#line 1393 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_result_unref0 (_tmp15_);
#line 11072 "BatchImport.c"
}


void background_import_job_report_error (BackgroundImportJob* self, BatchImportJob* job, GFile* file, const gchar* src_identifier, const gchar* dest_identifier, GError* err, ImportResult default_result) {
	ImportResult _result_ = 0;
	GError* _tmp0_ = NULL;
	ImportResult _tmp1_ = 0;
	ImportResult _tmp2_ = 0;
	const gchar* _tmp3_ = NULL;
	GError* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	ImportResult _tmp6_ = 0;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	ImportResult _tmp9_ = 0;
	gboolean _tmp10_ = FALSE;
	GeeList* _tmp12_ = NULL;
	BatchImportJob* _tmp13_ = NULL;
	GFile* _tmp14_ = NULL;
	const gchar* _tmp15_ = NULL;
	const gchar* _tmp16_ = NULL;
	GError* _tmp17_ = NULL;
	ImportResult _tmp18_ = 0;
	BatchImportResult* _tmp19_ = NULL;
	BatchImportResult* _tmp20_ = NULL;
#line 1397 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BACKGROUND_IMPORT_JOB (self));
#line 1397 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT_JOB (job));
#line 1397 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail ((file == NULL) || G_IS_FILE (file));
#line 1397 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (src_identifier != NULL);
#line 1397 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (dest_identifier != NULL);
#line 1399 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = err;
#line 1399 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = default_result;
#line 1399 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = import_result_convert_error (_tmp0_, _tmp1_);
#line 1399 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_result_ = _tmp2_;
#line 1401 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = src_identifier;
#line 1401 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = err;
#line 1401 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = _tmp4_->message;
#line 1401 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = _result_;
#line 1401 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp7_ = import_result_to_string (_tmp6_);
#line 1401 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp8_ = _tmp7_;
#line 1401 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_warning ("BatchImport.vala:1401: Import error %s: %s (%s)", _tmp3_, _tmp5_, _tmp8_);
#line 1401 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (_tmp8_);
#line 1403 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp9_ = _result_;
#line 1403 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp10_ = import_result_is_abort (_tmp9_);
#line 1403 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp10_) {
#line 11138 "BatchImport.c"
		ImportResult _tmp11_ = 0;
#line 1404 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp11_ = _result_;
#line 1404 "/home/jens/Source/shotwell/src/BatchImport.vala"
		background_import_job_abort (self, _tmp11_);
#line 11144 "BatchImport.c"
	}
#line 1406 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp12_ = self->failed;
#line 1406 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp13_ = job;
#line 1406 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp14_ = file;
#line 1406 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp15_ = src_identifier;
#line 1406 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp16_ = dest_identifier;
#line 1406 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp17_ = err;
#line 1406 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp18_ = default_result;
#line 1406 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp19_ = batch_import_result_new_from_error (_tmp13_, _tmp14_, _tmp15_, _tmp16_, _tmp17_, _tmp18_);
#line 1406 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp20_ = _tmp19_;
#line 1406 "/home/jens/Source/shotwell/src/BatchImport.vala"
	gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_COLLECTION, GeeCollection), _tmp20_);
#line 1406 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_result_unref0 (_tmp20_);
#line 11168 "BatchImport.c"
}


static void background_import_job_class_init (BackgroundImportJobClass * klass) {
#line 1359 "/home/jens/Source/shotwell/src/BatchImport.vala"
	background_import_job_parent_class = g_type_class_peek_parent (klass);
#line 1359 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BackgroundJobClass *) klass)->finalize = background_import_job_finalize;
#line 11177 "BatchImport.c"
}


static void background_import_job_instance_init (BackgroundImportJob * self) {
	GeeArrayList* _tmp0_ = NULL;
#line 1360 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->abort_flag = IMPORT_RESULT_SUCCESS;
#line 1361 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = gee_array_list_new (TYPE_BATCH_IMPORT_RESULT, (GBoxedCopyFunc) batch_import_result_ref, (GDestroyNotify) batch_import_result_unref, NULL, NULL, NULL);
#line 1361 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->failed = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_LIST, GeeList);
#line 11189 "BatchImport.c"
}


static void background_import_job_finalize (BackgroundJob* obj) {
	BackgroundImportJob * self;
#line 1359 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_BACKGROUND_IMPORT_JOB, BackgroundImportJob);
#line 1361 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->failed);
#line 1359 "/home/jens/Source/shotwell/src/BatchImport.vala"
	BACKGROUND_JOB_CLASS (background_import_job_parent_class)->finalize (obj);
#line 11201 "BatchImport.c"
}


GType background_import_job_get_type (void) {
	static volatile gsize background_import_job_type_id__volatile = 0;
	if (g_once_init_enter (&background_import_job_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BackgroundImportJobClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) background_import_job_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BackgroundImportJob), 0, (GInstanceInitFunc) background_import_job_instance_init, NULL };
		GType background_import_job_type_id;
		background_import_job_type_id = g_type_register_static (TYPE_BACKGROUND_JOB, "BackgroundImportJob", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&background_import_job_type_id__volatile, background_import_job_type_id);
	}
	return background_import_job_type_id__volatile;
}


FileToPrepare* file_to_prepare_construct (GType object_type, BatchImportJob* job, GFile* file, gboolean copy_to_library) {
	FileToPrepare* self = NULL;
	BatchImportJob* _tmp0_ = NULL;
	BatchImportJob* _tmp1_ = NULL;
	GFile* _tmp2_ = NULL;
	GFile* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
#line 1417 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_JOB (job), NULL);
#line 1417 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail ((file == NULL) || G_IS_FILE (file), NULL);
#line 1417 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = (FileToPrepare*) g_type_create_instance (object_type);
#line 1418 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = job;
#line 1418 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = _batch_import_job_ref0 (_tmp0_);
#line 1418 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_job_unref0 (self->job);
#line 1418 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->job = _tmp1_;
#line 1419 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = file;
#line 1419 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 1419 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->file);
#line 1419 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->file = _tmp3_;
#line 1420 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = copy_to_library;
#line 1420 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->copy_to_library = _tmp4_;
#line 1417 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self;
#line 11252 "BatchImport.c"
}


FileToPrepare* file_to_prepare_new (BatchImportJob* job, GFile* file, gboolean copy_to_library) {
#line 1417 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return file_to_prepare_construct (TYPE_FILE_TO_PREPARE, job, file, copy_to_library);
#line 11259 "BatchImport.c"
}


static gpointer _file_to_prepare_ref0 (gpointer self) {
#line 1424 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self ? file_to_prepare_ref (self) : NULL;
#line 11266 "BatchImport.c"
}


void file_to_prepare_set_associated (FileToPrepare* self, FileToPrepare* a) {
	FileToPrepare* _tmp0_ = NULL;
	FileToPrepare* _tmp1_ = NULL;
#line 1423 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_FILE_TO_PREPARE (self));
#line 1423 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail ((a == NULL) || IS_FILE_TO_PREPARE (a));
#line 1424 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = a;
#line 1424 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = _file_to_prepare_ref0 (_tmp0_);
#line 1424 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_file_to_prepare_unref0 (self->associated);
#line 1424 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->associated = _tmp1_;
#line 11285 "BatchImport.c"
}


gchar* file_to_prepare_get_parent_path (FileToPrepare* self) {
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
#line 1427 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_FILE_TO_PREPARE (self), NULL);
#line 1428 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = self->file;
#line 1428 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp1_ != NULL) {
#line 11299 "BatchImport.c"
		GFile* _tmp2_ = NULL;
		GFile* _tmp3_ = NULL;
		GFile* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
#line 1428 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp2_ = self->file;
#line 1428 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = g_file_get_parent (_tmp2_);
#line 1428 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = _tmp3_;
#line 1428 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp5_ = g_file_get_path (_tmp4_);
#line 1428 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp0_);
#line 1428 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = _tmp5_;
#line 1428 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_tmp4_);
#line 11318 "BatchImport.c"
	} else {
		BatchImportJob* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
#line 1428 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ = self->job;
#line 1428 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp7_ = batch_import_job_get_path (_tmp6_);
#line 1428 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp0_);
#line 1428 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = _tmp7_;
#line 11330 "BatchImport.c"
	}
#line 1428 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _tmp0_;
#line 1428 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 11336 "BatchImport.c"
}


gchar* file_to_prepare_get_path (FileToPrepare* self) {
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
#line 1431 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_FILE_TO_PREPARE (self), NULL);
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = self->file;
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp1_ != NULL) {
#line 11350 "BatchImport.c"
		GFile* _tmp2_ = NULL;
		gchar* _tmp3_ = NULL;
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp2_ = self->file;
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = g_file_get_path (_tmp2_);
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp0_);
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = _tmp3_;
#line 11361 "BatchImport.c"
	} else {
		BatchImportJob* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		GFile* _tmp7_ = NULL;
		GFile* _tmp8_ = NULL;
		BatchImportJob* _tmp9_ = NULL;
		gchar* _tmp10_ = NULL;
		gchar* _tmp11_ = NULL;
		GFile* _tmp12_ = NULL;
		GFile* _tmp13_ = NULL;
		gchar* _tmp14_ = NULL;
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = self->job;
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp5_ = batch_import_job_get_path (_tmp4_);
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ = _tmp5_;
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp7_ = g_file_new_for_path (_tmp6_);
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp8_ = _tmp7_;
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp9_ = self->job;
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp10_ = batch_import_job_get_basename (_tmp9_);
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp11_ = _tmp10_;
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp12_ = g_file_get_child (_tmp8_, _tmp11_);
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp13_ = _tmp12_;
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp14_ = g_file_get_path (_tmp13_);
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp0_);
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = _tmp14_;
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_tmp13_);
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp11_);
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_tmp8_);
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp6_);
#line 11408 "BatchImport.c"
	}
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _tmp0_;
#line 1432 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 11414 "BatchImport.c"
}


gchar* file_to_prepare_get_basename (FileToPrepare* self) {
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
#line 1436 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_FILE_TO_PREPARE (self), NULL);
#line 1437 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = self->file;
#line 1437 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp1_ != NULL) {
#line 11428 "BatchImport.c"
		GFile* _tmp2_ = NULL;
		gchar* _tmp3_ = NULL;
#line 1437 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp2_ = self->file;
#line 1437 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = g_file_get_basename (_tmp2_);
#line 1437 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp0_);
#line 1437 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = _tmp3_;
#line 11439 "BatchImport.c"
	} else {
		BatchImportJob* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
#line 1437 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = self->job;
#line 1437 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp5_ = batch_import_job_get_basename (_tmp4_);
#line 1437 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp0_);
#line 1437 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = _tmp5_;
#line 11451 "BatchImport.c"
	}
#line 1437 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _tmp0_;
#line 1437 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 11457 "BatchImport.c"
}


gboolean file_to_prepare_is_directory (FileToPrepare* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	GFile* _tmp1_ = NULL;
#line 1440 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_FILE_TO_PREPARE (self), FALSE);
#line 1441 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = self->file;
#line 1441 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp1_ != NULL) {
#line 11471 "BatchImport.c"
		GFile* _tmp2_ = NULL;
		GFileType _tmp3_ = 0;
#line 1441 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp2_ = self->file;
#line 1441 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = g_file_query_file_type (_tmp2_, G_FILE_QUERY_INFO_NONE, NULL);
#line 1441 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = _tmp3_ == G_FILE_TYPE_DIRECTORY;
#line 11480 "BatchImport.c"
	} else {
		BatchImportJob* _tmp4_ = NULL;
		gboolean _tmp5_ = FALSE;
#line 1442 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = self->job;
#line 1442 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp5_ = batch_import_job_is_directory (_tmp4_);
#line 1442 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = _tmp5_;
#line 11490 "BatchImport.c"
	}
#line 1441 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _tmp0_;
#line 1441 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 11496 "BatchImport.c"
}


static void value_file_to_prepare_init (GValue* value) {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	value->data[0].v_pointer = NULL;
#line 11503 "BatchImport.c"
}


static void value_file_to_prepare_free_value (GValue* value) {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (value->data[0].v_pointer) {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		file_to_prepare_unref (value->data[0].v_pointer);
#line 11512 "BatchImport.c"
	}
}


static void value_file_to_prepare_copy_value (const GValue* src_value, GValue* dest_value) {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (src_value->data[0].v_pointer) {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		dest_value->data[0].v_pointer = file_to_prepare_ref (src_value->data[0].v_pointer);
#line 11522 "BatchImport.c"
	} else {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		dest_value->data[0].v_pointer = NULL;
#line 11526 "BatchImport.c"
	}
}


static gpointer value_file_to_prepare_peek_pointer (const GValue* value) {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return value->data[0].v_pointer;
#line 11534 "BatchImport.c"
}


static gchar* value_file_to_prepare_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (collect_values[0].v_pointer) {
#line 11541 "BatchImport.c"
		FileToPrepare* object;
		object = collect_values[0].v_pointer;
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (object->parent_instance.g_class == NULL) {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 11548 "BatchImport.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.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 11552 "BatchImport.c"
		}
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = file_to_prepare_ref (object);
#line 11556 "BatchImport.c"
	} else {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 11560 "BatchImport.c"
	}
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return NULL;
#line 11564 "BatchImport.c"
}


static gchar* value_file_to_prepare_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	FileToPrepare** object_p;
	object_p = collect_values[0].v_pointer;
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!object_p) {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 11575 "BatchImport.c"
	}
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!value->data[0].v_pointer) {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = NULL;
#line 11581 "BatchImport.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = value->data[0].v_pointer;
#line 11585 "BatchImport.c"
	} else {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = file_to_prepare_ref (value->data[0].v_pointer);
#line 11589 "BatchImport.c"
	}
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return NULL;
#line 11593 "BatchImport.c"
}


GParamSpec* param_spec_file_to_prepare (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ParamSpecFileToPrepare* spec;
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (g_type_is_a (object_type, TYPE_FILE_TO_PREPARE), NULL);
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return G_PARAM_SPEC (spec);
#line 11607 "BatchImport.c"
}


gpointer value_get_file_to_prepare (const GValue* value) {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_FILE_TO_PREPARE), NULL);
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return value->data[0].v_pointer;
#line 11616 "BatchImport.c"
}


void value_set_file_to_prepare (GValue* value, gpointer v_object) {
	FileToPrepare* old;
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_FILE_TO_PREPARE));
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	old = value->data[0].v_pointer;
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (v_object) {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_FILE_TO_PREPARE));
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = v_object;
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		file_to_prepare_ref (value->data[0].v_pointer);
#line 11636 "BatchImport.c"
	} else {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 11640 "BatchImport.c"
	}
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (old) {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		file_to_prepare_unref (old);
#line 11646 "BatchImport.c"
	}
}


void value_take_file_to_prepare (GValue* value, gpointer v_object) {
	FileToPrepare* old;
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_FILE_TO_PREPARE));
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	old = value->data[0].v_pointer;
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (v_object) {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_FILE_TO_PREPARE));
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = v_object;
#line 11665 "BatchImport.c"
	} else {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 11669 "BatchImport.c"
	}
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (old) {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		file_to_prepare_unref (old);
#line 11675 "BatchImport.c"
	}
}


static void file_to_prepare_class_init (FileToPrepareClass * klass) {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	file_to_prepare_parent_class = g_type_class_peek_parent (klass);
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((FileToPrepareClass *) klass)->finalize = file_to_prepare_finalize;
#line 11685 "BatchImport.c"
}


static void file_to_prepare_instance_init (FileToPrepare * self) {
#line 1415 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->associated = NULL;
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->ref_count = 1;
#line 11694 "BatchImport.c"
}


static void file_to_prepare_finalize (FileToPrepare* obj) {
	FileToPrepare * self;
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_FILE_TO_PREPARE, FileToPrepare);
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_signal_handlers_destroy (self);
#line 1412 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_job_unref0 (self->job);
#line 1413 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->file);
#line 1415 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_file_to_prepare_unref0 (self->associated);
#line 11710 "BatchImport.c"
}


GType file_to_prepare_get_type (void) {
	static volatile gsize file_to_prepare_type_id__volatile = 0;
	if (g_once_init_enter (&file_to_prepare_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { value_file_to_prepare_init, value_file_to_prepare_free_value, value_file_to_prepare_copy_value, value_file_to_prepare_peek_pointer, "p", value_file_to_prepare_collect_value, "p", value_file_to_prepare_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (FileToPrepareClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) file_to_prepare_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FileToPrepare), 0, (GInstanceInitFunc) file_to_prepare_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 file_to_prepare_type_id;
		file_to_prepare_type_id = g_type_register_fundamental (g_type_fundamental_next (), "FileToPrepare", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&file_to_prepare_type_id__volatile, file_to_prepare_type_id);
	}
	return file_to_prepare_type_id__volatile;
}


gpointer file_to_prepare_ref (gpointer instance) {
	FileToPrepare* self;
	self = instance;
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_atomic_int_inc (&self->ref_count);
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return instance;
#line 11735 "BatchImport.c"
}


void file_to_prepare_unref (gpointer instance) {
	FileToPrepare* self;
	self = instance;
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		FILE_TO_PREPARE_GET_CLASS (self)->finalize (self);
#line 1411 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 11748 "BatchImport.c"
	}
}


WorkSniffer* work_sniffer_construct (GType object_type, BatchImport* owner, GeeIterable* jobs, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancellation, void* cancellation_target, GeeHashSet* skipset) {
	WorkSniffer* self = NULL;
	BatchImport* _tmp0_ = NULL;
	CompletionCallback _tmp1_ = NULL;
	void* _tmp1__target = NULL;
	GCancellable* _tmp2_ = NULL;
	CancellationCallback _tmp3_ = NULL;
	void* _tmp3__target = NULL;
	GeeIterable* _tmp4_ = NULL;
	GeeIterable* _tmp5_ = NULL;
	GeeHashSet* _tmp6_ = NULL;
	GeeHashSet* _tmp7_ = NULL;
#line 1453 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT (owner), NULL);
#line 1453 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (GEE_IS_ITERABLE (jobs), NULL);
#line 1453 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (G_IS_CANCELLABLE (cancellable), NULL);
#line 1453 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail ((skipset == NULL) || GEE_IS_HASH_SET (skipset), NULL);
#line 1455 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = owner;
#line 1455 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = callback;
#line 1455 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1__target = callback_target;
#line 1455 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = cancellable;
#line 1455 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = cancellation;
#line 1455 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3__target = cancellation_target;
#line 1455 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = (WorkSniffer*) background_import_job_construct (object_type, _tmp0_, _tmp1_, _tmp1__target, _tmp2_, _tmp3_, _tmp3__target);
#line 1457 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = jobs;
#line 1457 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = _g_object_ref0 (_tmp4_);
#line 1457 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->jobs);
#line 1457 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->jobs = _tmp5_;
#line 1458 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = skipset;
#line 1458 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp7_ = _g_object_ref0 (_tmp6_);
#line 1458 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->skipset);
#line 1458 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->skipset = _tmp7_;
#line 1453 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self;
#line 11805 "BatchImport.c"
}


WorkSniffer* work_sniffer_new (BatchImport* owner, GeeIterable* jobs, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancellation, void* cancellation_target, GeeHashSet* skipset) {
#line 1453 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return work_sniffer_construct (TYPE_WORK_SNIFFER, owner, jobs, callback, callback_target, cancellable, cancellation, cancellation_target, skipset);
#line 11812 "BatchImport.c"
}


static gint __lambda11_ (WorkSniffer* self, FileToPrepare* a, FileToPrepare* b) {
	gint result = 0;
	FileToPrepare* file_a = NULL;
	FileToPrepare* _tmp0_ = NULL;
	FileToPrepare* _tmp1_ = NULL;
	FileToPrepare* file_b = NULL;
	FileToPrepare* _tmp2_ = NULL;
	FileToPrepare* _tmp3_ = NULL;
	gchar* sa = NULL;
	gchar* _tmp4_ = NULL;
	gchar* sb = NULL;
	gchar* _tmp5_ = NULL;
	gint _tmp6_ = 0;
#line 1493 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_FILE_TO_PREPARE (a), 0);
#line 1493 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_FILE_TO_PREPARE (b), 0);
#line 1494 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = a;
#line 1494 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = _file_to_prepare_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_FILE_TO_PREPARE, FileToPrepare));
#line 1494 "/home/jens/Source/shotwell/src/BatchImport.vala"
	file_a = _tmp1_;
#line 1495 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = b;
#line 1495 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = _file_to_prepare_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_FILE_TO_PREPARE, FileToPrepare));
#line 1495 "/home/jens/Source/shotwell/src/BatchImport.vala"
	file_b = _tmp3_;
#line 1496 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = file_to_prepare_get_path (file_a);
#line 1496 "/home/jens/Source/shotwell/src/BatchImport.vala"
	sa = _tmp4_;
#line 1497 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = file_to_prepare_get_path (file_b);
#line 1497 "/home/jens/Source/shotwell/src/BatchImport.vala"
	sb = _tmp5_;
#line 1498 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = utf8_cs_compare (sa, sb);
#line 1498 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _tmp6_;
#line 1498 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (sb);
#line 1498 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (sa);
#line 1498 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_file_to_prepare_unref0 (file_b);
#line 1498 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_file_to_prepare_unref0 (file_a);
#line 1498 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 11867 "BatchImport.c"
}


static gint ___lambda11__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
	gint result;
	result = __lambda11_ ((WorkSniffer*) self, (FileToPrepare*) a, (FileToPrepare*) b);
#line 1493 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 11876 "BatchImport.c"
}


static void work_sniffer_real_execute (BackgroundJob* base) {
	WorkSniffer * self;
	GeeList* sorted = NULL;
	GeeArrayList* _tmp26_ = NULL;
	GeeList* _tmp42_ = NULL;
	GError * _inner_error_ = NULL;
#line 1461 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_WORK_SNIFFER, WorkSniffer);
#line 11888 "BatchImport.c"
	{
		GeeIterator* _job_it = NULL;
		GeeIterable* _tmp0_ = NULL;
		GeeIterator* _tmp1_ = NULL;
#line 1465 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = self->priv->jobs;
#line 1465 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp1_ = gee_iterable_iterator (_tmp0_);
#line 1465 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_job_it = _tmp1_;
#line 1465 "/home/jens/Source/shotwell/src/BatchImport.vala"
		while (TRUE) {
#line 11901 "BatchImport.c"
			GeeIterator* _tmp2_ = NULL;
			gboolean _tmp3_ = FALSE;
			BatchImportJob* job = NULL;
			GeeIterator* _tmp4_ = NULL;
			gpointer _tmp5_ = NULL;
			ImportResult _result_ = 0;
			ImportResult _tmp6_ = 0;
			ImportResult _tmp7_ = 0;
			gboolean _tmp25_ = FALSE;
#line 1465 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp2_ = _job_it;
#line 1465 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp3_ = gee_iterator_next (_tmp2_);
#line 1465 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (!_tmp3_) {
#line 1465 "/home/jens/Source/shotwell/src/BatchImport.vala"
				break;
#line 11919 "BatchImport.c"
			}
#line 1465 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp4_ = _job_it;
#line 1465 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp5_ = gee_iterator_get (_tmp4_);
#line 1465 "/home/jens/Source/shotwell/src/BatchImport.vala"
			job = (BatchImportJob*) _tmp5_;
#line 1466 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp6_ = background_import_job_abort_check (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_IMPORT_JOB, BackgroundImportJob));
#line 1466 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_result_ = _tmp6_;
#line 1467 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp7_ = _result_;
#line 1467 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp7_ != IMPORT_RESULT_SUCCESS) {
#line 11935 "BatchImport.c"
				BatchImportJob* _tmp8_ = NULL;
				BatchImportJob* _tmp9_ = NULL;
				gchar* _tmp10_ = NULL;
				gchar* _tmp11_ = NULL;
				BatchImportJob* _tmp12_ = NULL;
				gchar* _tmp13_ = NULL;
				gchar* _tmp14_ = NULL;
				ImportResult _tmp15_ = 0;
#line 1468 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp8_ = job;
#line 1468 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp9_ = job;
#line 1468 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp10_ = batch_import_job_get_source_identifier (_tmp9_);
#line 1468 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp11_ = _tmp10_;
#line 1468 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp12_ = job;
#line 1468 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp13_ = batch_import_job_get_dest_identifier (_tmp12_);
#line 1468 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp14_ = _tmp13_;
#line 1468 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp15_ = _result_;
#line 1468 "/home/jens/Source/shotwell/src/BatchImport.vala"
				background_import_job_report_failure (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_IMPORT_JOB, BackgroundImportJob), _tmp8_, NULL, _tmp11_, _tmp14_, _tmp15_);
#line 1468 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp14_);
#line 1468 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp11_);
#line 1471 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_batch_import_job_unref0 (job);
#line 1471 "/home/jens/Source/shotwell/src/BatchImport.vala"
				continue;
#line 11970 "BatchImport.c"
			}
			{
				BatchImportJob* _tmp16_ = NULL;
#line 1475 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp16_ = job;
#line 1475 "/home/jens/Source/shotwell/src/BatchImport.vala"
				work_sniffer_sniff_job (self, _tmp16_, &_inner_error_);
#line 1475 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 11980 "BatchImport.c"
					goto __catch416_g_error;
				}
			}
			goto __finally416;
			__catch416_g_error:
			{
				GError* err = NULL;
				BatchImportJob* _tmp17_ = NULL;
				BatchImportJob* _tmp18_ = NULL;
				gchar* _tmp19_ = NULL;
				gchar* _tmp20_ = NULL;
				BatchImportJob* _tmp21_ = NULL;
				gchar* _tmp22_ = NULL;
				gchar* _tmp23_ = NULL;
				GError* _tmp24_ = NULL;
#line 1474 "/home/jens/Source/shotwell/src/BatchImport.vala"
				err = _inner_error_;
#line 1474 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_inner_error_ = NULL;
#line 1477 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp17_ = job;
#line 1477 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp18_ = job;
#line 1477 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp19_ = batch_import_job_get_source_identifier (_tmp18_);
#line 1477 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp20_ = _tmp19_;
#line 1477 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp21_ = job;
#line 1477 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp22_ = batch_import_job_get_dest_identifier (_tmp21_);
#line 1477 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp23_ = _tmp22_;
#line 1477 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp24_ = err;
#line 1477 "/home/jens/Source/shotwell/src/BatchImport.vala"
				background_import_job_report_error (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_IMPORT_JOB, BackgroundImportJob), _tmp17_, NULL, _tmp20_, _tmp23_, _tmp24_, IMPORT_RESULT_FILE_ERROR);
#line 1477 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp23_);
#line 1477 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp20_);
#line 1474 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_error_free0 (err);
#line 12024 "BatchImport.c"
			}
			__finally416:
#line 1474 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1474 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_batch_import_job_unref0 (job);
#line 1474 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_job_it);
#line 1474 "/home/jens/Source/shotwell/src/BatchImport.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 1474 "/home/jens/Source/shotwell/src/BatchImport.vala"
				g_clear_error (&_inner_error_);
#line 1474 "/home/jens/Source/shotwell/src/BatchImport.vala"
				return;
#line 12039 "BatchImport.c"
			}
#line 1481 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp25_ = background_job_is_cancelled (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_JOB, BackgroundJob));
#line 1481 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp25_) {
#line 1482 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_batch_import_job_unref0 (job);
#line 1482 "/home/jens/Source/shotwell/src/BatchImport.vala"
				break;
#line 12049 "BatchImport.c"
			}
#line 1465 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_batch_import_job_unref0 (job);
#line 12053 "BatchImport.c"
		}
#line 1465 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_job_it);
#line 12057 "BatchImport.c"
	}
#line 1488 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp26_ = gee_array_list_new (TYPE_FILE_TO_PREPARE, (GBoxedCopyFunc) file_to_prepare_ref, (GDestroyNotify) file_to_prepare_unref, NULL, NULL, NULL);
#line 1488 "/home/jens/Source/shotwell/src/BatchImport.vala"
	sorted = G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_LIST, GeeList);
#line 12063 "BatchImport.c"
	{
		GeeList* _ftp_list = NULL;
		GeeList* _tmp27_ = NULL;
		GeeList* _tmp28_ = NULL;
		gint _ftp_size = 0;
		GeeList* _tmp29_ = NULL;
		gint _tmp30_ = 0;
		gint _tmp31_ = 0;
		gint _ftp_index = 0;
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp27_ = self->files_to_prepare;
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp28_ = _g_object_ref0 (_tmp27_);
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_ftp_list = _tmp28_;
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp29_ = _ftp_list;
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp30_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp31_ = _tmp30_;
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_ftp_size = _tmp31_;
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_ftp_index = -1;
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
		while (TRUE) {
#line 12091 "BatchImport.c"
			gint _tmp32_ = 0;
			gint _tmp33_ = 0;
			gint _tmp34_ = 0;
			FileToPrepare* ftp = NULL;
			GeeList* _tmp35_ = NULL;
			gint _tmp36_ = 0;
			gpointer _tmp37_ = NULL;
			FileToPrepare* _tmp38_ = NULL;
			gboolean _tmp39_ = FALSE;
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp32_ = _ftp_index;
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_ftp_index = _tmp32_ + 1;
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp33_ = _ftp_index;
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp34_ = _ftp_size;
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (!(_tmp33_ < _tmp34_)) {
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
				break;
#line 12113 "BatchImport.c"
			}
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp35_ = _ftp_list;
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp36_ = _ftp_index;
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp37_ = gee_list_get (_tmp35_, _tmp36_);
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
			ftp = (FileToPrepare*) _tmp37_;
#line 1490 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp38_ = ftp;
#line 1490 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp39_ = file_to_prepare_is_directory (_tmp38_);
#line 1490 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (!_tmp39_) {
#line 12129 "BatchImport.c"
				GeeList* _tmp40_ = NULL;
				FileToPrepare* _tmp41_ = NULL;
#line 1491 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp40_ = sorted;
#line 1491 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp41_ = ftp;
#line 1491 "/home/jens/Source/shotwell/src/BatchImport.vala"
				gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, GEE_TYPE_COLLECTION, GeeCollection), _tmp41_);
#line 12138 "BatchImport.c"
			}
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_file_to_prepare_unref0 (ftp);
#line 12142 "BatchImport.c"
		}
#line 1489 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_ftp_list);
#line 12146 "BatchImport.c"
	}
#line 1493 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp42_ = sorted;
#line 1493 "/home/jens/Source/shotwell/src/BatchImport.vala"
	gee_list_sort (_tmp42_, ___lambda11__gcompare_data_func, background_job_ref (self), background_job_unref);
#line 12152 "BatchImport.c"
	{
		gint i = 0;
#line 1503 "/home/jens/Source/shotwell/src/BatchImport.vala"
		i = 0;
#line 12157 "BatchImport.c"
		{
			gboolean _tmp43_ = FALSE;
#line 1503 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp43_ = TRUE;
#line 1503 "/home/jens/Source/shotwell/src/BatchImport.vala"
			while (TRUE) {
#line 12164 "BatchImport.c"
				gint _tmp45_ = 0;
				GeeList* _tmp46_ = NULL;
				gint _tmp47_ = 0;
				gint _tmp48_ = 0;
				gchar* name = NULL;
				gchar* ext = NULL;
				FileToPrepare* ftp = NULL;
				GeeList* _tmp49_ = NULL;
				gint _tmp50_ = 0;
				gpointer _tmp51_ = NULL;
				FileToPrepare* _tmp52_ = NULL;
				gchar* _tmp53_ = NULL;
				gchar* _tmp54_ = NULL;
				gchar* _tmp55_ = NULL;
				gchar* _tmp56_ = NULL;
				const gchar* _tmp57_ = NULL;
				gboolean _tmp58_ = FALSE;
				RawFileFormatProperties* _tmp59_ = NULL;
				RawFileFormatProperties* _tmp60_ = NULL;
				const gchar* _tmp61_ = NULL;
				gboolean _tmp62_ = FALSE;
				gboolean _tmp63_ = FALSE;
#line 1503 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (!_tmp43_) {
#line 12189 "BatchImport.c"
					gint _tmp44_ = 0;
#line 1503 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp44_ = i;
#line 1503 "/home/jens/Source/shotwell/src/BatchImport.vala"
					i = _tmp44_ + 1;
#line 12195 "BatchImport.c"
				}
#line 1503 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp43_ = FALSE;
#line 1503 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp45_ = i;
#line 1503 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp46_ = sorted;
#line 1503 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp47_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1503 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp48_ = _tmp47_;
#line 1503 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (!(_tmp45_ < _tmp48_)) {
#line 1503 "/home/jens/Source/shotwell/src/BatchImport.vala"
					break;
#line 12211 "BatchImport.c"
				}
#line 1505 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp49_ = sorted;
#line 1505 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp50_ = i;
#line 1505 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp51_ = gee_list_get (_tmp49_, _tmp50_);
#line 1505 "/home/jens/Source/shotwell/src/BatchImport.vala"
				ftp = (FileToPrepare*) _tmp51_;
#line 1506 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp52_ = ftp;
#line 1506 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp53_ = file_to_prepare_get_basename (_tmp52_);
#line 1506 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp54_ = _tmp53_;
#line 1506 "/home/jens/Source/shotwell/src/BatchImport.vala"
				disassemble_filename (_tmp54_, &_tmp55_, &_tmp56_);
#line 1506 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (name);
#line 1506 "/home/jens/Source/shotwell/src/BatchImport.vala"
				name = _tmp55_;
#line 1506 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (ext);
#line 1506 "/home/jens/Source/shotwell/src/BatchImport.vala"
				ext = _tmp56_;
#line 1506 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp54_);
#line 1508 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp57_ = ext;
#line 1508 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp58_ = is_string_empty (_tmp57_);
#line 1508 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (_tmp58_) {
#line 1509 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_file_to_prepare_unref0 (ftp);
#line 1509 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_free0 (ext);
#line 1509 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_free0 (name);
#line 1509 "/home/jens/Source/shotwell/src/BatchImport.vala"
					continue;
#line 12253 "BatchImport.c"
				}
#line 1511 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp59_ = raw_file_format_properties_get_instance ();
#line 1511 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp60_ = _tmp59_;
#line 1511 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp61_ = ext;
#line 1511 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp62_ = photo_file_format_properties_is_recognized_extension (G_TYPE_CHECK_INSTANCE_CAST (_tmp60_, TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatProperties), _tmp61_);
#line 1511 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp63_ = _tmp62_;
#line 1511 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_photo_file_format_properties_unref0 (_tmp60_);
#line 1511 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (_tmp63_) {
#line 12269 "BatchImport.c"
					gboolean _tmp64_ = FALSE;
					gint _tmp65_ = 0;
#line 1514 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp65_ = i;
#line 1514 "/home/jens/Source/shotwell/src/BatchImport.vala"
					if (_tmp65_ > 0) {
#line 12276 "BatchImport.c"
						FileToPrepare* _tmp66_ = NULL;
						GeeList* _tmp67_ = NULL;
						gint _tmp68_ = 0;
						gpointer _tmp69_ = NULL;
						FileToPrepare* _tmp70_ = NULL;
						gboolean _tmp71_ = FALSE;
#line 1514 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp66_ = ftp;
#line 1514 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp67_ = sorted;
#line 1514 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp68_ = i;
#line 1514 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp69_ = gee_list_get (_tmp67_, _tmp68_ - 1);
#line 1514 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp70_ = (FileToPrepare*) _tmp69_;
#line 1514 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp71_ = work_sniffer_is_paired (self, _tmp66_, _tmp70_);
#line 1514 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp64_ = _tmp71_;
#line 1514 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_file_to_prepare_unref0 (_tmp70_);
#line 12299 "BatchImport.c"
					} else {
#line 1514 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp64_ = FALSE;
#line 12303 "BatchImport.c"
					}
#line 1514 "/home/jens/Source/shotwell/src/BatchImport.vala"
					if (_tmp64_) {
#line 12307 "BatchImport.c"
						FileToPrepare* associated_file = NULL;
						GeeList* _tmp72_ = NULL;
						gint _tmp73_ = 0;
						gpointer _tmp74_ = NULL;
						GeeList* _tmp75_ = NULL;
						FileToPrepare* _tmp76_ = NULL;
						FileToPrepare* _tmp77_ = NULL;
						FileToPrepare* _tmp78_ = NULL;
#line 1515 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp72_ = sorted;
#line 1515 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp73_ = i;
#line 1515 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp74_ = gee_list_get (_tmp72_, _tmp73_ - 1);
#line 1515 "/home/jens/Source/shotwell/src/BatchImport.vala"
						associated_file = (FileToPrepare*) _tmp74_;
#line 1516 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp75_ = self->files_to_prepare;
#line 1516 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp76_ = associated_file;
#line 1516 "/home/jens/Source/shotwell/src/BatchImport.vala"
						gee_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp75_, GEE_TYPE_COLLECTION, GeeCollection), _tmp76_);
#line 1517 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp77_ = ftp;
#line 1517 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp78_ = associated_file;
#line 1517 "/home/jens/Source/shotwell/src/BatchImport.vala"
						file_to_prepare_set_associated (_tmp77_, _tmp78_);
#line 1514 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_file_to_prepare_unref0 (associated_file);
#line 12338 "BatchImport.c"
					} else {
						gboolean _tmp79_ = FALSE;
						gint _tmp80_ = 0;
						GeeList* _tmp81_ = NULL;
						gint _tmp82_ = 0;
						gint _tmp83_ = 0;
#line 1518 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp80_ = i;
#line 1518 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp81_ = sorted;
#line 1518 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp82_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp81_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1518 "/home/jens/Source/shotwell/src/BatchImport.vala"
						_tmp83_ = _tmp82_;
#line 1518 "/home/jens/Source/shotwell/src/BatchImport.vala"
						if (_tmp80_ < (_tmp83_ - 1)) {
#line 12355 "BatchImport.c"
							FileToPrepare* _tmp84_ = NULL;
							GeeList* _tmp85_ = NULL;
							gint _tmp86_ = 0;
							gpointer _tmp87_ = NULL;
							FileToPrepare* _tmp88_ = NULL;
							gboolean _tmp89_ = FALSE;
#line 1518 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_tmp84_ = ftp;
#line 1518 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_tmp85_ = sorted;
#line 1518 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_tmp86_ = i;
#line 1518 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_tmp87_ = gee_list_get (_tmp85_, _tmp86_ + 1);
#line 1518 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_tmp88_ = (FileToPrepare*) _tmp87_;
#line 1518 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_tmp89_ = work_sniffer_is_paired (self, _tmp84_, _tmp88_);
#line 1518 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_tmp79_ = _tmp89_;
#line 1518 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_file_to_prepare_unref0 (_tmp88_);
#line 12378 "BatchImport.c"
						} else {
#line 1518 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_tmp79_ = FALSE;
#line 12382 "BatchImport.c"
						}
#line 1518 "/home/jens/Source/shotwell/src/BatchImport.vala"
						if (_tmp79_) {
#line 12386 "BatchImport.c"
							FileToPrepare* associated_file = NULL;
							GeeList* _tmp90_ = NULL;
							gint _tmp91_ = 0;
							gpointer _tmp92_ = NULL;
							GeeList* _tmp93_ = NULL;
							FileToPrepare* _tmp94_ = NULL;
							FileToPrepare* _tmp95_ = NULL;
							FileToPrepare* _tmp96_ = NULL;
#line 1519 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_tmp90_ = sorted;
#line 1519 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_tmp91_ = i;
#line 1519 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_tmp92_ = gee_list_get (_tmp90_, _tmp91_ + 1);
#line 1519 "/home/jens/Source/shotwell/src/BatchImport.vala"
							associated_file = (FileToPrepare*) _tmp92_;
#line 1520 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_tmp93_ = self->files_to_prepare;
#line 1520 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_tmp94_ = associated_file;
#line 1520 "/home/jens/Source/shotwell/src/BatchImport.vala"
							gee_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp93_, GEE_TYPE_COLLECTION, GeeCollection), _tmp94_);
#line 1521 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_tmp95_ = ftp;
#line 1521 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_tmp96_ = associated_file;
#line 1521 "/home/jens/Source/shotwell/src/BatchImport.vala"
							file_to_prepare_set_associated (_tmp95_, _tmp96_);
#line 1518 "/home/jens/Source/shotwell/src/BatchImport.vala"
							_file_to_prepare_unref0 (associated_file);
#line 12417 "BatchImport.c"
						}
					}
				}
#line 1503 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_file_to_prepare_unref0 (ftp);
#line 1503 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (ext);
#line 1503 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (name);
#line 12427 "BatchImport.c"
			}
		}
	}
#line 1461 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (sorted);
#line 12433 "BatchImport.c"
}


static gboolean work_sniffer_is_paired (WorkSniffer* self, FileToPrepare* raw, FileToPrepare* maybe_paired) {
	gboolean result = FALSE;
	FileToPrepare* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	FileToPrepare* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
	gchar* name = NULL;
	gchar* ext = NULL;
	gchar* test_name = NULL;
	gchar* test_ext = NULL;
	FileToPrepare* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	gchar* _tmp10_ = NULL;
	gchar* _tmp11_ = NULL;
	JfifFileFormatProperties* _tmp12_ = NULL;
	JfifFileFormatProperties* _tmp13_ = NULL;
	const gchar* _tmp14_ = NULL;
	gboolean _tmp15_ = FALSE;
	gboolean _tmp16_ = FALSE;
	FileToPrepare* _tmp17_ = NULL;
	gchar* _tmp18_ = NULL;
	gchar* _tmp19_ = NULL;
	gchar* _tmp20_ = NULL;
	gchar* _tmp21_ = NULL;
	const gchar* _tmp22_ = NULL;
	const gchar* _tmp23_ = NULL;
#line 1530 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_WORK_SNIFFER (self), FALSE);
#line 1530 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_FILE_TO_PREPARE (raw), FALSE);
#line 1530 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_FILE_TO_PREPARE (maybe_paired), FALSE);
#line 1531 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = raw;
#line 1531 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = file_to_prepare_get_parent_path (_tmp0_);
#line 1531 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = _tmp1_;
#line 1531 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = maybe_paired;
#line 1531 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = file_to_prepare_get_parent_path (_tmp3_);
#line 1531 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = _tmp4_;
#line 1531 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = g_strcmp0 (_tmp2_, _tmp5_) != 0;
#line 1531 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (_tmp5_);
#line 1531 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (_tmp2_);
#line 1531 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp6_) {
#line 1532 "/home/jens/Source/shotwell/src/BatchImport.vala"
		result = FALSE;
#line 1532 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return result;
#line 12497 "BatchImport.c"
	}
#line 1535 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp7_ = maybe_paired;
#line 1535 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp8_ = file_to_prepare_get_basename (_tmp7_);
#line 1535 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp9_ = _tmp8_;
#line 1535 "/home/jens/Source/shotwell/src/BatchImport.vala"
	disassemble_filename (_tmp9_, &_tmp10_, &_tmp11_);
#line 1535 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (test_name);
#line 1535 "/home/jens/Source/shotwell/src/BatchImport.vala"
	test_name = _tmp10_;
#line 1535 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (test_ext);
#line 1535 "/home/jens/Source/shotwell/src/BatchImport.vala"
	test_ext = _tmp11_;
#line 1535 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (_tmp9_);
#line 1537 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp12_ = jfif_file_format_properties_get_instance ();
#line 1537 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp13_ = _tmp12_;
#line 1537 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp14_ = test_ext;
#line 1537 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp15_ = photo_file_format_properties_is_recognized_extension (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatProperties), _tmp14_);
#line 1537 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp16_ = !_tmp15_;
#line 1537 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_photo_file_format_properties_unref0 (_tmp13_);
#line 1537 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp16_) {
#line 1538 "/home/jens/Source/shotwell/src/BatchImport.vala"
		result = FALSE;
#line 1538 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (test_ext);
#line 1538 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (test_name);
#line 1538 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (ext);
#line 1538 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (name);
#line 1538 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return result;
#line 12543 "BatchImport.c"
	}
#line 1540 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp17_ = raw;
#line 1540 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp18_ = file_to_prepare_get_basename (_tmp17_);
#line 1540 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp19_ = _tmp18_;
#line 1540 "/home/jens/Source/shotwell/src/BatchImport.vala"
	disassemble_filename (_tmp19_, &_tmp20_, &_tmp21_);
#line 1540 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (name);
#line 1540 "/home/jens/Source/shotwell/src/BatchImport.vala"
	name = _tmp20_;
#line 1540 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (ext);
#line 1540 "/home/jens/Source/shotwell/src/BatchImport.vala"
	ext = _tmp21_;
#line 1540 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (_tmp19_);
#line 1542 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp22_ = name;
#line 1542 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp23_ = test_name;
#line 1542 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = g_strcmp0 (_tmp22_, _tmp23_) == 0;
#line 1542 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (test_ext);
#line 1542 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (test_name);
#line 1542 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (ext);
#line 1542 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (name);
#line 1542 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 12579 "BatchImport.c"
}


static void work_sniffer_sniff_job (WorkSniffer* self, BatchImportJob* job, GError** error) {
	guint64 size = 0ULL;
	GFile* file_or_dir = NULL;
	gboolean determined_size = FALSE;
	BatchImportJob* _tmp0_ = NULL;
	guint64 _tmp1_ = 0ULL;
	GFile* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	BatchImportJob* _tmp7_ = NULL;
	gboolean _tmp8_ = FALSE;
	GError * _inner_error_ = NULL;
#line 1545 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_WORK_SNIFFER (self));
#line 1545 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT_JOB (job));
#line 1548 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = job;
#line 1548 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = batch_import_job_determine_file_size (_tmp0_, &_tmp1_, &_tmp2_);
#line 1548 "/home/jens/Source/shotwell/src/BatchImport.vala"
	size = _tmp1_;
#line 1548 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (file_or_dir);
#line 1548 "/home/jens/Source/shotwell/src/BatchImport.vala"
	file_or_dir = _tmp2_;
#line 1548 "/home/jens/Source/shotwell/src/BatchImport.vala"
	determined_size = _tmp3_;
#line 1549 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = determined_size;
#line 1549 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp4_) {
#line 12615 "BatchImport.c"
		guint64 _tmp5_ = 0ULL;
		guint64 _tmp6_ = 0ULL;
#line 1550 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp5_ = self->total_bytes;
#line 1550 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ = size;
#line 1550 "/home/jens/Source/shotwell/src/BatchImport.vala"
		self->total_bytes = _tmp5_ + _tmp6_;
#line 12624 "BatchImport.c"
	}
#line 1552 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp7_ = job;
#line 1552 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp8_ = batch_import_job_is_directory (_tmp7_);
#line 1552 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp8_) {
#line 12632 "BatchImport.c"
		GFile* dir = NULL;
		gboolean copy_to_library = FALSE;
		gboolean _tmp9_ = FALSE;
		BatchImportJob* _tmp10_ = NULL;
		GFile* _tmp11_ = NULL;
		gboolean _tmp12_ = FALSE;
		gboolean _tmp13_ = FALSE;
		GFile* _tmp21_ = NULL;
		gboolean _tmp22_ = FALSE;
#line 1557 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp10_ = job;
#line 1557 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp13_ = batch_import_job_prepare (_tmp10_, &_tmp11_, &_tmp12_, &_inner_error_);
#line 1557 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (dir);
#line 1557 "/home/jens/Source/shotwell/src/BatchImport.vala"
		dir = _tmp11_;
#line 1557 "/home/jens/Source/shotwell/src/BatchImport.vala"
		copy_to_library = _tmp12_;
#line 1557 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp9_ = _tmp13_;
#line 1557 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1557 "/home/jens/Source/shotwell/src/BatchImport.vala"
			g_propagate_error (error, _inner_error_);
#line 1557 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (dir);
#line 1557 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (file_or_dir);
#line 1557 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return;
#line 12664 "BatchImport.c"
		}
#line 1557 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (!_tmp9_) {
#line 12668 "BatchImport.c"
			BatchImportJob* _tmp14_ = NULL;
			BatchImportJob* _tmp15_ = NULL;
			gchar* _tmp16_ = NULL;
			gchar* _tmp17_ = NULL;
			BatchImportJob* _tmp18_ = NULL;
			gchar* _tmp19_ = NULL;
			gchar* _tmp20_ = NULL;
#line 1558 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp14_ = job;
#line 1558 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp15_ = job;
#line 1558 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp16_ = batch_import_job_get_source_identifier (_tmp15_);
#line 1558 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp17_ = _tmp16_;
#line 1558 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp18_ = job;
#line 1558 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp19_ = batch_import_job_get_dest_identifier (_tmp18_);
#line 1558 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp20_ = _tmp19_;
#line 1558 "/home/jens/Source/shotwell/src/BatchImport.vala"
			background_import_job_report_failure (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_IMPORT_JOB, BackgroundImportJob), _tmp14_, NULL, _tmp17_, _tmp20_, IMPORT_RESULT_FILE_ERROR);
#line 1558 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (_tmp20_);
#line 1558 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (_tmp17_);
#line 1561 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (dir);
#line 1561 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (file_or_dir);
#line 1561 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return;
#line 12702 "BatchImport.c"
		}
#line 1563 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp21_ = dir;
#line 1563 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp22_ = query_is_directory (_tmp21_);
#line 1563 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_vala_assert (_tmp22_, "query_is_directory(dir)");
#line 12710 "BatchImport.c"
		{
			BatchImportJob* _tmp23_ = NULL;
			GFile* _tmp24_ = NULL;
			gboolean _tmp25_ = FALSE;
			BatchImportJob* _tmp26_ = NULL;
			gboolean _tmp27_ = FALSE;
#line 1566 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp23_ = job;
#line 1566 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp24_ = dir;
#line 1566 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp25_ = copy_to_library;
#line 1566 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp26_ = job;
#line 1566 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp27_ = batch_import_job_recurse (_tmp26_);
#line 1566 "/home/jens/Source/shotwell/src/BatchImport.vala"
			work_sniffer_search_dir (self, _tmp23_, _tmp24_, _tmp25_, _tmp27_, &_inner_error_);
#line 1566 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 12731 "BatchImport.c"
				goto __catch417_g_error;
			}
		}
		goto __finally417;
		__catch417_g_error:
		{
			GError* err = NULL;
			BatchImportJob* _tmp28_ = NULL;
			GFile* _tmp29_ = NULL;
			BatchImportJob* _tmp30_ = NULL;
			gchar* _tmp31_ = NULL;
			gchar* _tmp32_ = NULL;
			GFile* _tmp33_ = NULL;
			gchar* _tmp34_ = NULL;
			gchar* _tmp35_ = NULL;
			GError* _tmp36_ = NULL;
#line 1565 "/home/jens/Source/shotwell/src/BatchImport.vala"
			err = _inner_error_;
#line 1565 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_inner_error_ = NULL;
#line 1568 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp28_ = job;
#line 1568 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp29_ = dir;
#line 1568 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp30_ = job;
#line 1568 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp31_ = batch_import_job_get_source_identifier (_tmp30_);
#line 1568 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp32_ = _tmp31_;
#line 1568 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp33_ = dir;
#line 1568 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp34_ = g_file_get_path (_tmp33_);
#line 1568 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp35_ = _tmp34_;
#line 1568 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp36_ = err;
#line 1568 "/home/jens/Source/shotwell/src/BatchImport.vala"
			background_import_job_report_error (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_IMPORT_JOB, BackgroundImportJob), _tmp28_, _tmp29_, _tmp32_, _tmp35_, _tmp36_, IMPORT_RESULT_FILE_ERROR);
#line 1568 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (_tmp35_);
#line 1568 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (_tmp32_);
#line 1565 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_error_free0 (err);
#line 12778 "BatchImport.c"
		}
		__finally417:
#line 1565 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1565 "/home/jens/Source/shotwell/src/BatchImport.vala"
			g_propagate_error (error, _inner_error_);
#line 1565 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (dir);
#line 1565 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (file_or_dir);
#line 1565 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return;
#line 12791 "BatchImport.c"
		}
#line 1552 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (dir);
#line 12795 "BatchImport.c"
	} else {
		gboolean _tmp37_ = FALSE;
		gboolean _tmp45_ = FALSE;
		gboolean _tmp46_ = FALSE;
		GFile* _tmp47_ = NULL;
		GeeList* _tmp52_ = NULL;
		BatchImportJob* _tmp53_ = NULL;
		FileToPrepare* _tmp54_ = NULL;
		FileToPrepare* _tmp55_ = NULL;
#line 1573 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp37_ = determined_size;
#line 1573 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (!_tmp37_) {
#line 12809 "BatchImport.c"
			guint64 _tmp38_ = 0ULL;
			GFile* _tmp39_ = NULL;
			GCancellable* _tmp40_ = NULL;
			GCancellable* _tmp41_ = NULL;
			guint64 _tmp42_ = 0ULL;
			guint64 _tmp43_ = 0ULL;
			guint64 _tmp44_ = 0ULL;
#line 1574 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp39_ = file_or_dir;
#line 1574 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp40_ = background_job_get_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_JOB, BackgroundJob));
#line 1574 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp41_ = _tmp40_;
#line 1574 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp42_ = query_total_file_size (_tmp39_, _tmp41_, &_inner_error_);
#line 1574 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp43_ = _tmp42_;
#line 1574 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (_tmp41_);
#line 1574 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp38_ = _tmp43_;
#line 1574 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1574 "/home/jens/Source/shotwell/src/BatchImport.vala"
				g_propagate_error (error, _inner_error_);
#line 1574 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (file_or_dir);
#line 1574 "/home/jens/Source/shotwell/src/BatchImport.vala"
				return;
#line 12839 "BatchImport.c"
			}
#line 1574 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp44_ = self->total_bytes;
#line 1574 "/home/jens/Source/shotwell/src/BatchImport.vala"
			self->total_bytes = _tmp44_ + _tmp38_;
#line 12845 "BatchImport.c"
		}
#line 1577 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp47_ = file_or_dir;
#line 1577 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp47_ != NULL) {
#line 12851 "BatchImport.c"
			GeeHashSet* _tmp48_ = NULL;
#line 1577 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp48_ = self->priv->skipset;
#line 1577 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp46_ = _tmp48_ != NULL;
#line 12857 "BatchImport.c"
		} else {
#line 1577 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp46_ = FALSE;
#line 12861 "BatchImport.c"
		}
#line 1577 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp46_) {
#line 12865 "BatchImport.c"
			GeeHashSet* _tmp49_ = NULL;
			GFile* _tmp50_ = NULL;
			gboolean _tmp51_ = FALSE;
#line 1577 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp49_ = self->priv->skipset;
#line 1577 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp50_ = file_or_dir;
#line 1577 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp51_ = gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp50_);
#line 1577 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp45_ = _tmp51_;
#line 12877 "BatchImport.c"
		} else {
#line 1577 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp45_ = FALSE;
#line 12881 "BatchImport.c"
		}
#line 1577 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp45_) {
#line 1578 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (file_or_dir);
#line 1578 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return;
#line 12889 "BatchImport.c"
		}
#line 1581 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp52_ = self->files_to_prepare;
#line 1581 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp53_ = job;
#line 1581 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp54_ = file_to_prepare_new (_tmp53_, NULL, TRUE);
#line 1581 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp55_ = _tmp54_;
#line 1581 "/home/jens/Source/shotwell/src/BatchImport.vala"
		gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, GEE_TYPE_COLLECTION, GeeCollection), _tmp55_);
#line 1581 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_file_to_prepare_unref0 (_tmp55_);
#line 12903 "BatchImport.c"
	}
#line 1545 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (file_or_dir);
#line 12907 "BatchImport.c"
}


void work_sniffer_search_dir (WorkSniffer* self, BatchImportJob* job, GFile* dir, gboolean copy_to_library, gboolean recurse, GError** error) {
	GFileEnumerator* enumerator = NULL;
	GFile* _tmp0_ = NULL;
	GFileEnumerator* _tmp1_ = NULL;
	GFileInfo* info = NULL;
	GError * _inner_error_ = NULL;
#line 1585 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_WORK_SNIFFER (self));
#line 1585 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (IS_BATCH_IMPORT_JOB (job));
#line 1585 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (G_IS_FILE (dir));
#line 1586 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = dir;
#line 1586 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = g_file_enumerate_children (_tmp0_, "standard::*", G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &_inner_error_);
#line 1586 "/home/jens/Source/shotwell/src/BatchImport.vala"
	enumerator = _tmp1_;
#line 1586 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1586 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_propagate_error (error, _inner_error_);
#line 1586 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return;
#line 12935 "BatchImport.c"
	}
#line 1589 "/home/jens/Source/shotwell/src/BatchImport.vala"
	info = NULL;
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
	while (TRUE) {
#line 12941 "BatchImport.c"
		GFileInfo* _tmp2_ = NULL;
		GFileEnumerator* _tmp3_ = NULL;
		GCancellable* _tmp4_ = NULL;
		GCancellable* _tmp5_ = NULL;
		GFileInfo* _tmp6_ = NULL;
		GFileInfo* _tmp7_ = NULL;
		GFileInfo* _tmp8_ = NULL;
		GFileInfo* _tmp9_ = NULL;
		gboolean _tmp10_ = FALSE;
		GFile* child = NULL;
		GFile* _tmp11_ = NULL;
		GFileInfo* _tmp12_ = NULL;
		const gchar* _tmp13_ = NULL;
		GFile* _tmp14_ = NULL;
		GFileType file_type = 0;
		GFileInfo* _tmp15_ = NULL;
		GFileType _tmp16_ = 0;
		GFileType _tmp17_ = 0;
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = enumerator;
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = background_job_get_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_JOB, BackgroundJob));
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp5_ = _tmp4_;
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ = g_file_enumerator_next_file (_tmp3_, _tmp5_, &_inner_error_);
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp7_ = _tmp6_;
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_tmp5_);
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp2_ = _tmp7_;
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
			g_propagate_error (error, _inner_error_);
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (info);
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (enumerator);
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return;
#line 12984 "BatchImport.c"
		}
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp8_ = _tmp2_;
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp2_ = NULL;
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (info);
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
		info = _tmp8_;
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp9_ = info;
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (!(_tmp9_ != NULL)) {
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (_tmp2_);
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
			break;
#line 13002 "BatchImport.c"
		}
#line 1592 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp10_ = background_job_is_cancelled (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_JOB, BackgroundJob));
#line 1592 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp10_) {
#line 1593 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (_tmp2_);
#line 1593 "/home/jens/Source/shotwell/src/BatchImport.vala"
			break;
#line 13012 "BatchImport.c"
		}
#line 1595 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp11_ = dir;
#line 1595 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp12_ = info;
#line 1595 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp13_ = g_file_info_get_name (_tmp12_);
#line 1595 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp14_ = g_file_get_child (_tmp11_, _tmp13_);
#line 1595 "/home/jens/Source/shotwell/src/BatchImport.vala"
		child = _tmp14_;
#line 1596 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp15_ = info;
#line 1596 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp16_ = g_file_info_get_file_type (_tmp15_);
#line 1596 "/home/jens/Source/shotwell/src/BatchImport.vala"
		file_type = _tmp16_;
#line 1598 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp17_ = file_type;
#line 1598 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp17_ == G_FILE_TYPE_DIRECTORY) {
#line 13034 "BatchImport.c"
			gboolean _tmp18_ = FALSE;
			GFileInfo* _tmp19_ = NULL;
			const gchar* _tmp20_ = NULL;
			gboolean _tmp21_ = FALSE;
#line 1599 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp18_ = recurse;
#line 1599 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (!_tmp18_) {
#line 1600 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (child);
#line 1600 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_tmp2_);
#line 1600 "/home/jens/Source/shotwell/src/BatchImport.vala"
				continue;
#line 13049 "BatchImport.c"
			}
#line 1602 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp19_ = info;
#line 1602 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp20_ = g_file_info_get_name (_tmp19_);
#line 1602 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp21_ = g_str_has_prefix (_tmp20_, ".");
#line 1602 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp21_) {
#line 1603 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (child);
#line 1603 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_tmp2_);
#line 1603 "/home/jens/Source/shotwell/src/BatchImport.vala"
				continue;
#line 13065 "BatchImport.c"
			}
			{
				BatchImportJob* _tmp22_ = NULL;
				GFile* _tmp23_ = NULL;
				gboolean _tmp24_ = FALSE;
				gboolean _tmp25_ = FALSE;
#line 1606 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp22_ = job;
#line 1606 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp23_ = child;
#line 1606 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp24_ = copy_to_library;
#line 1606 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp25_ = recurse;
#line 1606 "/home/jens/Source/shotwell/src/BatchImport.vala"
				work_sniffer_search_dir (self, _tmp22_, _tmp23_, _tmp24_, _tmp25_, &_inner_error_);
#line 1606 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 13084 "BatchImport.c"
					goto __catch418_g_error;
				}
			}
			goto __finally418;
			__catch418_g_error:
			{
				GError* err = NULL;
				BatchImportJob* _tmp26_ = NULL;
				GFile* _tmp27_ = NULL;
				GFile* _tmp28_ = NULL;
				gchar* _tmp29_ = NULL;
				gchar* _tmp30_ = NULL;
				GFile* _tmp31_ = NULL;
				gchar* _tmp32_ = NULL;
				gchar* _tmp33_ = NULL;
				GError* _tmp34_ = NULL;
#line 1605 "/home/jens/Source/shotwell/src/BatchImport.vala"
				err = _inner_error_;
#line 1605 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_inner_error_ = NULL;
#line 1608 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp26_ = job;
#line 1608 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp27_ = child;
#line 1608 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp28_ = child;
#line 1608 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp29_ = g_file_get_path (_tmp28_);
#line 1608 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp30_ = _tmp29_;
#line 1608 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp31_ = child;
#line 1608 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp32_ = g_file_get_path (_tmp31_);
#line 1608 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp33_ = _tmp32_;
#line 1608 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp34_ = err;
#line 1608 "/home/jens/Source/shotwell/src/BatchImport.vala"
				background_import_job_report_error (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_IMPORT_JOB, BackgroundImportJob), _tmp26_, _tmp27_, _tmp30_, _tmp33_, _tmp34_, IMPORT_RESULT_FILE_ERROR);
#line 1608 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp33_);
#line 1608 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp30_);
#line 1605 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_error_free0 (err);
#line 13131 "BatchImport.c"
			}
			__finally418:
#line 1605 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1605 "/home/jens/Source/shotwell/src/BatchImport.vala"
				g_propagate_error (error, _inner_error_);
#line 1605 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (child);
#line 1605 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_tmp2_);
#line 1605 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (info);
#line 1605 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (enumerator);
#line 1605 "/home/jens/Source/shotwell/src/BatchImport.vala"
				return;
#line 13148 "BatchImport.c"
			}
		} else {
			GFileType _tmp35_ = 0;
#line 1611 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp35_ = file_type;
#line 1611 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp35_ == G_FILE_TYPE_REGULAR) {
#line 13156 "BatchImport.c"
				gboolean _tmp36_ = FALSE;
				GeeHashSet* _tmp37_ = NULL;
				gboolean _tmp41_ = FALSE;
				gboolean _tmp42_ = FALSE;
				GFile* _tmp43_ = NULL;
				gboolean _tmp44_ = FALSE;
#line 1612 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp37_ = self->priv->skipset;
#line 1612 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (_tmp37_ != NULL) {
#line 13167 "BatchImport.c"
					GeeHashSet* _tmp38_ = NULL;
					GFile* _tmp39_ = NULL;
					gboolean _tmp40_ = FALSE;
#line 1612 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp38_ = self->priv->skipset;
#line 1612 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp39_ = child;
#line 1612 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp40_ = gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp39_);
#line 1612 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp36_ = _tmp40_;
#line 13179 "BatchImport.c"
				} else {
#line 1612 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp36_ = FALSE;
#line 13183 "BatchImport.c"
				}
#line 1612 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (_tmp36_) {
#line 1613 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_object_unref0 (child);
#line 1613 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_object_unref0 (_tmp2_);
#line 1613 "/home/jens/Source/shotwell/src/BatchImport.vala"
					continue;
#line 13193 "BatchImport.c"
				}
#line 1615 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp43_ = child;
#line 1615 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp44_ = photo_is_file_image (_tmp43_);
#line 1615 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (_tmp44_) {
#line 13201 "BatchImport.c"
					GFile* _tmp45_ = NULL;
					gboolean _tmp46_ = FALSE;
#line 1615 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp45_ = child;
#line 1615 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp46_ = photo_file_format_is_file_supported (_tmp45_);
#line 1615 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp42_ = _tmp46_;
#line 13210 "BatchImport.c"
				} else {
#line 1615 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp42_ = FALSE;
#line 13214 "BatchImport.c"
				}
#line 1615 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (_tmp42_) {
#line 1615 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp41_ = TRUE;
#line 13220 "BatchImport.c"
				} else {
					GFile* _tmp47_ = NULL;
					gboolean _tmp48_ = FALSE;
#line 1616 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp47_ = child;
#line 1616 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp48_ = video_reader_is_supported_video_file (_tmp47_);
#line 1616 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp41_ = _tmp48_;
#line 13230 "BatchImport.c"
				}
#line 1615 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (_tmp41_) {
#line 13234 "BatchImport.c"
					guint64 _tmp49_ = 0ULL;
					GFileInfo* _tmp50_ = NULL;
					gint64 _tmp51_ = 0LL;
					GeeList* _tmp52_ = NULL;
					BatchImportJob* _tmp53_ = NULL;
					GFile* _tmp54_ = NULL;
					gboolean _tmp55_ = FALSE;
					FileToPrepare* _tmp56_ = NULL;
					FileToPrepare* _tmp57_ = NULL;
#line 1617 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp49_ = self->total_bytes;
#line 1617 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp50_ = info;
#line 1617 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp51_ = g_file_info_get_size (_tmp50_);
#line 1617 "/home/jens/Source/shotwell/src/BatchImport.vala"
					self->total_bytes = _tmp49_ + _tmp51_;
#line 1618 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp52_ = self->files_to_prepare;
#line 1618 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp53_ = job;
#line 1618 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp54_ = child;
#line 1618 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp55_ = copy_to_library;
#line 1618 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp56_ = file_to_prepare_new (_tmp53_, _tmp54_, _tmp55_);
#line 1618 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp57_ = _tmp56_;
#line 1618 "/home/jens/Source/shotwell/src/BatchImport.vala"
					gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, GEE_TYPE_COLLECTION, GeeCollection), _tmp57_);
#line 1618 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_file_to_prepare_unref0 (_tmp57_);
#line 1620 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_object_unref0 (child);
#line 1620 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_object_unref0 (_tmp2_);
#line 1620 "/home/jens/Source/shotwell/src/BatchImport.vala"
					continue;
#line 13274 "BatchImport.c"
				}
			} else {
				GFile* _tmp58_ = NULL;
				gchar* _tmp59_ = NULL;
				gchar* _tmp60_ = NULL;
				GFileType _tmp61_ = 0;
#line 1623 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp58_ = child;
#line 1623 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp59_ = g_file_get_path (_tmp58_);
#line 1623 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp60_ = _tmp59_;
#line 1623 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp61_ = file_type;
#line 1623 "/home/jens/Source/shotwell/src/BatchImport.vala"
				g_warning ("BatchImport.vala:1623: Ignoring import of %s file type %d", _tmp60_, (gint) _tmp61_);
#line 1623 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp60_);
#line 13293 "BatchImport.c"
			}
		}
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (child);
#line 1590 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_tmp2_);
#line 13300 "BatchImport.c"
	}
#line 1585 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (info);
#line 1585 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (enumerator);
#line 13306 "BatchImport.c"
}


static void work_sniffer_class_init (WorkSnifferClass * klass) {
#line 1446 "/home/jens/Source/shotwell/src/BatchImport.vala"
	work_sniffer_parent_class = g_type_class_peek_parent (klass);
#line 1446 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BackgroundJobClass *) klass)->finalize = work_sniffer_finalize;
#line 1446 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_type_class_add_private (klass, sizeof (WorkSnifferPrivate));
#line 1446 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BackgroundJobClass *) klass)->execute = (void (*)(BackgroundJob*)) work_sniffer_real_execute;
#line 13319 "BatchImport.c"
}


static void work_sniffer_instance_init (WorkSniffer * self) {
	GeeArrayList* _tmp0_ = NULL;
#line 1446 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv = WORK_SNIFFER_GET_PRIVATE (self);
#line 1447 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = gee_array_list_new (TYPE_FILE_TO_PREPARE, (GBoxedCopyFunc) file_to_prepare_ref, (GDestroyNotify) file_to_prepare_unref, NULL, NULL, NULL);
#line 1447 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->files_to_prepare = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_LIST, GeeList);
#line 1448 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->total_bytes = (guint64) 0;
#line 13333 "BatchImport.c"
}


static void work_sniffer_finalize (BackgroundJob* obj) {
	WorkSniffer * self;
#line 1446 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_WORK_SNIFFER, WorkSniffer);
#line 1447 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->files_to_prepare);
#line 1450 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->jobs);
#line 1451 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->skipset);
#line 1446 "/home/jens/Source/shotwell/src/BatchImport.vala"
	BACKGROUND_JOB_CLASS (work_sniffer_parent_class)->finalize (obj);
#line 13349 "BatchImport.c"
}


GType work_sniffer_get_type (void) {
	static volatile gsize work_sniffer_type_id__volatile = 0;
	if (g_once_init_enter (&work_sniffer_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (WorkSnifferClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) work_sniffer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WorkSniffer), 0, (GInstanceInitFunc) work_sniffer_instance_init, NULL };
		GType work_sniffer_type_id;
		work_sniffer_type_id = g_type_register_static (TYPE_BACKGROUND_IMPORT_JOB, "WorkSniffer", &g_define_type_info, 0);
		g_once_init_leave (&work_sniffer_type_id__volatile, work_sniffer_type_id);
	}
	return work_sniffer_type_id__volatile;
}


PreparedFile* prepared_file_construct (GType object_type, BatchImportJob* job, GFile* file, GFile* associated_file, const gchar* source_id, const gchar* dest_id, gboolean copy_to_library, const gchar* exif_md5, const gchar* thumbnail_md5, const gchar* full_md5, PhotoFileFormat file_format, guint64 filesize, gboolean is_video) {
	PreparedFile* self = NULL;
	BatchImportJob* _tmp0_ = NULL;
	BatchImportJob* _tmp1_ = NULL;
	GFile* _tmp2_ = NULL;
	GFile* _tmp3_ = NULL;
	GFile* _tmp4_ = NULL;
	GFile* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	const gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	gboolean _tmp10_ = FALSE;
	const gchar* _tmp11_ = NULL;
	gchar* _tmp12_ = NULL;
	const gchar* _tmp13_ = NULL;
	gchar* _tmp14_ = NULL;
	const gchar* _tmp15_ = NULL;
	gchar* _tmp16_ = NULL;
	PhotoFileFormat _tmp17_ = 0;
	guint64 _tmp18_ = 0ULL;
	gboolean _tmp19_ = FALSE;
#line 1644 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_JOB (job), NULL);
#line 1644 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (G_IS_FILE (file), NULL);
#line 1644 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail ((associated_file == NULL) || G_IS_FILE (associated_file), NULL);
#line 1644 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (source_id != NULL, NULL);
#line 1644 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (dest_id != NULL, NULL);
#line 1644 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = (PreparedFile*) g_type_create_instance (object_type);
#line 1647 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = job;
#line 1647 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = _batch_import_job_ref0 (_tmp0_);
#line 1647 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_job_unref0 (self->job);
#line 1647 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->job = _tmp1_;
#line 1648 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->result = IMPORT_RESULT_SUCCESS;
#line 1649 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = file;
#line 1649 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 1649 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->file);
#line 1649 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->file = _tmp3_;
#line 1650 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = associated_file;
#line 1650 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = _g_object_ref0 (_tmp4_);
#line 1650 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->associated_file);
#line 1650 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->associated_file = _tmp5_;
#line 1651 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = source_id;
#line 1651 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp7_ = g_strdup (_tmp6_);
#line 1651 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (self->source_id);
#line 1651 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->source_id = _tmp7_;
#line 1652 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp8_ = dest_id;
#line 1652 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp9_ = g_strdup (_tmp8_);
#line 1652 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (self->dest_id);
#line 1652 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->dest_id = _tmp9_;
#line 1653 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp10_ = copy_to_library;
#line 1653 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->copy_to_library = _tmp10_;
#line 1654 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp11_ = exif_md5;
#line 1654 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp12_ = g_strdup (_tmp11_);
#line 1654 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (self->exif_md5);
#line 1654 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->exif_md5 = _tmp12_;
#line 1655 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp13_ = thumbnail_md5;
#line 1655 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp14_ = g_strdup (_tmp13_);
#line 1655 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (self->thumbnail_md5);
#line 1655 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->thumbnail_md5 = _tmp14_;
#line 1656 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp15_ = full_md5;
#line 1656 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp16_ = g_strdup (_tmp15_);
#line 1656 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (self->full_md5);
#line 1656 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->full_md5 = _tmp16_;
#line 1657 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp17_ = file_format;
#line 1657 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->file_format = _tmp17_;
#line 1658 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp18_ = filesize;
#line 1658 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->filesize = _tmp18_;
#line 1659 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp19_ = is_video;
#line 1659 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->is_video = _tmp19_;
#line 1644 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self;
#line 13483 "BatchImport.c"
}


PreparedFile* prepared_file_new (BatchImportJob* job, GFile* file, GFile* associated_file, const gchar* source_id, const gchar* dest_id, gboolean copy_to_library, const gchar* exif_md5, const gchar* thumbnail_md5, const gchar* full_md5, PhotoFileFormat file_format, guint64 filesize, gboolean is_video) {
#line 1644 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return prepared_file_construct (TYPE_PREPARED_FILE, job, file, associated_file, source_id, dest_id, copy_to_library, exif_md5, thumbnail_md5, full_md5, file_format, filesize, is_video);
#line 13490 "BatchImport.c"
}


static void value_prepared_file_init (GValue* value) {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	value->data[0].v_pointer = NULL;
#line 13497 "BatchImport.c"
}


static void value_prepared_file_free_value (GValue* value) {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (value->data[0].v_pointer) {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		prepared_file_unref (value->data[0].v_pointer);
#line 13506 "BatchImport.c"
	}
}


static void value_prepared_file_copy_value (const GValue* src_value, GValue* dest_value) {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (src_value->data[0].v_pointer) {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		dest_value->data[0].v_pointer = prepared_file_ref (src_value->data[0].v_pointer);
#line 13516 "BatchImport.c"
	} else {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		dest_value->data[0].v_pointer = NULL;
#line 13520 "BatchImport.c"
	}
}


static gpointer value_prepared_file_peek_pointer (const GValue* value) {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return value->data[0].v_pointer;
#line 13528 "BatchImport.c"
}


static gchar* value_prepared_file_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (collect_values[0].v_pointer) {
#line 13535 "BatchImport.c"
		PreparedFile* object;
		object = collect_values[0].v_pointer;
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (object->parent_instance.g_class == NULL) {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 13542 "BatchImport.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.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 13546 "BatchImport.c"
		}
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = prepared_file_ref (object);
#line 13550 "BatchImport.c"
	} else {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 13554 "BatchImport.c"
	}
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return NULL;
#line 13558 "BatchImport.c"
}


static gchar* value_prepared_file_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	PreparedFile** object_p;
	object_p = collect_values[0].v_pointer;
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!object_p) {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 13569 "BatchImport.c"
	}
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!value->data[0].v_pointer) {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = NULL;
#line 13575 "BatchImport.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = value->data[0].v_pointer;
#line 13579 "BatchImport.c"
	} else {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = prepared_file_ref (value->data[0].v_pointer);
#line 13583 "BatchImport.c"
	}
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return NULL;
#line 13587 "BatchImport.c"
}


GParamSpec* param_spec_prepared_file (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ParamSpecPreparedFile* spec;
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (g_type_is_a (object_type, TYPE_PREPARED_FILE), NULL);
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return G_PARAM_SPEC (spec);
#line 13601 "BatchImport.c"
}


gpointer value_get_prepared_file (const GValue* value) {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PREPARED_FILE), NULL);
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return value->data[0].v_pointer;
#line 13610 "BatchImport.c"
}


void value_set_prepared_file (GValue* value, gpointer v_object) {
	PreparedFile* old;
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PREPARED_FILE));
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	old = value->data[0].v_pointer;
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (v_object) {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PREPARED_FILE));
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = v_object;
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		prepared_file_ref (value->data[0].v_pointer);
#line 13630 "BatchImport.c"
	} else {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 13634 "BatchImport.c"
	}
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (old) {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		prepared_file_unref (old);
#line 13640 "BatchImport.c"
	}
}


void value_take_prepared_file (GValue* value, gpointer v_object) {
	PreparedFile* old;
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PREPARED_FILE));
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	old = value->data[0].v_pointer;
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (v_object) {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PREPARED_FILE));
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = v_object;
#line 13659 "BatchImport.c"
	} else {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 13663 "BatchImport.c"
	}
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (old) {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		prepared_file_unref (old);
#line 13669 "BatchImport.c"
	}
}


static void prepared_file_class_init (PreparedFileClass * klass) {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	prepared_file_parent_class = g_type_class_peek_parent (klass);
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((PreparedFileClass *) klass)->finalize = prepared_file_finalize;
#line 13679 "BatchImport.c"
}


static void prepared_file_instance_init (PreparedFile * self) {
#line 1633 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->associated_file = NULL;
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->ref_count = 1;
#line 13688 "BatchImport.c"
}


static void prepared_file_finalize (PreparedFile* obj) {
	PreparedFile * self;
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PREPARED_FILE, PreparedFile);
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_signal_handlers_destroy (self);
#line 1630 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_job_unref0 (self->job);
#line 1632 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->file);
#line 1633 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->associated_file);
#line 1634 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (self->source_id);
#line 1635 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (self->dest_id);
#line 1637 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (self->exif_md5);
#line 1638 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (self->thumbnail_md5);
#line 1639 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (self->full_md5);
#line 13714 "BatchImport.c"
}


GType prepared_file_get_type (void) {
	static volatile gsize prepared_file_type_id__volatile = 0;
	if (g_once_init_enter (&prepared_file_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { value_prepared_file_init, value_prepared_file_free_value, value_prepared_file_copy_value, value_prepared_file_peek_pointer, "p", value_prepared_file_collect_value, "p", value_prepared_file_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (PreparedFileClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) prepared_file_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PreparedFile), 0, (GInstanceInitFunc) prepared_file_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 prepared_file_type_id;
		prepared_file_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PreparedFile", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&prepared_file_type_id__volatile, prepared_file_type_id);
	}
	return prepared_file_type_id__volatile;
}


gpointer prepared_file_ref (gpointer instance) {
	PreparedFile* self;
	self = instance;
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_atomic_int_inc (&self->ref_count);
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return instance;
#line 13739 "BatchImport.c"
}


void prepared_file_unref (gpointer instance) {
	PreparedFile* self;
	self = instance;
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		PREPARED_FILE_GET_CLASS (self)->finalize (self);
#line 1629 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 13752 "BatchImport.c"
	}
}


PreparedFileCluster* prepared_file_cluster_construct (GType object_type, GeeArrayList* list) {
	PreparedFileCluster* self = NULL;
	GeeArrayList* _tmp0_ = NULL;
	GeeArrayList* _tmp1_ = NULL;
#line 1666 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (GEE_IS_ARRAY_LIST (list), NULL);
#line 1666 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = (PreparedFileCluster*) interlocked_notification_object_construct (object_type);
#line 1667 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = list;
#line 1667 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 1667 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->list);
#line 1667 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->list = _tmp1_;
#line 1666 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self;
#line 13775 "BatchImport.c"
}


PreparedFileCluster* prepared_file_cluster_new (GeeArrayList* list) {
#line 1666 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return prepared_file_cluster_construct (TYPE_PREPARED_FILE_CLUSTER, list);
#line 13782 "BatchImport.c"
}


static void prepared_file_cluster_class_init (PreparedFileClusterClass * klass) {
#line 1663 "/home/jens/Source/shotwell/src/BatchImport.vala"
	prepared_file_cluster_parent_class = g_type_class_peek_parent (klass);
#line 1663 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((NotificationObjectClass *) klass)->finalize = prepared_file_cluster_finalize;
#line 13791 "BatchImport.c"
}


static void prepared_file_cluster_instance_init (PreparedFileCluster * self) {
}


static void prepared_file_cluster_finalize (NotificationObject* obj) {
	PreparedFileCluster * self;
#line 1663 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PREPARED_FILE_CLUSTER, PreparedFileCluster);
#line 1664 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->list);
#line 1663 "/home/jens/Source/shotwell/src/BatchImport.vala"
	NOTIFICATION_OBJECT_CLASS (prepared_file_cluster_parent_class)->finalize (obj);
#line 13807 "BatchImport.c"
}


GType prepared_file_cluster_get_type (void) {
	static volatile gsize prepared_file_cluster_type_id__volatile = 0;
	if (g_once_init_enter (&prepared_file_cluster_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PreparedFileClusterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) prepared_file_cluster_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PreparedFileCluster), 0, (GInstanceInitFunc) prepared_file_cluster_instance_init, NULL };
		GType prepared_file_cluster_type_id;
		prepared_file_cluster_type_id = g_type_register_static (TYPE_INTERLOCKED_NOTIFICATION_OBJECT, "PreparedFileCluster", &g_define_type_info, 0);
		g_once_init_leave (&prepared_file_cluster_type_id__volatile, prepared_file_cluster_type_id);
	}
	return prepared_file_cluster_type_id__volatile;
}


PrepareFilesJob* prepare_files_job_construct (GType object_type, BatchImport* owner, GeeList* files_to_prepare, NotificationCallback notification, void* notification_target, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancellation, void* cancellation_target) {
	PrepareFilesJob* self = NULL;
	BatchImport* _tmp0_ = NULL;
	CompletionCallback _tmp1_ = NULL;
	void* _tmp1__target = NULL;
	GCancellable* _tmp2_ = NULL;
	CancellationCallback _tmp3_ = NULL;
	void* _tmp3__target = NULL;
	GeeList* _tmp4_ = NULL;
	GeeList* _tmp5_ = NULL;
	NotificationCallback _tmp6_ = NULL;
	void* _tmp6__target = NULL;
	GFile* _tmp7_ = NULL;
	gint _tmp8_ = 0;
	gint _tmp9_ = 0;
#line 1684 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT (owner), NULL);
#line 1684 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (GEE_IS_LIST (files_to_prepare), NULL);
#line 1684 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (G_IS_CANCELLABLE (cancellable), NULL);
#line 1687 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = owner;
#line 1687 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = callback;
#line 1687 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1__target = callback_target;
#line 1687 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = cancellable;
#line 1687 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = cancellation;
#line 1687 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3__target = cancellation_target;
#line 1687 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = (PrepareFilesJob*) background_import_job_construct (object_type, _tmp0_, _tmp1_, _tmp1__target, _tmp2_, _tmp3_, _tmp3__target);
#line 1689 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = files_to_prepare;
#line 1689 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = _g_object_ref0 (_tmp4_);
#line 1689 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->files_to_prepare);
#line 1689 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->files_to_prepare = _tmp5_;
#line 1690 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = notification;
#line 1690 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6__target = notification_target;
#line 1690 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->notification = _tmp6_;
#line 1690 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->notification_target = _tmp6__target;
#line 1691 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp7_ = app_dirs_get_import_dir ();
#line 1691 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->library_dir);
#line 1691 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->library_dir = _tmp7_;
#line 1692 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp8_ = prepare_files_job_get_test_variable ("SHOTWELL_FAIL_EVERY");
#line 1692 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->fail_every = _tmp8_;
#line 1693 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp9_ = prepare_files_job_get_test_variable ("SHOTWELL_SKIP_EVERY");
#line 1693 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->skip_every = _tmp9_;
#line 1695 "/home/jens/Source/shotwell/src/BatchImport.vala"
	background_job_set_notification_priority (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_JOB, BackgroundJob), G_PRIORITY_LOW);
#line 1684 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self;
#line 13892 "BatchImport.c"
}


PrepareFilesJob* prepare_files_job_new (BatchImport* owner, GeeList* files_to_prepare, NotificationCallback notification, void* notification_target, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancellation, void* cancellation_target) {
#line 1684 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return prepare_files_job_construct (TYPE_PREPARE_FILES_JOB, owner, files_to_prepare, notification, notification_target, callback, callback_target, cancellable, cancellation, cancellation_target);
#line 13899 "BatchImport.c"
}


static gint prepare_files_job_get_test_variable (const gchar* name) {
	gint result = 0;
	gchar* value = NULL;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gboolean _tmp4_ = FALSE;
	const gchar* _tmp5_ = NULL;
#line 1698 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (name != NULL, 0);
#line 1699 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = name;
#line 1699 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = g_getenv (_tmp0_);
#line 1699 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 1699 "/home/jens/Source/shotwell/src/BatchImport.vala"
	value = _tmp2_;
#line 1701 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = value;
#line 1701 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp5_ == NULL) {
#line 1701 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = TRUE;
#line 13928 "BatchImport.c"
	} else {
		const gchar* _tmp6_ = NULL;
		gint _tmp7_ = 0;
		gint _tmp8_ = 0;
#line 1701 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ = value;
#line 1701 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp7_ = strlen (_tmp6_);
#line 1701 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp8_ = _tmp7_;
#line 1701 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = _tmp8_ == 0;
#line 13941 "BatchImport.c"
	}
#line 1701 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp4_) {
#line 1701 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = 0;
#line 13947 "BatchImport.c"
	} else {
		const gchar* _tmp9_ = NULL;
		gint _tmp10_ = 0;
#line 1701 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp9_ = value;
#line 1701 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp10_ = atoi (_tmp9_);
#line 1701 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = _tmp10_;
#line 13957 "BatchImport.c"
	}
#line 1701 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _tmp3_;
#line 1701 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (value);
#line 1701 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 13965 "BatchImport.c"
}


static void prepare_files_job_real_execute (BackgroundJob* base) {
	PrepareFilesJob * self;
	GTimer* timer = NULL;
	GTimer* _tmp0_ = NULL;
	GeeArrayList* list = NULL;
	GeeArrayList* _tmp1_ = NULL;
	GeeArrayList* _tmp90_ = NULL;
	gint _tmp91_ = 0;
	gint _tmp92_ = 0;
#line 1704 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PREPARE_FILES_JOB, PrepareFilesJob);
#line 1705 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = g_timer_new ();
#line 1705 "/home/jens/Source/shotwell/src/BatchImport.vala"
	timer = _tmp0_;
#line 1707 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = gee_array_list_new (TYPE_PREPARED_FILE, (GBoxedCopyFunc) prepared_file_ref, (GDestroyNotify) prepared_file_unref, NULL, NULL, NULL);
#line 1707 "/home/jens/Source/shotwell/src/BatchImport.vala"
	list = _tmp1_;
#line 13988 "BatchImport.c"
	{
		GeeList* _file_to_prepare_list = NULL;
		GeeList* _tmp2_ = NULL;
		GeeList* _tmp3_ = NULL;
		gint _file_to_prepare_size = 0;
		GeeList* _tmp4_ = NULL;
		gint _tmp5_ = 0;
		gint _tmp6_ = 0;
		gint _file_to_prepare_index = 0;
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp2_ = self->priv->files_to_prepare;
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = _g_object_ref0 (_tmp2_);
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_file_to_prepare_list = _tmp3_;
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = _file_to_prepare_list;
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp5_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ = _tmp5_;
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_file_to_prepare_size = _tmp6_;
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_file_to_prepare_index = -1;
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
		while (TRUE) {
#line 14016 "BatchImport.c"
			gint _tmp7_ = 0;
			gint _tmp8_ = 0;
			gint _tmp9_ = 0;
			FileToPrepare* file_to_prepare = NULL;
			GeeList* _tmp10_ = NULL;
			gint _tmp11_ = 0;
			gpointer _tmp12_ = NULL;
			ImportResult _result_ = 0;
			ImportResult _tmp13_ = 0;
			ImportResult _tmp14_ = 0;
			BatchImportJob* job = NULL;
			FileToPrepare* _tmp26_ = NULL;
			BatchImportJob* _tmp27_ = NULL;
			BatchImportJob* _tmp28_ = NULL;
			GFile* file = NULL;
			FileToPrepare* _tmp29_ = NULL;
			GFile* _tmp30_ = NULL;
			GFile* _tmp31_ = NULL;
			GFile* _tmp32_ = NULL;
			FileToPrepare* _tmp33_ = NULL;
			FileToPrepare* _tmp34_ = NULL;
			GFile* associated = NULL;
			GFile* _tmp38_ = NULL;
			gboolean copy_to_library = FALSE;
			FileToPrepare* _tmp39_ = NULL;
			gboolean _tmp40_ = FALSE;
			GFile* _tmp41_ = NULL;
			gboolean _tmp46_ = FALSE;
			GFile* _tmp47_ = NULL;
			PreparedFile* prepared_file = NULL;
			BatchImportJob* _tmp55_ = NULL;
			GFile* _tmp56_ = NULL;
			GFile* _tmp57_ = NULL;
			gboolean _tmp58_ = FALSE;
			PreparedFile* _tmp59_ = NULL;
			ImportResult _tmp60_ = 0;
			ImportResult _tmp61_ = 0;
			gboolean _tmp74_ = FALSE;
			GeeArrayList* _tmp75_ = NULL;
			gint _tmp76_ = 0;
			gint _tmp77_ = 0;
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp7_ = _file_to_prepare_index;
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_file_to_prepare_index = _tmp7_ + 1;
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp8_ = _file_to_prepare_index;
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp9_ = _file_to_prepare_size;
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (!(_tmp8_ < _tmp9_)) {
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
				break;
#line 14070 "BatchImport.c"
			}
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp10_ = _file_to_prepare_list;
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp11_ = _file_to_prepare_index;
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp12_ = gee_list_get (_tmp10_, _tmp11_);
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
			file_to_prepare = (FileToPrepare*) _tmp12_;
#line 1709 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp13_ = background_import_job_abort_check (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_IMPORT_JOB, BackgroundImportJob));
#line 1709 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_result_ = _tmp13_;
#line 1710 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp14_ = _result_;
#line 1710 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp14_ != IMPORT_RESULT_SUCCESS) {
#line 14088 "BatchImport.c"
				FileToPrepare* _tmp15_ = NULL;
				BatchImportJob* _tmp16_ = NULL;
				FileToPrepare* _tmp17_ = NULL;
				BatchImportJob* _tmp18_ = NULL;
				gchar* _tmp19_ = NULL;
				gchar* _tmp20_ = NULL;
				FileToPrepare* _tmp21_ = NULL;
				BatchImportJob* _tmp22_ = NULL;
				gchar* _tmp23_ = NULL;
				gchar* _tmp24_ = NULL;
				ImportResult _tmp25_ = 0;
#line 1711 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp15_ = file_to_prepare;
#line 1711 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp16_ = _tmp15_->job;
#line 1711 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp17_ = file_to_prepare;
#line 1711 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp18_ = _tmp17_->job;
#line 1711 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp19_ = batch_import_job_get_dest_identifier (_tmp18_);
#line 1711 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp20_ = _tmp19_;
#line 1711 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp21_ = file_to_prepare;
#line 1711 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp22_ = _tmp21_->job;
#line 1711 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp23_ = batch_import_job_get_source_identifier (_tmp22_);
#line 1711 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp24_ = _tmp23_;
#line 1711 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp25_ = _result_;
#line 1711 "/home/jens/Source/shotwell/src/BatchImport.vala"
				background_import_job_report_failure (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_IMPORT_JOB, BackgroundImportJob), _tmp16_, NULL, _tmp20_, _tmp24_, _tmp25_);
#line 1711 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp24_);
#line 1711 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp20_);
#line 1714 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_file_to_prepare_unref0 (file_to_prepare);
#line 1714 "/home/jens/Source/shotwell/src/BatchImport.vala"
				continue;
#line 14132 "BatchImport.c"
			}
#line 1717 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp26_ = file_to_prepare;
#line 1717 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp27_ = _tmp26_->job;
#line 1717 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp28_ = _batch_import_job_ref0 (_tmp27_);
#line 1717 "/home/jens/Source/shotwell/src/BatchImport.vala"
			job = _tmp28_;
#line 1718 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp29_ = file_to_prepare;
#line 1718 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp30_ = _tmp29_->file;
#line 1718 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp31_ = _g_object_ref0 (_tmp30_);
#line 1718 "/home/jens/Source/shotwell/src/BatchImport.vala"
			file = _tmp31_;
#line 1719 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp33_ = file_to_prepare;
#line 1719 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp34_ = _tmp33_->associated;
#line 1719 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp34_ != NULL) {
#line 14156 "BatchImport.c"
				FileToPrepare* _tmp35_ = NULL;
				FileToPrepare* _tmp36_ = NULL;
				GFile* _tmp37_ = NULL;
#line 1719 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp35_ = file_to_prepare;
#line 1719 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp36_ = _tmp35_->associated;
#line 1719 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp37_ = _tmp36_->file;
#line 1719 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp32_ = _tmp37_;
#line 14168 "BatchImport.c"
			} else {
#line 1719 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp32_ = NULL;
#line 14172 "BatchImport.c"
			}
#line 1719 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp38_ = _g_object_ref0 (_tmp32_);
#line 1719 "/home/jens/Source/shotwell/src/BatchImport.vala"
			associated = _tmp38_;
#line 1720 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp39_ = file_to_prepare;
#line 1720 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp40_ = _tmp39_->copy_to_library;
#line 1720 "/home/jens/Source/shotwell/src/BatchImport.vala"
			copy_to_library = _tmp40_;
#line 1723 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp41_ = file;
#line 1723 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp41_ == NULL) {
#line 14188 "BatchImport.c"
				BatchImportJob* _tmp42_ = NULL;
				GFile* _tmp43_ = NULL;
				gboolean _tmp44_ = FALSE;
				gboolean _tmp45_ = FALSE;
#line 1724 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp42_ = job;
#line 1724 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp45_ = prepare_files_job_create_file (self, _tmp42_, &_tmp43_, &_tmp44_);
#line 1724 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (file);
#line 1724 "/home/jens/Source/shotwell/src/BatchImport.vala"
				file = _tmp43_;
#line 1724 "/home/jens/Source/shotwell/src/BatchImport.vala"
				copy_to_library = _tmp44_;
#line 1724 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (!_tmp45_) {
#line 1725 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_object_unref0 (associated);
#line 1725 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_object_unref0 (file);
#line 1725 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_batch_import_job_unref0 (job);
#line 1725 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_file_to_prepare_unref0 (file_to_prepare);
#line 1725 "/home/jens/Source/shotwell/src/BatchImport.vala"
					continue;
#line 14215 "BatchImport.c"
				}
			}
#line 1728 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp47_ = associated;
#line 1728 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp47_ == NULL) {
#line 14222 "BatchImport.c"
				FileToPrepare* _tmp48_ = NULL;
				FileToPrepare* _tmp49_ = NULL;
#line 1728 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp48_ = file_to_prepare;
#line 1728 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp49_ = _tmp48_->associated;
#line 1728 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp46_ = _tmp49_ != NULL;
#line 14231 "BatchImport.c"
			} else {
#line 1728 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp46_ = FALSE;
#line 14235 "BatchImport.c"
			}
#line 1728 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp46_) {
#line 14239 "BatchImport.c"
				FileToPrepare* _tmp50_ = NULL;
				FileToPrepare* _tmp51_ = NULL;
				BatchImportJob* _tmp52_ = NULL;
				GFile* _tmp53_ = NULL;
				gboolean _tmp54_ = FALSE;
#line 1729 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp50_ = file_to_prepare;
#line 1729 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp51_ = _tmp50_->associated;
#line 1729 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp52_ = _tmp51_->job;
#line 1729 "/home/jens/Source/shotwell/src/BatchImport.vala"
				prepare_files_job_create_file (self, _tmp52_, &_tmp53_, &_tmp54_);
#line 1729 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (associated);
#line 1729 "/home/jens/Source/shotwell/src/BatchImport.vala"
				associated = _tmp53_;
#line 1729 "/home/jens/Source/shotwell/src/BatchImport.vala"
				copy_to_library = _tmp54_;
#line 14259 "BatchImport.c"
			}
#line 1733 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp55_ = job;
#line 1733 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp56_ = file;
#line 1733 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp57_ = associated;
#line 1733 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp58_ = copy_to_library;
#line 1733 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp60_ = prepare_files_job_prepare_file (self, _tmp55_, _tmp56_, _tmp57_, _tmp58_, &_tmp59_);
#line 1733 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_prepared_file_unref0 (prepared_file);
#line 1733 "/home/jens/Source/shotwell/src/BatchImport.vala"
			prepared_file = _tmp59_;
#line 1733 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_result_ = _tmp60_;
#line 1734 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp61_ = _result_;
#line 1734 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp61_ == IMPORT_RESULT_SUCCESS) {
#line 14281 "BatchImport.c"
				gint _tmp62_ = 0;
				GeeArrayList* _tmp63_ = NULL;
				PreparedFile* _tmp64_ = NULL;
#line 1735 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp62_ = self->prepared_files;
#line 1735 "/home/jens/Source/shotwell/src/BatchImport.vala"
				self->prepared_files = _tmp62_ + 1;
#line 1736 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp63_ = list;
#line 1736 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp64_ = prepared_file;
#line 1736 "/home/jens/Source/shotwell/src/BatchImport.vala"
				gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp63_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp64_);
#line 14295 "BatchImport.c"
			} else {
				BatchImportJob* _tmp65_ = NULL;
				GFile* _tmp66_ = NULL;
				BatchImportJob* _tmp67_ = NULL;
				gchar* _tmp68_ = NULL;
				gchar* _tmp69_ = NULL;
				GFile* _tmp70_ = NULL;
				gchar* _tmp71_ = NULL;
				gchar* _tmp72_ = NULL;
				ImportResult _tmp73_ = 0;
#line 1738 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp65_ = job;
#line 1738 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp66_ = file;
#line 1738 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp67_ = job;
#line 1738 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp68_ = batch_import_job_get_source_identifier (_tmp67_);
#line 1738 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp69_ = _tmp68_;
#line 1738 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp70_ = file;
#line 1738 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp71_ = g_file_get_path (_tmp70_);
#line 1738 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp72_ = _tmp71_;
#line 1738 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp73_ = _result_;
#line 1738 "/home/jens/Source/shotwell/src/BatchImport.vala"
				background_import_job_report_failure (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_IMPORT_JOB, BackgroundImportJob), _tmp65_, _tmp66_, _tmp69_, _tmp72_, _tmp73_);
#line 1738 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp72_);
#line 1738 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp69_);
#line 14330 "BatchImport.c"
			}
#line 1742 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp75_ = list;
#line 1742 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp76_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp75_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 1742 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp77_ = _tmp76_;
#line 1742 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp77_ >= BATCH_IMPORT_REPORT_EVERY_N_PREPARED_FILES) {
#line 1742 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp74_ = TRUE;
#line 14342 "BatchImport.c"
			} else {
				gboolean _tmp78_ = FALSE;
				GTimer* _tmp79_ = NULL;
				gdouble _tmp80_ = 0.0;
#line 1743 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp79_ = timer;
#line 1743 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp80_ = g_timer_elapsed (_tmp79_, NULL);
#line 1743 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if ((_tmp80_ * 1000.0) > ((gdouble) BATCH_IMPORT_REPORT_PREPARED_FILES_EVERY_N_MSEC)) {
#line 14353 "BatchImport.c"
					GeeArrayList* _tmp81_ = NULL;
					gint _tmp82_ = 0;
					gint _tmp83_ = 0;
#line 1743 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp81_ = list;
#line 1743 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp82_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp81_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 1743 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp83_ = _tmp82_;
#line 1743 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp78_ = _tmp83_ > 0;
#line 14365 "BatchImport.c"
				} else {
#line 1743 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp78_ = FALSE;
#line 14369 "BatchImport.c"
				}
#line 1743 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp74_ = _tmp78_;
#line 14373 "BatchImport.c"
			}
#line 1742 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp74_) {
#line 14377 "BatchImport.c"
				PreparedFileCluster* cluster = NULL;
				GeeArrayList* _tmp84_ = NULL;
				PreparedFileCluster* _tmp85_ = NULL;
				GeeArrayList* _tmp86_ = NULL;
				NotificationCallback _tmp87_ = NULL;
				void* _tmp87__target = NULL;
				PreparedFileCluster* _tmp88_ = NULL;
				GTimer* _tmp89_ = NULL;
#line 1747 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp84_ = list;
#line 1747 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp85_ = prepared_file_cluster_new (_tmp84_);
#line 1747 "/home/jens/Source/shotwell/src/BatchImport.vala"
				cluster = _tmp85_;
#line 1748 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp86_ = gee_array_list_new (TYPE_PREPARED_FILE, (GBoxedCopyFunc) prepared_file_ref, (GDestroyNotify) prepared_file_unref, NULL, NULL, NULL);
#line 1748 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (list);
#line 1748 "/home/jens/Source/shotwell/src/BatchImport.vala"
				list = _tmp86_;
#line 1749 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp87_ = self->priv->notification;
#line 1749 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp87__target = self->priv->notification_target;
#line 1749 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp88_ = cluster;
#line 1749 "/home/jens/Source/shotwell/src/BatchImport.vala"
				background_job_notify (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_JOB, BackgroundJob), _tmp87_, _tmp87__target, G_TYPE_CHECK_INSTANCE_CAST (_tmp88_, TYPE_NOTIFICATION_OBJECT, NotificationObject));
#line 1750 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp89_ = timer;
#line 1750 "/home/jens/Source/shotwell/src/BatchImport.vala"
				g_timer_start (_tmp89_);
#line 1742 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_notification_object_unref0 (cluster);
#line 14412 "BatchImport.c"
			}
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_prepared_file_unref0 (prepared_file);
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (associated);
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (file);
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_batch_import_job_unref0 (job);
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_file_to_prepare_unref0 (file_to_prepare);
#line 14424 "BatchImport.c"
		}
#line 1708 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_file_to_prepare_list);
#line 14428 "BatchImport.c"
	}
#line 1754 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp90_ = list;
#line 1754 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp91_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp90_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 1754 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp92_ = _tmp91_;
#line 1754 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp92_ > 0) {
#line 14438 "BatchImport.c"
		ImportResult _result_ = 0;
		ImportResult _tmp93_ = 0;
		ImportResult _tmp94_ = 0;
#line 1755 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp93_ = background_import_job_abort_check (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_IMPORT_JOB, BackgroundImportJob));
#line 1755 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_result_ = _tmp93_;
#line 1756 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp94_ = _result_;
#line 1756 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp94_ == IMPORT_RESULT_SUCCESS) {
#line 14450 "BatchImport.c"
			NotificationCallback _tmp95_ = NULL;
			void* _tmp95__target = NULL;
			GeeArrayList* _tmp96_ = NULL;
			PreparedFileCluster* _tmp97_ = NULL;
			PreparedFileCluster* _tmp98_ = NULL;
#line 1757 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp95_ = self->priv->notification;
#line 1757 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp95__target = self->priv->notification_target;
#line 1757 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp96_ = list;
#line 1757 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp97_ = prepared_file_cluster_new (_tmp96_);
#line 1757 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp98_ = _tmp97_;
#line 1757 "/home/jens/Source/shotwell/src/BatchImport.vala"
			background_job_notify (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_JOB, BackgroundJob), _tmp95_, _tmp95__target, G_TYPE_CHECK_INSTANCE_CAST (_tmp98_, TYPE_NOTIFICATION_OBJECT, NotificationObject));
#line 1757 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_notification_object_unref0 (_tmp98_);
#line 14470 "BatchImport.c"
		} else {
			gint _tmp99_ = 0;
			GeeArrayList* _tmp100_ = NULL;
			gint _tmp101_ = 0;
			gint _tmp102_ = 0;
			gint _tmp103_ = 0;
			GeeArrayList* _tmp104_ = NULL;
			gint _tmp105_ = 0;
			gint _tmp106_ = 0;
#line 1760 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp99_ = self->prepared_files;
#line 1760 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp100_ = list;
#line 1760 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp101_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp100_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 1760 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp102_ = _tmp101_;
#line 1760 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_vala_assert (_tmp99_ >= _tmp102_, "prepared_files >= list.size");
#line 1761 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp103_ = self->prepared_files;
#line 1761 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp104_ = list;
#line 1761 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp105_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp104_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 1761 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp106_ = _tmp105_;
#line 1761 "/home/jens/Source/shotwell/src/BatchImport.vala"
			self->prepared_files = _tmp103_ - _tmp106_;
#line 14500 "BatchImport.c"
			{
				GeeArrayList* _prepared_file_list = NULL;
				GeeArrayList* _tmp107_ = NULL;
				GeeArrayList* _tmp108_ = NULL;
				gint _prepared_file_size = 0;
				GeeArrayList* _tmp109_ = NULL;
				gint _tmp110_ = 0;
				gint _tmp111_ = 0;
				gint _prepared_file_index = 0;
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp107_ = list;
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp108_ = _g_object_ref0 (_tmp107_);
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_prepared_file_list = _tmp108_;
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp109_ = _prepared_file_list;
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp110_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp109_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp111_ = _tmp110_;
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_prepared_file_size = _tmp111_;
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_prepared_file_index = -1;
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
				while (TRUE) {
#line 14528 "BatchImport.c"
					gint _tmp112_ = 0;
					gint _tmp113_ = 0;
					gint _tmp114_ = 0;
					PreparedFile* prepared_file = NULL;
					GeeArrayList* _tmp115_ = NULL;
					gint _tmp116_ = 0;
					gpointer _tmp117_ = NULL;
					PreparedFile* _tmp118_ = NULL;
					BatchImportJob* _tmp119_ = NULL;
					PreparedFile* _tmp120_ = NULL;
					GFile* _tmp121_ = NULL;
					PreparedFile* _tmp122_ = NULL;
					BatchImportJob* _tmp123_ = NULL;
					gchar* _tmp124_ = NULL;
					gchar* _tmp125_ = NULL;
					PreparedFile* _tmp126_ = NULL;
					GFile* _tmp127_ = NULL;
					gchar* _tmp128_ = NULL;
					gchar* _tmp129_ = NULL;
					ImportResult _tmp130_ = 0;
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp112_ = _prepared_file_index;
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_prepared_file_index = _tmp112_ + 1;
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp113_ = _prepared_file_index;
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp114_ = _prepared_file_size;
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
					if (!(_tmp113_ < _tmp114_)) {
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
						break;
#line 14561 "BatchImport.c"
					}
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp115_ = _prepared_file_list;
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp116_ = _prepared_file_index;
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp117_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp115_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp116_);
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
					prepared_file = (PreparedFile*) _tmp117_;
#line 1764 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp118_ = prepared_file;
#line 1764 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp119_ = _tmp118_->job;
#line 1764 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp120_ = prepared_file;
#line 1764 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp121_ = _tmp120_->file;
#line 1764 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp122_ = prepared_file;
#line 1764 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp123_ = _tmp122_->job;
#line 1764 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp124_ = batch_import_job_get_source_identifier (_tmp123_);
#line 1764 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp125_ = _tmp124_;
#line 1764 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp126_ = prepared_file;
#line 1764 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp127_ = _tmp126_->file;
#line 1764 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp128_ = g_file_get_path (_tmp127_);
#line 1764 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp129_ = _tmp128_;
#line 1764 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_tmp130_ = _result_;
#line 1764 "/home/jens/Source/shotwell/src/BatchImport.vala"
					background_import_job_report_failure (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_IMPORT_JOB, BackgroundImportJob), _tmp119_, _tmp121_, _tmp125_, _tmp129_, _tmp130_);
#line 1764 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_free0 (_tmp129_);
#line 1764 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_free0 (_tmp125_);
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_prepared_file_unref0 (prepared_file);
#line 14605 "BatchImport.c"
				}
#line 1763 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_prepared_file_list);
#line 14609 "BatchImport.c"
			}
		}
	}
#line 1704 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (list);
#line 1704 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_timer_destroy0 (timer);
#line 14617 "BatchImport.c"
}


static gboolean prepare_files_job_create_file (PrepareFilesJob* self, BatchImportJob* job, GFile** file, gboolean* copy_to_library) {
	GFile* _vala_file = NULL;
	gboolean _vala_copy_to_library = FALSE;
	gboolean result = FALSE;
	GError * _inner_error_ = NULL;
#line 1773 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_PREPARE_FILES_JOB (self), FALSE);
#line 1773 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_JOB (job), FALSE);
#line 14630 "BatchImport.c"
	{
		gboolean _tmp0_ = FALSE;
		BatchImportJob* _tmp1_ = NULL;
		GFile* _tmp2_ = NULL;
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_ = FALSE;
#line 1775 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp1_ = job;
#line 1775 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = batch_import_job_prepare (_tmp1_, &_tmp2_, &_tmp3_, &_inner_error_);
#line 1775 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_vala_file);
#line 1775 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_vala_file = _tmp2_;
#line 1775 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_vala_copy_to_library = _tmp3_;
#line 1775 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = _tmp4_;
#line 1775 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 14651 "BatchImport.c"
			goto __catch419_g_error;
		}
#line 1775 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (!_tmp0_) {
#line 14656 "BatchImport.c"
			BatchImportJob* _tmp5_ = NULL;
			BatchImportJob* _tmp6_ = NULL;
			gchar* _tmp7_ = NULL;
			gchar* _tmp8_ = NULL;
			BatchImportJob* _tmp9_ = NULL;
			gchar* _tmp10_ = NULL;
			gchar* _tmp11_ = NULL;
#line 1776 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp5_ = job;
#line 1776 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp6_ = job;
#line 1776 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp7_ = batch_import_job_get_source_identifier (_tmp6_);
#line 1776 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp8_ = _tmp7_;
#line 1776 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp9_ = job;
#line 1776 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp10_ = batch_import_job_get_dest_identifier (_tmp9_);
#line 1776 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp11_ = _tmp10_;
#line 1776 "/home/jens/Source/shotwell/src/BatchImport.vala"
			background_import_job_report_failure (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_IMPORT_JOB, BackgroundImportJob), _tmp5_, NULL, _tmp8_, _tmp11_, IMPORT_RESULT_FILE_ERROR);
#line 1776 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (_tmp11_);
#line 1776 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (_tmp8_);
#line 1779 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = FALSE;
#line 1779 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (file) {
#line 1779 "/home/jens/Source/shotwell/src/BatchImport.vala"
				*file = _vala_file;
#line 14690 "BatchImport.c"
			} else {
#line 1779 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_vala_file);
#line 14694 "BatchImport.c"
			}
#line 1779 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (copy_to_library) {
#line 1779 "/home/jens/Source/shotwell/src/BatchImport.vala"
				*copy_to_library = _vala_copy_to_library;
#line 14700 "BatchImport.c"
			}
#line 1779 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 14704 "BatchImport.c"
		}
	}
	goto __finally419;
	__catch419_g_error:
	{
		GError* err = NULL;
		BatchImportJob* _tmp12_ = NULL;
		BatchImportJob* _tmp13_ = NULL;
		gchar* _tmp14_ = NULL;
		gchar* _tmp15_ = NULL;
		BatchImportJob* _tmp16_ = NULL;
		gchar* _tmp17_ = NULL;
		gchar* _tmp18_ = NULL;
		GError* _tmp19_ = NULL;
#line 1774 "/home/jens/Source/shotwell/src/BatchImport.vala"
		err = _inner_error_;
#line 1774 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_inner_error_ = NULL;
#line 1782 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp12_ = job;
#line 1782 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp13_ = job;
#line 1782 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp14_ = batch_import_job_get_source_identifier (_tmp13_);
#line 1782 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp15_ = _tmp14_;
#line 1782 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp16_ = job;
#line 1782 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp17_ = batch_import_job_get_dest_identifier (_tmp16_);
#line 1782 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp18_ = _tmp17_;
#line 1782 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp19_ = err;
#line 1782 "/home/jens/Source/shotwell/src/BatchImport.vala"
		background_import_job_report_error (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_IMPORT_JOB, BackgroundImportJob), _tmp12_, NULL, _tmp15_, _tmp18_, _tmp19_, IMPORT_RESULT_FILE_ERROR);
#line 1782 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp18_);
#line 1782 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp15_);
#line 1785 "/home/jens/Source/shotwell/src/BatchImport.vala"
		result = FALSE;
#line 1785 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_error_free0 (err);
#line 1785 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (file) {
#line 1785 "/home/jens/Source/shotwell/src/BatchImport.vala"
			*file = _vala_file;
#line 14753 "BatchImport.c"
		} else {
#line 1785 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (_vala_file);
#line 14757 "BatchImport.c"
		}
#line 1785 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (copy_to_library) {
#line 1785 "/home/jens/Source/shotwell/src/BatchImport.vala"
			*copy_to_library = _vala_copy_to_library;
#line 14763 "BatchImport.c"
		}
#line 1785 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return result;
#line 14767 "BatchImport.c"
	}
	__finally419:
#line 1774 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 14772 "BatchImport.c"
		gboolean _tmp20_ = FALSE;
#line 1774 "/home/jens/Source/shotwell/src/BatchImport.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 1774 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_clear_error (&_inner_error_);
#line 1774 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return _tmp20_;
#line 14780 "BatchImport.c"
	}
#line 1787 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = TRUE;
#line 1787 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (file) {
#line 1787 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*file = _vala_file;
#line 14788 "BatchImport.c"
	} else {
#line 1787 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_vala_file);
#line 14792 "BatchImport.c"
	}
#line 1787 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (copy_to_library) {
#line 1787 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*copy_to_library = _vala_copy_to_library;
#line 14798 "BatchImport.c"
	}
#line 1787 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 14802 "BatchImport.c"
}


static ImportResult prepare_files_job_prepare_file (PrepareFilesJob* self, BatchImportJob* job, GFile* file, GFile* associated_file, gboolean copy_to_library, PreparedFile** prepared_file) {
	PreparedFile* _vala_prepared_file = NULL;
	ImportResult result = 0;
	gboolean is_video = FALSE;
	GFile* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
	gint _tmp10_ = 0;
	gint _tmp11_ = 0;
	gint _tmp14_ = 0;
	gchar* exif_only_md5 = NULL;
	gchar* thumbnail_md5 = NULL;
	gchar* full_md5 = NULL;
	PhotoFileFormat file_format = 0;
	GFile* _tmp28_ = NULL;
	PhotoFileFormat _tmp29_ = 0;
	gboolean _tmp30_ = FALSE;
	guint64 filesize = 0ULL;
	gboolean is_in_library_dir = FALSE;
	GFile* _tmp68_ = NULL;
	GFile* _tmp69_ = NULL;
	gboolean _tmp70_ = FALSE;
	gboolean _tmp71_ = FALSE;
	gboolean _tmp72_ = FALSE;
	BatchImportJob* _tmp74_ = NULL;
	GFile* _tmp75_ = NULL;
	GFile* _tmp76_ = NULL;
	BatchImportJob* _tmp77_ = NULL;
	gchar* _tmp78_ = NULL;
	gchar* _tmp79_ = NULL;
	BatchImportJob* _tmp80_ = NULL;
	gchar* _tmp81_ = NULL;
	gchar* _tmp82_ = NULL;
	const gchar* _tmp83_ = NULL;
	const gchar* _tmp84_ = NULL;
	const gchar* _tmp85_ = NULL;
	PhotoFileFormat _tmp86_ = 0;
	guint64 _tmp87_ = 0ULL;
	gboolean _tmp88_ = FALSE;
	PreparedFile* _tmp89_ = NULL;
	GError * _inner_error_ = NULL;
#line 1790 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_PREPARE_FILES_JOB (self), 0);
#line 1790 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_JOB (job), 0);
#line 1790 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (G_IS_FILE (file), 0);
#line 1790 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail ((associated_file == NULL) || G_IS_FILE (associated_file), 0);
#line 1792 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_prepared_file_unref0 (_vala_prepared_file);
#line 1792 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_prepared_file = NULL;
#line 1794 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = file;
#line 1794 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = video_reader_is_supported_video_file (_tmp0_);
#line 1794 "/home/jens/Source/shotwell/src/BatchImport.vala"
	is_video = _tmp1_;
#line 1796 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = is_video;
#line 1796 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!_tmp3_) {
#line 14872 "BatchImport.c"
		GFile* _tmp4_ = NULL;
		gboolean _tmp5_ = FALSE;
#line 1796 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = file;
#line 1796 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp5_ = photo_is_file_image (_tmp4_);
#line 1796 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp2_ = !_tmp5_;
#line 14881 "BatchImport.c"
	} else {
#line 1796 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp2_ = FALSE;
#line 14885 "BatchImport.c"
	}
#line 1796 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp2_) {
#line 1797 "/home/jens/Source/shotwell/src/BatchImport.vala"
		result = IMPORT_RESULT_NOT_AN_IMAGE;
#line 1797 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (prepared_file) {
#line 1797 "/home/jens/Source/shotwell/src/BatchImport.vala"
			*prepared_file = _vala_prepared_file;
#line 14895 "BatchImport.c"
		} else {
#line 1797 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_prepared_file_unref0 (_vala_prepared_file);
#line 14899 "BatchImport.c"
		}
#line 1797 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return result;
#line 14903 "BatchImport.c"
	}
#line 1799 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp7_ = is_video;
#line 1799 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!_tmp7_) {
#line 14909 "BatchImport.c"
		GFile* _tmp8_ = NULL;
		gboolean _tmp9_ = FALSE;
#line 1799 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp8_ = file;
#line 1799 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp9_ = photo_file_format_is_file_supported (_tmp8_);
#line 1799 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ = !_tmp9_;
#line 14918 "BatchImport.c"
	} else {
#line 1799 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ = FALSE;
#line 14922 "BatchImport.c"
	}
#line 1799 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp6_) {
#line 1800 "/home/jens/Source/shotwell/src/BatchImport.vala"
		result = IMPORT_RESULT_UNSUPPORTED_FORMAT;
#line 1800 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (prepared_file) {
#line 1800 "/home/jens/Source/shotwell/src/BatchImport.vala"
			*prepared_file = _vala_prepared_file;
#line 14932 "BatchImport.c"
		} else {
#line 1800 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_prepared_file_unref0 (_vala_prepared_file);
#line 14936 "BatchImport.c"
		}
#line 1800 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return result;
#line 14940 "BatchImport.c"
	}
#line 1802 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp10_ = self->priv->import_file_count;
#line 1802 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->import_file_count = _tmp10_ + 1;
#line 1805 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp11_ = self->priv->fail_every;
#line 1805 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp11_ > 0) {
#line 14950 "BatchImport.c"
		gint _tmp12_ = 0;
		gint _tmp13_ = 0;
#line 1806 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp12_ = self->priv->import_file_count;
#line 1806 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp13_ = self->priv->fail_every;
#line 1806 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if ((_tmp12_ % _tmp13_) == 0) {
#line 1807 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = IMPORT_RESULT_FILE_ERROR;
#line 1807 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (prepared_file) {
#line 1807 "/home/jens/Source/shotwell/src/BatchImport.vala"
				*prepared_file = _vala_prepared_file;
#line 14965 "BatchImport.c"
			} else {
#line 1807 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_prepared_file_unref0 (_vala_prepared_file);
#line 14969 "BatchImport.c"
			}
#line 1807 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 14973 "BatchImport.c"
		}
	}
#line 1811 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp14_ = self->priv->skip_every;
#line 1811 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp14_ > 0) {
#line 14980 "BatchImport.c"
		gint _tmp15_ = 0;
		gint _tmp16_ = 0;
#line 1812 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp15_ = self->priv->import_file_count;
#line 1812 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp16_ = self->priv->skip_every;
#line 1812 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if ((_tmp15_ % _tmp16_) == 0) {
#line 1813 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = IMPORT_RESULT_NOT_A_FILE;
#line 1813 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (prepared_file) {
#line 1813 "/home/jens/Source/shotwell/src/BatchImport.vala"
				*prepared_file = _vala_prepared_file;
#line 14995 "BatchImport.c"
			} else {
#line 1813 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_prepared_file_unref0 (_vala_prepared_file);
#line 14999 "BatchImport.c"
			}
#line 1813 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 15003 "BatchImport.c"
		}
	}
#line 1816 "/home/jens/Source/shotwell/src/BatchImport.vala"
	exif_only_md5 = NULL;
#line 1817 "/home/jens/Source/shotwell/src/BatchImport.vala"
	thumbnail_md5 = NULL;
#line 1818 "/home/jens/Source/shotwell/src/BatchImport.vala"
	full_md5 = NULL;
#line 15012 "BatchImport.c"
	{
		gchar* _tmp17_ = NULL;
		GFile* _tmp18_ = NULL;
		gchar* _tmp19_ = NULL;
		gchar* _tmp20_ = NULL;
#line 1821 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp18_ = file;
#line 1821 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp19_ = md5_file (_tmp18_, &_inner_error_);
#line 1821 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp17_ = _tmp19_;
#line 1821 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 15026 "BatchImport.c"
			goto __catch420_g_error;
		}
#line 1821 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp20_ = _tmp17_;
#line 1821 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp17_ = NULL;
#line 1821 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (full_md5);
#line 1821 "/home/jens/Source/shotwell/src/BatchImport.vala"
		full_md5 = _tmp20_;
#line 1820 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp17_);
#line 15039 "BatchImport.c"
	}
	goto __finally420;
	__catch420_g_error:
	{
		GError* err = NULL;
		GFile* _tmp21_ = NULL;
		gchar* _tmp22_ = NULL;
		gchar* _tmp23_ = NULL;
		GError* _tmp24_ = NULL;
		const gchar* _tmp25_ = NULL;
		GError* _tmp26_ = NULL;
		ImportResult _tmp27_ = 0;
#line 1820 "/home/jens/Source/shotwell/src/BatchImport.vala"
		err = _inner_error_;
#line 1820 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_inner_error_ = NULL;
#line 1826 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp21_ = file;
#line 1826 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp22_ = g_file_get_path (_tmp21_);
#line 1826 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp23_ = _tmp22_;
#line 1826 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp24_ = err;
#line 1826 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp25_ = _tmp24_->message;
#line 1826 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_warning ("BatchImport.vala:1826: Unable to perform MD5 checksum on file %s: %s", _tmp23_, _tmp25_);
#line 1826 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp23_);
#line 1829 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp26_ = err;
#line 1829 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp27_ = import_result_convert_error (_tmp26_, IMPORT_RESULT_FILE_ERROR);
#line 1829 "/home/jens/Source/shotwell/src/BatchImport.vala"
		result = _tmp27_;
#line 1829 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_error_free0 (err);
#line 1829 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (full_md5);
#line 1829 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (thumbnail_md5);
#line 1829 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (exif_only_md5);
#line 1829 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (prepared_file) {
#line 1829 "/home/jens/Source/shotwell/src/BatchImport.vala"
			*prepared_file = _vala_prepared_file;
#line 15088 "BatchImport.c"
		} else {
#line 1829 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_prepared_file_unref0 (_vala_prepared_file);
#line 15092 "BatchImport.c"
		}
#line 1829 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return result;
#line 15096 "BatchImport.c"
	}
	__finally420:
#line 1820 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1820 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (full_md5);
#line 1820 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (thumbnail_md5);
#line 1820 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (exif_only_md5);
#line 1820 "/home/jens/Source/shotwell/src/BatchImport.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 1820 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_clear_error (&_inner_error_);
#line 1820 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return 0;
#line 15113 "BatchImport.c"
	}
#line 1834 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp28_ = file;
#line 1834 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp29_ = photo_file_format_get_by_file_extension (_tmp28_);
#line 1834 "/home/jens/Source/shotwell/src/BatchImport.vala"
	file_format = _tmp29_;
#line 1835 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp30_ = is_video;
#line 1835 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!_tmp30_) {
#line 15125 "BatchImport.c"
		PhotoFileFormat _tmp31_ = 0;
		PhotoFileReader* reader = NULL;
		PhotoFileFormat _tmp35_ = 0;
		GFile* _tmp36_ = NULL;
		gchar* _tmp37_ = NULL;
		gchar* _tmp38_ = NULL;
		PhotoFileReader* _tmp39_ = NULL;
		PhotoFileReader* _tmp40_ = NULL;
		PhotoMetadata* metadata = NULL;
		PhotoMetadata* _tmp50_ = NULL;
#line 1836 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp31_ = file_format;
#line 1836 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp31_ == PHOTO_FILE_FORMAT_UNKNOWN) {
#line 15140 "BatchImport.c"
			GFile* _tmp32_ = NULL;
			gchar* _tmp33_ = NULL;
			gchar* _tmp34_ = NULL;
#line 1837 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp32_ = file;
#line 1837 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp33_ = g_file_get_path (_tmp32_);
#line 1837 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp34_ = _tmp33_;
#line 1837 "/home/jens/Source/shotwell/src/BatchImport.vala"
			g_warning ("BatchImport.vala:1837: Skipping %s: unrecognized file extension", _tmp34_);
#line 1837 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (_tmp34_);
#line 1839 "/home/jens/Source/shotwell/src/BatchImport.vala"
			result = IMPORT_RESULT_UNSUPPORTED_FORMAT;
#line 1839 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (full_md5);
#line 1839 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (thumbnail_md5);
#line 1839 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (exif_only_md5);
#line 1839 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (prepared_file) {
#line 1839 "/home/jens/Source/shotwell/src/BatchImport.vala"
				*prepared_file = _vala_prepared_file;
#line 15166 "BatchImport.c"
			} else {
#line 1839 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_prepared_file_unref0 (_vala_prepared_file);
#line 15170 "BatchImport.c"
			}
#line 1839 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return result;
#line 15174 "BatchImport.c"
		}
#line 1841 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp35_ = file_format;
#line 1841 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp36_ = file;
#line 1841 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp37_ = g_file_get_path (_tmp36_);
#line 1841 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp38_ = _tmp37_;
#line 1841 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp39_ = photo_file_format_create_reader (_tmp35_, _tmp38_);
#line 1841 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp40_ = _tmp39_;
#line 1841 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp38_);
#line 1841 "/home/jens/Source/shotwell/src/BatchImport.vala"
		reader = _tmp40_;
#line 1842 "/home/jens/Source/shotwell/src/BatchImport.vala"
		metadata = NULL;
#line 15194 "BatchImport.c"
		{
			PhotoMetadata* _tmp41_ = NULL;
			PhotoFileReader* _tmp42_ = NULL;
			PhotoMetadata* _tmp43_ = NULL;
			PhotoMetadata* _tmp44_ = NULL;
#line 1844 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp42_ = reader;
#line 1844 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp43_ = photo_file_reader_read_metadata (_tmp42_, &_inner_error_);
#line 1844 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp41_ = _tmp43_;
#line 1844 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 15208 "BatchImport.c"
				goto __catch421_g_error;
			}
#line 1844 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp44_ = _tmp41_;
#line 1844 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp41_ = NULL;
#line 1844 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_media_metadata_unref0 (metadata);
#line 1844 "/home/jens/Source/shotwell/src/BatchImport.vala"
			metadata = _tmp44_;
#line 1843 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_media_metadata_unref0 (_tmp41_);
#line 15221 "BatchImport.c"
		}
		goto __finally421;
		__catch421_g_error:
		{
			GError* err = NULL;
			GFile* _tmp45_ = NULL;
			gchar* _tmp46_ = NULL;
			gchar* _tmp47_ = NULL;
			GError* _tmp48_ = NULL;
			const gchar* _tmp49_ = NULL;
#line 1843 "/home/jens/Source/shotwell/src/BatchImport.vala"
			err = _inner_error_;
#line 1843 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_inner_error_ = NULL;
#line 1846 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp45_ = file;
#line 1846 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp46_ = g_file_get_path (_tmp45_);
#line 1846 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp47_ = _tmp46_;
#line 1846 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp48_ = err;
#line 1846 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp49_ = _tmp48_->message;
#line 1846 "/home/jens/Source/shotwell/src/BatchImport.vala"
			g_warning ("BatchImport.vala:1846: Unable to read metadata for %s (%s): continuing" \
" to attempt import", _tmp47_, _tmp49_);
#line 1846 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (_tmp47_);
#line 1843 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_error_free0 (err);
#line 15252 "BatchImport.c"
		}
		__finally421:
#line 1843 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1843 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_media_metadata_unref0 (metadata);
#line 1843 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_photo_file_adapter_unref0 (reader);
#line 1843 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (full_md5);
#line 1843 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (thumbnail_md5);
#line 1843 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (exif_only_md5);
#line 1843 "/home/jens/Source/shotwell/src/BatchImport.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 1843 "/home/jens/Source/shotwell/src/BatchImport.vala"
			g_clear_error (&_inner_error_);
#line 1843 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return 0;
#line 15273 "BatchImport.c"
		}
#line 1850 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp50_ = metadata;
#line 1850 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp50_ != NULL) {
#line 15279 "BatchImport.c"
			PhotoMetadata* _tmp51_ = NULL;
			gchar* _tmp52_ = NULL;
			PhotoMetadata* _tmp53_ = NULL;
			gchar* _tmp54_ = NULL;
#line 1851 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp51_ = metadata;
#line 1851 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp52_ = photo_metadata_exif_hash (_tmp51_);
#line 1851 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (exif_only_md5);
#line 1851 "/home/jens/Source/shotwell/src/BatchImport.vala"
			exif_only_md5 = _tmp52_;
#line 1852 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp53_ = metadata;
#line 1852 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp54_ = photo_metadata_thumbnail_hash (_tmp53_);
#line 1852 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (thumbnail_md5);
#line 1852 "/home/jens/Source/shotwell/src/BatchImport.vala"
			thumbnail_md5 = _tmp54_;
#line 15300 "BatchImport.c"
		}
#line 1835 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_media_metadata_unref0 (metadata);
#line 1835 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_photo_file_adapter_unref0 (reader);
#line 15306 "BatchImport.c"
	}
#line 1856 "/home/jens/Source/shotwell/src/BatchImport.vala"
	filesize = (guint64) 0;
#line 15310 "BatchImport.c"
	{
		guint64 _tmp55_ = 0ULL;
		GFile* _tmp56_ = NULL;
		GCancellable* _tmp57_ = NULL;
		GCancellable* _tmp58_ = NULL;
		guint64 _tmp59_ = 0ULL;
		guint64 _tmp60_ = 0ULL;
#line 1858 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp56_ = file;
#line 1858 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp57_ = background_job_get_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_JOB, BackgroundJob));
#line 1858 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp58_ = _tmp57_;
#line 1858 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp59_ = query_total_file_size (_tmp56_, _tmp58_, &_inner_error_);
#line 1858 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp60_ = _tmp59_;
#line 1858 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_object_unref0 (_tmp58_);
#line 1858 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp55_ = _tmp60_;
#line 1858 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 15334 "BatchImport.c"
			goto __catch422_g_error;
		}
#line 1858 "/home/jens/Source/shotwell/src/BatchImport.vala"
		filesize = _tmp55_;
#line 15339 "BatchImport.c"
	}
	goto __finally422;
	__catch422_g_error:
	{
		GError* err = NULL;
		GFile* _tmp61_ = NULL;
		gchar* _tmp62_ = NULL;
		gchar* _tmp63_ = NULL;
		GError* _tmp64_ = NULL;
		const gchar* _tmp65_ = NULL;
		GError* _tmp66_ = NULL;
		ImportResult _tmp67_ = 0;
#line 1857 "/home/jens/Source/shotwell/src/BatchImport.vala"
		err = _inner_error_;
#line 1857 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_inner_error_ = NULL;
#line 1860 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp61_ = file;
#line 1860 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp62_ = g_file_get_path (_tmp61_);
#line 1860 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp63_ = _tmp62_;
#line 1860 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp64_ = err;
#line 1860 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp65_ = _tmp64_->message;
#line 1860 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_warning ("BatchImport.vala:1860: Unable to query file size of %s: %s", _tmp63_, _tmp65_);
#line 1860 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp63_);
#line 1862 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp66_ = err;
#line 1862 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp67_ = import_result_convert_error (_tmp66_, IMPORT_RESULT_FILE_ERROR);
#line 1862 "/home/jens/Source/shotwell/src/BatchImport.vala"
		result = _tmp67_;
#line 1862 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_error_free0 (err);
#line 1862 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (full_md5);
#line 1862 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (thumbnail_md5);
#line 1862 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (exif_only_md5);
#line 1862 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (prepared_file) {
#line 1862 "/home/jens/Source/shotwell/src/BatchImport.vala"
			*prepared_file = _vala_prepared_file;
#line 15388 "BatchImport.c"
		} else {
#line 1862 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_prepared_file_unref0 (_vala_prepared_file);
#line 15392 "BatchImport.c"
		}
#line 1862 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return result;
#line 15396 "BatchImport.c"
	}
	__finally422:
#line 1857 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1857 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (full_md5);
#line 1857 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (thumbnail_md5);
#line 1857 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (exif_only_md5);
#line 1857 "/home/jens/Source/shotwell/src/BatchImport.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 1857 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_clear_error (&_inner_error_);
#line 1857 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return 0;
#line 15413 "BatchImport.c"
	}
#line 1866 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp68_ = file;
#line 1866 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp69_ = self->priv->library_dir;
#line 1866 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp70_ = g_file_has_prefix (_tmp68_, _tmp69_);
#line 1866 "/home/jens/Source/shotwell/src/BatchImport.vala"
	is_in_library_dir = _tmp70_;
#line 1870 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp72_ = copy_to_library;
#line 1870 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp72_) {
#line 15427 "BatchImport.c"
		gboolean _tmp73_ = FALSE;
#line 1870 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp73_ = is_in_library_dir;
#line 1870 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp71_ = !_tmp73_;
#line 15433 "BatchImport.c"
	} else {
#line 1870 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp71_ = FALSE;
#line 15437 "BatchImport.c"
	}
#line 1869 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp74_ = job;
#line 1869 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp75_ = file;
#line 1869 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp76_ = associated_file;
#line 1869 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp77_ = job;
#line 1869 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp78_ = batch_import_job_get_source_identifier (_tmp77_);
#line 1869 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp79_ = _tmp78_;
#line 1869 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp80_ = job;
#line 1869 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp81_ = batch_import_job_get_dest_identifier (_tmp80_);
#line 1869 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp82_ = _tmp81_;
#line 1869 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp83_ = exif_only_md5;
#line 1869 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp84_ = thumbnail_md5;
#line 1869 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp85_ = full_md5;
#line 1869 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp86_ = file_format;
#line 1869 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp87_ = filesize;
#line 1869 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp88_ = is_video;
#line 1869 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp89_ = prepared_file_new (_tmp74_, _tmp75_, _tmp76_, _tmp79_, _tmp82_, _tmp71_, _tmp83_, _tmp84_, _tmp85_, _tmp86_, _tmp87_, _tmp88_);
#line 1869 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_prepared_file_unref0 (_vala_prepared_file);
#line 1869 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_prepared_file = _tmp89_;
#line 1869 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (_tmp82_);
#line 1869 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (_tmp79_);
#line 1873 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = IMPORT_RESULT_SUCCESS;
#line 1873 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (full_md5);
#line 1873 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (thumbnail_md5);
#line 1873 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (exif_only_md5);
#line 1873 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (prepared_file) {
#line 1873 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*prepared_file = _vala_prepared_file;
#line 15491 "BatchImport.c"
	} else {
#line 1873 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_prepared_file_unref0 (_vala_prepared_file);
#line 15495 "BatchImport.c"
	}
#line 1873 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 15499 "BatchImport.c"
}


static void prepare_files_job_class_init (PrepareFilesJobClass * klass) {
#line 1671 "/home/jens/Source/shotwell/src/BatchImport.vala"
	prepare_files_job_parent_class = g_type_class_peek_parent (klass);
#line 1671 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BackgroundJobClass *) klass)->finalize = prepare_files_job_finalize;
#line 1671 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_type_class_add_private (klass, sizeof (PrepareFilesJobPrivate));
#line 1671 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BackgroundJobClass *) klass)->execute = (void (*)(BackgroundJob*)) prepare_files_job_real_execute;
#line 15512 "BatchImport.c"
}


static void prepare_files_job_instance_init (PrepareFilesJob * self) {
#line 1671 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv = PREPARE_FILES_JOB_GET_PRIVATE (self);
#line 1673 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->prepared_files = 0;
#line 1680 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->import_file_count = 0;
#line 1681 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->fail_every = 0;
#line 1682 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->skip_every = 0;
#line 15527 "BatchImport.c"
}


static void prepare_files_job_finalize (BackgroundJob* obj) {
	PrepareFilesJob * self;
#line 1671 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PREPARE_FILES_JOB, PrepareFilesJob);
#line 1675 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->files_to_prepare);
#line 1677 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->priv->library_dir);
#line 1671 "/home/jens/Source/shotwell/src/BatchImport.vala"
	BACKGROUND_JOB_CLASS (prepare_files_job_parent_class)->finalize (obj);
#line 15541 "BatchImport.c"
}


GType prepare_files_job_get_type (void) {
	static volatile gsize prepare_files_job_type_id__volatile = 0;
	if (g_once_init_enter (&prepare_files_job_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PrepareFilesJobClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) prepare_files_job_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PrepareFilesJob), 0, (GInstanceInitFunc) prepare_files_job_instance_init, NULL };
		GType prepare_files_job_type_id;
		prepare_files_job_type_id = g_type_register_static (TYPE_BACKGROUND_IMPORT_JOB, "PrepareFilesJob", &g_define_type_info, 0);
		g_once_init_leave (&prepare_files_job_type_id__volatile, prepare_files_job_type_id);
	}
	return prepare_files_job_type_id__volatile;
}


static gpointer _prepared_file_ref0 (gpointer self) {
#line 1894 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self ? prepared_file_ref (self) : NULL;
#line 15560 "BatchImport.c"
}


static gpointer _batch_import_result_ref0 (gpointer self) {
#line 1895 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self ? batch_import_result_ref (self) : NULL;
#line 15567 "BatchImport.c"
}


static gpointer _video_import_params_ref0 (gpointer self) {
#line 1896 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self ? video_import_params_ref (self) : NULL;
#line 15574 "BatchImport.c"
}


static gpointer _photo_import_params_ref0 (gpointer self) {
#line 1897 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self ? photo_import_params_ref (self) : NULL;
#line 15581 "BatchImport.c"
}


ReadyForImport* ready_for_import_construct (GType object_type, GFile* final_file, PreparedFile* prepared_file, PhotoImportParams* photo_import_params, VideoImportParams* video_import_params, BatchImportResult* batch_result) {
	ReadyForImport* self = NULL;
	PreparedFile* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	GFile* _tmp8_ = NULL;
	GFile* _tmp9_ = NULL;
	PreparedFile* _tmp10_ = NULL;
	PreparedFile* _tmp11_ = NULL;
	BatchImportResult* _tmp12_ = NULL;
	BatchImportResult* _tmp13_ = NULL;
	VideoImportParams* _tmp14_ = NULL;
	VideoImportParams* _tmp15_ = NULL;
	PhotoImportParams* _tmp16_ = NULL;
	PhotoImportParams* _tmp17_ = NULL;
	PreparedFile* _tmp18_ = NULL;
	gboolean _tmp19_ = FALSE;
#line 1885 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (G_IS_FILE (final_file), NULL);
#line 1885 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_PREPARED_FILE (prepared_file), NULL);
#line 1885 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail ((photo_import_params == NULL) || IS_PHOTO_IMPORT_PARAMS (photo_import_params), NULL);
#line 1885 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail ((video_import_params == NULL) || IS_VIDEO_IMPORT_PARAMS (video_import_params), NULL);
#line 1885 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_RESULT (batch_result), NULL);
#line 1885 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = (ReadyForImport*) g_type_create_instance (object_type);
#line 1888 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = prepared_file;
#line 1888 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = _tmp0_->is_video;
#line 1888 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp1_) {
#line 15619 "BatchImport.c"
		gboolean _tmp2_ = FALSE;
		VideoImportParams* _tmp3_ = NULL;
#line 1889 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = video_import_params;
#line 1889 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp3_ != NULL) {
#line 15626 "BatchImport.c"
			PhotoImportParams* _tmp4_ = NULL;
#line 1889 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp4_ = photo_import_params;
#line 1889 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp2_ = _tmp4_ == NULL;
#line 15632 "BatchImport.c"
		} else {
#line 1889 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp2_ = FALSE;
#line 15636 "BatchImport.c"
		}
#line 1889 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_vala_assert (_tmp2_, "(video_import_params != null) && (photo_import_params == null)");
#line 15640 "BatchImport.c"
	} else {
		gboolean _tmp5_ = FALSE;
		VideoImportParams* _tmp6_ = NULL;
#line 1891 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ = video_import_params;
#line 1891 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (_tmp6_ == NULL) {
#line 15648 "BatchImport.c"
			PhotoImportParams* _tmp7_ = NULL;
#line 1891 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp7_ = photo_import_params;
#line 1891 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp5_ = _tmp7_ != NULL;
#line 15654 "BatchImport.c"
		} else {
#line 1891 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp5_ = FALSE;
#line 15658 "BatchImport.c"
		}
#line 1891 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_vala_assert (_tmp5_, "(video_import_params == null) && (photo_import_params != null)");
#line 15662 "BatchImport.c"
	}
#line 1893 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp8_ = final_file;
#line 1893 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp9_ = _g_object_ref0 (_tmp8_);
#line 1893 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->final_file);
#line 1893 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->final_file = _tmp9_;
#line 1894 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp10_ = prepared_file;
#line 1894 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp11_ = _prepared_file_ref0 (_tmp10_);
#line 1894 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_prepared_file_unref0 (self->prepared_file);
#line 1894 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->prepared_file = _tmp11_;
#line 1895 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp12_ = batch_result;
#line 1895 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp13_ = _batch_import_result_ref0 (_tmp12_);
#line 1895 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_result_unref0 (self->batch_result);
#line 1895 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->batch_result = _tmp13_;
#line 1896 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp14_ = video_import_params;
#line 1896 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp15_ = _video_import_params_ref0 (_tmp14_);
#line 1896 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_video_import_params_unref0 (self->video_import_params);
#line 1896 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->video_import_params = _tmp15_;
#line 1897 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp16_ = photo_import_params;
#line 1897 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp17_ = _photo_import_params_ref0 (_tmp16_);
#line 1897 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_photo_import_params_unref0 (self->photo_import_params);
#line 1897 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->photo_import_params = _tmp17_;
#line 1898 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp18_ = prepared_file;
#line 1898 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp19_ = _tmp18_->is_video;
#line 1898 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->is_video = _tmp19_;
#line 1885 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self;
#line 15712 "BatchImport.c"
}


ReadyForImport* ready_for_import_new (GFile* final_file, PreparedFile* prepared_file, PhotoImportParams* photo_import_params, VideoImportParams* video_import_params, BatchImportResult* batch_result) {
#line 1885 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return ready_for_import_construct (TYPE_READY_FOR_IMPORT, final_file, prepared_file, photo_import_params, video_import_params, batch_result);
#line 15719 "BatchImport.c"
}


BatchImportResult* ready_for_import_abort (ReadyForImport* self) {
	BatchImportResult* result = NULL;
	gboolean _tmp0_ = FALSE;
	GFile* _tmp1_ = NULL;
	PreparedFile* _tmp14_ = NULL;
	BatchImportJob* _tmp15_ = NULL;
	PreparedFile* _tmp16_ = NULL;
	GFile* _tmp17_ = NULL;
	PreparedFile* _tmp18_ = NULL;
	BatchImportJob* _tmp19_ = NULL;
	gchar* _tmp20_ = NULL;
	gchar* _tmp21_ = NULL;
	PreparedFile* _tmp22_ = NULL;
	BatchImportJob* _tmp23_ = NULL;
	gchar* _tmp24_ = NULL;
	gchar* _tmp25_ = NULL;
	BatchImportResult* _tmp26_ = NULL;
	BatchImportResult* _tmp27_ = NULL;
	BatchImportResult* _tmp28_ = NULL;
	GError * _inner_error_ = NULL;
#line 1901 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_READY_FOR_IMPORT (self), NULL);
#line 1903 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = self->final_file;
#line 1903 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp1_ != NULL) {
#line 15749 "BatchImport.c"
		GFile* _tmp2_ = NULL;
		PreparedFile* _tmp3_ = NULL;
		GFile* _tmp4_ = NULL;
#line 1903 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp2_ = self->final_file;
#line 1903 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = self->prepared_file;
#line 1903 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = _tmp3_->file;
#line 1903 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = _tmp2_ != _tmp4_;
#line 15761 "BatchImport.c"
	} else {
#line 1903 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = FALSE;
#line 15765 "BatchImport.c"
	}
#line 1903 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp0_) {
#line 15769 "BatchImport.c"
		GFile* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
#line 1904 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp5_ = self->final_file;
#line 1904 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ = g_file_get_path (_tmp5_);
#line 1904 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp7_ = _tmp6_;
#line 1904 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_debug ("BatchImport.vala:1904: Deleting aborted import copy %s", _tmp7_);
#line 1904 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp7_);
#line 15783 "BatchImport.c"
		{
			GFile* _tmp8_ = NULL;
#line 1906 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp8_ = self->final_file;
#line 1906 "/home/jens/Source/shotwell/src/BatchImport.vala"
			g_file_delete (_tmp8_, NULL, &_inner_error_);
#line 1906 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 15792 "BatchImport.c"
				goto __catch423_g_error;
			}
		}
		goto __finally423;
		__catch423_g_error:
		{
			GError* err = NULL;
			GFile* _tmp9_ = NULL;
			gchar* _tmp10_ = NULL;
			gchar* _tmp11_ = NULL;
			GError* _tmp12_ = NULL;
			const gchar* _tmp13_ = NULL;
#line 1905 "/home/jens/Source/shotwell/src/BatchImport.vala"
			err = _inner_error_;
#line 1905 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_inner_error_ = NULL;
#line 1908 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp9_ = self->final_file;
#line 1908 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp10_ = g_file_get_path (_tmp9_);
#line 1908 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp11_ = _tmp10_;
#line 1908 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp12_ = err;
#line 1908 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp13_ = _tmp12_->message;
#line 1908 "/home/jens/Source/shotwell/src/BatchImport.vala"
			g_warning ("BatchImport.vala:1908: Unable to delete copy of imported file (aborted" \
" import) %s: %s", _tmp11_, _tmp13_);
#line 1908 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (_tmp11_);
#line 1905 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_error_free0 (err);
#line 15825 "BatchImport.c"
		}
		__finally423:
#line 1905 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1905 "/home/jens/Source/shotwell/src/BatchImport.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 1905 "/home/jens/Source/shotwell/src/BatchImport.vala"
			g_clear_error (&_inner_error_);
#line 1905 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return NULL;
#line 15836 "BatchImport.c"
		}
	}
#line 1913 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp14_ = self->prepared_file;
#line 1913 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp15_ = _tmp14_->job;
#line 1913 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp16_ = self->prepared_file;
#line 1913 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp17_ = _tmp16_->file;
#line 1913 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp18_ = self->prepared_file;
#line 1913 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp19_ = _tmp18_->job;
#line 1913 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp20_ = batch_import_job_get_source_identifier (_tmp19_);
#line 1913 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp21_ = _tmp20_;
#line 1913 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp22_ = self->prepared_file;
#line 1913 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp23_ = _tmp22_->job;
#line 1913 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp24_ = batch_import_job_get_dest_identifier (_tmp23_);
#line 1913 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp25_ = _tmp24_;
#line 1913 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp26_ = batch_import_result_new (_tmp15_, _tmp17_, _tmp21_, _tmp25_, NULL, IMPORT_RESULT_USER_ABORT);
#line 1913 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_result_unref0 (self->batch_result);
#line 1913 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->batch_result = _tmp26_;
#line 1913 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (_tmp25_);
#line 1913 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (_tmp21_);
#line 1917 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp27_ = self->batch_result;
#line 1917 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp28_ = _batch_import_result_ref0 (_tmp27_);
#line 1917 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _tmp28_;
#line 1917 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 15881 "BatchImport.c"
}


static gpointer _thumbnails_ref0 (gpointer self) {
#line 1921 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self ? thumbnails_ref (self) : NULL;
#line 15888 "BatchImport.c"
}


Thumbnails* ready_for_import_get_thumbnails (ReadyForImport* self) {
	Thumbnails* result = NULL;
	Thumbnails* _tmp0_ = NULL;
	PhotoImportParams* _tmp1_ = NULL;
	Thumbnails* _tmp6_ = NULL;
#line 1920 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_READY_FOR_IMPORT (self), NULL);
#line 1921 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = self->photo_import_params;
#line 1921 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp1_ != NULL) {
#line 15903 "BatchImport.c"
		PhotoImportParams* _tmp2_ = NULL;
		Thumbnails* _tmp3_ = NULL;
#line 1921 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp2_ = self->photo_import_params;
#line 1921 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = _tmp2_->thumbnails;
#line 1921 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = _tmp3_;
#line 15912 "BatchImport.c"
	} else {
		VideoImportParams* _tmp4_ = NULL;
		Thumbnails* _tmp5_ = NULL;
#line 1922 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = self->video_import_params;
#line 1922 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp5_ = _tmp4_->thumbnails;
#line 1922 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = _tmp5_;
#line 15922 "BatchImport.c"
	}
#line 1921 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = _thumbnails_ref0 (_tmp0_);
#line 1921 "/home/jens/Source/shotwell/src/BatchImport.vala"
	result = _tmp6_;
#line 1921 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return result;
#line 15930 "BatchImport.c"
}


static void value_ready_for_import_init (GValue* value) {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	value->data[0].v_pointer = NULL;
#line 15937 "BatchImport.c"
}


static void value_ready_for_import_free_value (GValue* value) {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (value->data[0].v_pointer) {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		ready_for_import_unref (value->data[0].v_pointer);
#line 15946 "BatchImport.c"
	}
}


static void value_ready_for_import_copy_value (const GValue* src_value, GValue* dest_value) {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (src_value->data[0].v_pointer) {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		dest_value->data[0].v_pointer = ready_for_import_ref (src_value->data[0].v_pointer);
#line 15956 "BatchImport.c"
	} else {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		dest_value->data[0].v_pointer = NULL;
#line 15960 "BatchImport.c"
	}
}


static gpointer value_ready_for_import_peek_pointer (const GValue* value) {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return value->data[0].v_pointer;
#line 15968 "BatchImport.c"
}


static gchar* value_ready_for_import_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (collect_values[0].v_pointer) {
#line 15975 "BatchImport.c"
		ReadyForImport* object;
		object = collect_values[0].v_pointer;
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (object->parent_instance.g_class == NULL) {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 15982 "BatchImport.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.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 15986 "BatchImport.c"
		}
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = ready_for_import_ref (object);
#line 15990 "BatchImport.c"
	} else {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 15994 "BatchImport.c"
	}
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return NULL;
#line 15998 "BatchImport.c"
}


static gchar* value_ready_for_import_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	ReadyForImport** object_p;
	object_p = collect_values[0].v_pointer;
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!object_p) {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 16009 "BatchImport.c"
	}
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!value->data[0].v_pointer) {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = NULL;
#line 16015 "BatchImport.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = value->data[0].v_pointer;
#line 16019 "BatchImport.c"
	} else {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = ready_for_import_ref (value->data[0].v_pointer);
#line 16023 "BatchImport.c"
	}
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return NULL;
#line 16027 "BatchImport.c"
}


GParamSpec* param_spec_ready_for_import (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ParamSpecReadyForImport* spec;
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (g_type_is_a (object_type, TYPE_READY_FOR_IMPORT), NULL);
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return G_PARAM_SPEC (spec);
#line 16041 "BatchImport.c"
}


gpointer value_get_ready_for_import (const GValue* value) {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_READY_FOR_IMPORT), NULL);
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return value->data[0].v_pointer;
#line 16050 "BatchImport.c"
}


void value_set_ready_for_import (GValue* value, gpointer v_object) {
	ReadyForImport* old;
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_READY_FOR_IMPORT));
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	old = value->data[0].v_pointer;
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (v_object) {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_READY_FOR_IMPORT));
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = v_object;
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		ready_for_import_ref (value->data[0].v_pointer);
#line 16070 "BatchImport.c"
	} else {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 16074 "BatchImport.c"
	}
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (old) {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		ready_for_import_unref (old);
#line 16080 "BatchImport.c"
	}
}


void value_take_ready_for_import (GValue* value, gpointer v_object) {
	ReadyForImport* old;
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_READY_FOR_IMPORT));
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	old = value->data[0].v_pointer;
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (v_object) {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_READY_FOR_IMPORT));
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = v_object;
#line 16099 "BatchImport.c"
	} else {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 16103 "BatchImport.c"
	}
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (old) {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		ready_for_import_unref (old);
#line 16109 "BatchImport.c"
	}
}


static void ready_for_import_class_init (ReadyForImportClass * klass) {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	ready_for_import_parent_class = g_type_class_peek_parent (klass);
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((ReadyForImportClass *) klass)->finalize = ready_for_import_finalize;
#line 16119 "BatchImport.c"
}


static void ready_for_import_instance_init (ReadyForImport * self) {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->ref_count = 1;
#line 16126 "BatchImport.c"
}


static void ready_for_import_finalize (ReadyForImport* obj) {
	ReadyForImport * self;
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_READY_FOR_IMPORT, ReadyForImport);
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_signal_handlers_destroy (self);
#line 1878 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->final_file);
#line 1879 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_prepared_file_unref0 (self->prepared_file);
#line 1880 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_photo_import_params_unref0 (self->photo_import_params);
#line 1881 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_video_import_params_unref0 (self->video_import_params);
#line 1882 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_result_unref0 (self->batch_result);
#line 16146 "BatchImport.c"
}


GType ready_for_import_get_type (void) {
	static volatile gsize ready_for_import_type_id__volatile = 0;
	if (g_once_init_enter (&ready_for_import_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { value_ready_for_import_init, value_ready_for_import_free_value, value_ready_for_import_copy_value, value_ready_for_import_peek_pointer, "p", value_ready_for_import_collect_value, "p", value_ready_for_import_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (ReadyForImportClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ready_for_import_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ReadyForImport), 0, (GInstanceInitFunc) ready_for_import_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 ready_for_import_type_id;
		ready_for_import_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ReadyForImport", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&ready_for_import_type_id__volatile, ready_for_import_type_id);
	}
	return ready_for_import_type_id__volatile;
}


gpointer ready_for_import_ref (gpointer instance) {
	ReadyForImport* self;
	self = instance;
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_atomic_int_inc (&self->ref_count);
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return instance;
#line 16171 "BatchImport.c"
}


void ready_for_import_unref (gpointer instance) {
	ReadyForImport* self;
	self = instance;
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		READY_FOR_IMPORT_GET_CLASS (self)->finalize (self);
#line 1877 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 16184 "BatchImport.c"
	}
}


PreparedFileImportJob* prepared_file_import_job_construct (GType object_type, BatchImport* owner, PreparedFile* prepared_file, ImportID* import_id, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancellation, void* cancellation_target) {
	PreparedFileImportJob* self = NULL;
	BatchImport* _tmp0_ = NULL;
	CompletionCallback _tmp1_ = NULL;
	void* _tmp1__target = NULL;
	GCancellable* _tmp2_ = NULL;
	CancellationCallback _tmp3_ = NULL;
	void* _tmp3__target = NULL;
	ImportID _tmp4_ = {0};
	PreparedFile* _tmp5_ = NULL;
	PreparedFile* _tmp6_ = NULL;
#line 1933 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT (owner), NULL);
#line 1933 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_PREPARED_FILE (prepared_file), NULL);
#line 1933 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (import_id != NULL, NULL);
#line 1933 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (G_IS_CANCELLABLE (cancellable), NULL);
#line 1935 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = owner;
#line 1935 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = callback;
#line 1935 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1__target = callback_target;
#line 1935 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = cancellable;
#line 1935 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = cancellation;
#line 1935 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3__target = cancellation_target;
#line 1935 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = (PreparedFileImportJob*) background_job_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, G_TYPE_OBJECT, GObject), _tmp1_, _tmp1__target, _tmp2_, _tmp3_, _tmp3__target, NULL);
#line 1937 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = *import_id;
#line 1937 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv->import_id = _tmp4_;
#line 1938 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = prepared_file;
#line 1938 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = _prepared_file_ref0 (_tmp5_);
#line 1938 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_prepared_file_unref0 (self->not_ready);
#line 1938 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->not_ready = _tmp6_;
#line 1940 "/home/jens/Source/shotwell/src/BatchImport.vala"
	background_job_set_completion_priority (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_JOB, BackgroundJob), G_PRIORITY_LOW);
#line 1933 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self;
#line 16238 "BatchImport.c"
}


PreparedFileImportJob* prepared_file_import_job_new (BatchImport* owner, PreparedFile* prepared_file, ImportID* import_id, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancellation, void* cancellation_target) {
#line 1933 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return prepared_file_import_job_construct (TYPE_PREPARED_FILE_IMPORT_JOB, owner, prepared_file, import_id, callback, callback_target, cancellable, cancellation, cancellation_target);
#line 16245 "BatchImport.c"
}


static void prepared_file_import_job_real_execute (BackgroundJob* base) {
	PreparedFileImportJob * self;
	PreparedFile* prepared_file = NULL;
	PreparedFile* _tmp0_ = NULL;
	PreparedFile* _tmp1_ = NULL;
	GFile* final_file = NULL;
	PreparedFile* _tmp2_ = NULL;
	GFile* _tmp3_ = NULL;
	GFile* _tmp4_ = NULL;
	GFile* final_associated_file = NULL;
	PreparedFile* _tmp5_ = NULL;
	GFile* _tmp6_ = NULL;
	GFile* _tmp7_ = NULL;
	PreparedFile* _tmp8_ = NULL;
	gboolean _tmp9_ = FALSE;
	GFile* _tmp51_ = NULL;
	gchar* _tmp52_ = NULL;
	gchar* _tmp53_ = NULL;
	ImportResult _result_ = 0;
	VideoImportParams* video_import_params = NULL;
	PhotoImportParams* photo_import_params = NULL;
	PreparedFile* _tmp54_ = NULL;
	gboolean _tmp55_ = FALSE;
	gboolean _tmp82_ = FALSE;
	ImportResult _tmp83_ = 0;
	BatchImportResult* batch_result = NULL;
	PreparedFile* _tmp96_ = NULL;
	BatchImportJob* _tmp97_ = NULL;
	GFile* _tmp98_ = NULL;
	GFile* _tmp99_ = NULL;
	gchar* _tmp100_ = NULL;
	gchar* _tmp101_ = NULL;
	GFile* _tmp102_ = NULL;
	gchar* _tmp103_ = NULL;
	gchar* _tmp104_ = NULL;
	ImportResult _tmp105_ = 0;
	BatchImportResult* _tmp106_ = NULL;
	BatchImportResult* _tmp107_ = NULL;
	BatchImportResult* _tmp108_ = NULL;
	ImportResult _tmp109_ = 0;
	GError * _inner_error_ = NULL;
#line 1943 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PREPARED_FILE_IMPORT_JOB, PreparedFileImportJob);
#line 1944 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = self->not_ready;
#line 1944 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = _prepared_file_ref0 (_tmp0_);
#line 1944 "/home/jens/Source/shotwell/src/BatchImport.vala"
	prepared_file = _tmp1_;
#line 1945 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_prepared_file_unref0 (self->not_ready);
#line 1945 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->not_ready = NULL;
#line 1947 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = prepared_file;
#line 1947 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = _tmp2_->file;
#line 1947 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 1947 "/home/jens/Source/shotwell/src/BatchImport.vala"
	final_file = _tmp4_;
#line 1948 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = prepared_file;
#line 1948 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = _tmp5_->associated_file;
#line 1948 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp7_ = _g_object_ref0 (_tmp6_);
#line 1948 "/home/jens/Source/shotwell/src/BatchImport.vala"
	final_associated_file = _tmp7_;
#line 1950 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp8_ = prepared_file;
#line 1950 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp9_ = _tmp8_->copy_to_library;
#line 1950 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp9_) {
#line 16324 "BatchImport.c"
		{
			GFile* _tmp10_ = NULL;
			PreparedFile* _tmp11_ = NULL;
			GFile* _tmp12_ = NULL;
			GFile* _tmp13_ = NULL;
			GFile* _tmp14_ = NULL;
			GFile* _tmp15_ = NULL;
			GFile* _tmp29_ = NULL;
#line 1953 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp11_ = prepared_file;
#line 1953 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp12_ = _tmp11_->file;
#line 1953 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp13_ = library_files_duplicate (_tmp12_, NULL, NULL, TRUE, &_inner_error_);
#line 1953 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp10_ = _tmp13_;
#line 1953 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 16343 "BatchImport.c"
				goto __catch424_g_error;
			}
#line 1953 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp14_ = _tmp10_;
#line 1953 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp10_ = NULL;
#line 1953 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (final_file);
#line 1953 "/home/jens/Source/shotwell/src/BatchImport.vala"
			final_file = _tmp14_;
#line 1954 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp15_ = final_file;
#line 1954 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp15_ == NULL) {
#line 16358 "BatchImport.c"
				PreparedFile* _tmp16_ = NULL;
				BatchImportJob* _tmp17_ = NULL;
				PreparedFile* _tmp18_ = NULL;
				GFile* _tmp19_ = NULL;
				PreparedFile* _tmp20_ = NULL;
				GFile* _tmp21_ = NULL;
				gchar* _tmp22_ = NULL;
				gchar* _tmp23_ = NULL;
				PreparedFile* _tmp24_ = NULL;
				GFile* _tmp25_ = NULL;
				gchar* _tmp26_ = NULL;
				gchar* _tmp27_ = NULL;
				BatchImportResult* _tmp28_ = NULL;
#line 1955 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp16_ = prepared_file;
#line 1955 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp17_ = _tmp16_->job;
#line 1955 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp18_ = prepared_file;
#line 1955 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp19_ = _tmp18_->file;
#line 1955 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp20_ = prepared_file;
#line 1955 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp21_ = _tmp20_->file;
#line 1955 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp22_ = g_file_get_path (_tmp21_);
#line 1955 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp23_ = _tmp22_;
#line 1955 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp24_ = prepared_file;
#line 1955 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp25_ = _tmp24_->file;
#line 1955 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp26_ = g_file_get_path (_tmp25_);
#line 1955 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp27_ = _tmp26_;
#line 1955 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp28_ = batch_import_result_new (_tmp17_, _tmp19_, _tmp23_, _tmp27_, NULL, IMPORT_RESULT_FILE_ERROR);
#line 1955 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_batch_import_result_unref0 (self->failed);
#line 1955 "/home/jens/Source/shotwell/src/BatchImport.vala"
				self->failed = _tmp28_;
#line 1955 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp27_);
#line 1955 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp23_);
#line 1959 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_tmp10_);
#line 1959 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (final_associated_file);
#line 1959 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (final_file);
#line 1959 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_prepared_file_unref0 (prepared_file);
#line 1959 "/home/jens/Source/shotwell/src/BatchImport.vala"
				return;
#line 16416 "BatchImport.c"
			}
#line 1963 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp29_ = final_associated_file;
#line 1963 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp29_ != NULL) {
#line 16422 "BatchImport.c"
				GFile* _tmp30_ = NULL;
				PreparedFile* _tmp31_ = NULL;
				GFile* _tmp32_ = NULL;
				GFile* _tmp33_ = NULL;
				GFile* _tmp34_ = NULL;
#line 1964 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp31_ = prepared_file;
#line 1964 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp32_ = _tmp31_->associated_file;
#line 1964 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp33_ = library_files_duplicate (_tmp32_, NULL, NULL, TRUE, &_inner_error_);
#line 1964 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp30_ = _tmp33_;
#line 1964 "/home/jens/Source/shotwell/src/BatchImport.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1964 "/home/jens/Source/shotwell/src/BatchImport.vala"
					_g_object_unref0 (_tmp10_);
#line 16440 "BatchImport.c"
					goto __catch424_g_error;
				}
#line 1964 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp34_ = _tmp30_;
#line 1964 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp30_ = NULL;
#line 1964 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (final_associated_file);
#line 1964 "/home/jens/Source/shotwell/src/BatchImport.vala"
				final_associated_file = _tmp34_;
#line 1963 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_object_unref0 (_tmp30_);
#line 16453 "BatchImport.c"
			}
#line 1951 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (_tmp10_);
#line 16457 "BatchImport.c"
		}
		goto __finally424;
		__catch424_g_error:
		{
			GError* err = NULL;
			gchar* _tmp35_ = NULL;
			GFile* _tmp36_ = NULL;
			gchar* filename = NULL;
			gchar* _tmp42_ = NULL;
			PreparedFile* _tmp43_ = NULL;
			BatchImportJob* _tmp44_ = NULL;
			PreparedFile* _tmp45_ = NULL;
			GFile* _tmp46_ = NULL;
			const gchar* _tmp47_ = NULL;
			const gchar* _tmp48_ = NULL;
			GError* _tmp49_ = NULL;
			BatchImportResult* _tmp50_ = NULL;
#line 1951 "/home/jens/Source/shotwell/src/BatchImport.vala"
			err = _inner_error_;
#line 1951 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_inner_error_ = NULL;
#line 1967 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp36_ = final_file;
#line 1967 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (_tmp36_ != NULL) {
#line 16483 "BatchImport.c"
				GFile* _tmp37_ = NULL;
				gchar* _tmp38_ = NULL;
#line 1967 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp37_ = final_file;
#line 1967 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp38_ = g_file_get_path (_tmp37_);
#line 1967 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp35_);
#line 1967 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp35_ = _tmp38_;
#line 16494 "BatchImport.c"
			} else {
				PreparedFile* _tmp39_ = NULL;
				const gchar* _tmp40_ = NULL;
				gchar* _tmp41_ = NULL;
#line 1967 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp39_ = prepared_file;
#line 1967 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp40_ = _tmp39_->source_id;
#line 1967 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp41_ = g_strdup (_tmp40_);
#line 1967 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_g_free0 (_tmp35_);
#line 1967 "/home/jens/Source/shotwell/src/BatchImport.vala"
				_tmp35_ = _tmp41_;
#line 16509 "BatchImport.c"
			}
#line 1967 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp42_ = g_strdup (_tmp35_);
#line 1967 "/home/jens/Source/shotwell/src/BatchImport.vala"
			filename = _tmp42_;
#line 1968 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp43_ = prepared_file;
#line 1968 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp44_ = _tmp43_->job;
#line 1968 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp45_ = prepared_file;
#line 1968 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp46_ = _tmp45_->file;
#line 1968 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp47_ = filename;
#line 1968 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp48_ = filename;
#line 1968 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp49_ = err;
#line 1968 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp50_ = batch_import_result_new_from_error (_tmp44_, _tmp46_, _tmp47_, _tmp48_, _tmp49_, IMPORT_RESULT_FILE_ERROR);
#line 1968 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_batch_import_result_unref0 (self->failed);
#line 1968 "/home/jens/Source/shotwell/src/BatchImport.vala"
			self->failed = _tmp50_;
#line 1971 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (filename);
#line 1971 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (_tmp35_);
#line 1971 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_error_free0 (err);
#line 1971 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (final_associated_file);
#line 1971 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (final_file);
#line 1971 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_prepared_file_unref0 (prepared_file);
#line 1971 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return;
#line 16549 "BatchImport.c"
		}
		__finally424:
#line 1951 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1951 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (final_associated_file);
#line 1951 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (final_file);
#line 1951 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_prepared_file_unref0 (prepared_file);
#line 1951 "/home/jens/Source/shotwell/src/BatchImport.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 1951 "/home/jens/Source/shotwell/src/BatchImport.vala"
			g_clear_error (&_inner_error_);
#line 1951 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return;
#line 16566 "BatchImport.c"
		}
	}
#line 1975 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp51_ = final_file;
#line 1975 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp52_ = g_file_get_path (_tmp51_);
#line 1975 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp53_ = _tmp52_;
#line 1975 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_debug ("BatchImport.vala:1975: Importing %s", _tmp53_);
#line 1975 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (_tmp53_);
#line 1977 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_result_ = IMPORT_RESULT_SUCCESS;
#line 1978 "/home/jens/Source/shotwell/src/BatchImport.vala"
	video_import_params = NULL;
#line 1979 "/home/jens/Source/shotwell/src/BatchImport.vala"
	photo_import_params = NULL;
#line 1980 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp54_ = prepared_file;
#line 1980 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp55_ = _tmp54_->is_video;
#line 1980 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp55_) {
#line 16591 "BatchImport.c"
		GFile* _tmp56_ = NULL;
		ImportID _tmp57_ = {0};
		PreparedFile* _tmp58_ = NULL;
		const gchar* _tmp59_ = NULL;
		Thumbnails* _tmp60_ = NULL;
		Thumbnails* _tmp61_ = NULL;
		PreparedFile* _tmp62_ = NULL;
		BatchImportJob* _tmp63_ = NULL;
		time_t _tmp64_ = 0;
		VideoImportParams* _tmp65_ = NULL;
		VideoImportParams* _tmp66_ = NULL;
		ImportResult _tmp67_ = 0;
#line 1981 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp56_ = final_file;
#line 1981 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp57_ = self->priv->import_id;
#line 1981 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp58_ = prepared_file;
#line 1981 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp59_ = _tmp58_->full_md5;
#line 1981 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp60_ = thumbnails_new ();
#line 1981 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp61_ = _tmp60_;
#line 1981 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp62_ = prepared_file;
#line 1981 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp63_ = _tmp62_->job;
#line 1981 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp64_ = batch_import_job_get_exposure_time_override (_tmp63_);
#line 1981 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp65_ = video_import_params_new (_tmp56_, &_tmp57_, _tmp59_, _tmp61_, _tmp64_);
#line 1981 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_video_import_params_unref0 (video_import_params);
#line 1981 "/home/jens/Source/shotwell/src/BatchImport.vala"
		video_import_params = _tmp65_;
#line 1981 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_thumbnails_unref0 (_tmp61_);
#line 1985 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp66_ = video_import_params;
#line 1985 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp67_ = video_reader_prepare_for_import (_tmp66_);
#line 1985 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_result_ = _tmp67_;
#line 16636 "BatchImport.c"
	} else {
		GFile* _tmp68_ = NULL;
		GFile* _tmp69_ = NULL;
		ImportID _tmp70_ = {0};
		PreparedFile* _tmp71_ = NULL;
		const gchar* _tmp72_ = NULL;
		PreparedFile* _tmp73_ = NULL;
		const gchar* _tmp74_ = NULL;
		PreparedFile* _tmp75_ = NULL;
		const gchar* _tmp76_ = NULL;
		Thumbnails* _tmp77_ = NULL;
		Thumbnails* _tmp78_ = NULL;
		PhotoImportParams* _tmp79_ = NULL;
		PhotoImportParams* _tmp80_ = NULL;
		ImportResult _tmp81_ = 0;
#line 1987 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp68_ = final_file;
#line 1987 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp69_ = final_associated_file;
#line 1987 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp70_ = self->priv->import_id;
#line 1987 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp71_ = prepared_file;
#line 1987 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp72_ = _tmp71_->exif_md5;
#line 1987 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp73_ = prepared_file;
#line 1987 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp74_ = _tmp73_->thumbnail_md5;
#line 1987 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp75_ = prepared_file;
#line 1987 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp76_ = _tmp75_->full_md5;
#line 1987 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp77_ = thumbnails_new ();
#line 1987 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp78_ = _tmp77_;
#line 1987 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp79_ = photo_import_params_new (_tmp68_, _tmp69_, &_tmp70_, PHOTO_FILE_SNIFFER_OPTIONS_GET_ALL, _tmp72_, _tmp74_, _tmp76_, _tmp78_);
#line 1987 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_photo_import_params_unref0 (photo_import_params);
#line 1987 "/home/jens/Source/shotwell/src/BatchImport.vala"
		photo_import_params = _tmp79_;
#line 1987 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_thumbnails_unref0 (_tmp78_);
#line 1991 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp80_ = photo_import_params;
#line 1991 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp81_ = photo_prepare_for_import (_tmp80_);
#line 1991 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_result_ = _tmp81_;
#line 16688 "BatchImport.c"
	}
#line 1994 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp83_ = _result_;
#line 1994 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp83_ != IMPORT_RESULT_SUCCESS) {
#line 16694 "BatchImport.c"
		GFile* _tmp84_ = NULL;
		PreparedFile* _tmp85_ = NULL;
		GFile* _tmp86_ = NULL;
#line 1994 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp84_ = final_file;
#line 1994 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp85_ = prepared_file;
#line 1994 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp86_ = _tmp85_->file;
#line 1994 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp82_ = _tmp84_ != _tmp86_;
#line 16706 "BatchImport.c"
	} else {
#line 1994 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp82_ = FALSE;
#line 16710 "BatchImport.c"
	}
#line 1994 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp82_) {
#line 16714 "BatchImport.c"
		GFile* _tmp87_ = NULL;
		gchar* _tmp88_ = NULL;
		gchar* _tmp89_ = NULL;
#line 1995 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp87_ = final_file;
#line 1995 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp88_ = g_file_get_path (_tmp87_);
#line 1995 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp89_ = _tmp88_;
#line 1995 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_debug ("BatchImport.vala:1995: Deleting failed imported copy %s", _tmp89_);
#line 1995 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_free0 (_tmp89_);
#line 16728 "BatchImport.c"
		{
			GFile* _tmp90_ = NULL;
#line 1997 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp90_ = final_file;
#line 1997 "/home/jens/Source/shotwell/src/BatchImport.vala"
			g_file_delete (_tmp90_, NULL, &_inner_error_);
#line 1997 "/home/jens/Source/shotwell/src/BatchImport.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 16737 "BatchImport.c"
				goto __catch425_g_error;
			}
		}
		goto __finally425;
		__catch425_g_error:
		{
			GError* err = NULL;
			GFile* _tmp91_ = NULL;
			gchar* _tmp92_ = NULL;
			gchar* _tmp93_ = NULL;
			GError* _tmp94_ = NULL;
			const gchar* _tmp95_ = NULL;
#line 1996 "/home/jens/Source/shotwell/src/BatchImport.vala"
			err = _inner_error_;
#line 1996 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_inner_error_ = NULL;
#line 2000 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp91_ = final_file;
#line 2000 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp92_ = g_file_get_path (_tmp91_);
#line 2000 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp93_ = _tmp92_;
#line 2000 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp94_ = err;
#line 2000 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_tmp95_ = _tmp94_->message;
#line 2000 "/home/jens/Source/shotwell/src/BatchImport.vala"
			g_warning ("BatchImport.vala:2000: Unable to delete copy of imported file %s: %s", _tmp93_, _tmp95_);
#line 2000 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_free0 (_tmp93_);
#line 1996 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_error_free0 (err);
#line 16770 "BatchImport.c"
		}
		__finally425:
#line 1996 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1996 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_photo_import_params_unref0 (photo_import_params);
#line 1996 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_video_import_params_unref0 (video_import_params);
#line 1996 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (final_associated_file);
#line 1996 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_g_object_unref0 (final_file);
#line 1996 "/home/jens/Source/shotwell/src/BatchImport.vala"
			_prepared_file_unref0 (prepared_file);
#line 1996 "/home/jens/Source/shotwell/src/BatchImport.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 1996 "/home/jens/Source/shotwell/src/BatchImport.vala"
			g_clear_error (&_inner_error_);
#line 1996 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return;
#line 16791 "BatchImport.c"
		}
	}
#line 2005 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp96_ = prepared_file;
#line 2005 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp97_ = _tmp96_->job;
#line 2005 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp98_ = final_file;
#line 2005 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp99_ = final_file;
#line 2005 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp100_ = g_file_get_path (_tmp99_);
#line 2005 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp101_ = _tmp100_;
#line 2005 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp102_ = final_file;
#line 2005 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp103_ = g_file_get_path (_tmp102_);
#line 2005 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp104_ = _tmp103_;
#line 2005 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp105_ = _result_;
#line 2005 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp106_ = batch_import_result_new (_tmp97_, _tmp98_, _tmp101_, _tmp104_, NULL, _tmp105_);
#line 2005 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp107_ = _tmp106_;
#line 2005 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (_tmp104_);
#line 2005 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_free0 (_tmp101_);
#line 2005 "/home/jens/Source/shotwell/src/BatchImport.vala"
	batch_result = _tmp107_;
#line 2007 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp108_ = batch_result;
#line 2007 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp109_ = _tmp108_->result;
#line 2007 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (_tmp109_ != IMPORT_RESULT_SUCCESS) {
#line 16830 "BatchImport.c"
		BatchImportResult* _tmp110_ = NULL;
		BatchImportResult* _tmp111_ = NULL;
#line 2008 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp110_ = batch_result;
#line 2008 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp111_ = _batch_import_result_ref0 (_tmp110_);
#line 2008 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_batch_import_result_unref0 (self->failed);
#line 2008 "/home/jens/Source/shotwell/src/BatchImport.vala"
		self->failed = _tmp111_;
#line 16841 "BatchImport.c"
	} else {
		GFile* _tmp112_ = NULL;
		PreparedFile* _tmp113_ = NULL;
		PhotoImportParams* _tmp114_ = NULL;
		VideoImportParams* _tmp115_ = NULL;
		BatchImportResult* _tmp116_ = NULL;
		ReadyForImport* _tmp117_ = NULL;
#line 2010 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp112_ = final_file;
#line 2010 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp113_ = prepared_file;
#line 2010 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp114_ = photo_import_params;
#line 2010 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp115_ = video_import_params;
#line 2010 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp116_ = batch_result;
#line 2010 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp117_ = ready_for_import_new (_tmp112_, _tmp113_, _tmp114_, _tmp115_, _tmp116_);
#line 2010 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_ready_for_import_unref0 (self->ready);
#line 2010 "/home/jens/Source/shotwell/src/BatchImport.vala"
		self->ready = _tmp117_;
#line 16865 "BatchImport.c"
	}
#line 1943 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_result_unref0 (batch_result);
#line 1943 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_photo_import_params_unref0 (photo_import_params);
#line 1943 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_video_import_params_unref0 (video_import_params);
#line 1943 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (final_associated_file);
#line 1943 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (final_file);
#line 1943 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_prepared_file_unref0 (prepared_file);
#line 16879 "BatchImport.c"
}


static void prepared_file_import_job_class_init (PreparedFileImportJobClass * klass) {
#line 1926 "/home/jens/Source/shotwell/src/BatchImport.vala"
	prepared_file_import_job_parent_class = g_type_class_peek_parent (klass);
#line 1926 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BackgroundJobClass *) klass)->finalize = prepared_file_import_job_finalize;
#line 1926 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_type_class_add_private (klass, sizeof (PreparedFileImportJobPrivate));
#line 1926 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BackgroundJobClass *) klass)->execute = (void (*)(BackgroundJob*)) prepared_file_import_job_real_execute;
#line 16892 "BatchImport.c"
}


static void prepared_file_import_job_instance_init (PreparedFileImportJob * self) {
#line 1926 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->priv = PREPARED_FILE_IMPORT_JOB_GET_PRIVATE (self);
#line 1928 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->ready = NULL;
#line 1929 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->failed = NULL;
#line 16903 "BatchImport.c"
}


static void prepared_file_import_job_finalize (BackgroundJob* obj) {
	PreparedFileImportJob * self;
#line 1926 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PREPARED_FILE_IMPORT_JOB, PreparedFileImportJob);
#line 1927 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_prepared_file_unref0 (self->not_ready);
#line 1928 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_ready_for_import_unref0 (self->ready);
#line 1929 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_result_unref0 (self->failed);
#line 1926 "/home/jens/Source/shotwell/src/BatchImport.vala"
	BACKGROUND_JOB_CLASS (prepared_file_import_job_parent_class)->finalize (obj);
#line 16919 "BatchImport.c"
}


GType prepared_file_import_job_get_type (void) {
	static volatile gsize prepared_file_import_job_type_id__volatile = 0;
	if (g_once_init_enter (&prepared_file_import_job_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PreparedFileImportJobClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) prepared_file_import_job_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PreparedFileImportJob), 0, (GInstanceInitFunc) prepared_file_import_job_instance_init, NULL };
		GType prepared_file_import_job_type_id;
		prepared_file_import_job_type_id = g_type_register_static (TYPE_BACKGROUND_JOB, "PreparedFileImportJob", &g_define_type_info, 0);
		g_once_init_leave (&prepared_file_import_job_type_id__volatile, prepared_file_import_job_type_id);
	}
	return prepared_file_import_job_type_id__volatile;
}


CompletedImportObject* completed_import_object_construct (GType object_type, MediaSource* source, Thumbnails* thumbnails, BatchImportJob* original_job, BatchImportResult* import_result) {
	CompletedImportObject* self = NULL;
	Thumbnails* _tmp0_ = NULL;
	Thumbnails* _tmp1_ = NULL;
	BatchImportResult* _tmp2_ = NULL;
	BatchImportResult* _tmp3_ = NULL;
	MediaSource* _tmp4_ = NULL;
	MediaSource* _tmp5_ = NULL;
	BatchImportJob* _tmp6_ = NULL;
	BatchImportJob* _tmp7_ = NULL;
	Thumbnails* _tmp8_ = NULL;
	GdkPixbuf* _tmp9_ = NULL;
#line 2022 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_MEDIA_SOURCE (source), NULL);
#line 2022 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_THUMBNAILS (thumbnails), NULL);
#line 2022 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_JOB (original_job), NULL);
#line 2022 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_RESULT (import_result), NULL);
#line 2022 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = (CompletedImportObject*) g_type_create_instance (object_type);
#line 2024 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = thumbnails;
#line 2024 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = _thumbnails_ref0 (_tmp0_);
#line 2024 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_thumbnails_unref0 (self->thumbnails);
#line 2024 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->thumbnails = _tmp1_;
#line 2025 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = import_result;
#line 2025 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = _batch_import_result_ref0 (_tmp2_);
#line 2025 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_result_unref0 (self->batch_result);
#line 2025 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->batch_result = _tmp3_;
#line 2026 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = source;
#line 2026 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = _g_object_ref0 (_tmp4_);
#line 2026 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->source);
#line 2026 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->source = _tmp5_;
#line 2027 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = original_job;
#line 2027 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp7_ = _batch_import_job_ref0 (_tmp6_);
#line 2027 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_job_unref0 (self->original_job);
#line 2027 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->original_job = _tmp7_;
#line 2028 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp8_ = thumbnails;
#line 2028 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp9_ = thumbnails_get (_tmp8_, THUMBNAIL_CACHE_SIZE_LARGEST);
#line 2028 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->user_preview);
#line 2028 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->user_preview = _tmp9_;
#line 2022 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self;
#line 16999 "BatchImport.c"
}


CompletedImportObject* completed_import_object_new (MediaSource* source, Thumbnails* thumbnails, BatchImportJob* original_job, BatchImportResult* import_result) {
#line 2022 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return completed_import_object_construct (TYPE_COMPLETED_IMPORT_OBJECT, source, thumbnails, original_job, import_result);
#line 17006 "BatchImport.c"
}


static void value_completed_import_object_init (GValue* value) {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	value->data[0].v_pointer = NULL;
#line 17013 "BatchImport.c"
}


static void value_completed_import_object_free_value (GValue* value) {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (value->data[0].v_pointer) {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		completed_import_object_unref (value->data[0].v_pointer);
#line 17022 "BatchImport.c"
	}
}


static void value_completed_import_object_copy_value (const GValue* src_value, GValue* dest_value) {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (src_value->data[0].v_pointer) {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		dest_value->data[0].v_pointer = completed_import_object_ref (src_value->data[0].v_pointer);
#line 17032 "BatchImport.c"
	} else {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		dest_value->data[0].v_pointer = NULL;
#line 17036 "BatchImport.c"
	}
}


static gpointer value_completed_import_object_peek_pointer (const GValue* value) {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return value->data[0].v_pointer;
#line 17044 "BatchImport.c"
}


static gchar* value_completed_import_object_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (collect_values[0].v_pointer) {
#line 17051 "BatchImport.c"
		CompletedImportObject* object;
		object = collect_values[0].v_pointer;
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (object->parent_instance.g_class == NULL) {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 17058 "BatchImport.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.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 17062 "BatchImport.c"
		}
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = completed_import_object_ref (object);
#line 17066 "BatchImport.c"
	} else {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 17070 "BatchImport.c"
	}
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return NULL;
#line 17074 "BatchImport.c"
}


static gchar* value_completed_import_object_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	CompletedImportObject** object_p;
	object_p = collect_values[0].v_pointer;
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!object_p) {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 17085 "BatchImport.c"
	}
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (!value->data[0].v_pointer) {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = NULL;
#line 17091 "BatchImport.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = value->data[0].v_pointer;
#line 17095 "BatchImport.c"
	} else {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		*object_p = completed_import_object_ref (value->data[0].v_pointer);
#line 17099 "BatchImport.c"
	}
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return NULL;
#line 17103 "BatchImport.c"
}


GParamSpec* param_spec_completed_import_object (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ParamSpecCompletedImportObject* spec;
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (g_type_is_a (object_type, TYPE_COMPLETED_IMPORT_OBJECT), NULL);
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return G_PARAM_SPEC (spec);
#line 17117 "BatchImport.c"
}


gpointer value_get_completed_import_object (const GValue* value) {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_COMPLETED_IMPORT_OBJECT), NULL);
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return value->data[0].v_pointer;
#line 17126 "BatchImport.c"
}


void value_set_completed_import_object (GValue* value, gpointer v_object) {
	CompletedImportObject* old;
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_COMPLETED_IMPORT_OBJECT));
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	old = value->data[0].v_pointer;
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (v_object) {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_COMPLETED_IMPORT_OBJECT));
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = v_object;
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		completed_import_object_ref (value->data[0].v_pointer);
#line 17146 "BatchImport.c"
	} else {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 17150 "BatchImport.c"
	}
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (old) {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		completed_import_object_unref (old);
#line 17156 "BatchImport.c"
	}
}


void value_take_completed_import_object (GValue* value, gpointer v_object) {
	CompletedImportObject* old;
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_COMPLETED_IMPORT_OBJECT));
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	old = value->data[0].v_pointer;
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (v_object) {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_COMPLETED_IMPORT_OBJECT));
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = v_object;
#line 17175 "BatchImport.c"
	} else {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		value->data[0].v_pointer = NULL;
#line 17179 "BatchImport.c"
	}
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (old) {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		completed_import_object_unref (old);
#line 17185 "BatchImport.c"
	}
}


static void completed_import_object_class_init (CompletedImportObjectClass * klass) {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	completed_import_object_parent_class = g_type_class_peek_parent (klass);
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((CompletedImportObjectClass *) klass)->finalize = completed_import_object_finalize;
#line 17195 "BatchImport.c"
}


static void completed_import_object_instance_init (CompletedImportObject * self) {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->ref_count = 1;
#line 17202 "BatchImport.c"
}


static void completed_import_object_finalize (CompletedImportObject* obj) {
	CompletedImportObject * self;
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_COMPLETED_IMPORT_OBJECT, CompletedImportObject);
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_signal_handlers_destroy (self);
#line 2016 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_thumbnails_unref0 (self->thumbnails);
#line 2017 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_result_unref0 (self->batch_result);
#line 2018 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->source);
#line 2019 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_batch_import_job_unref0 (self->original_job);
#line 2020 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_g_object_unref0 (self->user_preview);
#line 17222 "BatchImport.c"
}


GType completed_import_object_get_type (void) {
	static volatile gsize completed_import_object_type_id__volatile = 0;
	if (g_once_init_enter (&completed_import_object_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { value_completed_import_object_init, value_completed_import_object_free_value, value_completed_import_object_copy_value, value_completed_import_object_peek_pointer, "p", value_completed_import_object_collect_value, "p", value_completed_import_object_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (CompletedImportObjectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) completed_import_object_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CompletedImportObject), 0, (GInstanceInitFunc) completed_import_object_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 completed_import_object_type_id;
		completed_import_object_type_id = g_type_register_fundamental (g_type_fundamental_next (), "CompletedImportObject", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&completed_import_object_type_id__volatile, completed_import_object_type_id);
	}
	return completed_import_object_type_id__volatile;
}


gpointer completed_import_object_ref (gpointer instance) {
	CompletedImportObject* self;
	self = instance;
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_atomic_int_inc (&self->ref_count);
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return instance;
#line 17247 "BatchImport.c"
}


void completed_import_object_unref (gpointer instance) {
	CompletedImportObject* self;
	self = instance;
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		COMPLETED_IMPORT_OBJECT_GET_CLASS (self)->finalize (self);
#line 2015 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 17260 "BatchImport.c"
	}
}


ThumbnailWriterJob* thumbnail_writer_job_construct (GType object_type, BatchImport* owner, CompletedImportObject* completed_import_source, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancel_callback, void* cancel_callback_target) {
	ThumbnailWriterJob* self = NULL;
	BatchImport* _tmp0_ = NULL;
	CompletionCallback _tmp1_ = NULL;
	void* _tmp1__target = NULL;
	GCancellable* _tmp2_ = NULL;
	CancellationCallback _tmp3_ = NULL;
	void* _tmp3__target = NULL;
	CompletedImportObject* _tmp4_ = NULL;
	Thumbnails* _tmp5_ = NULL;
	CompletedImportObject* _tmp6_ = NULL;
	CompletedImportObject* _tmp7_ = NULL;
#line 2035 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT (owner), NULL);
#line 2035 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (IS_COMPLETED_IMPORT_OBJECT (completed_import_source), NULL);
#line 2035 "/home/jens/Source/shotwell/src/BatchImport.vala"
	g_return_val_if_fail (G_IS_CANCELLABLE (cancellable), NULL);
#line 2037 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp0_ = owner;
#line 2037 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1_ = callback;
#line 2037 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp1__target = callback_target;
#line 2037 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp2_ = cancellable;
#line 2037 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3_ = cancel_callback;
#line 2037 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp3__target = cancel_callback_target;
#line 2037 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = (ThumbnailWriterJob*) background_import_job_construct (object_type, _tmp0_, _tmp1_, _tmp1__target, _tmp2_, _tmp3_, _tmp3__target);
#line 2039 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp4_ = completed_import_source;
#line 2039 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp5_ = _tmp4_->thumbnails;
#line 2039 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_vala_assert (_tmp5_ != NULL, "completed_import_source.thumbnails != null");
#line 2040 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp6_ = completed_import_source;
#line 2040 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp7_ = _completed_import_object_ref0 (_tmp6_);
#line 2040 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_completed_import_object_unref0 (self->completed_import_source);
#line 2040 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self->completed_import_source = _tmp7_;
#line 2042 "/home/jens/Source/shotwell/src/BatchImport.vala"
	background_job_set_completion_priority (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_JOB, BackgroundJob), G_PRIORITY_LOW);
#line 2035 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return self;
#line 17315 "BatchImport.c"
}


ThumbnailWriterJob* thumbnail_writer_job_new (BatchImport* owner, CompletedImportObject* completed_import_source, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancel_callback, void* cancel_callback_target) {
#line 2035 "/home/jens/Source/shotwell/src/BatchImport.vala"
	return thumbnail_writer_job_construct (TYPE_THUMBNAIL_WRITER_JOB, owner, completed_import_source, callback, callback_target, cancellable, cancel_callback, cancel_callback_target);
#line 17322 "BatchImport.c"
}


static void thumbnail_writer_job_real_execute (BackgroundJob* base) {
	ThumbnailWriterJob * self;
	CompletedImportObject* _tmp10_ = NULL;
	GError * _inner_error_ = NULL;
#line 2045 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_THUMBNAIL_WRITER_JOB, ThumbnailWriterJob);
#line 17332 "BatchImport.c"
	{
		CompletedImportObject* _tmp0_ = NULL;
		MediaSource* _tmp1_ = NULL;
		CompletedImportObject* _tmp2_ = NULL;
		Thumbnails* _tmp3_ = NULL;
		CompletedImportObject* _tmp4_ = NULL;
		BatchImportResult* _tmp5_ = NULL;
#line 2047 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp0_ = self->completed_import_source;
#line 2047 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp1_ = _tmp0_->source;
#line 2047 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp2_ = self->completed_import_source;
#line 2047 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp3_ = _tmp2_->thumbnails;
#line 2047 "/home/jens/Source/shotwell/src/BatchImport.vala"
		thumbnail_cache_import_thumbnails (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), _tmp3_, TRUE, &_inner_error_);
#line 2047 "/home/jens/Source/shotwell/src/BatchImport.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 17352 "BatchImport.c"
			goto __catch426_g_error;
		}
#line 2049 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp4_ = self->completed_import_source;
#line 2049 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp5_ = _tmp4_->batch_result;
#line 2049 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp5_->result = IMPORT_RESULT_SUCCESS;
#line 17361 "BatchImport.c"
	}
	goto __finally426;
	__catch426_g_error:
	{
		GError* err = NULL;
		CompletedImportObject* _tmp6_ = NULL;
		BatchImportResult* _tmp7_ = NULL;
		GError* _tmp8_ = NULL;
		ImportResult _tmp9_ = 0;
#line 2046 "/home/jens/Source/shotwell/src/BatchImport.vala"
		err = _inner_error_;
#line 2046 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_inner_error_ = NULL;
#line 2051 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp6_ = self->completed_import_source;
#line 2051 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp7_ = _tmp6_->batch_result;
#line 2051 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp8_ = err;
#line 2051 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp9_ = import_result_convert_error (_tmp8_, IMPORT_RESULT_FILE_ERROR);
#line 2051 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_tmp7_->result = _tmp9_;
#line 2046 "/home/jens/Source/shotwell/src/BatchImport.vala"
		_g_error_free0 (err);
#line 17387 "BatchImport.c"
	}
	__finally426:
#line 2046 "/home/jens/Source/shotwell/src/BatchImport.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2046 "/home/jens/Source/shotwell/src/BatchImport.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 2046 "/home/jens/Source/shotwell/src/BatchImport.vala"
		g_clear_error (&_inner_error_);
#line 2046 "/home/jens/Source/shotwell/src/BatchImport.vala"
		return;
#line 17398 "BatchImport.c"
	}
#line 2056 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp10_ = self->completed_import_source;
#line 2056 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_thumbnails_unref0 (_tmp10_->thumbnails);
#line 2056 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_tmp10_->thumbnails = NULL;
#line 17406 "BatchImport.c"
}


static void thumbnail_writer_job_class_init (ThumbnailWriterJobClass * klass) {
#line 2032 "/home/jens/Source/shotwell/src/BatchImport.vala"
	thumbnail_writer_job_parent_class = g_type_class_peek_parent (klass);
#line 2032 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BackgroundJobClass *) klass)->finalize = thumbnail_writer_job_finalize;
#line 2032 "/home/jens/Source/shotwell/src/BatchImport.vala"
	((BackgroundJobClass *) klass)->execute = (void (*)(BackgroundJob*)) thumbnail_writer_job_real_execute;
#line 17417 "BatchImport.c"
}


static void thumbnail_writer_job_instance_init (ThumbnailWriterJob * self) {
}


static void thumbnail_writer_job_finalize (BackgroundJob* obj) {
	ThumbnailWriterJob * self;
#line 2032 "/home/jens/Source/shotwell/src/BatchImport.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_THUMBNAIL_WRITER_JOB, ThumbnailWriterJob);
#line 2033 "/home/jens/Source/shotwell/src/BatchImport.vala"
	_completed_import_object_unref0 (self->completed_import_source);
#line 2032 "/home/jens/Source/shotwell/src/BatchImport.vala"
	BACKGROUND_JOB_CLASS (thumbnail_writer_job_parent_class)->finalize (obj);
#line 17433 "BatchImport.c"
}


GType thumbnail_writer_job_get_type (void) {
	static volatile gsize thumbnail_writer_job_type_id__volatile = 0;
	if (g_once_init_enter (&thumbnail_writer_job_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ThumbnailWriterJobClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) thumbnail_writer_job_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ThumbnailWriterJob), 0, (GInstanceInitFunc) thumbnail_writer_job_instance_init, NULL };
		GType thumbnail_writer_job_type_id;
		thumbnail_writer_job_type_id = g_type_register_static (TYPE_BACKGROUND_IMPORT_JOB, "ThumbnailWriterJob", &g_define_type_info, 0);
		g_once_init_leave (&thumbnail_writer_job_type_id__volatile, thumbnail_writer_job_type_id);
	}
	return thumbnail_writer_job_type_id__volatile;
}



