/* LibraryMonitor.c generated by valac 0.34.1, the Vala compiler
 * generated from LibraryMonitor.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.
 */
/**/
/* LibraryMonitor uses DirectoryMonitor to track assets in the user's library directory and make*/
/* sure they're reflected in the application.*/
/**/
/* NOTE: There appears to be a bug where prior versions of Shotwell (<= 0.6.x) were not*/
/* properly loading the file modification timestamp during import.  This was no issue*/
/* before but becomes imperative now with file monitoring.  A "proper" algorithm is*/
/* to reimport an entire photo if the modification time in the database is different*/
/* than the file's, but that's Real Bad when the user first turns on monitoring, as it*/
/* will cause a lot of reimports (think of a 10,000 photo database) and will blow away*/
/* ALL transformations, as they are now suspect.*/
/**/
/* So: If the modification time is zero and filesize is the same, simply update the*/
/* timestamp in the database and move on.*/
/**/
/* TODO: Although it seems highly unlikely that a file's timestamp could change but the file size*/
/* has not and the file really be "changed", it *is* possible, even in the case of complex little*/
/* animals like photo files.  We could be more liberal and treat this case as a metadata-changed*/
/* situation (since that's a likely case).*/
/**/

#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <time.h>
#include <gobject/gvaluecollector.h>


#define TYPE_LIBRARY_MONITOR_POOL (library_monitor_pool_get_type ())
#define LIBRARY_MONITOR_POOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_MONITOR_POOL, LibraryMonitorPool))
#define LIBRARY_MONITOR_POOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_MONITOR_POOL, LibraryMonitorPoolClass))
#define IS_LIBRARY_MONITOR_POOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_MONITOR_POOL))
#define IS_LIBRARY_MONITOR_POOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_MONITOR_POOL))
#define LIBRARY_MONITOR_POOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_MONITOR_POOL, LibraryMonitorPoolClass))

typedef struct _LibraryMonitorPool LibraryMonitorPool;
typedef struct _LibraryMonitorPoolClass LibraryMonitorPoolClass;
typedef struct _LibraryMonitorPoolPrivate LibraryMonitorPoolPrivate;

#define TYPE_DIRECTORY_MONITOR (directory_monitor_get_type ())
#define DIRECTORY_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECTORY_MONITOR, DirectoryMonitor))
#define DIRECTORY_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECTORY_MONITOR, DirectoryMonitorClass))
#define IS_DIRECTORY_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECTORY_MONITOR))
#define IS_DIRECTORY_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECTORY_MONITOR))
#define DIRECTORY_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECTORY_MONITOR, DirectoryMonitorClass))

typedef struct _DirectoryMonitor DirectoryMonitor;
typedef struct _DirectoryMonitorClass DirectoryMonitorClass;

#define TYPE_LIBRARY_MONITOR (library_monitor_get_type ())
#define LIBRARY_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_MONITOR, LibraryMonitor))
#define LIBRARY_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_MONITOR, LibraryMonitorClass))
#define IS_LIBRARY_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_MONITOR))
#define IS_LIBRARY_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_MONITOR))
#define LIBRARY_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_MONITOR, LibraryMonitorClass))

typedef struct _LibraryMonitor LibraryMonitor;
typedef struct _LibraryMonitorClass LibraryMonitorClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _library_monitor_pool_unref0(var) ((var == NULL) ? NULL : (var = (library_monitor_pool_unref (var), NULL)))
typedef struct _ParamSpecLibraryMonitorPool ParamSpecLibraryMonitorPool;
typedef struct _DirectoryMonitorPrivate DirectoryMonitorPrivate;
typedef struct _LibraryMonitorPrivate LibraryMonitorPrivate;

#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 TYPE_MEDIA_MONITOR (media_monitor_get_type ())
#define MEDIA_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_MONITOR, MediaMonitor))
#define MEDIA_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_MONITOR, MediaMonitorClass))
#define IS_MEDIA_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_MONITOR))
#define IS_MEDIA_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_MONITOR))
#define MEDIA_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_MONITOR, MediaMonitorClass))

typedef struct _MediaMonitor MediaMonitor;
typedef struct _MediaMonitorClass MediaMonitorClass;

#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_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_BATCH_IMPORT (batch_import_get_type ())
#define BATCH_IMPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BATCH_IMPORT, BatchImport))
#define BATCH_IMPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BATCH_IMPORT, BatchImportClass))
#define IS_BATCH_IMPORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BATCH_IMPORT))
#define IS_BATCH_IMPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BATCH_IMPORT))
#define BATCH_IMPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BATCH_IMPORT, BatchImportClass))

typedef struct _BatchImport BatchImport;
typedef struct _BatchImportClass BatchImportClass;

#define TYPE_BATCH_IMPORT_ROLL (batch_import_roll_get_type ())
#define BATCH_IMPORT_ROLL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BATCH_IMPORT_ROLL, BatchImportRoll))
#define BATCH_IMPORT_ROLL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BATCH_IMPORT_ROLL, BatchImportRollClass))
#define IS_BATCH_IMPORT_ROLL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BATCH_IMPORT_ROLL))
#define IS_BATCH_IMPORT_ROLL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BATCH_IMPORT_ROLL))
#define BATCH_IMPORT_ROLL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BATCH_IMPORT_ROLL, BatchImportRollClass))

typedef struct _BatchImportRoll BatchImportRoll;
typedef struct _BatchImportRollClass BatchImportRollClass;

#define LIBRARY_MONITOR_TYPE_VERIFY_JOB (library_monitor_verify_job_get_type ())
#define LIBRARY_MONITOR_VERIFY_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIBRARY_MONITOR_TYPE_VERIFY_JOB, LibraryMonitorVerifyJob))
#define LIBRARY_MONITOR_VERIFY_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIBRARY_MONITOR_TYPE_VERIFY_JOB, LibraryMonitorVerifyJobClass))
#define LIBRARY_MONITOR_IS_VERIFY_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIBRARY_MONITOR_TYPE_VERIFY_JOB))
#define LIBRARY_MONITOR_IS_VERIFY_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIBRARY_MONITOR_TYPE_VERIFY_JOB))
#define LIBRARY_MONITOR_VERIFY_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIBRARY_MONITOR_TYPE_VERIFY_JOB, LibraryMonitorVerifyJobClass))

typedef struct _LibraryMonitorVerifyJob LibraryMonitorVerifyJob;
typedef struct _LibraryMonitorVerifyJobClass LibraryMonitorVerifyJobClass;

#define TYPE_CONFIGURATION_FACADE (configuration_facade_get_type ())
#define CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacade))
#define CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass))
#define IS_CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIGURATION_FACADE))
#define IS_CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIGURATION_FACADE))
#define CONFIGURATION_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass))

typedef struct _ConfigurationFacade ConfigurationFacade;
typedef struct _ConfigurationFacadeClass ConfigurationFacadeClass;

#define CONFIG_TYPE_FACADE (config_facade_get_type ())
#define CONFIG_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONFIG_TYPE_FACADE, ConfigFacade))
#define CONFIG_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIG_TYPE_FACADE, ConfigFacadeClass))
#define CONFIG_IS_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONFIG_TYPE_FACADE))
#define CONFIG_IS_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIG_TYPE_FACADE))
#define CONFIG_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIG_TYPE_FACADE, ConfigFacadeClass))

typedef struct _ConfigFacade ConfigFacade;
typedef struct _ConfigFacadeClass ConfigFacadeClass;

#define TYPE_TIMED_QUEUE (timed_queue_get_type ())
#define TIMED_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TIMED_QUEUE, TimedQueue))
#define TIMED_QUEUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TIMED_QUEUE, TimedQueueClass))
#define IS_TIMED_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TIMED_QUEUE))
#define IS_TIMED_QUEUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TIMED_QUEUE))
#define TIMED_QUEUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TIMED_QUEUE, TimedQueueClass))

typedef struct _TimedQueue TimedQueue;
typedef struct _TimedQueueClass TimedQueueClass;

#define TYPE_HASH_TIMED_QUEUE (hash_timed_queue_get_type ())
#define HASH_TIMED_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_HASH_TIMED_QUEUE, HashTimedQueue))
#define HASH_TIMED_QUEUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_HASH_TIMED_QUEUE, HashTimedQueueClass))
#define IS_HASH_TIMED_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_HASH_TIMED_QUEUE))
#define IS_HASH_TIMED_QUEUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_HASH_TIMED_QUEUE))
#define HASH_TIMED_QUEUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_HASH_TIMED_QUEUE, HashTimedQueueClass))

typedef struct _HashTimedQueue HashTimedQueue;
typedef struct _HashTimedQueueClass HashTimedQueueClass;
#define _workers_unref0(var) ((var == NULL) ? NULL : (var = (workers_unref (var), NULL)))
#define _batch_import_roll_unref0(var) ((var == NULL) ? NULL : (var = (batch_import_roll_unref (var), NULL)))

#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_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 _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#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 MEDIA_MONITOR_TYPE_DISCOVERED_FILE (media_monitor_discovered_file_get_type ())

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

#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 LIBRARY_MONITOR_TYPE_FIND_MOVE_JOB (library_monitor_find_move_job_get_type ())
#define LIBRARY_MONITOR_FIND_MOVE_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIBRARY_MONITOR_TYPE_FIND_MOVE_JOB, LibraryMonitorFindMoveJob))
#define LIBRARY_MONITOR_FIND_MOVE_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIBRARY_MONITOR_TYPE_FIND_MOVE_JOB, LibraryMonitorFindMoveJobClass))
#define LIBRARY_MONITOR_IS_FIND_MOVE_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIBRARY_MONITOR_TYPE_FIND_MOVE_JOB))
#define LIBRARY_MONITOR_IS_FIND_MOVE_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIBRARY_MONITOR_TYPE_FIND_MOVE_JOB))
#define LIBRARY_MONITOR_FIND_MOVE_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIBRARY_MONITOR_TYPE_FIND_MOVE_JOB, LibraryMonitorFindMoveJobClass))

typedef struct _LibraryMonitorFindMoveJob LibraryMonitorFindMoveJob;
typedef struct _LibraryMonitorFindMoveJobClass LibraryMonitorFindMoveJobClass;
#define _background_job_unref0(var) ((var == NULL) ? NULL : (var = (background_job_unref (var), NULL)))
typedef struct _LibraryMonitorAsyncDiscoveryCompletedData LibraryMonitorAsyncDiscoveryCompletedData;
typedef struct _BackgroundJobPrivate BackgroundJobPrivate;

#define BACKGROUND_JOB_TYPE_JOB_PRIORITY (background_job_job_priority_get_type ())
typedef struct _LibraryMonitorFindMoveJobPrivate LibraryMonitorFindMoveJobPrivate;

#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 _library_monitor_verify_job_unref0(var) ((var == NULL) ? NULL : (var = (library_monitor_verify_job_unref (var), NULL)))
typedef struct _LibraryMonitorVerifyJobPrivate LibraryMonitorVerifyJobPrivate;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _LibraryMonitorVerifyMonitorableData LibraryMonitorVerifyMonitorableData;

#define TYPE_BATCH_IMPORT_JOB (batch_import_job_get_type ())
#define BATCH_IMPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BATCH_IMPORT_JOB, BatchImportJob))
#define BATCH_IMPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BATCH_IMPORT_JOB, BatchImportJobClass))
#define IS_BATCH_IMPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BATCH_IMPORT_JOB))
#define IS_BATCH_IMPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BATCH_IMPORT_JOB))
#define BATCH_IMPORT_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BATCH_IMPORT_JOB, BatchImportJobClass))

typedef struct _BatchImportJob BatchImportJob;
typedef struct _BatchImportJobClass BatchImportJobClass;

#define 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;
#define _batch_import_job_unref0(var) ((var == NULL) ? NULL : (var = (batch_import_job_unref (var), NULL)))

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

#define TYPE_IMPORT_RESULT (import_result_get_type ())

#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 _batch_import_result_unref0(var) ((var == NULL) ? NULL : (var = (batch_import_result_unref (var), NULL)))

#define TYPE_TOMBSTONED_FILE (tombstoned_file_get_type ())
#define TOMBSTONED_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TOMBSTONED_FILE, TombstonedFile))
#define TOMBSTONED_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TOMBSTONED_FILE, TombstonedFileClass))
#define IS_TOMBSTONED_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TOMBSTONED_FILE))
#define IS_TOMBSTONED_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TOMBSTONED_FILE))
#define TOMBSTONED_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TOMBSTONED_FILE, TombstonedFileClass))

typedef struct _TombstonedFile TombstonedFile;
typedef struct _TombstonedFileClass TombstonedFileClass;
#define _tombstoned_file_unref0(var) ((var == NULL) ? NULL : (var = (tombstoned_file_unref (var), NULL)))

#define TOMBSTONE_TYPE_REASON (tombstone_reason_get_type ())

#define LIBRARY_MONITOR_TYPE_RUNTIME_FIND_MOVE_JOB (library_monitor_runtime_find_move_job_get_type ())
#define LIBRARY_MONITOR_RUNTIME_FIND_MOVE_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIBRARY_MONITOR_TYPE_RUNTIME_FIND_MOVE_JOB, LibraryMonitorRuntimeFindMoveJob))
#define LIBRARY_MONITOR_RUNTIME_FIND_MOVE_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIBRARY_MONITOR_TYPE_RUNTIME_FIND_MOVE_JOB, LibraryMonitorRuntimeFindMoveJobClass))
#define LIBRARY_MONITOR_IS_RUNTIME_FIND_MOVE_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIBRARY_MONITOR_TYPE_RUNTIME_FIND_MOVE_JOB))
#define LIBRARY_MONITOR_IS_RUNTIME_FIND_MOVE_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIBRARY_MONITOR_TYPE_RUNTIME_FIND_MOVE_JOB))
#define LIBRARY_MONITOR_RUNTIME_FIND_MOVE_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIBRARY_MONITOR_TYPE_RUNTIME_FIND_MOVE_JOB, LibraryMonitorRuntimeFindMoveJobClass))

typedef struct _LibraryMonitorRuntimeFindMoveJob LibraryMonitorRuntimeFindMoveJob;
typedef struct _LibraryMonitorRuntimeFindMoveJobClass LibraryMonitorRuntimeFindMoveJobClass;
typedef struct _LibraryMonitorRuntimeFindMoveJobPrivate LibraryMonitorRuntimeFindMoveJobPrivate;

#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_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 _LibraryMonitorParamSpecVerifyJob LibraryMonitorParamSpecVerifyJob;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _LibraryMonitorPool {
	GTypeInstance parent_instance;
	volatile int ref_count;
	LibraryMonitorPoolPrivate * priv;
};

struct _LibraryMonitorPoolClass {
	GTypeClass parent_class;
	void (*finalize) (LibraryMonitorPool *self);
};

struct _LibraryMonitorPoolPrivate {
	LibraryMonitor* monitor;
	guint timer_id;
};

struct _ParamSpecLibraryMonitorPool {
	GParamSpec parent_instance;
};

struct _DirectoryMonitor {
	GObject parent_instance;
	DirectoryMonitorPrivate * priv;
};

struct _DirectoryMonitorClass {
	GObjectClass parent_class;
	void (*notify_root_deleted) (DirectoryMonitor* self, GFile* root);
	void (*notify_root_moved) (DirectoryMonitor* self, GFile* old_root, GFile* new_root, GFileInfo* new_root_info);
	void (*notify_discovery_started) (DirectoryMonitor* self);
	void (*internal_notify_file_discovered) (DirectoryMonitor* self, GFile* file, GFileInfo* info);
	void (*notify_file_discovered) (DirectoryMonitor* self, GFile* file, GFileInfo* info);
	void (*internal_notify_directory_discovered) (DirectoryMonitor* self, GFile* dir, GFileInfo* info);
	void (*notify_directory_discovered) (DirectoryMonitor* self, GFile* dir, GFileInfo* info);
	void (*notify_discovery_failed) (DirectoryMonitor* self, const gchar* reason);
	void (*notify_discovery_completed) (DirectoryMonitor* self);
	void (*notify_file_created) (DirectoryMonitor* self, GFile* file, GFileInfo* info);
	void (*notify_file_moved) (DirectoryMonitor* self, GFile* old_file, GFile* new_file, GFileInfo* new_file_info);
	void (*notify_file_altered) (DirectoryMonitor* self, GFile* file);
	void (*notify_file_alteration_completed) (DirectoryMonitor* self, GFile* file, GFileInfo* info);
	void (*notify_file_attributes_altered) (DirectoryMonitor* self, GFile* file);
	void (*notify_file_deleted) (DirectoryMonitor* self, GFile* file);
	void (*notify_directory_created) (DirectoryMonitor* self, GFile* dir, GFileInfo* info);
	void (*notify_directory_moved) (DirectoryMonitor* self, GFile* old_dir, GFile* new_dir, GFileInfo* new_dir_info);
	void (*notify_directory_altered) (DirectoryMonitor* self, GFile* dir);
	void (*notify_directory_alteration_completed) (DirectoryMonitor* self, GFile* dir, GFileInfo* info);
	void (*notify_directory_attributes_altered) (DirectoryMonitor* self, GFile* dir);
	void (*notify_directory_deleted) (DirectoryMonitor* self, GFile* dir);
	void (*notify_closed) (DirectoryMonitor* self);
	void (*close) (DirectoryMonitor* self);
	void (*root_moved) (DirectoryMonitor* self, GFile* old_root, GFile* new_root, GFileInfo* new_root_info);
	void (*root_deleted) (DirectoryMonitor* self, GFile* root);
	void (*discovery_started) (DirectoryMonitor* self);
	void (*file_discovered) (DirectoryMonitor* self, GFile* file, GFileInfo* info);
	void (*directory_discovered) (DirectoryMonitor* self, GFile* file, GFileInfo* info);
	void (*discovery_failed) (DirectoryMonitor* self, const gchar* reason);
	void (*discovery_completed) (DirectoryMonitor* self);
	void (*file_created) (DirectoryMonitor* self, GFile* file, GFileInfo* info);
	void (*file_moved) (DirectoryMonitor* self, GFile* old_file, GFile* new_file, GFileInfo* new_file_info);
	void (*file_altered) (DirectoryMonitor* self, GFile* file);
	void (*file_alteration_completed) (DirectoryMonitor* self, GFile* file, GFileInfo* info);
	void (*file_attributes_altered) (DirectoryMonitor* self, GFile* file);
	void (*file_deleted) (DirectoryMonitor* self, GFile* file);
	void (*directory_created) (DirectoryMonitor* self, GFile* dir, GFileInfo* info);
	void (*directory_moved) (DirectoryMonitor* self, GFile* old_dir, GFile* new_dir, GFileInfo* new_dir_info);
	void (*directory_altered) (DirectoryMonitor* self, GFile* dir);
	void (*directory_alteration_completed) (DirectoryMonitor* self, GFile* dir, GFileInfo* info);
	void (*directory_attributes_altered) (DirectoryMonitor* self, GFile* dir);
	void (*directory_deleted) (DirectoryMonitor* self, GFile* dir);
	void (*closed) (DirectoryMonitor* self);
};

struct _LibraryMonitor {
	DirectoryMonitor parent_instance;
	LibraryMonitorPrivate * priv;
};

struct _LibraryMonitorClass {
	DirectoryMonitorClass parent_class;
};

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 _LibraryMonitorPrivate {
	Workers* workers;
	GCancellable* cancellable;
	gboolean auto_import;
	GeeHashSet* unknown_files;
	GeeList* monitors;
	GeeHashMap* discovered;
	GeeHashSet* import_queue;
	GeeHashSet* pending_imports;
	GeeArrayList* batch_import_queue;
	BatchImportRoll* current_import_roll;
	time_t last_import_roll_use;
	BatchImport* current_batch_import;
	gint checksums_completed;
	gint checksums_total;
	guint import_queue_timer_id;
	GeeQueue* verify_queue;
	gint outstanding_verify_jobs;
	gint completed_monitorable_verifies;
	gint total_monitorable_verifies;
};

typedef void (*DequeuedCallback) (gconstpointer item, void* user_data);
typedef enum  {
	MEDIA_MONITOR_DISCOVERED_FILE_REPRESENTED,
	MEDIA_MONITOR_DISCOVERED_FILE_IGNORE,
	MEDIA_MONITOR_DISCOVERED_FILE_UNKNOWN
} MediaMonitorDiscoveredFile;

struct _LibraryMonitorAsyncDiscoveryCompletedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	LibraryMonitor* self;
	GeeHashSet* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	GeeArrayList* all_candidates;
	GeeArrayList* _tmp3_;
	GeeArrayList* adopted;
	GeeArrayList* _tmp4_;
	GeeIterator* _file_it;
	GeeHashSet* _tmp5_;
	GeeIterator* _tmp6_;
	GeeIterator* _tmp7_;
	gboolean _tmp8_;
	GFile* file;
	GeeIterator* _tmp9_;
	gpointer _tmp10_;
	GFileInfo* info;
	GFile* _tmp11_;
	GFileInfo* _tmp12_;
	GFileInfo* _tmp13_;
	GeeArrayList* _tmp14_;
	GeeCollection* candidates;
	gboolean associated;
	GeeList* _monitor_list;
	GeeList* _tmp15_;
	GeeList* _tmp16_;
	gint _monitor_size;
	GeeList* _tmp17_;
	gint _tmp18_;
	gint _tmp19_;
	gint _monitor_index;
	gint _tmp20_;
	gint _tmp21_;
	gint _tmp22_;
	MediaMonitor* monitor;
	GeeList* _tmp23_;
	gint _tmp24_;
	gpointer _tmp25_;
	MediaMonitorDiscoveredFile _result_;
	MediaMonitor* _tmp26_;
	GFile* _tmp27_;
	GFileInfo* _tmp28_;
	MediaMonitorDiscoveredFile _tmp29_;
	GeeCollection* _tmp30_;
	gboolean _tmp31_;
	MediaMonitorDiscoveredFile _tmp32_;
	MediaMonitorDiscoveredFile _tmp33_;
	GeeCollection* _tmp34_;
	GeeArrayList* _tmp35_;
	GeeCollection* _tmp36_;
	gboolean _tmp37_;
	GeeArrayList* _tmp38_;
	GFile* _tmp39_;
	GeeArrayList* _tmp40_;
	gint _tmp41_;
	gint _tmp42_;
	GeeArrayList* job_candidates;
	GeeArrayList* _tmp43_;
	GeeArrayList* _tmp44_;
	GeeArrayList* _tmp45_;
	gint _tmp46_;
	Workers* _tmp47_;
	GFile* _tmp48_;
	GeeArrayList* _tmp49_;
	LibraryMonitorFindMoveJob* _tmp50_;
	LibraryMonitorFindMoveJob* _tmp51_;
	GeeHashSet* _tmp52_;
	GeeArrayList* _tmp53_;
	gint _tmp54_;
	gint _tmp55_;
	gchar* _tmp56_;
	gchar* _tmp57_;
	gint _tmp58_;
	gint _tmp59_;
};

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 _LibraryMonitorFindMoveJob {
	BackgroundJob parent_instance;
	LibraryMonitorFindMoveJobPrivate * priv;
	GFile* file;
	GeeCollection* candidates;
	Monitorable* match;
	GeeArrayList* losers;
	GError* err;
};

struct _LibraryMonitorFindMoveJobClass {
	BackgroundJobClass parent_class;
};

struct _LibraryMonitorVerifyJob {
	GTypeInstance parent_instance;
	volatile int ref_count;
	LibraryMonitorVerifyJobPrivate * priv;
	Monitorable* monitorable;
	MediaMonitor* monitor;
};

struct _LibraryMonitorVerifyJobClass {
	GTypeClass parent_class;
	void (*finalize) (LibraryMonitorVerifyJob *self);
};

struct _LibraryMonitorVerifyMonitorableData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	LibraryMonitor* self;
	Monitorable* monitorable;
	MediaMonitor* monitor;
	GFile** files;
	GFile** _tmp0_;
	gint files_length1;
	gint _files_size_;
	GFile** _tmp1_;
	gint _tmp1__length1;
	MediaMonitor* _tmp2_;
	Monitorable* _tmp3_;
	GFile* _tmp4_;
	GFile* _tmp5_;
	GFile** aux_files;
	MediaMonitor* _tmp6_;
	Monitorable* _tmp7_;
	gint _tmp8_;
	GFile** _tmp9_;
	gint aux_files_length1;
	gint _aux_files_size_;
	GFile** _tmp10_;
	gint _tmp10__length1;
	GFile** _tmp11_;
	gint _tmp11__length1;
	GFile** aux_file_collection;
	gint aux_file_collection_length1;
	gint _aux_file_collection_size_;
	gint aux_file_it;
	GFile* _tmp12_;
	GFile* aux_file;
	GFile** _tmp13_;
	gint _tmp13__length1;
	GFile* _tmp14_;
	GFile* _tmp15_;
	gint ctr;
	gboolean _tmp16_;
	gint _tmp17_;
	gint _tmp18_;
	GFile** _tmp19_;
	gint _tmp19__length1;
	GFile* file;
	GFile** _tmp20_;
	gint _tmp20__length1;
	gint _tmp21_;
	GFile* _tmp22_;
	GFile* _tmp23_;
	GFileInfo* info;
	GFile* _tmp24_;
	GFileInfo* _tmp25_;
	GFileInfo* _tmp26_;
	GFileInfo* _tmp27_;
	GFile* _tmp28_;
	GCancellable* _tmp29_;
	GFileInfo* _tmp30_;
	GFileInfo* _tmp31_;
	GError* err;
	gint _tmp32_;
	gboolean _tmp33_;
	GFileInfo* _tmp34_;
	MediaMonitor* _tmp35_;
	Monitorable* _tmp36_;
	gboolean _tmp37_;
	MediaMonitor* _tmp38_;
	Monitorable* _tmp39_;
	gboolean _tmp40_;
	GFileInfo* _tmp41_;
	MediaMonitor* _tmp42_;
	Monitorable* _tmp43_;
	gboolean _tmp44_;
	MediaMonitor* _tmp45_;
	Monitorable* _tmp46_;
	MediaMonitor* _tmp47_;
	Monitorable* _tmp48_;
	GFile* _tmp49_;
	GFileInfo* _tmp50_;
	gint _tmp51_;
	gint _tmp52_;
	gint _tmp53_;
	gint _tmp54_;
	gint _tmp55_;
	GError * _inner_error_;
};

typedef void (*BatchImportImportReporter) (ImportManifest* manifest, BatchImportRoll* import_roll, void* user_data);
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);
};

typedef enum  {
	IMPORT_RESULT_SUCCESS,
	IMPORT_RESULT_FILE_ERROR,
	IMPORT_RESULT_DECODE_ERROR,
	IMPORT_RESULT_DATABASE_ERROR,
	IMPORT_RESULT_USER_ABORT,
	IMPORT_RESULT_NOT_A_FILE,
	IMPORT_RESULT_PHOTO_EXISTS,
	IMPORT_RESULT_UNSUPPORTED_FORMAT,
	IMPORT_RESULT_NOT_AN_IMAGE,
	IMPORT_RESULT_DISK_FAILURE,
	IMPORT_RESULT_DISK_FULL,
	IMPORT_RESULT_CAMERA_ERROR,
	IMPORT_RESULT_FILE_WRITE_ERROR,
	IMPORT_RESULT_PIXBUF_CORRUPT_IMAGE
} ImportResult;

struct _BatchImportResult {
	GTypeInstance parent_instance;
	volatile int ref_count;
	BatchImportResultPrivate * priv;
	BatchImportJob* job;
	GFile* file;
	gchar* src_identifier;
	gchar* dest_identifier;
	ImportResult result;
	gchar* errmsg;
	DuplicatedFile* duplicate_of;
};

struct _BatchImportResultClass {
	GTypeClass parent_class;
	void (*finalize) (BatchImportResult *self);
};

typedef enum  {
	TOMBSTONE_REASON_REMOVED_BY_USER = 0,
	TOMBSTONE_REASON_AUTO_DETECTED_DUPLICATE = 1
} TombstoneReason;

typedef enum  {
	DATABASE_ERROR_ERROR,
	DATABASE_ERROR_BACKING,
	DATABASE_ERROR_MEMORY,
	DATABASE_ERROR_ABORT,
	DATABASE_ERROR_LIMITS,
	DATABASE_ERROR_TYPESPEC
} DatabaseError;
#define DATABASE_ERROR database_error_quark ()
struct _LibraryMonitorRuntimeFindMoveJob {
	BackgroundJob parent_instance;
	LibraryMonitorRuntimeFindMoveJobPrivate * priv;
	GFile* file;
	GeeCollection* candidates;
	Monitorable* match;
	GError* err;
};

struct _LibraryMonitorRuntimeFindMoveJobClass {
	BackgroundJobClass parent_class;
};

typedef void (*CompletionCallback) (BackgroundJob* job, void* user_data);
typedef void (*CancellationCallback) (BackgroundJob* job, void* user_data);
struct _LibraryMonitorParamSpecVerifyJob {
	GParamSpec parent_instance;
};


static gpointer library_monitor_pool_parent_class = NULL;
static LibraryMonitorPool* library_monitor_pool_instance;
static LibraryMonitorPool* library_monitor_pool_instance = NULL;
static gpointer library_monitor_parent_class = NULL;
static GeeHashSet* library_monitor_blacklist;
static GRecMutex __lock_library_monitor_blacklist = {0};
static GeeHashSet* library_monitor_blacklist = NULL;
static HashTimedQueue* library_monitor_to_unblacklist;
static HashTimedQueue* library_monitor_to_unblacklist = NULL;
extern TombstoneSourceCollection* tombstone_global;
extern gboolean commandline_options_no_runtime_monitoring;
static gpointer library_monitor_find_move_job_parent_class = NULL;
static gpointer library_monitor_runtime_find_move_job_parent_class = NULL;
static gpointer library_monitor_verify_job_parent_class = NULL;

gpointer library_monitor_pool_ref (gpointer instance);
void library_monitor_pool_unref (gpointer instance);
GParamSpec* param_spec_library_monitor_pool (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_library_monitor_pool (GValue* value, gpointer v_object);
void value_take_library_monitor_pool (GValue* value, gpointer v_object);
gpointer value_get_library_monitor_pool (const GValue* value);
GType library_monitor_pool_get_type (void) G_GNUC_CONST;
GType directory_monitor_get_type (void) G_GNUC_CONST;
GType library_monitor_get_type (void) G_GNUC_CONST;
#define LIBRARY_MONITOR_POOL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_LIBRARY_MONITOR_POOL, LibraryMonitorPoolPrivate))
enum  {
	LIBRARY_MONITOR_POOL_DUMMY_PROPERTY
};
static LibraryMonitorPool* library_monitor_pool_new (void);
static LibraryMonitorPool* library_monitor_pool_construct (GType object_type);
void library_monitor_pool_init (void);
void library_monitor_pool_terminate (void);
static void library_monitor_pool_close (LibraryMonitorPool* self);
LibraryMonitorPool* library_monitor_pool_get_instance (void);
LibraryMonitor* library_monitor_pool_get_monitor (LibraryMonitorPool* self);
void library_monitor_pool_replace (LibraryMonitorPool* self, LibraryMonitor* replacement, gint start_msec_delay);
static gboolean library_monitor_pool_on_start_monitor (LibraryMonitorPool* self);
static gboolean _library_monitor_pool_on_start_monitor_gsource_func (gpointer self);
void directory_monitor_close (DirectoryMonitor* self);
void directory_monitor_start_discovery (DirectoryMonitor* self);
static void library_monitor_pool_finalize (LibraryMonitorPool* obj);
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;
GType media_monitor_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;
GType monitorable_get_type (void) G_GNUC_CONST;
GType batch_import_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;
static gpointer library_monitor_verify_job_ref (gpointer instance);
static void library_monitor_verify_job_unref (gpointer instance);
static GParamSpec* library_monitor_param_spec_verify_job (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
static void library_monitor_value_set_verify_job (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static void library_monitor_value_take_verify_job (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static gpointer library_monitor_value_get_verify_job (const GValue* value) G_GNUC_UNUSED;
static GType library_monitor_verify_job_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
#define LIBRARY_MONITOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_LIBRARY_MONITOR, LibraryMonitorPrivate))
enum  {
	LIBRARY_MONITOR_DUMMY_PROPERTY
};
GType configuration_facade_get_type (void) G_GNUC_CONST;
GType config_facade_get_type (void) G_GNUC_CONST;
ConfigFacade* config_facade_get_instance (void);
static void library_monitor_on_config_changed (LibraryMonitor* self);
static void _library_monitor_on_config_changed_configuration_facade_auto_import_from_library_changed (ConfigurationFacade* _sender, gpointer self);
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);
gpointer timed_queue_ref (gpointer instance);
void timed_queue_unref (gpointer instance);
GParamSpec* param_spec_timed_queue (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_timed_queue (GValue* value, gpointer v_object);
void value_take_timed_queue (GValue* value, gpointer v_object);
gpointer value_get_timed_queue (const GValue* value);
GType timed_queue_get_type (void) G_GNUC_CONST;
GType hash_timed_queue_get_type (void) G_GNUC_CONST;
#define LIBRARY_MONITOR_MIN_BLACKLIST_DURATION_MSEC (5 * 1000)
static void library_monitor_on_unblacklist_file (GFile* file);
static void _library_monitor_on_unblacklist_file_dequeued_callback (gconstpointer item, gpointer self);
HashTimedQueue* hash_timed_queue_new (GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, guint hold_msec, DequeuedCallback callback, void* callback_target, GeeHashDataFunc hash_func, void* hash_func_target, GDestroyNotify hash_func_target_destroy_notify, GeeEqualDataFunc equal_func, void* equal_func_target, GDestroyNotify equal_func_target_destroy_notify, gint priority);
HashTimedQueue* hash_timed_queue_construct (GType object_type, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, guint hold_msec, DequeuedCallback callback, void* callback_target, GeeHashDataFunc hash_func, void* hash_func_target, GDestroyNotify hash_func_target_destroy_notify, GeeEqualDataFunc equal_func, void* equal_func_target, GDestroyNotify equal_func_target_destroy_notify, gint priority);
guint workers_thread_per_cpu_minus_one (void);
Workers* workers_new (guint max_threads, gboolean exclusive);
Workers* workers_construct (GType object_type, guint max_threads, gboolean exclusive);
#define LIBRARY_MONITOR_FLUSH_IMPORT_QUEUE_SEC 3
#define LIBRARY_MONITOR_IMPORT_ROLL_QUIET_SEC (5 * 60)
#define LIBRARY_MONITOR_MAX_VERIFY_EXISTING_MEDIA_JOBS 5
LibraryMonitor* library_monitor_new (GFile* root, gboolean recurse, gboolean monitoring);
LibraryMonitor* library_monitor_construct (GType object_type, GFile* root, gboolean recurse, gboolean monitoring);
DirectoryMonitor* directory_monitor_new (GFile* root, gboolean recurse, gboolean monitoring);
DirectoryMonitor* directory_monitor_construct (GType object_type, GFile* root, gboolean recurse, gboolean monitoring);
gboolean configuration_facade_get_auto_import_from_library (ConfigurationFacade* self);
static gboolean library_monitor_on_flush_import_queue (LibraryMonitor* self);
static gboolean _library_monitor_on_flush_import_queue_gsource_func (gpointer self);
static void library_monitor_real_close (DirectoryMonitor* base);
void media_monitor_close (MediaMonitor* self);
static void library_monitor_add_to_discovered_list (LibraryMonitor* self, MediaMonitor* monitor, Monitorable* monitorable);
static MediaMonitor* library_monitor_get_monitor_for_monitorable (LibraryMonitor* self, Monitorable* monitorable);
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 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;
MediaSourceCollection* media_monitor_get_media_source_collection (MediaMonitor* self);
gboolean source_collection_holds_type_of_source (SourceCollection* self, DataSource* source);
gchar* data_object_to_string (DataObject* self);
static void library_monitor_real_discovery_started (DirectoryMonitor* base);
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);
GeeCollection* media_collection_registry_get_all (MediaCollectionRegistry* self);
MediaMonitor* media_source_collection_create_media_monitor (MediaSourceCollection* self, Workers* workers, GCancellable* cancellable);
void media_monitor_notify_discovery_started (MediaMonitor* self);
static void library_monitor_real_file_discovered (DirectoryMonitor* base, GFile* file, GFileInfo* info);
GType media_monitor_discovered_file_get_type (void) G_GNUC_CONST;
MediaMonitorDiscoveredFile media_monitor_notify_file_discovered (MediaMonitor* self, GFile* file, GFileInfo* info, Monitorable** monitorable);
GType tombstone_source_collection_get_type (void) G_GNUC_CONST;
gboolean tombstone_source_collection_matches (TombstoneSourceCollection* self, GFile* file);
static gboolean library_monitor_is_supported_filetype (LibraryMonitor* self, GFile* file);
static void library_monitor_real_discovery_completed (DirectoryMonitor* base);
static void library_monitor_async_discovery_completed (LibraryMonitor* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void library_monitor_async_discovery_completed_finish (LibraryMonitor* self, GAsyncResult* _res_);
static void library_monitor_async_discovery_completed_data_free (gpointer _data);
static gboolean library_monitor_async_discovery_completed_co (LibraryMonitorAsyncDiscoveryCompletedData* _data_);
static void library_monitor_discovery_stage_completed (LibraryMonitor* self);
GFileInfo* directory_monitor_get_file_info (DirectoryMonitor* self, GFile* file);
GeeCollection* media_monitor_candidates_for_unknown_file (MediaMonitor* self, GFile* file, GFileInfo* info, MediaMonitorDiscoveredFile* _result_);
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;
void workers_enqueue (Workers* self, BackgroundJob* job);
static LibraryMonitorFindMoveJob* library_monitor_find_move_job_new (LibraryMonitor* owner, GFile* file, GeeCollection* candidates);
static LibraryMonitorFindMoveJob* library_monitor_find_move_job_construct (GType object_type, LibraryMonitor* owner, GFile* file, GeeCollection* candidates);
static GType library_monitor_find_move_job_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static gboolean _library_monitor_async_discovery_completed_co_gsource_func (gpointer self);
void directory_monitor_mdbg (const gchar* msg);
static void library_monitor_report_checksum_job_completed (LibraryMonitor* self);
static void library_monitor_on_find_move_completed (LibraryMonitor* self, BackgroundJob* j);
GType background_job_job_priority_get_type (void) G_GNUC_CONST;
void media_monitor_update_master_file (MediaMonitor* self, Monitorable* monitorable, GFile* file);
static void library_monitor_on_find_move_cancelled (LibraryMonitor* self, BackgroundJob* j);
static void library_monitor_enqueue_verify_monitorable (LibraryMonitor* self, Monitorable* monitorable, MediaMonitor* monitor);
GeeCollection* data_collection_get_all (DataCollection* self);
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);
GeeCollection* source_holding_tank_get_all (SourceHoldingTank* self);
static void library_monitor_enqueue_import_many (LibraryMonitor* self, GeeCollection* files);
void tombstone_source_collection_launch_scan (TombstoneSourceCollection* self, DirectoryMonitor* monitor, GCancellable* cancellable);
static LibraryMonitorVerifyJob* library_monitor_verify_job_new (Monitorable* monitorable, MediaMonitor* monitor);
static LibraryMonitorVerifyJob* library_monitor_verify_job_construct (GType object_type, Monitorable* monitorable, MediaMonitor* monitor);
static void library_monitor_execute_next_verify_job (LibraryMonitor* self);
static void library_monitor_verify_monitorable (LibraryMonitor* self, Monitorable* monitorable, MediaMonitor* monitor, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void library_monitor_verify_monitorable_finish (LibraryMonitor* self, GAsyncResult* _res_);
static void library_monitor_verify_monitorable_data_free (gpointer _data);
static gboolean library_monitor_verify_monitorable_co (LibraryMonitorVerifyMonitorableData* _data_);
GFile* media_monitor_get_master_file (MediaMonitor* self, Monitorable* monitorable);
GFile** media_monitor_get_auxilliary_backing_files (MediaMonitor* self, Monitorable* monitorable, int* result_length1);
static void _vala_array_add296 (GFile*** array, int* length, int* size, GFile* value);
#define UTIL_FILE_ATTRIBUTES "standard::*,time::*,id::file,id::filesystem,etag::value"
#define DIRECTORY_MONITOR_SUPPLIED_ATTRIBUTES UTIL_FILE_ATTRIBUTES
#define DIRECTORY_MONITOR_FILE_INFO_FLAGS G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS
#define DIRECTORY_MONITOR_DEFAULT_PRIORITY G_PRIORITY_LOW
static void library_monitor_verify_monitorable_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
gboolean media_monitor_is_offline (MediaMonitor* self, Monitorable* monitorable);
void media_monitor_update_online (MediaMonitor* self, Monitorable* monitorable);
void media_monitor_update_offline (MediaMonitor* self, Monitorable* monitorable);
void media_monitor_update_backing_file_info (MediaMonitor* self, Monitorable* monitorable, GFile* file, GFileInfo* info);
static gboolean _library_monitor_verify_monitorable_co_gsource_func (gpointer self);
static void library_monitor_import_unrepresented_files (LibraryMonitor* self);
static void library_monitor_cancel_batch_imports (LibraryMonitor* self);
static void library_monitor_enqueue_import (LibraryMonitor* self, GFile* file);
gboolean library_monitor_is_blacklisted (GFile* file);
static void library_monitor_remove_queued_import (LibraryMonitor* self, GFile* file);
gulong now_sec (void);
BatchImportRoll* batch_import_roll_new (void);
BatchImportRoll* batch_import_roll_construct (GType object_type);
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;
FileImportJob* file_import_job_new (GFile* file_or_dir, gboolean copy_to_library);
FileImportJob* file_import_job_construct (GType object_type, GFile* file_or_dir, gboolean copy_to_library);
GType file_import_job_get_type (void) G_GNUC_CONST;
gpointer import_manifest_ref (gpointer instance);
void import_manifest_unref (gpointer instance);
GParamSpec* param_spec_import_manifest (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_import_manifest (GValue* value, gpointer v_object);
void value_take_import_manifest (GValue* value, gpointer v_object);
gpointer value_get_import_manifest (const GValue* value);
GType import_manifest_get_type (void) G_GNUC_CONST;
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);
void batch_import_set_untrash_duplicates (BatchImport* self, gboolean untrash_duplicates);
void batch_import_set_mark_duplicates_online (BatchImport* self, gboolean mark_duplicates_online);
static void library_monitor_schedule_next_batch_import (LibraryMonitor* self);
static void library_monitor_on_import_preparing (LibraryMonitor* self);
static void _library_monitor_on_import_preparing_batch_import_preparing (BatchImport* _sender, gpointer self);
static void library_monitor_on_import_progress (LibraryMonitor* self, guint64 completed_bytes, guint64 total_bytes);
static void _library_monitor_on_import_progress_batch_import_progress (BatchImport* _sender, guint64 completed_bytes, guint64 total_bytes, gpointer self);
static void library_monitor_on_import_complete (LibraryMonitor* self, BatchImport* batch_import, ImportManifest* manifest, BatchImportRoll* import_roll);
static void _library_monitor_on_import_complete_batch_import_import_complete (BatchImport* _sender, ImportManifest* manifest, BatchImportRoll* import_roll, gpointer self);
void batch_import_schedule (BatchImport* self);
static void library_monitor_discard_current_batch_import (LibraryMonitor* self);
void batch_import_user_halt (BatchImport* self);
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;
GType import_result_get_type (void) G_GNUC_CONST;
GType duplicated_file_get_type (void) G_GNUC_CONST;
gpointer tombstoned_file_ref (gpointer instance);
void tombstoned_file_unref (gpointer instance);
GParamSpec* param_spec_tombstoned_file (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_tombstoned_file (GValue* value, gpointer v_object);
void value_take_tombstoned_file (GValue* value, gpointer v_object);
gpointer value_get_tombstoned_file (const GValue* value);
GType tombstoned_file_get_type (void) G_GNUC_CONST;
TombstonedFile* tombstoned_file_new (GFile* file, gint64 filesize, const gchar* md5);
TombstonedFile* tombstoned_file_construct (GType object_type, GFile* file, gint64 filesize, const gchar* md5);
GType tombstone_reason_get_type (void) G_GNUC_CONST;
GQuark database_error_quark (void);
void tombstone_entomb_many_files (GeeCollection* files, TombstoneReason reason, GError** error);
void app_window_database_error (GError* err);
void library_monitor_blacklist_file (GFile* file, const gchar* reason);
void library_monitor_unblacklist_file (GFile* file);
gboolean timed_queue_contains (TimedQueue* self, gconstpointer item);
gboolean timed_queue_enqueue (TimedQueue* self, gconstpointer item);
MediaSourceCollection* media_collection_registry_get_collection_for_file (MediaCollectionRegistry* self, GFile* file);
GeeCollection* directory_monitor_get_files (DirectoryMonitor* self);
gboolean media_monitor_is_file_represented (MediaMonitor* self, GFile* file);
static void library_monitor_runtime_unknown_file_discovered (LibraryMonitor* self, GFile* file);
static void library_monitor_real_notify_file_created (DirectoryMonitor* base, GFile* file, GFileInfo* info);
void directory_monitor_notify_file_created (DirectoryMonitor* self, GFile* file, GFileInfo* info);
gboolean media_monitor_notify_file_created (MediaMonitor* self, GFile* file, GFileInfo* info);
gchar* media_monitor_to_string (MediaMonitor* self);
const gchar* media_monitor_discovered_file_to_string (MediaMonitorDiscoveredFile self);
static LibraryMonitorRuntimeFindMoveJob* library_monitor_runtime_find_move_job_new (LibraryMonitor* owner, GFile* file, GeeCollection* candidates);
static LibraryMonitorRuntimeFindMoveJob* library_monitor_runtime_find_move_job_construct (GType object_type, LibraryMonitor* owner, GFile* file, GeeCollection* candidates);
static GType library_monitor_runtime_find_move_job_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static void library_monitor_on_runtime_find_move_completed (LibraryMonitor* self, BackgroundJob* j);
static void library_monitor_real_notify_file_moved (DirectoryMonitor* base, GFile* old_file, GFile* new_file, GFileInfo* new_info);
void directory_monitor_notify_file_moved (DirectoryMonitor* self, GFile* old_file, GFile* new_file, GFileInfo* new_file_info);
gboolean media_monitor_notify_file_moved (MediaMonitor* self, GFile* old_file, GFile* new_file, GFileInfo* new_file_info);
static void library_monitor_real_notify_file_altered (DirectoryMonitor* base, GFile* file);
void directory_monitor_notify_file_altered (DirectoryMonitor* self, GFile* file);
gboolean media_monitor_notify_file_altered (MediaMonitor* self, GFile* file);
static void library_monitor_real_notify_file_attributes_altered (DirectoryMonitor* base, GFile* file);
void directory_monitor_notify_file_attributes_altered (DirectoryMonitor* self, GFile* file);
gboolean media_monitor_notify_file_attributes_altered (MediaMonitor* self, GFile* file);
static void library_monitor_real_notify_file_alteration_completed (DirectoryMonitor* base, GFile* file, GFileInfo* info);
void directory_monitor_notify_file_alteration_completed (DirectoryMonitor* self, GFile* file, GFileInfo* info);
gboolean media_monitor_notify_file_alteration_completed (MediaMonitor* self, GFile* file, GFileInfo* info);
static void library_monitor_real_notify_file_deleted (DirectoryMonitor* base, GFile* file);
void directory_monitor_notify_file_deleted (DirectoryMonitor* self, GFile* file);
gboolean media_monitor_notify_file_deleted (MediaMonitor* self, GFile* file);
GType tombstone_get_type (void) G_GNUC_CONST;
Tombstone* tombstone_source_collection_locate (TombstoneSourceCollection* self, GFile* file);
void tombstone_source_collection_resurrect (TombstoneSourceCollection* self, Tombstone* tombstone);
static void g_cclosure_user_marshal_VOID__INT_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__UINT64_UINT64 (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
enum  {
	LIBRARY_MONITOR_FIND_MOVE_JOB_DUMMY_PROPERTY
};
static void _library_monitor_on_find_move_completed_completion_callback (BackgroundJob* job, gpointer self);
static void _library_monitor_on_find_move_cancelled_cancellation_callback (BackgroundJob* job, gpointer self);
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);
void background_job_set_completion_priority (BackgroundJob* self, gint priority);
static void library_monitor_find_move_job_real_execute (BackgroundJob* base);
GFile* media_source_get_master_file (MediaSource* self);
gchar* md5_file (GFile* file, GError** error);
gchar* media_source_get_master_md5 (MediaSource* self);
static void library_monitor_find_move_job_finalize (BackgroundJob* obj);
enum  {
	LIBRARY_MONITOR_RUNTIME_FIND_MOVE_JOB_DUMMY_PROPERTY
};
static void _library_monitor_on_runtime_find_move_completed_completion_callback (BackgroundJob* job, gpointer self);
static void library_monitor_runtime_find_move_job_real_execute (BackgroundJob* base);
static void library_monitor_runtime_find_move_job_finalize (BackgroundJob* obj);
enum  {
	LIBRARY_MONITOR_VERIFY_JOB_DUMMY_PROPERTY
};
static void library_monitor_verify_job_finalize (LibraryMonitorVerifyJob* obj);
static void library_monitor_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


static LibraryMonitorPool* library_monitor_pool_construct (GType object_type) {
	LibraryMonitorPool* self = NULL;
#line 38 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = (LibraryMonitorPool*) g_type_create_instance (object_type);
#line 38 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return self;
#line 1218 "LibraryMonitor.c"
}


static LibraryMonitorPool* library_monitor_pool_new (void) {
#line 38 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return library_monitor_pool_construct (TYPE_LIBRARY_MONITOR_POOL);
#line 1225 "LibraryMonitor.c"
}


void library_monitor_pool_init (void) {
}


void library_monitor_pool_terminate (void) {
	LibraryMonitorPool* _tmp0_ = NULL;
#line 45 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = library_monitor_pool_instance;
#line 45 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp0_ != NULL) {
#line 1239 "LibraryMonitor.c"
		LibraryMonitorPool* _tmp1_ = NULL;
#line 46 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp1_ = library_monitor_pool_instance;
#line 46 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_pool_close (_tmp1_);
#line 1245 "LibraryMonitor.c"
	}
#line 48 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_library_monitor_pool_unref0 (library_monitor_pool_instance);
#line 48 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_pool_instance = NULL;
#line 1251 "LibraryMonitor.c"
}


static gpointer _library_monitor_pool_ref0 (gpointer self) {
#line 55 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return self ? library_monitor_pool_ref (self) : NULL;
#line 1258 "LibraryMonitor.c"
}


LibraryMonitorPool* library_monitor_pool_get_instance (void) {
	LibraryMonitorPool* result = NULL;
	LibraryMonitorPool* _tmp0_ = NULL;
	LibraryMonitorPool* _tmp2_ = NULL;
	LibraryMonitorPool* _tmp3_ = NULL;
#line 52 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = library_monitor_pool_instance;
#line 52 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp0_ == NULL) {
#line 1271 "LibraryMonitor.c"
		LibraryMonitorPool* _tmp1_ = NULL;
#line 53 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp1_ = library_monitor_pool_new ();
#line 53 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_library_monitor_pool_unref0 (library_monitor_pool_instance);
#line 53 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_pool_instance = _tmp1_;
#line 1279 "LibraryMonitor.c"
	}
#line 55 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = library_monitor_pool_instance;
#line 55 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp3_ = _library_monitor_pool_ref0 (_tmp2_);
#line 55 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	result = _tmp3_;
#line 55 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return result;
#line 1289 "LibraryMonitor.c"
}


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


LibraryMonitor* library_monitor_pool_get_monitor (LibraryMonitorPool* self) {
	LibraryMonitor* result = NULL;
	LibraryMonitor* _tmp0_ = NULL;
	LibraryMonitor* _tmp1_ = NULL;
#line 58 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (IS_LIBRARY_MONITOR_POOL (self), NULL);
#line 59 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = self->priv->monitor;
#line 59 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 59 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	result = _tmp1_;
#line 59 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return result;
#line 1314 "LibraryMonitor.c"
}


static gboolean _library_monitor_pool_on_start_monitor_gsource_func (gpointer self) {
	gboolean result;
	result = library_monitor_pool_on_start_monitor ((LibraryMonitorPool*) self);
#line 68 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return result;
#line 1323 "LibraryMonitor.c"
}


void library_monitor_pool_replace (LibraryMonitorPool* self, LibraryMonitor* replacement, gint start_msec_delay) {
	LibraryMonitor* _tmp0_ = NULL;
	LibraryMonitor* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gint _tmp3_ = 0;
	LibraryMonitor* _tmp7_ = NULL;
#line 63 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR_POOL (self));
#line 63 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (replacement));
#line 64 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_pool_close (self);
#line 66 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = replacement;
#line 66 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 66 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->priv->monitor);
#line 66 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->monitor = _tmp1_;
#line 67 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp3_ = start_msec_delay;
#line 67 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp3_ > 0) {
#line 1351 "LibraryMonitor.c"
		guint _tmp4_ = 0U;
#line 67 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = self->priv->timer_id;
#line 67 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp2_ = _tmp4_ == ((guint) 0);
#line 1357 "LibraryMonitor.c"
	} else {
#line 67 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp2_ = FALSE;
#line 1361 "LibraryMonitor.c"
	}
#line 67 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp2_) {
#line 1365 "LibraryMonitor.c"
		gint _tmp5_ = 0;
		guint _tmp6_ = 0U;
#line 68 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp5_ = start_msec_delay;
#line 68 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp6_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) _tmp5_, _library_monitor_pool_on_start_monitor_gsource_func, library_monitor_pool_ref (self), library_monitor_pool_unref);
#line 68 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		self->priv->timer_id = _tmp6_;
#line 1374 "LibraryMonitor.c"
	}
#line 70 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp7_ = self->priv->monitor;
#line 70 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_emit_by_name (self, "monitor-installed", _tmp7_);
#line 1380 "LibraryMonitor.c"
}


static void library_monitor_pool_close (LibraryMonitorPool* self) {
	LibraryMonitor* _tmp0_ = NULL;
	LibraryMonitor* _tmp1_ = NULL;
	LibraryMonitor* closed = NULL;
	LibraryMonitor* _tmp2_ = NULL;
	LibraryMonitor* _tmp3_ = NULL;
	LibraryMonitor* _tmp4_ = NULL;
#line 73 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR_POOL (self));
#line 74 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = self->priv->monitor;
#line 74 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp0_ == NULL) {
#line 75 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return;
#line 1399 "LibraryMonitor.c"
	}
#line 77 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = self->priv->monitor;
#line 77 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	directory_monitor_close (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DIRECTORY_MONITOR, DirectoryMonitor));
#line 78 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = self->priv->monitor;
#line 78 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 78 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	closed = _tmp3_;
#line 79 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->priv->monitor);
#line 79 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->monitor = NULL;
#line 81 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp4_ = closed;
#line 81 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_emit_by_name (self, "monitor-destroyed", _tmp4_);
#line 73 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (closed);
#line 1421 "LibraryMonitor.c"
}


static gboolean library_monitor_pool_on_start_monitor (LibraryMonitorPool* self) {
	gboolean result = FALSE;
	LibraryMonitor* _tmp0_ = NULL;
	LibraryMonitor* _tmp1_ = NULL;
#line 84 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (IS_LIBRARY_MONITOR_POOL (self), FALSE);
#line 86 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->timer_id = (guint) 0;
#line 88 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = self->priv->monitor;
#line 88 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp0_ == NULL) {
#line 89 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		result = FALSE;
#line 89 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return result;
#line 1441 "LibraryMonitor.c"
	}
#line 91 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = self->priv->monitor;
#line 91 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	directory_monitor_start_discovery (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DIRECTORY_MONITOR, DirectoryMonitor));
#line 93 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	result = FALSE;
#line 93 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return result;
#line 1451 "LibraryMonitor.c"
}


static void value_library_monitor_pool_init (GValue* value) {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	value->data[0].v_pointer = NULL;
#line 1458 "LibraryMonitor.c"
}


static void value_library_monitor_pool_free_value (GValue* value) {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (value->data[0].v_pointer) {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_pool_unref (value->data[0].v_pointer);
#line 1467 "LibraryMonitor.c"
	}
}


static void value_library_monitor_pool_copy_value (const GValue* src_value, GValue* dest_value) {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (src_value->data[0].v_pointer) {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		dest_value->data[0].v_pointer = library_monitor_pool_ref (src_value->data[0].v_pointer);
#line 1477 "LibraryMonitor.c"
	} else {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		dest_value->data[0].v_pointer = NULL;
#line 1481 "LibraryMonitor.c"
	}
}


static gpointer value_library_monitor_pool_peek_pointer (const GValue* value) {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return value->data[0].v_pointer;
#line 1489 "LibraryMonitor.c"
}


static gchar* value_library_monitor_pool_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (collect_values[0].v_pointer) {
#line 1496 "LibraryMonitor.c"
		LibraryMonitorPool* object;
		object = collect_values[0].v_pointer;
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (object->parent_instance.g_class == NULL) {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 1503 "LibraryMonitor.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.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 1507 "LibraryMonitor.c"
		}
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		value->data[0].v_pointer = library_monitor_pool_ref (object);
#line 1511 "LibraryMonitor.c"
	} else {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		value->data[0].v_pointer = NULL;
#line 1515 "LibraryMonitor.c"
	}
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return NULL;
#line 1519 "LibraryMonitor.c"
}


static gchar* value_library_monitor_pool_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	LibraryMonitorPool** object_p;
	object_p = collect_values[0].v_pointer;
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (!object_p) {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 1530 "LibraryMonitor.c"
	}
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (!value->data[0].v_pointer) {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		*object_p = NULL;
#line 1536 "LibraryMonitor.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		*object_p = value->data[0].v_pointer;
#line 1540 "LibraryMonitor.c"
	} else {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		*object_p = library_monitor_pool_ref (value->data[0].v_pointer);
#line 1544 "LibraryMonitor.c"
	}
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return NULL;
#line 1548 "LibraryMonitor.c"
}


GParamSpec* param_spec_library_monitor_pool (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ParamSpecLibraryMonitorPool* spec;
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (g_type_is_a (object_type, TYPE_LIBRARY_MONITOR_POOL), NULL);
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return G_PARAM_SPEC (spec);
#line 1562 "LibraryMonitor.c"
}


gpointer value_get_library_monitor_pool (const GValue* value) {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_LIBRARY_MONITOR_POOL), NULL);
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return value->data[0].v_pointer;
#line 1571 "LibraryMonitor.c"
}


void value_set_library_monitor_pool (GValue* value, gpointer v_object) {
	LibraryMonitorPool* old;
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_LIBRARY_MONITOR_POOL));
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	old = value->data[0].v_pointer;
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (v_object) {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_LIBRARY_MONITOR_POOL));
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		value->data[0].v_pointer = v_object;
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_pool_ref (value->data[0].v_pointer);
#line 1591 "LibraryMonitor.c"
	} else {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		value->data[0].v_pointer = NULL;
#line 1595 "LibraryMonitor.c"
	}
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (old) {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_pool_unref (old);
#line 1601 "LibraryMonitor.c"
	}
}


void value_take_library_monitor_pool (GValue* value, gpointer v_object) {
	LibraryMonitorPool* old;
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_LIBRARY_MONITOR_POOL));
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	old = value->data[0].v_pointer;
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (v_object) {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_LIBRARY_MONITOR_POOL));
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		value->data[0].v_pointer = v_object;
#line 1620 "LibraryMonitor.c"
	} else {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		value->data[0].v_pointer = NULL;
#line 1624 "LibraryMonitor.c"
	}
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (old) {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_pool_unref (old);
#line 1630 "LibraryMonitor.c"
	}
}


static void library_monitor_pool_class_init (LibraryMonitorPoolClass * klass) {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_pool_parent_class = g_type_class_peek_parent (klass);
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	((LibraryMonitorPoolClass *) klass)->finalize = library_monitor_pool_finalize;
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_type_class_add_private (klass, sizeof (LibraryMonitorPoolPrivate));
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_new ("monitor_installed", TYPE_LIBRARY_MONITOR_POOL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, TYPE_LIBRARY_MONITOR);
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_new ("monitor_destroyed", TYPE_LIBRARY_MONITOR_POOL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, TYPE_LIBRARY_MONITOR);
#line 1646 "LibraryMonitor.c"
}


static void library_monitor_pool_instance_init (LibraryMonitorPool * self) {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv = LIBRARY_MONITOR_POOL_GET_PRIVATE (self);
#line 31 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->monitor = NULL;
#line 32 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->timer_id = (guint) 0;
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->ref_count = 1;
#line 1659 "LibraryMonitor.c"
}


static void library_monitor_pool_finalize (LibraryMonitorPool* obj) {
	LibraryMonitorPool * self;
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_LIBRARY_MONITOR_POOL, LibraryMonitorPool);
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_handlers_destroy (self);
#line 31 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->priv->monitor);
#line 1671 "LibraryMonitor.c"
}


GType library_monitor_pool_get_type (void) {
	static volatile gsize library_monitor_pool_type_id__volatile = 0;
	if (g_once_init_enter (&library_monitor_pool_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { value_library_monitor_pool_init, value_library_monitor_pool_free_value, value_library_monitor_pool_copy_value, value_library_monitor_pool_peek_pointer, "p", value_library_monitor_pool_collect_value, "p", value_library_monitor_pool_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (LibraryMonitorPoolClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) library_monitor_pool_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LibraryMonitorPool), 0, (GInstanceInitFunc) library_monitor_pool_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 library_monitor_pool_type_id;
		library_monitor_pool_type_id = g_type_register_fundamental (g_type_fundamental_next (), "LibraryMonitorPool", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&library_monitor_pool_type_id__volatile, library_monitor_pool_type_id);
	}
	return library_monitor_pool_type_id__volatile;
}


gpointer library_monitor_pool_ref (gpointer instance) {
	LibraryMonitorPool* self;
	self = instance;
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_atomic_int_inc (&self->ref_count);
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return instance;
#line 1696 "LibraryMonitor.c"
}


void library_monitor_pool_unref (gpointer instance) {
	LibraryMonitorPool* self;
	self = instance;
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		LIBRARY_MONITOR_POOL_GET_CLASS (self)->finalize (self);
#line 28 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 1709 "LibraryMonitor.c"
	}
}


static void _library_monitor_on_config_changed_configuration_facade_auto_import_from_library_changed (ConfigurationFacade* _sender, gpointer self) {
#line 247 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_on_config_changed ((LibraryMonitor*) self);
#line 1717 "LibraryMonitor.c"
}


static guint _file_hash_gee_hash_data_func (gconstpointer v, gpointer self) {
	guint result;
	result = file_hash ((GFile*) v);
#line 206 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return result;
#line 1726 "LibraryMonitor.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 206 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return result;
#line 1735 "LibraryMonitor.c"
}


static void _library_monitor_on_unblacklist_file_dequeued_callback (gconstpointer item, gpointer self) {
#line 207 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_on_unblacklist_file ((GFile*) item);
#line 1742 "LibraryMonitor.c"
}


static gboolean _library_monitor_on_flush_import_queue_gsource_func (gpointer self) {
	gboolean result;
	result = library_monitor_on_flush_import_queue ((LibraryMonitor*) self);
#line 243 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return result;
#line 1751 "LibraryMonitor.c"
}


LibraryMonitor* library_monitor_construct (GType object_type, GFile* root, gboolean recurse, gboolean monitoring) {
	LibraryMonitor * self = NULL;
	GFile* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	ConfigFacade* _tmp3_ = NULL;
	ConfigFacade* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	ConfigFacade* _tmp6_ = NULL;
	ConfigFacade* _tmp7_ = NULL;
	guint _tmp8_ = 0U;
#line 236 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (G_IS_FILE (root), NULL);
#line 237 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = root;
#line 237 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = recurse;
#line 237 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = monitoring;
#line 237 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = (LibraryMonitor*) directory_monitor_construct (object_type, _tmp0_, _tmp1_, _tmp2_);
#line 240 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp3_ = config_facade_get_instance ();
#line 240 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp4_ = _tmp3_;
#line 240 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp5_ = configuration_facade_get_auto_import_from_library (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
#line 240 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->auto_import = _tmp5_;
#line 240 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (_tmp4_);
#line 241 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp6_ = config_facade_get_instance ();
#line 241 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp7_ = _tmp6_;
#line 241 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), "auto-import-from-library-changed", (GCallback) _library_monitor_on_config_changed_configuration_facade_auto_import_from_library_changed, self, 0);
#line 241 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (_tmp7_);
#line 243 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp8_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) LIBRARY_MONITOR_FLUSH_IMPORT_QUEUE_SEC, _library_monitor_on_flush_import_queue_gsource_func, g_object_ref (self), g_object_unref);
#line 243 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->import_queue_timer_id = _tmp8_;
#line 236 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return self;
#line 1800 "LibraryMonitor.c"
}


LibraryMonitor* library_monitor_new (GFile* root, gboolean recurse, gboolean monitoring) {
#line 236 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return library_monitor_construct (TYPE_LIBRARY_MONITOR, root, recurse, monitoring);
#line 1807 "LibraryMonitor.c"
}


static void library_monitor_real_close (DirectoryMonitor* base) {
	LibraryMonitor * self;
	GCancellable* _tmp0_ = NULL;
	guint _tmp13_ = 0U;
#line 250 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_MONITOR, LibraryMonitor);
#line 251 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = self->priv->cancellable;
#line 251 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_cancellable_cancel (_tmp0_);
#line 1821 "LibraryMonitor.c"
	{
		GeeList* _monitor_list = NULL;
		GeeList* _tmp1_ = NULL;
		GeeList* _tmp2_ = NULL;
		gint _monitor_size = 0;
		GeeList* _tmp3_ = NULL;
		gint _tmp4_ = 0;
		gint _tmp5_ = 0;
		gint _monitor_index = 0;
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp1_ = self->priv->monitors;
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp2_ = _g_object_ref0 (_tmp1_);
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_list = _tmp2_;
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp3_ = _monitor_list;
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection));
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp5_ = _tmp4_;
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_size = _tmp5_;
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_index = -1;
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		while (TRUE) {
#line 1849 "LibraryMonitor.c"
			gint _tmp6_ = 0;
			gint _tmp7_ = 0;
			gint _tmp8_ = 0;
			MediaMonitor* monitor = NULL;
			GeeList* _tmp9_ = NULL;
			gint _tmp10_ = 0;
			gpointer _tmp11_ = NULL;
			MediaMonitor* _tmp12_ = NULL;
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp6_ = _monitor_index;
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_monitor_index = _tmp6_ + 1;
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp7_ = _monitor_index;
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp8_ = _monitor_size;
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (!(_tmp7_ < _tmp8_)) {
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 1870 "LibraryMonitor.c"
			}
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp9_ = _monitor_list;
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp10_ = _monitor_index;
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp11_ = gee_list_get (_tmp9_, _tmp10_);
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			monitor = (MediaMonitor*) _tmp11_;
#line 254 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp12_ = monitor;
#line 254 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			media_monitor_close (_tmp12_);
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (monitor);
#line 1886 "LibraryMonitor.c"
		}
#line 253 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_monitor_list);
#line 1890 "LibraryMonitor.c"
	}
#line 256 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp13_ = self->priv->import_queue_timer_id;
#line 256 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp13_ != ((guint) 0)) {
#line 1896 "LibraryMonitor.c"
		guint _tmp14_ = 0U;
#line 257 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp14_ = self->priv->import_queue_timer_id;
#line 257 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_source_remove (_tmp14_);
#line 258 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		self->priv->import_queue_timer_id = (guint) 0;
#line 1904 "LibraryMonitor.c"
	}
#line 261 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	DIRECTORY_MONITOR_CLASS (library_monitor_parent_class)->close (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor));
#line 1908 "LibraryMonitor.c"
}


static void library_monitor_add_to_discovered_list (LibraryMonitor* self, MediaMonitor* monitor, Monitorable* monitorable) {
	GeeHashMap* _tmp0_ = NULL;
	MediaMonitor* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	GeeHashMap* _tmp7_ = NULL;
	MediaMonitor* _tmp8_ = NULL;
	gpointer _tmp9_ = NULL;
	GeeSet* _tmp10_ = NULL;
	Monitorable* _tmp11_ = NULL;
#line 264 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (self));
#line 264 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_MEDIA_MONITOR (monitor));
#line 264 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_MONITORABLE (monitorable));
#line 265 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = self->priv->discovered;
#line 265 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = monitor;
#line 265 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 265 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (!_tmp2_) {
#line 1935 "LibraryMonitor.c"
		GeeHashMap* _tmp3_ = NULL;
		MediaMonitor* _tmp4_ = NULL;
		GeeHashSet* _tmp5_ = NULL;
		GeeHashSet* _tmp6_ = NULL;
#line 266 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp3_ = self->priv->discovered;
#line 266 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = monitor;
#line 266 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp5_ = gee_hash_set_new (TYPE_MONITORABLE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
#line 266 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp6_ = _tmp5_;
#line 266 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp4_, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_SET, GeeSet));
#line 266 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_tmp6_);
#line 1952 "LibraryMonitor.c"
	}
#line 268 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp7_ = self->priv->discovered;
#line 268 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp8_ = monitor;
#line 268 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp9_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp8_);
#line 268 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp10_ = (GeeSet*) _tmp9_;
#line 268 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp11_ = monitorable;
#line 268 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_COLLECTION, GeeCollection), _tmp11_);
#line 268 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (_tmp10_);
#line 1968 "LibraryMonitor.c"
}


static MediaMonitor* library_monitor_get_monitor_for_monitorable (LibraryMonitor* self, Monitorable* monitorable) {
	MediaMonitor* result = NULL;
	Monitorable* _tmp17_ = NULL;
	gchar* _tmp18_ = NULL;
	gchar* _tmp19_ = NULL;
#line 271 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (IS_LIBRARY_MONITOR (self), NULL);
#line 271 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (IS_MONITORABLE (monitorable), NULL);
#line 1981 "LibraryMonitor.c"
	{
		GeeList* _monitor_list = NULL;
		GeeList* _tmp0_ = NULL;
		GeeList* _tmp1_ = NULL;
		gint _monitor_size = 0;
		GeeList* _tmp2_ = NULL;
		gint _tmp3_ = 0;
		gint _tmp4_ = 0;
		gint _monitor_index = 0;
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = self->priv->monitors;
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp1_ = _g_object_ref0 (_tmp0_);
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_list = _tmp1_;
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp2_ = _monitor_list;
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp3_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection));
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = _tmp3_;
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_size = _tmp4_;
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_index = -1;
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		while (TRUE) {
#line 2009 "LibraryMonitor.c"
			gint _tmp5_ = 0;
			gint _tmp6_ = 0;
			gint _tmp7_ = 0;
			MediaMonitor* monitor = NULL;
			GeeList* _tmp8_ = NULL;
			gint _tmp9_ = 0;
			gpointer _tmp10_ = NULL;
			MediaMonitor* _tmp11_ = NULL;
			MediaSourceCollection* _tmp12_ = NULL;
			MediaSourceCollection* _tmp13_ = NULL;
			Monitorable* _tmp14_ = NULL;
			gboolean _tmp15_ = FALSE;
			gboolean _tmp16_ = FALSE;
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp5_ = _monitor_index;
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_monitor_index = _tmp5_ + 1;
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp6_ = _monitor_index;
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp7_ = _monitor_size;
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (!(_tmp6_ < _tmp7_)) {
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 2035 "LibraryMonitor.c"
			}
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp8_ = _monitor_list;
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp9_ = _monitor_index;
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp10_ = gee_list_get (_tmp8_, _tmp9_);
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			monitor = (MediaMonitor*) _tmp10_;
#line 273 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp11_ = monitor;
#line 273 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp12_ = media_monitor_get_media_source_collection (_tmp11_);
#line 273 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp13_ = _tmp12_;
#line 273 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp14_ = monitorable;
#line 273 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp15_ = source_collection_holds_type_of_source (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_SOURCE_COLLECTION, SourceCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_DATA_SOURCE, DataSource));
#line 273 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp16_ = _tmp15_;
#line 273 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_collection_unref0 (_tmp13_);
#line 273 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp16_) {
#line 274 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				result = monitor;
#line 274 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (_monitor_list);
#line 274 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				return result;
#line 2067 "LibraryMonitor.c"
			}
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (monitor);
#line 2071 "LibraryMonitor.c"
		}
#line 272 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_monitor_list);
#line 2075 "LibraryMonitor.c"
	}
#line 277 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp17_ = monitorable;
#line 277 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp18_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_DATA_OBJECT, DataObject));
#line 277 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp19_ = _tmp18_;
#line 277 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_error ("LibraryMonitor.vala:277: Unable to locate MediaMonitor for %s", _tmp19_);
#line 277 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_free0 (_tmp19_);
#line 2087 "LibraryMonitor.c"
}


static void library_monitor_real_discovery_started (DirectoryMonitor* base) {
	LibraryMonitor * self;
	GeeHashMap* _tmp28_ = NULL;
	GeeHashSet* _tmp29_ = NULL;
#line 280 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_MONITOR, LibraryMonitor);
#line 2097 "LibraryMonitor.c"
	{
		GeeIterator* _collection_it = NULL;
		MediaCollectionRegistry* _tmp0_ = NULL;
		MediaCollectionRegistry* _tmp1_ = NULL;
		GeeCollection* _tmp2_ = NULL;
		GeeCollection* _tmp3_ = NULL;
		GeeIterator* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
#line 281 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = media_collection_registry_get_instance ();
#line 281 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp1_ = _tmp0_;
#line 281 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp2_ = media_collection_registry_get_all (_tmp1_);
#line 281 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp3_ = _tmp2_;
#line 281 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable));
#line 281 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp5_ = _tmp4_;
#line 281 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_tmp3_);
#line 281 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_media_collection_registry_unref0 (_tmp1_);
#line 281 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_collection_it = _tmp5_;
#line 281 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		while (TRUE) {
#line 2126 "LibraryMonitor.c"
			GeeIterator* _tmp6_ = NULL;
			gboolean _tmp7_ = FALSE;
			MediaSourceCollection* collection = NULL;
			GeeIterator* _tmp8_ = NULL;
			gpointer _tmp9_ = NULL;
			GeeList* _tmp10_ = NULL;
			MediaSourceCollection* _tmp11_ = NULL;
			Workers* _tmp12_ = NULL;
			GCancellable* _tmp13_ = NULL;
			MediaMonitor* _tmp14_ = NULL;
			MediaMonitor* _tmp15_ = NULL;
#line 281 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp6_ = _collection_it;
#line 281 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp7_ = gee_iterator_next (_tmp6_);
#line 281 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (!_tmp7_) {
#line 281 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 2146 "LibraryMonitor.c"
			}
#line 281 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp8_ = _collection_it;
#line 281 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp9_ = gee_iterator_get (_tmp8_);
#line 281 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			collection = (MediaSourceCollection*) _tmp9_;
#line 282 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp10_ = self->priv->monitors;
#line 282 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp11_ = collection;
#line 282 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp12_ = self->priv->workers;
#line 282 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp13_ = self->priv->cancellable;
#line 282 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp14_ = media_source_collection_create_media_monitor (_tmp11_, _tmp12_, _tmp13_);
#line 282 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp15_ = _tmp14_;
#line 282 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_COLLECTION, GeeCollection), _tmp15_);
#line 282 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (_tmp15_);
#line 281 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_collection_unref0 (collection);
#line 2172 "LibraryMonitor.c"
		}
#line 281 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_collection_it);
#line 2176 "LibraryMonitor.c"
	}
	{
		GeeList* _monitor_list = NULL;
		GeeList* _tmp16_ = NULL;
		GeeList* _tmp17_ = NULL;
		gint _monitor_size = 0;
		GeeList* _tmp18_ = NULL;
		gint _tmp19_ = 0;
		gint _tmp20_ = 0;
		gint _monitor_index = 0;
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp16_ = self->priv->monitors;
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp17_ = _g_object_ref0 (_tmp16_);
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_list = _tmp17_;
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp18_ = _monitor_list;
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp19_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_COLLECTION, GeeCollection));
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp20_ = _tmp19_;
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_size = _tmp20_;
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_index = -1;
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		while (TRUE) {
#line 2205 "LibraryMonitor.c"
			gint _tmp21_ = 0;
			gint _tmp22_ = 0;
			gint _tmp23_ = 0;
			MediaMonitor* monitor = NULL;
			GeeList* _tmp24_ = NULL;
			gint _tmp25_ = 0;
			gpointer _tmp26_ = NULL;
			MediaMonitor* _tmp27_ = NULL;
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp21_ = _monitor_index;
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_monitor_index = _tmp21_ + 1;
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp22_ = _monitor_index;
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp23_ = _monitor_size;
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (!(_tmp22_ < _tmp23_)) {
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 2226 "LibraryMonitor.c"
			}
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp24_ = _monitor_list;
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp25_ = _monitor_index;
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp26_ = gee_list_get (_tmp24_, _tmp25_);
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			monitor = (MediaMonitor*) _tmp26_;
#line 285 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp27_ = monitor;
#line 285 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			media_monitor_notify_discovery_started (_tmp27_);
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (monitor);
#line 2242 "LibraryMonitor.c"
		}
#line 284 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_monitor_list);
#line 2246 "LibraryMonitor.c"
	}
#line 287 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp28_ = gee_hash_map_new (TYPE_MEDIA_MONITOR, (GBoxedCopyFunc) g_object_ref, g_object_unref, GEE_TYPE_SET, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 287 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->priv->discovered);
#line 287 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->discovered = _tmp28_;
#line 288 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp29_ = gee_hash_set_new (G_TYPE_FILE, (GBoxedCopyFunc) g_object_ref, g_object_unref, _file_hash_gee_hash_data_func, NULL, NULL, _file_equal_gee_equal_data_func, NULL, NULL);
#line 288 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->priv->unknown_files);
#line 288 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->unknown_files = _tmp29_;
#line 290 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	DIRECTORY_MONITOR_CLASS (library_monitor_parent_class)->discovery_started (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor));
#line 2262 "LibraryMonitor.c"
}


static void library_monitor_real_file_discovered (DirectoryMonitor* base, GFile* file, GFileInfo* info) {
	LibraryMonitor * self;
	Monitorable* representation = NULL;
	MediaMonitor* representing = NULL;
	gboolean ignore = FALSE;
	MediaMonitor* _tmp20_ = NULL;
	GFile* _tmp36_ = NULL;
	GFileInfo* _tmp37_ = NULL;
#line 293 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_MONITOR, LibraryMonitor);
#line 293 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_IS_FILE (file));
#line 293 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_IS_FILE_INFO (info));
#line 294 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	representation = NULL;
#line 295 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	representing = NULL;
#line 296 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	ignore = FALSE;
#line 2286 "LibraryMonitor.c"
	{
		GeeList* _monitor_list = NULL;
		GeeList* _tmp0_ = NULL;
		GeeList* _tmp1_ = NULL;
		gint _monitor_size = 0;
		GeeList* _tmp2_ = NULL;
		gint _tmp3_ = 0;
		gint _tmp4_ = 0;
		gint _monitor_index = 0;
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = self->priv->monitors;
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp1_ = _g_object_ref0 (_tmp0_);
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_list = _tmp1_;
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp2_ = _monitor_list;
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp3_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection));
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = _tmp3_;
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_size = _tmp4_;
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_index = -1;
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		while (TRUE) {
#line 2314 "LibraryMonitor.c"
			gint _tmp5_ = 0;
			gint _tmp6_ = 0;
			gint _tmp7_ = 0;
			MediaMonitor* monitor = NULL;
			GeeList* _tmp8_ = NULL;
			gint _tmp9_ = 0;
			gpointer _tmp10_ = NULL;
			MediaMonitorDiscoveredFile _result_ = 0;
			MediaMonitor* _tmp11_ = NULL;
			GFile* _tmp12_ = NULL;
			GFileInfo* _tmp13_ = NULL;
			Monitorable* _tmp14_ = NULL;
			MediaMonitorDiscoveredFile _tmp15_ = 0;
			MediaMonitorDiscoveredFile _tmp16_ = 0;
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp5_ = _monitor_index;
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_monitor_index = _tmp5_ + 1;
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp6_ = _monitor_index;
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp7_ = _monitor_size;
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (!(_tmp6_ < _tmp7_)) {
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 2341 "LibraryMonitor.c"
			}
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp8_ = _monitor_list;
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp9_ = _monitor_index;
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp10_ = gee_list_get (_tmp8_, _tmp9_);
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			monitor = (MediaMonitor*) _tmp10_;
#line 298 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp11_ = monitor;
#line 298 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp12_ = file;
#line 298 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp13_ = info;
#line 298 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp15_ = media_monitor_notify_file_discovered (_tmp11_, _tmp12_, _tmp13_, &_tmp14_);
#line 298 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (representation);
#line 298 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			representation = _tmp14_;
#line 298 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_result_ = _tmp15_;
#line 300 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp16_ = _result_;
#line 300 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp16_ == MEDIA_MONITOR_DISCOVERED_FILE_REPRESENTED) {
#line 2369 "LibraryMonitor.c"
				MediaMonitor* _tmp17_ = NULL;
				MediaMonitor* _tmp18_ = NULL;
#line 301 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp17_ = monitor;
#line 301 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp18_ = _g_object_ref0 (_tmp17_);
#line 301 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (representing);
#line 301 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				representing = _tmp18_;
#line 303 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (monitor);
#line 303 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 2384 "LibraryMonitor.c"
			} else {
				MediaMonitorDiscoveredFile _tmp19_ = 0;
#line 304 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp19_ = _result_;
#line 304 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				if (_tmp19_ == MEDIA_MONITOR_DISCOVERED_FILE_IGNORE) {
#line 306 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					ignore = TRUE;
#line 308 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_g_object_unref0 (monitor);
#line 308 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					break;
#line 2397 "LibraryMonitor.c"
				}
			}
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (monitor);
#line 2402 "LibraryMonitor.c"
		}
#line 297 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_monitor_list);
#line 2406 "LibraryMonitor.c"
	}
#line 312 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp20_ = representing;
#line 312 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp20_ != NULL) {
#line 2412 "LibraryMonitor.c"
		gboolean _tmp21_ = FALSE;
		Monitorable* _tmp22_ = NULL;
		MediaMonitor* _tmp24_ = NULL;
		Monitorable* _tmp25_ = NULL;
#line 313 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp22_ = representation;
#line 313 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (_tmp22_ != NULL) {
#line 2421 "LibraryMonitor.c"
			gboolean _tmp23_ = FALSE;
#line 313 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp23_ = ignore;
#line 313 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp21_ = !_tmp23_;
#line 2427 "LibraryMonitor.c"
		} else {
#line 313 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp21_ = FALSE;
#line 2431 "LibraryMonitor.c"
		}
#line 313 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_vala_assert (_tmp21_, "representation != null && !ignore");
#line 314 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp24_ = representing;
#line 314 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp25_ = representation;
#line 314 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_add_to_discovered_list (self, _tmp24_, _tmp25_);
#line 2441 "LibraryMonitor.c"
	} else {
		gboolean _tmp26_ = FALSE;
		gboolean _tmp27_ = FALSE;
		gboolean _tmp28_ = FALSE;
#line 315 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp28_ = ignore;
#line 315 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (!_tmp28_) {
#line 2450 "LibraryMonitor.c"
			TombstoneSourceCollection* _tmp29_ = NULL;
			GFile* _tmp30_ = NULL;
			gboolean _tmp31_ = FALSE;
#line 315 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp29_ = tombstone_global;
#line 315 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp30_ = file;
#line 315 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp31_ = tombstone_source_collection_matches (_tmp29_, _tmp30_);
#line 315 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp27_ = !_tmp31_;
#line 2462 "LibraryMonitor.c"
		} else {
#line 315 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp27_ = FALSE;
#line 2466 "LibraryMonitor.c"
		}
#line 315 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (_tmp27_) {
#line 2470 "LibraryMonitor.c"
			GFile* _tmp32_ = NULL;
			gboolean _tmp33_ = FALSE;
#line 315 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp32_ = file;
#line 315 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp33_ = library_monitor_is_supported_filetype (self, _tmp32_);
#line 315 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp26_ = _tmp33_;
#line 2479 "LibraryMonitor.c"
		} else {
#line 315 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp26_ = FALSE;
#line 2483 "LibraryMonitor.c"
		}
#line 315 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (_tmp26_) {
#line 2487 "LibraryMonitor.c"
			GeeHashSet* _tmp34_ = NULL;
			GFile* _tmp35_ = NULL;
#line 316 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp34_ = self->priv->unknown_files;
#line 316 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp35_ = file;
#line 316 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp35_);
#line 2496 "LibraryMonitor.c"
		}
	}
#line 319 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp36_ = file;
#line 319 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp37_ = info;
#line 319 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	DIRECTORY_MONITOR_CLASS (library_monitor_parent_class)->file_discovered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor), _tmp36_, _tmp37_);
#line 293 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (representing);
#line 293 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (representation);
#line 2509 "LibraryMonitor.c"
}


static void library_monitor_real_discovery_completed (DirectoryMonitor* base) {
	LibraryMonitor * self;
#line 322 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_MONITOR, LibraryMonitor);
#line 323 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_async_discovery_completed (self, NULL, NULL);
#line 2519 "LibraryMonitor.c"
}


static void library_monitor_async_discovery_completed_data_free (gpointer _data) {
	LibraryMonitorAsyncDiscoveryCompletedData* _data_;
	_data_ = _data;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (_data_->self);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_slice_free (LibraryMonitorAsyncDiscoveryCompletedData, _data_);
#line 2530 "LibraryMonitor.c"
}


static void library_monitor_async_discovery_completed (LibraryMonitor* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	LibraryMonitorAsyncDiscoveryCompletedData* _data_;
	LibraryMonitor* _tmp0_ = NULL;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_ = g_slice_new0 (LibraryMonitorAsyncDiscoveryCompletedData);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, library_monitor_async_discovery_completed);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, library_monitor_async_discovery_completed_data_free);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->self = _tmp0_;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_async_discovery_completed_co (_data_);
#line 2549 "LibraryMonitor.c"
}


static void library_monitor_async_discovery_completed_finish (LibraryMonitor* self, GAsyncResult* _res_) {
	LibraryMonitorAsyncDiscoveryCompletedData* _data_;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 2557 "LibraryMonitor.c"
}


static gboolean _library_monitor_async_discovery_completed_co_gsource_func (gpointer self) {
	gboolean result;
	result = library_monitor_async_discovery_completed_co (self);
#line 378 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return result;
#line 2566 "LibraryMonitor.c"
}


static gboolean library_monitor_async_discovery_completed_co (LibraryMonitorAsyncDiscoveryCompletedData* _data_) {
#line 326 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	switch (_data_->_state_) {
#line 326 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		case 0:
#line 2575 "LibraryMonitor.c"
		goto _state_0;
#line 326 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		case 1:
#line 2579 "LibraryMonitor.c"
		goto _state_1;
		default:
#line 326 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_assert_not_reached ();
#line 2584 "LibraryMonitor.c"
	}
	_state_0:
#line 331 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp0_ = NULL;
#line 331 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp0_ = _data_->self->priv->unknown_files;
#line 331 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp1_ = 0;
#line 331 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp1_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp0_, GEE_TYPE_COLLECTION, GeeCollection));
#line 331 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp2_ = 0;
#line 331 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp2_ = _data_->_tmp1_;
#line 331 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_data_->_tmp2_ == 0) {
#line 332 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_discovery_stage_completed (_data_->self);
#line 334 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (_data_->_state_ == 0) {
#line 334 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2607 "LibraryMonitor.c"
		} else {
#line 334 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 2611 "LibraryMonitor.c"
		}
#line 334 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_object_unref (_data_->_async_result);
#line 334 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return FALSE;
#line 2617 "LibraryMonitor.c"
	}
#line 337 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp3_ = NULL;
#line 337 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp3_ = gee_array_list_new (TYPE_MONITORABLE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
#line 337 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->all_candidates = _data_->_tmp3_;
#line 338 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp4_ = NULL;
#line 338 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp4_ = gee_array_list_new (G_TYPE_FILE, (GBoxedCopyFunc) g_object_ref, g_object_unref, _file_equal_gee_equal_data_func, NULL, NULL);
#line 338 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->adopted = _data_->_tmp4_;
#line 2631 "LibraryMonitor.c"
	{
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_data_->_tmp5_ = NULL;
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_data_->_tmp5_ = _data_->self->priv->unknown_files;
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_data_->_tmp6_ = NULL;
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_data_->_tmp6_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp5_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_data_->_file_it = _data_->_tmp6_;
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		while (TRUE) {
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp7_ = NULL;
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp7_ = _data_->_file_it;
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp8_ = FALSE;
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp8_ = gee_iterator_next (_data_->_tmp7_);
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (!_data_->_tmp8_) {
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 2657 "LibraryMonitor.c"
			}
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp9_ = NULL;
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp9_ = _data_->_file_it;
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp10_ = NULL;
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp10_ = gee_iterator_get (_data_->_tmp9_);
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->file = (GFile*) _data_->_tmp10_;
#line 340 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp11_ = NULL;
#line 340 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp11_ = _data_->file;
#line 340 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp12_ = NULL;
#line 340 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp12_ = directory_monitor_get_file_info (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor), _data_->_tmp11_);
#line 340 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->info = _data_->_tmp12_;
#line 341 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp13_ = NULL;
#line 341 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp13_ = _data_->info;
#line 341 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_data_->_tmp13_ == NULL) {
#line 342 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (_data_->info);
#line 342 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (_data_->file);
#line 342 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				continue;
#line 2691 "LibraryMonitor.c"
			}
#line 345 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp14_ = NULL;
#line 345 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp14_ = _data_->all_candidates;
#line 345 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			gee_abstract_collection_clear (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp14_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 347 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->candidates = NULL;
#line 348 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->associated = FALSE;
#line 2703 "LibraryMonitor.c"
			{
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp15_ = NULL;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp15_ = _data_->self->priv->monitors;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp16_ = NULL;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp16_ = _g_object_ref0 (_data_->_tmp15_);
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_monitor_list = _data_->_tmp16_;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp17_ = NULL;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp17_ = _data_->_monitor_list;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp18_ = 0;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp18_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp17_, GEE_TYPE_COLLECTION, GeeCollection));
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp19_ = 0;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp19_ = _data_->_tmp18_;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_monitor_size = _data_->_tmp19_;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_monitor_index = -1;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				while (TRUE) {
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp20_ = 0;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp20_ = _data_->_monitor_index;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_monitor_index = _data_->_tmp20_ + 1;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp21_ = 0;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp21_ = _data_->_monitor_index;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp22_ = 0;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp22_ = _data_->_monitor_size;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					if (!(_data_->_tmp21_ < _data_->_tmp22_)) {
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						break;
#line 2751 "LibraryMonitor.c"
					}
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp23_ = NULL;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp23_ = _data_->_monitor_list;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp24_ = 0;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp24_ = _data_->_monitor_index;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp25_ = NULL;
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp25_ = gee_list_get (_data_->_tmp23_, _data_->_tmp24_);
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->monitor = (MediaMonitor*) _data_->_tmp25_;
#line 351 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp26_ = NULL;
#line 351 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp26_ = _data_->monitor;
#line 351 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp27_ = NULL;
#line 351 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp27_ = _data_->file;
#line 351 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp28_ = NULL;
#line 351 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp28_ = _data_->info;
#line 351 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp29_ = 0;
#line 351 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp30_ = NULL;
#line 351 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp30_ = media_monitor_candidates_for_unknown_file (_data_->_tmp26_, _data_->_tmp27_, _data_->_tmp28_, &_data_->_tmp29_);
#line 351 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_result_ = _data_->_tmp29_;
#line 351 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_g_object_unref0 (_data_->candidates);
#line 351 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->candidates = _data_->_tmp30_;
#line 352 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp32_ = 0;
#line 352 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp32_ = _data_->_result_;
#line 352 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					if (_data_->_tmp32_ == MEDIA_MONITOR_DISCOVERED_FILE_REPRESENTED) {
#line 352 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp31_ = TRUE;
#line 2799 "LibraryMonitor.c"
					} else {
#line 353 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp33_ = 0;
#line 353 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp33_ = _data_->_result_;
#line 353 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp31_ = _data_->_tmp33_ == MEDIA_MONITOR_DISCOVERED_FILE_IGNORE;
#line 2807 "LibraryMonitor.c"
					}
#line 352 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					if (_data_->_tmp31_) {
#line 354 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->associated = TRUE;
#line 356 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_g_object_unref0 (_data_->monitor);
#line 356 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						break;
#line 2817 "LibraryMonitor.c"
					} else {
#line 357 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp34_ = NULL;
#line 357 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp34_ = _data_->candidates;
#line 357 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						if (_data_->_tmp34_ != NULL) {
#line 358 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_data_->_tmp35_ = NULL;
#line 358 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_data_->_tmp35_ = _data_->all_candidates;
#line 358 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_data_->_tmp36_ = NULL;
#line 358 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_data_->_tmp36_ = _data_->candidates;
#line 358 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							gee_array_list_add_all (_data_->_tmp35_, _data_->_tmp36_);
#line 2835 "LibraryMonitor.c"
						}
					}
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_g_object_unref0 (_data_->monitor);
#line 2840 "LibraryMonitor.c"
				}
#line 349 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (_data_->_monitor_list);
#line 2844 "LibraryMonitor.c"
			}
#line 362 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp37_ = FALSE;
#line 362 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp37_ = _data_->associated;
#line 362 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_data_->_tmp37_) {
#line 363 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp38_ = NULL;
#line 363 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp38_ = _data_->adopted;
#line 363 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp39_ = NULL;
#line 363 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp39_ = _data_->file;
#line 363 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp38_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _data_->_tmp39_);
#line 365 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (_data_->candidates);
#line 365 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (_data_->info);
#line 365 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (_data_->file);
#line 365 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				continue;
#line 2870 "LibraryMonitor.c"
			}
#line 369 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp40_ = NULL;
#line 369 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp40_ = _data_->all_candidates;
#line 369 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp41_ = 0;
#line 369 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp41_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp40_, GEE_TYPE_COLLECTION, GeeCollection));
#line 369 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp42_ = 0;
#line 369 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp42_ = _data_->_tmp41_;
#line 369 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_data_->_tmp42_ > 0) {
#line 371 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp43_ = NULL;
#line 371 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp43_ = _data_->all_candidates;
#line 371 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp44_ = NULL;
#line 371 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp44_ = _g_object_ref0 (_data_->_tmp43_);
#line 371 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->job_candidates = _data_->_tmp44_;
#line 372 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp45_ = NULL;
#line 372 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp45_ = gee_array_list_new (TYPE_MONITORABLE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
#line 372 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (_data_->all_candidates);
#line 372 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->all_candidates = _data_->_tmp45_;
#line 374 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp46_ = 0;
#line 374 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp46_ = _data_->self->priv->checksums_total;
#line 374 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->self->priv->checksums_total = _data_->_tmp46_ + 1;
#line 375 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp47_ = NULL;
#line 375 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp47_ = _data_->self->priv->workers;
#line 375 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp48_ = NULL;
#line 375 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp48_ = _data_->file;
#line 375 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp49_ = NULL;
#line 375 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp49_ = _data_->job_candidates;
#line 375 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp50_ = NULL;
#line 375 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp50_ = library_monitor_find_move_job_new (_data_->self, _data_->_tmp48_, G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp49_, GEE_TYPE_COLLECTION, GeeCollection));
#line 375 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp51_ = NULL;
#line 375 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp51_ = _data_->_tmp50_;
#line 375 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				workers_enqueue (_data_->_tmp47_, G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp51_, TYPE_BACKGROUND_JOB, BackgroundJob));
#line 375 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_background_job_unref0 (_data_->_tmp51_);
#line 369 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (_data_->job_candidates);
#line 2936 "LibraryMonitor.c"
			}
#line 378 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _library_monitor_async_discovery_completed_co_gsource_func, _data_, NULL);
#line 379 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_state_ = 1;
#line 379 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			return FALSE;
#line 2944 "LibraryMonitor.c"
			_state_1:
			;
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (_data_->candidates);
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (_data_->info);
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (_data_->file);
#line 2953 "LibraryMonitor.c"
		}
#line 339 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_data_->_file_it);
#line 2957 "LibraryMonitor.c"
	}
#line 383 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp52_ = NULL;
#line 383 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp52_ = _data_->self->priv->unknown_files;
#line 383 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp53_ = NULL;
#line 383 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp53_ = _data_->adopted;
#line 383 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	gee_collection_remove_all (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp52_, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp53_, GEE_TYPE_COLLECTION, GeeCollection));
#line 385 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->self->priv->checksums_completed = 0;
#line 387 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp54_ = 0;
#line 387 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp54_ = _data_->self->priv->checksums_total;
#line 387 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_data_->_tmp54_ == 0) {
#line 388 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_discovery_stage_completed (_data_->self);
#line 2979 "LibraryMonitor.c"
	} else {
#line 390 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_data_->_tmp55_ = 0;
#line 390 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_data_->_tmp55_ = _data_->self->priv->checksums_total;
#line 390 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_data_->_tmp56_ = NULL;
#line 390 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_data_->_tmp56_ = g_strdup_printf ("%d checksum jobs initiated to verify unknown photo files", _data_->_tmp55_);
#line 390 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_data_->_tmp57_ = NULL;
#line 390 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_data_->_tmp57_ = _data_->_tmp56_;
#line 390 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		directory_monitor_mdbg (_data_->_tmp57_);
#line 390 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_free0 (_data_->_tmp57_);
#line 391 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_data_->_tmp58_ = 0;
#line 391 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_data_->_tmp58_ = _data_->self->priv->checksums_completed;
#line 391 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_data_->_tmp59_ = 0;
#line 391 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_data_->_tmp59_ = _data_->self->priv->checksums_total;
#line 391 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_signal_emit_by_name (_data_->self, "auto-update-progress", _data_->_tmp58_, _data_->_tmp59_);
#line 3007 "LibraryMonitor.c"
	}
#line 326 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (_data_->adopted);
#line 326 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (_data_->all_candidates);
#line 326 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_data_->_state_ == 0) {
#line 326 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 3017 "LibraryMonitor.c"
	} else {
#line 326 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 3021 "LibraryMonitor.c"
	}
#line 326 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_object_unref (_data_->_async_result);
#line 326 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return FALSE;
#line 3027 "LibraryMonitor.c"
}


static void library_monitor_report_checksum_job_completed (LibraryMonitor* self) {
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	gint _tmp5_ = 0;
	gint _tmp6_ = 0;
#line 395 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (self));
#line 396 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = self->priv->checksums_completed;
#line 396 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = self->priv->checksums_total;
#line 396 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_vala_assert (_tmp0_ < _tmp1_, "checksums_completed < checksums_total");
#line 397 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = self->priv->checksums_completed;
#line 397 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->checksums_completed = _tmp2_ + 1;
#line 399 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp3_ = self->priv->checksums_completed;
#line 399 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp4_ = self->priv->checksums_total;
#line 399 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_emit_by_name (self, "auto-update-progress", _tmp3_, _tmp4_);
#line 401 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp5_ = self->priv->checksums_completed;
#line 401 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp6_ = self->priv->checksums_total;
#line 401 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp5_ == _tmp6_) {
#line 402 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_discovery_stage_completed (self);
#line 3065 "LibraryMonitor.c"
	}
}


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


static void library_monitor_on_find_move_completed (LibraryMonitor* self, BackgroundJob* j) {
	LibraryMonitorFindMoveJob* job = NULL;
	BackgroundJob* _tmp0_ = NULL;
	LibraryMonitorFindMoveJob* _tmp1_ = NULL;
	LibraryMonitorFindMoveJob* _tmp2_ = NULL;
	Monitorable* _tmp3_ = NULL;
	LibraryMonitorFindMoveJob* _tmp28_ = NULL;
	GError* _tmp29_ = NULL;
#line 405 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (self));
#line 405 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_BACKGROUND_JOB (j));
#line 406 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = j;
#line 406 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = _background_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, LIBRARY_MONITOR_TYPE_FIND_MOVE_JOB, LibraryMonitorFindMoveJob));
#line 406 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	job = _tmp1_;
#line 411 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = job;
#line 411 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp3_ = _tmp2_->match;
#line 411 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp3_ != NULL) {
#line 3101 "LibraryMonitor.c"
		LibraryMonitorFindMoveJob* _tmp4_ = NULL;
		GFile* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
		LibraryMonitorFindMoveJob* _tmp8_ = NULL;
		Monitorable* _tmp9_ = NULL;
		gchar* _tmp10_ = NULL;
		gchar* _tmp11_ = NULL;
		gchar* _tmp12_ = NULL;
		gchar* _tmp13_ = NULL;
		MediaMonitor* monitor = NULL;
		LibraryMonitorFindMoveJob* _tmp14_ = NULL;
		Monitorable* _tmp15_ = NULL;
		MediaMonitor* _tmp16_ = NULL;
		MediaMonitor* _tmp17_ = NULL;
		LibraryMonitorFindMoveJob* _tmp18_ = NULL;
		Monitorable* _tmp19_ = NULL;
		LibraryMonitorFindMoveJob* _tmp20_ = NULL;
		GFile* _tmp21_ = NULL;
		GeeHashSet* _tmp22_ = NULL;
		LibraryMonitorFindMoveJob* _tmp23_ = NULL;
		GFile* _tmp24_ = NULL;
		MediaMonitor* _tmp25_ = NULL;
		LibraryMonitorFindMoveJob* _tmp26_ = NULL;
		Monitorable* _tmp27_ = NULL;
#line 412 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = job;
#line 412 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp5_ = _tmp4_->file;
#line 412 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp6_ = g_file_get_path (_tmp5_);
#line 412 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp7_ = _tmp6_;
#line 412 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp8_ = job;
#line 412 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp9_ = _tmp8_->match;
#line 412 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp10_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_DATA_OBJECT, DataObject));
#line 412 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp11_ = _tmp10_;
#line 412 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp12_ = g_strdup_printf ("Found moved master file: %s matches %s", _tmp7_, _tmp11_);
#line 412 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp13_ = _tmp12_;
#line 412 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		directory_monitor_mdbg (_tmp13_);
#line 412 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_free0 (_tmp13_);
#line 412 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_free0 (_tmp11_);
#line 412 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_free0 (_tmp7_);
#line 415 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp14_ = job;
#line 415 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp15_ = _tmp14_->match;
#line 415 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp16_ = library_monitor_get_monitor_for_monitorable (self, _tmp15_);
#line 415 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		monitor = _tmp16_;
#line 416 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp17_ = monitor;
#line 416 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp18_ = job;
#line 416 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp19_ = _tmp18_->match;
#line 416 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp20_ = job;
#line 416 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp21_ = _tmp20_->file;
#line 416 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		media_monitor_update_master_file (_tmp17_, _tmp19_, _tmp21_);
#line 417 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp22_ = self->priv->unknown_files;
#line 417 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp23_ = job;
#line 417 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp24_ = _tmp23_->file;
#line 417 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp24_);
#line 418 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp25_ = monitor;
#line 418 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp26_ = job;
#line 418 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp27_ = _tmp26_->match;
#line 418 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_add_to_discovered_list (self, _tmp25_, _tmp27_);
#line 411 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (monitor);
#line 3193 "LibraryMonitor.c"
	}
#line 421 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp28_ = job;
#line 421 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp29_ = _tmp28_->err;
#line 421 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp29_ != NULL) {
#line 3201 "LibraryMonitor.c"
		LibraryMonitorFindMoveJob* _tmp30_ = NULL;
		GFile* _tmp31_ = NULL;
		gchar* _tmp32_ = NULL;
		gchar* _tmp33_ = NULL;
		LibraryMonitorFindMoveJob* _tmp34_ = NULL;
		GError* _tmp35_ = NULL;
		const gchar* _tmp36_ = NULL;
#line 422 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp30_ = job;
#line 422 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp31_ = _tmp30_->file;
#line 422 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp32_ = g_file_get_path (_tmp31_);
#line 422 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp33_ = _tmp32_;
#line 422 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp34_ = job;
#line 422 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp35_ = _tmp34_->err;
#line 422 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp36_ = _tmp35_->message;
#line 422 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_warning ("LibraryMonitor.vala:422: Unable to checksum unknown media file %s: %s", _tmp33_, _tmp36_);
#line 422 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_free0 (_tmp33_);
#line 3227 "LibraryMonitor.c"
	}
#line 424 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_report_checksum_job_completed (self);
#line 405 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_background_job_unref0 (job);
#line 3233 "LibraryMonitor.c"
}


static void library_monitor_on_find_move_cancelled (LibraryMonitor* self, BackgroundJob* j) {
#line 427 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (self));
#line 427 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_BACKGROUND_JOB (j));
#line 428 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_report_checksum_job_completed (self);
#line 3244 "LibraryMonitor.c"
}


static void library_monitor_discovery_stage_completed (LibraryMonitor* self) {
	gboolean _tmp65_ = FALSE;
	TombstoneSourceCollection* _tmp67_ = NULL;
	GCancellable* _tmp68_ = NULL;
#line 431 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (self));
#line 3254 "LibraryMonitor.c"
	{
		GeeList* _monitor_list = NULL;
		GeeList* _tmp0_ = NULL;
		GeeList* _tmp1_ = NULL;
		gint _monitor_size = 0;
		GeeList* _tmp2_ = NULL;
		gint _tmp3_ = 0;
		gint _tmp4_ = 0;
		gint _monitor_index = 0;
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = self->priv->monitors;
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp1_ = _g_object_ref0 (_tmp0_);
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_list = _tmp1_;
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp2_ = _monitor_list;
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp3_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection));
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = _tmp3_;
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_size = _tmp4_;
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_index = -1;
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		while (TRUE) {
#line 3282 "LibraryMonitor.c"
			gint _tmp5_ = 0;
			gint _tmp6_ = 0;
			gint _tmp7_ = 0;
			MediaMonitor* monitor = NULL;
			GeeList* _tmp8_ = NULL;
			gint _tmp9_ = 0;
			gpointer _tmp10_ = NULL;
			GeeSet* monitorables = NULL;
			GeeHashMap* _tmp11_ = NULL;
			MediaMonitor* _tmp12_ = NULL;
			gpointer _tmp13_ = NULL;
			GeeSet* _tmp14_ = NULL;
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp5_ = _monitor_index;
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_monitor_index = _tmp5_ + 1;
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp6_ = _monitor_index;
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp7_ = _monitor_size;
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (!(_tmp6_ < _tmp7_)) {
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 3307 "LibraryMonitor.c"
			}
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp8_ = _monitor_list;
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp9_ = _monitor_index;
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp10_ = gee_list_get (_tmp8_, _tmp9_);
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			monitor = (MediaMonitor*) _tmp10_;
#line 433 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp11_ = self->priv->discovered;
#line 433 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp12_ = monitor;
#line 433 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp13_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp12_);
#line 433 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			monitorables = (GeeSet*) _tmp13_;
#line 434 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp14_ = monitorables;
#line 434 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp14_ != NULL) {
#line 3329 "LibraryMonitor.c"
				{
					GeeIterator* _monitorable_it = NULL;
					GeeSet* _tmp15_ = NULL;
					GeeIterator* _tmp16_ = NULL;
#line 435 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp15_ = monitorables;
#line 435 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp16_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_ITERABLE, GeeIterable));
#line 435 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_monitorable_it = _tmp16_;
#line 435 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					while (TRUE) {
#line 3342 "LibraryMonitor.c"
						GeeIterator* _tmp17_ = NULL;
						gboolean _tmp18_ = FALSE;
						Monitorable* monitorable = NULL;
						GeeIterator* _tmp19_ = NULL;
						gpointer _tmp20_ = NULL;
						Monitorable* _tmp21_ = NULL;
						MediaMonitor* _tmp22_ = NULL;
#line 435 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp17_ = _monitorable_it;
#line 435 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp18_ = gee_iterator_next (_tmp17_);
#line 435 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						if (!_tmp18_) {
#line 435 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							break;
#line 3358 "LibraryMonitor.c"
						}
#line 435 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp19_ = _monitorable_it;
#line 435 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp20_ = gee_iterator_get (_tmp19_);
#line 435 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						monitorable = (Monitorable*) _tmp20_;
#line 436 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp21_ = monitorable;
#line 436 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp22_ = monitor;
#line 436 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						library_monitor_enqueue_verify_monitorable (self, _tmp21_, _tmp22_);
#line 435 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_g_object_unref0 (monitorable);
#line 3374 "LibraryMonitor.c"
					}
#line 435 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_g_object_unref0 (_monitorable_it);
#line 3378 "LibraryMonitor.c"
				}
			}
			{
				GeeIterator* _object_it = NULL;
				MediaMonitor* _tmp23_ = NULL;
				MediaSourceCollection* _tmp24_ = NULL;
				MediaSourceCollection* _tmp25_ = NULL;
				GeeCollection* _tmp26_ = NULL;
				GeeCollection* _tmp27_ = NULL;
				GeeIterator* _tmp28_ = NULL;
				GeeIterator* _tmp29_ = NULL;
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp23_ = monitor;
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp24_ = media_monitor_get_media_source_collection (_tmp23_);
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp25_ = _tmp24_;
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp26_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, TYPE_DATA_COLLECTION, DataCollection));
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp27_ = _tmp26_;
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp28_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_ITERABLE, GeeIterable));
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp29_ = _tmp28_;
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (_tmp27_);
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_collection_unref0 (_tmp25_);
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_object_it = _tmp29_;
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				while (TRUE) {
#line 3412 "LibraryMonitor.c"
					GeeIterator* _tmp30_ = NULL;
					gboolean _tmp31_ = FALSE;
					DataObject* object = NULL;
					GeeIterator* _tmp32_ = NULL;
					gpointer _tmp33_ = NULL;
					Monitorable* monitorable = NULL;
					DataObject* _tmp34_ = NULL;
					Monitorable* _tmp35_ = NULL;
					gboolean _tmp36_ = FALSE;
					GeeSet* _tmp37_ = NULL;
					Monitorable* _tmp41_ = NULL;
					MediaMonitor* _tmp42_ = NULL;
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp30_ = _object_it;
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp31_ = gee_iterator_next (_tmp30_);
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					if (!_tmp31_) {
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						break;
#line 3433 "LibraryMonitor.c"
					}
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp32_ = _object_it;
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp33_ = gee_iterator_get (_tmp32_);
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					object = (DataObject*) _tmp33_;
#line 440 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp34_ = object;
#line 440 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp35_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, TYPE_MONITORABLE, Monitorable));
#line 440 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					monitorable = _tmp35_;
#line 442 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp37_ = monitorables;
#line 442 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					if (_tmp37_ != NULL) {
#line 3451 "LibraryMonitor.c"
						GeeSet* _tmp38_ = NULL;
						Monitorable* _tmp39_ = NULL;
						gboolean _tmp40_ = FALSE;
#line 442 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp38_ = monitorables;
#line 442 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp39_ = monitorable;
#line 442 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp40_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, GEE_TYPE_COLLECTION, GeeCollection), _tmp39_);
#line 442 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp36_ = _tmp40_;
#line 3463 "LibraryMonitor.c"
					} else {
#line 442 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp36_ = FALSE;
#line 3467 "LibraryMonitor.c"
					}
#line 442 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					if (_tmp36_) {
#line 443 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_g_object_unref0 (monitorable);
#line 443 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_g_object_unref0 (object);
#line 443 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						continue;
#line 3477 "LibraryMonitor.c"
					}
#line 445 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp41_ = monitorable;
#line 445 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp42_ = monitor;
#line 445 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					library_monitor_enqueue_verify_monitorable (self, _tmp41_, _tmp42_);
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_g_object_unref0 (monitorable);
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_g_object_unref0 (object);
#line 3489 "LibraryMonitor.c"
				}
#line 439 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (_object_it);
#line 3493 "LibraryMonitor.c"
			}
			{
				GeeIterator* _source_it = NULL;
				MediaMonitor* _tmp43_ = NULL;
				MediaSourceCollection* _tmp44_ = NULL;
				MediaSourceCollection* _tmp45_ = NULL;
				MediaSourceHoldingTank* _tmp46_ = NULL;
				MediaSourceHoldingTank* _tmp47_ = NULL;
				GeeCollection* _tmp48_ = NULL;
				GeeCollection* _tmp49_ = NULL;
				GeeIterator* _tmp50_ = NULL;
				GeeIterator* _tmp51_ = NULL;
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp43_ = monitor;
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp44_ = media_monitor_get_media_source_collection (_tmp43_);
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp45_ = _tmp44_;
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp46_ = media_source_collection_get_offline_bin (_tmp45_);
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp47_ = _tmp46_;
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp48_ = source_holding_tank_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, TYPE_SOURCE_HOLDING_TANK, SourceHoldingTank));
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp49_ = _tmp48_;
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp50_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, GEE_TYPE_ITERABLE, GeeIterable));
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp51_ = _tmp50_;
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (_tmp49_);
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_source_holding_tank_unref0 (_tmp47_);
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_collection_unref0 (_tmp45_);
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_source_it = _tmp51_;
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				while (TRUE) {
#line 3534 "LibraryMonitor.c"
					GeeIterator* _tmp52_ = NULL;
					gboolean _tmp53_ = FALSE;
					DataSource* source = NULL;
					GeeIterator* _tmp54_ = NULL;
					gpointer _tmp55_ = NULL;
					Monitorable* monitorable = NULL;
					DataSource* _tmp56_ = NULL;
					Monitorable* _tmp57_ = NULL;
					gboolean _tmp58_ = FALSE;
					GeeSet* _tmp59_ = NULL;
					Monitorable* _tmp63_ = NULL;
					MediaMonitor* _tmp64_ = NULL;
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp52_ = _source_it;
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp53_ = gee_iterator_next (_tmp52_);
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					if (!_tmp53_) {
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						break;
#line 3555 "LibraryMonitor.c"
					}
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp54_ = _source_it;
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp55_ = gee_iterator_get (_tmp54_);
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					source = (DataSource*) _tmp55_;
#line 450 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp56_ = source;
#line 450 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp57_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp56_, TYPE_MONITORABLE, Monitorable));
#line 450 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					monitorable = _tmp57_;
#line 452 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp59_ = monitorables;
#line 452 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					if (_tmp59_ != NULL) {
#line 3573 "LibraryMonitor.c"
						GeeSet* _tmp60_ = NULL;
						Monitorable* _tmp61_ = NULL;
						gboolean _tmp62_ = FALSE;
#line 452 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp60_ = monitorables;
#line 452 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp61_ = monitorable;
#line 452 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp62_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp60_, GEE_TYPE_COLLECTION, GeeCollection), _tmp61_);
#line 452 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp58_ = _tmp62_;
#line 3585 "LibraryMonitor.c"
					} else {
#line 452 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp58_ = FALSE;
#line 3589 "LibraryMonitor.c"
					}
#line 452 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					if (_tmp58_) {
#line 453 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_g_object_unref0 (monitorable);
#line 453 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_g_object_unref0 (source);
#line 453 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						continue;
#line 3599 "LibraryMonitor.c"
					}
#line 455 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp63_ = monitorable;
#line 455 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp64_ = monitor;
#line 455 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					library_monitor_enqueue_verify_monitorable (self, _tmp63_, _tmp64_);
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_g_object_unref0 (monitorable);
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_g_object_unref0 (source);
#line 3611 "LibraryMonitor.c"
				}
#line 448 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (_source_it);
#line 3615 "LibraryMonitor.c"
			}
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (monitorables);
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (monitor);
#line 3621 "LibraryMonitor.c"
		}
#line 432 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_monitor_list);
#line 3625 "LibraryMonitor.c"
	}
#line 460 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp65_ = self->priv->auto_import;
#line 460 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp65_) {
#line 3631 "LibraryMonitor.c"
		GeeHashSet* _tmp66_ = NULL;
#line 461 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp66_ = self->priv->unknown_files;
#line 461 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_enqueue_import_many (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp66_, GEE_TYPE_COLLECTION, GeeCollection));
#line 3637 "LibraryMonitor.c"
	}
#line 464 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->priv->discovered);
#line 464 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->discovered = NULL;
#line 465 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->priv->unknown_files);
#line 465 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->unknown_files = NULL;
#line 469 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp67_ = tombstone_global;
#line 469 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp68_ = self->priv->cancellable;
#line 469 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	tombstone_source_collection_launch_scan (_tmp67_, G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor), _tmp68_);
#line 472 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	DIRECTORY_MONITOR_CLASS (library_monitor_parent_class)->discovery_completed (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor));
#line 3655 "LibraryMonitor.c"
}


static void library_monitor_enqueue_verify_monitorable (LibraryMonitor* self, Monitorable* monitorable, MediaMonitor* monitor) {
	gboolean offered = FALSE;
	GeeQueue* _tmp0_ = NULL;
	Monitorable* _tmp1_ = NULL;
	MediaMonitor* _tmp2_ = NULL;
	LibraryMonitorVerifyJob* _tmp3_ = NULL;
	LibraryMonitorVerifyJob* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
#line 475 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (self));
#line 475 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_MONITORABLE (monitorable));
#line 475 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_MEDIA_MONITOR (monitor));
#line 476 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = self->priv->verify_queue;
#line 476 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = monitorable;
#line 476 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = monitor;
#line 476 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp3_ = library_monitor_verify_job_new (_tmp1_, _tmp2_);
#line 476 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp4_ = _tmp3_;
#line 476 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp5_ = gee_queue_offer (_tmp0_, _tmp4_);
#line 476 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp6_ = _tmp5_;
#line 476 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_library_monitor_verify_job_unref0 (_tmp4_);
#line 476 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	offered = _tmp6_;
#line 477 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_vala_assert (offered, "offered");
#line 479 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_execute_next_verify_job (self);
#line 3696 "LibraryMonitor.c"
}


static void library_monitor_execute_next_verify_job (LibraryMonitor* self) {
	gboolean _tmp0_ = FALSE;
	gint _tmp1_ = 0;
	LibraryMonitorVerifyJob* job = NULL;
	GeeQueue* _tmp5_ = NULL;
	gpointer _tmp6_ = NULL;
	LibraryMonitorVerifyJob* _tmp7_ = NULL;
	gint _tmp8_ = 0;
	LibraryMonitorVerifyJob* _tmp9_ = NULL;
	Monitorable* _tmp10_ = NULL;
	LibraryMonitorVerifyJob* _tmp11_ = NULL;
	MediaMonitor* _tmp12_ = NULL;
#line 482 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (self));
#line 483 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = self->priv->outstanding_verify_jobs;
#line 483 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp1_ >= LIBRARY_MONITOR_MAX_VERIFY_EXISTING_MEDIA_JOBS) {
#line 483 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = TRUE;
#line 3720 "LibraryMonitor.c"
	} else {
		GeeQueue* _tmp2_ = NULL;
		gint _tmp3_ = 0;
		gint _tmp4_ = 0;
#line 483 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp2_ = self->priv->verify_queue;
#line 483 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp3_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection));
#line 483 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = _tmp3_;
#line 483 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = _tmp4_ == 0;
#line 3733 "LibraryMonitor.c"
	}
#line 483 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp0_) {
#line 484 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return;
#line 3739 "LibraryMonitor.c"
	}
#line 486 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp5_ = self->priv->verify_queue;
#line 486 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp6_ = gee_queue_poll (_tmp5_);
#line 486 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	job = (LibraryMonitorVerifyJob*) _tmp6_;
#line 487 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp7_ = job;
#line 487 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_vala_assert (_tmp7_ != NULL, "job != null");
#line 489 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp8_ = self->priv->outstanding_verify_jobs;
#line 489 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->outstanding_verify_jobs = _tmp8_ + 1;
#line 490 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp9_ = job;
#line 490 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp10_ = _tmp9_->monitorable;
#line 490 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp11_ = job;
#line 490 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp12_ = _tmp11_->monitor;
#line 490 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_verify_monitorable (self, _tmp10_, _tmp12_, NULL, NULL);
#line 482 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_library_monitor_verify_job_unref0 (job);
#line 3767 "LibraryMonitor.c"
}


static void library_monitor_verify_monitorable_data_free (gpointer _data) {
	LibraryMonitorVerifyMonitorableData* _data_;
	_data_ = _data;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (_data_->monitorable);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (_data_->monitor);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (_data_->self);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_slice_free (LibraryMonitorVerifyMonitorableData, _data_);
#line 3782 "LibraryMonitor.c"
}


static void library_monitor_verify_monitorable (LibraryMonitor* self, Monitorable* monitorable, MediaMonitor* monitor, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	LibraryMonitorVerifyMonitorableData* _data_;
	LibraryMonitor* _tmp0_ = NULL;
	Monitorable* _tmp1_ = NULL;
	Monitorable* _tmp2_ = NULL;
	MediaMonitor* _tmp3_ = NULL;
	MediaMonitor* _tmp4_ = NULL;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_ = g_slice_new0 (LibraryMonitorVerifyMonitorableData);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, library_monitor_verify_monitorable);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, library_monitor_verify_monitorable_data_free);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->self = _tmp0_;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = monitorable;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (_data_->monitorable);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->monitorable = _tmp2_;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp3_ = monitor;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (_data_->monitor);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->monitor = _tmp4_;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_verify_monitorable_co (_data_);
#line 3821 "LibraryMonitor.c"
}


static void library_monitor_verify_monitorable_finish (LibraryMonitor* self, GAsyncResult* _res_) {
	LibraryMonitorVerifyMonitorableData* _data_;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 3829 "LibraryMonitor.c"
}


static void _vala_array_add296 (GFile*** array, int* length, int* size, GFile* value) {
#line 500 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if ((*length) == (*size)) {
#line 500 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 500 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		*array = g_renew (GFile*, *array, (*size) + 1);
#line 3840 "LibraryMonitor.c"
	}
#line 500 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	(*array)[(*length)++] = value;
#line 500 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	(*array)[*length] = NULL;
#line 3846 "LibraryMonitor.c"
}


static void library_monitor_verify_monitorable_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	LibraryMonitorVerifyMonitorableData* _data_;
#line 509 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_ = _user_data_;
#line 509 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_source_object_ = source_object;
#line 509 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_res_ = _res_;
#line 509 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_verify_monitorable_co (_data_);
#line 3860 "LibraryMonitor.c"
}


static gboolean _library_monitor_verify_monitorable_co_gsource_func (gpointer self) {
	gboolean result;
	result = library_monitor_verify_monitorable_co (self);
#line 530 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return result;
#line 3869 "LibraryMonitor.c"
}


static gboolean library_monitor_verify_monitorable_co (LibraryMonitorVerifyMonitorableData* _data_) {
#line 493 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	switch (_data_->_state_) {
#line 493 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		case 0:
#line 3878 "LibraryMonitor.c"
		goto _state_0;
#line 493 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		case 1:
#line 3882 "LibraryMonitor.c"
		goto _state_1;
#line 493 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		case 2:
#line 3886 "LibraryMonitor.c"
		goto _state_2;
		default:
#line 493 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_assert_not_reached ();
#line 3891 "LibraryMonitor.c"
	}
	_state_0:
#line 494 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp0_ = NULL;
#line 494 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp0_ = g_new0 (GFile*, 1 + 1);
#line 494 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->files_length1 = 0;
#line 494 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_files_size_ = 0;
#line 494 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->files = _data_->_tmp0_;
#line 494 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->files_length1 = 1;
#line 494 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_files_size_ = _data_->files_length1;
#line 495 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp1_ = NULL;
#line 495 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp1__length1 = 0;
#line 495 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp1_ = _data_->files;
#line 495 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp1__length1 = _data_->files_length1;
#line 495 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp2_ = NULL;
#line 495 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp2_ = _data_->monitor;
#line 495 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp3_ = NULL;
#line 495 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp3_ = _data_->monitorable;
#line 495 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp4_ = NULL;
#line 495 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp4_ = media_monitor_get_master_file (_data_->_tmp2_, _data_->_tmp3_);
#line 495 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (_data_->_tmp1_[0]);
#line 495 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp1_[0] = _data_->_tmp4_;
#line 495 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp5_ = NULL;
#line 495 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp5_ = _data_->_tmp1_[0];
#line 497 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp6_ = NULL;
#line 497 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp6_ = _data_->monitor;
#line 497 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp7_ = NULL;
#line 497 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp7_ = _data_->monitorable;
#line 497 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp8_ = 0;
#line 497 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp9_ = NULL;
#line 497 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp9_ = media_monitor_get_auxilliary_backing_files (_data_->_tmp6_, _data_->_tmp7_, &_data_->_tmp8_);
#line 497 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->aux_files_length1 = 0;
#line 497 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_aux_files_size_ = 0;
#line 497 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->aux_files = _data_->_tmp9_;
#line 497 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->aux_files_length1 = _data_->_tmp8_;
#line 497 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_aux_files_size_ = _data_->aux_files_length1;
#line 498 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp10_ = NULL;
#line 498 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp10__length1 = 0;
#line 498 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp10_ = _data_->aux_files;
#line 498 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp10__length1 = _data_->aux_files_length1;
#line 498 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_data_->_tmp10_ != NULL) {
#line 499 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_data_->_tmp11_ = NULL;
#line 499 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_data_->_tmp11__length1 = 0;
#line 499 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_data_->_tmp11_ = _data_->aux_files;
#line 499 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_data_->_tmp11__length1 = _data_->aux_files_length1;
#line 3978 "LibraryMonitor.c"
		{
#line 499 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->aux_file_collection_length1 = 0;
#line 499 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_aux_file_collection_size_ = 0;
#line 499 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->aux_file_collection = _data_->_tmp11_;
#line 499 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->aux_file_collection_length1 = _data_->_tmp11__length1;
#line 499 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			for (_data_->aux_file_it = 0; _data_->aux_file_it < _data_->_tmp11__length1; _data_->aux_file_it = _data_->aux_file_it + 1) {
#line 499 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp12_ = NULL;
#line 499 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp12_ = _g_object_ref0 (_data_->aux_file_collection[_data_->aux_file_it]);
#line 499 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->aux_file = _data_->_tmp12_;
#line 3996 "LibraryMonitor.c"
				{
#line 500 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp13_ = NULL;
#line 500 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp13__length1 = 0;
#line 500 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp13_ = _data_->files;
#line 500 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp13__length1 = _data_->files_length1;
#line 500 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp14_ = NULL;
#line 500 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp14_ = _data_->aux_file;
#line 500 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp15_ = NULL;
#line 500 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp15_ = _g_object_ref0 (_data_->_tmp14_);
#line 500 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_vala_array_add296 (&_data_->files, &_data_->files_length1, &_data_->_files_size_, _data_->_tmp15_);
#line 499 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_g_object_unref0 (_data_->aux_file);
#line 4018 "LibraryMonitor.c"
				}
			}
		}
	}
	{
#line 503 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_data_->ctr = 0;
#line 4026 "LibraryMonitor.c"
		{
#line 503 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_data_->_tmp16_ = TRUE;
#line 503 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			while (TRUE) {
#line 503 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				if (!_data_->_tmp16_) {
#line 503 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp17_ = 0;
#line 503 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp17_ = _data_->ctr;
#line 503 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->ctr = _data_->_tmp17_ + 1;
#line 4040 "LibraryMonitor.c"
				}
#line 503 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp16_ = FALSE;
#line 503 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp18_ = 0;
#line 503 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp18_ = _data_->ctr;
#line 503 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp19_ = NULL;
#line 503 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp19__length1 = 0;
#line 503 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp19_ = _data_->files;
#line 503 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp19__length1 = _data_->files_length1;
#line 503 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				if (!(_data_->_tmp18_ < _data_->_tmp19__length1)) {
#line 503 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					break;
#line 4060 "LibraryMonitor.c"
				}
#line 504 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp20_ = NULL;
#line 504 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp20__length1 = 0;
#line 504 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp20_ = _data_->files;
#line 504 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp20__length1 = _data_->files_length1;
#line 504 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp21_ = 0;
#line 504 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp21_ = _data_->ctr;
#line 504 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp22_ = NULL;
#line 504 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp22_ = _data_->_tmp20_[_data_->_tmp21_];
#line 504 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp23_ = NULL;
#line 504 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp23_ = _g_object_ref0 (_data_->_tmp22_);
#line 504 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->file = _data_->_tmp23_;
#line 506 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp24_ = NULL;
#line 506 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp24_ = _data_->file;
#line 506 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp25_ = NULL;
#line 506 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp25_ = directory_monitor_get_file_info (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor), _data_->_tmp24_);
#line 506 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->info = _data_->_tmp25_;
#line 507 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp26_ = NULL;
#line 507 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp26_ = _data_->info;
#line 507 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				if (_data_->_tmp26_ == NULL) {
#line 4100 "LibraryMonitor.c"
					{
#line 509 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp28_ = NULL;
#line 509 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp28_ = _data_->file;
#line 509 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp29_ = NULL;
#line 509 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp29_ = _data_->self->priv->cancellable;
#line 509 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_state_ = 1;
#line 509 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						g_file_query_info_async (_data_->_tmp28_, DIRECTORY_MONITOR_SUPPLIED_ATTRIBUTES, DIRECTORY_MONITOR_FILE_INFO_FLAGS, DIRECTORY_MONITOR_DEFAULT_PRIORITY, _data_->_tmp29_, library_monitor_verify_monitorable_ready, _data_);
#line 509 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						return FALSE;
#line 4116 "LibraryMonitor.c"
						_state_1:
#line 509 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp30_ = NULL;
#line 509 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp30_ = g_file_query_info_finish (_data_->_tmp28_, _data_->_res_, &_data_->_inner_error_);
#line 509 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp27_ = _data_->_tmp30_;
#line 509 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 4126 "LibraryMonitor.c"
							goto __catch487_g_error;
						}
#line 509 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp31_ = NULL;
#line 509 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp31_ = _data_->_tmp27_;
#line 509 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp27_ = NULL;
#line 509 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_g_object_unref0 (_data_->info);
#line 509 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->info = _data_->_tmp31_;
#line 508 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_g_object_unref0 (_data_->_tmp27_);
#line 4141 "LibraryMonitor.c"
					}
					goto __finally487;
					__catch487_g_error:
					{
#line 508 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->err = _data_->_inner_error_;
#line 508 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_inner_error_ = NULL;
#line 508 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_g_error_free0 (_data_->err);
#line 4152 "LibraryMonitor.c"
					}
					__finally487:
#line 508 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 508 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_g_object_unref0 (_data_->info);
#line 508 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_g_object_unref0 (_data_->file);
#line 508 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->aux_files = (_vala_array_free (_data_->aux_files, _data_->aux_files_length1, (GDestroyNotify) g_object_unref), NULL);
#line 508 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->files = (_vala_array_free (_data_->files, _data_->files_length1, (GDestroyNotify) g_object_unref), NULL);
#line 508 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 508 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						g_clear_error (&_data_->_inner_error_);
#line 508 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						return FALSE;
#line 4171 "LibraryMonitor.c"
					}
				}
#line 517 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp32_ = 0;
#line 517 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp32_ = _data_->ctr;
#line 517 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				if (_data_->_tmp32_ == 0) {
#line 518 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp34_ = NULL;
#line 518 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_data_->_tmp34_ = _data_->info;
#line 518 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					if (_data_->_tmp34_ != NULL) {
#line 518 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp35_ = NULL;
#line 518 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp35_ = _data_->monitor;
#line 518 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp36_ = NULL;
#line 518 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp36_ = _data_->monitorable;
#line 518 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp37_ = FALSE;
#line 518 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp37_ = media_monitor_is_offline (_data_->_tmp35_, _data_->_tmp36_);
#line 518 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp33_ = _data_->_tmp37_;
#line 4200 "LibraryMonitor.c"
					} else {
#line 518 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp33_ = FALSE;
#line 4204 "LibraryMonitor.c"
					}
#line 518 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					if (_data_->_tmp33_) {
#line 519 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp38_ = NULL;
#line 519 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp38_ = _data_->monitor;
#line 519 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp39_ = NULL;
#line 519 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp39_ = _data_->monitorable;
#line 519 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						media_monitor_update_online (_data_->_tmp38_, _data_->_tmp39_);
#line 4218 "LibraryMonitor.c"
					} else {
#line 520 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp41_ = NULL;
#line 520 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_data_->_tmp41_ = _data_->info;
#line 520 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						if (_data_->_tmp41_ == NULL) {
#line 520 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_data_->_tmp42_ = NULL;
#line 520 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_data_->_tmp42_ = _data_->monitor;
#line 520 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_data_->_tmp43_ = NULL;
#line 520 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_data_->_tmp43_ = _data_->monitorable;
#line 520 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_data_->_tmp44_ = FALSE;
#line 520 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_data_->_tmp44_ = media_monitor_is_offline (_data_->_tmp42_, _data_->_tmp43_);
#line 520 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_data_->_tmp40_ = !_data_->_tmp44_;
#line 4240 "LibraryMonitor.c"
						} else {
#line 520 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_data_->_tmp40_ = FALSE;
#line 4244 "LibraryMonitor.c"
						}
#line 520 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						if (_data_->_tmp40_) {
#line 521 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_data_->_tmp45_ = NULL;
#line 521 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_data_->_tmp45_ = _data_->monitor;
#line 521 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_data_->_tmp46_ = NULL;
#line 521 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_data_->_tmp46_ = _data_->monitorable;
#line 521 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							media_monitor_update_offline (_data_->_tmp45_, _data_->_tmp46_);
#line 4258 "LibraryMonitor.c"
						}
					}
				}
#line 524 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp47_ = NULL;
#line 524 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp47_ = _data_->monitor;
#line 524 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp48_ = NULL;
#line 524 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp48_ = _data_->monitorable;
#line 524 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp49_ = NULL;
#line 524 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp49_ = _data_->file;
#line 524 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp50_ = NULL;
#line 524 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_data_->_tmp50_ = _data_->info;
#line 524 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				media_monitor_update_backing_file_info (_data_->_tmp47_, _data_->_tmp48_, _data_->_tmp49_, _data_->_tmp50_);
#line 503 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (_data_->info);
#line 503 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (_data_->file);
#line 4284 "LibraryMonitor.c"
			}
		}
	}
#line 527 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp51_ = 0;
#line 527 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp51_ = _data_->self->priv->completed_monitorable_verifies;
#line 527 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->self->priv->completed_monitorable_verifies = _data_->_tmp51_ + 1;
#line 528 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp52_ = 0;
#line 528 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp52_ = _data_->self->priv->completed_monitorable_verifies;
#line 528 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp53_ = 0;
#line 528 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp53_ = _data_->self->priv->total_monitorable_verifies;
#line 528 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_emit_by_name (_data_->self, "auto-update-progress", _data_->_tmp52_, _data_->_tmp53_);
#line 530 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_idle_add_full (DIRECTORY_MONITOR_DEFAULT_PRIORITY, _library_monitor_verify_monitorable_co_gsource_func, _data_, NULL);
#line 531 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_state_ = 2;
#line 531 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return FALSE;
#line 4310 "LibraryMonitor.c"
	_state_2:
	;
#line 534 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp54_ = 0;
#line 534 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp54_ = _data_->self->priv->outstanding_verify_jobs;
#line 534 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_vala_assert (_data_->_tmp54_ > 0, "outstanding_verify_jobs > 0");
#line 535 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp55_ = 0;
#line 535 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->_tmp55_ = _data_->self->priv->outstanding_verify_jobs;
#line 535 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->self->priv->outstanding_verify_jobs = _data_->_tmp55_ - 1;
#line 537 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_execute_next_verify_job (_data_->self);
#line 493 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->aux_files = (_vala_array_free (_data_->aux_files, _data_->aux_files_length1, (GDestroyNotify) g_object_unref), NULL);
#line 493 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_->files = (_vala_array_free (_data_->files, _data_->files_length1, (GDestroyNotify) g_object_unref), NULL);
#line 493 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_data_->_state_ == 0) {
#line 493 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 4335 "LibraryMonitor.c"
	} else {
#line 493 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 4339 "LibraryMonitor.c"
	}
#line 493 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_object_unref (_data_->_async_result);
#line 493 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return FALSE;
#line 4345 "LibraryMonitor.c"
}


static void library_monitor_on_config_changed (LibraryMonitor* self) {
	gboolean value = FALSE;
	ConfigFacade* _tmp0_ = NULL;
	ConfigFacade* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
#line 540 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (self));
#line 541 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = config_facade_get_instance ();
#line 541 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = _tmp0_;
#line 541 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = configuration_facade_get_auto_import_from_library (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
#line 541 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp3_ = _tmp2_;
#line 541 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (_tmp1_);
#line 541 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	value = _tmp3_;
#line 543 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp4_ = self->priv->auto_import;
#line 543 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp5_ = value;
#line 543 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp4_ == _tmp5_) {
#line 544 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return;
#line 4381 "LibraryMonitor.c"
	}
#line 546 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp6_ = value;
#line 546 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->auto_import = _tmp6_;
#line 547 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp7_ = self->priv->auto_import;
#line 547 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp7_) {
#line 4391 "LibraryMonitor.c"
		gboolean _tmp8_ = FALSE;
#line 548 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp8_ = commandline_options_no_runtime_monitoring;
#line 548 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (!_tmp8_) {
#line 549 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			library_monitor_import_unrepresented_files (self);
#line 4399 "LibraryMonitor.c"
		}
	} else {
#line 551 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_cancel_batch_imports (self);
#line 4404 "LibraryMonitor.c"
	}
}


static void library_monitor_enqueue_import (LibraryMonitor* self, GFile* file) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GeeHashSet* _tmp2_ = NULL;
	GFile* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
#line 555 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (self));
#line 555 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_IS_FILE (file));
#line 556 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = self->priv->pending_imports;
#line 556 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp3_ = file;
#line 556 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp4_ = gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp3_);
#line 556 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (!_tmp4_) {
#line 4427 "LibraryMonitor.c"
		GFile* _tmp5_ = NULL;
		gboolean _tmp6_ = FALSE;
#line 556 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp5_ = file;
#line 556 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp6_ = library_monitor_is_supported_filetype (self, _tmp5_);
#line 556 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp1_ = _tmp6_;
#line 4436 "LibraryMonitor.c"
	} else {
#line 556 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp1_ = FALSE;
#line 4440 "LibraryMonitor.c"
	}
#line 556 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp1_) {
#line 4444 "LibraryMonitor.c"
		GFile* _tmp7_ = NULL;
		gboolean _tmp8_ = FALSE;
#line 556 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp7_ = file;
#line 556 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp8_ = library_monitor_is_blacklisted (_tmp7_);
#line 556 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = !_tmp8_;
#line 4453 "LibraryMonitor.c"
	} else {
#line 556 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = FALSE;
#line 4457 "LibraryMonitor.c"
	}
#line 556 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp0_) {
#line 4461 "LibraryMonitor.c"
		GeeHashSet* _tmp9_ = NULL;
		GFile* _tmp10_ = NULL;
#line 557 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp9_ = self->priv->import_queue;
#line 557 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp10_ = file;
#line 557 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp10_);
#line 4470 "LibraryMonitor.c"
	}
}


static void library_monitor_enqueue_import_many (LibraryMonitor* self, GeeCollection* files) {
#line 560 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (self));
#line 560 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (GEE_IS_COLLECTION (files));
#line 4480 "LibraryMonitor.c"
	{
		GeeIterator* _file_it = NULL;
		GeeCollection* _tmp0_ = NULL;
		GeeIterator* _tmp1_ = NULL;
#line 561 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = files;
#line 561 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERABLE, GeeIterable));
#line 561 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_file_it = _tmp1_;
#line 561 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		while (TRUE) {
#line 4493 "LibraryMonitor.c"
			GeeIterator* _tmp2_ = NULL;
			gboolean _tmp3_ = FALSE;
			GFile* file = NULL;
			GeeIterator* _tmp4_ = NULL;
			gpointer _tmp5_ = NULL;
			GFile* _tmp6_ = NULL;
#line 561 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp2_ = _file_it;
#line 561 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp3_ = gee_iterator_next (_tmp2_);
#line 561 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (!_tmp3_) {
#line 561 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 4508 "LibraryMonitor.c"
			}
#line 561 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp4_ = _file_it;
#line 561 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp5_ = gee_iterator_get (_tmp4_);
#line 561 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			file = (GFile*) _tmp5_;
#line 562 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp6_ = file;
#line 562 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			library_monitor_enqueue_import (self, _tmp6_);
#line 561 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (file);
#line 4522 "LibraryMonitor.c"
		}
#line 561 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_file_it);
#line 4526 "LibraryMonitor.c"
	}
}


static void library_monitor_remove_queued_import (LibraryMonitor* self, GFile* file) {
	GeeHashSet* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
#line 565 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (self));
#line 565 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_IS_FILE (file));
#line 566 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = self->priv->import_queue;
#line 566 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = file;
#line 566 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp1_);
#line 4544 "LibraryMonitor.c"
}


static gboolean library_monitor_on_flush_import_queue (LibraryMonitor* self) {
	gboolean result = FALSE;
	GCancellable* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	GeeHashSet* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	BatchImport* _tmp5_ = NULL;
	GeeHashSet* _tmp6_ = NULL;
	gint _tmp7_ = 0;
	gint _tmp8_ = 0;
	gchar* _tmp9_ = NULL;
	gchar* _tmp10_ = NULL;
	time_t now = 0;
	gulong _tmp11_ = 0UL;
	gboolean _tmp12_ = FALSE;
	BatchImportRoll* _tmp13_ = NULL;
	time_t _tmp17_ = 0;
	GeeArrayList* jobs = NULL;
	GeeArrayList* _tmp18_ = NULL;
	GeeHashSet* _tmp33_ = NULL;
	BatchImport* importer = NULL;
	GeeArrayList* _tmp34_ = NULL;
	BatchImportRoll* _tmp35_ = NULL;
	BatchImport* _tmp36_ = NULL;
	BatchImport* _tmp37_ = NULL;
	BatchImport* _tmp38_ = NULL;
	GeeArrayList* _tmp39_ = NULL;
	BatchImport* _tmp40_ = NULL;
#line 569 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (IS_LIBRARY_MONITOR (self), FALSE);
#line 570 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = self->priv->cancellable;
#line 570 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = g_cancellable_is_cancelled (_tmp0_);
#line 570 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp1_) {
#line 571 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		result = FALSE;
#line 571 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return result;
#line 4589 "LibraryMonitor.c"
	}
#line 573 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = self->priv->import_queue;
#line 573 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp3_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection));
#line 573 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp4_ = _tmp3_;
#line 573 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp4_ == 0) {
#line 574 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		result = TRUE;
#line 574 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return result;
#line 4603 "LibraryMonitor.c"
	}
#line 578 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp5_ = self->priv->current_batch_import;
#line 578 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp5_ != NULL) {
#line 579 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		result = TRUE;
#line 579 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return result;
#line 4613 "LibraryMonitor.c"
	}
#line 581 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp6_ = self->priv->import_queue;
#line 581 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp7_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection));
#line 581 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp8_ = _tmp7_;
#line 581 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp9_ = g_strdup_printf ("Auto-importing %d files", _tmp8_);
#line 581 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp10_ = _tmp9_;
#line 581 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	directory_monitor_mdbg (_tmp10_);
#line 581 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_free0 (_tmp10_);
#line 586 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp11_ = now_sec ();
#line 586 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	now = (time_t) _tmp11_;
#line 587 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp13_ = self->priv->current_import_roll;
#line 587 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp13_ == NULL) {
#line 587 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp12_ = TRUE;
#line 4639 "LibraryMonitor.c"
	} else {
		time_t _tmp14_ = 0;
		time_t _tmp15_ = 0;
#line 587 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp14_ = now;
#line 587 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp15_ = self->priv->last_import_roll_use;
#line 587 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp12_ = (_tmp14_ - _tmp15_) >= ((time_t) LIBRARY_MONITOR_IMPORT_ROLL_QUIET_SEC);
#line 4649 "LibraryMonitor.c"
	}
#line 587 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp12_) {
#line 4653 "LibraryMonitor.c"
		BatchImportRoll* _tmp16_ = NULL;
#line 588 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp16_ = batch_import_roll_new ();
#line 588 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_batch_import_roll_unref0 (self->priv->current_import_roll);
#line 588 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		self->priv->current_import_roll = _tmp16_;
#line 4661 "LibraryMonitor.c"
	}
#line 589 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp17_ = now;
#line 589 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->last_import_roll_use = _tmp17_;
#line 591 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp18_ = gee_array_list_new (TYPE_BATCH_IMPORT_JOB, (GBoxedCopyFunc) batch_import_job_ref, batch_import_job_unref, NULL, NULL, NULL);
#line 591 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	jobs = _tmp18_;
#line 4671 "LibraryMonitor.c"
	{
		GeeIterator* _file_it = NULL;
		GeeHashSet* _tmp19_ = NULL;
		GeeIterator* _tmp20_ = NULL;
#line 592 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp19_ = self->priv->import_queue;
#line 592 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp20_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 592 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_file_it = _tmp20_;
#line 592 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		while (TRUE) {
#line 4684 "LibraryMonitor.c"
			GeeIterator* _tmp21_ = NULL;
			gboolean _tmp22_ = FALSE;
			GFile* file = NULL;
			GeeIterator* _tmp23_ = NULL;
			gpointer _tmp24_ = NULL;
			GFile* _tmp25_ = NULL;
			gboolean _tmp26_ = FALSE;
			GeeArrayList* _tmp27_ = NULL;
			GFile* _tmp28_ = NULL;
			FileImportJob* _tmp29_ = NULL;
			FileImportJob* _tmp30_ = NULL;
			GeeHashSet* _tmp31_ = NULL;
			GFile* _tmp32_ = NULL;
#line 592 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp21_ = _file_it;
#line 592 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp22_ = gee_iterator_next (_tmp21_);
#line 592 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (!_tmp22_) {
#line 592 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 4706 "LibraryMonitor.c"
			}
#line 592 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp23_ = _file_it;
#line 592 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp24_ = gee_iterator_get (_tmp23_);
#line 592 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			file = (GFile*) _tmp24_;
#line 593 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp25_ = file;
#line 593 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp26_ = library_monitor_is_blacklisted (_tmp25_);
#line 593 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp26_) {
#line 594 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (file);
#line 594 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				continue;
#line 4724 "LibraryMonitor.c"
			}
#line 596 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp27_ = jobs;
#line 596 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp28_ = file;
#line 596 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp29_ = file_import_job_new (_tmp28_, FALSE);
#line 596 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp30_ = _tmp29_;
#line 596 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, TYPE_BATCH_IMPORT_JOB, BatchImportJob));
#line 596 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_batch_import_job_unref0 (_tmp30_);
#line 597 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp31_ = self->priv->pending_imports;
#line 597 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp32_ = file;
#line 597 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp32_);
#line 592 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (file);
#line 4746 "LibraryMonitor.c"
		}
#line 592 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_file_it);
#line 4750 "LibraryMonitor.c"
	}
#line 600 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp33_ = self->priv->import_queue;
#line 600 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	gee_abstract_collection_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 602 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp34_ = jobs;
#line 602 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp35_ = self->priv->current_import_roll;
#line 602 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp36_ = batch_import_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, GEE_TYPE_ITERABLE, GeeIterable), "LibraryMonitor autoimport", NULL, NULL, NULL, NULL, NULL, _tmp35_, NULL);
#line 602 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	importer = _tmp36_;
#line 604 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp37_ = importer;
#line 604 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	batch_import_set_untrash_duplicates (_tmp37_, FALSE);
#line 605 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp38_ = importer;
#line 605 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	batch_import_set_mark_duplicates_online (_tmp38_, FALSE);
#line 606 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp39_ = self->priv->batch_import_queue;
#line 606 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp40_ = importer;
#line 606 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp40_);
#line 608 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_schedule_next_batch_import (self);
#line 610 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	result = TRUE;
#line 610 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (importer);
#line 610 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (jobs);
#line 610 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return result;
#line 4788 "LibraryMonitor.c"
}


static void _library_monitor_on_import_preparing_batch_import_preparing (BatchImport* _sender, gpointer self) {
#line 618 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_on_import_preparing ((LibraryMonitor*) self);
#line 4795 "LibraryMonitor.c"
}


static void _library_monitor_on_import_progress_batch_import_progress (BatchImport* _sender, guint64 completed_bytes, guint64 total_bytes, gpointer self) {
#line 619 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_on_import_progress ((LibraryMonitor*) self, completed_bytes, total_bytes);
#line 4802 "LibraryMonitor.c"
}


static void _library_monitor_on_import_complete_batch_import_import_complete (BatchImport* _sender, ImportManifest* manifest, BatchImportRoll* import_roll, gpointer self) {
#line 620 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_on_import_complete ((LibraryMonitor*) self, _sender, manifest, import_roll);
#line 4809 "LibraryMonitor.c"
}


static void library_monitor_schedule_next_batch_import (LibraryMonitor* self) {
	gboolean _tmp0_ = FALSE;
	BatchImport* _tmp1_ = NULL;
	GeeArrayList* _tmp5_ = NULL;
	gpointer _tmp6_ = NULL;
	BatchImport* _tmp7_ = NULL;
	BatchImport* _tmp8_ = NULL;
	BatchImport* _tmp9_ = NULL;
	BatchImport* _tmp10_ = NULL;
#line 613 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (self));
#line 614 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = self->priv->current_batch_import;
#line 614 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp1_ != NULL) {
#line 614 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = TRUE;
#line 4830 "LibraryMonitor.c"
	} else {
		GeeArrayList* _tmp2_ = NULL;
		gint _tmp3_ = 0;
		gint _tmp4_ = 0;
#line 614 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp2_ = self->priv->batch_import_queue;
#line 614 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp3_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection));
#line 614 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = _tmp3_;
#line 614 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = _tmp4_ == 0;
#line 4843 "LibraryMonitor.c"
	}
#line 614 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp0_) {
#line 615 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return;
#line 4849 "LibraryMonitor.c"
	}
#line 617 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp5_ = self->priv->batch_import_queue;
#line 617 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp6_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), 0);
#line 617 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->priv->current_batch_import);
#line 617 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->current_batch_import = (BatchImport*) _tmp6_;
#line 618 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp7_ = self->priv->current_batch_import;
#line 618 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_connect_object (_tmp7_, "preparing", (GCallback) _library_monitor_on_import_preparing_batch_import_preparing, self, 0);
#line 619 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp8_ = self->priv->current_batch_import;
#line 619 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_connect_object (_tmp8_, "progress", (GCallback) _library_monitor_on_import_progress_batch_import_progress, self, 0);
#line 620 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp9_ = self->priv->current_batch_import;
#line 620 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_connect_object (_tmp9_, "import-complete", (GCallback) _library_monitor_on_import_complete_batch_import_import_complete, self, 0);
#line 621 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp10_ = self->priv->current_batch_import;
#line 621 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	batch_import_schedule (_tmp10_);
#line 4875 "LibraryMonitor.c"
}


static void library_monitor_discard_current_batch_import (LibraryMonitor* self) {
	BatchImport* _tmp0_ = NULL;
	gboolean removed = FALSE;
	GeeArrayList* _tmp1_ = NULL;
	BatchImport* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	BatchImport* _tmp5_ = NULL;
	guint _tmp6_ = 0U;
	BatchImport* _tmp7_ = NULL;
	guint _tmp8_ = 0U;
	BatchImport* _tmp9_ = NULL;
	guint _tmp10_ = 0U;
	GeeArrayList* _tmp11_ = NULL;
	gint _tmp12_ = 0;
	gint _tmp13_ = 0;
#line 624 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (self));
#line 625 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = self->priv->current_batch_import;
#line 625 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_vala_assert (_tmp0_ != NULL, "current_batch_import != null");
#line 627 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = self->priv->batch_import_queue;
#line 627 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = self->priv->current_batch_import;
#line 627 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp3_ = gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp2_);
#line 627 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	removed = _tmp3_;
#line 628 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp4_ = removed;
#line 628 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_vala_assert (_tmp4_, "removed");
#line 629 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp5_ = self->priv->current_batch_import;
#line 629 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_parse_name ("preparing", TYPE_BATCH_IMPORT, &_tmp6_, NULL, FALSE);
#line 629 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_handlers_disconnect_matched (_tmp5_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 0, NULL, (GCallback) _library_monitor_on_import_preparing_batch_import_preparing, self);
#line 630 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp7_ = self->priv->current_batch_import;
#line 630 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_parse_name ("progress", TYPE_BATCH_IMPORT, &_tmp8_, NULL, FALSE);
#line 630 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_handlers_disconnect_matched (_tmp7_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp8_, 0, NULL, (GCallback) _library_monitor_on_import_progress_batch_import_progress, self);
#line 631 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp9_ = self->priv->current_batch_import;
#line 631 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_parse_name ("import-complete", TYPE_BATCH_IMPORT, &_tmp10_, NULL, FALSE);
#line 631 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_handlers_disconnect_matched (_tmp9_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp10_, 0, NULL, (GCallback) _library_monitor_on_import_complete_batch_import_import_complete, self);
#line 632 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->priv->current_batch_import);
#line 632 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->current_batch_import = NULL;
#line 639 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp11_ = self->priv->batch_import_queue;
#line 639 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp12_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_COLLECTION, GeeCollection));
#line 639 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp13_ = _tmp12_;
#line 639 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp13_ == 0) {
#line 4943 "LibraryMonitor.c"
		GeeHashSet* _tmp14_ = NULL;
#line 640 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp14_ = self->priv->pending_imports;
#line 640 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		gee_abstract_collection_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 4949 "LibraryMonitor.c"
	}
}


static void library_monitor_cancel_batch_imports (LibraryMonitor* self) {
	gint ctr = 0;
	BatchImport* _tmp16_ = NULL;
	GeeHashSet* _tmp18_ = NULL;
#line 643 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (self));
#line 645 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	ctr = 0;
#line 646 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	while (TRUE) {
#line 4964 "LibraryMonitor.c"
		gint _tmp0_ = 0;
		GeeArrayList* _tmp1_ = NULL;
		gint _tmp2_ = 0;
		gint _tmp3_ = 0;
		GeeArrayList* _tmp4_ = NULL;
		gint _tmp5_ = 0;
		gpointer _tmp6_ = NULL;
		BatchImport* _tmp7_ = NULL;
		BatchImport* _tmp8_ = NULL;
		gboolean _tmp9_ = FALSE;
		GeeArrayList* _tmp11_ = NULL;
		GeeArrayList* _tmp12_ = NULL;
		gint _tmp13_ = 0;
		gpointer _tmp14_ = NULL;
		BatchImport* _tmp15_ = NULL;
#line 646 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = ctr;
#line 646 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp1_ = self->priv->batch_import_queue;
#line 646 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp2_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection));
#line 646 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp3_ = _tmp2_;
#line 646 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (!(_tmp0_ < _tmp3_)) {
#line 646 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			break;
#line 4992 "LibraryMonitor.c"
		}
#line 647 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = self->priv->batch_import_queue;
#line 647 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp5_ = ctr;
#line 647 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp6_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp5_);
#line 647 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp7_ = (BatchImport*) _tmp6_;
#line 647 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp8_ = self->priv->current_batch_import;
#line 647 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp9_ = _tmp7_ == _tmp8_;
#line 647 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_tmp7_);
#line 647 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (_tmp9_) {
#line 5010 "LibraryMonitor.c"
			gint _tmp10_ = 0;
#line 648 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp10_ = ctr;
#line 648 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			ctr = _tmp10_ + 1;
#line 650 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			continue;
#line 5018 "LibraryMonitor.c"
		}
#line 653 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp11_ = self->priv->batch_import_queue;
#line 653 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp12_ = self->priv->batch_import_queue;
#line 653 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp13_ = ctr;
#line 653 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp14_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp13_);
#line 653 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp15_ = (BatchImport*) _tmp14_;
#line 653 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp15_);
#line 653 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_tmp15_);
#line 5034 "LibraryMonitor.c"
	}
#line 657 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp16_ = self->priv->current_batch_import;
#line 657 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp16_ != NULL) {
#line 5040 "LibraryMonitor.c"
		BatchImport* _tmp17_ = NULL;
#line 658 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp17_ = self->priv->current_batch_import;
#line 658 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		batch_import_user_halt (_tmp17_);
#line 5046 "LibraryMonitor.c"
	}
#line 661 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp18_ = self->priv->pending_imports;
#line 661 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	gee_abstract_collection_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 5052 "LibraryMonitor.c"
}


static void library_monitor_on_import_preparing (LibraryMonitor* self) {
#line 664 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (self));
#line 665 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_emit_by_name (self, "auto-import-preparing");
#line 5061 "LibraryMonitor.c"
}


static void library_monitor_on_import_progress (LibraryMonitor* self, guint64 completed_bytes, guint64 total_bytes) {
	guint64 _tmp0_ = 0ULL;
	guint64 _tmp1_ = 0ULL;
#line 668 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (self));
#line 669 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = completed_bytes;
#line 669 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = total_bytes;
#line 669 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_emit_by_name (self, "auto-import-progress", _tmp0_, _tmp1_);
#line 5076 "LibraryMonitor.c"
}


static void library_monitor_on_import_complete (LibraryMonitor* self, BatchImport* batch_import, ImportManifest* manifest, BatchImportRoll* import_roll) {
	BatchImport* _tmp0_ = NULL;
	BatchImport* _tmp1_ = NULL;
	ImportManifest* _tmp2_ = NULL;
	GeeList* _tmp3_ = NULL;
	gint _tmp4_ = 0;
	gint _tmp5_ = 0;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	ImportManifest* _tmp25_ = NULL;
	GeeList* _tmp26_ = NULL;
	gint _tmp27_ = 0;
	gint _tmp28_ = 0;
	GeeHashSet* _tmp59_ = NULL;
	gint _tmp60_ = 0;
	gint _tmp61_ = 0;
	gchar* _tmp62_ = NULL;
	gchar* _tmp63_ = NULL;
	GError * _inner_error_ = NULL;
#line 672 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (self));
#line 672 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_BATCH_IMPORT (batch_import));
#line 672 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_IMPORT_MANIFEST (manifest));
#line 672 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_BATCH_IMPORT_ROLL (import_roll));
#line 674 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = batch_import;
#line 674 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = self->priv->current_batch_import;
#line 674 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_vala_assert (_tmp0_ == _tmp1_, "batch_import == current_batch_import");
#line 676 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = manifest;
#line 676 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp3_ = _tmp2_->all;
#line 676 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp4_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection));
#line 676 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp5_ = _tmp4_;
#line 676 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp6_ = g_strdup_printf ("auto-import batch completed %d", _tmp5_);
#line 676 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp7_ = _tmp6_;
#line 676 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	directory_monitor_mdbg (_tmp7_);
#line 676 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_free0 (_tmp7_);
#line 677 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_emit_by_name (self, "auto-import-progress", (guint64) 0, (guint64) 0);
#line 5131 "LibraryMonitor.c"
	{
		GeeList* _result_list = NULL;
		ImportManifest* _tmp8_ = NULL;
		GeeList* _tmp9_ = NULL;
		GeeList* _tmp10_ = NULL;
		gint _result_size = 0;
		GeeList* _tmp11_ = NULL;
		gint _tmp12_ = 0;
		gint _tmp13_ = 0;
		gint _result_index = 0;
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp8_ = manifest;
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp9_ = _tmp8_->all;
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp10_ = _g_object_ref0 (_tmp9_);
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_result_list = _tmp10_;
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp11_ = _result_list;
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp12_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_COLLECTION, GeeCollection));
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp13_ = _tmp12_;
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_result_size = _tmp13_;
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_result_index = -1;
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		while (TRUE) {
#line 5162 "LibraryMonitor.c"
			gint _tmp14_ = 0;
			gint _tmp15_ = 0;
			gint _tmp16_ = 0;
			BatchImportResult* _result_ = NULL;
			GeeList* _tmp17_ = NULL;
			gint _tmp18_ = 0;
			gpointer _tmp19_ = NULL;
			BatchImportResult* _tmp20_ = NULL;
			GFile* _tmp21_ = NULL;
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp14_ = _result_index;
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_result_index = _tmp14_ + 1;
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp15_ = _result_index;
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp16_ = _result_size;
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (!(_tmp15_ < _tmp16_)) {
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 5184 "LibraryMonitor.c"
			}
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp17_ = _result_list;
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp18_ = _result_index;
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp19_ = gee_list_get (_tmp17_, _tmp18_);
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_result_ = (BatchImportResult*) _tmp19_;
#line 682 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp20_ = _result_;
#line 682 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp21_ = _tmp20_->file;
#line 682 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp21_ != NULL) {
#line 5200 "LibraryMonitor.c"
				GeeHashSet* _tmp22_ = NULL;
				BatchImportResult* _tmp23_ = NULL;
				GFile* _tmp24_ = NULL;
#line 683 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp22_ = self->priv->pending_imports;
#line 683 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp23_ = _result_;
#line 683 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp24_ = _tmp23_->file;
#line 683 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp24_);
#line 5212 "LibraryMonitor.c"
			}
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_batch_import_result_unref0 (_result_);
#line 5216 "LibraryMonitor.c"
		}
#line 679 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_result_list);
#line 5220 "LibraryMonitor.c"
	}
#line 686 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp25_ = manifest;
#line 686 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp26_ = _tmp25_->already_imported;
#line 686 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp27_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_COLLECTION, GeeCollection));
#line 686 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp28_ = _tmp27_;
#line 686 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp28_ > 0) {
#line 5232 "LibraryMonitor.c"
		GeeArrayList* to_tombstone = NULL;
		GeeArrayList* _tmp29_ = NULL;
#line 687 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp29_ = gee_array_list_new (TYPE_TOMBSTONED_FILE, (GBoxedCopyFunc) tombstoned_file_ref, tombstoned_file_unref, NULL, NULL, NULL);
#line 687 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		to_tombstone = _tmp29_;
#line 5239 "LibraryMonitor.c"
		{
			GeeList* _result_list = NULL;
			ImportManifest* _tmp30_ = NULL;
			GeeList* _tmp31_ = NULL;
			GeeList* _tmp32_ = NULL;
			gint _result_size = 0;
			GeeList* _tmp33_ = NULL;
			gint _tmp34_ = 0;
			gint _tmp35_ = 0;
			gint _result_index = 0;
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp30_ = manifest;
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp31_ = _tmp30_->already_imported;
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp32_ = _g_object_ref0 (_tmp31_);
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_result_list = _tmp32_;
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp33_ = _result_list;
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp34_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, GEE_TYPE_COLLECTION, GeeCollection));
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp35_ = _tmp34_;
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_result_size = _tmp35_;
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_result_index = -1;
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			while (TRUE) {
#line 5270 "LibraryMonitor.c"
				gint _tmp36_ = 0;
				gint _tmp37_ = 0;
				gint _tmp38_ = 0;
				BatchImportResult* _result_ = NULL;
				GeeList* _tmp39_ = NULL;
				gint _tmp40_ = 0;
				gpointer _tmp41_ = NULL;
				GFileInfo* info = NULL;
				BatchImportResult* _tmp42_ = NULL;
				GFile* _tmp43_ = NULL;
				GFileInfo* _tmp44_ = NULL;
				GFileInfo* _tmp45_ = NULL;
				GeeArrayList* _tmp50_ = NULL;
				BatchImportResult* _tmp51_ = NULL;
				GFile* _tmp52_ = NULL;
				GFileInfo* _tmp53_ = NULL;
				gint64 _tmp54_ = 0LL;
				TombstonedFile* _tmp55_ = NULL;
				TombstonedFile* _tmp56_ = NULL;
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp36_ = _result_index;
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_result_index = _tmp36_ + 1;
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp37_ = _result_index;
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp38_ = _result_size;
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				if (!(_tmp37_ < _tmp38_)) {
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					break;
#line 5302 "LibraryMonitor.c"
				}
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp39_ = _result_list;
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp40_ = _result_index;
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp41_ = gee_list_get (_tmp39_, _tmp40_);
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_result_ = (BatchImportResult*) _tmp41_;
#line 689 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp42_ = _result_;
#line 689 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp43_ = _tmp42_->file;
#line 689 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp44_ = directory_monitor_get_file_info (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor), _tmp43_);
#line 689 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				info = _tmp44_;
#line 690 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp45_ = info;
#line 690 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				if (_tmp45_ == NULL) {
#line 5324 "LibraryMonitor.c"
					BatchImportResult* _tmp46_ = NULL;
					GFile* _tmp47_ = NULL;
					gchar* _tmp48_ = NULL;
					gchar* _tmp49_ = NULL;
#line 691 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp46_ = _result_;
#line 691 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp47_ = _tmp46_->file;
#line 691 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp48_ = g_file_get_path (_tmp47_);
#line 691 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp49_ = _tmp48_;
#line 691 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					g_warning ("LibraryMonitor.vala:691: Unable to get info for duplicate file %s", _tmp49_);
#line 691 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_g_free0 (_tmp49_);
#line 693 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_g_object_unref0 (info);
#line 693 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_batch_import_result_unref0 (_result_);
#line 693 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					continue;
#line 5347 "LibraryMonitor.c"
				}
#line 696 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp50_ = to_tombstone;
#line 696 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp51_ = _result_;
#line 696 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp52_ = _tmp51_->file;
#line 696 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp53_ = info;
#line 696 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp54_ = g_file_info_get_size (_tmp53_);
#line 696 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp55_ = tombstoned_file_new (_tmp52_, _tmp54_, NULL);
#line 696 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp56_ = _tmp55_;
#line 696 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp56_);
#line 696 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tombstoned_file_unref0 (_tmp56_);
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (info);
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_batch_import_result_unref0 (_result_);
#line 5371 "LibraryMonitor.c"
			}
#line 688 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (_result_list);
#line 5375 "LibraryMonitor.c"
		}
		{
			GeeArrayList* _tmp57_ = NULL;
#line 700 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp57_ = to_tombstone;
#line 700 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			tombstone_entomb_many_files (G_TYPE_CHECK_INSTANCE_CAST (_tmp57_, GEE_TYPE_COLLECTION, GeeCollection), TOMBSTONE_REASON_AUTO_DETECTED_DUPLICATE, &_inner_error_);
#line 700 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 700 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				if (_inner_error_->domain == DATABASE_ERROR) {
#line 5387 "LibraryMonitor.c"
					goto __catch488_database_error;
				}
#line 700 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (to_tombstone);
#line 700 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 700 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				g_clear_error (&_inner_error_);
#line 700 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				return;
#line 5398 "LibraryMonitor.c"
			}
		}
		goto __finally488;
		__catch488_database_error:
		{
			GError* err = NULL;
			GError* _tmp58_ = NULL;
#line 699 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			err = _inner_error_;
#line 699 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_inner_error_ = NULL;
#line 702 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp58_ = err;
#line 702 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			app_window_database_error (_tmp58_);
#line 699 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_error_free0 (err);
#line 5416 "LibraryMonitor.c"
		}
		__finally488:
#line 699 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 699 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (to_tombstone);
#line 699 "/home/jens/Source/shotwell/src/LibraryMonitor.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 699 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			g_clear_error (&_inner_error_);
#line 699 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			return;
#line 5429 "LibraryMonitor.c"
		}
#line 686 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (to_tombstone);
#line 5433 "LibraryMonitor.c"
	}
#line 706 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp59_ = self->priv->pending_imports;
#line 706 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp60_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp59_, GEE_TYPE_COLLECTION, GeeCollection));
#line 706 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp61_ = _tmp60_;
#line 706 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp62_ = g_strdup_printf ("%d files remain pending for auto-import", _tmp61_);
#line 706 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp63_ = _tmp62_;
#line 706 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	directory_monitor_mdbg (_tmp63_);
#line 706 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_free0 (_tmp63_);
#line 708 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_discard_current_batch_import (self);
#line 709 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_schedule_next_batch_import (self);
#line 5453 "LibraryMonitor.c"
}


void library_monitor_blacklist_file (GFile* file, const gchar* reason) {
	const gchar* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	GError * _inner_error_ = NULL;
#line 725 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_IS_FILE (file));
#line 725 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (reason != NULL);
#line 726 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = reason;
#line 726 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = file;
#line 726 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = g_file_get_path (_tmp1_);
#line 726 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp3_ = _tmp2_;
#line 726 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp4_ = g_strdup_printf ("[%s] Blacklisting %s", _tmp0_, _tmp3_);
#line 726 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp5_ = _tmp4_;
#line 726 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	directory_monitor_mdbg (_tmp5_);
#line 726 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_free0 (_tmp5_);
#line 726 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_free0 (_tmp3_);
#line 5487 "LibraryMonitor.c"
	{
		GeeHashSet* _tmp6_ = NULL;
#line 727 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp6_ = library_monitor_blacklist;
#line 727 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_rec_mutex_lock (&__lock_library_monitor_blacklist);
#line 5494 "LibraryMonitor.c"
		{
			GeeHashSet* _tmp7_ = NULL;
			GFile* _tmp8_ = NULL;
#line 728 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp7_ = library_monitor_blacklist;
#line 728 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp8_ = file;
#line 728 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp8_);
#line 5504 "LibraryMonitor.c"
		}
		__finally489:
		{
			GeeHashSet* _tmp9_ = NULL;
#line 727 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp9_ = library_monitor_blacklist;
#line 727 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			g_rec_mutex_unlock (&__lock_library_monitor_blacklist);
#line 5513 "LibraryMonitor.c"
		}
#line 727 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 727 "/home/jens/Source/shotwell/src/LibraryMonitor.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 727 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			g_clear_error (&_inner_error_);
#line 727 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			return;
#line 5523 "LibraryMonitor.c"
		}
	}
}


void library_monitor_unblacklist_file (GFile* file) {
	GError * _inner_error_ = NULL;
#line 732 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_IS_FILE (file));
#line 5533 "LibraryMonitor.c"
	{
		GeeHashSet* _tmp0_ = NULL;
#line 735 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = library_monitor_blacklist;
#line 735 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_rec_mutex_lock (&__lock_library_monitor_blacklist);
#line 5540 "LibraryMonitor.c"
		{
			gboolean _tmp1_ = FALSE;
			GeeHashSet* _tmp2_ = NULL;
			GFile* _tmp3_ = NULL;
			gboolean _tmp4_ = FALSE;
#line 736 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp2_ = library_monitor_blacklist;
#line 736 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp3_ = file;
#line 736 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp4_ = gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp3_);
#line 736 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp4_) {
#line 5554 "LibraryMonitor.c"
				HashTimedQueue* _tmp5_ = NULL;
				GFile* _tmp6_ = NULL;
				gboolean _tmp7_ = FALSE;
#line 736 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp5_ = library_monitor_to_unblacklist;
#line 736 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp6_ = file;
#line 736 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp7_ = timed_queue_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_TIMED_QUEUE, TimedQueue), _tmp6_);
#line 736 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp1_ = !_tmp7_;
#line 5566 "LibraryMonitor.c"
			} else {
#line 736 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp1_ = FALSE;
#line 5570 "LibraryMonitor.c"
			}
#line 736 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp1_) {
#line 5574 "LibraryMonitor.c"
				HashTimedQueue* _tmp8_ = NULL;
				GFile* _tmp9_ = NULL;
#line 737 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp8_ = library_monitor_to_unblacklist;
#line 737 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp9_ = file;
#line 737 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				timed_queue_enqueue (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_TIMED_QUEUE, TimedQueue), _tmp9_);
#line 5583 "LibraryMonitor.c"
			}
		}
		__finally490:
		{
			GeeHashSet* _tmp10_ = NULL;
#line 735 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp10_ = library_monitor_blacklist;
#line 735 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			g_rec_mutex_unlock (&__lock_library_monitor_blacklist);
#line 5593 "LibraryMonitor.c"
		}
#line 735 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 735 "/home/jens/Source/shotwell/src/LibraryMonitor.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 735 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			g_clear_error (&_inner_error_);
#line 735 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			return;
#line 5603 "LibraryMonitor.c"
		}
	}
}


static void library_monitor_on_unblacklist_file (GFile* file) {
	gboolean removed = FALSE;
	GError * _inner_error_ = NULL;
#line 741 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_IS_FILE (file));
#line 5614 "LibraryMonitor.c"
	{
		GeeHashSet* _tmp0_ = NULL;
#line 743 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = library_monitor_blacklist;
#line 743 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_rec_mutex_lock (&__lock_library_monitor_blacklist);
#line 5621 "LibraryMonitor.c"
		{
			GeeHashSet* _tmp1_ = NULL;
			GFile* _tmp2_ = NULL;
			gboolean _tmp3_ = FALSE;
#line 744 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp1_ = library_monitor_blacklist;
#line 744 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp2_ = file;
#line 744 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp3_ = gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp2_);
#line 744 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			removed = _tmp3_;
#line 5634 "LibraryMonitor.c"
		}
		__finally491:
		{
			GeeHashSet* _tmp4_ = NULL;
#line 743 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp4_ = library_monitor_blacklist;
#line 743 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			g_rec_mutex_unlock (&__lock_library_monitor_blacklist);
#line 5643 "LibraryMonitor.c"
		}
#line 743 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 743 "/home/jens/Source/shotwell/src/LibraryMonitor.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 743 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			g_clear_error (&_inner_error_);
#line 743 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			return;
#line 5653 "LibraryMonitor.c"
		}
	}
#line 747 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (removed) {
#line 5658 "LibraryMonitor.c"
		GFile* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
#line 748 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp5_ = file;
#line 748 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp6_ = g_file_get_path (_tmp5_);
#line 748 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp7_ = _tmp6_;
#line 748 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp8_ = g_strdup_printf ("Blacklist for %s removed", _tmp7_);
#line 748 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp9_ = _tmp8_;
#line 748 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		directory_monitor_mdbg (_tmp9_);
#line 748 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_free0 (_tmp9_);
#line 748 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_free0 (_tmp7_);
#line 5680 "LibraryMonitor.c"
	} else {
		GFile* _tmp10_ = NULL;
		gchar* _tmp11_ = NULL;
		gchar* _tmp12_ = NULL;
#line 750 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp10_ = file;
#line 750 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp11_ = g_file_get_path (_tmp10_);
#line 750 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp12_ = _tmp11_;
#line 750 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_warning ("LibraryMonitor.vala:750: File %s was not blacklisted but unblacklisted", _tmp12_);
#line 750 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_free0 (_tmp12_);
#line 5695 "LibraryMonitor.c"
	}
}


gboolean library_monitor_is_blacklisted (GFile* file) {
	gboolean result = FALSE;
	GError * _inner_error_ = NULL;
#line 753 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (G_IS_FILE (file), FALSE);
#line 5705 "LibraryMonitor.c"
	{
		GeeHashSet* _tmp0_ = NULL;
#line 754 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = library_monitor_blacklist;
#line 754 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_rec_mutex_lock (&__lock_library_monitor_blacklist);
#line 5712 "LibraryMonitor.c"
		{
			GeeHashSet* _tmp1_ = NULL;
			GFile* _tmp2_ = NULL;
			gboolean _tmp3_ = FALSE;
#line 755 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp1_ = library_monitor_blacklist;
#line 755 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp2_ = file;
#line 755 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp3_ = gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp2_);
#line 755 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			result = _tmp3_;
#line 5725 "LibraryMonitor.c"
			{
				GeeHashSet* _tmp4_ = NULL;
#line 754 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp4_ = library_monitor_blacklist;
#line 754 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				g_rec_mutex_unlock (&__lock_library_monitor_blacklist);
#line 5732 "LibraryMonitor.c"
			}
#line 755 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			return result;
#line 5736 "LibraryMonitor.c"
		}
		__finally492:
		{
			GeeHashSet* _tmp5_ = NULL;
#line 754 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp5_ = library_monitor_blacklist;
#line 754 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			g_rec_mutex_unlock (&__lock_library_monitor_blacklist);
#line 5745 "LibraryMonitor.c"
		}
#line 754 "/home/jens/Source/shotwell/src/LibraryMonitor.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 754 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_clear_error (&_inner_error_);
#line 754 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return FALSE;
#line 5753 "LibraryMonitor.c"
	}
}


static gboolean library_monitor_is_supported_filetype (LibraryMonitor* self, GFile* file) {
	gboolean result = FALSE;
	MediaCollectionRegistry* _tmp0_ = NULL;
	MediaCollectionRegistry* _tmp1_ = NULL;
	GFile* _tmp2_ = NULL;
	MediaSourceCollection* _tmp3_ = NULL;
	MediaSourceCollection* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
#line 759 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (IS_LIBRARY_MONITOR (self), FALSE);
#line 759 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (G_IS_FILE (file), FALSE);
#line 760 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = media_collection_registry_get_instance ();
#line 760 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = _tmp0_;
#line 760 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = file;
#line 760 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp3_ = media_collection_registry_get_collection_for_file (_tmp1_, _tmp2_);
#line 760 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp4_ = _tmp3_;
#line 760 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp5_ = _tmp4_ != NULL;
#line 760 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_data_collection_unref0 (_tmp4_);
#line 760 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_media_collection_registry_unref0 (_tmp1_);
#line 760 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	result = _tmp5_;
#line 760 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return result;
#line 5790 "LibraryMonitor.c"
}


static void library_monitor_import_unrepresented_files (LibraryMonitor* self) {
	gboolean _tmp0_ = FALSE;
	GeeArrayList* to_import = NULL;
	GeeArrayList* _tmp42_ = NULL;
#line 765 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (self));
#line 766 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = self->priv->auto_import;
#line 766 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (!_tmp0_) {
#line 767 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return;
#line 5806 "LibraryMonitor.c"
	}
#line 769 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	to_import = NULL;
#line 5810 "LibraryMonitor.c"
	{
		GeeIterator* _file_it = NULL;
		GeeCollection* _tmp1_ = NULL;
		GeeCollection* _tmp2_ = NULL;
		GeeIterator* _tmp3_ = NULL;
		GeeIterator* _tmp4_ = NULL;
#line 770 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp1_ = directory_monitor_get_files (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor));
#line 770 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp2_ = _tmp1_;
#line 770 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp3_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ITERABLE, GeeIterable));
#line 770 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = _tmp3_;
#line 770 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_tmp2_);
#line 770 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_file_it = _tmp4_;
#line 770 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		while (TRUE) {
#line 5831 "LibraryMonitor.c"
			GeeIterator* _tmp5_ = NULL;
			gboolean _tmp6_ = FALSE;
			GFile* file = NULL;
			GeeIterator* _tmp7_ = NULL;
			gpointer _tmp8_ = NULL;
			GFileInfo* info = NULL;
			GFile* _tmp9_ = NULL;
			GFileInfo* _tmp10_ = NULL;
			gboolean _tmp11_ = FALSE;
			GFileInfo* _tmp12_ = NULL;
			GeeHashSet* _tmp15_ = NULL;
			GFile* _tmp16_ = NULL;
			gboolean _tmp17_ = FALSE;
			TombstoneSourceCollection* _tmp18_ = NULL;
			GFile* _tmp19_ = NULL;
			gboolean _tmp20_ = FALSE;
			gboolean represented = FALSE;
			gboolean _tmp35_ = FALSE;
			GFile* _tmp36_ = NULL;
			gboolean _tmp37_ = FALSE;
			GeeArrayList* _tmp38_ = NULL;
			GeeArrayList* _tmp40_ = NULL;
			GFile* _tmp41_ = NULL;
#line 770 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp5_ = _file_it;
#line 770 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp6_ = gee_iterator_next (_tmp5_);
#line 770 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (!_tmp6_) {
#line 770 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 5863 "LibraryMonitor.c"
			}
#line 770 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp7_ = _file_it;
#line 770 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp8_ = gee_iterator_get (_tmp7_);
#line 770 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			file = (GFile*) _tmp8_;
#line 771 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp9_ = file;
#line 771 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp10_ = directory_monitor_get_file_info (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor), _tmp9_);
#line 771 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			info = _tmp10_;
#line 772 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp12_ = info;
#line 772 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp12_ == NULL) {
#line 772 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp11_ = TRUE;
#line 5883 "LibraryMonitor.c"
			} else {
				GFileInfo* _tmp13_ = NULL;
				GFileType _tmp14_ = 0;
#line 772 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp13_ = info;
#line 772 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp14_ = g_file_info_get_file_type (_tmp13_);
#line 772 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp11_ = _tmp14_ != G_FILE_TYPE_REGULAR;
#line 5893 "LibraryMonitor.c"
			}
#line 772 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp11_) {
#line 773 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (info);
#line 773 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (file);
#line 773 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				continue;
#line 5903 "LibraryMonitor.c"
			}
#line 775 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp15_ = self->priv->pending_imports;
#line 775 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp16_ = file;
#line 775 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp17_ = gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp16_);
#line 775 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp17_) {
#line 776 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (info);
#line 776 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (file);
#line 776 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				continue;
#line 5919 "LibraryMonitor.c"
			}
#line 778 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp18_ = tombstone_global;
#line 778 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp19_ = file;
#line 778 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp20_ = tombstone_source_collection_matches (_tmp18_, _tmp19_);
#line 778 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp20_) {
#line 779 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (info);
#line 779 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (file);
#line 779 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				continue;
#line 5935 "LibraryMonitor.c"
			}
#line 781 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			represented = FALSE;
#line 5939 "LibraryMonitor.c"
			{
				GeeList* _monitor_list = NULL;
				GeeList* _tmp21_ = NULL;
				GeeList* _tmp22_ = NULL;
				gint _monitor_size = 0;
				GeeList* _tmp23_ = NULL;
				gint _tmp24_ = 0;
				gint _tmp25_ = 0;
				gint _monitor_index = 0;
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp21_ = self->priv->monitors;
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp22_ = _g_object_ref0 (_tmp21_);
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_monitor_list = _tmp22_;
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp23_ = _monitor_list;
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp24_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, GEE_TYPE_COLLECTION, GeeCollection));
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp25_ = _tmp24_;
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_monitor_size = _tmp25_;
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_monitor_index = -1;
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				while (TRUE) {
#line 5967 "LibraryMonitor.c"
					gint _tmp26_ = 0;
					gint _tmp27_ = 0;
					gint _tmp28_ = 0;
					MediaMonitor* monitor = NULL;
					GeeList* _tmp29_ = NULL;
					gint _tmp30_ = 0;
					gpointer _tmp31_ = NULL;
					MediaMonitor* _tmp32_ = NULL;
					GFile* _tmp33_ = NULL;
					gboolean _tmp34_ = FALSE;
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp26_ = _monitor_index;
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_monitor_index = _tmp26_ + 1;
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp27_ = _monitor_index;
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp28_ = _monitor_size;
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					if (!(_tmp27_ < _tmp28_)) {
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						break;
#line 5990 "LibraryMonitor.c"
					}
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp29_ = _monitor_list;
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp30_ = _monitor_index;
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp31_ = gee_list_get (_tmp29_, _tmp30_);
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					monitor = (MediaMonitor*) _tmp31_;
#line 783 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp32_ = monitor;
#line 783 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp33_ = file;
#line 783 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp34_ = media_monitor_is_file_represented (_tmp32_, _tmp33_);
#line 783 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					if (_tmp34_) {
#line 784 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						represented = TRUE;
#line 786 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_g_object_unref0 (monitor);
#line 786 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						break;
#line 6014 "LibraryMonitor.c"
					}
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_g_object_unref0 (monitor);
#line 6018 "LibraryMonitor.c"
				}
#line 782 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (_monitor_list);
#line 6022 "LibraryMonitor.c"
			}
#line 790 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp35_ = represented;
#line 790 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp35_) {
#line 791 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (info);
#line 791 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (file);
#line 791 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				continue;
#line 6034 "LibraryMonitor.c"
			}
#line 793 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp36_ = file;
#line 793 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp37_ = library_monitor_is_supported_filetype (self, _tmp36_);
#line 793 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (!_tmp37_) {
#line 794 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (info);
#line 794 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (file);
#line 794 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				continue;
#line 6048 "LibraryMonitor.c"
			}
#line 796 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp38_ = to_import;
#line 796 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp38_ == NULL) {
#line 6054 "LibraryMonitor.c"
				GeeArrayList* _tmp39_ = NULL;
#line 797 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp39_ = gee_array_list_new (G_TYPE_FILE, (GBoxedCopyFunc) g_object_ref, g_object_unref, _file_equal_gee_equal_data_func, NULL, NULL);
#line 797 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (to_import);
#line 797 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				to_import = _tmp39_;
#line 6062 "LibraryMonitor.c"
			}
#line 799 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp40_ = to_import;
#line 799 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp41_ = file;
#line 799 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp41_);
#line 770 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (info);
#line 770 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (file);
#line 6074 "LibraryMonitor.c"
		}
#line 770 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_file_it);
#line 6078 "LibraryMonitor.c"
	}
#line 802 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp42_ = to_import;
#line 802 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp42_ != NULL) {
#line 6084 "LibraryMonitor.c"
		GeeArrayList* _tmp43_ = NULL;
#line 803 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp43_ = to_import;
#line 803 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_enqueue_import_many (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, GEE_TYPE_COLLECTION, GeeCollection));
#line 6090 "LibraryMonitor.c"
	}
#line 765 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (to_import);
#line 6094 "LibraryMonitor.c"
}


static void library_monitor_runtime_unknown_file_discovered (LibraryMonitor* self, GFile* file) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
#line 808 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (self));
#line 808 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_IS_FILE (file));
#line 809 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = self->priv->auto_import;
#line 809 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp2_) {
#line 6110 "LibraryMonitor.c"
		GFile* _tmp3_ = NULL;
		gboolean _tmp4_ = FALSE;
#line 809 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp3_ = file;
#line 809 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = library_monitor_is_supported_filetype (self, _tmp3_);
#line 809 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp1_ = _tmp4_;
#line 6119 "LibraryMonitor.c"
	} else {
#line 809 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp1_ = FALSE;
#line 6123 "LibraryMonitor.c"
	}
#line 809 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp1_) {
#line 6127 "LibraryMonitor.c"
		TombstoneSourceCollection* _tmp5_ = NULL;
		GFile* _tmp6_ = NULL;
		gboolean _tmp7_ = FALSE;
#line 809 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp5_ = tombstone_global;
#line 809 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp6_ = file;
#line 809 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp7_ = tombstone_source_collection_matches (_tmp5_, _tmp6_);
#line 809 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = !_tmp7_;
#line 6139 "LibraryMonitor.c"
	} else {
#line 809 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = FALSE;
#line 6143 "LibraryMonitor.c"
	}
#line 809 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp0_) {
#line 6147 "LibraryMonitor.c"
		GFile* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		gchar* _tmp10_ = NULL;
		gchar* _tmp11_ = NULL;
		gchar* _tmp12_ = NULL;
		GFile* _tmp13_ = NULL;
#line 810 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp8_ = file;
#line 810 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp9_ = g_file_get_path (_tmp8_);
#line 810 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp10_ = _tmp9_;
#line 810 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp11_ = g_strdup_printf ("Unknown file %s discovered, enqueuing for import", _tmp10_);
#line 810 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp12_ = _tmp11_;
#line 810 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		directory_monitor_mdbg (_tmp12_);
#line 810 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_free0 (_tmp12_);
#line 810 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_free0 (_tmp10_);
#line 811 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp13_ = file;
#line 811 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_enqueue_import (self, _tmp13_);
#line 6174 "LibraryMonitor.c"
	}
}


static void library_monitor_real_notify_file_created (DirectoryMonitor* base, GFile* file, GFileInfo* info) {
	LibraryMonitor * self;
	GFile* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean known = FALSE;
	gboolean _tmp19_ = FALSE;
	gboolean _tmp98_ = FALSE;
	GFile* _tmp100_ = NULL;
	GFileInfo* _tmp101_ = NULL;
#line 815 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_MONITOR, LibraryMonitor);
#line 815 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_IS_FILE (file));
#line 815 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_IS_FILE_INFO (info));
#line 816 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = file;
#line 816 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = library_monitor_is_blacklisted (_tmp0_);
#line 816 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp1_) {
#line 6200 "LibraryMonitor.c"
		GFile* _tmp2_ = NULL;
		GFileInfo* _tmp3_ = NULL;
#line 817 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp2_ = file;
#line 817 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp3_ = info;
#line 817 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		DIRECTORY_MONITOR_CLASS (library_monitor_parent_class)->notify_file_created (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor), _tmp2_, _tmp3_);
#line 819 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return;
#line 6211 "LibraryMonitor.c"
	}
#line 822 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	known = FALSE;
#line 6215 "LibraryMonitor.c"
	{
		GeeList* _monitor_list = NULL;
		GeeList* _tmp4_ = NULL;
		GeeList* _tmp5_ = NULL;
		gint _monitor_size = 0;
		GeeList* _tmp6_ = NULL;
		gint _tmp7_ = 0;
		gint _tmp8_ = 0;
		gint _monitor_index = 0;
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = self->priv->monitors;
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp5_ = _g_object_ref0 (_tmp4_);
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_list = _tmp5_;
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp6_ = _monitor_list;
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp7_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection));
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp8_ = _tmp7_;
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_size = _tmp8_;
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_index = -1;
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		while (TRUE) {
#line 6243 "LibraryMonitor.c"
			gint _tmp9_ = 0;
			gint _tmp10_ = 0;
			gint _tmp11_ = 0;
			MediaMonitor* monitor = NULL;
			GeeList* _tmp12_ = NULL;
			gint _tmp13_ = 0;
			gpointer _tmp14_ = NULL;
			MediaMonitor* _tmp15_ = NULL;
			GFile* _tmp16_ = NULL;
			GFileInfo* _tmp17_ = NULL;
			gboolean _tmp18_ = FALSE;
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp9_ = _monitor_index;
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_monitor_index = _tmp9_ + 1;
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp10_ = _monitor_index;
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp11_ = _monitor_size;
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (!(_tmp10_ < _tmp11_)) {
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 6267 "LibraryMonitor.c"
			}
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp12_ = _monitor_list;
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp13_ = _monitor_index;
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp14_ = gee_list_get (_tmp12_, _tmp13_);
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			monitor = (MediaMonitor*) _tmp14_;
#line 824 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp15_ = monitor;
#line 824 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp16_ = file;
#line 824 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp17_ = info;
#line 824 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp18_ = media_monitor_notify_file_created (_tmp15_, _tmp16_, _tmp17_);
#line 824 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp18_) {
#line 825 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				known = TRUE;
#line 827 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (monitor);
#line 827 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 6293 "LibraryMonitor.c"
			}
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (monitor);
#line 6297 "LibraryMonitor.c"
		}
#line 823 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_monitor_list);
#line 6301 "LibraryMonitor.c"
	}
#line 831 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp19_ = known;
#line 831 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (!_tmp19_) {
#line 6307 "LibraryMonitor.c"
		GeeHashSet* all_candidates = NULL;
		gboolean _tmp78_ = FALSE;
		gboolean _tmp79_ = FALSE;
		gboolean _tmp80_ = FALSE;
#line 833 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		all_candidates = NULL;
#line 6314 "LibraryMonitor.c"
		{
			GeeList* _monitor_list = NULL;
			GeeList* _tmp20_ = NULL;
			GeeList* _tmp21_ = NULL;
			gint _monitor_size = 0;
			GeeList* _tmp22_ = NULL;
			gint _tmp23_ = 0;
			gint _tmp24_ = 0;
			gint _monitor_index = 0;
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp20_ = self->priv->monitors;
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp21_ = _g_object_ref0 (_tmp20_);
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_monitor_list = _tmp21_;
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp22_ = _monitor_list;
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp23_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, GEE_TYPE_COLLECTION, GeeCollection));
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp24_ = _tmp23_;
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_monitor_size = _tmp24_;
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_monitor_index = -1;
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			while (TRUE) {
#line 6342 "LibraryMonitor.c"
				gint _tmp25_ = 0;
				gint _tmp26_ = 0;
				gint _tmp27_ = 0;
				MediaMonitor* monitor = NULL;
				GeeList* _tmp28_ = NULL;
				gint _tmp29_ = 0;
				gpointer _tmp30_ = NULL;
				MediaMonitorDiscoveredFile _result_ = 0;
				GeeCollection* candidates = NULL;
				MediaMonitor* _tmp31_ = NULL;
				GFile* _tmp32_ = NULL;
				GFileInfo* _tmp33_ = NULL;
				MediaMonitorDiscoveredFile _tmp34_ = 0;
				GeeCollection* _tmp35_ = NULL;
				gboolean _tmp36_ = FALSE;
				MediaMonitorDiscoveredFile _tmp37_ = 0;
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp25_ = _monitor_index;
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_monitor_index = _tmp25_ + 1;
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp26_ = _monitor_index;
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp27_ = _monitor_size;
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				if (!(_tmp26_ < _tmp27_)) {
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					break;
#line 6371 "LibraryMonitor.c"
				}
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp28_ = _monitor_list;
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp29_ = _monitor_index;
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp30_ = gee_list_get (_tmp28_, _tmp29_);
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				monitor = (MediaMonitor*) _tmp30_;
#line 836 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp31_ = monitor;
#line 836 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp32_ = file;
#line 836 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp33_ = info;
#line 836 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp35_ = media_monitor_candidates_for_unknown_file (_tmp31_, _tmp32_, _tmp33_, &_tmp34_);
#line 836 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_result_ = _tmp34_;
#line 836 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				candidates = _tmp35_;
#line 838 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp37_ = _result_;
#line 838 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				if (_tmp37_ == MEDIA_MONITOR_DISCOVERED_FILE_REPRESENTED) {
#line 838 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp36_ = TRUE;
#line 6399 "LibraryMonitor.c"
				} else {
					MediaMonitorDiscoveredFile _tmp38_ = 0;
#line 839 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp38_ = _result_;
#line 839 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp36_ = _tmp38_ == MEDIA_MONITOR_DISCOVERED_FILE_IGNORE;
#line 6406 "LibraryMonitor.c"
				}
#line 838 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				if (_tmp36_) {
#line 6410 "LibraryMonitor.c"
					MediaMonitor* _tmp39_ = NULL;
					gchar* _tmp40_ = NULL;
					gchar* _tmp41_ = NULL;
					MediaMonitorDiscoveredFile _tmp42_ = 0;
					GEnumValue* _tmp43_;
					GFile* _tmp44_ = NULL;
					gchar* _tmp45_ = NULL;
					gchar* _tmp46_ = NULL;
					gchar* _tmp47_ = NULL;
					gchar* _tmp48_ = NULL;
#line 840 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp39_ = monitor;
#line 840 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp40_ = media_monitor_to_string (_tmp39_);
#line 840 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp41_ = _tmp40_;
#line 840 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp42_ = _result_;
#line 840 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp43_ = g_enum_get_value (g_type_class_ref (MEDIA_MONITOR_TYPE_DISCOVERED_FILE), _tmp42_);
#line 840 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp44_ = file;
#line 840 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp45_ = g_file_get_path (_tmp44_);
#line 840 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp46_ = _tmp45_;
#line 840 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp47_ = g_strdup_printf ("%s %s created file %s", _tmp41_, (_tmp43_ != NULL) ? _tmp43_->value_name : NULL, _tmp46_);
#line 840 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp48_ = _tmp47_;
#line 840 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					directory_monitor_mdbg (_tmp48_);
#line 840 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_g_free0 (_tmp48_);
#line 840 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_g_free0 (_tmp46_);
#line 840 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_g_free0 (_tmp41_);
#line 843 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					known = TRUE;
#line 845 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_g_object_unref0 (candidates);
#line 845 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_g_object_unref0 (monitor);
#line 845 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					break;
#line 6457 "LibraryMonitor.c"
				} else {
					gboolean _tmp49_ = FALSE;
					GeeCollection* _tmp50_ = NULL;
#line 846 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp50_ = candidates;
#line 846 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					if (_tmp50_ != NULL) {
#line 6465 "LibraryMonitor.c"
						GeeCollection* _tmp51_ = NULL;
						gint _tmp52_ = 0;
						gint _tmp53_ = 0;
#line 846 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp51_ = candidates;
#line 846 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp52_ = gee_collection_get_size (_tmp51_);
#line 846 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp53_ = _tmp52_;
#line 846 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp49_ = _tmp53_ > 0;
#line 6477 "LibraryMonitor.c"
					} else {
#line 846 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp49_ = FALSE;
#line 6481 "LibraryMonitor.c"
					}
#line 846 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					if (_tmp49_) {
#line 6485 "LibraryMonitor.c"
						MediaMonitor* _tmp54_ = NULL;
						gchar* _tmp55_ = NULL;
						gchar* _tmp56_ = NULL;
						GeeCollection* _tmp57_ = NULL;
						gint _tmp58_ = 0;
						gint _tmp59_ = 0;
						GFile* _tmp60_ = NULL;
						gchar* _tmp61_ = NULL;
						gchar* _tmp62_ = NULL;
						gchar* _tmp63_ = NULL;
						gchar* _tmp64_ = NULL;
						GeeHashSet* _tmp65_ = NULL;
#line 847 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp54_ = monitor;
#line 847 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp55_ = media_monitor_to_string (_tmp54_);
#line 847 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp56_ = _tmp55_;
#line 847 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp57_ = candidates;
#line 847 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp58_ = gee_collection_get_size (_tmp57_);
#line 847 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp59_ = _tmp58_;
#line 847 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp60_ = file;
#line 847 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp61_ = g_file_get_path (_tmp60_);
#line 847 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp62_ = _tmp61_;
#line 847 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp63_ = g_strdup_printf ("%s suggests %d candidates for created file %s", _tmp56_, _tmp59_, _tmp62_);
#line 847 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp64_ = _tmp63_;
#line 847 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						directory_monitor_mdbg (_tmp64_);
#line 847 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_g_free0 (_tmp64_);
#line 847 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_g_free0 (_tmp62_);
#line 847 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_g_free0 (_tmp56_);
#line 850 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						_tmp65_ = all_candidates;
#line 850 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
						if (_tmp65_ == NULL) {
#line 6532 "LibraryMonitor.c"
							GeeHashSet* _tmp66_ = NULL;
#line 851 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_tmp66_ = gee_hash_set_new (TYPE_MONITORABLE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
#line 851 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_g_object_unref0 (all_candidates);
#line 851 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							all_candidates = _tmp66_;
#line 6540 "LibraryMonitor.c"
						}
						{
							GeeIterator* _candidate_it = NULL;
							GeeCollection* _tmp67_ = NULL;
							GeeIterator* _tmp68_ = NULL;
#line 853 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_tmp67_ = candidates;
#line 853 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_tmp68_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp67_, GEE_TYPE_ITERABLE, GeeIterable));
#line 853 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_candidate_it = _tmp68_;
#line 853 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							while (TRUE) {
#line 6554 "LibraryMonitor.c"
								GeeIterator* _tmp69_ = NULL;
								gboolean _tmp70_ = FALSE;
								Monitorable* candidate = NULL;
								GeeIterator* _tmp71_ = NULL;
								gpointer _tmp72_ = NULL;
								MediaMonitor* _tmp73_ = NULL;
								Monitorable* _tmp74_ = NULL;
								gboolean _tmp75_ = FALSE;
#line 853 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
								_tmp69_ = _candidate_it;
#line 853 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
								_tmp70_ = gee_iterator_next (_tmp69_);
#line 853 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
								if (!_tmp70_) {
#line 853 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
									break;
#line 6571 "LibraryMonitor.c"
								}
#line 853 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
								_tmp71_ = _candidate_it;
#line 853 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
								_tmp72_ = gee_iterator_get (_tmp71_);
#line 853 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
								candidate = (Monitorable*) _tmp72_;
#line 854 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
								_tmp73_ = monitor;
#line 854 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
								_tmp74_ = candidate;
#line 854 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
								_tmp75_ = media_monitor_is_offline (_tmp73_, _tmp74_);
#line 854 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
								if (_tmp75_) {
#line 6587 "LibraryMonitor.c"
									GeeHashSet* _tmp76_ = NULL;
									Monitorable* _tmp77_ = NULL;
#line 855 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
									_tmp76_ = all_candidates;
#line 855 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
									_tmp77_ = candidate;
#line 855 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
									gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp76_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp77_);
#line 6596 "LibraryMonitor.c"
								}
#line 853 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
								_g_object_unref0 (candidate);
#line 6600 "LibraryMonitor.c"
							}
#line 853 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
							_g_object_unref0 (_candidate_it);
#line 6604 "LibraryMonitor.c"
						}
					}
				}
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (candidates);
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (monitor);
#line 6612 "LibraryMonitor.c"
			}
#line 834 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (_monitor_list);
#line 6616 "LibraryMonitor.c"
		}
#line 860 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp80_ = known;
#line 860 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (!_tmp80_) {
#line 6622 "LibraryMonitor.c"
			GeeHashSet* _tmp81_ = NULL;
#line 860 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp81_ = all_candidates;
#line 860 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp79_ = _tmp81_ != NULL;
#line 6628 "LibraryMonitor.c"
		} else {
#line 860 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp79_ = FALSE;
#line 6632 "LibraryMonitor.c"
		}
#line 860 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (_tmp79_) {
#line 6636 "LibraryMonitor.c"
			GeeHashSet* _tmp82_ = NULL;
			gint _tmp83_ = 0;
			gint _tmp84_ = 0;
#line 860 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp82_ = all_candidates;
#line 860 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp83_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp82_, GEE_TYPE_COLLECTION, GeeCollection));
#line 860 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp84_ = _tmp83_;
#line 860 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp78_ = _tmp84_ > 0;
#line 6648 "LibraryMonitor.c"
		} else {
#line 860 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp78_ = FALSE;
#line 6652 "LibraryMonitor.c"
		}
#line 860 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (_tmp78_) {
#line 6656 "LibraryMonitor.c"
			GeeHashSet* _tmp85_ = NULL;
			gint _tmp86_ = 0;
			gint _tmp87_ = 0;
			GFile* _tmp88_ = NULL;
			gchar* _tmp89_ = NULL;
			gchar* _tmp90_ = NULL;
			gchar* _tmp91_ = NULL;
			gchar* _tmp92_ = NULL;
			Workers* _tmp93_ = NULL;
			GFile* _tmp94_ = NULL;
			GeeHashSet* _tmp95_ = NULL;
			LibraryMonitorRuntimeFindMoveJob* _tmp96_ = NULL;
			LibraryMonitorRuntimeFindMoveJob* _tmp97_ = NULL;
#line 861 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp85_ = all_candidates;
#line 861 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp86_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp85_, GEE_TYPE_COLLECTION, GeeCollection));
#line 861 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp87_ = _tmp86_;
#line 861 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp88_ = file;
#line 861 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp89_ = g_file_get_path (_tmp88_);
#line 861 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp90_ = _tmp89_;
#line 861 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp91_ = g_strdup_printf ("%d candidates for created file %s being checksummed", _tmp87_, _tmp90_);
#line 861 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp92_ = _tmp91_;
#line 861 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			directory_monitor_mdbg (_tmp92_);
#line 861 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_free0 (_tmp92_);
#line 861 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_free0 (_tmp90_);
#line 864 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp93_ = self->priv->workers;
#line 864 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp94_ = file;
#line 864 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp95_ = all_candidates;
#line 864 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp96_ = library_monitor_runtime_find_move_job_new (self, _tmp94_, G_TYPE_CHECK_INSTANCE_CAST (_tmp95_, GEE_TYPE_COLLECTION, GeeCollection));
#line 864 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp97_ = _tmp96_;
#line 864 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			workers_enqueue (_tmp93_, G_TYPE_CHECK_INSTANCE_CAST (_tmp97_, TYPE_BACKGROUND_JOB, BackgroundJob));
#line 864 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_background_job_unref0 (_tmp97_);
#line 866 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			known = TRUE;
#line 6708 "LibraryMonitor.c"
		}
#line 831 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (all_candidates);
#line 6712 "LibraryMonitor.c"
	}
#line 870 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp98_ = known;
#line 870 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (!_tmp98_) {
#line 6718 "LibraryMonitor.c"
		GFile* _tmp99_ = NULL;
#line 871 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp99_ = file;
#line 871 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_runtime_unknown_file_discovered (self, _tmp99_);
#line 6724 "LibraryMonitor.c"
	}
#line 873 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp100_ = file;
#line 873 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp101_ = info;
#line 873 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	DIRECTORY_MONITOR_CLASS (library_monitor_parent_class)->notify_file_created (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor), _tmp100_, _tmp101_);
#line 6732 "LibraryMonitor.c"
}


static void library_monitor_on_runtime_find_move_completed (LibraryMonitor* self, BackgroundJob* j) {
	LibraryMonitorRuntimeFindMoveJob* job = NULL;
	BackgroundJob* _tmp0_ = NULL;
	LibraryMonitorRuntimeFindMoveJob* _tmp1_ = NULL;
	LibraryMonitorRuntimeFindMoveJob* _tmp2_ = NULL;
	GError* _tmp3_ = NULL;
	LibraryMonitorRuntimeFindMoveJob* _tmp11_ = NULL;
	Monitorable* _tmp12_ = NULL;
#line 876 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_LIBRARY_MONITOR (self));
#line 876 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (IS_BACKGROUND_JOB (j));
#line 877 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = j;
#line 877 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = _background_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, LIBRARY_MONITOR_TYPE_RUNTIME_FIND_MOVE_JOB, LibraryMonitorRuntimeFindMoveJob));
#line 877 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	job = _tmp1_;
#line 879 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = job;
#line 879 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp3_ = _tmp2_->err;
#line 879 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp3_ != NULL) {
#line 6760 "LibraryMonitor.c"
		LibraryMonitorRuntimeFindMoveJob* _tmp4_ = NULL;
		GFile* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
		LibraryMonitorRuntimeFindMoveJob* _tmp8_ = NULL;
		GError* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
#line 880 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = job;
#line 880 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp5_ = _tmp4_->file;
#line 880 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp6_ = g_file_get_path (_tmp5_);
#line 880 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp7_ = _tmp6_;
#line 880 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp8_ = job;
#line 880 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp9_ = _tmp8_->err;
#line 880 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp10_ = _tmp9_->message;
#line 880 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_critical ("LibraryMonitor.vala:880: Error attempting to find a match at runtime f" \
"or %s: %s", _tmp7_, _tmp10_);
#line 880 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_free0 (_tmp7_);
#line 6786 "LibraryMonitor.c"
	}
#line 884 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp11_ = job;
#line 884 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp12_ = _tmp11_->match;
#line 884 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp12_ != NULL) {
#line 6794 "LibraryMonitor.c"
		MediaMonitor* monitor = NULL;
		LibraryMonitorRuntimeFindMoveJob* _tmp13_ = NULL;
		Monitorable* _tmp14_ = NULL;
		MediaMonitor* _tmp15_ = NULL;
		MediaMonitor* _tmp16_ = NULL;
		LibraryMonitorRuntimeFindMoveJob* _tmp17_ = NULL;
		Monitorable* _tmp18_ = NULL;
		LibraryMonitorRuntimeFindMoveJob* _tmp19_ = NULL;
		GFile* _tmp20_ = NULL;
		MediaMonitor* _tmp21_ = NULL;
		LibraryMonitorRuntimeFindMoveJob* _tmp22_ = NULL;
		Monitorable* _tmp23_ = NULL;
#line 885 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp13_ = job;
#line 885 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp14_ = _tmp13_->match;
#line 885 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp15_ = library_monitor_get_monitor_for_monitorable (self, _tmp14_);
#line 885 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		monitor = _tmp15_;
#line 886 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp16_ = monitor;
#line 886 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp17_ = job;
#line 886 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp18_ = _tmp17_->match;
#line 886 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp19_ = job;
#line 886 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp20_ = _tmp19_->file;
#line 886 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		media_monitor_update_master_file (_tmp16_, _tmp18_, _tmp20_);
#line 887 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp21_ = monitor;
#line 887 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp22_ = job;
#line 887 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp23_ = _tmp22_->match;
#line 887 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		media_monitor_update_online (_tmp21_, _tmp23_);
#line 884 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (monitor);
#line 6837 "LibraryMonitor.c"
	} else {
		LibraryMonitorRuntimeFindMoveJob* _tmp24_ = NULL;
		GFile* _tmp25_ = NULL;
#line 890 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp24_ = job;
#line 890 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp25_ = _tmp24_->file;
#line 890 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_runtime_unknown_file_discovered (self, _tmp25_);
#line 6847 "LibraryMonitor.c"
	}
#line 876 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_background_job_unref0 (job);
#line 6851 "LibraryMonitor.c"
}


static void library_monitor_real_notify_file_moved (DirectoryMonitor* base, GFile* old_file, GFile* new_file, GFileInfo* new_info) {
	LibraryMonitor * self;
	gboolean _tmp0_ = FALSE;
	GFile* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gboolean known = FALSE;
	gboolean _tmp24_ = FALSE;
	GFile* _tmp26_ = NULL;
	GFile* _tmp27_ = NULL;
	GFileInfo* _tmp28_ = NULL;
#line 894 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_MONITOR, LibraryMonitor);
#line 894 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_IS_FILE (old_file));
#line 894 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_IS_FILE (new_file));
#line 894 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_IS_FILE_INFO (new_info));
#line 895 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = old_file;
#line 895 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = library_monitor_is_blacklisted (_tmp1_);
#line 895 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp2_) {
#line 895 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = TRUE;
#line 6881 "LibraryMonitor.c"
	} else {
		GFile* _tmp3_ = NULL;
		gboolean _tmp4_ = FALSE;
#line 895 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp3_ = new_file;
#line 895 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = library_monitor_is_blacklisted (_tmp3_);
#line 895 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = _tmp4_;
#line 6891 "LibraryMonitor.c"
	}
#line 895 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp0_) {
#line 6895 "LibraryMonitor.c"
		GFile* _tmp5_ = NULL;
		GFile* _tmp6_ = NULL;
		GFileInfo* _tmp7_ = NULL;
#line 896 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp5_ = old_file;
#line 896 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp6_ = new_file;
#line 896 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp7_ = new_info;
#line 896 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		DIRECTORY_MONITOR_CLASS (library_monitor_parent_class)->notify_file_moved (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor), _tmp5_, _tmp6_, _tmp7_);
#line 898 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return;
#line 6909 "LibraryMonitor.c"
	}
#line 901 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	known = FALSE;
#line 6913 "LibraryMonitor.c"
	{
		GeeList* _monitor_list = NULL;
		GeeList* _tmp8_ = NULL;
		GeeList* _tmp9_ = NULL;
		gint _monitor_size = 0;
		GeeList* _tmp10_ = NULL;
		gint _tmp11_ = 0;
		gint _tmp12_ = 0;
		gint _monitor_index = 0;
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp8_ = self->priv->monitors;
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp9_ = _g_object_ref0 (_tmp8_);
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_list = _tmp9_;
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp10_ = _monitor_list;
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp11_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_COLLECTION, GeeCollection));
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp12_ = _tmp11_;
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_size = _tmp12_;
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_index = -1;
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		while (TRUE) {
#line 6941 "LibraryMonitor.c"
			gint _tmp13_ = 0;
			gint _tmp14_ = 0;
			gint _tmp15_ = 0;
			MediaMonitor* monitor = NULL;
			GeeList* _tmp16_ = NULL;
			gint _tmp17_ = 0;
			gpointer _tmp18_ = NULL;
			MediaMonitor* _tmp19_ = NULL;
			GFile* _tmp20_ = NULL;
			GFile* _tmp21_ = NULL;
			GFileInfo* _tmp22_ = NULL;
			gboolean _tmp23_ = FALSE;
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp13_ = _monitor_index;
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_monitor_index = _tmp13_ + 1;
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp14_ = _monitor_index;
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp15_ = _monitor_size;
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (!(_tmp14_ < _tmp15_)) {
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 6966 "LibraryMonitor.c"
			}
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp16_ = _monitor_list;
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp17_ = _monitor_index;
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp18_ = gee_list_get (_tmp16_, _tmp17_);
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			monitor = (MediaMonitor*) _tmp18_;
#line 903 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp19_ = monitor;
#line 903 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp20_ = old_file;
#line 903 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp21_ = new_file;
#line 903 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp22_ = new_info;
#line 903 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp23_ = media_monitor_notify_file_moved (_tmp19_, _tmp20_, _tmp21_, _tmp22_);
#line 903 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp23_) {
#line 904 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				known = TRUE;
#line 906 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (monitor);
#line 906 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 6994 "LibraryMonitor.c"
			}
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (monitor);
#line 6998 "LibraryMonitor.c"
		}
#line 902 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_monitor_list);
#line 7002 "LibraryMonitor.c"
	}
#line 910 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp24_ = known;
#line 910 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (!_tmp24_) {
#line 7008 "LibraryMonitor.c"
		GFile* _tmp25_ = NULL;
#line 911 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp25_ = new_file;
#line 911 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_runtime_unknown_file_discovered (self, _tmp25_);
#line 7014 "LibraryMonitor.c"
	}
#line 913 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp26_ = old_file;
#line 913 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp27_ = new_file;
#line 913 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp28_ = new_info;
#line 913 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	DIRECTORY_MONITOR_CLASS (library_monitor_parent_class)->notify_file_moved (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor), _tmp26_, _tmp27_, _tmp28_);
#line 7024 "LibraryMonitor.c"
}


static void library_monitor_real_notify_file_altered (DirectoryMonitor* base, GFile* file) {
	LibraryMonitor * self;
	GFile* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean known = FALSE;
	gboolean _tmp17_ = FALSE;
	GFile* _tmp19_ = NULL;
#line 916 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_MONITOR, LibraryMonitor);
#line 916 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_IS_FILE (file));
#line 917 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = file;
#line 917 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = library_monitor_is_blacklisted (_tmp0_);
#line 917 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp1_) {
#line 7045 "LibraryMonitor.c"
		GFile* _tmp2_ = NULL;
#line 918 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp2_ = file;
#line 918 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		DIRECTORY_MONITOR_CLASS (library_monitor_parent_class)->notify_file_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor), _tmp2_);
#line 920 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return;
#line 7053 "LibraryMonitor.c"
	}
#line 923 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	known = FALSE;
#line 7057 "LibraryMonitor.c"
	{
		GeeList* _monitor_list = NULL;
		GeeList* _tmp3_ = NULL;
		GeeList* _tmp4_ = NULL;
		gint _monitor_size = 0;
		GeeList* _tmp5_ = NULL;
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
		gint _monitor_index = 0;
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp3_ = self->priv->monitors;
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = _g_object_ref0 (_tmp3_);
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_list = _tmp4_;
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp5_ = _monitor_list;
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp6_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection));
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp7_ = _tmp6_;
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_size = _tmp7_;
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_index = -1;
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		while (TRUE) {
#line 7085 "LibraryMonitor.c"
			gint _tmp8_ = 0;
			gint _tmp9_ = 0;
			gint _tmp10_ = 0;
			MediaMonitor* monitor = NULL;
			GeeList* _tmp11_ = NULL;
			gint _tmp12_ = 0;
			gpointer _tmp13_ = NULL;
			MediaMonitor* _tmp14_ = NULL;
			GFile* _tmp15_ = NULL;
			gboolean _tmp16_ = FALSE;
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp8_ = _monitor_index;
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_monitor_index = _tmp8_ + 1;
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp9_ = _monitor_index;
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp10_ = _monitor_size;
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (!(_tmp9_ < _tmp10_)) {
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 7108 "LibraryMonitor.c"
			}
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp11_ = _monitor_list;
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp12_ = _monitor_index;
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp13_ = gee_list_get (_tmp11_, _tmp12_);
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			monitor = (MediaMonitor*) _tmp13_;
#line 925 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp14_ = monitor;
#line 925 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp15_ = file;
#line 925 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp16_ = media_monitor_notify_file_altered (_tmp14_, _tmp15_);
#line 925 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp16_) {
#line 926 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				known = TRUE;
#line 928 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (monitor);
#line 928 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 7132 "LibraryMonitor.c"
			}
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (monitor);
#line 7136 "LibraryMonitor.c"
		}
#line 924 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_monitor_list);
#line 7140 "LibraryMonitor.c"
	}
#line 932 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp17_ = known;
#line 932 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (!_tmp17_) {
#line 7146 "LibraryMonitor.c"
		GFile* _tmp18_ = NULL;
#line 933 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp18_ = file;
#line 933 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_runtime_unknown_file_discovered (self, _tmp18_);
#line 7152 "LibraryMonitor.c"
	}
#line 935 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp19_ = file;
#line 935 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	DIRECTORY_MONITOR_CLASS (library_monitor_parent_class)->notify_file_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor), _tmp19_);
#line 7158 "LibraryMonitor.c"
}


static void library_monitor_real_notify_file_attributes_altered (DirectoryMonitor* base, GFile* file) {
	LibraryMonitor * self;
	GFile* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean known = FALSE;
	gboolean _tmp17_ = FALSE;
	GFile* _tmp19_ = NULL;
#line 938 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_MONITOR, LibraryMonitor);
#line 938 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_IS_FILE (file));
#line 939 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = file;
#line 939 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = library_monitor_is_blacklisted (_tmp0_);
#line 939 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp1_) {
#line 7179 "LibraryMonitor.c"
		GFile* _tmp2_ = NULL;
#line 940 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp2_ = file;
#line 940 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		DIRECTORY_MONITOR_CLASS (library_monitor_parent_class)->notify_file_attributes_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor), _tmp2_);
#line 942 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return;
#line 7187 "LibraryMonitor.c"
	}
#line 945 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	known = FALSE;
#line 7191 "LibraryMonitor.c"
	{
		GeeList* _monitor_list = NULL;
		GeeList* _tmp3_ = NULL;
		GeeList* _tmp4_ = NULL;
		gint _monitor_size = 0;
		GeeList* _tmp5_ = NULL;
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
		gint _monitor_index = 0;
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp3_ = self->priv->monitors;
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = _g_object_ref0 (_tmp3_);
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_list = _tmp4_;
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp5_ = _monitor_list;
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp6_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection));
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp7_ = _tmp6_;
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_size = _tmp7_;
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_index = -1;
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		while (TRUE) {
#line 7219 "LibraryMonitor.c"
			gint _tmp8_ = 0;
			gint _tmp9_ = 0;
			gint _tmp10_ = 0;
			MediaMonitor* monitor = NULL;
			GeeList* _tmp11_ = NULL;
			gint _tmp12_ = 0;
			gpointer _tmp13_ = NULL;
			MediaMonitor* _tmp14_ = NULL;
			GFile* _tmp15_ = NULL;
			gboolean _tmp16_ = FALSE;
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp8_ = _monitor_index;
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_monitor_index = _tmp8_ + 1;
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp9_ = _monitor_index;
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp10_ = _monitor_size;
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (!(_tmp9_ < _tmp10_)) {
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 7242 "LibraryMonitor.c"
			}
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp11_ = _monitor_list;
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp12_ = _monitor_index;
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp13_ = gee_list_get (_tmp11_, _tmp12_);
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			monitor = (MediaMonitor*) _tmp13_;
#line 947 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp14_ = monitor;
#line 947 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp15_ = file;
#line 947 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp16_ = media_monitor_notify_file_attributes_altered (_tmp14_, _tmp15_);
#line 947 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp16_) {
#line 948 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				known = TRUE;
#line 950 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (monitor);
#line 950 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 7266 "LibraryMonitor.c"
			}
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (monitor);
#line 7270 "LibraryMonitor.c"
		}
#line 946 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_monitor_list);
#line 7274 "LibraryMonitor.c"
	}
#line 954 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp17_ = known;
#line 954 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (!_tmp17_) {
#line 7280 "LibraryMonitor.c"
		GFile* _tmp18_ = NULL;
#line 955 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp18_ = file;
#line 955 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_runtime_unknown_file_discovered (self, _tmp18_);
#line 7286 "LibraryMonitor.c"
	}
#line 957 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp19_ = file;
#line 957 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	DIRECTORY_MONITOR_CLASS (library_monitor_parent_class)->notify_file_attributes_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor), _tmp19_);
#line 7292 "LibraryMonitor.c"
}


static void library_monitor_real_notify_file_alteration_completed (DirectoryMonitor* base, GFile* file, GFileInfo* info) {
	LibraryMonitor * self;
	GFile* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean known = FALSE;
	gboolean _tmp19_ = FALSE;
	GFile* _tmp21_ = NULL;
	GFileInfo* _tmp22_ = NULL;
#line 960 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_MONITOR, LibraryMonitor);
#line 960 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_IS_FILE (file));
#line 960 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_IS_FILE_INFO (info));
#line 961 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = file;
#line 961 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = library_monitor_is_blacklisted (_tmp0_);
#line 961 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp1_) {
#line 7316 "LibraryMonitor.c"
		GFile* _tmp2_ = NULL;
		GFileInfo* _tmp3_ = NULL;
#line 962 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp2_ = file;
#line 962 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp3_ = info;
#line 962 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		DIRECTORY_MONITOR_CLASS (library_monitor_parent_class)->notify_file_alteration_completed (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor), _tmp2_, _tmp3_);
#line 964 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return;
#line 7327 "LibraryMonitor.c"
	}
#line 967 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	known = FALSE;
#line 7331 "LibraryMonitor.c"
	{
		GeeList* _monitor_list = NULL;
		GeeList* _tmp4_ = NULL;
		GeeList* _tmp5_ = NULL;
		gint _monitor_size = 0;
		GeeList* _tmp6_ = NULL;
		gint _tmp7_ = 0;
		gint _tmp8_ = 0;
		gint _monitor_index = 0;
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = self->priv->monitors;
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp5_ = _g_object_ref0 (_tmp4_);
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_list = _tmp5_;
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp6_ = _monitor_list;
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp7_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection));
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp8_ = _tmp7_;
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_size = _tmp8_;
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_index = -1;
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		while (TRUE) {
#line 7359 "LibraryMonitor.c"
			gint _tmp9_ = 0;
			gint _tmp10_ = 0;
			gint _tmp11_ = 0;
			MediaMonitor* monitor = NULL;
			GeeList* _tmp12_ = NULL;
			gint _tmp13_ = 0;
			gpointer _tmp14_ = NULL;
			MediaMonitor* _tmp15_ = NULL;
			GFile* _tmp16_ = NULL;
			GFileInfo* _tmp17_ = NULL;
			gboolean _tmp18_ = FALSE;
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp9_ = _monitor_index;
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_monitor_index = _tmp9_ + 1;
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp10_ = _monitor_index;
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp11_ = _monitor_size;
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (!(_tmp10_ < _tmp11_)) {
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 7383 "LibraryMonitor.c"
			}
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp12_ = _monitor_list;
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp13_ = _monitor_index;
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp14_ = gee_list_get (_tmp12_, _tmp13_);
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			monitor = (MediaMonitor*) _tmp14_;
#line 969 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp15_ = monitor;
#line 969 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp16_ = file;
#line 969 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp17_ = info;
#line 969 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp18_ = media_monitor_notify_file_alteration_completed (_tmp15_, _tmp16_, _tmp17_);
#line 969 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp18_) {
#line 970 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				known = TRUE;
#line 972 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (monitor);
#line 972 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 7409 "LibraryMonitor.c"
			}
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (monitor);
#line 7413 "LibraryMonitor.c"
		}
#line 968 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_monitor_list);
#line 7417 "LibraryMonitor.c"
	}
#line 976 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp19_ = known;
#line 976 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (!_tmp19_) {
#line 7423 "LibraryMonitor.c"
		GFile* _tmp20_ = NULL;
#line 977 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp20_ = file;
#line 977 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_runtime_unknown_file_discovered (self, _tmp20_);
#line 7429 "LibraryMonitor.c"
	}
#line 979 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp21_ = file;
#line 979 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp22_ = info;
#line 979 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	DIRECTORY_MONITOR_CLASS (library_monitor_parent_class)->notify_file_alteration_completed (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor), _tmp21_, _tmp22_);
#line 7437 "LibraryMonitor.c"
}


static void library_monitor_real_notify_file_deleted (DirectoryMonitor* base, GFile* file) {
	LibraryMonitor * self;
	GFile* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean known = FALSE;
	gboolean _tmp17_ = FALSE;
	GFile* _tmp28_ = NULL;
#line 982 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_MONITOR, LibraryMonitor);
#line 982 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_IS_FILE (file));
#line 983 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = file;
#line 983 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = library_monitor_is_blacklisted (_tmp0_);
#line 983 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp1_) {
#line 7458 "LibraryMonitor.c"
		GFile* _tmp2_ = NULL;
#line 984 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp2_ = file;
#line 984 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		DIRECTORY_MONITOR_CLASS (library_monitor_parent_class)->notify_file_deleted (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor), _tmp2_);
#line 986 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return;
#line 7466 "LibraryMonitor.c"
	}
#line 989 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	known = FALSE;
#line 7470 "LibraryMonitor.c"
	{
		GeeList* _monitor_list = NULL;
		GeeList* _tmp3_ = NULL;
		GeeList* _tmp4_ = NULL;
		gint _monitor_size = 0;
		GeeList* _tmp5_ = NULL;
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
		gint _monitor_index = 0;
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp3_ = self->priv->monitors;
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = _g_object_ref0 (_tmp3_);
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_list = _tmp4_;
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp5_ = _monitor_list;
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp6_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection));
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp7_ = _tmp6_;
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_size = _tmp7_;
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_monitor_index = -1;
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		while (TRUE) {
#line 7498 "LibraryMonitor.c"
			gint _tmp8_ = 0;
			gint _tmp9_ = 0;
			gint _tmp10_ = 0;
			MediaMonitor* monitor = NULL;
			GeeList* _tmp11_ = NULL;
			gint _tmp12_ = 0;
			gpointer _tmp13_ = NULL;
			MediaMonitor* _tmp14_ = NULL;
			GFile* _tmp15_ = NULL;
			gboolean _tmp16_ = FALSE;
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp8_ = _monitor_index;
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_monitor_index = _tmp8_ + 1;
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp9_ = _monitor_index;
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp10_ = _monitor_size;
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (!(_tmp9_ < _tmp10_)) {
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 7521 "LibraryMonitor.c"
			}
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp11_ = _monitor_list;
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp12_ = _monitor_index;
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp13_ = gee_list_get (_tmp11_, _tmp12_);
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			monitor = (MediaMonitor*) _tmp13_;
#line 991 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp14_ = monitor;
#line 991 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp15_ = file;
#line 991 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp16_ = media_monitor_notify_file_deleted (_tmp14_, _tmp15_);
#line 991 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp16_) {
#line 992 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				known = TRUE;
#line 994 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (monitor);
#line 994 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 7545 "LibraryMonitor.c"
			}
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (monitor);
#line 7549 "LibraryMonitor.c"
		}
#line 990 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_monitor_list);
#line 7553 "LibraryMonitor.c"
	}
#line 998 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp17_ = known;
#line 998 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (!_tmp17_) {
#line 7559 "LibraryMonitor.c"
		Tombstone* tombstone = NULL;
		TombstoneSourceCollection* _tmp18_ = NULL;
		GFile* _tmp19_ = NULL;
		Tombstone* _tmp20_ = NULL;
		Tombstone* _tmp21_ = NULL;
		GFile* _tmp27_ = NULL;
#line 1000 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp18_ = tombstone_global;
#line 1000 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp19_ = file;
#line 1000 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp20_ = tombstone_source_collection_locate (_tmp18_, _tmp19_);
#line 1000 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		tombstone = _tmp20_;
#line 1001 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp21_ = tombstone;
#line 1001 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (_tmp21_ != NULL) {
#line 7578 "LibraryMonitor.c"
			GFile* _tmp22_ = NULL;
			gchar* _tmp23_ = NULL;
			gchar* _tmp24_ = NULL;
			TombstoneSourceCollection* _tmp25_ = NULL;
			Tombstone* _tmp26_ = NULL;
#line 1002 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp22_ = file;
#line 1002 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp23_ = g_file_get_path (_tmp22_);
#line 1002 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp24_ = _tmp23_;
#line 1002 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			g_debug ("LibraryMonitor.vala:1002: Resurrecting tombstoned file %s", _tmp24_);
#line 1002 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_free0 (_tmp24_);
#line 1003 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp25_ = tombstone_global;
#line 1003 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp26_ = tombstone;
#line 1003 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			tombstone_source_collection_resurrect (_tmp25_, _tmp26_);
#line 7600 "LibraryMonitor.c"
		}
#line 1007 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp27_ = file;
#line 1007 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_remove_queued_import (self, _tmp27_);
#line 998 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (tombstone);
#line 7608 "LibraryMonitor.c"
	}
#line 1010 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp28_ = file;
#line 1010 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	DIRECTORY_MONITOR_CLASS (library_monitor_parent_class)->notify_file_deleted (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DIRECTORY_MONITOR, DirectoryMonitor), _tmp28_);
#line 7614 "LibraryMonitor.c"
}


static void g_cclosure_user_marshal_VOID__INT_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef void (*GMarshalFunc_VOID__INT_INT) (gpointer data1, gint arg_1, gint arg_2, gpointer data2);
	register GMarshalFunc_VOID__INT_INT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (n_param_values == 3);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		data1 = closure->data;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		data2 = param_values->data[0].v_pointer;
#line 7633 "LibraryMonitor.c"
	} else {
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		data1 = param_values->data[0].v_pointer;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		data2 = closure->data;
#line 7639 "LibraryMonitor.c"
	}
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	callback = (GMarshalFunc_VOID__INT_INT) (marshal_data ? marshal_data : cc->callback);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	callback (data1, g_value_get_int (param_values + 1), g_value_get_int (param_values + 2), data2);
#line 7645 "LibraryMonitor.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 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (n_param_values == 3);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		data1 = closure->data;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		data2 = param_values->data[0].v_pointer;
#line 7664 "LibraryMonitor.c"
	} else {
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		data1 = param_values->data[0].v_pointer;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		data2 = closure->data;
#line 7670 "LibraryMonitor.c"
	}
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	callback = (GMarshalFunc_VOID__UINT64_UINT64) (marshal_data ? marshal_data : cc->callback);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	callback (data1, g_value_get_uint64 (param_values + 1), g_value_get_uint64 (param_values + 2), data2);
#line 7676 "LibraryMonitor.c"
}


static void _library_monitor_on_find_move_completed_completion_callback (BackgroundJob* job, gpointer self) {
#line 111 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_on_find_move_completed ((LibraryMonitor*) self, job);
#line 7683 "LibraryMonitor.c"
}


static void _library_monitor_on_find_move_cancelled_cancellation_callback (BackgroundJob* job, gpointer self) {
#line 111 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_on_find_move_cancelled ((LibraryMonitor*) self, job);
#line 7690 "LibraryMonitor.c"
}


static LibraryMonitorFindMoveJob* library_monitor_find_move_job_construct (GType object_type, LibraryMonitor* owner, GFile* file, GeeCollection* candidates) {
	LibraryMonitorFindMoveJob* self = NULL;
	LibraryMonitor* _tmp0_ = NULL;
	LibraryMonitor* _tmp1_ = NULL;
	LibraryMonitor* _tmp2_ = NULL;
	GCancellable* _tmp3_ = NULL;
	LibraryMonitor* _tmp4_ = NULL;
	GFile* _tmp5_ = NULL;
	GFile* _tmp6_ = NULL;
	GeeCollection* _tmp7_ = NULL;
	GeeCollection* _tmp8_ = NULL;
#line 110 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (IS_LIBRARY_MONITOR (owner), NULL);
#line 110 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (G_IS_FILE (file), NULL);
#line 110 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (GEE_IS_COLLECTION (candidates), NULL);
#line 111 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = owner;
#line 111 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = owner;
#line 111 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = owner;
#line 111 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp3_ = _tmp2_->priv->cancellable;
#line 111 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp4_ = owner;
#line 111 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = (LibraryMonitorFindMoveJob*) background_job_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, G_TYPE_OBJECT, GObject), _library_monitor_on_find_move_completed_completion_callback, _tmp1_, _tmp3_, _library_monitor_on_find_move_cancelled_cancellation_callback, _tmp4_, NULL);
#line 113 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp5_ = file;
#line 113 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp6_ = _g_object_ref0 (_tmp5_);
#line 113 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->file);
#line 113 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->file = _tmp6_;
#line 114 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp7_ = candidates;
#line 114 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp8_ = _g_object_ref0 (_tmp7_);
#line 114 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->candidates);
#line 114 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->candidates = _tmp8_;
#line 116 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	background_job_set_completion_priority (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_JOB, BackgroundJob), G_PRIORITY_LOW);
#line 110 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return self;
#line 7743 "LibraryMonitor.c"
}


static LibraryMonitorFindMoveJob* library_monitor_find_move_job_new (LibraryMonitor* owner, GFile* file, GeeCollection* candidates) {
#line 110 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return library_monitor_find_move_job_construct (LIBRARY_MONITOR_TYPE_FIND_MOVE_JOB, owner, file, candidates);
#line 7750 "LibraryMonitor.c"
}


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


static void library_monitor_find_move_job_real_execute (BackgroundJob* base) {
	LibraryMonitorFindMoveJob * self;
	GeeIterator* iter = NULL;
	GeeCollection* _tmp0_ = NULL;
	GeeIterator* _tmp1_ = NULL;
	GeeCollection* _tmp12_ = NULL;
	gint _tmp13_ = 0;
	gint _tmp14_ = 0;
	gchar* md5 = NULL;
	GError * _inner_error_ = NULL;
#line 119 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, LIBRARY_MONITOR_TYPE_FIND_MOVE_JOB, LibraryMonitorFindMoveJob);
#line 121 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = self->candidates;
#line 121 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERABLE, GeeIterable));
#line 121 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	iter = _tmp1_;
#line 122 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	while (TRUE) {
#line 7781 "LibraryMonitor.c"
		GeeIterator* _tmp2_ = NULL;
		gboolean _tmp3_ = FALSE;
		GeeIterator* _tmp4_ = NULL;
		gpointer _tmp5_ = NULL;
		Monitorable* _tmp6_ = NULL;
		GFile* _tmp7_ = NULL;
		GFile* _tmp8_ = NULL;
		gboolean _tmp9_ = FALSE;
		gboolean _tmp10_ = FALSE;
#line 122 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp2_ = iter;
#line 122 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp3_ = gee_iterator_next (_tmp2_);
#line 122 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (!_tmp3_) {
#line 122 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			break;
#line 7799 "LibraryMonitor.c"
		}
#line 123 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = iter;
#line 123 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp5_ = gee_iterator_get (_tmp4_);
#line 123 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp6_ = (Monitorable*) _tmp5_;
#line 123 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp7_ = media_source_get_master_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_MEDIA_SOURCE, MediaSource));
#line 123 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp8_ = _tmp7_;
#line 123 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp9_ = g_file_query_exists (_tmp8_, NULL);
#line 123 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp10_ = _tmp9_;
#line 123 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_tmp8_);
#line 123 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_tmp6_);
#line 123 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (_tmp10_) {
#line 7821 "LibraryMonitor.c"
			GeeIterator* _tmp11_ = NULL;
#line 124 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp11_ = iter;
#line 124 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			gee_iterator_remove (_tmp11_);
#line 7827 "LibraryMonitor.c"
		}
	}
#line 128 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp12_ = self->candidates;
#line 128 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp13_ = gee_collection_get_size (_tmp12_);
#line 128 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp14_ = _tmp13_;
#line 128 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (_tmp14_ == 0) {
#line 129 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (iter);
#line 129 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return;
#line 7842 "LibraryMonitor.c"
	}
#line 131 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	md5 = NULL;
#line 7846 "LibraryMonitor.c"
	{
		gchar* _tmp15_ = NULL;
		GFile* _tmp16_ = NULL;
		gchar* _tmp17_ = NULL;
		gchar* _tmp18_ = NULL;
#line 133 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp16_ = self->file;
#line 133 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp17_ = md5_file (_tmp16_, &_inner_error_);
#line 133 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp15_ = _tmp17_;
#line 133 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 7860 "LibraryMonitor.c"
			goto __catch493_g_error;
		}
#line 133 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp18_ = _tmp15_;
#line 133 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp15_ = NULL;
#line 133 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_free0 (md5);
#line 133 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		md5 = _tmp18_;
#line 132 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_free0 (_tmp15_);
#line 7873 "LibraryMonitor.c"
	}
	goto __finally493;
	__catch493_g_error:
	{
		GError* err = NULL;
		GError* _tmp19_ = NULL;
		GError* _tmp20_ = NULL;
#line 132 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		err = _inner_error_;
#line 132 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_inner_error_ = NULL;
#line 135 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp19_ = err;
#line 135 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp20_ = _g_error_copy0 (_tmp19_);
#line 135 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_error_free0 (self->err);
#line 135 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		self->err = _tmp20_;
#line 137 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_error_free0 (err);
#line 137 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_free0 (md5);
#line 137 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (iter);
#line 137 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return;
#line 7901 "LibraryMonitor.c"
	}
	__finally493:
#line 132 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 132 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_free0 (md5);
#line 132 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (iter);
#line 132 "/home/jens/Source/shotwell/src/LibraryMonitor.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 132 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_clear_error (&_inner_error_);
#line 132 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return;
#line 7916 "LibraryMonitor.c"
	}
	{
		GeeIterator* _candidate_it = NULL;
		GeeCollection* _tmp21_ = NULL;
		GeeIterator* _tmp22_ = NULL;
#line 140 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp21_ = self->candidates;
#line 140 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp22_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GEE_TYPE_ITERABLE, GeeIterable));
#line 140 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_candidate_it = _tmp22_;
#line 140 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		while (TRUE) {
#line 7930 "LibraryMonitor.c"
			GeeIterator* _tmp23_ = NULL;
			gboolean _tmp24_ = FALSE;
			Monitorable* candidate = NULL;
			GeeIterator* _tmp25_ = NULL;
			gpointer _tmp26_ = NULL;
			Monitorable* _tmp27_ = NULL;
			gchar* _tmp28_ = NULL;
			gchar* _tmp29_ = NULL;
			const gchar* _tmp30_ = NULL;
			gboolean _tmp31_ = FALSE;
			Monitorable* _tmp32_ = NULL;
			Monitorable* _tmp46_ = NULL;
			Monitorable* _tmp47_ = NULL;
#line 140 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp23_ = _candidate_it;
#line 140 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp24_ = gee_iterator_next (_tmp23_);
#line 140 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (!_tmp24_) {
#line 140 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 7952 "LibraryMonitor.c"
			}
#line 140 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp25_ = _candidate_it;
#line 140 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp26_ = gee_iterator_get (_tmp25_);
#line 140 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			candidate = (Monitorable*) _tmp26_;
#line 141 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp27_ = candidate;
#line 141 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp28_ = media_source_get_master_md5 (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, TYPE_MEDIA_SOURCE, MediaSource));
#line 141 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp29_ = _tmp28_;
#line 141 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp30_ = md5;
#line 141 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp31_ = g_strcmp0 (_tmp29_, _tmp30_) != 0;
#line 141 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_free0 (_tmp29_);
#line 141 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp31_) {
#line 142 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (candidate);
#line 142 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				continue;
#line 7978 "LibraryMonitor.c"
			}
#line 144 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp32_ = self->match;
#line 144 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp32_ != NULL) {
#line 7984 "LibraryMonitor.c"
				GFile* _tmp33_ = NULL;
				gchar* _tmp34_ = NULL;
				gchar* _tmp35_ = NULL;
				Monitorable* _tmp36_ = NULL;
				gchar* _tmp37_ = NULL;
				gchar* _tmp38_ = NULL;
				Monitorable* _tmp39_ = NULL;
				gchar* _tmp40_ = NULL;
				gchar* _tmp41_ = NULL;
				GeeArrayList* _tmp42_ = NULL;
				GeeArrayList* _tmp44_ = NULL;
				Monitorable* _tmp45_ = NULL;
#line 145 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp33_ = self->file;
#line 145 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp34_ = g_file_get_path (_tmp33_);
#line 145 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp35_ = _tmp34_;
#line 145 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp36_ = self->match;
#line 145 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp37_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, TYPE_DATA_OBJECT, DataObject));
#line 145 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp38_ = _tmp37_;
#line 145 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp39_ = candidate;
#line 145 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp40_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, TYPE_DATA_OBJECT, DataObject));
#line 145 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp41_ = _tmp40_;
#line 145 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				g_warning ("LibraryMonitor.vala:145: Found more than one media match for %s: %s an" \
"d %s", _tmp35_, _tmp38_, _tmp41_);
#line 145 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_free0 (_tmp41_);
#line 145 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_free0 (_tmp38_);
#line 145 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_free0 (_tmp35_);
#line 148 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp42_ = self->losers;
#line 148 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				if (_tmp42_ == NULL) {
#line 8027 "LibraryMonitor.c"
					GeeArrayList* _tmp43_ = NULL;
#line 149 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_tmp43_ = gee_array_list_new (TYPE_MONITORABLE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
#line 149 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					_g_object_unref0 (self->losers);
#line 149 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
					self->losers = _tmp43_;
#line 8035 "LibraryMonitor.c"
				}
#line 151 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp44_ = self->losers;
#line 151 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp45_ = candidate;
#line 151 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp45_);
#line 153 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (candidate);
#line 153 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				continue;
#line 8047 "LibraryMonitor.c"
			}
#line 156 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp46_ = candidate;
#line 156 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp47_ = _g_object_ref0 (_tmp46_);
#line 156 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (self->match);
#line 156 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			self->match = _tmp47_;
#line 140 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (candidate);
#line 8059 "LibraryMonitor.c"
		}
#line 140 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_candidate_it);
#line 8063 "LibraryMonitor.c"
	}
#line 119 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_free0 (md5);
#line 119 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (iter);
#line 8069 "LibraryMonitor.c"
}


static void library_monitor_find_move_job_class_init (LibraryMonitorFindMoveJobClass * klass) {
#line 103 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_find_move_job_parent_class = g_type_class_peek_parent (klass);
#line 103 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	((BackgroundJobClass *) klass)->finalize = library_monitor_find_move_job_finalize;
#line 103 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	((BackgroundJobClass *) klass)->execute = library_monitor_find_move_job_real_execute;
#line 8080 "LibraryMonitor.c"
}


static void library_monitor_find_move_job_instance_init (LibraryMonitorFindMoveJob * self) {
#line 106 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->match = NULL;
#line 107 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->losers = NULL;
#line 108 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->err = NULL;
#line 8091 "LibraryMonitor.c"
}


static void library_monitor_find_move_job_finalize (BackgroundJob* obj) {
	LibraryMonitorFindMoveJob * self;
#line 103 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIBRARY_MONITOR_TYPE_FIND_MOVE_JOB, LibraryMonitorFindMoveJob);
#line 104 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->file);
#line 105 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->candidates);
#line 106 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->match);
#line 107 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->losers);
#line 108 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_error_free0 (self->err);
#line 103 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	BACKGROUND_JOB_CLASS (library_monitor_find_move_job_parent_class)->finalize (obj);
#line 8111 "LibraryMonitor.c"
}


static GType library_monitor_find_move_job_get_type (void) {
	static volatile gsize library_monitor_find_move_job_type_id__volatile = 0;
	if (g_once_init_enter (&library_monitor_find_move_job_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (LibraryMonitorFindMoveJobClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) library_monitor_find_move_job_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LibraryMonitorFindMoveJob), 0, (GInstanceInitFunc) library_monitor_find_move_job_instance_init, NULL };
		GType library_monitor_find_move_job_type_id;
		library_monitor_find_move_job_type_id = g_type_register_static (TYPE_BACKGROUND_JOB, "LibraryMonitorFindMoveJob", &g_define_type_info, 0);
		g_once_init_leave (&library_monitor_find_move_job_type_id__volatile, library_monitor_find_move_job_type_id);
	}
	return library_monitor_find_move_job_type_id__volatile;
}


static void _library_monitor_on_runtime_find_move_completed_completion_callback (BackgroundJob* job, gpointer self) {
#line 168 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_on_runtime_find_move_completed ((LibraryMonitor*) self, job);
#line 8130 "LibraryMonitor.c"
}


static LibraryMonitorRuntimeFindMoveJob* library_monitor_runtime_find_move_job_construct (GType object_type, LibraryMonitor* owner, GFile* file, GeeCollection* candidates) {
	LibraryMonitorRuntimeFindMoveJob* self = NULL;
	LibraryMonitor* _tmp0_ = NULL;
	LibraryMonitor* _tmp1_ = NULL;
	LibraryMonitor* _tmp2_ = NULL;
	GCancellable* _tmp3_ = NULL;
	GFile* _tmp4_ = NULL;
	GFile* _tmp5_ = NULL;
	GeeCollection* _tmp6_ = NULL;
	GeeCollection* _tmp7_ = NULL;
#line 167 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (IS_LIBRARY_MONITOR (owner), NULL);
#line 167 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (G_IS_FILE (file), NULL);
#line 167 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (GEE_IS_COLLECTION (candidates), NULL);
#line 168 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = owner;
#line 168 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = owner;
#line 168 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = owner;
#line 168 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp3_ = _tmp2_->priv->cancellable;
#line 168 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = (LibraryMonitorRuntimeFindMoveJob*) background_job_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, G_TYPE_OBJECT, GObject), _library_monitor_on_runtime_find_move_completed_completion_callback, _tmp1_, _tmp3_, NULL, NULL, NULL);
#line 170 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp4_ = file;
#line 170 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp5_ = _g_object_ref0 (_tmp4_);
#line 170 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->file);
#line 170 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->file = _tmp5_;
#line 171 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp6_ = candidates;
#line 171 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp7_ = _g_object_ref0 (_tmp6_);
#line 171 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->candidates);
#line 171 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->candidates = _tmp7_;
#line 173 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	background_job_set_completion_priority (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_JOB, BackgroundJob), G_PRIORITY_LOW);
#line 167 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return self;
#line 8180 "LibraryMonitor.c"
}


static LibraryMonitorRuntimeFindMoveJob* library_monitor_runtime_find_move_job_new (LibraryMonitor* owner, GFile* file, GeeCollection* candidates) {
#line 167 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return library_monitor_runtime_find_move_job_construct (LIBRARY_MONITOR_TYPE_RUNTIME_FIND_MOVE_JOB, owner, file, candidates);
#line 8187 "LibraryMonitor.c"
}


static void library_monitor_runtime_find_move_job_real_execute (BackgroundJob* base) {
	LibraryMonitorRuntimeFindMoveJob * self;
	gchar* md5 = NULL;
	GError * _inner_error_ = NULL;
#line 176 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, LIBRARY_MONITOR_TYPE_RUNTIME_FIND_MOVE_JOB, LibraryMonitorRuntimeFindMoveJob);
#line 177 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	md5 = NULL;
#line 8199 "LibraryMonitor.c"
	{
		gchar* _tmp0_ = NULL;
		GFile* _tmp1_ = NULL;
		gchar* _tmp2_ = NULL;
		gchar* _tmp3_ = NULL;
#line 179 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp1_ = self->file;
#line 179 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp2_ = md5_file (_tmp1_, &_inner_error_);
#line 179 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = _tmp2_;
#line 179 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 8213 "LibraryMonitor.c"
			goto __catch494_g_error;
		}
#line 179 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp3_ = _tmp0_;
#line 179 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp0_ = NULL;
#line 179 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_free0 (md5);
#line 179 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		md5 = _tmp3_;
#line 178 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_free0 (_tmp0_);
#line 8226 "LibraryMonitor.c"
	}
	goto __finally494;
	__catch494_g_error:
	{
		GError* err = NULL;
		GError* _tmp4_ = NULL;
		GError* _tmp5_ = NULL;
#line 178 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		err = _inner_error_;
#line 178 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_inner_error_ = NULL;
#line 181 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp4_ = err;
#line 181 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp5_ = _g_error_copy0 (_tmp4_);
#line 181 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_error_free0 (self->err);
#line 181 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		self->err = _tmp5_;
#line 183 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_error_free0 (err);
#line 183 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_free0 (md5);
#line 183 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return;
#line 8252 "LibraryMonitor.c"
	}
	__finally494:
#line 178 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 178 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_free0 (md5);
#line 178 "/home/jens/Source/shotwell/src/LibraryMonitor.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 178 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_clear_error (&_inner_error_);
#line 178 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return;
#line 8265 "LibraryMonitor.c"
	}
	{
		GeeIterator* _candidate_it = NULL;
		GeeCollection* _tmp6_ = NULL;
		GeeIterator* _tmp7_ = NULL;
#line 186 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp6_ = self->candidates;
#line 186 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_tmp7_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ITERABLE, GeeIterable));
#line 186 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_candidate_it = _tmp7_;
#line 186 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		while (TRUE) {
#line 8279 "LibraryMonitor.c"
			GeeIterator* _tmp8_ = NULL;
			gboolean _tmp9_ = FALSE;
			Monitorable* candidate = NULL;
			GeeIterator* _tmp10_ = NULL;
			gpointer _tmp11_ = NULL;
			Monitorable* _tmp12_ = NULL;
			gchar* _tmp13_ = NULL;
			gchar* _tmp14_ = NULL;
			const gchar* _tmp15_ = NULL;
			gboolean _tmp16_ = FALSE;
#line 186 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp8_ = _candidate_it;
#line 186 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp9_ = gee_iterator_next (_tmp8_);
#line 186 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (!_tmp9_) {
#line 186 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 8298 "LibraryMonitor.c"
			}
#line 186 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp10_ = _candidate_it;
#line 186 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp11_ = gee_iterator_get (_tmp10_);
#line 186 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			candidate = (Monitorable*) _tmp11_;
#line 187 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp12_ = candidate;
#line 187 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp13_ = media_source_get_master_md5 (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_MEDIA_SOURCE, MediaSource));
#line 187 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp14_ = _tmp13_;
#line 187 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp15_ = md5;
#line 187 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_tmp16_ = g_strcmp0 (_tmp14_, _tmp15_) == 0;
#line 187 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_free0 (_tmp14_);
#line 187 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			if (_tmp16_) {
#line 8320 "LibraryMonitor.c"
				Monitorable* _tmp17_ = NULL;
				Monitorable* _tmp18_ = NULL;
#line 188 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp17_ = candidate;
#line 188 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_tmp18_ = _g_object_ref0 (_tmp17_);
#line 188 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (self->match);
#line 188 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				self->match = _tmp18_;
#line 190 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				_g_object_unref0 (candidate);
#line 190 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
				break;
#line 8335 "LibraryMonitor.c"
			}
#line 186 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			_g_object_unref0 (candidate);
#line 8339 "LibraryMonitor.c"
		}
#line 186 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		_g_object_unref0 (_candidate_it);
#line 8343 "LibraryMonitor.c"
	}
#line 176 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_free0 (md5);
#line 8347 "LibraryMonitor.c"
}


static void library_monitor_runtime_find_move_job_class_init (LibraryMonitorRuntimeFindMoveJobClass * klass) {
#line 161 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_runtime_find_move_job_parent_class = g_type_class_peek_parent (klass);
#line 161 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	((BackgroundJobClass *) klass)->finalize = library_monitor_runtime_find_move_job_finalize;
#line 161 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	((BackgroundJobClass *) klass)->execute = library_monitor_runtime_find_move_job_real_execute;
#line 8358 "LibraryMonitor.c"
}


static void library_monitor_runtime_find_move_job_instance_init (LibraryMonitorRuntimeFindMoveJob * self) {
#line 164 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->match = NULL;
#line 165 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->err = NULL;
#line 8367 "LibraryMonitor.c"
}


static void library_monitor_runtime_find_move_job_finalize (BackgroundJob* obj) {
	LibraryMonitorRuntimeFindMoveJob * self;
#line 161 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIBRARY_MONITOR_TYPE_RUNTIME_FIND_MOVE_JOB, LibraryMonitorRuntimeFindMoveJob);
#line 162 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->file);
#line 163 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->candidates);
#line 164 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->match);
#line 165 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_error_free0 (self->err);
#line 161 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	BACKGROUND_JOB_CLASS (library_monitor_runtime_find_move_job_parent_class)->finalize (obj);
#line 8385 "LibraryMonitor.c"
}


static GType library_monitor_runtime_find_move_job_get_type (void) {
	static volatile gsize library_monitor_runtime_find_move_job_type_id__volatile = 0;
	if (g_once_init_enter (&library_monitor_runtime_find_move_job_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (LibraryMonitorRuntimeFindMoveJobClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) library_monitor_runtime_find_move_job_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LibraryMonitorRuntimeFindMoveJob), 0, (GInstanceInitFunc) library_monitor_runtime_find_move_job_instance_init, NULL };
		GType library_monitor_runtime_find_move_job_type_id;
		library_monitor_runtime_find_move_job_type_id = g_type_register_static (TYPE_BACKGROUND_JOB, "LibraryMonitorRuntimeFindMoveJob", &g_define_type_info, 0);
		g_once_init_leave (&library_monitor_runtime_find_move_job_type_id__volatile, library_monitor_runtime_find_move_job_type_id);
	}
	return library_monitor_runtime_find_move_job_type_id__volatile;
}


static LibraryMonitorVerifyJob* library_monitor_verify_job_construct (GType object_type, Monitorable* monitorable, MediaMonitor* monitor) {
	LibraryMonitorVerifyJob* self = NULL;
	Monitorable* _tmp0_ = NULL;
	Monitorable* _tmp1_ = NULL;
	MediaMonitor* _tmp2_ = NULL;
	MediaMonitor* _tmp3_ = NULL;
#line 200 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (IS_MONITORABLE (monitorable), NULL);
#line 200 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (IS_MEDIA_MONITOR (monitor), NULL);
#line 200 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = (LibraryMonitorVerifyJob*) g_type_create_instance (object_type);
#line 201 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = monitorable;
#line 201 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 201 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->monitorable);
#line 201 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->monitorable = _tmp1_;
#line 202 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = monitor;
#line 202 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 202 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->monitor);
#line 202 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->monitor = _tmp3_;
#line 200 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return self;
#line 8431 "LibraryMonitor.c"
}


static LibraryMonitorVerifyJob* library_monitor_verify_job_new (Monitorable* monitorable, MediaMonitor* monitor) {
#line 200 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return library_monitor_verify_job_construct (LIBRARY_MONITOR_TYPE_VERIFY_JOB, monitorable, monitor);
#line 8438 "LibraryMonitor.c"
}


static void library_monitor_value_verify_job_init (GValue* value) {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	value->data[0].v_pointer = NULL;
#line 8445 "LibraryMonitor.c"
}


static void library_monitor_value_verify_job_free_value (GValue* value) {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (value->data[0].v_pointer) {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_verify_job_unref (value->data[0].v_pointer);
#line 8454 "LibraryMonitor.c"
	}
}


static void library_monitor_value_verify_job_copy_value (const GValue* src_value, GValue* dest_value) {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (src_value->data[0].v_pointer) {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		dest_value->data[0].v_pointer = library_monitor_verify_job_ref (src_value->data[0].v_pointer);
#line 8464 "LibraryMonitor.c"
	} else {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		dest_value->data[0].v_pointer = NULL;
#line 8468 "LibraryMonitor.c"
	}
}


static gpointer library_monitor_value_verify_job_peek_pointer (const GValue* value) {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return value->data[0].v_pointer;
#line 8476 "LibraryMonitor.c"
}


static gchar* library_monitor_value_verify_job_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (collect_values[0].v_pointer) {
#line 8483 "LibraryMonitor.c"
		LibraryMonitorVerifyJob* object;
		object = collect_values[0].v_pointer;
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		if (object->parent_instance.g_class == NULL) {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 8490 "LibraryMonitor.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.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 8494 "LibraryMonitor.c"
		}
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		value->data[0].v_pointer = library_monitor_verify_job_ref (object);
#line 8498 "LibraryMonitor.c"
	} else {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		value->data[0].v_pointer = NULL;
#line 8502 "LibraryMonitor.c"
	}
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return NULL;
#line 8506 "LibraryMonitor.c"
}


static gchar* library_monitor_value_verify_job_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	LibraryMonitorVerifyJob** object_p;
	object_p = collect_values[0].v_pointer;
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (!object_p) {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 8517 "LibraryMonitor.c"
	}
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (!value->data[0].v_pointer) {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		*object_p = NULL;
#line 8523 "LibraryMonitor.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		*object_p = value->data[0].v_pointer;
#line 8527 "LibraryMonitor.c"
	} else {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		*object_p = library_monitor_verify_job_ref (value->data[0].v_pointer);
#line 8531 "LibraryMonitor.c"
	}
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return NULL;
#line 8535 "LibraryMonitor.c"
}


static GParamSpec* library_monitor_param_spec_verify_job (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	LibraryMonitorParamSpecVerifyJob* spec;
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (g_type_is_a (object_type, LIBRARY_MONITOR_TYPE_VERIFY_JOB), NULL);
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return G_PARAM_SPEC (spec);
#line 8549 "LibraryMonitor.c"
}


static gpointer library_monitor_value_get_verify_job (const GValue* value) {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIBRARY_MONITOR_TYPE_VERIFY_JOB), NULL);
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return value->data[0].v_pointer;
#line 8558 "LibraryMonitor.c"
}


static void library_monitor_value_set_verify_job (GValue* value, gpointer v_object) {
	LibraryMonitorVerifyJob* old;
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIBRARY_MONITOR_TYPE_VERIFY_JOB));
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	old = value->data[0].v_pointer;
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (v_object) {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, LIBRARY_MONITOR_TYPE_VERIFY_JOB));
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		value->data[0].v_pointer = v_object;
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_verify_job_ref (value->data[0].v_pointer);
#line 8578 "LibraryMonitor.c"
	} else {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		value->data[0].v_pointer = NULL;
#line 8582 "LibraryMonitor.c"
	}
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (old) {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_verify_job_unref (old);
#line 8588 "LibraryMonitor.c"
	}
}


static void library_monitor_value_take_verify_job (GValue* value, gpointer v_object) {
	LibraryMonitorVerifyJob* old;
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIBRARY_MONITOR_TYPE_VERIFY_JOB));
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	old = value->data[0].v_pointer;
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (v_object) {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, LIBRARY_MONITOR_TYPE_VERIFY_JOB));
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		value->data[0].v_pointer = v_object;
#line 8607 "LibraryMonitor.c"
	} else {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		value->data[0].v_pointer = NULL;
#line 8611 "LibraryMonitor.c"
	}
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (old) {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		library_monitor_verify_job_unref (old);
#line 8617 "LibraryMonitor.c"
	}
}


static void library_monitor_verify_job_class_init (LibraryMonitorVerifyJobClass * klass) {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_verify_job_parent_class = g_type_class_peek_parent (klass);
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	((LibraryMonitorVerifyJobClass *) klass)->finalize = library_monitor_verify_job_finalize;
#line 8627 "LibraryMonitor.c"
}


static void library_monitor_verify_job_instance_init (LibraryMonitorVerifyJob * self) {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->ref_count = 1;
#line 8634 "LibraryMonitor.c"
}


static void library_monitor_verify_job_finalize (LibraryMonitorVerifyJob* obj) {
	LibraryMonitorVerifyJob * self;
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIBRARY_MONITOR_TYPE_VERIFY_JOB, LibraryMonitorVerifyJob);
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_handlers_destroy (self);
#line 197 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->monitorable);
#line 198 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->monitor);
#line 8648 "LibraryMonitor.c"
}


static GType library_monitor_verify_job_get_type (void) {
	static volatile gsize library_monitor_verify_job_type_id__volatile = 0;
	if (g_once_init_enter (&library_monitor_verify_job_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { library_monitor_value_verify_job_init, library_monitor_value_verify_job_free_value, library_monitor_value_verify_job_copy_value, library_monitor_value_verify_job_peek_pointer, "p", library_monitor_value_verify_job_collect_value, "p", library_monitor_value_verify_job_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (LibraryMonitorVerifyJobClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) library_monitor_verify_job_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LibraryMonitorVerifyJob), 0, (GInstanceInitFunc) library_monitor_verify_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 library_monitor_verify_job_type_id;
		library_monitor_verify_job_type_id = g_type_register_fundamental (g_type_fundamental_next (), "LibraryMonitorVerifyJob", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&library_monitor_verify_job_type_id__volatile, library_monitor_verify_job_type_id);
	}
	return library_monitor_verify_job_type_id__volatile;
}


static gpointer library_monitor_verify_job_ref (gpointer instance) {
	LibraryMonitorVerifyJob* self;
	self = instance;
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_atomic_int_inc (&self->ref_count);
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	return instance;
#line 8673 "LibraryMonitor.c"
}


static void library_monitor_verify_job_unref (gpointer instance) {
	LibraryMonitorVerifyJob* self;
	self = instance;
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		LIBRARY_MONITOR_VERIFY_JOB_GET_CLASS (self)->finalize (self);
#line 196 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 8686 "LibraryMonitor.c"
	}
}


static void library_monitor_class_init (LibraryMonitorClass * klass) {
	GeeHashSet* _tmp0_ = NULL;
	HashTimedQueue* _tmp1_ = NULL;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_parent_class = g_type_class_peek_parent (klass);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_type_class_add_private (klass, sizeof (LibraryMonitorPrivate));
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	((DirectoryMonitorClass *) klass)->close = library_monitor_real_close;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	((DirectoryMonitorClass *) klass)->discovery_started = library_monitor_real_discovery_started;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	((DirectoryMonitorClass *) klass)->file_discovered = library_monitor_real_file_discovered;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	((DirectoryMonitorClass *) klass)->discovery_completed = library_monitor_real_discovery_completed;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	((DirectoryMonitorClass *) klass)->notify_file_created = library_monitor_real_notify_file_created;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	((DirectoryMonitorClass *) klass)->notify_file_moved = library_monitor_real_notify_file_moved;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	((DirectoryMonitorClass *) klass)->notify_file_altered = library_monitor_real_notify_file_altered;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	((DirectoryMonitorClass *) klass)->notify_file_attributes_altered = library_monitor_real_notify_file_attributes_altered;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	((DirectoryMonitorClass *) klass)->notify_file_alteration_completed = library_monitor_real_notify_file_alteration_completed;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	((DirectoryMonitorClass *) klass)->notify_file_deleted = library_monitor_real_notify_file_deleted;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	G_OBJECT_CLASS (klass)->finalize = library_monitor_finalize;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_new ("auto_update_progress", TYPE_LIBRARY_MONITOR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__INT_INT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_new ("auto_import_preparing", TYPE_LIBRARY_MONITOR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_new ("auto_import_progress", TYPE_LIBRARY_MONITOR, 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 206 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_rec_mutex_init (&__lock_library_monitor_blacklist);
#line 206 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = gee_hash_set_new (G_TYPE_FILE, (GBoxedCopyFunc) g_object_ref, g_object_unref, _file_hash_gee_hash_data_func, NULL, NULL, _file_equal_gee_equal_data_func, NULL, NULL);
#line 206 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_blacklist = _tmp0_;
#line 207 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = hash_timed_queue_new (G_TYPE_FILE, (GBoxedCopyFunc) g_object_ref, g_object_unref, (guint) LIBRARY_MONITOR_MIN_BLACKLIST_DURATION_MSEC, _library_monitor_on_unblacklist_file_dequeued_callback, NULL, _file_hash_gee_hash_data_func, NULL, NULL, _file_equal_gee_equal_data_func, NULL, NULL, G_PRIORITY_LOW);
#line 207 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	library_monitor_to_unblacklist = _tmp1_;
#line 8736 "LibraryMonitor.c"
}


static void library_monitor_instance_init (LibraryMonitor * self) {
	guint _tmp0_ = 0U;
	Workers* _tmp1_ = NULL;
	GCancellable* _tmp2_ = NULL;
	GeeArrayList* _tmp3_ = NULL;
	GeeHashSet* _tmp4_ = NULL;
	GeeHashSet* _tmp5_ = NULL;
	GeeArrayList* _tmp6_ = NULL;
	GeeLinkedList* _tmp7_ = NULL;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv = LIBRARY_MONITOR_GET_PRIVATE (self);
#line 210 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = workers_thread_per_cpu_minus_one ();
#line 210 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = workers_new (_tmp0_, FALSE);
#line 210 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->workers = _tmp1_;
#line 211 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp2_ = g_cancellable_new ();
#line 211 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->cancellable = _tmp2_;
#line 212 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->auto_import = FALSE;
#line 213 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->unknown_files = NULL;
#line 214 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp3_ = gee_array_list_new (TYPE_MEDIA_MONITOR, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
#line 214 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->monitors = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_LIST, GeeList);
#line 215 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->discovered = NULL;
#line 216 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp4_ = gee_hash_set_new (G_TYPE_FILE, (GBoxedCopyFunc) g_object_ref, g_object_unref, _file_hash_gee_hash_data_func, NULL, NULL, _file_equal_gee_equal_data_func, NULL, NULL);
#line 216 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->import_queue = _tmp4_;
#line 217 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp5_ = gee_hash_set_new (G_TYPE_FILE, (GBoxedCopyFunc) g_object_ref, g_object_unref, _file_hash_gee_hash_data_func, NULL, NULL, _file_equal_gee_equal_data_func, NULL, NULL);
#line 217 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->pending_imports = _tmp5_;
#line 218 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp6_ = gee_array_list_new (TYPE_BATCH_IMPORT, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
#line 218 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->batch_import_queue = _tmp6_;
#line 219 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->current_import_roll = NULL;
#line 220 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->last_import_roll_use = (time_t) 0;
#line 221 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->current_batch_import = NULL;
#line 222 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->checksums_completed = 0;
#line 223 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->checksums_total = 0;
#line 224 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->import_queue_timer_id = (guint) 0;
#line 225 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp7_ = gee_linked_list_new (LIBRARY_MONITOR_TYPE_VERIFY_JOB, (GBoxedCopyFunc) library_monitor_verify_job_ref, library_monitor_verify_job_unref, NULL, NULL, NULL);
#line 225 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->verify_queue = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_QUEUE, GeeQueue);
#line 226 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->outstanding_verify_jobs = 0;
#line 227 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->completed_monitorable_verifies = 0;
#line 228 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self->priv->total_monitorable_verifies = 0;
#line 8805 "LibraryMonitor.c"
}


static void library_monitor_finalize (GObject* obj) {
	LibraryMonitor * self;
	ConfigFacade* _tmp0_ = NULL;
	ConfigFacade* _tmp1_ = NULL;
	guint _tmp2_ = 0U;
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_LIBRARY_MONITOR, LibraryMonitor);
#line 247 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp0_ = config_facade_get_instance ();
#line 247 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_tmp1_ = _tmp0_;
#line 247 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_parse_name ("auto-import-from-library-changed", TYPE_CONFIGURATION_FACADE, &_tmp2_, NULL, FALSE);
#line 247 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _library_monitor_on_config_changed_configuration_facade_auto_import_from_library_changed, self);
#line 247 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (_tmp1_);
#line 210 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_workers_unref0 (self->priv->workers);
#line 211 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->priv->cancellable);
#line 213 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->priv->unknown_files);
#line 214 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->priv->monitors);
#line 215 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->priv->discovered);
#line 216 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->priv->import_queue);
#line 217 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->priv->pending_imports);
#line 218 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->priv->batch_import_queue);
#line 219 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_batch_import_roll_unref0 (self->priv->current_import_roll);
#line 221 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->priv->current_batch_import);
#line 225 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	_g_object_unref0 (self->priv->verify_queue);
#line 97 "/home/jens/Source/shotwell/src/LibraryMonitor.vala"
	G_OBJECT_CLASS (library_monitor_parent_class)->finalize (obj);
#line 8850 "LibraryMonitor.c"
}


GType library_monitor_get_type (void) {
	static volatile gsize library_monitor_type_id__volatile = 0;
	if (g_once_init_enter (&library_monitor_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (LibraryMonitorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) library_monitor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LibraryMonitor), 0, (GInstanceInitFunc) library_monitor_instance_init, NULL };
		GType library_monitor_type_id;
		library_monitor_type_id = g_type_register_static (TYPE_DIRECTORY_MONITOR, "LibraryMonitor", &g_define_type_info, 0);
		g_once_init_leave (&library_monitor_type_id__volatile, library_monitor_type_id);
	}
	return library_monitor_type_id__volatile;
}


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


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