summaryrefslogtreecommitdiff
path: root/src/photos
diff options
context:
space:
mode:
Diffstat (limited to 'src/photos')
-rw-r--r--src/photos/BmpSupport.c1912
-rw-r--r--src/photos/GRaw.c2462
-rw-r--r--src/photos/GRaw.vala3
-rw-r--r--src/photos/GdkSupport.c1402
-rw-r--r--src/photos/JfifSupport.c2020
-rw-r--r--src/photos/PhotoFileAdapter.c1104
-rw-r--r--src/photos/PhotoFileFormat.c3277
-rw-r--r--src/photos/PhotoFileSniffer.c1348
-rw-r--r--src/photos/PhotoMetadata.c8924
-rw-r--r--src/photos/Photos.c89
-rw-r--r--src/photos/PngSupport.c1929
-rw-r--r--src/photos/RawSupport.c3165
-rw-r--r--src/photos/TiffSupport.c1714
-rw-r--r--src/photos/mk/photos.mk38
14 files changed, 29348 insertions, 39 deletions
diff --git a/src/photos/BmpSupport.c b/src/photos/BmpSupport.c
new file mode 100644
index 0000000..11ad8c6
--- /dev/null
+++ b/src/photos/BmpSupport.c
@@ -0,0 +1,1912 @@
+/* BmpSupport.c generated by valac 0.32.1, the Vala compiler
+ * generated from BmpSupport.vala, do not modify */
+
+/* Copyright 2016 Software Freedom Conservancy Inc.
+ *
+ * This software is licensed under the GNU LGPL (version 2.1 or later).
+ * See the COPYING file in this distribution.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gphoto2/gphoto2-file.h>
+#include <glib/gi18n-lib.h>
+#include <gio/gio.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+
+#define TYPE_PHOTO_FILE_FORMAT_PROPERTIES (photo_file_format_properties_get_type ())
+#define PHOTO_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatProperties))
+#define PHOTO_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatPropertiesClass))
+#define IS_PHOTO_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES))
+#define IS_PHOTO_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_FORMAT_PROPERTIES))
+#define PHOTO_FILE_FORMAT_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatPropertiesClass))
+
+typedef struct _PhotoFileFormatProperties PhotoFileFormatProperties;
+typedef struct _PhotoFileFormatPropertiesClass PhotoFileFormatPropertiesClass;
+typedef struct _PhotoFileFormatPropertiesPrivate PhotoFileFormatPropertiesPrivate;
+
+#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ())
+
+#define TYPE_PHOTO_FILE_FORMAT_FLAGS (photo_file_format_flags_get_type ())
+
+#define PHOTOS_TYPE_BMP_FILE_FORMAT_PROPERTIES (photos_bmp_file_format_properties_get_type ())
+#define PHOTOS_BMP_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHOTOS_TYPE_BMP_FILE_FORMAT_PROPERTIES, PhotosBmpFileFormatProperties))
+#define PHOTOS_BMP_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOTOS_TYPE_BMP_FILE_FORMAT_PROPERTIES, PhotosBmpFileFormatPropertiesClass))
+#define PHOTOS_IS_BMP_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHOTOS_TYPE_BMP_FILE_FORMAT_PROPERTIES))
+#define PHOTOS_IS_BMP_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOTOS_TYPE_BMP_FILE_FORMAT_PROPERTIES))
+#define PHOTOS_BMP_FILE_FORMAT_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOTOS_TYPE_BMP_FILE_FORMAT_PROPERTIES, PhotosBmpFileFormatPropertiesClass))
+
+typedef struct _PhotosBmpFileFormatProperties PhotosBmpFileFormatProperties;
+typedef struct _PhotosBmpFileFormatPropertiesClass PhotosBmpFileFormatPropertiesClass;
+typedef struct _PhotosBmpFileFormatPropertiesPrivate PhotosBmpFileFormatPropertiesPrivate;
+#define _photo_file_format_properties_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_format_properties_unref (var), NULL)))
+
+#define TYPE_PHOTO_FILE_SNIFFER (photo_file_sniffer_get_type ())
+#define PHOTO_FILE_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer))
+#define PHOTO_FILE_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSnifferClass))
+#define IS_PHOTO_FILE_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_SNIFFER))
+#define IS_PHOTO_FILE_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_SNIFFER))
+#define PHOTO_FILE_SNIFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSnifferClass))
+
+typedef struct _PhotoFileSniffer PhotoFileSniffer;
+typedef struct _PhotoFileSnifferClass PhotoFileSnifferClass;
+typedef struct _PhotoFileSnifferPrivate PhotoFileSnifferPrivate;
+
+#define TYPE_DETECTED_PHOTO_INFORMATION (detected_photo_information_get_type ())
+#define DETECTED_PHOTO_INFORMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformation))
+#define DETECTED_PHOTO_INFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformationClass))
+#define IS_DETECTED_PHOTO_INFORMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DETECTED_PHOTO_INFORMATION))
+#define IS_DETECTED_PHOTO_INFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DETECTED_PHOTO_INFORMATION))
+#define DETECTED_PHOTO_INFORMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformationClass))
+
+typedef struct _DetectedPhotoInformation DetectedPhotoInformation;
+typedef struct _DetectedPhotoInformationClass DetectedPhotoInformationClass;
+
+#define PHOTO_FILE_SNIFFER_TYPE_OPTIONS (photo_file_sniffer_options_get_type ())
+
+#define TYPE_GDK_SNIFFER (gdk_sniffer_get_type ())
+#define GDK_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GDK_SNIFFER, GdkSniffer))
+#define GDK_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GDK_SNIFFER, GdkSnifferClass))
+#define IS_GDK_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GDK_SNIFFER))
+#define IS_GDK_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GDK_SNIFFER))
+#define GDK_SNIFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GDK_SNIFFER, GdkSnifferClass))
+
+typedef struct _GdkSniffer GdkSniffer;
+typedef struct _GdkSnifferClass GdkSnifferClass;
+typedef struct _GdkSnifferPrivate GdkSnifferPrivate;
+
+#define PHOTOS_TYPE_BMP_SNIFFER (photos_bmp_sniffer_get_type ())
+#define PHOTOS_BMP_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHOTOS_TYPE_BMP_SNIFFER, PhotosBmpSniffer))
+#define PHOTOS_BMP_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOTOS_TYPE_BMP_SNIFFER, PhotosBmpSnifferClass))
+#define PHOTOS_IS_BMP_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHOTOS_TYPE_BMP_SNIFFER))
+#define PHOTOS_IS_BMP_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOTOS_TYPE_BMP_SNIFFER))
+#define PHOTOS_BMP_SNIFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOTOS_TYPE_BMP_SNIFFER, PhotosBmpSnifferClass))
+
+typedef struct _PhotosBmpSniffer PhotosBmpSniffer;
+typedef struct _PhotosBmpSnifferClass PhotosBmpSnifferClass;
+typedef struct _PhotosBmpSnifferPrivate PhotosBmpSnifferPrivate;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _detected_photo_information_unref0(var) ((var == NULL) ? NULL : (var = (detected_photo_information_unref (var), NULL)))
+typedef struct _DetectedPhotoInformationPrivate DetectedPhotoInformationPrivate;
+
+#define TYPE_MEDIA_METADATA (media_metadata_get_type ())
+#define MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_METADATA, MediaMetadata))
+#define MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_METADATA, MediaMetadataClass))
+#define IS_MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_METADATA))
+#define IS_MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_METADATA))
+#define MEDIA_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_METADATA, MediaMetadataClass))
+
+typedef struct _MediaMetadata MediaMetadata;
+typedef struct _MediaMetadataClass MediaMetadataClass;
+
+#define TYPE_PHOTO_METADATA (photo_metadata_get_type ())
+#define PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_METADATA, PhotoMetadata))
+#define PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_METADATA, PhotoMetadataClass))
+#define IS_PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_METADATA))
+#define IS_PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_METADATA))
+#define PHOTO_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_METADATA, PhotoMetadataClass))
+
+typedef struct _PhotoMetadata PhotoMetadata;
+typedef struct _PhotoMetadataClass PhotoMetadataClass;
+
+#define TYPE_DIMENSIONS (dimensions_get_type ())
+typedef struct _Dimensions Dimensions;
+
+#define TYPE_PHOTO_FILE_ADAPTER (photo_file_adapter_get_type ())
+#define PHOTO_FILE_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter))
+#define PHOTO_FILE_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapterClass))
+#define IS_PHOTO_FILE_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_ADAPTER))
+#define IS_PHOTO_FILE_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_ADAPTER))
+#define PHOTO_FILE_ADAPTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapterClass))
+
+typedef struct _PhotoFileAdapter PhotoFileAdapter;
+typedef struct _PhotoFileAdapterClass PhotoFileAdapterClass;
+typedef struct _PhotoFileAdapterPrivate PhotoFileAdapterPrivate;
+
+#define TYPE_PHOTO_FILE_READER (photo_file_reader_get_type ())
+#define PHOTO_FILE_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_READER, PhotoFileReader))
+#define PHOTO_FILE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_READER, PhotoFileReaderClass))
+#define IS_PHOTO_FILE_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_READER))
+#define IS_PHOTO_FILE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_READER))
+#define PHOTO_FILE_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_READER, PhotoFileReaderClass))
+
+typedef struct _PhotoFileReader PhotoFileReader;
+typedef struct _PhotoFileReaderClass PhotoFileReaderClass;
+typedef struct _PhotoFileReaderPrivate PhotoFileReaderPrivate;
+
+#define TYPE_GDK_READER (gdk_reader_get_type ())
+#define GDK_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GDK_READER, GdkReader))
+#define GDK_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GDK_READER, GdkReaderClass))
+#define IS_GDK_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GDK_READER))
+#define IS_GDK_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GDK_READER))
+#define GDK_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GDK_READER, GdkReaderClass))
+
+typedef struct _GdkReader GdkReader;
+typedef struct _GdkReaderClass GdkReaderClass;
+typedef struct _GdkReaderPrivate GdkReaderPrivate;
+
+#define PHOTOS_TYPE_BMP_READER (photos_bmp_reader_get_type ())
+#define PHOTOS_BMP_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHOTOS_TYPE_BMP_READER, PhotosBmpReader))
+#define PHOTOS_BMP_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOTOS_TYPE_BMP_READER, PhotosBmpReaderClass))
+#define PHOTOS_IS_BMP_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHOTOS_TYPE_BMP_READER))
+#define PHOTOS_IS_BMP_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOTOS_TYPE_BMP_READER))
+#define PHOTOS_BMP_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOTOS_TYPE_BMP_READER, PhotosBmpReaderClass))
+
+typedef struct _PhotosBmpReader PhotosBmpReader;
+typedef struct _PhotosBmpReaderClass PhotosBmpReaderClass;
+typedef struct _PhotosBmpReaderPrivate PhotosBmpReaderPrivate;
+
+#define TYPE_SCALE_CONSTRAINT (scale_constraint_get_type ())
+#define _g_free0(var) (var = (g_free (var), NULL))
+
+#define TYPE_PHOTO_FILE_WRITER (photo_file_writer_get_type ())
+#define PHOTO_FILE_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_WRITER, PhotoFileWriter))
+#define PHOTO_FILE_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_WRITER, PhotoFileWriterClass))
+#define IS_PHOTO_FILE_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_WRITER))
+#define IS_PHOTO_FILE_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_WRITER))
+#define PHOTO_FILE_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_WRITER, PhotoFileWriterClass))
+
+typedef struct _PhotoFileWriter PhotoFileWriter;
+typedef struct _PhotoFileWriterClass PhotoFileWriterClass;
+typedef struct _PhotoFileWriterPrivate PhotoFileWriterPrivate;
+
+#define JPEG_TYPE_QUALITY (jpeg_quality_get_type ())
+
+#define PHOTOS_TYPE_BMP_WRITER (photos_bmp_writer_get_type ())
+#define PHOTOS_BMP_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHOTOS_TYPE_BMP_WRITER, PhotosBmpWriter))
+#define PHOTOS_BMP_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOTOS_TYPE_BMP_WRITER, PhotosBmpWriterClass))
+#define PHOTOS_IS_BMP_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHOTOS_TYPE_BMP_WRITER))
+#define PHOTOS_IS_BMP_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOTOS_TYPE_BMP_WRITER))
+#define PHOTOS_BMP_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOTOS_TYPE_BMP_WRITER, PhotosBmpWriterClass))
+
+typedef struct _PhotosBmpWriter PhotosBmpWriter;
+typedef struct _PhotosBmpWriterClass PhotosBmpWriterClass;
+typedef struct _PhotosBmpWriterPrivate PhotosBmpWriterPrivate;
+
+#define TYPE_PHOTO_FILE_METADATA_WRITER (photo_file_metadata_writer_get_type ())
+#define PHOTO_FILE_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriter))
+#define PHOTO_FILE_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriterClass))
+#define IS_PHOTO_FILE_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_METADATA_WRITER))
+#define IS_PHOTO_FILE_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_METADATA_WRITER))
+#define PHOTO_FILE_METADATA_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriterClass))
+
+typedef struct _PhotoFileMetadataWriter PhotoFileMetadataWriter;
+typedef struct _PhotoFileMetadataWriterClass PhotoFileMetadataWriterClass;
+typedef struct _PhotoFileMetadataWriterPrivate PhotoFileMetadataWriterPrivate;
+
+#define PHOTOS_TYPE_BMP_METADATA_WRITER (photos_bmp_metadata_writer_get_type ())
+#define PHOTOS_BMP_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHOTOS_TYPE_BMP_METADATA_WRITER, PhotosBmpMetadataWriter))
+#define PHOTOS_BMP_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOTOS_TYPE_BMP_METADATA_WRITER, PhotosBmpMetadataWriterClass))
+#define PHOTOS_IS_BMP_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHOTOS_TYPE_BMP_METADATA_WRITER))
+#define PHOTOS_IS_BMP_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOTOS_TYPE_BMP_METADATA_WRITER))
+#define PHOTOS_BMP_METADATA_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOTOS_TYPE_BMP_METADATA_WRITER, PhotosBmpMetadataWriterClass))
+
+typedef struct _PhotosBmpMetadataWriter PhotosBmpMetadataWriter;
+typedef struct _PhotosBmpMetadataWriterClass PhotosBmpMetadataWriterClass;
+typedef struct _PhotosBmpMetadataWriterPrivate PhotosBmpMetadataWriterPrivate;
+
+#define TYPE_PHOTO_FILE_FORMAT_DRIVER (photo_file_format_driver_get_type ())
+#define PHOTO_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriver))
+#define PHOTO_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriverClass))
+#define IS_PHOTO_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_FORMAT_DRIVER))
+#define IS_PHOTO_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_FORMAT_DRIVER))
+#define PHOTO_FILE_FORMAT_DRIVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriverClass))
+
+typedef struct _PhotoFileFormatDriver PhotoFileFormatDriver;
+typedef struct _PhotoFileFormatDriverClass PhotoFileFormatDriverClass;
+typedef struct _PhotoFileFormatDriverPrivate PhotoFileFormatDriverPrivate;
+
+#define PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER (photos_bmp_file_format_driver_get_type ())
+#define PHOTOS_BMP_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER, PhotosBmpFileFormatDriver))
+#define PHOTOS_BMP_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER, PhotosBmpFileFormatDriverClass))
+#define PHOTOS_IS_BMP_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER))
+#define PHOTOS_IS_BMP_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER))
+#define PHOTOS_BMP_FILE_FORMAT_DRIVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER, PhotosBmpFileFormatDriverClass))
+
+typedef struct _PhotosBmpFileFormatDriver PhotosBmpFileFormatDriver;
+typedef struct _PhotosBmpFileFormatDriverClass PhotosBmpFileFormatDriverClass;
+typedef struct _PhotosBmpFileFormatDriverPrivate PhotosBmpFileFormatDriverPrivate;
+#define _photo_file_format_driver_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_format_driver_unref (var), NULL)))
+
+typedef enum {
+ PHOTO_FILE_FORMAT_JFIF,
+ PHOTO_FILE_FORMAT_RAW,
+ PHOTO_FILE_FORMAT_PNG,
+ PHOTO_FILE_FORMAT_TIFF,
+ PHOTO_FILE_FORMAT_BMP,
+ PHOTO_FILE_FORMAT_UNKNOWN
+} PhotoFileFormat;
+
+typedef enum {
+ PHOTO_FILE_FORMAT_FLAGS_NONE = 0x00000000
+} PhotoFileFormatFlags;
+
+struct _PhotoFileFormatProperties {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileFormatPropertiesPrivate * priv;
+};
+
+struct _PhotoFileFormatPropertiesClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileFormatProperties *self);
+ PhotoFileFormat (*get_file_format) (PhotoFileFormatProperties* self);
+ PhotoFileFormatFlags (*get_flags) (PhotoFileFormatProperties* self);
+ gboolean (*is_recognized_extension) (PhotoFileFormatProperties* self, const gchar* ext);
+ gchar* (*get_default_extension) (PhotoFileFormatProperties* self);
+ gchar** (*get_known_extensions) (PhotoFileFormatProperties* self, int* result_length1);
+ gchar* (*get_default_mime_type) (PhotoFileFormatProperties* self);
+ gchar** (*get_mime_types) (PhotoFileFormatProperties* self, int* result_length1);
+ gchar* (*get_user_visible_name) (PhotoFileFormatProperties* self);
+};
+
+struct _PhotosBmpFileFormatProperties {
+ PhotoFileFormatProperties parent_instance;
+ PhotosBmpFileFormatPropertiesPrivate * priv;
+};
+
+struct _PhotosBmpFileFormatPropertiesClass {
+ PhotoFileFormatPropertiesClass parent_class;
+};
+
+typedef enum {
+ PHOTO_FILE_SNIFFER_OPTIONS_GET_ALL = 0x00000000,
+ PHOTO_FILE_SNIFFER_OPTIONS_NO_MD5 = 0x00000001
+} PhotoFileSnifferOptions;
+
+struct _PhotoFileSniffer {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileSnifferPrivate * priv;
+ GFile* file;
+ PhotoFileSnifferOptions options;
+ gboolean calc_md5;
+};
+
+struct _PhotoFileSnifferClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileSniffer *self);
+ DetectedPhotoInformation* (*sniff) (PhotoFileSniffer* self, gboolean* is_corrupted, GError** error);
+};
+
+struct _GdkSniffer {
+ PhotoFileSniffer parent_instance;
+ GdkSnifferPrivate * priv;
+};
+
+struct _GdkSnifferClass {
+ PhotoFileSnifferClass parent_class;
+};
+
+struct _PhotosBmpSniffer {
+ GdkSniffer parent_instance;
+ PhotosBmpSnifferPrivate * priv;
+};
+
+struct _PhotosBmpSnifferClass {
+ GdkSnifferClass parent_class;
+};
+
+struct _Dimensions {
+ gint width;
+ gint height;
+};
+
+struct _DetectedPhotoInformation {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ DetectedPhotoInformationPrivate * priv;
+ PhotoFileFormat file_format;
+ PhotoMetadata* metadata;
+ gchar* md5;
+ gchar* exif_md5;
+ gchar* thumbnail_md5;
+ gchar* format_name;
+ Dimensions image_dim;
+ GdkColorspace colorspace;
+ gint channels;
+ gint bits_per_channel;
+};
+
+struct _DetectedPhotoInformationClass {
+ GTypeClass parent_class;
+ void (*finalize) (DetectedPhotoInformation *self);
+};
+
+struct _PhotoFileAdapter {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileAdapterPrivate * priv;
+};
+
+struct _PhotoFileAdapterClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileAdapter *self);
+};
+
+struct _PhotoFileReader {
+ PhotoFileAdapter parent_instance;
+ PhotoFileReaderPrivate * priv;
+};
+
+struct _PhotoFileReaderClass {
+ PhotoFileAdapterClass parent_class;
+ PhotoMetadata* (*read_metadata) (PhotoFileReader* self, GError** error);
+ GdkPixbuf* (*unscaled_read) (PhotoFileReader* self, GError** error);
+ GdkPixbuf* (*scaled_read) (PhotoFileReader* self, Dimensions* full, Dimensions* scaled, GError** error);
+};
+
+struct _GdkReader {
+ PhotoFileReader parent_instance;
+ GdkReaderPrivate * priv;
+};
+
+struct _GdkReaderClass {
+ PhotoFileReaderClass parent_class;
+};
+
+struct _PhotosBmpReader {
+ GdkReader parent_instance;
+ PhotosBmpReaderPrivate * priv;
+};
+
+struct _PhotosBmpReaderClass {
+ GdkReaderClass parent_class;
+};
+
+typedef enum {
+ SCALE_CONSTRAINT_ORIGINAL,
+ SCALE_CONSTRAINT_DIMENSIONS,
+ SCALE_CONSTRAINT_WIDTH,
+ SCALE_CONSTRAINT_HEIGHT,
+ SCALE_CONSTRAINT_FILL_VIEWPORT
+} ScaleConstraint;
+
+typedef enum {
+ JPEG_QUALITY_LOW = 50,
+ JPEG_QUALITY_MEDIUM = 75,
+ JPEG_QUALITY_HIGH = 90,
+ JPEG_QUALITY_MAXIMUM = 100
+} JpegQuality;
+
+struct _PhotoFileWriter {
+ PhotoFileAdapter parent_instance;
+ PhotoFileWriterPrivate * priv;
+};
+
+struct _PhotoFileWriterClass {
+ PhotoFileAdapterClass parent_class;
+ void (*write) (PhotoFileWriter* self, GdkPixbuf* pixbuf, JpegQuality quality, GError** error);
+};
+
+struct _PhotosBmpWriter {
+ PhotoFileWriter parent_instance;
+ PhotosBmpWriterPrivate * priv;
+};
+
+struct _PhotosBmpWriterClass {
+ PhotoFileWriterClass parent_class;
+};
+
+struct _PhotoFileMetadataWriter {
+ PhotoFileAdapter parent_instance;
+ PhotoFileMetadataWriterPrivate * priv;
+};
+
+struct _PhotoFileMetadataWriterClass {
+ PhotoFileAdapterClass parent_class;
+ void (*write_metadata) (PhotoFileMetadataWriter* self, PhotoMetadata* metadata, GError** error);
+};
+
+struct _PhotosBmpMetadataWriter {
+ PhotoFileMetadataWriter parent_instance;
+ PhotosBmpMetadataWriterPrivate * priv;
+};
+
+struct _PhotosBmpMetadataWriterClass {
+ PhotoFileMetadataWriterClass parent_class;
+};
+
+struct _PhotoFileFormatDriver {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileFormatDriverPrivate * priv;
+};
+
+struct _PhotoFileFormatDriverClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileFormatDriver *self);
+ PhotoFileFormatProperties* (*get_properties) (PhotoFileFormatDriver* self);
+ PhotoFileReader* (*create_reader) (PhotoFileFormatDriver* self, const gchar* filepath);
+ PhotoMetadata* (*create_metadata) (PhotoFileFormatDriver* self);
+ gboolean (*can_write_image) (PhotoFileFormatDriver* self);
+ gboolean (*can_write_metadata) (PhotoFileFormatDriver* self);
+ PhotoFileWriter* (*create_writer) (PhotoFileFormatDriver* self, const gchar* filepath);
+ PhotoFileMetadataWriter* (*create_metadata_writer) (PhotoFileFormatDriver* self, const gchar* filepath);
+ PhotoFileSniffer* (*create_sniffer) (PhotoFileFormatDriver* self, GFile* file, PhotoFileSnifferOptions options);
+};
+
+struct _PhotosBmpFileFormatDriver {
+ PhotoFileFormatDriver parent_instance;
+ PhotosBmpFileFormatDriverPrivate * priv;
+};
+
+struct _PhotosBmpFileFormatDriverClass {
+ PhotoFileFormatDriverClass parent_class;
+};
+
+
+static gpointer photos_bmp_file_format_properties_parent_class = NULL;
+static gchar** photos_bmp_file_format_properties_KNOWN_EXTENSIONS;
+static gint photos_bmp_file_format_properties_KNOWN_EXTENSIONS_length1;
+static gchar** photos_bmp_file_format_properties_KNOWN_EXTENSIONS = NULL;
+static gint photos_bmp_file_format_properties_KNOWN_EXTENSIONS_length1 = 0;
+static gint _photos_bmp_file_format_properties_KNOWN_EXTENSIONS_size_ = 0;
+static gchar** photos_bmp_file_format_properties_KNOWN_MIME_TYPES;
+static gint photos_bmp_file_format_properties_KNOWN_MIME_TYPES_length1;
+static gchar** photos_bmp_file_format_properties_KNOWN_MIME_TYPES = NULL;
+static gint photos_bmp_file_format_properties_KNOWN_MIME_TYPES_length1 = 0;
+static gint _photos_bmp_file_format_properties_KNOWN_MIME_TYPES_size_ = 0;
+static PhotosBmpFileFormatProperties* photos_bmp_file_format_properties_instance;
+static PhotosBmpFileFormatProperties* photos_bmp_file_format_properties_instance = NULL;
+static gpointer photos_bmp_sniffer_parent_class = NULL;
+static gpointer photos_bmp_reader_parent_class = NULL;
+static gpointer photos_bmp_writer_parent_class = NULL;
+static gpointer photos_bmp_metadata_writer_parent_class = NULL;
+static gpointer photos_bmp_file_format_driver_parent_class = NULL;
+static PhotosBmpFileFormatDriver* photos_bmp_file_format_driver_instance;
+static PhotosBmpFileFormatDriver* photos_bmp_file_format_driver_instance = NULL;
+
+gpointer photo_file_format_properties_ref (gpointer instance);
+void photo_file_format_properties_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_format_properties (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_format_properties (GValue* value, gpointer v_object);
+void value_take_photo_file_format_properties (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_format_properties (const GValue* value);
+GType photo_file_format_properties_get_type (void) G_GNUC_CONST;
+GType photo_file_format_get_type (void) G_GNUC_CONST;
+GType photo_file_format_flags_get_type (void) G_GNUC_CONST;
+GType photos_bmp_file_format_properties_get_type (void) G_GNUC_CONST;
+enum {
+ PHOTOS_BMP_FILE_FORMAT_PROPERTIES_DUMMY_PROPERTY
+};
+void photos_bmp_file_format_properties_init (void);
+PhotosBmpFileFormatProperties* photos_bmp_file_format_properties_new (void);
+PhotosBmpFileFormatProperties* photos_bmp_file_format_properties_construct (GType object_type);
+PhotosBmpFileFormatProperties* photos_bmp_file_format_properties_get_instance (void);
+static PhotoFileFormat photos_bmp_file_format_properties_real_get_file_format (PhotoFileFormatProperties* base);
+static PhotoFileFormatFlags photos_bmp_file_format_properties_real_get_flags (PhotoFileFormatProperties* base);
+static gchar* photos_bmp_file_format_properties_real_get_user_visible_name (PhotoFileFormatProperties* base);
+static gchar* photos_bmp_file_format_properties_real_get_default_extension (PhotoFileFormatProperties* base);
+static gchar** photos_bmp_file_format_properties_real_get_known_extensions (PhotoFileFormatProperties* base, int* result_length1);
+static gchar** _vala_array_dup10 (gchar** self, int length);
+static gchar* photos_bmp_file_format_properties_real_get_default_mime_type (PhotoFileFormatProperties* base);
+static gchar** photos_bmp_file_format_properties_real_get_mime_types (PhotoFileFormatProperties* base, int* result_length1);
+static gchar** _vala_array_dup11 (gchar** self, int length);
+PhotoFileFormatProperties* photo_file_format_properties_construct (GType object_type);
+static void photos_bmp_file_format_properties_finalize (PhotoFileFormatProperties* obj);
+gpointer photo_file_sniffer_ref (gpointer instance);
+void photo_file_sniffer_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_sniffer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_sniffer (GValue* value, gpointer v_object);
+void value_take_photo_file_sniffer (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_sniffer (const GValue* value);
+GType photo_file_sniffer_get_type (void) G_GNUC_CONST;
+gpointer detected_photo_information_ref (gpointer instance);
+void detected_photo_information_unref (gpointer instance);
+GParamSpec* param_spec_detected_photo_information (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_detected_photo_information (GValue* value, gpointer v_object);
+void value_take_detected_photo_information (GValue* value, gpointer v_object);
+gpointer value_get_detected_photo_information (const GValue* value);
+GType detected_photo_information_get_type (void) G_GNUC_CONST;
+GType photo_file_sniffer_options_get_type (void) G_GNUC_CONST;
+GType gdk_sniffer_get_type (void) G_GNUC_CONST;
+GType photos_bmp_sniffer_get_type (void) G_GNUC_CONST;
+enum {
+ PHOTOS_BMP_SNIFFER_DUMMY_PROPERTY
+};
+PhotosBmpSniffer* photos_bmp_sniffer_new (GFile* file, PhotoFileSnifferOptions options);
+PhotosBmpSniffer* photos_bmp_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options);
+GdkSniffer* gdk_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options);
+static gboolean photos_bmp_sniffer_is_bmp_file (GFile* file, GError** error);
+static DetectedPhotoInformation* photos_bmp_sniffer_real_sniff (PhotoFileSniffer* base, gboolean* is_corrupted, GError** error);
+DetectedPhotoInformation* photo_file_sniffer_sniff (PhotoFileSniffer* self, gboolean* is_corrupted, GError** error);
+gpointer media_metadata_ref (gpointer instance);
+void media_metadata_unref (gpointer instance);
+GParamSpec* param_spec_media_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_media_metadata (GValue* value, gpointer v_object);
+void value_take_media_metadata (GValue* value, gpointer v_object);
+gpointer value_get_media_metadata (const GValue* value);
+GType media_metadata_get_type (void) G_GNUC_CONST;
+GType photo_metadata_get_type (void) G_GNUC_CONST;
+GType dimensions_get_type (void) G_GNUC_CONST;
+Dimensions* dimensions_dup (const Dimensions* self);
+void dimensions_free (Dimensions* self);
+gpointer photo_file_adapter_ref (gpointer instance);
+void photo_file_adapter_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_adapter (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_adapter (GValue* value, gpointer v_object);
+void value_take_photo_file_adapter (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_adapter (const GValue* value);
+GType photo_file_adapter_get_type (void) G_GNUC_CONST;
+GType photo_file_reader_get_type (void) G_GNUC_CONST;
+GType gdk_reader_get_type (void) G_GNUC_CONST;
+GType photos_bmp_reader_get_type (void) G_GNUC_CONST;
+enum {
+ PHOTOS_BMP_READER_DUMMY_PROPERTY
+};
+PhotosBmpReader* photos_bmp_reader_new (const gchar* filepath);
+PhotosBmpReader* photos_bmp_reader_construct (GType object_type, const gchar* filepath);
+GdkReader* gdk_reader_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
+static GdkPixbuf* photos_bmp_reader_real_scaled_read (PhotoFileReader* base, Dimensions* full, Dimensions* scaled, GError** error);
+GType scale_constraint_get_type (void) G_GNUC_CONST;
+void dimensions_get_scaled_by_constraint (Dimensions *self, gint scale, ScaleConstraint constraint, Dimensions* result);
+gchar* photo_file_adapter_get_filepath (PhotoFileAdapter* self);
+GType photo_file_writer_get_type (void) G_GNUC_CONST;
+GType jpeg_quality_get_type (void) G_GNUC_CONST;
+GType photos_bmp_writer_get_type (void) G_GNUC_CONST;
+enum {
+ PHOTOS_BMP_WRITER_DUMMY_PROPERTY
+};
+PhotosBmpWriter* photos_bmp_writer_new (const gchar* filepath);
+PhotosBmpWriter* photos_bmp_writer_construct (GType object_type, const gchar* filepath);
+PhotoFileWriter* photo_file_writer_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
+static void photos_bmp_writer_real_write (PhotoFileWriter* base, GdkPixbuf* pixbuf, JpegQuality quality, GError** error);
+GType photo_file_metadata_writer_get_type (void) G_GNUC_CONST;
+GType photos_bmp_metadata_writer_get_type (void) G_GNUC_CONST;
+enum {
+ PHOTOS_BMP_METADATA_WRITER_DUMMY_PROPERTY
+};
+PhotosBmpMetadataWriter* photos_bmp_metadata_writer_new (const gchar* filepath);
+PhotosBmpMetadataWriter* photos_bmp_metadata_writer_construct (GType object_type, const gchar* filepath);
+PhotoFileMetadataWriter* photo_file_metadata_writer_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
+static void photos_bmp_metadata_writer_real_write_metadata (PhotoFileMetadataWriter* base, PhotoMetadata* metadata, GError** error);
+gpointer photo_file_format_driver_ref (gpointer instance);
+void photo_file_format_driver_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_format_driver (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_format_driver (GValue* value, gpointer v_object);
+void value_take_photo_file_format_driver (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_format_driver (const GValue* value);
+GType photo_file_format_driver_get_type (void) G_GNUC_CONST;
+GType photos_bmp_file_format_driver_get_type (void) G_GNUC_CONST;
+enum {
+ PHOTOS_BMP_FILE_FORMAT_DRIVER_DUMMY_PROPERTY
+};
+void photos_bmp_file_format_driver_init (void);
+PhotosBmpFileFormatDriver* photos_bmp_file_format_driver_new (void);
+PhotosBmpFileFormatDriver* photos_bmp_file_format_driver_construct (GType object_type);
+PhotosBmpFileFormatDriver* photos_bmp_file_format_driver_get_instance (void);
+static PhotoFileFormatProperties* photos_bmp_file_format_driver_real_get_properties (PhotoFileFormatDriver* base);
+static PhotoFileReader* photos_bmp_file_format_driver_real_create_reader (PhotoFileFormatDriver* base, const gchar* filepath);
+static gboolean photos_bmp_file_format_driver_real_can_write_image (PhotoFileFormatDriver* base);
+static gboolean photos_bmp_file_format_driver_real_can_write_metadata (PhotoFileFormatDriver* base);
+static PhotoFileWriter* photos_bmp_file_format_driver_real_create_writer (PhotoFileFormatDriver* base, const gchar* filepath);
+static PhotoFileMetadataWriter* photos_bmp_file_format_driver_real_create_metadata_writer (PhotoFileFormatDriver* base, const gchar* filepath);
+static PhotoFileSniffer* photos_bmp_file_format_driver_real_create_sniffer (PhotoFileFormatDriver* base, GFile* file, PhotoFileSnifferOptions options);
+static PhotoMetadata* photos_bmp_file_format_driver_real_create_metadata (PhotoFileFormatDriver* base);
+PhotoMetadata* photo_metadata_new (void);
+PhotoMetadata* photo_metadata_construct (GType object_type);
+PhotoFileFormatDriver* photo_file_format_driver_construct (GType object_type);
+static void photos_bmp_file_format_driver_finalize (PhotoFileFormatDriver* obj);
+
+static const guint8 PHOTOS_BMP_SNIFFER_MAGIC_SEQUENCE[2] = {(guint8) 0x42, (guint8) 0x4D};
+
+void photos_bmp_file_format_properties_init (void) {
+ PhotosBmpFileFormatProperties* _tmp0_ = NULL;
+#line 16 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = photos_bmp_file_format_properties_new ();
+#line 16 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _photo_file_format_properties_unref0 (photos_bmp_file_format_properties_instance);
+#line 16 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ photos_bmp_file_format_properties_instance = _tmp0_;
+#line 626 "BmpSupport.c"
+}
+
+
+static gpointer _photo_file_format_properties_ref0 (gpointer self) {
+#line 20 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return self ? photo_file_format_properties_ref (self) : NULL;
+#line 633 "BmpSupport.c"
+}
+
+
+PhotosBmpFileFormatProperties* photos_bmp_file_format_properties_get_instance (void) {
+ PhotosBmpFileFormatProperties* result = NULL;
+ PhotosBmpFileFormatProperties* _tmp0_ = NULL;
+ PhotosBmpFileFormatProperties* _tmp1_ = NULL;
+#line 20 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = photos_bmp_file_format_properties_instance;
+#line 20 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp1_ = _photo_file_format_properties_ref0 (_tmp0_);
+#line 20 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = _tmp1_;
+#line 20 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 649 "BmpSupport.c"
+}
+
+
+static PhotoFileFormat photos_bmp_file_format_properties_real_get_file_format (PhotoFileFormatProperties* base) {
+ PhotosBmpFileFormatProperties * self;
+ PhotoFileFormat result = 0;
+#line 23 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_BMP_FILE_FORMAT_PROPERTIES, PhotosBmpFileFormatProperties);
+#line 24 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = PHOTO_FILE_FORMAT_BMP;
+#line 24 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 662 "BmpSupport.c"
+}
+
+
+static PhotoFileFormatFlags photos_bmp_file_format_properties_real_get_flags (PhotoFileFormatProperties* base) {
+ PhotosBmpFileFormatProperties * self;
+ PhotoFileFormatFlags result = 0;
+#line 27 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_BMP_FILE_FORMAT_PROPERTIES, PhotosBmpFileFormatProperties);
+#line 28 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = PHOTO_FILE_FORMAT_FLAGS_NONE;
+#line 28 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 675 "BmpSupport.c"
+}
+
+
+static gchar* photos_bmp_file_format_properties_real_get_user_visible_name (PhotoFileFormatProperties* base) {
+ PhotosBmpFileFormatProperties * self;
+ gchar* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+#line 31 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_BMP_FILE_FORMAT_PROPERTIES, PhotosBmpFileFormatProperties);
+#line 32 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = _ ("BMP");
+#line 32 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 32 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = _tmp1_;
+#line 32 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 694 "BmpSupport.c"
+}
+
+
+static gchar* photos_bmp_file_format_properties_real_get_default_extension (PhotoFileFormatProperties* base) {
+ PhotosBmpFileFormatProperties * self;
+ gchar* result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+#line 35 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_BMP_FILE_FORMAT_PROPERTIES, PhotosBmpFileFormatProperties);
+#line 36 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = photos_bmp_file_format_properties_KNOWN_EXTENSIONS;
+#line 36 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0__length1 = photos_bmp_file_format_properties_KNOWN_EXTENSIONS_length1;
+#line 36 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp1_ = _tmp0_[0];
+#line 36 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp2_ = g_strdup (_tmp1_);
+#line 36 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = _tmp2_;
+#line 36 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 719 "BmpSupport.c"
+}
+
+
+static gchar** _vala_array_dup10 (gchar** self, int length) {
+ gchar** result;
+ int i;
+#line 40 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = g_new0 (gchar*, length + 1);
+#line 40 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ for (i = 0; i < length; i++) {
+#line 730 "BmpSupport.c"
+ gchar* _tmp0_ = NULL;
+#line 40 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = g_strdup (self[i]);
+#line 40 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result[i] = _tmp0_;
+#line 736 "BmpSupport.c"
+ }
+#line 40 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 740 "BmpSupport.c"
+}
+
+
+static gchar** photos_bmp_file_format_properties_real_get_known_extensions (PhotoFileFormatProperties* base, int* result_length1) {
+ PhotosBmpFileFormatProperties * self;
+ gchar** result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ gchar** _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+ gchar** _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+#line 39 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_BMP_FILE_FORMAT_PROPERTIES, PhotosBmpFileFormatProperties);
+#line 40 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = photos_bmp_file_format_properties_KNOWN_EXTENSIONS;
+#line 40 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0__length1 = photos_bmp_file_format_properties_KNOWN_EXTENSIONS_length1;
+#line 40 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup10 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
+#line 40 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp1__length1 = _tmp0__length1;
+#line 40 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 40 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp2__length1 = _tmp1__length1;
+#line 40 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (result_length1) {
+#line 40 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ *result_length1 = _tmp2__length1;
+#line 771 "BmpSupport.c"
+ }
+#line 40 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = _tmp2_;
+#line 40 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 777 "BmpSupport.c"
+}
+
+
+static gchar* photos_bmp_file_format_properties_real_get_default_mime_type (PhotoFileFormatProperties* base) {
+ PhotosBmpFileFormatProperties * self;
+ gchar* result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+#line 43 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_BMP_FILE_FORMAT_PROPERTIES, PhotosBmpFileFormatProperties);
+#line 44 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = photos_bmp_file_format_properties_KNOWN_MIME_TYPES;
+#line 44 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0__length1 = photos_bmp_file_format_properties_KNOWN_MIME_TYPES_length1;
+#line 44 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp1_ = _tmp0_[0];
+#line 44 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp2_ = g_strdup (_tmp1_);
+#line 44 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = _tmp2_;
+#line 44 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 802 "BmpSupport.c"
+}
+
+
+static gchar** _vala_array_dup11 (gchar** self, int length) {
+ gchar** result;
+ int i;
+#line 48 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = g_new0 (gchar*, length + 1);
+#line 48 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ for (i = 0; i < length; i++) {
+#line 813 "BmpSupport.c"
+ gchar* _tmp0_ = NULL;
+#line 48 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = g_strdup (self[i]);
+#line 48 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result[i] = _tmp0_;
+#line 819 "BmpSupport.c"
+ }
+#line 48 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 823 "BmpSupport.c"
+}
+
+
+static gchar** photos_bmp_file_format_properties_real_get_mime_types (PhotoFileFormatProperties* base, int* result_length1) {
+ PhotosBmpFileFormatProperties * self;
+ gchar** result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ gchar** _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+ gchar** _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+#line 47 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_BMP_FILE_FORMAT_PROPERTIES, PhotosBmpFileFormatProperties);
+#line 48 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = photos_bmp_file_format_properties_KNOWN_MIME_TYPES;
+#line 48 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0__length1 = photos_bmp_file_format_properties_KNOWN_MIME_TYPES_length1;
+#line 48 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup11 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
+#line 48 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp1__length1 = _tmp0__length1;
+#line 48 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 48 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp2__length1 = _tmp1__length1;
+#line 48 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (result_length1) {
+#line 48 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ *result_length1 = _tmp2__length1;
+#line 854 "BmpSupport.c"
+ }
+#line 48 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = _tmp2_;
+#line 48 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 860 "BmpSupport.c"
+}
+
+
+PhotosBmpFileFormatProperties* photos_bmp_file_format_properties_construct (GType object_type) {
+ PhotosBmpFileFormatProperties* self = NULL;
+#line 9 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = (PhotosBmpFileFormatProperties*) photo_file_format_properties_construct (object_type);
+#line 9 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return self;
+#line 870 "BmpSupport.c"
+}
+
+
+PhotosBmpFileFormatProperties* photos_bmp_file_format_properties_new (void) {
+#line 9 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return photos_bmp_file_format_properties_construct (PHOTOS_TYPE_BMP_FILE_FORMAT_PROPERTIES);
+#line 877 "BmpSupport.c"
+}
+
+
+static void photos_bmp_file_format_properties_class_init (PhotosBmpFileFormatPropertiesClass * klass) {
+ gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar** _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ gchar** _tmp4_ = NULL;
+#line 9 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ photos_bmp_file_format_properties_parent_class = g_type_class_peek_parent (klass);
+#line 9 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->finalize = photos_bmp_file_format_properties_finalize;
+#line 9 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_file_format = photos_bmp_file_format_properties_real_get_file_format;
+#line 9 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_flags = photos_bmp_file_format_properties_real_get_flags;
+#line 9 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_user_visible_name = photos_bmp_file_format_properties_real_get_user_visible_name;
+#line 9 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_default_extension = photos_bmp_file_format_properties_real_get_default_extension;
+#line 9 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_known_extensions = photos_bmp_file_format_properties_real_get_known_extensions;
+#line 9 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_default_mime_type = photos_bmp_file_format_properties_real_get_default_mime_type;
+#line 9 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_mime_types = photos_bmp_file_format_properties_real_get_mime_types;
+#line 10 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = g_strdup ("bmp");
+#line 10 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp1_ = g_strdup ("dib");
+#line 10 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp2_ = g_new0 (gchar*, 2 + 1);
+#line 10 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp2_[0] = _tmp0_;
+#line 10 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp2_[1] = _tmp1_;
+#line 10 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ photos_bmp_file_format_properties_KNOWN_EXTENSIONS = _tmp2_;
+#line 10 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ photos_bmp_file_format_properties_KNOWN_EXTENSIONS_length1 = 2;
+#line 11 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp3_ = g_strdup (GP_MIME_BMP);
+#line 11 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp4_ = g_new0 (gchar*, 1 + 1);
+#line 11 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp4_[0] = _tmp3_;
+#line 11 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ photos_bmp_file_format_properties_KNOWN_MIME_TYPES = _tmp4_;
+#line 11 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ photos_bmp_file_format_properties_KNOWN_MIME_TYPES_length1 = 1;
+#line 929 "BmpSupport.c"
+}
+
+
+static void photos_bmp_file_format_properties_instance_init (PhotosBmpFileFormatProperties * self) {
+}
+
+
+static void photos_bmp_file_format_properties_finalize (PhotoFileFormatProperties* obj) {
+ PhotosBmpFileFormatProperties * self;
+#line 9 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, PHOTOS_TYPE_BMP_FILE_FORMAT_PROPERTIES, PhotosBmpFileFormatProperties);
+#line 9 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ PHOTO_FILE_FORMAT_PROPERTIES_CLASS (photos_bmp_file_format_properties_parent_class)->finalize (obj);
+#line 943 "BmpSupport.c"
+}
+
+
+GType photos_bmp_file_format_properties_get_type (void) {
+ static volatile gsize photos_bmp_file_format_properties_type_id__volatile = 0;
+ if (g_once_init_enter (&photos_bmp_file_format_properties_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PhotosBmpFileFormatPropertiesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photos_bmp_file_format_properties_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotosBmpFileFormatProperties), 0, (GInstanceInitFunc) photos_bmp_file_format_properties_instance_init, NULL };
+ GType photos_bmp_file_format_properties_type_id;
+ photos_bmp_file_format_properties_type_id = g_type_register_static (TYPE_PHOTO_FILE_FORMAT_PROPERTIES, "PhotosBmpFileFormatProperties", &g_define_type_info, 0);
+ g_once_init_leave (&photos_bmp_file_format_properties_type_id__volatile, photos_bmp_file_format_properties_type_id);
+ }
+ return photos_bmp_file_format_properties_type_id__volatile;
+}
+
+
+PhotosBmpSniffer* photos_bmp_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options) {
+ PhotosBmpSniffer* self = NULL;
+ GFile* _tmp0_ = NULL;
+ PhotoFileSnifferOptions _tmp1_ = 0;
+#line 55 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_return_val_if_fail (G_IS_FILE (file), NULL);
+#line 56 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = file;
+#line 56 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp1_ = options;
+#line 56 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = (PhotosBmpSniffer*) gdk_sniffer_construct (object_type, _tmp0_, _tmp1_);
+#line 55 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return self;
+#line 973 "BmpSupport.c"
+}
+
+
+PhotosBmpSniffer* photos_bmp_sniffer_new (GFile* file, PhotoFileSnifferOptions options) {
+#line 55 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return photos_bmp_sniffer_construct (PHOTOS_TYPE_BMP_SNIFFER, file, options);
+#line 980 "BmpSupport.c"
+}
+
+
+static gboolean photos_bmp_sniffer_is_bmp_file (GFile* file, GError** error) {
+ gboolean result = FALSE;
+ GFileInputStream* instream = NULL;
+ GFile* _tmp0_ = NULL;
+ GFileInputStream* _tmp1_ = NULL;
+ guint8* file_lead_sequence = NULL;
+ guint8* _tmp2_ = NULL;
+ gint file_lead_sequence_length1 = 0;
+ gint _file_lead_sequence_size_ = 0;
+ GFileInputStream* _tmp3_ = NULL;
+ guint8* _tmp4_ = NULL;
+ gint _tmp4__length1 = 0;
+ GError * _inner_error_ = NULL;
+#line 59 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_return_val_if_fail (G_IS_FILE (file), FALSE);
+#line 60 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = file;
+#line 60 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp1_ = g_file_read (_tmp0_, NULL, &_inner_error_);
+#line 60 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ instream = _tmp1_;
+#line 60 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 60 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 60 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return FALSE;
+#line 1011 "BmpSupport.c"
+ }
+#line 62 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp2_ = g_new0 (guint8, G_N_ELEMENTS (PHOTOS_BMP_SNIFFER_MAGIC_SEQUENCE));
+#line 62 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ file_lead_sequence = _tmp2_;
+#line 62 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ file_lead_sequence_length1 = G_N_ELEMENTS (PHOTOS_BMP_SNIFFER_MAGIC_SEQUENCE);
+#line 62 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _file_lead_sequence_size_ = file_lead_sequence_length1;
+#line 64 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp3_ = instream;
+#line 64 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp4_ = file_lead_sequence;
+#line 64 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp4__length1 = file_lead_sequence_length1;
+#line 64 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_input_stream_read (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, G_TYPE_INPUT_STREAM, GInputStream), _tmp4_, (gsize) _tmp4__length1, NULL, &_inner_error_);
+#line 64 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 64 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 64 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ file_lead_sequence = (g_free (file_lead_sequence), NULL);
+#line 64 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _g_object_unref0 (instream);
+#line 64 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return FALSE;
+#line 1039 "BmpSupport.c"
+ }
+ {
+ gint i = 0;
+#line 66 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ i = 0;
+#line 1045 "BmpSupport.c"
+ {
+ gboolean _tmp5_ = FALSE;
+#line 66 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp5_ = TRUE;
+#line 66 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ while (TRUE) {
+#line 1052 "BmpSupport.c"
+ gint _tmp7_ = 0;
+ guint8* _tmp8_ = NULL;
+ gint _tmp8__length1 = 0;
+ gint _tmp9_ = 0;
+ guint8 _tmp10_ = 0U;
+ gint _tmp11_ = 0;
+ guint8 _tmp12_ = 0U;
+#line 66 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (!_tmp5_) {
+#line 1062 "BmpSupport.c"
+ gint _tmp6_ = 0;
+#line 66 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp6_ = i;
+#line 66 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ i = _tmp6_ + 1;
+#line 1068 "BmpSupport.c"
+ }
+#line 66 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp5_ = FALSE;
+#line 66 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp7_ = i;
+#line 66 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (!(_tmp7_ < G_N_ELEMENTS (PHOTOS_BMP_SNIFFER_MAGIC_SEQUENCE))) {
+#line 66 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ break;
+#line 1078 "BmpSupport.c"
+ }
+#line 67 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp8_ = file_lead_sequence;
+#line 67 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp8__length1 = file_lead_sequence_length1;
+#line 67 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp9_ = i;
+#line 67 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp10_ = _tmp8_[_tmp9_];
+#line 67 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp11_ = i;
+#line 67 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp12_ = PHOTOS_BMP_SNIFFER_MAGIC_SEQUENCE[_tmp11_];
+#line 67 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (_tmp10_ != _tmp12_) {
+#line 68 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = FALSE;
+#line 68 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ file_lead_sequence = (g_free (file_lead_sequence), NULL);
+#line 68 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _g_object_unref0 (instream);
+#line 68 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 1102 "BmpSupport.c"
+ }
+ }
+ }
+ }
+#line 71 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = TRUE;
+#line 71 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ file_lead_sequence = (g_free (file_lead_sequence), NULL);
+#line 71 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _g_object_unref0 (instream);
+#line 71 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 1115 "BmpSupport.c"
+}
+
+
+static gpointer _detected_photo_information_ref0 (gpointer self) {
+#line 85 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return self ? detected_photo_information_ref (self) : NULL;
+#line 1122 "BmpSupport.c"
+}
+
+
+static DetectedPhotoInformation* photos_bmp_sniffer_real_sniff (PhotoFileSniffer* base, gboolean* is_corrupted, GError** error) {
+ PhotosBmpSniffer * self;
+ gboolean _vala_is_corrupted = FALSE;
+ DetectedPhotoInformation* result = NULL;
+ gboolean _tmp0_ = FALSE;
+ GFile* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+ DetectedPhotoInformation* detected = NULL;
+ gboolean _tmp3_ = FALSE;
+ DetectedPhotoInformation* _tmp4_ = NULL;
+ DetectedPhotoInformation* _tmp5_ = NULL;
+ DetectedPhotoInformation* _tmp6_ = NULL;
+ DetectedPhotoInformation* _tmp7_ = NULL;
+ PhotoFileFormat _tmp8_ = 0;
+ DetectedPhotoInformation* _tmp10_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 74 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_BMP_SNIFFER, PhotosBmpSniffer);
+#line 76 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _vala_is_corrupted = FALSE;
+#line 78 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer)->file;
+#line 78 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp2_ = photos_bmp_sniffer_is_bmp_file (_tmp1_, &_inner_error_);
+#line 78 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = _tmp2_;
+#line 78 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 78 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 78 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return NULL;
+#line 1158 "BmpSupport.c"
+ }
+#line 78 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (!_tmp0_) {
+#line 79 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = NULL;
+#line 79 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (is_corrupted) {
+#line 79 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ *is_corrupted = _vala_is_corrupted;
+#line 1168 "BmpSupport.c"
+ }
+#line 79 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 1172 "BmpSupport.c"
+ }
+#line 81 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp4_ = PHOTO_FILE_SNIFFER_CLASS (photos_bmp_sniffer_parent_class)->sniff (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_GDK_SNIFFER, GdkSniffer), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer), &_tmp3_, &_inner_error_);
+#line 81 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _vala_is_corrupted = _tmp3_;
+#line 81 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ detected = _tmp4_;
+#line 81 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 81 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 81 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return NULL;
+#line 1186 "BmpSupport.c"
+ }
+#line 82 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp5_ = detected;
+#line 82 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (_tmp5_ == NULL) {
+#line 83 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = NULL;
+#line 83 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _detected_photo_information_unref0 (detected);
+#line 83 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (is_corrupted) {
+#line 83 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ *is_corrupted = _vala_is_corrupted;
+#line 1200 "BmpSupport.c"
+ }
+#line 83 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 1204 "BmpSupport.c"
+ }
+#line 85 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp7_ = detected;
+#line 85 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp8_ = _tmp7_->file_format;
+#line 85 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (_tmp8_ == PHOTO_FILE_FORMAT_BMP) {
+#line 1212 "BmpSupport.c"
+ DetectedPhotoInformation* _tmp9_ = NULL;
+#line 85 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp9_ = detected;
+#line 85 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp6_ = _tmp9_;
+#line 1218 "BmpSupport.c"
+ } else {
+#line 85 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp6_ = NULL;
+#line 1222 "BmpSupport.c"
+ }
+#line 85 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp10_ = _detected_photo_information_ref0 (_tmp6_);
+#line 85 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = _tmp10_;
+#line 85 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _detected_photo_information_unref0 (detected);
+#line 85 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (is_corrupted) {
+#line 85 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ *is_corrupted = _vala_is_corrupted;
+#line 1234 "BmpSupport.c"
+ }
+#line 85 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 1238 "BmpSupport.c"
+}
+
+
+static void photos_bmp_sniffer_class_init (PhotosBmpSnifferClass * klass) {
+#line 52 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ photos_bmp_sniffer_parent_class = g_type_class_peek_parent (klass);
+#line 52 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileSnifferClass *) klass)->sniff = photos_bmp_sniffer_real_sniff;
+#line 1247 "BmpSupport.c"
+}
+
+
+static void photos_bmp_sniffer_instance_init (PhotosBmpSniffer * self) {
+}
+
+
+GType photos_bmp_sniffer_get_type (void) {
+ static volatile gsize photos_bmp_sniffer_type_id__volatile = 0;
+ if (g_once_init_enter (&photos_bmp_sniffer_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PhotosBmpSnifferClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photos_bmp_sniffer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotosBmpSniffer), 0, (GInstanceInitFunc) photos_bmp_sniffer_instance_init, NULL };
+ GType photos_bmp_sniffer_type_id;
+ photos_bmp_sniffer_type_id = g_type_register_static (TYPE_GDK_SNIFFER, "PhotosBmpSniffer", &g_define_type_info, 0);
+ g_once_init_leave (&photos_bmp_sniffer_type_id__volatile, photos_bmp_sniffer_type_id);
+ }
+ return photos_bmp_sniffer_type_id__volatile;
+}
+
+
+PhotosBmpReader* photos_bmp_reader_construct (GType object_type, const gchar* filepath) {
+ PhotosBmpReader* self = NULL;
+ const gchar* _tmp0_ = NULL;
+#line 90 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 91 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = filepath;
+#line 91 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = (PhotosBmpReader*) gdk_reader_construct (object_type, _tmp0_, PHOTO_FILE_FORMAT_BMP);
+#line 90 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return self;
+#line 1278 "BmpSupport.c"
+}
+
+
+PhotosBmpReader* photos_bmp_reader_new (const gchar* filepath) {
+#line 90 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return photos_bmp_reader_construct (PHOTOS_TYPE_BMP_READER, filepath);
+#line 1285 "BmpSupport.c"
+}
+
+
+static GdkPixbuf* photos_bmp_reader_real_scaled_read (PhotoFileReader* base, Dimensions* full, Dimensions* scaled, GError** error) {
+ PhotosBmpReader * self;
+ GdkPixbuf* result = NULL;
+ GdkPixbuf* _result_ = NULL;
+ gboolean _tmp0_ = FALSE;
+ gboolean _tmp1_ = FALSE;
+ Dimensions _tmp2_ = {0};
+ gint _tmp3_ = 0;
+ GError * _inner_error_ = NULL;
+#line 94 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_BMP_READER, PhotosBmpReader);
+#line 94 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_return_val_if_fail (full != NULL, NULL);
+#line 94 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_return_val_if_fail (scaled != NULL, NULL);
+#line 95 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _result_ = NULL;
+#line 104 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp2_ = *full;
+#line 104 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp3_ = _tmp2_.width;
+#line 104 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (_tmp3_ > 9999) {
+#line 104 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp1_ = TRUE;
+#line 1314 "BmpSupport.c"
+ } else {
+ Dimensions _tmp4_ = {0};
+ gint _tmp5_ = 0;
+#line 104 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp4_ = *full;
+#line 104 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp5_ = _tmp4_.height;
+#line 104 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp1_ = _tmp5_ > 9999;
+#line 1324 "BmpSupport.c"
+ }
+#line 104 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (_tmp1_) {
+#line 1328 "BmpSupport.c"
+ gboolean _tmp6_ = FALSE;
+ Dimensions _tmp7_ = {0};
+ gint _tmp8_ = 0;
+#line 104 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp7_ = *scaled;
+#line 104 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp8_ = _tmp7_.width;
+#line 104 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (_tmp8_ < 100) {
+#line 104 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp6_ = TRUE;
+#line 1340 "BmpSupport.c"
+ } else {
+ Dimensions _tmp9_ = {0};
+ gint _tmp10_ = 0;
+#line 105 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp9_ = *scaled;
+#line 105 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp10_ = _tmp9_.height;
+#line 105 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp6_ = _tmp10_ < 100;
+#line 1350 "BmpSupport.c"
+ }
+#line 104 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = _tmp6_;
+#line 1354 "BmpSupport.c"
+ } else {
+#line 104 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = FALSE;
+#line 1358 "BmpSupport.c"
+ }
+#line 104 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (_tmp0_) {
+#line 1362 "BmpSupport.c"
+ Dimensions prefetch_dimensions = {0};
+ Dimensions _tmp11_ = {0};
+ GdkPixbuf* _tmp12_ = NULL;
+ gchar* _tmp13_ = NULL;
+ gchar* _tmp14_ = NULL;
+ Dimensions _tmp15_ = {0};
+ gint _tmp16_ = 0;
+ Dimensions _tmp17_ = {0};
+ gint _tmp18_ = 0;
+ GdkPixbuf* _tmp19_ = NULL;
+ GdkPixbuf* _tmp20_ = NULL;
+ GdkPixbuf* _tmp21_ = NULL;
+ GdkPixbuf* _tmp22_ = NULL;
+ Dimensions _tmp23_ = {0};
+ gint _tmp24_ = 0;
+ Dimensions _tmp25_ = {0};
+ gint _tmp26_ = 0;
+ GdkPixbuf* _tmp27_ = NULL;
+#line 106 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ dimensions_get_scaled_by_constraint (full, 1000, SCALE_CONSTRAINT_DIMENSIONS, &_tmp11_);
+#line 106 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ prefetch_dimensions = _tmp11_;
+#line 109 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp13_ = photo_file_adapter_get_filepath (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 109 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp14_ = _tmp13_;
+#line 109 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp15_ = prefetch_dimensions;
+#line 109 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp16_ = _tmp15_.width;
+#line 109 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp17_ = prefetch_dimensions;
+#line 109 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp18_ = _tmp17_.height;
+#line 109 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp19_ = gdk_pixbuf_new_from_file_at_scale (_tmp14_, _tmp16_, _tmp18_, FALSE, &_inner_error_);
+#line 109 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp20_ = _tmp19_;
+#line 109 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _g_free0 (_tmp14_);
+#line 109 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp12_ = _tmp20_;
+#line 109 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 109 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 109 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _g_object_unref0 (_result_);
+#line 109 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return NULL;
+#line 1413 "BmpSupport.c"
+ }
+#line 109 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp21_ = _tmp12_;
+#line 109 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp12_ = NULL;
+#line 109 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _g_object_unref0 (_result_);
+#line 109 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _result_ = _tmp21_;
+#line 112 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp22_ = _result_;
+#line 112 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp23_ = *scaled;
+#line 112 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp24_ = _tmp23_.width;
+#line 112 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp25_ = *scaled;
+#line 112 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp26_ = _tmp25_.height;
+#line 112 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp27_ = gdk_pixbuf_scale_simple (_tmp22_, _tmp24_, _tmp26_, GDK_INTERP_HYPER);
+#line 112 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _g_object_unref0 (_result_);
+#line 112 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _result_ = _tmp27_;
+#line 104 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _g_object_unref0 (_tmp12_);
+#line 1441 "BmpSupport.c"
+ } else {
+ GdkPixbuf* _tmp28_ = NULL;
+ gchar* _tmp29_ = NULL;
+ gchar* _tmp30_ = NULL;
+ Dimensions _tmp31_ = {0};
+ gint _tmp32_ = 0;
+ Dimensions _tmp33_ = {0};
+ gint _tmp34_ = 0;
+ GdkPixbuf* _tmp35_ = NULL;
+ GdkPixbuf* _tmp36_ = NULL;
+ GdkPixbuf* _tmp37_ = NULL;
+#line 114 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp29_ = photo_file_adapter_get_filepath (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 114 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp30_ = _tmp29_;
+#line 114 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp31_ = *scaled;
+#line 114 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp32_ = _tmp31_.width;
+#line 114 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp33_ = *scaled;
+#line 114 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp34_ = _tmp33_.height;
+#line 114 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp35_ = gdk_pixbuf_new_from_file_at_scale (_tmp30_, _tmp32_, _tmp34_, FALSE, &_inner_error_);
+#line 114 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp36_ = _tmp35_;
+#line 114 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _g_free0 (_tmp30_);
+#line 114 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp28_ = _tmp36_;
+#line 114 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 114 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 114 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _g_object_unref0 (_result_);
+#line 114 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return NULL;
+#line 1481 "BmpSupport.c"
+ }
+#line 114 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp37_ = _tmp28_;
+#line 114 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp28_ = NULL;
+#line 114 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _g_object_unref0 (_result_);
+#line 114 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _result_ = _tmp37_;
+#line 104 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _g_object_unref0 (_tmp28_);
+#line 1493 "BmpSupport.c"
+ }
+#line 118 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = _result_;
+#line 118 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 1499 "BmpSupport.c"
+}
+
+
+static void photos_bmp_reader_class_init (PhotosBmpReaderClass * klass) {
+#line 89 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ photos_bmp_reader_parent_class = g_type_class_peek_parent (klass);
+#line 89 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileReaderClass *) klass)->scaled_read = photos_bmp_reader_real_scaled_read;
+#line 1508 "BmpSupport.c"
+}
+
+
+static void photos_bmp_reader_instance_init (PhotosBmpReader * self) {
+}
+
+
+GType photos_bmp_reader_get_type (void) {
+ static volatile gsize photos_bmp_reader_type_id__volatile = 0;
+ if (g_once_init_enter (&photos_bmp_reader_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PhotosBmpReaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photos_bmp_reader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotosBmpReader), 0, (GInstanceInitFunc) photos_bmp_reader_instance_init, NULL };
+ GType photos_bmp_reader_type_id;
+ photos_bmp_reader_type_id = g_type_register_static (TYPE_GDK_READER, "PhotosBmpReader", &g_define_type_info, 0);
+ g_once_init_leave (&photos_bmp_reader_type_id__volatile, photos_bmp_reader_type_id);
+ }
+ return photos_bmp_reader_type_id__volatile;
+}
+
+
+PhotosBmpWriter* photos_bmp_writer_construct (GType object_type, const gchar* filepath) {
+ PhotosBmpWriter* self = NULL;
+ const gchar* _tmp0_ = NULL;
+#line 123 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 124 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = filepath;
+#line 124 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = (PhotosBmpWriter*) photo_file_writer_construct (object_type, _tmp0_, PHOTO_FILE_FORMAT_BMP);
+#line 123 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return self;
+#line 1539 "BmpSupport.c"
+}
+
+
+PhotosBmpWriter* photos_bmp_writer_new (const gchar* filepath) {
+#line 123 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return photos_bmp_writer_construct (PHOTOS_TYPE_BMP_WRITER, filepath);
+#line 1546 "BmpSupport.c"
+}
+
+
+static void photos_bmp_writer_real_write (PhotoFileWriter* base, GdkPixbuf* pixbuf, JpegQuality quality, GError** error) {
+ PhotosBmpWriter * self;
+ GdkPixbuf* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 127 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_BMP_WRITER, PhotosBmpWriter);
+#line 127 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_return_if_fail (GDK_IS_PIXBUF (pixbuf));
+#line 128 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = pixbuf;
+#line 128 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp1_ = photo_file_adapter_get_filepath (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 128 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 128 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ gdk_pixbuf_save (_tmp0_, _tmp2_, "bmp", &_inner_error_, NULL, NULL);
+#line 128 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _g_free0 (_tmp2_);
+#line 128 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 128 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 128 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return;
+#line 1576 "BmpSupport.c"
+ }
+}
+
+
+static void photos_bmp_writer_class_init (PhotosBmpWriterClass * klass) {
+#line 122 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ photos_bmp_writer_parent_class = g_type_class_peek_parent (klass);
+#line 122 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileWriterClass *) klass)->write = photos_bmp_writer_real_write;
+#line 1586 "BmpSupport.c"
+}
+
+
+static void photos_bmp_writer_instance_init (PhotosBmpWriter * self) {
+}
+
+
+GType photos_bmp_writer_get_type (void) {
+ static volatile gsize photos_bmp_writer_type_id__volatile = 0;
+ if (g_once_init_enter (&photos_bmp_writer_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PhotosBmpWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photos_bmp_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotosBmpWriter), 0, (GInstanceInitFunc) photos_bmp_writer_instance_init, NULL };
+ GType photos_bmp_writer_type_id;
+ photos_bmp_writer_type_id = g_type_register_static (TYPE_PHOTO_FILE_WRITER, "PhotosBmpWriter", &g_define_type_info, 0);
+ g_once_init_leave (&photos_bmp_writer_type_id__volatile, photos_bmp_writer_type_id);
+ }
+ return photos_bmp_writer_type_id__volatile;
+}
+
+
+PhotosBmpMetadataWriter* photos_bmp_metadata_writer_construct (GType object_type, const gchar* filepath) {
+ PhotosBmpMetadataWriter* self = NULL;
+ const gchar* _tmp0_ = NULL;
+#line 133 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 134 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = filepath;
+#line 134 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = (PhotosBmpMetadataWriter*) photo_file_metadata_writer_construct (object_type, _tmp0_, PHOTO_FILE_FORMAT_BMP);
+#line 133 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return self;
+#line 1617 "BmpSupport.c"
+}
+
+
+PhotosBmpMetadataWriter* photos_bmp_metadata_writer_new (const gchar* filepath) {
+#line 133 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return photos_bmp_metadata_writer_construct (PHOTOS_TYPE_BMP_METADATA_WRITER, filepath);
+#line 1624 "BmpSupport.c"
+}
+
+
+static void photos_bmp_metadata_writer_real_write_metadata (PhotoFileMetadataWriter* base, PhotoMetadata* metadata, GError** error) {
+ PhotosBmpMetadataWriter * self;
+#line 137 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_BMP_METADATA_WRITER, PhotosBmpMetadataWriter);
+#line 137 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (metadata));
+#line 1634 "BmpSupport.c"
+}
+
+
+static void photos_bmp_metadata_writer_class_init (PhotosBmpMetadataWriterClass * klass) {
+#line 132 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ photos_bmp_metadata_writer_parent_class = g_type_class_peek_parent (klass);
+#line 132 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileMetadataWriterClass *) klass)->write_metadata = photos_bmp_metadata_writer_real_write_metadata;
+#line 1643 "BmpSupport.c"
+}
+
+
+static void photos_bmp_metadata_writer_instance_init (PhotosBmpMetadataWriter * self) {
+}
+
+
+GType photos_bmp_metadata_writer_get_type (void) {
+ static volatile gsize photos_bmp_metadata_writer_type_id__volatile = 0;
+ if (g_once_init_enter (&photos_bmp_metadata_writer_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PhotosBmpMetadataWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photos_bmp_metadata_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotosBmpMetadataWriter), 0, (GInstanceInitFunc) photos_bmp_metadata_writer_instance_init, NULL };
+ GType photos_bmp_metadata_writer_type_id;
+ photos_bmp_metadata_writer_type_id = g_type_register_static (TYPE_PHOTO_FILE_METADATA_WRITER, "PhotosBmpMetadataWriter", &g_define_type_info, 0);
+ g_once_init_leave (&photos_bmp_metadata_writer_type_id__volatile, photos_bmp_metadata_writer_type_id);
+ }
+ return photos_bmp_metadata_writer_type_id__volatile;
+}
+
+
+void photos_bmp_file_format_driver_init (void) {
+ PhotosBmpFileFormatDriver* _tmp0_ = NULL;
+#line 146 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = photos_bmp_file_format_driver_new ();
+#line 146 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _photo_file_format_driver_unref0 (photos_bmp_file_format_driver_instance);
+#line 146 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ photos_bmp_file_format_driver_instance = _tmp0_;
+#line 147 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ photos_bmp_file_format_properties_init ();
+#line 1673 "BmpSupport.c"
+}
+
+
+static gpointer _photo_file_format_driver_ref0 (gpointer self) {
+#line 151 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return self ? photo_file_format_driver_ref (self) : NULL;
+#line 1680 "BmpSupport.c"
+}
+
+
+PhotosBmpFileFormatDriver* photos_bmp_file_format_driver_get_instance (void) {
+ PhotosBmpFileFormatDriver* result = NULL;
+ PhotosBmpFileFormatDriver* _tmp0_ = NULL;
+ PhotosBmpFileFormatDriver* _tmp1_ = NULL;
+#line 151 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = photos_bmp_file_format_driver_instance;
+#line 151 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp1_ = _photo_file_format_driver_ref0 (_tmp0_);
+#line 151 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = _tmp1_;
+#line 151 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 1696 "BmpSupport.c"
+}
+
+
+static PhotoFileFormatProperties* photos_bmp_file_format_driver_real_get_properties (PhotoFileFormatDriver* base) {
+ PhotosBmpFileFormatDriver * self;
+ PhotoFileFormatProperties* result = NULL;
+ PhotosBmpFileFormatProperties* _tmp0_ = NULL;
+#line 154 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER, PhotosBmpFileFormatDriver);
+#line 155 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = photos_bmp_file_format_properties_get_instance ();
+#line 155 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatProperties);
+#line 155 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 1712 "BmpSupport.c"
+}
+
+
+static PhotoFileReader* photos_bmp_file_format_driver_real_create_reader (PhotoFileFormatDriver* base, const gchar* filepath) {
+ PhotosBmpFileFormatDriver * self;
+ PhotoFileReader* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ PhotosBmpReader* _tmp1_ = NULL;
+#line 158 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER, PhotosBmpFileFormatDriver);
+#line 158 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 159 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = filepath;
+#line 159 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp1_ = photos_bmp_reader_new (_tmp0_);
+#line 159 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO_FILE_READER, PhotoFileReader);
+#line 159 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 1733 "BmpSupport.c"
+}
+
+
+static gboolean photos_bmp_file_format_driver_real_can_write_image (PhotoFileFormatDriver* base) {
+ PhotosBmpFileFormatDriver * self;
+ gboolean result = FALSE;
+#line 162 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER, PhotosBmpFileFormatDriver);
+#line 163 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = TRUE;
+#line 163 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 1746 "BmpSupport.c"
+}
+
+
+static gboolean photos_bmp_file_format_driver_real_can_write_metadata (PhotoFileFormatDriver* base) {
+ PhotosBmpFileFormatDriver * self;
+ gboolean result = FALSE;
+#line 166 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER, PhotosBmpFileFormatDriver);
+#line 167 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = FALSE;
+#line 167 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 1759 "BmpSupport.c"
+}
+
+
+static PhotoFileWriter* photos_bmp_file_format_driver_real_create_writer (PhotoFileFormatDriver* base, const gchar* filepath) {
+ PhotosBmpFileFormatDriver * self;
+ PhotoFileWriter* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ PhotosBmpWriter* _tmp1_ = NULL;
+#line 170 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER, PhotosBmpFileFormatDriver);
+#line 170 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 171 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = filepath;
+#line 171 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp1_ = photos_bmp_writer_new (_tmp0_);
+#line 171 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO_FILE_WRITER, PhotoFileWriter);
+#line 171 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 1780 "BmpSupport.c"
+}
+
+
+static PhotoFileMetadataWriter* photos_bmp_file_format_driver_real_create_metadata_writer (PhotoFileFormatDriver* base, const gchar* filepath) {
+ PhotosBmpFileFormatDriver * self;
+ PhotoFileMetadataWriter* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ PhotosBmpMetadataWriter* _tmp1_ = NULL;
+#line 174 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER, PhotosBmpFileFormatDriver);
+#line 174 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 175 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = filepath;
+#line 175 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp1_ = photos_bmp_metadata_writer_new (_tmp0_);
+#line 175 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriter);
+#line 175 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 1801 "BmpSupport.c"
+}
+
+
+static PhotoFileSniffer* photos_bmp_file_format_driver_real_create_sniffer (PhotoFileFormatDriver* base, GFile* file, PhotoFileSnifferOptions options) {
+ PhotosBmpFileFormatDriver * self;
+ PhotoFileSniffer* result = NULL;
+ GFile* _tmp0_ = NULL;
+ PhotoFileSnifferOptions _tmp1_ = 0;
+ PhotosBmpSniffer* _tmp2_ = NULL;
+#line 178 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER, PhotosBmpFileFormatDriver);
+#line 178 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ g_return_val_if_fail (G_IS_FILE (file), NULL);
+#line 179 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = file;
+#line 179 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp1_ = options;
+#line 179 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp2_ = photos_bmp_sniffer_new (_tmp0_, _tmp1_);
+#line 179 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer);
+#line 179 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 1825 "BmpSupport.c"
+}
+
+
+static PhotoMetadata* photos_bmp_file_format_driver_real_create_metadata (PhotoFileFormatDriver* base) {
+ PhotosBmpFileFormatDriver * self;
+ PhotoMetadata* result = NULL;
+ PhotoMetadata* _tmp0_ = NULL;
+#line 182 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER, PhotosBmpFileFormatDriver);
+#line 183 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ _tmp0_ = photo_metadata_new ();
+#line 183 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ result = _tmp0_;
+#line 183 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return result;
+#line 1841 "BmpSupport.c"
+}
+
+
+PhotosBmpFileFormatDriver* photos_bmp_file_format_driver_construct (GType object_type) {
+ PhotosBmpFileFormatDriver* self = NULL;
+#line 142 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = (PhotosBmpFileFormatDriver*) photo_file_format_driver_construct (object_type);
+#line 142 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return self;
+#line 1851 "BmpSupport.c"
+}
+
+
+PhotosBmpFileFormatDriver* photos_bmp_file_format_driver_new (void) {
+#line 142 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ return photos_bmp_file_format_driver_construct (PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER);
+#line 1858 "BmpSupport.c"
+}
+
+
+static void photos_bmp_file_format_driver_class_init (PhotosBmpFileFormatDriverClass * klass) {
+#line 142 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ photos_bmp_file_format_driver_parent_class = g_type_class_peek_parent (klass);
+#line 142 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->finalize = photos_bmp_file_format_driver_finalize;
+#line 142 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->get_properties = photos_bmp_file_format_driver_real_get_properties;
+#line 142 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_reader = photos_bmp_file_format_driver_real_create_reader;
+#line 142 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->can_write_image = photos_bmp_file_format_driver_real_can_write_image;
+#line 142 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->can_write_metadata = photos_bmp_file_format_driver_real_can_write_metadata;
+#line 142 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_writer = photos_bmp_file_format_driver_real_create_writer;
+#line 142 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_metadata_writer = photos_bmp_file_format_driver_real_create_metadata_writer;
+#line 142 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_sniffer = photos_bmp_file_format_driver_real_create_sniffer;
+#line 142 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_metadata = photos_bmp_file_format_driver_real_create_metadata;
+#line 1883 "BmpSupport.c"
+}
+
+
+static void photos_bmp_file_format_driver_instance_init (PhotosBmpFileFormatDriver * self) {
+}
+
+
+static void photos_bmp_file_format_driver_finalize (PhotoFileFormatDriver* obj) {
+ PhotosBmpFileFormatDriver * self;
+#line 142 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER, PhotosBmpFileFormatDriver);
+#line 142 "/home/jens/Source/shotwell/src/photos/BmpSupport.vala"
+ PHOTO_FILE_FORMAT_DRIVER_CLASS (photos_bmp_file_format_driver_parent_class)->finalize (obj);
+#line 1897 "BmpSupport.c"
+}
+
+
+GType photos_bmp_file_format_driver_get_type (void) {
+ static volatile gsize photos_bmp_file_format_driver_type_id__volatile = 0;
+ if (g_once_init_enter (&photos_bmp_file_format_driver_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PhotosBmpFileFormatDriverClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photos_bmp_file_format_driver_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotosBmpFileFormatDriver), 0, (GInstanceInitFunc) photos_bmp_file_format_driver_instance_init, NULL };
+ GType photos_bmp_file_format_driver_type_id;
+ photos_bmp_file_format_driver_type_id = g_type_register_static (TYPE_PHOTO_FILE_FORMAT_DRIVER, "PhotosBmpFileFormatDriver", &g_define_type_info, 0);
+ g_once_init_leave (&photos_bmp_file_format_driver_type_id__volatile, photos_bmp_file_format_driver_type_id);
+ }
+ return photos_bmp_file_format_driver_type_id__volatile;
+}
+
+
+
diff --git a/src/photos/GRaw.c b/src/photos/GRaw.c
new file mode 100644
index 0000000..56cfe34
--- /dev/null
+++ b/src/photos/GRaw.c
@@ -0,0 +1,2462 @@
+/* GRaw.c generated by valac 0.32.1, the Vala compiler
+ * generated from GRaw.vala, do not modify */
+
+/* Copyright 2016 Software Freedom Conservancy Inc.
+ *
+ * This software is licensed under the GNU Lesser General Public License
+ * (version 2.1 or later). See the COPYING file in this distribution.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <float.h>
+#include <math.h>
+#include <libraw/libraw.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gio/gio.h>
+#include <gobject/gvaluecollector.h>
+
+
+#define GRAW_TYPE_COLORSPACE (graw_colorspace_get_type ())
+
+#define GRAW_TYPE_FLIP (graw_flip_get_type ())
+
+#define GRAW_TYPE_FUJI_ROTATE (graw_fuji_rotate_get_type ())
+
+#define GRAW_TYPE_HIGHLIGHT_MODE (graw_highlight_mode_get_type ())
+
+#define GRAW_TYPE_INTERPOLATION_QUALITY (graw_interpolation_quality_get_type ())
+
+#define GRAW_TYPE_PROCESSED_IMAGE (graw_processed_image_get_type ())
+#define GRAW_PROCESSED_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GRAW_TYPE_PROCESSED_IMAGE, GRawProcessedImage))
+#define GRAW_PROCESSED_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GRAW_TYPE_PROCESSED_IMAGE, GRawProcessedImageClass))
+#define GRAW_IS_PROCESSED_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GRAW_TYPE_PROCESSED_IMAGE))
+#define GRAW_IS_PROCESSED_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GRAW_TYPE_PROCESSED_IMAGE))
+#define GRAW_PROCESSED_IMAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GRAW_TYPE_PROCESSED_IMAGE, GRawProcessedImageClass))
+
+typedef struct _GRawProcessedImage GRawProcessedImage;
+typedef struct _GRawProcessedImageClass GRawProcessedImageClass;
+typedef struct _GRawProcessedImagePrivate GRawProcessedImagePrivate;
+#define _free0(var) ((var == NULL) ? NULL : (var = (free (var), NULL)))
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _graw_processed_image_unref0(var) ((var == NULL) ? NULL : (var = (graw_processed_image_unref (var), NULL)))
+#define _g_bytes_unref0(var) ((var == NULL) ? NULL : (var = (g_bytes_unref (var), NULL)))
+#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
+typedef struct _GRawParamSpecProcessedImage GRawParamSpecProcessedImage;
+
+#define GRAW_TYPE_PROCESSOR (graw_processor_get_type ())
+#define GRAW_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GRAW_TYPE_PROCESSOR, GRawProcessor))
+#define GRAW_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GRAW_TYPE_PROCESSOR, GRawProcessorClass))
+#define GRAW_IS_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GRAW_TYPE_PROCESSOR))
+#define GRAW_IS_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GRAW_TYPE_PROCESSOR))
+#define GRAW_PROCESSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GRAW_TYPE_PROCESSOR, GRawProcessorClass))
+
+typedef struct _GRawProcessor GRawProcessor;
+typedef struct _GRawProcessorClass GRawProcessorClass;
+typedef struct _GRawProcessorPrivate GRawProcessorPrivate;
+#define _libraw_close0(var) ((var == NULL) ? NULL : (var = (libraw_close (var), NULL)))
+typedef struct _GRawParamSpecProcessor GRawParamSpecProcessor;
+#define _g_free0(var) (var = (g_free (var), NULL))
+#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
+#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
+#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
+#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
+
+typedef enum {
+ GRAW_COLORSPACE_RAW = 0,
+ GRAW_COLORSPACE_SRGB = 1,
+ GRAW_COLORSPACE_ADOBE = 2,
+ GRAW_COLORSPACE_WIDE = 3,
+ GRAW_COLORSPACE_PROPHOTO = 4,
+ GRAW_COLORSPACE_XYZ = 5
+} GRawColorspace;
+
+typedef enum {
+ GRAW_EXCEPTION_UNSPECIFIED,
+ GRAW_EXCEPTION_UNSUPPORTED_FILE,
+ GRAW_EXCEPTION_NONEXISTANT_IMAGE,
+ GRAW_EXCEPTION_OUT_OF_ORDER_CALL,
+ GRAW_EXCEPTION_NO_THUMBNAIL,
+ GRAW_EXCEPTION_UNSUPPORTED_THUMBNAIL,
+ GRAW_EXCEPTION_OUT_OF_MEMORY,
+ GRAW_EXCEPTION_DATA_ERROR,
+ GRAW_EXCEPTION_IO_ERROR,
+ GRAW_EXCEPTION_CANCELLED_BY_CALLBACK,
+ GRAW_EXCEPTION_BAD_CROP,
+ GRAW_EXCEPTION_SYSTEM_ERROR
+} GRawException;
+#define GRAW_EXCEPTION graw_exception_quark ()
+typedef enum {
+ GRAW_FLIP_FROM_SOURCE = -1,
+ GRAW_FLIP_NONE = 0,
+ GRAW_FLIP_UPSIDE_DOWN = 3,
+ GRAW_FLIP_COUNTERCLOCKWISE = 5,
+ GRAW_FLIP_CLOCKWISE = 6
+} GRawFlip;
+
+typedef enum {
+ GRAW_FUJI_ROTATE_USE = -1,
+ GRAW_FUJI_ROTATE_DONT_USE = 0
+} GRawFujiRotate;
+
+typedef enum {
+ GRAW_HIGHLIGHT_MODE_CLIP = 0,
+ GRAW_HIGHLIGHT_MODE_UNCLIP = 1,
+ GRAW_HIGHLIGHT_MODE_BLEND = 2,
+ GRAW_HIGHLIGHT_MODE_REBUILD = 3
+} GRawHighlightMode;
+
+typedef enum {
+ GRAW_INTERPOLATION_QUALITY_LINEAR = 0,
+ GRAW_INTERPOLATION_QUALITY_VNG = 1,
+ GRAW_INTERPOLATION_QUALITY_PPG = 2,
+ GRAW_INTERPOLATION_QUALITY_AHD = 3
+} GRawInterpolationQuality;
+
+struct _GRawProcessedImage {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ GRawProcessedImagePrivate * priv;
+};
+
+struct _GRawProcessedImageClass {
+ GTypeClass parent_class;
+ void (*finalize) (GRawProcessedImage *self);
+};
+
+struct _GRawProcessedImagePrivate {
+ libraw_processed_image_t* image;
+ GdkPixbuf* pixbuf;
+};
+
+struct _GRawParamSpecProcessedImage {
+ GParamSpec parent_instance;
+};
+
+struct _GRawProcessor {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ GRawProcessorPrivate * priv;
+};
+
+struct _GRawProcessorClass {
+ GTypeClass parent_class;
+ void (*finalize) (GRawProcessor *self);
+};
+
+struct _GRawProcessorPrivate {
+ libraw_data_t* proc;
+};
+
+struct _GRawParamSpecProcessor {
+ GParamSpec parent_instance;
+};
+
+
+static gpointer graw_processed_image_parent_class = NULL;
+static gpointer graw_processor_parent_class = NULL;
+
+#define GRAW_HD_POWER 2.222
+#define GRAW_HD_SLOPE 4.5
+#define GRAW_SRGB_POWER 2.4
+#define GRAW_SRGB_SLOPE 12.92
+GType graw_colorspace_get_type (void) G_GNUC_CONST;
+GQuark graw_exception_quark (void);
+GType graw_flip_get_type (void) G_GNUC_CONST;
+GType graw_fuji_rotate_get_type (void) G_GNUC_CONST;
+GType graw_highlight_mode_get_type (void) G_GNUC_CONST;
+GType graw_interpolation_quality_get_type (void) G_GNUC_CONST;
+gpointer graw_processed_image_ref (gpointer instance);
+void graw_processed_image_unref (gpointer instance);
+GParamSpec* graw_param_spec_processed_image (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void graw_value_set_processed_image (GValue* value, gpointer v_object);
+void graw_value_take_processed_image (GValue* value, gpointer v_object);
+gpointer graw_value_get_processed_image (const GValue* value);
+GType graw_processed_image_get_type (void) G_GNUC_CONST;
+#define GRAW_PROCESSED_IMAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GRAW_TYPE_PROCESSED_IMAGE, GRawProcessedImagePrivate))
+enum {
+ GRAW_PROCESSED_IMAGE_DUMMY_PROPERTY
+};
+GRawProcessedImage* graw_processed_image_new (libraw_data_t* proc, GError** error);
+GRawProcessedImage* graw_processed_image_construct (GType object_type, libraw_data_t* proc, GError** error);
+void graw_throw_exception (const gchar* caller, enum LibRaw_errors _result_, GError** error);
+GRawProcessedImage* graw_processed_image_new_from_thumb (libraw_data_t* proc, GError** error);
+GRawProcessedImage* graw_processed_image_construct_from_thumb (GType object_type, libraw_data_t* proc, GError** error);
+GdkPixbuf* graw_processed_image_get_pixbuf_copy (GRawProcessedImage* self);
+gushort graw_processed_image_get_width (GRawProcessedImage* self);
+gushort graw_processed_image_get_height (GRawProcessedImage* self);
+gushort graw_processed_image_get_colors (GRawProcessedImage* self);
+gushort graw_processed_image_get_bits (GRawProcessedImage* self);
+guint8* graw_processed_image_get_data (GRawProcessedImage* self);
+guint graw_processed_image_get_data_size (GRawProcessedImage* self);
+static void graw_processed_image_finalize (GRawProcessedImage* obj);
+gpointer graw_processor_ref (gpointer instance);
+void graw_processor_unref (gpointer instance);
+GParamSpec* graw_param_spec_processor (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void graw_value_set_processor (GValue* value, gpointer v_object);
+void graw_value_take_processor (GValue* value, gpointer v_object);
+gpointer graw_value_get_processor (const GValue* value);
+GType graw_processor_get_type (void) G_GNUC_CONST;
+#define GRAW_PROCESSOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GRAW_TYPE_PROCESSOR, GRawProcessorPrivate))
+enum {
+ GRAW_PROCESSOR_DUMMY_PROPERTY
+};
+GRawProcessor* graw_processor_new (enum LibRaw_constructor_flags options);
+GRawProcessor* graw_processor_construct (GType object_type, enum LibRaw_constructor_flags options);
+void graw_processor_adjust_sizes_info_only (GRawProcessor* self, GError** error);
+libraw_imgother_t graw_processor_get_image_other (GRawProcessor* self);
+libraw_iparams_t graw_processor_get_image_params (GRawProcessor* self);
+libraw_image_sizes_t graw_processor_get_sizes (GRawProcessor* self);
+libraw_thumbnail_t graw_processor_get_thumbnail (GRawProcessor* self);
+GRawProcessedImage* graw_processor_make_mem_image (GRawProcessor* self, GError** error);
+GRawProcessedImage* graw_processor_make_thumb_image (GRawProcessor* self, GError** error);
+void graw_processor_open_buffer (GRawProcessor* self, guint8* buffer, int buffer_length1, GError** error);
+void graw_processor_open_file (GRawProcessor* self, const gchar* filename, GError** error);
+void graw_processor_process (GRawProcessor* self, GError** error);
+void graw_processor_ppm_tiff_writer (GRawProcessor* self, const gchar* filename, GError** error);
+void graw_processor_thumb_writer (GRawProcessor* self, const gchar* filename, GError** error);
+void graw_processor_recycle (GRawProcessor* self);
+void graw_processor_unpack (GRawProcessor* self, GError** error);
+void graw_processor_unpack_thumb (GRawProcessor* self, GError** error);
+void graw_processor_configure_for_rgb_display (GRawProcessor* self, gboolean half_size);
+libraw_output_params_t* graw_processor_get_output_params (GRawProcessor* self);
+static void graw_processor_finalize (GRawProcessor* obj);
+
+
+GType graw_colorspace_get_type (void) {
+ static volatile gsize graw_colorspace_type_id__volatile = 0;
+ if (g_once_init_enter (&graw_colorspace_type_id__volatile)) {
+ static const GEnumValue values[] = {{GRAW_COLORSPACE_RAW, "GRAW_COLORSPACE_RAW", "raw"}, {GRAW_COLORSPACE_SRGB, "GRAW_COLORSPACE_SRGB", "srgb"}, {GRAW_COLORSPACE_ADOBE, "GRAW_COLORSPACE_ADOBE", "adobe"}, {GRAW_COLORSPACE_WIDE, "GRAW_COLORSPACE_WIDE", "wide"}, {GRAW_COLORSPACE_PROPHOTO, "GRAW_COLORSPACE_PROPHOTO", "prophoto"}, {GRAW_COLORSPACE_XYZ, "GRAW_COLORSPACE_XYZ", "xyz"}, {0, NULL, NULL}};
+ GType graw_colorspace_type_id;
+ graw_colorspace_type_id = g_enum_register_static ("GRawColorspace", values);
+ g_once_init_leave (&graw_colorspace_type_id__volatile, graw_colorspace_type_id);
+ }
+ return graw_colorspace_type_id__volatile;
+}
+
+
+GQuark graw_exception_quark (void) {
+ return g_quark_from_static_string ("graw_exception-quark");
+}
+
+
+GType graw_flip_get_type (void) {
+ static volatile gsize graw_flip_type_id__volatile = 0;
+ if (g_once_init_enter (&graw_flip_type_id__volatile)) {
+ static const GEnumValue values[] = {{GRAW_FLIP_FROM_SOURCE, "GRAW_FLIP_FROM_SOURCE", "from-source"}, {GRAW_FLIP_NONE, "GRAW_FLIP_NONE", "none"}, {GRAW_FLIP_UPSIDE_DOWN, "GRAW_FLIP_UPSIDE_DOWN", "upside-down"}, {GRAW_FLIP_COUNTERCLOCKWISE, "GRAW_FLIP_COUNTERCLOCKWISE", "counterclockwise"}, {GRAW_FLIP_CLOCKWISE, "GRAW_FLIP_CLOCKWISE", "clockwise"}, {0, NULL, NULL}};
+ GType graw_flip_type_id;
+ graw_flip_type_id = g_enum_register_static ("GRawFlip", values);
+ g_once_init_leave (&graw_flip_type_id__volatile, graw_flip_type_id);
+ }
+ return graw_flip_type_id__volatile;
+}
+
+
+GType graw_fuji_rotate_get_type (void) {
+ static volatile gsize graw_fuji_rotate_type_id__volatile = 0;
+ if (g_once_init_enter (&graw_fuji_rotate_type_id__volatile)) {
+ static const GEnumValue values[] = {{GRAW_FUJI_ROTATE_USE, "GRAW_FUJI_ROTATE_USE", "use"}, {GRAW_FUJI_ROTATE_DONT_USE, "GRAW_FUJI_ROTATE_DONT_USE", "dont-use"}, {0, NULL, NULL}};
+ GType graw_fuji_rotate_type_id;
+ graw_fuji_rotate_type_id = g_enum_register_static ("GRawFujiRotate", values);
+ g_once_init_leave (&graw_fuji_rotate_type_id__volatile, graw_fuji_rotate_type_id);
+ }
+ return graw_fuji_rotate_type_id__volatile;
+}
+
+
+GType graw_highlight_mode_get_type (void) {
+ static volatile gsize graw_highlight_mode_type_id__volatile = 0;
+ if (g_once_init_enter (&graw_highlight_mode_type_id__volatile)) {
+ static const GEnumValue values[] = {{GRAW_HIGHLIGHT_MODE_CLIP, "GRAW_HIGHLIGHT_MODE_CLIP", "clip"}, {GRAW_HIGHLIGHT_MODE_UNCLIP, "GRAW_HIGHLIGHT_MODE_UNCLIP", "unclip"}, {GRAW_HIGHLIGHT_MODE_BLEND, "GRAW_HIGHLIGHT_MODE_BLEND", "blend"}, {GRAW_HIGHLIGHT_MODE_REBUILD, "GRAW_HIGHLIGHT_MODE_REBUILD", "rebuild"}, {0, NULL, NULL}};
+ GType graw_highlight_mode_type_id;
+ graw_highlight_mode_type_id = g_enum_register_static ("GRawHighlightMode", values);
+ g_once_init_leave (&graw_highlight_mode_type_id__volatile, graw_highlight_mode_type_id);
+ }
+ return graw_highlight_mode_type_id__volatile;
+}
+
+
+GType graw_interpolation_quality_get_type (void) {
+ static volatile gsize graw_interpolation_quality_type_id__volatile = 0;
+ if (g_once_init_enter (&graw_interpolation_quality_type_id__volatile)) {
+ static const GEnumValue values[] = {{GRAW_INTERPOLATION_QUALITY_LINEAR, "GRAW_INTERPOLATION_QUALITY_LINEAR", "linear"}, {GRAW_INTERPOLATION_QUALITY_VNG, "GRAW_INTERPOLATION_QUALITY_VNG", "vng"}, {GRAW_INTERPOLATION_QUALITY_PPG, "GRAW_INTERPOLATION_QUALITY_PPG", "ppg"}, {GRAW_INTERPOLATION_QUALITY_AHD, "GRAW_INTERPOLATION_QUALITY_AHD", "ahd"}, {0, NULL, NULL}};
+ GType graw_interpolation_quality_type_id;
+ graw_interpolation_quality_type_id = g_enum_register_static ("GRawInterpolationQuality", values);
+ g_once_init_leave (&graw_interpolation_quality_type_id__volatile, graw_interpolation_quality_type_id);
+ }
+ return graw_interpolation_quality_type_id__volatile;
+}
+
+
+GRawProcessedImage* graw_processed_image_construct (GType object_type, libraw_data_t* proc, GError** error) {
+ GRawProcessedImage* self = NULL;
+ enum LibRaw_errors _result_ = 0;
+ libraw_data_t* _tmp0_ = NULL;
+ libraw_processed_image_t* _tmp1_ = NULL;
+ enum LibRaw_errors _tmp2_ = 0;
+ libraw_processed_image_t* _tmp3_ = NULL;
+ libraw_processed_image_t* _tmp4_ = NULL;
+ guint8* _tmp5_ = NULL;
+ gint _tmp5__length1 = 0;
+ libraw_processed_image_t* _tmp6_ = NULL;
+ gushort _tmp7_ = 0U;
+ libraw_processed_image_t* _tmp8_ = NULL;
+ gushort _tmp9_ = 0U;
+ libraw_processed_image_t* _tmp10_ = NULL;
+ gushort _tmp11_ = 0U;
+ libraw_processed_image_t* _tmp12_ = NULL;
+ gushort _tmp13_ = 0U;
+ libraw_processed_image_t* _tmp14_ = NULL;
+ gushort _tmp15_ = 0U;
+ GdkPixbuf* _tmp16_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 106 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_val_if_fail (proc != NULL, NULL);
+#line 106 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ self = (GRawProcessedImage*) g_type_create_instance (object_type);
+#line 107 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _result_ = LIBRAW_SUCCESS;
+#line 108 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = proc;
+#line 108 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = libraw_dcraw_make_mem_image (_tmp0_, &_result_);
+#line 108 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _free0 (self->priv->image);
+#line 108 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ self->priv->image = _tmp1_;
+#line 109 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp2_ = _result_;
+#line 109 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ graw_throw_exception ("ProcessedImage", _tmp2_, &_inner_error_);
+#line 109 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 109 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 109 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 109 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _graw_processed_image_unref0 (self);
+#line 109 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return NULL;
+#line 344 "GRaw.c"
+ } else {
+#line 109 "/home/jens/Source/shotwell/src/photos/GRaw.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 109 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 109 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return NULL;
+#line 352 "GRaw.c"
+ }
+ }
+#line 110 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp3_ = self->priv->image;
+#line 110 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _vala_assert (_tmp3_ != NULL, "image != null");
+#line 114 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp4_ = self->priv->image;
+#line 114 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp5_ = _tmp4_->data;
+#line 114 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp5__length1 = _tmp4_->data_size;
+#line 114 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp6_ = self->priv->image;
+#line 114 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp7_ = _tmp6_->bits;
+#line 114 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp8_ = self->priv->image;
+#line 114 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp9_ = _tmp8_->width;
+#line 114 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp10_ = self->priv->image;
+#line 114 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp11_ = _tmp10_->height;
+#line 114 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp12_ = self->priv->image;
+#line 114 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp13_ = _tmp12_->width;
+#line 114 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp14_ = self->priv->image;
+#line 114 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp15_ = _tmp14_->colors;
+#line 114 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp16_ = gdk_pixbuf_new_from_data (_tmp5_, GDK_COLORSPACE_RGB, FALSE, (gint) _tmp7_, (gint) _tmp9_, (gint) _tmp11_, (gint) (_tmp13_ * _tmp15_), (GdkPixbufDestroyNotify) NULL, NULL);
+#line 114 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_object_unref0 (self->priv->pixbuf);
+#line 114 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ self->priv->pixbuf = _tmp16_;
+#line 106 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return self;
+#line 393 "GRaw.c"
+}
+
+
+GRawProcessedImage* graw_processed_image_new (libraw_data_t* proc, GError** error) {
+#line 106 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return graw_processed_image_construct (GRAW_TYPE_PROCESSED_IMAGE, proc, error);
+#line 400 "GRaw.c"
+}
+
+
+GRawProcessedImage* graw_processed_image_construct_from_thumb (GType object_type, libraw_data_t* proc, GError** error) {
+ GRawProcessedImage* self = NULL;
+ enum LibRaw_errors _result_ = 0;
+ libraw_data_t* _tmp0_ = NULL;
+ libraw_processed_image_t* _tmp1_ = NULL;
+ enum LibRaw_errors _tmp2_ = 0;
+ libraw_processed_image_t* _tmp3_ = NULL;
+ libraw_processed_image_t* _tmp17_ = NULL;
+ GdkPixbuf* _tmp18_ = NULL;
+ gint _tmp19_ = 0;
+ gint _tmp20_ = 0;
+ libraw_processed_image_t* _tmp21_ = NULL;
+ GdkPixbuf* _tmp22_ = NULL;
+ gint _tmp23_ = 0;
+ gint _tmp24_ = 0;
+ libraw_processed_image_t* _tmp25_ = NULL;
+ GdkPixbuf* _tmp26_ = NULL;
+ gint _tmp27_ = 0;
+ gint _tmp28_ = 0;
+ libraw_processed_image_t* _tmp29_ = NULL;
+ GdkPixbuf* _tmp30_ = NULL;
+ gint _tmp31_ = 0;
+ gint _tmp32_ = 0;
+ GError * _inner_error_ = NULL;
+#line 118 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_val_if_fail (proc != NULL, NULL);
+#line 118 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ self = (GRawProcessedImage*) g_type_create_instance (object_type);
+#line 119 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _result_ = LIBRAW_SUCCESS;
+#line 120 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = proc;
+#line 120 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = libraw_dcraw_make_mem_thumb (_tmp0_, &_result_);
+#line 120 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _free0 (self->priv->image);
+#line 120 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ self->priv->image = _tmp1_;
+#line 121 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp2_ = _result_;
+#line 121 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ graw_throw_exception ("ProcessedImage.from_thumb", _tmp2_, &_inner_error_);
+#line 121 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 121 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 121 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 121 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _graw_processed_image_unref0 (self);
+#line 121 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return NULL;
+#line 456 "GRaw.c"
+ } else {
+#line 121 "/home/jens/Source/shotwell/src/photos/GRaw.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 121 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 121 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return NULL;
+#line 464 "GRaw.c"
+ }
+ }
+#line 122 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp3_ = self->priv->image;
+#line 122 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _vala_assert (_tmp3_ != NULL, "image != null");
+#line 471 "GRaw.c"
+ {
+ GBytes* bytes = NULL;
+ libraw_processed_image_t* _tmp4_ = NULL;
+ guint8* _tmp5_ = NULL;
+ gint _tmp5__length1 = 0;
+ GBytes* _tmp6_ = NULL;
+ GdkPixbuf* _tmp7_ = NULL;
+ GBytes* _tmp8_ = NULL;
+ GMemoryInputStream* _tmp9_ = NULL;
+ GMemoryInputStream* _tmp10_ = NULL;
+ GdkPixbuf* _tmp11_ = NULL;
+ GdkPixbuf* _tmp12_ = NULL;
+ GdkPixbuf* _tmp13_ = NULL;
+#line 128 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp4_ = self->priv->image;
+#line 128 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp5_ = _tmp4_->data;
+#line 128 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp5__length1 = _tmp4_->data_size;
+#line 128 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp6_ = g_bytes_new_static (_tmp5_, _tmp5__length1);
+#line 128 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ bytes = _tmp6_;
+#line 129 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp8_ = bytes;
+#line 129 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp9_ = (GMemoryInputStream*) g_memory_input_stream_new_from_bytes (_tmp8_);
+#line 129 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp10_ = _tmp9_;
+#line 129 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp11_ = gdk_pixbuf_new_from_stream (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, G_TYPE_INPUT_STREAM, GInputStream), NULL, &_inner_error_);
+#line 129 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp12_ = _tmp11_;
+#line 129 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_object_unref0 (_tmp10_);
+#line 129 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp7_ = _tmp12_;
+#line 129 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 129 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_bytes_unref0 (bytes);
+#line 513 "GRaw.c"
+ goto __catch26_g_error;
+ }
+#line 129 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp13_ = _tmp7_;
+#line 129 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp7_ = NULL;
+#line 129 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_object_unref0 (self->priv->pixbuf);
+#line 129 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ self->priv->pixbuf = _tmp13_;
+#line 127 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_object_unref0 (_tmp7_);
+#line 127 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_bytes_unref0 (bytes);
+#line 528 "GRaw.c"
+ }
+ goto __finally26;
+ __catch26_g_error:
+ {
+ GError* err = NULL;
+ GError* _tmp14_ = NULL;
+ const gchar* _tmp15_ = NULL;
+ GError* _tmp16_ = NULL;
+#line 127 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ err = _inner_error_;
+#line 127 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _inner_error_ = NULL;
+#line 132 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp14_ = err;
+#line 132 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp15_ = _tmp14_->message;
+#line 132 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp16_ = g_error_new_literal (GRAW_EXCEPTION, GRAW_EXCEPTION_UNSUPPORTED_THUMBNAIL, _tmp15_);
+#line 132 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _inner_error_ = _tmp16_;
+#line 132 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_error_free0 (err);
+#line 551 "GRaw.c"
+ goto __finally26;
+ }
+ __finally26:
+#line 127 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 127 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 127 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 127 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _graw_processed_image_unref0 (self);
+#line 127 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return NULL;
+#line 565 "GRaw.c"
+ } else {
+#line 127 "/home/jens/Source/shotwell/src/photos/GRaw.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 127 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 127 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return NULL;
+#line 573 "GRaw.c"
+ }
+ }
+#line 136 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp17_ = self->priv->image;
+#line 136 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp18_ = self->priv->pixbuf;
+#line 136 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp19_ = gdk_pixbuf_get_width (_tmp18_);
+#line 136 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp20_ = _tmp19_;
+#line 136 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp17_->width = (gushort) _tmp20_;
+#line 137 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp21_ = self->priv->image;
+#line 137 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp22_ = self->priv->pixbuf;
+#line 137 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp23_ = gdk_pixbuf_get_height (_tmp22_);
+#line 137 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp24_ = _tmp23_;
+#line 137 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp21_->height = (gushort) _tmp24_;
+#line 138 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp25_ = self->priv->image;
+#line 138 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp26_ = self->priv->pixbuf;
+#line 138 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp27_ = gdk_pixbuf_get_n_channels (_tmp26_);
+#line 138 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp28_ = _tmp27_;
+#line 138 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp25_->colors = (gushort) _tmp28_;
+#line 139 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp29_ = self->priv->image;
+#line 139 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp30_ = self->priv->pixbuf;
+#line 139 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp31_ = gdk_pixbuf_get_bits_per_sample (_tmp30_);
+#line 139 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp32_ = _tmp31_;
+#line 139 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp29_->bits = (gushort) _tmp32_;
+#line 118 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return self;
+#line 618 "GRaw.c"
+}
+
+
+GRawProcessedImage* graw_processed_image_new_from_thumb (libraw_data_t* proc, GError** error) {
+#line 118 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return graw_processed_image_construct_from_thumb (GRAW_TYPE_PROCESSED_IMAGE, proc, error);
+#line 625 "GRaw.c"
+}
+
+
+GdkPixbuf* graw_processed_image_get_pixbuf_copy (GRawProcessedImage* self) {
+ GdkPixbuf* result = NULL;
+ GdkPixbuf* _tmp0_ = NULL;
+ GdkPixbuf* _tmp1_ = NULL;
+#line 143 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_val_if_fail (GRAW_IS_PROCESSED_IMAGE (self), NULL);
+#line 144 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->pixbuf;
+#line 144 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = gdk_pixbuf_copy (_tmp0_);
+#line 144 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ result = _tmp1_;
+#line 144 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return result;
+#line 643 "GRaw.c"
+}
+
+
+gushort graw_processed_image_get_width (GRawProcessedImage* self) {
+ gushort result;
+ libraw_processed_image_t* _tmp0_ = NULL;
+ gushort _tmp1_ = 0U;
+#line 71 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_val_if_fail (GRAW_IS_PROCESSED_IMAGE (self), 0U);
+#line 72 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->image;
+#line 72 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = _tmp0_->width;
+#line 72 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ result = _tmp1_;
+#line 72 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return result;
+#line 661 "GRaw.c"
+}
+
+
+gushort graw_processed_image_get_height (GRawProcessedImage* self) {
+ gushort result;
+ libraw_processed_image_t* _tmp0_ = NULL;
+ gushort _tmp1_ = 0U;
+#line 77 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_val_if_fail (GRAW_IS_PROCESSED_IMAGE (self), 0U);
+#line 78 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->image;
+#line 78 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = _tmp0_->height;
+#line 78 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ result = _tmp1_;
+#line 78 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return result;
+#line 679 "GRaw.c"
+}
+
+
+gushort graw_processed_image_get_colors (GRawProcessedImage* self) {
+ gushort result;
+ libraw_processed_image_t* _tmp0_ = NULL;
+ gushort _tmp1_ = 0U;
+#line 83 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_val_if_fail (GRAW_IS_PROCESSED_IMAGE (self), 0U);
+#line 84 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->image;
+#line 84 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = _tmp0_->colors;
+#line 84 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ result = _tmp1_;
+#line 84 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return result;
+#line 697 "GRaw.c"
+}
+
+
+gushort graw_processed_image_get_bits (GRawProcessedImage* self) {
+ gushort result;
+ libraw_processed_image_t* _tmp0_ = NULL;
+ gushort _tmp1_ = 0U;
+#line 89 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_val_if_fail (GRAW_IS_PROCESSED_IMAGE (self), 0U);
+#line 90 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->image;
+#line 90 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = _tmp0_->bits;
+#line 90 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ result = _tmp1_;
+#line 90 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return result;
+#line 715 "GRaw.c"
+}
+
+
+guint8* graw_processed_image_get_data (GRawProcessedImage* self) {
+ guint8* result;
+ libraw_processed_image_t* _tmp0_ = NULL;
+ guint8* _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+#line 95 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_val_if_fail (GRAW_IS_PROCESSED_IMAGE (self), NULL);
+#line 96 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->image;
+#line 96 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = _tmp0_->data;
+#line 96 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1__length1 = _tmp0_->data_size;
+#line 96 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ result = _tmp1_;
+#line 96 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return result;
+#line 736 "GRaw.c"
+}
+
+
+guint graw_processed_image_get_data_size (GRawProcessedImage* self) {
+ guint result;
+ libraw_processed_image_t* _tmp0_ = NULL;
+ guint _tmp1_ = 0U;
+#line 101 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_val_if_fail (GRAW_IS_PROCESSED_IMAGE (self), 0U);
+#line 102 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->image;
+#line 102 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = _tmp0_->data_size;
+#line 102 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ result = _tmp1_;
+#line 102 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return result;
+#line 754 "GRaw.c"
+}
+
+
+static void graw_value_processed_image_init (GValue* value) {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ value->data[0].v_pointer = NULL;
+#line 761 "GRaw.c"
+}
+
+
+static void graw_value_processed_image_free_value (GValue* value) {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (value->data[0].v_pointer) {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ graw_processed_image_unref (value->data[0].v_pointer);
+#line 770 "GRaw.c"
+ }
+}
+
+
+static void graw_value_processed_image_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (src_value->data[0].v_pointer) {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ dest_value->data[0].v_pointer = graw_processed_image_ref (src_value->data[0].v_pointer);
+#line 780 "GRaw.c"
+ } else {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 784 "GRaw.c"
+ }
+}
+
+
+static gpointer graw_value_processed_image_peek_pointer (const GValue* value) {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return value->data[0].v_pointer;
+#line 792 "GRaw.c"
+}
+
+
+static gchar* graw_value_processed_image_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (collect_values[0].v_pointer) {
+#line 799 "GRaw.c"
+ GRawProcessedImage* object;
+ object = collect_values[0].v_pointer;
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 806 "GRaw.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.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 810 "GRaw.c"
+ }
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ value->data[0].v_pointer = graw_processed_image_ref (object);
+#line 814 "GRaw.c"
+ } else {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ value->data[0].v_pointer = NULL;
+#line 818 "GRaw.c"
+ }
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return NULL;
+#line 822 "GRaw.c"
+}
+
+
+static gchar* graw_value_processed_image_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ GRawProcessedImage** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (!object_p) {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 833 "GRaw.c"
+ }
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (!value->data[0].v_pointer) {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ *object_p = NULL;
+#line 839 "GRaw.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ *object_p = value->data[0].v_pointer;
+#line 843 "GRaw.c"
+ } else {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ *object_p = graw_processed_image_ref (value->data[0].v_pointer);
+#line 847 "GRaw.c"
+ }
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return NULL;
+#line 851 "GRaw.c"
+}
+
+
+GParamSpec* graw_param_spec_processed_image (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ GRawParamSpecProcessedImage* spec;
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, GRAW_TYPE_PROCESSED_IMAGE), NULL);
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return G_PARAM_SPEC (spec);
+#line 865 "GRaw.c"
+}
+
+
+gpointer graw_value_get_processed_image (const GValue* value) {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GRAW_TYPE_PROCESSED_IMAGE), NULL);
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return value->data[0].v_pointer;
+#line 874 "GRaw.c"
+}
+
+
+void graw_value_set_processed_image (GValue* value, gpointer v_object) {
+ GRawProcessedImage* old;
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GRAW_TYPE_PROCESSED_IMAGE));
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ old = value->data[0].v_pointer;
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (v_object) {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GRAW_TYPE_PROCESSED_IMAGE));
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ value->data[0].v_pointer = v_object;
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ graw_processed_image_ref (value->data[0].v_pointer);
+#line 894 "GRaw.c"
+ } else {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ value->data[0].v_pointer = NULL;
+#line 898 "GRaw.c"
+ }
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (old) {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ graw_processed_image_unref (old);
+#line 904 "GRaw.c"
+ }
+}
+
+
+void graw_value_take_processed_image (GValue* value, gpointer v_object) {
+ GRawProcessedImage* old;
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GRAW_TYPE_PROCESSED_IMAGE));
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ old = value->data[0].v_pointer;
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (v_object) {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GRAW_TYPE_PROCESSED_IMAGE));
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ value->data[0].v_pointer = v_object;
+#line 923 "GRaw.c"
+ } else {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ value->data[0].v_pointer = NULL;
+#line 927 "GRaw.c"
+ }
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (old) {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ graw_processed_image_unref (old);
+#line 933 "GRaw.c"
+ }
+}
+
+
+static void graw_processed_image_class_init (GRawProcessedImageClass * klass) {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ graw_processed_image_parent_class = g_type_class_peek_parent (klass);
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ ((GRawProcessedImageClass *) klass)->finalize = graw_processed_image_finalize;
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_type_class_add_private (klass, sizeof (GRawProcessedImagePrivate));
+#line 945 "GRaw.c"
+}
+
+
+static void graw_processed_image_instance_init (GRawProcessedImage * self) {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ self->priv = GRAW_PROCESSED_IMAGE_GET_PRIVATE (self);
+#line 68 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ self->priv->pixbuf = NULL;
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ self->ref_count = 1;
+#line 956 "GRaw.c"
+}
+
+
+static void graw_processed_image_finalize (GRawProcessedImage* obj) {
+ GRawProcessedImage * self;
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAW_TYPE_PROCESSED_IMAGE, GRawProcessedImage);
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_signal_handlers_destroy (self);
+#line 67 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _free0 (self->priv->image);
+#line 68 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_object_unref0 (self->priv->pixbuf);
+#line 970 "GRaw.c"
+}
+
+
+GType graw_processed_image_get_type (void) {
+ static volatile gsize graw_processed_image_type_id__volatile = 0;
+ if (g_once_init_enter (&graw_processed_image_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { graw_value_processed_image_init, graw_value_processed_image_free_value, graw_value_processed_image_copy_value, graw_value_processed_image_peek_pointer, "p", graw_value_processed_image_collect_value, "p", graw_value_processed_image_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (GRawProcessedImageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) graw_processed_image_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GRawProcessedImage), 0, (GInstanceInitFunc) graw_processed_image_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 graw_processed_image_type_id;
+ graw_processed_image_type_id = g_type_register_fundamental (g_type_fundamental_next (), "GRawProcessedImage", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&graw_processed_image_type_id__volatile, graw_processed_image_type_id);
+ }
+ return graw_processed_image_type_id__volatile;
+}
+
+
+gpointer graw_processed_image_ref (gpointer instance) {
+ GRawProcessedImage* self;
+ self = instance;
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return instance;
+#line 995 "GRaw.c"
+}
+
+
+void graw_processed_image_unref (gpointer instance) {
+ GRawProcessedImage* self;
+ self = instance;
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ GRAW_PROCESSED_IMAGE_GET_CLASS (self)->finalize (self);
+#line 66 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 1008 "GRaw.c"
+ }
+}
+
+
+GRawProcessor* graw_processor_construct (GType object_type, enum LibRaw_constructor_flags options) {
+ GRawProcessor* self = NULL;
+ enum LibRaw_constructor_flags _tmp0_ = 0;
+ libraw_data_t* _tmp1_ = NULL;
+#line 157 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ self = (GRawProcessor*) g_type_create_instance (object_type);
+#line 158 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = options;
+#line 158 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = libraw_init (_tmp0_);
+#line 158 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _libraw_close0 (self->priv->proc);
+#line 158 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ self->priv->proc = _tmp1_;
+#line 157 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return self;
+#line 1029 "GRaw.c"
+}
+
+
+GRawProcessor* graw_processor_new (enum LibRaw_constructor_flags options) {
+#line 157 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return graw_processor_construct (GRAW_TYPE_PROCESSOR, options);
+#line 1036 "GRaw.c"
+}
+
+
+void graw_processor_adjust_sizes_info_only (GRawProcessor* self, GError** error) {
+ libraw_data_t* _tmp0_ = NULL;
+ enum LibRaw_errors _tmp1_ = 0;
+ GError * _inner_error_ = NULL;
+#line 161 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (GRAW_IS_PROCESSOR (self));
+#line 162 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->proc;
+#line 162 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = libraw_adjust_sizes_info_only (_tmp0_);
+#line 162 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ graw_throw_exception ("adjust_sizes_info_only", _tmp1_, &_inner_error_);
+#line 162 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 162 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 162 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 162 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 1060 "GRaw.c"
+ } else {
+#line 162 "/home/jens/Source/shotwell/src/photos/GRaw.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 162 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 162 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 1068 "GRaw.c"
+ }
+ }
+}
+
+
+static libraw_imgother_t libraw_get_image_other (libraw_data_t* self) {
+ libraw_imgother_t result = {0};
+ libraw_imgother_t _tmp0_ = {0};
+#line 188 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ g_return_val_if_fail (self != NULL, result);
+#line 188 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ _tmp0_ = self->other;
+#line 188 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ result = _tmp0_;
+#line 188 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ return result;
+#line 1085 "GRaw.c"
+}
+
+
+libraw_imgother_t graw_processor_get_image_other (GRawProcessor* self) {
+ libraw_imgother_t result = {0};
+ libraw_data_t* _tmp0_ = NULL;
+ libraw_imgother_t _tmp1_ = {0};
+#line 165 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_val_if_fail (GRAW_IS_PROCESSOR (self), result);
+#line 166 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->proc;
+#line 166 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = libraw_get_image_other (_tmp0_);
+#line 166 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ result = _tmp1_;
+#line 166 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return result;
+#line 1103 "GRaw.c"
+}
+
+
+static libraw_iparams_t libraw_get_image_params (libraw_data_t* self) {
+ libraw_iparams_t result = {0};
+ libraw_iparams_t _tmp0_ = {0};
+#line 189 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ g_return_val_if_fail (self != NULL, result);
+#line 189 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ _tmp0_ = self->idata;
+#line 189 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ result = _tmp0_;
+#line 189 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ return result;
+#line 1118 "GRaw.c"
+}
+
+
+libraw_iparams_t graw_processor_get_image_params (GRawProcessor* self) {
+ libraw_iparams_t result = {0};
+ libraw_data_t* _tmp0_ = NULL;
+ libraw_iparams_t _tmp1_ = {0};
+#line 169 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_val_if_fail (GRAW_IS_PROCESSOR (self), result);
+#line 170 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->proc;
+#line 170 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = libraw_get_image_params (_tmp0_);
+#line 170 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ result = _tmp1_;
+#line 170 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return result;
+#line 1136 "GRaw.c"
+}
+
+
+static libraw_image_sizes_t libraw_get_sizes (libraw_data_t* self) {
+ libraw_image_sizes_t result = {0};
+ libraw_image_sizes_t _tmp0_ = {0};
+#line 192 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ g_return_val_if_fail (self != NULL, result);
+#line 192 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ _tmp0_ = self->sizes;
+#line 192 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ result = _tmp0_;
+#line 192 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ return result;
+#line 1151 "GRaw.c"
+}
+
+
+libraw_image_sizes_t graw_processor_get_sizes (GRawProcessor* self) {
+ libraw_image_sizes_t result = {0};
+ libraw_data_t* _tmp0_ = NULL;
+ libraw_image_sizes_t _tmp1_ = {0};
+#line 173 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_val_if_fail (GRAW_IS_PROCESSOR (self), result);
+#line 174 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->proc;
+#line 174 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = libraw_get_sizes (_tmp0_);
+#line 174 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ result = _tmp1_;
+#line 174 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return result;
+#line 1169 "GRaw.c"
+}
+
+
+static libraw_thumbnail_t libraw_get_thumbnail (libraw_data_t* self) {
+ libraw_thumbnail_t result = {0};
+ libraw_thumbnail_t _tmp0_ = {0};
+#line 193 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ g_return_val_if_fail (self != NULL, result);
+#line 193 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ _tmp0_ = self->thumbnail;
+#line 193 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ result = _tmp0_;
+#line 193 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ return result;
+#line 1184 "GRaw.c"
+}
+
+
+libraw_thumbnail_t graw_processor_get_thumbnail (GRawProcessor* self) {
+ libraw_thumbnail_t result = {0};
+ libraw_data_t* _tmp0_ = NULL;
+ libraw_thumbnail_t _tmp1_ = {0};
+#line 177 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_val_if_fail (GRAW_IS_PROCESSOR (self), result);
+#line 178 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->proc;
+#line 178 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = libraw_get_thumbnail (_tmp0_);
+#line 178 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ result = _tmp1_;
+#line 178 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return result;
+#line 1202 "GRaw.c"
+}
+
+
+GRawProcessedImage* graw_processor_make_mem_image (GRawProcessor* self, GError** error) {
+ GRawProcessedImage* result = NULL;
+ GRawProcessedImage* _tmp0_ = NULL;
+ libraw_data_t* _tmp1_ = NULL;
+ GRawProcessedImage* _tmp2_ = NULL;
+ GRawProcessedImage* _tmp3_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 181 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_val_if_fail (GRAW_IS_PROCESSOR (self), NULL);
+#line 182 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = self->priv->proc;
+#line 182 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp2_ = graw_processed_image_new (_tmp1_, &_inner_error_);
+#line 182 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = _tmp2_;
+#line 182 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 182 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 182 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 182 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return NULL;
+#line 1229 "GRaw.c"
+ } else {
+#line 182 "/home/jens/Source/shotwell/src/photos/GRaw.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 182 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 182 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return NULL;
+#line 1237 "GRaw.c"
+ }
+ }
+#line 182 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp3_ = _tmp0_;
+#line 182 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = NULL;
+#line 182 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ result = _tmp3_;
+#line 182 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _graw_processed_image_unref0 (_tmp0_);
+#line 182 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return result;
+#line 1250 "GRaw.c"
+}
+
+
+GRawProcessedImage* graw_processor_make_thumb_image (GRawProcessor* self, GError** error) {
+ GRawProcessedImage* result = NULL;
+ GRawProcessedImage* _tmp0_ = NULL;
+ libraw_data_t* _tmp1_ = NULL;
+ GRawProcessedImage* _tmp2_ = NULL;
+ GRawProcessedImage* _tmp3_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 185 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_val_if_fail (GRAW_IS_PROCESSOR (self), NULL);
+#line 186 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = self->priv->proc;
+#line 186 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp2_ = graw_processed_image_new_from_thumb (_tmp1_, &_inner_error_);
+#line 186 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = _tmp2_;
+#line 186 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 186 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 186 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 186 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return NULL;
+#line 1277 "GRaw.c"
+ } else {
+#line 186 "/home/jens/Source/shotwell/src/photos/GRaw.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 186 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 186 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return NULL;
+#line 1285 "GRaw.c"
+ }
+ }
+#line 186 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp3_ = _tmp0_;
+#line 186 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = NULL;
+#line 186 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ result = _tmp3_;
+#line 186 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _graw_processed_image_unref0 (_tmp0_);
+#line 186 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return result;
+#line 1298 "GRaw.c"
+}
+
+
+void graw_processor_open_buffer (GRawProcessor* self, guint8* buffer, int buffer_length1, GError** error) {
+ libraw_data_t* _tmp0_ = NULL;
+ guint8* _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+ enum LibRaw_errors _tmp2_ = 0;
+ GError * _inner_error_ = NULL;
+#line 189 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (GRAW_IS_PROCESSOR (self));
+#line 190 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->proc;
+#line 190 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = buffer;
+#line 190 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1__length1 = buffer_length1;
+#line 190 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp2_ = libraw_open_buffer (_tmp0_, _tmp1_, _tmp1__length1);
+#line 190 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ graw_throw_exception ("open_buffer", _tmp2_, &_inner_error_);
+#line 190 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 190 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 190 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 190 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 1328 "GRaw.c"
+ } else {
+#line 190 "/home/jens/Source/shotwell/src/photos/GRaw.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 190 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 190 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 1336 "GRaw.c"
+ }
+ }
+}
+
+
+void graw_processor_open_file (GRawProcessor* self, const gchar* filename, GError** error) {
+ libraw_data_t* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ enum LibRaw_errors _tmp2_ = 0;
+ GError * _inner_error_ = NULL;
+#line 193 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (GRAW_IS_PROCESSOR (self));
+#line 193 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (filename != NULL);
+#line 194 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->proc;
+#line 194 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = filename;
+#line 194 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp2_ = libraw_open_file (_tmp0_, _tmp1_);
+#line 194 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ graw_throw_exception ("open_file", _tmp2_, &_inner_error_);
+#line 194 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 194 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 194 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 194 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 1367 "GRaw.c"
+ } else {
+#line 194 "/home/jens/Source/shotwell/src/photos/GRaw.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 194 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 194 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 1375 "GRaw.c"
+ }
+ }
+}
+
+
+void graw_processor_process (GRawProcessor* self, GError** error) {
+ libraw_data_t* _tmp0_ = NULL;
+ enum LibRaw_errors _tmp1_ = 0;
+ GError * _inner_error_ = NULL;
+#line 197 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (GRAW_IS_PROCESSOR (self));
+#line 198 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->proc;
+#line 198 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = libraw_dcraw_process (_tmp0_);
+#line 198 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ graw_throw_exception ("process", _tmp1_, &_inner_error_);
+#line 198 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 198 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 198 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 198 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 1401 "GRaw.c"
+ } else {
+#line 198 "/home/jens/Source/shotwell/src/photos/GRaw.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 198 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 198 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 1409 "GRaw.c"
+ }
+ }
+}
+
+
+void graw_processor_ppm_tiff_writer (GRawProcessor* self, const gchar* filename, GError** error) {
+ libraw_data_t* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ enum LibRaw_errors _tmp2_ = 0;
+ GError * _inner_error_ = NULL;
+#line 201 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (GRAW_IS_PROCESSOR (self));
+#line 201 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (filename != NULL);
+#line 202 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->proc;
+#line 202 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = filename;
+#line 202 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp2_ = libraw_dcraw_ppm_tiff_writer (_tmp0_, _tmp1_);
+#line 202 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ graw_throw_exception ("ppm_tiff_writer", _tmp2_, &_inner_error_);
+#line 202 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 202 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 202 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 202 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 1440 "GRaw.c"
+ } else {
+#line 202 "/home/jens/Source/shotwell/src/photos/GRaw.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 202 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 202 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 1448 "GRaw.c"
+ }
+ }
+}
+
+
+void graw_processor_thumb_writer (GRawProcessor* self, const gchar* filename, GError** error) {
+ libraw_data_t* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ enum LibRaw_errors _tmp2_ = 0;
+ GError * _inner_error_ = NULL;
+#line 205 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (GRAW_IS_PROCESSOR (self));
+#line 205 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (filename != NULL);
+#line 206 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->proc;
+#line 206 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = filename;
+#line 206 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp2_ = libraw_dcraw_thumb_writer (_tmp0_, _tmp1_);
+#line 206 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ graw_throw_exception ("thumb_writer", _tmp2_, &_inner_error_);
+#line 206 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 206 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 206 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 206 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 1479 "GRaw.c"
+ } else {
+#line 206 "/home/jens/Source/shotwell/src/photos/GRaw.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 206 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 206 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 1487 "GRaw.c"
+ }
+ }
+}
+
+
+void graw_processor_recycle (GRawProcessor* self) {
+ libraw_data_t* _tmp0_ = NULL;
+#line 209 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (GRAW_IS_PROCESSOR (self));
+#line 210 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->proc;
+#line 210 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ libraw_recycle (_tmp0_);
+#line 1501 "GRaw.c"
+}
+
+
+void graw_processor_unpack (GRawProcessor* self, GError** error) {
+ libraw_data_t* _tmp0_ = NULL;
+ enum LibRaw_errors _tmp1_ = 0;
+ GError * _inner_error_ = NULL;
+#line 213 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (GRAW_IS_PROCESSOR (self));
+#line 214 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->proc;
+#line 214 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = libraw_unpack (_tmp0_);
+#line 214 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ graw_throw_exception ("unpack", _tmp1_, &_inner_error_);
+#line 214 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 214 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 214 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 214 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 1525 "GRaw.c"
+ } else {
+#line 214 "/home/jens/Source/shotwell/src/photos/GRaw.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 214 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 214 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 1533 "GRaw.c"
+ }
+ }
+}
+
+
+void graw_processor_unpack_thumb (GRawProcessor* self, GError** error) {
+ libraw_data_t* _tmp0_ = NULL;
+ enum LibRaw_errors _tmp1_ = 0;
+ GError * _inner_error_ = NULL;
+#line 217 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (GRAW_IS_PROCESSOR (self));
+#line 218 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->proc;
+#line 218 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = libraw_unpack_thumb (_tmp0_);
+#line 218 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ graw_throw_exception ("unpack_thumb", _tmp1_, &_inner_error_);
+#line 218 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 218 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 218 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 218 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 1559 "GRaw.c"
+ } else {
+#line 218 "/home/jens/Source/shotwell/src/photos/GRaw.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 218 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 218 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 1567 "GRaw.c"
+ }
+ }
+}
+
+
+static void lib_raw_output_params_set_chromatic_aberrations (libraw_output_params_t self, gdouble red_multiplier, gdouble green_multiplier) {
+ gdouble _tmp0_ = 0.0;
+ gdouble _tmp1_ = 0.0;
+ gdouble _tmp2_ = 0.0;
+ gdouble _tmp3_ = 0.0;
+#line 148 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ _tmp0_ = red_multiplier;
+#line 148 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ self.aber[0] = _tmp0_;
+#line 148 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ _tmp1_ = self.aber[0];
+#line 149 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ _tmp2_ = green_multiplier;
+#line 149 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ self.aber[2] = _tmp2_;
+#line 149 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ _tmp3_ = self.aber[2];
+#line 1590 "GRaw.c"
+}
+
+
+static void lib_raw_output_params_set_gamma_curve (libraw_output_params_t self, gdouble power, gdouble slope) {
+ gdouble _tmp0_ = 0.0;
+ gdouble _tmp1_ = 0.0;
+ gdouble _tmp2_ = 0.0;
+ gdouble _tmp3_ = 0.0;
+#line 153 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ _tmp0_ = power;
+#line 153 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ self.gamm[0] = _tmp0_;
+#line 153 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ _tmp1_ = self.gamm[0];
+#line 154 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ _tmp2_ = slope;
+#line 154 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ self.gamm[1] = _tmp2_;
+#line 154 "/home/jens/Source/shotwell/vapi/libraw.vapi"
+ _tmp3_ = self.gamm[1];
+#line 1611 "GRaw.c"
+}
+
+
+void graw_processor_configure_for_rgb_display (GRawProcessor* self, gboolean half_size) {
+ libraw_output_params_t* _tmp0_ = NULL;
+ libraw_output_params_t* _tmp1_ = NULL;
+ libraw_output_params_t* _tmp2_ = NULL;
+ libraw_output_params_t* _tmp3_ = NULL;
+ libraw_output_params_t* _tmp4_ = NULL;
+ libraw_output_params_t* _tmp5_ = NULL;
+ libraw_output_params_t* _tmp6_ = NULL;
+ libraw_output_params_t* _tmp7_ = NULL;
+ gboolean _tmp8_ = FALSE;
+ libraw_output_params_t* _tmp9_ = NULL;
+ libraw_output_params_t* _tmp10_ = NULL;
+ libraw_output_params_t* _tmp11_ = NULL;
+ libraw_output_params_t* _tmp12_ = NULL;
+ libraw_output_params_t* _tmp13_ = NULL;
+ libraw_output_params_t* _tmp14_ = NULL;
+ libraw_output_params_t* _tmp15_ = NULL;
+ libraw_output_params_t* _tmp16_ = NULL;
+ libraw_output_params_t* _tmp17_ = NULL;
+ libraw_output_params_t* _tmp18_ = NULL;
+ libraw_output_params_t* _tmp19_ = NULL;
+ libraw_output_params_t* _tmp20_ = NULL;
+ libraw_output_params_t* _tmp21_ = NULL;
+ libraw_output_params_t* _tmp22_ = NULL;
+ libraw_output_params_t* _tmp23_ = NULL;
+ libraw_output_params_t* _tmp24_ = NULL;
+ libraw_output_params_t* _tmp25_ = NULL;
+ libraw_output_params_t* _tmp26_ = NULL;
+ libraw_output_params_t* _tmp27_ = NULL;
+ libraw_output_params_t* _tmp28_ = NULL;
+ libraw_output_params_t* _tmp29_ = NULL;
+ libraw_output_params_t* _tmp30_ = NULL;
+#line 224 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (GRAW_IS_PROCESSOR (self));
+#line 229 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = graw_processor_get_output_params (self);
+#line 229 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = _tmp0_;
+#line 229 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ lib_raw_output_params_set_chromatic_aberrations (*_tmp1_, 1.0, 1.0);
+#line 230 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp2_ = graw_processor_get_output_params (self);
+#line 230 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp3_ = _tmp2_;
+#line 230 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ lib_raw_output_params_set_gamma_curve (*_tmp3_, GRAW_SRGB_POWER, GRAW_SRGB_SLOPE);
+#line 234 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp4_ = graw_processor_get_output_params (self);
+#line 234 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp5_ = _tmp4_;
+#line 234 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ (*_tmp5_).bright = 1.0f;
+#line 236 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp6_ = graw_processor_get_output_params (self);
+#line 236 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp7_ = _tmp6_;
+#line 236 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp8_ = half_size;
+#line 236 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ (*_tmp7_).half_size = _tmp8_;
+#line 238 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp9_ = graw_processor_get_output_params (self);
+#line 238 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp10_ = _tmp9_;
+#line 238 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ (*_tmp10_).highlight = (gint) GRAW_HIGHLIGHT_MODE_CLIP;
+#line 239 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp11_ = graw_processor_get_output_params (self);
+#line 239 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp12_ = _tmp11_;
+#line 239 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ (*_tmp12_).use_auto_wb = TRUE;
+#line 240 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp13_ = graw_processor_get_output_params (self);
+#line 240 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp14_ = _tmp13_;
+#line 240 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ (*_tmp14_).use_camera_wb = TRUE;
+#line 241 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp15_ = graw_processor_get_output_params (self);
+#line 241 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp16_ = _tmp15_;
+#line 241 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ (*_tmp16_).use_camera_matrix = TRUE;
+#line 242 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp17_ = graw_processor_get_output_params (self);
+#line 242 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp18_ = _tmp17_;
+#line 242 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ (*_tmp18_).output_color = (gint) GRAW_COLORSPACE_SRGB;
+#line 247 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp19_ = graw_processor_get_output_params (self);
+#line 247 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp20_ = _tmp19_;
+#line 247 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ (*_tmp20_).output_bps = 8;
+#line 249 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp21_ = graw_processor_get_output_params (self);
+#line 249 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp22_ = _tmp21_;
+#line 249 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ (*_tmp22_).user_flip = (gint) GRAW_FLIP_FROM_SOURCE;
+#line 250 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp23_ = graw_processor_get_output_params (self);
+#line 250 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp24_ = _tmp23_;
+#line 250 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ (*_tmp24_).user_qual = (gint) GRAW_INTERPOLATION_QUALITY_PPG;
+#line 254 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp25_ = graw_processor_get_output_params (self);
+#line 254 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp26_ = _tmp25_;
+#line 254 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ (*_tmp26_).no_auto_bright = TRUE;
+#line 255 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp27_ = graw_processor_get_output_params (self);
+#line 255 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp28_ = _tmp27_;
+#line 255 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ (*_tmp28_).auto_bright_thr = 0.01f;
+#line 256 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp29_ = graw_processor_get_output_params (self);
+#line 256 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp30_ = _tmp29_;
+#line 256 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ (*_tmp30_).use_fuji_rotate = (gint) GRAW_FUJI_ROTATE_USE;
+#line 1741 "GRaw.c"
+}
+
+
+libraw_output_params_t* graw_processor_get_output_params (GRawProcessor* self) {
+ libraw_output_params_t* result;
+ libraw_data_t* _tmp0_ = NULL;
+#line 150 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_val_if_fail (GRAW_IS_PROCESSOR (self), NULL);
+#line 151 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = self->priv->proc;
+#line 151 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ result = &_tmp0_->params;
+#line 151 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return result;
+#line 1756 "GRaw.c"
+}
+
+
+static void graw_value_processor_init (GValue* value) {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ value->data[0].v_pointer = NULL;
+#line 1763 "GRaw.c"
+}
+
+
+static void graw_value_processor_free_value (GValue* value) {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (value->data[0].v_pointer) {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ graw_processor_unref (value->data[0].v_pointer);
+#line 1772 "GRaw.c"
+ }
+}
+
+
+static void graw_value_processor_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (src_value->data[0].v_pointer) {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ dest_value->data[0].v_pointer = graw_processor_ref (src_value->data[0].v_pointer);
+#line 1782 "GRaw.c"
+ } else {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 1786 "GRaw.c"
+ }
+}
+
+
+static gpointer graw_value_processor_peek_pointer (const GValue* value) {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return value->data[0].v_pointer;
+#line 1794 "GRaw.c"
+}
+
+
+static gchar* graw_value_processor_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (collect_values[0].v_pointer) {
+#line 1801 "GRaw.c"
+ GRawProcessor* object;
+ object = collect_values[0].v_pointer;
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 1808 "GRaw.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.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 1812 "GRaw.c"
+ }
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ value->data[0].v_pointer = graw_processor_ref (object);
+#line 1816 "GRaw.c"
+ } else {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ value->data[0].v_pointer = NULL;
+#line 1820 "GRaw.c"
+ }
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return NULL;
+#line 1824 "GRaw.c"
+}
+
+
+static gchar* graw_value_processor_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ GRawProcessor** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (!object_p) {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 1835 "GRaw.c"
+ }
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (!value->data[0].v_pointer) {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ *object_p = NULL;
+#line 1841 "GRaw.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ *object_p = value->data[0].v_pointer;
+#line 1845 "GRaw.c"
+ } else {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ *object_p = graw_processor_ref (value->data[0].v_pointer);
+#line 1849 "GRaw.c"
+ }
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return NULL;
+#line 1853 "GRaw.c"
+}
+
+
+GParamSpec* graw_param_spec_processor (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ GRawParamSpecProcessor* spec;
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, GRAW_TYPE_PROCESSOR), NULL);
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return G_PARAM_SPEC (spec);
+#line 1867 "GRaw.c"
+}
+
+
+gpointer graw_value_get_processor (const GValue* value) {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GRAW_TYPE_PROCESSOR), NULL);
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return value->data[0].v_pointer;
+#line 1876 "GRaw.c"
+}
+
+
+void graw_value_set_processor (GValue* value, gpointer v_object) {
+ GRawProcessor* old;
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GRAW_TYPE_PROCESSOR));
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ old = value->data[0].v_pointer;
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (v_object) {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GRAW_TYPE_PROCESSOR));
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ value->data[0].v_pointer = v_object;
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ graw_processor_ref (value->data[0].v_pointer);
+#line 1896 "GRaw.c"
+ } else {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ value->data[0].v_pointer = NULL;
+#line 1900 "GRaw.c"
+ }
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (old) {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ graw_processor_unref (old);
+#line 1906 "GRaw.c"
+ }
+}
+
+
+void graw_value_take_processor (GValue* value, gpointer v_object) {
+ GRawProcessor* old;
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GRAW_TYPE_PROCESSOR));
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ old = value->data[0].v_pointer;
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (v_object) {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GRAW_TYPE_PROCESSOR));
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ value->data[0].v_pointer = v_object;
+#line 1925 "GRaw.c"
+ } else {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ value->data[0].v_pointer = NULL;
+#line 1929 "GRaw.c"
+ }
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (old) {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ graw_processor_unref (old);
+#line 1935 "GRaw.c"
+ }
+}
+
+
+static void graw_processor_class_init (GRawProcessorClass * klass) {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ graw_processor_parent_class = g_type_class_peek_parent (klass);
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ ((GRawProcessorClass *) klass)->finalize = graw_processor_finalize;
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_type_class_add_private (klass, sizeof (GRawProcessorPrivate));
+#line 1947 "GRaw.c"
+}
+
+
+static void graw_processor_instance_init (GRawProcessor * self) {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ self->priv = GRAW_PROCESSOR_GET_PRIVATE (self);
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ self->ref_count = 1;
+#line 1956 "GRaw.c"
+}
+
+
+static void graw_processor_finalize (GRawProcessor* obj) {
+ GRawProcessor * self;
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAW_TYPE_PROCESSOR, GRawProcessor);
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_signal_handlers_destroy (self);
+#line 155 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _libraw_close0 (self->priv->proc);
+#line 1968 "GRaw.c"
+}
+
+
+GType graw_processor_get_type (void) {
+ static volatile gsize graw_processor_type_id__volatile = 0;
+ if (g_once_init_enter (&graw_processor_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { graw_value_processor_init, graw_value_processor_free_value, graw_value_processor_copy_value, graw_value_processor_peek_pointer, "p", graw_value_processor_collect_value, "p", graw_value_processor_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (GRawProcessorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) graw_processor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GRawProcessor), 0, (GInstanceInitFunc) graw_processor_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 graw_processor_type_id;
+ graw_processor_type_id = g_type_register_fundamental (g_type_fundamental_next (), "GRawProcessor", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&graw_processor_type_id__volatile, graw_processor_type_id);
+ }
+ return graw_processor_type_id__volatile;
+}
+
+
+gpointer graw_processor_ref (gpointer instance) {
+ GRawProcessor* self;
+ self = instance;
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return instance;
+#line 1993 "GRaw.c"
+}
+
+
+void graw_processor_unref (gpointer instance) {
+ GRawProcessor* self;
+ self = instance;
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ GRAW_PROCESSOR_GET_CLASS (self)->finalize (self);
+#line 148 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 2006 "GRaw.c"
+ }
+}
+
+
+void graw_throw_exception (const gchar* caller, enum LibRaw_errors _result_, GError** error) {
+ enum LibRaw_errors _tmp0_ = 0;
+ gchar* msg = NULL;
+ const gchar* _tmp7_ = NULL;
+ enum LibRaw_errors _tmp8_ = 0;
+ const gchar* _tmp9_ = NULL;
+ gchar* _tmp10_ = NULL;
+ enum LibRaw_errors _tmp11_ = 0;
+ GError * _inner_error_ = NULL;
+#line 260 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_return_if_fail (caller != NULL);
+#line 261 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp0_ = _result_;
+#line 261 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_tmp0_ == LIBRAW_SUCCESS) {
+#line 262 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2028 "GRaw.c"
+ } else {
+ enum LibRaw_errors _tmp1_ = 0;
+#line 263 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp1_ = _result_;
+#line 263 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_tmp1_ > 0) {
+#line 2035 "GRaw.c"
+ const gchar* _tmp2_ = NULL;
+ enum LibRaw_errors _tmp3_ = 0;
+ enum LibRaw_errors _tmp4_ = 0;
+ const gchar* _tmp5_ = NULL;
+ GError* _tmp6_ = NULL;
+#line 264 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp2_ = caller;
+#line 264 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp3_ = _result_;
+#line 264 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp4_ = _result_;
+#line 264 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp5_ = g_strerror ((gint) _tmp4_);
+#line 264 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp6_ = g_error_new (GRAW_EXCEPTION, GRAW_EXCEPTION_SYSTEM_ERROR, "%s: System error %d: %s", _tmp2_, (gint) _tmp3_, _tmp5_);
+#line 264 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _inner_error_ = _tmp6_;
+#line 264 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 264 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 264 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2059 "GRaw.c"
+ } else {
+#line 264 "/home/jens/Source/shotwell/src/photos/GRaw.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 264 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 264 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2067 "GRaw.c"
+ }
+ }
+ }
+#line 266 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp7_ = caller;
+#line 266 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp8_ = _result_;
+#line 266 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp9_ = libraw_strerror (_tmp8_);
+#line 266 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp10_ = g_strdup_printf ("%s: %s", _tmp7_, _tmp9_);
+#line 266 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ msg = _tmp10_;
+#line 268 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp11_ = _result_;
+#line 268 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ switch (_tmp11_) {
+#line 268 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ case LIBRAW_UNSPECIFIED_ERROR:
+#line 2087 "GRaw.c"
+ {
+ const gchar* _tmp12_ = NULL;
+ GError* _tmp13_ = NULL;
+#line 270 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp12_ = msg;
+#line 270 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp13_ = g_error_new_literal (GRAW_EXCEPTION, GRAW_EXCEPTION_UNSPECIFIED, _tmp12_);
+#line 270 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _inner_error_ = _tmp13_;
+#line 270 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 270 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 270 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 270 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2105 "GRaw.c"
+ } else {
+#line 270 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 270 "/home/jens/Source/shotwell/src/photos/GRaw.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 270 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 270 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2115 "GRaw.c"
+ }
+ }
+#line 268 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ case LIBRAW_FILE_UNSUPPORTED:
+#line 2120 "GRaw.c"
+ {
+ const gchar* _tmp14_ = NULL;
+ GError* _tmp15_ = NULL;
+#line 273 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp14_ = msg;
+#line 273 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp15_ = g_error_new_literal (GRAW_EXCEPTION, GRAW_EXCEPTION_UNSUPPORTED_FILE, _tmp14_);
+#line 273 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _inner_error_ = _tmp15_;
+#line 273 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 273 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 273 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 273 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2138 "GRaw.c"
+ } else {
+#line 273 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 273 "/home/jens/Source/shotwell/src/photos/GRaw.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 273 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 273 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2148 "GRaw.c"
+ }
+ }
+#line 268 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ case LIBRAW_REQUEST_FOR_NONEXISTENT_IMAGE:
+#line 2153 "GRaw.c"
+ {
+ const gchar* _tmp16_ = NULL;
+ GError* _tmp17_ = NULL;
+#line 276 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp16_ = msg;
+#line 276 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp17_ = g_error_new_literal (GRAW_EXCEPTION, GRAW_EXCEPTION_NONEXISTANT_IMAGE, _tmp16_);
+#line 276 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _inner_error_ = _tmp17_;
+#line 276 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 276 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 276 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 276 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2171 "GRaw.c"
+ } else {
+#line 276 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 276 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 276 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 276 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2181 "GRaw.c"
+ }
+ }
+#line 268 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ case LIBRAW_OUT_OF_ORDER_CALL:
+#line 2186 "GRaw.c"
+ {
+ const gchar* _tmp18_ = NULL;
+ GError* _tmp19_ = NULL;
+#line 279 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp18_ = msg;
+#line 279 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp19_ = g_error_new_literal (GRAW_EXCEPTION, GRAW_EXCEPTION_OUT_OF_ORDER_CALL, _tmp18_);
+#line 279 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _inner_error_ = _tmp19_;
+#line 279 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 279 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 279 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 279 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2204 "GRaw.c"
+ } else {
+#line 279 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 279 "/home/jens/Source/shotwell/src/photos/GRaw.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 279 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 279 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2214 "GRaw.c"
+ }
+ }
+#line 268 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ case LIBRAW_NO_THUMBNAIL:
+#line 2219 "GRaw.c"
+ {
+ const gchar* _tmp20_ = NULL;
+ GError* _tmp21_ = NULL;
+#line 282 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp20_ = msg;
+#line 282 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp21_ = g_error_new_literal (GRAW_EXCEPTION, GRAW_EXCEPTION_NO_THUMBNAIL, _tmp20_);
+#line 282 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _inner_error_ = _tmp21_;
+#line 282 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 282 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 282 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 282 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2237 "GRaw.c"
+ } else {
+#line 282 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 282 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 282 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 282 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2247 "GRaw.c"
+ }
+ }
+#line 268 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ case LIBRAW_UNSUPPORTED_THUMBNAIL:
+#line 2252 "GRaw.c"
+ {
+ const gchar* _tmp22_ = NULL;
+ GError* _tmp23_ = NULL;
+#line 285 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp22_ = msg;
+#line 285 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp23_ = g_error_new_literal (GRAW_EXCEPTION, GRAW_EXCEPTION_UNSUPPORTED_THUMBNAIL, _tmp22_);
+#line 285 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _inner_error_ = _tmp23_;
+#line 285 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 285 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 285 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 285 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2270 "GRaw.c"
+ } else {
+#line 285 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 285 "/home/jens/Source/shotwell/src/photos/GRaw.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 285 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 285 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2280 "GRaw.c"
+ }
+ }
+#line 268 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ case LIBRAW_UNSUFFICIENT_MEMORY:
+#line 2285 "GRaw.c"
+ {
+ const gchar* _tmp24_ = NULL;
+ GError* _tmp25_ = NULL;
+#line 288 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp24_ = msg;
+#line 288 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp25_ = g_error_new_literal (GRAW_EXCEPTION, GRAW_EXCEPTION_OUT_OF_MEMORY, _tmp24_);
+#line 288 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _inner_error_ = _tmp25_;
+#line 288 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 288 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 288 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 288 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2303 "GRaw.c"
+ } else {
+#line 288 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 288 "/home/jens/Source/shotwell/src/photos/GRaw.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 288 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 288 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2313 "GRaw.c"
+ }
+ }
+#line 268 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ case LIBRAW_DATA_ERROR:
+#line 2318 "GRaw.c"
+ {
+ const gchar* _tmp26_ = NULL;
+ GError* _tmp27_ = NULL;
+#line 291 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp26_ = msg;
+#line 291 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp27_ = g_error_new_literal (GRAW_EXCEPTION, GRAW_EXCEPTION_DATA_ERROR, _tmp26_);
+#line 291 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _inner_error_ = _tmp27_;
+#line 291 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 291 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 291 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 291 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2336 "GRaw.c"
+ } else {
+#line 291 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 291 "/home/jens/Source/shotwell/src/photos/GRaw.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 291 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 291 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2346 "GRaw.c"
+ }
+ }
+#line 268 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ case LIBRAW_IO_ERROR:
+#line 2351 "GRaw.c"
+ {
+ const gchar* _tmp28_ = NULL;
+ GError* _tmp29_ = NULL;
+#line 294 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp28_ = msg;
+#line 294 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp29_ = g_error_new_literal (GRAW_EXCEPTION, GRAW_EXCEPTION_IO_ERROR, _tmp28_);
+#line 294 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _inner_error_ = _tmp29_;
+#line 294 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 294 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 294 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 294 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2369 "GRaw.c"
+ } else {
+#line 294 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 294 "/home/jens/Source/shotwell/src/photos/GRaw.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 294 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 294 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2379 "GRaw.c"
+ }
+ }
+#line 268 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ case LIBRAW_CANCELLED_BY_CALLBACK:
+#line 2384 "GRaw.c"
+ {
+ const gchar* _tmp30_ = NULL;
+ GError* _tmp31_ = NULL;
+#line 297 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp30_ = msg;
+#line 297 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp31_ = g_error_new_literal (GRAW_EXCEPTION, GRAW_EXCEPTION_CANCELLED_BY_CALLBACK, _tmp30_);
+#line 297 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _inner_error_ = _tmp31_;
+#line 297 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 297 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 297 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 297 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2402 "GRaw.c"
+ } else {
+#line 297 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 297 "/home/jens/Source/shotwell/src/photos/GRaw.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 297 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 297 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2412 "GRaw.c"
+ }
+ }
+#line 268 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ case LIBRAW_BAD_CROP:
+#line 2417 "GRaw.c"
+ {
+ const gchar* _tmp32_ = NULL;
+ GError* _tmp33_ = NULL;
+#line 300 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp32_ = msg;
+#line 300 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _tmp33_ = g_error_new_literal (GRAW_EXCEPTION, GRAW_EXCEPTION_BAD_CROP, _tmp32_);
+#line 300 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _inner_error_ = _tmp33_;
+#line 300 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 300 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_propagate_error (error, _inner_error_);
+#line 300 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 300 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2435 "GRaw.c"
+ } else {
+#line 300 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 300 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 300 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ g_clear_error (&_inner_error_);
+#line 300 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2445 "GRaw.c"
+ }
+ }
+ default:
+ {
+#line 303 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 303 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ return;
+#line 2454 "GRaw.c"
+ }
+ }
+#line 260 "/home/jens/Source/shotwell/src/photos/GRaw.vala"
+ _g_free0 (msg);
+#line 2459 "GRaw.c"
+}
+
+
+
diff --git a/src/photos/GRaw.vala b/src/photos/GRaw.vala
index 53c328c..ec1df8d 100644
--- a/src/photos/GRaw.vala
+++ b/src/photos/GRaw.vala
@@ -125,7 +125,8 @@ public class ProcessedImage {
// to be decoded before being useful. This will throw an error if the format is not
// supported
try {
- pixbuf = new Gdk.Pixbuf.from_stream(new MemoryInputStream.from_data(image.data, null),
+ var bytes = new Bytes.static (image.data);
+ pixbuf = new Gdk.Pixbuf.from_stream(new MemoryInputStream.from_bytes(bytes),
null);
} catch (Error err) {
throw new Exception.UNSUPPORTED_THUMBNAIL(err.message);
diff --git a/src/photos/GdkSupport.c b/src/photos/GdkSupport.c
new file mode 100644
index 0000000..f016592
--- /dev/null
+++ b/src/photos/GdkSupport.c
@@ -0,0 +1,1402 @@
+/* GdkSupport.c generated by valac 0.32.1, the Vala compiler
+ * generated from GdkSupport.vala, do not modify */
+
+/* Copyright 2016 Software Freedom Conservancy Inc.
+ *
+ * This software is licensed under the GNU Lesser General Public License
+ * (version 2.1 or later). See the COPYING file in this distribution.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gio/gio.h>
+
+
+#define TYPE_PHOTO_FILE_ADAPTER (photo_file_adapter_get_type ())
+#define PHOTO_FILE_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter))
+#define PHOTO_FILE_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapterClass))
+#define IS_PHOTO_FILE_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_ADAPTER))
+#define IS_PHOTO_FILE_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_ADAPTER))
+#define PHOTO_FILE_ADAPTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapterClass))
+
+typedef struct _PhotoFileAdapter PhotoFileAdapter;
+typedef struct _PhotoFileAdapterClass PhotoFileAdapterClass;
+typedef struct _PhotoFileAdapterPrivate PhotoFileAdapterPrivate;
+
+#define TYPE_PHOTO_FILE_READER (photo_file_reader_get_type ())
+#define PHOTO_FILE_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_READER, PhotoFileReader))
+#define PHOTO_FILE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_READER, PhotoFileReaderClass))
+#define IS_PHOTO_FILE_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_READER))
+#define IS_PHOTO_FILE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_READER))
+#define PHOTO_FILE_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_READER, PhotoFileReaderClass))
+
+typedef struct _PhotoFileReader PhotoFileReader;
+typedef struct _PhotoFileReaderClass PhotoFileReaderClass;
+typedef struct _PhotoFileReaderPrivate PhotoFileReaderPrivate;
+
+#define TYPE_MEDIA_METADATA (media_metadata_get_type ())
+#define MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_METADATA, MediaMetadata))
+#define MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_METADATA, MediaMetadataClass))
+#define IS_MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_METADATA))
+#define IS_MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_METADATA))
+#define MEDIA_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_METADATA, MediaMetadataClass))
+
+typedef struct _MediaMetadata MediaMetadata;
+typedef struct _MediaMetadataClass MediaMetadataClass;
+
+#define TYPE_PHOTO_METADATA (photo_metadata_get_type ())
+#define PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_METADATA, PhotoMetadata))
+#define PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_METADATA, PhotoMetadataClass))
+#define IS_PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_METADATA))
+#define IS_PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_METADATA))
+#define PHOTO_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_METADATA, PhotoMetadataClass))
+
+typedef struct _PhotoMetadata PhotoMetadata;
+typedef struct _PhotoMetadataClass PhotoMetadataClass;
+
+#define TYPE_DIMENSIONS (dimensions_get_type ())
+typedef struct _Dimensions Dimensions;
+
+#define TYPE_GDK_READER (gdk_reader_get_type ())
+#define GDK_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GDK_READER, GdkReader))
+#define GDK_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GDK_READER, GdkReaderClass))
+#define IS_GDK_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GDK_READER))
+#define IS_GDK_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GDK_READER))
+#define GDK_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GDK_READER, GdkReaderClass))
+
+typedef struct _GdkReader GdkReader;
+typedef struct _GdkReaderClass GdkReaderClass;
+typedef struct _GdkReaderPrivate GdkReaderPrivate;
+
+#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ())
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _media_metadata_unref0(var) ((var == NULL) ? NULL : (var = (media_metadata_unref (var), NULL)))
+#define _g_free0(var) (var = (g_free (var), NULL))
+
+#define TYPE_PHOTO_FILE_SNIFFER (photo_file_sniffer_get_type ())
+#define PHOTO_FILE_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer))
+#define PHOTO_FILE_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSnifferClass))
+#define IS_PHOTO_FILE_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_SNIFFER))
+#define IS_PHOTO_FILE_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_SNIFFER))
+#define PHOTO_FILE_SNIFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSnifferClass))
+
+typedef struct _PhotoFileSniffer PhotoFileSniffer;
+typedef struct _PhotoFileSnifferClass PhotoFileSnifferClass;
+typedef struct _PhotoFileSnifferPrivate PhotoFileSnifferPrivate;
+
+#define TYPE_DETECTED_PHOTO_INFORMATION (detected_photo_information_get_type ())
+#define DETECTED_PHOTO_INFORMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformation))
+#define DETECTED_PHOTO_INFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformationClass))
+#define IS_DETECTED_PHOTO_INFORMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DETECTED_PHOTO_INFORMATION))
+#define IS_DETECTED_PHOTO_INFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DETECTED_PHOTO_INFORMATION))
+#define DETECTED_PHOTO_INFORMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformationClass))
+
+typedef struct _DetectedPhotoInformation DetectedPhotoInformation;
+typedef struct _DetectedPhotoInformationClass DetectedPhotoInformationClass;
+
+#define PHOTO_FILE_SNIFFER_TYPE_OPTIONS (photo_file_sniffer_options_get_type ())
+
+#define TYPE_GDK_SNIFFER (gdk_sniffer_get_type ())
+#define GDK_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GDK_SNIFFER, GdkSniffer))
+#define GDK_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GDK_SNIFFER, GdkSnifferClass))
+#define IS_GDK_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GDK_SNIFFER))
+#define IS_GDK_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GDK_SNIFFER))
+#define GDK_SNIFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GDK_SNIFFER, GdkSnifferClass))
+
+typedef struct _GdkSniffer GdkSniffer;
+typedef struct _GdkSnifferClass GdkSnifferClass;
+typedef struct _GdkSnifferPrivate GdkSnifferPrivate;
+#define _detected_photo_information_unref0(var) ((var == NULL) ? NULL : (var = (detected_photo_information_unref (var), NULL)))
+#define _g_checksum_free0(var) ((var == NULL) ? NULL : (var = (g_checksum_free (var), NULL)))
+typedef struct _DetectedPhotoInformationPrivate DetectedPhotoInformationPrivate;
+#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
+
+struct _PhotoFileAdapter {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileAdapterPrivate * priv;
+};
+
+struct _PhotoFileAdapterClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileAdapter *self);
+};
+
+struct _Dimensions {
+ gint width;
+ gint height;
+};
+
+struct _PhotoFileReader {
+ PhotoFileAdapter parent_instance;
+ PhotoFileReaderPrivate * priv;
+};
+
+struct _PhotoFileReaderClass {
+ PhotoFileAdapterClass parent_class;
+ PhotoMetadata* (*read_metadata) (PhotoFileReader* self, GError** error);
+ GdkPixbuf* (*unscaled_read) (PhotoFileReader* self, GError** error);
+ GdkPixbuf* (*scaled_read) (PhotoFileReader* self, Dimensions* full, Dimensions* scaled, GError** error);
+};
+
+struct _GdkReader {
+ PhotoFileReader parent_instance;
+ GdkReaderPrivate * priv;
+};
+
+struct _GdkReaderClass {
+ PhotoFileReaderClass parent_class;
+};
+
+typedef enum {
+ PHOTO_FILE_FORMAT_JFIF,
+ PHOTO_FILE_FORMAT_RAW,
+ PHOTO_FILE_FORMAT_PNG,
+ PHOTO_FILE_FORMAT_TIFF,
+ PHOTO_FILE_FORMAT_BMP,
+ PHOTO_FILE_FORMAT_UNKNOWN
+} PhotoFileFormat;
+
+typedef enum {
+ PHOTO_FILE_SNIFFER_OPTIONS_GET_ALL = 0x00000000,
+ PHOTO_FILE_SNIFFER_OPTIONS_NO_MD5 = 0x00000001
+} PhotoFileSnifferOptions;
+
+struct _PhotoFileSniffer {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileSnifferPrivate * priv;
+ GFile* file;
+ PhotoFileSnifferOptions options;
+ gboolean calc_md5;
+};
+
+struct _PhotoFileSnifferClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileSniffer *self);
+ DetectedPhotoInformation* (*sniff) (PhotoFileSniffer* self, gboolean* is_corrupted, GError** error);
+};
+
+struct _GdkSniffer {
+ PhotoFileSniffer parent_instance;
+ GdkSnifferPrivate * priv;
+};
+
+struct _GdkSnifferClass {
+ PhotoFileSnifferClass parent_class;
+};
+
+struct _GdkSnifferPrivate {
+ DetectedPhotoInformation* detected;
+ gboolean size_ready;
+ gboolean area_prepared;
+};
+
+struct _DetectedPhotoInformation {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ DetectedPhotoInformationPrivate * priv;
+ PhotoFileFormat file_format;
+ PhotoMetadata* metadata;
+ gchar* md5;
+ gchar* exif_md5;
+ gchar* thumbnail_md5;
+ gchar* format_name;
+ Dimensions image_dim;
+ GdkColorspace colorspace;
+ gint channels;
+ gint bits_per_channel;
+};
+
+struct _DetectedPhotoInformationClass {
+ GTypeClass parent_class;
+ void (*finalize) (DetectedPhotoInformation *self);
+};
+
+
+static gpointer gdk_reader_parent_class = NULL;
+static gpointer gdk_sniffer_parent_class = NULL;
+
+gpointer photo_file_adapter_ref (gpointer instance);
+void photo_file_adapter_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_adapter (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_adapter (GValue* value, gpointer v_object);
+void value_take_photo_file_adapter (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_adapter (const GValue* value);
+GType photo_file_adapter_get_type (void) G_GNUC_CONST;
+GType photo_file_reader_get_type (void) G_GNUC_CONST;
+gpointer media_metadata_ref (gpointer instance);
+void media_metadata_unref (gpointer instance);
+GParamSpec* param_spec_media_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_media_metadata (GValue* value, gpointer v_object);
+void value_take_media_metadata (GValue* value, gpointer v_object);
+gpointer value_get_media_metadata (const GValue* value);
+GType media_metadata_get_type (void) G_GNUC_CONST;
+GType photo_metadata_get_type (void) G_GNUC_CONST;
+GType dimensions_get_type (void) G_GNUC_CONST;
+Dimensions* dimensions_dup (const Dimensions* self);
+void dimensions_free (Dimensions* self);
+GType gdk_reader_get_type (void) G_GNUC_CONST;
+enum {
+ GDK_READER_DUMMY_PROPERTY
+};
+GType photo_file_format_get_type (void) G_GNUC_CONST;
+GdkReader* gdk_reader_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
+PhotoFileReader* photo_file_reader_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
+static PhotoMetadata* gdk_reader_real_read_metadata (PhotoFileReader* base, GError** error);
+PhotoMetadata* photo_metadata_new (void);
+PhotoMetadata* photo_metadata_construct (GType object_type);
+void media_metadata_read_from_file (MediaMetadata* self, GFile* file, GError** error);
+GFile* photo_file_adapter_get_file (PhotoFileAdapter* self);
+static GdkPixbuf* gdk_reader_real_unscaled_read (PhotoFileReader* base, GError** error);
+gchar* photo_file_adapter_get_filepath (PhotoFileAdapter* self);
+static GdkPixbuf* gdk_reader_real_scaled_read (PhotoFileReader* base, Dimensions* full, Dimensions* scaled, GError** error);
+gpointer photo_file_sniffer_ref (gpointer instance);
+void photo_file_sniffer_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_sniffer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_sniffer (GValue* value, gpointer v_object);
+void value_take_photo_file_sniffer (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_sniffer (const GValue* value);
+GType photo_file_sniffer_get_type (void) G_GNUC_CONST;
+gpointer detected_photo_information_ref (gpointer instance);
+void detected_photo_information_unref (gpointer instance);
+GParamSpec* param_spec_detected_photo_information (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_detected_photo_information (GValue* value, gpointer v_object);
+void value_take_detected_photo_information (GValue* value, gpointer v_object);
+gpointer value_get_detected_photo_information (const GValue* value);
+GType detected_photo_information_get_type (void) G_GNUC_CONST;
+GType photo_file_sniffer_options_get_type (void) G_GNUC_CONST;
+GType gdk_sniffer_get_type (void) G_GNUC_CONST;
+#define GDK_SNIFFER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_GDK_SNIFFER, GdkSnifferPrivate))
+enum {
+ GDK_SNIFFER_DUMMY_PROPERTY
+};
+GdkSniffer* gdk_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options);
+PhotoFileSniffer* photo_file_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options);
+static DetectedPhotoInformation* gdk_sniffer_real_sniff (PhotoFileSniffer* base, gboolean* is_corrupted, GError** error);
+DetectedPhotoInformation* detected_photo_information_new (void);
+DetectedPhotoInformation* detected_photo_information_construct (GType object_type);
+static void gdk_sniffer_on_size_prepared (GdkSniffer* self, GdkPixbufLoader* loader, gint width, gint height);
+static void _gdk_sniffer_on_size_prepared_gdk_pixbuf_loader_size_prepared (GdkPixbufLoader* _sender, gint width, gint height, gpointer self);
+static void gdk_sniffer_on_area_prepared (GdkSniffer* self, GdkPixbufLoader* pixbuf_loader);
+static void _gdk_sniffer_on_area_prepared_gdk_pixbuf_loader_area_prepared (GdkPixbufLoader* _sender, gpointer self);
+guint8* photo_metadata_flatten_exif (PhotoMetadata* self, gboolean include_preview, int* result_length1);
+gchar* md5_binary (guint8* buffer, gsize length);
+guint8* photo_metadata_flatten_exif_preview (PhotoMetadata* self, int* result_length1);
+static guint8* _vala_array_dup7 (guint8* self, int length);
+void dimensions_init (Dimensions *self, gint width, gint height);
+PhotoFileFormat photo_file_format_from_pixbuf_name (const gchar* name);
+static void gdk_sniffer_finalize (PhotoFileSniffer* obj);
+
+
+GdkReader* gdk_reader_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format) {
+ GdkReader* self = NULL;
+ const gchar* _tmp0_ = NULL;
+ PhotoFileFormat _tmp1_ = 0;
+#line 8 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 9 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp0_ = filepath;
+#line 9 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp1_ = file_format;
+#line 9 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ self = (GdkReader*) photo_file_reader_construct (object_type, _tmp0_, _tmp1_);
+#line 8 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ return self;
+#line 310 "GdkSupport.c"
+}
+
+
+static PhotoMetadata* gdk_reader_real_read_metadata (PhotoFileReader* base, GError** error) {
+ GdkReader * self;
+ PhotoMetadata* result = NULL;
+ PhotoMetadata* metadata = NULL;
+ PhotoMetadata* _tmp0_ = NULL;
+ GFile* _tmp1_ = NULL;
+ GFile* _tmp2_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 12 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_GDK_READER, GdkReader);
+#line 13 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp0_ = photo_metadata_new ();
+#line 13 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ metadata = _tmp0_;
+#line 14 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp1_ = photo_file_adapter_get_file (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 14 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 14 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ media_metadata_read_from_file (G_TYPE_CHECK_INSTANCE_CAST (metadata, TYPE_MEDIA_METADATA, MediaMetadata), _tmp2_, &_inner_error_);
+#line 14 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_object_unref0 (_tmp2_);
+#line 14 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 14 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 14 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _media_metadata_unref0 (metadata);
+#line 14 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ return NULL;
+#line 344 "GdkSupport.c"
+ }
+#line 16 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ result = metadata;
+#line 16 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ return result;
+#line 350 "GdkSupport.c"
+}
+
+
+static GdkPixbuf* gdk_reader_real_unscaled_read (PhotoFileReader* base, GError** error) {
+ GdkReader * self;
+ GdkPixbuf* result = NULL;
+ GdkPixbuf* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ GdkPixbuf* _tmp3_ = NULL;
+ GdkPixbuf* _tmp4_ = NULL;
+ GdkPixbuf* _tmp5_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 19 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_GDK_READER, GdkReader);
+#line 20 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp1_ = photo_file_adapter_get_filepath (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 20 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 20 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp3_ = gdk_pixbuf_new_from_file (_tmp2_, &_inner_error_);
+#line 20 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp4_ = _tmp3_;
+#line 20 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_free0 (_tmp2_);
+#line 20 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp0_ = _tmp4_;
+#line 20 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 20 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 20 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ return NULL;
+#line 384 "GdkSupport.c"
+ }
+#line 20 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp5_ = _tmp0_;
+#line 20 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp0_ = NULL;
+#line 20 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ result = _tmp5_;
+#line 20 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_object_unref0 (_tmp0_);
+#line 20 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ return result;
+#line 396 "GdkSupport.c"
+}
+
+
+static GdkPixbuf* gdk_reader_real_scaled_read (PhotoFileReader* base, Dimensions* full, Dimensions* scaled, GError** error) {
+ GdkReader * self;
+ GdkPixbuf* result = NULL;
+ GdkPixbuf* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ Dimensions _tmp3_ = {0};
+ gint _tmp4_ = 0;
+ Dimensions _tmp5_ = {0};
+ gint _tmp6_ = 0;
+ GdkPixbuf* _tmp7_ = NULL;
+ GdkPixbuf* _tmp8_ = NULL;
+ GdkPixbuf* _tmp9_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 23 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_GDK_READER, GdkReader);
+#line 23 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_return_val_if_fail (full != NULL, NULL);
+#line 23 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_return_val_if_fail (scaled != NULL, NULL);
+#line 24 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp1_ = photo_file_adapter_get_filepath (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 24 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 24 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp3_ = *scaled;
+#line 24 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp4_ = _tmp3_.width;
+#line 24 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp5_ = *scaled;
+#line 24 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp6_ = _tmp5_.height;
+#line 24 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp7_ = gdk_pixbuf_new_from_file_at_scale (_tmp2_, _tmp4_, _tmp6_, FALSE, &_inner_error_);
+#line 24 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp8_ = _tmp7_;
+#line 24 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_free0 (_tmp2_);
+#line 24 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp0_ = _tmp8_;
+#line 24 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 24 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 24 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ return NULL;
+#line 446 "GdkSupport.c"
+ }
+#line 24 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp9_ = _tmp0_;
+#line 24 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp0_ = NULL;
+#line 24 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ result = _tmp9_;
+#line 24 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_object_unref0 (_tmp0_);
+#line 24 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ return result;
+#line 458 "GdkSupport.c"
+}
+
+
+static void gdk_reader_class_init (GdkReaderClass * klass) {
+#line 7 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ gdk_reader_parent_class = g_type_class_peek_parent (klass);
+#line 7 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ ((PhotoFileReaderClass *) klass)->read_metadata = gdk_reader_real_read_metadata;
+#line 7 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ ((PhotoFileReaderClass *) klass)->unscaled_read = gdk_reader_real_unscaled_read;
+#line 7 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ ((PhotoFileReaderClass *) klass)->scaled_read = gdk_reader_real_scaled_read;
+#line 471 "GdkSupport.c"
+}
+
+
+static void gdk_reader_instance_init (GdkReader * self) {
+}
+
+
+GType gdk_reader_get_type (void) {
+ static volatile gsize gdk_reader_type_id__volatile = 0;
+ if (g_once_init_enter (&gdk_reader_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (GdkReaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gdk_reader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GdkReader), 0, (GInstanceInitFunc) gdk_reader_instance_init, NULL };
+ GType gdk_reader_type_id;
+ gdk_reader_type_id = g_type_register_static (TYPE_PHOTO_FILE_READER, "GdkReader", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
+ g_once_init_leave (&gdk_reader_type_id__volatile, gdk_reader_type_id);
+ }
+ return gdk_reader_type_id__volatile;
+}
+
+
+GdkSniffer* gdk_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options) {
+ GdkSniffer* self = NULL;
+ GFile* _tmp0_ = NULL;
+ PhotoFileSnifferOptions _tmp1_ = 0;
+#line 33 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_return_val_if_fail (G_IS_FILE (file), NULL);
+#line 34 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp0_ = file;
+#line 34 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp1_ = options;
+#line 34 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ self = (GdkSniffer*) photo_file_sniffer_construct (object_type, _tmp0_, _tmp1_);
+#line 33 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ return self;
+#line 505 "GdkSupport.c"
+}
+
+
+static void _gdk_sniffer_on_size_prepared_gdk_pixbuf_loader_size_prepared (GdkPixbufLoader* _sender, gint width, gint height, gpointer self) {
+#line 41 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ gdk_sniffer_on_size_prepared ((GdkSniffer*) self, _sender, width, height);
+#line 512 "GdkSupport.c"
+}
+
+
+static void _gdk_sniffer_on_area_prepared_gdk_pixbuf_loader_area_prepared (GdkPixbufLoader* _sender, gpointer self) {
+#line 42 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ gdk_sniffer_on_area_prepared ((GdkSniffer*) self, _sender);
+#line 519 "GdkSupport.c"
+}
+
+
+static guint8* _vala_array_dup7 (guint8* self, int length) {
+#line 69 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ return g_memdup (self, length * sizeof (guint8));
+#line 526 "GdkSupport.c"
+}
+
+
+static gpointer _detected_photo_information_ref0 (gpointer self) {
+#line 108 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ return self ? detected_photo_information_ref (self) : NULL;
+#line 533 "GdkSupport.c"
+}
+
+
+static DetectedPhotoInformation* gdk_sniffer_real_sniff (PhotoFileSniffer* base, gboolean* is_corrupted, GError** error) {
+ GdkSniffer * self;
+ gboolean _vala_is_corrupted = FALSE;
+ DetectedPhotoInformation* result = NULL;
+ DetectedPhotoInformation* _tmp0_ = NULL;
+ GdkPixbufLoader* pixbuf_loader = NULL;
+ GdkPixbufLoader* _tmp1_ = NULL;
+ GdkPixbufLoader* _tmp2_ = NULL;
+ GdkPixbufLoader* _tmp3_ = NULL;
+ GChecksum* md5_checksum = NULL;
+ gboolean _tmp4_ = FALSE;
+ DetectedPhotoInformation* _tmp6_ = NULL;
+ PhotoMetadata* _tmp7_ = NULL;
+ gboolean _tmp12_ = FALSE;
+ gboolean _tmp13_ = FALSE;
+ guint8* _tmp38_ = NULL;
+ gint _tmp38__length1 = 0;
+ gint __tmp38__size_ = 0;
+ gboolean _tmp39_ = FALSE;
+ guint8* buffer = NULL;
+ guint8* _tmp42_ = NULL;
+ gint _tmp42__length1 = 0;
+ gint buffer_length1 = 0;
+ gint _buffer_size_ = 0;
+ gsize count = 0UL;
+ GFileInputStream* fins = NULL;
+ GFile* _tmp43_ = NULL;
+ GFileInputStream* _tmp44_ = NULL;
+ GFileInputStream* _tmp68_ = NULL;
+ gboolean _tmp70_ = FALSE;
+ gboolean _tmp75_ = FALSE;
+ gboolean _tmp76_ = FALSE;
+ DetectedPhotoInformation* _tmp78_ = NULL;
+ DetectedPhotoInformation* _tmp79_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 37 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_GDK_SNIFFER, GdkSniffer);
+#line 38 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp0_ = detected_photo_information_new ();
+#line 38 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _detected_photo_information_unref0 (self->priv->detected);
+#line 38 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ self->priv->detected = _tmp0_;
+#line 40 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp1_ = gdk_pixbuf_loader_new ();
+#line 40 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ pixbuf_loader = _tmp1_;
+#line 41 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp2_ = pixbuf_loader;
+#line 41 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_signal_connect (_tmp2_, "size-prepared", (GCallback) _gdk_sniffer_on_size_prepared_gdk_pixbuf_loader_size_prepared, self);
+#line 42 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp3_ = pixbuf_loader;
+#line 42 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_signal_connect (_tmp3_, "area-prepared", (GCallback) _gdk_sniffer_on_area_prepared_gdk_pixbuf_loader_area_prepared, self);
+#line 45 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ md5_checksum = NULL;
+#line 46 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer)->calc_md5;
+#line 46 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (_tmp4_) {
+#line 598 "GdkSupport.c"
+ GChecksum* _tmp5_ = NULL;
+#line 47 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp5_ = g_checksum_new (G_CHECKSUM_MD5);
+#line 47 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_checksum_free0 (md5_checksum);
+#line 47 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ md5_checksum = _tmp5_;
+#line 606 "GdkSupport.c"
+ }
+#line 49 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp6_ = self->priv->detected;
+#line 49 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp7_ = photo_metadata_new ();
+#line 49 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _media_metadata_unref0 (_tmp6_->metadata);
+#line 49 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp6_->metadata = _tmp7_;
+#line 616 "GdkSupport.c"
+ {
+ DetectedPhotoInformation* _tmp8_ = NULL;
+ PhotoMetadata* _tmp9_ = NULL;
+ GFile* _tmp10_ = NULL;
+#line 51 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp8_ = self->priv->detected;
+#line 51 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp9_ = _tmp8_->metadata;
+#line 51 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp10_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer)->file;
+#line 51 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ media_metadata_read_from_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_MEDIA_METADATA, MediaMetadata), _tmp10_, &_inner_error_);
+#line 51 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 631 "GdkSupport.c"
+ goto __catch27_g_error;
+ }
+ }
+ goto __finally27;
+ __catch27_g_error:
+ {
+ GError* err = NULL;
+ DetectedPhotoInformation* _tmp11_ = NULL;
+#line 50 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ err = _inner_error_;
+#line 50 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _inner_error_ = NULL;
+#line 54 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp11_ = self->priv->detected;
+#line 54 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _media_metadata_unref0 (_tmp11_->metadata);
+#line 54 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp11_->metadata = NULL;
+#line 50 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_error_free0 (err);
+#line 652 "GdkSupport.c"
+ }
+ __finally27:
+#line 50 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 50 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 50 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_checksum_free0 (md5_checksum);
+#line 50 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_object_unref0 (pixbuf_loader);
+#line 50 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ return NULL;
+#line 665 "GdkSupport.c"
+ }
+#line 57 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp13_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer)->calc_md5;
+#line 57 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (_tmp13_) {
+#line 671 "GdkSupport.c"
+ DetectedPhotoInformation* _tmp14_ = NULL;
+ PhotoMetadata* _tmp15_ = NULL;
+#line 57 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp14_ = self->priv->detected;
+#line 57 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp15_ = _tmp14_->metadata;
+#line 57 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp12_ = _tmp15_ != NULL;
+#line 680 "GdkSupport.c"
+ } else {
+#line 57 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp12_ = FALSE;
+#line 684 "GdkSupport.c"
+ }
+#line 57 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (_tmp12_) {
+#line 688 "GdkSupport.c"
+ guint8* flattened_sans_thumbnail = NULL;
+ DetectedPhotoInformation* _tmp16_ = NULL;
+ PhotoMetadata* _tmp17_ = NULL;
+ gint _tmp18_ = 0;
+ guint8* _tmp19_ = NULL;
+ gint flattened_sans_thumbnail_length1 = 0;
+ gint _flattened_sans_thumbnail_size_ = 0;
+ gboolean _tmp20_ = FALSE;
+ guint8* _tmp21_ = NULL;
+ gint _tmp21__length1 = 0;
+ guint8* flattened_thumbnail = NULL;
+ DetectedPhotoInformation* _tmp27_ = NULL;
+ PhotoMetadata* _tmp28_ = NULL;
+ gint _tmp29_ = 0;
+ guint8* _tmp30_ = NULL;
+ gint flattened_thumbnail_length1 = 0;
+ gint _flattened_thumbnail_size_ = 0;
+ gboolean _tmp31_ = FALSE;
+ guint8* _tmp32_ = NULL;
+ gint _tmp32__length1 = 0;
+#line 58 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp16_ = self->priv->detected;
+#line 58 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp17_ = _tmp16_->metadata;
+#line 58 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp19_ = photo_metadata_flatten_exif (_tmp17_, FALSE, &_tmp18_);
+#line 58 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ flattened_sans_thumbnail = _tmp19_;
+#line 58 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ flattened_sans_thumbnail_length1 = _tmp18_;
+#line 58 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _flattened_sans_thumbnail_size_ = flattened_sans_thumbnail_length1;
+#line 59 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp21_ = flattened_sans_thumbnail;
+#line 59 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp21__length1 = flattened_sans_thumbnail_length1;
+#line 59 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (_tmp21_ != NULL) {
+#line 727 "GdkSupport.c"
+ guint8* _tmp22_ = NULL;
+ gint _tmp22__length1 = 0;
+#line 59 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp22_ = flattened_sans_thumbnail;
+#line 59 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp22__length1 = flattened_sans_thumbnail_length1;
+#line 59 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp20_ = _tmp22__length1 > 0;
+#line 736 "GdkSupport.c"
+ } else {
+#line 59 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp20_ = FALSE;
+#line 740 "GdkSupport.c"
+ }
+#line 59 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (_tmp20_) {
+#line 744 "GdkSupport.c"
+ DetectedPhotoInformation* _tmp23_ = NULL;
+ guint8* _tmp24_ = NULL;
+ gint _tmp24__length1 = 0;
+ guint8* _tmp25_ = NULL;
+ gint _tmp25__length1 = 0;
+ gchar* _tmp26_ = NULL;
+#line 60 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp23_ = self->priv->detected;
+#line 60 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp24_ = flattened_sans_thumbnail;
+#line 60 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp24__length1 = flattened_sans_thumbnail_length1;
+#line 60 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp25_ = flattened_sans_thumbnail;
+#line 60 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp25__length1 = flattened_sans_thumbnail_length1;
+#line 60 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp26_ = md5_binary (_tmp24_, (gsize) _tmp25__length1);
+#line 60 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_free0 (_tmp23_->exif_md5);
+#line 60 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp23_->exif_md5 = _tmp26_;
+#line 767 "GdkSupport.c"
+ }
+#line 62 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp27_ = self->priv->detected;
+#line 62 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp28_ = _tmp27_->metadata;
+#line 62 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp30_ = photo_metadata_flatten_exif_preview (_tmp28_, &_tmp29_);
+#line 62 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ flattened_thumbnail = _tmp30_;
+#line 62 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ flattened_thumbnail_length1 = _tmp29_;
+#line 62 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _flattened_thumbnail_size_ = flattened_thumbnail_length1;
+#line 63 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp32_ = flattened_thumbnail;
+#line 63 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp32__length1 = flattened_thumbnail_length1;
+#line 63 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (_tmp32_ != NULL) {
+#line 787 "GdkSupport.c"
+ guint8* _tmp33_ = NULL;
+ gint _tmp33__length1 = 0;
+#line 63 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp33_ = flattened_thumbnail;
+#line 63 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp33__length1 = flattened_thumbnail_length1;
+#line 63 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp31_ = _tmp33__length1 > 0;
+#line 796 "GdkSupport.c"
+ } else {
+#line 63 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp31_ = FALSE;
+#line 800 "GdkSupport.c"
+ }
+#line 63 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (_tmp31_) {
+#line 804 "GdkSupport.c"
+ DetectedPhotoInformation* _tmp34_ = NULL;
+ guint8* _tmp35_ = NULL;
+ gint _tmp35__length1 = 0;
+ guint8* _tmp36_ = NULL;
+ gint _tmp36__length1 = 0;
+ gchar* _tmp37_ = NULL;
+#line 64 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp34_ = self->priv->detected;
+#line 64 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp35_ = flattened_thumbnail;
+#line 64 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp35__length1 = flattened_thumbnail_length1;
+#line 64 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp36_ = flattened_thumbnail;
+#line 64 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp36__length1 = flattened_thumbnail_length1;
+#line 64 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp37_ = md5_binary (_tmp35_, (gsize) _tmp36__length1);
+#line 64 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_free0 (_tmp34_->thumbnail_md5);
+#line 64 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp34_->thumbnail_md5 = _tmp37_;
+#line 827 "GdkSupport.c"
+ }
+#line 57 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ flattened_thumbnail = (g_free (flattened_thumbnail), NULL);
+#line 57 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ flattened_sans_thumbnail = (g_free (flattened_sans_thumbnail), NULL);
+#line 833 "GdkSupport.c"
+ }
+#line 69 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp39_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer)->calc_md5;
+#line 69 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (_tmp39_) {
+#line 839 "GdkSupport.c"
+ guint8* _tmp40_ = NULL;
+#line 69 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp40_ = g_new0 (guint8, 64 * 1024);
+#line 69 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp38_ = (g_free (_tmp38_), NULL);
+#line 69 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp38_ = _tmp40_;
+#line 69 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp38__length1 = 64 * 1024;
+#line 69 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ __tmp38__size_ = _tmp38__length1;
+#line 851 "GdkSupport.c"
+ } else {
+ guint8* _tmp41_ = NULL;
+#line 69 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp41_ = g_new0 (guint8, 8 * 1024);
+#line 69 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp38_ = (g_free (_tmp38_), NULL);
+#line 69 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp38_ = _tmp41_;
+#line 69 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp38__length1 = 8 * 1024;
+#line 69 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ __tmp38__size_ = _tmp38__length1;
+#line 864 "GdkSupport.c"
+ }
+#line 69 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp42_ = (_tmp38_ != NULL) ? _vala_array_dup7 (_tmp38_, _tmp38__length1) : ((gpointer) _tmp38_);
+#line 69 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp42__length1 = _tmp38__length1;
+#line 69 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ buffer = _tmp42_;
+#line 69 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ buffer_length1 = _tmp42__length1;
+#line 69 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _buffer_size_ = buffer_length1;
+#line 70 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ count = (gsize) 0;
+#line 73 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp43_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer)->file;
+#line 73 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp44_ = g_file_read (_tmp43_, NULL, &_inner_error_);
+#line 73 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ fins = _tmp44_;
+#line 73 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 73 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 73 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ buffer = (g_free (buffer), NULL);
+#line 73 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp38_ = (g_free (_tmp38_), NULL);
+#line 73 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_checksum_free0 (md5_checksum);
+#line 73 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_object_unref0 (pixbuf_loader);
+#line 73 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ return NULL;
+#line 898 "GdkSupport.c"
+ }
+ {
+ gboolean _tmp45_ = FALSE;
+#line 74 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp45_ = TRUE;
+#line 74 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ while (TRUE) {
+#line 906 "GdkSupport.c"
+ gsize bytes_read = 0UL;
+ GFileInputStream* _tmp46_ = NULL;
+ guint8* _tmp47_ = NULL;
+ gint _tmp47__length1 = 0;
+ gssize _tmp48_ = 0L;
+ gsize _tmp49_ = 0UL;
+ gsize _tmp50_ = 0UL;
+ gsize _tmp51_ = 0UL;
+ gboolean _tmp52_ = FALSE;
+ gboolean _tmp56_ = FALSE;
+ gboolean _tmp57_ = FALSE;
+ gboolean _tmp62_ = FALSE;
+ gboolean _tmp63_ = FALSE;
+ gboolean _tmp64_ = FALSE;
+#line 74 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (!_tmp45_) {
+#line 923 "GdkSupport.c"
+ }
+#line 74 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp45_ = FALSE;
+#line 75 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp46_ = fins;
+#line 75 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp47_ = buffer;
+#line 75 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp47__length1 = buffer_length1;
+#line 75 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp48_ = g_input_stream_read (G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, G_TYPE_INPUT_STREAM, GInputStream), _tmp47_, (gsize) _tmp47__length1, NULL, &_inner_error_);
+#line 75 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ bytes_read = (gsize) _tmp48_;
+#line 75 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 75 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 75 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_object_unref0 (fins);
+#line 75 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ buffer = (g_free (buffer), NULL);
+#line 75 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp38_ = (g_free (_tmp38_), NULL);
+#line 75 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_checksum_free0 (md5_checksum);
+#line 75 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_object_unref0 (pixbuf_loader);
+#line 75 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ return NULL;
+#line 953 "GdkSupport.c"
+ }
+#line 76 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp49_ = bytes_read;
+#line 76 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (_tmp49_ <= ((gsize) 0)) {
+#line 77 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ break;
+#line 961 "GdkSupport.c"
+ }
+#line 79 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp50_ = count;
+#line 79 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp51_ = bytes_read;
+#line 79 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ count = _tmp50_ + _tmp51_;
+#line 81 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp52_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer)->calc_md5;
+#line 81 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (_tmp52_) {
+#line 973 "GdkSupport.c"
+ GChecksum* _tmp53_ = NULL;
+ guint8* _tmp54_ = NULL;
+ gint _tmp54__length1 = 0;
+ gsize _tmp55_ = 0UL;
+#line 82 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp53_ = md5_checksum;
+#line 82 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp54_ = buffer;
+#line 82 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp54__length1 = buffer_length1;
+#line 82 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp55_ = bytes_read;
+#line 82 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_checksum_update (_tmp53_, _tmp54_, _tmp55_);
+#line 988 "GdkSupport.c"
+ }
+#line 85 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp57_ = self->priv->size_ready;
+#line 85 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (!_tmp57_) {
+#line 85 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp56_ = TRUE;
+#line 996 "GdkSupport.c"
+ } else {
+ gboolean _tmp58_ = FALSE;
+#line 85 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp58_ = self->priv->area_prepared;
+#line 85 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp56_ = !_tmp58_;
+#line 1003 "GdkSupport.c"
+ }
+#line 85 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (_tmp56_) {
+#line 1007 "GdkSupport.c"
+ GdkPixbufLoader* _tmp59_ = NULL;
+ guint8* _tmp60_ = NULL;
+ gint _tmp60__length1 = 0;
+ gsize _tmp61_ = 0UL;
+#line 86 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp59_ = pixbuf_loader;
+#line 86 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp60_ = buffer;
+#line 86 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp60__length1 = buffer_length1;
+#line 86 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp61_ = bytes_read;
+#line 86 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ gdk_pixbuf_loader_write (_tmp59_, _tmp60_ + 0, (gsize) (((gint) _tmp61_) - 0), &_inner_error_);
+#line 86 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 86 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 86 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_object_unref0 (fins);
+#line 86 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ buffer = (g_free (buffer), NULL);
+#line 86 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp38_ = (g_free (_tmp38_), NULL);
+#line 86 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_checksum_free0 (md5_checksum);
+#line 86 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_object_unref0 (pixbuf_loader);
+#line 86 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ return NULL;
+#line 1038 "GdkSupport.c"
+ }
+ }
+#line 89 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp64_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer)->calc_md5;
+#line 89 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (!_tmp64_) {
+#line 1045 "GdkSupport.c"
+ gboolean _tmp65_ = FALSE;
+#line 89 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp65_ = self->priv->size_ready;
+#line 89 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp63_ = _tmp65_;
+#line 1051 "GdkSupport.c"
+ } else {
+#line 89 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp63_ = FALSE;
+#line 1055 "GdkSupport.c"
+ }
+#line 89 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (_tmp63_) {
+#line 1059 "GdkSupport.c"
+ gboolean _tmp66_ = FALSE;
+#line 89 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp66_ = self->priv->area_prepared;
+#line 89 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp62_ = _tmp66_;
+#line 1065 "GdkSupport.c"
+ } else {
+#line 89 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp62_ = FALSE;
+#line 1069 "GdkSupport.c"
+ }
+#line 89 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (_tmp62_) {
+#line 90 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ break;
+#line 1075 "GdkSupport.c"
+ }
+ }
+ }
+ {
+ GdkPixbufLoader* _tmp67_ = NULL;
+#line 95 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp67_ = pixbuf_loader;
+#line 95 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ gdk_pixbuf_loader_close (_tmp67_, &_inner_error_);
+#line 95 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 1087 "GdkSupport.c"
+ goto __catch28_g_error;
+ }
+ }
+ goto __finally28;
+ __catch28_g_error:
+ {
+ GError* err = NULL;
+#line 94 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ err = _inner_error_;
+#line 94 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _inner_error_ = NULL;
+#line 94 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_error_free0 (err);
+#line 1101 "GdkSupport.c"
+ }
+ __finally28:
+#line 94 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 94 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 94 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_object_unref0 (fins);
+#line 94 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ buffer = (g_free (buffer), NULL);
+#line 94 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp38_ = (g_free (_tmp38_), NULL);
+#line 94 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_checksum_free0 (md5_checksum);
+#line 94 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_object_unref0 (pixbuf_loader);
+#line 94 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ return NULL;
+#line 1120 "GdkSupport.c"
+ }
+#line 99 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp68_ = fins;
+#line 99 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (_tmp68_ != NULL) {
+#line 1126 "GdkSupport.c"
+ GFileInputStream* _tmp69_ = NULL;
+#line 100 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp69_ = fins;
+#line 100 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_input_stream_close (G_TYPE_CHECK_INSTANCE_CAST (_tmp69_, G_TYPE_INPUT_STREAM, GInputStream), NULL, &_inner_error_);
+#line 100 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 100 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 100 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_object_unref0 (fins);
+#line 100 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ buffer = (g_free (buffer), NULL);
+#line 100 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp38_ = (g_free (_tmp38_), NULL);
+#line 100 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_checksum_free0 (md5_checksum);
+#line 100 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_object_unref0 (pixbuf_loader);
+#line 100 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ return NULL;
+#line 1148 "GdkSupport.c"
+ }
+ }
+#line 102 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp70_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer)->calc_md5;
+#line 102 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (_tmp70_) {
+#line 1155 "GdkSupport.c"
+ DetectedPhotoInformation* _tmp71_ = NULL;
+ GChecksum* _tmp72_ = NULL;
+ const gchar* _tmp73_ = NULL;
+ gchar* _tmp74_ = NULL;
+#line 103 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp71_ = self->priv->detected;
+#line 103 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp72_ = md5_checksum;
+#line 103 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp73_ = g_checksum_get_string (_tmp72_);
+#line 103 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp74_ = g_strdup (_tmp73_);
+#line 103 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_free0 (_tmp71_->md5);
+#line 103 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp71_->md5 = _tmp74_;
+#line 1172 "GdkSupport.c"
+ }
+#line 106 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp76_ = self->priv->size_ready;
+#line 106 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (!_tmp76_) {
+#line 106 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp75_ = TRUE;
+#line 1180 "GdkSupport.c"
+ } else {
+ gboolean _tmp77_ = FALSE;
+#line 106 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp77_ = self->priv->area_prepared;
+#line 106 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp75_ = !_tmp77_;
+#line 1187 "GdkSupport.c"
+ }
+#line 106 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _vala_is_corrupted = _tmp75_;
+#line 108 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp78_ = self->priv->detected;
+#line 108 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp79_ = _detected_photo_information_ref0 (_tmp78_);
+#line 108 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ result = _tmp79_;
+#line 108 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_object_unref0 (fins);
+#line 108 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ buffer = (g_free (buffer), NULL);
+#line 108 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp38_ = (g_free (_tmp38_), NULL);
+#line 108 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_checksum_free0 (md5_checksum);
+#line 108 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_object_unref0 (pixbuf_loader);
+#line 108 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (is_corrupted) {
+#line 108 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ *is_corrupted = _vala_is_corrupted;
+#line 1211 "GdkSupport.c"
+ }
+#line 108 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ return result;
+#line 1215 "GdkSupport.c"
+}
+
+
+static void gdk_sniffer_on_size_prepared (GdkSniffer* self, GdkPixbufLoader* loader, gint width, gint height) {
+ DetectedPhotoInformation* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ gint _tmp2_ = 0;
+#line 111 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_return_if_fail (IS_GDK_SNIFFER (self));
+#line 111 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_return_if_fail (GDK_IS_PIXBUF_LOADER (loader));
+#line 112 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp0_ = self->priv->detected;
+#line 112 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp1_ = width;
+#line 112 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp2_ = height;
+#line 112 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ dimensions_init (&_tmp0_->image_dim, _tmp1_, _tmp2_);
+#line 113 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ self->priv->size_ready = TRUE;
+#line 1237 "GdkSupport.c"
+}
+
+
+static gpointer _g_object_ref0 (gpointer self) {
+#line 117 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ return self ? g_object_ref (self) : NULL;
+#line 1244 "GdkSupport.c"
+}
+
+
+static void gdk_sniffer_on_area_prepared (GdkSniffer* self, GdkPixbufLoader* pixbuf_loader) {
+ GdkPixbuf* pixbuf = NULL;
+ GdkPixbufLoader* _tmp0_ = NULL;
+ GdkPixbuf* _tmp1_ = NULL;
+ GdkPixbuf* _tmp2_ = NULL;
+ GdkPixbuf* _tmp3_ = NULL;
+ DetectedPhotoInformation* _tmp4_ = NULL;
+ GdkPixbuf* _tmp5_ = NULL;
+ GdkColorspace _tmp6_ = 0;
+ DetectedPhotoInformation* _tmp7_ = NULL;
+ GdkPixbuf* _tmp8_ = NULL;
+ gint _tmp9_ = 0;
+ DetectedPhotoInformation* _tmp10_ = NULL;
+ GdkPixbuf* _tmp11_ = NULL;
+ gint _tmp12_ = 0;
+ GdkPixbufFormat* format = NULL;
+ GdkPixbufLoader* _tmp13_ = NULL;
+ GdkPixbufFormat* _tmp14_ = NULL;
+ DetectedPhotoInformation* _tmp15_ = NULL;
+ GdkPixbufFormat* _tmp16_ = NULL;
+ gchar* _tmp17_ = NULL;
+ DetectedPhotoInformation* _tmp18_ = NULL;
+ DetectedPhotoInformation* _tmp19_ = NULL;
+ const gchar* _tmp20_ = NULL;
+ PhotoFileFormat _tmp21_ = 0;
+#line 116 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_return_if_fail (IS_GDK_SNIFFER (self));
+#line 116 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_return_if_fail (GDK_IS_PIXBUF_LOADER (pixbuf_loader));
+#line 117 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp0_ = pixbuf_loader;
+#line 117 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp1_ = gdk_pixbuf_loader_get_pixbuf (_tmp0_);
+#line 117 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp2_ = _g_object_ref0 (_tmp1_);
+#line 117 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ pixbuf = _tmp2_;
+#line 118 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp3_ = pixbuf;
+#line 118 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ if (_tmp3_ == NULL) {
+#line 119 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_object_unref0 (pixbuf);
+#line 119 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ return;
+#line 1293 "GdkSupport.c"
+ }
+#line 121 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp4_ = self->priv->detected;
+#line 121 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp5_ = pixbuf;
+#line 121 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp6_ = gdk_pixbuf_get_colorspace (_tmp5_);
+#line 121 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp4_->colorspace = _tmp6_;
+#line 122 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp7_ = self->priv->detected;
+#line 122 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp8_ = pixbuf;
+#line 122 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp9_ = gdk_pixbuf_get_n_channels (_tmp8_);
+#line 122 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp7_->channels = _tmp9_;
+#line 123 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp10_ = self->priv->detected;
+#line 123 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp11_ = pixbuf;
+#line 123 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp12_ = gdk_pixbuf_get_bits_per_sample (_tmp11_);
+#line 123 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp10_->bits_per_channel = _tmp12_;
+#line 125 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp13_ = pixbuf_loader;
+#line 125 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp14_ = gdk_pixbuf_loader_get_format (_tmp13_);
+#line 125 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ format = _tmp14_;
+#line 126 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp15_ = self->priv->detected;
+#line 126 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp16_ = format;
+#line 126 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp17_ = gdk_pixbuf_format_get_name (_tmp16_);
+#line 126 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_free0 (_tmp15_->format_name);
+#line 126 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp15_->format_name = _tmp17_;
+#line 127 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp18_ = self->priv->detected;
+#line 127 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp19_ = self->priv->detected;
+#line 127 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp20_ = _tmp19_->format_name;
+#line 127 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp21_ = photo_file_format_from_pixbuf_name (_tmp20_);
+#line 127 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _tmp18_->file_format = _tmp21_;
+#line 129 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ self->priv->area_prepared = TRUE;
+#line 116 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _g_object_unref0 (pixbuf);
+#line 1349 "GdkSupport.c"
+}
+
+
+static void gdk_sniffer_class_init (GdkSnifferClass * klass) {
+#line 28 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ gdk_sniffer_parent_class = g_type_class_peek_parent (klass);
+#line 28 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ ((PhotoFileSnifferClass *) klass)->finalize = gdk_sniffer_finalize;
+#line 28 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ g_type_class_add_private (klass, sizeof (GdkSnifferPrivate));
+#line 28 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ ((PhotoFileSnifferClass *) klass)->sniff = gdk_sniffer_real_sniff;
+#line 1362 "GdkSupport.c"
+}
+
+
+static void gdk_sniffer_instance_init (GdkSniffer * self) {
+#line 28 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ self->priv = GDK_SNIFFER_GET_PRIVATE (self);
+#line 29 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ self->priv->detected = NULL;
+#line 30 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ self->priv->size_ready = FALSE;
+#line 31 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ self->priv->area_prepared = FALSE;
+#line 1375 "GdkSupport.c"
+}
+
+
+static void gdk_sniffer_finalize (PhotoFileSniffer* obj) {
+ GdkSniffer * self;
+#line 28 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_GDK_SNIFFER, GdkSniffer);
+#line 29 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ _detected_photo_information_unref0 (self->priv->detected);
+#line 28 "/home/jens/Source/shotwell/src/photos/GdkSupport.vala"
+ PHOTO_FILE_SNIFFER_CLASS (gdk_sniffer_parent_class)->finalize (obj);
+#line 1387 "GdkSupport.c"
+}
+
+
+GType gdk_sniffer_get_type (void) {
+ static volatile gsize gdk_sniffer_type_id__volatile = 0;
+ if (g_once_init_enter (&gdk_sniffer_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (GdkSnifferClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gdk_sniffer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GdkSniffer), 0, (GInstanceInitFunc) gdk_sniffer_instance_init, NULL };
+ GType gdk_sniffer_type_id;
+ gdk_sniffer_type_id = g_type_register_static (TYPE_PHOTO_FILE_SNIFFER, "GdkSniffer", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
+ g_once_init_leave (&gdk_sniffer_type_id__volatile, gdk_sniffer_type_id);
+ }
+ return gdk_sniffer_type_id__volatile;
+}
+
+
+
diff --git a/src/photos/JfifSupport.c b/src/photos/JfifSupport.c
new file mode 100644
index 0000000..5855bf1
--- /dev/null
+++ b/src/photos/JfifSupport.c
@@ -0,0 +1,2020 @@
+/* JfifSupport.c generated by valac 0.32.1, the Vala compiler
+ * generated from JfifSupport.vala, do not modify */
+
+/* Copyright 2016 Software Freedom Conservancy Inc.
+ *
+ * This software is licensed under the GNU LGPL (version 2.1 or later).
+ * See the COPYING file in this distribution.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gio/gio.h>
+#include <glib/gi18n-lib.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+
+#define TYPE_PHOTO_FILE_FORMAT_DRIVER (photo_file_format_driver_get_type ())
+#define PHOTO_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriver))
+#define PHOTO_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriverClass))
+#define IS_PHOTO_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_FORMAT_DRIVER))
+#define IS_PHOTO_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_FORMAT_DRIVER))
+#define PHOTO_FILE_FORMAT_DRIVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriverClass))
+
+typedef struct _PhotoFileFormatDriver PhotoFileFormatDriver;
+typedef struct _PhotoFileFormatDriverClass PhotoFileFormatDriverClass;
+typedef struct _PhotoFileFormatDriverPrivate PhotoFileFormatDriverPrivate;
+
+#define TYPE_PHOTO_FILE_FORMAT_PROPERTIES (photo_file_format_properties_get_type ())
+#define PHOTO_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatProperties))
+#define PHOTO_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatPropertiesClass))
+#define IS_PHOTO_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES))
+#define IS_PHOTO_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_FORMAT_PROPERTIES))
+#define PHOTO_FILE_FORMAT_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatPropertiesClass))
+
+typedef struct _PhotoFileFormatProperties PhotoFileFormatProperties;
+typedef struct _PhotoFileFormatPropertiesClass PhotoFileFormatPropertiesClass;
+
+#define TYPE_PHOTO_FILE_ADAPTER (photo_file_adapter_get_type ())
+#define PHOTO_FILE_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter))
+#define PHOTO_FILE_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapterClass))
+#define IS_PHOTO_FILE_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_ADAPTER))
+#define IS_PHOTO_FILE_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_ADAPTER))
+#define PHOTO_FILE_ADAPTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapterClass))
+
+typedef struct _PhotoFileAdapter PhotoFileAdapter;
+typedef struct _PhotoFileAdapterClass PhotoFileAdapterClass;
+
+#define TYPE_PHOTO_FILE_READER (photo_file_reader_get_type ())
+#define PHOTO_FILE_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_READER, PhotoFileReader))
+#define PHOTO_FILE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_READER, PhotoFileReaderClass))
+#define IS_PHOTO_FILE_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_READER))
+#define IS_PHOTO_FILE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_READER))
+#define PHOTO_FILE_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_READER, PhotoFileReaderClass))
+
+typedef struct _PhotoFileReader PhotoFileReader;
+typedef struct _PhotoFileReaderClass PhotoFileReaderClass;
+
+#define TYPE_MEDIA_METADATA (media_metadata_get_type ())
+#define MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_METADATA, MediaMetadata))
+#define MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_METADATA, MediaMetadataClass))
+#define IS_MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_METADATA))
+#define IS_MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_METADATA))
+#define MEDIA_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_METADATA, MediaMetadataClass))
+
+typedef struct _MediaMetadata MediaMetadata;
+typedef struct _MediaMetadataClass MediaMetadataClass;
+
+#define TYPE_PHOTO_METADATA (photo_metadata_get_type ())
+#define PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_METADATA, PhotoMetadata))
+#define PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_METADATA, PhotoMetadataClass))
+#define IS_PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_METADATA))
+#define IS_PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_METADATA))
+#define PHOTO_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_METADATA, PhotoMetadataClass))
+
+typedef struct _PhotoMetadata PhotoMetadata;
+typedef struct _PhotoMetadataClass PhotoMetadataClass;
+
+#define TYPE_PHOTO_FILE_WRITER (photo_file_writer_get_type ())
+#define PHOTO_FILE_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_WRITER, PhotoFileWriter))
+#define PHOTO_FILE_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_WRITER, PhotoFileWriterClass))
+#define IS_PHOTO_FILE_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_WRITER))
+#define IS_PHOTO_FILE_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_WRITER))
+#define PHOTO_FILE_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_WRITER, PhotoFileWriterClass))
+
+typedef struct _PhotoFileWriter PhotoFileWriter;
+typedef struct _PhotoFileWriterClass PhotoFileWriterClass;
+
+#define TYPE_PHOTO_FILE_METADATA_WRITER (photo_file_metadata_writer_get_type ())
+#define PHOTO_FILE_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriter))
+#define PHOTO_FILE_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriterClass))
+#define IS_PHOTO_FILE_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_METADATA_WRITER))
+#define IS_PHOTO_FILE_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_METADATA_WRITER))
+#define PHOTO_FILE_METADATA_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriterClass))
+
+typedef struct _PhotoFileMetadataWriter PhotoFileMetadataWriter;
+typedef struct _PhotoFileMetadataWriterClass PhotoFileMetadataWriterClass;
+
+#define PHOTO_FILE_SNIFFER_TYPE_OPTIONS (photo_file_sniffer_options_get_type ())
+
+#define TYPE_PHOTO_FILE_SNIFFER (photo_file_sniffer_get_type ())
+#define PHOTO_FILE_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer))
+#define PHOTO_FILE_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSnifferClass))
+#define IS_PHOTO_FILE_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_SNIFFER))
+#define IS_PHOTO_FILE_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_SNIFFER))
+#define PHOTO_FILE_SNIFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSnifferClass))
+
+typedef struct _PhotoFileSniffer PhotoFileSniffer;
+typedef struct _PhotoFileSnifferClass PhotoFileSnifferClass;
+
+#define TYPE_JFIF_FILE_FORMAT_DRIVER (jfif_file_format_driver_get_type ())
+#define JFIF_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_JFIF_FILE_FORMAT_DRIVER, JfifFileFormatDriver))
+#define JFIF_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_JFIF_FILE_FORMAT_DRIVER, JfifFileFormatDriverClass))
+#define IS_JFIF_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_JFIF_FILE_FORMAT_DRIVER))
+#define IS_JFIF_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_JFIF_FILE_FORMAT_DRIVER))
+#define JFIF_FILE_FORMAT_DRIVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_JFIF_FILE_FORMAT_DRIVER, JfifFileFormatDriverClass))
+
+typedef struct _JfifFileFormatDriver JfifFileFormatDriver;
+typedef struct _JfifFileFormatDriverClass JfifFileFormatDriverClass;
+typedef struct _JfifFileFormatDriverPrivate JfifFileFormatDriverPrivate;
+#define _photo_file_format_driver_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_format_driver_unref (var), NULL)))
+
+#define TYPE_JFIF_FILE_FORMAT_PROPERTIES (jfif_file_format_properties_get_type ())
+#define JFIF_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_JFIF_FILE_FORMAT_PROPERTIES, JfifFileFormatProperties))
+#define JFIF_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_JFIF_FILE_FORMAT_PROPERTIES, JfifFileFormatPropertiesClass))
+#define IS_JFIF_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_JFIF_FILE_FORMAT_PROPERTIES))
+#define IS_JFIF_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_JFIF_FILE_FORMAT_PROPERTIES))
+#define JFIF_FILE_FORMAT_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_JFIF_FILE_FORMAT_PROPERTIES, JfifFileFormatPropertiesClass))
+
+typedef struct _JfifFileFormatProperties JfifFileFormatProperties;
+typedef struct _JfifFileFormatPropertiesClass JfifFileFormatPropertiesClass;
+
+#define TYPE_GDK_READER (gdk_reader_get_type ())
+#define GDK_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GDK_READER, GdkReader))
+#define GDK_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GDK_READER, GdkReaderClass))
+#define IS_GDK_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GDK_READER))
+#define IS_GDK_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GDK_READER))
+#define GDK_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GDK_READER, GdkReaderClass))
+
+typedef struct _GdkReader GdkReader;
+typedef struct _GdkReaderClass GdkReaderClass;
+
+#define TYPE_JFIF_READER (jfif_reader_get_type ())
+#define JFIF_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_JFIF_READER, JfifReader))
+#define JFIF_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_JFIF_READER, JfifReaderClass))
+#define IS_JFIF_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_JFIF_READER))
+#define IS_JFIF_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_JFIF_READER))
+#define JFIF_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_JFIF_READER, JfifReaderClass))
+
+typedef struct _JfifReader JfifReader;
+typedef struct _JfifReaderClass JfifReaderClass;
+
+#define TYPE_JFIF_WRITER (jfif_writer_get_type ())
+#define JFIF_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_JFIF_WRITER, JfifWriter))
+#define JFIF_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_JFIF_WRITER, JfifWriterClass))
+#define IS_JFIF_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_JFIF_WRITER))
+#define IS_JFIF_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_JFIF_WRITER))
+#define JFIF_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_JFIF_WRITER, JfifWriterClass))
+
+typedef struct _JfifWriter JfifWriter;
+typedef struct _JfifWriterClass JfifWriterClass;
+
+#define TYPE_JFIF_METADATA_WRITER (jfif_metadata_writer_get_type ())
+#define JFIF_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_JFIF_METADATA_WRITER, JfifMetadataWriter))
+#define JFIF_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_JFIF_METADATA_WRITER, JfifMetadataWriterClass))
+#define IS_JFIF_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_JFIF_METADATA_WRITER))
+#define IS_JFIF_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_JFIF_METADATA_WRITER))
+#define JFIF_METADATA_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_JFIF_METADATA_WRITER, JfifMetadataWriterClass))
+
+typedef struct _JfifMetadataWriter JfifMetadataWriter;
+typedef struct _JfifMetadataWriterClass JfifMetadataWriterClass;
+
+#define TYPE_GDK_SNIFFER (gdk_sniffer_get_type ())
+#define GDK_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GDK_SNIFFER, GdkSniffer))
+#define GDK_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GDK_SNIFFER, GdkSnifferClass))
+#define IS_GDK_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GDK_SNIFFER))
+#define IS_GDK_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GDK_SNIFFER))
+#define GDK_SNIFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GDK_SNIFFER, GdkSnifferClass))
+
+typedef struct _GdkSniffer GdkSniffer;
+typedef struct _GdkSnifferClass GdkSnifferClass;
+
+#define TYPE_JFIF_SNIFFER (jfif_sniffer_get_type ())
+#define JFIF_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_JFIF_SNIFFER, JfifSniffer))
+#define JFIF_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_JFIF_SNIFFER, JfifSnifferClass))
+#define IS_JFIF_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_JFIF_SNIFFER))
+#define IS_JFIF_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_JFIF_SNIFFER))
+#define JFIF_SNIFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_JFIF_SNIFFER, JfifSnifferClass))
+
+typedef struct _JfifSniffer JfifSniffer;
+typedef struct _JfifSnifferClass JfifSnifferClass;
+typedef struct _PhotoFileFormatPropertiesPrivate PhotoFileFormatPropertiesPrivate;
+
+#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ())
+
+#define TYPE_PHOTO_FILE_FORMAT_FLAGS (photo_file_format_flags_get_type ())
+typedef struct _JfifFileFormatPropertiesPrivate JfifFileFormatPropertiesPrivate;
+#define _photo_file_format_properties_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_format_properties_unref (var), NULL)))
+typedef struct _PhotoFileSnifferPrivate PhotoFileSnifferPrivate;
+
+#define TYPE_DETECTED_PHOTO_INFORMATION (detected_photo_information_get_type ())
+#define DETECTED_PHOTO_INFORMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformation))
+#define DETECTED_PHOTO_INFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformationClass))
+#define IS_DETECTED_PHOTO_INFORMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DETECTED_PHOTO_INFORMATION))
+#define IS_DETECTED_PHOTO_INFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DETECTED_PHOTO_INFORMATION))
+#define DETECTED_PHOTO_INFORMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformationClass))
+
+typedef struct _DetectedPhotoInformation DetectedPhotoInformation;
+typedef struct _DetectedPhotoInformationClass DetectedPhotoInformationClass;
+typedef struct _GdkSnifferPrivate GdkSnifferPrivate;
+typedef struct _JfifSnifferPrivate JfifSnifferPrivate;
+#define _detected_photo_information_unref0(var) ((var == NULL) ? NULL : (var = (detected_photo_information_unref (var), NULL)))
+typedef struct _DetectedPhotoInformationPrivate DetectedPhotoInformationPrivate;
+
+#define TYPE_DIMENSIONS (dimensions_get_type ())
+typedef struct _Dimensions Dimensions;
+typedef struct _PhotoFileAdapterPrivate PhotoFileAdapterPrivate;
+typedef struct _PhotoFileReaderPrivate PhotoFileReaderPrivate;
+typedef struct _GdkReaderPrivate GdkReaderPrivate;
+typedef struct _JfifReaderPrivate JfifReaderPrivate;
+typedef struct _PhotoFileWriterPrivate PhotoFileWriterPrivate;
+
+#define JPEG_TYPE_QUALITY (jpeg_quality_get_type ())
+typedef struct _JfifWriterPrivate JfifWriterPrivate;
+#define _g_free0(var) (var = (g_free (var), NULL))
+typedef struct _PhotoFileMetadataWriterPrivate PhotoFileMetadataWriterPrivate;
+typedef struct _JfifMetadataWriterPrivate JfifMetadataWriterPrivate;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+
+#define JPEG_TYPE_MARKER (jpeg_marker_get_type ())
+
+typedef enum {
+ PHOTO_FILE_SNIFFER_OPTIONS_GET_ALL = 0x00000000,
+ PHOTO_FILE_SNIFFER_OPTIONS_NO_MD5 = 0x00000001
+} PhotoFileSnifferOptions;
+
+struct _PhotoFileFormatDriver {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileFormatDriverPrivate * priv;
+};
+
+struct _PhotoFileFormatDriverClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileFormatDriver *self);
+ PhotoFileFormatProperties* (*get_properties) (PhotoFileFormatDriver* self);
+ PhotoFileReader* (*create_reader) (PhotoFileFormatDriver* self, const gchar* filepath);
+ PhotoMetadata* (*create_metadata) (PhotoFileFormatDriver* self);
+ gboolean (*can_write_image) (PhotoFileFormatDriver* self);
+ gboolean (*can_write_metadata) (PhotoFileFormatDriver* self);
+ PhotoFileWriter* (*create_writer) (PhotoFileFormatDriver* self, const gchar* filepath);
+ PhotoFileMetadataWriter* (*create_metadata_writer) (PhotoFileFormatDriver* self, const gchar* filepath);
+ PhotoFileSniffer* (*create_sniffer) (PhotoFileFormatDriver* self, GFile* file, PhotoFileSnifferOptions options);
+};
+
+struct _JfifFileFormatDriver {
+ PhotoFileFormatDriver parent_instance;
+ JfifFileFormatDriverPrivate * priv;
+};
+
+struct _JfifFileFormatDriverClass {
+ PhotoFileFormatDriverClass parent_class;
+};
+
+typedef enum {
+ PHOTO_FILE_FORMAT_JFIF,
+ PHOTO_FILE_FORMAT_RAW,
+ PHOTO_FILE_FORMAT_PNG,
+ PHOTO_FILE_FORMAT_TIFF,
+ PHOTO_FILE_FORMAT_BMP,
+ PHOTO_FILE_FORMAT_UNKNOWN
+} PhotoFileFormat;
+
+typedef enum {
+ PHOTO_FILE_FORMAT_FLAGS_NONE = 0x00000000
+} PhotoFileFormatFlags;
+
+struct _PhotoFileFormatProperties {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileFormatPropertiesPrivate * priv;
+};
+
+struct _PhotoFileFormatPropertiesClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileFormatProperties *self);
+ PhotoFileFormat (*get_file_format) (PhotoFileFormatProperties* self);
+ PhotoFileFormatFlags (*get_flags) (PhotoFileFormatProperties* self);
+ gboolean (*is_recognized_extension) (PhotoFileFormatProperties* self, const gchar* ext);
+ gchar* (*get_default_extension) (PhotoFileFormatProperties* self);
+ gchar** (*get_known_extensions) (PhotoFileFormatProperties* self, int* result_length1);
+ gchar* (*get_default_mime_type) (PhotoFileFormatProperties* self);
+ gchar** (*get_mime_types) (PhotoFileFormatProperties* self, int* result_length1);
+ gchar* (*get_user_visible_name) (PhotoFileFormatProperties* self);
+};
+
+struct _JfifFileFormatProperties {
+ PhotoFileFormatProperties parent_instance;
+ JfifFileFormatPropertiesPrivate * priv;
+};
+
+struct _JfifFileFormatPropertiesClass {
+ PhotoFileFormatPropertiesClass parent_class;
+};
+
+struct _PhotoFileSniffer {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileSnifferPrivate * priv;
+ GFile* file;
+ PhotoFileSnifferOptions options;
+ gboolean calc_md5;
+};
+
+struct _PhotoFileSnifferClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileSniffer *self);
+ DetectedPhotoInformation* (*sniff) (PhotoFileSniffer* self, gboolean* is_corrupted, GError** error);
+};
+
+struct _GdkSniffer {
+ PhotoFileSniffer parent_instance;
+ GdkSnifferPrivate * priv;
+};
+
+struct _GdkSnifferClass {
+ PhotoFileSnifferClass parent_class;
+};
+
+struct _JfifSniffer {
+ GdkSniffer parent_instance;
+ JfifSnifferPrivate * priv;
+};
+
+struct _JfifSnifferClass {
+ GdkSnifferClass parent_class;
+};
+
+struct _Dimensions {
+ gint width;
+ gint height;
+};
+
+struct _DetectedPhotoInformation {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ DetectedPhotoInformationPrivate * priv;
+ PhotoFileFormat file_format;
+ PhotoMetadata* metadata;
+ gchar* md5;
+ gchar* exif_md5;
+ gchar* thumbnail_md5;
+ gchar* format_name;
+ Dimensions image_dim;
+ GdkColorspace colorspace;
+ gint channels;
+ gint bits_per_channel;
+};
+
+struct _DetectedPhotoInformationClass {
+ GTypeClass parent_class;
+ void (*finalize) (DetectedPhotoInformation *self);
+};
+
+struct _PhotoFileAdapter {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileAdapterPrivate * priv;
+};
+
+struct _PhotoFileAdapterClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileAdapter *self);
+};
+
+struct _PhotoFileReader {
+ PhotoFileAdapter parent_instance;
+ PhotoFileReaderPrivate * priv;
+};
+
+struct _PhotoFileReaderClass {
+ PhotoFileAdapterClass parent_class;
+ PhotoMetadata* (*read_metadata) (PhotoFileReader* self, GError** error);
+ GdkPixbuf* (*unscaled_read) (PhotoFileReader* self, GError** error);
+ GdkPixbuf* (*scaled_read) (PhotoFileReader* self, Dimensions* full, Dimensions* scaled, GError** error);
+};
+
+struct _GdkReader {
+ PhotoFileReader parent_instance;
+ GdkReaderPrivate * priv;
+};
+
+struct _GdkReaderClass {
+ PhotoFileReaderClass parent_class;
+};
+
+struct _JfifReader {
+ GdkReader parent_instance;
+ JfifReaderPrivate * priv;
+};
+
+struct _JfifReaderClass {
+ GdkReaderClass parent_class;
+};
+
+typedef enum {
+ JPEG_QUALITY_LOW = 50,
+ JPEG_QUALITY_MEDIUM = 75,
+ JPEG_QUALITY_HIGH = 90,
+ JPEG_QUALITY_MAXIMUM = 100
+} JpegQuality;
+
+struct _PhotoFileWriter {
+ PhotoFileAdapter parent_instance;
+ PhotoFileWriterPrivate * priv;
+};
+
+struct _PhotoFileWriterClass {
+ PhotoFileAdapterClass parent_class;
+ void (*write) (PhotoFileWriter* self, GdkPixbuf* pixbuf, JpegQuality quality, GError** error);
+};
+
+struct _JfifWriter {
+ PhotoFileWriter parent_instance;
+ JfifWriterPrivate * priv;
+};
+
+struct _JfifWriterClass {
+ PhotoFileWriterClass parent_class;
+};
+
+struct _PhotoFileMetadataWriter {
+ PhotoFileAdapter parent_instance;
+ PhotoFileMetadataWriterPrivate * priv;
+};
+
+struct _PhotoFileMetadataWriterClass {
+ PhotoFileAdapterClass parent_class;
+ void (*write_metadata) (PhotoFileMetadataWriter* self, PhotoMetadata* metadata, GError** error);
+};
+
+struct _JfifMetadataWriter {
+ PhotoFileMetadataWriter parent_instance;
+ JfifMetadataWriterPrivate * priv;
+};
+
+struct _JfifMetadataWriterClass {
+ PhotoFileMetadataWriterClass parent_class;
+};
+
+typedef enum {
+ JPEG_MARKER_INVALID = 0x00,
+ JPEG_MARKER_SOI = 0xD8,
+ JPEG_MARKER_EOI = 0xD9,
+ JPEG_MARKER_APP0 = 0xE0,
+ JPEG_MARKER_APP1 = 0xE1
+} JpegMarker;
+
+
+static gpointer jfif_file_format_driver_parent_class = NULL;
+static JfifFileFormatDriver* jfif_file_format_driver_instance;
+static JfifFileFormatDriver* jfif_file_format_driver_instance = NULL;
+static gpointer jfif_file_format_properties_parent_class = NULL;
+static gchar** jfif_file_format_properties_KNOWN_EXTENSIONS;
+static gint jfif_file_format_properties_KNOWN_EXTENSIONS_length1;
+static gchar** jfif_file_format_properties_KNOWN_EXTENSIONS = NULL;
+static gint jfif_file_format_properties_KNOWN_EXTENSIONS_length1 = 0;
+static gint _jfif_file_format_properties_KNOWN_EXTENSIONS_size_ = 0;
+static gchar** jfif_file_format_properties_KNOWN_MIME_TYPES;
+static gint jfif_file_format_properties_KNOWN_MIME_TYPES_length1;
+static gchar** jfif_file_format_properties_KNOWN_MIME_TYPES = NULL;
+static gint jfif_file_format_properties_KNOWN_MIME_TYPES_length1 = 0;
+static gint _jfif_file_format_properties_KNOWN_MIME_TYPES_size_ = 0;
+static JfifFileFormatProperties* jfif_file_format_properties_instance;
+static JfifFileFormatProperties* jfif_file_format_properties_instance = NULL;
+static gpointer jfif_sniffer_parent_class = NULL;
+static gpointer jfif_reader_parent_class = NULL;
+static gpointer jfif_writer_parent_class = NULL;
+static gpointer jfif_metadata_writer_parent_class = NULL;
+
+gpointer photo_file_format_driver_ref (gpointer instance);
+void photo_file_format_driver_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_format_driver (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_format_driver (GValue* value, gpointer v_object);
+void value_take_photo_file_format_driver (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_format_driver (const GValue* value);
+GType photo_file_format_driver_get_type (void) G_GNUC_CONST;
+gpointer photo_file_format_properties_ref (gpointer instance);
+void photo_file_format_properties_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_format_properties (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_format_properties (GValue* value, gpointer v_object);
+void value_take_photo_file_format_properties (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_format_properties (const GValue* value);
+GType photo_file_format_properties_get_type (void) G_GNUC_CONST;
+gpointer photo_file_adapter_ref (gpointer instance);
+void photo_file_adapter_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_adapter (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_adapter (GValue* value, gpointer v_object);
+void value_take_photo_file_adapter (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_adapter (const GValue* value);
+GType photo_file_adapter_get_type (void) G_GNUC_CONST;
+GType photo_file_reader_get_type (void) G_GNUC_CONST;
+gpointer media_metadata_ref (gpointer instance);
+void media_metadata_unref (gpointer instance);
+GParamSpec* param_spec_media_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_media_metadata (GValue* value, gpointer v_object);
+void value_take_media_metadata (GValue* value, gpointer v_object);
+gpointer value_get_media_metadata (const GValue* value);
+GType media_metadata_get_type (void) G_GNUC_CONST;
+GType photo_metadata_get_type (void) G_GNUC_CONST;
+GType photo_file_writer_get_type (void) G_GNUC_CONST;
+GType photo_file_metadata_writer_get_type (void) G_GNUC_CONST;
+GType photo_file_sniffer_options_get_type (void) G_GNUC_CONST;
+gpointer photo_file_sniffer_ref (gpointer instance);
+void photo_file_sniffer_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_sniffer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_sniffer (GValue* value, gpointer v_object);
+void value_take_photo_file_sniffer (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_sniffer (const GValue* value);
+GType photo_file_sniffer_get_type (void) G_GNUC_CONST;
+GType jfif_file_format_driver_get_type (void) G_GNUC_CONST;
+enum {
+ JFIF_FILE_FORMAT_DRIVER_DUMMY_PROPERTY
+};
+void jfif_file_format_driver_init (void);
+JfifFileFormatDriver* jfif_file_format_driver_new (void);
+JfifFileFormatDriver* jfif_file_format_driver_construct (GType object_type);
+void jfif_file_format_properties_init (void);
+JfifFileFormatDriver* jfif_file_format_driver_get_instance (void);
+static PhotoFileFormatProperties* jfif_file_format_driver_real_get_properties (PhotoFileFormatDriver* base);
+GType jfif_file_format_properties_get_type (void) G_GNUC_CONST;
+JfifFileFormatProperties* jfif_file_format_properties_get_instance (void);
+static PhotoFileReader* jfif_file_format_driver_real_create_reader (PhotoFileFormatDriver* base, const gchar* filepath);
+JfifReader* jfif_reader_new (const gchar* filepath);
+JfifReader* jfif_reader_construct (GType object_type, const gchar* filepath);
+GType gdk_reader_get_type (void) G_GNUC_CONST;
+GType jfif_reader_get_type (void) G_GNUC_CONST;
+static PhotoMetadata* jfif_file_format_driver_real_create_metadata (PhotoFileFormatDriver* base);
+PhotoMetadata* photo_metadata_new (void);
+PhotoMetadata* photo_metadata_construct (GType object_type);
+static gboolean jfif_file_format_driver_real_can_write_image (PhotoFileFormatDriver* base);
+static gboolean jfif_file_format_driver_real_can_write_metadata (PhotoFileFormatDriver* base);
+static PhotoFileWriter* jfif_file_format_driver_real_create_writer (PhotoFileFormatDriver* base, const gchar* filepath);
+JfifWriter* jfif_writer_new (const gchar* filepath);
+JfifWriter* jfif_writer_construct (GType object_type, const gchar* filepath);
+GType jfif_writer_get_type (void) G_GNUC_CONST;
+static PhotoFileMetadataWriter* jfif_file_format_driver_real_create_metadata_writer (PhotoFileFormatDriver* base, const gchar* filepath);
+JfifMetadataWriter* jfif_metadata_writer_new (const gchar* filepath);
+JfifMetadataWriter* jfif_metadata_writer_construct (GType object_type, const gchar* filepath);
+GType jfif_metadata_writer_get_type (void) G_GNUC_CONST;
+static PhotoFileSniffer* jfif_file_format_driver_real_create_sniffer (PhotoFileFormatDriver* base, GFile* file, PhotoFileSnifferOptions options);
+JfifSniffer* jfif_sniffer_new (GFile* file, PhotoFileSnifferOptions options);
+JfifSniffer* jfif_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options);
+GType gdk_sniffer_get_type (void) G_GNUC_CONST;
+GType jfif_sniffer_get_type (void) G_GNUC_CONST;
+PhotoFileFormatDriver* photo_file_format_driver_construct (GType object_type);
+static void jfif_file_format_driver_finalize (PhotoFileFormatDriver* obj);
+GType photo_file_format_get_type (void) G_GNUC_CONST;
+GType photo_file_format_flags_get_type (void) G_GNUC_CONST;
+enum {
+ JFIF_FILE_FORMAT_PROPERTIES_DUMMY_PROPERTY
+};
+JfifFileFormatProperties* jfif_file_format_properties_new (void);
+JfifFileFormatProperties* jfif_file_format_properties_construct (GType object_type);
+static PhotoFileFormat jfif_file_format_properties_real_get_file_format (PhotoFileFormatProperties* base);
+static PhotoFileFormatFlags jfif_file_format_properties_real_get_flags (PhotoFileFormatProperties* base);
+static gchar* jfif_file_format_properties_real_get_default_extension (PhotoFileFormatProperties* base);
+static gchar* jfif_file_format_properties_real_get_user_visible_name (PhotoFileFormatProperties* base);
+static gchar** jfif_file_format_properties_real_get_known_extensions (PhotoFileFormatProperties* base, int* result_length1);
+static gchar** _vala_array_dup8 (gchar** self, int length);
+static gchar* jfif_file_format_properties_real_get_default_mime_type (PhotoFileFormatProperties* base);
+static gchar** jfif_file_format_properties_real_get_mime_types (PhotoFileFormatProperties* base, int* result_length1);
+static gchar** _vala_array_dup9 (gchar** self, int length);
+PhotoFileFormatProperties* photo_file_format_properties_construct (GType object_type);
+static void jfif_file_format_properties_finalize (PhotoFileFormatProperties* obj);
+gpointer detected_photo_information_ref (gpointer instance);
+void detected_photo_information_unref (gpointer instance);
+GParamSpec* param_spec_detected_photo_information (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_detected_photo_information (GValue* value, gpointer v_object);
+void value_take_detected_photo_information (GValue* value, gpointer v_object);
+gpointer value_get_detected_photo_information (const GValue* value);
+GType detected_photo_information_get_type (void) G_GNUC_CONST;
+enum {
+ JFIF_SNIFFER_DUMMY_PROPERTY
+};
+GdkSniffer* gdk_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options);
+static DetectedPhotoInformation* jfif_sniffer_real_sniff (PhotoFileSniffer* base, gboolean* is_corrupted, GError** error);
+gboolean jpeg_is_jpeg (GFile* file, GError** error);
+DetectedPhotoInformation* photo_file_sniffer_sniff (PhotoFileSniffer* self, gboolean* is_corrupted, GError** error);
+GType dimensions_get_type (void) G_GNUC_CONST;
+Dimensions* dimensions_dup (const Dimensions* self);
+void dimensions_free (Dimensions* self);
+enum {
+ JFIF_READER_DUMMY_PROPERTY
+};
+GdkReader* gdk_reader_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
+GType jpeg_quality_get_type (void) G_GNUC_CONST;
+enum {
+ JFIF_WRITER_DUMMY_PROPERTY
+};
+PhotoFileWriter* photo_file_writer_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
+static void jfif_writer_real_write (PhotoFileWriter* base, GdkPixbuf* pixbuf, JpegQuality quality, GError** error);
+gchar* photo_file_adapter_get_filepath (PhotoFileAdapter* self);
+gchar* jpeg_quality_get_pct_text (JpegQuality self);
+enum {
+ JFIF_METADATA_WRITER_DUMMY_PROPERTY
+};
+PhotoFileMetadataWriter* photo_file_metadata_writer_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
+static void jfif_metadata_writer_real_write_metadata (PhotoFileMetadataWriter* base, PhotoMetadata* metadata, GError** error);
+void photo_metadata_write_to_file (PhotoMetadata* self, GFile* file, GError** error);
+GFile* photo_file_adapter_get_file (PhotoFileAdapter* self);
+#define JPEG_MARKER_PREFIX ((guint8) 0xFF)
+GType jpeg_marker_get_type (void) G_GNUC_CONST;
+guint8 jpeg_marker_get_byte (JpegMarker self);
+gint jpeg_quality_get_pct (JpegQuality self);
+JpegQuality* jpeg_quality_get_all (int* result_length1);
+gchar* jpeg_quality_to_string (JpegQuality self);
+gint jpeg_read_marker (GFileInputStream* fins, JpegMarker* marker, GError** error);
+
+
+void jfif_file_format_driver_init (void) {
+ JfifFileFormatDriver* _tmp0_ = NULL;
+#line 11 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = jfif_file_format_driver_new ();
+#line 11 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _photo_file_format_driver_unref0 (jfif_file_format_driver_instance);
+#line 11 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ jfif_file_format_driver_instance = _tmp0_;
+#line 12 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ jfif_file_format_properties_init ();
+#line 633 "JfifSupport.c"
+}
+
+
+static gpointer _photo_file_format_driver_ref0 (gpointer self) {
+#line 16 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return self ? photo_file_format_driver_ref (self) : NULL;
+#line 640 "JfifSupport.c"
+}
+
+
+JfifFileFormatDriver* jfif_file_format_driver_get_instance (void) {
+ JfifFileFormatDriver* result = NULL;
+ JfifFileFormatDriver* _tmp0_ = NULL;
+ JfifFileFormatDriver* _tmp1_ = NULL;
+#line 16 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = jfif_file_format_driver_instance;
+#line 16 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1_ = _photo_file_format_driver_ref0 (_tmp0_);
+#line 16 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = _tmp1_;
+#line 16 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 656 "JfifSupport.c"
+}
+
+
+static PhotoFileFormatProperties* jfif_file_format_driver_real_get_properties (PhotoFileFormatDriver* base) {
+ JfifFileFormatDriver * self;
+ PhotoFileFormatProperties* result = NULL;
+ JfifFileFormatProperties* _tmp0_ = NULL;
+#line 19 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_FILE_FORMAT_DRIVER, JfifFileFormatDriver);
+#line 20 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = jfif_file_format_properties_get_instance ();
+#line 20 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatProperties);
+#line 20 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 672 "JfifSupport.c"
+}
+
+
+static PhotoFileReader* jfif_file_format_driver_real_create_reader (PhotoFileFormatDriver* base, const gchar* filepath) {
+ JfifFileFormatDriver * self;
+ PhotoFileReader* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ JfifReader* _tmp1_ = NULL;
+#line 23 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_FILE_FORMAT_DRIVER, JfifFileFormatDriver);
+#line 23 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 24 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = filepath;
+#line 24 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1_ = jfif_reader_new (_tmp0_);
+#line 24 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO_FILE_READER, PhotoFileReader);
+#line 24 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 693 "JfifSupport.c"
+}
+
+
+static PhotoMetadata* jfif_file_format_driver_real_create_metadata (PhotoFileFormatDriver* base) {
+ JfifFileFormatDriver * self;
+ PhotoMetadata* result = NULL;
+ PhotoMetadata* _tmp0_ = NULL;
+#line 27 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_FILE_FORMAT_DRIVER, JfifFileFormatDriver);
+#line 28 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = photo_metadata_new ();
+#line 28 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = _tmp0_;
+#line 28 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 709 "JfifSupport.c"
+}
+
+
+static gboolean jfif_file_format_driver_real_can_write_image (PhotoFileFormatDriver* base) {
+ JfifFileFormatDriver * self;
+ gboolean result = FALSE;
+#line 31 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_FILE_FORMAT_DRIVER, JfifFileFormatDriver);
+#line 32 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = TRUE;
+#line 32 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 722 "JfifSupport.c"
+}
+
+
+static gboolean jfif_file_format_driver_real_can_write_metadata (PhotoFileFormatDriver* base) {
+ JfifFileFormatDriver * self;
+ gboolean result = FALSE;
+#line 35 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_FILE_FORMAT_DRIVER, JfifFileFormatDriver);
+#line 36 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = TRUE;
+#line 36 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 735 "JfifSupport.c"
+}
+
+
+static PhotoFileWriter* jfif_file_format_driver_real_create_writer (PhotoFileFormatDriver* base, const gchar* filepath) {
+ JfifFileFormatDriver * self;
+ PhotoFileWriter* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ JfifWriter* _tmp1_ = NULL;
+#line 39 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_FILE_FORMAT_DRIVER, JfifFileFormatDriver);
+#line 39 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 40 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = filepath;
+#line 40 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1_ = jfif_writer_new (_tmp0_);
+#line 40 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO_FILE_WRITER, PhotoFileWriter);
+#line 40 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 756 "JfifSupport.c"
+}
+
+
+static PhotoFileMetadataWriter* jfif_file_format_driver_real_create_metadata_writer (PhotoFileFormatDriver* base, const gchar* filepath) {
+ JfifFileFormatDriver * self;
+ PhotoFileMetadataWriter* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ JfifMetadataWriter* _tmp1_ = NULL;
+#line 43 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_FILE_FORMAT_DRIVER, JfifFileFormatDriver);
+#line 43 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 44 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = filepath;
+#line 44 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1_ = jfif_metadata_writer_new (_tmp0_);
+#line 44 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriter);
+#line 44 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 777 "JfifSupport.c"
+}
+
+
+static PhotoFileSniffer* jfif_file_format_driver_real_create_sniffer (PhotoFileFormatDriver* base, GFile* file, PhotoFileSnifferOptions options) {
+ JfifFileFormatDriver * self;
+ PhotoFileSniffer* result = NULL;
+ GFile* _tmp0_ = NULL;
+ PhotoFileSnifferOptions _tmp1_ = 0;
+ JfifSniffer* _tmp2_ = NULL;
+#line 47 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_FILE_FORMAT_DRIVER, JfifFileFormatDriver);
+#line 47 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_return_val_if_fail (G_IS_FILE (file), NULL);
+#line 48 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = file;
+#line 48 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1_ = options;
+#line 48 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp2_ = jfif_sniffer_new (_tmp0_, _tmp1_);
+#line 48 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer);
+#line 48 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 801 "JfifSupport.c"
+}
+
+
+JfifFileFormatDriver* jfif_file_format_driver_construct (GType object_type) {
+ JfifFileFormatDriver* self = NULL;
+#line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = (JfifFileFormatDriver*) photo_file_format_driver_construct (object_type);
+#line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return self;
+#line 811 "JfifSupport.c"
+}
+
+
+JfifFileFormatDriver* jfif_file_format_driver_new (void) {
+#line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return jfif_file_format_driver_construct (TYPE_JFIF_FILE_FORMAT_DRIVER);
+#line 818 "JfifSupport.c"
+}
+
+
+static void jfif_file_format_driver_class_init (JfifFileFormatDriverClass * klass) {
+#line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ jfif_file_format_driver_parent_class = g_type_class_peek_parent (klass);
+#line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->finalize = jfif_file_format_driver_finalize;
+#line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->get_properties = jfif_file_format_driver_real_get_properties;
+#line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_reader = jfif_file_format_driver_real_create_reader;
+#line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_metadata = jfif_file_format_driver_real_create_metadata;
+#line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->can_write_image = jfif_file_format_driver_real_can_write_image;
+#line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->can_write_metadata = jfif_file_format_driver_real_can_write_metadata;
+#line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_writer = jfif_file_format_driver_real_create_writer;
+#line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_metadata_writer = jfif_file_format_driver_real_create_metadata_writer;
+#line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_sniffer = jfif_file_format_driver_real_create_sniffer;
+#line 843 "JfifSupport.c"
+}
+
+
+static void jfif_file_format_driver_instance_init (JfifFileFormatDriver * self) {
+}
+
+
+static void jfif_file_format_driver_finalize (PhotoFileFormatDriver* obj) {
+ JfifFileFormatDriver * self;
+#line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_JFIF_FILE_FORMAT_DRIVER, JfifFileFormatDriver);
+#line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ PHOTO_FILE_FORMAT_DRIVER_CLASS (jfif_file_format_driver_parent_class)->finalize (obj);
+#line 857 "JfifSupport.c"
+}
+
+
+GType jfif_file_format_driver_get_type (void) {
+ static volatile gsize jfif_file_format_driver_type_id__volatile = 0;
+ if (g_once_init_enter (&jfif_file_format_driver_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (JfifFileFormatDriverClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) jfif_file_format_driver_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (JfifFileFormatDriver), 0, (GInstanceInitFunc) jfif_file_format_driver_instance_init, NULL };
+ GType jfif_file_format_driver_type_id;
+ jfif_file_format_driver_type_id = g_type_register_static (TYPE_PHOTO_FILE_FORMAT_DRIVER, "JfifFileFormatDriver", &g_define_type_info, 0);
+ g_once_init_leave (&jfif_file_format_driver_type_id__volatile, jfif_file_format_driver_type_id);
+ }
+ return jfif_file_format_driver_type_id__volatile;
+}
+
+
+void jfif_file_format_properties_init (void) {
+ JfifFileFormatProperties* _tmp0_ = NULL;
+#line 64 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = jfif_file_format_properties_new ();
+#line 64 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _photo_file_format_properties_unref0 (jfif_file_format_properties_instance);
+#line 64 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ jfif_file_format_properties_instance = _tmp0_;
+#line 881 "JfifSupport.c"
+}
+
+
+static gpointer _photo_file_format_properties_ref0 (gpointer self) {
+#line 68 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return self ? photo_file_format_properties_ref (self) : NULL;
+#line 888 "JfifSupport.c"
+}
+
+
+JfifFileFormatProperties* jfif_file_format_properties_get_instance (void) {
+ JfifFileFormatProperties* result = NULL;
+ JfifFileFormatProperties* _tmp0_ = NULL;
+ JfifFileFormatProperties* _tmp1_ = NULL;
+#line 68 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = jfif_file_format_properties_instance;
+#line 68 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1_ = _photo_file_format_properties_ref0 (_tmp0_);
+#line 68 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = _tmp1_;
+#line 68 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 904 "JfifSupport.c"
+}
+
+
+static PhotoFileFormat jfif_file_format_properties_real_get_file_format (PhotoFileFormatProperties* base) {
+ JfifFileFormatProperties * self;
+ PhotoFileFormat result = 0;
+#line 71 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_FILE_FORMAT_PROPERTIES, JfifFileFormatProperties);
+#line 72 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = PHOTO_FILE_FORMAT_JFIF;
+#line 72 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 917 "JfifSupport.c"
+}
+
+
+static PhotoFileFormatFlags jfif_file_format_properties_real_get_flags (PhotoFileFormatProperties* base) {
+ JfifFileFormatProperties * self;
+ PhotoFileFormatFlags result = 0;
+#line 75 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_FILE_FORMAT_PROPERTIES, JfifFileFormatProperties);
+#line 76 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = PHOTO_FILE_FORMAT_FLAGS_NONE;
+#line 76 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 930 "JfifSupport.c"
+}
+
+
+static gchar* jfif_file_format_properties_real_get_default_extension (PhotoFileFormatProperties* base) {
+ JfifFileFormatProperties * self;
+ gchar* result = NULL;
+ gchar* _tmp0_ = NULL;
+#line 79 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_FILE_FORMAT_PROPERTIES, JfifFileFormatProperties);
+#line 80 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = g_strdup ("jpg");
+#line 80 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = _tmp0_;
+#line 80 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 946 "JfifSupport.c"
+}
+
+
+static gchar* jfif_file_format_properties_real_get_user_visible_name (PhotoFileFormatProperties* base) {
+ JfifFileFormatProperties * self;
+ gchar* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+#line 83 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_FILE_FORMAT_PROPERTIES, JfifFileFormatProperties);
+#line 84 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = _ ("JPEG");
+#line 84 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 84 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = _tmp1_;
+#line 84 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 965 "JfifSupport.c"
+}
+
+
+static gchar** _vala_array_dup8 (gchar** self, int length) {
+ gchar** result;
+ int i;
+#line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = g_new0 (gchar*, length + 1);
+#line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ for (i = 0; i < length; i++) {
+#line 976 "JfifSupport.c"
+ gchar* _tmp0_ = NULL;
+#line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = g_strdup (self[i]);
+#line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result[i] = _tmp0_;
+#line 982 "JfifSupport.c"
+ }
+#line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 986 "JfifSupport.c"
+}
+
+
+static gchar** jfif_file_format_properties_real_get_known_extensions (PhotoFileFormatProperties* base, int* result_length1) {
+ JfifFileFormatProperties * self;
+ gchar** result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ gchar** _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+ gchar** _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+#line 87 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_FILE_FORMAT_PROPERTIES, JfifFileFormatProperties);
+#line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = jfif_file_format_properties_KNOWN_EXTENSIONS;
+#line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0__length1 = jfif_file_format_properties_KNOWN_EXTENSIONS_length1;
+#line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup8 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
+#line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1__length1 = _tmp0__length1;
+#line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp2__length1 = _tmp1__length1;
+#line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (result_length1) {
+#line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ *result_length1 = _tmp2__length1;
+#line 1017 "JfifSupport.c"
+ }
+#line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = _tmp2_;
+#line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 1023 "JfifSupport.c"
+}
+
+
+static gchar* jfif_file_format_properties_real_get_default_mime_type (PhotoFileFormatProperties* base) {
+ JfifFileFormatProperties * self;
+ gchar* result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+#line 91 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_FILE_FORMAT_PROPERTIES, JfifFileFormatProperties);
+#line 92 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = jfif_file_format_properties_KNOWN_MIME_TYPES;
+#line 92 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0__length1 = jfif_file_format_properties_KNOWN_MIME_TYPES_length1;
+#line 92 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1_ = _tmp0_[0];
+#line 92 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp2_ = g_strdup (_tmp1_);
+#line 92 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = _tmp2_;
+#line 92 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 1048 "JfifSupport.c"
+}
+
+
+static gchar** _vala_array_dup9 (gchar** self, int length) {
+ gchar** result;
+ int i;
+#line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = g_new0 (gchar*, length + 1);
+#line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ for (i = 0; i < length; i++) {
+#line 1059 "JfifSupport.c"
+ gchar* _tmp0_ = NULL;
+#line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = g_strdup (self[i]);
+#line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result[i] = _tmp0_;
+#line 1065 "JfifSupport.c"
+ }
+#line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 1069 "JfifSupport.c"
+}
+
+
+static gchar** jfif_file_format_properties_real_get_mime_types (PhotoFileFormatProperties* base, int* result_length1) {
+ JfifFileFormatProperties * self;
+ gchar** result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ gchar** _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+ gchar** _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+#line 95 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_FILE_FORMAT_PROPERTIES, JfifFileFormatProperties);
+#line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = jfif_file_format_properties_KNOWN_MIME_TYPES;
+#line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0__length1 = jfif_file_format_properties_KNOWN_MIME_TYPES_length1;
+#line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup9 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
+#line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1__length1 = _tmp0__length1;
+#line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp2__length1 = _tmp1__length1;
+#line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (result_length1) {
+#line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ *result_length1 = _tmp2__length1;
+#line 1100 "JfifSupport.c"
+ }
+#line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = _tmp2_;
+#line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 1106 "JfifSupport.c"
+}
+
+
+JfifFileFormatProperties* jfif_file_format_properties_construct (GType object_type) {
+ JfifFileFormatProperties* self = NULL;
+#line 52 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = (JfifFileFormatProperties*) photo_file_format_properties_construct (object_type);
+#line 52 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return self;
+#line 1116 "JfifSupport.c"
+}
+
+
+JfifFileFormatProperties* jfif_file_format_properties_new (void) {
+#line 52 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return jfif_file_format_properties_construct (TYPE_JFIF_FILE_FORMAT_PROPERTIES);
+#line 1123 "JfifSupport.c"
+}
+
+
+static void jfif_file_format_properties_class_init (JfifFileFormatPropertiesClass * klass) {
+ gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar** _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ gchar** _tmp5_ = NULL;
+#line 52 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ jfif_file_format_properties_parent_class = g_type_class_peek_parent (klass);
+#line 52 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->finalize = jfif_file_format_properties_finalize;
+#line 52 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_file_format = jfif_file_format_properties_real_get_file_format;
+#line 52 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_flags = jfif_file_format_properties_real_get_flags;
+#line 52 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_default_extension = jfif_file_format_properties_real_get_default_extension;
+#line 52 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_user_visible_name = jfif_file_format_properties_real_get_user_visible_name;
+#line 52 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_known_extensions = jfif_file_format_properties_real_get_known_extensions;
+#line 52 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_default_mime_type = jfif_file_format_properties_real_get_default_mime_type;
+#line 52 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_mime_types = jfif_file_format_properties_real_get_mime_types;
+#line 53 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = g_strdup ("jpg");
+#line 53 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1_ = g_strdup ("jpeg");
+#line 53 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp2_ = g_strdup ("jpe");
+#line 53 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp3_ = g_new0 (gchar*, 3 + 1);
+#line 53 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp3_[0] = _tmp0_;
+#line 53 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp3_[1] = _tmp1_;
+#line 53 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp3_[2] = _tmp2_;
+#line 53 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ jfif_file_format_properties_KNOWN_EXTENSIONS = _tmp3_;
+#line 53 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ jfif_file_format_properties_KNOWN_EXTENSIONS_length1 = 3;
+#line 57 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp4_ = g_strdup ("image/jpeg");
+#line 57 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp5_ = g_new0 (gchar*, 1 + 1);
+#line 57 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp5_[0] = _tmp4_;
+#line 57 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ jfif_file_format_properties_KNOWN_MIME_TYPES = _tmp5_;
+#line 57 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ jfif_file_format_properties_KNOWN_MIME_TYPES_length1 = 1;
+#line 1180 "JfifSupport.c"
+}
+
+
+static void jfif_file_format_properties_instance_init (JfifFileFormatProperties * self) {
+}
+
+
+static void jfif_file_format_properties_finalize (PhotoFileFormatProperties* obj) {
+ JfifFileFormatProperties * self;
+#line 52 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_JFIF_FILE_FORMAT_PROPERTIES, JfifFileFormatProperties);
+#line 52 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ PHOTO_FILE_FORMAT_PROPERTIES_CLASS (jfif_file_format_properties_parent_class)->finalize (obj);
+#line 1194 "JfifSupport.c"
+}
+
+
+GType jfif_file_format_properties_get_type (void) {
+ static volatile gsize jfif_file_format_properties_type_id__volatile = 0;
+ if (g_once_init_enter (&jfif_file_format_properties_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (JfifFileFormatPropertiesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) jfif_file_format_properties_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (JfifFileFormatProperties), 0, (GInstanceInitFunc) jfif_file_format_properties_instance_init, NULL };
+ GType jfif_file_format_properties_type_id;
+ jfif_file_format_properties_type_id = g_type_register_static (TYPE_PHOTO_FILE_FORMAT_PROPERTIES, "JfifFileFormatProperties", &g_define_type_info, 0);
+ g_once_init_leave (&jfif_file_format_properties_type_id__volatile, jfif_file_format_properties_type_id);
+ }
+ return jfif_file_format_properties_type_id__volatile;
+}
+
+
+JfifSniffer* jfif_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options) {
+ JfifSniffer* self = NULL;
+ GFile* _tmp0_ = NULL;
+ PhotoFileSnifferOptions _tmp1_ = 0;
+#line 101 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_return_val_if_fail (G_IS_FILE (file), NULL);
+#line 102 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = file;
+#line 102 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1_ = options;
+#line 102 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = (JfifSniffer*) gdk_sniffer_construct (object_type, _tmp0_, _tmp1_);
+#line 101 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return self;
+#line 1224 "JfifSupport.c"
+}
+
+
+JfifSniffer* jfif_sniffer_new (GFile* file, PhotoFileSnifferOptions options) {
+#line 101 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return jfif_sniffer_construct (TYPE_JFIF_SNIFFER, file, options);
+#line 1231 "JfifSupport.c"
+}
+
+
+static gpointer _detected_photo_information_ref0 (gpointer self) {
+#line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return self ? detected_photo_information_ref (self) : NULL;
+#line 1238 "JfifSupport.c"
+}
+
+
+static DetectedPhotoInformation* jfif_sniffer_real_sniff (PhotoFileSniffer* base, gboolean* is_corrupted, GError** error) {
+ JfifSniffer * self;
+ gboolean _vala_is_corrupted = FALSE;
+ DetectedPhotoInformation* result = NULL;
+ gboolean _tmp0_ = FALSE;
+ GFile* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+ DetectedPhotoInformation* detected = NULL;
+ gboolean _tmp3_ = FALSE;
+ DetectedPhotoInformation* _tmp4_ = NULL;
+ DetectedPhotoInformation* _tmp5_ = NULL;
+ DetectedPhotoInformation* _tmp6_ = NULL;
+ DetectedPhotoInformation* _tmp7_ = NULL;
+ PhotoFileFormat _tmp8_ = 0;
+ DetectedPhotoInformation* _tmp10_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 105 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_SNIFFER, JfifSniffer);
+#line 107 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _vala_is_corrupted = FALSE;
+#line 109 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer)->file;
+#line 109 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp2_ = jpeg_is_jpeg (_tmp1_, &_inner_error_);
+#line 109 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = _tmp2_;
+#line 109 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 109 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 109 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return NULL;
+#line 1274 "JfifSupport.c"
+ }
+#line 109 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (!_tmp0_) {
+#line 110 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = NULL;
+#line 110 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (is_corrupted) {
+#line 110 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ *is_corrupted = _vala_is_corrupted;
+#line 1284 "JfifSupport.c"
+ }
+#line 110 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 1288 "JfifSupport.c"
+ }
+#line 112 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp4_ = PHOTO_FILE_SNIFFER_CLASS (jfif_sniffer_parent_class)->sniff (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_GDK_SNIFFER, GdkSniffer), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer), &_tmp3_, &_inner_error_);
+#line 112 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _vala_is_corrupted = _tmp3_;
+#line 112 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ detected = _tmp4_;
+#line 112 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 112 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 112 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return NULL;
+#line 1302 "JfifSupport.c"
+ }
+#line 113 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp5_ = detected;
+#line 113 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (_tmp5_ == NULL) {
+#line 114 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = NULL;
+#line 114 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _detected_photo_information_unref0 (detected);
+#line 114 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (is_corrupted) {
+#line 114 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ *is_corrupted = _vala_is_corrupted;
+#line 1316 "JfifSupport.c"
+ }
+#line 114 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 1320 "JfifSupport.c"
+ }
+#line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp7_ = detected;
+#line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp8_ = _tmp7_->file_format;
+#line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (_tmp8_ == PHOTO_FILE_FORMAT_JFIF) {
+#line 1328 "JfifSupport.c"
+ DetectedPhotoInformation* _tmp9_ = NULL;
+#line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp9_ = detected;
+#line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp6_ = _tmp9_;
+#line 1334 "JfifSupport.c"
+ } else {
+#line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp6_ = NULL;
+#line 1338 "JfifSupport.c"
+ }
+#line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp10_ = _detected_photo_information_ref0 (_tmp6_);
+#line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = _tmp10_;
+#line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _detected_photo_information_unref0 (detected);
+#line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (is_corrupted) {
+#line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ *is_corrupted = _vala_is_corrupted;
+#line 1350 "JfifSupport.c"
+ }
+#line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 1354 "JfifSupport.c"
+}
+
+
+static void jfif_sniffer_class_init (JfifSnifferClass * klass) {
+#line 100 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ jfif_sniffer_parent_class = g_type_class_peek_parent (klass);
+#line 100 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ ((PhotoFileSnifferClass *) klass)->sniff = jfif_sniffer_real_sniff;
+#line 1363 "JfifSupport.c"
+}
+
+
+static void jfif_sniffer_instance_init (JfifSniffer * self) {
+}
+
+
+GType jfif_sniffer_get_type (void) {
+ static volatile gsize jfif_sniffer_type_id__volatile = 0;
+ if (g_once_init_enter (&jfif_sniffer_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (JfifSnifferClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) jfif_sniffer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (JfifSniffer), 0, (GInstanceInitFunc) jfif_sniffer_instance_init, NULL };
+ GType jfif_sniffer_type_id;
+ jfif_sniffer_type_id = g_type_register_static (TYPE_GDK_SNIFFER, "JfifSniffer", &g_define_type_info, 0);
+ g_once_init_leave (&jfif_sniffer_type_id__volatile, jfif_sniffer_type_id);
+ }
+ return jfif_sniffer_type_id__volatile;
+}
+
+
+JfifReader* jfif_reader_construct (GType object_type, const gchar* filepath) {
+ JfifReader* self = NULL;
+ const gchar* _tmp0_ = NULL;
+#line 121 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 122 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = filepath;
+#line 122 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = (JfifReader*) gdk_reader_construct (object_type, _tmp0_, PHOTO_FILE_FORMAT_JFIF);
+#line 121 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return self;
+#line 1394 "JfifSupport.c"
+}
+
+
+JfifReader* jfif_reader_new (const gchar* filepath) {
+#line 121 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return jfif_reader_construct (TYPE_JFIF_READER, filepath);
+#line 1401 "JfifSupport.c"
+}
+
+
+static void jfif_reader_class_init (JfifReaderClass * klass) {
+#line 120 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ jfif_reader_parent_class = g_type_class_peek_parent (klass);
+#line 1408 "JfifSupport.c"
+}
+
+
+static void jfif_reader_instance_init (JfifReader * self) {
+}
+
+
+GType jfif_reader_get_type (void) {
+ static volatile gsize jfif_reader_type_id__volatile = 0;
+ if (g_once_init_enter (&jfif_reader_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (JfifReaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) jfif_reader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (JfifReader), 0, (GInstanceInitFunc) jfif_reader_instance_init, NULL };
+ GType jfif_reader_type_id;
+ jfif_reader_type_id = g_type_register_static (TYPE_GDK_READER, "JfifReader", &g_define_type_info, 0);
+ g_once_init_leave (&jfif_reader_type_id__volatile, jfif_reader_type_id);
+ }
+ return jfif_reader_type_id__volatile;
+}
+
+
+JfifWriter* jfif_writer_construct (GType object_type, const gchar* filepath) {
+ JfifWriter* self = NULL;
+ const gchar* _tmp0_ = NULL;
+#line 127 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 128 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = filepath;
+#line 128 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = (JfifWriter*) photo_file_writer_construct (object_type, _tmp0_, PHOTO_FILE_FORMAT_JFIF);
+#line 127 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return self;
+#line 1439 "JfifSupport.c"
+}
+
+
+JfifWriter* jfif_writer_new (const gchar* filepath) {
+#line 127 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return jfif_writer_construct (TYPE_JFIF_WRITER, filepath);
+#line 1446 "JfifSupport.c"
+}
+
+
+static void jfif_writer_real_write (PhotoFileWriter* base, GdkPixbuf* pixbuf, JpegQuality quality, GError** error) {
+ JfifWriter * self;
+ GdkPixbuf* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ JpegQuality _tmp3_ = 0;
+ gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 131 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_WRITER, JfifWriter);
+#line 131 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_return_if_fail (GDK_IS_PIXBUF (pixbuf));
+#line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = pixbuf;
+#line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1_ = photo_file_adapter_get_filepath (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp3_ = quality;
+#line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp4_ = jpeg_quality_get_pct_text (_tmp3_);
+#line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp5_ = _tmp4_;
+#line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ gdk_pixbuf_save (_tmp0_, _tmp2_, "jpeg", &_inner_error_, "quality", _tmp5_, NULL);
+#line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _g_free0 (_tmp5_);
+#line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _g_free0 (_tmp2_);
+#line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return;
+#line 1487 "JfifSupport.c"
+ }
+}
+
+
+static void jfif_writer_class_init (JfifWriterClass * klass) {
+#line 126 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ jfif_writer_parent_class = g_type_class_peek_parent (klass);
+#line 126 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ ((PhotoFileWriterClass *) klass)->write = jfif_writer_real_write;
+#line 1497 "JfifSupport.c"
+}
+
+
+static void jfif_writer_instance_init (JfifWriter * self) {
+}
+
+
+GType jfif_writer_get_type (void) {
+ static volatile gsize jfif_writer_type_id__volatile = 0;
+ if (g_once_init_enter (&jfif_writer_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (JfifWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) jfif_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (JfifWriter), 0, (GInstanceInitFunc) jfif_writer_instance_init, NULL };
+ GType jfif_writer_type_id;
+ jfif_writer_type_id = g_type_register_static (TYPE_PHOTO_FILE_WRITER, "JfifWriter", &g_define_type_info, 0);
+ g_once_init_leave (&jfif_writer_type_id__volatile, jfif_writer_type_id);
+ }
+ return jfif_writer_type_id__volatile;
+}
+
+
+JfifMetadataWriter* jfif_metadata_writer_construct (GType object_type, const gchar* filepath) {
+ JfifMetadataWriter* self = NULL;
+ const gchar* _tmp0_ = NULL;
+#line 137 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 138 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = filepath;
+#line 138 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = (JfifMetadataWriter*) photo_file_metadata_writer_construct (object_type, _tmp0_, PHOTO_FILE_FORMAT_JFIF);
+#line 137 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return self;
+#line 1528 "JfifSupport.c"
+}
+
+
+JfifMetadataWriter* jfif_metadata_writer_new (const gchar* filepath) {
+#line 137 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return jfif_metadata_writer_construct (TYPE_JFIF_METADATA_WRITER, filepath);
+#line 1535 "JfifSupport.c"
+}
+
+
+static void jfif_metadata_writer_real_write_metadata (PhotoFileMetadataWriter* base, PhotoMetadata* metadata, GError** error) {
+ JfifMetadataWriter * self;
+ PhotoMetadata* _tmp0_ = NULL;
+ GFile* _tmp1_ = NULL;
+ GFile* _tmp2_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 141 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_METADATA_WRITER, JfifMetadataWriter);
+#line 141 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (metadata));
+#line 142 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = metadata;
+#line 142 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1_ = photo_file_adapter_get_file (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 142 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 142 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ photo_metadata_write_to_file (_tmp0_, _tmp2_, &_inner_error_);
+#line 142 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _g_object_unref0 (_tmp2_);
+#line 142 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 142 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 142 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return;
+#line 1565 "JfifSupport.c"
+ }
+}
+
+
+static void jfif_metadata_writer_class_init (JfifMetadataWriterClass * klass) {
+#line 136 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ jfif_metadata_writer_parent_class = g_type_class_peek_parent (klass);
+#line 136 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ ((PhotoFileMetadataWriterClass *) klass)->write_metadata = jfif_metadata_writer_real_write_metadata;
+#line 1575 "JfifSupport.c"
+}
+
+
+static void jfif_metadata_writer_instance_init (JfifMetadataWriter * self) {
+}
+
+
+GType jfif_metadata_writer_get_type (void) {
+ static volatile gsize jfif_metadata_writer_type_id__volatile = 0;
+ if (g_once_init_enter (&jfif_metadata_writer_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (JfifMetadataWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) jfif_metadata_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (JfifMetadataWriter), 0, (GInstanceInitFunc) jfif_metadata_writer_instance_init, NULL };
+ GType jfif_metadata_writer_type_id;
+ jfif_metadata_writer_type_id = g_type_register_static (TYPE_PHOTO_FILE_METADATA_WRITER, "JfifMetadataWriter", &g_define_type_info, 0);
+ g_once_init_leave (&jfif_metadata_writer_type_id__volatile, jfif_metadata_writer_type_id);
+ }
+ return jfif_metadata_writer_type_id__volatile;
+}
+
+
+guint8 jpeg_marker_get_byte (JpegMarker self) {
+ guint8 result = 0U;
+#line 160 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = (guint8) self;
+#line 160 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 1601 "JfifSupport.c"
+}
+
+
+GType jpeg_marker_get_type (void) {
+ static volatile gsize jpeg_marker_type_id__volatile = 0;
+ if (g_once_init_enter (&jpeg_marker_type_id__volatile)) {
+ static const GEnumValue values[] = {{JPEG_MARKER_INVALID, "JPEG_MARKER_INVALID", "invalid"}, {JPEG_MARKER_SOI, "JPEG_MARKER_SOI", "soi"}, {JPEG_MARKER_EOI, "JPEG_MARKER_EOI", "eoi"}, {JPEG_MARKER_APP0, "JPEG_MARKER_APP0", "app0"}, {JPEG_MARKER_APP1, "JPEG_MARKER_APP1", "app1"}, {0, NULL, NULL}};
+ GType jpeg_marker_type_id;
+ jpeg_marker_type_id = g_enum_register_static ("JpegMarker", values);
+ g_once_init_leave (&jpeg_marker_type_id__volatile, jpeg_marker_type_id);
+ }
+ return jpeg_marker_type_id__volatile;
+}
+
+
+gint jpeg_quality_get_pct (JpegQuality self) {
+ gint result = 0;
+#line 171 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = (gint) self;
+#line 171 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 1623 "JfifSupport.c"
+}
+
+
+gchar* jpeg_quality_get_pct_text (JpegQuality self) {
+ gchar* result = NULL;
+ gchar* _tmp0_ = NULL;
+#line 175 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = g_strdup_printf ("%d", (gint) self);
+#line 175 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = _tmp0_;
+#line 175 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 1636 "JfifSupport.c"
+}
+
+
+JpegQuality* jpeg_quality_get_all (int* result_length1) {
+ JpegQuality* result = NULL;
+ JpegQuality* _tmp0_ = NULL;
+ JpegQuality* _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+#line 179 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = g_new0 (JpegQuality, 4);
+#line 179 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_[0] = JPEG_QUALITY_LOW;
+#line 179 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_[1] = JPEG_QUALITY_MEDIUM;
+#line 179 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_[2] = JPEG_QUALITY_HIGH;
+#line 179 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_[3] = JPEG_QUALITY_MAXIMUM;
+#line 179 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1_ = _tmp0_;
+#line 179 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1__length1 = 4;
+#line 179 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (result_length1) {
+#line 179 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ *result_length1 = _tmp1__length1;
+#line 1663 "JfifSupport.c"
+ }
+#line 179 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = _tmp1_;
+#line 179 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 1669 "JfifSupport.c"
+}
+
+
+gchar* jpeg_quality_to_string (JpegQuality self) {
+ gchar* result = NULL;
+#line 183 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ switch (self) {
+#line 183 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ case JPEG_QUALITY_LOW:
+#line 1679 "JfifSupport.c"
+ {
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+#line 185 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = _ ("Low (%d%%)");
+#line 185 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1_ = g_strdup_printf (_tmp0_, (gint) self);
+#line 185 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = _tmp1_;
+#line 185 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 1691 "JfifSupport.c"
+ }
+#line 183 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ case JPEG_QUALITY_MEDIUM:
+#line 1695 "JfifSupport.c"
+ {
+ const gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+#line 188 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp2_ = _ ("Medium (%d%%)");
+#line 188 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp3_ = g_strdup_printf (_tmp2_, (gint) self);
+#line 188 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = _tmp3_;
+#line 188 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 1707 "JfifSupport.c"
+ }
+#line 183 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ case JPEG_QUALITY_HIGH:
+#line 1711 "JfifSupport.c"
+ {
+ const gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+#line 191 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp4_ = _ ("High (%d%%)");
+#line 191 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp5_ = g_strdup_printf (_tmp4_, (gint) self);
+#line 191 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = _tmp5_;
+#line 191 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 1723 "JfifSupport.c"
+ }
+#line 183 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ case JPEG_QUALITY_MAXIMUM:
+#line 1727 "JfifSupport.c"
+ {
+ const gchar* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+#line 194 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp6_ = _ ("Maximum (%d%%)");
+#line 194 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp7_ = g_strdup_printf (_tmp6_, (gint) self);
+#line 194 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = _tmp7_;
+#line 194 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 1739 "JfifSupport.c"
+ }
+ default:
+#line 183 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ break;
+#line 1744 "JfifSupport.c"
+ }
+#line 197 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_warn_if_reached ();
+#line 199 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = NULL;
+#line 199 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 1752 "JfifSupport.c"
+}
+
+
+GType jpeg_quality_get_type (void) {
+ static volatile gsize jpeg_quality_type_id__volatile = 0;
+ if (g_once_init_enter (&jpeg_quality_type_id__volatile)) {
+ static const GEnumValue values[] = {{JPEG_QUALITY_LOW, "JPEG_QUALITY_LOW", "low"}, {JPEG_QUALITY_MEDIUM, "JPEG_QUALITY_MEDIUM", "medium"}, {JPEG_QUALITY_HIGH, "JPEG_QUALITY_HIGH", "high"}, {JPEG_QUALITY_MAXIMUM, "JPEG_QUALITY_MAXIMUM", "maximum"}, {0, NULL, NULL}};
+ GType jpeg_quality_type_id;
+ jpeg_quality_type_id = g_enum_register_static ("JpegQuality", values);
+ g_once_init_leave (&jpeg_quality_type_id__volatile, jpeg_quality_type_id);
+ }
+ return jpeg_quality_type_id__volatile;
+}
+
+
+gboolean jpeg_is_jpeg (GFile* file, GError** error) {
+ gboolean result = FALSE;
+ GFileInputStream* fins = NULL;
+ GFile* _tmp0_ = NULL;
+ GFileInputStream* _tmp1_ = NULL;
+ JpegMarker marker = 0;
+ gint segment_length = 0;
+ GFileInputStream* _tmp2_ = NULL;
+ JpegMarker _tmp3_ = 0;
+ gint _tmp4_ = 0;
+ gboolean _tmp5_ = FALSE;
+ JpegMarker _tmp6_ = 0;
+ GError * _inner_error_ = NULL;
+#line 203 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_return_val_if_fail (G_IS_FILE (file), FALSE);
+#line 204 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = file;
+#line 204 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1_ = g_file_read (_tmp0_, NULL, &_inner_error_);
+#line 204 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ fins = _tmp1_;
+#line 204 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 204 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 204 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return FALSE;
+#line 1795 "JfifSupport.c"
+ }
+#line 207 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp2_ = fins;
+#line 207 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp4_ = jpeg_read_marker (_tmp2_, &_tmp3_, &_inner_error_);
+#line 207 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ marker = _tmp3_;
+#line 207 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ segment_length = _tmp4_;
+#line 207 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 207 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 207 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _g_object_unref0 (fins);
+#line 207 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return FALSE;
+#line 1813 "JfifSupport.c"
+ }
+#line 210 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp6_ = marker;
+#line 210 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (_tmp6_ == JPEG_MARKER_SOI) {
+#line 1819 "JfifSupport.c"
+ gint _tmp7_ = 0;
+#line 210 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp7_ = segment_length;
+#line 210 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp5_ = _tmp7_ == 0;
+#line 1825 "JfifSupport.c"
+ } else {
+#line 210 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp5_ = FALSE;
+#line 1829 "JfifSupport.c"
+ }
+#line 210 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = _tmp5_;
+#line 210 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _g_object_unref0 (fins);
+#line 210 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 1837 "JfifSupport.c"
+}
+
+
+gint jpeg_read_marker (GFileInputStream* fins, JpegMarker* marker, GError** error) {
+ JpegMarker _vala_marker = 0;
+ gint result = 0;
+ GDataInputStream* dins = NULL;
+ GFileInputStream* _tmp0_ = NULL;
+ GDataInputStream* _tmp1_ = NULL;
+ GDataInputStream* _tmp2_ = NULL;
+ guint8 _tmp3_ = 0U;
+ GDataInputStream* _tmp4_ = NULL;
+ guint8 _tmp5_ = 0U;
+ guint8 _tmp6_ = 0U;
+ GDataInputStream* _tmp7_ = NULL;
+ guint8 _tmp8_ = 0U;
+ gboolean _tmp9_ = FALSE;
+ JpegMarker _tmp10_ = 0;
+ guint16 length = 0U;
+ GDataInputStream* _tmp12_ = NULL;
+ guint16 _tmp13_ = 0U;
+ guint16 _tmp14_ = 0U;
+ guint16 _tmp18_ = 0U;
+ GError * _inner_error_ = NULL;
+#line 213 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_return_val_if_fail (G_IS_FILE_INPUT_STREAM (fins), 0);
+#line 214 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _vala_marker = JPEG_MARKER_INVALID;
+#line 216 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp0_ = fins;
+#line 216 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp1_ = g_data_input_stream_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, G_TYPE_INPUT_STREAM, GInputStream));
+#line 216 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ dins = _tmp1_;
+#line 217 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp2_ = dins;
+#line 217 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_data_input_stream_set_byte_order (_tmp2_, G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN);
+#line 219 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp4_ = dins;
+#line 219 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp5_ = g_data_input_stream_read_byte (_tmp4_, NULL, &_inner_error_);
+#line 219 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp3_ = _tmp5_;
+#line 219 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 219 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 219 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _g_object_unref0 (dins);
+#line 219 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return 0;
+#line 1890 "JfifSupport.c"
+ }
+#line 219 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (_tmp3_ != JPEG_MARKER_PREFIX) {
+#line 220 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = -1;
+#line 220 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _g_object_unref0 (dins);
+#line 220 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (marker) {
+#line 220 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ *marker = _vala_marker;
+#line 1902 "JfifSupport.c"
+ }
+#line 220 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 1906 "JfifSupport.c"
+ }
+#line 222 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp7_ = dins;
+#line 222 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp8_ = g_data_input_stream_read_byte (_tmp7_, NULL, &_inner_error_);
+#line 222 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp6_ = _tmp8_;
+#line 222 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 222 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 222 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _g_object_unref0 (dins);
+#line 222 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return 0;
+#line 1922 "JfifSupport.c"
+ }
+#line 222 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _vala_marker = (JpegMarker) _tmp6_;
+#line 223 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp10_ = _vala_marker;
+#line 223 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (_tmp10_ == JPEG_MARKER_SOI) {
+#line 223 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp9_ = TRUE;
+#line 1932 "JfifSupport.c"
+ } else {
+ JpegMarker _tmp11_ = 0;
+#line 223 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp11_ = _vala_marker;
+#line 223 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp9_ = _tmp11_ == JPEG_MARKER_EOI;
+#line 1939 "JfifSupport.c"
+ }
+#line 223 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (_tmp9_) {
+#line 225 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = 0;
+#line 225 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _g_object_unref0 (dins);
+#line 225 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (marker) {
+#line 225 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ *marker = _vala_marker;
+#line 1951 "JfifSupport.c"
+ }
+#line 225 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 1955 "JfifSupport.c"
+ }
+#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp12_ = dins;
+#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp13_ = g_data_input_stream_read_uint16 (_tmp12_, NULL, &_inner_error_);
+#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ length = _tmp13_;
+#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _g_object_unref0 (dins);
+#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return 0;
+#line 1971 "JfifSupport.c"
+ }
+#line 229 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp14_ = length;
+#line 229 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (((gint) _tmp14_) < 2) {
+#line 1977 "JfifSupport.c"
+ guint16 _tmp15_ = 0U;
+ GFileInputStream* _tmp16_ = NULL;
+ gint64 _tmp17_ = 0LL;
+#line 230 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp15_ = length;
+#line 230 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp16_ = fins;
+#line 230 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp17_ = G_FILE_INPUT_STREAM_GET_CLASS (_tmp16_)->tell (_tmp16_);
+#line 230 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ g_debug ("Invalid length %Xh at ofs %" G_GINT64_FORMAT "Xh", _tmp15_, _tmp17_ - 2);
+#line 232 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = -1;
+#line 232 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _g_object_unref0 (dins);
+#line 232 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (marker) {
+#line 232 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ *marker = _vala_marker;
+#line 1997 "JfifSupport.c"
+ }
+#line 232 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 2001 "JfifSupport.c"
+ }
+#line 236 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _tmp18_ = length;
+#line 236 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ result = _tmp18_ - 2;
+#line 236 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ _g_object_unref0 (dins);
+#line 236 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ if (marker) {
+#line 236 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ *marker = _vala_marker;
+#line 2013 "JfifSupport.c"
+ }
+#line 236 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala"
+ return result;
+#line 2017 "JfifSupport.c"
+}
+
+
+
diff --git a/src/photos/PhotoFileAdapter.c b/src/photos/PhotoFileAdapter.c
new file mode 100644
index 0000000..2f05603
--- /dev/null
+++ b/src/photos/PhotoFileAdapter.c
@@ -0,0 +1,1104 @@
+/* PhotoFileAdapter.c generated by valac 0.32.1, the Vala compiler
+ * generated from PhotoFileAdapter.vala, do not modify */
+
+/* Copyright 2016 Software Freedom Conservancy Inc.
+ *
+ * This software is licensed under the GNU Lesser General Public License
+ * (version 2.1 or later). See the COPYING file in this distribution.
+ */
+/**/
+/* PhotoFileAdapter*/
+/**/
+/* PhotoFileAdapter (and its immediate children, PhotoFileReader and PhotoFileWriter) are drivers*/
+/* hiding details of reading and writing image files and their metadata. They should keep*/
+/* minimal state beyond the filename, if any stat at all. In particular, they should avoid caching*/
+/* values, especially the readers, as writers may be created at any time and invalidate that*/
+/* information, unless the readers monitor the file for these changes.*/
+/**/
+/* PhotoFileAdapters should be entirely thread-safe. They are not, however, responsible for*/
+/* atomicity on the filesystem.*/
+/**/
+
+#include <glib.h>
+#include <glib-object.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gio/gio.h>
+#include <glib/gstdio.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gobject/gvaluecollector.h>
+
+
+#define TYPE_PHOTO_FILE_ADAPTER (photo_file_adapter_get_type ())
+#define PHOTO_FILE_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter))
+#define PHOTO_FILE_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapterClass))
+#define IS_PHOTO_FILE_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_ADAPTER))
+#define IS_PHOTO_FILE_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_ADAPTER))
+#define PHOTO_FILE_ADAPTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapterClass))
+
+typedef struct _PhotoFileAdapter PhotoFileAdapter;
+typedef struct _PhotoFileAdapterClass PhotoFileAdapterClass;
+typedef struct _PhotoFileAdapterPrivate PhotoFileAdapterPrivate;
+
+#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ())
+#define _g_free0(var) (var = (g_free (var), NULL))
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+typedef struct _ParamSpecPhotoFileAdapter ParamSpecPhotoFileAdapter;
+
+#define TYPE_PHOTO_FILE_READER (photo_file_reader_get_type ())
+#define PHOTO_FILE_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_READER, PhotoFileReader))
+#define PHOTO_FILE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_READER, PhotoFileReaderClass))
+#define IS_PHOTO_FILE_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_READER))
+#define IS_PHOTO_FILE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_READER))
+#define PHOTO_FILE_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_READER, PhotoFileReaderClass))
+
+typedef struct _PhotoFileReader PhotoFileReader;
+typedef struct _PhotoFileReaderClass PhotoFileReaderClass;
+typedef struct _PhotoFileReaderPrivate PhotoFileReaderPrivate;
+
+#define TYPE_MEDIA_METADATA (media_metadata_get_type ())
+#define MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_METADATA, MediaMetadata))
+#define MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_METADATA, MediaMetadataClass))
+#define IS_MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_METADATA))
+#define IS_MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_METADATA))
+#define MEDIA_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_METADATA, MediaMetadataClass))
+
+typedef struct _MediaMetadata MediaMetadata;
+typedef struct _MediaMetadataClass MediaMetadataClass;
+
+#define TYPE_PHOTO_METADATA (photo_metadata_get_type ())
+#define PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_METADATA, PhotoMetadata))
+#define PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_METADATA, PhotoMetadataClass))
+#define IS_PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_METADATA))
+#define IS_PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_METADATA))
+#define PHOTO_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_METADATA, PhotoMetadataClass))
+
+typedef struct _PhotoMetadata PhotoMetadata;
+typedef struct _PhotoMetadataClass PhotoMetadataClass;
+
+#define TYPE_DIMENSIONS (dimensions_get_type ())
+typedef struct _Dimensions Dimensions;
+
+#define TYPE_PHOTO_FILE_WRITER (photo_file_writer_get_type ())
+#define PHOTO_FILE_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_WRITER, PhotoFileWriter))
+#define PHOTO_FILE_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_WRITER, PhotoFileWriterClass))
+#define IS_PHOTO_FILE_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_WRITER))
+#define IS_PHOTO_FILE_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_WRITER))
+#define PHOTO_FILE_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_WRITER, PhotoFileWriterClass))
+
+typedef struct _PhotoFileWriter PhotoFileWriter;
+typedef struct _PhotoFileWriterClass PhotoFileWriterClass;
+#define _photo_file_adapter_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_adapter_unref (var), NULL)))
+
+#define TYPE_PHOTO_FILE_METADATA_WRITER (photo_file_metadata_writer_get_type ())
+#define PHOTO_FILE_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriter))
+#define PHOTO_FILE_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriterClass))
+#define IS_PHOTO_FILE_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_METADATA_WRITER))
+#define IS_PHOTO_FILE_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_METADATA_WRITER))
+#define PHOTO_FILE_METADATA_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriterClass))
+
+typedef struct _PhotoFileMetadataWriter PhotoFileMetadataWriter;
+typedef struct _PhotoFileMetadataWriterClass PhotoFileMetadataWriterClass;
+typedef struct _PhotoFileWriterPrivate PhotoFileWriterPrivate;
+
+#define JPEG_TYPE_QUALITY (jpeg_quality_get_type ())
+typedef struct _PhotoFileMetadataWriterPrivate PhotoFileMetadataWriterPrivate;
+
+struct _PhotoFileAdapter {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileAdapterPrivate * priv;
+};
+
+struct _PhotoFileAdapterClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileAdapter *self);
+};
+
+typedef enum {
+ PHOTO_FILE_FORMAT_JFIF,
+ PHOTO_FILE_FORMAT_RAW,
+ PHOTO_FILE_FORMAT_PNG,
+ PHOTO_FILE_FORMAT_TIFF,
+ PHOTO_FILE_FORMAT_BMP,
+ PHOTO_FILE_FORMAT_UNKNOWN
+} PhotoFileFormat;
+
+struct _PhotoFileAdapterPrivate {
+ gchar* filepath;
+ PhotoFileFormat file_format;
+ GFile* file;
+ GRecMutex __lock_file;
+};
+
+struct _ParamSpecPhotoFileAdapter {
+ GParamSpec parent_instance;
+};
+
+struct _Dimensions {
+ gint width;
+ gint height;
+};
+
+struct _PhotoFileReader {
+ PhotoFileAdapter parent_instance;
+ PhotoFileReaderPrivate * priv;
+};
+
+struct _PhotoFileReaderClass {
+ PhotoFileAdapterClass parent_class;
+ PhotoMetadata* (*read_metadata) (PhotoFileReader* self, GError** error);
+ GdkPixbuf* (*unscaled_read) (PhotoFileReader* self, GError** error);
+ GdkPixbuf* (*scaled_read) (PhotoFileReader* self, Dimensions* full, Dimensions* scaled, GError** error);
+};
+
+typedef enum {
+ PHOTO_FORMAT_ERROR_READ_ONLY
+} PhotoFormatError;
+#define PHOTO_FORMAT_ERROR photo_format_error_quark ()
+typedef enum {
+ JPEG_QUALITY_LOW = 50,
+ JPEG_QUALITY_MEDIUM = 75,
+ JPEG_QUALITY_HIGH = 90,
+ JPEG_QUALITY_MAXIMUM = 100
+} JpegQuality;
+
+struct _PhotoFileWriter {
+ PhotoFileAdapter parent_instance;
+ PhotoFileWriterPrivate * priv;
+};
+
+struct _PhotoFileWriterClass {
+ PhotoFileAdapterClass parent_class;
+ void (*write) (PhotoFileWriter* self, GdkPixbuf* pixbuf, JpegQuality quality, GError** error);
+};
+
+struct _PhotoFileMetadataWriter {
+ PhotoFileAdapter parent_instance;
+ PhotoFileMetadataWriterPrivate * priv;
+};
+
+struct _PhotoFileMetadataWriterClass {
+ PhotoFileAdapterClass parent_class;
+ void (*write_metadata) (PhotoFileMetadataWriter* self, PhotoMetadata* metadata, GError** error);
+};
+
+
+static gpointer photo_file_adapter_parent_class = NULL;
+static gpointer photo_file_reader_parent_class = NULL;
+static gpointer photo_file_writer_parent_class = NULL;
+static gpointer photo_file_metadata_writer_parent_class = NULL;
+
+gpointer photo_file_adapter_ref (gpointer instance);
+void photo_file_adapter_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_adapter (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_adapter (GValue* value, gpointer v_object);
+void value_take_photo_file_adapter (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_adapter (const GValue* value);
+GType photo_file_adapter_get_type (void) G_GNUC_CONST;
+GType photo_file_format_get_type (void) G_GNUC_CONST;
+#define PHOTO_FILE_ADAPTER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapterPrivate))
+enum {
+ PHOTO_FILE_ADAPTER_DUMMY_PROPERTY
+};
+PhotoFileAdapter* photo_file_adapter_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
+gboolean photo_file_adapter_file_exists (PhotoFileAdapter* self);
+gchar* photo_file_adapter_get_filepath (PhotoFileAdapter* self);
+GFile* photo_file_adapter_get_file (PhotoFileAdapter* self);
+PhotoFileFormat photo_file_adapter_get_file_format (PhotoFileAdapter* self);
+static void photo_file_adapter_finalize (PhotoFileAdapter* obj);
+GType photo_file_reader_get_type (void) G_GNUC_CONST;
+gpointer media_metadata_ref (gpointer instance);
+void media_metadata_unref (gpointer instance);
+GParamSpec* param_spec_media_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_media_metadata (GValue* value, gpointer v_object);
+void value_take_media_metadata (GValue* value, gpointer v_object);
+gpointer value_get_media_metadata (const GValue* value);
+GType media_metadata_get_type (void) G_GNUC_CONST;
+GType photo_metadata_get_type (void) G_GNUC_CONST;
+GType dimensions_get_type (void) G_GNUC_CONST;
+Dimensions* dimensions_dup (const Dimensions* self);
+void dimensions_free (Dimensions* self);
+enum {
+ PHOTO_FILE_READER_DUMMY_PROPERTY
+};
+PhotoFileReader* photo_file_reader_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
+GType photo_file_writer_get_type (void) G_GNUC_CONST;
+GQuark photo_format_error_quark (void);
+PhotoFileWriter* photo_file_reader_create_writer (PhotoFileReader* self, GError** error);
+PhotoFileWriter* photo_file_format_create_writer (PhotoFileFormat self, const gchar* filepath, GError** error);
+GType photo_file_metadata_writer_get_type (void) G_GNUC_CONST;
+PhotoFileMetadataWriter* photo_file_reader_create_metadata_writer (PhotoFileReader* self, GError** error);
+PhotoFileMetadataWriter* photo_file_format_create_metadata_writer (PhotoFileFormat self, const gchar* filepath, GError** error);
+PhotoMetadata* photo_file_reader_read_metadata (PhotoFileReader* self, GError** error);
+static PhotoMetadata* photo_file_reader_real_read_metadata (PhotoFileReader* self, GError** error);
+GdkPixbuf* photo_file_reader_unscaled_read (PhotoFileReader* self, GError** error);
+static GdkPixbuf* photo_file_reader_real_unscaled_read (PhotoFileReader* self, GError** error);
+GdkPixbuf* photo_file_reader_scaled_read (PhotoFileReader* self, Dimensions* full, Dimensions* scaled, GError** error);
+static GdkPixbuf* photo_file_reader_real_scaled_read (PhotoFileReader* self, Dimensions* full, Dimensions* scaled, GError** error);
+GdkPixbuf* resize_pixbuf (GdkPixbuf* pixbuf, Dimensions* resized, GdkInterpType interp);
+GType jpeg_quality_get_type (void) G_GNUC_CONST;
+enum {
+ PHOTO_FILE_WRITER_DUMMY_PROPERTY
+};
+PhotoFileWriter* photo_file_writer_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
+PhotoFileReader* photo_file_writer_create_reader (PhotoFileWriter* self);
+PhotoFileReader* photo_file_format_create_reader (PhotoFileFormat self, const gchar* filepath);
+void photo_file_writer_write (PhotoFileWriter* self, GdkPixbuf* pixbuf, JpegQuality quality, GError** error);
+static void photo_file_writer_real_write (PhotoFileWriter* self, GdkPixbuf* pixbuf, JpegQuality quality, GError** error);
+enum {
+ PHOTO_FILE_METADATA_WRITER_DUMMY_PROPERTY
+};
+PhotoFileMetadataWriter* photo_file_metadata_writer_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
+PhotoFileReader* photo_file_metadata_writer_create_reader (PhotoFileMetadataWriter* self);
+void photo_file_metadata_writer_write_metadata (PhotoFileMetadataWriter* self, PhotoMetadata* metadata, GError** error);
+static void photo_file_metadata_writer_real_write_metadata (PhotoFileMetadataWriter* self, PhotoMetadata* metadata, GError** error);
+
+
+PhotoFileAdapter* photo_file_adapter_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format) {
+ PhotoFileAdapter* self = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ PhotoFileFormat _tmp2_ = 0;
+#line 25 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 25 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ self = (PhotoFileAdapter*) g_type_create_instance (object_type);
+#line 26 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp0_ = filepath;
+#line 26 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 26 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _g_free0 (self->priv->filepath);
+#line 26 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ self->priv->filepath = _tmp1_;
+#line 27 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp2_ = file_format;
+#line 27 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ self->priv->file_format = _tmp2_;
+#line 25 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return self;
+#line 282 "PhotoFileAdapter.c"
+}
+
+
+gboolean photo_file_adapter_file_exists (PhotoFileAdapter* self) {
+ gboolean result = FALSE;
+ const gchar* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+#line 30 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_ADAPTER (self), FALSE);
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp0_ = self->priv->filepath;
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp1_ = g_file_test (_tmp0_, G_FILE_TEST_IS_REGULAR);
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ result = _tmp1_;
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return result;
+#line 300 "PhotoFileAdapter.c"
+}
+
+
+gchar* photo_file_adapter_get_filepath (PhotoFileAdapter* self) {
+ gchar* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+#line 34 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_ADAPTER (self), NULL);
+#line 35 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp0_ = self->priv->filepath;
+#line 35 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 35 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ result = _tmp1_;
+#line 35 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return result;
+#line 318 "PhotoFileAdapter.c"
+}
+
+
+static gpointer _g_object_ref0 (gpointer self) {
+#line 44 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return self ? g_object_ref (self) : NULL;
+#line 325 "PhotoFileAdapter.c"
+}
+
+
+GFile* photo_file_adapter_get_file (PhotoFileAdapter* self) {
+ GFile* result = NULL;
+ GFile* _result_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 38 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_ADAPTER (self), NULL);
+#line 335 "PhotoFileAdapter.c"
+ {
+ GFile* _tmp0_ = NULL;
+#line 40 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp0_ = self->priv->file;
+#line 40 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_rec_mutex_lock (&self->priv->__lock_file);
+#line 342 "PhotoFileAdapter.c"
+ {
+ GFile* _tmp1_ = NULL;
+ GFile* _tmp4_ = NULL;
+ GFile* _tmp5_ = NULL;
+#line 41 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp1_ = self->priv->file;
+#line 41 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ if (_tmp1_ == NULL) {
+#line 351 "PhotoFileAdapter.c"
+ const gchar* _tmp2_ = NULL;
+ GFile* _tmp3_ = NULL;
+#line 42 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp2_ = self->priv->filepath;
+#line 42 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp3_ = g_file_new_for_path (_tmp2_);
+#line 42 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _g_object_unref0 (self->priv->file);
+#line 42 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ self->priv->file = _tmp3_;
+#line 362 "PhotoFileAdapter.c"
+ }
+#line 44 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp4_ = self->priv->file;
+#line 44 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp5_ = _g_object_ref0 (_tmp4_);
+#line 44 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _g_object_unref0 (_result_);
+#line 44 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _result_ = _tmp5_;
+#line 372 "PhotoFileAdapter.c"
+ }
+ __finally22:
+ {
+ GFile* _tmp6_ = NULL;
+#line 40 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp6_ = self->priv->file;
+#line 40 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_file);
+#line 381 "PhotoFileAdapter.c"
+ }
+#line 40 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 40 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _g_object_unref0 (_result_);
+#line 40 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.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 40 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_clear_error (&_inner_error_);
+#line 40 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return NULL;
+#line 393 "PhotoFileAdapter.c"
+ }
+ }
+#line 47 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ result = _result_;
+#line 47 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return result;
+#line 400 "PhotoFileAdapter.c"
+}
+
+
+PhotoFileFormat photo_file_adapter_get_file_format (PhotoFileAdapter* self) {
+ PhotoFileFormat result = 0;
+ PhotoFileFormat _tmp0_ = 0;
+#line 50 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_ADAPTER (self), 0);
+#line 51 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp0_ = self->priv->file_format;
+#line 51 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ result = _tmp0_;
+#line 51 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return result;
+#line 415 "PhotoFileAdapter.c"
+}
+
+
+static void value_photo_file_adapter_init (GValue* value) {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ value->data[0].v_pointer = NULL;
+#line 422 "PhotoFileAdapter.c"
+}
+
+
+static void value_photo_file_adapter_free_value (GValue* value) {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ if (value->data[0].v_pointer) {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ photo_file_adapter_unref (value->data[0].v_pointer);
+#line 431 "PhotoFileAdapter.c"
+ }
+}
+
+
+static void value_photo_file_adapter_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ if (src_value->data[0].v_pointer) {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ dest_value->data[0].v_pointer = photo_file_adapter_ref (src_value->data[0].v_pointer);
+#line 441 "PhotoFileAdapter.c"
+ } else {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 445 "PhotoFileAdapter.c"
+ }
+}
+
+
+static gpointer value_photo_file_adapter_peek_pointer (const GValue* value) {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return value->data[0].v_pointer;
+#line 453 "PhotoFileAdapter.c"
+}
+
+
+static gchar* value_photo_file_adapter_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ if (collect_values[0].v_pointer) {
+#line 460 "PhotoFileAdapter.c"
+ PhotoFileAdapter* object;
+ object = collect_values[0].v_pointer;
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 467 "PhotoFileAdapter.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.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 471 "PhotoFileAdapter.c"
+ }
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ value->data[0].v_pointer = photo_file_adapter_ref (object);
+#line 475 "PhotoFileAdapter.c"
+ } else {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ value->data[0].v_pointer = NULL;
+#line 479 "PhotoFileAdapter.c"
+ }
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return NULL;
+#line 483 "PhotoFileAdapter.c"
+}
+
+
+static gchar* value_photo_file_adapter_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ PhotoFileAdapter** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ if (!object_p) {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 494 "PhotoFileAdapter.c"
+ }
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ if (!value->data[0].v_pointer) {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ *object_p = NULL;
+#line 500 "PhotoFileAdapter.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ *object_p = value->data[0].v_pointer;
+#line 504 "PhotoFileAdapter.c"
+ } else {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ *object_p = photo_file_adapter_ref (value->data[0].v_pointer);
+#line 508 "PhotoFileAdapter.c"
+ }
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return NULL;
+#line 512 "PhotoFileAdapter.c"
+}
+
+
+GParamSpec* param_spec_photo_file_adapter (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecPhotoFileAdapter* spec;
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_PHOTO_FILE_ADAPTER), NULL);
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return G_PARAM_SPEC (spec);
+#line 526 "PhotoFileAdapter.c"
+}
+
+
+gpointer value_get_photo_file_adapter (const GValue* value) {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PHOTO_FILE_ADAPTER), NULL);
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return value->data[0].v_pointer;
+#line 535 "PhotoFileAdapter.c"
+}
+
+
+void value_set_photo_file_adapter (GValue* value, gpointer v_object) {
+ PhotoFileAdapter* old;
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PHOTO_FILE_ADAPTER));
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ old = value->data[0].v_pointer;
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ if (v_object) {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PHOTO_FILE_ADAPTER));
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ value->data[0].v_pointer = v_object;
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ photo_file_adapter_ref (value->data[0].v_pointer);
+#line 555 "PhotoFileAdapter.c"
+ } else {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ value->data[0].v_pointer = NULL;
+#line 559 "PhotoFileAdapter.c"
+ }
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ if (old) {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ photo_file_adapter_unref (old);
+#line 565 "PhotoFileAdapter.c"
+ }
+}
+
+
+void value_take_photo_file_adapter (GValue* value, gpointer v_object) {
+ PhotoFileAdapter* old;
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PHOTO_FILE_ADAPTER));
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ old = value->data[0].v_pointer;
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ if (v_object) {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PHOTO_FILE_ADAPTER));
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ value->data[0].v_pointer = v_object;
+#line 584 "PhotoFileAdapter.c"
+ } else {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ value->data[0].v_pointer = NULL;
+#line 588 "PhotoFileAdapter.c"
+ }
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ if (old) {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ photo_file_adapter_unref (old);
+#line 594 "PhotoFileAdapter.c"
+ }
+}
+
+
+static void photo_file_adapter_class_init (PhotoFileAdapterClass * klass) {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ photo_file_adapter_parent_class = g_type_class_peek_parent (klass);
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ ((PhotoFileAdapterClass *) klass)->finalize = photo_file_adapter_finalize;
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_type_class_add_private (klass, sizeof (PhotoFileAdapterPrivate));
+#line 606 "PhotoFileAdapter.c"
+}
+
+
+static void photo_file_adapter_instance_init (PhotoFileAdapter * self) {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ self->priv = PHOTO_FILE_ADAPTER_GET_PRIVATE (self);
+#line 23 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_rec_mutex_init (&self->priv->__lock_file);
+#line 23 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ self->priv->file = NULL;
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ self->ref_count = 1;
+#line 619 "PhotoFileAdapter.c"
+}
+
+
+static void photo_file_adapter_finalize (PhotoFileAdapter* obj) {
+ PhotoFileAdapter * self;
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter);
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_signal_handlers_destroy (self);
+#line 21 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _g_free0 (self->priv->filepath);
+#line 23 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_rec_mutex_clear (&self->priv->__lock_file);
+#line 23 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _g_object_unref0 (self->priv->file);
+#line 635 "PhotoFileAdapter.c"
+}
+
+
+GType photo_file_adapter_get_type (void) {
+ static volatile gsize photo_file_adapter_type_id__volatile = 0;
+ if (g_once_init_enter (&photo_file_adapter_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_photo_file_adapter_init, value_photo_file_adapter_free_value, value_photo_file_adapter_copy_value, value_photo_file_adapter_peek_pointer, "p", value_photo_file_adapter_collect_value, "p", value_photo_file_adapter_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (PhotoFileAdapterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photo_file_adapter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotoFileAdapter), 0, (GInstanceInitFunc) photo_file_adapter_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 photo_file_adapter_type_id;
+ photo_file_adapter_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PhotoFileAdapter", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT);
+ g_once_init_leave (&photo_file_adapter_type_id__volatile, photo_file_adapter_type_id);
+ }
+ return photo_file_adapter_type_id__volatile;
+}
+
+
+gpointer photo_file_adapter_ref (gpointer instance) {
+ PhotoFileAdapter* self;
+ self = instance;
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return instance;
+#line 660 "PhotoFileAdapter.c"
+}
+
+
+void photo_file_adapter_unref (gpointer instance) {
+ PhotoFileAdapter* self;
+ self = instance;
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ PHOTO_FILE_ADAPTER_GET_CLASS (self)->finalize (self);
+#line 20 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 673 "PhotoFileAdapter.c"
+ }
+}
+
+
+PhotoFileReader* photo_file_reader_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format) {
+ PhotoFileReader* self = NULL;
+ const gchar* _tmp0_ = NULL;
+ PhotoFileFormat _tmp1_ = 0;
+#line 60 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp0_ = filepath;
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp1_ = file_format;
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ self = (PhotoFileReader*) photo_file_adapter_construct (object_type, _tmp0_, _tmp1_);
+#line 60 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return self;
+#line 692 "PhotoFileAdapter.c"
+}
+
+
+PhotoFileWriter* photo_file_reader_create_writer (PhotoFileReader* self, GError** error) {
+ PhotoFileWriter* result = NULL;
+ PhotoFileWriter* _tmp0_ = NULL;
+ PhotoFileFormat _tmp1_ = 0;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ PhotoFileWriter* _tmp4_ = NULL;
+ PhotoFileWriter* _tmp5_ = NULL;
+ PhotoFileWriter* _tmp6_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 64 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_READER (self), NULL);
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp1_ = photo_file_adapter_get_file_format (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp2_ = photo_file_adapter_get_filepath (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp3_ = _tmp2_;
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp4_ = photo_file_format_create_writer (_tmp1_, _tmp3_, &_inner_error_);
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp5_ = _tmp4_;
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _g_free0 (_tmp3_);
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp0_ = _tmp5_;
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ if (_inner_error_->domain == PHOTO_FORMAT_ERROR) {
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_propagate_error (error, _inner_error_);
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return NULL;
+#line 730 "PhotoFileAdapter.c"
+ } else {
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.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 65 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_clear_error (&_inner_error_);
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return NULL;
+#line 738 "PhotoFileAdapter.c"
+ }
+ }
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp6_ = _tmp0_;
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp0_ = NULL;
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ result = _tmp6_;
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _photo_file_adapter_unref0 (_tmp0_);
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return result;
+#line 751 "PhotoFileAdapter.c"
+}
+
+
+PhotoFileMetadataWriter* photo_file_reader_create_metadata_writer (PhotoFileReader* self, GError** error) {
+ PhotoFileMetadataWriter* result = NULL;
+ PhotoFileMetadataWriter* _tmp0_ = NULL;
+ PhotoFileFormat _tmp1_ = 0;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ PhotoFileMetadataWriter* _tmp4_ = NULL;
+ PhotoFileMetadataWriter* _tmp5_ = NULL;
+ PhotoFileMetadataWriter* _tmp6_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 68 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_READER (self), NULL);
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp1_ = photo_file_adapter_get_file_format (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp2_ = photo_file_adapter_get_filepath (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp3_ = _tmp2_;
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp4_ = photo_file_format_create_metadata_writer (_tmp1_, _tmp3_, &_inner_error_);
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp5_ = _tmp4_;
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _g_free0 (_tmp3_);
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp0_ = _tmp5_;
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ if (_inner_error_->domain == PHOTO_FORMAT_ERROR) {
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_propagate_error (error, _inner_error_);
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return NULL;
+#line 789 "PhotoFileAdapter.c"
+ } else {
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.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 69 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_clear_error (&_inner_error_);
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return NULL;
+#line 797 "PhotoFileAdapter.c"
+ }
+ }
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp6_ = _tmp0_;
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp0_ = NULL;
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ result = _tmp6_;
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _photo_file_adapter_unref0 (_tmp0_);
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return result;
+#line 810 "PhotoFileAdapter.c"
+}
+
+
+static PhotoMetadata* photo_file_reader_real_read_metadata (PhotoFileReader* self, GError** error) {
+#line 72 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_file_reader_read_metadata'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 72 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return NULL;
+#line 819 "PhotoFileAdapter.c"
+}
+
+
+PhotoMetadata* photo_file_reader_read_metadata (PhotoFileReader* self, GError** error) {
+#line 72 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_READER (self), NULL);
+#line 72 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return PHOTO_FILE_READER_GET_CLASS (self)->read_metadata (self, error);
+#line 828 "PhotoFileAdapter.c"
+}
+
+
+static GdkPixbuf* photo_file_reader_real_unscaled_read (PhotoFileReader* self, GError** error) {
+#line 74 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_file_reader_unscaled_read'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 74 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return NULL;
+#line 837 "PhotoFileAdapter.c"
+}
+
+
+GdkPixbuf* photo_file_reader_unscaled_read (PhotoFileReader* self, GError** error) {
+#line 74 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_READER (self), NULL);
+#line 74 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return PHOTO_FILE_READER_GET_CLASS (self)->unscaled_read (self, error);
+#line 846 "PhotoFileAdapter.c"
+}
+
+
+static GdkPixbuf* photo_file_reader_real_scaled_read (PhotoFileReader* self, Dimensions* full, Dimensions* scaled, GError** error) {
+ GdkPixbuf* result = NULL;
+ GdkPixbuf* _tmp0_ = NULL;
+ GdkPixbuf* _tmp1_ = NULL;
+ Dimensions _tmp2_ = {0};
+ GdkPixbuf* _tmp3_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 76 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_val_if_fail (full != NULL, NULL);
+#line 76 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_val_if_fail (scaled != NULL, NULL);
+#line 77 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp1_ = photo_file_reader_unscaled_read (self, &_inner_error_);
+#line 77 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp0_ = _tmp1_;
+#line 77 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 77 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_propagate_error (error, _inner_error_);
+#line 77 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return NULL;
+#line 871 "PhotoFileAdapter.c"
+ }
+#line 77 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp2_ = *scaled;
+#line 77 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp3_ = resize_pixbuf (_tmp0_, &_tmp2_, GDK_INTERP_BILINEAR);
+#line 77 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ result = _tmp3_;
+#line 77 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _g_object_unref0 (_tmp0_);
+#line 77 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return result;
+#line 883 "PhotoFileAdapter.c"
+}
+
+
+GdkPixbuf* photo_file_reader_scaled_read (PhotoFileReader* self, Dimensions* full, Dimensions* scaled, GError** error) {
+#line 76 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_READER (self), NULL);
+#line 76 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return PHOTO_FILE_READER_GET_CLASS (self)->scaled_read (self, full, scaled, error);
+#line 892 "PhotoFileAdapter.c"
+}
+
+
+static void photo_file_reader_class_init (PhotoFileReaderClass * klass) {
+#line 59 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ photo_file_reader_parent_class = g_type_class_peek_parent (klass);
+#line 59 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ ((PhotoFileReaderClass *) klass)->read_metadata = photo_file_reader_real_read_metadata;
+#line 59 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ ((PhotoFileReaderClass *) klass)->unscaled_read = photo_file_reader_real_unscaled_read;
+#line 59 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ ((PhotoFileReaderClass *) klass)->scaled_read = photo_file_reader_real_scaled_read;
+#line 905 "PhotoFileAdapter.c"
+}
+
+
+static void photo_file_reader_instance_init (PhotoFileReader * self) {
+}
+
+
+GType photo_file_reader_get_type (void) {
+ static volatile gsize photo_file_reader_type_id__volatile = 0;
+ if (g_once_init_enter (&photo_file_reader_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PhotoFileReaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photo_file_reader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotoFileReader), 0, (GInstanceInitFunc) photo_file_reader_instance_init, NULL };
+ GType photo_file_reader_type_id;
+ photo_file_reader_type_id = g_type_register_static (TYPE_PHOTO_FILE_ADAPTER, "PhotoFileReader", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
+ g_once_init_leave (&photo_file_reader_type_id__volatile, photo_file_reader_type_id);
+ }
+ return photo_file_reader_type_id__volatile;
+}
+
+
+PhotoFileWriter* photo_file_writer_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format) {
+ PhotoFileWriter* self = NULL;
+ const gchar* _tmp0_ = NULL;
+ PhotoFileFormat _tmp1_ = 0;
+#line 86 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 87 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp0_ = filepath;
+#line 87 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp1_ = file_format;
+#line 87 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ self = (PhotoFileWriter*) photo_file_adapter_construct (object_type, _tmp0_, _tmp1_);
+#line 86 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return self;
+#line 939 "PhotoFileAdapter.c"
+}
+
+
+PhotoFileReader* photo_file_writer_create_reader (PhotoFileWriter* self) {
+ PhotoFileReader* result = NULL;
+ PhotoFileFormat _tmp0_ = 0;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ PhotoFileReader* _tmp3_ = NULL;
+ PhotoFileReader* _tmp4_ = NULL;
+#line 90 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_WRITER (self), NULL);
+#line 91 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp0_ = photo_file_adapter_get_file_format (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 91 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp1_ = photo_file_adapter_get_filepath (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 91 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp2_ = _tmp1_;
+#line 91 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp3_ = photo_file_format_create_reader (_tmp0_, _tmp2_);
+#line 91 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp4_ = _tmp3_;
+#line 91 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _g_free0 (_tmp2_);
+#line 91 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ result = _tmp4_;
+#line 91 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return result;
+#line 968 "PhotoFileAdapter.c"
+}
+
+
+static void photo_file_writer_real_write (PhotoFileWriter* self, GdkPixbuf* pixbuf, JpegQuality quality, GError** error) {
+#line 94 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_file_writer_write'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 94 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return;
+#line 977 "PhotoFileAdapter.c"
+}
+
+
+void photo_file_writer_write (PhotoFileWriter* self, GdkPixbuf* pixbuf, JpegQuality quality, GError** error) {
+#line 94 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_if_fail (IS_PHOTO_FILE_WRITER (self));
+#line 94 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ PHOTO_FILE_WRITER_GET_CLASS (self)->write (self, pixbuf, quality, error);
+#line 986 "PhotoFileAdapter.c"
+}
+
+
+static void photo_file_writer_class_init (PhotoFileWriterClass * klass) {
+#line 85 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ photo_file_writer_parent_class = g_type_class_peek_parent (klass);
+#line 85 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ ((PhotoFileWriterClass *) klass)->write = photo_file_writer_real_write;
+#line 995 "PhotoFileAdapter.c"
+}
+
+
+static void photo_file_writer_instance_init (PhotoFileWriter * self) {
+}
+
+
+GType photo_file_writer_get_type (void) {
+ static volatile gsize photo_file_writer_type_id__volatile = 0;
+ if (g_once_init_enter (&photo_file_writer_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PhotoFileWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photo_file_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotoFileWriter), 0, (GInstanceInitFunc) photo_file_writer_instance_init, NULL };
+ GType photo_file_writer_type_id;
+ photo_file_writer_type_id = g_type_register_static (TYPE_PHOTO_FILE_ADAPTER, "PhotoFileWriter", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
+ g_once_init_leave (&photo_file_writer_type_id__volatile, photo_file_writer_type_id);
+ }
+ return photo_file_writer_type_id__volatile;
+}
+
+
+PhotoFileMetadataWriter* photo_file_metadata_writer_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format) {
+ PhotoFileMetadataWriter* self = NULL;
+ const gchar* _tmp0_ = NULL;
+ PhotoFileFormat _tmp1_ = 0;
+#line 102 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 103 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp0_ = filepath;
+#line 103 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp1_ = file_format;
+#line 103 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ self = (PhotoFileMetadataWriter*) photo_file_adapter_construct (object_type, _tmp0_, _tmp1_);
+#line 102 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return self;
+#line 1029 "PhotoFileAdapter.c"
+}
+
+
+PhotoFileReader* photo_file_metadata_writer_create_reader (PhotoFileMetadataWriter* self) {
+ PhotoFileReader* result = NULL;
+ PhotoFileFormat _tmp0_ = 0;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ PhotoFileReader* _tmp3_ = NULL;
+ PhotoFileReader* _tmp4_ = NULL;
+#line 106 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_METADATA_WRITER (self), NULL);
+#line 107 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp0_ = photo_file_adapter_get_file_format (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 107 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp1_ = photo_file_adapter_get_filepath (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 107 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp2_ = _tmp1_;
+#line 107 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp3_ = photo_file_format_create_reader (_tmp0_, _tmp2_);
+#line 107 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _tmp4_ = _tmp3_;
+#line 107 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ _g_free0 (_tmp2_);
+#line 107 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ result = _tmp4_;
+#line 107 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return result;
+#line 1058 "PhotoFileAdapter.c"
+}
+
+
+static void photo_file_metadata_writer_real_write_metadata (PhotoFileMetadataWriter* self, PhotoMetadata* metadata, GError** error) {
+#line 110 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_file_metadata_writer_write_metadata'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 110 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ return;
+#line 1067 "PhotoFileAdapter.c"
+}
+
+
+void photo_file_metadata_writer_write_metadata (PhotoFileMetadataWriter* self, PhotoMetadata* metadata, GError** error) {
+#line 110 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ g_return_if_fail (IS_PHOTO_FILE_METADATA_WRITER (self));
+#line 110 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ PHOTO_FILE_METADATA_WRITER_GET_CLASS (self)->write_metadata (self, metadata, error);
+#line 1076 "PhotoFileAdapter.c"
+}
+
+
+static void photo_file_metadata_writer_class_init (PhotoFileMetadataWriterClass * klass) {
+#line 101 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ photo_file_metadata_writer_parent_class = g_type_class_peek_parent (klass);
+#line 101 "/home/jens/Source/shotwell/src/photos/PhotoFileAdapter.vala"
+ ((PhotoFileMetadataWriterClass *) klass)->write_metadata = photo_file_metadata_writer_real_write_metadata;
+#line 1085 "PhotoFileAdapter.c"
+}
+
+
+static void photo_file_metadata_writer_instance_init (PhotoFileMetadataWriter * self) {
+}
+
+
+GType photo_file_metadata_writer_get_type (void) {
+ static volatile gsize photo_file_metadata_writer_type_id__volatile = 0;
+ if (g_once_init_enter (&photo_file_metadata_writer_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PhotoFileMetadataWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photo_file_metadata_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotoFileMetadataWriter), 0, (GInstanceInitFunc) photo_file_metadata_writer_instance_init, NULL };
+ GType photo_file_metadata_writer_type_id;
+ photo_file_metadata_writer_type_id = g_type_register_static (TYPE_PHOTO_FILE_ADAPTER, "PhotoFileMetadataWriter", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
+ g_once_init_leave (&photo_file_metadata_writer_type_id__volatile, photo_file_metadata_writer_type_id);
+ }
+ return photo_file_metadata_writer_type_id__volatile;
+}
+
+
+
diff --git a/src/photos/PhotoFileFormat.c b/src/photos/PhotoFileFormat.c
new file mode 100644
index 0000000..6e05342
--- /dev/null
+++ b/src/photos/PhotoFileFormat.c
@@ -0,0 +1,3277 @@
+/* PhotoFileFormat.c generated by valac 0.32.1, the Vala compiler
+ * generated from PhotoFileFormat.vala, do not modify */
+
+/* Copyright 2016 Software Freedom Conservancy Inc.
+ *
+ * This software is licensed under the GNU Lesser General Public License
+ * (version 2.1 or later). See the COPYING file in this distribution.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gio/gio.h>
+#include <gphoto2/gphoto2-file.h>
+#include <gobject/gvaluecollector.h>
+
+
+#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ())
+#define _g_free0(var) (var = (g_free (var), NULL))
+
+#define TYPE_PHOTO_FILE_FORMAT_DRIVER (photo_file_format_driver_get_type ())
+#define PHOTO_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriver))
+#define PHOTO_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriverClass))
+#define IS_PHOTO_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_FORMAT_DRIVER))
+#define IS_PHOTO_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_FORMAT_DRIVER))
+#define PHOTO_FILE_FORMAT_DRIVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriverClass))
+
+typedef struct _PhotoFileFormatDriver PhotoFileFormatDriver;
+typedef struct _PhotoFileFormatDriverClass PhotoFileFormatDriverClass;
+
+#define TYPE_PHOTO_FILE_FORMAT_PROPERTIES (photo_file_format_properties_get_type ())
+#define PHOTO_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatProperties))
+#define PHOTO_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatPropertiesClass))
+#define IS_PHOTO_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES))
+#define IS_PHOTO_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_FORMAT_PROPERTIES))
+#define PHOTO_FILE_FORMAT_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatPropertiesClass))
+
+typedef struct _PhotoFileFormatProperties PhotoFileFormatProperties;
+typedef struct _PhotoFileFormatPropertiesClass PhotoFileFormatPropertiesClass;
+#define _photo_file_format_properties_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_format_properties_unref (var), NULL)))
+#define _photo_file_format_driver_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_format_driver_unref (var), NULL)))
+
+#define TYPE_JFIF_FILE_FORMAT_DRIVER (jfif_file_format_driver_get_type ())
+#define JFIF_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_JFIF_FILE_FORMAT_DRIVER, JfifFileFormatDriver))
+#define JFIF_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_JFIF_FILE_FORMAT_DRIVER, JfifFileFormatDriverClass))
+#define IS_JFIF_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_JFIF_FILE_FORMAT_DRIVER))
+#define IS_JFIF_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_JFIF_FILE_FORMAT_DRIVER))
+#define JFIF_FILE_FORMAT_DRIVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_JFIF_FILE_FORMAT_DRIVER, JfifFileFormatDriverClass))
+
+typedef struct _JfifFileFormatDriver JfifFileFormatDriver;
+typedef struct _JfifFileFormatDriverClass JfifFileFormatDriverClass;
+
+#define TYPE_RAW_FILE_FORMAT_DRIVER (raw_file_format_driver_get_type ())
+#define RAW_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RAW_FILE_FORMAT_DRIVER, RawFileFormatDriver))
+#define RAW_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RAW_FILE_FORMAT_DRIVER, RawFileFormatDriverClass))
+#define IS_RAW_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RAW_FILE_FORMAT_DRIVER))
+#define IS_RAW_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RAW_FILE_FORMAT_DRIVER))
+#define RAW_FILE_FORMAT_DRIVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RAW_FILE_FORMAT_DRIVER, RawFileFormatDriverClass))
+
+typedef struct _RawFileFormatDriver RawFileFormatDriver;
+typedef struct _RawFileFormatDriverClass RawFileFormatDriverClass;
+
+#define TYPE_PNG_FILE_FORMAT_DRIVER (png_file_format_driver_get_type ())
+#define PNG_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PNG_FILE_FORMAT_DRIVER, PngFileFormatDriver))
+#define PNG_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PNG_FILE_FORMAT_DRIVER, PngFileFormatDriverClass))
+#define IS_PNG_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PNG_FILE_FORMAT_DRIVER))
+#define IS_PNG_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PNG_FILE_FORMAT_DRIVER))
+#define PNG_FILE_FORMAT_DRIVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PNG_FILE_FORMAT_DRIVER, PngFileFormatDriverClass))
+
+typedef struct _PngFileFormatDriver PngFileFormatDriver;
+typedef struct _PngFileFormatDriverClass PngFileFormatDriverClass;
+
+#define PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER (photos_tiff_file_format_driver_get_type ())
+#define PHOTOS_TIFF_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER, PhotosTiffFileFormatDriver))
+#define PHOTOS_TIFF_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER, PhotosTiffFileFormatDriverClass))
+#define PHOTOS_IS_TIFF_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER))
+#define PHOTOS_IS_TIFF_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER))
+#define PHOTOS_TIFF_FILE_FORMAT_DRIVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER, PhotosTiffFileFormatDriverClass))
+
+typedef struct _PhotosTiffFileFormatDriver PhotosTiffFileFormatDriver;
+typedef struct _PhotosTiffFileFormatDriverClass PhotosTiffFileFormatDriverClass;
+
+#define PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER (photos_bmp_file_format_driver_get_type ())
+#define PHOTOS_BMP_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER, PhotosBmpFileFormatDriver))
+#define PHOTOS_BMP_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER, PhotosBmpFileFormatDriverClass))
+#define PHOTOS_IS_BMP_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER))
+#define PHOTOS_IS_BMP_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER))
+#define PHOTOS_BMP_FILE_FORMAT_DRIVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOTOS_TYPE_BMP_FILE_FORMAT_DRIVER, PhotosBmpFileFormatDriverClass))
+
+typedef struct _PhotosBmpFileFormatDriver PhotosBmpFileFormatDriver;
+typedef struct _PhotosBmpFileFormatDriverClass PhotosBmpFileFormatDriverClass;
+
+#define TYPE_PHOTO_FILE_ADAPTER (photo_file_adapter_get_type ())
+#define PHOTO_FILE_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter))
+#define PHOTO_FILE_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapterClass))
+#define IS_PHOTO_FILE_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_ADAPTER))
+#define IS_PHOTO_FILE_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_ADAPTER))
+#define PHOTO_FILE_ADAPTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapterClass))
+
+typedef struct _PhotoFileAdapter PhotoFileAdapter;
+typedef struct _PhotoFileAdapterClass PhotoFileAdapterClass;
+
+#define TYPE_PHOTO_FILE_READER (photo_file_reader_get_type ())
+#define PHOTO_FILE_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_READER, PhotoFileReader))
+#define PHOTO_FILE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_READER, PhotoFileReaderClass))
+#define IS_PHOTO_FILE_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_READER))
+#define IS_PHOTO_FILE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_READER))
+#define PHOTO_FILE_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_READER, PhotoFileReaderClass))
+
+typedef struct _PhotoFileReader PhotoFileReader;
+typedef struct _PhotoFileReaderClass PhotoFileReaderClass;
+
+#define TYPE_PHOTO_FILE_WRITER (photo_file_writer_get_type ())
+#define PHOTO_FILE_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_WRITER, PhotoFileWriter))
+#define PHOTO_FILE_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_WRITER, PhotoFileWriterClass))
+#define IS_PHOTO_FILE_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_WRITER))
+#define IS_PHOTO_FILE_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_WRITER))
+#define PHOTO_FILE_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_WRITER, PhotoFileWriterClass))
+
+typedef struct _PhotoFileWriter PhotoFileWriter;
+typedef struct _PhotoFileWriterClass PhotoFileWriterClass;
+#define _photo_file_adapter_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_adapter_unref (var), NULL)))
+
+#define TYPE_PHOTO_FILE_METADATA_WRITER (photo_file_metadata_writer_get_type ())
+#define PHOTO_FILE_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriter))
+#define PHOTO_FILE_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriterClass))
+#define IS_PHOTO_FILE_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_METADATA_WRITER))
+#define IS_PHOTO_FILE_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_METADATA_WRITER))
+#define PHOTO_FILE_METADATA_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriterClass))
+
+typedef struct _PhotoFileMetadataWriter PhotoFileMetadataWriter;
+typedef struct _PhotoFileMetadataWriterClass PhotoFileMetadataWriterClass;
+
+#define PHOTO_FILE_SNIFFER_TYPE_OPTIONS (photo_file_sniffer_options_get_type ())
+
+#define TYPE_PHOTO_FILE_SNIFFER (photo_file_sniffer_get_type ())
+#define PHOTO_FILE_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer))
+#define PHOTO_FILE_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSnifferClass))
+#define IS_PHOTO_FILE_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_SNIFFER))
+#define IS_PHOTO_FILE_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_SNIFFER))
+#define PHOTO_FILE_SNIFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSnifferClass))
+
+typedef struct _PhotoFileSniffer PhotoFileSniffer;
+typedef struct _PhotoFileSnifferClass PhotoFileSnifferClass;
+
+#define TYPE_MEDIA_METADATA (media_metadata_get_type ())
+#define MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_METADATA, MediaMetadata))
+#define MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_METADATA, MediaMetadataClass))
+#define IS_MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_METADATA))
+#define IS_MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_METADATA))
+#define MEDIA_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_METADATA, MediaMetadataClass))
+
+typedef struct _MediaMetadata MediaMetadata;
+typedef struct _MediaMetadataClass MediaMetadataClass;
+
+#define TYPE_PHOTO_METADATA (photo_metadata_get_type ())
+#define PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_METADATA, PhotoMetadata))
+#define PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_METADATA, PhotoMetadataClass))
+#define IS_PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_METADATA))
+#define IS_PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_METADATA))
+#define PHOTO_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_METADATA, PhotoMetadataClass))
+
+typedef struct _PhotoMetadata PhotoMetadata;
+typedef struct _PhotoMetadataClass PhotoMetadataClass;
+typedef struct _PhotoFileFormatDriverPrivate PhotoFileFormatDriverPrivate;
+typedef struct _ParamSpecPhotoFileFormatDriver ParamSpecPhotoFileFormatDriver;
+
+#define TYPE_PHOTO_FILE_FORMAT_FLAGS (photo_file_format_flags_get_type ())
+typedef struct _PhotoFileFormatPropertiesPrivate PhotoFileFormatPropertiesPrivate;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+typedef struct _ParamSpecPhotoFileFormatProperties ParamSpecPhotoFileFormatProperties;
+
+typedef enum {
+ PHOTO_FORMAT_ERROR_READ_ONLY
+} PhotoFormatError;
+#define PHOTO_FORMAT_ERROR photo_format_error_quark ()
+typedef enum {
+ PHOTO_FILE_FORMAT_JFIF,
+ PHOTO_FILE_FORMAT_RAW,
+ PHOTO_FILE_FORMAT_PNG,
+ PHOTO_FILE_FORMAT_TIFF,
+ PHOTO_FILE_FORMAT_BMP,
+ PHOTO_FILE_FORMAT_UNKNOWN
+} PhotoFileFormat;
+
+typedef gboolean (*PhotoFileFormatDataApplicableTest) (PhotoFileFormat format, void* user_data);
+typedef enum {
+ PHOTO_FILE_SNIFFER_OPTIONS_GET_ALL = 0x00000000,
+ PHOTO_FILE_SNIFFER_OPTIONS_NO_MD5 = 0x00000001
+} PhotoFileSnifferOptions;
+
+struct _PhotoFileFormatDriver {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileFormatDriverPrivate * priv;
+};
+
+struct _PhotoFileFormatDriverClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileFormatDriver *self);
+ PhotoFileFormatProperties* (*get_properties) (PhotoFileFormatDriver* self);
+ PhotoFileReader* (*create_reader) (PhotoFileFormatDriver* self, const gchar* filepath);
+ PhotoMetadata* (*create_metadata) (PhotoFileFormatDriver* self);
+ gboolean (*can_write_image) (PhotoFileFormatDriver* self);
+ gboolean (*can_write_metadata) (PhotoFileFormatDriver* self);
+ PhotoFileWriter* (*create_writer) (PhotoFileFormatDriver* self, const gchar* filepath);
+ PhotoFileMetadataWriter* (*create_metadata_writer) (PhotoFileFormatDriver* self, const gchar* filepath);
+ PhotoFileSniffer* (*create_sniffer) (PhotoFileFormatDriver* self, GFile* file, PhotoFileSnifferOptions options);
+};
+
+struct _ParamSpecPhotoFileFormatDriver {
+ GParamSpec parent_instance;
+};
+
+typedef enum {
+ PHOTO_FILE_FORMAT_FLAGS_NONE = 0x00000000
+} PhotoFileFormatFlags;
+
+struct _PhotoFileFormatProperties {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileFormatPropertiesPrivate * priv;
+};
+
+struct _PhotoFileFormatPropertiesClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileFormatProperties *self);
+ PhotoFileFormat (*get_file_format) (PhotoFileFormatProperties* self);
+ PhotoFileFormatFlags (*get_flags) (PhotoFileFormatProperties* self);
+ gboolean (*is_recognized_extension) (PhotoFileFormatProperties* self, const gchar* ext);
+ gchar* (*get_default_extension) (PhotoFileFormatProperties* self);
+ gchar** (*get_known_extensions) (PhotoFileFormatProperties* self, int* result_length1);
+ gchar* (*get_default_mime_type) (PhotoFileFormatProperties* self);
+ gchar** (*get_mime_types) (PhotoFileFormatProperties* self, int* result_length1);
+ gchar* (*get_user_visible_name) (PhotoFileFormatProperties* self);
+};
+
+struct _ParamSpecPhotoFileFormatProperties {
+ GParamSpec parent_instance;
+};
+
+
+extern PhotoFileFormat* photo_file_format_data_writeable;
+extern gint photo_file_format_data_writeable_length1;
+PhotoFileFormat* photo_file_format_data_writeable = NULL;
+gint photo_file_format_data_writeable_length1 = 0;
+static gint _photo_file_format_data_writeable_size_ = 0;
+extern PhotoFileFormat* photo_file_format_data_image_writeable;
+extern gint photo_file_format_data_image_writeable_length1;
+PhotoFileFormat* photo_file_format_data_image_writeable = NULL;
+gint photo_file_format_data_image_writeable_length1 = 0;
+static gint _photo_file_format_data_image_writeable_size_ = 0;
+extern PhotoFileFormat* photo_file_format_data_metadata_writeable;
+extern gint photo_file_format_data_metadata_writeable_length1;
+PhotoFileFormat* photo_file_format_data_metadata_writeable = NULL;
+gint photo_file_format_data_metadata_writeable_length1 = 0;
+static gint _photo_file_format_data_metadata_writeable_size_ = 0;
+static gpointer photo_file_format_driver_parent_class = NULL;
+static gpointer photo_file_format_properties_parent_class = NULL;
+
+GQuark photo_format_error_quark (void);
+GType photo_file_format_get_type (void) G_GNUC_CONST;
+PhotoFileFormat* photo_file_format_data_find_applicable (PhotoFileFormatDataApplicableTest test, void* test_target, int* result_length1);
+PhotoFileFormat* photo_file_format_get_supported (int* result_length1);
+static void _vala_array_add43 (PhotoFileFormat** array, int* length, int* size, PhotoFileFormat value);
+PhotoFileFormat* photo_file_format_data_get_writeable (int* result_length1);
+static gboolean ___lambda4_ (PhotoFileFormat format);
+gboolean photo_file_format_can_write (PhotoFileFormat self);
+static gboolean ____lambda4__photo_file_format_data_applicable_test (PhotoFileFormat format, gpointer self);
+static PhotoFileFormat* _vala_array_dup1 (PhotoFileFormat* self, int length);
+PhotoFileFormat* photo_file_format_data_get_image_writeable (int* result_length1);
+static gboolean ___lambda22_ (PhotoFileFormat format);
+gboolean photo_file_format_can_write_image (PhotoFileFormat self);
+static gboolean ____lambda22__photo_file_format_data_applicable_test (PhotoFileFormat format, gpointer self);
+static PhotoFileFormat* _vala_array_dup2 (PhotoFileFormat* self, int length);
+PhotoFileFormat* photo_file_format_data_get_metadata_writeable (int* result_length1);
+static gboolean ___lambda23_ (PhotoFileFormat format);
+gboolean photo_file_format_can_write_metadata (PhotoFileFormat self);
+static gboolean ____lambda23__photo_file_format_data_applicable_test (PhotoFileFormat format, gpointer self);
+static PhotoFileFormat* _vala_array_dup3 (PhotoFileFormat* self, int length);
+PhotoFileFormat* photo_file_format_get_writeable (int* result_length1);
+PhotoFileFormat* photo_file_format_get_image_writeable (int* result_length1);
+PhotoFileFormat* photo_file_format_get_metadata_writeable (int* result_length1);
+PhotoFileFormat photo_file_format_get_by_basename_extension (const gchar* basename);
+void disassemble_filename (const gchar* basename, gchar** name, gchar** ext);
+gboolean is_string_empty (const gchar* s);
+gpointer photo_file_format_driver_ref (gpointer instance);
+void photo_file_format_driver_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_format_driver (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_format_driver (GValue* value, gpointer v_object);
+void value_take_photo_file_format_driver (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_format_driver (const GValue* value);
+GType photo_file_format_driver_get_type (void) G_GNUC_CONST;
+static PhotoFileFormatDriver* photo_file_format_get_driver (PhotoFileFormat self);
+gpointer photo_file_format_properties_ref (gpointer instance);
+void photo_file_format_properties_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_format_properties (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_format_properties (GValue* value, gpointer v_object);
+void value_take_photo_file_format_properties (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_format_properties (const GValue* value);
+GType photo_file_format_properties_get_type (void) G_GNUC_CONST;
+PhotoFileFormatProperties* photo_file_format_driver_get_properties (PhotoFileFormatDriver* self);
+gboolean photo_file_format_properties_is_recognized_extension (PhotoFileFormatProperties* self, const gchar* ext);
+gboolean photo_file_format_is_file_supported (GFile* file);
+gboolean photo_file_format_is_basename_supported (const gchar* basename);
+PhotoFileFormat photo_file_format_get_system_default_format (void);
+PhotoFileFormat photo_file_format_get_by_file_extension (GFile* file);
+gint photo_file_format_serialize (PhotoFileFormat self);
+PhotoFileFormat photo_file_format_unserialize (gint value);
+PhotoFileFormat photo_file_format_from_gphoto_type (const gchar* type);
+PhotoFileFormat photo_file_format_from_pixbuf_name (const gchar* name);
+void photo_file_format_init (PhotoFileFormat self);
+void jfif_file_format_driver_init (void);
+void raw_file_format_driver_init (void);
+void png_file_format_driver_init (void);
+void photos_tiff_file_format_driver_init (void);
+void photos_bmp_file_format_driver_init (void);
+const gchar* photo_file_format_to_string (PhotoFileFormat self);
+GType jfif_file_format_driver_get_type (void) G_GNUC_CONST;
+JfifFileFormatDriver* jfif_file_format_driver_get_instance (void);
+GType raw_file_format_driver_get_type (void) G_GNUC_CONST;
+RawFileFormatDriver* raw_file_format_driver_get_instance (void);
+GType png_file_format_driver_get_type (void) G_GNUC_CONST;
+PngFileFormatDriver* png_file_format_driver_get_instance (void);
+GType photos_tiff_file_format_driver_get_type (void) G_GNUC_CONST;
+PhotosTiffFileFormatDriver* photos_tiff_file_format_driver_get_instance (void);
+GType photos_bmp_file_format_driver_get_type (void) G_GNUC_CONST;
+PhotosBmpFileFormatDriver* photos_bmp_file_format_driver_get_instance (void);
+PhotoFileFormatProperties* photo_file_format_get_properties (PhotoFileFormat self);
+gchar* photo_file_format_get_default_basename (PhotoFileFormat self, const gchar* name);
+gchar* photo_file_format_properties_get_default_extension (PhotoFileFormatProperties* self);
+gpointer photo_file_adapter_ref (gpointer instance);
+void photo_file_adapter_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_adapter (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_adapter (GValue* value, gpointer v_object);
+void value_take_photo_file_adapter (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_adapter (const GValue* value);
+GType photo_file_adapter_get_type (void) G_GNUC_CONST;
+GType photo_file_reader_get_type (void) G_GNUC_CONST;
+PhotoFileReader* photo_file_format_create_reader (PhotoFileFormat self, const gchar* filepath);
+PhotoFileReader* photo_file_format_driver_create_reader (PhotoFileFormatDriver* self, const gchar* filepath);
+gboolean photo_file_format_driver_can_write_image (PhotoFileFormatDriver* self);
+gboolean photo_file_format_driver_can_write_metadata (PhotoFileFormatDriver* self);
+GType photo_file_writer_get_type (void) G_GNUC_CONST;
+PhotoFileWriter* photo_file_format_create_writer (PhotoFileFormat self, const gchar* filepath, GError** error);
+PhotoFileWriter* photo_file_format_driver_create_writer (PhotoFileFormatDriver* self, const gchar* filepath);
+GType photo_file_metadata_writer_get_type (void) G_GNUC_CONST;
+PhotoFileMetadataWriter* photo_file_format_create_metadata_writer (PhotoFileFormat self, const gchar* filepath, GError** error);
+PhotoFileMetadataWriter* photo_file_format_driver_create_metadata_writer (PhotoFileFormatDriver* self, const gchar* filepath);
+GType photo_file_sniffer_options_get_type (void) G_GNUC_CONST;
+gpointer photo_file_sniffer_ref (gpointer instance);
+void photo_file_sniffer_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_sniffer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_sniffer (GValue* value, gpointer v_object);
+void value_take_photo_file_sniffer (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_sniffer (const GValue* value);
+GType photo_file_sniffer_get_type (void) G_GNUC_CONST;
+PhotoFileSniffer* photo_file_format_create_sniffer (PhotoFileFormat self, GFile* file, PhotoFileSnifferOptions options);
+PhotoFileSniffer* photo_file_format_driver_create_sniffer (PhotoFileFormatDriver* self, GFile* file, PhotoFileSnifferOptions options);
+gpointer media_metadata_ref (gpointer instance);
+void media_metadata_unref (gpointer instance);
+GParamSpec* param_spec_media_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_media_metadata (GValue* value, gpointer v_object);
+void value_take_media_metadata (GValue* value, gpointer v_object);
+gpointer value_get_media_metadata (const GValue* value);
+GType media_metadata_get_type (void) G_GNUC_CONST;
+GType photo_metadata_get_type (void) G_GNUC_CONST;
+PhotoMetadata* photo_file_format_create_metadata (PhotoFileFormat self);
+PhotoMetadata* photo_file_format_driver_create_metadata (PhotoFileFormatDriver* self);
+gchar* photo_file_format_get_default_mime_type (PhotoFileFormat self);
+gchar* photo_file_format_properties_get_default_mime_type (PhotoFileFormatProperties* self);
+gchar** photo_file_format_get_mime_types (PhotoFileFormat self, int* result_length1);
+gchar** photo_file_format_properties_get_mime_types (PhotoFileFormatProperties* self, int* result_length1);
+gchar** photo_file_format_get_editable_mime_types (int* result_length1);
+static void _vala_array_add44 (gchar*** array, int* length, int* size, gchar* value);
+enum {
+ PHOTO_FILE_FORMAT_DRIVER_DUMMY_PROPERTY
+};
+static PhotoFileFormatProperties* photo_file_format_driver_real_get_properties (PhotoFileFormatDriver* self);
+static PhotoFileReader* photo_file_format_driver_real_create_reader (PhotoFileFormatDriver* self, const gchar* filepath);
+static PhotoMetadata* photo_file_format_driver_real_create_metadata (PhotoFileFormatDriver* self);
+static gboolean photo_file_format_driver_real_can_write_image (PhotoFileFormatDriver* self);
+static gboolean photo_file_format_driver_real_can_write_metadata (PhotoFileFormatDriver* self);
+static PhotoFileWriter* photo_file_format_driver_real_create_writer (PhotoFileFormatDriver* self, const gchar* filepath);
+static PhotoFileMetadataWriter* photo_file_format_driver_real_create_metadata_writer (PhotoFileFormatDriver* self, const gchar* filepath);
+static PhotoFileSniffer* photo_file_format_driver_real_create_sniffer (PhotoFileFormatDriver* self, GFile* file, PhotoFileSnifferOptions options);
+PhotoFileFormatDriver* photo_file_format_driver_construct (GType object_type);
+static void photo_file_format_driver_finalize (PhotoFileFormatDriver* obj);
+GType photo_file_format_flags_get_type (void) G_GNUC_CONST;
+enum {
+ PHOTO_FILE_FORMAT_PROPERTIES_DUMMY_PROPERTY
+};
+PhotoFileFormat photo_file_format_properties_get_file_format (PhotoFileFormatProperties* self);
+static PhotoFileFormat photo_file_format_properties_real_get_file_format (PhotoFileFormatProperties* self);
+PhotoFileFormatFlags photo_file_format_properties_get_flags (PhotoFileFormatProperties* self);
+static PhotoFileFormatFlags photo_file_format_properties_real_get_flags (PhotoFileFormatProperties* self);
+static gboolean photo_file_format_properties_real_is_recognized_extension (PhotoFileFormatProperties* self, const gchar* ext);
+gboolean is_in_ci_array (const gchar* str, gchar** strings, int strings_length1);
+gchar** photo_file_format_properties_get_known_extensions (PhotoFileFormatProperties* self, int* result_length1);
+static gchar* photo_file_format_properties_real_get_default_extension (PhotoFileFormatProperties* self);
+static gchar** photo_file_format_properties_real_get_known_extensions (PhotoFileFormatProperties* self, int* result_length1);
+static gchar* photo_file_format_properties_real_get_default_mime_type (PhotoFileFormatProperties* self);
+static gchar** photo_file_format_properties_real_get_mime_types (PhotoFileFormatProperties* self, int* result_length1);
+gchar* photo_file_format_properties_get_user_visible_name (PhotoFileFormatProperties* self);
+static gchar* photo_file_format_properties_real_get_user_visible_name (PhotoFileFormatProperties* self);
+GFile* photo_file_format_properties_convert_file_extension (PhotoFileFormatProperties* self, GFile* file);
+PhotoFileFormatProperties* photo_file_format_properties_construct (GType object_type);
+static void photo_file_format_properties_finalize (PhotoFileFormatProperties* 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);
+
+
+GQuark photo_format_error_quark (void) {
+ return g_quark_from_static_string ("photo_format_error-quark");
+}
+
+
+static void _vala_array_add43 (PhotoFileFormat** array, int* length, int* size, PhotoFileFormat value) {
+#line 26 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if ((*length) == (*size)) {
+#line 26 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ *size = (*size) ? (2 * (*size)) : 4;
+#line 26 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ *array = g_renew (PhotoFileFormat, *array, *size);
+#line 427 "PhotoFileFormat.c"
+ }
+#line 26 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ (*array)[(*length)++] = value;
+#line 431 "PhotoFileFormat.c"
+}
+
+
+PhotoFileFormat* photo_file_format_data_find_applicable (PhotoFileFormatDataApplicableTest test, void* test_target, int* result_length1) {
+ PhotoFileFormat* result = NULL;
+ PhotoFileFormat* applicable = NULL;
+ PhotoFileFormat* _tmp0_ = NULL;
+ gint applicable_length1 = 0;
+ gint _applicable_size_ = 0;
+ gint _tmp1_ = 0;
+ PhotoFileFormat* _tmp2_ = NULL;
+ PhotoFileFormat* _tmp8_ = NULL;
+ gint _tmp8__length1 = 0;
+#line 23 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = g_new0 (PhotoFileFormat, 0);
+#line 23 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ applicable = _tmp0_;
+#line 23 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ applicable_length1 = 0;
+#line 23 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _applicable_size_ = applicable_length1;
+#line 24 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = photo_file_format_get_supported (&_tmp1_);
+#line 455 "PhotoFileFormat.c"
+ {
+ PhotoFileFormat* format_collection = NULL;
+ gint format_collection_length1 = 0;
+ gint _format_collection_size_ = 0;
+ gint format_it = 0;
+#line 24 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ format_collection = _tmp2_;
+#line 24 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ format_collection_length1 = _tmp1_;
+#line 24 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ for (format_it = 0; format_it < _tmp1_; format_it = format_it + 1) {
+#line 467 "PhotoFileFormat.c"
+ PhotoFileFormat format = 0;
+#line 24 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ format = format_collection[format_it];
+#line 471 "PhotoFileFormat.c"
+ {
+ PhotoFileFormatDataApplicableTest _tmp3_ = NULL;
+ void* _tmp3__target = NULL;
+ PhotoFileFormat _tmp4_ = 0;
+ gboolean _tmp5_ = FALSE;
+#line 25 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = test;
+#line 25 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3__target = test_target;
+#line 25 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp4_ = format;
+#line 25 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp5_ = _tmp3_ (_tmp4_, _tmp3__target);
+#line 25 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (_tmp5_) {
+#line 487 "PhotoFileFormat.c"
+ PhotoFileFormat* _tmp6_ = NULL;
+ gint _tmp6__length1 = 0;
+ PhotoFileFormat _tmp7_ = 0;
+#line 26 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp6_ = applicable;
+#line 26 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp6__length1 = applicable_length1;
+#line 26 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp7_ = format;
+#line 26 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _vala_array_add43 (&applicable, &applicable_length1, &_applicable_size_, _tmp7_);
+#line 499 "PhotoFileFormat.c"
+ }
+ }
+ }
+#line 24 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ format_collection = (g_free (format_collection), NULL);
+#line 505 "PhotoFileFormat.c"
+ }
+#line 29 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp8_ = applicable;
+#line 29 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp8__length1 = applicable_length1;
+#line 29 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (result_length1) {
+#line 29 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ *result_length1 = _tmp8__length1;
+#line 515 "PhotoFileFormat.c"
+ }
+#line 29 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp8_;
+#line 29 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 521 "PhotoFileFormat.c"
+}
+
+
+static gboolean ___lambda4_ (PhotoFileFormat format) {
+ gboolean result = FALSE;
+ PhotoFileFormat _tmp0_ = 0;
+ gboolean _tmp1_ = FALSE;
+#line 34 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = format;
+#line 34 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = photo_file_format_can_write (_tmp0_);
+#line 34 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp1_;
+#line 34 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 537 "PhotoFileFormat.c"
+}
+
+
+static gboolean ____lambda4__photo_file_format_data_applicable_test (PhotoFileFormat format, gpointer self) {
+ gboolean result;
+ result = ___lambda4_ (format);
+#line 34 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 546 "PhotoFileFormat.c"
+}
+
+
+static PhotoFileFormat* _vala_array_dup1 (PhotoFileFormat* self, int length) {
+#line 36 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return g_memdup (self, length * sizeof (PhotoFileFormat));
+#line 553 "PhotoFileFormat.c"
+}
+
+
+PhotoFileFormat* photo_file_format_data_get_writeable (int* result_length1) {
+ PhotoFileFormat* result = NULL;
+ PhotoFileFormat* _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ PhotoFileFormat* _tmp3_ = NULL;
+ gint _tmp3__length1 = 0;
+ PhotoFileFormat* _tmp4_ = NULL;
+ gint _tmp4__length1 = 0;
+ PhotoFileFormat* _tmp5_ = NULL;
+ gint _tmp5__length1 = 0;
+#line 33 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = photo_file_format_data_writeable;
+#line 33 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0__length1 = photo_file_format_data_writeable_length1;
+#line 33 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (_tmp0_ == NULL) {
+#line 573 "PhotoFileFormat.c"
+ gint _tmp1_ = 0;
+ PhotoFileFormat* _tmp2_ = NULL;
+#line 34 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = photo_file_format_data_find_applicable (____lambda4__photo_file_format_data_applicable_test, NULL, &_tmp1_);
+#line 34 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photo_file_format_data_writeable = (g_free (photo_file_format_data_writeable), NULL);
+#line 34 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photo_file_format_data_writeable = _tmp2_;
+#line 34 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photo_file_format_data_writeable_length1 = _tmp1_;
+#line 34 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_format_data_writeable_size_ = photo_file_format_data_writeable_length1;
+#line 586 "PhotoFileFormat.c"
+ }
+#line 36 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = photo_file_format_data_writeable;
+#line 36 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3__length1 = photo_file_format_data_writeable_length1;
+#line 36 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp4_ = (_tmp3_ != NULL) ? _vala_array_dup1 (_tmp3_, _tmp3__length1) : ((gpointer) _tmp3_);
+#line 36 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp4__length1 = _tmp3__length1;
+#line 36 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp5_ = _tmp4_;
+#line 36 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp5__length1 = _tmp4__length1;
+#line 36 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (result_length1) {
+#line 36 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ *result_length1 = _tmp5__length1;
+#line 604 "PhotoFileFormat.c"
+ }
+#line 36 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp5_;
+#line 36 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 610 "PhotoFileFormat.c"
+}
+
+
+static gboolean ___lambda22_ (PhotoFileFormat format) {
+ gboolean result = FALSE;
+ PhotoFileFormat _tmp0_ = 0;
+ gboolean _tmp1_ = FALSE;
+#line 41 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = format;
+#line 41 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = photo_file_format_can_write_image (_tmp0_);
+#line 41 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp1_;
+#line 41 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 626 "PhotoFileFormat.c"
+}
+
+
+static gboolean ____lambda22__photo_file_format_data_applicable_test (PhotoFileFormat format, gpointer self) {
+ gboolean result;
+ result = ___lambda22_ (format);
+#line 41 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 635 "PhotoFileFormat.c"
+}
+
+
+static PhotoFileFormat* _vala_array_dup2 (PhotoFileFormat* self, int length) {
+#line 43 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return g_memdup (self, length * sizeof (PhotoFileFormat));
+#line 642 "PhotoFileFormat.c"
+}
+
+
+PhotoFileFormat* photo_file_format_data_get_image_writeable (int* result_length1) {
+ PhotoFileFormat* result = NULL;
+ PhotoFileFormat* _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ PhotoFileFormat* _tmp3_ = NULL;
+ gint _tmp3__length1 = 0;
+ PhotoFileFormat* _tmp4_ = NULL;
+ gint _tmp4__length1 = 0;
+ PhotoFileFormat* _tmp5_ = NULL;
+ gint _tmp5__length1 = 0;
+#line 40 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = photo_file_format_data_image_writeable;
+#line 40 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0__length1 = photo_file_format_data_image_writeable_length1;
+#line 40 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (_tmp0_ == NULL) {
+#line 662 "PhotoFileFormat.c"
+ gint _tmp1_ = 0;
+ PhotoFileFormat* _tmp2_ = NULL;
+#line 41 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = photo_file_format_data_find_applicable (____lambda22__photo_file_format_data_applicable_test, NULL, &_tmp1_);
+#line 41 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photo_file_format_data_image_writeable = (g_free (photo_file_format_data_image_writeable), NULL);
+#line 41 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photo_file_format_data_image_writeable = _tmp2_;
+#line 41 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photo_file_format_data_image_writeable_length1 = _tmp1_;
+#line 41 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_format_data_image_writeable_size_ = photo_file_format_data_image_writeable_length1;
+#line 675 "PhotoFileFormat.c"
+ }
+#line 43 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = photo_file_format_data_image_writeable;
+#line 43 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3__length1 = photo_file_format_data_image_writeable_length1;
+#line 43 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp4_ = (_tmp3_ != NULL) ? _vala_array_dup2 (_tmp3_, _tmp3__length1) : ((gpointer) _tmp3_);
+#line 43 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp4__length1 = _tmp3__length1;
+#line 43 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp5_ = _tmp4_;
+#line 43 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp5__length1 = _tmp4__length1;
+#line 43 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (result_length1) {
+#line 43 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ *result_length1 = _tmp5__length1;
+#line 693 "PhotoFileFormat.c"
+ }
+#line 43 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp5_;
+#line 43 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 699 "PhotoFileFormat.c"
+}
+
+
+static gboolean ___lambda23_ (PhotoFileFormat format) {
+ gboolean result = FALSE;
+ PhotoFileFormat _tmp0_ = 0;
+ gboolean _tmp1_ = FALSE;
+#line 48 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = format;
+#line 48 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = photo_file_format_can_write_metadata (_tmp0_);
+#line 48 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp1_;
+#line 48 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 715 "PhotoFileFormat.c"
+}
+
+
+static gboolean ____lambda23__photo_file_format_data_applicable_test (PhotoFileFormat format, gpointer self) {
+ gboolean result;
+ result = ___lambda23_ (format);
+#line 48 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 724 "PhotoFileFormat.c"
+}
+
+
+static PhotoFileFormat* _vala_array_dup3 (PhotoFileFormat* self, int length) {
+#line 50 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return g_memdup (self, length * sizeof (PhotoFileFormat));
+#line 731 "PhotoFileFormat.c"
+}
+
+
+PhotoFileFormat* photo_file_format_data_get_metadata_writeable (int* result_length1) {
+ PhotoFileFormat* result = NULL;
+ PhotoFileFormat* _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ PhotoFileFormat* _tmp3_ = NULL;
+ gint _tmp3__length1 = 0;
+ PhotoFileFormat* _tmp4_ = NULL;
+ gint _tmp4__length1 = 0;
+ PhotoFileFormat* _tmp5_ = NULL;
+ gint _tmp5__length1 = 0;
+#line 47 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = photo_file_format_data_metadata_writeable;
+#line 47 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0__length1 = photo_file_format_data_metadata_writeable_length1;
+#line 47 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (_tmp0_ == NULL) {
+#line 751 "PhotoFileFormat.c"
+ gint _tmp1_ = 0;
+ PhotoFileFormat* _tmp2_ = NULL;
+#line 48 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = photo_file_format_data_find_applicable (____lambda23__photo_file_format_data_applicable_test, NULL, &_tmp1_);
+#line 48 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photo_file_format_data_metadata_writeable = (g_free (photo_file_format_data_metadata_writeable), NULL);
+#line 48 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photo_file_format_data_metadata_writeable = _tmp2_;
+#line 48 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photo_file_format_data_metadata_writeable_length1 = _tmp1_;
+#line 48 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_format_data_metadata_writeable_size_ = photo_file_format_data_metadata_writeable_length1;
+#line 764 "PhotoFileFormat.c"
+ }
+#line 50 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = photo_file_format_data_metadata_writeable;
+#line 50 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3__length1 = photo_file_format_data_metadata_writeable_length1;
+#line 50 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp4_ = (_tmp3_ != NULL) ? _vala_array_dup3 (_tmp3_, _tmp3__length1) : ((gpointer) _tmp3_);
+#line 50 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp4__length1 = _tmp3__length1;
+#line 50 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp5_ = _tmp4_;
+#line 50 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp5__length1 = _tmp4__length1;
+#line 50 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (result_length1) {
+#line 50 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ *result_length1 = _tmp5__length1;
+#line 782 "PhotoFileFormat.c"
+ }
+#line 50 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp5_;
+#line 50 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 788 "PhotoFileFormat.c"
+}
+
+
+PhotoFileFormat* photo_file_format_get_supported (int* result_length1) {
+ PhotoFileFormat* result = NULL;
+ PhotoFileFormat* _tmp0_ = NULL;
+ PhotoFileFormat* _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = g_new0 (PhotoFileFormat, 5);
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_[0] = PHOTO_FILE_FORMAT_JFIF;
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_[1] = PHOTO_FILE_FORMAT_RAW;
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_[2] = PHOTO_FILE_FORMAT_PNG;
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_[3] = PHOTO_FILE_FORMAT_TIFF;
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_[4] = PHOTO_FILE_FORMAT_BMP;
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = _tmp0_;
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1__length1 = 5;
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (result_length1) {
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ *result_length1 = _tmp1__length1;
+#line 817 "PhotoFileFormat.c"
+ }
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp1_;
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 823 "PhotoFileFormat.c"
+}
+
+
+PhotoFileFormat* photo_file_format_get_writeable (int* result_length1) {
+ PhotoFileFormat* result = NULL;
+ gint _tmp0_ = 0;
+ PhotoFileFormat* _tmp1_ = NULL;
+ PhotoFileFormat* _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = photo_file_format_data_get_writeable (&_tmp0_);
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = _tmp1_;
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2__length1 = _tmp0_;
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (result_length1) {
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ *result_length1 = _tmp2__length1;
+#line 843 "PhotoFileFormat.c"
+ }
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp2_;
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 849 "PhotoFileFormat.c"
+}
+
+
+PhotoFileFormat* photo_file_format_get_image_writeable (int* result_length1) {
+ PhotoFileFormat* result = NULL;
+ gint _tmp0_ = 0;
+ PhotoFileFormat* _tmp1_ = NULL;
+ PhotoFileFormat* _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+#line 73 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = photo_file_format_data_get_image_writeable (&_tmp0_);
+#line 73 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = _tmp1_;
+#line 73 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2__length1 = _tmp0_;
+#line 73 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (result_length1) {
+#line 73 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ *result_length1 = _tmp2__length1;
+#line 869 "PhotoFileFormat.c"
+ }
+#line 73 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp2_;
+#line 73 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 875 "PhotoFileFormat.c"
+}
+
+
+PhotoFileFormat* photo_file_format_get_metadata_writeable (int* result_length1) {
+ PhotoFileFormat* result = NULL;
+ gint _tmp0_ = 0;
+ PhotoFileFormat* _tmp1_ = NULL;
+ PhotoFileFormat* _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+#line 77 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = photo_file_format_data_get_metadata_writeable (&_tmp0_);
+#line 77 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = _tmp1_;
+#line 77 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2__length1 = _tmp0_;
+#line 77 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (result_length1) {
+#line 77 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ *result_length1 = _tmp2__length1;
+#line 895 "PhotoFileFormat.c"
+ }
+#line 77 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp2_;
+#line 77 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 901 "PhotoFileFormat.c"
+}
+
+
+PhotoFileFormat photo_file_format_get_by_basename_extension (const gchar* basename) {
+ PhotoFileFormat result = 0;
+ gchar* name = NULL;
+ gchar* ext = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+ gboolean _tmp4_ = FALSE;
+ gint _tmp5_ = 0;
+ PhotoFileFormat* _tmp6_ = NULL;
+#line 80 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (basename != NULL, 0);
+#line 82 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = basename;
+#line 82 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ disassemble_filename (_tmp0_, &_tmp1_, &_tmp2_);
+#line 82 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (name);
+#line 82 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ name = _tmp1_;
+#line 82 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (ext);
+#line 82 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ext = _tmp2_;
+#line 84 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = ext;
+#line 84 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp4_ = is_string_empty (_tmp3_);
+#line 84 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (_tmp4_) {
+#line 85 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = PHOTO_FILE_FORMAT_UNKNOWN;
+#line 85 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (ext);
+#line 85 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (name);
+#line 85 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 944 "PhotoFileFormat.c"
+ }
+#line 87 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp6_ = photo_file_format_get_supported (&_tmp5_);
+#line 948 "PhotoFileFormat.c"
+ {
+ PhotoFileFormat* file_format_collection = NULL;
+ gint file_format_collection_length1 = 0;
+ gint _file_format_collection_size_ = 0;
+ gint file_format_it = 0;
+#line 87 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ file_format_collection = _tmp6_;
+#line 87 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ file_format_collection_length1 = _tmp5_;
+#line 87 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ for (file_format_it = 0; file_format_it < _tmp5_; file_format_it = file_format_it + 1) {
+#line 960 "PhotoFileFormat.c"
+ PhotoFileFormat file_format = 0;
+#line 87 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ file_format = file_format_collection[file_format_it];
+#line 964 "PhotoFileFormat.c"
+ {
+ PhotoFileFormat _tmp7_ = 0;
+ PhotoFileFormatDriver* _tmp8_ = NULL;
+ PhotoFileFormatDriver* _tmp9_ = NULL;
+ PhotoFileFormatProperties* _tmp10_ = NULL;
+ PhotoFileFormatProperties* _tmp11_ = NULL;
+ const gchar* _tmp12_ = NULL;
+ gboolean _tmp13_ = FALSE;
+ gboolean _tmp14_ = FALSE;
+#line 88 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp7_ = file_format;
+#line 88 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp8_ = photo_file_format_get_driver (_tmp7_);
+#line 88 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp9_ = _tmp8_;
+#line 88 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp10_ = photo_file_format_driver_get_properties (_tmp9_);
+#line 88 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp11_ = _tmp10_;
+#line 88 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp12_ = ext;
+#line 88 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp13_ = photo_file_format_properties_is_recognized_extension (_tmp11_, _tmp12_);
+#line 88 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp14_ = _tmp13_;
+#line 88 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_format_properties_unref0 (_tmp11_);
+#line 88 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_format_driver_unref0 (_tmp9_);
+#line 88 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (_tmp14_) {
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = file_format;
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ file_format_collection = (g_free (file_format_collection), NULL);
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (ext);
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (name);
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1006 "PhotoFileFormat.c"
+ }
+ }
+ }
+#line 87 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ file_format_collection = (g_free (file_format_collection), NULL);
+#line 1012 "PhotoFileFormat.c"
+ }
+#line 92 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = PHOTO_FILE_FORMAT_UNKNOWN;
+#line 92 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (ext);
+#line 92 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (name);
+#line 92 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1022 "PhotoFileFormat.c"
+}
+
+
+gboolean photo_file_format_is_file_supported (GFile* file) {
+ gboolean result = FALSE;
+ GFile* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gboolean _tmp3_ = FALSE;
+ gboolean _tmp4_ = FALSE;
+#line 95 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (G_IS_FILE (file), FALSE);
+#line 96 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = file;
+#line 96 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = g_file_get_basename (_tmp0_);
+#line 96 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = _tmp1_;
+#line 96 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = photo_file_format_is_basename_supported (_tmp2_);
+#line 96 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp4_ = _tmp3_;
+#line 96 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (_tmp2_);
+#line 96 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp4_;
+#line 96 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1051 "PhotoFileFormat.c"
+}
+
+
+gboolean photo_file_format_is_basename_supported (const gchar* basename) {
+ gboolean result = FALSE;
+ gchar* name = NULL;
+ gchar* ext = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+ gboolean _tmp4_ = FALSE;
+ gint _tmp5_ = 0;
+ PhotoFileFormat* _tmp6_ = NULL;
+#line 99 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (basename != NULL, FALSE);
+#line 101 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = basename;
+#line 101 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ disassemble_filename (_tmp0_, &_tmp1_, &_tmp2_);
+#line 101 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (name);
+#line 101 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ name = _tmp1_;
+#line 101 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (ext);
+#line 101 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ext = _tmp2_;
+#line 103 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = ext;
+#line 103 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp4_ = is_string_empty (_tmp3_);
+#line 103 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (_tmp4_) {
+#line 104 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = FALSE;
+#line 104 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (ext);
+#line 104 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (name);
+#line 104 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1094 "PhotoFileFormat.c"
+ }
+#line 106 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp6_ = photo_file_format_get_supported (&_tmp5_);
+#line 1098 "PhotoFileFormat.c"
+ {
+ PhotoFileFormat* format_collection = NULL;
+ gint format_collection_length1 = 0;
+ gint _format_collection_size_ = 0;
+ gint format_it = 0;
+#line 106 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ format_collection = _tmp6_;
+#line 106 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ format_collection_length1 = _tmp5_;
+#line 106 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ for (format_it = 0; format_it < _tmp5_; format_it = format_it + 1) {
+#line 1110 "PhotoFileFormat.c"
+ PhotoFileFormat format = 0;
+#line 106 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ format = format_collection[format_it];
+#line 1114 "PhotoFileFormat.c"
+ {
+ PhotoFileFormat _tmp7_ = 0;
+ PhotoFileFormatDriver* _tmp8_ = NULL;
+ PhotoFileFormatDriver* _tmp9_ = NULL;
+ PhotoFileFormatProperties* _tmp10_ = NULL;
+ PhotoFileFormatProperties* _tmp11_ = NULL;
+ const gchar* _tmp12_ = NULL;
+ gboolean _tmp13_ = FALSE;
+ gboolean _tmp14_ = FALSE;
+#line 107 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp7_ = format;
+#line 107 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp8_ = photo_file_format_get_driver (_tmp7_);
+#line 107 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp9_ = _tmp8_;
+#line 107 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp10_ = photo_file_format_driver_get_properties (_tmp9_);
+#line 107 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp11_ = _tmp10_;
+#line 107 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp12_ = ext;
+#line 107 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp13_ = photo_file_format_properties_is_recognized_extension (_tmp11_, _tmp12_);
+#line 107 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp14_ = _tmp13_;
+#line 107 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_format_properties_unref0 (_tmp11_);
+#line 107 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_format_driver_unref0 (_tmp9_);
+#line 107 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (_tmp14_) {
+#line 108 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = TRUE;
+#line 108 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ format_collection = (g_free (format_collection), NULL);
+#line 108 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (ext);
+#line 108 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (name);
+#line 108 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1156 "PhotoFileFormat.c"
+ }
+ }
+ }
+#line 106 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ format_collection = (g_free (format_collection), NULL);
+#line 1162 "PhotoFileFormat.c"
+ }
+#line 111 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = FALSE;
+#line 111 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (ext);
+#line 111 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (name);
+#line 111 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1172 "PhotoFileFormat.c"
+}
+
+
+PhotoFileFormat photo_file_format_get_system_default_format (void) {
+ PhotoFileFormat result = 0;
+#line 116 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = PHOTO_FILE_FORMAT_JFIF;
+#line 116 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1182 "PhotoFileFormat.c"
+}
+
+
+PhotoFileFormat photo_file_format_get_by_file_extension (GFile* file) {
+ PhotoFileFormat result = 0;
+ GFile* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ PhotoFileFormat _tmp3_ = 0;
+ PhotoFileFormat _tmp4_ = 0;
+#line 119 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (G_IS_FILE (file), 0);
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = file;
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = g_file_get_basename (_tmp0_);
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = _tmp1_;
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = photo_file_format_get_by_basename_extension (_tmp2_);
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp4_ = _tmp3_;
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (_tmp2_);
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp4_;
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1211 "PhotoFileFormat.c"
+}
+
+
+gint photo_file_format_serialize (PhotoFileFormat self) {
+ gint result = 0;
+#line 125 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ switch (self) {
+#line 125 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case PHOTO_FILE_FORMAT_JFIF:
+#line 1221 "PhotoFileFormat.c"
+ {
+#line 127 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = 0;
+#line 127 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1227 "PhotoFileFormat.c"
+ }
+#line 125 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case PHOTO_FILE_FORMAT_RAW:
+#line 1231 "PhotoFileFormat.c"
+ {
+#line 130 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = 1;
+#line 130 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1237 "PhotoFileFormat.c"
+ }
+#line 125 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case PHOTO_FILE_FORMAT_PNG:
+#line 1241 "PhotoFileFormat.c"
+ {
+#line 133 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = 2;
+#line 133 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1247 "PhotoFileFormat.c"
+ }
+#line 125 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case PHOTO_FILE_FORMAT_TIFF:
+#line 1251 "PhotoFileFormat.c"
+ {
+#line 136 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = 3;
+#line 136 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1257 "PhotoFileFormat.c"
+ }
+#line 125 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case PHOTO_FILE_FORMAT_BMP:
+#line 1261 "PhotoFileFormat.c"
+ {
+#line 139 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = 4;
+#line 139 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1267 "PhotoFileFormat.c"
+ }
+ default:
+#line 125 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case PHOTO_FILE_FORMAT_UNKNOWN:
+#line 1272 "PhotoFileFormat.c"
+ {
+#line 143 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = -1;
+#line 143 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1278 "PhotoFileFormat.c"
+ }
+ }
+}
+
+
+PhotoFileFormat photo_file_format_unserialize (gint value) {
+ PhotoFileFormat result = 0;
+ gint _tmp0_ = 0;
+#line 149 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = value;
+#line 149 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ switch (_tmp0_) {
+#line 149 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case 0:
+#line 1293 "PhotoFileFormat.c"
+ {
+#line 151 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = PHOTO_FILE_FORMAT_JFIF;
+#line 151 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1299 "PhotoFileFormat.c"
+ }
+#line 149 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case 1:
+#line 1303 "PhotoFileFormat.c"
+ {
+#line 154 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = PHOTO_FILE_FORMAT_RAW;
+#line 154 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1309 "PhotoFileFormat.c"
+ }
+#line 149 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case 2:
+#line 1313 "PhotoFileFormat.c"
+ {
+#line 157 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = PHOTO_FILE_FORMAT_PNG;
+#line 157 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1319 "PhotoFileFormat.c"
+ }
+#line 149 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case 3:
+#line 1323 "PhotoFileFormat.c"
+ {
+#line 160 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = PHOTO_FILE_FORMAT_TIFF;
+#line 160 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1329 "PhotoFileFormat.c"
+ }
+#line 149 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case 4:
+#line 1333 "PhotoFileFormat.c"
+ {
+#line 163 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = PHOTO_FILE_FORMAT_BMP;
+#line 163 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1339 "PhotoFileFormat.c"
+ }
+ default:
+ {
+#line 166 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = PHOTO_FILE_FORMAT_UNKNOWN;
+#line 166 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1347 "PhotoFileFormat.c"
+ }
+ }
+}
+
+
+PhotoFileFormat photo_file_format_from_gphoto_type (const gchar* type) {
+ PhotoFileFormat result = 0;
+ const gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ GQuark _tmp3_ = 0U;
+#line 170 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (type != NULL, 0);
+#line 171 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = type;
+#line 171 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = _tmp0_;
+#line 171 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
+#line 171 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (_tmp3_ == g_quark_from_string (GP_MIME_JPEG)) {
+#line 171 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ switch (0) {
+#line 1370 "PhotoFileFormat.c"
+ default:
+ {
+#line 173 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = PHOTO_FILE_FORMAT_JFIF;
+#line 173 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1377 "PhotoFileFormat.c"
+ }
+ }
+ } else if ((_tmp3_ == g_quark_from_string (GP_MIME_RAW)) || (_tmp3_ == g_quark_from_string (GP_MIME_CRW))) {
+#line 171 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ switch (0) {
+#line 1383 "PhotoFileFormat.c"
+ default:
+ {
+#line 177 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = PHOTO_FILE_FORMAT_RAW;
+#line 177 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1390 "PhotoFileFormat.c"
+ }
+ }
+ } else if (_tmp3_ == g_quark_from_string (GP_MIME_PNG)) {
+#line 171 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ switch (0) {
+#line 1396 "PhotoFileFormat.c"
+ default:
+ {
+#line 180 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = PHOTO_FILE_FORMAT_PNG;
+#line 180 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1403 "PhotoFileFormat.c"
+ }
+ }
+ } else if (_tmp3_ == g_quark_from_string (GP_MIME_TIFF)) {
+#line 171 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ switch (0) {
+#line 1409 "PhotoFileFormat.c"
+ default:
+ {
+#line 183 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = PHOTO_FILE_FORMAT_TIFF;
+#line 183 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1416 "PhotoFileFormat.c"
+ }
+ }
+ } else if (_tmp3_ == g_quark_from_string (GP_MIME_BMP)) {
+#line 171 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ switch (0) {
+#line 1422 "PhotoFileFormat.c"
+ default:
+ {
+#line 186 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = PHOTO_FILE_FORMAT_BMP;
+#line 186 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1429 "PhotoFileFormat.c"
+ }
+ }
+ } else {
+#line 171 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ switch (0) {
+#line 1435 "PhotoFileFormat.c"
+ default:
+ {
+#line 190 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = PHOTO_FILE_FORMAT_UNKNOWN;
+#line 190 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1442 "PhotoFileFormat.c"
+ }
+ }
+ }
+}
+
+
+PhotoFileFormat photo_file_format_from_pixbuf_name (const gchar* name) {
+ PhotoFileFormat result = 0;
+ const gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ GQuark _tmp3_ = 0U;
+#line 196 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ static GQuark _tmp2_label0 = 0;
+#line 196 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ static GQuark _tmp2_label1 = 0;
+#line 196 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ static GQuark _tmp2_label2 = 0;
+#line 196 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ static GQuark _tmp2_label3 = 0;
+#line 195 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (name != NULL, 0);
+#line 196 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = name;
+#line 196 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = _tmp0_;
+#line 196 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
+#line 196 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("jpeg")))) {
+#line 196 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ switch (0) {
+#line 1474 "PhotoFileFormat.c"
+ default:
+ {
+#line 198 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = PHOTO_FILE_FORMAT_JFIF;
+#line 198 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1481 "PhotoFileFormat.c"
+ }
+ }
+ } else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("png")))) {
+#line 196 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ switch (0) {
+#line 1487 "PhotoFileFormat.c"
+ default:
+ {
+#line 201 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = PHOTO_FILE_FORMAT_PNG;
+#line 201 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1494 "PhotoFileFormat.c"
+ }
+ }
+ } else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("tiff")))) {
+#line 196 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ switch (0) {
+#line 1500 "PhotoFileFormat.c"
+ default:
+ {
+#line 204 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = PHOTO_FILE_FORMAT_TIFF;
+#line 204 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1507 "PhotoFileFormat.c"
+ }
+ }
+ } else if (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("bmp")))) {
+#line 196 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ switch (0) {
+#line 1513 "PhotoFileFormat.c"
+ default:
+ {
+#line 207 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = PHOTO_FILE_FORMAT_BMP;
+#line 207 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1520 "PhotoFileFormat.c"
+ }
+ }
+ } else {
+#line 196 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ switch (0) {
+#line 1526 "PhotoFileFormat.c"
+ default:
+ {
+#line 210 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = PHOTO_FILE_FORMAT_UNKNOWN;
+#line 210 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1533 "PhotoFileFormat.c"
+ }
+ }
+ }
+}
+
+
+void photo_file_format_init (PhotoFileFormat self) {
+#line 215 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ switch (self) {
+#line 215 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case PHOTO_FILE_FORMAT_JFIF:
+#line 1545 "PhotoFileFormat.c"
+ {
+#line 217 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ jfif_file_format_driver_init ();
+#line 218 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ break;
+#line 1551 "PhotoFileFormat.c"
+ }
+#line 215 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case PHOTO_FILE_FORMAT_RAW:
+#line 1555 "PhotoFileFormat.c"
+ {
+#line 221 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ raw_file_format_driver_init ();
+#line 222 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ break;
+#line 1561 "PhotoFileFormat.c"
+ }
+#line 215 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case PHOTO_FILE_FORMAT_PNG:
+#line 1565 "PhotoFileFormat.c"
+ {
+#line 225 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ png_file_format_driver_init ();
+#line 226 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ break;
+#line 1571 "PhotoFileFormat.c"
+ }
+#line 215 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case PHOTO_FILE_FORMAT_TIFF:
+#line 1575 "PhotoFileFormat.c"
+ {
+#line 229 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photos_tiff_file_format_driver_init ();
+#line 230 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ break;
+#line 1581 "PhotoFileFormat.c"
+ }
+#line 215 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case PHOTO_FILE_FORMAT_BMP:
+#line 1585 "PhotoFileFormat.c"
+ {
+#line 233 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photos_bmp_file_format_driver_init ();
+#line 234 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ break;
+#line 1591 "PhotoFileFormat.c"
+ }
+ default:
+ {
+ GEnumValue* _tmp0_;
+#line 237 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = g_enum_get_value (g_type_class_ref (TYPE_PHOTO_FILE_FORMAT), self);
+#line 237 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_error ("PhotoFileFormat.vala:237: Unsupported file format %s", (_tmp0_ != NULL) ? _tmp0_->value_name : NULL);
+#line 1600 "PhotoFileFormat.c"
+ }
+ }
+}
+
+
+static PhotoFileFormatDriver* photo_file_format_get_driver (PhotoFileFormat self) {
+ PhotoFileFormatDriver* result = NULL;
+#line 242 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ switch (self) {
+#line 242 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case PHOTO_FILE_FORMAT_JFIF:
+#line 1612 "PhotoFileFormat.c"
+ {
+ JfifFileFormatDriver* _tmp0_ = NULL;
+#line 244 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = jfif_file_format_driver_get_instance ();
+#line 244 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriver);
+#line 244 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1621 "PhotoFileFormat.c"
+ }
+#line 242 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case PHOTO_FILE_FORMAT_RAW:
+#line 1625 "PhotoFileFormat.c"
+ {
+ RawFileFormatDriver* _tmp1_ = NULL;
+#line 247 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = raw_file_format_driver_get_instance ();
+#line 247 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriver);
+#line 247 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1634 "PhotoFileFormat.c"
+ }
+#line 242 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case PHOTO_FILE_FORMAT_PNG:
+#line 1638 "PhotoFileFormat.c"
+ {
+ PngFileFormatDriver* _tmp2_ = NULL;
+#line 250 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = png_file_format_driver_get_instance ();
+#line 250 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriver);
+#line 250 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1647 "PhotoFileFormat.c"
+ }
+#line 242 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case PHOTO_FILE_FORMAT_TIFF:
+#line 1651 "PhotoFileFormat.c"
+ {
+ PhotosTiffFileFormatDriver* _tmp3_ = NULL;
+#line 253 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = photos_tiff_file_format_driver_get_instance ();
+#line 253 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriver);
+#line 253 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1660 "PhotoFileFormat.c"
+ }
+#line 242 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ case PHOTO_FILE_FORMAT_BMP:
+#line 1664 "PhotoFileFormat.c"
+ {
+ PhotosBmpFileFormatDriver* _tmp4_ = NULL;
+#line 256 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp4_ = photos_bmp_file_format_driver_get_instance ();
+#line 256 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriver);
+#line 256 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1673 "PhotoFileFormat.c"
+ }
+ default:
+ {
+ GEnumValue* _tmp5_;
+#line 259 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp5_ = g_enum_get_value (g_type_class_ref (TYPE_PHOTO_FILE_FORMAT), self);
+#line 259 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_error ("PhotoFileFormat.vala:259: Unsupported file format %s", (_tmp5_ != NULL) ? _tmp5_->value_name : NULL);
+#line 1682 "PhotoFileFormat.c"
+ }
+ }
+}
+
+
+PhotoFileFormatProperties* photo_file_format_get_properties (PhotoFileFormat self) {
+ PhotoFileFormatProperties* result = NULL;
+ PhotoFileFormatDriver* _tmp0_ = NULL;
+ PhotoFileFormatDriver* _tmp1_ = NULL;
+ PhotoFileFormatProperties* _tmp2_ = NULL;
+ PhotoFileFormatProperties* _tmp3_ = NULL;
+#line 264 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = photo_file_format_get_driver (self);
+#line 264 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = _tmp0_;
+#line 264 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = photo_file_format_driver_get_properties (_tmp1_);
+#line 264 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = _tmp2_;
+#line 264 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_format_driver_unref0 (_tmp1_);
+#line 264 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp3_;
+#line 264 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1708 "PhotoFileFormat.c"
+}
+
+
+gchar* photo_file_format_get_default_basename (PhotoFileFormat self, const gchar* name) {
+ gchar* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ PhotoFileFormatProperties* _tmp1_ = NULL;
+ PhotoFileFormatProperties* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+#line 268 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (name != NULL, NULL);
+#line 269 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = name;
+#line 269 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = photo_file_format_get_properties (self);
+#line 269 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = _tmp1_;
+#line 269 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = photo_file_format_properties_get_default_extension (_tmp2_);
+#line 269 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp4_ = _tmp3_;
+#line 269 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp5_ = g_strdup_printf ("%s.%s", _tmp0_, _tmp4_);
+#line 269 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp6_ = _tmp5_;
+#line 269 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (_tmp4_);
+#line 269 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_format_properties_unref0 (_tmp2_);
+#line 269 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp6_;
+#line 269 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1745 "PhotoFileFormat.c"
+}
+
+
+PhotoFileReader* photo_file_format_create_reader (PhotoFileFormat self, const gchar* filepath) {
+ PhotoFileReader* result = NULL;
+ PhotoFileFormatDriver* _tmp0_ = NULL;
+ PhotoFileFormatDriver* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ PhotoFileReader* _tmp3_ = NULL;
+ PhotoFileReader* _tmp4_ = NULL;
+#line 272 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 273 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = photo_file_format_get_driver (self);
+#line 273 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = _tmp0_;
+#line 273 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = filepath;
+#line 273 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = photo_file_format_driver_create_reader (_tmp1_, _tmp2_);
+#line 273 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp4_ = _tmp3_;
+#line 273 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_format_driver_unref0 (_tmp1_);
+#line 273 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp4_;
+#line 273 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1774 "PhotoFileFormat.c"
+}
+
+
+gboolean photo_file_format_can_write (PhotoFileFormat self) {
+ gboolean result = FALSE;
+ gboolean _tmp0_ = FALSE;
+ gboolean _tmp1_ = FALSE;
+#line 278 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = photo_file_format_can_write_image (self);
+#line 278 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (_tmp1_) {
+#line 1786 "PhotoFileFormat.c"
+ gboolean _tmp2_ = FALSE;
+#line 278 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = photo_file_format_can_write_metadata (self);
+#line 278 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = _tmp2_;
+#line 1792 "PhotoFileFormat.c"
+ } else {
+#line 278 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = FALSE;
+#line 1796 "PhotoFileFormat.c"
+ }
+#line 278 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp0_;
+#line 278 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1802 "PhotoFileFormat.c"
+}
+
+
+gboolean photo_file_format_can_write_image (PhotoFileFormat self) {
+ gboolean result = FALSE;
+ PhotoFileFormatDriver* _tmp0_ = NULL;
+ PhotoFileFormatDriver* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+ gboolean _tmp3_ = FALSE;
+#line 282 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = photo_file_format_get_driver (self);
+#line 282 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = _tmp0_;
+#line 282 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = photo_file_format_driver_can_write_image (_tmp1_);
+#line 282 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = _tmp2_;
+#line 282 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_format_driver_unref0 (_tmp1_);
+#line 282 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp3_;
+#line 282 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1826 "PhotoFileFormat.c"
+}
+
+
+gboolean photo_file_format_can_write_metadata (PhotoFileFormat self) {
+ gboolean result = FALSE;
+ PhotoFileFormatDriver* _tmp0_ = NULL;
+ PhotoFileFormatDriver* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+ gboolean _tmp3_ = FALSE;
+#line 286 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = photo_file_format_get_driver (self);
+#line 286 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = _tmp0_;
+#line 286 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = photo_file_format_driver_can_write_metadata (_tmp1_);
+#line 286 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = _tmp2_;
+#line 286 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_format_driver_unref0 (_tmp1_);
+#line 286 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp3_;
+#line 286 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1850 "PhotoFileFormat.c"
+}
+
+
+PhotoFileWriter* photo_file_format_create_writer (PhotoFileFormat self, const gchar* filepath, GError** error) {
+ PhotoFileWriter* result = NULL;
+ PhotoFileWriter* writer = NULL;
+ PhotoFileFormatDriver* _tmp0_ = NULL;
+ PhotoFileFormatDriver* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ PhotoFileWriter* _tmp3_ = NULL;
+ PhotoFileWriter* _tmp4_ = NULL;
+ PhotoFileWriter* _tmp5_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 289 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 290 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = photo_file_format_get_driver (self);
+#line 290 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = _tmp0_;
+#line 290 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = filepath;
+#line 290 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = photo_file_format_driver_create_writer (_tmp1_, _tmp2_);
+#line 290 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp4_ = _tmp3_;
+#line 290 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_format_driver_unref0 (_tmp1_);
+#line 290 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ writer = _tmp4_;
+#line 291 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp5_ = writer;
+#line 291 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (_tmp5_ == NULL) {
+#line 1884 "PhotoFileFormat.c"
+ GEnumValue* _tmp6_;
+ GError* _tmp7_ = NULL;
+#line 292 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp6_ = g_enum_get_value (g_type_class_ref (TYPE_PHOTO_FILE_FORMAT), self);
+#line 292 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp7_ = g_error_new (PHOTO_FORMAT_ERROR, PHOTO_FORMAT_ERROR_READ_ONLY, "File format %s is read-only", (_tmp6_ != NULL) ? _tmp6_->value_name : NULL);
+#line 292 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _inner_error_ = _tmp7_;
+#line 292 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (_inner_error_->domain == PHOTO_FORMAT_ERROR) {
+#line 292 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_propagate_error (error, _inner_error_);
+#line 292 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_adapter_unref0 (writer);
+#line 292 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return NULL;
+#line 1901 "PhotoFileFormat.c"
+ } else {
+#line 292 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_adapter_unref0 (writer);
+#line 292 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.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 292 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_clear_error (&_inner_error_);
+#line 292 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return NULL;
+#line 1911 "PhotoFileFormat.c"
+ }
+ }
+#line 294 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = writer;
+#line 294 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1918 "PhotoFileFormat.c"
+}
+
+
+PhotoFileMetadataWriter* photo_file_format_create_metadata_writer (PhotoFileFormat self, const gchar* filepath, GError** error) {
+ PhotoFileMetadataWriter* result = NULL;
+ PhotoFileMetadataWriter* writer = NULL;
+ PhotoFileFormatDriver* _tmp0_ = NULL;
+ PhotoFileFormatDriver* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ PhotoFileMetadataWriter* _tmp3_ = NULL;
+ PhotoFileMetadataWriter* _tmp4_ = NULL;
+ PhotoFileMetadataWriter* _tmp5_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 297 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 298 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = photo_file_format_get_driver (self);
+#line 298 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = _tmp0_;
+#line 298 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = filepath;
+#line 298 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = photo_file_format_driver_create_metadata_writer (_tmp1_, _tmp2_);
+#line 298 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp4_ = _tmp3_;
+#line 298 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_format_driver_unref0 (_tmp1_);
+#line 298 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ writer = _tmp4_;
+#line 299 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp5_ = writer;
+#line 299 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (_tmp5_ == NULL) {
+#line 1952 "PhotoFileFormat.c"
+ GEnumValue* _tmp6_;
+ GError* _tmp7_ = NULL;
+#line 300 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp6_ = g_enum_get_value (g_type_class_ref (TYPE_PHOTO_FILE_FORMAT), self);
+#line 300 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp7_ = g_error_new (PHOTO_FORMAT_ERROR, PHOTO_FORMAT_ERROR_READ_ONLY, "File format %s metadata is read-only", (_tmp6_ != NULL) ? _tmp6_->value_name : NULL);
+#line 300 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _inner_error_ = _tmp7_;
+#line 300 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (_inner_error_->domain == PHOTO_FORMAT_ERROR) {
+#line 300 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_propagate_error (error, _inner_error_);
+#line 300 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_adapter_unref0 (writer);
+#line 300 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return NULL;
+#line 1969 "PhotoFileFormat.c"
+ } else {
+#line 300 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_adapter_unref0 (writer);
+#line 300 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 300 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_clear_error (&_inner_error_);
+#line 300 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return NULL;
+#line 1979 "PhotoFileFormat.c"
+ }
+ }
+#line 302 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = writer;
+#line 302 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 1986 "PhotoFileFormat.c"
+}
+
+
+PhotoFileSniffer* photo_file_format_create_sniffer (PhotoFileFormat self, GFile* file, PhotoFileSnifferOptions options) {
+ PhotoFileSniffer* result = NULL;
+ PhotoFileFormatDriver* _tmp0_ = NULL;
+ PhotoFileFormatDriver* _tmp1_ = NULL;
+ GFile* _tmp2_ = NULL;
+ PhotoFileSnifferOptions _tmp3_ = 0;
+ PhotoFileSniffer* _tmp4_ = NULL;
+ PhotoFileSniffer* _tmp5_ = NULL;
+#line 305 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (G_IS_FILE (file), NULL);
+#line 306 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = photo_file_format_get_driver (self);
+#line 306 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = _tmp0_;
+#line 306 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = file;
+#line 306 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = options;
+#line 306 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp4_ = photo_file_format_driver_create_sniffer (_tmp1_, _tmp2_, _tmp3_);
+#line 306 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp5_ = _tmp4_;
+#line 306 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_format_driver_unref0 (_tmp1_);
+#line 306 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp5_;
+#line 306 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 2018 "PhotoFileFormat.c"
+}
+
+
+PhotoMetadata* photo_file_format_create_metadata (PhotoFileFormat self) {
+ PhotoMetadata* result = NULL;
+ PhotoFileFormatDriver* _tmp0_ = NULL;
+ PhotoFileFormatDriver* _tmp1_ = NULL;
+ PhotoMetadata* _tmp2_ = NULL;
+ PhotoMetadata* _tmp3_ = NULL;
+#line 310 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = photo_file_format_get_driver (self);
+#line 310 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = _tmp0_;
+#line 310 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = photo_file_format_driver_create_metadata (_tmp1_);
+#line 310 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = _tmp2_;
+#line 310 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_format_driver_unref0 (_tmp1_);
+#line 310 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp3_;
+#line 310 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 2042 "PhotoFileFormat.c"
+}
+
+
+gchar* photo_file_format_get_default_mime_type (PhotoFileFormat self) {
+ gchar* result = NULL;
+ PhotoFileFormatDriver* _tmp0_ = NULL;
+ PhotoFileFormatDriver* _tmp1_ = NULL;
+ PhotoFileFormatProperties* _tmp2_ = NULL;
+ PhotoFileFormatProperties* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+#line 314 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = photo_file_format_get_driver (self);
+#line 314 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = _tmp0_;
+#line 314 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = photo_file_format_driver_get_properties (_tmp1_);
+#line 314 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = _tmp2_;
+#line 314 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp4_ = photo_file_format_properties_get_default_mime_type (_tmp3_);
+#line 314 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp5_ = _tmp4_;
+#line 314 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_format_properties_unref0 (_tmp3_);
+#line 314 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_format_driver_unref0 (_tmp1_);
+#line 314 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp5_;
+#line 314 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 2074 "PhotoFileFormat.c"
+}
+
+
+gchar** photo_file_format_get_mime_types (PhotoFileFormat self, int* result_length1) {
+ gchar** result = NULL;
+ PhotoFileFormatDriver* _tmp0_ = NULL;
+ PhotoFileFormatDriver* _tmp1_ = NULL;
+ PhotoFileFormatProperties* _tmp2_ = NULL;
+ PhotoFileFormatProperties* _tmp3_ = NULL;
+ gint _tmp4_ = 0;
+ gchar** _tmp5_ = NULL;
+ gchar** _tmp6_ = NULL;
+ gint _tmp6__length1 = 0;
+ gchar** _tmp7_ = NULL;
+ gint _tmp7__length1 = 0;
+#line 318 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = photo_file_format_get_driver (self);
+#line 318 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = _tmp0_;
+#line 318 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = photo_file_format_driver_get_properties (_tmp1_);
+#line 318 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = _tmp2_;
+#line 318 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp5_ = photo_file_format_properties_get_mime_types (_tmp3_, &_tmp4_);
+#line 318 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp6_ = _tmp5_;
+#line 318 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp6__length1 = _tmp4_;
+#line 318 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_format_properties_unref0 (_tmp3_);
+#line 318 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _photo_file_format_driver_unref0 (_tmp1_);
+#line 318 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp7_ = _tmp6_;
+#line 318 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp7__length1 = _tmp6__length1;
+#line 318 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (result_length1) {
+#line 318 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ *result_length1 = _tmp7__length1;
+#line 2116 "PhotoFileFormat.c"
+ }
+#line 318 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp7_;
+#line 318 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 2122 "PhotoFileFormat.c"
+}
+
+
+static void _vala_array_add44 (gchar*** array, int* length, int* size, gchar* value) {
+#line 326 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if ((*length) == (*size)) {
+#line 326 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ *size = (*size) ? (2 * (*size)) : 4;
+#line 326 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ *array = g_renew (gchar*, *array, (*size) + 1);
+#line 2133 "PhotoFileFormat.c"
+ }
+#line 326 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ (*array)[(*length)++] = value;
+#line 326 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ (*array)[*length] = NULL;
+#line 2139 "PhotoFileFormat.c"
+}
+
+
+gchar** photo_file_format_get_editable_mime_types (int* result_length1) {
+ gchar** result = NULL;
+ gchar** mime_types = NULL;
+ gchar** _tmp0_ = NULL;
+ gint mime_types_length1 = 0;
+ gint _mime_types_size_ = 0;
+ gint _tmp1_ = 0;
+ PhotoFileFormat* _tmp2_ = NULL;
+ gchar** _tmp10_ = NULL;
+ gint _tmp10__length1 = 0;
+#line 322 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = g_new0 (gchar*, 0 + 1);
+#line 322 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ mime_types = _tmp0_;
+#line 322 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ mime_types_length1 = 0;
+#line 322 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _mime_types_size_ = mime_types_length1;
+#line 324 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = photo_file_format_get_supported (&_tmp1_);
+#line 2163 "PhotoFileFormat.c"
+ {
+ PhotoFileFormat* file_format_collection = NULL;
+ gint file_format_collection_length1 = 0;
+ gint _file_format_collection_size_ = 0;
+ gint file_format_it = 0;
+#line 324 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ file_format_collection = _tmp2_;
+#line 324 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ file_format_collection_length1 = _tmp1_;
+#line 324 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ for (file_format_it = 0; file_format_it < _tmp1_; file_format_it = file_format_it + 1) {
+#line 2175 "PhotoFileFormat.c"
+ PhotoFileFormat file_format = 0;
+#line 324 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ file_format = file_format_collection[file_format_it];
+#line 2179 "PhotoFileFormat.c"
+ {
+ PhotoFileFormat _tmp3_ = 0;
+ gint _tmp4_ = 0;
+ gchar** _tmp5_ = NULL;
+#line 325 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = file_format;
+#line 325 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp5_ = photo_file_format_get_mime_types (_tmp3_, &_tmp4_);
+#line 2188 "PhotoFileFormat.c"
+ {
+ gchar** mime_type_collection = NULL;
+ gint mime_type_collection_length1 = 0;
+ gint _mime_type_collection_size_ = 0;
+ gint mime_type_it = 0;
+#line 325 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ mime_type_collection = _tmp5_;
+#line 325 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ mime_type_collection_length1 = _tmp4_;
+#line 325 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ for (mime_type_it = 0; mime_type_it < _tmp4_; mime_type_it = mime_type_it + 1) {
+#line 2200 "PhotoFileFormat.c"
+ gchar* _tmp6_ = NULL;
+ gchar* mime_type = NULL;
+#line 325 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp6_ = g_strdup (mime_type_collection[mime_type_it]);
+#line 325 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ mime_type = _tmp6_;
+#line 2207 "PhotoFileFormat.c"
+ {
+ gchar** _tmp7_ = NULL;
+ gint _tmp7__length1 = 0;
+ const gchar* _tmp8_ = NULL;
+ gchar* _tmp9_ = NULL;
+#line 326 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp7_ = mime_types;
+#line 326 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp7__length1 = mime_types_length1;
+#line 326 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp8_ = mime_type;
+#line 326 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp9_ = g_strdup (_tmp8_);
+#line 326 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _vala_array_add44 (&mime_types, &mime_types_length1, &_mime_types_size_, _tmp9_);
+#line 325 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (mime_type);
+#line 2225 "PhotoFileFormat.c"
+ }
+ }
+#line 325 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ mime_type_collection = (_vala_array_free (mime_type_collection, mime_type_collection_length1, (GDestroyNotify) g_free), NULL);
+#line 2230 "PhotoFileFormat.c"
+ }
+ }
+ }
+#line 324 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ file_format_collection = (g_free (file_format_collection), NULL);
+#line 2236 "PhotoFileFormat.c"
+ }
+#line 329 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp10_ = mime_types;
+#line 329 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp10__length1 = mime_types_length1;
+#line 329 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (result_length1) {
+#line 329 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ *result_length1 = _tmp10__length1;
+#line 2246 "PhotoFileFormat.c"
+ }
+#line 329 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp10_;
+#line 329 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 2252 "PhotoFileFormat.c"
+}
+
+
+GType photo_file_format_get_type (void) {
+ static volatile gsize photo_file_format_type_id__volatile = 0;
+ if (g_once_init_enter (&photo_file_format_type_id__volatile)) {
+ static const GEnumValue values[] = {{PHOTO_FILE_FORMAT_JFIF, "PHOTO_FILE_FORMAT_JFIF", "jfif"}, {PHOTO_FILE_FORMAT_RAW, "PHOTO_FILE_FORMAT_RAW", "raw"}, {PHOTO_FILE_FORMAT_PNG, "PHOTO_FILE_FORMAT_PNG", "png"}, {PHOTO_FILE_FORMAT_TIFF, "PHOTO_FILE_FORMAT_TIFF", "tiff"}, {PHOTO_FILE_FORMAT_BMP, "PHOTO_FILE_FORMAT_BMP", "bmp"}, {PHOTO_FILE_FORMAT_UNKNOWN, "PHOTO_FILE_FORMAT_UNKNOWN", "unknown"}, {0, NULL, NULL}};
+ GType photo_file_format_type_id;
+ photo_file_format_type_id = g_enum_register_static ("PhotoFileFormat", values);
+ g_once_init_leave (&photo_file_format_type_id__volatile, photo_file_format_type_id);
+ }
+ return photo_file_format_type_id__volatile;
+}
+
+
+static PhotoFileFormatProperties* photo_file_format_driver_real_get_properties (PhotoFileFormatDriver* self) {
+#line 345 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_file_format_driver_get_properties'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 345 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return NULL;
+#line 2273 "PhotoFileFormat.c"
+}
+
+
+PhotoFileFormatProperties* photo_file_format_driver_get_properties (PhotoFileFormatDriver* self) {
+#line 345 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_FORMAT_DRIVER (self), NULL);
+#line 345 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return PHOTO_FILE_FORMAT_DRIVER_GET_CLASS (self)->get_properties (self);
+#line 2282 "PhotoFileFormat.c"
+}
+
+
+static PhotoFileReader* photo_file_format_driver_real_create_reader (PhotoFileFormatDriver* self, const gchar* filepath) {
+#line 347 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_file_format_driver_create_reader'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 347 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return NULL;
+#line 2291 "PhotoFileFormat.c"
+}
+
+
+PhotoFileReader* photo_file_format_driver_create_reader (PhotoFileFormatDriver* self, const gchar* filepath) {
+#line 347 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_FORMAT_DRIVER (self), NULL);
+#line 347 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return PHOTO_FILE_FORMAT_DRIVER_GET_CLASS (self)->create_reader (self, filepath);
+#line 2300 "PhotoFileFormat.c"
+}
+
+
+static PhotoMetadata* photo_file_format_driver_real_create_metadata (PhotoFileFormatDriver* self) {
+#line 349 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_file_format_driver_create_metadata'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 349 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return NULL;
+#line 2309 "PhotoFileFormat.c"
+}
+
+
+PhotoMetadata* photo_file_format_driver_create_metadata (PhotoFileFormatDriver* self) {
+#line 349 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_FORMAT_DRIVER (self), NULL);
+#line 349 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return PHOTO_FILE_FORMAT_DRIVER_GET_CLASS (self)->create_metadata (self);
+#line 2318 "PhotoFileFormat.c"
+}
+
+
+static gboolean photo_file_format_driver_real_can_write_image (PhotoFileFormatDriver* self) {
+#line 351 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_file_format_driver_can_write_image'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 351 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return FALSE;
+#line 2327 "PhotoFileFormat.c"
+}
+
+
+gboolean photo_file_format_driver_can_write_image (PhotoFileFormatDriver* self) {
+#line 351 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_FORMAT_DRIVER (self), FALSE);
+#line 351 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return PHOTO_FILE_FORMAT_DRIVER_GET_CLASS (self)->can_write_image (self);
+#line 2336 "PhotoFileFormat.c"
+}
+
+
+static gboolean photo_file_format_driver_real_can_write_metadata (PhotoFileFormatDriver* self) {
+#line 353 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_file_format_driver_can_write_metadata'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 353 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return FALSE;
+#line 2345 "PhotoFileFormat.c"
+}
+
+
+gboolean photo_file_format_driver_can_write_metadata (PhotoFileFormatDriver* self) {
+#line 353 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_FORMAT_DRIVER (self), FALSE);
+#line 353 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return PHOTO_FILE_FORMAT_DRIVER_GET_CLASS (self)->can_write_metadata (self);
+#line 2354 "PhotoFileFormat.c"
+}
+
+
+static PhotoFileWriter* photo_file_format_driver_real_create_writer (PhotoFileFormatDriver* self, const gchar* filepath) {
+#line 355 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_file_format_driver_create_writer'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 355 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return NULL;
+#line 2363 "PhotoFileFormat.c"
+}
+
+
+PhotoFileWriter* photo_file_format_driver_create_writer (PhotoFileFormatDriver* self, const gchar* filepath) {
+#line 355 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_FORMAT_DRIVER (self), NULL);
+#line 355 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return PHOTO_FILE_FORMAT_DRIVER_GET_CLASS (self)->create_writer (self, filepath);
+#line 2372 "PhotoFileFormat.c"
+}
+
+
+static PhotoFileMetadataWriter* photo_file_format_driver_real_create_metadata_writer (PhotoFileFormatDriver* self, const gchar* filepath) {
+#line 357 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_file_format_driver_create_metadata_writer'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 357 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return NULL;
+#line 2381 "PhotoFileFormat.c"
+}
+
+
+PhotoFileMetadataWriter* photo_file_format_driver_create_metadata_writer (PhotoFileFormatDriver* self, const gchar* filepath) {
+#line 357 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_FORMAT_DRIVER (self), NULL);
+#line 357 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return PHOTO_FILE_FORMAT_DRIVER_GET_CLASS (self)->create_metadata_writer (self, filepath);
+#line 2390 "PhotoFileFormat.c"
+}
+
+
+static PhotoFileSniffer* photo_file_format_driver_real_create_sniffer (PhotoFileFormatDriver* self, GFile* file, PhotoFileSnifferOptions options) {
+#line 359 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_file_format_driver_create_sniffer'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 359 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return NULL;
+#line 2399 "PhotoFileFormat.c"
+}
+
+
+PhotoFileSniffer* photo_file_format_driver_create_sniffer (PhotoFileFormatDriver* self, GFile* file, PhotoFileSnifferOptions options) {
+#line 359 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_FORMAT_DRIVER (self), NULL);
+#line 359 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return PHOTO_FILE_FORMAT_DRIVER_GET_CLASS (self)->create_sniffer (self, file, options);
+#line 2408 "PhotoFileFormat.c"
+}
+
+
+PhotoFileFormatDriver* photo_file_format_driver_construct (GType object_type) {
+ PhotoFileFormatDriver* self = NULL;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ self = (PhotoFileFormatDriver*) g_type_create_instance (object_type);
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return self;
+#line 2418 "PhotoFileFormat.c"
+}
+
+
+static void value_photo_file_format_driver_init (GValue* value) {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ value->data[0].v_pointer = NULL;
+#line 2425 "PhotoFileFormat.c"
+}
+
+
+static void value_photo_file_format_driver_free_value (GValue* value) {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (value->data[0].v_pointer) {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photo_file_format_driver_unref (value->data[0].v_pointer);
+#line 2434 "PhotoFileFormat.c"
+ }
+}
+
+
+static void value_photo_file_format_driver_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (src_value->data[0].v_pointer) {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ dest_value->data[0].v_pointer = photo_file_format_driver_ref (src_value->data[0].v_pointer);
+#line 2444 "PhotoFileFormat.c"
+ } else {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 2448 "PhotoFileFormat.c"
+ }
+}
+
+
+static gpointer value_photo_file_format_driver_peek_pointer (const GValue* value) {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return value->data[0].v_pointer;
+#line 2456 "PhotoFileFormat.c"
+}
+
+
+static gchar* value_photo_file_format_driver_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (collect_values[0].v_pointer) {
+#line 2463 "PhotoFileFormat.c"
+ PhotoFileFormatDriver* object;
+ object = collect_values[0].v_pointer;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 2470 "PhotoFileFormat.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.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 2474 "PhotoFileFormat.c"
+ }
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ value->data[0].v_pointer = photo_file_format_driver_ref (object);
+#line 2478 "PhotoFileFormat.c"
+ } else {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ value->data[0].v_pointer = NULL;
+#line 2482 "PhotoFileFormat.c"
+ }
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return NULL;
+#line 2486 "PhotoFileFormat.c"
+}
+
+
+static gchar* value_photo_file_format_driver_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ PhotoFileFormatDriver** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (!object_p) {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 2497 "PhotoFileFormat.c"
+ }
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (!value->data[0].v_pointer) {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ *object_p = NULL;
+#line 2503 "PhotoFileFormat.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ *object_p = value->data[0].v_pointer;
+#line 2507 "PhotoFileFormat.c"
+ } else {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ *object_p = photo_file_format_driver_ref (value->data[0].v_pointer);
+#line 2511 "PhotoFileFormat.c"
+ }
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return NULL;
+#line 2515 "PhotoFileFormat.c"
+}
+
+
+GParamSpec* param_spec_photo_file_format_driver (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecPhotoFileFormatDriver* spec;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_PHOTO_FILE_FORMAT_DRIVER), NULL);
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return G_PARAM_SPEC (spec);
+#line 2529 "PhotoFileFormat.c"
+}
+
+
+gpointer value_get_photo_file_format_driver (const GValue* value) {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PHOTO_FILE_FORMAT_DRIVER), NULL);
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return value->data[0].v_pointer;
+#line 2538 "PhotoFileFormat.c"
+}
+
+
+void value_set_photo_file_format_driver (GValue* value, gpointer v_object) {
+ PhotoFileFormatDriver* old;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PHOTO_FILE_FORMAT_DRIVER));
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ old = value->data[0].v_pointer;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (v_object) {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PHOTO_FILE_FORMAT_DRIVER));
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ value->data[0].v_pointer = v_object;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photo_file_format_driver_ref (value->data[0].v_pointer);
+#line 2558 "PhotoFileFormat.c"
+ } else {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ value->data[0].v_pointer = NULL;
+#line 2562 "PhotoFileFormat.c"
+ }
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (old) {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photo_file_format_driver_unref (old);
+#line 2568 "PhotoFileFormat.c"
+ }
+}
+
+
+void value_take_photo_file_format_driver (GValue* value, gpointer v_object) {
+ PhotoFileFormatDriver* old;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PHOTO_FILE_FORMAT_DRIVER));
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ old = value->data[0].v_pointer;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (v_object) {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PHOTO_FILE_FORMAT_DRIVER));
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ value->data[0].v_pointer = v_object;
+#line 2587 "PhotoFileFormat.c"
+ } else {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ value->data[0].v_pointer = NULL;
+#line 2591 "PhotoFileFormat.c"
+ }
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (old) {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photo_file_format_driver_unref (old);
+#line 2597 "PhotoFileFormat.c"
+ }
+}
+
+
+static void photo_file_format_driver_class_init (PhotoFileFormatDriverClass * klass) {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photo_file_format_driver_parent_class = g_type_class_peek_parent (klass);
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ((PhotoFileFormatDriverClass *) klass)->finalize = photo_file_format_driver_finalize;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ((PhotoFileFormatDriverClass *) klass)->get_properties = photo_file_format_driver_real_get_properties;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_reader = photo_file_format_driver_real_create_reader;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_metadata = photo_file_format_driver_real_create_metadata;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ((PhotoFileFormatDriverClass *) klass)->can_write_image = photo_file_format_driver_real_can_write_image;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ((PhotoFileFormatDriverClass *) klass)->can_write_metadata = photo_file_format_driver_real_can_write_metadata;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_writer = photo_file_format_driver_real_create_writer;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_metadata_writer = photo_file_format_driver_real_create_metadata_writer;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_sniffer = photo_file_format_driver_real_create_sniffer;
+#line 2623 "PhotoFileFormat.c"
+}
+
+
+static void photo_file_format_driver_instance_init (PhotoFileFormatDriver * self) {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ self->ref_count = 1;
+#line 2630 "PhotoFileFormat.c"
+}
+
+
+static void photo_file_format_driver_finalize (PhotoFileFormatDriver* obj) {
+ PhotoFileFormatDriver * self;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriver);
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_signal_handlers_destroy (self);
+#line 2640 "PhotoFileFormat.c"
+}
+
+
+GType photo_file_format_driver_get_type (void) {
+ static volatile gsize photo_file_format_driver_type_id__volatile = 0;
+ if (g_once_init_enter (&photo_file_format_driver_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_photo_file_format_driver_init, value_photo_file_format_driver_free_value, value_photo_file_format_driver_copy_value, value_photo_file_format_driver_peek_pointer, "p", value_photo_file_format_driver_collect_value, "p", value_photo_file_format_driver_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (PhotoFileFormatDriverClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photo_file_format_driver_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotoFileFormatDriver), 0, (GInstanceInitFunc) photo_file_format_driver_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 photo_file_format_driver_type_id;
+ photo_file_format_driver_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PhotoFileFormatDriver", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT);
+ g_once_init_leave (&photo_file_format_driver_type_id__volatile, photo_file_format_driver_type_id);
+ }
+ return photo_file_format_driver_type_id__volatile;
+}
+
+
+gpointer photo_file_format_driver_ref (gpointer instance) {
+ PhotoFileFormatDriver* self;
+ self = instance;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return instance;
+#line 2665 "PhotoFileFormat.c"
+}
+
+
+void photo_file_format_driver_unref (gpointer instance) {
+ PhotoFileFormatDriver* self;
+ self = instance;
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ PHOTO_FILE_FORMAT_DRIVER_GET_CLASS (self)->finalize (self);
+#line 344 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 2678 "PhotoFileFormat.c"
+ }
+}
+
+
+GType photo_file_format_flags_get_type (void) {
+ static volatile gsize photo_file_format_flags_type_id__volatile = 0;
+ if (g_once_init_enter (&photo_file_format_flags_type_id__volatile)) {
+ static const GEnumValue values[] = {{PHOTO_FILE_FORMAT_FLAGS_NONE, "PHOTO_FILE_FORMAT_FLAGS_NONE", "none"}, {0, NULL, NULL}};
+ GType photo_file_format_flags_type_id;
+ photo_file_format_flags_type_id = g_enum_register_static ("PhotoFileFormatFlags", values);
+ g_once_init_leave (&photo_file_format_flags_type_id__volatile, photo_file_format_flags_type_id);
+ }
+ return photo_file_format_flags_type_id__volatile;
+}
+
+
+static PhotoFileFormat photo_file_format_properties_real_get_file_format (PhotoFileFormatProperties* self) {
+#line 374 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_file_format_properties_get_file_format'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 374 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return 0;
+#line 2700 "PhotoFileFormat.c"
+}
+
+
+PhotoFileFormat photo_file_format_properties_get_file_format (PhotoFileFormatProperties* self) {
+#line 374 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_FORMAT_PROPERTIES (self), 0);
+#line 374 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return PHOTO_FILE_FORMAT_PROPERTIES_GET_CLASS (self)->get_file_format (self);
+#line 2709 "PhotoFileFormat.c"
+}
+
+
+static PhotoFileFormatFlags photo_file_format_properties_real_get_flags (PhotoFileFormatProperties* self) {
+#line 376 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_file_format_properties_get_flags'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 376 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return 0;
+#line 2718 "PhotoFileFormat.c"
+}
+
+
+PhotoFileFormatFlags photo_file_format_properties_get_flags (PhotoFileFormatProperties* self) {
+#line 376 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_FORMAT_PROPERTIES (self), 0);
+#line 376 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return PHOTO_FILE_FORMAT_PROPERTIES_GET_CLASS (self)->get_flags (self);
+#line 2727 "PhotoFileFormat.c"
+}
+
+
+static gboolean photo_file_format_properties_real_is_recognized_extension (PhotoFileFormatProperties* self, const gchar* ext) {
+ gboolean result = FALSE;
+ const gchar* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ gchar** _tmp2_ = NULL;
+ gchar** _tmp3_ = NULL;
+ gint _tmp3__length1 = 0;
+ gboolean _tmp4_ = FALSE;
+ gboolean _tmp5_ = FALSE;
+#line 380 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (ext != NULL, FALSE);
+#line 381 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = ext;
+#line 381 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = photo_file_format_properties_get_known_extensions (self, &_tmp1_);
+#line 381 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = _tmp2_;
+#line 381 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3__length1 = _tmp1_;
+#line 381 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp4_ = is_in_ci_array (_tmp0_, _tmp3_, _tmp1_);
+#line 381 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp5_ = _tmp4_;
+#line 381 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp3_ = (_vala_array_free (_tmp3_, _tmp3__length1, (GDestroyNotify) g_free), NULL);
+#line 381 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp5_;
+#line 381 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 2760 "PhotoFileFormat.c"
+}
+
+
+gboolean photo_file_format_properties_is_recognized_extension (PhotoFileFormatProperties* self, const gchar* ext) {
+#line 380 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_FORMAT_PROPERTIES (self), FALSE);
+#line 380 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return PHOTO_FILE_FORMAT_PROPERTIES_GET_CLASS (self)->is_recognized_extension (self, ext);
+#line 2769 "PhotoFileFormat.c"
+}
+
+
+static gchar* photo_file_format_properties_real_get_default_extension (PhotoFileFormatProperties* self) {
+#line 384 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_file_format_properties_get_default_extension'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 384 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return NULL;
+#line 2778 "PhotoFileFormat.c"
+}
+
+
+gchar* photo_file_format_properties_get_default_extension (PhotoFileFormatProperties* self) {
+#line 384 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_FORMAT_PROPERTIES (self), NULL);
+#line 384 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return PHOTO_FILE_FORMAT_PROPERTIES_GET_CLASS (self)->get_default_extension (self);
+#line 2787 "PhotoFileFormat.c"
+}
+
+
+static gchar** photo_file_format_properties_real_get_known_extensions (PhotoFileFormatProperties* self, int* result_length1) {
+#line 386 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_file_format_properties_get_known_extensions'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 386 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return NULL;
+#line 2796 "PhotoFileFormat.c"
+}
+
+
+gchar** photo_file_format_properties_get_known_extensions (PhotoFileFormatProperties* self, int* result_length1) {
+#line 386 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_FORMAT_PROPERTIES (self), NULL);
+#line 386 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return PHOTO_FILE_FORMAT_PROPERTIES_GET_CLASS (self)->get_known_extensions (self, result_length1);
+#line 2805 "PhotoFileFormat.c"
+}
+
+
+static gchar* photo_file_format_properties_real_get_default_mime_type (PhotoFileFormatProperties* self) {
+#line 388 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_file_format_properties_get_default_mime_type'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 388 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return NULL;
+#line 2814 "PhotoFileFormat.c"
+}
+
+
+gchar* photo_file_format_properties_get_default_mime_type (PhotoFileFormatProperties* self) {
+#line 388 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_FORMAT_PROPERTIES (self), NULL);
+#line 388 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return PHOTO_FILE_FORMAT_PROPERTIES_GET_CLASS (self)->get_default_mime_type (self);
+#line 2823 "PhotoFileFormat.c"
+}
+
+
+static gchar** photo_file_format_properties_real_get_mime_types (PhotoFileFormatProperties* self, int* result_length1) {
+#line 390 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_file_format_properties_get_mime_types'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 390 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return NULL;
+#line 2832 "PhotoFileFormat.c"
+}
+
+
+gchar** photo_file_format_properties_get_mime_types (PhotoFileFormatProperties* self, int* result_length1) {
+#line 390 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_FORMAT_PROPERTIES (self), NULL);
+#line 390 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return PHOTO_FILE_FORMAT_PROPERTIES_GET_CLASS (self)->get_mime_types (self, result_length1);
+#line 2841 "PhotoFileFormat.c"
+}
+
+
+static gchar* photo_file_format_properties_real_get_user_visible_name (PhotoFileFormatProperties* self) {
+#line 397 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_file_format_properties_get_user_visible_name'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 397 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return NULL;
+#line 2850 "PhotoFileFormat.c"
+}
+
+
+gchar* photo_file_format_properties_get_user_visible_name (PhotoFileFormatProperties* self) {
+#line 397 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_FORMAT_PROPERTIES (self), NULL);
+#line 397 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return PHOTO_FILE_FORMAT_PROPERTIES_GET_CLASS (self)->get_user_visible_name (self);
+#line 2859 "PhotoFileFormat.c"
+}
+
+
+static gpointer _g_object_ref0 (gpointer self) {
+#line 405 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return self ? g_object_ref (self) : NULL;
+#line 2866 "PhotoFileFormat.c"
+}
+
+
+GFile* photo_file_format_properties_convert_file_extension (PhotoFileFormatProperties* self, GFile* file) {
+ GFile* result = NULL;
+ gchar* name = NULL;
+ gchar* ext = NULL;
+ GFile* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ gboolean _tmp5_ = FALSE;
+ const gchar* _tmp6_ = NULL;
+ GFile* _tmp11_ = NULL;
+ GFile* _tmp12_ = NULL;
+ GFile* _tmp13_ = NULL;
+ const gchar* _tmp14_ = NULL;
+ gchar* _tmp15_ = NULL;
+ gchar* _tmp16_ = NULL;
+ gchar* _tmp17_ = NULL;
+ gchar* _tmp18_ = NULL;
+ GFile* _tmp19_ = NULL;
+ GFile* _tmp20_ = NULL;
+#line 401 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_FORMAT_PROPERTIES (self), NULL);
+#line 401 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (G_IS_FILE (file), NULL);
+#line 403 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp0_ = file;
+#line 403 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp1_ = g_file_get_basename (_tmp0_);
+#line 403 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp2_ = _tmp1_;
+#line 403 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ disassemble_filename (_tmp2_, &_tmp3_, &_tmp4_);
+#line 403 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (name);
+#line 403 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ name = _tmp3_;
+#line 403 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (ext);
+#line 403 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ext = _tmp4_;
+#line 403 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (_tmp2_);
+#line 404 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp6_ = ext;
+#line 404 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (_tmp6_ != NULL) {
+#line 2917 "PhotoFileFormat.c"
+ const gchar* _tmp7_ = NULL;
+ gboolean _tmp8_ = FALSE;
+#line 404 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp7_ = ext;
+#line 404 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp8_ = photo_file_format_properties_is_recognized_extension (self, _tmp7_);
+#line 404 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp5_ = _tmp8_;
+#line 2926 "PhotoFileFormat.c"
+ } else {
+#line 404 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp5_ = FALSE;
+#line 2930 "PhotoFileFormat.c"
+ }
+#line 404 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (_tmp5_) {
+#line 2934 "PhotoFileFormat.c"
+ GFile* _tmp9_ = NULL;
+ GFile* _tmp10_ = NULL;
+#line 405 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp9_ = file;
+#line 405 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp10_ = _g_object_ref0 (_tmp9_);
+#line 405 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp10_;
+#line 405 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (ext);
+#line 405 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (name);
+#line 405 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 2949 "PhotoFileFormat.c"
+ }
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp11_ = file;
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp12_ = g_file_get_parent (_tmp11_);
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp13_ = _tmp12_;
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp14_ = name;
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp15_ = photo_file_format_properties_get_default_extension (self);
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp16_ = _tmp15_;
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp17_ = g_strdup_printf ("%s.%s", _tmp14_, _tmp16_);
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp18_ = _tmp17_;
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp19_ = g_file_get_child (_tmp13_, _tmp18_);
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _tmp20_ = _tmp19_;
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (_tmp18_);
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (_tmp16_);
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_object_unref0 (_tmp13_);
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ result = _tmp20_;
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (ext);
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ _g_free0 (name);
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return result;
+#line 2985 "PhotoFileFormat.c"
+}
+
+
+PhotoFileFormatProperties* photo_file_format_properties_construct (GType object_type) {
+ PhotoFileFormatProperties* self = NULL;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ self = (PhotoFileFormatProperties*) g_type_create_instance (object_type);
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return self;
+#line 2995 "PhotoFileFormat.c"
+}
+
+
+static void value_photo_file_format_properties_init (GValue* value) {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ value->data[0].v_pointer = NULL;
+#line 3002 "PhotoFileFormat.c"
+}
+
+
+static void value_photo_file_format_properties_free_value (GValue* value) {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (value->data[0].v_pointer) {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photo_file_format_properties_unref (value->data[0].v_pointer);
+#line 3011 "PhotoFileFormat.c"
+ }
+}
+
+
+static void value_photo_file_format_properties_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (src_value->data[0].v_pointer) {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ dest_value->data[0].v_pointer = photo_file_format_properties_ref (src_value->data[0].v_pointer);
+#line 3021 "PhotoFileFormat.c"
+ } else {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 3025 "PhotoFileFormat.c"
+ }
+}
+
+
+static gpointer value_photo_file_format_properties_peek_pointer (const GValue* value) {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return value->data[0].v_pointer;
+#line 3033 "PhotoFileFormat.c"
+}
+
+
+static gchar* value_photo_file_format_properties_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (collect_values[0].v_pointer) {
+#line 3040 "PhotoFileFormat.c"
+ PhotoFileFormatProperties* object;
+ object = collect_values[0].v_pointer;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 3047 "PhotoFileFormat.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.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 3051 "PhotoFileFormat.c"
+ }
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ value->data[0].v_pointer = photo_file_format_properties_ref (object);
+#line 3055 "PhotoFileFormat.c"
+ } else {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ value->data[0].v_pointer = NULL;
+#line 3059 "PhotoFileFormat.c"
+ }
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return NULL;
+#line 3063 "PhotoFileFormat.c"
+}
+
+
+static gchar* value_photo_file_format_properties_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ PhotoFileFormatProperties** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (!object_p) {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 3074 "PhotoFileFormat.c"
+ }
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (!value->data[0].v_pointer) {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ *object_p = NULL;
+#line 3080 "PhotoFileFormat.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ *object_p = value->data[0].v_pointer;
+#line 3084 "PhotoFileFormat.c"
+ } else {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ *object_p = photo_file_format_properties_ref (value->data[0].v_pointer);
+#line 3088 "PhotoFileFormat.c"
+ }
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return NULL;
+#line 3092 "PhotoFileFormat.c"
+}
+
+
+GParamSpec* param_spec_photo_file_format_properties (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecPhotoFileFormatProperties* spec;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_PHOTO_FILE_FORMAT_PROPERTIES), NULL);
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return G_PARAM_SPEC (spec);
+#line 3106 "PhotoFileFormat.c"
+}
+
+
+gpointer value_get_photo_file_format_properties (const GValue* value) {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PHOTO_FILE_FORMAT_PROPERTIES), NULL);
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return value->data[0].v_pointer;
+#line 3115 "PhotoFileFormat.c"
+}
+
+
+void value_set_photo_file_format_properties (GValue* value, gpointer v_object) {
+ PhotoFileFormatProperties* old;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PHOTO_FILE_FORMAT_PROPERTIES));
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ old = value->data[0].v_pointer;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (v_object) {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PHOTO_FILE_FORMAT_PROPERTIES));
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ value->data[0].v_pointer = v_object;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photo_file_format_properties_ref (value->data[0].v_pointer);
+#line 3135 "PhotoFileFormat.c"
+ } else {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ value->data[0].v_pointer = NULL;
+#line 3139 "PhotoFileFormat.c"
+ }
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (old) {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photo_file_format_properties_unref (old);
+#line 3145 "PhotoFileFormat.c"
+ }
+}
+
+
+void value_take_photo_file_format_properties (GValue* value, gpointer v_object) {
+ PhotoFileFormatProperties* old;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PHOTO_FILE_FORMAT_PROPERTIES));
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ old = value->data[0].v_pointer;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (v_object) {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PHOTO_FILE_FORMAT_PROPERTIES));
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ value->data[0].v_pointer = v_object;
+#line 3164 "PhotoFileFormat.c"
+ } else {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ value->data[0].v_pointer = NULL;
+#line 3168 "PhotoFileFormat.c"
+ }
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (old) {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photo_file_format_properties_unref (old);
+#line 3174 "PhotoFileFormat.c"
+ }
+}
+
+
+static void photo_file_format_properties_class_init (PhotoFileFormatPropertiesClass * klass) {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ photo_file_format_properties_parent_class = g_type_class_peek_parent (klass);
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->finalize = photo_file_format_properties_finalize;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_file_format = photo_file_format_properties_real_get_file_format;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_flags = photo_file_format_properties_real_get_flags;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->is_recognized_extension = photo_file_format_properties_real_is_recognized_extension;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_default_extension = photo_file_format_properties_real_get_default_extension;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_known_extensions = photo_file_format_properties_real_get_known_extensions;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_default_mime_type = photo_file_format_properties_real_get_default_mime_type;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_mime_types = photo_file_format_properties_real_get_mime_types;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_user_visible_name = photo_file_format_properties_real_get_user_visible_name;
+#line 3200 "PhotoFileFormat.c"
+}
+
+
+static void photo_file_format_properties_instance_init (PhotoFileFormatProperties * self) {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ self->ref_count = 1;
+#line 3207 "PhotoFileFormat.c"
+}
+
+
+static void photo_file_format_properties_finalize (PhotoFileFormatProperties* obj) {
+ PhotoFileFormatProperties * self;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatProperties);
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_signal_handlers_destroy (self);
+#line 3217 "PhotoFileFormat.c"
+}
+
+
+GType photo_file_format_properties_get_type (void) {
+ static volatile gsize photo_file_format_properties_type_id__volatile = 0;
+ if (g_once_init_enter (&photo_file_format_properties_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_photo_file_format_properties_init, value_photo_file_format_properties_free_value, value_photo_file_format_properties_copy_value, value_photo_file_format_properties_peek_pointer, "p", value_photo_file_format_properties_collect_value, "p", value_photo_file_format_properties_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (PhotoFileFormatPropertiesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photo_file_format_properties_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotoFileFormatProperties), 0, (GInstanceInitFunc) photo_file_format_properties_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 photo_file_format_properties_type_id;
+ photo_file_format_properties_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PhotoFileFormatProperties", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT);
+ g_once_init_leave (&photo_file_format_properties_type_id__volatile, photo_file_format_properties_type_id);
+ }
+ return photo_file_format_properties_type_id__volatile;
+}
+
+
+gpointer photo_file_format_properties_ref (gpointer instance) {
+ PhotoFileFormatProperties* self;
+ self = instance;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ return instance;
+#line 3242 "PhotoFileFormat.c"
+}
+
+
+void photo_file_format_properties_unref (gpointer instance) {
+ PhotoFileFormatProperties* self;
+ self = instance;
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ PHOTO_FILE_FORMAT_PROPERTIES_GET_CLASS (self)->finalize (self);
+#line 373 "/home/jens/Source/shotwell/src/photos/PhotoFileFormat.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 3255 "PhotoFileFormat.c"
+ }
+}
+
+
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ if ((array != NULL) && (destroy_func != NULL)) {
+ int i;
+ for (i = 0; i < array_length; i = i + 1) {
+ if (((gpointer*) array)[i] != NULL) {
+ destroy_func (((gpointer*) array)[i]);
+ }
+ }
+ }
+}
+
+
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ _vala_array_destroy (array, array_length, destroy_func);
+ g_free (array);
+}
+
+
+
diff --git a/src/photos/PhotoFileSniffer.c b/src/photos/PhotoFileSniffer.c
new file mode 100644
index 0000000..8d44d6b
--- /dev/null
+++ b/src/photos/PhotoFileSniffer.c
@@ -0,0 +1,1348 @@
+/* PhotoFileSniffer.c generated by valac 0.32.1, the Vala compiler
+ * generated from PhotoFileSniffer.vala, do not modify */
+
+/* Copyright 2016 Software Freedom Conservancy Inc.
+ *
+ * This software is licensed under the GNU LGPL (version 2.1 or later).
+ * See the COPYING file in this distribution.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gio/gio.h>
+#include <gobject/gvaluecollector.h>
+
+
+#define TYPE_DETECTED_PHOTO_INFORMATION (detected_photo_information_get_type ())
+#define DETECTED_PHOTO_INFORMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformation))
+#define DETECTED_PHOTO_INFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformationClass))
+#define IS_DETECTED_PHOTO_INFORMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DETECTED_PHOTO_INFORMATION))
+#define IS_DETECTED_PHOTO_INFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DETECTED_PHOTO_INFORMATION))
+#define DETECTED_PHOTO_INFORMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformationClass))
+
+typedef struct _DetectedPhotoInformation DetectedPhotoInformation;
+typedef struct _DetectedPhotoInformationClass DetectedPhotoInformationClass;
+typedef struct _DetectedPhotoInformationPrivate DetectedPhotoInformationPrivate;
+
+#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ())
+
+#define TYPE_MEDIA_METADATA (media_metadata_get_type ())
+#define MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_METADATA, MediaMetadata))
+#define MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_METADATA, MediaMetadataClass))
+#define IS_MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_METADATA))
+#define IS_MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_METADATA))
+#define MEDIA_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_METADATA, MediaMetadataClass))
+
+typedef struct _MediaMetadata MediaMetadata;
+typedef struct _MediaMetadataClass MediaMetadataClass;
+
+#define TYPE_PHOTO_METADATA (photo_metadata_get_type ())
+#define PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_METADATA, PhotoMetadata))
+#define PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_METADATA, PhotoMetadataClass))
+#define IS_PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_METADATA))
+#define IS_PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_METADATA))
+#define PHOTO_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_METADATA, PhotoMetadataClass))
+
+typedef struct _PhotoMetadata PhotoMetadata;
+typedef struct _PhotoMetadataClass PhotoMetadataClass;
+
+#define TYPE_DIMENSIONS (dimensions_get_type ())
+typedef struct _Dimensions Dimensions;
+#define _media_metadata_unref0(var) ((var == NULL) ? NULL : (var = (media_metadata_unref (var), NULL)))
+#define _g_free0(var) (var = (g_free (var), NULL))
+typedef struct _ParamSpecDetectedPhotoInformation ParamSpecDetectedPhotoInformation;
+
+#define TYPE_PHOTO_FILE_SNIFFER (photo_file_sniffer_get_type ())
+#define PHOTO_FILE_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer))
+#define PHOTO_FILE_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSnifferClass))
+#define IS_PHOTO_FILE_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_SNIFFER))
+#define IS_PHOTO_FILE_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_SNIFFER))
+#define PHOTO_FILE_SNIFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSnifferClass))
+
+typedef struct _PhotoFileSniffer PhotoFileSniffer;
+typedef struct _PhotoFileSnifferClass PhotoFileSnifferClass;
+typedef struct _PhotoFileSnifferPrivate PhotoFileSnifferPrivate;
+
+#define PHOTO_FILE_SNIFFER_TYPE_OPTIONS (photo_file_sniffer_options_get_type ())
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+typedef struct _ParamSpecPhotoFileSniffer ParamSpecPhotoFileSniffer;
+
+#define TYPE_PHOTO_FILE_INTERROGATOR (photo_file_interrogator_get_type ())
+#define PHOTO_FILE_INTERROGATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_INTERROGATOR, PhotoFileInterrogator))
+#define PHOTO_FILE_INTERROGATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_INTERROGATOR, PhotoFileInterrogatorClass))
+#define IS_PHOTO_FILE_INTERROGATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_INTERROGATOR))
+#define IS_PHOTO_FILE_INTERROGATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_INTERROGATOR))
+#define PHOTO_FILE_INTERROGATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_INTERROGATOR, PhotoFileInterrogatorClass))
+
+typedef struct _PhotoFileInterrogator PhotoFileInterrogator;
+typedef struct _PhotoFileInterrogatorClass PhotoFileInterrogatorClass;
+typedef struct _PhotoFileInterrogatorPrivate PhotoFileInterrogatorPrivate;
+#define _detected_photo_information_unref0(var) ((var == NULL) ? NULL : (var = (detected_photo_information_unref (var), NULL)))
+#define _photo_file_sniffer_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_sniffer_unref (var), NULL)))
+typedef struct _ParamSpecPhotoFileInterrogator ParamSpecPhotoFileInterrogator;
+#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
+#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
+#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
+#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
+
+typedef enum {
+ PHOTO_FILE_FORMAT_JFIF,
+ PHOTO_FILE_FORMAT_RAW,
+ PHOTO_FILE_FORMAT_PNG,
+ PHOTO_FILE_FORMAT_TIFF,
+ PHOTO_FILE_FORMAT_BMP,
+ PHOTO_FILE_FORMAT_UNKNOWN
+} PhotoFileFormat;
+
+struct _Dimensions {
+ gint width;
+ gint height;
+};
+
+struct _DetectedPhotoInformation {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ DetectedPhotoInformationPrivate * priv;
+ PhotoFileFormat file_format;
+ PhotoMetadata* metadata;
+ gchar* md5;
+ gchar* exif_md5;
+ gchar* thumbnail_md5;
+ gchar* format_name;
+ Dimensions image_dim;
+ GdkColorspace colorspace;
+ gint channels;
+ gint bits_per_channel;
+};
+
+struct _DetectedPhotoInformationClass {
+ GTypeClass parent_class;
+ void (*finalize) (DetectedPhotoInformation *self);
+};
+
+struct _ParamSpecDetectedPhotoInformation {
+ GParamSpec parent_instance;
+};
+
+typedef enum {
+ PHOTO_FILE_SNIFFER_OPTIONS_GET_ALL = 0x00000000,
+ PHOTO_FILE_SNIFFER_OPTIONS_NO_MD5 = 0x00000001
+} PhotoFileSnifferOptions;
+
+struct _PhotoFileSniffer {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileSnifferPrivate * priv;
+ GFile* file;
+ PhotoFileSnifferOptions options;
+ gboolean calc_md5;
+};
+
+struct _PhotoFileSnifferClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileSniffer *self);
+ DetectedPhotoInformation* (*sniff) (PhotoFileSniffer* self, gboolean* is_corrupted, GError** error);
+};
+
+struct _ParamSpecPhotoFileSniffer {
+ GParamSpec parent_instance;
+};
+
+struct _PhotoFileInterrogator {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileInterrogatorPrivate * priv;
+};
+
+struct _PhotoFileInterrogatorClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileInterrogator *self);
+};
+
+struct _PhotoFileInterrogatorPrivate {
+ GFile* file;
+ PhotoFileSnifferOptions options;
+ DetectedPhotoInformation* detected;
+ gboolean is_photo_corrupted;
+};
+
+struct _ParamSpecPhotoFileInterrogator {
+ GParamSpec parent_instance;
+};
+
+
+static gpointer detected_photo_information_parent_class = NULL;
+static gpointer photo_file_sniffer_parent_class = NULL;
+static gpointer photo_file_interrogator_parent_class = NULL;
+
+gpointer detected_photo_information_ref (gpointer instance);
+void detected_photo_information_unref (gpointer instance);
+GParamSpec* param_spec_detected_photo_information (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_detected_photo_information (GValue* value, gpointer v_object);
+void value_take_detected_photo_information (GValue* value, gpointer v_object);
+gpointer value_get_detected_photo_information (const GValue* value);
+GType detected_photo_information_get_type (void) G_GNUC_CONST;
+GType photo_file_format_get_type (void) G_GNUC_CONST;
+gpointer media_metadata_ref (gpointer instance);
+void media_metadata_unref (gpointer instance);
+GParamSpec* param_spec_media_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_media_metadata (GValue* value, gpointer v_object);
+void value_take_media_metadata (GValue* value, gpointer v_object);
+gpointer value_get_media_metadata (const GValue* value);
+GType media_metadata_get_type (void) G_GNUC_CONST;
+GType photo_metadata_get_type (void) G_GNUC_CONST;
+GType dimensions_get_type (void) G_GNUC_CONST;
+Dimensions* dimensions_dup (const Dimensions* self);
+void dimensions_free (Dimensions* self);
+enum {
+ DETECTED_PHOTO_INFORMATION_DUMMY_PROPERTY
+};
+void dimensions_init (Dimensions *self, gint width, gint height);
+DetectedPhotoInformation* detected_photo_information_new (void);
+DetectedPhotoInformation* detected_photo_information_construct (GType object_type);
+static void detected_photo_information_finalize (DetectedPhotoInformation* obj);
+gpointer photo_file_sniffer_ref (gpointer instance);
+void photo_file_sniffer_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_sniffer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_sniffer (GValue* value, gpointer v_object);
+void value_take_photo_file_sniffer (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_sniffer (const GValue* value);
+GType photo_file_sniffer_get_type (void) G_GNUC_CONST;
+GType photo_file_sniffer_options_get_type (void) G_GNUC_CONST;
+enum {
+ PHOTO_FILE_SNIFFER_DUMMY_PROPERTY
+};
+PhotoFileSniffer* photo_file_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options);
+DetectedPhotoInformation* photo_file_sniffer_sniff (PhotoFileSniffer* self, gboolean* is_corrupted, GError** error);
+static DetectedPhotoInformation* photo_file_sniffer_real_sniff (PhotoFileSniffer* self, gboolean* is_corrupted, GError** error);
+static void photo_file_sniffer_finalize (PhotoFileSniffer* obj);
+gpointer photo_file_interrogator_ref (gpointer instance);
+void photo_file_interrogator_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_interrogator (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_interrogator (GValue* value, gpointer v_object);
+void value_take_photo_file_interrogator (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_interrogator (const GValue* value);
+GType photo_file_interrogator_get_type (void) G_GNUC_CONST;
+#define PHOTO_FILE_INTERROGATOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_PHOTO_FILE_INTERROGATOR, PhotoFileInterrogatorPrivate))
+enum {
+ PHOTO_FILE_INTERROGATOR_DUMMY_PROPERTY
+};
+PhotoFileInterrogator* photo_file_interrogator_new (GFile* file, PhotoFileSnifferOptions options);
+PhotoFileInterrogator* photo_file_interrogator_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options);
+DetectedPhotoInformation* photo_file_interrogator_get_detected_photo_information (PhotoFileInterrogator* self);
+gboolean photo_file_interrogator_get_is_photo_corrupted (PhotoFileInterrogator* self);
+void photo_file_interrogator_interrogate (PhotoFileInterrogator* self, GError** error);
+PhotoFileFormat* photo_file_format_get_supported (int* result_length1);
+PhotoFileSniffer* photo_file_format_create_sniffer (PhotoFileFormat self, GFile* file, PhotoFileSnifferOptions options);
+static void photo_file_interrogator_finalize (PhotoFileInterrogator* obj);
+
+
+DetectedPhotoInformation* detected_photo_information_construct (GType object_type) {
+ DetectedPhotoInformation* self = NULL;
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self = (DetectedPhotoInformation*) g_type_create_instance (object_type);
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return self;
+#line 250 "PhotoFileSniffer.c"
+}
+
+
+DetectedPhotoInformation* detected_photo_information_new (void) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return detected_photo_information_construct (TYPE_DETECTED_PHOTO_INFORMATION);
+#line 257 "PhotoFileSniffer.c"
+}
+
+
+static void value_detected_photo_information_init (GValue* value) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = NULL;
+#line 264 "PhotoFileSniffer.c"
+}
+
+
+static void value_detected_photo_information_free_value (GValue* value) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (value->data[0].v_pointer) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ detected_photo_information_unref (value->data[0].v_pointer);
+#line 273 "PhotoFileSniffer.c"
+ }
+}
+
+
+static void value_detected_photo_information_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (src_value->data[0].v_pointer) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ dest_value->data[0].v_pointer = detected_photo_information_ref (src_value->data[0].v_pointer);
+#line 283 "PhotoFileSniffer.c"
+ } else {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 287 "PhotoFileSniffer.c"
+ }
+}
+
+
+static gpointer value_detected_photo_information_peek_pointer (const GValue* value) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return value->data[0].v_pointer;
+#line 295 "PhotoFileSniffer.c"
+}
+
+
+static gchar* value_detected_photo_information_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (collect_values[0].v_pointer) {
+#line 302 "PhotoFileSniffer.c"
+ DetectedPhotoInformation* object;
+ object = collect_values[0].v_pointer;
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 309 "PhotoFileSniffer.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.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 313 "PhotoFileSniffer.c"
+ }
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = detected_photo_information_ref (object);
+#line 317 "PhotoFileSniffer.c"
+ } else {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = NULL;
+#line 321 "PhotoFileSniffer.c"
+ }
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return NULL;
+#line 325 "PhotoFileSniffer.c"
+}
+
+
+static gchar* value_detected_photo_information_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ DetectedPhotoInformation** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (!object_p) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 336 "PhotoFileSniffer.c"
+ }
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (!value->data[0].v_pointer) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ *object_p = NULL;
+#line 342 "PhotoFileSniffer.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ *object_p = value->data[0].v_pointer;
+#line 346 "PhotoFileSniffer.c"
+ } else {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ *object_p = detected_photo_information_ref (value->data[0].v_pointer);
+#line 350 "PhotoFileSniffer.c"
+ }
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return NULL;
+#line 354 "PhotoFileSniffer.c"
+}
+
+
+GParamSpec* param_spec_detected_photo_information (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecDetectedPhotoInformation* spec;
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_DETECTED_PHOTO_INFORMATION), NULL);
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return G_PARAM_SPEC (spec);
+#line 368 "PhotoFileSniffer.c"
+}
+
+
+gpointer value_get_detected_photo_information (const GValue* value) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DETECTED_PHOTO_INFORMATION), NULL);
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return value->data[0].v_pointer;
+#line 377 "PhotoFileSniffer.c"
+}
+
+
+void value_set_detected_photo_information (GValue* value, gpointer v_object) {
+ DetectedPhotoInformation* old;
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DETECTED_PHOTO_INFORMATION));
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ old = value->data[0].v_pointer;
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (v_object) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_DETECTED_PHOTO_INFORMATION));
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = v_object;
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ detected_photo_information_ref (value->data[0].v_pointer);
+#line 397 "PhotoFileSniffer.c"
+ } else {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = NULL;
+#line 401 "PhotoFileSniffer.c"
+ }
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (old) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ detected_photo_information_unref (old);
+#line 407 "PhotoFileSniffer.c"
+ }
+}
+
+
+void value_take_detected_photo_information (GValue* value, gpointer v_object) {
+ DetectedPhotoInformation* old;
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DETECTED_PHOTO_INFORMATION));
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ old = value->data[0].v_pointer;
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (v_object) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_DETECTED_PHOTO_INFORMATION));
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = v_object;
+#line 426 "PhotoFileSniffer.c"
+ } else {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = NULL;
+#line 430 "PhotoFileSniffer.c"
+ }
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (old) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ detected_photo_information_unref (old);
+#line 436 "PhotoFileSniffer.c"
+ }
+}
+
+
+static void detected_photo_information_class_init (DetectedPhotoInformationClass * klass) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ detected_photo_information_parent_class = g_type_class_peek_parent (klass);
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ ((DetectedPhotoInformationClass *) klass)->finalize = detected_photo_information_finalize;
+#line 446 "PhotoFileSniffer.c"
+}
+
+
+static void detected_photo_information_instance_init (DetectedPhotoInformation * self) {
+#line 8 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->file_format = PHOTO_FILE_FORMAT_UNKNOWN;
+#line 9 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->metadata = NULL;
+#line 10 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->md5 = NULL;
+#line 11 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->exif_md5 = NULL;
+#line 12 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->thumbnail_md5 = NULL;
+#line 13 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->format_name = NULL;
+#line 14 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ dimensions_init (&self->image_dim, 0, 0);
+#line 15 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->colorspace = GDK_COLORSPACE_RGB;
+#line 16 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->channels = 0;
+#line 17 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->bits_per_channel = 0;
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->ref_count = 1;
+#line 473 "PhotoFileSniffer.c"
+}
+
+
+static void detected_photo_information_finalize (DetectedPhotoInformation* obj) {
+ DetectedPhotoInformation * self;
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformation);
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_signal_handlers_destroy (self);
+#line 9 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _media_metadata_unref0 (self->metadata);
+#line 10 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _g_free0 (self->md5);
+#line 11 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _g_free0 (self->exif_md5);
+#line 12 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _g_free0 (self->thumbnail_md5);
+#line 13 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _g_free0 (self->format_name);
+#line 493 "PhotoFileSniffer.c"
+}
+
+
+GType detected_photo_information_get_type (void) {
+ static volatile gsize detected_photo_information_type_id__volatile = 0;
+ if (g_once_init_enter (&detected_photo_information_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_detected_photo_information_init, value_detected_photo_information_free_value, value_detected_photo_information_copy_value, value_detected_photo_information_peek_pointer, "p", value_detected_photo_information_collect_value, "p", value_detected_photo_information_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (DetectedPhotoInformationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) detected_photo_information_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DetectedPhotoInformation), 0, (GInstanceInitFunc) detected_photo_information_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 detected_photo_information_type_id;
+ detected_photo_information_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DetectedPhotoInformation", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&detected_photo_information_type_id__volatile, detected_photo_information_type_id);
+ }
+ return detected_photo_information_type_id__volatile;
+}
+
+
+gpointer detected_photo_information_ref (gpointer instance) {
+ DetectedPhotoInformation* self;
+ self = instance;
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return instance;
+#line 518 "PhotoFileSniffer.c"
+}
+
+
+void detected_photo_information_unref (gpointer instance) {
+ DetectedPhotoInformation* self;
+ self = instance;
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ DETECTED_PHOTO_INFORMATION_GET_CLASS (self)->finalize (self);
+#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 531 "PhotoFileSniffer.c"
+ }
+}
+
+
+GType photo_file_sniffer_options_get_type (void) {
+ static volatile gsize photo_file_sniffer_options_type_id__volatile = 0;
+ if (g_once_init_enter (&photo_file_sniffer_options_type_id__volatile)) {
+ static const GEnumValue values[] = {{PHOTO_FILE_SNIFFER_OPTIONS_GET_ALL, "PHOTO_FILE_SNIFFER_OPTIONS_GET_ALL", "get-all"}, {PHOTO_FILE_SNIFFER_OPTIONS_NO_MD5, "PHOTO_FILE_SNIFFER_OPTIONS_NO_MD5", "no-md5"}, {0, NULL, NULL}};
+ GType photo_file_sniffer_options_type_id;
+ photo_file_sniffer_options_type_id = g_enum_register_static ("PhotoFileSnifferOptions", values);
+ g_once_init_leave (&photo_file_sniffer_options_type_id__volatile, photo_file_sniffer_options_type_id);
+ }
+ return photo_file_sniffer_options_type_id__volatile;
+}
+
+
+static gpointer _g_object_ref0 (gpointer self) {
+#line 43 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return self ? g_object_ref (self) : NULL;
+#line 551 "PhotoFileSniffer.c"
+}
+
+
+PhotoFileSniffer* photo_file_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options) {
+ PhotoFileSniffer* self = NULL;
+ GFile* _tmp0_ = NULL;
+ GFile* _tmp1_ = NULL;
+ PhotoFileSnifferOptions _tmp2_ = 0;
+ PhotoFileSnifferOptions _tmp3_ = 0;
+#line 42 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_val_if_fail (G_IS_FILE (file), NULL);
+#line 42 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self = (PhotoFileSniffer*) g_type_create_instance (object_type);
+#line 43 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp0_ = file;
+#line 43 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp1_ = _g_object_ref0 (_tmp0_);
+#line 43 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _g_object_unref0 (self->file);
+#line 43 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->file = _tmp1_;
+#line 44 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp2_ = options;
+#line 44 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->options = _tmp2_;
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp3_ = options;
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->calc_md5 = (_tmp3_ & PHOTO_FILE_SNIFFER_OPTIONS_NO_MD5) == 0;
+#line 42 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return self;
+#line 583 "PhotoFileSniffer.c"
+}
+
+
+static DetectedPhotoInformation* photo_file_sniffer_real_sniff (PhotoFileSniffer* self, gboolean* is_corrupted, GError** error) {
+#line 49 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_file_sniffer_sniff'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 49 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return NULL;
+#line 592 "PhotoFileSniffer.c"
+}
+
+
+DetectedPhotoInformation* photo_file_sniffer_sniff (PhotoFileSniffer* self, gboolean* is_corrupted, GError** error) {
+#line 49 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_SNIFFER (self), NULL);
+#line 49 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return PHOTO_FILE_SNIFFER_GET_CLASS (self)->sniff (self, is_corrupted, error);
+#line 601 "PhotoFileSniffer.c"
+}
+
+
+static void value_photo_file_sniffer_init (GValue* value) {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = NULL;
+#line 608 "PhotoFileSniffer.c"
+}
+
+
+static void value_photo_file_sniffer_free_value (GValue* value) {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (value->data[0].v_pointer) {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ photo_file_sniffer_unref (value->data[0].v_pointer);
+#line 617 "PhotoFileSniffer.c"
+ }
+}
+
+
+static void value_photo_file_sniffer_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (src_value->data[0].v_pointer) {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ dest_value->data[0].v_pointer = photo_file_sniffer_ref (src_value->data[0].v_pointer);
+#line 627 "PhotoFileSniffer.c"
+ } else {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 631 "PhotoFileSniffer.c"
+ }
+}
+
+
+static gpointer value_photo_file_sniffer_peek_pointer (const GValue* value) {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return value->data[0].v_pointer;
+#line 639 "PhotoFileSniffer.c"
+}
+
+
+static gchar* value_photo_file_sniffer_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (collect_values[0].v_pointer) {
+#line 646 "PhotoFileSniffer.c"
+ PhotoFileSniffer* object;
+ object = collect_values[0].v_pointer;
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 653 "PhotoFileSniffer.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.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 657 "PhotoFileSniffer.c"
+ }
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = photo_file_sniffer_ref (object);
+#line 661 "PhotoFileSniffer.c"
+ } else {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = NULL;
+#line 665 "PhotoFileSniffer.c"
+ }
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return NULL;
+#line 669 "PhotoFileSniffer.c"
+}
+
+
+static gchar* value_photo_file_sniffer_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ PhotoFileSniffer** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (!object_p) {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 680 "PhotoFileSniffer.c"
+ }
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (!value->data[0].v_pointer) {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ *object_p = NULL;
+#line 686 "PhotoFileSniffer.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ *object_p = value->data[0].v_pointer;
+#line 690 "PhotoFileSniffer.c"
+ } else {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ *object_p = photo_file_sniffer_ref (value->data[0].v_pointer);
+#line 694 "PhotoFileSniffer.c"
+ }
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return NULL;
+#line 698 "PhotoFileSniffer.c"
+}
+
+
+GParamSpec* param_spec_photo_file_sniffer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecPhotoFileSniffer* spec;
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_PHOTO_FILE_SNIFFER), NULL);
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return G_PARAM_SPEC (spec);
+#line 712 "PhotoFileSniffer.c"
+}
+
+
+gpointer value_get_photo_file_sniffer (const GValue* value) {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PHOTO_FILE_SNIFFER), NULL);
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return value->data[0].v_pointer;
+#line 721 "PhotoFileSniffer.c"
+}
+
+
+void value_set_photo_file_sniffer (GValue* value, gpointer v_object) {
+ PhotoFileSniffer* old;
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PHOTO_FILE_SNIFFER));
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ old = value->data[0].v_pointer;
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (v_object) {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PHOTO_FILE_SNIFFER));
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = v_object;
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ photo_file_sniffer_ref (value->data[0].v_pointer);
+#line 741 "PhotoFileSniffer.c"
+ } else {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = NULL;
+#line 745 "PhotoFileSniffer.c"
+ }
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (old) {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ photo_file_sniffer_unref (old);
+#line 751 "PhotoFileSniffer.c"
+ }
+}
+
+
+void value_take_photo_file_sniffer (GValue* value, gpointer v_object) {
+ PhotoFileSniffer* old;
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PHOTO_FILE_SNIFFER));
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ old = value->data[0].v_pointer;
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (v_object) {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PHOTO_FILE_SNIFFER));
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = v_object;
+#line 770 "PhotoFileSniffer.c"
+ } else {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = NULL;
+#line 774 "PhotoFileSniffer.c"
+ }
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (old) {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ photo_file_sniffer_unref (old);
+#line 780 "PhotoFileSniffer.c"
+ }
+}
+
+
+static void photo_file_sniffer_class_init (PhotoFileSnifferClass * klass) {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ photo_file_sniffer_parent_class = g_type_class_peek_parent (klass);
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ ((PhotoFileSnifferClass *) klass)->finalize = photo_file_sniffer_finalize;
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ ((PhotoFileSnifferClass *) klass)->sniff = photo_file_sniffer_real_sniff;
+#line 792 "PhotoFileSniffer.c"
+}
+
+
+static void photo_file_sniffer_instance_init (PhotoFileSniffer * self) {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->ref_count = 1;
+#line 799 "PhotoFileSniffer.c"
+}
+
+
+static void photo_file_sniffer_finalize (PhotoFileSniffer* obj) {
+ PhotoFileSniffer * self;
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer);
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_signal_handlers_destroy (self);
+#line 38 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _g_object_unref0 (self->file);
+#line 811 "PhotoFileSniffer.c"
+}
+
+
+GType photo_file_sniffer_get_type (void) {
+ static volatile gsize photo_file_sniffer_type_id__volatile = 0;
+ if (g_once_init_enter (&photo_file_sniffer_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_photo_file_sniffer_init, value_photo_file_sniffer_free_value, value_photo_file_sniffer_copy_value, value_photo_file_sniffer_peek_pointer, "p", value_photo_file_sniffer_collect_value, "p", value_photo_file_sniffer_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (PhotoFileSnifferClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photo_file_sniffer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotoFileSniffer), 0, (GInstanceInitFunc) photo_file_sniffer_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 photo_file_sniffer_type_id;
+ photo_file_sniffer_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PhotoFileSniffer", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT);
+ g_once_init_leave (&photo_file_sniffer_type_id__volatile, photo_file_sniffer_type_id);
+ }
+ return photo_file_sniffer_type_id__volatile;
+}
+
+
+gpointer photo_file_sniffer_ref (gpointer instance) {
+ PhotoFileSniffer* self;
+ self = instance;
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return instance;
+#line 836 "PhotoFileSniffer.c"
+}
+
+
+void photo_file_sniffer_unref (gpointer instance) {
+ PhotoFileSniffer* self;
+ self = instance;
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ PHOTO_FILE_SNIFFER_GET_CLASS (self)->finalize (self);
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 849 "PhotoFileSniffer.c"
+ }
+}
+
+
+PhotoFileInterrogator* photo_file_interrogator_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options) {
+ PhotoFileInterrogator* self = NULL;
+ GFile* _tmp0_ = NULL;
+ GFile* _tmp1_ = NULL;
+ PhotoFileSnifferOptions _tmp2_ = 0;
+#line 67 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_val_if_fail (G_IS_FILE (file), NULL);
+#line 67 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self = (PhotoFileInterrogator*) g_type_create_instance (object_type);
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp0_ = file;
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp1_ = _g_object_ref0 (_tmp0_);
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _g_object_unref0 (self->priv->file);
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->priv->file = _tmp1_;
+#line 70 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp2_ = options;
+#line 70 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->priv->options = _tmp2_;
+#line 67 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return self;
+#line 877 "PhotoFileSniffer.c"
+}
+
+
+PhotoFileInterrogator* photo_file_interrogator_new (GFile* file, PhotoFileSnifferOptions options) {
+#line 67 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return photo_file_interrogator_construct (TYPE_PHOTO_FILE_INTERROGATOR, file, options);
+#line 884 "PhotoFileSniffer.c"
+}
+
+
+static gpointer _detected_photo_information_ref0 (gpointer self) {
+#line 76 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return self ? detected_photo_information_ref (self) : NULL;
+#line 891 "PhotoFileSniffer.c"
+}
+
+
+DetectedPhotoInformation* photo_file_interrogator_get_detected_photo_information (PhotoFileInterrogator* self) {
+ DetectedPhotoInformation* result = NULL;
+ DetectedPhotoInformation* _tmp0_ = NULL;
+ DetectedPhotoInformation* _tmp1_ = NULL;
+#line 75 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_INTERROGATOR (self), NULL);
+#line 76 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp0_ = self->priv->detected;
+#line 76 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp1_ = _detected_photo_information_ref0 (_tmp0_);
+#line 76 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ result = _tmp1_;
+#line 76 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return result;
+#line 909 "PhotoFileSniffer.c"
+}
+
+
+gboolean photo_file_interrogator_get_is_photo_corrupted (PhotoFileInterrogator* self) {
+ gboolean result = FALSE;
+ gboolean _tmp0_ = FALSE;
+#line 80 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_val_if_fail (IS_PHOTO_FILE_INTERROGATOR (self), FALSE);
+#line 81 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp0_ = self->priv->is_photo_corrupted;
+#line 81 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ result = _tmp0_;
+#line 81 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return result;
+#line 924 "PhotoFileSniffer.c"
+}
+
+
+void photo_file_interrogator_interrogate (PhotoFileInterrogator* self, GError** error) {
+ gint _tmp0_ = 0;
+ PhotoFileFormat* _tmp1_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 84 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_if_fail (IS_PHOTO_FILE_INTERROGATOR (self));
+#line 85 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp1_ = photo_file_format_get_supported (&_tmp0_);
+#line 936 "PhotoFileSniffer.c"
+ {
+ PhotoFileFormat* file_format_collection = NULL;
+ gint file_format_collection_length1 = 0;
+ gint _file_format_collection_size_ = 0;
+ gint file_format_it = 0;
+#line 85 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ file_format_collection = _tmp1_;
+#line 85 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ file_format_collection_length1 = _tmp0_;
+#line 85 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ for (file_format_it = 0; file_format_it < _tmp0_; file_format_it = file_format_it + 1) {
+#line 948 "PhotoFileSniffer.c"
+ PhotoFileFormat file_format = 0;
+#line 85 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ file_format = file_format_collection[file_format_it];
+#line 952 "PhotoFileSniffer.c"
+ {
+ PhotoFileSniffer* sniffer = NULL;
+ PhotoFileFormat _tmp2_ = 0;
+ GFile* _tmp3_ = NULL;
+ PhotoFileSnifferOptions _tmp4_ = 0;
+ PhotoFileSniffer* _tmp5_ = NULL;
+ gboolean is_corrupted = FALSE;
+ DetectedPhotoInformation* _tmp6_ = NULL;
+ PhotoFileSniffer* _tmp7_ = NULL;
+ gboolean _tmp8_ = FALSE;
+ DetectedPhotoInformation* _tmp9_ = NULL;
+ DetectedPhotoInformation* _tmp10_ = NULL;
+ gboolean _tmp11_ = FALSE;
+ DetectedPhotoInformation* _tmp12_ = NULL;
+#line 86 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp2_ = file_format;
+#line 86 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp3_ = self->priv->file;
+#line 86 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp4_ = self->priv->options;
+#line 86 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp5_ = photo_file_format_create_sniffer (_tmp2_, _tmp3_, _tmp4_);
+#line 86 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ sniffer = _tmp5_;
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp7_ = sniffer;
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp9_ = photo_file_sniffer_sniff (_tmp7_, &_tmp8_, &_inner_error_);
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ is_corrupted = _tmp8_;
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp6_ = _tmp9_;
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_propagate_error (error, _inner_error_);
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _photo_file_sniffer_unref0 (sniffer);
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ file_format_collection = (g_free (file_format_collection), NULL);
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return;
+#line 995 "PhotoFileSniffer.c"
+ }
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp10_ = _tmp6_;
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp6_ = NULL;
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _detected_photo_information_unref0 (self->priv->detected);
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->priv->detected = _tmp10_;
+#line 90 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp12_ = self->priv->detected;
+#line 90 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (_tmp12_ != NULL) {
+#line 1009 "PhotoFileSniffer.c"
+ gboolean _tmp13_ = FALSE;
+#line 90 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp13_ = is_corrupted;
+#line 90 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp11_ = !_tmp13_;
+#line 1015 "PhotoFileSniffer.c"
+ } else {
+#line 90 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp11_ = FALSE;
+#line 1019 "PhotoFileSniffer.c"
+ }
+#line 90 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (_tmp11_) {
+#line 1023 "PhotoFileSniffer.c"
+ DetectedPhotoInformation* _tmp14_ = NULL;
+ PhotoFileFormat _tmp15_ = 0;
+ PhotoFileFormat _tmp16_ = 0;
+#line 91 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp14_ = self->priv->detected;
+#line 91 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp15_ = _tmp14_->file_format;
+#line 91 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp16_ = file_format;
+#line 91 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _vala_assert (_tmp15_ == _tmp16_, "detected.file_format == file_format");
+#line 93 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _detected_photo_information_unref0 (_tmp6_);
+#line 93 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _photo_file_sniffer_unref0 (sniffer);
+#line 93 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ break;
+#line 1041 "PhotoFileSniffer.c"
+ } else {
+ gboolean _tmp17_ = FALSE;
+#line 94 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp17_ = is_corrupted;
+#line 94 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (_tmp17_) {
+#line 1048 "PhotoFileSniffer.c"
+ GFile* _tmp18_ = NULL;
+ gchar* _tmp19_ = NULL;
+ gchar* _tmp20_ = NULL;
+#line 95 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp18_ = self->priv->file;
+#line 95 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp19_ = g_file_get_path (_tmp18_);
+#line 95 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _tmp20_ = _tmp19_;
+#line 95 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_message ("PhotoFileSniffer.vala:95: Sniffing halted for %s: potentially corrupte" \
+"d image file", _tmp20_);
+#line 95 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _g_free0 (_tmp20_);
+#line 96 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->priv->is_photo_corrupted = TRUE;
+#line 97 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _detected_photo_information_unref0 (self->priv->detected);
+#line 97 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->priv->detected = NULL;
+#line 99 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _detected_photo_information_unref0 (_tmp6_);
+#line 99 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _photo_file_sniffer_unref0 (sniffer);
+#line 99 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ break;
+#line 1074 "PhotoFileSniffer.c"
+ }
+ }
+#line 85 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _detected_photo_information_unref0 (_tmp6_);
+#line 85 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _photo_file_sniffer_unref0 (sniffer);
+#line 1081 "PhotoFileSniffer.c"
+ }
+ }
+#line 85 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ file_format_collection = (g_free (file_format_collection), NULL);
+#line 1086 "PhotoFileSniffer.c"
+ }
+}
+
+
+static void value_photo_file_interrogator_init (GValue* value) {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = NULL;
+#line 1094 "PhotoFileSniffer.c"
+}
+
+
+static void value_photo_file_interrogator_free_value (GValue* value) {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (value->data[0].v_pointer) {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ photo_file_interrogator_unref (value->data[0].v_pointer);
+#line 1103 "PhotoFileSniffer.c"
+ }
+}
+
+
+static void value_photo_file_interrogator_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (src_value->data[0].v_pointer) {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ dest_value->data[0].v_pointer = photo_file_interrogator_ref (src_value->data[0].v_pointer);
+#line 1113 "PhotoFileSniffer.c"
+ } else {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 1117 "PhotoFileSniffer.c"
+ }
+}
+
+
+static gpointer value_photo_file_interrogator_peek_pointer (const GValue* value) {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return value->data[0].v_pointer;
+#line 1125 "PhotoFileSniffer.c"
+}
+
+
+static gchar* value_photo_file_interrogator_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (collect_values[0].v_pointer) {
+#line 1132 "PhotoFileSniffer.c"
+ PhotoFileInterrogator* object;
+ object = collect_values[0].v_pointer;
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 1139 "PhotoFileSniffer.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.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 1143 "PhotoFileSniffer.c"
+ }
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = photo_file_interrogator_ref (object);
+#line 1147 "PhotoFileSniffer.c"
+ } else {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = NULL;
+#line 1151 "PhotoFileSniffer.c"
+ }
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return NULL;
+#line 1155 "PhotoFileSniffer.c"
+}
+
+
+static gchar* value_photo_file_interrogator_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ PhotoFileInterrogator** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (!object_p) {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 1166 "PhotoFileSniffer.c"
+ }
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (!value->data[0].v_pointer) {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ *object_p = NULL;
+#line 1172 "PhotoFileSniffer.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ *object_p = value->data[0].v_pointer;
+#line 1176 "PhotoFileSniffer.c"
+ } else {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ *object_p = photo_file_interrogator_ref (value->data[0].v_pointer);
+#line 1180 "PhotoFileSniffer.c"
+ }
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return NULL;
+#line 1184 "PhotoFileSniffer.c"
+}
+
+
+GParamSpec* param_spec_photo_file_interrogator (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecPhotoFileInterrogator* spec;
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_PHOTO_FILE_INTERROGATOR), NULL);
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return G_PARAM_SPEC (spec);
+#line 1198 "PhotoFileSniffer.c"
+}
+
+
+gpointer value_get_photo_file_interrogator (const GValue* value) {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PHOTO_FILE_INTERROGATOR), NULL);
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return value->data[0].v_pointer;
+#line 1207 "PhotoFileSniffer.c"
+}
+
+
+void value_set_photo_file_interrogator (GValue* value, gpointer v_object) {
+ PhotoFileInterrogator* old;
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PHOTO_FILE_INTERROGATOR));
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ old = value->data[0].v_pointer;
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (v_object) {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PHOTO_FILE_INTERROGATOR));
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = v_object;
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ photo_file_interrogator_ref (value->data[0].v_pointer);
+#line 1227 "PhotoFileSniffer.c"
+ } else {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = NULL;
+#line 1231 "PhotoFileSniffer.c"
+ }
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (old) {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ photo_file_interrogator_unref (old);
+#line 1237 "PhotoFileSniffer.c"
+ }
+}
+
+
+void value_take_photo_file_interrogator (GValue* value, gpointer v_object) {
+ PhotoFileInterrogator* old;
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PHOTO_FILE_INTERROGATOR));
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ old = value->data[0].v_pointer;
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (v_object) {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PHOTO_FILE_INTERROGATOR));
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = v_object;
+#line 1256 "PhotoFileSniffer.c"
+ } else {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ value->data[0].v_pointer = NULL;
+#line 1260 "PhotoFileSniffer.c"
+ }
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (old) {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ photo_file_interrogator_unref (old);
+#line 1266 "PhotoFileSniffer.c"
+ }
+}
+
+
+static void photo_file_interrogator_class_init (PhotoFileInterrogatorClass * klass) {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ photo_file_interrogator_parent_class = g_type_class_peek_parent (klass);
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ ((PhotoFileInterrogatorClass *) klass)->finalize = photo_file_interrogator_finalize;
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_type_class_add_private (klass, sizeof (PhotoFileInterrogatorPrivate));
+#line 1278 "PhotoFileSniffer.c"
+}
+
+
+static void photo_file_interrogator_instance_init (PhotoFileInterrogator * self) {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->priv = PHOTO_FILE_INTERROGATOR_GET_PRIVATE (self);
+#line 64 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->priv->detected = NULL;
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->priv->is_photo_corrupted = FALSE;
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self->ref_count = 1;
+#line 1291 "PhotoFileSniffer.c"
+}
+
+
+static void photo_file_interrogator_finalize (PhotoFileInterrogator* obj) {
+ PhotoFileInterrogator * self;
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PHOTO_FILE_INTERROGATOR, PhotoFileInterrogator);
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_signal_handlers_destroy (self);
+#line 62 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _g_object_unref0 (self->priv->file);
+#line 64 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ _detected_photo_information_unref0 (self->priv->detected);
+#line 1305 "PhotoFileSniffer.c"
+}
+
+
+GType photo_file_interrogator_get_type (void) {
+ static volatile gsize photo_file_interrogator_type_id__volatile = 0;
+ if (g_once_init_enter (&photo_file_interrogator_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_photo_file_interrogator_init, value_photo_file_interrogator_free_value, value_photo_file_interrogator_copy_value, value_photo_file_interrogator_peek_pointer, "p", value_photo_file_interrogator_collect_value, "p", value_photo_file_interrogator_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (PhotoFileInterrogatorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photo_file_interrogator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotoFileInterrogator), 0, (GInstanceInitFunc) photo_file_interrogator_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 photo_file_interrogator_type_id;
+ photo_file_interrogator_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PhotoFileInterrogator", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&photo_file_interrogator_type_id__volatile, photo_file_interrogator_type_id);
+ }
+ return photo_file_interrogator_type_id__volatile;
+}
+
+
+gpointer photo_file_interrogator_ref (gpointer instance) {
+ PhotoFileInterrogator* self;
+ self = instance;
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ return instance;
+#line 1330 "PhotoFileSniffer.c"
+}
+
+
+void photo_file_interrogator_unref (gpointer instance) {
+ PhotoFileInterrogator* self;
+ self = instance;
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ PHOTO_FILE_INTERROGATOR_GET_CLASS (self)->finalize (self);
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 1343 "PhotoFileSniffer.c"
+ }
+}
+
+
+
diff --git a/src/photos/PhotoMetadata.c b/src/photos/PhotoMetadata.c
new file mode 100644
index 0000000..1418eb3
--- /dev/null
+++ b/src/photos/PhotoMetadata.c
@@ -0,0 +1,8924 @@
+/* PhotoMetadata.c generated by valac 0.32.1, the Vala compiler
+ * generated from PhotoMetadata.vala, do not modify */
+
+/* Copyright 2016 Software Freedom Conservancy Inc.
+ *
+ * This software is licensed under the GNU Lesser General Public License
+ * (version 2.1 or later). See the COPYING file in this distribution.
+ */
+/**/
+/* PhotoMetadata*/
+/**/
+/* PhotoMetadata is a wrapper class around gexiv2. The reasoning for this is (a) to facilitiate*/
+/* interface changes to meet Shotwell's requirements without needing modifications of the library*/
+/* itself, and (b) some requirements for this class (i.e. obtaining raw metadata) is not available*/
+/* in gexiv2, and so must be done by hand.*/
+/**/
+/* Although it's perceived that Exiv2 will remain Shotwell's metadata library of choice, this*/
+/* may change in the future, and so this wrapper helps with that as well.*/
+/**/
+/* There is no expectation of thread-safety in this class (yet).*/
+/**/
+/* Tags come from Exiv2's naming scheme:*/
+/* http://www.exiv2.org/metadata.html*/
+/**/
+
+#include <glib.h>
+#include <glib-object.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gio/gio.h>
+#include <gexiv2/gexiv2.h>
+#include <libexif/exif-data.h>
+#include <gee.h>
+#include <libexif/exif-mem.h>
+#include <float.h>
+#include <math.h>
+#include <gobject/gvaluecollector.h>
+
+
+#define TYPE_METADATA_DOMAIN (metadata_domain_get_type ())
+
+#define TYPE_HIERARCHICAL_KEYWORD_FIELD (hierarchical_keyword_field_get_type ())
+#define HIERARCHICAL_KEYWORD_FIELD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_HIERARCHICAL_KEYWORD_FIELD, HierarchicalKeywordField))
+#define HIERARCHICAL_KEYWORD_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_HIERARCHICAL_KEYWORD_FIELD, HierarchicalKeywordFieldClass))
+#define IS_HIERARCHICAL_KEYWORD_FIELD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_HIERARCHICAL_KEYWORD_FIELD))
+#define IS_HIERARCHICAL_KEYWORD_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_HIERARCHICAL_KEYWORD_FIELD))
+#define HIERARCHICAL_KEYWORD_FIELD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_HIERARCHICAL_KEYWORD_FIELD, HierarchicalKeywordFieldClass))
+
+typedef struct _HierarchicalKeywordField HierarchicalKeywordField;
+typedef struct _HierarchicalKeywordFieldClass HierarchicalKeywordFieldClass;
+typedef struct _HierarchicalKeywordFieldPrivate HierarchicalKeywordFieldPrivate;
+#define _g_free0(var) (var = (g_free (var), NULL))
+typedef struct _ParamSpecHierarchicalKeywordField ParamSpecHierarchicalKeywordField;
+
+#define TYPE_PHOTO_PREVIEW (photo_preview_get_type ())
+#define PHOTO_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_PREVIEW, PhotoPreview))
+#define PHOTO_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_PREVIEW, PhotoPreviewClass))
+#define IS_PHOTO_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_PREVIEW))
+#define IS_PHOTO_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_PREVIEW))
+#define PHOTO_PREVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_PREVIEW, PhotoPreviewClass))
+
+typedef struct _PhotoPreview PhotoPreview;
+typedef struct _PhotoPreviewClass PhotoPreviewClass;
+typedef struct _PhotoPreviewPrivate PhotoPreviewPrivate;
+
+#define TYPE_DIMENSIONS (dimensions_get_type ())
+typedef struct _Dimensions Dimensions;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
+typedef struct _ParamSpecPhotoPreview ParamSpecPhotoPreview;
+
+#define TYPE_MEDIA_METADATA (media_metadata_get_type ())
+#define MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_METADATA, MediaMetadata))
+#define MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_METADATA, MediaMetadataClass))
+#define IS_MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_METADATA))
+#define IS_MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_METADATA))
+#define MEDIA_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_METADATA, MediaMetadataClass))
+
+typedef struct _MediaMetadata MediaMetadata;
+typedef struct _MediaMetadataClass MediaMetadataClass;
+typedef struct _MediaMetadataPrivate MediaMetadataPrivate;
+
+#define TYPE_METADATA_DATE_TIME (metadata_date_time_get_type ())
+#define METADATA_DATE_TIME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_METADATA_DATE_TIME, MetadataDateTime))
+#define METADATA_DATE_TIME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_METADATA_DATE_TIME, MetadataDateTimeClass))
+#define IS_METADATA_DATE_TIME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_METADATA_DATE_TIME))
+#define IS_METADATA_DATE_TIME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_METADATA_DATE_TIME))
+#define METADATA_DATE_TIME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_METADATA_DATE_TIME, MetadataDateTimeClass))
+
+typedef struct _MetadataDateTime MetadataDateTime;
+typedef struct _MetadataDateTimeClass MetadataDateTimeClass;
+
+#define TYPE_PHOTO_METADATA (photo_metadata_get_type ())
+#define PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_METADATA, PhotoMetadata))
+#define PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_METADATA, PhotoMetadataClass))
+#define IS_PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_METADATA))
+#define IS_PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_METADATA))
+#define PHOTO_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_METADATA, PhotoMetadataClass))
+
+typedef struct _PhotoMetadata PhotoMetadata;
+typedef struct _PhotoMetadataClass PhotoMetadataClass;
+typedef struct _PhotoMetadataPrivate PhotoMetadataPrivate;
+
+#define PHOTO_METADATA_TYPE_SET_OPTION (photo_metadata_set_option_get_type ())
+#define _gexiv2_metadata_free0(var) ((var == NULL) ? NULL : (var = (gexiv2_metadata_free (var), NULL)))
+#define _exif_data_unref0(var) ((var == NULL) ? NULL : (var = (exif_data_unref (var), NULL)))
+
+#define TYPE_PREPARE_INPUT_TEXT_OPTIONS (prepare_input_text_options_get_type ())
+typedef struct _Block1Data Block1Data;
+#define _media_metadata_unref0(var) ((var == NULL) ? NULL : (var = (media_metadata_unref (var), NULL)))
+typedef struct _Block2Data Block2Data;
+typedef struct _Block3Data Block3Data;
+
+#define TYPE_METADATA_RATIONAL (metadata_rational_get_type ())
+typedef struct _MetadataRational MetadataRational;
+typedef struct _Block4Data Block4Data;
+#define _metadata_date_time_unref0(var) ((var == NULL) ? NULL : (var = (metadata_date_time_unref (var), NULL)))
+typedef struct _Block5Data Block5Data;
+#define _exif_mem_unref0(var) ((var == NULL) ? NULL : (var = (exif_mem_unref (var), NULL)))
+
+#define PHOTO_METADATA_TYPE_INTERNAL_PHOTO_PREVIEW (photo_metadata_internal_photo_preview_get_type ())
+#define PHOTO_METADATA_INTERNAL_PHOTO_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHOTO_METADATA_TYPE_INTERNAL_PHOTO_PREVIEW, PhotoMetadataInternalPhotoPreview))
+#define PHOTO_METADATA_INTERNAL_PHOTO_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOTO_METADATA_TYPE_INTERNAL_PHOTO_PREVIEW, PhotoMetadataInternalPhotoPreviewClass))
+#define PHOTO_METADATA_IS_INTERNAL_PHOTO_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHOTO_METADATA_TYPE_INTERNAL_PHOTO_PREVIEW))
+#define PHOTO_METADATA_IS_INTERNAL_PHOTO_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOTO_METADATA_TYPE_INTERNAL_PHOTO_PREVIEW))
+#define PHOTO_METADATA_INTERNAL_PHOTO_PREVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOTO_METADATA_TYPE_INTERNAL_PHOTO_PREVIEW, PhotoMetadataInternalPhotoPreviewClass))
+
+typedef struct _PhotoMetadataInternalPhotoPreview PhotoMetadataInternalPhotoPreview;
+typedef struct _PhotoMetadataInternalPhotoPreviewClass PhotoMetadataInternalPhotoPreviewClass;
+
+#define TYPE_HIERARCHICAL_TAG_INDEX (hierarchical_tag_index_get_type ())
+#define HIERARCHICAL_TAG_INDEX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_HIERARCHICAL_TAG_INDEX, HierarchicalTagIndex))
+#define HIERARCHICAL_TAG_INDEX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_HIERARCHICAL_TAG_INDEX, HierarchicalTagIndexClass))
+#define IS_HIERARCHICAL_TAG_INDEX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_HIERARCHICAL_TAG_INDEX))
+#define IS_HIERARCHICAL_TAG_INDEX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_HIERARCHICAL_TAG_INDEX))
+#define HIERARCHICAL_TAG_INDEX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_HIERARCHICAL_TAG_INDEX, HierarchicalTagIndexClass))
+
+typedef struct _HierarchicalTagIndex HierarchicalTagIndex;
+typedef struct _HierarchicalTagIndexClass HierarchicalTagIndexClass;
+#define _hierarchical_keyword_field_unref0(var) ((var == NULL) ? NULL : (var = (hierarchical_keyword_field_unref (var), NULL)))
+#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
+#define _hierarchical_tag_index_unref0(var) ((var == NULL) ? NULL : (var = (hierarchical_tag_index_unref (var), NULL)))
+
+#define TYPE_ORIENTATION (orientation_get_type ())
+
+#define TYPE_RATING (rating_get_type ())
+typedef struct _PhotoMetadataInternalPhotoPreviewPrivate PhotoMetadataInternalPhotoPreviewPrivate;
+#define _gexiv2_preview_image_free0(var) ((var == NULL) ? NULL : (var = (gexiv2_preview_image_free (var), NULL)))
+#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
+#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
+#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
+#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
+
+typedef enum {
+ METADATA_DOMAIN_UNKNOWN,
+ METADATA_DOMAIN_EXIF,
+ METADATA_DOMAIN_XMP,
+ METADATA_DOMAIN_IPTC
+} MetadataDomain;
+
+struct _HierarchicalKeywordField {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ HierarchicalKeywordFieldPrivate * priv;
+ gchar* field_name;
+ gchar* path_separator;
+ gboolean wants_leading_separator;
+ gboolean is_writeable;
+};
+
+struct _HierarchicalKeywordFieldClass {
+ GTypeClass parent_class;
+ void (*finalize) (HierarchicalKeywordField *self);
+};
+
+struct _ParamSpecHierarchicalKeywordField {
+ GParamSpec parent_instance;
+};
+
+struct _PhotoPreview {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoPreviewPrivate * priv;
+};
+
+struct _PhotoPreviewClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoPreview *self);
+ guint8* (*flatten) (PhotoPreview* self, int* result_length1, GError** error);
+ GdkPixbuf* (*get_pixbuf) (PhotoPreview* self, GError** error);
+};
+
+struct _Dimensions {
+ gint width;
+ gint height;
+};
+
+struct _PhotoPreviewPrivate {
+ gchar* name;
+ Dimensions dimensions;
+ guint32 size;
+ gchar* mime_type;
+ gchar* extension;
+};
+
+struct _ParamSpecPhotoPreview {
+ GParamSpec parent_instance;
+};
+
+struct _MediaMetadata {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ MediaMetadataPrivate * priv;
+};
+
+struct _MediaMetadataClass {
+ GTypeClass parent_class;
+ void (*finalize) (MediaMetadata *self);
+ void (*read_from_file) (MediaMetadata* self, GFile* file, GError** error);
+ MetadataDateTime* (*get_creation_date_time) (MediaMetadata* self);
+ gchar* (*get_title) (MediaMetadata* self);
+ gchar* (*get_comment) (MediaMetadata* self);
+};
+
+struct _PhotoMetadata {
+ MediaMetadata parent_instance;
+ PhotoMetadataPrivate * priv;
+};
+
+struct _PhotoMetadataClass {
+ MediaMetadataClass parent_class;
+};
+
+struct _PhotoMetadataPrivate {
+ GExiv2Metadata* exiv2;
+ ExifData* exif;
+ gchar* source_name;
+};
+
+typedef enum {
+ PHOTO_METADATA_SET_OPTION_ALL_DOMAINS,
+ PHOTO_METADATA_SET_OPTION_ONLY_IF_DOMAIN_PRESENT,
+ PHOTO_METADATA_SET_OPTION_AT_LEAST_DEFAULT_DOMAIN
+} PhotoMetadataSetOption;
+
+typedef enum {
+ PREPARE_INPUT_TEXT_OPTIONS_EMPTY_IS_NULL = 1 << 0,
+ PREPARE_INPUT_TEXT_OPTIONS_VALIDATE = 1 << 1,
+ PREPARE_INPUT_TEXT_OPTIONS_INVALID_IS_NULL = 1 << 2,
+ PREPARE_INPUT_TEXT_OPTIONS_STRIP = 1 << 3,
+ PREPARE_INPUT_TEXT_OPTIONS_STRIP_CRLF = 1 << 4,
+ PREPARE_INPUT_TEXT_OPTIONS_NORMALIZE = 1 << 5,
+ PREPARE_INPUT_TEXT_OPTIONS_DEFAULT = ((((PREPARE_INPUT_TEXT_OPTIONS_EMPTY_IS_NULL | PREPARE_INPUT_TEXT_OPTIONS_VALIDATE) | PREPARE_INPUT_TEXT_OPTIONS_INVALID_IS_NULL) | PREPARE_INPUT_TEXT_OPTIONS_STRIP_CRLF) | PREPARE_INPUT_TEXT_OPTIONS_STRIP) | PREPARE_INPUT_TEXT_OPTIONS_NORMALIZE
+} PrepareInputTextOptions;
+
+typedef void (*PhotoMetadataSetGenericValue) (const gchar* tag, void* user_data);
+struct _Block1Data {
+ int _ref_count_;
+ PhotoMetadata* self;
+ gchar* value;
+};
+
+struct _Block2Data {
+ int _ref_count_;
+ PhotoMetadata* self;
+ GeeCollection* values;
+};
+
+struct _Block3Data {
+ int _ref_count_;
+ PhotoMetadata* self;
+ glong value;
+};
+
+struct _MetadataRational {
+ gint numerator;
+ gint denominator;
+};
+
+struct _Block4Data {
+ int _ref_count_;
+ PhotoMetadata* self;
+ MetadataRational rational;
+};
+
+typedef enum {
+ METADATA_DATE_TIME_ERROR_INVALID_FORMAT,
+ METADATA_DATE_TIME_ERROR_UNSUPPORTED_FORMAT
+} MetadataDateTimeError;
+#define METADATA_DATE_TIME_ERROR metadata_date_time_error_quark ()
+struct _Block5Data {
+ int _ref_count_;
+ PhotoMetadata* self;
+ MetadataDateTime* date_time;
+};
+
+typedef enum {
+ ORIENTATION_MIN = 1,
+ ORIENTATION_TOP_LEFT = 1,
+ ORIENTATION_TOP_RIGHT = 2,
+ ORIENTATION_BOTTOM_RIGHT = 3,
+ ORIENTATION_BOTTOM_LEFT = 4,
+ ORIENTATION_LEFT_TOP = 5,
+ ORIENTATION_RIGHT_TOP = 6,
+ ORIENTATION_RIGHT_BOTTOM = 7,
+ ORIENTATION_LEFT_BOTTOM = 8,
+ ORIENTATION_MAX = 8
+} Orientation;
+
+typedef enum {
+ RATING_REJECTED = -1,
+ RATING_UNRATED = 0,
+ RATING_ONE = 1,
+ RATING_TWO = 2,
+ RATING_THREE = 3,
+ RATING_FOUR = 4,
+ RATING_FIVE = 5
+} Rating;
+
+struct _PhotoMetadataInternalPhotoPreview {
+ PhotoPreview parent_instance;
+ PhotoMetadataInternalPhotoPreviewPrivate * priv;
+ PhotoMetadata* owner;
+ guint number;
+};
+
+struct _PhotoMetadataInternalPhotoPreviewClass {
+ PhotoPreviewClass parent_class;
+};
+
+
+static gpointer hierarchical_keyword_field_parent_class = NULL;
+static gpointer photo_preview_parent_class = NULL;
+static gpointer photo_metadata_parent_class = NULL;
+static gchar** photo_metadata_DATE_TIME_TAGS;
+static gint photo_metadata_DATE_TIME_TAGS_length1;
+static gchar** photo_metadata_DATE_TIME_TAGS = NULL;
+static gint photo_metadata_DATE_TIME_TAGS_length1 = 0;
+static gint _photo_metadata_DATE_TIME_TAGS_size_ = 0;
+static gchar** photo_metadata_EXPOSURE_DATE_TIME_TAGS;
+static gint photo_metadata_EXPOSURE_DATE_TIME_TAGS_length1;
+static gchar** photo_metadata_EXPOSURE_DATE_TIME_TAGS = NULL;
+static gint photo_metadata_EXPOSURE_DATE_TIME_TAGS_length1 = 0;
+static gint _photo_metadata_EXPOSURE_DATE_TIME_TAGS_size_ = 0;
+static gchar** photo_metadata_DIGITIZED_DATE_TIME_TAGS;
+static gint photo_metadata_DIGITIZED_DATE_TIME_TAGS_length1;
+static gchar** photo_metadata_DIGITIZED_DATE_TIME_TAGS = NULL;
+static gint photo_metadata_DIGITIZED_DATE_TIME_TAGS_length1 = 0;
+static gint _photo_metadata_DIGITIZED_DATE_TIME_TAGS_size_ = 0;
+static gchar** photo_metadata_WIDTH_TAGS;
+static gint photo_metadata_WIDTH_TAGS_length1;
+static gchar** photo_metadata_WIDTH_TAGS = NULL;
+static gint photo_metadata_WIDTH_TAGS_length1 = 0;
+static gint _photo_metadata_WIDTH_TAGS_size_ = 0;
+extern gchar** photo_metadata_HEIGHT_TAGS;
+extern gint photo_metadata_HEIGHT_TAGS_length1;
+gchar** photo_metadata_HEIGHT_TAGS = NULL;
+gint photo_metadata_HEIGHT_TAGS_length1 = 0;
+static gchar** photo_metadata_STANDARD_TITLE_TAGS;
+static gint photo_metadata_STANDARD_TITLE_TAGS_length1;
+static gchar** photo_metadata_STANDARD_TITLE_TAGS = NULL;
+static gint photo_metadata_STANDARD_TITLE_TAGS_length1 = 0;
+static gint _photo_metadata_STANDARD_TITLE_TAGS_size_ = 0;
+static gchar** photo_metadata_KEYWORD_TAGS;
+static gint photo_metadata_KEYWORD_TAGS_length1;
+static gchar** photo_metadata_KEYWORD_TAGS = NULL;
+static gint photo_metadata_KEYWORD_TAGS_length1 = 0;
+static gint _photo_metadata_KEYWORD_TAGS_size_ = 0;
+static HierarchicalKeywordField** photo_metadata_HIERARCHICAL_KEYWORD_TAGS;
+static gint photo_metadata_HIERARCHICAL_KEYWORD_TAGS_length1;
+static HierarchicalKeywordField** photo_metadata_HIERARCHICAL_KEYWORD_TAGS = NULL;
+static gint photo_metadata_HIERARCHICAL_KEYWORD_TAGS_length1 = 0;
+static gint _photo_metadata_HIERARCHICAL_KEYWORD_TAGS_size_ = 0;
+static gchar** photo_metadata_ARTIST_TAGS;
+static gint photo_metadata_ARTIST_TAGS_length1;
+static gchar** photo_metadata_ARTIST_TAGS = NULL;
+static gint photo_metadata_ARTIST_TAGS_length1 = 0;
+static gint _photo_metadata_ARTIST_TAGS_size_ = 0;
+static gchar** photo_metadata_RATING_TAGS;
+static gint photo_metadata_RATING_TAGS_length1;
+static gchar** photo_metadata_RATING_TAGS = NULL;
+static gint photo_metadata_RATING_TAGS_length1 = 0;
+static gint _photo_metadata_RATING_TAGS_size_ = 0;
+static gpointer photo_metadata_internal_photo_preview_parent_class = NULL;
+
+GType metadata_domain_get_type (void) G_GNUC_CONST;
+gpointer hierarchical_keyword_field_ref (gpointer instance);
+void hierarchical_keyword_field_unref (gpointer instance);
+GParamSpec* param_spec_hierarchical_keyword_field (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_hierarchical_keyword_field (GValue* value, gpointer v_object);
+void value_take_hierarchical_keyword_field (GValue* value, gpointer v_object);
+gpointer value_get_hierarchical_keyword_field (const GValue* value);
+GType hierarchical_keyword_field_get_type (void) G_GNUC_CONST;
+enum {
+ HIERARCHICAL_KEYWORD_FIELD_DUMMY_PROPERTY
+};
+HierarchicalKeywordField* hierarchical_keyword_field_new (const gchar* field_name, const gchar* path_separator, gboolean wants_leading_separator, gboolean is_writeable);
+HierarchicalKeywordField* hierarchical_keyword_field_construct (GType object_type, const gchar* field_name, const gchar* path_separator, gboolean wants_leading_separator, gboolean is_writeable);
+static void hierarchical_keyword_field_finalize (HierarchicalKeywordField* obj);
+gpointer photo_preview_ref (gpointer instance);
+void photo_preview_unref (gpointer instance);
+GParamSpec* param_spec_photo_preview (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_preview (GValue* value, gpointer v_object);
+void value_take_photo_preview (GValue* value, gpointer v_object);
+gpointer value_get_photo_preview (const GValue* value);
+GType photo_preview_get_type (void) G_GNUC_CONST;
+GType dimensions_get_type (void) G_GNUC_CONST;
+Dimensions* dimensions_dup (const Dimensions* self);
+void dimensions_free (Dimensions* self);
+#define PHOTO_PREVIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_PHOTO_PREVIEW, PhotoPreviewPrivate))
+enum {
+ PHOTO_PREVIEW_DUMMY_PROPERTY
+};
+PhotoPreview* photo_preview_construct (GType object_type, const gchar* name, Dimensions* dimensions, guint32 size, const gchar* mime_type, const gchar* extension);
+gchar* photo_preview_get_name (PhotoPreview* self);
+void photo_preview_get_pixel_dimensions (PhotoPreview* self, Dimensions* result);
+guint32 photo_preview_get_size (PhotoPreview* self);
+gchar* photo_preview_get_mime_type (PhotoPreview* self);
+gchar* photo_preview_get_extension (PhotoPreview* self);
+guint8* photo_preview_flatten (PhotoPreview* self, int* result_length1, GError** error);
+static guint8* photo_preview_real_flatten (PhotoPreview* self, int* result_length1, GError** error);
+GdkPixbuf* photo_preview_get_pixbuf (PhotoPreview* self, GError** error);
+static GdkPixbuf* photo_preview_real_get_pixbuf (PhotoPreview* self, GError** error);
+static guint8* _vala_array_dup4 (guint8* self, int length);
+static void photo_preview_finalize (PhotoPreview* obj);
+gpointer media_metadata_ref (gpointer instance);
+void media_metadata_unref (gpointer instance);
+GParamSpec* param_spec_media_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_media_metadata (GValue* value, gpointer v_object);
+void value_take_media_metadata (GValue* value, gpointer v_object);
+gpointer value_get_media_metadata (const GValue* value);
+GType media_metadata_get_type (void) G_GNUC_CONST;
+gpointer metadata_date_time_ref (gpointer instance);
+void metadata_date_time_unref (gpointer instance);
+GParamSpec* param_spec_metadata_date_time (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_metadata_date_time (GValue* value, gpointer v_object);
+void value_take_metadata_date_time (GValue* value, gpointer v_object);
+gpointer value_get_metadata_date_time (const GValue* value);
+GType metadata_date_time_get_type (void) G_GNUC_CONST;
+GType photo_metadata_get_type (void) G_GNUC_CONST;
+#define PHOTO_METADATA_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_PHOTO_METADATA, PhotoMetadataPrivate))
+enum {
+ PHOTO_METADATA_DUMMY_PROPERTY
+};
+GType photo_metadata_set_option_get_type (void) G_GNUC_CONST;
+GType prepare_input_text_options_get_type (void) G_GNUC_CONST;
+#define PHOTO_METADATA_PREPARE_STRING_OPTIONS (((((PREPARE_INPUT_TEXT_OPTIONS_INVALID_IS_NULL | PREPARE_INPUT_TEXT_OPTIONS_EMPTY_IS_NULL) | PREPARE_INPUT_TEXT_OPTIONS_STRIP) | PREPARE_INPUT_TEXT_OPTIONS_STRIP_CRLF) | PREPARE_INPUT_TEXT_OPTIONS_NORMALIZE) | PREPARE_INPUT_TEXT_OPTIONS_VALIDATE)
+#define PHOTO_METADATA_IPHOTO_TITLE_TAG "Iptc.Application2.ObjectName"
+PhotoMetadata* photo_metadata_new (void);
+PhotoMetadata* photo_metadata_construct (GType object_type);
+MediaMetadata* media_metadata_construct (GType object_type);
+static void photo_metadata_real_read_from_file (MediaMetadata* base, GFile* file, GError** error);
+void photo_metadata_write_to_file (PhotoMetadata* self, GFile* file, GError** error);
+void photo_metadata_read_from_buffer (PhotoMetadata* self, guint8* buffer, int buffer_length1, gint length, GError** error);
+void photo_metadata_read_from_app1_segment (PhotoMetadata* self, guint8* buffer, int buffer_length1, gint length, GError** error);
+MetadataDomain photo_metadata_get_tag_domain (const gchar* tag);
+gboolean photo_metadata_has_domain (PhotoMetadata* self, MetadataDomain domain);
+gboolean photo_metadata_has_exif (PhotoMetadata* self);
+gboolean photo_metadata_has_xmp (PhotoMetadata* self);
+gboolean photo_metadata_has_iptc (PhotoMetadata* self);
+gboolean photo_metadata_can_write_to_domain (PhotoMetadata* self, MetadataDomain domain);
+gboolean photo_metadata_can_write_exif (PhotoMetadata* self);
+gboolean photo_metadata_can_write_xmp (PhotoMetadata* self);
+gboolean photo_metadata_can_write_iptc (PhotoMetadata* self);
+gboolean photo_metadata_has_tag (PhotoMetadata* self, const gchar* tag);
+static GeeSet* photo_metadata_create_string_set (PhotoMetadata* self, GCompareDataFunc compare_func, void* compare_func_target, GDestroyNotify compare_func_target_destroy_notify);
+GeeCollection* photo_metadata_get_tags (PhotoMetadata* self, MetadataDomain domain, GCompareDataFunc compare_func, void* compare_func_target, GDestroyNotify compare_func_target_destroy_notify);
+GeeCollection* photo_metadata_get_all_tags (PhotoMetadata* self, GCompareDataFunc compare_func, void* compare_func_target, GDestroyNotify compare_func_target_destroy_notify);
+gchar* photo_metadata_get_tag_label (PhotoMetadata* self, const gchar* tag);
+gchar* photo_metadata_get_tag_description (PhotoMetadata* self, const gchar* tag);
+gchar* photo_metadata_get_string (PhotoMetadata* self, const gchar* tag, PrepareInputTextOptions options);
+gchar* prepare_input_text (const gchar* text, PrepareInputTextOptions options, gint dest_length);
+#define DEFAULT_USER_TEXT_INPUT_LENGTH 1024
+gchar* photo_metadata_get_string_interpreted (PhotoMetadata* self, const gchar* tag, PrepareInputTextOptions options);
+gchar* photo_metadata_get_first_string (PhotoMetadata* self, gchar** tags, int tags_length1);
+gchar* photo_metadata_get_first_string_interpreted (PhotoMetadata* self, gchar** tags, int tags_length1);
+GeeList* photo_metadata_get_string_multiple (PhotoMetadata* self, const gchar* tag);
+GeeList* photo_metadata_get_first_string_multiple (PhotoMetadata* self, gchar** tags, int tags_length1);
+void photo_metadata_set_string (PhotoMetadata* self, const gchar* tag, const gchar* value, PrepareInputTextOptions options);
+static void photo_metadata_set_all_generic (PhotoMetadata* self, gchar** tags, int tags_length1, PhotoMetadataSetOption option, PhotoMetadataSetGenericValue setter, void* setter_target);
+void photo_metadata_set_all_string (PhotoMetadata* self, gchar** tags, int tags_length1, const gchar* value, PhotoMetadataSetOption option);
+static Block1Data* block1_data_ref (Block1Data* _data1_);
+static void block1_data_unref (void * _userdata_);
+static void __lambda5_ (Block1Data* _data1_, const gchar* tag);
+static void ___lambda5__photo_metadata_set_generic_value (const gchar* tag, gpointer self);
+void photo_metadata_set_string_multiple (PhotoMetadata* self, const gchar* tag, GeeCollection* collection);
+static void _vala_array_add45 (gchar*** array, int* length, int* size, gchar* value);
+static void _vala_array_add46 (gchar*** array, int* length, int* size, gchar* value);
+void photo_metadata_set_all_string_multiple (PhotoMetadata* self, gchar** tags, int tags_length1, GeeCollection* values, PhotoMetadataSetOption option);
+static Block2Data* block2_data_ref (Block2Data* _data2_);
+static void block2_data_unref (void * _userdata_);
+static void __lambda6_ (Block2Data* _data2_, const gchar* tag);
+static void ___lambda6__photo_metadata_set_generic_value (const gchar* tag, gpointer self);
+gboolean photo_metadata_get_long (PhotoMetadata* self, const gchar* tag, glong* value);
+gboolean photo_metadata_get_first_long (PhotoMetadata* self, gchar** tags, int tags_length1, glong* value);
+void photo_metadata_set_long (PhotoMetadata* self, const gchar* tag, glong value);
+void photo_metadata_set_all_long (PhotoMetadata* self, gchar** tags, int tags_length1, glong value, PhotoMetadataSetOption option);
+static Block3Data* block3_data_ref (Block3Data* _data3_);
+static void block3_data_unref (void * _userdata_);
+static void __lambda7_ (Block3Data* _data3_, const gchar* tag);
+static void ___lambda7__photo_metadata_set_generic_value (const gchar* tag, gpointer self);
+GType metadata_rational_get_type (void) G_GNUC_CONST;
+MetadataRational* metadata_rational_dup (const MetadataRational* self);
+void metadata_rational_free (MetadataRational* self);
+gboolean photo_metadata_get_rational (PhotoMetadata* self, const gchar* tag, MetadataRational* rational);
+void metadata_rational_init (MetadataRational *self, gint numerator, gint denominator);
+gboolean photo_metadata_get_first_rational (PhotoMetadata* self, gchar** tags, int tags_length1, MetadataRational* rational);
+void photo_metadata_set_rational (PhotoMetadata* self, const gchar* tag, MetadataRational* rational);
+gchar* metadata_rational_to_string (MetadataRational *self);
+void photo_metadata_set_all_rational (PhotoMetadata* self, gchar** tags, int tags_length1, MetadataRational* rational, PhotoMetadataSetOption option);
+static Block4Data* block4_data_ref (Block4Data* _data4_);
+static void block4_data_unref (void * _userdata_);
+static void __lambda8_ (Block4Data* _data4_, const gchar* tag);
+static void ___lambda8__photo_metadata_set_generic_value (const gchar* tag, gpointer self);
+MetadataDateTime* photo_metadata_get_date_time (PhotoMetadata* self, const gchar* tag);
+GQuark metadata_date_time_error_quark (void);
+MetadataDateTime* metadata_date_time_new_from_xmp (const gchar* label, GError** error);
+MetadataDateTime* metadata_date_time_construct_from_xmp (GType object_type, const gchar* label, GError** error);
+MetadataDateTime* metadata_date_time_new_from_exif (const gchar* label, GError** error);
+MetadataDateTime* metadata_date_time_construct_from_exif (GType object_type, const gchar* label, GError** error);
+MetadataDateTime* photo_metadata_get_first_date_time (PhotoMetadata* self, gchar** tags, int tags_length1);
+void photo_metadata_set_date_time (PhotoMetadata* self, const gchar* tag, MetadataDateTime* date_time);
+gchar* metadata_date_time_get_exif_label (MetadataDateTime* self);
+gchar* metadata_date_time_get_xmp_label (MetadataDateTime* self);
+const gchar* metadata_domain_to_string (MetadataDomain self);
+void photo_metadata_set_all_date_time (PhotoMetadata* self, gchar** tags, int tags_length1, MetadataDateTime* date_time, PhotoMetadataSetOption option);
+static Block5Data* block5_data_ref (Block5Data* _data5_);
+static void block5_data_unref (void * _userdata_);
+static void __lambda9_ (Block5Data* _data5_, const gchar* tag);
+static void ___lambda9__photo_metadata_set_generic_value (const gchar* tag, gpointer self);
+guint8* photo_metadata_flatten_exif (PhotoMetadata* self, gboolean include_preview, int* result_length1);
+guint8* photo_metadata_flatten_exif_preview (PhotoMetadata* self, int* result_length1);
+static guint8* _vala_array_dup5 (guint8* self, int length);
+guint photo_metadata_get_preview_count (PhotoMetadata* self);
+PhotoPreview* photo_metadata_get_preview (PhotoMetadata* self, guint number);
+static PhotoMetadataInternalPhotoPreview* photo_metadata_internal_photo_preview_new (PhotoMetadata* owner, const gchar* name, guint number, GExiv2PreviewProperties* props);
+static PhotoMetadataInternalPhotoPreview* photo_metadata_internal_photo_preview_construct (GType object_type, PhotoMetadata* owner, const gchar* name, guint number, GExiv2PreviewProperties* props);
+static GType photo_metadata_internal_photo_preview_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
+void photo_metadata_remove_exif_thumbnail (PhotoMetadata* self);
+void photo_metadata_remove_tag (PhotoMetadata* self, const gchar* tag);
+void photo_metadata_remove_tags (PhotoMetadata* self, gchar** tags, int tags_length1);
+void photo_metadata_clear_domain (PhotoMetadata* self, MetadataDomain domain);
+void photo_metadata_clear (PhotoMetadata* self);
+MetadataDateTime* photo_metadata_get_modification_date_time (PhotoMetadata* self);
+void photo_metadata_set_modification_date_time (PhotoMetadata* self, MetadataDateTime* date_time, PhotoMetadataSetOption option);
+MetadataDateTime* photo_metadata_get_exposure_date_time (PhotoMetadata* self);
+void photo_metadata_set_exposure_date_time (PhotoMetadata* self, MetadataDateTime* date_time, PhotoMetadataSetOption option);
+MetadataDateTime* photo_metadata_get_digitized_date_time (PhotoMetadata* self);
+void photo_metadata_set_digitized_date_time (PhotoMetadata* self, MetadataDateTime* date_time, PhotoMetadataSetOption option);
+static MetadataDateTime* photo_metadata_real_get_creation_date_time (MediaMetadata* base);
+Dimensions* photo_metadata_get_pixel_dimensions (PhotoMetadata* self);
+void dimensions_init (Dimensions *self, gint width, gint height);
+void photo_metadata_set_pixel_dimensions (PhotoMetadata* self, Dimensions* dim, PhotoMetadataSetOption option);
+static gchar* photo_metadata_real_get_title (MediaMetadata* base);
+gboolean is_string_empty (const gchar* s);
+void photo_metadata_set_title (PhotoMetadata* self, const gchar* title, PhotoMetadataSetOption option);
+static gchar* photo_metadata_real_get_comment (MediaMetadata* base);
+void photo_metadata_set_comment (PhotoMetadata* self, const gchar* comment);
+GeeSet* photo_metadata_get_keywords (PhotoMetadata* self, GCompareDataFunc compare_func, void* compare_func_target, GDestroyNotify compare_func_target_destroy_notify);
+gchar* hierarchical_tag_utilities_make_flat_tag_safe (const gchar* in_tag);
+gpointer hierarchical_tag_index_ref (gpointer instance);
+void hierarchical_tag_index_unref (gpointer instance);
+GParamSpec* param_spec_hierarchical_tag_index (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_hierarchical_tag_index (GValue* value, gpointer v_object);
+void value_take_hierarchical_tag_index (GValue* value, gpointer v_object);
+gpointer value_get_hierarchical_tag_index (const GValue* value);
+GType hierarchical_tag_index_get_type (void) G_GNUC_CONST;
+static void photo_metadata_internal_set_hierarchical_keywords (PhotoMetadata* self, HierarchicalTagIndex* index);
+GeeCollection* hierarchical_tag_index_get_all_paths (HierarchicalTagIndex* self);
+#define TAG_PATH_SEPARATOR_STRING "/"
+void photo_metadata_set_keywords (PhotoMetadata* self, GeeCollection* keywords, PhotoMetadataSetOption option);
+HierarchicalTagIndex* hierarchical_tag_index_new (void);
+HierarchicalTagIndex* hierarchical_tag_index_construct (GType object_type);
+GeeList* hierarchical_tag_utilities_enumerate_path_components (const gchar* in_path);
+void hierarchical_tag_index_add_path (HierarchicalTagIndex* self, const gchar* tag, const gchar* path);
+GeeCollection* hierarchical_tag_index_get_all_tags (HierarchicalTagIndex* self);
+gboolean photo_metadata_has_hierarchical_keywords (PhotoMetadata* self);
+GeeSet* photo_metadata_get_hierarchical_keywords (PhotoMetadata* self);
+gchar* hierarchical_tag_utilities_canonicalize (const gchar* in_tag, const gchar* foreign_separator);
+gboolean photo_metadata_has_orientation (PhotoMetadata* self);
+GType orientation_get_type (void) G_GNUC_CONST;
+Orientation photo_metadata_get_orientation (PhotoMetadata* self);
+void photo_metadata_set_orientation (PhotoMetadata* self, Orientation orientation);
+gboolean photo_metadata_get_gps (PhotoMetadata* self, gdouble* longitude, gchar** long_ref, gdouble* latitude, gchar** lat_ref, gdouble* altitude);
+gboolean photo_metadata_get_exposure (PhotoMetadata* self, MetadataRational* exposure);
+gchar* photo_metadata_get_exposure_string (PhotoMetadata* self);
+gboolean metadata_rational_is_valid (MetadataRational *self);
+gboolean photo_metadata_get_iso (PhotoMetadata* self, glong* iso);
+gchar* photo_metadata_get_iso_string (PhotoMetadata* self);
+gboolean photo_metadata_get_aperture (PhotoMetadata* self, MetadataRational* aperture);
+gchar* photo_metadata_get_aperture_string (PhotoMetadata* self, gboolean pango_formatted);
+gchar* photo_metadata_get_camera_make (PhotoMetadata* self);
+gchar* photo_metadata_get_camera_model (PhotoMetadata* self);
+gboolean photo_metadata_get_flash (PhotoMetadata* self, glong* flash);
+gchar* photo_metadata_get_flash_string (PhotoMetadata* self);
+gboolean photo_metadata_get_focal_length (PhotoMetadata* self, MetadataRational* focal_length);
+gchar* photo_metadata_get_focal_length_string (PhotoMetadata* self);
+gchar* photo_metadata_get_artist (PhotoMetadata* self);
+gchar* photo_metadata_get_copyright (PhotoMetadata* self);
+gchar* photo_metadata_get_software (PhotoMetadata* self);
+void photo_metadata_set_software (PhotoMetadata* self, const gchar* software, const gchar* version);
+void photo_metadata_remove_software (PhotoMetadata* self);
+gchar* photo_metadata_get_exposure_bias (PhotoMetadata* self);
+GType rating_get_type (void) G_GNUC_CONST;
+Rating photo_metadata_get_rating (PhotoMetadata* self);
+Rating rating_unserialize (gint value);
+void photo_metadata_set_rating (PhotoMetadata* self, Rating rating);
+gint rating_serialize (Rating self);
+enum {
+ PHOTO_METADATA_INTERNAL_PHOTO_PREVIEW_DUMMY_PROPERTY
+};
+static guint8* photo_metadata_internal_photo_preview_real_flatten (PhotoPreview* base, int* result_length1, GError** error);
+static guint8* _vala_array_dup6 (guint8* self, int length);
+static void photo_metadata_internal_photo_preview_finalize (PhotoPreview* obj);
+static void photo_metadata_finalize (MediaMetadata* 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 gint _vala_array_length (gpointer array);
+
+extern const gint RESOURCES_rating_thresholds[6];
+
+GType metadata_domain_get_type (void) {
+ static volatile gsize metadata_domain_type_id__volatile = 0;
+ if (g_once_init_enter (&metadata_domain_type_id__volatile)) {
+ static const GEnumValue values[] = {{METADATA_DOMAIN_UNKNOWN, "METADATA_DOMAIN_UNKNOWN", "unknown"}, {METADATA_DOMAIN_EXIF, "METADATA_DOMAIN_EXIF", "exif"}, {METADATA_DOMAIN_XMP, "METADATA_DOMAIN_XMP", "xmp"}, {METADATA_DOMAIN_IPTC, "METADATA_DOMAIN_IPTC", "iptc"}, {0, NULL, NULL}};
+ GType metadata_domain_type_id;
+ metadata_domain_type_id = g_enum_register_static ("MetadataDomain", values);
+ g_once_init_leave (&metadata_domain_type_id__volatile, metadata_domain_type_id);
+ }
+ return metadata_domain_type_id__volatile;
+}
+
+
+HierarchicalKeywordField* hierarchical_keyword_field_construct (GType object_type, const gchar* field_name, const gchar* path_separator, gboolean wants_leading_separator, gboolean is_writeable) {
+ HierarchicalKeywordField* self = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ gboolean _tmp4_ = FALSE;
+ gboolean _tmp5_ = FALSE;
+#line 37 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (field_name != NULL, NULL);
+#line 37 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (path_separator != NULL, NULL);
+#line 37 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = (HierarchicalKeywordField*) g_type_create_instance (object_type);
+#line 39 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = field_name;
+#line 39 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 39 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (self->field_name);
+#line 39 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->field_name = _tmp1_;
+#line 40 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = path_separator;
+#line 40 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = g_strdup (_tmp2_);
+#line 40 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (self->path_separator);
+#line 40 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->path_separator = _tmp3_;
+#line 41 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = wants_leading_separator;
+#line 41 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->wants_leading_separator = _tmp4_;
+#line 42 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = is_writeable;
+#line 42 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->is_writeable = _tmp5_;
+#line 37 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return self;
+#line 676 "PhotoMetadata.c"
+}
+
+
+HierarchicalKeywordField* hierarchical_keyword_field_new (const gchar* field_name, const gchar* path_separator, gboolean wants_leading_separator, gboolean is_writeable) {
+#line 37 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return hierarchical_keyword_field_construct (TYPE_HIERARCHICAL_KEYWORD_FIELD, field_name, path_separator, wants_leading_separator, is_writeable);
+#line 683 "PhotoMetadata.c"
+}
+
+
+static void value_hierarchical_keyword_field_init (GValue* value) {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value->data[0].v_pointer = NULL;
+#line 690 "PhotoMetadata.c"
+}
+
+
+static void value_hierarchical_keyword_field_free_value (GValue* value) {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (value->data[0].v_pointer) {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ hierarchical_keyword_field_unref (value->data[0].v_pointer);
+#line 699 "PhotoMetadata.c"
+ }
+}
+
+
+static void value_hierarchical_keyword_field_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (src_value->data[0].v_pointer) {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ dest_value->data[0].v_pointer = hierarchical_keyword_field_ref (src_value->data[0].v_pointer);
+#line 709 "PhotoMetadata.c"
+ } else {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 713 "PhotoMetadata.c"
+ }
+}
+
+
+static gpointer value_hierarchical_keyword_field_peek_pointer (const GValue* value) {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return value->data[0].v_pointer;
+#line 721 "PhotoMetadata.c"
+}
+
+
+static gchar* value_hierarchical_keyword_field_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (collect_values[0].v_pointer) {
+#line 728 "PhotoMetadata.c"
+ HierarchicalKeywordField* object;
+ object = collect_values[0].v_pointer;
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 735 "PhotoMetadata.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.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 739 "PhotoMetadata.c"
+ }
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value->data[0].v_pointer = hierarchical_keyword_field_ref (object);
+#line 743 "PhotoMetadata.c"
+ } else {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value->data[0].v_pointer = NULL;
+#line 747 "PhotoMetadata.c"
+ }
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return NULL;
+#line 751 "PhotoMetadata.c"
+}
+
+
+static gchar* value_hierarchical_keyword_field_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ HierarchicalKeywordField** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!object_p) {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 762 "PhotoMetadata.c"
+ }
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!value->data[0].v_pointer) {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *object_p = NULL;
+#line 768 "PhotoMetadata.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *object_p = value->data[0].v_pointer;
+#line 772 "PhotoMetadata.c"
+ } else {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *object_p = hierarchical_keyword_field_ref (value->data[0].v_pointer);
+#line 776 "PhotoMetadata.c"
+ }
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return NULL;
+#line 780 "PhotoMetadata.c"
+}
+
+
+GParamSpec* param_spec_hierarchical_keyword_field (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecHierarchicalKeywordField* spec;
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_HIERARCHICAL_KEYWORD_FIELD), NULL);
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return G_PARAM_SPEC (spec);
+#line 794 "PhotoMetadata.c"
+}
+
+
+gpointer value_get_hierarchical_keyword_field (const GValue* value) {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_HIERARCHICAL_KEYWORD_FIELD), NULL);
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return value->data[0].v_pointer;
+#line 803 "PhotoMetadata.c"
+}
+
+
+void value_set_hierarchical_keyword_field (GValue* value, gpointer v_object) {
+ HierarchicalKeywordField* old;
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_HIERARCHICAL_KEYWORD_FIELD));
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ old = value->data[0].v_pointer;
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (v_object) {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_HIERARCHICAL_KEYWORD_FIELD));
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value->data[0].v_pointer = v_object;
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ hierarchical_keyword_field_ref (value->data[0].v_pointer);
+#line 823 "PhotoMetadata.c"
+ } else {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value->data[0].v_pointer = NULL;
+#line 827 "PhotoMetadata.c"
+ }
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (old) {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ hierarchical_keyword_field_unref (old);
+#line 833 "PhotoMetadata.c"
+ }
+}
+
+
+void value_take_hierarchical_keyword_field (GValue* value, gpointer v_object) {
+ HierarchicalKeywordField* old;
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_HIERARCHICAL_KEYWORD_FIELD));
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ old = value->data[0].v_pointer;
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (v_object) {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_HIERARCHICAL_KEYWORD_FIELD));
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value->data[0].v_pointer = v_object;
+#line 852 "PhotoMetadata.c"
+ } else {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value->data[0].v_pointer = NULL;
+#line 856 "PhotoMetadata.c"
+ }
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (old) {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ hierarchical_keyword_field_unref (old);
+#line 862 "PhotoMetadata.c"
+ }
+}
+
+
+static void hierarchical_keyword_field_class_init (HierarchicalKeywordFieldClass * klass) {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ hierarchical_keyword_field_parent_class = g_type_class_peek_parent (klass);
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ ((HierarchicalKeywordFieldClass *) klass)->finalize = hierarchical_keyword_field_finalize;
+#line 872 "PhotoMetadata.c"
+}
+
+
+static void hierarchical_keyword_field_instance_init (HierarchicalKeywordField * self) {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->ref_count = 1;
+#line 879 "PhotoMetadata.c"
+}
+
+
+static void hierarchical_keyword_field_finalize (HierarchicalKeywordField* obj) {
+ HierarchicalKeywordField * self;
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_HIERARCHICAL_KEYWORD_FIELD, HierarchicalKeywordField);
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_signal_handlers_destroy (self);
+#line 32 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (self->field_name);
+#line 33 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (self->path_separator);
+#line 893 "PhotoMetadata.c"
+}
+
+
+GType hierarchical_keyword_field_get_type (void) {
+ static volatile gsize hierarchical_keyword_field_type_id__volatile = 0;
+ if (g_once_init_enter (&hierarchical_keyword_field_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_hierarchical_keyword_field_init, value_hierarchical_keyword_field_free_value, value_hierarchical_keyword_field_copy_value, value_hierarchical_keyword_field_peek_pointer, "p", value_hierarchical_keyword_field_collect_value, "p", value_hierarchical_keyword_field_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (HierarchicalKeywordFieldClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) hierarchical_keyword_field_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (HierarchicalKeywordField), 0, (GInstanceInitFunc) hierarchical_keyword_field_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 hierarchical_keyword_field_type_id;
+ hierarchical_keyword_field_type_id = g_type_register_fundamental (g_type_fundamental_next (), "HierarchicalKeywordField", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&hierarchical_keyword_field_type_id__volatile, hierarchical_keyword_field_type_id);
+ }
+ return hierarchical_keyword_field_type_id__volatile;
+}
+
+
+gpointer hierarchical_keyword_field_ref (gpointer instance) {
+ HierarchicalKeywordField* self;
+ self = instance;
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return instance;
+#line 918 "PhotoMetadata.c"
+}
+
+
+void hierarchical_keyword_field_unref (gpointer instance) {
+ HierarchicalKeywordField* self;
+ self = instance;
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ HIERARCHICAL_KEYWORD_FIELD_GET_CLASS (self)->finalize (self);
+#line 31 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 931 "PhotoMetadata.c"
+ }
+}
+
+
+PhotoPreview* photo_preview_construct (GType object_type, const gchar* name, Dimensions* dimensions, guint32 size, const gchar* mime_type, const gchar* extension) {
+ PhotoPreview* self = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ Dimensions _tmp2_ = {0};
+ guint32 _tmp3_ = 0U;
+ const gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ const gchar* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+#line 53 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (name != NULL, NULL);
+#line 53 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (dimensions != NULL, NULL);
+#line 53 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (mime_type != NULL, NULL);
+#line 53 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (extension != NULL, NULL);
+#line 53 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = (PhotoPreview*) g_type_create_instance (object_type);
+#line 54 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = name;
+#line 54 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 54 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (self->priv->name);
+#line 54 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv->name = _tmp1_;
+#line 55 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = *dimensions;
+#line 55 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv->dimensions = _tmp2_;
+#line 56 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = size;
+#line 56 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv->size = _tmp3_;
+#line 57 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = mime_type;
+#line 57 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = g_strdup (_tmp4_);
+#line 57 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (self->priv->mime_type);
+#line 57 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv->mime_type = _tmp5_;
+#line 58 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = extension;
+#line 58 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = g_strdup (_tmp6_);
+#line 58 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (self->priv->extension);
+#line 58 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv->extension = _tmp7_;
+#line 53 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return self;
+#line 990 "PhotoMetadata.c"
+}
+
+
+gchar* photo_preview_get_name (PhotoPreview* self) {
+ gchar* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+#line 61 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_PREVIEW (self), NULL);
+#line 62 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->name;
+#line 62 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 62 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp1_;
+#line 62 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 1008 "PhotoMetadata.c"
+}
+
+
+void photo_preview_get_pixel_dimensions (PhotoPreview* self, Dimensions* result) {
+ Dimensions _tmp0_ = {0};
+#line 65 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_PREVIEW (self));
+#line 66 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->dimensions;
+#line 66 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *result = _tmp0_;
+#line 66 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return;
+#line 1022 "PhotoMetadata.c"
+}
+
+
+guint32 photo_preview_get_size (PhotoPreview* self) {
+ guint32 result = 0U;
+ guint32 _tmp0_ = 0U;
+#line 69 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_PREVIEW (self), 0U);
+#line 70 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->size;
+#line 70 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp0_;
+#line 70 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 1037 "PhotoMetadata.c"
+}
+
+
+gchar* photo_preview_get_mime_type (PhotoPreview* self) {
+ gchar* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+#line 73 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_PREVIEW (self), NULL);
+#line 74 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->mime_type;
+#line 74 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 74 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp1_;
+#line 74 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 1055 "PhotoMetadata.c"
+}
+
+
+gchar* photo_preview_get_extension (PhotoPreview* self) {
+ gchar* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+#line 77 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_PREVIEW (self), NULL);
+#line 78 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->extension;
+#line 78 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 78 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp1_;
+#line 78 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 1073 "PhotoMetadata.c"
+}
+
+
+static guint8* photo_preview_real_flatten (PhotoPreview* self, int* result_length1, GError** error) {
+#line 81 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_critical ("Type `%s' does not implement abstract method `photo_preview_flatten'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
+#line 81 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return NULL;
+#line 1082 "PhotoMetadata.c"
+}
+
+
+guint8* photo_preview_flatten (PhotoPreview* self, int* result_length1, GError** error) {
+#line 81 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_PREVIEW (self), NULL);
+#line 81 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return PHOTO_PREVIEW_GET_CLASS (self)->flatten (self, result_length1, error);
+#line 1091 "PhotoMetadata.c"
+}
+
+
+static guint8* _vala_array_dup4 (guint8* self, int length) {
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return g_memdup (self, length * sizeof (guint8));
+#line 1098 "PhotoMetadata.c"
+}
+
+
+static GdkPixbuf* photo_preview_real_get_pixbuf (PhotoPreview* self, GError** error) {
+ GdkPixbuf* result = NULL;
+ guint8* flattened = NULL;
+ gint _tmp0_ = 0;
+ guint8* _tmp1_ = NULL;
+ gint flattened_length1 = 0;
+ gint _flattened_size_ = 0;
+ GError * _inner_error_ = NULL;
+#line 84 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_preview_flatten (self, &_tmp0_, &_inner_error_);
+#line 84 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ flattened = _tmp1_;
+#line 84 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ flattened_length1 = _tmp0_;
+#line 84 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _flattened_size_ = flattened_length1;
+#line 84 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 84 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_propagate_error (error, _inner_error_);
+#line 84 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return NULL;
+#line 1124 "PhotoMetadata.c"
+ }
+ {
+ GdkPixbuf* _tmp2_ = NULL;
+ guint8* _tmp3_ = NULL;
+ gint _tmp3__length1 = 0;
+ GMemoryInputStream* _tmp4_ = NULL;
+ GMemoryInputStream* _tmp5_ = NULL;
+ GdkPixbuf* _tmp6_ = NULL;
+ GdkPixbuf* _tmp7_ = NULL;
+ GdkPixbuf* _tmp8_ = NULL;
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = (flattened != NULL) ? _vala_array_dup4 (flattened, flattened_length1) : ((gpointer) flattened);
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3__length1 = flattened_length1;
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = (GMemoryInputStream*) g_memory_input_stream_new_from_data (_tmp3_, _tmp3__length1, NULL);
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = _tmp4_;
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = gdk_pixbuf_new_from_stream (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, G_TYPE_INPUT_STREAM, GInputStream), NULL, &_inner_error_);
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = _tmp6_;
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (_tmp5_);
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = _tmp7_;
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 1153 "PhotoMetadata.c"
+ goto __catch23_g_error;
+ }
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = _tmp2_;
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = NULL;
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp8_;
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (_tmp2_);
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ flattened = (g_free (flattened), NULL);
+#line 89 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 1168 "PhotoMetadata.c"
+ }
+ goto __finally23;
+ __catch23_g_error:
+ {
+ GError* err = NULL;
+ const gchar* _tmp9_ = NULL;
+ GError* _tmp10_ = NULL;
+ const gchar* _tmp11_ = NULL;
+#line 88 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ err = _inner_error_;
+#line 88 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _inner_error_ = NULL;
+#line 92 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = self->priv->name;
+#line 92 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = err;
+#line 92 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = _tmp10_->message;
+#line 92 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_warning ("PhotoMetadata.vala:92: Unable to decode thumbnail for %s: %s", _tmp9_, _tmp11_);
+#line 94 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = NULL;
+#line 94 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_error_free0 (err);
+#line 94 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ flattened = (g_free (flattened), NULL);
+#line 94 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 1197 "PhotoMetadata.c"
+ }
+ __finally23:
+#line 88 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_propagate_error (error, _inner_error_);
+#line 88 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ flattened = (g_free (flattened), NULL);
+#line 88 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return NULL;
+#line 1206 "PhotoMetadata.c"
+}
+
+
+GdkPixbuf* photo_preview_get_pixbuf (PhotoPreview* self, GError** error) {
+#line 83 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_PREVIEW (self), NULL);
+#line 83 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return PHOTO_PREVIEW_GET_CLASS (self)->get_pixbuf (self, error);
+#line 1215 "PhotoMetadata.c"
+}
+
+
+static void value_photo_preview_init (GValue* value) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value->data[0].v_pointer = NULL;
+#line 1222 "PhotoMetadata.c"
+}
+
+
+static void value_photo_preview_free_value (GValue* value) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (value->data[0].v_pointer) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_preview_unref (value->data[0].v_pointer);
+#line 1231 "PhotoMetadata.c"
+ }
+}
+
+
+static void value_photo_preview_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (src_value->data[0].v_pointer) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ dest_value->data[0].v_pointer = photo_preview_ref (src_value->data[0].v_pointer);
+#line 1241 "PhotoMetadata.c"
+ } else {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 1245 "PhotoMetadata.c"
+ }
+}
+
+
+static gpointer value_photo_preview_peek_pointer (const GValue* value) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return value->data[0].v_pointer;
+#line 1253 "PhotoMetadata.c"
+}
+
+
+static gchar* value_photo_preview_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (collect_values[0].v_pointer) {
+#line 1260 "PhotoMetadata.c"
+ PhotoPreview* object;
+ object = collect_values[0].v_pointer;
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 1267 "PhotoMetadata.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.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 1271 "PhotoMetadata.c"
+ }
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value->data[0].v_pointer = photo_preview_ref (object);
+#line 1275 "PhotoMetadata.c"
+ } else {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value->data[0].v_pointer = NULL;
+#line 1279 "PhotoMetadata.c"
+ }
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return NULL;
+#line 1283 "PhotoMetadata.c"
+}
+
+
+static gchar* value_photo_preview_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ PhotoPreview** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!object_p) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 1294 "PhotoMetadata.c"
+ }
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!value->data[0].v_pointer) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *object_p = NULL;
+#line 1300 "PhotoMetadata.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *object_p = value->data[0].v_pointer;
+#line 1304 "PhotoMetadata.c"
+ } else {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *object_p = photo_preview_ref (value->data[0].v_pointer);
+#line 1308 "PhotoMetadata.c"
+ }
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return NULL;
+#line 1312 "PhotoMetadata.c"
+}
+
+
+GParamSpec* param_spec_photo_preview (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecPhotoPreview* spec;
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_PHOTO_PREVIEW), NULL);
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return G_PARAM_SPEC (spec);
+#line 1326 "PhotoMetadata.c"
+}
+
+
+gpointer value_get_photo_preview (const GValue* value) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PHOTO_PREVIEW), NULL);
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return value->data[0].v_pointer;
+#line 1335 "PhotoMetadata.c"
+}
+
+
+void value_set_photo_preview (GValue* value, gpointer v_object) {
+ PhotoPreview* old;
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PHOTO_PREVIEW));
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ old = value->data[0].v_pointer;
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (v_object) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PHOTO_PREVIEW));
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value->data[0].v_pointer = v_object;
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_preview_ref (value->data[0].v_pointer);
+#line 1355 "PhotoMetadata.c"
+ } else {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value->data[0].v_pointer = NULL;
+#line 1359 "PhotoMetadata.c"
+ }
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (old) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_preview_unref (old);
+#line 1365 "PhotoMetadata.c"
+ }
+}
+
+
+void value_take_photo_preview (GValue* value, gpointer v_object) {
+ PhotoPreview* old;
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PHOTO_PREVIEW));
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ old = value->data[0].v_pointer;
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (v_object) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PHOTO_PREVIEW));
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value->data[0].v_pointer = v_object;
+#line 1384 "PhotoMetadata.c"
+ } else {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value->data[0].v_pointer = NULL;
+#line 1388 "PhotoMetadata.c"
+ }
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (old) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_preview_unref (old);
+#line 1394 "PhotoMetadata.c"
+ }
+}
+
+
+static void photo_preview_class_init (PhotoPreviewClass * klass) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_preview_parent_class = g_type_class_peek_parent (klass);
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ ((PhotoPreviewClass *) klass)->finalize = photo_preview_finalize;
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_type_class_add_private (klass, sizeof (PhotoPreviewPrivate));
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ ((PhotoPreviewClass *) klass)->flatten = photo_preview_real_flatten;
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ ((PhotoPreviewClass *) klass)->get_pixbuf = photo_preview_real_get_pixbuf;
+#line 1410 "PhotoMetadata.c"
+}
+
+
+static void photo_preview_instance_init (PhotoPreview * self) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv = PHOTO_PREVIEW_GET_PRIVATE (self);
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->ref_count = 1;
+#line 1419 "PhotoMetadata.c"
+}
+
+
+static void photo_preview_finalize (PhotoPreview* obj) {
+ PhotoPreview * self;
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PHOTO_PREVIEW, PhotoPreview);
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_signal_handlers_destroy (self);
+#line 47 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (self->priv->name);
+#line 50 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (self->priv->mime_type);
+#line 51 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (self->priv->extension);
+#line 1435 "PhotoMetadata.c"
+}
+
+
+GType photo_preview_get_type (void) {
+ static volatile gsize photo_preview_type_id__volatile = 0;
+ if (g_once_init_enter (&photo_preview_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_photo_preview_init, value_photo_preview_free_value, value_photo_preview_copy_value, value_photo_preview_peek_pointer, "p", value_photo_preview_collect_value, "p", value_photo_preview_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (PhotoPreviewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photo_preview_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotoPreview), 0, (GInstanceInitFunc) photo_preview_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 photo_preview_type_id;
+ photo_preview_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PhotoPreview", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT);
+ g_once_init_leave (&photo_preview_type_id__volatile, photo_preview_type_id);
+ }
+ return photo_preview_type_id__volatile;
+}
+
+
+gpointer photo_preview_ref (gpointer instance) {
+ PhotoPreview* self;
+ self = instance;
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return instance;
+#line 1460 "PhotoMetadata.c"
+}
+
+
+void photo_preview_unref (gpointer instance) {
+ PhotoPreview* self;
+ self = instance;
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ PHOTO_PREVIEW_GET_CLASS (self)->finalize (self);
+#line 46 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 1473 "PhotoMetadata.c"
+ }
+}
+
+
+GType photo_metadata_set_option_get_type (void) {
+ static volatile gsize photo_metadata_set_option_type_id__volatile = 0;
+ if (g_once_init_enter (&photo_metadata_set_option_type_id__volatile)) {
+ static const GEnumValue values[] = {{PHOTO_METADATA_SET_OPTION_ALL_DOMAINS, "PHOTO_METADATA_SET_OPTION_ALL_DOMAINS", "all-domains"}, {PHOTO_METADATA_SET_OPTION_ONLY_IF_DOMAIN_PRESENT, "PHOTO_METADATA_SET_OPTION_ONLY_IF_DOMAIN_PRESENT", "only-if-domain-present"}, {PHOTO_METADATA_SET_OPTION_AT_LEAST_DEFAULT_DOMAIN, "PHOTO_METADATA_SET_OPTION_AT_LEAST_DEFAULT_DOMAIN", "at-least-default-domain"}, {0, NULL, NULL}};
+ GType photo_metadata_set_option_type_id;
+ photo_metadata_set_option_type_id = g_enum_register_static ("PhotoMetadataSetOption", values);
+ g_once_init_leave (&photo_metadata_set_option_type_id__volatile, photo_metadata_set_option_type_id);
+ }
+ return photo_metadata_set_option_type_id__volatile;
+}
+
+
+PhotoMetadata* photo_metadata_construct (GType object_type) {
+ PhotoMetadata* self = NULL;
+#line 139 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = (PhotoMetadata*) media_metadata_construct (object_type);
+#line 139 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return self;
+#line 1496 "PhotoMetadata.c"
+}
+
+
+PhotoMetadata* photo_metadata_new (void) {
+#line 139 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return photo_metadata_construct (TYPE_PHOTO_METADATA);
+#line 1503 "PhotoMetadata.c"
+}
+
+
+static void photo_metadata_real_read_from_file (MediaMetadata* base, GFile* file, GError** error) {
+ PhotoMetadata * self;
+ GExiv2Metadata* _tmp0_ = NULL;
+ GExiv2Metadata* _tmp1_ = NULL;
+ GFile* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ GFile* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+ ExifData* _tmp8_ = NULL;
+ GFile* _tmp9_ = NULL;
+ gchar* _tmp10_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 142 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PHOTO_METADATA, PhotoMetadata);
+#line 142 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (G_IS_FILE (file));
+#line 143 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = gexiv2_metadata_new ();
+#line 143 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _gexiv2_metadata_free0 (self->priv->exiv2);
+#line 143 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv->exiv2 = _tmp0_;
+#line 144 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _exif_data_unref0 (self->priv->exif);
+#line 144 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv->exif = NULL;
+#line 146 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = self->priv->exiv2;
+#line 146 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = file;
+#line 146 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = g_file_get_path (_tmp2_);
+#line 146 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = _tmp3_;
+#line 146 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gexiv2_metadata_open_path (_tmp1_, _tmp4_, &_inner_error_);
+#line 146 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_tmp4_);
+#line 146 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 146 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_propagate_error (error, _inner_error_);
+#line 146 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return;
+#line 1553 "PhotoMetadata.c"
+ }
+#line 147 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = file;
+#line 147 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = g_file_get_path (_tmp5_);
+#line 147 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = _tmp6_;
+#line 147 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = exif_data_new_from_file (_tmp7_);
+#line 147 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _exif_data_unref0 (self->priv->exif);
+#line 147 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv->exif = _tmp8_;
+#line 147 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_tmp7_);
+#line 148 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = file;
+#line 148 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = g_file_get_basename (_tmp9_);
+#line 148 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (self->priv->source_name);
+#line 148 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv->source_name = _tmp10_;
+#line 1577 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_write_to_file (PhotoMetadata* self, GFile* file, GError** error) {
+ GExiv2Metadata* _tmp0_ = NULL;
+ GFile* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 151 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 151 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (G_IS_FILE (file));
+#line 152 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->exiv2;
+#line 152 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = file;
+#line 152 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = g_file_get_path (_tmp1_);
+#line 152 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = _tmp2_;
+#line 152 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gexiv2_metadata_save_file (_tmp0_, _tmp3_, &_inner_error_);
+#line 152 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_tmp3_);
+#line 152 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 152 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_propagate_error (error, _inner_error_);
+#line 152 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return;
+#line 1609 "PhotoMetadata.c"
+ }
+}
+
+
+void photo_metadata_read_from_buffer (PhotoMetadata* self, guint8* buffer, int buffer_length1, gint length, GError** error) {
+ gint _tmp0_ = 0;
+ guint8* _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+ gint _tmp3_ = 0;
+ GExiv2Metadata* _tmp4_ = NULL;
+ GExiv2Metadata* _tmp5_ = NULL;
+ guint8* _tmp6_ = NULL;
+ gint _tmp6__length1 = 0;
+ gint _tmp7_ = 0;
+ guint8* _tmp8_ = NULL;
+ gint _tmp8__length1 = 0;
+ gint _tmp9_ = 0;
+ ExifData* _tmp10_ = NULL;
+ gint _tmp11_ = 0;
+ gchar* _tmp12_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 155 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 156 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = length;
+#line 156 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp0_ <= 0) {
+#line 1637 "PhotoMetadata.c"
+ guint8* _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+#line 157 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = buffer;
+#line 157 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1__length1 = buffer_length1;
+#line 157 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ length = _tmp1__length1;
+#line 1646 "PhotoMetadata.c"
+ }
+#line 159 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = buffer;
+#line 159 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2__length1 = buffer_length1;
+#line 159 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = length;
+#line 159 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_assert (_tmp2__length1 >= _tmp3_, "buffer.length >= length");
+#line 161 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = gexiv2_metadata_new ();
+#line 161 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _gexiv2_metadata_free0 (self->priv->exiv2);
+#line 161 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv->exiv2 = _tmp4_;
+#line 162 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _exif_data_unref0 (self->priv->exif);
+#line 162 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv->exif = NULL;
+#line 164 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = self->priv->exiv2;
+#line 164 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = buffer;
+#line 164 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6__length1 = buffer_length1;
+#line 164 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = length;
+#line 164 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gexiv2_metadata_open_buf (_tmp5_, _tmp6_, (glong) _tmp7_, &_inner_error_);
+#line 164 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 164 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_propagate_error (error, _inner_error_);
+#line 164 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return;
+#line 1682 "PhotoMetadata.c"
+ }
+#line 165 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = buffer;
+#line 165 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8__length1 = buffer_length1;
+#line 165 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = length;
+#line 165 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = exif_data_new_from_data (_tmp8_, (gsize) _tmp9_);
+#line 165 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _exif_data_unref0 (self->priv->exif);
+#line 165 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv->exif = _tmp10_;
+#line 166 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = length;
+#line 166 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = g_strdup_printf ("<memory buffer %d bytes>", _tmp11_);
+#line 166 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (self->priv->source_name);
+#line 166 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv->source_name = _tmp12_;
+#line 1704 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_read_from_app1_segment (PhotoMetadata* self, guint8* buffer, int buffer_length1, gint length, GError** error) {
+ gint _tmp0_ = 0;
+ guint8* _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+ gint _tmp3_ = 0;
+ GExiv2Metadata* _tmp4_ = NULL;
+ GExiv2Metadata* _tmp5_ = NULL;
+ guint8* _tmp6_ = NULL;
+ gint _tmp6__length1 = 0;
+ gint _tmp7_ = 0;
+ guint8* _tmp8_ = NULL;
+ gint _tmp8__length1 = 0;
+ gint _tmp9_ = 0;
+ ExifData* _tmp10_ = NULL;
+ gint _tmp11_ = 0;
+ gchar* _tmp12_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 169 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 170 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = length;
+#line 170 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp0_ <= 0) {
+#line 1731 "PhotoMetadata.c"
+ guint8* _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+#line 171 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = buffer;
+#line 171 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1__length1 = buffer_length1;
+#line 171 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ length = _tmp1__length1;
+#line 1740 "PhotoMetadata.c"
+ }
+#line 173 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = buffer;
+#line 173 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2__length1 = buffer_length1;
+#line 173 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = length;
+#line 173 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_assert (_tmp2__length1 >= _tmp3_, "buffer.length >= length");
+#line 175 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = gexiv2_metadata_new ();
+#line 175 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _gexiv2_metadata_free0 (self->priv->exiv2);
+#line 175 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv->exiv2 = _tmp4_;
+#line 176 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _exif_data_unref0 (self->priv->exif);
+#line 176 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv->exif = NULL;
+#line 178 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = self->priv->exiv2;
+#line 178 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = buffer;
+#line 178 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6__length1 = buffer_length1;
+#line 178 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = length;
+#line 178 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gexiv2_metadata_from_app1_segment (_tmp5_, _tmp6_, (glong) _tmp7_, &_inner_error_);
+#line 178 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 178 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_propagate_error (error, _inner_error_);
+#line 178 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return;
+#line 1776 "PhotoMetadata.c"
+ }
+#line 179 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = buffer;
+#line 179 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8__length1 = buffer_length1;
+#line 179 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = length;
+#line 179 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = exif_data_new_from_data (_tmp8_, (gsize) _tmp9_);
+#line 179 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _exif_data_unref0 (self->priv->exif);
+#line 179 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv->exif = _tmp10_;
+#line 180 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = length;
+#line 180 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = g_strdup_printf ("<app1 segment %d bytes>", _tmp11_);
+#line 180 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (self->priv->source_name);
+#line 180 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv->source_name = _tmp12_;
+#line 1798 "PhotoMetadata.c"
+}
+
+
+MetadataDomain photo_metadata_get_tag_domain (const gchar* tag) {
+ MetadataDomain result = 0;
+ const gchar* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+ const gchar* _tmp2_ = NULL;
+ gboolean _tmp3_ = FALSE;
+ const gchar* _tmp4_ = NULL;
+ gboolean _tmp5_ = FALSE;
+#line 183 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (tag != NULL, 0);
+#line 184 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = tag;
+#line 184 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = gexiv2_metadata_is_exif_tag (_tmp0_);
+#line 184 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp1_) {
+#line 185 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = METADATA_DOMAIN_EXIF;
+#line 185 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 1822 "PhotoMetadata.c"
+ }
+#line 187 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = tag;
+#line 187 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = gexiv2_metadata_is_xmp_tag (_tmp2_);
+#line 187 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp3_) {
+#line 188 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = METADATA_DOMAIN_XMP;
+#line 188 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 1834 "PhotoMetadata.c"
+ }
+#line 190 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = tag;
+#line 190 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = gexiv2_metadata_is_iptc_tag (_tmp4_);
+#line 190 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp5_) {
+#line 191 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = METADATA_DOMAIN_IPTC;
+#line 191 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 1846 "PhotoMetadata.c"
+ }
+#line 193 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = METADATA_DOMAIN_UNKNOWN;
+#line 193 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 1852 "PhotoMetadata.c"
+}
+
+
+gboolean photo_metadata_has_domain (PhotoMetadata* self, MetadataDomain domain) {
+ gboolean result = FALSE;
+ MetadataDomain _tmp0_ = 0;
+#line 196 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 197 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = domain;
+#line 197 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ switch (_tmp0_) {
+#line 197 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ case METADATA_DOMAIN_EXIF:
+#line 1867 "PhotoMetadata.c"
+ {
+ GExiv2Metadata* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+#line 199 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = self->priv->exiv2;
+#line 199 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = gexiv2_metadata_has_exif (_tmp1_);
+#line 199 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp2_;
+#line 199 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 1879 "PhotoMetadata.c"
+ }
+#line 197 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ case METADATA_DOMAIN_XMP:
+#line 1883 "PhotoMetadata.c"
+ {
+ GExiv2Metadata* _tmp3_ = NULL;
+ gboolean _tmp4_ = FALSE;
+#line 202 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = self->priv->exiv2;
+#line 202 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = gexiv2_metadata_has_xmp (_tmp3_);
+#line 202 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp4_;
+#line 202 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 1895 "PhotoMetadata.c"
+ }
+#line 197 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ case METADATA_DOMAIN_IPTC:
+#line 1899 "PhotoMetadata.c"
+ {
+ GExiv2Metadata* _tmp5_ = NULL;
+ gboolean _tmp6_ = FALSE;
+#line 205 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = self->priv->exiv2;
+#line 205 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = gexiv2_metadata_has_iptc (_tmp5_);
+#line 205 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp6_;
+#line 205 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 1911 "PhotoMetadata.c"
+ }
+ default:
+#line 197 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ case METADATA_DOMAIN_UNKNOWN:
+#line 1916 "PhotoMetadata.c"
+ {
+#line 209 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = FALSE;
+#line 209 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 1922 "PhotoMetadata.c"
+ }
+ }
+}
+
+
+gboolean photo_metadata_has_exif (PhotoMetadata* self) {
+ gboolean result = FALSE;
+ gboolean _tmp0_ = FALSE;
+#line 213 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 214 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_has_domain (self, METADATA_DOMAIN_EXIF);
+#line 214 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp0_;
+#line 214 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 1939 "PhotoMetadata.c"
+}
+
+
+gboolean photo_metadata_has_xmp (PhotoMetadata* self) {
+ gboolean result = FALSE;
+ gboolean _tmp0_ = FALSE;
+#line 217 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 218 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_has_domain (self, METADATA_DOMAIN_XMP);
+#line 218 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp0_;
+#line 218 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 1954 "PhotoMetadata.c"
+}
+
+
+gboolean photo_metadata_has_iptc (PhotoMetadata* self) {
+ gboolean result = FALSE;
+ gboolean _tmp0_ = FALSE;
+#line 221 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 222 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_has_domain (self, METADATA_DOMAIN_IPTC);
+#line 222 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp0_;
+#line 222 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 1969 "PhotoMetadata.c"
+}
+
+
+gboolean photo_metadata_can_write_to_domain (PhotoMetadata* self, MetadataDomain domain) {
+ gboolean result = FALSE;
+ MetadataDomain _tmp0_ = 0;
+#line 225 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 226 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = domain;
+#line 226 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ switch (_tmp0_) {
+#line 226 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ case METADATA_DOMAIN_EXIF:
+#line 1984 "PhotoMetadata.c"
+ {
+ GExiv2Metadata* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+#line 228 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = self->priv->exiv2;
+#line 228 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = gexiv2_metadata_get_supports_exif (_tmp1_);
+#line 228 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp2_;
+#line 228 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 1996 "PhotoMetadata.c"
+ }
+#line 226 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ case METADATA_DOMAIN_XMP:
+#line 2000 "PhotoMetadata.c"
+ {
+ GExiv2Metadata* _tmp3_ = NULL;
+ gboolean _tmp4_ = FALSE;
+#line 231 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = self->priv->exiv2;
+#line 231 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = gexiv2_metadata_get_supports_xmp (_tmp3_);
+#line 231 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp4_;
+#line 231 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2012 "PhotoMetadata.c"
+ }
+#line 226 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ case METADATA_DOMAIN_IPTC:
+#line 2016 "PhotoMetadata.c"
+ {
+ GExiv2Metadata* _tmp5_ = NULL;
+ gboolean _tmp6_ = FALSE;
+#line 234 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = self->priv->exiv2;
+#line 234 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = gexiv2_metadata_get_supports_iptc (_tmp5_);
+#line 234 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp6_;
+#line 234 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2028 "PhotoMetadata.c"
+ }
+ default:
+#line 226 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ case METADATA_DOMAIN_UNKNOWN:
+#line 2033 "PhotoMetadata.c"
+ {
+#line 238 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = FALSE;
+#line 238 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2039 "PhotoMetadata.c"
+ }
+ }
+}
+
+
+gboolean photo_metadata_can_write_exif (PhotoMetadata* self) {
+ gboolean result = FALSE;
+ gboolean _tmp0_ = FALSE;
+#line 242 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 243 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_can_write_to_domain (self, METADATA_DOMAIN_EXIF);
+#line 243 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp0_;
+#line 243 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2056 "PhotoMetadata.c"
+}
+
+
+gboolean photo_metadata_can_write_xmp (PhotoMetadata* self) {
+ gboolean result = FALSE;
+ gboolean _tmp0_ = FALSE;
+#line 246 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 247 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_can_write_to_domain (self, METADATA_DOMAIN_XMP);
+#line 247 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp0_;
+#line 247 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2071 "PhotoMetadata.c"
+}
+
+
+gboolean photo_metadata_can_write_iptc (PhotoMetadata* self) {
+ gboolean result = FALSE;
+ gboolean _tmp0_ = FALSE;
+#line 250 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 251 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_can_write_to_domain (self, METADATA_DOMAIN_IPTC);
+#line 251 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp0_;
+#line 251 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2086 "PhotoMetadata.c"
+}
+
+
+gboolean photo_metadata_has_tag (PhotoMetadata* self, const gchar* tag) {
+ gboolean result = FALSE;
+ GExiv2Metadata* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+#line 254 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 254 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (tag != NULL, FALSE);
+#line 255 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->exiv2;
+#line 255 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = tag;
+#line 255 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = gexiv2_metadata_has_tag (_tmp0_, _tmp1_);
+#line 255 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp2_;
+#line 255 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2109 "PhotoMetadata.c"
+}
+
+
+static GeeSet* photo_metadata_create_string_set (PhotoMetadata* self, GCompareDataFunc compare_func, void* compare_func_target, GDestroyNotify compare_func_target_destroy_notify) {
+ GeeSet* result = NULL;
+ GCompareDataFunc _tmp0_ = NULL;
+ void* _tmp0__target = NULL;
+#line 258 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 260 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = compare_func;
+#line 260 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__target = compare_func_target;
+#line 260 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp0_ == NULL) {
+#line 2125 "PhotoMetadata.c"
+ GeeHashSet* _tmp1_ = NULL;
+#line 261 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
+#line 261 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_SET, GeeSet);
+#line 261 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ (compare_func_target_destroy_notify == NULL) ? NULL : (compare_func_target_destroy_notify (compare_func_target), NULL);
+#line 261 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func = NULL;
+#line 261 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func_target = NULL;
+#line 261 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func_target_destroy_notify = NULL;
+#line 261 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2141 "PhotoMetadata.c"
+ } else {
+ GCompareDataFunc _tmp2_ = NULL;
+ void* _tmp2__target = NULL;
+ GDestroyNotify _tmp2__target_destroy_notify = NULL;
+ GeeTreeSet* _tmp3_ = NULL;
+#line 263 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = compare_func;
+#line 263 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2__target = compare_func_target;
+#line 263 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2__target_destroy_notify = compare_func_target_destroy_notify;
+#line 263 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func_target_destroy_notify = NULL;
+#line 263 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = gee_tree_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, _tmp2_, _tmp2__target, _tmp2__target_destroy_notify);
+#line 263 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_SET, GeeSet);
+#line 263 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ (compare_func_target_destroy_notify == NULL) ? NULL : (compare_func_target_destroy_notify (compare_func_target), NULL);
+#line 263 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func = NULL;
+#line 263 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func_target = NULL;
+#line 263 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func_target_destroy_notify = NULL;
+#line 263 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2169 "PhotoMetadata.c"
+ }
+#line 258 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ (compare_func_target_destroy_notify == NULL) ? NULL : (compare_func_target_destroy_notify (compare_func_target), NULL);
+#line 258 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func = NULL;
+#line 258 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func_target = NULL;
+#line 258 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func_target_destroy_notify = NULL;
+#line 2179 "PhotoMetadata.c"
+}
+
+
+GeeCollection* photo_metadata_get_tags (PhotoMetadata* self, MetadataDomain domain, GCompareDataFunc compare_func, void* compare_func_target, GDestroyNotify compare_func_target_destroy_notify) {
+ GeeCollection* result = NULL;
+ gchar** tags = NULL;
+ gint tags_length1 = 0;
+ gint _tags_size_ = 0;
+ MetadataDomain _tmp0_ = 0;
+ gboolean _tmp10_ = FALSE;
+ gchar** _tmp11_ = NULL;
+ gint _tmp11__length1 = 0;
+ GeeCollection* collection = NULL;
+ GCompareDataFunc _tmp13_ = NULL;
+ void* _tmp13__target = NULL;
+ GDestroyNotify _tmp13__target_destroy_notify = NULL;
+ GeeSet* _tmp14_ = NULL;
+ gchar** _tmp15_ = NULL;
+ gint _tmp15__length1 = 0;
+#line 266 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 268 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tags = NULL;
+#line 268 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tags_length1 = 0;
+#line 268 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tags_size_ = tags_length1;
+#line 269 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = domain;
+#line 269 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ switch (_tmp0_) {
+#line 269 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ case METADATA_DOMAIN_EXIF:
+#line 2213 "PhotoMetadata.c"
+ {
+ GExiv2Metadata* _tmp1_ = NULL;
+ gchar** _tmp2_ = NULL;
+ gchar** _tmp3_ = NULL;
+#line 271 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = self->priv->exiv2;
+#line 271 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = _tmp2_ = gexiv2_metadata_get_exif_tags (_tmp1_);
+#line 271 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tags = (_vala_array_free (tags, tags_length1, (GDestroyNotify) g_free), NULL);
+#line 271 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tags = _tmp3_;
+#line 271 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tags_length1 = _vala_array_length (_tmp2_);
+#line 271 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tags_size_ = tags_length1;
+#line 272 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ break;
+#line 2232 "PhotoMetadata.c"
+ }
+#line 269 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ case METADATA_DOMAIN_XMP:
+#line 2236 "PhotoMetadata.c"
+ {
+ GExiv2Metadata* _tmp4_ = NULL;
+ gchar** _tmp5_ = NULL;
+ gchar** _tmp6_ = NULL;
+#line 275 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = self->priv->exiv2;
+#line 275 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = _tmp5_ = gexiv2_metadata_get_xmp_tags (_tmp4_);
+#line 275 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tags = (_vala_array_free (tags, tags_length1, (GDestroyNotify) g_free), NULL);
+#line 275 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tags = _tmp6_;
+#line 275 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tags_length1 = _vala_array_length (_tmp5_);
+#line 275 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tags_size_ = tags_length1;
+#line 276 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ break;
+#line 2255 "PhotoMetadata.c"
+ }
+#line 269 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ case METADATA_DOMAIN_IPTC:
+#line 2259 "PhotoMetadata.c"
+ {
+ GExiv2Metadata* _tmp7_ = NULL;
+ gchar** _tmp8_ = NULL;
+ gchar** _tmp9_ = NULL;
+#line 279 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = self->priv->exiv2;
+#line 279 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = _tmp8_ = gexiv2_metadata_get_iptc_tags (_tmp7_);
+#line 279 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tags = (_vala_array_free (tags, tags_length1, (GDestroyNotify) g_free), NULL);
+#line 279 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tags = _tmp9_;
+#line 279 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tags_length1 = _vala_array_length (_tmp8_);
+#line 279 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tags_size_ = tags_length1;
+#line 280 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ break;
+#line 2278 "PhotoMetadata.c"
+ }
+ default:
+#line 269 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ break;
+#line 2283 "PhotoMetadata.c"
+ }
+#line 283 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = tags;
+#line 283 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11__length1 = tags_length1;
+#line 283 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp11_ == NULL) {
+#line 283 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = TRUE;
+#line 2293 "PhotoMetadata.c"
+ } else {
+ gchar** _tmp12_ = NULL;
+ gint _tmp12__length1 = 0;
+#line 283 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = tags;
+#line 283 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12__length1 = tags_length1;
+#line 283 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = _tmp12__length1 == 0;
+#line 2303 "PhotoMetadata.c"
+ }
+#line 283 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp10_) {
+#line 284 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = NULL;
+#line 284 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tags = (_vala_array_free (tags, tags_length1, (GDestroyNotify) g_free), NULL);
+#line 284 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ (compare_func_target_destroy_notify == NULL) ? NULL : (compare_func_target_destroy_notify (compare_func_target), NULL);
+#line 284 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func = NULL;
+#line 284 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func_target = NULL;
+#line 284 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func_target_destroy_notify = NULL;
+#line 284 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2321 "PhotoMetadata.c"
+ }
+#line 286 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = compare_func;
+#line 286 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13__target = compare_func_target;
+#line 286 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13__target_destroy_notify = compare_func_target_destroy_notify;
+#line 286 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func_target_destroy_notify = NULL;
+#line 286 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp14_ = photo_metadata_create_string_set (self, _tmp13_, _tmp13__target, _tmp13__target_destroy_notify);
+#line 286 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ collection = G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_COLLECTION, GeeCollection);
+#line 287 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp15_ = tags;
+#line 287 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp15__length1 = tags_length1;
+#line 2339 "PhotoMetadata.c"
+ {
+ gchar** tag_collection = NULL;
+ gint tag_collection_length1 = 0;
+ gint _tag_collection_size_ = 0;
+ gint tag_it = 0;
+#line 287 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag_collection = _tmp15_;
+#line 287 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag_collection_length1 = _tmp15__length1;
+#line 287 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ for (tag_it = 0; tag_it < _tmp15__length1; tag_it = tag_it + 1) {
+#line 2351 "PhotoMetadata.c"
+ gchar* _tmp16_ = NULL;
+ gchar* tag = NULL;
+#line 287 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp16_ = g_strdup (tag_collection[tag_it]);
+#line 287 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag = _tmp16_;
+#line 2358 "PhotoMetadata.c"
+ {
+ GeeCollection* _tmp17_ = NULL;
+ const gchar* _tmp18_ = NULL;
+#line 288 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp17_ = collection;
+#line 288 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18_ = tag;
+#line 288 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gee_collection_add (_tmp17_, _tmp18_);
+#line 287 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (tag);
+#line 2370 "PhotoMetadata.c"
+ }
+ }
+ }
+#line 290 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = collection;
+#line 290 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tags = (_vala_array_free (tags, tags_length1, (GDestroyNotify) g_free), NULL);
+#line 290 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ (compare_func_target_destroy_notify == NULL) ? NULL : (compare_func_target_destroy_notify (compare_func_target), NULL);
+#line 290 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func = NULL;
+#line 290 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func_target = NULL;
+#line 290 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func_target_destroy_notify = NULL;
+#line 290 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2388 "PhotoMetadata.c"
+}
+
+
+static gpointer _g_object_ref0 (gpointer self) {
+#line 309 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return self ? g_object_ref (self) : NULL;
+#line 2395 "PhotoMetadata.c"
+}
+
+
+GeeCollection* photo_metadata_get_all_tags (PhotoMetadata* self, GCompareDataFunc compare_func, void* compare_func_target, GDestroyNotify compare_func_target_destroy_notify) {
+ GeeCollection* result = NULL;
+ GeeCollection* all_tags = NULL;
+ GCompareDataFunc _tmp0_ = NULL;
+ void* _tmp0__target = NULL;
+ GDestroyNotify _tmp0__target_destroy_notify = NULL;
+ GeeSet* _tmp1_ = NULL;
+ GeeCollection* exif_tags = NULL;
+ GeeCollection* _tmp2_ = NULL;
+ gboolean _tmp3_ = FALSE;
+ GeeCollection* _tmp4_ = NULL;
+ GeeCollection* xmp_tags = NULL;
+ GeeCollection* _tmp10_ = NULL;
+ gboolean _tmp11_ = FALSE;
+ GeeCollection* _tmp12_ = NULL;
+ GeeCollection* iptc_tags = NULL;
+ GeeCollection* _tmp18_ = NULL;
+ gboolean _tmp19_ = FALSE;
+ GeeCollection* _tmp20_ = NULL;
+ GeeCollection* _tmp26_ = NULL;
+ GeeCollection* _tmp27_ = NULL;
+ gint _tmp28_ = 0;
+ gint _tmp29_ = 0;
+ GeeCollection* _tmp31_ = NULL;
+#line 293 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 295 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = compare_func;
+#line 295 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__target = compare_func_target;
+#line 295 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__target_destroy_notify = compare_func_target_destroy_notify;
+#line 295 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func_target_destroy_notify = NULL;
+#line 295 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_create_string_set (self, _tmp0_, _tmp0__target, _tmp0__target_destroy_notify);
+#line 295 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ all_tags = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection);
+#line 297 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = photo_metadata_get_tags (self, METADATA_DOMAIN_EXIF, NULL, NULL, NULL);
+#line 297 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ exif_tags = _tmp2_;
+#line 298 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = exif_tags;
+#line 298 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp4_ != NULL) {
+#line 2445 "PhotoMetadata.c"
+ GeeCollection* _tmp5_ = NULL;
+ gint _tmp6_ = 0;
+ gint _tmp7_ = 0;
+#line 298 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = exif_tags;
+#line 298 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = gee_collection_get_size (_tmp5_);
+#line 298 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = _tmp6_;
+#line 298 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = _tmp7_ > 0;
+#line 2457 "PhotoMetadata.c"
+ } else {
+#line 298 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = FALSE;
+#line 2461 "PhotoMetadata.c"
+ }
+#line 298 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp3_) {
+#line 2465 "PhotoMetadata.c"
+ GeeCollection* _tmp8_ = NULL;
+ GeeCollection* _tmp9_ = NULL;
+#line 299 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = all_tags;
+#line 299 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = exif_tags;
+#line 299 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gee_collection_add_all (_tmp8_, _tmp9_);
+#line 2474 "PhotoMetadata.c"
+ }
+#line 301 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = photo_metadata_get_tags (self, METADATA_DOMAIN_XMP, NULL, NULL, NULL);
+#line 301 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ xmp_tags = _tmp10_;
+#line 302 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = xmp_tags;
+#line 302 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp12_ != NULL) {
+#line 2484 "PhotoMetadata.c"
+ GeeCollection* _tmp13_ = NULL;
+ gint _tmp14_ = 0;
+ gint _tmp15_ = 0;
+#line 302 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = xmp_tags;
+#line 302 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp14_ = gee_collection_get_size (_tmp13_);
+#line 302 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp15_ = _tmp14_;
+#line 302 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = _tmp15_ > 0;
+#line 2496 "PhotoMetadata.c"
+ } else {
+#line 302 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = FALSE;
+#line 2500 "PhotoMetadata.c"
+ }
+#line 302 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp11_) {
+#line 2504 "PhotoMetadata.c"
+ GeeCollection* _tmp16_ = NULL;
+ GeeCollection* _tmp17_ = NULL;
+#line 303 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp16_ = all_tags;
+#line 303 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp17_ = xmp_tags;
+#line 303 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gee_collection_add_all (_tmp16_, _tmp17_);
+#line 2513 "PhotoMetadata.c"
+ }
+#line 305 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18_ = photo_metadata_get_tags (self, METADATA_DOMAIN_IPTC, NULL, NULL, NULL);
+#line 305 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ iptc_tags = _tmp18_;
+#line 306 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp20_ = iptc_tags;
+#line 306 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp20_ != NULL) {
+#line 2523 "PhotoMetadata.c"
+ GeeCollection* _tmp21_ = NULL;
+ gint _tmp22_ = 0;
+ gint _tmp23_ = 0;
+#line 306 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp21_ = iptc_tags;
+#line 306 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp22_ = gee_collection_get_size (_tmp21_);
+#line 306 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp23_ = _tmp22_;
+#line 306 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp19_ = _tmp23_ > 0;
+#line 2535 "PhotoMetadata.c"
+ } else {
+#line 306 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp19_ = FALSE;
+#line 2539 "PhotoMetadata.c"
+ }
+#line 306 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp19_) {
+#line 2543 "PhotoMetadata.c"
+ GeeCollection* _tmp24_ = NULL;
+ GeeCollection* _tmp25_ = NULL;
+#line 307 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp24_ = all_tags;
+#line 307 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp25_ = iptc_tags;
+#line 307 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gee_collection_add_all (_tmp24_, _tmp25_);
+#line 2552 "PhotoMetadata.c"
+ }
+#line 309 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp27_ = all_tags;
+#line 309 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp28_ = gee_collection_get_size (_tmp27_);
+#line 309 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp29_ = _tmp28_;
+#line 309 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp29_ > 0) {
+#line 2562 "PhotoMetadata.c"
+ GeeCollection* _tmp30_ = NULL;
+#line 309 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp30_ = all_tags;
+#line 309 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp26_ = _tmp30_;
+#line 2568 "PhotoMetadata.c"
+ } else {
+#line 309 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp26_ = NULL;
+#line 2572 "PhotoMetadata.c"
+ }
+#line 309 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp31_ = _g_object_ref0 (_tmp26_);
+#line 309 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp31_;
+#line 309 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (iptc_tags);
+#line 309 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (xmp_tags);
+#line 309 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (exif_tags);
+#line 309 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (all_tags);
+#line 309 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ (compare_func_target_destroy_notify == NULL) ? NULL : (compare_func_target_destroy_notify (compare_func_target), NULL);
+#line 309 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func = NULL;
+#line 309 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func_target = NULL;
+#line 309 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func_target_destroy_notify = NULL;
+#line 309 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2596 "PhotoMetadata.c"
+}
+
+
+gchar* photo_metadata_get_tag_label (PhotoMetadata* self, const gchar* tag) {
+ gchar* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+#line 312 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 312 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (tag != NULL, NULL);
+#line 313 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = tag;
+#line 313 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = gexiv2_metadata_get_tag_label (_tmp0_);
+#line 313 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = g_strdup (_tmp1_);
+#line 313 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp2_;
+#line 313 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2619 "PhotoMetadata.c"
+}
+
+
+gchar* photo_metadata_get_tag_description (PhotoMetadata* self, const gchar* tag) {
+ gchar* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+#line 316 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 316 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (tag != NULL, NULL);
+#line 317 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = tag;
+#line 317 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = gexiv2_metadata_get_tag_description (_tmp0_);
+#line 317 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = g_strdup (_tmp1_);
+#line 317 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp2_;
+#line 317 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2642 "PhotoMetadata.c"
+}
+
+
+gchar* photo_metadata_get_string (PhotoMetadata* self, const gchar* tag, PrepareInputTextOptions options) {
+ gchar* result = NULL;
+ GExiv2Metadata* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ PrepareInputTextOptions _tmp4_ = 0;
+ gchar* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+#line 320 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 320 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (tag != NULL, NULL);
+#line 321 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->exiv2;
+#line 321 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = tag;
+#line 321 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = gexiv2_metadata_get_tag_string (_tmp0_, _tmp1_);
+#line 321 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = _tmp2_;
+#line 321 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = options;
+#line 321 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = prepare_input_text (_tmp3_, _tmp4_, DEFAULT_USER_TEXT_INPUT_LENGTH);
+#line 321 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = _tmp5_;
+#line 321 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_tmp3_);
+#line 321 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp6_;
+#line 321 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2679 "PhotoMetadata.c"
+}
+
+
+gchar* photo_metadata_get_string_interpreted (PhotoMetadata* self, const gchar* tag, PrepareInputTextOptions options) {
+ gchar* result = NULL;
+ GExiv2Metadata* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ PrepareInputTextOptions _tmp4_ = 0;
+ gchar* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+#line 324 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 324 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (tag != NULL, NULL);
+#line 325 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->exiv2;
+#line 325 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = tag;
+#line 325 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = gexiv2_metadata_get_tag_interpreted_string (_tmp0_, _tmp1_);
+#line 325 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = _tmp2_;
+#line 325 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = options;
+#line 325 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = prepare_input_text (_tmp3_, _tmp4_, DEFAULT_USER_TEXT_INPUT_LENGTH);
+#line 325 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = _tmp5_;
+#line 325 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_tmp3_);
+#line 325 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp6_;
+#line 325 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2716 "PhotoMetadata.c"
+}
+
+
+gchar* photo_metadata_get_first_string (PhotoMetadata* self, gchar** tags, int tags_length1) {
+ gchar* result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+#line 328 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 329 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = tags;
+#line 329 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__length1 = tags_length1;
+#line 2730 "PhotoMetadata.c"
+ {
+ gchar** tag_collection = NULL;
+ gint tag_collection_length1 = 0;
+ gint _tag_collection_size_ = 0;
+ gint tag_it = 0;
+#line 329 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag_collection = _tmp0_;
+#line 329 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag_collection_length1 = _tmp0__length1;
+#line 329 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ for (tag_it = 0; tag_it < _tmp0__length1; tag_it = tag_it + 1) {
+#line 2742 "PhotoMetadata.c"
+ gchar* _tmp1_ = NULL;
+ gchar* tag = NULL;
+#line 329 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = g_strdup (tag_collection[tag_it]);
+#line 329 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag = _tmp1_;
+#line 2749 "PhotoMetadata.c"
+ {
+ gchar* value = NULL;
+ const gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ const gchar* _tmp4_ = NULL;
+#line 330 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = tag;
+#line 330 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = photo_metadata_get_string (self, _tmp2_, PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 330 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value = _tmp3_;
+#line 331 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = value;
+#line 331 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp4_ != NULL) {
+#line 332 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = value;
+#line 332 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (tag);
+#line 332 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2771 "PhotoMetadata.c"
+ }
+#line 329 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (value);
+#line 329 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (tag);
+#line 2777 "PhotoMetadata.c"
+ }
+ }
+ }
+#line 335 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = NULL;
+#line 335 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2785 "PhotoMetadata.c"
+}
+
+
+gchar* photo_metadata_get_first_string_interpreted (PhotoMetadata* self, gchar** tags, int tags_length1) {
+ gchar* result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+#line 338 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 339 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = tags;
+#line 339 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__length1 = tags_length1;
+#line 2799 "PhotoMetadata.c"
+ {
+ gchar** tag_collection = NULL;
+ gint tag_collection_length1 = 0;
+ gint _tag_collection_size_ = 0;
+ gint tag_it = 0;
+#line 339 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag_collection = _tmp0_;
+#line 339 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag_collection_length1 = _tmp0__length1;
+#line 339 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ for (tag_it = 0; tag_it < _tmp0__length1; tag_it = tag_it + 1) {
+#line 2811 "PhotoMetadata.c"
+ gchar* _tmp1_ = NULL;
+ gchar* tag = NULL;
+#line 339 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = g_strdup (tag_collection[tag_it]);
+#line 339 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag = _tmp1_;
+#line 2818 "PhotoMetadata.c"
+ {
+ gchar* value = NULL;
+ const gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ const gchar* _tmp4_ = NULL;
+#line 340 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = tag;
+#line 340 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = photo_metadata_get_string_interpreted (self, _tmp2_, PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 340 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value = _tmp3_;
+#line 341 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = value;
+#line 341 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp4_ != NULL) {
+#line 342 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = value;
+#line 342 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (tag);
+#line 342 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2840 "PhotoMetadata.c"
+ }
+#line 339 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (value);
+#line 339 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (tag);
+#line 2846 "PhotoMetadata.c"
+ }
+ }
+ }
+#line 345 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = NULL;
+#line 345 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2854 "PhotoMetadata.c"
+}
+
+
+GeeList* photo_metadata_get_string_multiple (PhotoMetadata* self, const gchar* tag) {
+ GeeList* result = NULL;
+ gchar** values = NULL;
+ GExiv2Metadata* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ gchar** _tmp2_ = NULL;
+ gchar** _tmp3_ = NULL;
+ gint values_length1 = 0;
+ gint _values_size_ = 0;
+ gboolean _tmp4_ = FALSE;
+ gchar** _tmp5_ = NULL;
+ gint _tmp5__length1 = 0;
+ GeeList* list = NULL;
+ GeeArrayList* _tmp7_ = NULL;
+ GeeHashSet* collection = NULL;
+ GeeHashSet* _tmp8_ = NULL;
+ gchar** _tmp9_ = NULL;
+ gint _tmp9__length1 = 0;
+ GeeList* _tmp22_ = NULL;
+ GeeList* _tmp23_ = NULL;
+ gint _tmp24_ = 0;
+ gint _tmp25_ = 0;
+ GeeList* _tmp27_ = NULL;
+#line 354 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 354 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (tag != NULL, NULL);
+#line 355 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->exiv2;
+#line 355 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = tag;
+#line 355 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = _tmp2_ = gexiv2_metadata_get_tag_multiple (_tmp0_, _tmp1_);
+#line 355 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ values = _tmp3_;
+#line 355 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ values_length1 = _vala_array_length (_tmp2_);
+#line 355 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _values_size_ = values_length1;
+#line 356 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = values;
+#line 356 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5__length1 = values_length1;
+#line 356 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp5_ == NULL) {
+#line 356 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = TRUE;
+#line 2905 "PhotoMetadata.c"
+ } else {
+ gchar** _tmp6_ = NULL;
+ gint _tmp6__length1 = 0;
+#line 356 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = values;
+#line 356 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6__length1 = values_length1;
+#line 356 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = _tmp6__length1 == 0;
+#line 2915 "PhotoMetadata.c"
+ }
+#line 356 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp4_) {
+#line 357 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = NULL;
+#line 357 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ values = (_vala_array_free (values, values_length1, (GDestroyNotify) g_free), NULL);
+#line 357 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 2925 "PhotoMetadata.c"
+ }
+#line 359 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
+#line 359 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ list = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_LIST, GeeList);
+#line 361 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
+#line 361 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ collection = _tmp8_;
+#line 362 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = values;
+#line 362 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9__length1 = values_length1;
+#line 2939 "PhotoMetadata.c"
+ {
+ gchar** value_collection = NULL;
+ gint value_collection_length1 = 0;
+ gint _value_collection_size_ = 0;
+ gint value_it = 0;
+#line 362 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value_collection = _tmp9_;
+#line 362 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value_collection_length1 = _tmp9__length1;
+#line 362 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ for (value_it = 0; value_it < _tmp9__length1; value_it = value_it + 1) {
+#line 2951 "PhotoMetadata.c"
+ gchar* _tmp10_ = NULL;
+ gchar* value = NULL;
+#line 362 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = g_strdup (value_collection[value_it]);
+#line 362 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value = _tmp10_;
+#line 2958 "PhotoMetadata.c"
+ {
+ gchar* prepped = NULL;
+ const gchar* _tmp11_ = NULL;
+ gchar* _tmp12_ = NULL;
+ gboolean _tmp13_ = FALSE;
+ const gchar* _tmp14_ = NULL;
+#line 363 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = value;
+#line 363 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = prepare_input_text (_tmp11_, PHOTO_METADATA_PREPARE_STRING_OPTIONS, DEFAULT_USER_TEXT_INPUT_LENGTH);
+#line 363 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ prepped = _tmp12_;
+#line 366 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp14_ = prepped;
+#line 366 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp14_ != NULL) {
+#line 2975 "PhotoMetadata.c"
+ GeeHashSet* _tmp15_ = NULL;
+ const gchar* _tmp16_ = NULL;
+ gboolean _tmp17_ = FALSE;
+#line 366 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp15_ = collection;
+#line 366 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp16_ = prepped;
+#line 366 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp17_ = gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp16_);
+#line 366 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = !_tmp17_;
+#line 2987 "PhotoMetadata.c"
+ } else {
+#line 366 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = FALSE;
+#line 2991 "PhotoMetadata.c"
+ }
+#line 366 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp13_) {
+#line 2995 "PhotoMetadata.c"
+ GeeList* _tmp18_ = NULL;
+ const gchar* _tmp19_ = NULL;
+ GeeHashSet* _tmp20_ = NULL;
+ const gchar* _tmp21_ = NULL;
+#line 367 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18_ = list;
+#line 367 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp19_ = prepped;
+#line 367 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_COLLECTION, GeeCollection), _tmp19_);
+#line 368 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp20_ = collection;
+#line 368 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp21_ = prepped;
+#line 368 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp21_);
+#line 3012 "PhotoMetadata.c"
+ }
+#line 362 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (prepped);
+#line 362 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (value);
+#line 3018 "PhotoMetadata.c"
+ }
+ }
+ }
+#line 372 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp23_ = list;
+#line 372 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp24_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, GEE_TYPE_COLLECTION, GeeCollection));
+#line 372 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp25_ = _tmp24_;
+#line 372 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp25_ > 0) {
+#line 3030 "PhotoMetadata.c"
+ GeeList* _tmp26_ = NULL;
+#line 372 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp26_ = list;
+#line 372 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp22_ = _tmp26_;
+#line 3036 "PhotoMetadata.c"
+ } else {
+#line 372 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp22_ = NULL;
+#line 3040 "PhotoMetadata.c"
+ }
+#line 372 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp27_ = _g_object_ref0 (_tmp22_);
+#line 372 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp27_;
+#line 372 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (collection);
+#line 372 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (list);
+#line 372 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ values = (_vala_array_free (values, values_length1, (GDestroyNotify) g_free), NULL);
+#line 372 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 3054 "PhotoMetadata.c"
+}
+
+
+GeeList* photo_metadata_get_first_string_multiple (PhotoMetadata* self, gchar** tags, int tags_length1) {
+ GeeList* result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+#line 381 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 382 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = tags;
+#line 382 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__length1 = tags_length1;
+#line 3068 "PhotoMetadata.c"
+ {
+ gchar** tag_collection = NULL;
+ gint tag_collection_length1 = 0;
+ gint _tag_collection_size_ = 0;
+ gint tag_it = 0;
+#line 382 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag_collection = _tmp0_;
+#line 382 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag_collection_length1 = _tmp0__length1;
+#line 382 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ for (tag_it = 0; tag_it < _tmp0__length1; tag_it = tag_it + 1) {
+#line 3080 "PhotoMetadata.c"
+ gchar* _tmp1_ = NULL;
+ gchar* tag = NULL;
+#line 382 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = g_strdup (tag_collection[tag_it]);
+#line 382 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag = _tmp1_;
+#line 3087 "PhotoMetadata.c"
+ {
+ GeeList* values = NULL;
+ const gchar* _tmp2_ = NULL;
+ GeeList* _tmp3_ = NULL;
+ gboolean _tmp4_ = FALSE;
+ GeeList* _tmp5_ = NULL;
+#line 383 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = tag;
+#line 383 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = photo_metadata_get_string_multiple (self, _tmp2_);
+#line 383 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ values = _tmp3_;
+#line 384 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = values;
+#line 384 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp5_ != NULL) {
+#line 3104 "PhotoMetadata.c"
+ GeeList* _tmp6_ = NULL;
+ gint _tmp7_ = 0;
+ gint _tmp8_ = 0;
+#line 384 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = values;
+#line 384 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection));
+#line 384 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = _tmp7_;
+#line 384 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = _tmp8_ > 0;
+#line 3116 "PhotoMetadata.c"
+ } else {
+#line 384 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = FALSE;
+#line 3120 "PhotoMetadata.c"
+ }
+#line 384 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp4_) {
+#line 385 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = values;
+#line 385 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (tag);
+#line 385 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 3130 "PhotoMetadata.c"
+ }
+#line 382 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (values);
+#line 382 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (tag);
+#line 3136 "PhotoMetadata.c"
+ }
+ }
+ }
+#line 388 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = NULL;
+#line 388 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 3144 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_set_string (PhotoMetadata* self, const gchar* tag, const gchar* value, PrepareInputTextOptions options) {
+ gchar* prepped = NULL;
+ const gchar* _tmp0_ = NULL;
+ PrepareInputTextOptions _tmp1_ = 0;
+ gchar* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+ GExiv2Metadata* _tmp6_ = NULL;
+ const gchar* _tmp7_ = NULL;
+ const gchar* _tmp8_ = NULL;
+ gboolean _tmp9_ = FALSE;
+#line 391 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 391 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (tag != NULL);
+#line 391 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (value != NULL);
+#line 392 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = value;
+#line 392 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = options;
+#line 392 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = prepare_input_text (_tmp0_, _tmp1_, DEFAULT_USER_TEXT_INPUT_LENGTH);
+#line 392 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ prepped = _tmp2_;
+#line 393 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = prepped;
+#line 393 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp3_ == NULL) {
+#line 3176 "PhotoMetadata.c"
+ const gchar* _tmp4_ = NULL;
+ const gchar* _tmp5_ = NULL;
+#line 394 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = tag;
+#line 394 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = value;
+#line 394 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_warning ("PhotoMetadata.vala:394: Not setting tag %s to string %s: invalid UTF-8", _tmp4_, _tmp5_);
+#line 396 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (prepped);
+#line 396 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return;
+#line 3189 "PhotoMetadata.c"
+ }
+#line 399 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = self->priv->exiv2;
+#line 399 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = tag;
+#line 399 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = prepped;
+#line 399 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = gexiv2_metadata_set_tag_string (_tmp6_, _tmp7_, _tmp8_);
+#line 399 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp9_) {
+#line 3201 "PhotoMetadata.c"
+ const gchar* _tmp10_ = NULL;
+ const gchar* _tmp11_ = NULL;
+ const gchar* _tmp12_ = NULL;
+#line 400 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = tag;
+#line 400 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = value;
+#line 400 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = self->priv->source_name;
+#line 400 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_warning ("PhotoMetadata.vala:400: Unable to set tag %s to string %s from source " \
+"%s", _tmp10_, _tmp11_, _tmp12_);
+#line 3213 "PhotoMetadata.c"
+ }
+#line 391 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (prepped);
+#line 3217 "PhotoMetadata.c"
+}
+
+
+static void photo_metadata_set_all_generic (PhotoMetadata* self, gchar** tags, int tags_length1, PhotoMetadataSetOption option, PhotoMetadataSetGenericValue setter, void* setter_target) {
+ gboolean written = FALSE;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ gboolean _tmp9_ = FALSE;
+ gboolean _tmp10_ = FALSE;
+ PhotoMetadataSetOption _tmp11_ = 0;
+#line 405 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 406 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ written = FALSE;
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = tags;
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__length1 = tags_length1;
+#line 3236 "PhotoMetadata.c"
+ {
+ gchar** tag_collection = NULL;
+ gint tag_collection_length1 = 0;
+ gint _tag_collection_size_ = 0;
+ gint tag_it = 0;
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag_collection = _tmp0_;
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag_collection_length1 = _tmp0__length1;
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ for (tag_it = 0; tag_it < _tmp0__length1; tag_it = tag_it + 1) {
+#line 3248 "PhotoMetadata.c"
+ gchar* _tmp1_ = NULL;
+ gchar* tag = NULL;
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = g_strdup (tag_collection[tag_it]);
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag = _tmp1_;
+#line 3255 "PhotoMetadata.c"
+ {
+ gboolean _tmp2_ = FALSE;
+ PhotoMetadataSetOption _tmp3_ = 0;
+#line 408 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = option;
+#line 408 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp3_ == PHOTO_METADATA_SET_OPTION_ALL_DOMAINS) {
+#line 408 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = TRUE;
+#line 3265 "PhotoMetadata.c"
+ } else {
+ const gchar* _tmp4_ = NULL;
+ MetadataDomain _tmp5_ = 0;
+ gboolean _tmp6_ = FALSE;
+#line 408 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = tag;
+#line 408 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = photo_metadata_get_tag_domain (_tmp4_);
+#line 408 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = photo_metadata_has_domain (self, _tmp5_);
+#line 408 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = _tmp6_;
+#line 3278 "PhotoMetadata.c"
+ }
+#line 408 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp2_) {
+#line 3282 "PhotoMetadata.c"
+ PhotoMetadataSetGenericValue _tmp7_ = NULL;
+ void* _tmp7__target = NULL;
+ const gchar* _tmp8_ = NULL;
+#line 409 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = setter;
+#line 409 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7__target = setter_target;
+#line 409 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = tag;
+#line 409 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ (_tmp8_, _tmp7__target);
+#line 410 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ written = TRUE;
+#line 3296 "PhotoMetadata.c"
+ }
+#line 407 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (tag);
+#line 3300 "PhotoMetadata.c"
+ }
+ }
+ }
+#line 414 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = option;
+#line 414 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp11_ == PHOTO_METADATA_SET_OPTION_AT_LEAST_DEFAULT_DOMAIN) {
+#line 3308 "PhotoMetadata.c"
+ gboolean _tmp12_ = FALSE;
+#line 414 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = written;
+#line 414 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = !_tmp12_;
+#line 3314 "PhotoMetadata.c"
+ } else {
+#line 414 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = FALSE;
+#line 3318 "PhotoMetadata.c"
+ }
+#line 414 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp10_) {
+#line 3322 "PhotoMetadata.c"
+ gchar** _tmp13_ = NULL;
+ gint _tmp13__length1 = 0;
+#line 414 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = tags;
+#line 414 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13__length1 = tags_length1;
+#line 414 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = _tmp13__length1 > 0;
+#line 3331 "PhotoMetadata.c"
+ } else {
+#line 414 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = FALSE;
+#line 3335 "PhotoMetadata.c"
+ }
+#line 414 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp9_) {
+#line 3339 "PhotoMetadata.c"
+ MetadataDomain default_domain = 0;
+ gchar** _tmp14_ = NULL;
+ gint _tmp14__length1 = 0;
+ const gchar* _tmp15_ = NULL;
+ MetadataDomain _tmp16_ = 0;
+ PhotoMetadataSetGenericValue _tmp17_ = NULL;
+ void* _tmp17__target = NULL;
+ gchar** _tmp18_ = NULL;
+ gint _tmp18__length1 = 0;
+ const gchar* _tmp19_ = NULL;
+#line 415 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp14_ = tags;
+#line 415 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp14__length1 = tags_length1;
+#line 415 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp15_ = _tmp14_[0];
+#line 415 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp16_ = photo_metadata_get_tag_domain (_tmp15_);
+#line 415 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ default_domain = _tmp16_;
+#line 418 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp17_ = setter;
+#line 418 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp17__target = setter_target;
+#line 418 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18_ = tags;
+#line 418 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18__length1 = tags_length1;
+#line 418 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp19_ = _tmp18_[0];
+#line 418 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp17_ (_tmp19_, _tmp17__target);
+#line 3372 "PhotoMetadata.c"
+ {
+ gint ctr = 0;
+#line 421 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ ctr = 1;
+#line 3377 "PhotoMetadata.c"
+ {
+ gboolean _tmp20_ = FALSE;
+#line 421 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp20_ = TRUE;
+#line 421 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ while (TRUE) {
+#line 3384 "PhotoMetadata.c"
+ gint _tmp22_ = 0;
+ gchar** _tmp23_ = NULL;
+ gint _tmp23__length1 = 0;
+ gchar** _tmp24_ = NULL;
+ gint _tmp24__length1 = 0;
+ gint _tmp25_ = 0;
+ const gchar* _tmp26_ = NULL;
+ MetadataDomain _tmp27_ = 0;
+ MetadataDomain _tmp28_ = 0;
+#line 421 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp20_) {
+#line 3396 "PhotoMetadata.c"
+ gint _tmp21_ = 0;
+#line 421 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp21_ = ctr;
+#line 421 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ ctr = _tmp21_ + 1;
+#line 3402 "PhotoMetadata.c"
+ }
+#line 421 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp20_ = FALSE;
+#line 421 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp22_ = ctr;
+#line 421 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp23_ = tags;
+#line 421 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp23__length1 = tags_length1;
+#line 421 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!(_tmp22_ < _tmp23__length1)) {
+#line 421 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ break;
+#line 3416 "PhotoMetadata.c"
+ }
+#line 422 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp24_ = tags;
+#line 422 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp24__length1 = tags_length1;
+#line 422 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp25_ = ctr;
+#line 422 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp26_ = _tmp24_[_tmp25_];
+#line 422 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp27_ = photo_metadata_get_tag_domain (_tmp26_);
+#line 422 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp28_ = default_domain;
+#line 422 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp27_ == _tmp28_) {
+#line 3432 "PhotoMetadata.c"
+ PhotoMetadataSetGenericValue _tmp29_ = NULL;
+ void* _tmp29__target = NULL;
+ gchar** _tmp30_ = NULL;
+ gint _tmp30__length1 = 0;
+ gint _tmp31_ = 0;
+ const gchar* _tmp32_ = NULL;
+#line 423 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp29_ = setter;
+#line 423 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp29__target = setter_target;
+#line 423 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp30_ = tags;
+#line 423 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp30__length1 = tags_length1;
+#line 423 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp31_ = ctr;
+#line 423 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp32_ = _tmp30_[_tmp31_];
+#line 423 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp29_ (_tmp32_, _tmp29__target);
+#line 3453 "PhotoMetadata.c"
+ }
+ }
+ }
+ }
+ }
+}
+
+
+static Block1Data* block1_data_ref (Block1Data* _data1_) {
+#line 428 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_atomic_int_inc (&_data1_->_ref_count_);
+#line 428 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return _data1_;
+#line 3467 "PhotoMetadata.c"
+}
+
+
+static void block1_data_unref (void * _userdata_) {
+ Block1Data* _data1_;
+ _data1_ = (Block1Data*) _userdata_;
+#line 428 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
+#line 3476 "PhotoMetadata.c"
+ PhotoMetadata* self;
+#line 428 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = _data1_->self;
+#line 428 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_data1_->value);
+#line 428 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _media_metadata_unref0 (self);
+#line 428 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_slice_free (Block1Data, _data1_);
+#line 3486 "PhotoMetadata.c"
+ }
+}
+
+
+static void __lambda5_ (Block1Data* _data1_, const gchar* tag) {
+ PhotoMetadata* self;
+ const gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+#line 429 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = _data1_->self;
+#line 429 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (tag != NULL);
+#line 429 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = tag;
+#line 429 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = _data1_->value;
+#line 429 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_string (self, _tmp0_, _tmp1_, PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 3505 "PhotoMetadata.c"
+}
+
+
+static void ___lambda5__photo_metadata_set_generic_value (const gchar* tag, gpointer self) {
+#line 429 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ __lambda5_ (self, tag);
+#line 3512 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_set_all_string (PhotoMetadata* self, gchar** tags, int tags_length1, const gchar* value, PhotoMetadataSetOption option) {
+ Block1Data* _data1_;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar** _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+ PhotoMetadataSetOption _tmp3_ = 0;
+#line 428 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 428 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (value != NULL);
+#line 428 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data1_ = g_slice_new0 (Block1Data);
+#line 428 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data1_->_ref_count_ = 1;
+#line 428 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data1_->self = media_metadata_ref (self);
+#line 428 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = value;
+#line 428 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 428 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_data1_->value);
+#line 428 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data1_->value = _tmp1_;
+#line 429 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = tags;
+#line 429 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2__length1 = tags_length1;
+#line 429 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = option;
+#line 429 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_all_generic (self, _tmp2_, _tmp2__length1, _tmp3_, ___lambda5__photo_metadata_set_generic_value, _data1_);
+#line 428 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ block1_data_unref (_data1_);
+#line 428 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data1_ = NULL;
+#line 3553 "PhotoMetadata.c"
+}
+
+
+static void _vala_array_add45 (gchar*** array, int* length, int* size, gchar* value) {
+#line 437 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if ((*length) == (*size)) {
+#line 437 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *size = (*size) ? (2 * (*size)) : 4;
+#line 437 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *array = g_renew (gchar*, *array, (*size) + 1);
+#line 3564 "PhotoMetadata.c"
+ }
+#line 437 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ (*array)[(*length)++] = value;
+#line 437 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ (*array)[*length] = NULL;
+#line 3570 "PhotoMetadata.c"
+}
+
+
+static void _vala_array_add46 (gchar*** array, int* length, int* size, gchar* value) {
+#line 449 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if ((*length) == (*size)) {
+#line 449 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *size = (*size) ? (2 * (*size)) : 4;
+#line 449 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *array = g_renew (gchar*, *array, (*size) + 1);
+#line 3581 "PhotoMetadata.c"
+ }
+#line 449 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ (*array)[(*length)++] = value;
+#line 449 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ (*array)[*length] = NULL;
+#line 3587 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_set_string_multiple (PhotoMetadata* self, const gchar* tag, GeeCollection* collection) {
+ gchar** values = NULL;
+ gchar** _tmp0_ = NULL;
+ gint values_length1 = 0;
+ gint _values_size_ = 0;
+ gchar** _tmp15_ = NULL;
+ gint _tmp15__length1 = 0;
+ gchar** _tmp16_ = NULL;
+ gint _tmp16__length1 = 0;
+ GExiv2Metadata* _tmp17_ = NULL;
+ const gchar* _tmp18_ = NULL;
+ gchar** _tmp19_ = NULL;
+ gint _tmp19__length1 = 0;
+ gboolean _tmp20_ = FALSE;
+#line 432 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 432 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (tag != NULL);
+#line 432 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (GEE_IS_COLLECTION (collection));
+#line 433 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = g_new0 (gchar*, 0 + 1);
+#line 433 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ values = _tmp0_;
+#line 433 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ values_length1 = 0;
+#line 433 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _values_size_ = values_length1;
+#line 3619 "PhotoMetadata.c"
+ {
+ GeeIterator* _value_it = NULL;
+ GeeCollection* _tmp1_ = NULL;
+ GeeIterator* _tmp2_ = NULL;
+#line 434 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = collection;
+#line 434 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ITERABLE, GeeIterable));
+#line 434 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _value_it = _tmp2_;
+#line 434 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ while (TRUE) {
+#line 3632 "PhotoMetadata.c"
+ GeeIterator* _tmp3_ = NULL;
+ gboolean _tmp4_ = FALSE;
+ gchar* value = NULL;
+ GeeIterator* _tmp5_ = NULL;
+ gpointer _tmp6_ = NULL;
+ gchar* prepped = NULL;
+ const gchar* _tmp7_ = NULL;
+ gchar* _tmp8_ = NULL;
+ const gchar* _tmp9_ = NULL;
+#line 434 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = _value_it;
+#line 434 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = gee_iterator_next (_tmp3_);
+#line 434 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp4_) {
+#line 434 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ break;
+#line 3650 "PhotoMetadata.c"
+ }
+#line 434 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = _value_it;
+#line 434 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = gee_iterator_get (_tmp5_);
+#line 434 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value = (gchar*) _tmp6_;
+#line 435 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = value;
+#line 435 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = prepare_input_text (_tmp7_, PHOTO_METADATA_PREPARE_STRING_OPTIONS, -1);
+#line 435 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ prepped = _tmp8_;
+#line 436 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = prepped;
+#line 436 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp9_ != NULL) {
+#line 3668 "PhotoMetadata.c"
+ gchar** _tmp10_ = NULL;
+ gint _tmp10__length1 = 0;
+ const gchar* _tmp11_ = NULL;
+ gchar* _tmp12_ = NULL;
+#line 437 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = values;
+#line 437 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10__length1 = values_length1;
+#line 437 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = prepped;
+#line 437 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = g_strdup (_tmp11_);
+#line 437 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_array_add45 (&values, &values_length1, &_values_size_, _tmp12_);
+#line 3683 "PhotoMetadata.c"
+ } else {
+ const gchar* _tmp13_ = NULL;
+ const gchar* _tmp14_ = NULL;
+#line 439 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = value;
+#line 439 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp14_ = tag;
+#line 439 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_warning ("PhotoMetadata.vala:439: Unable to set string %s to %s: invalid UTF-8", _tmp13_, _tmp14_);
+#line 3693 "PhotoMetadata.c"
+ }
+#line 434 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (prepped);
+#line 434 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (value);
+#line 3699 "PhotoMetadata.c"
+ }
+#line 434 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (_value_it);
+#line 3703 "PhotoMetadata.c"
+ }
+#line 442 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp15_ = values;
+#line 442 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp15__length1 = values_length1;
+#line 442 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp15__length1 == 0) {
+#line 443 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ values = (_vala_array_free (values, values_length1, (GDestroyNotify) g_free), NULL);
+#line 443 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return;
+#line 3715 "PhotoMetadata.c"
+ }
+#line 449 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp16_ = values;
+#line 449 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp16__length1 = values_length1;
+#line 449 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_array_add46 (&values, &values_length1, &_values_size_, NULL);
+#line 451 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp17_ = self->priv->exiv2;
+#line 451 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18_ = tag;
+#line 451 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp19_ = values;
+#line 451 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp19__length1 = values_length1;
+#line 451 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp20_ = gexiv2_metadata_set_tag_multiple (_tmp17_, _tmp18_, _tmp19_);
+#line 451 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp20_) {
+#line 3735 "PhotoMetadata.c"
+ gchar** _tmp21_ = NULL;
+ gint _tmp21__length1 = 0;
+ const gchar* _tmp22_ = NULL;
+ const gchar* _tmp23_ = NULL;
+#line 452 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp21_ = values;
+#line 452 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp21__length1 = values_length1;
+#line 452 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp22_ = tag;
+#line 452 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp23_ = self->priv->source_name;
+#line 452 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_warning ("PhotoMetadata.vala:452: Unable to set %d strings to tag %s from source" \
+" %s", _tmp21__length1, _tmp22_, _tmp23_);
+#line 3750 "PhotoMetadata.c"
+ }
+#line 432 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ values = (_vala_array_free (values, values_length1, (GDestroyNotify) g_free), NULL);
+#line 3754 "PhotoMetadata.c"
+}
+
+
+static Block2Data* block2_data_ref (Block2Data* _data2_) {
+#line 455 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_atomic_int_inc (&_data2_->_ref_count_);
+#line 455 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return _data2_;
+#line 3763 "PhotoMetadata.c"
+}
+
+
+static void block2_data_unref (void * _userdata_) {
+ Block2Data* _data2_;
+ _data2_ = (Block2Data*) _userdata_;
+#line 455 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
+#line 3772 "PhotoMetadata.c"
+ PhotoMetadata* self;
+#line 455 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = _data2_->self;
+#line 455 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (_data2_->values);
+#line 455 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _media_metadata_unref0 (self);
+#line 455 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_slice_free (Block2Data, _data2_);
+#line 3782 "PhotoMetadata.c"
+ }
+}
+
+
+static void __lambda6_ (Block2Data* _data2_, const gchar* tag) {
+ PhotoMetadata* self;
+ const gchar* _tmp0_ = NULL;
+ GeeCollection* _tmp1_ = NULL;
+#line 456 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = _data2_->self;
+#line 456 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (tag != NULL);
+#line 456 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = tag;
+#line 456 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = _data2_->values;
+#line 456 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_string_multiple (self, _tmp0_, _tmp1_);
+#line 3801 "PhotoMetadata.c"
+}
+
+
+static void ___lambda6__photo_metadata_set_generic_value (const gchar* tag, gpointer self) {
+#line 456 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ __lambda6_ (self, tag);
+#line 3808 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_set_all_string_multiple (PhotoMetadata* self, gchar** tags, int tags_length1, GeeCollection* values, PhotoMetadataSetOption option) {
+ Block2Data* _data2_;
+ GeeCollection* _tmp0_ = NULL;
+ GeeCollection* _tmp1_ = NULL;
+ gchar** _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+ PhotoMetadataSetOption _tmp3_ = 0;
+#line 455 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 455 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (GEE_IS_COLLECTION (values));
+#line 455 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data2_ = g_slice_new0 (Block2Data);
+#line 455 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data2_->_ref_count_ = 1;
+#line 455 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data2_->self = media_metadata_ref (self);
+#line 455 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = values;
+#line 455 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = _g_object_ref0 (_tmp0_);
+#line 455 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (_data2_->values);
+#line 455 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data2_->values = _tmp1_;
+#line 456 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = tags;
+#line 456 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2__length1 = tags_length1;
+#line 456 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = option;
+#line 456 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_all_generic (self, _tmp2_, _tmp2__length1, _tmp3_, ___lambda6__photo_metadata_set_generic_value, _data2_);
+#line 455 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ block2_data_unref (_data2_);
+#line 455 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data2_ = NULL;
+#line 3849 "PhotoMetadata.c"
+}
+
+
+gboolean photo_metadata_get_long (PhotoMetadata* self, const gchar* tag, glong* value) {
+ glong _vala_value = 0L;
+ gboolean result = FALSE;
+ const gchar* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+ GExiv2Metadata* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+ glong _tmp4_ = 0L;
+#line 459 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 459 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (tag != NULL, FALSE);
+#line 460 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = tag;
+#line 460 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_has_tag (self, _tmp0_);
+#line 460 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp1_) {
+#line 461 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_value = (glong) 0;
+#line 463 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = FALSE;
+#line 463 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (value) {
+#line 463 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *value = _vala_value;
+#line 3879 "PhotoMetadata.c"
+ }
+#line 463 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 3883 "PhotoMetadata.c"
+ }
+#line 466 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = self->priv->exiv2;
+#line 466 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = tag;
+#line 466 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = gexiv2_metadata_get_tag_long (_tmp2_, _tmp3_);
+#line 466 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_value = _tmp4_;
+#line 468 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = TRUE;
+#line 468 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (value) {
+#line 468 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *value = _vala_value;
+#line 3899 "PhotoMetadata.c"
+ }
+#line 468 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 3903 "PhotoMetadata.c"
+}
+
+
+gboolean photo_metadata_get_first_long (PhotoMetadata* self, gchar** tags, int tags_length1, glong* value) {
+ glong _vala_value = 0L;
+ gboolean result = FALSE;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+#line 471 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 472 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = tags;
+#line 472 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__length1 = tags_length1;
+#line 3918 "PhotoMetadata.c"
+ {
+ gchar** tag_collection = NULL;
+ gint tag_collection_length1 = 0;
+ gint _tag_collection_size_ = 0;
+ gint tag_it = 0;
+#line 472 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag_collection = _tmp0_;
+#line 472 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag_collection_length1 = _tmp0__length1;
+#line 472 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ for (tag_it = 0; tag_it < _tmp0__length1; tag_it = tag_it + 1) {
+#line 3930 "PhotoMetadata.c"
+ gchar* _tmp1_ = NULL;
+ gchar* tag = NULL;
+#line 472 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = g_strdup (tag_collection[tag_it]);
+#line 472 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag = _tmp1_;
+#line 3937 "PhotoMetadata.c"
+ {
+ const gchar* _tmp2_ = NULL;
+ glong _tmp3_ = 0L;
+ gboolean _tmp4_ = FALSE;
+#line 473 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = tag;
+#line 473 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = photo_metadata_get_long (self, _tmp2_, &_tmp3_);
+#line 473 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_value = _tmp3_;
+#line 473 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp4_) {
+#line 474 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = TRUE;
+#line 474 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (tag);
+#line 474 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (value) {
+#line 474 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *value = _vala_value;
+#line 3958 "PhotoMetadata.c"
+ }
+#line 474 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 3962 "PhotoMetadata.c"
+ }
+#line 472 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (tag);
+#line 3966 "PhotoMetadata.c"
+ }
+ }
+ }
+#line 477 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_value = (glong) 0;
+#line 479 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = FALSE;
+#line 479 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (value) {
+#line 479 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *value = _vala_value;
+#line 3978 "PhotoMetadata.c"
+ }
+#line 479 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 3982 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_set_long (PhotoMetadata* self, const gchar* tag, glong value) {
+ GExiv2Metadata* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ glong _tmp2_ = 0L;
+ gboolean _tmp3_ = FALSE;
+#line 482 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 482 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (tag != NULL);
+#line 483 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->exiv2;
+#line 483 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = tag;
+#line 483 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = value;
+#line 483 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = gexiv2_metadata_set_tag_long (_tmp0_, _tmp1_, _tmp2_);
+#line 483 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp3_) {
+#line 4005 "PhotoMetadata.c"
+ const gchar* _tmp4_ = NULL;
+ glong _tmp5_ = 0L;
+ const gchar* _tmp6_ = NULL;
+#line 484 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = tag;
+#line 484 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = value;
+#line 484 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = self->priv->source_name;
+#line 484 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_warning ("PhotoMetadata.vala:484: Unable to set tag %s to long %ld from source %" \
+"s", _tmp4_, _tmp5_, _tmp6_);
+#line 4017 "PhotoMetadata.c"
+ }
+}
+
+
+static Block3Data* block3_data_ref (Block3Data* _data3_) {
+#line 487 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_atomic_int_inc (&_data3_->_ref_count_);
+#line 487 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return _data3_;
+#line 4027 "PhotoMetadata.c"
+}
+
+
+static void block3_data_unref (void * _userdata_) {
+ Block3Data* _data3_;
+ _data3_ = (Block3Data*) _userdata_;
+#line 487 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
+#line 4036 "PhotoMetadata.c"
+ PhotoMetadata* self;
+#line 487 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = _data3_->self;
+#line 487 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _media_metadata_unref0 (self);
+#line 487 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_slice_free (Block3Data, _data3_);
+#line 4044 "PhotoMetadata.c"
+ }
+}
+
+
+static void __lambda7_ (Block3Data* _data3_, const gchar* tag) {
+ PhotoMetadata* self;
+ const gchar* _tmp0_ = NULL;
+ glong _tmp1_ = 0L;
+#line 488 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = _data3_->self;
+#line 488 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (tag != NULL);
+#line 488 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = tag;
+#line 488 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = _data3_->value;
+#line 488 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_long (self, _tmp0_, _tmp1_);
+#line 4063 "PhotoMetadata.c"
+}
+
+
+static void ___lambda7__photo_metadata_set_generic_value (const gchar* tag, gpointer self) {
+#line 488 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ __lambda7_ (self, tag);
+#line 4070 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_set_all_long (PhotoMetadata* self, gchar** tags, int tags_length1, glong value, PhotoMetadataSetOption option) {
+ Block3Data* _data3_;
+ glong _tmp0_ = 0L;
+ gchar** _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+ PhotoMetadataSetOption _tmp2_ = 0;
+#line 487 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 487 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data3_ = g_slice_new0 (Block3Data);
+#line 487 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data3_->_ref_count_ = 1;
+#line 487 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data3_->self = media_metadata_ref (self);
+#line 487 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = value;
+#line 487 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data3_->value = _tmp0_;
+#line 488 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = tags;
+#line 488 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1__length1 = tags_length1;
+#line 488 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = option;
+#line 488 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_all_generic (self, _tmp1_, _tmp1__length1, _tmp2_, ___lambda7__photo_metadata_set_generic_value, _data3_);
+#line 487 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ block3_data_unref (_data3_);
+#line 487 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data3_ = NULL;
+#line 4104 "PhotoMetadata.c"
+}
+
+
+gboolean photo_metadata_get_rational (PhotoMetadata* self, const gchar* tag, MetadataRational* rational) {
+ MetadataRational _vala_rational = {0};
+ gboolean result = FALSE;
+ gint numerator = 0;
+ gint denominator = 0;
+ gboolean _result_ = FALSE;
+ GExiv2Metadata* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ gint _tmp2_ = 0;
+ gint _tmp3_ = 0;
+ gboolean _tmp4_ = FALSE;
+#line 491 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 491 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (tag != NULL, FALSE);
+#line 493 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->exiv2;
+#line 493 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = tag;
+#line 493 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = gexiv2_metadata_get_exif_tag_rational (_tmp0_, _tmp1_, &_tmp2_, &_tmp3_);
+#line 493 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ numerator = _tmp2_;
+#line 493 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ denominator = _tmp3_;
+#line 493 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _result_ = _tmp4_;
+#line 495 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ metadata_rational_init (&_vala_rational, numerator, denominator);
+#line 497 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _result_;
+#line 497 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (rational) {
+#line 497 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *rational = _vala_rational;
+#line 4143 "PhotoMetadata.c"
+ }
+#line 497 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 4147 "PhotoMetadata.c"
+}
+
+
+gboolean photo_metadata_get_first_rational (PhotoMetadata* self, gchar** tags, int tags_length1, MetadataRational* rational) {
+ MetadataRational _vala_rational = {0};
+ gboolean result = FALSE;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+#line 500 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 501 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = tags;
+#line 501 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__length1 = tags_length1;
+#line 4162 "PhotoMetadata.c"
+ {
+ gchar** tag_collection = NULL;
+ gint tag_collection_length1 = 0;
+ gint _tag_collection_size_ = 0;
+ gint tag_it = 0;
+#line 501 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag_collection = _tmp0_;
+#line 501 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag_collection_length1 = _tmp0__length1;
+#line 501 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ for (tag_it = 0; tag_it < _tmp0__length1; tag_it = tag_it + 1) {
+#line 4174 "PhotoMetadata.c"
+ gchar* _tmp1_ = NULL;
+ gchar* tag = NULL;
+#line 501 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = g_strdup (tag_collection[tag_it]);
+#line 501 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag = _tmp1_;
+#line 4181 "PhotoMetadata.c"
+ {
+ const gchar* _tmp2_ = NULL;
+ MetadataRational _tmp3_ = {0};
+ gboolean _tmp4_ = FALSE;
+#line 502 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = tag;
+#line 502 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = photo_metadata_get_rational (self, _tmp2_, &_tmp3_);
+#line 502 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_rational = _tmp3_;
+#line 502 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp4_) {
+#line 503 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = TRUE;
+#line 503 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (tag);
+#line 503 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (rational) {
+#line 503 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *rational = _vala_rational;
+#line 4202 "PhotoMetadata.c"
+ }
+#line 503 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 4206 "PhotoMetadata.c"
+ }
+#line 501 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (tag);
+#line 4210 "PhotoMetadata.c"
+ }
+ }
+ }
+#line 506 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ metadata_rational_init (&_vala_rational, 0, 0);
+#line 508 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = FALSE;
+#line 508 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (rational) {
+#line 508 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *rational = _vala_rational;
+#line 4222 "PhotoMetadata.c"
+ }
+#line 508 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 4226 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_set_rational (PhotoMetadata* self, const gchar* tag, MetadataRational* rational) {
+ GExiv2Metadata* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ MetadataRational _tmp2_ = {0};
+ gint _tmp3_ = 0;
+ MetadataRational _tmp4_ = {0};
+ gint _tmp5_ = 0;
+ gboolean _tmp6_ = FALSE;
+#line 511 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 511 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (tag != NULL);
+#line 511 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (rational != NULL);
+#line 512 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->exiv2;
+#line 512 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = tag;
+#line 512 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = *rational;
+#line 512 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = _tmp2_.numerator;
+#line 512 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = *rational;
+#line 512 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = _tmp4_.denominator;
+#line 512 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = gexiv2_metadata_set_exif_tag_rational (_tmp0_, _tmp1_, _tmp3_, _tmp5_);
+#line 512 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp6_) {
+#line 4260 "PhotoMetadata.c"
+ const gchar* _tmp7_ = NULL;
+ gchar* _tmp8_ = NULL;
+ gchar* _tmp9_ = NULL;
+ const gchar* _tmp10_ = NULL;
+#line 513 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = tag;
+#line 513 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = metadata_rational_to_string (rational);
+#line 513 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = _tmp8_;
+#line 513 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = self->priv->source_name;
+#line 513 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_warning ("PhotoMetadata.vala:513: Unable to set tag %s to rational %s from sourc" \
+"e %s", _tmp7_, _tmp9_, _tmp10_);
+#line 513 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_tmp9_);
+#line 4277 "PhotoMetadata.c"
+ }
+}
+
+
+static Block4Data* block4_data_ref (Block4Data* _data4_) {
+#line 518 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_atomic_int_inc (&_data4_->_ref_count_);
+#line 518 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return _data4_;
+#line 4287 "PhotoMetadata.c"
+}
+
+
+static void block4_data_unref (void * _userdata_) {
+ Block4Data* _data4_;
+ _data4_ = (Block4Data*) _userdata_;
+#line 518 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
+#line 4296 "PhotoMetadata.c"
+ PhotoMetadata* self;
+#line 518 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = _data4_->self;
+#line 518 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _media_metadata_unref0 (self);
+#line 518 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_slice_free (Block4Data, _data4_);
+#line 4304 "PhotoMetadata.c"
+ }
+}
+
+
+static void __lambda8_ (Block4Data* _data4_, const gchar* tag) {
+ PhotoMetadata* self;
+ const gchar* _tmp0_ = NULL;
+ MetadataRational _tmp1_ = {0};
+#line 519 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = _data4_->self;
+#line 519 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (tag != NULL);
+#line 519 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = tag;
+#line 519 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = _data4_->rational;
+#line 519 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_rational (self, _tmp0_, &_tmp1_);
+#line 4323 "PhotoMetadata.c"
+}
+
+
+static void ___lambda8__photo_metadata_set_generic_value (const gchar* tag, gpointer self) {
+#line 519 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ __lambda8_ (self, tag);
+#line 4330 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_set_all_rational (PhotoMetadata* self, gchar** tags, int tags_length1, MetadataRational* rational, PhotoMetadataSetOption option) {
+ Block4Data* _data4_;
+ MetadataRational _tmp0_ = {0};
+ gchar** _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+ PhotoMetadataSetOption _tmp2_ = 0;
+#line 518 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 518 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (rational != NULL);
+#line 518 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data4_ = g_slice_new0 (Block4Data);
+#line 518 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data4_->_ref_count_ = 1;
+#line 518 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data4_->self = media_metadata_ref (self);
+#line 518 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = *rational;
+#line 518 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data4_->rational = _tmp0_;
+#line 519 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = tags;
+#line 519 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1__length1 = tags_length1;
+#line 519 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = option;
+#line 519 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_all_generic (self, _tmp1_, _tmp1__length1, _tmp2_, ___lambda8__photo_metadata_set_generic_value, _data4_);
+#line 518 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ block4_data_unref (_data4_);
+#line 518 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data4_ = NULL;
+#line 4366 "PhotoMetadata.c"
+}
+
+
+MetadataDateTime* photo_metadata_get_date_time (PhotoMetadata* self, const gchar* tag) {
+ MetadataDateTime* result = NULL;
+ gchar* value = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 522 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 522 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (tag != NULL, NULL);
+#line 523 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = tag;
+#line 523 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_get_string (self, _tmp0_, PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 523 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ value = _tmp1_;
+#line 524 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = value;
+#line 524 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp2_ == NULL) {
+#line 525 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = NULL;
+#line 525 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (value);
+#line 525 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 4397 "PhotoMetadata.c"
+ }
+ {
+ const gchar* _tmp3_ = NULL;
+ MetadataDomain _tmp4_ = 0;
+#line 528 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = tag;
+#line 528 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = photo_metadata_get_tag_domain (_tmp3_);
+#line 528 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ switch (_tmp4_) {
+#line 528 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ case METADATA_DOMAIN_XMP:
+#line 4410 "PhotoMetadata.c"
+ {
+ MetadataDateTime* _tmp5_ = NULL;
+ const gchar* _tmp6_ = NULL;
+ MetadataDateTime* _tmp7_ = NULL;
+ MetadataDateTime* _tmp8_ = NULL;
+#line 530 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = value;
+#line 530 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = metadata_date_time_new_from_xmp (_tmp6_, &_inner_error_);
+#line 530 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = _tmp7_;
+#line 530 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 4424 "PhotoMetadata.c"
+ goto __catch24_g_error;
+ }
+#line 530 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = _tmp5_;
+#line 530 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = NULL;
+#line 530 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp8_;
+#line 530 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _metadata_date_time_unref0 (_tmp5_);
+#line 530 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (value);
+#line 530 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 4439 "PhotoMetadata.c"
+ }
+#line 528 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ case METADATA_DOMAIN_IPTC:
+#line 4443 "PhotoMetadata.c"
+ {
+#line 535 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = NULL;
+#line 535 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (value);
+#line 535 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 4451 "PhotoMetadata.c"
+ }
+ default:
+#line 528 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ case METADATA_DOMAIN_EXIF:
+#line 4456 "PhotoMetadata.c"
+ {
+ MetadataDateTime* _tmp9_ = NULL;
+ const gchar* _tmp10_ = NULL;
+ MetadataDateTime* _tmp11_ = NULL;
+ MetadataDateTime* _tmp12_ = NULL;
+#line 539 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = value;
+#line 539 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = metadata_date_time_new_from_exif (_tmp10_, &_inner_error_);
+#line 539 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = _tmp11_;
+#line 539 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 4470 "PhotoMetadata.c"
+ goto __catch24_g_error;
+ }
+#line 539 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = _tmp9_;
+#line 539 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = NULL;
+#line 539 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp12_;
+#line 539 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _metadata_date_time_unref0 (_tmp9_);
+#line 539 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (value);
+#line 539 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 4485 "PhotoMetadata.c"
+ }
+ }
+ }
+ goto __finally24;
+ __catch24_g_error:
+ {
+ GError* err = NULL;
+ const gchar* _tmp13_ = NULL;
+ const gchar* _tmp14_ = NULL;
+ GError* _tmp15_ = NULL;
+ const gchar* _tmp16_ = NULL;
+#line 527 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ err = _inner_error_;
+#line 527 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _inner_error_ = NULL;
+#line 542 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = tag;
+#line 542 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp14_ = self->priv->source_name;
+#line 542 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp15_ = err;
+#line 542 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp16_ = _tmp15_->message;
+#line 542 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_warning ("PhotoMetadata.vala:542: Unable to read date/time %s from source %s: %s", _tmp13_, _tmp14_, _tmp16_);
+#line 544 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = NULL;
+#line 544 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_error_free0 (err);
+#line 544 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (value);
+#line 544 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 4519 "PhotoMetadata.c"
+ }
+ __finally24:
+#line 527 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (value);
+#line 527 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.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 527 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_clear_error (&_inner_error_);
+#line 527 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return NULL;
+#line 4530 "PhotoMetadata.c"
+}
+
+
+MetadataDateTime* photo_metadata_get_first_date_time (PhotoMetadata* self, gchar** tags, int tags_length1) {
+ MetadataDateTime* result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+#line 548 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 549 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = tags;
+#line 549 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__length1 = tags_length1;
+#line 4544 "PhotoMetadata.c"
+ {
+ gchar** tag_collection = NULL;
+ gint tag_collection_length1 = 0;
+ gint _tag_collection_size_ = 0;
+ gint tag_it = 0;
+#line 549 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag_collection = _tmp0_;
+#line 549 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag_collection_length1 = _tmp0__length1;
+#line 549 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ for (tag_it = 0; tag_it < _tmp0__length1; tag_it = tag_it + 1) {
+#line 4556 "PhotoMetadata.c"
+ gchar* _tmp1_ = NULL;
+ gchar* tag = NULL;
+#line 549 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = g_strdup (tag_collection[tag_it]);
+#line 549 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag = _tmp1_;
+#line 4563 "PhotoMetadata.c"
+ {
+ MetadataDateTime* date_time = NULL;
+ const gchar* _tmp2_ = NULL;
+ MetadataDateTime* _tmp3_ = NULL;
+ MetadataDateTime* _tmp4_ = NULL;
+#line 550 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = tag;
+#line 550 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = photo_metadata_get_date_time (self, _tmp2_);
+#line 550 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ date_time = _tmp3_;
+#line 551 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = date_time;
+#line 551 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp4_ != NULL) {
+#line 552 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = date_time;
+#line 552 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (tag);
+#line 552 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 4585 "PhotoMetadata.c"
+ }
+#line 549 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _metadata_date_time_unref0 (date_time);
+#line 549 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (tag);
+#line 4591 "PhotoMetadata.c"
+ }
+ }
+ }
+#line 555 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = NULL;
+#line 555 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 4599 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_set_date_time (PhotoMetadata* self, const gchar* tag, MetadataDateTime* date_time) {
+ const gchar* _tmp0_ = NULL;
+ MetadataDomain _tmp1_ = 0;
+#line 558 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 558 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (tag != NULL);
+#line 558 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_METADATA_DATE_TIME (date_time));
+#line 559 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = tag;
+#line 559 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_get_tag_domain (_tmp0_);
+#line 559 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ switch (_tmp1_) {
+#line 559 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ case METADATA_DOMAIN_EXIF:
+#line 4620 "PhotoMetadata.c"
+ {
+ const gchar* _tmp2_ = NULL;
+ MetadataDateTime* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+#line 561 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = tag;
+#line 561 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = date_time;
+#line 561 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = metadata_date_time_get_exif_label (_tmp3_);
+#line 561 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = _tmp4_;
+#line 561 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_string (self, _tmp2_, _tmp5_, PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 561 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_tmp5_);
+#line 562 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ break;
+#line 4640 "PhotoMetadata.c"
+ }
+#line 559 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ case METADATA_DOMAIN_XMP:
+#line 4644 "PhotoMetadata.c"
+ {
+ const gchar* _tmp6_ = NULL;
+ MetadataDateTime* _tmp7_ = NULL;
+ gchar* _tmp8_ = NULL;
+ gchar* _tmp9_ = NULL;
+#line 565 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = tag;
+#line 565 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = date_time;
+#line 565 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = metadata_date_time_get_xmp_label (_tmp7_);
+#line 565 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = _tmp8_;
+#line 565 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_string (self, _tmp6_, _tmp9_, PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 565 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_tmp9_);
+#line 566 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ break;
+#line 4664 "PhotoMetadata.c"
+ }
+ default:
+#line 559 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ case METADATA_DOMAIN_IPTC:
+#line 4669 "PhotoMetadata.c"
+ {
+ const gchar* _tmp10_ = NULL;
+ const gchar* _tmp11_ = NULL;
+ const gchar* _tmp12_ = NULL;
+ MetadataDomain _tmp13_ = 0;
+ GEnumValue* _tmp14_;
+#line 571 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = tag;
+#line 571 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = self->priv->source_name;
+#line 571 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = tag;
+#line 571 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = photo_metadata_get_tag_domain (_tmp12_);
+#line 572 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp14_ = g_enum_get_value (g_type_class_ref (TYPE_METADATA_DOMAIN), _tmp13_);
+#line 571 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_warning ("PhotoMetadata.vala:571: Cannot set date/time for %s from source %s: un" \
+"supported metadata domain %s", _tmp10_, _tmp11_, (_tmp14_ != NULL) ? _tmp14_->value_name : NULL);
+#line 573 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ break;
+#line 4690 "PhotoMetadata.c"
+ }
+ }
+}
+
+
+static gpointer _metadata_date_time_ref0 (gpointer self) {
+#line 577 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return self ? metadata_date_time_ref (self) : NULL;
+#line 4699 "PhotoMetadata.c"
+}
+
+
+static Block5Data* block5_data_ref (Block5Data* _data5_) {
+#line 577 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_atomic_int_inc (&_data5_->_ref_count_);
+#line 577 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return _data5_;
+#line 4708 "PhotoMetadata.c"
+}
+
+
+static void block5_data_unref (void * _userdata_) {
+ Block5Data* _data5_;
+ _data5_ = (Block5Data*) _userdata_;
+#line 577 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) {
+#line 4717 "PhotoMetadata.c"
+ PhotoMetadata* self;
+#line 577 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = _data5_->self;
+#line 577 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _metadata_date_time_unref0 (_data5_->date_time);
+#line 577 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _media_metadata_unref0 (self);
+#line 577 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_slice_free (Block5Data, _data5_);
+#line 4727 "PhotoMetadata.c"
+ }
+}
+
+
+static void __lambda9_ (Block5Data* _data5_, const gchar* tag) {
+ PhotoMetadata* self;
+ const gchar* _tmp0_ = NULL;
+ MetadataDateTime* _tmp1_ = NULL;
+#line 578 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = _data5_->self;
+#line 578 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (tag != NULL);
+#line 578 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = tag;
+#line 578 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = _data5_->date_time;
+#line 578 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_date_time (self, _tmp0_, _tmp1_);
+#line 4746 "PhotoMetadata.c"
+}
+
+
+static void ___lambda9__photo_metadata_set_generic_value (const gchar* tag, gpointer self) {
+#line 578 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ __lambda9_ (self, tag);
+#line 4753 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_set_all_date_time (PhotoMetadata* self, gchar** tags, int tags_length1, MetadataDateTime* date_time, PhotoMetadataSetOption option) {
+ Block5Data* _data5_;
+ MetadataDateTime* _tmp0_ = NULL;
+ MetadataDateTime* _tmp1_ = NULL;
+ gchar** _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+ PhotoMetadataSetOption _tmp3_ = 0;
+#line 577 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 577 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_METADATA_DATE_TIME (date_time));
+#line 577 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data5_ = g_slice_new0 (Block5Data);
+#line 577 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data5_->_ref_count_ = 1;
+#line 577 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data5_->self = media_metadata_ref (self);
+#line 577 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = date_time;
+#line 577 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = _metadata_date_time_ref0 (_tmp0_);
+#line 577 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _metadata_date_time_unref0 (_data5_->date_time);
+#line 577 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data5_->date_time = _tmp1_;
+#line 578 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = tags;
+#line 578 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2__length1 = tags_length1;
+#line 578 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = option;
+#line 578 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_all_generic (self, _tmp2_, _tmp2__length1, _tmp3_, ___lambda9__photo_metadata_set_generic_value, _data5_);
+#line 577 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ block5_data_unref (_data5_);
+#line 577 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _data5_ = NULL;
+#line 4794 "PhotoMetadata.c"
+}
+
+
+guint8* photo_metadata_flatten_exif (PhotoMetadata* self, gboolean include_preview, int* result_length1) {
+ guint8* result = NULL;
+ ExifData* _tmp0_ = NULL;
+ guchar* thumbnail = NULL;
+ ExifData* _tmp2_ = NULL;
+ guchar* _tmp3_ = NULL;
+ guint thumbnail_size = 0U;
+ ExifData* _tmp4_ = NULL;
+ guint _tmp5_ = 0U;
+ gboolean _tmp6_ = FALSE;
+ guint8* flattened = NULL;
+ gint flattened_length1 = 0;
+ gint _flattened_size_ = 0;
+ guchar* saved_data = NULL;
+ guint saved_size = 0U;
+ ExifData* _tmp9_ = NULL;
+ gboolean _tmp10_ = FALSE;
+ guint _tmp11_ = 0U;
+ ExifData* _tmp21_ = NULL;
+ guchar* _tmp22_ = NULL;
+ ExifData* _tmp23_ = NULL;
+ guint _tmp24_ = 0U;
+ guint8* _tmp25_ = NULL;
+ gint _tmp25__length1 = 0;
+#line 582 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 583 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->exif;
+#line 583 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp0_ == NULL) {
+#line 4828 "PhotoMetadata.c"
+ guint8* _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+#line 584 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = NULL;
+#line 584 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1__length1 = 0;
+#line 584 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (result_length1) {
+#line 584 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *result_length1 = _tmp1__length1;
+#line 4839 "PhotoMetadata.c"
+ }
+#line 584 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp1_;
+#line 584 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 4845 "PhotoMetadata.c"
+ }
+#line 588 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = self->priv->exif;
+#line 588 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = _tmp2_->data;
+#line 588 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ thumbnail = _tmp3_;
+#line 589 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = self->priv->exif;
+#line 589 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = _tmp4_->size;
+#line 589 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ thumbnail_size = _tmp5_;
+#line 590 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = include_preview;
+#line 590 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp6_) {
+#line 4863 "PhotoMetadata.c"
+ ExifData* _tmp7_ = NULL;
+ ExifData* _tmp8_ = NULL;
+#line 591 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = self->priv->exif;
+#line 591 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_->data = NULL;
+#line 592 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = self->priv->exif;
+#line 592 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_->size = (guint) 0;
+#line 4874 "PhotoMetadata.c"
+ }
+#line 595 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ flattened = NULL;
+#line 595 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ flattened_length1 = 0;
+#line 595 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _flattened_size_ = flattened_length1;
+#line 598 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ saved_data = NULL;
+#line 599 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ saved_size = (guint) 0;
+#line 600 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = self->priv->exif;
+#line 600 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ exif_data_save_data (_tmp9_, &saved_data, &saved_size);
+#line 601 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = saved_size;
+#line 601 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp11_ > ((guint) 0)) {
+#line 4894 "PhotoMetadata.c"
+ guchar* _tmp12_ = NULL;
+#line 601 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = saved_data;
+#line 601 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = _tmp12_ != NULL;
+#line 4900 "PhotoMetadata.c"
+ } else {
+#line 601 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = FALSE;
+#line 4904 "PhotoMetadata.c"
+ }
+#line 601 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp10_) {
+#line 4908 "PhotoMetadata.c"
+ guint _tmp13_ = 0U;
+ guint8* _tmp14_ = NULL;
+ guint8* _tmp15_ = NULL;
+ gint _tmp15__length1 = 0;
+ guchar* _tmp16_ = NULL;
+ guint _tmp17_ = 0U;
+ ExifMem* _tmp18_ = NULL;
+ ExifMem* _tmp19_ = NULL;
+ guchar* _tmp20_ = NULL;
+#line 602 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = saved_size;
+#line 602 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp14_ = g_new0 (guint8, _tmp13_);
+#line 602 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ flattened = (g_free (flattened), NULL);
+#line 602 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ flattened = _tmp14_;
+#line 602 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ flattened_length1 = _tmp13_;
+#line 602 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _flattened_size_ = flattened_length1;
+#line 603 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp15_ = flattened;
+#line 603 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp15__length1 = flattened_length1;
+#line 603 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp16_ = saved_data;
+#line 603 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp17_ = saved_size;
+#line 603 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ memcpy (_tmp15_, _tmp16_, (gsize) _tmp17_);
+#line 605 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18_ = exif_mem_new_default ();
+#line 605 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp19_ = _tmp18_;
+#line 605 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp20_ = saved_data;
+#line 605 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ exif_mem_free (_tmp19_, _tmp20_);
+#line 605 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _exif_mem_unref0 (_tmp19_);
+#line 4950 "PhotoMetadata.c"
+ }
+#line 609 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp21_ = self->priv->exif;
+#line 609 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp22_ = thumbnail;
+#line 609 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp21_->data = _tmp22_;
+#line 610 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp23_ = self->priv->exif;
+#line 610 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp24_ = thumbnail_size;
+#line 610 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp23_->size = _tmp24_;
+#line 612 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp25_ = flattened;
+#line 612 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp25__length1 = flattened_length1;
+#line 612 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (result_length1) {
+#line 612 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *result_length1 = _tmp25__length1;
+#line 4972 "PhotoMetadata.c"
+ }
+#line 612 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp25_;
+#line 612 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 4978 "PhotoMetadata.c"
+}
+
+
+static guint8* _vala_array_dup5 (guint8* self, int length) {
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return g_memdup (self, length * sizeof (guint8));
+#line 4985 "PhotoMetadata.c"
+}
+
+
+guint8* photo_metadata_flatten_exif_preview (PhotoMetadata* self, int* result_length1) {
+ guint8* result = NULL;
+ guchar* buffer = NULL;
+ gint buffer_length1 = 0;
+ gint _buffer_size_ = 0;
+ guchar* _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ gint __tmp0__size_ = 0;
+ GExiv2Metadata* _tmp1_ = NULL;
+ guchar* _tmp2_ = NULL;
+ gint _tmp3_ = 0;
+ gboolean _tmp4_ = FALSE;
+ guint8* _tmp6_ = NULL;
+ gint _tmp6__length1 = 0;
+ guint8* _tmp7_ = NULL;
+ gint _tmp7__length1 = 0;
+#line 616 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = self->priv->exiv2;
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = gexiv2_metadata_get_exif_thumbnail (_tmp1_, &_tmp2_, &_tmp3_);
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ buffer = (g_free (buffer), NULL);
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ buffer = _tmp2_;
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ buffer_length1 = _tmp3_;
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _buffer_size_ = buffer_length1;
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp4_) {
+#line 5021 "PhotoMetadata.c"
+ guchar* _tmp5_ = NULL;
+ gint _tmp5__length1 = 0;
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = buffer;
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5__length1 = buffer_length1;
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = _tmp5_;
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__length1 = _tmp5__length1;
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ __tmp0__size_ = _tmp0__length1;
+#line 5034 "PhotoMetadata.c"
+ } else {
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = NULL;
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__length1 = 0;
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ __tmp0__size_ = _tmp0__length1;
+#line 5042 "PhotoMetadata.c"
+ }
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = (_tmp0_ != NULL) ? _vala_array_dup5 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6__length1 = _tmp0__length1;
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = _tmp6_;
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7__length1 = _tmp6__length1;
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (result_length1) {
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *result_length1 = _tmp7__length1;
+#line 5056 "PhotoMetadata.c"
+ }
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp7_;
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ buffer = (g_free (buffer), NULL);
+#line 618 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 5064 "PhotoMetadata.c"
+}
+
+
+guint photo_metadata_get_preview_count (PhotoMetadata* self) {
+ guint result = 0U;
+ GExiv2PreviewProperties** props = NULL;
+ GExiv2Metadata* _tmp0_ = NULL;
+ GExiv2PreviewProperties** _tmp1_ = NULL;
+ GExiv2PreviewProperties** _tmp2_ = NULL;
+ gint props_length1 = 0;
+ gint _props_size_ = 0;
+ gint _tmp3_ = 0;
+ GExiv2PreviewProperties** _tmp4_ = NULL;
+ gint _tmp4__length1 = 0;
+#line 621 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), 0U);
+#line 622 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->exiv2;
+#line 622 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = _tmp1_ = gexiv2_metadata_get_preview_properties (_tmp0_);
+#line 622 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ props = _tmp2_;
+#line 622 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ props_length1 = _vala_array_length (_tmp1_);
+#line 622 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _props_size_ = props_length1;
+#line 624 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = props;
+#line 624 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4__length1 = props_length1;
+#line 624 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp4_ != NULL) {
+#line 5097 "PhotoMetadata.c"
+ GExiv2PreviewProperties** _tmp5_ = NULL;
+ gint _tmp5__length1 = 0;
+#line 624 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = props;
+#line 624 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5__length1 = props_length1;
+#line 624 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = _tmp5__length1;
+#line 5106 "PhotoMetadata.c"
+ } else {
+#line 624 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = 0;
+#line 5110 "PhotoMetadata.c"
+ }
+#line 624 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = (guint) _tmp3_;
+#line 624 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 5116 "PhotoMetadata.c"
+}
+
+
+PhotoPreview* photo_metadata_get_preview (PhotoMetadata* self, guint number) {
+ PhotoPreview* result = NULL;
+ GExiv2PreviewProperties** props = NULL;
+ GExiv2Metadata* _tmp0_ = NULL;
+ GExiv2PreviewProperties** _tmp1_ = NULL;
+ GExiv2PreviewProperties** _tmp2_ = NULL;
+ gint props_length1 = 0;
+ gint _props_size_ = 0;
+ gboolean _tmp3_ = FALSE;
+ GExiv2PreviewProperties** _tmp4_ = NULL;
+ gint _tmp4__length1 = 0;
+ const gchar* _tmp7_ = NULL;
+ guint _tmp8_ = 0U;
+ GExiv2PreviewProperties** _tmp9_ = NULL;
+ gint _tmp9__length1 = 0;
+ guint _tmp10_ = 0U;
+ GExiv2PreviewProperties* _tmp11_ = NULL;
+ PhotoMetadataInternalPhotoPreview* _tmp12_ = NULL;
+#line 628 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 629 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->exiv2;
+#line 629 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = _tmp1_ = gexiv2_metadata_get_preview_properties (_tmp0_);
+#line 629 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ props = _tmp2_;
+#line 629 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ props_length1 = _vala_array_length (_tmp1_);
+#line 629 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _props_size_ = props_length1;
+#line 630 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = props;
+#line 630 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4__length1 = props_length1;
+#line 630 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp4_ == NULL) {
+#line 630 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = TRUE;
+#line 5158 "PhotoMetadata.c"
+ } else {
+ GExiv2PreviewProperties** _tmp5_ = NULL;
+ gint _tmp5__length1 = 0;
+ guint _tmp6_ = 0U;
+#line 630 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = props;
+#line 630 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5__length1 = props_length1;
+#line 630 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = number;
+#line 630 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = ((guint) _tmp5__length1) <= _tmp6_;
+#line 5171 "PhotoMetadata.c"
+ }
+#line 630 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp3_) {
+#line 631 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = NULL;
+#line 631 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 5179 "PhotoMetadata.c"
+ }
+#line 633 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = self->priv->source_name;
+#line 633 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = number;
+#line 633 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = props;
+#line 633 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9__length1 = props_length1;
+#line 633 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = number;
+#line 633 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = _tmp9_[_tmp10_];
+#line 633 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = photo_metadata_internal_photo_preview_new (self, _tmp7_, _tmp8_, _tmp11_);
+#line 633 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_PHOTO_PREVIEW, PhotoPreview);
+#line 633 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 5199 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_remove_exif_thumbnail (PhotoMetadata* self) {
+ GExiv2Metadata* _tmp0_ = NULL;
+ ExifData* _tmp1_ = NULL;
+#line 636 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 637 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->exiv2;
+#line 637 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gexiv2_metadata_erase_exif_thumbnail (_tmp0_);
+#line 638 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = self->priv->exif;
+#line 638 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp1_ != NULL) {
+#line 5216 "PhotoMetadata.c"
+ ExifMem* _tmp2_ = NULL;
+ ExifMem* _tmp3_ = NULL;
+ ExifData* _tmp4_ = NULL;
+ guchar* _tmp5_ = NULL;
+ ExifData* _tmp6_ = NULL;
+ ExifData* _tmp7_ = NULL;
+#line 639 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = exif_mem_new_default ();
+#line 639 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = _tmp2_;
+#line 639 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = self->priv->exif;
+#line 639 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = _tmp4_->data;
+#line 639 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ exif_mem_free (_tmp3_, _tmp5_);
+#line 639 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _exif_mem_unref0 (_tmp3_);
+#line 640 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = self->priv->exif;
+#line 640 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_->data = NULL;
+#line 641 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = self->priv->exif;
+#line 641 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_->size = (guint) 0;
+#line 5243 "PhotoMetadata.c"
+ }
+}
+
+
+void photo_metadata_remove_tag (PhotoMetadata* self, const gchar* tag) {
+ GExiv2Metadata* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+#line 645 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 645 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (tag != NULL);
+#line 646 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->exiv2;
+#line 646 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = tag;
+#line 646 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gexiv2_metadata_clear_tag (_tmp0_, _tmp1_);
+#line 5261 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_remove_tags (PhotoMetadata* self, gchar** tags, int tags_length1) {
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+#line 649 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 650 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = tags;
+#line 650 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__length1 = tags_length1;
+#line 5274 "PhotoMetadata.c"
+ {
+ gchar** tag_collection = NULL;
+ gint tag_collection_length1 = 0;
+ gint _tag_collection_size_ = 0;
+ gint tag_it = 0;
+#line 650 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag_collection = _tmp0_;
+#line 650 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag_collection_length1 = _tmp0__length1;
+#line 650 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ for (tag_it = 0; tag_it < _tmp0__length1; tag_it = tag_it + 1) {
+#line 5286 "PhotoMetadata.c"
+ gchar* _tmp1_ = NULL;
+ gchar* tag = NULL;
+#line 650 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = g_strdup (tag_collection[tag_it]);
+#line 650 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag = _tmp1_;
+#line 5293 "PhotoMetadata.c"
+ {
+ const gchar* _tmp2_ = NULL;
+#line 651 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = tag;
+#line 651 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_remove_tag (self, _tmp2_);
+#line 650 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (tag);
+#line 5302 "PhotoMetadata.c"
+ }
+ }
+ }
+}
+
+
+void photo_metadata_clear_domain (PhotoMetadata* self, MetadataDomain domain) {
+ MetadataDomain _tmp0_ = 0;
+#line 654 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 655 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = domain;
+#line 655 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ switch (_tmp0_) {
+#line 655 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ case METADATA_DOMAIN_EXIF:
+#line 5319 "PhotoMetadata.c"
+ {
+ GExiv2Metadata* _tmp1_ = NULL;
+#line 657 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = self->priv->exiv2;
+#line 657 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gexiv2_metadata_clear_exif (_tmp1_);
+#line 658 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ break;
+#line 5328 "PhotoMetadata.c"
+ }
+#line 655 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ case METADATA_DOMAIN_XMP:
+#line 5332 "PhotoMetadata.c"
+ {
+ GExiv2Metadata* _tmp2_ = NULL;
+#line 661 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = self->priv->exiv2;
+#line 661 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gexiv2_metadata_clear_xmp (_tmp2_);
+#line 662 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ break;
+#line 5341 "PhotoMetadata.c"
+ }
+#line 655 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ case METADATA_DOMAIN_IPTC:
+#line 5345 "PhotoMetadata.c"
+ {
+ GExiv2Metadata* _tmp3_ = NULL;
+#line 665 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = self->priv->exiv2;
+#line 665 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gexiv2_metadata_clear_iptc (_tmp3_);
+#line 666 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ break;
+#line 5354 "PhotoMetadata.c"
+ }
+ default:
+#line 655 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ break;
+#line 5359 "PhotoMetadata.c"
+ }
+}
+
+
+void photo_metadata_clear (PhotoMetadata* self) {
+ GExiv2Metadata* _tmp0_ = NULL;
+#line 670 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 671 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->exiv2;
+#line 671 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gexiv2_metadata_clear (_tmp0_);
+#line 5372 "PhotoMetadata.c"
+}
+
+
+MetadataDateTime* photo_metadata_get_modification_date_time (PhotoMetadata* self) {
+ MetadataDateTime* result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ MetadataDateTime* _tmp1_ = NULL;
+#line 680 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 681 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_DATE_TIME_TAGS;
+#line 681 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__length1 = photo_metadata_DATE_TIME_TAGS_length1;
+#line 681 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_get_first_date_time (self, _tmp0_, _tmp0__length1);
+#line 681 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp1_;
+#line 681 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 5393 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_set_modification_date_time (PhotoMetadata* self, MetadataDateTime* date_time, PhotoMetadataSetOption option) {
+ MetadataDateTime* _tmp0_ = NULL;
+#line 684 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 684 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail ((date_time == NULL) || IS_METADATA_DATE_TIME (date_time));
+#line 686 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = date_time;
+#line 686 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp0_ != NULL) {
+#line 5407 "PhotoMetadata.c"
+ gchar** _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+ MetadataDateTime* _tmp2_ = NULL;
+ PhotoMetadataSetOption _tmp3_ = 0;
+#line 687 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_DATE_TIME_TAGS;
+#line 687 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1__length1 = photo_metadata_DATE_TIME_TAGS_length1;
+#line 687 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = date_time;
+#line 687 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = option;
+#line 687 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_all_date_time (self, _tmp1_, _tmp1__length1, _tmp2_, _tmp3_);
+#line 5422 "PhotoMetadata.c"
+ } else {
+ gchar** _tmp4_ = NULL;
+ gint _tmp4__length1 = 0;
+#line 689 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = photo_metadata_DATE_TIME_TAGS;
+#line 689 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4__length1 = photo_metadata_DATE_TIME_TAGS_length1;
+#line 689 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_remove_tags (self, _tmp4_, _tmp4__length1);
+#line 5432 "PhotoMetadata.c"
+ }
+}
+
+
+MetadataDateTime* photo_metadata_get_exposure_date_time (PhotoMetadata* self) {
+ MetadataDateTime* result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ MetadataDateTime* _tmp1_ = NULL;
+#line 701 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 702 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_EXPOSURE_DATE_TIME_TAGS;
+#line 702 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__length1 = photo_metadata_EXPOSURE_DATE_TIME_TAGS_length1;
+#line 702 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_get_first_date_time (self, _tmp0_, _tmp0__length1);
+#line 702 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp1_;
+#line 702 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 5454 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_set_exposure_date_time (PhotoMetadata* self, MetadataDateTime* date_time, PhotoMetadataSetOption option) {
+ MetadataDateTime* _tmp0_ = NULL;
+#line 705 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 705 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail ((date_time == NULL) || IS_METADATA_DATE_TIME (date_time));
+#line 707 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = date_time;
+#line 707 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp0_ != NULL) {
+#line 5468 "PhotoMetadata.c"
+ gchar** _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+ MetadataDateTime* _tmp2_ = NULL;
+ PhotoMetadataSetOption _tmp3_ = 0;
+#line 708 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_EXPOSURE_DATE_TIME_TAGS;
+#line 708 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1__length1 = photo_metadata_EXPOSURE_DATE_TIME_TAGS_length1;
+#line 708 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = date_time;
+#line 708 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = option;
+#line 708 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_all_date_time (self, _tmp1_, _tmp1__length1, _tmp2_, _tmp3_);
+#line 5483 "PhotoMetadata.c"
+ } else {
+ gchar** _tmp4_ = NULL;
+ gint _tmp4__length1 = 0;
+#line 710 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = photo_metadata_EXPOSURE_DATE_TIME_TAGS;
+#line 710 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4__length1 = photo_metadata_EXPOSURE_DATE_TIME_TAGS_length1;
+#line 710 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_remove_tags (self, _tmp4_, _tmp4__length1);
+#line 5493 "PhotoMetadata.c"
+ }
+}
+
+
+MetadataDateTime* photo_metadata_get_digitized_date_time (PhotoMetadata* self) {
+ MetadataDateTime* result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ MetadataDateTime* _tmp1_ = NULL;
+#line 718 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 719 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_DIGITIZED_DATE_TIME_TAGS;
+#line 719 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__length1 = photo_metadata_DIGITIZED_DATE_TIME_TAGS_length1;
+#line 719 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_get_first_date_time (self, _tmp0_, _tmp0__length1);
+#line 719 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp1_;
+#line 719 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 5515 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_set_digitized_date_time (PhotoMetadata* self, MetadataDateTime* date_time, PhotoMetadataSetOption option) {
+ MetadataDateTime* _tmp0_ = NULL;
+#line 722 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 722 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail ((date_time == NULL) || IS_METADATA_DATE_TIME (date_time));
+#line 724 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = date_time;
+#line 724 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp0_ != NULL) {
+#line 5529 "PhotoMetadata.c"
+ gchar** _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+ MetadataDateTime* _tmp2_ = NULL;
+ PhotoMetadataSetOption _tmp3_ = 0;
+#line 725 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_DIGITIZED_DATE_TIME_TAGS;
+#line 725 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1__length1 = photo_metadata_DIGITIZED_DATE_TIME_TAGS_length1;
+#line 725 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = date_time;
+#line 725 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = option;
+#line 725 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_all_date_time (self, _tmp1_, _tmp1__length1, _tmp2_, _tmp3_);
+#line 5544 "PhotoMetadata.c"
+ } else {
+ gchar** _tmp4_ = NULL;
+ gint _tmp4__length1 = 0;
+#line 727 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = photo_metadata_DIGITIZED_DATE_TIME_TAGS;
+#line 727 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4__length1 = photo_metadata_DIGITIZED_DATE_TIME_TAGS_length1;
+#line 727 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_remove_tags (self, _tmp4_, _tmp4__length1);
+#line 5554 "PhotoMetadata.c"
+ }
+}
+
+
+static MetadataDateTime* photo_metadata_real_get_creation_date_time (MediaMetadata* base) {
+ PhotoMetadata * self;
+ MetadataDateTime* result = NULL;
+ MetadataDateTime* creation = NULL;
+ MetadataDateTime* _tmp0_ = NULL;
+ MetadataDateTime* _tmp1_ = NULL;
+#line 730 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PHOTO_METADATA, PhotoMetadata);
+#line 731 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_get_exposure_date_time (self);
+#line 731 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ creation = _tmp0_;
+#line 732 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = creation;
+#line 732 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp1_ == NULL) {
+#line 5575 "PhotoMetadata.c"
+ MetadataDateTime* _tmp2_ = NULL;
+#line 733 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = photo_metadata_get_digitized_date_time (self);
+#line 733 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _metadata_date_time_unref0 (creation);
+#line 733 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ creation = _tmp2_;
+#line 5583 "PhotoMetadata.c"
+ }
+#line 735 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = creation;
+#line 735 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 5589 "PhotoMetadata.c"
+}
+
+
+static gpointer _dimensions_dup0 (gpointer self) {
+#line 766 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return self ? dimensions_dup (self) : NULL;
+#line 5596 "PhotoMetadata.c"
+}
+
+
+Dimensions* photo_metadata_get_pixel_dimensions (PhotoMetadata* self) {
+ Dimensions* result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ gchar** _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+#line 752 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 754 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_WIDTH_TAGS;
+#line 754 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__length1 = photo_metadata_WIDTH_TAGS_length1;
+#line 754 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_HEIGHT_TAGS;
+#line 754 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1__length1 = photo_metadata_HEIGHT_TAGS_length1;
+#line 754 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_assert (_tmp0__length1 == _tmp1__length1, "WIDTH_TAGS.length == HEIGHT_TAGS.length");
+#line 5618 "PhotoMetadata.c"
+ {
+ gint ctr = 0;
+#line 755 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ ctr = 0;
+#line 5623 "PhotoMetadata.c"
+ {
+ gboolean _tmp2_ = FALSE;
+#line 755 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = TRUE;
+#line 755 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ while (TRUE) {
+#line 5630 "PhotoMetadata.c"
+ gint _tmp4_ = 0;
+ gchar** _tmp5_ = NULL;
+ gint _tmp5__length1 = 0;
+ glong width = 0L;
+ gchar** _tmp6_ = NULL;
+ gint _tmp6__length1 = 0;
+ gint _tmp7_ = 0;
+ const gchar* _tmp8_ = NULL;
+ glong _tmp9_ = 0L;
+ gboolean _tmp10_ = FALSE;
+ glong height = 0L;
+ gchar** _tmp11_ = NULL;
+ gint _tmp11__length1 = 0;
+ gint _tmp12_ = 0;
+ const gchar* _tmp13_ = NULL;
+ glong _tmp14_ = 0L;
+ gboolean _tmp15_ = FALSE;
+ glong _tmp16_ = 0L;
+ glong _tmp17_ = 0L;
+ Dimensions _tmp18_ = {0};
+ Dimensions* _tmp19_ = NULL;
+#line 755 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp2_) {
+#line 5654 "PhotoMetadata.c"
+ gint _tmp3_ = 0;
+#line 755 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = ctr;
+#line 755 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ ctr = _tmp3_ + 1;
+#line 5660 "PhotoMetadata.c"
+ }
+#line 755 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = FALSE;
+#line 755 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = ctr;
+#line 755 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = photo_metadata_WIDTH_TAGS;
+#line 755 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5__length1 = photo_metadata_WIDTH_TAGS_length1;
+#line 755 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!(_tmp4_ < _tmp5__length1)) {
+#line 755 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ break;
+#line 5674 "PhotoMetadata.c"
+ }
+#line 759 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = photo_metadata_WIDTH_TAGS;
+#line 759 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6__length1 = photo_metadata_WIDTH_TAGS_length1;
+#line 759 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = ctr;
+#line 759 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = _tmp6_[_tmp7_];
+#line 759 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = photo_metadata_get_long (self, _tmp8_, &_tmp9_);
+#line 759 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ width = _tmp9_;
+#line 759 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp10_) {
+#line 760 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ continue;
+#line 5692 "PhotoMetadata.c"
+ }
+#line 763 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = photo_metadata_HEIGHT_TAGS;
+#line 763 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11__length1 = photo_metadata_HEIGHT_TAGS_length1;
+#line 763 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = ctr;
+#line 763 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = _tmp11_[_tmp12_];
+#line 763 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp15_ = photo_metadata_get_long (self, _tmp13_, &_tmp14_);
+#line 763 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ height = _tmp14_;
+#line 763 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp15_) {
+#line 764 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ continue;
+#line 5710 "PhotoMetadata.c"
+ }
+#line 766 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp16_ = width;
+#line 766 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp17_ = height;
+#line 766 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ dimensions_init (&_tmp18_, (gint) _tmp16_, (gint) _tmp17_);
+#line 766 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp19_ = _dimensions_dup0 (&_tmp18_);
+#line 766 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp19_;
+#line 766 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 5724 "PhotoMetadata.c"
+ }
+ }
+ }
+#line 769 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = NULL;
+#line 769 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 5732 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_set_pixel_dimensions (PhotoMetadata* self, Dimensions* dim, PhotoMetadataSetOption option) {
+ Dimensions* _tmp0_ = NULL;
+#line 772 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 773 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = dim;
+#line 773 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp0_ != NULL) {
+#line 5744 "PhotoMetadata.c"
+ gchar** _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+ Dimensions* _tmp2_ = NULL;
+ gint _tmp3_ = 0;
+ PhotoMetadataSetOption _tmp4_ = 0;
+ gchar** _tmp5_ = NULL;
+ gint _tmp5__length1 = 0;
+ Dimensions* _tmp6_ = NULL;
+ gint _tmp7_ = 0;
+ PhotoMetadataSetOption _tmp8_ = 0;
+#line 774 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_WIDTH_TAGS;
+#line 774 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1__length1 = photo_metadata_WIDTH_TAGS_length1;
+#line 774 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = dim;
+#line 774 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = (*_tmp2_).width;
+#line 774 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = option;
+#line 774 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_all_long (self, _tmp1_, _tmp1__length1, (glong) _tmp3_, _tmp4_);
+#line 775 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = photo_metadata_HEIGHT_TAGS;
+#line 775 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5__length1 = photo_metadata_HEIGHT_TAGS_length1;
+#line 775 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = dim;
+#line 775 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = (*_tmp6_).height;
+#line 775 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = option;
+#line 775 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_all_long (self, _tmp5_, _tmp5__length1, (glong) _tmp7_, _tmp8_);
+#line 5779 "PhotoMetadata.c"
+ } else {
+ gchar** _tmp9_ = NULL;
+ gint _tmp9__length1 = 0;
+ gchar** _tmp10_ = NULL;
+ gint _tmp10__length1 = 0;
+#line 777 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = photo_metadata_WIDTH_TAGS;
+#line 777 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9__length1 = photo_metadata_WIDTH_TAGS_length1;
+#line 777 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_remove_tags (self, _tmp9_, _tmp9__length1);
+#line 778 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = photo_metadata_HEIGHT_TAGS;
+#line 778 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10__length1 = photo_metadata_HEIGHT_TAGS_length1;
+#line 778 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_remove_tags (self, _tmp10_, _tmp10__length1);
+#line 5797 "PhotoMetadata.c"
+ }
+}
+
+
+static gchar* string_strip (const gchar* self) {
+ gchar* result = NULL;
+ gchar* _result_ = NULL;
+ gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+#line 1207 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 1208 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp0_ = g_strdup (self);
+#line 1208 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _result_ = _tmp0_;
+#line 1209 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp1_ = _result_;
+#line 1209 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_strstrip (_tmp1_);
+#line 1210 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ result = _result_;
+#line 1210 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ return result;
+#line 5821 "PhotoMetadata.c"
+}
+
+
+static gboolean string_contains (const gchar* self, const gchar* needle) {
+ gboolean result = FALSE;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+#line 1376 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 1376 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (needle != NULL, FALSE);
+#line 1377 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp0_ = needle;
+#line 1377 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
+#line 1377 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ result = _tmp1_ != NULL;
+#line 1377 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ return result;
+#line 5841 "PhotoMetadata.c"
+}
+
+
+static gchar* photo_metadata_real_get_title (MediaMetadata* base) {
+ PhotoMetadata * self;
+ gchar* result = NULL;
+ GeeList* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+ GeeList* titles = NULL;
+ GeeList* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+ gboolean _tmp7_ = FALSE;
+ GeeList* _tmp8_ = NULL;
+ gchar* title = NULL;
+ gchar* _tmp14_ = NULL;
+ const gchar* _tmp15_ = NULL;
+ const gchar* _tmp18_ = NULL;
+ gboolean _tmp19_ = FALSE;
+ gboolean _tmp20_ = FALSE;
+ const gchar* _tmp21_ = NULL;
+ gboolean _tmp22_ = FALSE;
+ gchar* _tmp28_ = NULL;
+#line 811 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PHOTO_METADATA, PhotoMetadata);
+#line 819 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_has_tag (self, PHOTO_METADATA_IPHOTO_TITLE_TAG);
+#line 819 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp1_) {
+#line 5870 "PhotoMetadata.c"
+ GeeList* _tmp2_ = NULL;
+#line 820 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = photo_metadata_get_string_multiple (self, PHOTO_METADATA_IPHOTO_TITLE_TAG);
+#line 820 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (_tmp0_);
+#line 820 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = _tmp2_;
+#line 5878 "PhotoMetadata.c"
+ } else {
+ gchar** _tmp3_ = NULL;
+ gint _tmp3__length1 = 0;
+ GeeList* _tmp4_ = NULL;
+#line 821 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = photo_metadata_STANDARD_TITLE_TAGS;
+#line 821 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3__length1 = photo_metadata_STANDARD_TITLE_TAGS_length1;
+#line 821 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = photo_metadata_get_first_string_multiple (self, _tmp3_, _tmp3__length1);
+#line 821 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (_tmp0_);
+#line 821 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = _tmp4_;
+#line 5893 "PhotoMetadata.c"
+ }
+#line 819 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = _g_object_ref0 (_tmp0_);
+#line 819 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ titles = _tmp5_;
+#line 826 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = titles;
+#line 826 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp8_ != NULL) {
+#line 5903 "PhotoMetadata.c"
+ GeeList* _tmp9_ = NULL;
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+#line 826 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = titles;
+#line 826 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_COLLECTION, GeeCollection));
+#line 826 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = _tmp10_;
+#line 826 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = _tmp11_ > 0;
+#line 5915 "PhotoMetadata.c"
+ } else {
+#line 826 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = FALSE;
+#line 5919 "PhotoMetadata.c"
+ }
+#line 826 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp7_) {
+#line 5923 "PhotoMetadata.c"
+ GeeList* _tmp12_ = NULL;
+ gpointer _tmp13_ = NULL;
+#line 826 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = titles;
+#line 826 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = gee_list_get (_tmp12_, 0);
+#line 826 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_tmp6_);
+#line 826 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = (gchar*) _tmp13_;
+#line 5934 "PhotoMetadata.c"
+ } else {
+#line 826 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_tmp6_);
+#line 826 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = NULL;
+#line 5940 "PhotoMetadata.c"
+ }
+#line 826 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp14_ = g_strdup (_tmp6_);
+#line 826 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ title = _tmp14_;
+#line 829 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp15_ = title;
+#line 829 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp15_ != NULL) {
+#line 5950 "PhotoMetadata.c"
+ const gchar* _tmp16_ = NULL;
+ gchar* _tmp17_ = NULL;
+#line 830 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp16_ = title;
+#line 830 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp17_ = string_strip (_tmp16_);
+#line 830 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (title);
+#line 830 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ title = _tmp17_;
+#line 5961 "PhotoMetadata.c"
+ }
+#line 833 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp21_ = title;
+#line 833 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp22_ = is_string_empty (_tmp21_);
+#line 833 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp22_) {
+#line 5969 "PhotoMetadata.c"
+ const gchar* _tmp23_ = NULL;
+ gboolean _tmp24_ = FALSE;
+#line 833 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp23_ = title;
+#line 833 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp24_ = string_contains (_tmp23_, "\n");
+#line 833 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp20_ = !_tmp24_;
+#line 5978 "PhotoMetadata.c"
+ } else {
+#line 833 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp20_ = FALSE;
+#line 5982 "PhotoMetadata.c"
+ }
+#line 833 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp20_) {
+#line 5986 "PhotoMetadata.c"
+ const gchar* _tmp25_ = NULL;
+ gboolean _tmp26_ = FALSE;
+#line 833 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp25_ = title;
+#line 833 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp26_ = string_contains (_tmp25_, "\r");
+#line 833 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp19_ = !_tmp26_;
+#line 5995 "PhotoMetadata.c"
+ } else {
+#line 833 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp19_ = FALSE;
+#line 5999 "PhotoMetadata.c"
+ }
+#line 833 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp19_) {
+#line 6003 "PhotoMetadata.c"
+ const gchar* _tmp27_ = NULL;
+#line 834 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp27_ = title;
+#line 834 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18_ = _tmp27_;
+#line 6009 "PhotoMetadata.c"
+ } else {
+#line 834 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18_ = NULL;
+#line 6013 "PhotoMetadata.c"
+ }
+#line 833 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp28_ = g_strdup (_tmp18_);
+#line 833 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp28_;
+#line 833 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (title);
+#line 833 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_tmp6_);
+#line 833 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (titles);
+#line 833 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (_tmp0_);
+#line 833 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 6029 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_set_title (PhotoMetadata* self, const gchar* title, PhotoMetadataSetOption option) {
+ const gchar* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+#line 837 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 838 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = title;
+#line 838 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = is_string_empty (_tmp0_);
+#line 838 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp1_) {
+#line 6044 "PhotoMetadata.c"
+ gboolean _tmp2_ = FALSE;
+#line 839 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = photo_metadata_has_tag (self, PHOTO_METADATA_IPHOTO_TITLE_TAG);
+#line 839 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp2_) {
+#line 6050 "PhotoMetadata.c"
+ const gchar* _tmp3_ = NULL;
+#line 840 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = title;
+#line 840 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_string (self, PHOTO_METADATA_IPHOTO_TITLE_TAG, _tmp3_, PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 6056 "PhotoMetadata.c"
+ } else {
+ gchar** _tmp4_ = NULL;
+ gint _tmp4__length1 = 0;
+ const gchar* _tmp5_ = NULL;
+ PhotoMetadataSetOption _tmp6_ = 0;
+#line 842 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = photo_metadata_STANDARD_TITLE_TAGS;
+#line 842 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4__length1 = photo_metadata_STANDARD_TITLE_TAGS_length1;
+#line 842 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = title;
+#line 842 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = option;
+#line 842 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_all_string (self, _tmp4_, _tmp4__length1, _tmp5_, _tmp6_);
+#line 6072 "PhotoMetadata.c"
+ }
+ } else {
+ gchar** _tmp7_ = NULL;
+ gint _tmp7__length1 = 0;
+#line 844 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = photo_metadata_STANDARD_TITLE_TAGS;
+#line 844 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7__length1 = photo_metadata_STANDARD_TITLE_TAGS_length1;
+#line 844 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_remove_tags (self, _tmp7_, _tmp7__length1);
+#line 6083 "PhotoMetadata.c"
+ }
+}
+
+
+static gchar* photo_metadata_real_get_comment (MediaMetadata* base) {
+ PhotoMetadata * self;
+ gchar* result = NULL;
+ gchar* _tmp0_ = NULL;
+#line 848 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PHOTO_METADATA, PhotoMetadata);
+#line 849 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_get_string_interpreted (self, "Exif.Photo.UserComment", PREPARE_INPUT_TEXT_OPTIONS_DEFAULT & (~PREPARE_INPUT_TEXT_OPTIONS_STRIP_CRLF));
+#line 849 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp0_;
+#line 849 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 6100 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_set_comment (PhotoMetadata* self, const gchar* comment) {
+ const gchar* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+#line 852 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 853 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = comment;
+#line 853 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = is_string_empty (_tmp0_);
+#line 853 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp1_) {
+#line 6115 "PhotoMetadata.c"
+ const gchar* _tmp2_ = NULL;
+#line 854 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = comment;
+#line 854 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_string (self, "Exif.Photo.UserComment", _tmp2_, PREPARE_INPUT_TEXT_OPTIONS_DEFAULT & (~PREPARE_INPUT_TEXT_OPTIONS_STRIP_CRLF));
+#line 6121 "PhotoMetadata.c"
+ } else {
+#line 856 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_remove_tag (self, "Exif.Photo.UserComment");
+#line 6125 "PhotoMetadata.c"
+ }
+}
+
+
+GeeSet* photo_metadata_get_keywords (PhotoMetadata* self, GCompareDataFunc compare_func, void* compare_func_target, GDestroyNotify compare_func_target_destroy_notify) {
+ GeeSet* result = NULL;
+ GeeSet* keywords = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ GeeSet* _tmp22_ = NULL;
+ gboolean _tmp23_ = FALSE;
+ GeeSet* _tmp24_ = NULL;
+ GeeSet* _tmp29_ = NULL;
+#line 872 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 873 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ keywords = NULL;
+#line 874 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_KEYWORD_TAGS;
+#line 874 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__length1 = photo_metadata_KEYWORD_TAGS_length1;
+#line 6147 "PhotoMetadata.c"
+ {
+ gchar** tag_collection = NULL;
+ gint tag_collection_length1 = 0;
+ gint _tag_collection_size_ = 0;
+ gint tag_it = 0;
+#line 874 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag_collection = _tmp0_;
+#line 874 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag_collection_length1 = _tmp0__length1;
+#line 874 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ for (tag_it = 0; tag_it < _tmp0__length1; tag_it = tag_it + 1) {
+#line 6159 "PhotoMetadata.c"
+ gchar* _tmp1_ = NULL;
+ gchar* tag = NULL;
+#line 874 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = g_strdup (tag_collection[tag_it]);
+#line 874 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ tag = _tmp1_;
+#line 6166 "PhotoMetadata.c"
+ {
+ GeeCollection* values = NULL;
+ const gchar* _tmp2_ = NULL;
+ GeeList* _tmp3_ = NULL;
+ gboolean _tmp4_ = FALSE;
+ GeeCollection* _tmp5_ = NULL;
+#line 875 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = tag;
+#line 875 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = photo_metadata_get_string_multiple (self, _tmp2_);
+#line 875 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ values = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection);
+#line 876 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = values;
+#line 876 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp5_ != NULL) {
+#line 6183 "PhotoMetadata.c"
+ GeeCollection* _tmp6_ = NULL;
+ gint _tmp7_ = 0;
+ gint _tmp8_ = 0;
+#line 876 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = values;
+#line 876 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = gee_collection_get_size (_tmp6_);
+#line 876 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = _tmp7_;
+#line 876 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = _tmp8_ > 0;
+#line 6195 "PhotoMetadata.c"
+ } else {
+#line 876 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = FALSE;
+#line 6199 "PhotoMetadata.c"
+ }
+#line 876 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp4_) {
+#line 6203 "PhotoMetadata.c"
+ GeeSet* _tmp9_ = NULL;
+#line 877 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = keywords;
+#line 877 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp9_ == NULL) {
+#line 6209 "PhotoMetadata.c"
+ GCompareDataFunc _tmp10_ = NULL;
+ void* _tmp10__target = NULL;
+ GDestroyNotify _tmp10__target_destroy_notify = NULL;
+ GeeSet* _tmp11_ = NULL;
+#line 878 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = compare_func;
+#line 878 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10__target = compare_func_target;
+#line 878 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10__target_destroy_notify = compare_func_target_destroy_notify;
+#line 878 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func_target_destroy_notify = NULL;
+#line 878 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = photo_metadata_create_string_set (self, _tmp10_, _tmp10__target, _tmp10__target_destroy_notify);
+#line 878 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (keywords);
+#line 878 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ keywords = _tmp11_;
+#line 6228 "PhotoMetadata.c"
+ }
+ {
+ GeeIterator* _current_value_it = NULL;
+ GeeCollection* _tmp12_ = NULL;
+ GeeIterator* _tmp13_ = NULL;
+#line 880 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = values;
+#line 880 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ITERABLE, GeeIterable));
+#line 880 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _current_value_it = _tmp13_;
+#line 880 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ while (TRUE) {
+#line 6242 "PhotoMetadata.c"
+ GeeIterator* _tmp14_ = NULL;
+ gboolean _tmp15_ = FALSE;
+ gchar* current_value = NULL;
+ GeeIterator* _tmp16_ = NULL;
+ gpointer _tmp17_ = NULL;
+ GeeSet* _tmp18_ = NULL;
+ const gchar* _tmp19_ = NULL;
+ gchar* _tmp20_ = NULL;
+ gchar* _tmp21_ = NULL;
+#line 880 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp14_ = _current_value_it;
+#line 880 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp15_ = gee_iterator_next (_tmp14_);
+#line 880 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp15_) {
+#line 880 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ break;
+#line 6260 "PhotoMetadata.c"
+ }
+#line 880 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp16_ = _current_value_it;
+#line 880 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp17_ = gee_iterator_get (_tmp16_);
+#line 880 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ current_value = (gchar*) _tmp17_;
+#line 881 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18_ = keywords;
+#line 881 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp19_ = current_value;
+#line 881 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp20_ = hierarchical_tag_utilities_make_flat_tag_safe (_tmp19_);
+#line 881 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp21_ = _tmp20_;
+#line 881 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_COLLECTION, GeeCollection), _tmp21_);
+#line 881 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_tmp21_);
+#line 880 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (current_value);
+#line 6282 "PhotoMetadata.c"
+ }
+#line 880 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (_current_value_it);
+#line 6286 "PhotoMetadata.c"
+ }
+ }
+#line 874 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (values);
+#line 874 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (tag);
+#line 6293 "PhotoMetadata.c"
+ }
+ }
+ }
+#line 885 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp24_ = keywords;
+#line 885 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp24_ != NULL) {
+#line 6301 "PhotoMetadata.c"
+ GeeSet* _tmp25_ = NULL;
+ gint _tmp26_ = 0;
+ gint _tmp27_ = 0;
+#line 885 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp25_ = keywords;
+#line 885 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp26_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, GEE_TYPE_COLLECTION, GeeCollection));
+#line 885 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp27_ = _tmp26_;
+#line 885 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp23_ = _tmp27_ > 0;
+#line 6313 "PhotoMetadata.c"
+ } else {
+#line 885 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp23_ = FALSE;
+#line 6317 "PhotoMetadata.c"
+ }
+#line 885 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp23_) {
+#line 6321 "PhotoMetadata.c"
+ GeeSet* _tmp28_ = NULL;
+#line 885 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp28_ = keywords;
+#line 885 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp22_ = _tmp28_;
+#line 6327 "PhotoMetadata.c"
+ } else {
+#line 885 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp22_ = NULL;
+#line 6331 "PhotoMetadata.c"
+ }
+#line 885 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp29_ = _g_object_ref0 (_tmp22_);
+#line 885 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp29_;
+#line 885 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (keywords);
+#line 885 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ (compare_func_target_destroy_notify == NULL) ? NULL : (compare_func_target_destroy_notify (compare_func_target), NULL);
+#line 885 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func = NULL;
+#line 885 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func_target = NULL;
+#line 885 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ compare_func_target_destroy_notify = NULL;
+#line 885 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 6349 "PhotoMetadata.c"
+}
+
+
+static gpointer _hierarchical_keyword_field_ref0 (gpointer self) {
+#line 889 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return self ? hierarchical_keyword_field_ref (self) : NULL;
+#line 6356 "PhotoMetadata.c"
+}
+
+
+static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) {
+ gchar* result = NULL;
+ GError * _inner_error_ = NULL;
+#line 1380 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 1380 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (old != NULL, NULL);
+#line 1380 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (replacement != NULL, NULL);
+#line 6369 "PhotoMetadata.c"
+ {
+ GRegex* regex = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ GRegex* _tmp3_ = NULL;
+ GRegex* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ GRegex* _tmp6_ = NULL;
+ const gchar* _tmp7_ = NULL;
+ gchar* _tmp8_ = NULL;
+ gchar* _tmp9_ = NULL;
+#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp0_ = old;
+#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp1_ = g_regex_escape_string (_tmp0_, -1);
+#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp2_ = _tmp1_;
+#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp3_ = g_regex_new (_tmp2_, 0, 0, &_inner_error_);
+#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp4_ = _tmp3_;
+#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _g_free0 (_tmp2_);
+#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ regex = _tmp4_;
+#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ if (_inner_error_->domain == G_REGEX_ERROR) {
+#line 6400 "PhotoMetadata.c"
+ goto __catch25_g_regex_error;
+ }
+#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_clear_error (&_inner_error_);
+#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ return NULL;
+#line 6409 "PhotoMetadata.c"
+ }
+#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp6_ = regex;
+#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp7_ = replacement;
+#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp8_ = g_regex_replace_literal (_tmp6_, self, (gssize) -1, 0, _tmp7_, 0, &_inner_error_);
+#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp5_ = _tmp8_;
+#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _g_regex_unref0 (regex);
+#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ if (_inner_error_->domain == G_REGEX_ERROR) {
+#line 6425 "PhotoMetadata.c"
+ goto __catch25_g_regex_error;
+ }
+#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _g_regex_unref0 (regex);
+#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_clear_error (&_inner_error_);
+#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ return NULL;
+#line 6436 "PhotoMetadata.c"
+ }
+#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp9_ = _tmp5_;
+#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp5_ = NULL;
+#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ result = _tmp9_;
+#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _g_free0 (_tmp5_);
+#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _g_regex_unref0 (regex);
+#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ return result;
+#line 6450 "PhotoMetadata.c"
+ }
+ goto __finally25;
+ __catch25_g_regex_error:
+ {
+ GError* e = NULL;
+#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ e = _inner_error_;
+#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _inner_error_ = NULL;
+#line 1385 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_assert_not_reached ();
+#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _g_error_free0 (e);
+#line 6464 "PhotoMetadata.c"
+ }
+ __finally25:
+#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_clear_error (&_inner_error_);
+#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ return NULL;
+#line 6475 "PhotoMetadata.c"
+ }
+}
+
+
+static glong string_strnlen (gchar* str, glong maxlen) {
+ glong result = 0L;
+ gchar* end = NULL;
+ gchar* _tmp0_ = NULL;
+ glong _tmp1_ = 0L;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp0_ = str;
+#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp1_ = maxlen;
+#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
+#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ end = _tmp2_;
+#line 1296 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp3_ = end;
+#line 1296 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ if (_tmp3_ == NULL) {
+#line 6499 "PhotoMetadata.c"
+ glong _tmp4_ = 0L;
+#line 1297 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp4_ = maxlen;
+#line 1297 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ result = _tmp4_;
+#line 1297 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ return result;
+#line 6507 "PhotoMetadata.c"
+ } else {
+ gchar* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp5_ = end;
+#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp6_ = str;
+#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ result = (glong) (_tmp5_ - _tmp6_);
+#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ return result;
+#line 6519 "PhotoMetadata.c"
+ }
+}
+
+
+static gchar* string_substring (const gchar* self, glong offset, glong len) {
+ gchar* result = NULL;
+ glong string_length = 0L;
+ gboolean _tmp0_ = FALSE;
+ glong _tmp1_ = 0L;
+ glong _tmp8_ = 0L;
+ glong _tmp14_ = 0L;
+ glong _tmp17_ = 0L;
+ glong _tmp18_ = 0L;
+ glong _tmp19_ = 0L;
+ glong _tmp20_ = 0L;
+ glong _tmp21_ = 0L;
+ gchar* _tmp22_ = NULL;
+#line 1306 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp1_ = offset;
+#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ if (_tmp1_ >= ((glong) 0)) {
+#line 6543 "PhotoMetadata.c"
+ glong _tmp2_ = 0L;
+#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp2_ = len;
+#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp0_ = _tmp2_ >= ((glong) 0);
+#line 6549 "PhotoMetadata.c"
+ } else {
+#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp0_ = FALSE;
+#line 6553 "PhotoMetadata.c"
+ }
+#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ if (_tmp0_) {
+#line 6557 "PhotoMetadata.c"
+ glong _tmp3_ = 0L;
+ glong _tmp4_ = 0L;
+ glong _tmp5_ = 0L;
+#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp3_ = offset;
+#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp4_ = len;
+#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_);
+#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ string_length = _tmp5_;
+#line 6569 "PhotoMetadata.c"
+ } else {
+ gint _tmp6_ = 0;
+ gint _tmp7_ = 0;
+#line 1312 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp6_ = strlen (self);
+#line 1312 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp7_ = _tmp6_;
+#line 1312 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ string_length = (glong) _tmp7_;
+#line 6579 "PhotoMetadata.c"
+ }
+#line 1315 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp8_ = offset;
+#line 1315 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ if (_tmp8_ < ((glong) 0)) {
+#line 6585 "PhotoMetadata.c"
+ glong _tmp9_ = 0L;
+ glong _tmp10_ = 0L;
+ glong _tmp11_ = 0L;
+#line 1316 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp9_ = string_length;
+#line 1316 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp10_ = offset;
+#line 1316 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ offset = _tmp9_ + _tmp10_;
+#line 1317 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp11_ = offset;
+#line 1317 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL);
+#line 6599 "PhotoMetadata.c"
+ } else {
+ glong _tmp12_ = 0L;
+ glong _tmp13_ = 0L;
+#line 1319 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp12_ = offset;
+#line 1319 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp13_ = string_length;
+#line 1319 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL);
+#line 6609 "PhotoMetadata.c"
+ }
+#line 1321 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp14_ = len;
+#line 1321 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ if (_tmp14_ < ((glong) 0)) {
+#line 6615 "PhotoMetadata.c"
+ glong _tmp15_ = 0L;
+ glong _tmp16_ = 0L;
+#line 1322 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp15_ = string_length;
+#line 1322 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp16_ = offset;
+#line 1322 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ len = _tmp15_ - _tmp16_;
+#line 6624 "PhotoMetadata.c"
+ }
+#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp17_ = offset;
+#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp18_ = len;
+#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp19_ = string_length;
+#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL);
+#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp20_ = offset;
+#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp21_ = len;
+#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_);
+#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ result = _tmp22_;
+#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ return result;
+#line 6644 "PhotoMetadata.c"
+}
+
+
+static void photo_metadata_internal_set_hierarchical_keywords (PhotoMetadata* self, HierarchicalTagIndex* index) {
+ HierarchicalKeywordField** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ HierarchicalTagIndex* _tmp4_ = NULL;
+ HierarchicalKeywordField** _tmp5_ = NULL;
+ gint _tmp5__length1 = 0;
+#line 888 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 888 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail ((index == NULL) || IS_HIERARCHICAL_TAG_INDEX (index));
+#line 889 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_HIERARCHICAL_KEYWORD_TAGS;
+#line 889 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__length1 = photo_metadata_HIERARCHICAL_KEYWORD_TAGS_length1;
+#line 6662 "PhotoMetadata.c"
+ {
+ HierarchicalKeywordField** current_field_collection = NULL;
+ gint current_field_collection_length1 = 0;
+ gint _current_field_collection_size_ = 0;
+ gint current_field_it = 0;
+#line 889 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ current_field_collection = _tmp0_;
+#line 889 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ current_field_collection_length1 = _tmp0__length1;
+#line 889 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ for (current_field_it = 0; current_field_it < _tmp0__length1; current_field_it = current_field_it + 1) {
+#line 6674 "PhotoMetadata.c"
+ HierarchicalKeywordField* _tmp1_ = NULL;
+ HierarchicalKeywordField* current_field = NULL;
+#line 889 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = _hierarchical_keyword_field_ref0 (current_field_collection[current_field_it]);
+#line 889 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ current_field = _tmp1_;
+#line 6681 "PhotoMetadata.c"
+ {
+ HierarchicalKeywordField* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+#line 890 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = current_field;
+#line 890 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = _tmp2_->field_name;
+#line 890 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_remove_tag (self, _tmp3_);
+#line 889 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _hierarchical_keyword_field_unref0 (current_field);
+#line 6693 "PhotoMetadata.c"
+ }
+ }
+ }
+#line 892 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = index;
+#line 892 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp4_ == NULL) {
+#line 893 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return;
+#line 6703 "PhotoMetadata.c"
+ }
+#line 895 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = photo_metadata_HIERARCHICAL_KEYWORD_TAGS;
+#line 895 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5__length1 = photo_metadata_HIERARCHICAL_KEYWORD_TAGS_length1;
+#line 6709 "PhotoMetadata.c"
+ {
+ HierarchicalKeywordField** current_field_collection = NULL;
+ gint current_field_collection_length1 = 0;
+ gint _current_field_collection_size_ = 0;
+ gint current_field_it = 0;
+#line 895 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ current_field_collection = _tmp5_;
+#line 895 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ current_field_collection_length1 = _tmp5__length1;
+#line 895 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ for (current_field_it = 0; current_field_it < _tmp5__length1; current_field_it = current_field_it + 1) {
+#line 6721 "PhotoMetadata.c"
+ HierarchicalKeywordField* _tmp6_ = NULL;
+ HierarchicalKeywordField* current_field = NULL;
+#line 895 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = _hierarchical_keyword_field_ref0 (current_field_collection[current_field_it]);
+#line 895 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ current_field = _tmp6_;
+#line 6728 "PhotoMetadata.c"
+ {
+ HierarchicalKeywordField* _tmp7_ = NULL;
+ gboolean _tmp8_ = FALSE;
+ GeeSet* writeable_set = NULL;
+ GeeTreeSet* _tmp9_ = NULL;
+ HierarchicalKeywordField* _tmp29_ = NULL;
+ const gchar* _tmp30_ = NULL;
+ GeeSet* _tmp31_ = NULL;
+#line 896 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = current_field;
+#line 896 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = _tmp7_->is_writeable;
+#line 896 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp8_) {
+#line 897 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _hierarchical_keyword_field_unref0 (current_field);
+#line 897 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ continue;
+#line 6747 "PhotoMetadata.c"
+ }
+#line 899 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = gee_tree_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
+#line 899 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ writeable_set = G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_SET, GeeSet);
+#line 6753 "PhotoMetadata.c"
+ {
+ GeeIterator* _current_path_it = NULL;
+ HierarchicalTagIndex* _tmp10_ = NULL;
+ GeeCollection* _tmp11_ = NULL;
+ GeeCollection* _tmp12_ = NULL;
+ GeeIterator* _tmp13_ = NULL;
+ GeeIterator* _tmp14_ = NULL;
+#line 901 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = index;
+#line 901 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = hierarchical_tag_index_get_all_paths (_tmp10_);
+#line 901 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = _tmp11_;
+#line 901 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ITERABLE, GeeIterable));
+#line 901 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp14_ = _tmp13_;
+#line 901 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (_tmp12_);
+#line 901 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _current_path_it = _tmp14_;
+#line 901 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ while (TRUE) {
+#line 6777 "PhotoMetadata.c"
+ GeeIterator* _tmp15_ = NULL;
+ gboolean _tmp16_ = FALSE;
+ gchar* current_path = NULL;
+ GeeIterator* _tmp17_ = NULL;
+ gpointer _tmp18_ = NULL;
+ gchar* writeable_path = NULL;
+ const gchar* _tmp19_ = NULL;
+ HierarchicalKeywordField* _tmp20_ = NULL;
+ const gchar* _tmp21_ = NULL;
+ gchar* _tmp22_ = NULL;
+ HierarchicalKeywordField* _tmp23_ = NULL;
+ gboolean _tmp24_ = FALSE;
+ GeeSet* _tmp27_ = NULL;
+ const gchar* _tmp28_ = NULL;
+#line 901 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp15_ = _current_path_it;
+#line 901 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp16_ = gee_iterator_next (_tmp15_);
+#line 901 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp16_) {
+#line 901 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ break;
+#line 6800 "PhotoMetadata.c"
+ }
+#line 901 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp17_ = _current_path_it;
+#line 901 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18_ = gee_iterator_get (_tmp17_);
+#line 901 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ current_path = (gchar*) _tmp18_;
+#line 902 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp19_ = current_path;
+#line 902 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp20_ = current_field;
+#line 902 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp21_ = _tmp20_->path_separator;
+#line 902 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp22_ = string_replace (_tmp19_, TAG_PATH_SEPARATOR_STRING, _tmp21_);
+#line 902 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ writeable_path = _tmp22_;
+#line 904 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp23_ = current_field;
+#line 904 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp24_ = _tmp23_->wants_leading_separator;
+#line 904 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp24_) {
+#line 6824 "PhotoMetadata.c"
+ const gchar* _tmp25_ = NULL;
+ gchar* _tmp26_ = NULL;
+#line 905 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp25_ = writeable_path;
+#line 905 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp26_ = string_substring (_tmp25_, (glong) 1, (glong) -1);
+#line 905 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (writeable_path);
+#line 905 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ writeable_path = _tmp26_;
+#line 6835 "PhotoMetadata.c"
+ }
+#line 907 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp27_ = writeable_set;
+#line 907 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp28_ = writeable_path;
+#line 907 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_COLLECTION, GeeCollection), _tmp28_);
+#line 901 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (writeable_path);
+#line 901 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (current_path);
+#line 6847 "PhotoMetadata.c"
+ }
+#line 901 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (_current_path_it);
+#line 6851 "PhotoMetadata.c"
+ }
+#line 910 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp29_ = current_field;
+#line 910 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp30_ = _tmp29_->field_name;
+#line 910 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp31_ = writeable_set;
+#line 910 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_string_multiple (self, _tmp30_, G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, GEE_TYPE_COLLECTION, GeeCollection));
+#line 895 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (writeable_set);
+#line 895 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _hierarchical_keyword_field_unref0 (current_field);
+#line 6865 "PhotoMetadata.c"
+ }
+ }
+ }
+}
+
+
+void photo_metadata_set_keywords (PhotoMetadata* self, GeeCollection* keywords, PhotoMetadataSetOption option) {
+ HierarchicalTagIndex* htag_index = NULL;
+ HierarchicalTagIndex* _tmp0_ = NULL;
+ GeeSet* flat_keywords = NULL;
+ GeeTreeSet* _tmp1_ = NULL;
+ GeeCollection* _tmp2_ = NULL;
+ GeeCollection* _tmp28_ = NULL;
+#line 914 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 914 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail ((keywords == NULL) || GEE_IS_COLLECTION (keywords));
+#line 915 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = hierarchical_tag_index_new ();
+#line 915 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ htag_index = _tmp0_;
+#line 916 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = gee_tree_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
+#line 916 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ flat_keywords = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_SET, GeeSet);
+#line 918 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = keywords;
+#line 918 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp2_ != NULL) {
+#line 6895 "PhotoMetadata.c"
+ GeeSet* _tmp24_ = NULL;
+ HierarchicalTagIndex* _tmp25_ = NULL;
+ GeeCollection* _tmp26_ = NULL;
+ GeeCollection* _tmp27_ = NULL;
+ {
+ GeeIterator* _keyword_it = NULL;
+ GeeCollection* _tmp3_ = NULL;
+ GeeIterator* _tmp4_ = NULL;
+#line 919 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = keywords;
+#line 919 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable));
+#line 919 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _keyword_it = _tmp4_;
+#line 919 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ while (TRUE) {
+#line 6912 "PhotoMetadata.c"
+ GeeIterator* _tmp5_ = NULL;
+ gboolean _tmp6_ = FALSE;
+ gchar* keyword = NULL;
+ GeeIterator* _tmp7_ = NULL;
+ gpointer _tmp8_ = NULL;
+ const gchar* _tmp9_ = NULL;
+ gboolean _tmp10_ = FALSE;
+#line 919 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = _keyword_it;
+#line 919 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = gee_iterator_next (_tmp5_);
+#line 919 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp6_) {
+#line 919 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ break;
+#line 6928 "PhotoMetadata.c"
+ }
+#line 919 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = _keyword_it;
+#line 919 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = gee_iterator_get (_tmp7_);
+#line 919 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ keyword = (gchar*) _tmp8_;
+#line 920 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = keyword;
+#line 920 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = g_str_has_prefix (_tmp9_, TAG_PATH_SEPARATOR_STRING);
+#line 920 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp10_) {
+#line 6942 "PhotoMetadata.c"
+ GeeCollection* path_components = NULL;
+ const gchar* _tmp11_ = NULL;
+ GeeList* _tmp12_ = NULL;
+#line 921 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = keyword;
+#line 921 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = hierarchical_tag_utilities_enumerate_path_components (_tmp11_);
+#line 921 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ path_components = G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_COLLECTION, GeeCollection);
+#line 6952 "PhotoMetadata.c"
+ {
+ GeeIterator* _component_it = NULL;
+ GeeCollection* _tmp13_ = NULL;
+ GeeIterator* _tmp14_ = NULL;
+#line 923 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = path_components;
+#line 923 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp14_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ITERABLE, GeeIterable));
+#line 923 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _component_it = _tmp14_;
+#line 923 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ while (TRUE) {
+#line 6965 "PhotoMetadata.c"
+ GeeIterator* _tmp15_ = NULL;
+ gboolean _tmp16_ = FALSE;
+ gchar* component = NULL;
+ GeeIterator* _tmp17_ = NULL;
+ gpointer _tmp18_ = NULL;
+ HierarchicalTagIndex* _tmp19_ = NULL;
+ const gchar* _tmp20_ = NULL;
+ const gchar* _tmp21_ = NULL;
+#line 923 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp15_ = _component_it;
+#line 923 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp16_ = gee_iterator_next (_tmp15_);
+#line 923 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp16_) {
+#line 923 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ break;
+#line 6982 "PhotoMetadata.c"
+ }
+#line 923 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp17_ = _component_it;
+#line 923 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18_ = gee_iterator_get (_tmp17_);
+#line 923 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ component = (gchar*) _tmp18_;
+#line 924 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp19_ = htag_index;
+#line 924 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp20_ = component;
+#line 924 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp21_ = keyword;
+#line 924 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ hierarchical_tag_index_add_path (_tmp19_, _tmp20_, _tmp21_);
+#line 923 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (component);
+#line 7000 "PhotoMetadata.c"
+ }
+#line 923 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (_component_it);
+#line 7004 "PhotoMetadata.c"
+ }
+#line 920 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (path_components);
+#line 7008 "PhotoMetadata.c"
+ } else {
+ GeeSet* _tmp22_ = NULL;
+ const gchar* _tmp23_ = NULL;
+#line 926 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp22_ = flat_keywords;
+#line 926 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp23_ = keyword;
+#line 926 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, GEE_TYPE_COLLECTION, GeeCollection), _tmp23_);
+#line 7018 "PhotoMetadata.c"
+ }
+#line 919 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (keyword);
+#line 7022 "PhotoMetadata.c"
+ }
+#line 919 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (_keyword_it);
+#line 7026 "PhotoMetadata.c"
+ }
+#line 930 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp24_ = flat_keywords;
+#line 930 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp25_ = htag_index;
+#line 930 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp26_ = hierarchical_tag_index_get_all_tags (_tmp25_);
+#line 930 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp27_ = _tmp26_;
+#line 930 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GEE_TYPE_COLLECTION, GeeCollection), _tmp27_);
+#line 930 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (_tmp27_);
+#line 7040 "PhotoMetadata.c"
+ }
+#line 933 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp28_ = keywords;
+#line 933 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp28_ != NULL) {
+#line 7046 "PhotoMetadata.c"
+ gchar** _tmp29_ = NULL;
+ gint _tmp29__length1 = 0;
+ GeeSet* _tmp30_ = NULL;
+ PhotoMetadataSetOption _tmp31_ = 0;
+ HierarchicalTagIndex* _tmp32_ = NULL;
+#line 934 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp29_ = photo_metadata_KEYWORD_TAGS;
+#line 934 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp29__length1 = photo_metadata_KEYWORD_TAGS_length1;
+#line 934 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp30_ = flat_keywords;
+#line 934 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp31_ = option;
+#line 934 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_all_string_multiple (self, _tmp29_, _tmp29__length1, G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, GEE_TYPE_COLLECTION, GeeCollection), _tmp31_);
+#line 935 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp32_ = htag_index;
+#line 935 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_internal_set_hierarchical_keywords (self, _tmp32_);
+#line 7066 "PhotoMetadata.c"
+ } else {
+ gchar** _tmp33_ = NULL;
+ gint _tmp33__length1 = 0;
+#line 937 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp33_ = photo_metadata_KEYWORD_TAGS;
+#line 937 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp33__length1 = photo_metadata_KEYWORD_TAGS_length1;
+#line 937 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_remove_tags (self, _tmp33_, _tmp33__length1);
+#line 938 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_internal_set_hierarchical_keywords (self, NULL);
+#line 7078 "PhotoMetadata.c"
+ }
+#line 914 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (flat_keywords);
+#line 914 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _hierarchical_tag_index_unref0 (htag_index);
+#line 7084 "PhotoMetadata.c"
+}
+
+
+gboolean photo_metadata_has_hierarchical_keywords (PhotoMetadata* self) {
+ gboolean result = FALSE;
+ HierarchicalKeywordField** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+#line 942 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 943 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_HIERARCHICAL_KEYWORD_TAGS;
+#line 943 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__length1 = photo_metadata_HIERARCHICAL_KEYWORD_TAGS_length1;
+#line 7098 "PhotoMetadata.c"
+ {
+ HierarchicalKeywordField** field_collection = NULL;
+ gint field_collection_length1 = 0;
+ gint _field_collection_size_ = 0;
+ gint field_it = 0;
+#line 943 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ field_collection = _tmp0_;
+#line 943 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ field_collection_length1 = _tmp0__length1;
+#line 943 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ for (field_it = 0; field_it < _tmp0__length1; field_it = field_it + 1) {
+#line 7110 "PhotoMetadata.c"
+ HierarchicalKeywordField* _tmp1_ = NULL;
+ HierarchicalKeywordField* field = NULL;
+#line 943 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = _hierarchical_keyword_field_ref0 (field_collection[field_it]);
+#line 943 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ field = _tmp1_;
+#line 7117 "PhotoMetadata.c"
+ {
+ GeeCollection* values = NULL;
+ HierarchicalKeywordField* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+ GeeList* _tmp4_ = NULL;
+ gboolean _tmp5_ = FALSE;
+ GeeCollection* _tmp6_ = NULL;
+#line 944 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = field;
+#line 944 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = _tmp2_->field_name;
+#line 944 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = photo_metadata_get_string_multiple (self, _tmp3_);
+#line 944 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ values = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection);
+#line 946 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = values;
+#line 946 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp6_ != NULL) {
+#line 7137 "PhotoMetadata.c"
+ GeeCollection* _tmp7_ = NULL;
+ gint _tmp8_ = 0;
+ gint _tmp9_ = 0;
+#line 946 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = values;
+#line 946 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = gee_collection_get_size (_tmp7_);
+#line 946 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = _tmp8_;
+#line 946 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = _tmp9_ > 0;
+#line 7149 "PhotoMetadata.c"
+ } else {
+#line 946 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = FALSE;
+#line 7153 "PhotoMetadata.c"
+ }
+#line 946 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp5_) {
+#line 947 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = TRUE;
+#line 947 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (values);
+#line 947 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _hierarchical_keyword_field_unref0 (field);
+#line 947 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7165 "PhotoMetadata.c"
+ }
+#line 943 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (values);
+#line 943 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _hierarchical_keyword_field_unref0 (field);
+#line 7171 "PhotoMetadata.c"
+ }
+ }
+ }
+#line 950 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = FALSE;
+#line 950 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7179 "PhotoMetadata.c"
+}
+
+
+GeeSet* photo_metadata_get_hierarchical_keywords (PhotoMetadata* self) {
+ GeeSet* result = NULL;
+ gboolean _tmp0_ = FALSE;
+ GeeSet* h_keywords = NULL;
+ GeeSet* _tmp1_ = NULL;
+ HierarchicalKeywordField** _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+#line 953 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 954 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_has_hierarchical_keywords (self);
+#line 954 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_assert (_tmp0_, "has_hierarchical_keywords()");
+#line 956 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_create_string_set (self, NULL, NULL, NULL);
+#line 956 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ h_keywords = _tmp1_;
+#line 958 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = photo_metadata_HIERARCHICAL_KEYWORD_TAGS;
+#line 958 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2__length1 = photo_metadata_HIERARCHICAL_KEYWORD_TAGS_length1;
+#line 7204 "PhotoMetadata.c"
+ {
+ HierarchicalKeywordField** field_collection = NULL;
+ gint field_collection_length1 = 0;
+ gint _field_collection_size_ = 0;
+ gint field_it = 0;
+#line 958 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ field_collection = _tmp2_;
+#line 958 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ field_collection_length1 = _tmp2__length1;
+#line 958 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ for (field_it = 0; field_it < _tmp2__length1; field_it = field_it + 1) {
+#line 7216 "PhotoMetadata.c"
+ HierarchicalKeywordField* _tmp3_ = NULL;
+ HierarchicalKeywordField* field = NULL;
+#line 958 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = _hierarchical_keyword_field_ref0 (field_collection[field_it]);
+#line 958 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ field = _tmp3_;
+#line 7223 "PhotoMetadata.c"
+ {
+ GeeCollection* values = NULL;
+ HierarchicalKeywordField* _tmp4_ = NULL;
+ const gchar* _tmp5_ = NULL;
+ GeeList* _tmp6_ = NULL;
+ gboolean _tmp7_ = FALSE;
+ GeeCollection* _tmp8_ = NULL;
+#line 959 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = field;
+#line 959 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = _tmp4_->field_name;
+#line 959 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = photo_metadata_get_string_multiple (self, _tmp5_);
+#line 959 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ values = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection);
+#line 961 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = values;
+#line 961 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp8_ == NULL) {
+#line 961 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = TRUE;
+#line 7245 "PhotoMetadata.c"
+ } else {
+ GeeCollection* _tmp9_ = NULL;
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+#line 961 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = values;
+#line 961 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = gee_collection_get_size (_tmp9_);
+#line 961 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = _tmp10_;
+#line 961 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = _tmp11_ < 1;
+#line 7258 "PhotoMetadata.c"
+ }
+#line 961 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp7_) {
+#line 962 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (values);
+#line 962 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _hierarchical_keyword_field_unref0 (field);
+#line 962 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ continue;
+#line 7268 "PhotoMetadata.c"
+ }
+ {
+ GeeIterator* _current_value_it = NULL;
+ GeeCollection* _tmp12_ = NULL;
+ GeeIterator* _tmp13_ = NULL;
+#line 964 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = values;
+#line 964 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ITERABLE, GeeIterable));
+#line 964 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _current_value_it = _tmp13_;
+#line 964 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ while (TRUE) {
+#line 7282 "PhotoMetadata.c"
+ GeeIterator* _tmp14_ = NULL;
+ gboolean _tmp15_ = FALSE;
+ gchar* current_value = NULL;
+ GeeIterator* _tmp16_ = NULL;
+ gpointer _tmp17_ = NULL;
+ gchar* canonicalized = NULL;
+ const gchar* _tmp18_ = NULL;
+ HierarchicalKeywordField* _tmp19_ = NULL;
+ const gchar* _tmp20_ = NULL;
+ gchar* _tmp21_ = NULL;
+ const gchar* _tmp22_ = NULL;
+#line 964 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp14_ = _current_value_it;
+#line 964 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp15_ = gee_iterator_next (_tmp14_);
+#line 964 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp15_) {
+#line 964 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ break;
+#line 7302 "PhotoMetadata.c"
+ }
+#line 964 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp16_ = _current_value_it;
+#line 964 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp17_ = gee_iterator_get (_tmp16_);
+#line 964 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ current_value = (gchar*) _tmp17_;
+#line 965 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18_ = current_value;
+#line 965 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp19_ = field;
+#line 965 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp20_ = _tmp19_->path_separator;
+#line 965 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp21_ = hierarchical_tag_utilities_canonicalize (_tmp18_, _tmp20_);
+#line 965 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ canonicalized = _tmp21_;
+#line 968 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp22_ = canonicalized;
+#line 968 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp22_ != NULL) {
+#line 7324 "PhotoMetadata.c"
+ GeeSet* _tmp23_ = NULL;
+ const gchar* _tmp24_ = NULL;
+#line 969 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp23_ = h_keywords;
+#line 969 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp24_ = canonicalized;
+#line 969 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, GEE_TYPE_COLLECTION, GeeCollection), _tmp24_);
+#line 7333 "PhotoMetadata.c"
+ }
+#line 964 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (canonicalized);
+#line 964 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (current_value);
+#line 7339 "PhotoMetadata.c"
+ }
+#line 964 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (_current_value_it);
+#line 7343 "PhotoMetadata.c"
+ }
+#line 958 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_object_unref0 (values);
+#line 958 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _hierarchical_keyword_field_unref0 (field);
+#line 7349 "PhotoMetadata.c"
+ }
+ }
+ }
+#line 973 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = h_keywords;
+#line 973 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7357 "PhotoMetadata.c"
+}
+
+
+gboolean photo_metadata_has_orientation (PhotoMetadata* self) {
+ gboolean result = FALSE;
+ GExiv2Metadata* _tmp0_ = NULL;
+ GExiv2Orientation _tmp1_ = 0;
+#line 976 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 977 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->exiv2;
+#line 977 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = gexiv2_metadata_get_orientation (_tmp0_);
+#line 977 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp1_ == GEXIV2_ORIENTATION_UNSPECIFIED;
+#line 977 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7375 "PhotoMetadata.c"
+}
+
+
+Orientation photo_metadata_get_orientation (PhotoMetadata* self) {
+ Orientation result = 0;
+ GExiv2Orientation orientation = 0;
+ GExiv2Metadata* _tmp0_ = NULL;
+ GExiv2Orientation _tmp1_ = 0;
+ gboolean _tmp2_ = FALSE;
+ gboolean _tmp3_ = FALSE;
+ GExiv2Orientation _tmp4_ = 0;
+#line 981 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), 0);
+#line 984 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->exiv2;
+#line 984 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = gexiv2_metadata_get_orientation (_tmp0_);
+#line 984 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ orientation = _tmp1_;
+#line 985 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = orientation;
+#line 985 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp4_ == GEXIV2_ORIENTATION_UNSPECIFIED) {
+#line 985 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = TRUE;
+#line 7401 "PhotoMetadata.c"
+ } else {
+ GExiv2Orientation _tmp5_ = 0;
+#line 985 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = orientation;
+#line 985 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = _tmp5_ < ORIENTATION_MIN;
+#line 7408 "PhotoMetadata.c"
+ }
+#line 985 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp3_) {
+#line 985 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = TRUE;
+#line 7414 "PhotoMetadata.c"
+ } else {
+ GExiv2Orientation _tmp6_ = 0;
+#line 986 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = orientation;
+#line 986 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = _tmp6_ > ORIENTATION_MAX;
+#line 7421 "PhotoMetadata.c"
+ }
+#line 985 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp2_) {
+#line 987 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = ORIENTATION_TOP_LEFT;
+#line 987 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7429 "PhotoMetadata.c"
+ } else {
+ GExiv2Orientation _tmp7_ = 0;
+#line 989 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = orientation;
+#line 989 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = (Orientation) _tmp7_;
+#line 989 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7438 "PhotoMetadata.c"
+ }
+}
+
+
+void photo_metadata_set_orientation (PhotoMetadata* self, Orientation orientation) {
+ GExiv2Metadata* _tmp0_ = NULL;
+ Orientation _tmp1_ = 0;
+#line 992 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 994 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->exiv2;
+#line 994 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = orientation;
+#line 994 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ gexiv2_metadata_set_orientation (_tmp0_, (GExiv2Orientation) _tmp1_);
+#line 7454 "PhotoMetadata.c"
+}
+
+
+gboolean photo_metadata_get_gps (PhotoMetadata* self, gdouble* longitude, gchar** long_ref, gdouble* latitude, gchar** lat_ref, gdouble* altitude) {
+ gdouble _vala_longitude = 0.0;
+ gchar* _vala_long_ref = NULL;
+ gdouble _vala_latitude = 0.0;
+ gchar* _vala_lat_ref = NULL;
+ gdouble _vala_altitude = 0.0;
+ gboolean result = FALSE;
+ GExiv2Metadata* _tmp0_ = NULL;
+ gdouble _tmp1_ = 0.0;
+ gdouble _tmp2_ = 0.0;
+ gdouble _tmp3_ = 0.0;
+ gboolean _tmp4_ = FALSE;
+ gchar* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+#line 997 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 999 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->priv->exiv2;
+#line 999 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = gexiv2_metadata_get_gps_info (_tmp0_, &_tmp1_, &_tmp2_, &_tmp3_);
+#line 999 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_longitude = _tmp1_;
+#line 999 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_latitude = _tmp2_;
+#line 999 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_altitude = _tmp3_;
+#line 999 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp4_) {
+#line 1000 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_vala_long_ref);
+#line 1000 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_long_ref = NULL;
+#line 1001 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_vala_lat_ref);
+#line 1001 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_lat_ref = NULL;
+#line 1003 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = FALSE;
+#line 1003 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (longitude) {
+#line 1003 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *longitude = _vala_longitude;
+#line 7500 "PhotoMetadata.c"
+ }
+#line 1003 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (long_ref) {
+#line 1003 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *long_ref = _vala_long_ref;
+#line 7506 "PhotoMetadata.c"
+ } else {
+#line 1003 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_vala_long_ref);
+#line 7510 "PhotoMetadata.c"
+ }
+#line 1003 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (latitude) {
+#line 1003 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *latitude = _vala_latitude;
+#line 7516 "PhotoMetadata.c"
+ }
+#line 1003 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (lat_ref) {
+#line 1003 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *lat_ref = _vala_lat_ref;
+#line 7522 "PhotoMetadata.c"
+ } else {
+#line 1003 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_vala_lat_ref);
+#line 7526 "PhotoMetadata.c"
+ }
+#line 1003 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (altitude) {
+#line 1003 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *altitude = _vala_altitude;
+#line 7532 "PhotoMetadata.c"
+ }
+#line 1003 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7536 "PhotoMetadata.c"
+ }
+#line 1006 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = photo_metadata_get_string (self, "Exif.GPSInfo.GPSLongitudeRef", PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 1006 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_vala_long_ref);
+#line 1006 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_long_ref = _tmp5_;
+#line 1007 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = photo_metadata_get_string (self, "Exif.GPSInfo.GPSLatitudeRef", PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 1007 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_vala_lat_ref);
+#line 1007 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_lat_ref = _tmp6_;
+#line 1009 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = TRUE;
+#line 1009 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (longitude) {
+#line 1009 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *longitude = _vala_longitude;
+#line 7556 "PhotoMetadata.c"
+ }
+#line 1009 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (long_ref) {
+#line 1009 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *long_ref = _vala_long_ref;
+#line 7562 "PhotoMetadata.c"
+ } else {
+#line 1009 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_vala_long_ref);
+#line 7566 "PhotoMetadata.c"
+ }
+#line 1009 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (latitude) {
+#line 1009 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *latitude = _vala_latitude;
+#line 7572 "PhotoMetadata.c"
+ }
+#line 1009 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (lat_ref) {
+#line 1009 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *lat_ref = _vala_lat_ref;
+#line 7578 "PhotoMetadata.c"
+ } else {
+#line 1009 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_vala_lat_ref);
+#line 7582 "PhotoMetadata.c"
+ }
+#line 1009 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (altitude) {
+#line 1009 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *altitude = _vala_altitude;
+#line 7588 "PhotoMetadata.c"
+ }
+#line 1009 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7592 "PhotoMetadata.c"
+}
+
+
+gboolean photo_metadata_get_exposure (PhotoMetadata* self, MetadataRational* exposure) {
+ MetadataRational _vala_exposure = {0};
+ gboolean result = FALSE;
+ MetadataRational _tmp0_ = {0};
+ gboolean _tmp1_ = FALSE;
+#line 1012 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 1013 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_get_rational (self, "Exif.Photo.ExposureTime", &_tmp0_);
+#line 1013 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_exposure = _tmp0_;
+#line 1013 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp1_;
+#line 1013 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (exposure) {
+#line 1013 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *exposure = _vala_exposure;
+#line 7613 "PhotoMetadata.c"
+ }
+#line 1013 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7617 "PhotoMetadata.c"
+}
+
+
+gchar* photo_metadata_get_exposure_string (PhotoMetadata* self) {
+ gchar* result = NULL;
+ MetadataRational exposure_time = {0};
+ MetadataRational _tmp0_ = {0};
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+ gchar* _tmp3_ = NULL;
+#line 1016 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 1018 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_get_rational (self, "Exif.Photo.ExposureTime", &_tmp0_);
+#line 1018 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ exposure_time = _tmp0_;
+#line 1018 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp1_) {
+#line 1019 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = NULL;
+#line 1019 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7640 "PhotoMetadata.c"
+ }
+#line 1021 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = metadata_rational_is_valid (&exposure_time);
+#line 1021 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp2_) {
+#line 1022 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = NULL;
+#line 1022 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7650 "PhotoMetadata.c"
+ }
+#line 1024 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = photo_metadata_get_string_interpreted (self, "Exif.Photo.ExposureTime", PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 1024 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp3_;
+#line 1024 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7658 "PhotoMetadata.c"
+}
+
+
+gboolean photo_metadata_get_iso (PhotoMetadata* self, glong* iso) {
+ glong _vala_iso = 0L;
+ gboolean result = FALSE;
+ gboolean fetched_ok = FALSE;
+ glong _tmp0_ = 0L;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+ gboolean _tmp3_ = FALSE;
+ glong _tmp4_ = 0L;
+#line 1027 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 1028 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_get_long (self, "Exif.Photo.ISOSpeedRatings", &_tmp0_);
+#line 1028 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_iso = _tmp0_;
+#line 1028 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ fetched_ok = _tmp1_;
+#line 1030 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = fetched_ok;
+#line 1030 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp2_ == FALSE) {
+#line 1031 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = FALSE;
+#line 1031 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (iso) {
+#line 1031 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *iso = _vala_iso;
+#line 7689 "PhotoMetadata.c"
+ }
+#line 1031 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7693 "PhotoMetadata.c"
+ }
+#line 1035 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = _vala_iso;
+#line 1035 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp4_ < ((glong) 6)) {
+#line 1035 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = TRUE;
+#line 7701 "PhotoMetadata.c"
+ } else {
+ glong _tmp5_ = 0L;
+#line 1035 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = _vala_iso;
+#line 1035 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = _tmp5_ > ((glong) 409600);
+#line 7708 "PhotoMetadata.c"
+ }
+#line 1035 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp3_) {
+#line 1036 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = FALSE;
+#line 1036 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (iso) {
+#line 1036 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *iso = _vala_iso;
+#line 7718 "PhotoMetadata.c"
+ }
+#line 1036 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7722 "PhotoMetadata.c"
+ }
+#line 1038 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = TRUE;
+#line 1038 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (iso) {
+#line 1038 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *iso = _vala_iso;
+#line 7730 "PhotoMetadata.c"
+ }
+#line 1038 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7734 "PhotoMetadata.c"
+}
+
+
+gchar* photo_metadata_get_iso_string (PhotoMetadata* self) {
+ gchar* result = NULL;
+ glong iso = 0L;
+ glong _tmp0_ = 0L;
+ gboolean _tmp1_ = FALSE;
+ gchar* _tmp2_ = NULL;
+#line 1041 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 1043 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_get_iso (self, &_tmp0_);
+#line 1043 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ iso = _tmp0_;
+#line 1043 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp1_) {
+#line 1044 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = NULL;
+#line 1044 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7756 "PhotoMetadata.c"
+ }
+#line 1046 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = photo_metadata_get_string_interpreted (self, "Exif.Photo.ISOSpeedRatings", PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 1046 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp2_;
+#line 1046 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7764 "PhotoMetadata.c"
+}
+
+
+gboolean photo_metadata_get_aperture (PhotoMetadata* self, MetadataRational* aperture) {
+ MetadataRational _vala_aperture = {0};
+ gboolean result = FALSE;
+ MetadataRational _tmp0_ = {0};
+ gboolean _tmp1_ = FALSE;
+#line 1049 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 1050 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_get_rational (self, "Exif.Photo.FNumber", &_tmp0_);
+#line 1050 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_aperture = _tmp0_;
+#line 1050 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp1_;
+#line 1050 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (aperture) {
+#line 1050 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *aperture = _vala_aperture;
+#line 7785 "PhotoMetadata.c"
+ }
+#line 1050 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7789 "PhotoMetadata.c"
+}
+
+
+gchar* photo_metadata_get_aperture_string (PhotoMetadata* self, gboolean pango_formatted) {
+ gchar* result = NULL;
+ MetadataRational aperture = {0};
+ MetadataRational _tmp0_ = {0};
+ gboolean _tmp1_ = FALSE;
+ gdouble aperture_value = 0.0;
+ MetadataRational _tmp2_ = {0};
+ gint _tmp3_ = 0;
+ MetadataRational _tmp4_ = {0};
+ gint _tmp5_ = 0;
+ gdouble _tmp6_ = 0.0;
+ const gchar* _tmp7_ = NULL;
+ gboolean _tmp8_ = FALSE;
+ const gchar* _tmp9_ = NULL;
+ gdouble _tmp10_ = 0.0;
+ gdouble _tmp11_ = 0.0;
+ gchar* _tmp12_ = NULL;
+ gchar* _tmp13_ = NULL;
+ gchar* _tmp14_ = NULL;
+ gchar* _tmp15_ = NULL;
+#line 1053 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 1055 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_get_aperture (self, &_tmp0_);
+#line 1055 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ aperture = _tmp0_;
+#line 1055 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp1_) {
+#line 1056 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = NULL;
+#line 1056 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7825 "PhotoMetadata.c"
+ }
+#line 1058 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = aperture;
+#line 1058 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = _tmp2_.numerator;
+#line 1058 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = aperture;
+#line 1058 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = _tmp4_.denominator;
+#line 1058 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ aperture_value = ((gdouble) _tmp3_) / ((gdouble) _tmp5_);
+#line 1059 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = aperture_value;
+#line 1059 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ aperture_value = ((gint) (_tmp6_ * 10.0)) / 10.0;
+#line 1061 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = pango_formatted;
+#line 1061 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp8_) {
+#line 1061 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = "<i>f</i>/";
+#line 7847 "PhotoMetadata.c"
+ } else {
+#line 1061 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = "f/";
+#line 7851 "PhotoMetadata.c"
+ }
+#line 1062 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = aperture_value;
+#line 1062 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (fmod (_tmp10_, 1) == ((gdouble) 0)) {
+#line 1062 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = "%.0f";
+#line 7859 "PhotoMetadata.c"
+ } else {
+#line 1062 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = "%.1f";
+#line 7863 "PhotoMetadata.c"
+ }
+#line 1061 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = aperture_value;
+#line 1061 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = g_strdup_printf (_tmp9_, _tmp11_);
+#line 1061 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = _tmp12_;
+#line 1061 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp14_ = g_strconcat (_tmp7_, _tmp13_, NULL);
+#line 1061 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp15_ = _tmp14_;
+#line 1061 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_tmp13_);
+#line 1061 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp15_;
+#line 1061 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7881 "PhotoMetadata.c"
+}
+
+
+gchar* photo_metadata_get_camera_make (PhotoMetadata* self) {
+ gchar* result = NULL;
+ gchar* _tmp0_ = NULL;
+#line 1065 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 1066 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_get_string_interpreted (self, "Exif.Image.Make", PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 1066 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp0_;
+#line 1066 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7896 "PhotoMetadata.c"
+}
+
+
+gchar* photo_metadata_get_camera_model (PhotoMetadata* self) {
+ gchar* result = NULL;
+ gchar* _tmp0_ = NULL;
+#line 1069 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 1070 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_get_string_interpreted (self, "Exif.Image.Model", PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 1070 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp0_;
+#line 1070 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7911 "PhotoMetadata.c"
+}
+
+
+gboolean photo_metadata_get_flash (PhotoMetadata* self, glong* flash) {
+ glong _vala_flash = 0L;
+ gboolean result = FALSE;
+ glong _tmp0_ = 0L;
+ gboolean _tmp1_ = FALSE;
+#line 1073 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 1075 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_get_long (self, "Exif.Photo.Flash", &_tmp0_);
+#line 1075 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_flash = _tmp0_;
+#line 1075 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp1_;
+#line 1075 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (flash) {
+#line 1075 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *flash = _vala_flash;
+#line 7932 "PhotoMetadata.c"
+ }
+#line 1075 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7936 "PhotoMetadata.c"
+}
+
+
+gchar* photo_metadata_get_flash_string (PhotoMetadata* self) {
+ gchar* result = NULL;
+ gchar* _tmp0_ = NULL;
+#line 1078 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 1080 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_get_string_interpreted (self, "Exif.Photo.Flash", PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 1080 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp0_;
+#line 1080 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7951 "PhotoMetadata.c"
+}
+
+
+gboolean photo_metadata_get_focal_length (PhotoMetadata* self, MetadataRational* focal_length) {
+ MetadataRational _vala_focal_length = {0};
+ gboolean result = FALSE;
+ MetadataRational _tmp0_ = {0};
+ gboolean _tmp1_ = FALSE;
+#line 1083 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), FALSE);
+#line 1084 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_get_rational (self, "Exif.Photo.FocalLength", &_tmp0_);
+#line 1084 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_focal_length = _tmp0_;
+#line 1084 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp1_;
+#line 1084 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (focal_length) {
+#line 1084 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *focal_length = _vala_focal_length;
+#line 7972 "PhotoMetadata.c"
+ }
+#line 1084 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7976 "PhotoMetadata.c"
+}
+
+
+gchar* photo_metadata_get_focal_length_string (PhotoMetadata* self) {
+ gchar* result = NULL;
+ gchar* _tmp0_ = NULL;
+#line 1087 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 1088 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_get_string_interpreted (self, "Exif.Photo.FocalLength", PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 1088 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp0_;
+#line 1088 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 7991 "PhotoMetadata.c"
+}
+
+
+gchar* photo_metadata_get_artist (PhotoMetadata* self) {
+ gchar* result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ gchar* _tmp1_ = NULL;
+#line 1096 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 1097 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_ARTIST_TAGS;
+#line 1097 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__length1 = photo_metadata_ARTIST_TAGS_length1;
+#line 1097 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_get_first_string_interpreted (self, _tmp0_, _tmp0__length1);
+#line 1097 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp1_;
+#line 1097 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 8012 "PhotoMetadata.c"
+}
+
+
+gchar* photo_metadata_get_copyright (PhotoMetadata* self) {
+ gchar* result = NULL;
+ gchar* _tmp0_ = NULL;
+#line 1100 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 1101 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_get_string_interpreted (self, "Exif.Image.Copyright", PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 1101 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp0_;
+#line 1101 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 8027 "PhotoMetadata.c"
+}
+
+
+gchar* photo_metadata_get_software (PhotoMetadata* self) {
+ gchar* result = NULL;
+ gchar* _tmp0_ = NULL;
+#line 1104 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 1105 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_get_string_interpreted (self, "Exif.Image.Software", PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 1105 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp0_;
+#line 1105 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 8042 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_set_software (PhotoMetadata* self, const gchar* software, const gchar* version) {
+ const gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ gboolean _tmp4_ = FALSE;
+#line 1108 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 1108 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (software != NULL);
+#line 1108 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (version != NULL);
+#line 1110 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = software;
+#line 1110 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = version;
+#line 1110 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = g_strdup_printf ("%s %s", _tmp0_, _tmp1_);
+#line 1110 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = _tmp2_;
+#line 1110 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_string (self, "Exif.Image.Software", _tmp3_, PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 1110 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_tmp3_);
+#line 1112 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = photo_metadata_has_iptc (self);
+#line 1112 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp4_) {
+#line 8074 "PhotoMetadata.c"
+ const gchar* _tmp5_ = NULL;
+ const gchar* _tmp6_ = NULL;
+#line 1113 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = software;
+#line 1113 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_string (self, "Iptc.Application2.Program", _tmp5_, PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 1114 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = version;
+#line 1114 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_string (self, "Iptc.Application2.ProgramVersion", _tmp6_, PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 8085 "PhotoMetadata.c"
+ }
+}
+
+
+void photo_metadata_remove_software (PhotoMetadata* self) {
+#line 1118 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 1119 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_remove_tag (self, "Exif.Image.Software");
+#line 1120 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_remove_tag (self, "Iptc.Application2.Program");
+#line 1121 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_remove_tag (self, "Iptc.Application2.ProgramVersion");
+#line 8099 "PhotoMetadata.c"
+}
+
+
+gchar* photo_metadata_get_exposure_bias (PhotoMetadata* self) {
+ gchar* result = NULL;
+ gchar* _tmp0_ = NULL;
+#line 1124 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), NULL);
+#line 1125 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_get_string_interpreted (self, "Exif.Photo.ExposureBiasValue", PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 1125 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp0_;
+#line 1125 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 8114 "PhotoMetadata.c"
+}
+
+
+Rating photo_metadata_get_rating (PhotoMetadata* self) {
+ Rating result = 0;
+ gchar* rating_string = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ gchar* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ gchar* _tmp6_ = NULL;
+ const gchar* _tmp7_ = NULL;
+ gint int_percent_rating = 0;
+ const gchar* _tmp8_ = NULL;
+ gint _tmp9_ = 0;
+ Rating _tmp18_ = 0;
+#line 1135 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (self), 0);
+#line 1136 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = photo_metadata_RATING_TAGS;
+#line 1136 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0__length1 = photo_metadata_RATING_TAGS_length1;
+#line 1136 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = photo_metadata_get_first_string (self, _tmp0_, _tmp0__length1);
+#line 1136 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ rating_string = _tmp1_;
+#line 1137 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = rating_string;
+#line 1137 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp2_ != NULL) {
+#line 8145 "PhotoMetadata.c"
+ const gchar* _tmp3_ = NULL;
+ gint _tmp4_ = 0;
+ Rating _tmp5_ = 0;
+#line 1138 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = rating_string;
+#line 1138 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = atoi (_tmp3_);
+#line 1138 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = rating_unserialize (_tmp4_);
+#line 1138 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp5_;
+#line 1138 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (rating_string);
+#line 1138 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 8161 "PhotoMetadata.c"
+ }
+#line 1140 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = photo_metadata_get_string (self, "Exif.Image.RatingPercent", PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 1140 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (rating_string);
+#line 1140 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ rating_string = _tmp6_;
+#line 1141 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = rating_string;
+#line 1141 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp7_ == NULL) {
+#line 1142 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = RATING_UNRATED;
+#line 1142 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (rating_string);
+#line 1142 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 8179 "PhotoMetadata.c"
+ }
+#line 1145 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = rating_string;
+#line 1145 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = atoi (_tmp8_);
+#line 1145 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ int_percent_rating = _tmp9_;
+#line 8187 "PhotoMetadata.c"
+ {
+ gint i = 0;
+#line 1146 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ i = 5;
+#line 8192 "PhotoMetadata.c"
+ {
+ gboolean _tmp10_ = FALSE;
+#line 1146 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = TRUE;
+#line 1146 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ while (TRUE) {
+#line 8199 "PhotoMetadata.c"
+ gint _tmp12_ = 0;
+ gint _tmp13_ = 0;
+ gint _tmp14_ = 0;
+ gint _tmp15_ = 0;
+#line 1146 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!_tmp10_) {
+#line 8206 "PhotoMetadata.c"
+ gint _tmp11_ = 0;
+#line 1146 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = i;
+#line 1146 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ i = _tmp11_ - 1;
+#line 8212 "PhotoMetadata.c"
+ }
+#line 1146 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = FALSE;
+#line 1146 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = i;
+#line 1146 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (!(_tmp12_ >= 0)) {
+#line 1146 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ break;
+#line 8222 "PhotoMetadata.c"
+ }
+#line 1147 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = int_percent_rating;
+#line 1147 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp14_ = i;
+#line 1147 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp15_ = RESOURCES_rating_thresholds[_tmp14_];
+#line 1147 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp13_ >= _tmp15_) {
+#line 8232 "PhotoMetadata.c"
+ gint _tmp16_ = 0;
+ Rating _tmp17_ = 0;
+#line 1148 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp16_ = i;
+#line 1148 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp17_ = rating_unserialize (_tmp16_);
+#line 1148 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp17_;
+#line 1148 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (rating_string);
+#line 1148 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 8245 "PhotoMetadata.c"
+ }
+ }
+ }
+ }
+#line 1150 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18_ = rating_unserialize (-1);
+#line 1150 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp18_;
+#line 1150 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (rating_string);
+#line 1150 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 8258 "PhotoMetadata.c"
+}
+
+
+void photo_metadata_set_rating (PhotoMetadata* self, Rating rating) {
+ gint int_rating = 0;
+ Rating _tmp0_ = 0;
+ gint _tmp1_ = 0;
+ gint _tmp2_ = 0;
+ gchar* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ gint _tmp5_ = 0;
+ gchar* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+ gint _tmp8_ = 0;
+#line 1158 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (self));
+#line 1159 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = rating;
+#line 1159 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = rating_serialize (_tmp0_);
+#line 1159 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ int_rating = _tmp1_;
+#line 1160 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = int_rating;
+#line 1160 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = g_strdup_printf ("%i", _tmp2_);
+#line 1160 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = _tmp3_;
+#line 1160 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_string (self, "Xmp.xmp.Rating", _tmp4_, PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 1160 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_tmp4_);
+#line 1161 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = int_rating;
+#line 1161 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = g_strdup_printf ("%i", _tmp5_);
+#line 1161 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = _tmp6_;
+#line 1161 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_string (self, "Exif.Image.Rating", _tmp7_, PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 1161 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_tmp7_);
+#line 1163 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = int_rating;
+#line 1163 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (0 <= _tmp8_) {
+#line 8305 "PhotoMetadata.c"
+ gint _tmp9_ = 0;
+ gint _tmp10_ = 0;
+ gchar* _tmp11_ = NULL;
+ gchar* _tmp12_ = NULL;
+#line 1164 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = int_rating;
+#line 1164 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = RESOURCES_rating_thresholds[_tmp9_];
+#line 1164 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = g_strdup_printf ("%i", _tmp10_);
+#line 1164 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = _tmp11_;
+#line 1164 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_string (self, "Exif.Image.RatingPercent", _tmp12_, PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 1164 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_tmp12_);
+#line 8322 "PhotoMetadata.c"
+ } else {
+ gint _tmp13_ = 0;
+ gchar* _tmp14_ = NULL;
+ gchar* _tmp15_ = NULL;
+#line 1166 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = int_rating;
+#line 1166 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp14_ = g_strdup_printf ("%i", _tmp13_);
+#line 1166 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp15_ = _tmp14_;
+#line 1166 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_set_string (self, "Exif.Image.RatingPercent", _tmp15_, PHOTO_METADATA_PREPARE_STRING_OPTIONS);
+#line 1166 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (_tmp15_);
+#line 8337 "PhotoMetadata.c"
+ }
+}
+
+
+static gpointer _media_metadata_ref0 (gpointer self) {
+#line 123 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return self ? media_metadata_ref (self) : NULL;
+#line 8345 "PhotoMetadata.c"
+}
+
+
+static PhotoMetadataInternalPhotoPreview* photo_metadata_internal_photo_preview_construct (GType object_type, PhotoMetadata* owner, const gchar* name, guint number, GExiv2PreviewProperties* props) {
+ PhotoMetadataInternalPhotoPreview* self = NULL;
+ const gchar* _tmp0_ = NULL;
+ GExiv2PreviewProperties* _tmp1_ = NULL;
+ guint32 _tmp2_ = 0U;
+ GExiv2PreviewProperties* _tmp3_ = NULL;
+ guint32 _tmp4_ = 0U;
+ Dimensions _tmp5_ = {0};
+ GExiv2PreviewProperties* _tmp6_ = NULL;
+ guint32 _tmp7_ = 0U;
+ GExiv2PreviewProperties* _tmp8_ = NULL;
+ const gchar* _tmp9_ = NULL;
+ GExiv2PreviewProperties* _tmp10_ = NULL;
+ const gchar* _tmp11_ = NULL;
+ PhotoMetadata* _tmp12_ = NULL;
+ PhotoMetadata* _tmp13_ = NULL;
+ guint _tmp14_ = 0U;
+#line 118 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (IS_PHOTO_METADATA (owner), NULL);
+#line 118 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (name != NULL, NULL);
+#line 118 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_return_val_if_fail (props != NULL, NULL);
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = name;
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = props;
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = gexiv2_preview_properties_get_width (_tmp1_);
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = props;
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = gexiv2_preview_properties_get_height (_tmp3_);
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ dimensions_init (&_tmp5_, (gint) _tmp2_, (gint) _tmp4_);
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = props;
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = gexiv2_preview_properties_get_size (_tmp6_);
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = props;
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = gexiv2_preview_properties_get_mime_type (_tmp8_);
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = props;
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = gexiv2_preview_properties_get_extension (_tmp10_);
+#line 120 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = (PhotoMetadataInternalPhotoPreview*) photo_preview_construct (object_type, _tmp0_, &_tmp5_, _tmp7_, _tmp9_, _tmp11_);
+#line 123 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = owner;
+#line 123 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = _media_metadata_ref0 (_tmp12_);
+#line 123 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _media_metadata_unref0 (self->owner);
+#line 123 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->owner = _tmp13_;
+#line 124 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp14_ = number;
+#line 124 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->number = _tmp14_;
+#line 118 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return self;
+#line 8412 "PhotoMetadata.c"
+}
+
+
+static PhotoMetadataInternalPhotoPreview* photo_metadata_internal_photo_preview_new (PhotoMetadata* owner, const gchar* name, guint number, GExiv2PreviewProperties* props) {
+#line 118 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return photo_metadata_internal_photo_preview_construct (PHOTO_METADATA_TYPE_INTERNAL_PHOTO_PREVIEW, owner, name, number, props);
+#line 8419 "PhotoMetadata.c"
+}
+
+
+static guint8* _vala_array_dup6 (guint8* self, int length) {
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return g_memdup (self, length * sizeof (guint8));
+#line 8426 "PhotoMetadata.c"
+}
+
+
+static guint8* photo_metadata_internal_photo_preview_real_flatten (PhotoPreview* base, int* result_length1, GError** error) {
+ PhotoMetadataInternalPhotoPreview * self;
+ guint8* result = NULL;
+ GExiv2PreviewProperties** props = NULL;
+ PhotoMetadata* _tmp0_ = NULL;
+ GExiv2Metadata* _tmp1_ = NULL;
+ GExiv2PreviewProperties** _tmp2_ = NULL;
+ GExiv2PreviewProperties** _tmp3_ = NULL;
+ gint props_length1 = 0;
+ gint _props_size_ = 0;
+ gboolean _tmp4_ = FALSE;
+ GExiv2PreviewProperties** _tmp5_ = NULL;
+ gint _tmp5__length1 = 0;
+ PhotoMetadata* _tmp8_ = NULL;
+ GExiv2Metadata* _tmp9_ = NULL;
+ GExiv2PreviewProperties** _tmp10_ = NULL;
+ gint _tmp10__length1 = 0;
+ guint _tmp11_ = 0U;
+ GExiv2PreviewProperties* _tmp12_ = NULL;
+ GExiv2PreviewImage* _tmp13_ = NULL;
+ GExiv2PreviewImage* _tmp14_ = NULL;
+ gint _tmp15_ = 0;
+ guint8* _tmp16_ = NULL;
+ guint8* _tmp17_ = NULL;
+ gint _tmp17__length1 = 0;
+ guint8* _tmp18_ = NULL;
+ gint _tmp18__length1 = 0;
+ guint8* _tmp19_ = NULL;
+ gint _tmp19__length1 = 0;
+#line 127 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTO_METADATA_TYPE_INTERNAL_PHOTO_PREVIEW, PhotoMetadataInternalPhotoPreview);
+#line 128 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = self->owner;
+#line 128 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = _tmp0_->priv->exiv2;
+#line 128 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = _tmp2_ = gexiv2_metadata_get_preview_properties (_tmp1_);
+#line 128 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ props = _tmp3_;
+#line 128 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ props_length1 = _vala_array_length (_tmp2_);
+#line 128 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _props_size_ = props_length1;
+#line 129 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = props;
+#line 129 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5__length1 = props_length1;
+#line 129 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (_tmp5_ != NULL) {
+#line 8479 "PhotoMetadata.c"
+ GExiv2PreviewProperties** _tmp6_ = NULL;
+ gint _tmp6__length1 = 0;
+ guint _tmp7_ = 0U;
+#line 129 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = props;
+#line 129 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6__length1 = props_length1;
+#line 129 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = self->number;
+#line 129 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = ((guint) _tmp6__length1) > _tmp7_;
+#line 8491 "PhotoMetadata.c"
+ } else {
+#line 129 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = FALSE;
+#line 8495 "PhotoMetadata.c"
+ }
+#line 129 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _vala_assert (_tmp4_, "props != null && props.length > number");
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = self->owner;
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = _tmp8_->priv->exiv2;
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = props;
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10__length1 = props_length1;
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = self->number;
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = _tmp10_[_tmp11_];
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = gexiv2_metadata_get_preview_image (_tmp9_, _tmp12_);
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp14_ = _tmp13_;
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp16_ = gexiv2_preview_image_get_data (_tmp14_, &_tmp15_);
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp17_ = (_tmp16_ != NULL) ? _vala_array_dup6 (_tmp16_, _tmp15_) : ((gpointer) _tmp16_);
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp17__length1 = _tmp15_;
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18_ = _tmp17_;
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18__length1 = _tmp17__length1;
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _gexiv2_preview_image_free0 (_tmp14_);
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp19_ = _tmp18_;
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp19__length1 = _tmp18__length1;
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ if (result_length1) {
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ *result_length1 = _tmp19__length1;
+#line 8535 "PhotoMetadata.c"
+ }
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ result = _tmp19_;
+#line 131 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ return result;
+#line 8541 "PhotoMetadata.c"
+}
+
+
+static void photo_metadata_internal_photo_preview_class_init (PhotoMetadataInternalPhotoPreviewClass * klass) {
+#line 114 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_internal_photo_preview_parent_class = g_type_class_peek_parent (klass);
+#line 114 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ ((PhotoPreviewClass *) klass)->finalize = photo_metadata_internal_photo_preview_finalize;
+#line 114 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ ((PhotoPreviewClass *) klass)->flatten = photo_metadata_internal_photo_preview_real_flatten;
+#line 8552 "PhotoMetadata.c"
+}
+
+
+static void photo_metadata_internal_photo_preview_instance_init (PhotoMetadataInternalPhotoPreview * self) {
+}
+
+
+static void photo_metadata_internal_photo_preview_finalize (PhotoPreview* obj) {
+ PhotoMetadataInternalPhotoPreview * self;
+#line 114 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, PHOTO_METADATA_TYPE_INTERNAL_PHOTO_PREVIEW, PhotoMetadataInternalPhotoPreview);
+#line 115 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _media_metadata_unref0 (self->owner);
+#line 114 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ PHOTO_PREVIEW_CLASS (photo_metadata_internal_photo_preview_parent_class)->finalize (obj);
+#line 8568 "PhotoMetadata.c"
+}
+
+
+static GType photo_metadata_internal_photo_preview_get_type (void) {
+ static volatile gsize photo_metadata_internal_photo_preview_type_id__volatile = 0;
+ if (g_once_init_enter (&photo_metadata_internal_photo_preview_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PhotoMetadataInternalPhotoPreviewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photo_metadata_internal_photo_preview_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotoMetadataInternalPhotoPreview), 0, (GInstanceInitFunc) photo_metadata_internal_photo_preview_instance_init, NULL };
+ GType photo_metadata_internal_photo_preview_type_id;
+ photo_metadata_internal_photo_preview_type_id = g_type_register_static (TYPE_PHOTO_PREVIEW, "PhotoMetadataInternalPhotoPreview", &g_define_type_info, 0);
+ g_once_init_leave (&photo_metadata_internal_photo_preview_type_id__volatile, photo_metadata_internal_photo_preview_type_id);
+ }
+ return photo_metadata_internal_photo_preview_type_id__volatile;
+}
+
+
+static void photo_metadata_class_init (PhotoMetadataClass * klass) {
+ gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar** _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+ gchar* _tmp8_ = NULL;
+ gchar* _tmp9_ = NULL;
+ gchar** _tmp10_ = NULL;
+ gchar* _tmp11_ = NULL;
+ gchar* _tmp12_ = NULL;
+ gchar** _tmp13_ = NULL;
+ gchar* _tmp14_ = NULL;
+ gchar* _tmp15_ = NULL;
+ gchar* _tmp16_ = NULL;
+ gchar* _tmp17_ = NULL;
+ gchar** _tmp18_ = NULL;
+ gchar* _tmp19_ = NULL;
+ gchar* _tmp20_ = NULL;
+ gchar* _tmp21_ = NULL;
+ gchar* _tmp22_ = NULL;
+ gchar** _tmp23_ = NULL;
+ gchar* _tmp24_ = NULL;
+ gchar* _tmp25_ = NULL;
+ gchar* _tmp26_ = NULL;
+ gchar* _tmp27_ = NULL;
+ gchar** _tmp28_ = NULL;
+ gchar* _tmp29_ = NULL;
+ gchar* _tmp30_ = NULL;
+ gchar** _tmp31_ = NULL;
+ HierarchicalKeywordField* _tmp32_ = NULL;
+ HierarchicalKeywordField* _tmp33_ = NULL;
+ HierarchicalKeywordField* _tmp34_ = NULL;
+ HierarchicalKeywordField** _tmp35_ = NULL;
+ gchar* _tmp36_ = NULL;
+ gchar* _tmp37_ = NULL;
+ gchar** _tmp38_ = NULL;
+ gchar* _tmp39_ = NULL;
+ gchar* _tmp40_ = NULL;
+ gchar* _tmp41_ = NULL;
+ gchar* _tmp42_ = NULL;
+ gchar** _tmp43_ = NULL;
+#line 99 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_parent_class = g_type_class_peek_parent (klass);
+#line 99 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ ((MediaMetadataClass *) klass)->finalize = photo_metadata_finalize;
+#line 99 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ g_type_class_add_private (klass, sizeof (PhotoMetadataPrivate));
+#line 99 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ ((MediaMetadataClass *) klass)->read_from_file = photo_metadata_real_read_from_file;
+#line 99 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ ((MediaMetadataClass *) klass)->get_creation_date_time = photo_metadata_real_get_creation_date_time;
+#line 99 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ ((MediaMetadataClass *) klass)->get_title = photo_metadata_real_get_title;
+#line 99 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ ((MediaMetadataClass *) klass)->get_comment = photo_metadata_real_get_comment;
+#line 674 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = g_strdup ("Exif.Image.DateTime");
+#line 674 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = g_strdup ("Xmp.tiff.DateTime");
+#line 674 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp2_ = g_strdup ("Xmp.xmp.ModifyDate");
+#line 674 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_ = g_new0 (gchar*, 3 + 1);
+#line 674 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_[0] = _tmp0_;
+#line 674 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_[1] = _tmp1_;
+#line 674 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp3_[2] = _tmp2_;
+#line 674 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_DATE_TIME_TAGS = _tmp3_;
+#line 674 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_DATE_TIME_TAGS_length1 = 3;
+#line 692 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp4_ = g_strdup ("Exif.Photo.DateTimeOriginal");
+#line 692 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp5_ = g_strdup ("Xmp.exif.DateTimeOriginal");
+#line 692 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp6_ = g_strdup ("Xmp.xmp.CreateDate");
+#line 692 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp7_ = g_strdup ("Exif.Photo.DateTimeDigitized");
+#line 692 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp8_ = g_strdup ("Xmp.exif.DateTimeDigitized");
+#line 692 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp9_ = g_strdup ("Exif.Image.DateTime");
+#line 692 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_ = g_new0 (gchar*, 6 + 1);
+#line 692 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_[0] = _tmp4_;
+#line 692 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_[1] = _tmp5_;
+#line 692 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_[2] = _tmp6_;
+#line 692 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_[3] = _tmp7_;
+#line 692 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_[4] = _tmp8_;
+#line 692 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp10_[5] = _tmp9_;
+#line 692 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_EXPOSURE_DATE_TIME_TAGS = _tmp10_;
+#line 692 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_EXPOSURE_DATE_TIME_TAGS_length1 = 6;
+#line 713 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp11_ = g_strdup ("Exif.Photo.DateTimeDigitized");
+#line 713 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp12_ = g_strdup ("Xmp.exif.DateTimeDigitized");
+#line 713 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_ = g_new0 (gchar*, 2 + 1);
+#line 713 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_[0] = _tmp11_;
+#line 713 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp13_[1] = _tmp12_;
+#line 713 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_DIGITIZED_DATE_TIME_TAGS = _tmp13_;
+#line 713 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_DIGITIZED_DATE_TIME_TAGS_length1 = 2;
+#line 738 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp14_ = g_strdup ("Exif.Photo.PixelXDimension");
+#line 738 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp15_ = g_strdup ("Xmp.exif.PixelXDimension");
+#line 738 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp16_ = g_strdup ("Xmp.tiff.ImageWidth");
+#line 738 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp17_ = g_strdup ("Xmp.exif.PixelXDimension");
+#line 738 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18_ = g_new0 (gchar*, 4 + 1);
+#line 738 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18_[0] = _tmp14_;
+#line 738 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18_[1] = _tmp15_;
+#line 738 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18_[2] = _tmp16_;
+#line 738 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp18_[3] = _tmp17_;
+#line 738 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_WIDTH_TAGS = _tmp18_;
+#line 738 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_WIDTH_TAGS_length1 = 4;
+#line 745 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp19_ = g_strdup ("Exif.Photo.PixelYDimension");
+#line 745 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp20_ = g_strdup ("Xmp.exif.PixelYDimension");
+#line 745 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp21_ = g_strdup ("Xmp.tiff.ImageHeight");
+#line 745 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp22_ = g_strdup ("Xmp.exif.PixelYDimension");
+#line 745 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp23_ = g_new0 (gchar*, 4 + 1);
+#line 745 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp23_[0] = _tmp19_;
+#line 745 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp23_[1] = _tmp20_;
+#line 745 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp23_[2] = _tmp21_;
+#line 745 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp23_[3] = _tmp22_;
+#line 745 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_HEIGHT_TAGS = _tmp23_;
+#line 745 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_HEIGHT_TAGS_length1 = 4;
+#line 804 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp24_ = g_strdup ("Iptc.Application2.Caption");
+#line 804 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp25_ = g_strdup ("Xmp.dc.title");
+#line 804 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp26_ = g_strdup ("Iptc.Application2.Headline");
+#line 804 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp27_ = g_strdup ("Xmp.photoshop.Headline");
+#line 804 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp28_ = g_new0 (gchar*, 4 + 1);
+#line 804 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp28_[0] = _tmp24_;
+#line 804 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp28_[1] = _tmp25_;
+#line 804 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp28_[2] = _tmp26_;
+#line 804 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp28_[3] = _tmp27_;
+#line 804 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_STANDARD_TITLE_TAGS = _tmp28_;
+#line 804 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_STANDARD_TITLE_TAGS_length1 = 4;
+#line 859 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp29_ = g_strdup ("Xmp.dc.subject");
+#line 859 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp30_ = g_strdup ("Iptc.Application2.Keywords");
+#line 859 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp31_ = g_new0 (gchar*, 2 + 1);
+#line 859 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp31_[0] = _tmp29_;
+#line 859 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp31_[1] = _tmp30_;
+#line 859 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_KEYWORD_TAGS = _tmp31_;
+#line 859 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_KEYWORD_TAGS_length1 = 2;
+#line 864 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp32_ = hierarchical_keyword_field_new ("Xmp.lr.hierarchicalSubject", "|", FALSE, FALSE);
+#line 864 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp33_ = hierarchical_keyword_field_new ("Xmp.digiKam.TagsList", "/", FALSE, TRUE);
+#line 864 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp34_ = hierarchical_keyword_field_new ("Xmp.MicrosoftPhoto.LastKeywordXMP", "/", FALSE, TRUE);
+#line 864 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp35_ = g_new0 (HierarchicalKeywordField*, 3 + 1);
+#line 864 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp35_[0] = _tmp32_;
+#line 864 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp35_[1] = _tmp33_;
+#line 864 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp35_[2] = _tmp34_;
+#line 864 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_HIERARCHICAL_KEYWORD_TAGS = _tmp35_;
+#line 864 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_HIERARCHICAL_KEYWORD_TAGS_length1 = 3;
+#line 1091 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp36_ = g_strdup ("Exif.Image.Artist");
+#line 1091 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp37_ = g_strdup ("Exif.Canon.OwnerName");
+#line 1091 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp38_ = g_new0 (gchar*, 2 + 1);
+#line 1091 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp38_[0] = _tmp36_;
+#line 1091 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp38_[1] = _tmp37_;
+#line 1091 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_ARTIST_TAGS = _tmp38_;
+#line 1091 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_ARTIST_TAGS_length1 = 2;
+#line 1128 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp39_ = g_strdup ("Xmp.xmp.Rating");
+#line 1128 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp40_ = g_strdup ("Iptc.Application2.Urgency");
+#line 1128 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp41_ = g_strdup ("Xmp.photoshop.Urgency");
+#line 1128 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp42_ = g_strdup ("Exif.Image.Rating");
+#line 1128 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp43_ = g_new0 (gchar*, 4 + 1);
+#line 1128 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp43_[0] = _tmp39_;
+#line 1128 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp43_[1] = _tmp40_;
+#line 1128 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp43_[2] = _tmp41_;
+#line 1128 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp43_[3] = _tmp42_;
+#line 1128 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_RATING_TAGS = _tmp43_;
+#line 1128 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ photo_metadata_RATING_TAGS_length1 = 4;
+#line 8839 "PhotoMetadata.c"
+}
+
+
+static void photo_metadata_instance_init (PhotoMetadata * self) {
+ GExiv2Metadata* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+#line 99 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv = PHOTO_METADATA_GET_PRIVATE (self);
+#line 135 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp0_ = gexiv2_metadata_new ();
+#line 135 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv->exiv2 = _tmp0_;
+#line 136 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv->exif = NULL;
+#line 137 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _tmp1_ = g_strdup ("<uninitialized>");
+#line 137 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self->priv->source_name = _tmp1_;
+#line 8858 "PhotoMetadata.c"
+}
+
+
+static void photo_metadata_finalize (MediaMetadata* obj) {
+ PhotoMetadata * self;
+#line 99 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PHOTO_METADATA, PhotoMetadata);
+#line 135 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _gexiv2_metadata_free0 (self->priv->exiv2);
+#line 136 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _exif_data_unref0 (self->priv->exif);
+#line 137 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ _g_free0 (self->priv->source_name);
+#line 99 "/home/jens/Source/shotwell/src/photos/PhotoMetadata.vala"
+ MEDIA_METADATA_CLASS (photo_metadata_parent_class)->finalize (obj);
+#line 8874 "PhotoMetadata.c"
+}
+
+
+GType photo_metadata_get_type (void) {
+ static volatile gsize photo_metadata_type_id__volatile = 0;
+ if (g_once_init_enter (&photo_metadata_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PhotoMetadataClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photo_metadata_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotoMetadata), 0, (GInstanceInitFunc) photo_metadata_instance_init, NULL };
+ GType photo_metadata_type_id;
+ photo_metadata_type_id = g_type_register_static (TYPE_MEDIA_METADATA, "PhotoMetadata", &g_define_type_info, 0);
+ g_once_init_leave (&photo_metadata_type_id__volatile, photo_metadata_type_id);
+ }
+ return photo_metadata_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);
+}
+
+
+static gint _vala_array_length (gpointer array) {
+ int length;
+ length = 0;
+ if (array) {
+ while (((gpointer*) array)[length]) {
+ length++;
+ }
+ }
+ return length;
+}
+
+
+
diff --git a/src/photos/Photos.c b/src/photos/Photos.c
new file mode 100644
index 0000000..434f905
--- /dev/null
+++ b/src/photos/Photos.c
@@ -0,0 +1,89 @@
+/* Photos.c generated by valac 0.32.1, the Vala compiler
+ * generated from Photos.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.
+ */
+/* This file is the master unit file for the Photo unit. It should be edited to include
+ * whatever code is deemed necessary.
+ *
+ * The init() and terminate() methods are mandatory.
+ *
+ * If the unit needs to be configured prior to initialization, add the proper parameters to
+ * the preconfigure() method, implement it, and ensure in init() that it's been called.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+
+
+#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ())
+
+typedef enum {
+ PHOTO_FILE_FORMAT_JFIF,
+ PHOTO_FILE_FORMAT_RAW,
+ PHOTO_FILE_FORMAT_PNG,
+ PHOTO_FILE_FORMAT_TIFF,
+ PHOTO_FILE_FORMAT_BMP,
+ PHOTO_FILE_FORMAT_UNKNOWN
+} PhotoFileFormat;
+
+
+
+void photos_preconfigure (void);
+void photos_init (GError** error);
+GType photo_file_format_get_type (void) G_GNUC_CONST;
+PhotoFileFormat* photo_file_format_get_supported (int* result_length1);
+void photo_file_format_init (PhotoFileFormat self);
+void photos_terminate (void);
+
+
+void photos_preconfigure (void) {
+}
+
+
+void photos_init (GError** error) {
+ gint _tmp0_ = 0;
+ PhotoFileFormat* _tmp1_ = NULL;
+#line 23 "/home/jens/Source/shotwell/src/photos/Photos.vala"
+ _tmp1_ = photo_file_format_get_supported (&_tmp0_);
+#line 53 "Photos.c"
+ {
+ PhotoFileFormat* format_collection = NULL;
+ gint format_collection_length1 = 0;
+ gint _format_collection_size_ = 0;
+ gint format_it = 0;
+#line 23 "/home/jens/Source/shotwell/src/photos/Photos.vala"
+ format_collection = _tmp1_;
+#line 23 "/home/jens/Source/shotwell/src/photos/Photos.vala"
+ format_collection_length1 = _tmp0_;
+#line 23 "/home/jens/Source/shotwell/src/photos/Photos.vala"
+ for (format_it = 0; format_it < _tmp0_; format_it = format_it + 1) {
+#line 65 "Photos.c"
+ PhotoFileFormat format = 0;
+#line 23 "/home/jens/Source/shotwell/src/photos/Photos.vala"
+ format = format_collection[format_it];
+#line 69 "Photos.c"
+ {
+ PhotoFileFormat _tmp2_ = 0;
+#line 24 "/home/jens/Source/shotwell/src/photos/Photos.vala"
+ _tmp2_ = format;
+#line 24 "/home/jens/Source/shotwell/src/photos/Photos.vala"
+ photo_file_format_init (_tmp2_);
+#line 76 "Photos.c"
+ }
+ }
+#line 23 "/home/jens/Source/shotwell/src/photos/Photos.vala"
+ format_collection = (g_free (format_collection), NULL);
+#line 81 "Photos.c"
+ }
+}
+
+
+void photos_terminate (void) {
+}
+
+
+
diff --git a/src/photos/PngSupport.c b/src/photos/PngSupport.c
new file mode 100644
index 0000000..98d4cd2
--- /dev/null
+++ b/src/photos/PngSupport.c
@@ -0,0 +1,1929 @@
+/* PngSupport.c generated by valac 0.32.1, the Vala compiler
+ * generated from PngSupport.vala, do not modify */
+
+/* Copyright 2016 Software Freedom Conservancy Inc.
+ *
+ * This software is licensed under the GNU LGPL (version 2.1 or later).
+ * See the COPYING file in this distribution.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib/gi18n-lib.h>
+#include <gio/gio.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+
+#define TYPE_PHOTO_FILE_FORMAT_PROPERTIES (photo_file_format_properties_get_type ())
+#define PHOTO_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatProperties))
+#define PHOTO_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatPropertiesClass))
+#define IS_PHOTO_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES))
+#define IS_PHOTO_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_FORMAT_PROPERTIES))
+#define PHOTO_FILE_FORMAT_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatPropertiesClass))
+
+typedef struct _PhotoFileFormatProperties PhotoFileFormatProperties;
+typedef struct _PhotoFileFormatPropertiesClass PhotoFileFormatPropertiesClass;
+typedef struct _PhotoFileFormatPropertiesPrivate PhotoFileFormatPropertiesPrivate;
+
+#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ())
+
+#define TYPE_PHOTO_FILE_FORMAT_FLAGS (photo_file_format_flags_get_type ())
+
+#define TYPE_PNG_FILE_FORMAT_PROPERTIES (png_file_format_properties_get_type ())
+#define PNG_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PNG_FILE_FORMAT_PROPERTIES, PngFileFormatProperties))
+#define PNG_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PNG_FILE_FORMAT_PROPERTIES, PngFileFormatPropertiesClass))
+#define IS_PNG_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PNG_FILE_FORMAT_PROPERTIES))
+#define IS_PNG_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PNG_FILE_FORMAT_PROPERTIES))
+#define PNG_FILE_FORMAT_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PNG_FILE_FORMAT_PROPERTIES, PngFileFormatPropertiesClass))
+
+typedef struct _PngFileFormatProperties PngFileFormatProperties;
+typedef struct _PngFileFormatPropertiesClass PngFileFormatPropertiesClass;
+typedef struct _PngFileFormatPropertiesPrivate PngFileFormatPropertiesPrivate;
+#define _photo_file_format_properties_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_format_properties_unref (var), NULL)))
+
+#define TYPE_PHOTO_FILE_SNIFFER (photo_file_sniffer_get_type ())
+#define PHOTO_FILE_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer))
+#define PHOTO_FILE_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSnifferClass))
+#define IS_PHOTO_FILE_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_SNIFFER))
+#define IS_PHOTO_FILE_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_SNIFFER))
+#define PHOTO_FILE_SNIFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSnifferClass))
+
+typedef struct _PhotoFileSniffer PhotoFileSniffer;
+typedef struct _PhotoFileSnifferClass PhotoFileSnifferClass;
+typedef struct _PhotoFileSnifferPrivate PhotoFileSnifferPrivate;
+
+#define TYPE_DETECTED_PHOTO_INFORMATION (detected_photo_information_get_type ())
+#define DETECTED_PHOTO_INFORMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformation))
+#define DETECTED_PHOTO_INFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformationClass))
+#define IS_DETECTED_PHOTO_INFORMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DETECTED_PHOTO_INFORMATION))
+#define IS_DETECTED_PHOTO_INFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DETECTED_PHOTO_INFORMATION))
+#define DETECTED_PHOTO_INFORMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformationClass))
+
+typedef struct _DetectedPhotoInformation DetectedPhotoInformation;
+typedef struct _DetectedPhotoInformationClass DetectedPhotoInformationClass;
+
+#define PHOTO_FILE_SNIFFER_TYPE_OPTIONS (photo_file_sniffer_options_get_type ())
+
+#define TYPE_GDK_SNIFFER (gdk_sniffer_get_type ())
+#define GDK_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GDK_SNIFFER, GdkSniffer))
+#define GDK_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GDK_SNIFFER, GdkSnifferClass))
+#define IS_GDK_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GDK_SNIFFER))
+#define IS_GDK_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GDK_SNIFFER))
+#define GDK_SNIFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GDK_SNIFFER, GdkSnifferClass))
+
+typedef struct _GdkSniffer GdkSniffer;
+typedef struct _GdkSnifferClass GdkSnifferClass;
+typedef struct _GdkSnifferPrivate GdkSnifferPrivate;
+
+#define TYPE_PNG_SNIFFER (png_sniffer_get_type ())
+#define PNG_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PNG_SNIFFER, PngSniffer))
+#define PNG_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PNG_SNIFFER, PngSnifferClass))
+#define IS_PNG_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PNG_SNIFFER))
+#define IS_PNG_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PNG_SNIFFER))
+#define PNG_SNIFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PNG_SNIFFER, PngSnifferClass))
+
+typedef struct _PngSniffer PngSniffer;
+typedef struct _PngSnifferClass PngSnifferClass;
+typedef struct _PngSnifferPrivate PngSnifferPrivate;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _detected_photo_information_unref0(var) ((var == NULL) ? NULL : (var = (detected_photo_information_unref (var), NULL)))
+typedef struct _DetectedPhotoInformationPrivate DetectedPhotoInformationPrivate;
+
+#define TYPE_MEDIA_METADATA (media_metadata_get_type ())
+#define MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_METADATA, MediaMetadata))
+#define MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_METADATA, MediaMetadataClass))
+#define IS_MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_METADATA))
+#define IS_MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_METADATA))
+#define MEDIA_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_METADATA, MediaMetadataClass))
+
+typedef struct _MediaMetadata MediaMetadata;
+typedef struct _MediaMetadataClass MediaMetadataClass;
+
+#define TYPE_PHOTO_METADATA (photo_metadata_get_type ())
+#define PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_METADATA, PhotoMetadata))
+#define PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_METADATA, PhotoMetadataClass))
+#define IS_PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_METADATA))
+#define IS_PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_METADATA))
+#define PHOTO_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_METADATA, PhotoMetadataClass))
+
+typedef struct _PhotoMetadata PhotoMetadata;
+typedef struct _PhotoMetadataClass PhotoMetadataClass;
+
+#define TYPE_DIMENSIONS (dimensions_get_type ())
+typedef struct _Dimensions Dimensions;
+
+#define TYPE_PHOTO_FILE_ADAPTER (photo_file_adapter_get_type ())
+#define PHOTO_FILE_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter))
+#define PHOTO_FILE_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapterClass))
+#define IS_PHOTO_FILE_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_ADAPTER))
+#define IS_PHOTO_FILE_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_ADAPTER))
+#define PHOTO_FILE_ADAPTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapterClass))
+
+typedef struct _PhotoFileAdapter PhotoFileAdapter;
+typedef struct _PhotoFileAdapterClass PhotoFileAdapterClass;
+typedef struct _PhotoFileAdapterPrivate PhotoFileAdapterPrivate;
+
+#define TYPE_PHOTO_FILE_READER (photo_file_reader_get_type ())
+#define PHOTO_FILE_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_READER, PhotoFileReader))
+#define PHOTO_FILE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_READER, PhotoFileReaderClass))
+#define IS_PHOTO_FILE_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_READER))
+#define IS_PHOTO_FILE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_READER))
+#define PHOTO_FILE_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_READER, PhotoFileReaderClass))
+
+typedef struct _PhotoFileReader PhotoFileReader;
+typedef struct _PhotoFileReaderClass PhotoFileReaderClass;
+typedef struct _PhotoFileReaderPrivate PhotoFileReaderPrivate;
+
+#define TYPE_GDK_READER (gdk_reader_get_type ())
+#define GDK_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GDK_READER, GdkReader))
+#define GDK_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GDK_READER, GdkReaderClass))
+#define IS_GDK_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GDK_READER))
+#define IS_GDK_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GDK_READER))
+#define GDK_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GDK_READER, GdkReaderClass))
+
+typedef struct _GdkReader GdkReader;
+typedef struct _GdkReaderClass GdkReaderClass;
+typedef struct _GdkReaderPrivate GdkReaderPrivate;
+
+#define TYPE_PNG_READER (png_reader_get_type ())
+#define PNG_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PNG_READER, PngReader))
+#define PNG_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PNG_READER, PngReaderClass))
+#define IS_PNG_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PNG_READER))
+#define IS_PNG_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PNG_READER))
+#define PNG_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PNG_READER, PngReaderClass))
+
+typedef struct _PngReader PngReader;
+typedef struct _PngReaderClass PngReaderClass;
+typedef struct _PngReaderPrivate PngReaderPrivate;
+
+#define TYPE_SCALE_CONSTRAINT (scale_constraint_get_type ())
+#define _g_free0(var) (var = (g_free (var), NULL))
+
+#define TYPE_PHOTO_FILE_WRITER (photo_file_writer_get_type ())
+#define PHOTO_FILE_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_WRITER, PhotoFileWriter))
+#define PHOTO_FILE_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_WRITER, PhotoFileWriterClass))
+#define IS_PHOTO_FILE_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_WRITER))
+#define IS_PHOTO_FILE_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_WRITER))
+#define PHOTO_FILE_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_WRITER, PhotoFileWriterClass))
+
+typedef struct _PhotoFileWriter PhotoFileWriter;
+typedef struct _PhotoFileWriterClass PhotoFileWriterClass;
+typedef struct _PhotoFileWriterPrivate PhotoFileWriterPrivate;
+
+#define JPEG_TYPE_QUALITY (jpeg_quality_get_type ())
+
+#define TYPE_PNG_WRITER (png_writer_get_type ())
+#define PNG_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PNG_WRITER, PngWriter))
+#define PNG_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PNG_WRITER, PngWriterClass))
+#define IS_PNG_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PNG_WRITER))
+#define IS_PNG_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PNG_WRITER))
+#define PNG_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PNG_WRITER, PngWriterClass))
+
+typedef struct _PngWriter PngWriter;
+typedef struct _PngWriterClass PngWriterClass;
+typedef struct _PngWriterPrivate PngWriterPrivate;
+
+#define TYPE_PHOTO_FILE_METADATA_WRITER (photo_file_metadata_writer_get_type ())
+#define PHOTO_FILE_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriter))
+#define PHOTO_FILE_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriterClass))
+#define IS_PHOTO_FILE_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_METADATA_WRITER))
+#define IS_PHOTO_FILE_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_METADATA_WRITER))
+#define PHOTO_FILE_METADATA_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriterClass))
+
+typedef struct _PhotoFileMetadataWriter PhotoFileMetadataWriter;
+typedef struct _PhotoFileMetadataWriterClass PhotoFileMetadataWriterClass;
+typedef struct _PhotoFileMetadataWriterPrivate PhotoFileMetadataWriterPrivate;
+
+#define TYPE_PNG_METADATA_WRITER (png_metadata_writer_get_type ())
+#define PNG_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PNG_METADATA_WRITER, PngMetadataWriter))
+#define PNG_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PNG_METADATA_WRITER, PngMetadataWriterClass))
+#define IS_PNG_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PNG_METADATA_WRITER))
+#define IS_PNG_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PNG_METADATA_WRITER))
+#define PNG_METADATA_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PNG_METADATA_WRITER, PngMetadataWriterClass))
+
+typedef struct _PngMetadataWriter PngMetadataWriter;
+typedef struct _PngMetadataWriterClass PngMetadataWriterClass;
+typedef struct _PngMetadataWriterPrivate PngMetadataWriterPrivate;
+
+#define TYPE_PHOTO_FILE_FORMAT_DRIVER (photo_file_format_driver_get_type ())
+#define PHOTO_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriver))
+#define PHOTO_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriverClass))
+#define IS_PHOTO_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_FORMAT_DRIVER))
+#define IS_PHOTO_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_FORMAT_DRIVER))
+#define PHOTO_FILE_FORMAT_DRIVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriverClass))
+
+typedef struct _PhotoFileFormatDriver PhotoFileFormatDriver;
+typedef struct _PhotoFileFormatDriverClass PhotoFileFormatDriverClass;
+typedef struct _PhotoFileFormatDriverPrivate PhotoFileFormatDriverPrivate;
+
+#define TYPE_PNG_FILE_FORMAT_DRIVER (png_file_format_driver_get_type ())
+#define PNG_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PNG_FILE_FORMAT_DRIVER, PngFileFormatDriver))
+#define PNG_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PNG_FILE_FORMAT_DRIVER, PngFileFormatDriverClass))
+#define IS_PNG_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PNG_FILE_FORMAT_DRIVER))
+#define IS_PNG_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PNG_FILE_FORMAT_DRIVER))
+#define PNG_FILE_FORMAT_DRIVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PNG_FILE_FORMAT_DRIVER, PngFileFormatDriverClass))
+
+typedef struct _PngFileFormatDriver PngFileFormatDriver;
+typedef struct _PngFileFormatDriverClass PngFileFormatDriverClass;
+typedef struct _PngFileFormatDriverPrivate PngFileFormatDriverPrivate;
+#define _photo_file_format_driver_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_format_driver_unref (var), NULL)))
+
+typedef enum {
+ PHOTO_FILE_FORMAT_JFIF,
+ PHOTO_FILE_FORMAT_RAW,
+ PHOTO_FILE_FORMAT_PNG,
+ PHOTO_FILE_FORMAT_TIFF,
+ PHOTO_FILE_FORMAT_BMP,
+ PHOTO_FILE_FORMAT_UNKNOWN
+} PhotoFileFormat;
+
+typedef enum {
+ PHOTO_FILE_FORMAT_FLAGS_NONE = 0x00000000
+} PhotoFileFormatFlags;
+
+struct _PhotoFileFormatProperties {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileFormatPropertiesPrivate * priv;
+};
+
+struct _PhotoFileFormatPropertiesClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileFormatProperties *self);
+ PhotoFileFormat (*get_file_format) (PhotoFileFormatProperties* self);
+ PhotoFileFormatFlags (*get_flags) (PhotoFileFormatProperties* self);
+ gboolean (*is_recognized_extension) (PhotoFileFormatProperties* self, const gchar* ext);
+ gchar* (*get_default_extension) (PhotoFileFormatProperties* self);
+ gchar** (*get_known_extensions) (PhotoFileFormatProperties* self, int* result_length1);
+ gchar* (*get_default_mime_type) (PhotoFileFormatProperties* self);
+ gchar** (*get_mime_types) (PhotoFileFormatProperties* self, int* result_length1);
+ gchar* (*get_user_visible_name) (PhotoFileFormatProperties* self);
+};
+
+struct _PngFileFormatProperties {
+ PhotoFileFormatProperties parent_instance;
+ PngFileFormatPropertiesPrivate * priv;
+};
+
+struct _PngFileFormatPropertiesClass {
+ PhotoFileFormatPropertiesClass parent_class;
+};
+
+typedef enum {
+ PHOTO_FILE_SNIFFER_OPTIONS_GET_ALL = 0x00000000,
+ PHOTO_FILE_SNIFFER_OPTIONS_NO_MD5 = 0x00000001
+} PhotoFileSnifferOptions;
+
+struct _PhotoFileSniffer {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileSnifferPrivate * priv;
+ GFile* file;
+ PhotoFileSnifferOptions options;
+ gboolean calc_md5;
+};
+
+struct _PhotoFileSnifferClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileSniffer *self);
+ DetectedPhotoInformation* (*sniff) (PhotoFileSniffer* self, gboolean* is_corrupted, GError** error);
+};
+
+struct _GdkSniffer {
+ PhotoFileSniffer parent_instance;
+ GdkSnifferPrivate * priv;
+};
+
+struct _GdkSnifferClass {
+ PhotoFileSnifferClass parent_class;
+};
+
+struct _PngSniffer {
+ GdkSniffer parent_instance;
+ PngSnifferPrivate * priv;
+};
+
+struct _PngSnifferClass {
+ GdkSnifferClass parent_class;
+};
+
+struct _Dimensions {
+ gint width;
+ gint height;
+};
+
+struct _DetectedPhotoInformation {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ DetectedPhotoInformationPrivate * priv;
+ PhotoFileFormat file_format;
+ PhotoMetadata* metadata;
+ gchar* md5;
+ gchar* exif_md5;
+ gchar* thumbnail_md5;
+ gchar* format_name;
+ Dimensions image_dim;
+ GdkColorspace colorspace;
+ gint channels;
+ gint bits_per_channel;
+};
+
+struct _DetectedPhotoInformationClass {
+ GTypeClass parent_class;
+ void (*finalize) (DetectedPhotoInformation *self);
+};
+
+struct _PhotoFileAdapter {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileAdapterPrivate * priv;
+};
+
+struct _PhotoFileAdapterClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileAdapter *self);
+};
+
+struct _PhotoFileReader {
+ PhotoFileAdapter parent_instance;
+ PhotoFileReaderPrivate * priv;
+};
+
+struct _PhotoFileReaderClass {
+ PhotoFileAdapterClass parent_class;
+ PhotoMetadata* (*read_metadata) (PhotoFileReader* self, GError** error);
+ GdkPixbuf* (*unscaled_read) (PhotoFileReader* self, GError** error);
+ GdkPixbuf* (*scaled_read) (PhotoFileReader* self, Dimensions* full, Dimensions* scaled, GError** error);
+};
+
+struct _GdkReader {
+ PhotoFileReader parent_instance;
+ GdkReaderPrivate * priv;
+};
+
+struct _GdkReaderClass {
+ PhotoFileReaderClass parent_class;
+};
+
+struct _PngReader {
+ GdkReader parent_instance;
+ PngReaderPrivate * priv;
+};
+
+struct _PngReaderClass {
+ GdkReaderClass parent_class;
+};
+
+typedef enum {
+ SCALE_CONSTRAINT_ORIGINAL,
+ SCALE_CONSTRAINT_DIMENSIONS,
+ SCALE_CONSTRAINT_WIDTH,
+ SCALE_CONSTRAINT_HEIGHT,
+ SCALE_CONSTRAINT_FILL_VIEWPORT
+} ScaleConstraint;
+
+typedef enum {
+ JPEG_QUALITY_LOW = 50,
+ JPEG_QUALITY_MEDIUM = 75,
+ JPEG_QUALITY_HIGH = 90,
+ JPEG_QUALITY_MAXIMUM = 100
+} JpegQuality;
+
+struct _PhotoFileWriter {
+ PhotoFileAdapter parent_instance;
+ PhotoFileWriterPrivate * priv;
+};
+
+struct _PhotoFileWriterClass {
+ PhotoFileAdapterClass parent_class;
+ void (*write) (PhotoFileWriter* self, GdkPixbuf* pixbuf, JpegQuality quality, GError** error);
+};
+
+struct _PngWriter {
+ PhotoFileWriter parent_instance;
+ PngWriterPrivate * priv;
+};
+
+struct _PngWriterClass {
+ PhotoFileWriterClass parent_class;
+};
+
+struct _PhotoFileMetadataWriter {
+ PhotoFileAdapter parent_instance;
+ PhotoFileMetadataWriterPrivate * priv;
+};
+
+struct _PhotoFileMetadataWriterClass {
+ PhotoFileAdapterClass parent_class;
+ void (*write_metadata) (PhotoFileMetadataWriter* self, PhotoMetadata* metadata, GError** error);
+};
+
+struct _PngMetadataWriter {
+ PhotoFileMetadataWriter parent_instance;
+ PngMetadataWriterPrivate * priv;
+};
+
+struct _PngMetadataWriterClass {
+ PhotoFileMetadataWriterClass parent_class;
+};
+
+struct _PhotoFileFormatDriver {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileFormatDriverPrivate * priv;
+};
+
+struct _PhotoFileFormatDriverClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileFormatDriver *self);
+ PhotoFileFormatProperties* (*get_properties) (PhotoFileFormatDriver* self);
+ PhotoFileReader* (*create_reader) (PhotoFileFormatDriver* self, const gchar* filepath);
+ PhotoMetadata* (*create_metadata) (PhotoFileFormatDriver* self);
+ gboolean (*can_write_image) (PhotoFileFormatDriver* self);
+ gboolean (*can_write_metadata) (PhotoFileFormatDriver* self);
+ PhotoFileWriter* (*create_writer) (PhotoFileFormatDriver* self, const gchar* filepath);
+ PhotoFileMetadataWriter* (*create_metadata_writer) (PhotoFileFormatDriver* self, const gchar* filepath);
+ PhotoFileSniffer* (*create_sniffer) (PhotoFileFormatDriver* self, GFile* file, PhotoFileSnifferOptions options);
+};
+
+struct _PngFileFormatDriver {
+ PhotoFileFormatDriver parent_instance;
+ PngFileFormatDriverPrivate * priv;
+};
+
+struct _PngFileFormatDriverClass {
+ PhotoFileFormatDriverClass parent_class;
+};
+
+
+static gpointer png_file_format_properties_parent_class = NULL;
+static gchar** png_file_format_properties_KNOWN_EXTENSIONS;
+static gint png_file_format_properties_KNOWN_EXTENSIONS_length1;
+static gchar** png_file_format_properties_KNOWN_EXTENSIONS = NULL;
+static gint png_file_format_properties_KNOWN_EXTENSIONS_length1 = 0;
+static gint _png_file_format_properties_KNOWN_EXTENSIONS_size_ = 0;
+static gchar** png_file_format_properties_KNOWN_MIME_TYPES;
+static gint png_file_format_properties_KNOWN_MIME_TYPES_length1;
+static gchar** png_file_format_properties_KNOWN_MIME_TYPES = NULL;
+static gint png_file_format_properties_KNOWN_MIME_TYPES_length1 = 0;
+static gint _png_file_format_properties_KNOWN_MIME_TYPES_size_ = 0;
+static PngFileFormatProperties* png_file_format_properties_instance;
+static PngFileFormatProperties* png_file_format_properties_instance = NULL;
+static gpointer png_sniffer_parent_class = NULL;
+static gpointer png_reader_parent_class = NULL;
+static gpointer png_writer_parent_class = NULL;
+static gpointer png_metadata_writer_parent_class = NULL;
+static gpointer png_file_format_driver_parent_class = NULL;
+static PngFileFormatDriver* png_file_format_driver_instance;
+static PngFileFormatDriver* png_file_format_driver_instance = NULL;
+
+gpointer photo_file_format_properties_ref (gpointer instance);
+void photo_file_format_properties_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_format_properties (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_format_properties (GValue* value, gpointer v_object);
+void value_take_photo_file_format_properties (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_format_properties (const GValue* value);
+GType photo_file_format_properties_get_type (void) G_GNUC_CONST;
+GType photo_file_format_get_type (void) G_GNUC_CONST;
+GType photo_file_format_flags_get_type (void) G_GNUC_CONST;
+GType png_file_format_properties_get_type (void) G_GNUC_CONST;
+enum {
+ PNG_FILE_FORMAT_PROPERTIES_DUMMY_PROPERTY
+};
+void png_file_format_properties_init (void);
+PngFileFormatProperties* png_file_format_properties_new (void);
+PngFileFormatProperties* png_file_format_properties_construct (GType object_type);
+PngFileFormatProperties* png_file_format_properties_get_instance (void);
+static PhotoFileFormat png_file_format_properties_real_get_file_format (PhotoFileFormatProperties* base);
+static PhotoFileFormatFlags png_file_format_properties_real_get_flags (PhotoFileFormatProperties* base);
+static gchar* png_file_format_properties_real_get_user_visible_name (PhotoFileFormatProperties* base);
+static gchar* png_file_format_properties_real_get_default_extension (PhotoFileFormatProperties* base);
+static gchar** png_file_format_properties_real_get_known_extensions (PhotoFileFormatProperties* base, int* result_length1);
+static gchar** _vala_array_dup14 (gchar** self, int length);
+static gchar* png_file_format_properties_real_get_default_mime_type (PhotoFileFormatProperties* base);
+static gchar** png_file_format_properties_real_get_mime_types (PhotoFileFormatProperties* base, int* result_length1);
+static gchar** _vala_array_dup15 (gchar** self, int length);
+PhotoFileFormatProperties* photo_file_format_properties_construct (GType object_type);
+static void png_file_format_properties_finalize (PhotoFileFormatProperties* obj);
+gpointer photo_file_sniffer_ref (gpointer instance);
+void photo_file_sniffer_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_sniffer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_sniffer (GValue* value, gpointer v_object);
+void value_take_photo_file_sniffer (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_sniffer (const GValue* value);
+GType photo_file_sniffer_get_type (void) G_GNUC_CONST;
+gpointer detected_photo_information_ref (gpointer instance);
+void detected_photo_information_unref (gpointer instance);
+GParamSpec* param_spec_detected_photo_information (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_detected_photo_information (GValue* value, gpointer v_object);
+void value_take_detected_photo_information (GValue* value, gpointer v_object);
+gpointer value_get_detected_photo_information (const GValue* value);
+GType detected_photo_information_get_type (void) G_GNUC_CONST;
+GType photo_file_sniffer_options_get_type (void) G_GNUC_CONST;
+GType gdk_sniffer_get_type (void) G_GNUC_CONST;
+GType png_sniffer_get_type (void) G_GNUC_CONST;
+enum {
+ PNG_SNIFFER_DUMMY_PROPERTY
+};
+PngSniffer* png_sniffer_new (GFile* file, PhotoFileSnifferOptions options);
+PngSniffer* png_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options);
+GdkSniffer* gdk_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options);
+static gboolean png_sniffer_is_png_file (GFile* file, GError** error);
+static DetectedPhotoInformation* png_sniffer_real_sniff (PhotoFileSniffer* base, gboolean* is_corrupted, GError** error);
+DetectedPhotoInformation* photo_file_sniffer_sniff (PhotoFileSniffer* self, gboolean* is_corrupted, GError** error);
+gpointer media_metadata_ref (gpointer instance);
+void media_metadata_unref (gpointer instance);
+GParamSpec* param_spec_media_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_media_metadata (GValue* value, gpointer v_object);
+void value_take_media_metadata (GValue* value, gpointer v_object);
+gpointer value_get_media_metadata (const GValue* value);
+GType media_metadata_get_type (void) G_GNUC_CONST;
+GType photo_metadata_get_type (void) G_GNUC_CONST;
+GType dimensions_get_type (void) G_GNUC_CONST;
+Dimensions* dimensions_dup (const Dimensions* self);
+void dimensions_free (Dimensions* self);
+gpointer photo_file_adapter_ref (gpointer instance);
+void photo_file_adapter_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_adapter (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_adapter (GValue* value, gpointer v_object);
+void value_take_photo_file_adapter (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_adapter (const GValue* value);
+GType photo_file_adapter_get_type (void) G_GNUC_CONST;
+GType photo_file_reader_get_type (void) G_GNUC_CONST;
+GType gdk_reader_get_type (void) G_GNUC_CONST;
+GType png_reader_get_type (void) G_GNUC_CONST;
+enum {
+ PNG_READER_DUMMY_PROPERTY
+};
+PngReader* png_reader_new (const gchar* filepath);
+PngReader* png_reader_construct (GType object_type, const gchar* filepath);
+GdkReader* gdk_reader_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
+static GdkPixbuf* png_reader_real_scaled_read (PhotoFileReader* base, Dimensions* full, Dimensions* scaled, GError** error);
+GType scale_constraint_get_type (void) G_GNUC_CONST;
+void dimensions_get_scaled_by_constraint (Dimensions *self, gint scale, ScaleConstraint constraint, Dimensions* result);
+gchar* photo_file_adapter_get_filepath (PhotoFileAdapter* self);
+GType photo_file_writer_get_type (void) G_GNUC_CONST;
+GType jpeg_quality_get_type (void) G_GNUC_CONST;
+GType png_writer_get_type (void) G_GNUC_CONST;
+enum {
+ PNG_WRITER_DUMMY_PROPERTY
+};
+PngWriter* png_writer_new (const gchar* filepath);
+PngWriter* png_writer_construct (GType object_type, const gchar* filepath);
+PhotoFileWriter* photo_file_writer_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
+static void png_writer_real_write (PhotoFileWriter* base, GdkPixbuf* pixbuf, JpegQuality quality, GError** error);
+GType photo_file_metadata_writer_get_type (void) G_GNUC_CONST;
+GType png_metadata_writer_get_type (void) G_GNUC_CONST;
+enum {
+ PNG_METADATA_WRITER_DUMMY_PROPERTY
+};
+PngMetadataWriter* png_metadata_writer_new (const gchar* filepath);
+PngMetadataWriter* png_metadata_writer_construct (GType object_type, const gchar* filepath);
+PhotoFileMetadataWriter* photo_file_metadata_writer_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
+static void png_metadata_writer_real_write_metadata (PhotoFileMetadataWriter* base, PhotoMetadata* metadata, GError** error);
+void photo_metadata_write_to_file (PhotoMetadata* self, GFile* file, GError** error);
+GFile* photo_file_adapter_get_file (PhotoFileAdapter* self);
+gpointer photo_file_format_driver_ref (gpointer instance);
+void photo_file_format_driver_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_format_driver (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_format_driver (GValue* value, gpointer v_object);
+void value_take_photo_file_format_driver (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_format_driver (const GValue* value);
+GType photo_file_format_driver_get_type (void) G_GNUC_CONST;
+GType png_file_format_driver_get_type (void) G_GNUC_CONST;
+enum {
+ PNG_FILE_FORMAT_DRIVER_DUMMY_PROPERTY
+};
+void png_file_format_driver_init (void);
+PngFileFormatDriver* png_file_format_driver_new (void);
+PngFileFormatDriver* png_file_format_driver_construct (GType object_type);
+PngFileFormatDriver* png_file_format_driver_get_instance (void);
+static PhotoFileFormatProperties* png_file_format_driver_real_get_properties (PhotoFileFormatDriver* base);
+static PhotoFileReader* png_file_format_driver_real_create_reader (PhotoFileFormatDriver* base, const gchar* filepath);
+static gboolean png_file_format_driver_real_can_write_image (PhotoFileFormatDriver* base);
+static gboolean png_file_format_driver_real_can_write_metadata (PhotoFileFormatDriver* base);
+static PhotoFileWriter* png_file_format_driver_real_create_writer (PhotoFileFormatDriver* base, const gchar* filepath);
+static PhotoFileMetadataWriter* png_file_format_driver_real_create_metadata_writer (PhotoFileFormatDriver* base, const gchar* filepath);
+static PhotoFileSniffer* png_file_format_driver_real_create_sniffer (PhotoFileFormatDriver* base, GFile* file, PhotoFileSnifferOptions options);
+static PhotoMetadata* png_file_format_driver_real_create_metadata (PhotoFileFormatDriver* base);
+PhotoMetadata* photo_metadata_new (void);
+PhotoMetadata* photo_metadata_construct (GType object_type);
+PhotoFileFormatDriver* photo_file_format_driver_construct (GType object_type);
+static void png_file_format_driver_finalize (PhotoFileFormatDriver* obj);
+
+static const guint8 PNG_SNIFFER_MAGIC_SEQUENCE[8] = {(guint8) 137, (guint8) 80, (guint8) 78, (guint8) 71, (guint8) 13, (guint8) 10, (guint8) 26, (guint8) 10};
+
+void png_file_format_properties_init (void) {
+ PngFileFormatProperties* _tmp0_ = NULL;
+#line 14 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = png_file_format_properties_new ();
+#line 14 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _photo_file_format_properties_unref0 (png_file_format_properties_instance);
+#line 14 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ png_file_format_properties_instance = _tmp0_;
+#line 627 "PngSupport.c"
+}
+
+
+static gpointer _photo_file_format_properties_ref0 (gpointer self) {
+#line 18 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return self ? photo_file_format_properties_ref (self) : NULL;
+#line 634 "PngSupport.c"
+}
+
+
+PngFileFormatProperties* png_file_format_properties_get_instance (void) {
+ PngFileFormatProperties* result = NULL;
+ PngFileFormatProperties* _tmp0_ = NULL;
+ PngFileFormatProperties* _tmp1_ = NULL;
+#line 18 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = png_file_format_properties_instance;
+#line 18 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1_ = _photo_file_format_properties_ref0 (_tmp0_);
+#line 18 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = _tmp1_;
+#line 18 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 650 "PngSupport.c"
+}
+
+
+static PhotoFileFormat png_file_format_properties_real_get_file_format (PhotoFileFormatProperties* base) {
+ PngFileFormatProperties * self;
+ PhotoFileFormat result = 0;
+#line 21 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_FILE_FORMAT_PROPERTIES, PngFileFormatProperties);
+#line 22 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = PHOTO_FILE_FORMAT_PNG;
+#line 22 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 663 "PngSupport.c"
+}
+
+
+static PhotoFileFormatFlags png_file_format_properties_real_get_flags (PhotoFileFormatProperties* base) {
+ PngFileFormatProperties * self;
+ PhotoFileFormatFlags result = 0;
+#line 25 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_FILE_FORMAT_PROPERTIES, PngFileFormatProperties);
+#line 26 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = PHOTO_FILE_FORMAT_FLAGS_NONE;
+#line 26 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 676 "PngSupport.c"
+}
+
+
+static gchar* png_file_format_properties_real_get_user_visible_name (PhotoFileFormatProperties* base) {
+ PngFileFormatProperties * self;
+ gchar* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+#line 29 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_FILE_FORMAT_PROPERTIES, PngFileFormatProperties);
+#line 30 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = _ ("PNG");
+#line 30 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 30 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = _tmp1_;
+#line 30 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 695 "PngSupport.c"
+}
+
+
+static gchar* png_file_format_properties_real_get_default_extension (PhotoFileFormatProperties* base) {
+ PngFileFormatProperties * self;
+ gchar* result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+#line 33 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_FILE_FORMAT_PROPERTIES, PngFileFormatProperties);
+#line 34 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = png_file_format_properties_KNOWN_EXTENSIONS;
+#line 34 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0__length1 = png_file_format_properties_KNOWN_EXTENSIONS_length1;
+#line 34 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1_ = _tmp0_[0];
+#line 34 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp2_ = g_strdup (_tmp1_);
+#line 34 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = _tmp2_;
+#line 34 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 720 "PngSupport.c"
+}
+
+
+static gchar** _vala_array_dup14 (gchar** self, int length) {
+ gchar** result;
+ int i;
+#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = g_new0 (gchar*, length + 1);
+#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ for (i = 0; i < length; i++) {
+#line 731 "PngSupport.c"
+ gchar* _tmp0_ = NULL;
+#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = g_strdup (self[i]);
+#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result[i] = _tmp0_;
+#line 737 "PngSupport.c"
+ }
+#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 741 "PngSupport.c"
+}
+
+
+static gchar** png_file_format_properties_real_get_known_extensions (PhotoFileFormatProperties* base, int* result_length1) {
+ PngFileFormatProperties * self;
+ gchar** result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ gchar** _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+ gchar** _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+#line 37 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_FILE_FORMAT_PROPERTIES, PngFileFormatProperties);
+#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = png_file_format_properties_KNOWN_EXTENSIONS;
+#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0__length1 = png_file_format_properties_KNOWN_EXTENSIONS_length1;
+#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup14 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
+#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1__length1 = _tmp0__length1;
+#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp2__length1 = _tmp1__length1;
+#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (result_length1) {
+#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ *result_length1 = _tmp2__length1;
+#line 772 "PngSupport.c"
+ }
+#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = _tmp2_;
+#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 778 "PngSupport.c"
+}
+
+
+static gchar* png_file_format_properties_real_get_default_mime_type (PhotoFileFormatProperties* base) {
+ PngFileFormatProperties * self;
+ gchar* result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+#line 41 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_FILE_FORMAT_PROPERTIES, PngFileFormatProperties);
+#line 42 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = png_file_format_properties_KNOWN_MIME_TYPES;
+#line 42 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0__length1 = png_file_format_properties_KNOWN_MIME_TYPES_length1;
+#line 42 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1_ = _tmp0_[0];
+#line 42 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp2_ = g_strdup (_tmp1_);
+#line 42 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = _tmp2_;
+#line 42 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 803 "PngSupport.c"
+}
+
+
+static gchar** _vala_array_dup15 (gchar** self, int length) {
+ gchar** result;
+ int i;
+#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = g_new0 (gchar*, length + 1);
+#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ for (i = 0; i < length; i++) {
+#line 814 "PngSupport.c"
+ gchar* _tmp0_ = NULL;
+#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = g_strdup (self[i]);
+#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result[i] = _tmp0_;
+#line 820 "PngSupport.c"
+ }
+#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 824 "PngSupport.c"
+}
+
+
+static gchar** png_file_format_properties_real_get_mime_types (PhotoFileFormatProperties* base, int* result_length1) {
+ PngFileFormatProperties * self;
+ gchar** result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ gchar** _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+ gchar** _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+#line 45 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_FILE_FORMAT_PROPERTIES, PngFileFormatProperties);
+#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = png_file_format_properties_KNOWN_MIME_TYPES;
+#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0__length1 = png_file_format_properties_KNOWN_MIME_TYPES_length1;
+#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup15 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
+#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1__length1 = _tmp0__length1;
+#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp2__length1 = _tmp1__length1;
+#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (result_length1) {
+#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ *result_length1 = _tmp2__length1;
+#line 855 "PngSupport.c"
+ }
+#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = _tmp2_;
+#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 861 "PngSupport.c"
+}
+
+
+PngFileFormatProperties* png_file_format_properties_construct (GType object_type) {
+ PngFileFormatProperties* self = NULL;
+#line 7 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = (PngFileFormatProperties*) photo_file_format_properties_construct (object_type);
+#line 7 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return self;
+#line 871 "PngSupport.c"
+}
+
+
+PngFileFormatProperties* png_file_format_properties_new (void) {
+#line 7 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return png_file_format_properties_construct (TYPE_PNG_FILE_FORMAT_PROPERTIES);
+#line 878 "PngSupport.c"
+}
+
+
+static void png_file_format_properties_class_init (PngFileFormatPropertiesClass * klass) {
+ gchar* _tmp0_ = NULL;
+ gchar** _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar** _tmp3_ = NULL;
+#line 7 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ png_file_format_properties_parent_class = g_type_class_peek_parent (klass);
+#line 7 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->finalize = png_file_format_properties_finalize;
+#line 7 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_file_format = png_file_format_properties_real_get_file_format;
+#line 7 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_flags = png_file_format_properties_real_get_flags;
+#line 7 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_user_visible_name = png_file_format_properties_real_get_user_visible_name;
+#line 7 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_default_extension = png_file_format_properties_real_get_default_extension;
+#line 7 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_known_extensions = png_file_format_properties_real_get_known_extensions;
+#line 7 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_default_mime_type = png_file_format_properties_real_get_default_mime_type;
+#line 7 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_mime_types = png_file_format_properties_real_get_mime_types;
+#line 8 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = g_strdup ("png");
+#line 8 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1_ = g_new0 (gchar*, 1 + 1);
+#line 8 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1_[0] = _tmp0_;
+#line 8 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ png_file_format_properties_KNOWN_EXTENSIONS = _tmp1_;
+#line 8 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ png_file_format_properties_KNOWN_EXTENSIONS_length1 = 1;
+#line 9 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp2_ = g_strdup ("image/png");
+#line 9 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp3_ = g_new0 (gchar*, 1 + 1);
+#line 9 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp3_[0] = _tmp2_;
+#line 9 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ png_file_format_properties_KNOWN_MIME_TYPES = _tmp3_;
+#line 9 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ png_file_format_properties_KNOWN_MIME_TYPES_length1 = 1;
+#line 925 "PngSupport.c"
+}
+
+
+static void png_file_format_properties_instance_init (PngFileFormatProperties * self) {
+}
+
+
+static void png_file_format_properties_finalize (PhotoFileFormatProperties* obj) {
+ PngFileFormatProperties * self;
+#line 7 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PNG_FILE_FORMAT_PROPERTIES, PngFileFormatProperties);
+#line 7 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ PHOTO_FILE_FORMAT_PROPERTIES_CLASS (png_file_format_properties_parent_class)->finalize (obj);
+#line 939 "PngSupport.c"
+}
+
+
+GType png_file_format_properties_get_type (void) {
+ static volatile gsize png_file_format_properties_type_id__volatile = 0;
+ if (g_once_init_enter (&png_file_format_properties_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PngFileFormatPropertiesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) png_file_format_properties_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PngFileFormatProperties), 0, (GInstanceInitFunc) png_file_format_properties_instance_init, NULL };
+ GType png_file_format_properties_type_id;
+ png_file_format_properties_type_id = g_type_register_static (TYPE_PHOTO_FILE_FORMAT_PROPERTIES, "PngFileFormatProperties", &g_define_type_info, 0);
+ g_once_init_leave (&png_file_format_properties_type_id__volatile, png_file_format_properties_type_id);
+ }
+ return png_file_format_properties_type_id__volatile;
+}
+
+
+PngSniffer* png_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options) {
+ PngSniffer* self = NULL;
+ GFile* _tmp0_ = NULL;
+ PhotoFileSnifferOptions _tmp1_ = 0;
+#line 53 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_return_val_if_fail (G_IS_FILE (file), NULL);
+#line 54 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = file;
+#line 54 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1_ = options;
+#line 54 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = (PngSniffer*) gdk_sniffer_construct (object_type, _tmp0_, _tmp1_);
+#line 53 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return self;
+#line 969 "PngSupport.c"
+}
+
+
+PngSniffer* png_sniffer_new (GFile* file, PhotoFileSnifferOptions options) {
+#line 53 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return png_sniffer_construct (TYPE_PNG_SNIFFER, file, options);
+#line 976 "PngSupport.c"
+}
+
+
+static gboolean png_sniffer_is_png_file (GFile* file, GError** error) {
+ gboolean result = FALSE;
+ GFileInputStream* instream = NULL;
+ GFile* _tmp0_ = NULL;
+ GFileInputStream* _tmp1_ = NULL;
+ guint8* file_lead_sequence = NULL;
+ guint8* _tmp2_ = NULL;
+ gint file_lead_sequence_length1 = 0;
+ gint _file_lead_sequence_size_ = 0;
+ GFileInputStream* _tmp3_ = NULL;
+ guint8* _tmp4_ = NULL;
+ gint _tmp4__length1 = 0;
+ GError * _inner_error_ = NULL;
+#line 57 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_return_val_if_fail (G_IS_FILE (file), FALSE);
+#line 58 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = file;
+#line 58 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1_ = g_file_read (_tmp0_, NULL, &_inner_error_);
+#line 58 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ instream = _tmp1_;
+#line 58 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 58 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 58 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return FALSE;
+#line 1007 "PngSupport.c"
+ }
+#line 60 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp2_ = g_new0 (guint8, G_N_ELEMENTS (PNG_SNIFFER_MAGIC_SEQUENCE));
+#line 60 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ file_lead_sequence = _tmp2_;
+#line 60 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ file_lead_sequence_length1 = G_N_ELEMENTS (PNG_SNIFFER_MAGIC_SEQUENCE);
+#line 60 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _file_lead_sequence_size_ = file_lead_sequence_length1;
+#line 62 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp3_ = instream;
+#line 62 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp4_ = file_lead_sequence;
+#line 62 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp4__length1 = file_lead_sequence_length1;
+#line 62 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_input_stream_read (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, G_TYPE_INPUT_STREAM, GInputStream), _tmp4_, (gsize) _tmp4__length1, NULL, &_inner_error_);
+#line 62 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 62 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 62 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ file_lead_sequence = (g_free (file_lead_sequence), NULL);
+#line 62 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _g_object_unref0 (instream);
+#line 62 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return FALSE;
+#line 1035 "PngSupport.c"
+ }
+ {
+ gint i = 0;
+#line 64 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ i = 0;
+#line 1041 "PngSupport.c"
+ {
+ gboolean _tmp5_ = FALSE;
+#line 64 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp5_ = TRUE;
+#line 64 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ while (TRUE) {
+#line 1048 "PngSupport.c"
+ gint _tmp7_ = 0;
+ guint8* _tmp8_ = NULL;
+ gint _tmp8__length1 = 0;
+ gint _tmp9_ = 0;
+ guint8 _tmp10_ = 0U;
+ gint _tmp11_ = 0;
+ guint8 _tmp12_ = 0U;
+#line 64 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (!_tmp5_) {
+#line 1058 "PngSupport.c"
+ gint _tmp6_ = 0;
+#line 64 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp6_ = i;
+#line 64 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ i = _tmp6_ + 1;
+#line 1064 "PngSupport.c"
+ }
+#line 64 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp5_ = FALSE;
+#line 64 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp7_ = i;
+#line 64 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (!(_tmp7_ < G_N_ELEMENTS (PNG_SNIFFER_MAGIC_SEQUENCE))) {
+#line 64 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ break;
+#line 1074 "PngSupport.c"
+ }
+#line 65 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp8_ = file_lead_sequence;
+#line 65 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp8__length1 = file_lead_sequence_length1;
+#line 65 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp9_ = i;
+#line 65 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp10_ = _tmp8_[_tmp9_];
+#line 65 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp11_ = i;
+#line 65 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp12_ = PNG_SNIFFER_MAGIC_SEQUENCE[_tmp11_];
+#line 65 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (_tmp10_ != _tmp12_) {
+#line 66 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = FALSE;
+#line 66 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ file_lead_sequence = (g_free (file_lead_sequence), NULL);
+#line 66 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _g_object_unref0 (instream);
+#line 66 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 1098 "PngSupport.c"
+ }
+ }
+ }
+ }
+#line 69 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = TRUE;
+#line 69 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ file_lead_sequence = (g_free (file_lead_sequence), NULL);
+#line 69 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _g_object_unref0 (instream);
+#line 69 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 1111 "PngSupport.c"
+}
+
+
+static gpointer _detected_photo_information_ref0 (gpointer self) {
+#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return self ? detected_photo_information_ref (self) : NULL;
+#line 1118 "PngSupport.c"
+}
+
+
+static DetectedPhotoInformation* png_sniffer_real_sniff (PhotoFileSniffer* base, gboolean* is_corrupted, GError** error) {
+ PngSniffer * self;
+ gboolean _vala_is_corrupted = FALSE;
+ DetectedPhotoInformation* result = NULL;
+ gboolean _tmp0_ = FALSE;
+ GFile* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+ DetectedPhotoInformation* detected = NULL;
+ gboolean _tmp3_ = FALSE;
+ DetectedPhotoInformation* _tmp4_ = NULL;
+ DetectedPhotoInformation* _tmp5_ = NULL;
+ DetectedPhotoInformation* _tmp6_ = NULL;
+ DetectedPhotoInformation* _tmp7_ = NULL;
+ PhotoFileFormat _tmp8_ = 0;
+ DetectedPhotoInformation* _tmp10_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 72 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_SNIFFER, PngSniffer);
+#line 74 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _vala_is_corrupted = FALSE;
+#line 76 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer)->file;
+#line 76 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp2_ = png_sniffer_is_png_file (_tmp1_, &_inner_error_);
+#line 76 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = _tmp2_;
+#line 76 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 76 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 76 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return NULL;
+#line 1154 "PngSupport.c"
+ }
+#line 76 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (!_tmp0_) {
+#line 77 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = NULL;
+#line 77 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (is_corrupted) {
+#line 77 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ *is_corrupted = _vala_is_corrupted;
+#line 1164 "PngSupport.c"
+ }
+#line 77 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 1168 "PngSupport.c"
+ }
+#line 79 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp4_ = PHOTO_FILE_SNIFFER_CLASS (png_sniffer_parent_class)->sniff (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_GDK_SNIFFER, GdkSniffer), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer), &_tmp3_, &_inner_error_);
+#line 79 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _vala_is_corrupted = _tmp3_;
+#line 79 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ detected = _tmp4_;
+#line 79 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 79 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 79 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return NULL;
+#line 1182 "PngSupport.c"
+ }
+#line 80 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp5_ = detected;
+#line 80 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (_tmp5_ == NULL) {
+#line 81 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = NULL;
+#line 81 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _detected_photo_information_unref0 (detected);
+#line 81 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (is_corrupted) {
+#line 81 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ *is_corrupted = _vala_is_corrupted;
+#line 1196 "PngSupport.c"
+ }
+#line 81 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 1200 "PngSupport.c"
+ }
+#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp7_ = detected;
+#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp8_ = _tmp7_->file_format;
+#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (_tmp8_ == PHOTO_FILE_FORMAT_PNG) {
+#line 1208 "PngSupport.c"
+ DetectedPhotoInformation* _tmp9_ = NULL;
+#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp9_ = detected;
+#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp6_ = _tmp9_;
+#line 1214 "PngSupport.c"
+ } else {
+#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp6_ = NULL;
+#line 1218 "PngSupport.c"
+ }
+#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp10_ = _detected_photo_information_ref0 (_tmp6_);
+#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = _tmp10_;
+#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _detected_photo_information_unref0 (detected);
+#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (is_corrupted) {
+#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ *is_corrupted = _vala_is_corrupted;
+#line 1230 "PngSupport.c"
+ }
+#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 1234 "PngSupport.c"
+}
+
+
+static void png_sniffer_class_init (PngSnifferClass * klass) {
+#line 50 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ png_sniffer_parent_class = g_type_class_peek_parent (klass);
+#line 50 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileSnifferClass *) klass)->sniff = png_sniffer_real_sniff;
+#line 1243 "PngSupport.c"
+}
+
+
+static void png_sniffer_instance_init (PngSniffer * self) {
+}
+
+
+GType png_sniffer_get_type (void) {
+ static volatile gsize png_sniffer_type_id__volatile = 0;
+ if (g_once_init_enter (&png_sniffer_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PngSnifferClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) png_sniffer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PngSniffer), 0, (GInstanceInitFunc) png_sniffer_instance_init, NULL };
+ GType png_sniffer_type_id;
+ png_sniffer_type_id = g_type_register_static (TYPE_GDK_SNIFFER, "PngSniffer", &g_define_type_info, 0);
+ g_once_init_leave (&png_sniffer_type_id__volatile, png_sniffer_type_id);
+ }
+ return png_sniffer_type_id__volatile;
+}
+
+
+PngReader* png_reader_construct (GType object_type, const gchar* filepath) {
+ PngReader* self = NULL;
+ const gchar* _tmp0_ = NULL;
+#line 88 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 89 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = filepath;
+#line 89 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = (PngReader*) gdk_reader_construct (object_type, _tmp0_, PHOTO_FILE_FORMAT_PNG);
+#line 88 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return self;
+#line 1274 "PngSupport.c"
+}
+
+
+PngReader* png_reader_new (const gchar* filepath) {
+#line 88 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return png_reader_construct (TYPE_PNG_READER, filepath);
+#line 1281 "PngSupport.c"
+}
+
+
+static GdkPixbuf* png_reader_real_scaled_read (PhotoFileReader* base, Dimensions* full, Dimensions* scaled, GError** error) {
+ PngReader * self;
+ GdkPixbuf* result = NULL;
+ GdkPixbuf* _result_ = NULL;
+ gboolean _tmp0_ = FALSE;
+ gboolean _tmp1_ = FALSE;
+ Dimensions _tmp2_ = {0};
+ gint _tmp3_ = 0;
+ GError * _inner_error_ = NULL;
+#line 92 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_READER, PngReader);
+#line 92 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_return_val_if_fail (full != NULL, NULL);
+#line 92 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_return_val_if_fail (scaled != NULL, NULL);
+#line 93 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _result_ = NULL;
+#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp2_ = *full;
+#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp3_ = _tmp2_.width;
+#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (_tmp3_ > 9999) {
+#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1_ = TRUE;
+#line 1310 "PngSupport.c"
+ } else {
+ Dimensions _tmp4_ = {0};
+ gint _tmp5_ = 0;
+#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp4_ = *full;
+#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp5_ = _tmp4_.height;
+#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1_ = _tmp5_ > 9999;
+#line 1320 "PngSupport.c"
+ }
+#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (_tmp1_) {
+#line 1324 "PngSupport.c"
+ gboolean _tmp6_ = FALSE;
+ Dimensions _tmp7_ = {0};
+ gint _tmp8_ = 0;
+#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp7_ = *scaled;
+#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp8_ = _tmp7_.width;
+#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (_tmp8_ < 100) {
+#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp6_ = TRUE;
+#line 1336 "PngSupport.c"
+ } else {
+ Dimensions _tmp9_ = {0};
+ gint _tmp10_ = 0;
+#line 103 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp9_ = *scaled;
+#line 103 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp10_ = _tmp9_.height;
+#line 103 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp6_ = _tmp10_ < 100;
+#line 1346 "PngSupport.c"
+ }
+#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = _tmp6_;
+#line 1350 "PngSupport.c"
+ } else {
+#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = FALSE;
+#line 1354 "PngSupport.c"
+ }
+#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (_tmp0_) {
+#line 1358 "PngSupport.c"
+ Dimensions prefetch_dimensions = {0};
+ Dimensions _tmp11_ = {0};
+ GdkPixbuf* _tmp12_ = NULL;
+ gchar* _tmp13_ = NULL;
+ gchar* _tmp14_ = NULL;
+ Dimensions _tmp15_ = {0};
+ gint _tmp16_ = 0;
+ Dimensions _tmp17_ = {0};
+ gint _tmp18_ = 0;
+ GdkPixbuf* _tmp19_ = NULL;
+ GdkPixbuf* _tmp20_ = NULL;
+ GdkPixbuf* _tmp21_ = NULL;
+ GdkPixbuf* _tmp22_ = NULL;
+ Dimensions _tmp23_ = {0};
+ gint _tmp24_ = 0;
+ Dimensions _tmp25_ = {0};
+ gint _tmp26_ = 0;
+ GdkPixbuf* _tmp27_ = NULL;
+#line 104 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ dimensions_get_scaled_by_constraint (full, 1000, SCALE_CONSTRAINT_DIMENSIONS, &_tmp11_);
+#line 104 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ prefetch_dimensions = _tmp11_;
+#line 107 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp13_ = photo_file_adapter_get_filepath (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 107 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp14_ = _tmp13_;
+#line 107 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp15_ = prefetch_dimensions;
+#line 107 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp16_ = _tmp15_.width;
+#line 107 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp17_ = prefetch_dimensions;
+#line 107 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp18_ = _tmp17_.height;
+#line 107 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp19_ = gdk_pixbuf_new_from_file_at_scale (_tmp14_, _tmp16_, _tmp18_, FALSE, &_inner_error_);
+#line 107 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp20_ = _tmp19_;
+#line 107 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _g_free0 (_tmp14_);
+#line 107 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp12_ = _tmp20_;
+#line 107 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 107 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 107 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _g_object_unref0 (_result_);
+#line 107 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return NULL;
+#line 1409 "PngSupport.c"
+ }
+#line 107 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp21_ = _tmp12_;
+#line 107 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp12_ = NULL;
+#line 107 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _g_object_unref0 (_result_);
+#line 107 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _result_ = _tmp21_;
+#line 110 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp22_ = _result_;
+#line 110 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp23_ = *scaled;
+#line 110 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp24_ = _tmp23_.width;
+#line 110 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp25_ = *scaled;
+#line 110 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp26_ = _tmp25_.height;
+#line 110 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp27_ = gdk_pixbuf_scale_simple (_tmp22_, _tmp24_, _tmp26_, GDK_INTERP_HYPER);
+#line 110 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _g_object_unref0 (_result_);
+#line 110 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _result_ = _tmp27_;
+#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _g_object_unref0 (_tmp12_);
+#line 1437 "PngSupport.c"
+ } else {
+ GdkPixbuf* _tmp28_ = NULL;
+ gchar* _tmp29_ = NULL;
+ gchar* _tmp30_ = NULL;
+ Dimensions _tmp31_ = {0};
+ gint _tmp32_ = 0;
+ Dimensions _tmp33_ = {0};
+ gint _tmp34_ = 0;
+ GdkPixbuf* _tmp35_ = NULL;
+ GdkPixbuf* _tmp36_ = NULL;
+ GdkPixbuf* _tmp37_ = NULL;
+#line 112 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp29_ = photo_file_adapter_get_filepath (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 112 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp30_ = _tmp29_;
+#line 112 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp31_ = *scaled;
+#line 112 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp32_ = _tmp31_.width;
+#line 112 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp33_ = *scaled;
+#line 112 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp34_ = _tmp33_.height;
+#line 112 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp35_ = gdk_pixbuf_new_from_file_at_scale (_tmp30_, _tmp32_, _tmp34_, FALSE, &_inner_error_);
+#line 112 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp36_ = _tmp35_;
+#line 112 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _g_free0 (_tmp30_);
+#line 112 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp28_ = _tmp36_;
+#line 112 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 112 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 112 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _g_object_unref0 (_result_);
+#line 112 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return NULL;
+#line 1477 "PngSupport.c"
+ }
+#line 112 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp37_ = _tmp28_;
+#line 112 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp28_ = NULL;
+#line 112 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _g_object_unref0 (_result_);
+#line 112 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _result_ = _tmp37_;
+#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _g_object_unref0 (_tmp28_);
+#line 1489 "PngSupport.c"
+ }
+#line 116 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = _result_;
+#line 116 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 1495 "PngSupport.c"
+}
+
+
+static void png_reader_class_init (PngReaderClass * klass) {
+#line 87 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ png_reader_parent_class = g_type_class_peek_parent (klass);
+#line 87 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileReaderClass *) klass)->scaled_read = png_reader_real_scaled_read;
+#line 1504 "PngSupport.c"
+}
+
+
+static void png_reader_instance_init (PngReader * self) {
+}
+
+
+GType png_reader_get_type (void) {
+ static volatile gsize png_reader_type_id__volatile = 0;
+ if (g_once_init_enter (&png_reader_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PngReaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) png_reader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PngReader), 0, (GInstanceInitFunc) png_reader_instance_init, NULL };
+ GType png_reader_type_id;
+ png_reader_type_id = g_type_register_static (TYPE_GDK_READER, "PngReader", &g_define_type_info, 0);
+ g_once_init_leave (&png_reader_type_id__volatile, png_reader_type_id);
+ }
+ return png_reader_type_id__volatile;
+}
+
+
+PngWriter* png_writer_construct (GType object_type, const gchar* filepath) {
+ PngWriter* self = NULL;
+ const gchar* _tmp0_ = NULL;
+#line 121 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 122 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = filepath;
+#line 122 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = (PngWriter*) photo_file_writer_construct (object_type, _tmp0_, PHOTO_FILE_FORMAT_PNG);
+#line 121 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return self;
+#line 1535 "PngSupport.c"
+}
+
+
+PngWriter* png_writer_new (const gchar* filepath) {
+#line 121 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return png_writer_construct (TYPE_PNG_WRITER, filepath);
+#line 1542 "PngSupport.c"
+}
+
+
+static void png_writer_real_write (PhotoFileWriter* base, GdkPixbuf* pixbuf, JpegQuality quality, GError** error) {
+ PngWriter * self;
+ GdkPixbuf* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 125 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_WRITER, PngWriter);
+#line 125 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_return_if_fail (GDK_IS_PIXBUF (pixbuf));
+#line 126 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = pixbuf;
+#line 126 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1_ = photo_file_adapter_get_filepath (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 126 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 126 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ gdk_pixbuf_save (_tmp0_, _tmp2_, "png", &_inner_error_, "compression", "9", NULL, NULL);
+#line 126 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _g_free0 (_tmp2_);
+#line 126 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 126 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 126 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return;
+#line 1572 "PngSupport.c"
+ }
+}
+
+
+static void png_writer_class_init (PngWriterClass * klass) {
+#line 120 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ png_writer_parent_class = g_type_class_peek_parent (klass);
+#line 120 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileWriterClass *) klass)->write = png_writer_real_write;
+#line 1582 "PngSupport.c"
+}
+
+
+static void png_writer_instance_init (PngWriter * self) {
+}
+
+
+GType png_writer_get_type (void) {
+ static volatile gsize png_writer_type_id__volatile = 0;
+ if (g_once_init_enter (&png_writer_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PngWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) png_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PngWriter), 0, (GInstanceInitFunc) png_writer_instance_init, NULL };
+ GType png_writer_type_id;
+ png_writer_type_id = g_type_register_static (TYPE_PHOTO_FILE_WRITER, "PngWriter", &g_define_type_info, 0);
+ g_once_init_leave (&png_writer_type_id__volatile, png_writer_type_id);
+ }
+ return png_writer_type_id__volatile;
+}
+
+
+PngMetadataWriter* png_metadata_writer_construct (GType object_type, const gchar* filepath) {
+ PngMetadataWriter* self = NULL;
+ const gchar* _tmp0_ = NULL;
+#line 131 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 132 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = filepath;
+#line 132 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = (PngMetadataWriter*) photo_file_metadata_writer_construct (object_type, _tmp0_, PHOTO_FILE_FORMAT_PNG);
+#line 131 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return self;
+#line 1613 "PngSupport.c"
+}
+
+
+PngMetadataWriter* png_metadata_writer_new (const gchar* filepath) {
+#line 131 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return png_metadata_writer_construct (TYPE_PNG_METADATA_WRITER, filepath);
+#line 1620 "PngSupport.c"
+}
+
+
+static void png_metadata_writer_real_write_metadata (PhotoFileMetadataWriter* base, PhotoMetadata* metadata, GError** error) {
+ PngMetadataWriter * self;
+ PhotoMetadata* _tmp0_ = NULL;
+ GFile* _tmp1_ = NULL;
+ GFile* _tmp2_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 135 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_METADATA_WRITER, PngMetadataWriter);
+#line 135 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (metadata));
+#line 136 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = metadata;
+#line 136 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1_ = photo_file_adapter_get_file (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 136 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 136 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ photo_metadata_write_to_file (_tmp0_, _tmp2_, &_inner_error_);
+#line 136 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _g_object_unref0 (_tmp2_);
+#line 136 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 136 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 136 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return;
+#line 1650 "PngSupport.c"
+ }
+}
+
+
+static void png_metadata_writer_class_init (PngMetadataWriterClass * klass) {
+#line 130 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ png_metadata_writer_parent_class = g_type_class_peek_parent (klass);
+#line 130 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileMetadataWriterClass *) klass)->write_metadata = png_metadata_writer_real_write_metadata;
+#line 1660 "PngSupport.c"
+}
+
+
+static void png_metadata_writer_instance_init (PngMetadataWriter * self) {
+}
+
+
+GType png_metadata_writer_get_type (void) {
+ static volatile gsize png_metadata_writer_type_id__volatile = 0;
+ if (g_once_init_enter (&png_metadata_writer_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PngMetadataWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) png_metadata_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PngMetadataWriter), 0, (GInstanceInitFunc) png_metadata_writer_instance_init, NULL };
+ GType png_metadata_writer_type_id;
+ png_metadata_writer_type_id = g_type_register_static (TYPE_PHOTO_FILE_METADATA_WRITER, "PngMetadataWriter", &g_define_type_info, 0);
+ g_once_init_leave (&png_metadata_writer_type_id__volatile, png_metadata_writer_type_id);
+ }
+ return png_metadata_writer_type_id__volatile;
+}
+
+
+void png_file_format_driver_init (void) {
+ PngFileFormatDriver* _tmp0_ = NULL;
+#line 144 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = png_file_format_driver_new ();
+#line 144 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _photo_file_format_driver_unref0 (png_file_format_driver_instance);
+#line 144 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ png_file_format_driver_instance = _tmp0_;
+#line 145 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ png_file_format_properties_init ();
+#line 1690 "PngSupport.c"
+}
+
+
+static gpointer _photo_file_format_driver_ref0 (gpointer self) {
+#line 149 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return self ? photo_file_format_driver_ref (self) : NULL;
+#line 1697 "PngSupport.c"
+}
+
+
+PngFileFormatDriver* png_file_format_driver_get_instance (void) {
+ PngFileFormatDriver* result = NULL;
+ PngFileFormatDriver* _tmp0_ = NULL;
+ PngFileFormatDriver* _tmp1_ = NULL;
+#line 149 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = png_file_format_driver_instance;
+#line 149 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1_ = _photo_file_format_driver_ref0 (_tmp0_);
+#line 149 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = _tmp1_;
+#line 149 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 1713 "PngSupport.c"
+}
+
+
+static PhotoFileFormatProperties* png_file_format_driver_real_get_properties (PhotoFileFormatDriver* base) {
+ PngFileFormatDriver * self;
+ PhotoFileFormatProperties* result = NULL;
+ PngFileFormatProperties* _tmp0_ = NULL;
+#line 152 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_FILE_FORMAT_DRIVER, PngFileFormatDriver);
+#line 153 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = png_file_format_properties_get_instance ();
+#line 153 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatProperties);
+#line 153 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 1729 "PngSupport.c"
+}
+
+
+static PhotoFileReader* png_file_format_driver_real_create_reader (PhotoFileFormatDriver* base, const gchar* filepath) {
+ PngFileFormatDriver * self;
+ PhotoFileReader* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ PngReader* _tmp1_ = NULL;
+#line 156 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_FILE_FORMAT_DRIVER, PngFileFormatDriver);
+#line 156 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 157 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = filepath;
+#line 157 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1_ = png_reader_new (_tmp0_);
+#line 157 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO_FILE_READER, PhotoFileReader);
+#line 157 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 1750 "PngSupport.c"
+}
+
+
+static gboolean png_file_format_driver_real_can_write_image (PhotoFileFormatDriver* base) {
+ PngFileFormatDriver * self;
+ gboolean result = FALSE;
+#line 160 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_FILE_FORMAT_DRIVER, PngFileFormatDriver);
+#line 161 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = TRUE;
+#line 161 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 1763 "PngSupport.c"
+}
+
+
+static gboolean png_file_format_driver_real_can_write_metadata (PhotoFileFormatDriver* base) {
+ PngFileFormatDriver * self;
+ gboolean result = FALSE;
+#line 164 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_FILE_FORMAT_DRIVER, PngFileFormatDriver);
+#line 165 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = TRUE;
+#line 165 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 1776 "PngSupport.c"
+}
+
+
+static PhotoFileWriter* png_file_format_driver_real_create_writer (PhotoFileFormatDriver* base, const gchar* filepath) {
+ PngFileFormatDriver * self;
+ PhotoFileWriter* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ PngWriter* _tmp1_ = NULL;
+#line 168 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_FILE_FORMAT_DRIVER, PngFileFormatDriver);
+#line 168 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 169 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = filepath;
+#line 169 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1_ = png_writer_new (_tmp0_);
+#line 169 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO_FILE_WRITER, PhotoFileWriter);
+#line 169 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 1797 "PngSupport.c"
+}
+
+
+static PhotoFileMetadataWriter* png_file_format_driver_real_create_metadata_writer (PhotoFileFormatDriver* base, const gchar* filepath) {
+ PngFileFormatDriver * self;
+ PhotoFileMetadataWriter* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ PngMetadataWriter* _tmp1_ = NULL;
+#line 172 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_FILE_FORMAT_DRIVER, PngFileFormatDriver);
+#line 172 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 173 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = filepath;
+#line 173 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1_ = png_metadata_writer_new (_tmp0_);
+#line 173 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriter);
+#line 173 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 1818 "PngSupport.c"
+}
+
+
+static PhotoFileSniffer* png_file_format_driver_real_create_sniffer (PhotoFileFormatDriver* base, GFile* file, PhotoFileSnifferOptions options) {
+ PngFileFormatDriver * self;
+ PhotoFileSniffer* result = NULL;
+ GFile* _tmp0_ = NULL;
+ PhotoFileSnifferOptions _tmp1_ = 0;
+ PngSniffer* _tmp2_ = NULL;
+#line 176 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_FILE_FORMAT_DRIVER, PngFileFormatDriver);
+#line 176 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ g_return_val_if_fail (G_IS_FILE (file), NULL);
+#line 177 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = file;
+#line 177 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp1_ = options;
+#line 177 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp2_ = png_sniffer_new (_tmp0_, _tmp1_);
+#line 177 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer);
+#line 177 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 1842 "PngSupport.c"
+}
+
+
+static PhotoMetadata* png_file_format_driver_real_create_metadata (PhotoFileFormatDriver* base) {
+ PngFileFormatDriver * self;
+ PhotoMetadata* result = NULL;
+ PhotoMetadata* _tmp0_ = NULL;
+#line 180 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_FILE_FORMAT_DRIVER, PngFileFormatDriver);
+#line 181 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ _tmp0_ = photo_metadata_new ();
+#line 181 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ result = _tmp0_;
+#line 181 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return result;
+#line 1858 "PngSupport.c"
+}
+
+
+PngFileFormatDriver* png_file_format_driver_construct (GType object_type) {
+ PngFileFormatDriver* self = NULL;
+#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = (PngFileFormatDriver*) photo_file_format_driver_construct (object_type);
+#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return self;
+#line 1868 "PngSupport.c"
+}
+
+
+PngFileFormatDriver* png_file_format_driver_new (void) {
+#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ return png_file_format_driver_construct (TYPE_PNG_FILE_FORMAT_DRIVER);
+#line 1875 "PngSupport.c"
+}
+
+
+static void png_file_format_driver_class_init (PngFileFormatDriverClass * klass) {
+#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ png_file_format_driver_parent_class = g_type_class_peek_parent (klass);
+#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->finalize = png_file_format_driver_finalize;
+#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->get_properties = png_file_format_driver_real_get_properties;
+#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_reader = png_file_format_driver_real_create_reader;
+#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->can_write_image = png_file_format_driver_real_can_write_image;
+#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->can_write_metadata = png_file_format_driver_real_can_write_metadata;
+#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_writer = png_file_format_driver_real_create_writer;
+#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_metadata_writer = png_file_format_driver_real_create_metadata_writer;
+#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_sniffer = png_file_format_driver_real_create_sniffer;
+#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_metadata = png_file_format_driver_real_create_metadata;
+#line 1900 "PngSupport.c"
+}
+
+
+static void png_file_format_driver_instance_init (PngFileFormatDriver * self) {
+}
+
+
+static void png_file_format_driver_finalize (PhotoFileFormatDriver* obj) {
+ PngFileFormatDriver * self;
+#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PNG_FILE_FORMAT_DRIVER, PngFileFormatDriver);
+#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
+ PHOTO_FILE_FORMAT_DRIVER_CLASS (png_file_format_driver_parent_class)->finalize (obj);
+#line 1914 "PngSupport.c"
+}
+
+
+GType png_file_format_driver_get_type (void) {
+ static volatile gsize png_file_format_driver_type_id__volatile = 0;
+ if (g_once_init_enter (&png_file_format_driver_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PngFileFormatDriverClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) png_file_format_driver_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PngFileFormatDriver), 0, (GInstanceInitFunc) png_file_format_driver_instance_init, NULL };
+ GType png_file_format_driver_type_id;
+ png_file_format_driver_type_id = g_type_register_static (TYPE_PHOTO_FILE_FORMAT_DRIVER, "PngFileFormatDriver", &g_define_type_info, 0);
+ g_once_init_leave (&png_file_format_driver_type_id__volatile, png_file_format_driver_type_id);
+ }
+ return png_file_format_driver_type_id__volatile;
+}
+
+
+
diff --git a/src/photos/RawSupport.c b/src/photos/RawSupport.c
new file mode 100644
index 0000000..e06b1d5
--- /dev/null
+++ b/src/photos/RawSupport.c
@@ -0,0 +1,3165 @@
+/* RawSupport.c generated by valac 0.32.1, the Vala compiler
+ * generated from RawSupport.vala, do not modify */
+
+/* Copyright 2016 Software Freedom Conservancy Inc.
+ *
+ * This software is licensed under the GNU Lesser General Public License
+ * (version 2.1 or later). See the COPYING file in this distribution.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gio/gio.h>
+#include <glib/gi18n-lib.h>
+#include <libraw/libraw.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <float.h>
+#include <math.h>
+#include <time.h>
+
+
+#define TYPE_PHOTO_FILE_FORMAT_DRIVER (photo_file_format_driver_get_type ())
+#define PHOTO_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriver))
+#define PHOTO_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriverClass))
+#define IS_PHOTO_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_FORMAT_DRIVER))
+#define IS_PHOTO_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_FORMAT_DRIVER))
+#define PHOTO_FILE_FORMAT_DRIVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriverClass))
+
+typedef struct _PhotoFileFormatDriver PhotoFileFormatDriver;
+typedef struct _PhotoFileFormatDriverClass PhotoFileFormatDriverClass;
+typedef struct _PhotoFileFormatDriverPrivate PhotoFileFormatDriverPrivate;
+
+#define TYPE_PHOTO_FILE_FORMAT_PROPERTIES (photo_file_format_properties_get_type ())
+#define PHOTO_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatProperties))
+#define PHOTO_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatPropertiesClass))
+#define IS_PHOTO_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES))
+#define IS_PHOTO_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_FORMAT_PROPERTIES))
+#define PHOTO_FILE_FORMAT_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatPropertiesClass))
+
+typedef struct _PhotoFileFormatProperties PhotoFileFormatProperties;
+typedef struct _PhotoFileFormatPropertiesClass PhotoFileFormatPropertiesClass;
+
+#define TYPE_PHOTO_FILE_ADAPTER (photo_file_adapter_get_type ())
+#define PHOTO_FILE_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter))
+#define PHOTO_FILE_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapterClass))
+#define IS_PHOTO_FILE_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_ADAPTER))
+#define IS_PHOTO_FILE_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_ADAPTER))
+#define PHOTO_FILE_ADAPTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapterClass))
+
+typedef struct _PhotoFileAdapter PhotoFileAdapter;
+typedef struct _PhotoFileAdapterClass PhotoFileAdapterClass;
+
+#define TYPE_PHOTO_FILE_READER (photo_file_reader_get_type ())
+#define PHOTO_FILE_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_READER, PhotoFileReader))
+#define PHOTO_FILE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_READER, PhotoFileReaderClass))
+#define IS_PHOTO_FILE_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_READER))
+#define IS_PHOTO_FILE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_READER))
+#define PHOTO_FILE_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_READER, PhotoFileReaderClass))
+
+typedef struct _PhotoFileReader PhotoFileReader;
+typedef struct _PhotoFileReaderClass PhotoFileReaderClass;
+
+#define TYPE_MEDIA_METADATA (media_metadata_get_type ())
+#define MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_METADATA, MediaMetadata))
+#define MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_METADATA, MediaMetadataClass))
+#define IS_MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_METADATA))
+#define IS_MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_METADATA))
+#define MEDIA_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_METADATA, MediaMetadataClass))
+
+typedef struct _MediaMetadata MediaMetadata;
+typedef struct _MediaMetadataClass MediaMetadataClass;
+
+#define TYPE_PHOTO_METADATA (photo_metadata_get_type ())
+#define PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_METADATA, PhotoMetadata))
+#define PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_METADATA, PhotoMetadataClass))
+#define IS_PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_METADATA))
+#define IS_PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_METADATA))
+#define PHOTO_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_METADATA, PhotoMetadataClass))
+
+typedef struct _PhotoMetadata PhotoMetadata;
+typedef struct _PhotoMetadataClass PhotoMetadataClass;
+
+#define TYPE_PHOTO_FILE_WRITER (photo_file_writer_get_type ())
+#define PHOTO_FILE_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_WRITER, PhotoFileWriter))
+#define PHOTO_FILE_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_WRITER, PhotoFileWriterClass))
+#define IS_PHOTO_FILE_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_WRITER))
+#define IS_PHOTO_FILE_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_WRITER))
+#define PHOTO_FILE_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_WRITER, PhotoFileWriterClass))
+
+typedef struct _PhotoFileWriter PhotoFileWriter;
+typedef struct _PhotoFileWriterClass PhotoFileWriterClass;
+
+#define TYPE_PHOTO_FILE_METADATA_WRITER (photo_file_metadata_writer_get_type ())
+#define PHOTO_FILE_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriter))
+#define PHOTO_FILE_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriterClass))
+#define IS_PHOTO_FILE_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_METADATA_WRITER))
+#define IS_PHOTO_FILE_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_METADATA_WRITER))
+#define PHOTO_FILE_METADATA_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriterClass))
+
+typedef struct _PhotoFileMetadataWriter PhotoFileMetadataWriter;
+typedef struct _PhotoFileMetadataWriterClass PhotoFileMetadataWriterClass;
+
+#define PHOTO_FILE_SNIFFER_TYPE_OPTIONS (photo_file_sniffer_options_get_type ())
+
+#define TYPE_PHOTO_FILE_SNIFFER (photo_file_sniffer_get_type ())
+#define PHOTO_FILE_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer))
+#define PHOTO_FILE_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSnifferClass))
+#define IS_PHOTO_FILE_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_SNIFFER))
+#define IS_PHOTO_FILE_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_SNIFFER))
+#define PHOTO_FILE_SNIFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSnifferClass))
+
+typedef struct _PhotoFileSniffer PhotoFileSniffer;
+typedef struct _PhotoFileSnifferClass PhotoFileSnifferClass;
+
+#define TYPE_RAW_FILE_FORMAT_DRIVER (raw_file_format_driver_get_type ())
+#define RAW_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RAW_FILE_FORMAT_DRIVER, RawFileFormatDriver))
+#define RAW_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RAW_FILE_FORMAT_DRIVER, RawFileFormatDriverClass))
+#define IS_RAW_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RAW_FILE_FORMAT_DRIVER))
+#define IS_RAW_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RAW_FILE_FORMAT_DRIVER))
+#define RAW_FILE_FORMAT_DRIVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RAW_FILE_FORMAT_DRIVER, RawFileFormatDriverClass))
+
+typedef struct _RawFileFormatDriver RawFileFormatDriver;
+typedef struct _RawFileFormatDriverClass RawFileFormatDriverClass;
+typedef struct _RawFileFormatDriverPrivate RawFileFormatDriverPrivate;
+#define _photo_file_format_driver_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_format_driver_unref (var), NULL)))
+
+#define TYPE_RAW_FILE_FORMAT_PROPERTIES (raw_file_format_properties_get_type ())
+#define RAW_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RAW_FILE_FORMAT_PROPERTIES, RawFileFormatProperties))
+#define RAW_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RAW_FILE_FORMAT_PROPERTIES, RawFileFormatPropertiesClass))
+#define IS_RAW_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RAW_FILE_FORMAT_PROPERTIES))
+#define IS_RAW_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RAW_FILE_FORMAT_PROPERTIES))
+#define RAW_FILE_FORMAT_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RAW_FILE_FORMAT_PROPERTIES, RawFileFormatPropertiesClass))
+
+typedef struct _RawFileFormatProperties RawFileFormatProperties;
+typedef struct _RawFileFormatPropertiesClass RawFileFormatPropertiesClass;
+
+#define TYPE_RAW_READER (raw_reader_get_type ())
+#define RAW_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RAW_READER, RawReader))
+#define RAW_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RAW_READER, RawReaderClass))
+#define IS_RAW_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RAW_READER))
+#define IS_RAW_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RAW_READER))
+#define RAW_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RAW_READER, RawReaderClass))
+
+typedef struct _RawReader RawReader;
+typedef struct _RawReaderClass RawReaderClass;
+
+#define TYPE_RAW_SNIFFER (raw_sniffer_get_type ())
+#define RAW_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RAW_SNIFFER, RawSniffer))
+#define RAW_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RAW_SNIFFER, RawSnifferClass))
+#define IS_RAW_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RAW_SNIFFER))
+#define IS_RAW_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RAW_SNIFFER))
+#define RAW_SNIFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RAW_SNIFFER, RawSnifferClass))
+
+typedef struct _RawSniffer RawSniffer;
+typedef struct _RawSnifferClass RawSnifferClass;
+typedef struct _PhotoFileFormatPropertiesPrivate PhotoFileFormatPropertiesPrivate;
+
+#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ())
+
+#define TYPE_PHOTO_FILE_FORMAT_FLAGS (photo_file_format_flags_get_type ())
+typedef struct _RawFileFormatPropertiesPrivate RawFileFormatPropertiesPrivate;
+#define _photo_file_format_properties_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_format_properties_unref (var), NULL)))
+typedef struct _PhotoFileSnifferPrivate PhotoFileSnifferPrivate;
+
+#define TYPE_DETECTED_PHOTO_INFORMATION (detected_photo_information_get_type ())
+#define DETECTED_PHOTO_INFORMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformation))
+#define DETECTED_PHOTO_INFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformationClass))
+#define IS_DETECTED_PHOTO_INFORMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DETECTED_PHOTO_INFORMATION))
+#define IS_DETECTED_PHOTO_INFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DETECTED_PHOTO_INFORMATION))
+#define DETECTED_PHOTO_INFORMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformationClass))
+
+typedef struct _DetectedPhotoInformation DetectedPhotoInformation;
+typedef struct _DetectedPhotoInformationClass DetectedPhotoInformationClass;
+typedef struct _RawSnifferPrivate RawSnifferPrivate;
+
+#define GRAW_TYPE_PROCESSOR (graw_processor_get_type ())
+#define GRAW_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GRAW_TYPE_PROCESSOR, GRawProcessor))
+#define GRAW_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GRAW_TYPE_PROCESSOR, GRawProcessorClass))
+#define GRAW_IS_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GRAW_TYPE_PROCESSOR))
+#define GRAW_IS_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GRAW_TYPE_PROCESSOR))
+#define GRAW_PROCESSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GRAW_TYPE_PROCESSOR, GRawProcessorClass))
+
+typedef struct _GRawProcessor GRawProcessor;
+typedef struct _GRawProcessorClass GRawProcessorClass;
+
+#define GRAW_TYPE_FLIP (graw_flip_get_type ())
+#define _g_free0(var) (var = (g_free (var), NULL))
+#define _graw_processor_unref0(var) ((var == NULL) ? NULL : (var = (graw_processor_unref (var), NULL)))
+#define _detected_photo_information_unref0(var) ((var == NULL) ? NULL : (var = (detected_photo_information_unref (var), NULL)))
+#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
+typedef struct _DetectedPhotoInformationPrivate DetectedPhotoInformationPrivate;
+
+#define TYPE_DIMENSIONS (dimensions_get_type ())
+typedef struct _Dimensions Dimensions;
+#define _media_metadata_unref0(var) ((var == NULL) ? NULL : (var = (media_metadata_unref (var), NULL)))
+#define _photo_file_adapter_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_adapter_unref (var), NULL)))
+typedef struct _PhotoFileAdapterPrivate PhotoFileAdapterPrivate;
+typedef struct _PhotoFileReaderPrivate PhotoFileReaderPrivate;
+typedef struct _RawReaderPrivate RawReaderPrivate;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+
+#define GRAW_TYPE_PROCESSED_IMAGE (graw_processed_image_get_type ())
+#define GRAW_PROCESSED_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GRAW_TYPE_PROCESSED_IMAGE, GRawProcessedImage))
+#define GRAW_PROCESSED_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GRAW_TYPE_PROCESSED_IMAGE, GRawProcessedImageClass))
+#define GRAW_IS_PROCESSED_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GRAW_TYPE_PROCESSED_IMAGE))
+#define GRAW_IS_PROCESSED_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GRAW_TYPE_PROCESSED_IMAGE))
+#define GRAW_PROCESSED_IMAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GRAW_TYPE_PROCESSED_IMAGE, GRawProcessedImageClass))
+
+typedef struct _GRawProcessedImage GRawProcessedImage;
+typedef struct _GRawProcessedImageClass GRawProcessedImageClass;
+#define _graw_processed_image_unref0(var) ((var == NULL) ? NULL : (var = (graw_processed_image_unref (var), NULL)))
+
+#define TYPE_RAW_DEVELOPER (raw_developer_get_type ())
+
+#define TYPE_BACKING_PHOTO_ROW (backing_photo_row_get_type ())
+#define BACKING_PHOTO_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BACKING_PHOTO_ROW, BackingPhotoRow))
+#define BACKING_PHOTO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BACKING_PHOTO_ROW, BackingPhotoRowClass))
+#define IS_BACKING_PHOTO_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BACKING_PHOTO_ROW))
+#define IS_BACKING_PHOTO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BACKING_PHOTO_ROW))
+#define BACKING_PHOTO_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BACKING_PHOTO_ROW, BackingPhotoRowClass))
+
+typedef struct _BackingPhotoRow BackingPhotoRow;
+typedef struct _BackingPhotoRowClass BackingPhotoRowClass;
+#define _backing_photo_row_unref0(var) ((var == NULL) ? NULL : (var = (backing_photo_row_unref (var), NULL)))
+typedef struct _BackingPhotoRowPrivate BackingPhotoRowPrivate;
+
+#define TYPE_BACKING_PHOTO_ID (backing_photo_id_get_type ())
+typedef struct _BackingPhotoID BackingPhotoID;
+
+#define TYPE_ORIENTATION (orientation_get_type ())
+
+typedef enum {
+ PHOTO_FILE_SNIFFER_OPTIONS_GET_ALL = 0x00000000,
+ PHOTO_FILE_SNIFFER_OPTIONS_NO_MD5 = 0x00000001
+} PhotoFileSnifferOptions;
+
+struct _PhotoFileFormatDriver {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileFormatDriverPrivate * priv;
+};
+
+struct _PhotoFileFormatDriverClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileFormatDriver *self);
+ PhotoFileFormatProperties* (*get_properties) (PhotoFileFormatDriver* self);
+ PhotoFileReader* (*create_reader) (PhotoFileFormatDriver* self, const gchar* filepath);
+ PhotoMetadata* (*create_metadata) (PhotoFileFormatDriver* self);
+ gboolean (*can_write_image) (PhotoFileFormatDriver* self);
+ gboolean (*can_write_metadata) (PhotoFileFormatDriver* self);
+ PhotoFileWriter* (*create_writer) (PhotoFileFormatDriver* self, const gchar* filepath);
+ PhotoFileMetadataWriter* (*create_metadata_writer) (PhotoFileFormatDriver* self, const gchar* filepath);
+ PhotoFileSniffer* (*create_sniffer) (PhotoFileFormatDriver* self, GFile* file, PhotoFileSnifferOptions options);
+};
+
+struct _RawFileFormatDriver {
+ PhotoFileFormatDriver parent_instance;
+ RawFileFormatDriverPrivate * priv;
+};
+
+struct _RawFileFormatDriverClass {
+ PhotoFileFormatDriverClass parent_class;
+};
+
+typedef enum {
+ PHOTO_FILE_FORMAT_JFIF,
+ PHOTO_FILE_FORMAT_RAW,
+ PHOTO_FILE_FORMAT_PNG,
+ PHOTO_FILE_FORMAT_TIFF,
+ PHOTO_FILE_FORMAT_BMP,
+ PHOTO_FILE_FORMAT_UNKNOWN
+} PhotoFileFormat;
+
+typedef enum {
+ PHOTO_FILE_FORMAT_FLAGS_NONE = 0x00000000
+} PhotoFileFormatFlags;
+
+struct _PhotoFileFormatProperties {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileFormatPropertiesPrivate * priv;
+};
+
+struct _PhotoFileFormatPropertiesClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileFormatProperties *self);
+ PhotoFileFormat (*get_file_format) (PhotoFileFormatProperties* self);
+ PhotoFileFormatFlags (*get_flags) (PhotoFileFormatProperties* self);
+ gboolean (*is_recognized_extension) (PhotoFileFormatProperties* self, const gchar* ext);
+ gchar* (*get_default_extension) (PhotoFileFormatProperties* self);
+ gchar** (*get_known_extensions) (PhotoFileFormatProperties* self, int* result_length1);
+ gchar* (*get_default_mime_type) (PhotoFileFormatProperties* self);
+ gchar** (*get_mime_types) (PhotoFileFormatProperties* self, int* result_length1);
+ gchar* (*get_user_visible_name) (PhotoFileFormatProperties* self);
+};
+
+struct _RawFileFormatProperties {
+ PhotoFileFormatProperties parent_instance;
+ RawFileFormatPropertiesPrivate * priv;
+};
+
+struct _RawFileFormatPropertiesClass {
+ PhotoFileFormatPropertiesClass parent_class;
+};
+
+struct _PhotoFileSniffer {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileSnifferPrivate * priv;
+ GFile* file;
+ PhotoFileSnifferOptions options;
+ gboolean calc_md5;
+};
+
+struct _PhotoFileSnifferClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileSniffer *self);
+ DetectedPhotoInformation* (*sniff) (PhotoFileSniffer* self, gboolean* is_corrupted, GError** error);
+};
+
+struct _RawSniffer {
+ PhotoFileSniffer parent_instance;
+ RawSnifferPrivate * priv;
+};
+
+struct _RawSnifferClass {
+ PhotoFileSnifferClass parent_class;
+};
+
+typedef enum {
+ GRAW_FLIP_FROM_SOURCE = -1,
+ GRAW_FLIP_NONE = 0,
+ GRAW_FLIP_UPSIDE_DOWN = 3,
+ GRAW_FLIP_COUNTERCLOCKWISE = 5,
+ GRAW_FLIP_CLOCKWISE = 6
+} GRawFlip;
+
+typedef enum {
+ GRAW_EXCEPTION_UNSPECIFIED,
+ GRAW_EXCEPTION_UNSUPPORTED_FILE,
+ GRAW_EXCEPTION_NONEXISTANT_IMAGE,
+ GRAW_EXCEPTION_OUT_OF_ORDER_CALL,
+ GRAW_EXCEPTION_NO_THUMBNAIL,
+ GRAW_EXCEPTION_UNSUPPORTED_THUMBNAIL,
+ GRAW_EXCEPTION_OUT_OF_MEMORY,
+ GRAW_EXCEPTION_DATA_ERROR,
+ GRAW_EXCEPTION_IO_ERROR,
+ GRAW_EXCEPTION_CANCELLED_BY_CALLBACK,
+ GRAW_EXCEPTION_BAD_CROP,
+ GRAW_EXCEPTION_SYSTEM_ERROR
+} GRawException;
+#define GRAW_EXCEPTION graw_exception_quark ()
+struct _Dimensions {
+ gint width;
+ gint height;
+};
+
+struct _DetectedPhotoInformation {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ DetectedPhotoInformationPrivate * priv;
+ PhotoFileFormat file_format;
+ PhotoMetadata* metadata;
+ gchar* md5;
+ gchar* exif_md5;
+ gchar* thumbnail_md5;
+ gchar* format_name;
+ Dimensions image_dim;
+ GdkColorspace colorspace;
+ gint channels;
+ gint bits_per_channel;
+};
+
+struct _DetectedPhotoInformationClass {
+ GTypeClass parent_class;
+ void (*finalize) (DetectedPhotoInformation *self);
+};
+
+struct _PhotoFileAdapter {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileAdapterPrivate * priv;
+};
+
+struct _PhotoFileAdapterClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileAdapter *self);
+};
+
+struct _PhotoFileReader {
+ PhotoFileAdapter parent_instance;
+ PhotoFileReaderPrivate * priv;
+};
+
+struct _PhotoFileReaderClass {
+ PhotoFileAdapterClass parent_class;
+ PhotoMetadata* (*read_metadata) (PhotoFileReader* self, GError** error);
+ GdkPixbuf* (*unscaled_read) (PhotoFileReader* self, GError** error);
+ GdkPixbuf* (*scaled_read) (PhotoFileReader* self, Dimensions* full, Dimensions* scaled, GError** error);
+};
+
+struct _RawReader {
+ PhotoFileReader parent_instance;
+ RawReaderPrivate * priv;
+};
+
+struct _RawReaderClass {
+ PhotoFileReaderClass parent_class;
+};
+
+typedef enum {
+ RAW_DEVELOPER_SHOTWELL = 0,
+ RAW_DEVELOPER_CAMERA,
+ RAW_DEVELOPER_EMBEDDED
+} RawDeveloper;
+
+struct _BackingPhotoID {
+ gint64 id;
+};
+
+typedef enum {
+ ORIENTATION_MIN = 1,
+ ORIENTATION_TOP_LEFT = 1,
+ ORIENTATION_TOP_RIGHT = 2,
+ ORIENTATION_BOTTOM_RIGHT = 3,
+ ORIENTATION_BOTTOM_LEFT = 4,
+ ORIENTATION_LEFT_TOP = 5,
+ ORIENTATION_RIGHT_TOP = 6,
+ ORIENTATION_RIGHT_BOTTOM = 7,
+ ORIENTATION_LEFT_BOTTOM = 8,
+ ORIENTATION_MAX = 8
+} Orientation;
+
+struct _BackingPhotoRow {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ BackingPhotoRowPrivate * priv;
+ BackingPhotoID id;
+ time_t time_created;
+ gchar* filepath;
+ gint64 filesize;
+ time_t timestamp;
+ PhotoFileFormat file_format;
+ Dimensions dim;
+ Orientation original_orientation;
+};
+
+struct _BackingPhotoRowClass {
+ GTypeClass parent_class;
+ void (*finalize) (BackingPhotoRow *self);
+};
+
+
+static gpointer raw_file_format_driver_parent_class = NULL;
+static RawFileFormatDriver* raw_file_format_driver_instance;
+static RawFileFormatDriver* raw_file_format_driver_instance = NULL;
+static gpointer raw_file_format_properties_parent_class = NULL;
+static gchar** raw_file_format_properties_KNOWN_EXTENSIONS;
+static gint raw_file_format_properties_KNOWN_EXTENSIONS_length1;
+static gchar** raw_file_format_properties_KNOWN_EXTENSIONS = NULL;
+static gint raw_file_format_properties_KNOWN_EXTENSIONS_length1 = 0;
+static gint _raw_file_format_properties_KNOWN_EXTENSIONS_size_ = 0;
+static gchar** raw_file_format_properties_KNOWN_MIME_TYPES;
+static gint raw_file_format_properties_KNOWN_MIME_TYPES_length1;
+static gchar** raw_file_format_properties_KNOWN_MIME_TYPES = NULL;
+static gint raw_file_format_properties_KNOWN_MIME_TYPES_length1 = 0;
+static gint _raw_file_format_properties_KNOWN_MIME_TYPES_size_ = 0;
+static RawFileFormatProperties* raw_file_format_properties_instance;
+static RawFileFormatProperties* raw_file_format_properties_instance = NULL;
+static gpointer raw_sniffer_parent_class = NULL;
+static gpointer raw_reader_parent_class = NULL;
+
+gpointer photo_file_format_driver_ref (gpointer instance);
+void photo_file_format_driver_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_format_driver (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_format_driver (GValue* value, gpointer v_object);
+void value_take_photo_file_format_driver (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_format_driver (const GValue* value);
+GType photo_file_format_driver_get_type (void) G_GNUC_CONST;
+gpointer photo_file_format_properties_ref (gpointer instance);
+void photo_file_format_properties_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_format_properties (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_format_properties (GValue* value, gpointer v_object);
+void value_take_photo_file_format_properties (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_format_properties (const GValue* value);
+GType photo_file_format_properties_get_type (void) G_GNUC_CONST;
+gpointer photo_file_adapter_ref (gpointer instance);
+void photo_file_adapter_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_adapter (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_adapter (GValue* value, gpointer v_object);
+void value_take_photo_file_adapter (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_adapter (const GValue* value);
+GType photo_file_adapter_get_type (void) G_GNUC_CONST;
+GType photo_file_reader_get_type (void) G_GNUC_CONST;
+gpointer media_metadata_ref (gpointer instance);
+void media_metadata_unref (gpointer instance);
+GParamSpec* param_spec_media_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_media_metadata (GValue* value, gpointer v_object);
+void value_take_media_metadata (GValue* value, gpointer v_object);
+gpointer value_get_media_metadata (const GValue* value);
+GType media_metadata_get_type (void) G_GNUC_CONST;
+GType photo_metadata_get_type (void) G_GNUC_CONST;
+GType photo_file_writer_get_type (void) G_GNUC_CONST;
+GType photo_file_metadata_writer_get_type (void) G_GNUC_CONST;
+GType photo_file_sniffer_options_get_type (void) G_GNUC_CONST;
+gpointer photo_file_sniffer_ref (gpointer instance);
+void photo_file_sniffer_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_sniffer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_sniffer (GValue* value, gpointer v_object);
+void value_take_photo_file_sniffer (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_sniffer (const GValue* value);
+GType photo_file_sniffer_get_type (void) G_GNUC_CONST;
+GType raw_file_format_driver_get_type (void) G_GNUC_CONST;
+enum {
+ RAW_FILE_FORMAT_DRIVER_DUMMY_PROPERTY
+};
+void raw_file_format_driver_init (void);
+RawFileFormatDriver* raw_file_format_driver_new (void);
+RawFileFormatDriver* raw_file_format_driver_construct (GType object_type);
+void raw_file_format_properties_init (void);
+RawFileFormatDriver* raw_file_format_driver_get_instance (void);
+static PhotoFileFormatProperties* raw_file_format_driver_real_get_properties (PhotoFileFormatDriver* base);
+GType raw_file_format_properties_get_type (void) G_GNUC_CONST;
+RawFileFormatProperties* raw_file_format_properties_get_instance (void);
+static PhotoFileReader* raw_file_format_driver_real_create_reader (PhotoFileFormatDriver* base, const gchar* filepath);
+RawReader* raw_reader_new (const gchar* filepath);
+RawReader* raw_reader_construct (GType object_type, const gchar* filepath);
+GType raw_reader_get_type (void) G_GNUC_CONST;
+static PhotoMetadata* raw_file_format_driver_real_create_metadata (PhotoFileFormatDriver* base);
+PhotoMetadata* photo_metadata_new (void);
+PhotoMetadata* photo_metadata_construct (GType object_type);
+static gboolean raw_file_format_driver_real_can_write_image (PhotoFileFormatDriver* base);
+static gboolean raw_file_format_driver_real_can_write_metadata (PhotoFileFormatDriver* base);
+static PhotoFileWriter* raw_file_format_driver_real_create_writer (PhotoFileFormatDriver* base, const gchar* filepath);
+static PhotoFileMetadataWriter* raw_file_format_driver_real_create_metadata_writer (PhotoFileFormatDriver* base, const gchar* filepath);
+static PhotoFileSniffer* raw_file_format_driver_real_create_sniffer (PhotoFileFormatDriver* base, GFile* file, PhotoFileSnifferOptions options);
+RawSniffer* raw_sniffer_new (GFile* file, PhotoFileSnifferOptions options);
+RawSniffer* raw_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options);
+GType raw_sniffer_get_type (void) G_GNUC_CONST;
+PhotoFileFormatDriver* photo_file_format_driver_construct (GType object_type);
+static void raw_file_format_driver_finalize (PhotoFileFormatDriver* obj);
+GType photo_file_format_get_type (void) G_GNUC_CONST;
+GType photo_file_format_flags_get_type (void) G_GNUC_CONST;
+enum {
+ RAW_FILE_FORMAT_PROPERTIES_DUMMY_PROPERTY
+};
+RawFileFormatProperties* raw_file_format_properties_new (void);
+RawFileFormatProperties* raw_file_format_properties_construct (GType object_type);
+static PhotoFileFormat raw_file_format_properties_real_get_file_format (PhotoFileFormatProperties* base);
+static gchar* raw_file_format_properties_real_get_user_visible_name (PhotoFileFormatProperties* base);
+static PhotoFileFormatFlags raw_file_format_properties_real_get_flags (PhotoFileFormatProperties* base);
+static gchar* raw_file_format_properties_real_get_default_extension (PhotoFileFormatProperties* base);
+static gchar** raw_file_format_properties_real_get_known_extensions (PhotoFileFormatProperties* base, int* result_length1);
+static gchar** _vala_array_dup12 (gchar** self, int length);
+static gchar* raw_file_format_properties_real_get_default_mime_type (PhotoFileFormatProperties* base);
+static gchar** raw_file_format_properties_real_get_mime_types (PhotoFileFormatProperties* base, int* result_length1);
+static gchar** _vala_array_dup13 (gchar** self, int length);
+PhotoFileFormatProperties* photo_file_format_properties_construct (GType object_type);
+static void raw_file_format_properties_finalize (PhotoFileFormatProperties* obj);
+gpointer detected_photo_information_ref (gpointer instance);
+void detected_photo_information_unref (gpointer instance);
+GParamSpec* param_spec_detected_photo_information (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_detected_photo_information (GValue* value, gpointer v_object);
+void value_take_detected_photo_information (GValue* value, gpointer v_object);
+gpointer value_get_detected_photo_information (const GValue* value);
+GType detected_photo_information_get_type (void) G_GNUC_CONST;
+enum {
+ RAW_SNIFFER_DUMMY_PROPERTY
+};
+PhotoFileSniffer* photo_file_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options);
+static DetectedPhotoInformation* raw_sniffer_real_sniff (PhotoFileSniffer* base, gboolean* is_corrupted, GError** error);
+DetectedPhotoInformation* detected_photo_information_new (void);
+DetectedPhotoInformation* detected_photo_information_construct (GType object_type);
+gpointer graw_processor_ref (gpointer instance);
+void graw_processor_unref (gpointer instance);
+GParamSpec* graw_param_spec_processor (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void graw_value_set_processor (GValue* value, gpointer v_object);
+void graw_value_take_processor (GValue* value, gpointer v_object);
+gpointer graw_value_get_processor (const GValue* value);
+GType graw_processor_get_type (void) G_GNUC_CONST;
+GRawProcessor* graw_processor_new (enum LibRaw_constructor_flags options);
+GRawProcessor* graw_processor_construct (GType object_type, enum LibRaw_constructor_flags options);
+libraw_output_params_t* graw_processor_get_output_params (GRawProcessor* self);
+GType graw_flip_get_type (void) G_GNUC_CONST;
+GQuark graw_exception_quark (void);
+void graw_processor_open_file (GRawProcessor* self, const gchar* filename, GError** error);
+void graw_processor_unpack (GRawProcessor* self, GError** error);
+void graw_processor_adjust_sizes_info_only (GRawProcessor* self, GError** error);
+GType dimensions_get_type (void) G_GNUC_CONST;
+Dimensions* dimensions_dup (const Dimensions* self);
+void dimensions_free (Dimensions* self);
+libraw_image_sizes_t graw_processor_get_sizes (GRawProcessor* self);
+void dimensions_init (Dimensions *self, gint width, gint height);
+PhotoMetadata* photo_file_reader_read_metadata (PhotoFileReader* self, GError** error);
+guint8* photo_metadata_flatten_exif (PhotoMetadata* self, gboolean include_preview, int* result_length1);
+gchar* md5_binary (guint8* buffer, gsize length);
+guint8* photo_metadata_flatten_exif_preview (PhotoMetadata* self, int* result_length1);
+gchar* md5_file (GFile* file, GError** error);
+enum {
+ RAW_READER_DUMMY_PROPERTY
+};
+PhotoFileReader* photo_file_reader_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
+static PhotoMetadata* raw_reader_real_read_metadata (PhotoFileReader* base, GError** error);
+void media_metadata_read_from_file (MediaMetadata* self, GFile* file, GError** error);
+GFile* photo_file_adapter_get_file (PhotoFileAdapter* self);
+static GdkPixbuf* raw_reader_real_unscaled_read (PhotoFileReader* base, GError** error);
+void graw_processor_configure_for_rgb_display (GRawProcessor* self, gboolean half_size);
+gchar* photo_file_adapter_get_filepath (PhotoFileAdapter* self);
+void graw_processor_process (GRawProcessor* self, GError** error);
+gpointer graw_processed_image_ref (gpointer instance);
+void graw_processed_image_unref (gpointer instance);
+GParamSpec* graw_param_spec_processed_image (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void graw_value_set_processed_image (GValue* value, gpointer v_object);
+void graw_value_take_processed_image (GValue* value, gpointer v_object);
+gpointer graw_value_get_processed_image (const GValue* value);
+GType graw_processed_image_get_type (void) G_GNUC_CONST;
+GRawProcessedImage* graw_processor_make_mem_image (GRawProcessor* self, GError** error);
+GdkPixbuf* graw_processed_image_get_pixbuf_copy (GRawProcessedImage* self);
+static GdkPixbuf* raw_reader_real_scaled_read (PhotoFileReader* base, Dimensions* full, Dimensions* scaled, GError** error);
+GdkPixbuf* resize_pixbuf (GdkPixbuf* pixbuf, Dimensions* resized, GdkInterpType interp);
+GType raw_developer_get_type (void) G_GNUC_CONST;
+RawDeveloper* raw_developer_as_array (int* result_length1);
+gchar* raw_developer_to_string (RawDeveloper self);
+RawDeveloper raw_developer_from_string (const gchar* value);
+gchar* raw_developer_get_label (RawDeveloper self);
+gboolean raw_developer_is_equivalent (RawDeveloper self, RawDeveloper d);
+gpointer backing_photo_row_ref (gpointer instance);
+void backing_photo_row_unref (gpointer instance);
+GParamSpec* param_spec_backing_photo_row (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_backing_photo_row (GValue* value, gpointer v_object);
+void value_take_backing_photo_row (GValue* value, gpointer v_object);
+gpointer value_get_backing_photo_row (const GValue* value);
+GType backing_photo_row_get_type (void) G_GNUC_CONST;
+BackingPhotoRow* raw_developer_create_backing_row_for_development (RawDeveloper self, const gchar* raw_filepath, const gchar* camera_development_filename, GError** error);
+BackingPhotoRow* backing_photo_row_new (void);
+BackingPhotoRow* backing_photo_row_construct (GType object_type);
+void disassemble_filename (const gchar* basename, gchar** name, gchar** ext);
+GFile* generate_unique_file (GFile* dir, const gchar* basename, gboolean* collision, GError** error);
+gboolean claim_file (GFile* file, GError** error);
+GType backing_photo_id_get_type (void) G_GNUC_CONST;
+BackingPhotoID* backing_photo_id_dup (const BackingPhotoID* self);
+void backing_photo_id_free (BackingPhotoID* self);
+GType orientation_get_type (void) G_GNUC_CONST;
+
+
+void raw_file_format_driver_init (void) {
+ RawFileFormatDriver* _tmp0_ = NULL;
+#line 11 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = raw_file_format_driver_new ();
+#line 11 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _photo_file_format_driver_unref0 (raw_file_format_driver_instance);
+#line 11 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ raw_file_format_driver_instance = _tmp0_;
+#line 12 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ raw_file_format_properties_init ();
+#line 658 "RawSupport.c"
+}
+
+
+static gpointer _photo_file_format_driver_ref0 (gpointer self) {
+#line 16 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return self ? photo_file_format_driver_ref (self) : NULL;
+#line 665 "RawSupport.c"
+}
+
+
+RawFileFormatDriver* raw_file_format_driver_get_instance (void) {
+ RawFileFormatDriver* result = NULL;
+ RawFileFormatDriver* _tmp0_ = NULL;
+ RawFileFormatDriver* _tmp1_ = NULL;
+#line 16 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = raw_file_format_driver_instance;
+#line 16 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = _photo_file_format_driver_ref0 (_tmp0_);
+#line 16 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = _tmp1_;
+#line 16 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 681 "RawSupport.c"
+}
+
+
+static PhotoFileFormatProperties* raw_file_format_driver_real_get_properties (PhotoFileFormatDriver* base) {
+ RawFileFormatDriver * self;
+ PhotoFileFormatProperties* result = NULL;
+ RawFileFormatProperties* _tmp0_ = NULL;
+#line 19 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RAW_FILE_FORMAT_DRIVER, RawFileFormatDriver);
+#line 20 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = raw_file_format_properties_get_instance ();
+#line 20 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatProperties);
+#line 20 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 697 "RawSupport.c"
+}
+
+
+static PhotoFileReader* raw_file_format_driver_real_create_reader (PhotoFileFormatDriver* base, const gchar* filepath) {
+ RawFileFormatDriver * self;
+ PhotoFileReader* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ RawReader* _tmp1_ = NULL;
+#line 23 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RAW_FILE_FORMAT_DRIVER, RawFileFormatDriver);
+#line 23 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 24 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = filepath;
+#line 24 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = raw_reader_new (_tmp0_);
+#line 24 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO_FILE_READER, PhotoFileReader);
+#line 24 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 718 "RawSupport.c"
+}
+
+
+static PhotoMetadata* raw_file_format_driver_real_create_metadata (PhotoFileFormatDriver* base) {
+ RawFileFormatDriver * self;
+ PhotoMetadata* result = NULL;
+ PhotoMetadata* _tmp0_ = NULL;
+#line 27 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RAW_FILE_FORMAT_DRIVER, RawFileFormatDriver);
+#line 28 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = photo_metadata_new ();
+#line 28 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = _tmp0_;
+#line 28 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 734 "RawSupport.c"
+}
+
+
+static gboolean raw_file_format_driver_real_can_write_image (PhotoFileFormatDriver* base) {
+ RawFileFormatDriver * self;
+ gboolean result = FALSE;
+#line 31 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RAW_FILE_FORMAT_DRIVER, RawFileFormatDriver);
+#line 32 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = FALSE;
+#line 32 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 747 "RawSupport.c"
+}
+
+
+static gboolean raw_file_format_driver_real_can_write_metadata (PhotoFileFormatDriver* base) {
+ RawFileFormatDriver * self;
+ gboolean result = FALSE;
+#line 35 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RAW_FILE_FORMAT_DRIVER, RawFileFormatDriver);
+#line 36 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = FALSE;
+#line 36 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 760 "RawSupport.c"
+}
+
+
+static PhotoFileWriter* raw_file_format_driver_real_create_writer (PhotoFileFormatDriver* base, const gchar* filepath) {
+ RawFileFormatDriver * self;
+ PhotoFileWriter* result = NULL;
+#line 39 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RAW_FILE_FORMAT_DRIVER, RawFileFormatDriver);
+#line 39 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 40 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = NULL;
+#line 40 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 775 "RawSupport.c"
+}
+
+
+static PhotoFileMetadataWriter* raw_file_format_driver_real_create_metadata_writer (PhotoFileFormatDriver* base, const gchar* filepath) {
+ RawFileFormatDriver * self;
+ PhotoFileMetadataWriter* result = NULL;
+#line 43 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RAW_FILE_FORMAT_DRIVER, RawFileFormatDriver);
+#line 43 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 44 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = NULL;
+#line 44 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 790 "RawSupport.c"
+}
+
+
+static PhotoFileSniffer* raw_file_format_driver_real_create_sniffer (PhotoFileFormatDriver* base, GFile* file, PhotoFileSnifferOptions options) {
+ RawFileFormatDriver * self;
+ PhotoFileSniffer* result = NULL;
+ GFile* _tmp0_ = NULL;
+ PhotoFileSnifferOptions _tmp1_ = 0;
+ RawSniffer* _tmp2_ = NULL;
+#line 47 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RAW_FILE_FORMAT_DRIVER, RawFileFormatDriver);
+#line 47 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_return_val_if_fail (G_IS_FILE (file), NULL);
+#line 48 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = file;
+#line 48 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = options;
+#line 48 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp2_ = raw_sniffer_new (_tmp0_, _tmp1_);
+#line 48 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer);
+#line 48 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 814 "RawSupport.c"
+}
+
+
+RawFileFormatDriver* raw_file_format_driver_construct (GType object_type) {
+ RawFileFormatDriver* self = NULL;
+#line 7 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = (RawFileFormatDriver*) photo_file_format_driver_construct (object_type);
+#line 7 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return self;
+#line 824 "RawSupport.c"
+}
+
+
+RawFileFormatDriver* raw_file_format_driver_new (void) {
+#line 7 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return raw_file_format_driver_construct (TYPE_RAW_FILE_FORMAT_DRIVER);
+#line 831 "RawSupport.c"
+}
+
+
+static void raw_file_format_driver_class_init (RawFileFormatDriverClass * klass) {
+#line 7 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ raw_file_format_driver_parent_class = g_type_class_peek_parent (klass);
+#line 7 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->finalize = raw_file_format_driver_finalize;
+#line 7 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->get_properties = raw_file_format_driver_real_get_properties;
+#line 7 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_reader = raw_file_format_driver_real_create_reader;
+#line 7 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_metadata = raw_file_format_driver_real_create_metadata;
+#line 7 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->can_write_image = raw_file_format_driver_real_can_write_image;
+#line 7 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->can_write_metadata = raw_file_format_driver_real_can_write_metadata;
+#line 7 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_writer = raw_file_format_driver_real_create_writer;
+#line 7 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_metadata_writer = raw_file_format_driver_real_create_metadata_writer;
+#line 7 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_sniffer = raw_file_format_driver_real_create_sniffer;
+#line 856 "RawSupport.c"
+}
+
+
+static void raw_file_format_driver_instance_init (RawFileFormatDriver * self) {
+}
+
+
+static void raw_file_format_driver_finalize (PhotoFileFormatDriver* obj) {
+ RawFileFormatDriver * self;
+#line 7 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_RAW_FILE_FORMAT_DRIVER, RawFileFormatDriver);
+#line 7 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ PHOTO_FILE_FORMAT_DRIVER_CLASS (raw_file_format_driver_parent_class)->finalize (obj);
+#line 870 "RawSupport.c"
+}
+
+
+GType raw_file_format_driver_get_type (void) {
+ static volatile gsize raw_file_format_driver_type_id__volatile = 0;
+ if (g_once_init_enter (&raw_file_format_driver_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (RawFileFormatDriverClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) raw_file_format_driver_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RawFileFormatDriver), 0, (GInstanceInitFunc) raw_file_format_driver_instance_init, NULL };
+ GType raw_file_format_driver_type_id;
+ raw_file_format_driver_type_id = g_type_register_static (TYPE_PHOTO_FILE_FORMAT_DRIVER, "RawFileFormatDriver", &g_define_type_info, 0);
+ g_once_init_leave (&raw_file_format_driver_type_id__volatile, raw_file_format_driver_type_id);
+ }
+ return raw_file_format_driver_type_id__volatile;
+}
+
+
+void raw_file_format_properties_init (void) {
+ RawFileFormatProperties* _tmp0_ = NULL;
+#line 122 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = raw_file_format_properties_new ();
+#line 122 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _photo_file_format_properties_unref0 (raw_file_format_properties_instance);
+#line 122 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ raw_file_format_properties_instance = _tmp0_;
+#line 894 "RawSupport.c"
+}
+
+
+static gpointer _photo_file_format_properties_ref0 (gpointer self) {
+#line 126 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return self ? photo_file_format_properties_ref (self) : NULL;
+#line 901 "RawSupport.c"
+}
+
+
+RawFileFormatProperties* raw_file_format_properties_get_instance (void) {
+ RawFileFormatProperties* result = NULL;
+ RawFileFormatProperties* _tmp0_ = NULL;
+ RawFileFormatProperties* _tmp1_ = NULL;
+#line 126 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = raw_file_format_properties_instance;
+#line 126 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = _photo_file_format_properties_ref0 (_tmp0_);
+#line 126 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = _tmp1_;
+#line 126 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 917 "RawSupport.c"
+}
+
+
+static PhotoFileFormat raw_file_format_properties_real_get_file_format (PhotoFileFormatProperties* base) {
+ RawFileFormatProperties * self;
+ PhotoFileFormat result = 0;
+#line 129 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RAW_FILE_FORMAT_PROPERTIES, RawFileFormatProperties);
+#line 130 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = PHOTO_FILE_FORMAT_RAW;
+#line 130 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 930 "RawSupport.c"
+}
+
+
+static gchar* raw_file_format_properties_real_get_user_visible_name (PhotoFileFormatProperties* base) {
+ RawFileFormatProperties * self;
+ gchar* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+#line 133 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RAW_FILE_FORMAT_PROPERTIES, RawFileFormatProperties);
+#line 134 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = _ ("RAW");
+#line 134 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 134 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = _tmp1_;
+#line 134 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 949 "RawSupport.c"
+}
+
+
+static PhotoFileFormatFlags raw_file_format_properties_real_get_flags (PhotoFileFormatProperties* base) {
+ RawFileFormatProperties * self;
+ PhotoFileFormatFlags result = 0;
+#line 137 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RAW_FILE_FORMAT_PROPERTIES, RawFileFormatProperties);
+#line 138 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = PHOTO_FILE_FORMAT_FLAGS_NONE;
+#line 138 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 962 "RawSupport.c"
+}
+
+
+static gchar* raw_file_format_properties_real_get_default_extension (PhotoFileFormatProperties* base) {
+ RawFileFormatProperties * self;
+ gchar* result = NULL;
+ gchar* _tmp0_ = NULL;
+#line 141 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RAW_FILE_FORMAT_PROPERTIES, RawFileFormatProperties);
+#line 145 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = g_strdup ("raw");
+#line 145 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = _tmp0_;
+#line 145 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 978 "RawSupport.c"
+}
+
+
+static gchar** _vala_array_dup12 (gchar** self, int length) {
+ gchar** result;
+ int i;
+#line 149 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = g_new0 (gchar*, length + 1);
+#line 149 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ for (i = 0; i < length; i++) {
+#line 989 "RawSupport.c"
+ gchar* _tmp0_ = NULL;
+#line 149 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = g_strdup (self[i]);
+#line 149 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result[i] = _tmp0_;
+#line 995 "RawSupport.c"
+ }
+#line 149 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 999 "RawSupport.c"
+}
+
+
+static gchar** raw_file_format_properties_real_get_known_extensions (PhotoFileFormatProperties* base, int* result_length1) {
+ RawFileFormatProperties * self;
+ gchar** result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ gchar** _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+ gchar** _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+#line 148 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RAW_FILE_FORMAT_PROPERTIES, RawFileFormatProperties);
+#line 149 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = raw_file_format_properties_KNOWN_EXTENSIONS;
+#line 149 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0__length1 = raw_file_format_properties_KNOWN_EXTENSIONS_length1;
+#line 149 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup12 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
+#line 149 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1__length1 = _tmp0__length1;
+#line 149 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 149 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp2__length1 = _tmp1__length1;
+#line 149 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (result_length1) {
+#line 149 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ *result_length1 = _tmp2__length1;
+#line 1030 "RawSupport.c"
+ }
+#line 149 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = _tmp2_;
+#line 149 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 1036 "RawSupport.c"
+}
+
+
+static gchar* raw_file_format_properties_real_get_default_mime_type (PhotoFileFormatProperties* base) {
+ RawFileFormatProperties * self;
+ gchar* result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+#line 152 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RAW_FILE_FORMAT_PROPERTIES, RawFileFormatProperties);
+#line 153 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = raw_file_format_properties_KNOWN_MIME_TYPES;
+#line 153 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0__length1 = raw_file_format_properties_KNOWN_MIME_TYPES_length1;
+#line 153 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = _tmp0_[0];
+#line 153 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp2_ = g_strdup (_tmp1_);
+#line 153 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = _tmp2_;
+#line 153 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 1061 "RawSupport.c"
+}
+
+
+static gchar** _vala_array_dup13 (gchar** self, int length) {
+ gchar** result;
+ int i;
+#line 157 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = g_new0 (gchar*, length + 1);
+#line 157 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ for (i = 0; i < length; i++) {
+#line 1072 "RawSupport.c"
+ gchar* _tmp0_ = NULL;
+#line 157 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = g_strdup (self[i]);
+#line 157 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result[i] = _tmp0_;
+#line 1078 "RawSupport.c"
+ }
+#line 157 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 1082 "RawSupport.c"
+}
+
+
+static gchar** raw_file_format_properties_real_get_mime_types (PhotoFileFormatProperties* base, int* result_length1) {
+ RawFileFormatProperties * self;
+ gchar** result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ gchar** _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+ gchar** _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+#line 156 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RAW_FILE_FORMAT_PROPERTIES, RawFileFormatProperties);
+#line 157 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = raw_file_format_properties_KNOWN_MIME_TYPES;
+#line 157 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0__length1 = raw_file_format_properties_KNOWN_MIME_TYPES_length1;
+#line 157 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup13 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
+#line 157 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1__length1 = _tmp0__length1;
+#line 157 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 157 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp2__length1 = _tmp1__length1;
+#line 157 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (result_length1) {
+#line 157 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ *result_length1 = _tmp2__length1;
+#line 1113 "RawSupport.c"
+ }
+#line 157 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = _tmp2_;
+#line 157 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 1119 "RawSupport.c"
+}
+
+
+RawFileFormatProperties* raw_file_format_properties_construct (GType object_type) {
+ RawFileFormatProperties* self = NULL;
+#line 52 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = (RawFileFormatProperties*) photo_file_format_properties_construct (object_type);
+#line 52 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return self;
+#line 1129 "RawSupport.c"
+}
+
+
+RawFileFormatProperties* raw_file_format_properties_new (void) {
+#line 52 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return raw_file_format_properties_construct (TYPE_RAW_FILE_FORMAT_PROPERTIES);
+#line 1136 "RawSupport.c"
+}
+
+
+static void raw_file_format_properties_class_init (RawFileFormatPropertiesClass * klass) {
+ gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+ gchar* _tmp8_ = NULL;
+ gchar* _tmp9_ = NULL;
+ gchar* _tmp10_ = NULL;
+ gchar* _tmp11_ = NULL;
+ gchar* _tmp12_ = NULL;
+ gchar* _tmp13_ = NULL;
+ gchar* _tmp14_ = NULL;
+ gchar* _tmp15_ = NULL;
+ gchar* _tmp16_ = NULL;
+ gchar* _tmp17_ = NULL;
+ gchar* _tmp18_ = NULL;
+ gchar* _tmp19_ = NULL;
+ gchar* _tmp20_ = NULL;
+ gchar* _tmp21_ = NULL;
+ gchar* _tmp22_ = NULL;
+ gchar* _tmp23_ = NULL;
+ gchar* _tmp24_ = NULL;
+ gchar* _tmp25_ = NULL;
+ gchar* _tmp26_ = NULL;
+ gchar* _tmp27_ = NULL;
+ gchar* _tmp28_ = NULL;
+ gchar* _tmp29_ = NULL;
+ gchar* _tmp30_ = NULL;
+ gchar* _tmp31_ = NULL;
+ gchar* _tmp32_ = NULL;
+ gchar* _tmp33_ = NULL;
+ gchar* _tmp34_ = NULL;
+ gchar* _tmp35_ = NULL;
+ gchar** _tmp36_ = NULL;
+ gchar* _tmp37_ = NULL;
+ gchar* _tmp38_ = NULL;
+ gchar* _tmp39_ = NULL;
+ gchar* _tmp40_ = NULL;
+ gchar* _tmp41_ = NULL;
+ gchar* _tmp42_ = NULL;
+ gchar* _tmp43_ = NULL;
+ gchar* _tmp44_ = NULL;
+ gchar* _tmp45_ = NULL;
+ gchar* _tmp46_ = NULL;
+ gchar* _tmp47_ = NULL;
+ gchar* _tmp48_ = NULL;
+ gchar* _tmp49_ = NULL;
+ gchar* _tmp50_ = NULL;
+ gchar* _tmp51_ = NULL;
+ gchar* _tmp52_ = NULL;
+ gchar* _tmp53_ = NULL;
+ gchar* _tmp54_ = NULL;
+ gchar* _tmp55_ = NULL;
+ gchar* _tmp56_ = NULL;
+ gchar* _tmp57_ = NULL;
+ gchar* _tmp58_ = NULL;
+ gchar* _tmp59_ = NULL;
+ gchar* _tmp60_ = NULL;
+ gchar* _tmp61_ = NULL;
+ gchar* _tmp62_ = NULL;
+ gchar* _tmp63_ = NULL;
+ gchar* _tmp64_ = NULL;
+ gchar* _tmp65_ = NULL;
+ gchar* _tmp66_ = NULL;
+ gchar* _tmp67_ = NULL;
+ gchar* _tmp68_ = NULL;
+ gchar* _tmp69_ = NULL;
+ gchar* _tmp70_ = NULL;
+ gchar* _tmp71_ = NULL;
+ gchar* _tmp72_ = NULL;
+ gchar* _tmp73_ = NULL;
+ gchar* _tmp74_ = NULL;
+ gchar* _tmp75_ = NULL;
+ gchar* _tmp76_ = NULL;
+ gchar* _tmp77_ = NULL;
+ gchar* _tmp78_ = NULL;
+ gchar* _tmp79_ = NULL;
+ gchar* _tmp80_ = NULL;
+ gchar* _tmp81_ = NULL;
+ gchar* _tmp82_ = NULL;
+ gchar* _tmp83_ = NULL;
+ gchar* _tmp84_ = NULL;
+ gchar* _tmp85_ = NULL;
+ gchar* _tmp86_ = NULL;
+ gchar* _tmp87_ = NULL;
+ gchar** _tmp88_ = NULL;
+#line 52 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ raw_file_format_properties_parent_class = g_type_class_peek_parent (klass);
+#line 52 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->finalize = raw_file_format_properties_finalize;
+#line 52 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_file_format = raw_file_format_properties_real_get_file_format;
+#line 52 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_user_visible_name = raw_file_format_properties_real_get_user_visible_name;
+#line 52 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_flags = raw_file_format_properties_real_get_flags;
+#line 52 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_default_extension = raw_file_format_properties_real_get_default_extension;
+#line 52 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_known_extensions = raw_file_format_properties_real_get_known_extensions;
+#line 52 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_default_mime_type = raw_file_format_properties_real_get_default_mime_type;
+#line 52 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_mime_types = raw_file_format_properties_real_get_mime_types;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = g_strdup ("3fr");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = g_strdup ("arw");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp2_ = g_strdup ("srf");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp3_ = g_strdup ("sr2");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp4_ = g_strdup ("bay");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp5_ = g_strdup ("crw");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp6_ = g_strdup ("cr2");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp7_ = g_strdup ("cap");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp8_ = g_strdup ("iiq");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp9_ = g_strdup ("eip");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp10_ = g_strdup ("dcs");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp11_ = g_strdup ("dcr");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp12_ = g_strdup ("drf");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp13_ = g_strdup ("k25");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp14_ = g_strdup ("kdc");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp15_ = g_strdup ("dng");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp16_ = g_strdup ("erf");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp17_ = g_strdup ("fff");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp18_ = g_strdup ("mef");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp19_ = g_strdup ("mos");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp20_ = g_strdup ("mrw");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp21_ = g_strdup ("nef");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp22_ = g_strdup ("nrw");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp23_ = g_strdup ("orf");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp24_ = g_strdup ("ptx");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp25_ = g_strdup ("pef");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp26_ = g_strdup ("pxn");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp27_ = g_strdup ("r3d");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp28_ = g_strdup ("raf");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp29_ = g_strdup ("raw");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp30_ = g_strdup ("rw2");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp31_ = g_strdup ("raw");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp32_ = g_strdup ("rwl");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp33_ = g_strdup ("rwz");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp34_ = g_strdup ("x3f");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp35_ = g_strdup ("srw");
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_ = g_new0 (gchar*, 36 + 1);
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[0] = _tmp0_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[1] = _tmp1_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[2] = _tmp2_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[3] = _tmp3_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[4] = _tmp4_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[5] = _tmp5_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[6] = _tmp6_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[7] = _tmp7_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[8] = _tmp8_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[9] = _tmp9_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[10] = _tmp10_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[11] = _tmp11_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[12] = _tmp12_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[13] = _tmp13_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[14] = _tmp14_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[15] = _tmp15_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[16] = _tmp16_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[17] = _tmp17_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[18] = _tmp18_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[19] = _tmp19_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[20] = _tmp20_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[21] = _tmp21_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[22] = _tmp22_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[23] = _tmp23_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[24] = _tmp24_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[25] = _tmp25_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[26] = _tmp26_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[27] = _tmp27_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[28] = _tmp28_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[29] = _tmp29_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[30] = _tmp30_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[31] = _tmp31_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[32] = _tmp32_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[33] = _tmp33_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[34] = _tmp34_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_[35] = _tmp35_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ raw_file_format_properties_KNOWN_EXTENSIONS = _tmp36_;
+#line 53 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ raw_file_format_properties_KNOWN_EXTENSIONS_length1 = 36;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp37_ = g_strdup ("image/x-dcraw");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp38_ = g_strdup ("image/x-canon-cr2");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp39_ = g_strdup ("image/x-canon-crw");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp40_ = g_strdup ("image/x-fuji-raf");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp41_ = g_strdup ("image/x-adobe-dng");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp42_ = g_strdup ("image/x-panasonic-raw");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp43_ = g_strdup ("image/x-raw");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp44_ = g_strdup ("image/x-minolta-mrw");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp45_ = g_strdup ("image/x-nikon-nef");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp46_ = g_strdup ("image/x-olympus-orf");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp47_ = g_strdup ("image/x-pentax-pef");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp48_ = g_strdup ("image/x-sony-arw");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp49_ = g_strdup ("image/x-sony-srf");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp50_ = g_strdup ("image/x-sony-sr2");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp51_ = g_strdup ("image/x-samsung-raw");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp52_ = g_strdup ("image/x-3fr");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp53_ = g_strdup ("image/x-arw");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp54_ = g_strdup ("image/x-srf");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp55_ = g_strdup ("image/x-sr2");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp56_ = g_strdup ("image/x-bay");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp57_ = g_strdup ("image/x-crw");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp58_ = g_strdup ("image/x-cr2");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp59_ = g_strdup ("image/x-cap");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp60_ = g_strdup ("image/x-iiq");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp61_ = g_strdup ("image/x-eip");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp62_ = g_strdup ("image/x-dcs");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp63_ = g_strdup ("image/x-dcr");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp64_ = g_strdup ("image/x-drf");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp65_ = g_strdup ("image/x-k25");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp66_ = g_strdup ("image/x-kdc");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp67_ = g_strdup ("image/x-dng");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp68_ = g_strdup ("image/x-erf");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp69_ = g_strdup ("image/x-fff");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp70_ = g_strdup ("image/x-mef");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp71_ = g_strdup ("image/x-mos");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp72_ = g_strdup ("image/x-mrw");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp73_ = g_strdup ("image/x-nef");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp74_ = g_strdup ("image/x-nrw");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp75_ = g_strdup ("image/x-orf");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp76_ = g_strdup ("image/x-ptx");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp77_ = g_strdup ("image/x-pef");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp78_ = g_strdup ("image/x-pxn");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp79_ = g_strdup ("image/x-r3d");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp80_ = g_strdup ("image/x-raf");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp81_ = g_strdup ("image/x-raw");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp82_ = g_strdup ("image/x-rw2");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp83_ = g_strdup ("image/x-raw");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp84_ = g_strdup ("image/x-rwl");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp85_ = g_strdup ("image/x-rwz");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp86_ = g_strdup ("image/x-x3f");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp87_ = g_strdup ("image/x-srw");
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_ = g_new0 (gchar*, 51 + 1);
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[0] = _tmp37_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[1] = _tmp38_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[2] = _tmp39_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[3] = _tmp40_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[4] = _tmp41_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[5] = _tmp42_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[6] = _tmp43_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[7] = _tmp44_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[8] = _tmp45_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[9] = _tmp46_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[10] = _tmp47_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[11] = _tmp48_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[12] = _tmp49_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[13] = _tmp50_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[14] = _tmp51_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[15] = _tmp52_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[16] = _tmp53_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[17] = _tmp54_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[18] = _tmp55_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[19] = _tmp56_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[20] = _tmp57_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[21] = _tmp58_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[22] = _tmp59_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[23] = _tmp60_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[24] = _tmp61_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[25] = _tmp62_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[26] = _tmp63_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[27] = _tmp64_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[28] = _tmp65_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[29] = _tmp66_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[30] = _tmp67_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[31] = _tmp68_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[32] = _tmp69_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[33] = _tmp70_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[34] = _tmp71_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[35] = _tmp72_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[36] = _tmp73_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[37] = _tmp74_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[38] = _tmp75_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[39] = _tmp76_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[40] = _tmp77_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[41] = _tmp78_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[42] = _tmp79_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[43] = _tmp80_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[44] = _tmp81_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[45] = _tmp82_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[46] = _tmp83_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[47] = _tmp84_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[48] = _tmp85_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[49] = _tmp86_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp88_[50] = _tmp87_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ raw_file_format_properties_KNOWN_MIME_TYPES = _tmp88_;
+#line 59 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ raw_file_format_properties_KNOWN_MIME_TYPES_length1 = 51;
+#line 1608 "RawSupport.c"
+}
+
+
+static void raw_file_format_properties_instance_init (RawFileFormatProperties * self) {
+}
+
+
+static void raw_file_format_properties_finalize (PhotoFileFormatProperties* obj) {
+ RawFileFormatProperties * self;
+#line 52 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_RAW_FILE_FORMAT_PROPERTIES, RawFileFormatProperties);
+#line 52 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ PHOTO_FILE_FORMAT_PROPERTIES_CLASS (raw_file_format_properties_parent_class)->finalize (obj);
+#line 1622 "RawSupport.c"
+}
+
+
+GType raw_file_format_properties_get_type (void) {
+ static volatile gsize raw_file_format_properties_type_id__volatile = 0;
+ if (g_once_init_enter (&raw_file_format_properties_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (RawFileFormatPropertiesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) raw_file_format_properties_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RawFileFormatProperties), 0, (GInstanceInitFunc) raw_file_format_properties_instance_init, NULL };
+ GType raw_file_format_properties_type_id;
+ raw_file_format_properties_type_id = g_type_register_static (TYPE_PHOTO_FILE_FORMAT_PROPERTIES, "RawFileFormatProperties", &g_define_type_info, 0);
+ g_once_init_leave (&raw_file_format_properties_type_id__volatile, raw_file_format_properties_type_id);
+ }
+ return raw_file_format_properties_type_id__volatile;
+}
+
+
+RawSniffer* raw_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options) {
+ RawSniffer* self = NULL;
+ GFile* _tmp0_ = NULL;
+ PhotoFileSnifferOptions _tmp1_ = 0;
+#line 162 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_return_val_if_fail (G_IS_FILE (file), NULL);
+#line 163 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = file;
+#line 163 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = options;
+#line 163 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = (RawSniffer*) photo_file_sniffer_construct (object_type, _tmp0_, _tmp1_);
+#line 162 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return self;
+#line 1652 "RawSupport.c"
+}
+
+
+RawSniffer* raw_sniffer_new (GFile* file, PhotoFileSnifferOptions options) {
+#line 162 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return raw_sniffer_construct (TYPE_RAW_SNIFFER, file, options);
+#line 1659 "RawSupport.c"
+}
+
+
+static gpointer _g_error_copy0 (gpointer self) {
+#line 183 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return self ? g_error_copy (self) : NULL;
+#line 1666 "RawSupport.c"
+}
+
+
+static DetectedPhotoInformation* raw_sniffer_real_sniff (PhotoFileSniffer* base, gboolean* is_corrupted, GError** error) {
+ RawSniffer * self;
+ gboolean _vala_is_corrupted = FALSE;
+ DetectedPhotoInformation* result = NULL;
+ DetectedPhotoInformation* detected = NULL;
+ DetectedPhotoInformation* _tmp0_ = NULL;
+ GRawProcessor* processor = NULL;
+ GRawProcessor* _tmp1_ = NULL;
+ GRawProcessor* _tmp2_ = NULL;
+ libraw_output_params_t* _tmp3_ = NULL;
+ libraw_output_params_t* _tmp4_ = NULL;
+ DetectedPhotoInformation* _tmp14_ = NULL;
+ GRawProcessor* _tmp15_ = NULL;
+ libraw_image_sizes_t _tmp16_ = {0};
+ gushort _tmp17_ = 0U;
+ GRawProcessor* _tmp18_ = NULL;
+ libraw_image_sizes_t _tmp19_ = {0};
+ gushort _tmp20_ = 0U;
+ DetectedPhotoInformation* _tmp21_ = NULL;
+ DetectedPhotoInformation* _tmp22_ = NULL;
+ DetectedPhotoInformation* _tmp23_ = NULL;
+ RawReader* reader = NULL;
+ GFile* _tmp24_ = NULL;
+ gchar* _tmp25_ = NULL;
+ gchar* _tmp26_ = NULL;
+ RawReader* _tmp27_ = NULL;
+ RawReader* _tmp28_ = NULL;
+ DetectedPhotoInformation* _tmp34_ = NULL;
+ PhotoMetadata* _tmp35_ = NULL;
+ gboolean _tmp58_ = FALSE;
+ DetectedPhotoInformation* _tmp64_ = NULL;
+ gchar* _tmp65_ = NULL;
+ DetectedPhotoInformation* _tmp66_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 166 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RAW_SNIFFER, RawSniffer);
+#line 168 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _vala_is_corrupted = FALSE;
+#line 170 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = detected_photo_information_new ();
+#line 170 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ detected = _tmp0_;
+#line 172 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = graw_processor_new (LIBRAW_OPTIONS_NONE);
+#line 172 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ processor = _tmp1_;
+#line 173 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp2_ = processor;
+#line 173 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp3_ = graw_processor_get_output_params (_tmp2_);
+#line 173 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp4_ = _tmp3_;
+#line 173 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ (*_tmp4_).user_flip = (gint) GRAW_FLIP_NONE;
+#line 1724 "RawSupport.c"
+ {
+ GRawProcessor* _tmp5_ = NULL;
+ GFile* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+ gchar* _tmp8_ = NULL;
+ GRawProcessor* _tmp9_ = NULL;
+ GRawProcessor* _tmp10_ = NULL;
+#line 176 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp5_ = processor;
+#line 176 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer)->file;
+#line 176 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp7_ = g_file_get_path (_tmp6_);
+#line 176 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp8_ = _tmp7_;
+#line 176 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ graw_processor_open_file (_tmp5_, _tmp8_, &_inner_error_);
+#line 176 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (_tmp8_);
+#line 176 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 176 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 1748 "RawSupport.c"
+ goto __catch29_graw_exception;
+ }
+#line 176 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processor_unref0 (processor);
+#line 176 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _detected_photo_information_unref0 (detected);
+#line 176 "/home/jens/Source/shotwell/src/photos/RawSupport.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 176 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 176 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return NULL;
+#line 1761 "RawSupport.c"
+ }
+#line 177 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp9_ = processor;
+#line 177 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ graw_processor_unpack (_tmp9_, &_inner_error_);
+#line 177 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 177 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 1771 "RawSupport.c"
+ goto __catch29_graw_exception;
+ }
+#line 177 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processor_unref0 (processor);
+#line 177 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _detected_photo_information_unref0 (detected);
+#line 177 "/home/jens/Source/shotwell/src/photos/RawSupport.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 177 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 177 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return NULL;
+#line 1784 "RawSupport.c"
+ }
+#line 178 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp10_ = processor;
+#line 178 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ graw_processor_adjust_sizes_info_only (_tmp10_, &_inner_error_);
+#line 178 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 178 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (_inner_error_->domain == GRAW_EXCEPTION) {
+#line 1794 "RawSupport.c"
+ goto __catch29_graw_exception;
+ }
+#line 178 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processor_unref0 (processor);
+#line 178 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _detected_photo_information_unref0 (detected);
+#line 178 "/home/jens/Source/shotwell/src/photos/RawSupport.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 178 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 178 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return NULL;
+#line 1807 "RawSupport.c"
+ }
+ }
+ goto __finally29;
+ __catch29_graw_exception:
+ {
+ GError* exception = NULL;
+ GError* _tmp11_ = NULL;
+ GError* _tmp12_ = NULL;
+ GError* _tmp13_ = NULL;
+#line 175 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ exception = _inner_error_;
+#line 175 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _inner_error_ = NULL;
+#line 180 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp11_ = exception;
+#line 180 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (g_error_matches (_tmp11_, GRAW_EXCEPTION, GRAW_EXCEPTION_UNSUPPORTED_FILE)) {
+#line 181 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = NULL;
+#line 181 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_error_free0 (exception);
+#line 181 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processor_unref0 (processor);
+#line 181 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _detected_photo_information_unref0 (detected);
+#line 181 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (is_corrupted) {
+#line 181 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ *is_corrupted = _vala_is_corrupted;
+#line 1837 "RawSupport.c"
+ }
+#line 181 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 1841 "RawSupport.c"
+ }
+#line 183 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp12_ = exception;
+#line 183 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp13_ = _g_error_copy0 (_tmp12_);
+#line 183 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _inner_error_ = _tmp13_;
+#line 183 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_error_free0 (exception);
+#line 1851 "RawSupport.c"
+ goto __finally29;
+ }
+ __finally29:
+#line 175 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 175 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 175 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processor_unref0 (processor);
+#line 175 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _detected_photo_information_unref0 (detected);
+#line 175 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return NULL;
+#line 1865 "RawSupport.c"
+ }
+#line 186 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp14_ = detected;
+#line 186 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp15_ = processor;
+#line 186 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp16_ = graw_processor_get_sizes (_tmp15_);
+#line 186 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp17_ = _tmp16_.iwidth;
+#line 186 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp18_ = processor;
+#line 186 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp19_ = graw_processor_get_sizes (_tmp18_);
+#line 186 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp20_ = _tmp19_.iheight;
+#line 186 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ dimensions_init (&_tmp14_->image_dim, (gint) _tmp17_, (gint) _tmp20_);
+#line 187 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp21_ = detected;
+#line 187 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp21_->colorspace = GDK_COLORSPACE_RGB;
+#line 188 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp22_ = detected;
+#line 188 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp22_->channels = 3;
+#line 189 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp23_ = detected;
+#line 189 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp23_->bits_per_channel = 8;
+#line 191 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp24_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer)->file;
+#line 191 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp25_ = g_file_get_path (_tmp24_);
+#line 191 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp26_ = _tmp25_;
+#line 191 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp27_ = raw_reader_new (_tmp26_);
+#line 191 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp28_ = _tmp27_;
+#line 191 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (_tmp26_);
+#line 191 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ reader = _tmp28_;
+#line 1909 "RawSupport.c"
+ {
+ PhotoMetadata* _tmp29_ = NULL;
+ RawReader* _tmp30_ = NULL;
+ PhotoMetadata* _tmp31_ = NULL;
+ DetectedPhotoInformation* _tmp32_ = NULL;
+ PhotoMetadata* _tmp33_ = NULL;
+#line 193 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp30_ = reader;
+#line 193 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp31_ = photo_file_reader_read_metadata (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, TYPE_PHOTO_FILE_READER, PhotoFileReader), &_inner_error_);
+#line 193 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp29_ = _tmp31_;
+#line 193 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 1924 "RawSupport.c"
+ goto __catch30_g_error;
+ }
+#line 193 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp32_ = detected;
+#line 193 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp33_ = _tmp29_;
+#line 193 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp29_ = NULL;
+#line 193 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _media_metadata_unref0 (_tmp32_->metadata);
+#line 193 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp32_->metadata = _tmp33_;
+#line 192 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _media_metadata_unref0 (_tmp29_);
+#line 1939 "RawSupport.c"
+ }
+ goto __finally30;
+ __catch30_g_error:
+ {
+ GError* err = NULL;
+#line 192 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ err = _inner_error_;
+#line 192 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _inner_error_ = NULL;
+#line 192 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_error_free0 (err);
+#line 1951 "RawSupport.c"
+ }
+ __finally30:
+#line 192 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 192 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 192 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _photo_file_adapter_unref0 (reader);
+#line 192 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processor_unref0 (processor);
+#line 192 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _detected_photo_information_unref0 (detected);
+#line 192 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return NULL;
+#line 1966 "RawSupport.c"
+ }
+#line 198 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp34_ = detected;
+#line 198 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp35_ = _tmp34_->metadata;
+#line 198 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (_tmp35_ != NULL) {
+#line 1974 "RawSupport.c"
+ guint8* flattened_sans_thumbnail = NULL;
+ DetectedPhotoInformation* _tmp36_ = NULL;
+ PhotoMetadata* _tmp37_ = NULL;
+ gint _tmp38_ = 0;
+ guint8* _tmp39_ = NULL;
+ gint flattened_sans_thumbnail_length1 = 0;
+ gint _flattened_sans_thumbnail_size_ = 0;
+ gboolean _tmp40_ = FALSE;
+ guint8* _tmp41_ = NULL;
+ gint _tmp41__length1 = 0;
+ guint8* flattened_thumbnail = NULL;
+ DetectedPhotoInformation* _tmp47_ = NULL;
+ PhotoMetadata* _tmp48_ = NULL;
+ gint _tmp49_ = 0;
+ guint8* _tmp50_ = NULL;
+ gint flattened_thumbnail_length1 = 0;
+ gint _flattened_thumbnail_size_ = 0;
+ gboolean _tmp51_ = FALSE;
+ guint8* _tmp52_ = NULL;
+ gint _tmp52__length1 = 0;
+#line 199 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_ = detected;
+#line 199 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp37_ = _tmp36_->metadata;
+#line 199 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp39_ = photo_metadata_flatten_exif (_tmp37_, FALSE, &_tmp38_);
+#line 199 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ flattened_sans_thumbnail = _tmp39_;
+#line 199 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ flattened_sans_thumbnail_length1 = _tmp38_;
+#line 199 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _flattened_sans_thumbnail_size_ = flattened_sans_thumbnail_length1;
+#line 200 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp41_ = flattened_sans_thumbnail;
+#line 200 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp41__length1 = flattened_sans_thumbnail_length1;
+#line 200 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (_tmp41_ != NULL) {
+#line 2013 "RawSupport.c"
+ guint8* _tmp42_ = NULL;
+ gint _tmp42__length1 = 0;
+#line 200 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp42_ = flattened_sans_thumbnail;
+#line 200 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp42__length1 = flattened_sans_thumbnail_length1;
+#line 200 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp40_ = _tmp42__length1 > 0;
+#line 2022 "RawSupport.c"
+ } else {
+#line 200 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp40_ = FALSE;
+#line 2026 "RawSupport.c"
+ }
+#line 200 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (_tmp40_) {
+#line 2030 "RawSupport.c"
+ DetectedPhotoInformation* _tmp43_ = NULL;
+ guint8* _tmp44_ = NULL;
+ gint _tmp44__length1 = 0;
+ guint8* _tmp45_ = NULL;
+ gint _tmp45__length1 = 0;
+ gchar* _tmp46_ = NULL;
+#line 201 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp43_ = detected;
+#line 201 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp44_ = flattened_sans_thumbnail;
+#line 201 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp44__length1 = flattened_sans_thumbnail_length1;
+#line 201 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp45_ = flattened_sans_thumbnail;
+#line 201 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp45__length1 = flattened_sans_thumbnail_length1;
+#line 201 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp46_ = md5_binary (_tmp44_, (gsize) _tmp45__length1);
+#line 201 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (_tmp43_->exif_md5);
+#line 201 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp43_->exif_md5 = _tmp46_;
+#line 2053 "RawSupport.c"
+ }
+#line 203 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp47_ = detected;
+#line 203 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp48_ = _tmp47_->metadata;
+#line 203 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp50_ = photo_metadata_flatten_exif_preview (_tmp48_, &_tmp49_);
+#line 203 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ flattened_thumbnail = _tmp50_;
+#line 203 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ flattened_thumbnail_length1 = _tmp49_;
+#line 203 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _flattened_thumbnail_size_ = flattened_thumbnail_length1;
+#line 204 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp52_ = flattened_thumbnail;
+#line 204 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp52__length1 = flattened_thumbnail_length1;
+#line 204 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (_tmp52_ != NULL) {
+#line 2073 "RawSupport.c"
+ guint8* _tmp53_ = NULL;
+ gint _tmp53__length1 = 0;
+#line 204 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp53_ = flattened_thumbnail;
+#line 204 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp53__length1 = flattened_thumbnail_length1;
+#line 204 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp51_ = _tmp53__length1 > 0;
+#line 2082 "RawSupport.c"
+ } else {
+#line 204 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp51_ = FALSE;
+#line 2086 "RawSupport.c"
+ }
+#line 204 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (_tmp51_) {
+#line 2090 "RawSupport.c"
+ DetectedPhotoInformation* _tmp54_ = NULL;
+ guint8* _tmp55_ = NULL;
+ gint _tmp55__length1 = 0;
+ guint8* _tmp56_ = NULL;
+ gint _tmp56__length1 = 0;
+ gchar* _tmp57_ = NULL;
+#line 205 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp54_ = detected;
+#line 205 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp55_ = flattened_thumbnail;
+#line 205 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp55__length1 = flattened_thumbnail_length1;
+#line 205 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp56_ = flattened_thumbnail;
+#line 205 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp56__length1 = flattened_thumbnail_length1;
+#line 205 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp57_ = md5_binary (_tmp55_, (gsize) _tmp56__length1);
+#line 205 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (_tmp54_->thumbnail_md5);
+#line 205 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp54_->thumbnail_md5 = _tmp57_;
+#line 2113 "RawSupport.c"
+ }
+#line 198 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ flattened_thumbnail = (g_free (flattened_thumbnail), NULL);
+#line 198 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ flattened_sans_thumbnail = (g_free (flattened_sans_thumbnail), NULL);
+#line 2119 "RawSupport.c"
+ }
+#line 208 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp58_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer)->calc_md5;
+#line 208 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (_tmp58_) {
+#line 2125 "RawSupport.c"
+ gchar* _tmp59_ = NULL;
+ GFile* _tmp60_ = NULL;
+ gchar* _tmp61_ = NULL;
+ DetectedPhotoInformation* _tmp62_ = NULL;
+ gchar* _tmp63_ = NULL;
+#line 209 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp60_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer)->file;
+#line 209 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp61_ = md5_file (_tmp60_, &_inner_error_);
+#line 209 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp59_ = _tmp61_;
+#line 209 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 209 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 209 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _photo_file_adapter_unref0 (reader);
+#line 209 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processor_unref0 (processor);
+#line 209 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _detected_photo_information_unref0 (detected);
+#line 209 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return NULL;
+#line 2149 "RawSupport.c"
+ }
+#line 209 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp62_ = detected;
+#line 209 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp63_ = _tmp59_;
+#line 209 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp59_ = NULL;
+#line 209 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (_tmp62_->md5);
+#line 209 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp62_->md5 = _tmp63_;
+#line 208 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (_tmp59_);
+#line 2163 "RawSupport.c"
+ }
+#line 211 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp64_ = detected;
+#line 211 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp65_ = g_strdup ("raw");
+#line 211 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (_tmp64_->format_name);
+#line 211 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp64_->format_name = _tmp65_;
+#line 212 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp66_ = detected;
+#line 212 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp66_->file_format = PHOTO_FILE_FORMAT_RAW;
+#line 214 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = detected;
+#line 214 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _photo_file_adapter_unref0 (reader);
+#line 214 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processor_unref0 (processor);
+#line 214 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (is_corrupted) {
+#line 214 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ *is_corrupted = _vala_is_corrupted;
+#line 2187 "RawSupport.c"
+ }
+#line 214 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 2191 "RawSupport.c"
+}
+
+
+static void raw_sniffer_class_init (RawSnifferClass * klass) {
+#line 161 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ raw_sniffer_parent_class = g_type_class_peek_parent (klass);
+#line 161 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileSnifferClass *) klass)->sniff = raw_sniffer_real_sniff;
+#line 2200 "RawSupport.c"
+}
+
+
+static void raw_sniffer_instance_init (RawSniffer * self) {
+}
+
+
+GType raw_sniffer_get_type (void) {
+ static volatile gsize raw_sniffer_type_id__volatile = 0;
+ if (g_once_init_enter (&raw_sniffer_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (RawSnifferClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) raw_sniffer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RawSniffer), 0, (GInstanceInitFunc) raw_sniffer_instance_init, NULL };
+ GType raw_sniffer_type_id;
+ raw_sniffer_type_id = g_type_register_static (TYPE_PHOTO_FILE_SNIFFER, "RawSniffer", &g_define_type_info, 0);
+ g_once_init_leave (&raw_sniffer_type_id__volatile, raw_sniffer_type_id);
+ }
+ return raw_sniffer_type_id__volatile;
+}
+
+
+RawReader* raw_reader_construct (GType object_type, const gchar* filepath) {
+ RawReader* self = NULL;
+ const gchar* _tmp0_ = NULL;
+#line 219 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 220 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = filepath;
+#line 220 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = (RawReader*) photo_file_reader_construct (object_type, _tmp0_, PHOTO_FILE_FORMAT_RAW);
+#line 219 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return self;
+#line 2231 "RawSupport.c"
+}
+
+
+RawReader* raw_reader_new (const gchar* filepath) {
+#line 219 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return raw_reader_construct (TYPE_RAW_READER, filepath);
+#line 2238 "RawSupport.c"
+}
+
+
+static PhotoMetadata* raw_reader_real_read_metadata (PhotoFileReader* base, GError** error) {
+ RawReader * self;
+ PhotoMetadata* result = NULL;
+ PhotoMetadata* metadata = NULL;
+ PhotoMetadata* _tmp0_ = NULL;
+ GFile* _tmp1_ = NULL;
+ GFile* _tmp2_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 223 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RAW_READER, RawReader);
+#line 224 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = photo_metadata_new ();
+#line 224 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ metadata = _tmp0_;
+#line 225 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = photo_file_adapter_get_file (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 225 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 225 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ media_metadata_read_from_file (G_TYPE_CHECK_INSTANCE_CAST (metadata, TYPE_MEDIA_METADATA, MediaMetadata), _tmp2_, &_inner_error_);
+#line 225 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_object_unref0 (_tmp2_);
+#line 225 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 225 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 225 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _media_metadata_unref0 (metadata);
+#line 225 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return NULL;
+#line 2272 "RawSupport.c"
+ }
+#line 227 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = metadata;
+#line 227 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 2278 "RawSupport.c"
+}
+
+
+static GdkPixbuf* raw_reader_real_unscaled_read (PhotoFileReader* base, GError** error) {
+ RawReader * self;
+ GdkPixbuf* result = NULL;
+ GRawProcessor* processor = NULL;
+ GRawProcessor* _tmp0_ = NULL;
+ GRawProcessor* _tmp1_ = NULL;
+ GRawProcessor* _tmp2_ = NULL;
+ libraw_output_params_t* _tmp3_ = NULL;
+ libraw_output_params_t* _tmp4_ = NULL;
+ GRawProcessor* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+ GRawProcessor* _tmp8_ = NULL;
+ GRawProcessor* _tmp9_ = NULL;
+ GRawProcessedImage* _tmp10_ = NULL;
+ GRawProcessor* _tmp11_ = NULL;
+ GRawProcessedImage* _tmp12_ = NULL;
+ GRawProcessedImage* _tmp13_ = NULL;
+ GRawProcessedImage* _tmp14_ = NULL;
+ GdkPixbuf* _tmp15_ = NULL;
+ GdkPixbuf* _tmp16_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 230 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RAW_READER, RawReader);
+#line 231 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = graw_processor_new (LIBRAW_OPTIONS_NONE);
+#line 231 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ processor = _tmp0_;
+#line 232 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = processor;
+#line 232 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ graw_processor_configure_for_rgb_display (_tmp1_, FALSE);
+#line 233 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp2_ = processor;
+#line 233 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp3_ = graw_processor_get_output_params (_tmp2_);
+#line 233 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp4_ = _tmp3_;
+#line 233 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ (*_tmp4_).user_flip = (gint) GRAW_FLIP_NONE;
+#line 235 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp5_ = processor;
+#line 235 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp6_ = photo_file_adapter_get_filepath (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 235 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp7_ = _tmp6_;
+#line 235 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ graw_processor_open_file (_tmp5_, _tmp7_, &_inner_error_);
+#line 235 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (_tmp7_);
+#line 235 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 235 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 235 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processor_unref0 (processor);
+#line 235 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return NULL;
+#line 2340 "RawSupport.c"
+ }
+#line 236 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp8_ = processor;
+#line 236 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ graw_processor_unpack (_tmp8_, &_inner_error_);
+#line 236 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 236 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 236 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processor_unref0 (processor);
+#line 236 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return NULL;
+#line 2354 "RawSupport.c"
+ }
+#line 237 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp9_ = processor;
+#line 237 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ graw_processor_process (_tmp9_, &_inner_error_);
+#line 237 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 237 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 237 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processor_unref0 (processor);
+#line 237 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return NULL;
+#line 2368 "RawSupport.c"
+ }
+#line 239 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp11_ = processor;
+#line 239 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp12_ = graw_processor_make_mem_image (_tmp11_, &_inner_error_);
+#line 239 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp10_ = _tmp12_;
+#line 239 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 239 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 239 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processor_unref0 (processor);
+#line 239 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return NULL;
+#line 2384 "RawSupport.c"
+ }
+#line 239 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp13_ = _tmp10_;
+#line 239 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp10_ = NULL;
+#line 239 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp14_ = _tmp13_;
+#line 239 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp15_ = graw_processed_image_get_pixbuf_copy (_tmp14_);
+#line 239 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp16_ = _tmp15_;
+#line 239 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processed_image_unref0 (_tmp14_);
+#line 239 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = _tmp16_;
+#line 239 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processed_image_unref0 (_tmp10_);
+#line 239 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processor_unref0 (processor);
+#line 239 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 2406 "RawSupport.c"
+}
+
+
+static GdkPixbuf* raw_reader_real_scaled_read (PhotoFileReader* base, Dimensions* full, Dimensions* scaled, GError** error) {
+ RawReader * self;
+ GdkPixbuf* result = NULL;
+ gdouble width_proportion = 0.0;
+ Dimensions _tmp0_ = {0};
+ gint _tmp1_ = 0;
+ Dimensions _tmp2_ = {0};
+ gint _tmp3_ = 0;
+ gdouble height_proportion = 0.0;
+ Dimensions _tmp4_ = {0};
+ gint _tmp5_ = 0;
+ Dimensions _tmp6_ = {0};
+ gint _tmp7_ = 0;
+ gboolean _tmp8_ = FALSE;
+ gdouble _tmp9_ = 0.0;
+ gboolean half_size = FALSE;
+ GRawProcessor* processor = NULL;
+ GRawProcessor* _tmp11_ = NULL;
+ GRawProcessor* _tmp12_ = NULL;
+ gboolean _tmp13_ = FALSE;
+ GRawProcessor* _tmp14_ = NULL;
+ libraw_output_params_t* _tmp15_ = NULL;
+ libraw_output_params_t* _tmp16_ = NULL;
+ GRawProcessor* _tmp17_ = NULL;
+ gchar* _tmp18_ = NULL;
+ gchar* _tmp19_ = NULL;
+ GRawProcessor* _tmp20_ = NULL;
+ GRawProcessor* _tmp21_ = NULL;
+ GRawProcessedImage* image = NULL;
+ GRawProcessor* _tmp22_ = NULL;
+ GRawProcessedImage* _tmp23_ = NULL;
+ GRawProcessedImage* _tmp24_ = NULL;
+ GdkPixbuf* _tmp25_ = NULL;
+ GdkPixbuf* _tmp26_ = NULL;
+ Dimensions _tmp27_ = {0};
+ GdkPixbuf* _tmp28_ = NULL;
+ GdkPixbuf* _tmp29_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 242 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RAW_READER, RawReader);
+#line 242 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_return_val_if_fail (full != NULL, NULL);
+#line 242 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_return_val_if_fail (scaled != NULL, NULL);
+#line 243 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = *scaled;
+#line 243 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = _tmp0_.width;
+#line 243 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp2_ = *full;
+#line 243 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp3_ = _tmp2_.width;
+#line 243 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ width_proportion = ((gdouble) _tmp1_) / ((gdouble) _tmp3_);
+#line 244 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp4_ = *scaled;
+#line 244 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp5_ = _tmp4_.height;
+#line 244 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp6_ = *full;
+#line 244 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp7_ = _tmp6_.height;
+#line 244 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ height_proportion = ((gdouble) _tmp5_) / ((gdouble) _tmp7_);
+#line 245 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp9_ = width_proportion;
+#line 245 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (_tmp9_ < 0.5) {
+#line 2478 "RawSupport.c"
+ gdouble _tmp10_ = 0.0;
+#line 245 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp10_ = height_proportion;
+#line 245 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp8_ = _tmp10_ < 0.5;
+#line 2484 "RawSupport.c"
+ } else {
+#line 245 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp8_ = FALSE;
+#line 2488 "RawSupport.c"
+ }
+#line 245 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ half_size = _tmp8_;
+#line 247 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp11_ = graw_processor_new (LIBRAW_OPTIONS_NONE);
+#line 247 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ processor = _tmp11_;
+#line 248 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp12_ = processor;
+#line 248 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp13_ = half_size;
+#line 248 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ graw_processor_configure_for_rgb_display (_tmp12_, _tmp13_);
+#line 249 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp14_ = processor;
+#line 249 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp15_ = graw_processor_get_output_params (_tmp14_);
+#line 249 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp16_ = _tmp15_;
+#line 249 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ (*_tmp16_).user_flip = (gint) GRAW_FLIP_NONE;
+#line 251 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp17_ = processor;
+#line 251 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp18_ = photo_file_adapter_get_filepath (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 251 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp19_ = _tmp18_;
+#line 251 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ graw_processor_open_file (_tmp17_, _tmp19_, &_inner_error_);
+#line 251 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (_tmp19_);
+#line 251 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 251 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 251 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processor_unref0 (processor);
+#line 251 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return NULL;
+#line 2528 "RawSupport.c"
+ }
+#line 252 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp20_ = processor;
+#line 252 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ graw_processor_unpack (_tmp20_, &_inner_error_);
+#line 252 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 252 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 252 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processor_unref0 (processor);
+#line 252 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return NULL;
+#line 2542 "RawSupport.c"
+ }
+#line 253 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp21_ = processor;
+#line 253 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ graw_processor_process (_tmp21_, &_inner_error_);
+#line 253 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 253 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 253 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processor_unref0 (processor);
+#line 253 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return NULL;
+#line 2556 "RawSupport.c"
+ }
+#line 255 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp22_ = processor;
+#line 255 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp23_ = graw_processor_make_mem_image (_tmp22_, &_inner_error_);
+#line 255 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ image = _tmp23_;
+#line 255 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 255 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 255 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processor_unref0 (processor);
+#line 255 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return NULL;
+#line 2572 "RawSupport.c"
+ }
+#line 257 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp24_ = image;
+#line 257 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp25_ = graw_processed_image_get_pixbuf_copy (_tmp24_);
+#line 257 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp26_ = _tmp25_;
+#line 257 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp27_ = *scaled;
+#line 257 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp28_ = resize_pixbuf (_tmp26_, &_tmp27_, GDK_INTERP_BILINEAR);
+#line 257 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp29_ = _tmp28_;
+#line 257 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_object_unref0 (_tmp26_);
+#line 257 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = _tmp29_;
+#line 257 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processed_image_unref0 (image);
+#line 257 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _graw_processor_unref0 (processor);
+#line 257 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 2596 "RawSupport.c"
+}
+
+
+static void raw_reader_class_init (RawReaderClass * klass) {
+#line 218 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ raw_reader_parent_class = g_type_class_peek_parent (klass);
+#line 218 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileReaderClass *) klass)->read_metadata = raw_reader_real_read_metadata;
+#line 218 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileReaderClass *) klass)->unscaled_read = raw_reader_real_unscaled_read;
+#line 218 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ((PhotoFileReaderClass *) klass)->scaled_read = raw_reader_real_scaled_read;
+#line 2609 "RawSupport.c"
+}
+
+
+static void raw_reader_instance_init (RawReader * self) {
+}
+
+
+GType raw_reader_get_type (void) {
+ static volatile gsize raw_reader_type_id__volatile = 0;
+ if (g_once_init_enter (&raw_reader_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (RawReaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) raw_reader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RawReader), 0, (GInstanceInitFunc) raw_reader_instance_init, NULL };
+ GType raw_reader_type_id;
+ raw_reader_type_id = g_type_register_static (TYPE_PHOTO_FILE_READER, "RawReader", &g_define_type_info, 0);
+ g_once_init_leave (&raw_reader_type_id__volatile, raw_reader_type_id);
+ }
+ return raw_reader_type_id__volatile;
+}
+
+
+RawDeveloper* raw_developer_as_array (int* result_length1) {
+ RawDeveloper* result = NULL;
+ RawDeveloper* _tmp0_ = NULL;
+ RawDeveloper* _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+#line 268 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = g_new0 (RawDeveloper, 3);
+#line 268 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_[0] = RAW_DEVELOPER_SHOTWELL;
+#line 268 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_[1] = RAW_DEVELOPER_CAMERA;
+#line 268 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_[2] = RAW_DEVELOPER_EMBEDDED;
+#line 268 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = _tmp0_;
+#line 268 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1__length1 = 3;
+#line 268 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (result_length1) {
+#line 268 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ *result_length1 = _tmp1__length1;
+#line 2650 "RawSupport.c"
+ }
+#line 268 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = _tmp1_;
+#line 268 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 2656 "RawSupport.c"
+}
+
+
+gchar* raw_developer_to_string (RawDeveloper self) {
+ gchar* result = NULL;
+#line 272 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ switch (self) {
+#line 272 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ case RAW_DEVELOPER_SHOTWELL:
+#line 2666 "RawSupport.c"
+ {
+ gchar* _tmp0_ = NULL;
+#line 274 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = g_strdup ("SHOTWELL");
+#line 274 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = _tmp0_;
+#line 274 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 2675 "RawSupport.c"
+ }
+#line 272 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ case RAW_DEVELOPER_CAMERA:
+#line 2679 "RawSupport.c"
+ {
+ gchar* _tmp1_ = NULL;
+#line 276 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = g_strdup ("CAMERA");
+#line 276 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = _tmp1_;
+#line 276 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 2688 "RawSupport.c"
+ }
+#line 272 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ case RAW_DEVELOPER_EMBEDDED:
+#line 2692 "RawSupport.c"
+ {
+ gchar* _tmp2_ = NULL;
+#line 278 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp2_ = g_strdup ("EMBEDDED");
+#line 278 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = _tmp2_;
+#line 278 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 2701 "RawSupport.c"
+ }
+ default:
+ {
+#line 280 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_assert_not_reached ();
+#line 2707 "RawSupport.c"
+ }
+ }
+}
+
+
+RawDeveloper raw_developer_from_string (const gchar* value) {
+ RawDeveloper result = 0;
+ const gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ GQuark _tmp3_ = 0U;
+#line 285 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ static GQuark _tmp2_label0 = 0;
+#line 285 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ static GQuark _tmp2_label1 = 0;
+#line 285 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ static GQuark _tmp2_label2 = 0;
+#line 284 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_return_val_if_fail (value != NULL, 0);
+#line 285 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = value;
+#line 285 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = _tmp0_;
+#line 285 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
+#line 285 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("SHOTWELL")))) {
+#line 285 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ switch (0) {
+#line 2736 "RawSupport.c"
+ default:
+ {
+#line 287 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = RAW_DEVELOPER_SHOTWELL;
+#line 287 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 2743 "RawSupport.c"
+ }
+ }
+ } else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("CAMERA")))) {
+#line 285 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ switch (0) {
+#line 2749 "RawSupport.c"
+ default:
+ {
+#line 289 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = RAW_DEVELOPER_CAMERA;
+#line 289 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 2756 "RawSupport.c"
+ }
+ }
+ } else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("EMBEDDED")))) {
+#line 285 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ switch (0) {
+#line 2762 "RawSupport.c"
+ default:
+ {
+#line 291 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = RAW_DEVELOPER_EMBEDDED;
+#line 291 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 2769 "RawSupport.c"
+ }
+ }
+ } else {
+#line 285 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ switch (0) {
+#line 2775 "RawSupport.c"
+ default:
+ {
+#line 293 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_assert_not_reached ();
+#line 2780 "RawSupport.c"
+ }
+ }
+ }
+}
+
+
+gchar* raw_developer_get_label (RawDeveloper self) {
+ gchar* result = NULL;
+#line 298 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ switch (self) {
+#line 298 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ case RAW_DEVELOPER_SHOTWELL:
+#line 2793 "RawSupport.c"
+ {
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+#line 300 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = _ ("Shotwell");
+#line 300 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 300 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = _tmp1_;
+#line 300 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 2805 "RawSupport.c"
+ }
+#line 298 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ case RAW_DEVELOPER_CAMERA:
+#line 298 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ case RAW_DEVELOPER_EMBEDDED:
+#line 2811 "RawSupport.c"
+ {
+ const gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+#line 303 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp2_ = _ ("Camera");
+#line 303 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp3_ = g_strdup (_tmp2_);
+#line 303 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = _tmp3_;
+#line 303 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 2823 "RawSupport.c"
+ }
+ default:
+ {
+#line 305 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_assert_not_reached ();
+#line 2829 "RawSupport.c"
+ }
+ }
+}
+
+
+gboolean raw_developer_is_equivalent (RawDeveloper self, RawDeveloper d) {
+ gboolean result = FALSE;
+ RawDeveloper _tmp0_ = 0;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+#line 312 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = d;
+#line 312 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (self == _tmp0_) {
+#line 313 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = TRUE;
+#line 313 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 2848 "RawSupport.c"
+ }
+#line 315 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (self == RAW_DEVELOPER_CAMERA) {
+#line 2852 "RawSupport.c"
+ RawDeveloper _tmp3_ = 0;
+#line 315 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp3_ = d;
+#line 315 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp2_ = _tmp3_ == RAW_DEVELOPER_EMBEDDED;
+#line 2858 "RawSupport.c"
+ } else {
+#line 315 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp2_ = FALSE;
+#line 2862 "RawSupport.c"
+ }
+#line 315 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (_tmp2_) {
+#line 315 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = TRUE;
+#line 2868 "RawSupport.c"
+ } else {
+ gboolean _tmp4_ = FALSE;
+#line 316 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (self == RAW_DEVELOPER_EMBEDDED) {
+#line 2873 "RawSupport.c"
+ RawDeveloper _tmp5_ = 0;
+#line 316 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp5_ = d;
+#line 316 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp4_ = _tmp5_ == RAW_DEVELOPER_CAMERA;
+#line 2879 "RawSupport.c"
+ } else {
+#line 316 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp4_ = FALSE;
+#line 2883 "RawSupport.c"
+ }
+#line 316 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = _tmp4_;
+#line 2887 "RawSupport.c"
+ }
+#line 315 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (_tmp1_) {
+#line 317 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = TRUE;
+#line 317 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 2895 "RawSupport.c"
+ }
+#line 319 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = FALSE;
+#line 319 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 2901 "RawSupport.c"
+}
+
+
+BackingPhotoRow* raw_developer_create_backing_row_for_development (RawDeveloper self, const gchar* raw_filepath, const gchar* camera_development_filename, GError** error) {
+ BackingPhotoRow* result = NULL;
+ BackingPhotoRow* ns = NULL;
+ BackingPhotoRow* _tmp0_ = NULL;
+ GFile* master = NULL;
+ const gchar* _tmp1_ = NULL;
+ GFile* _tmp2_ = NULL;
+ gchar* name = NULL;
+ gchar* ext = NULL;
+ GFile* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+ gchar* basename = NULL;
+ const gchar* _tmp8_ = NULL;
+ gboolean c = FALSE;
+ GFile* new_back = NULL;
+ GFile* _tmp27_ = NULL;
+ GFile* _tmp28_ = NULL;
+ GFile* _tmp29_ = NULL;
+ const gchar* _tmp30_ = NULL;
+ gboolean _tmp31_ = FALSE;
+ GFile* _tmp32_ = NULL;
+ GFile* _tmp33_ = NULL;
+ GFile* _tmp34_ = NULL;
+ BackingPhotoRow* _tmp35_ = NULL;
+ BackingPhotoRow* _tmp36_ = NULL;
+ GFile* _tmp37_ = NULL;
+ gchar* _tmp38_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 324 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_return_val_if_fail (raw_filepath != NULL, NULL);
+#line 326 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp0_ = backing_photo_row_new ();
+#line 326 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ns = _tmp0_;
+#line 327 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp1_ = raw_filepath;
+#line 327 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp2_ = g_file_new_for_path (_tmp1_);
+#line 327 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ master = _tmp2_;
+#line 329 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp3_ = master;
+#line 329 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp4_ = g_file_get_basename (_tmp3_);
+#line 329 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp5_ = _tmp4_;
+#line 329 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ disassemble_filename (_tmp5_, &_tmp6_, &_tmp7_);
+#line 329 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (name);
+#line 329 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ name = _tmp6_;
+#line 329 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (ext);
+#line 329 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ ext = _tmp7_;
+#line 329 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (_tmp5_);
+#line 335 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp8_ = camera_development_filename;
+#line 335 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (_tmp8_ == NULL) {
+#line 2970 "RawSupport.c"
+ gchar* _tmp9_ = NULL;
+ const gchar* _tmp16_ = NULL;
+ gchar* _tmp17_ = NULL;
+ gchar* _tmp18_ = NULL;
+ const gchar* _tmp19_ = NULL;
+ gchar* _tmp20_ = NULL;
+ gchar* _tmp21_ = NULL;
+ gchar* _tmp22_ = NULL;
+ gchar* _tmp23_ = NULL;
+ gchar* _tmp24_ = NULL;
+#line 337 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (self != RAW_DEVELOPER_CAMERA) {
+#line 2983 "RawSupport.c"
+ gchar* _tmp10_ = NULL;
+ gchar* _tmp11_ = NULL;
+ gchar* _tmp12_ = NULL;
+ gchar* _tmp13_ = NULL;
+ gchar* _tmp14_ = NULL;
+#line 337 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp10_ = raw_developer_to_string (self);
+#line 337 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp11_ = _tmp10_;
+#line 337 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp12_ = g_utf8_strdown (_tmp11_, (gssize) -1);
+#line 337 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp13_ = _tmp12_;
+#line 337 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp14_ = g_strconcat ("_", _tmp13_, NULL);
+#line 337 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (_tmp9_);
+#line 337 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp9_ = _tmp14_;
+#line 337 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (_tmp13_);
+#line 337 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (_tmp11_);
+#line 3007 "RawSupport.c"
+ } else {
+ gchar* _tmp15_ = NULL;
+#line 337 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp15_ = g_strdup ("");
+#line 337 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (_tmp9_);
+#line 337 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp9_ = _tmp15_;
+#line 3016 "RawSupport.c"
+ }
+#line 336 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp16_ = name;
+#line 336 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp17_ = g_strconcat (_tmp16_, "_", NULL);
+#line 336 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp18_ = _tmp17_;
+#line 336 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp19_ = ext;
+#line 336 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp20_ = g_strconcat (_tmp18_, _tmp19_, NULL);
+#line 336 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp21_ = _tmp20_;
+#line 336 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp22_ = g_strconcat (_tmp21_, _tmp9_, NULL);
+#line 336 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp23_ = _tmp22_;
+#line 336 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp24_ = g_strconcat (_tmp23_, ".jpg", NULL);
+#line 336 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (basename);
+#line 336 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ basename = _tmp24_;
+#line 336 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (_tmp23_);
+#line 336 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (_tmp21_);
+#line 336 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (_tmp18_);
+#line 335 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (_tmp9_);
+#line 3048 "RawSupport.c"
+ } else {
+ const gchar* _tmp25_ = NULL;
+ gchar* _tmp26_ = NULL;
+#line 339 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp25_ = camera_development_filename;
+#line 339 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp26_ = g_strdup (_tmp25_);
+#line 339 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (basename);
+#line 339 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ basename = _tmp26_;
+#line 3060 "RawSupport.c"
+ }
+#line 343 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp27_ = master;
+#line 343 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp28_ = g_file_get_parent (_tmp27_);
+#line 343 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp29_ = _tmp28_;
+#line 343 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp30_ = basename;
+#line 343 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp32_ = generate_unique_file (_tmp29_, _tmp30_, &_tmp31_, &_inner_error_);
+#line 343 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ c = _tmp31_;
+#line 343 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp33_ = _tmp32_;
+#line 343 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_object_unref0 (_tmp29_);
+#line 343 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ new_back = _tmp33_;
+#line 343 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 343 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 343 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (basename);
+#line 343 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (ext);
+#line 343 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (name);
+#line 343 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_object_unref0 (master);
+#line 343 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _backing_photo_row_unref0 (ns);
+#line 343 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return NULL;
+#line 3096 "RawSupport.c"
+ }
+#line 344 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp34_ = new_back;
+#line 344 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ claim_file (_tmp34_, &_inner_error_);
+#line 344 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 344 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 344 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_object_unref0 (new_back);
+#line 344 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (basename);
+#line 344 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (ext);
+#line 344 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (name);
+#line 344 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_object_unref0 (master);
+#line 344 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _backing_photo_row_unref0 (ns);
+#line 344 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return NULL;
+#line 3120 "RawSupport.c"
+ }
+#line 345 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp35_ = ns;
+#line 345 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp35_->file_format = PHOTO_FILE_FORMAT_JFIF;
+#line 346 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_ = ns;
+#line 346 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp37_ = new_back;
+#line 346 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp38_ = g_file_get_path (_tmp37_);
+#line 346 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (_tmp36_->filepath);
+#line 346 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _tmp36_->filepath = _tmp38_;
+#line 348 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ result = ns;
+#line 348 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_object_unref0 (new_back);
+#line 348 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (basename);
+#line 348 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (ext);
+#line 348 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_free0 (name);
+#line 348 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ _g_object_unref0 (master);
+#line 348 "/home/jens/Source/shotwell/src/photos/RawSupport.vala"
+ return result;
+#line 3150 "RawSupport.c"
+}
+
+
+GType raw_developer_get_type (void) {
+ static volatile gsize raw_developer_type_id__volatile = 0;
+ if (g_once_init_enter (&raw_developer_type_id__volatile)) {
+ static const GEnumValue values[] = {{RAW_DEVELOPER_SHOTWELL, "RAW_DEVELOPER_SHOTWELL", "shotwell"}, {RAW_DEVELOPER_CAMERA, "RAW_DEVELOPER_CAMERA", "camera"}, {RAW_DEVELOPER_EMBEDDED, "RAW_DEVELOPER_EMBEDDED", "embedded"}, {0, NULL, NULL}};
+ GType raw_developer_type_id;
+ raw_developer_type_id = g_enum_register_static ("RawDeveloper", values);
+ g_once_init_leave (&raw_developer_type_id__volatile, raw_developer_type_id);
+ }
+ return raw_developer_type_id__volatile;
+}
+
+
+
diff --git a/src/photos/TiffSupport.c b/src/photos/TiffSupport.c
new file mode 100644
index 0000000..2e1282e
--- /dev/null
+++ b/src/photos/TiffSupport.c
@@ -0,0 +1,1714 @@
+/* TiffSupport.c generated by valac 0.32.1, the Vala compiler
+ * generated from TiffSupport.vala, do not modify */
+
+/* Copyright 2016 Software Freedom Conservancy Inc.
+ *
+ * This software is licensed under the GNU LGPL (version 2.1 or later).
+ * See the COPYING file in this distribution.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gio/gio.h>
+#include <glib/gi18n-lib.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+
+#define TYPE_PHOTO_FILE_FORMAT_DRIVER (photo_file_format_driver_get_type ())
+#define PHOTO_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriver))
+#define PHOTO_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriverClass))
+#define IS_PHOTO_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_FORMAT_DRIVER))
+#define IS_PHOTO_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_FORMAT_DRIVER))
+#define PHOTO_FILE_FORMAT_DRIVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_FORMAT_DRIVER, PhotoFileFormatDriverClass))
+
+typedef struct _PhotoFileFormatDriver PhotoFileFormatDriver;
+typedef struct _PhotoFileFormatDriverClass PhotoFileFormatDriverClass;
+typedef struct _PhotoFileFormatDriverPrivate PhotoFileFormatDriverPrivate;
+
+#define TYPE_PHOTO_FILE_FORMAT_PROPERTIES (photo_file_format_properties_get_type ())
+#define PHOTO_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatProperties))
+#define PHOTO_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatPropertiesClass))
+#define IS_PHOTO_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES))
+#define IS_PHOTO_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_FORMAT_PROPERTIES))
+#define PHOTO_FILE_FORMAT_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatPropertiesClass))
+
+typedef struct _PhotoFileFormatProperties PhotoFileFormatProperties;
+typedef struct _PhotoFileFormatPropertiesClass PhotoFileFormatPropertiesClass;
+
+#define TYPE_PHOTO_FILE_ADAPTER (photo_file_adapter_get_type ())
+#define PHOTO_FILE_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter))
+#define PHOTO_FILE_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapterClass))
+#define IS_PHOTO_FILE_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_ADAPTER))
+#define IS_PHOTO_FILE_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_ADAPTER))
+#define PHOTO_FILE_ADAPTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapterClass))
+
+typedef struct _PhotoFileAdapter PhotoFileAdapter;
+typedef struct _PhotoFileAdapterClass PhotoFileAdapterClass;
+
+#define TYPE_PHOTO_FILE_READER (photo_file_reader_get_type ())
+#define PHOTO_FILE_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_READER, PhotoFileReader))
+#define PHOTO_FILE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_READER, PhotoFileReaderClass))
+#define IS_PHOTO_FILE_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_READER))
+#define IS_PHOTO_FILE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_READER))
+#define PHOTO_FILE_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_READER, PhotoFileReaderClass))
+
+typedef struct _PhotoFileReader PhotoFileReader;
+typedef struct _PhotoFileReaderClass PhotoFileReaderClass;
+
+#define TYPE_MEDIA_METADATA (media_metadata_get_type ())
+#define MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_METADATA, MediaMetadata))
+#define MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_METADATA, MediaMetadataClass))
+#define IS_MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_METADATA))
+#define IS_MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_METADATA))
+#define MEDIA_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_METADATA, MediaMetadataClass))
+
+typedef struct _MediaMetadata MediaMetadata;
+typedef struct _MediaMetadataClass MediaMetadataClass;
+
+#define TYPE_PHOTO_METADATA (photo_metadata_get_type ())
+#define PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_METADATA, PhotoMetadata))
+#define PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_METADATA, PhotoMetadataClass))
+#define IS_PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_METADATA))
+#define IS_PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_METADATA))
+#define PHOTO_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_METADATA, PhotoMetadataClass))
+
+typedef struct _PhotoMetadata PhotoMetadata;
+typedef struct _PhotoMetadataClass PhotoMetadataClass;
+
+#define TYPE_PHOTO_FILE_WRITER (photo_file_writer_get_type ())
+#define PHOTO_FILE_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_WRITER, PhotoFileWriter))
+#define PHOTO_FILE_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_WRITER, PhotoFileWriterClass))
+#define IS_PHOTO_FILE_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_WRITER))
+#define IS_PHOTO_FILE_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_WRITER))
+#define PHOTO_FILE_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_WRITER, PhotoFileWriterClass))
+
+typedef struct _PhotoFileWriter PhotoFileWriter;
+typedef struct _PhotoFileWriterClass PhotoFileWriterClass;
+
+#define TYPE_PHOTO_FILE_METADATA_WRITER (photo_file_metadata_writer_get_type ())
+#define PHOTO_FILE_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriter))
+#define PHOTO_FILE_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriterClass))
+#define IS_PHOTO_FILE_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_METADATA_WRITER))
+#define IS_PHOTO_FILE_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_METADATA_WRITER))
+#define PHOTO_FILE_METADATA_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriterClass))
+
+typedef struct _PhotoFileMetadataWriter PhotoFileMetadataWriter;
+typedef struct _PhotoFileMetadataWriterClass PhotoFileMetadataWriterClass;
+
+#define PHOTO_FILE_SNIFFER_TYPE_OPTIONS (photo_file_sniffer_options_get_type ())
+
+#define TYPE_PHOTO_FILE_SNIFFER (photo_file_sniffer_get_type ())
+#define PHOTO_FILE_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer))
+#define PHOTO_FILE_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSnifferClass))
+#define IS_PHOTO_FILE_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_SNIFFER))
+#define IS_PHOTO_FILE_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_SNIFFER))
+#define PHOTO_FILE_SNIFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSnifferClass))
+
+typedef struct _PhotoFileSniffer PhotoFileSniffer;
+typedef struct _PhotoFileSnifferClass PhotoFileSnifferClass;
+
+#define PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER (photos_tiff_file_format_driver_get_type ())
+#define PHOTOS_TIFF_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER, PhotosTiffFileFormatDriver))
+#define PHOTOS_TIFF_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER, PhotosTiffFileFormatDriverClass))
+#define PHOTOS_IS_TIFF_FILE_FORMAT_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER))
+#define PHOTOS_IS_TIFF_FILE_FORMAT_DRIVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER))
+#define PHOTOS_TIFF_FILE_FORMAT_DRIVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER, PhotosTiffFileFormatDriverClass))
+
+typedef struct _PhotosTiffFileFormatDriver PhotosTiffFileFormatDriver;
+typedef struct _PhotosTiffFileFormatDriverClass PhotosTiffFileFormatDriverClass;
+typedef struct _PhotosTiffFileFormatDriverPrivate PhotosTiffFileFormatDriverPrivate;
+#define _photo_file_format_driver_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_format_driver_unref (var), NULL)))
+
+#define PHOTOS_TYPE_TIFF_FILE_FORMAT_PROPERTIES (photos_tiff_file_format_properties_get_type ())
+#define PHOTOS_TIFF_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHOTOS_TYPE_TIFF_FILE_FORMAT_PROPERTIES, PhotosTiffFileFormatProperties))
+#define PHOTOS_TIFF_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOTOS_TYPE_TIFF_FILE_FORMAT_PROPERTIES, PhotosTiffFileFormatPropertiesClass))
+#define PHOTOS_IS_TIFF_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHOTOS_TYPE_TIFF_FILE_FORMAT_PROPERTIES))
+#define PHOTOS_IS_TIFF_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOTOS_TYPE_TIFF_FILE_FORMAT_PROPERTIES))
+#define PHOTOS_TIFF_FILE_FORMAT_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOTOS_TYPE_TIFF_FILE_FORMAT_PROPERTIES, PhotosTiffFileFormatPropertiesClass))
+
+typedef struct _PhotosTiffFileFormatProperties PhotosTiffFileFormatProperties;
+typedef struct _PhotosTiffFileFormatPropertiesClass PhotosTiffFileFormatPropertiesClass;
+
+#define TYPE_GDK_READER (gdk_reader_get_type ())
+#define GDK_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GDK_READER, GdkReader))
+#define GDK_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GDK_READER, GdkReaderClass))
+#define IS_GDK_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GDK_READER))
+#define IS_GDK_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GDK_READER))
+#define GDK_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GDK_READER, GdkReaderClass))
+
+typedef struct _GdkReader GdkReader;
+typedef struct _GdkReaderClass GdkReaderClass;
+
+#define PHOTOS_TYPE_TIFF_READER (photos_tiff_reader_get_type ())
+#define PHOTOS_TIFF_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHOTOS_TYPE_TIFF_READER, PhotosTiffReader))
+#define PHOTOS_TIFF_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOTOS_TYPE_TIFF_READER, PhotosTiffReaderClass))
+#define PHOTOS_IS_TIFF_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHOTOS_TYPE_TIFF_READER))
+#define PHOTOS_IS_TIFF_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOTOS_TYPE_TIFF_READER))
+#define PHOTOS_TIFF_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOTOS_TYPE_TIFF_READER, PhotosTiffReaderClass))
+
+typedef struct _PhotosTiffReader PhotosTiffReader;
+typedef struct _PhotosTiffReaderClass PhotosTiffReaderClass;
+
+#define PHOTOS_TYPE_TIFF_WRITER (photos_tiff_writer_get_type ())
+#define PHOTOS_TIFF_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHOTOS_TYPE_TIFF_WRITER, PhotosTiffWriter))
+#define PHOTOS_TIFF_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOTOS_TYPE_TIFF_WRITER, PhotosTiffWriterClass))
+#define PHOTOS_IS_TIFF_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHOTOS_TYPE_TIFF_WRITER))
+#define PHOTOS_IS_TIFF_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOTOS_TYPE_TIFF_WRITER))
+#define PHOTOS_TIFF_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOTOS_TYPE_TIFF_WRITER, PhotosTiffWriterClass))
+
+typedef struct _PhotosTiffWriter PhotosTiffWriter;
+typedef struct _PhotosTiffWriterClass PhotosTiffWriterClass;
+
+#define PHOTOS_TYPE_TIFF_METADATA_WRITER (photos_tiff_metadata_writer_get_type ())
+#define PHOTOS_TIFF_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHOTOS_TYPE_TIFF_METADATA_WRITER, PhotosTiffMetadataWriter))
+#define PHOTOS_TIFF_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOTOS_TYPE_TIFF_METADATA_WRITER, PhotosTiffMetadataWriterClass))
+#define PHOTOS_IS_TIFF_METADATA_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHOTOS_TYPE_TIFF_METADATA_WRITER))
+#define PHOTOS_IS_TIFF_METADATA_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOTOS_TYPE_TIFF_METADATA_WRITER))
+#define PHOTOS_TIFF_METADATA_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOTOS_TYPE_TIFF_METADATA_WRITER, PhotosTiffMetadataWriterClass))
+
+typedef struct _PhotosTiffMetadataWriter PhotosTiffMetadataWriter;
+typedef struct _PhotosTiffMetadataWriterClass PhotosTiffMetadataWriterClass;
+
+#define TYPE_GDK_SNIFFER (gdk_sniffer_get_type ())
+#define GDK_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GDK_SNIFFER, GdkSniffer))
+#define GDK_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GDK_SNIFFER, GdkSnifferClass))
+#define IS_GDK_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GDK_SNIFFER))
+#define IS_GDK_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GDK_SNIFFER))
+#define GDK_SNIFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GDK_SNIFFER, GdkSnifferClass))
+
+typedef struct _GdkSniffer GdkSniffer;
+typedef struct _GdkSnifferClass GdkSnifferClass;
+
+#define PHOTOS_TYPE_TIFF_SNIFFER (photos_tiff_sniffer_get_type ())
+#define PHOTOS_TIFF_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHOTOS_TYPE_TIFF_SNIFFER, PhotosTiffSniffer))
+#define PHOTOS_TIFF_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOTOS_TYPE_TIFF_SNIFFER, PhotosTiffSnifferClass))
+#define PHOTOS_IS_TIFF_SNIFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHOTOS_TYPE_TIFF_SNIFFER))
+#define PHOTOS_IS_TIFF_SNIFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOTOS_TYPE_TIFF_SNIFFER))
+#define PHOTOS_TIFF_SNIFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOTOS_TYPE_TIFF_SNIFFER, PhotosTiffSnifferClass))
+
+typedef struct _PhotosTiffSniffer PhotosTiffSniffer;
+typedef struct _PhotosTiffSnifferClass PhotosTiffSnifferClass;
+typedef struct _PhotoFileFormatPropertiesPrivate PhotoFileFormatPropertiesPrivate;
+
+#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ())
+
+#define TYPE_PHOTO_FILE_FORMAT_FLAGS (photo_file_format_flags_get_type ())
+typedef struct _PhotosTiffFileFormatPropertiesPrivate PhotosTiffFileFormatPropertiesPrivate;
+#define _photo_file_format_properties_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_format_properties_unref (var), NULL)))
+typedef struct _PhotoFileSnifferPrivate PhotoFileSnifferPrivate;
+
+#define TYPE_DETECTED_PHOTO_INFORMATION (detected_photo_information_get_type ())
+#define DETECTED_PHOTO_INFORMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformation))
+#define DETECTED_PHOTO_INFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformationClass))
+#define IS_DETECTED_PHOTO_INFORMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DETECTED_PHOTO_INFORMATION))
+#define IS_DETECTED_PHOTO_INFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DETECTED_PHOTO_INFORMATION))
+#define DETECTED_PHOTO_INFORMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DETECTED_PHOTO_INFORMATION, DetectedPhotoInformationClass))
+
+typedef struct _DetectedPhotoInformation DetectedPhotoInformation;
+typedef struct _DetectedPhotoInformationClass DetectedPhotoInformationClass;
+typedef struct _GdkSnifferPrivate GdkSnifferPrivate;
+typedef struct _PhotosTiffSnifferPrivate PhotosTiffSnifferPrivate;
+#define _detected_photo_information_unref0(var) ((var == NULL) ? NULL : (var = (detected_photo_information_unref (var), NULL)))
+typedef struct _DetectedPhotoInformationPrivate DetectedPhotoInformationPrivate;
+
+#define TYPE_DIMENSIONS (dimensions_get_type ())
+typedef struct _Dimensions Dimensions;
+typedef struct _PhotoFileAdapterPrivate PhotoFileAdapterPrivate;
+typedef struct _PhotoFileReaderPrivate PhotoFileReaderPrivate;
+typedef struct _GdkReaderPrivate GdkReaderPrivate;
+typedef struct _PhotosTiffReaderPrivate PhotosTiffReaderPrivate;
+typedef struct _PhotoFileWriterPrivate PhotoFileWriterPrivate;
+
+#define JPEG_TYPE_QUALITY (jpeg_quality_get_type ())
+typedef struct _PhotosTiffWriterPrivate PhotosTiffWriterPrivate;
+#define _g_free0(var) (var = (g_free (var), NULL))
+typedef struct _PhotoFileMetadataWriterPrivate PhotoFileMetadataWriterPrivate;
+typedef struct _PhotosTiffMetadataWriterPrivate PhotosTiffMetadataWriterPrivate;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+
+typedef enum {
+ PHOTO_FILE_SNIFFER_OPTIONS_GET_ALL = 0x00000000,
+ PHOTO_FILE_SNIFFER_OPTIONS_NO_MD5 = 0x00000001
+} PhotoFileSnifferOptions;
+
+struct _PhotoFileFormatDriver {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileFormatDriverPrivate * priv;
+};
+
+struct _PhotoFileFormatDriverClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileFormatDriver *self);
+ PhotoFileFormatProperties* (*get_properties) (PhotoFileFormatDriver* self);
+ PhotoFileReader* (*create_reader) (PhotoFileFormatDriver* self, const gchar* filepath);
+ PhotoMetadata* (*create_metadata) (PhotoFileFormatDriver* self);
+ gboolean (*can_write_image) (PhotoFileFormatDriver* self);
+ gboolean (*can_write_metadata) (PhotoFileFormatDriver* self);
+ PhotoFileWriter* (*create_writer) (PhotoFileFormatDriver* self, const gchar* filepath);
+ PhotoFileMetadataWriter* (*create_metadata_writer) (PhotoFileFormatDriver* self, const gchar* filepath);
+ PhotoFileSniffer* (*create_sniffer) (PhotoFileFormatDriver* self, GFile* file, PhotoFileSnifferOptions options);
+};
+
+struct _PhotosTiffFileFormatDriver {
+ PhotoFileFormatDriver parent_instance;
+ PhotosTiffFileFormatDriverPrivate * priv;
+};
+
+struct _PhotosTiffFileFormatDriverClass {
+ PhotoFileFormatDriverClass parent_class;
+};
+
+typedef enum {
+ PHOTO_FILE_FORMAT_JFIF,
+ PHOTO_FILE_FORMAT_RAW,
+ PHOTO_FILE_FORMAT_PNG,
+ PHOTO_FILE_FORMAT_TIFF,
+ PHOTO_FILE_FORMAT_BMP,
+ PHOTO_FILE_FORMAT_UNKNOWN
+} PhotoFileFormat;
+
+typedef enum {
+ PHOTO_FILE_FORMAT_FLAGS_NONE = 0x00000000
+} PhotoFileFormatFlags;
+
+struct _PhotoFileFormatProperties {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileFormatPropertiesPrivate * priv;
+};
+
+struct _PhotoFileFormatPropertiesClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileFormatProperties *self);
+ PhotoFileFormat (*get_file_format) (PhotoFileFormatProperties* self);
+ PhotoFileFormatFlags (*get_flags) (PhotoFileFormatProperties* self);
+ gboolean (*is_recognized_extension) (PhotoFileFormatProperties* self, const gchar* ext);
+ gchar* (*get_default_extension) (PhotoFileFormatProperties* self);
+ gchar** (*get_known_extensions) (PhotoFileFormatProperties* self, int* result_length1);
+ gchar* (*get_default_mime_type) (PhotoFileFormatProperties* self);
+ gchar** (*get_mime_types) (PhotoFileFormatProperties* self, int* result_length1);
+ gchar* (*get_user_visible_name) (PhotoFileFormatProperties* self);
+};
+
+struct _PhotosTiffFileFormatProperties {
+ PhotoFileFormatProperties parent_instance;
+ PhotosTiffFileFormatPropertiesPrivate * priv;
+};
+
+struct _PhotosTiffFileFormatPropertiesClass {
+ PhotoFileFormatPropertiesClass parent_class;
+};
+
+struct _PhotoFileSniffer {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileSnifferPrivate * priv;
+ GFile* file;
+ PhotoFileSnifferOptions options;
+ gboolean calc_md5;
+};
+
+struct _PhotoFileSnifferClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileSniffer *self);
+ DetectedPhotoInformation* (*sniff) (PhotoFileSniffer* self, gboolean* is_corrupted, GError** error);
+};
+
+struct _GdkSniffer {
+ PhotoFileSniffer parent_instance;
+ GdkSnifferPrivate * priv;
+};
+
+struct _GdkSnifferClass {
+ PhotoFileSnifferClass parent_class;
+};
+
+struct _PhotosTiffSniffer {
+ GdkSniffer parent_instance;
+ PhotosTiffSnifferPrivate * priv;
+};
+
+struct _PhotosTiffSnifferClass {
+ GdkSnifferClass parent_class;
+};
+
+struct _Dimensions {
+ gint width;
+ gint height;
+};
+
+struct _DetectedPhotoInformation {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ DetectedPhotoInformationPrivate * priv;
+ PhotoFileFormat file_format;
+ PhotoMetadata* metadata;
+ gchar* md5;
+ gchar* exif_md5;
+ gchar* thumbnail_md5;
+ gchar* format_name;
+ Dimensions image_dim;
+ GdkColorspace colorspace;
+ gint channels;
+ gint bits_per_channel;
+};
+
+struct _DetectedPhotoInformationClass {
+ GTypeClass parent_class;
+ void (*finalize) (DetectedPhotoInformation *self);
+};
+
+struct _PhotoFileAdapter {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PhotoFileAdapterPrivate * priv;
+};
+
+struct _PhotoFileAdapterClass {
+ GTypeClass parent_class;
+ void (*finalize) (PhotoFileAdapter *self);
+};
+
+struct _PhotoFileReader {
+ PhotoFileAdapter parent_instance;
+ PhotoFileReaderPrivate * priv;
+};
+
+struct _PhotoFileReaderClass {
+ PhotoFileAdapterClass parent_class;
+ PhotoMetadata* (*read_metadata) (PhotoFileReader* self, GError** error);
+ GdkPixbuf* (*unscaled_read) (PhotoFileReader* self, GError** error);
+ GdkPixbuf* (*scaled_read) (PhotoFileReader* self, Dimensions* full, Dimensions* scaled, GError** error);
+};
+
+struct _GdkReader {
+ PhotoFileReader parent_instance;
+ GdkReaderPrivate * priv;
+};
+
+struct _GdkReaderClass {
+ PhotoFileReaderClass parent_class;
+};
+
+struct _PhotosTiffReader {
+ GdkReader parent_instance;
+ PhotosTiffReaderPrivate * priv;
+};
+
+struct _PhotosTiffReaderClass {
+ GdkReaderClass parent_class;
+};
+
+typedef enum {
+ JPEG_QUALITY_LOW = 50,
+ JPEG_QUALITY_MEDIUM = 75,
+ JPEG_QUALITY_HIGH = 90,
+ JPEG_QUALITY_MAXIMUM = 100
+} JpegQuality;
+
+struct _PhotoFileWriter {
+ PhotoFileAdapter parent_instance;
+ PhotoFileWriterPrivate * priv;
+};
+
+struct _PhotoFileWriterClass {
+ PhotoFileAdapterClass parent_class;
+ void (*write) (PhotoFileWriter* self, GdkPixbuf* pixbuf, JpegQuality quality, GError** error);
+};
+
+struct _PhotosTiffWriter {
+ PhotoFileWriter parent_instance;
+ PhotosTiffWriterPrivate * priv;
+};
+
+struct _PhotosTiffWriterClass {
+ PhotoFileWriterClass parent_class;
+};
+
+struct _PhotoFileMetadataWriter {
+ PhotoFileAdapter parent_instance;
+ PhotoFileMetadataWriterPrivate * priv;
+};
+
+struct _PhotoFileMetadataWriterClass {
+ PhotoFileAdapterClass parent_class;
+ void (*write_metadata) (PhotoFileMetadataWriter* self, PhotoMetadata* metadata, GError** error);
+};
+
+struct _PhotosTiffMetadataWriter {
+ PhotoFileMetadataWriter parent_instance;
+ PhotosTiffMetadataWriterPrivate * priv;
+};
+
+struct _PhotosTiffMetadataWriterClass {
+ PhotoFileMetadataWriterClass parent_class;
+};
+
+
+static gpointer photos_tiff_file_format_driver_parent_class = NULL;
+static PhotosTiffFileFormatDriver* photos_tiff_file_format_driver_instance;
+static PhotosTiffFileFormatDriver* photos_tiff_file_format_driver_instance = NULL;
+static gpointer photos_tiff_file_format_properties_parent_class = NULL;
+static gchar** photos_tiff_file_format_properties_KNOWN_EXTENSIONS;
+static gint photos_tiff_file_format_properties_KNOWN_EXTENSIONS_length1;
+static gchar** photos_tiff_file_format_properties_KNOWN_EXTENSIONS = NULL;
+static gint photos_tiff_file_format_properties_KNOWN_EXTENSIONS_length1 = 0;
+static gint _photos_tiff_file_format_properties_KNOWN_EXTENSIONS_size_ = 0;
+static gchar** photos_tiff_file_format_properties_KNOWN_MIME_TYPES;
+static gint photos_tiff_file_format_properties_KNOWN_MIME_TYPES_length1;
+static gchar** photos_tiff_file_format_properties_KNOWN_MIME_TYPES = NULL;
+static gint photos_tiff_file_format_properties_KNOWN_MIME_TYPES_length1 = 0;
+static gint _photos_tiff_file_format_properties_KNOWN_MIME_TYPES_size_ = 0;
+static PhotosTiffFileFormatProperties* photos_tiff_file_format_properties_instance;
+static PhotosTiffFileFormatProperties* photos_tiff_file_format_properties_instance = NULL;
+static gpointer photos_tiff_sniffer_parent_class = NULL;
+static gpointer photos_tiff_reader_parent_class = NULL;
+static gpointer photos_tiff_writer_parent_class = NULL;
+static gpointer photos_tiff_metadata_writer_parent_class = NULL;
+
+gpointer photo_file_format_driver_ref (gpointer instance);
+void photo_file_format_driver_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_format_driver (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_format_driver (GValue* value, gpointer v_object);
+void value_take_photo_file_format_driver (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_format_driver (const GValue* value);
+GType photo_file_format_driver_get_type (void) G_GNUC_CONST;
+gpointer photo_file_format_properties_ref (gpointer instance);
+void photo_file_format_properties_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_format_properties (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_format_properties (GValue* value, gpointer v_object);
+void value_take_photo_file_format_properties (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_format_properties (const GValue* value);
+GType photo_file_format_properties_get_type (void) G_GNUC_CONST;
+gpointer photo_file_adapter_ref (gpointer instance);
+void photo_file_adapter_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_adapter (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_adapter (GValue* value, gpointer v_object);
+void value_take_photo_file_adapter (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_adapter (const GValue* value);
+GType photo_file_adapter_get_type (void) G_GNUC_CONST;
+GType photo_file_reader_get_type (void) G_GNUC_CONST;
+gpointer media_metadata_ref (gpointer instance);
+void media_metadata_unref (gpointer instance);
+GParamSpec* param_spec_media_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_media_metadata (GValue* value, gpointer v_object);
+void value_take_media_metadata (GValue* value, gpointer v_object);
+gpointer value_get_media_metadata (const GValue* value);
+GType media_metadata_get_type (void) G_GNUC_CONST;
+GType photo_metadata_get_type (void) G_GNUC_CONST;
+GType photo_file_writer_get_type (void) G_GNUC_CONST;
+GType photo_file_metadata_writer_get_type (void) G_GNUC_CONST;
+GType photo_file_sniffer_options_get_type (void) G_GNUC_CONST;
+gpointer photo_file_sniffer_ref (gpointer instance);
+void photo_file_sniffer_unref (gpointer instance);
+GParamSpec* param_spec_photo_file_sniffer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_photo_file_sniffer (GValue* value, gpointer v_object);
+void value_take_photo_file_sniffer (GValue* value, gpointer v_object);
+gpointer value_get_photo_file_sniffer (const GValue* value);
+GType photo_file_sniffer_get_type (void) G_GNUC_CONST;
+GType photos_tiff_file_format_driver_get_type (void) G_GNUC_CONST;
+enum {
+ PHOTOS_TIFF_FILE_FORMAT_DRIVER_DUMMY_PROPERTY
+};
+void photos_tiff_file_format_driver_init (void);
+PhotosTiffFileFormatDriver* photos_tiff_file_format_driver_new (void);
+PhotosTiffFileFormatDriver* photos_tiff_file_format_driver_construct (GType object_type);
+void photos_tiff_file_format_properties_init (void);
+PhotosTiffFileFormatDriver* photos_tiff_file_format_driver_get_instance (void);
+static PhotoFileFormatProperties* photos_tiff_file_format_driver_real_get_properties (PhotoFileFormatDriver* base);
+GType photos_tiff_file_format_properties_get_type (void) G_GNUC_CONST;
+PhotosTiffFileFormatProperties* photos_tiff_file_format_properties_get_instance (void);
+static PhotoFileReader* photos_tiff_file_format_driver_real_create_reader (PhotoFileFormatDriver* base, const gchar* filepath);
+PhotosTiffReader* photos_tiff_reader_new (const gchar* filepath);
+PhotosTiffReader* photos_tiff_reader_construct (GType object_type, const gchar* filepath);
+GType gdk_reader_get_type (void) G_GNUC_CONST;
+GType photos_tiff_reader_get_type (void) G_GNUC_CONST;
+static PhotoMetadata* photos_tiff_file_format_driver_real_create_metadata (PhotoFileFormatDriver* base);
+PhotoMetadata* photo_metadata_new (void);
+PhotoMetadata* photo_metadata_construct (GType object_type);
+static gboolean photos_tiff_file_format_driver_real_can_write_image (PhotoFileFormatDriver* base);
+static gboolean photos_tiff_file_format_driver_real_can_write_metadata (PhotoFileFormatDriver* base);
+static PhotoFileWriter* photos_tiff_file_format_driver_real_create_writer (PhotoFileFormatDriver* base, const gchar* filepath);
+PhotosTiffWriter* photos_tiff_writer_new (const gchar* filepath);
+PhotosTiffWriter* photos_tiff_writer_construct (GType object_type, const gchar* filepath);
+GType photos_tiff_writer_get_type (void) G_GNUC_CONST;
+static PhotoFileMetadataWriter* photos_tiff_file_format_driver_real_create_metadata_writer (PhotoFileFormatDriver* base, const gchar* filepath);
+PhotosTiffMetadataWriter* photos_tiff_metadata_writer_new (const gchar* filepath);
+PhotosTiffMetadataWriter* photos_tiff_metadata_writer_construct (GType object_type, const gchar* filepath);
+GType photos_tiff_metadata_writer_get_type (void) G_GNUC_CONST;
+static PhotoFileSniffer* photos_tiff_file_format_driver_real_create_sniffer (PhotoFileFormatDriver* base, GFile* file, PhotoFileSnifferOptions options);
+PhotosTiffSniffer* photos_tiff_sniffer_new (GFile* file, PhotoFileSnifferOptions options);
+PhotosTiffSniffer* photos_tiff_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options);
+GType gdk_sniffer_get_type (void) G_GNUC_CONST;
+GType photos_tiff_sniffer_get_type (void) G_GNUC_CONST;
+PhotoFileFormatDriver* photo_file_format_driver_construct (GType object_type);
+static void photos_tiff_file_format_driver_finalize (PhotoFileFormatDriver* obj);
+GType photo_file_format_get_type (void) G_GNUC_CONST;
+GType photo_file_format_flags_get_type (void) G_GNUC_CONST;
+enum {
+ PHOTOS_TIFF_FILE_FORMAT_PROPERTIES_DUMMY_PROPERTY
+};
+PhotosTiffFileFormatProperties* photos_tiff_file_format_properties_new (void);
+PhotosTiffFileFormatProperties* photos_tiff_file_format_properties_construct (GType object_type);
+static PhotoFileFormat photos_tiff_file_format_properties_real_get_file_format (PhotoFileFormatProperties* base);
+static PhotoFileFormatFlags photos_tiff_file_format_properties_real_get_flags (PhotoFileFormatProperties* base);
+static gchar* photos_tiff_file_format_properties_real_get_default_extension (PhotoFileFormatProperties* base);
+static gchar* photos_tiff_file_format_properties_real_get_user_visible_name (PhotoFileFormatProperties* base);
+static gchar** photos_tiff_file_format_properties_real_get_known_extensions (PhotoFileFormatProperties* base, int* result_length1);
+static gchar** _vala_array_dup16 (gchar** self, int length);
+static gchar* photos_tiff_file_format_properties_real_get_default_mime_type (PhotoFileFormatProperties* base);
+static gchar** photos_tiff_file_format_properties_real_get_mime_types (PhotoFileFormatProperties* base, int* result_length1);
+static gchar** _vala_array_dup17 (gchar** self, int length);
+PhotoFileFormatProperties* photo_file_format_properties_construct (GType object_type);
+static void photos_tiff_file_format_properties_finalize (PhotoFileFormatProperties* obj);
+gpointer detected_photo_information_ref (gpointer instance);
+void detected_photo_information_unref (gpointer instance);
+GParamSpec* param_spec_detected_photo_information (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_detected_photo_information (GValue* value, gpointer v_object);
+void value_take_detected_photo_information (GValue* value, gpointer v_object);
+gpointer value_get_detected_photo_information (const GValue* value);
+GType detected_photo_information_get_type (void) G_GNUC_CONST;
+enum {
+ PHOTOS_TIFF_SNIFFER_DUMMY_PROPERTY
+};
+GdkSniffer* gdk_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options);
+static DetectedPhotoInformation* photos_tiff_sniffer_real_sniff (PhotoFileSniffer* base, gboolean* is_corrupted, GError** error);
+gboolean photos_is_tiff (GFile* file, GCancellable* cancellable, GError** error);
+DetectedPhotoInformation* photo_file_sniffer_sniff (PhotoFileSniffer* self, gboolean* is_corrupted, GError** error);
+GType dimensions_get_type (void) G_GNUC_CONST;
+Dimensions* dimensions_dup (const Dimensions* self);
+void dimensions_free (Dimensions* self);
+enum {
+ PHOTOS_TIFF_READER_DUMMY_PROPERTY
+};
+GdkReader* gdk_reader_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
+GType jpeg_quality_get_type (void) G_GNUC_CONST;
+enum {
+ PHOTOS_TIFF_WRITER_DUMMY_PROPERTY
+};
+#define PHOTOS_TIFF_WRITER_COMPRESSION_NONE "1"
+#define PHOTOS_TIFF_WRITER_COMPRESSION_HUFFMAN "2"
+#define PHOTOS_TIFF_WRITER_COMPRESSION_LZW "5"
+#define PHOTOS_TIFF_WRITER_COMPRESSION_JPEG "7"
+#define PHOTOS_TIFF_WRITER_COMPRESSION_DEFLATE "8"
+PhotoFileWriter* photo_file_writer_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
+static void photos_tiff_writer_real_write (PhotoFileWriter* base, GdkPixbuf* pixbuf, JpegQuality quality, GError** error);
+gchar* photo_file_adapter_get_filepath (PhotoFileAdapter* self);
+enum {
+ PHOTOS_TIFF_METADATA_WRITER_DUMMY_PROPERTY
+};
+PhotoFileMetadataWriter* photo_file_metadata_writer_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
+static void photos_tiff_metadata_writer_real_write_metadata (PhotoFileMetadataWriter* base, PhotoMetadata* metadata, GError** error);
+void photo_metadata_write_to_file (PhotoMetadata* self, GFile* file, GError** error);
+GFile* photo_file_adapter_get_file (PhotoFileAdapter* self);
+
+
+void photos_tiff_file_format_driver_init (void) {
+ PhotosTiffFileFormatDriver* _tmp0_ = NULL;
+#line 13 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = photos_tiff_file_format_driver_new ();
+#line 13 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _photo_file_format_driver_unref0 (photos_tiff_file_format_driver_instance);
+#line 13 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ photos_tiff_file_format_driver_instance = _tmp0_;
+#line 14 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ photos_tiff_file_format_properties_init ();
+#line 620 "TiffSupport.c"
+}
+
+
+static gpointer _photo_file_format_driver_ref0 (gpointer self) {
+#line 18 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return self ? photo_file_format_driver_ref (self) : NULL;
+#line 627 "TiffSupport.c"
+}
+
+
+PhotosTiffFileFormatDriver* photos_tiff_file_format_driver_get_instance (void) {
+ PhotosTiffFileFormatDriver* result = NULL;
+ PhotosTiffFileFormatDriver* _tmp0_ = NULL;
+ PhotosTiffFileFormatDriver* _tmp1_ = NULL;
+#line 18 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = photos_tiff_file_format_driver_instance;
+#line 18 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp1_ = _photo_file_format_driver_ref0 (_tmp0_);
+#line 18 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = _tmp1_;
+#line 18 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 643 "TiffSupport.c"
+}
+
+
+static PhotoFileFormatProperties* photos_tiff_file_format_driver_real_get_properties (PhotoFileFormatDriver* base) {
+ PhotosTiffFileFormatDriver * self;
+ PhotoFileFormatProperties* result = NULL;
+ PhotosTiffFileFormatProperties* _tmp0_ = NULL;
+#line 21 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER, PhotosTiffFileFormatDriver);
+#line 22 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = photos_tiff_file_format_properties_get_instance ();
+#line 22 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatProperties);
+#line 22 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 659 "TiffSupport.c"
+}
+
+
+static PhotoFileReader* photos_tiff_file_format_driver_real_create_reader (PhotoFileFormatDriver* base, const gchar* filepath) {
+ PhotosTiffFileFormatDriver * self;
+ PhotoFileReader* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ PhotosTiffReader* _tmp1_ = NULL;
+#line 25 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER, PhotosTiffFileFormatDriver);
+#line 25 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 26 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = filepath;
+#line 26 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp1_ = photos_tiff_reader_new (_tmp0_);
+#line 26 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO_FILE_READER, PhotoFileReader);
+#line 26 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 680 "TiffSupport.c"
+}
+
+
+static PhotoMetadata* photos_tiff_file_format_driver_real_create_metadata (PhotoFileFormatDriver* base) {
+ PhotosTiffFileFormatDriver * self;
+ PhotoMetadata* result = NULL;
+ PhotoMetadata* _tmp0_ = NULL;
+#line 29 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER, PhotosTiffFileFormatDriver);
+#line 30 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = photo_metadata_new ();
+#line 30 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = _tmp0_;
+#line 30 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 696 "TiffSupport.c"
+}
+
+
+static gboolean photos_tiff_file_format_driver_real_can_write_image (PhotoFileFormatDriver* base) {
+ PhotosTiffFileFormatDriver * self;
+ gboolean result = FALSE;
+#line 33 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER, PhotosTiffFileFormatDriver);
+#line 34 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = TRUE;
+#line 34 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 709 "TiffSupport.c"
+}
+
+
+static gboolean photos_tiff_file_format_driver_real_can_write_metadata (PhotoFileFormatDriver* base) {
+ PhotosTiffFileFormatDriver * self;
+ gboolean result = FALSE;
+#line 37 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER, PhotosTiffFileFormatDriver);
+#line 38 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = TRUE;
+#line 38 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 722 "TiffSupport.c"
+}
+
+
+static PhotoFileWriter* photos_tiff_file_format_driver_real_create_writer (PhotoFileFormatDriver* base, const gchar* filepath) {
+ PhotosTiffFileFormatDriver * self;
+ PhotoFileWriter* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ PhotosTiffWriter* _tmp1_ = NULL;
+#line 41 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER, PhotosTiffFileFormatDriver);
+#line 41 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 42 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = filepath;
+#line 42 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp1_ = photos_tiff_writer_new (_tmp0_);
+#line 42 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO_FILE_WRITER, PhotoFileWriter);
+#line 42 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 743 "TiffSupport.c"
+}
+
+
+static PhotoFileMetadataWriter* photos_tiff_file_format_driver_real_create_metadata_writer (PhotoFileFormatDriver* base, const gchar* filepath) {
+ PhotosTiffFileFormatDriver * self;
+ PhotoFileMetadataWriter* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ PhotosTiffMetadataWriter* _tmp1_ = NULL;
+#line 45 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER, PhotosTiffFileFormatDriver);
+#line 45 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 46 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = filepath;
+#line 46 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp1_ = photos_tiff_metadata_writer_new (_tmp0_);
+#line 46 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriter);
+#line 46 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 764 "TiffSupport.c"
+}
+
+
+static PhotoFileSniffer* photos_tiff_file_format_driver_real_create_sniffer (PhotoFileFormatDriver* base, GFile* file, PhotoFileSnifferOptions options) {
+ PhotosTiffFileFormatDriver * self;
+ PhotoFileSniffer* result = NULL;
+ GFile* _tmp0_ = NULL;
+ PhotoFileSnifferOptions _tmp1_ = 0;
+ PhotosTiffSniffer* _tmp2_ = NULL;
+#line 49 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER, PhotosTiffFileFormatDriver);
+#line 49 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ g_return_val_if_fail (G_IS_FILE (file), NULL);
+#line 50 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = file;
+#line 50 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp1_ = options;
+#line 50 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp2_ = photos_tiff_sniffer_new (_tmp0_, _tmp1_);
+#line 50 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer);
+#line 50 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 788 "TiffSupport.c"
+}
+
+
+PhotosTiffFileFormatDriver* photos_tiff_file_format_driver_construct (GType object_type) {
+ PhotosTiffFileFormatDriver* self = NULL;
+#line 9 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = (PhotosTiffFileFormatDriver*) photo_file_format_driver_construct (object_type);
+#line 9 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return self;
+#line 798 "TiffSupport.c"
+}
+
+
+PhotosTiffFileFormatDriver* photos_tiff_file_format_driver_new (void) {
+#line 9 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return photos_tiff_file_format_driver_construct (PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER);
+#line 805 "TiffSupport.c"
+}
+
+
+static void photos_tiff_file_format_driver_class_init (PhotosTiffFileFormatDriverClass * klass) {
+#line 9 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ photos_tiff_file_format_driver_parent_class = g_type_class_peek_parent (klass);
+#line 9 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->finalize = photos_tiff_file_format_driver_finalize;
+#line 9 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->get_properties = photos_tiff_file_format_driver_real_get_properties;
+#line 9 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_reader = photos_tiff_file_format_driver_real_create_reader;
+#line 9 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_metadata = photos_tiff_file_format_driver_real_create_metadata;
+#line 9 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->can_write_image = photos_tiff_file_format_driver_real_can_write_image;
+#line 9 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->can_write_metadata = photos_tiff_file_format_driver_real_can_write_metadata;
+#line 9 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_writer = photos_tiff_file_format_driver_real_create_writer;
+#line 9 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_metadata_writer = photos_tiff_file_format_driver_real_create_metadata_writer;
+#line 9 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ ((PhotoFileFormatDriverClass *) klass)->create_sniffer = photos_tiff_file_format_driver_real_create_sniffer;
+#line 830 "TiffSupport.c"
+}
+
+
+static void photos_tiff_file_format_driver_instance_init (PhotosTiffFileFormatDriver * self) {
+}
+
+
+static void photos_tiff_file_format_driver_finalize (PhotoFileFormatDriver* obj) {
+ PhotosTiffFileFormatDriver * self;
+#line 9 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, PHOTOS_TYPE_TIFF_FILE_FORMAT_DRIVER, PhotosTiffFileFormatDriver);
+#line 9 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ PHOTO_FILE_FORMAT_DRIVER_CLASS (photos_tiff_file_format_driver_parent_class)->finalize (obj);
+#line 844 "TiffSupport.c"
+}
+
+
+GType photos_tiff_file_format_driver_get_type (void) {
+ static volatile gsize photos_tiff_file_format_driver_type_id__volatile = 0;
+ if (g_once_init_enter (&photos_tiff_file_format_driver_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PhotosTiffFileFormatDriverClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photos_tiff_file_format_driver_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotosTiffFileFormatDriver), 0, (GInstanceInitFunc) photos_tiff_file_format_driver_instance_init, NULL };
+ GType photos_tiff_file_format_driver_type_id;
+ photos_tiff_file_format_driver_type_id = g_type_register_static (TYPE_PHOTO_FILE_FORMAT_DRIVER, "PhotosTiffFileFormatDriver", &g_define_type_info, 0);
+ g_once_init_leave (&photos_tiff_file_format_driver_type_id__volatile, photos_tiff_file_format_driver_type_id);
+ }
+ return photos_tiff_file_format_driver_type_id__volatile;
+}
+
+
+void photos_tiff_file_format_properties_init (void) {
+ PhotosTiffFileFormatProperties* _tmp0_ = NULL;
+#line 66 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = photos_tiff_file_format_properties_new ();
+#line 66 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _photo_file_format_properties_unref0 (photos_tiff_file_format_properties_instance);
+#line 66 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ photos_tiff_file_format_properties_instance = _tmp0_;
+#line 868 "TiffSupport.c"
+}
+
+
+static gpointer _photo_file_format_properties_ref0 (gpointer self) {
+#line 70 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return self ? photo_file_format_properties_ref (self) : NULL;
+#line 875 "TiffSupport.c"
+}
+
+
+PhotosTiffFileFormatProperties* photos_tiff_file_format_properties_get_instance (void) {
+ PhotosTiffFileFormatProperties* result = NULL;
+ PhotosTiffFileFormatProperties* _tmp0_ = NULL;
+ PhotosTiffFileFormatProperties* _tmp1_ = NULL;
+#line 70 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = photos_tiff_file_format_properties_instance;
+#line 70 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp1_ = _photo_file_format_properties_ref0 (_tmp0_);
+#line 70 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = _tmp1_;
+#line 70 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 891 "TiffSupport.c"
+}
+
+
+static PhotoFileFormat photos_tiff_file_format_properties_real_get_file_format (PhotoFileFormatProperties* base) {
+ PhotosTiffFileFormatProperties * self;
+ PhotoFileFormat result = 0;
+#line 73 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_TIFF_FILE_FORMAT_PROPERTIES, PhotosTiffFileFormatProperties);
+#line 74 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = PHOTO_FILE_FORMAT_TIFF;
+#line 74 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 904 "TiffSupport.c"
+}
+
+
+static PhotoFileFormatFlags photos_tiff_file_format_properties_real_get_flags (PhotoFileFormatProperties* base) {
+ PhotosTiffFileFormatProperties * self;
+ PhotoFileFormatFlags result = 0;
+#line 77 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_TIFF_FILE_FORMAT_PROPERTIES, PhotosTiffFileFormatProperties);
+#line 78 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = PHOTO_FILE_FORMAT_FLAGS_NONE;
+#line 78 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 917 "TiffSupport.c"
+}
+
+
+static gchar* photos_tiff_file_format_properties_real_get_default_extension (PhotoFileFormatProperties* base) {
+ PhotosTiffFileFormatProperties * self;
+ gchar* result = NULL;
+ gchar* _tmp0_ = NULL;
+#line 81 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_TIFF_FILE_FORMAT_PROPERTIES, PhotosTiffFileFormatProperties);
+#line 82 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = g_strdup ("tif");
+#line 82 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = _tmp0_;
+#line 82 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 933 "TiffSupport.c"
+}
+
+
+static gchar* photos_tiff_file_format_properties_real_get_user_visible_name (PhotoFileFormatProperties* base) {
+ PhotosTiffFileFormatProperties * self;
+ gchar* result = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+#line 85 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_TIFF_FILE_FORMAT_PROPERTIES, PhotosTiffFileFormatProperties);
+#line 86 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = _ ("TIFF");
+#line 86 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 86 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = _tmp1_;
+#line 86 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 952 "TiffSupport.c"
+}
+
+
+static gchar** _vala_array_dup16 (gchar** self, int length) {
+ gchar** result;
+ int i;
+#line 90 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = g_new0 (gchar*, length + 1);
+#line 90 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ for (i = 0; i < length; i++) {
+#line 963 "TiffSupport.c"
+ gchar* _tmp0_ = NULL;
+#line 90 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = g_strdup (self[i]);
+#line 90 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result[i] = _tmp0_;
+#line 969 "TiffSupport.c"
+ }
+#line 90 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 973 "TiffSupport.c"
+}
+
+
+static gchar** photos_tiff_file_format_properties_real_get_known_extensions (PhotoFileFormatProperties* base, int* result_length1) {
+ PhotosTiffFileFormatProperties * self;
+ gchar** result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ gchar** _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+ gchar** _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+#line 89 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_TIFF_FILE_FORMAT_PROPERTIES, PhotosTiffFileFormatProperties);
+#line 90 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = photos_tiff_file_format_properties_KNOWN_EXTENSIONS;
+#line 90 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0__length1 = photos_tiff_file_format_properties_KNOWN_EXTENSIONS_length1;
+#line 90 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup16 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
+#line 90 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp1__length1 = _tmp0__length1;
+#line 90 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 90 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp2__length1 = _tmp1__length1;
+#line 90 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ if (result_length1) {
+#line 90 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ *result_length1 = _tmp2__length1;
+#line 1004 "TiffSupport.c"
+ }
+#line 90 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = _tmp2_;
+#line 90 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 1010 "TiffSupport.c"
+}
+
+
+static gchar* photos_tiff_file_format_properties_real_get_default_mime_type (PhotoFileFormatProperties* base) {
+ PhotosTiffFileFormatProperties * self;
+ gchar* result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+#line 93 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_TIFF_FILE_FORMAT_PROPERTIES, PhotosTiffFileFormatProperties);
+#line 94 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = photos_tiff_file_format_properties_KNOWN_MIME_TYPES;
+#line 94 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0__length1 = photos_tiff_file_format_properties_KNOWN_MIME_TYPES_length1;
+#line 94 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp1_ = _tmp0_[0];
+#line 94 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp2_ = g_strdup (_tmp1_);
+#line 94 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = _tmp2_;
+#line 94 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 1035 "TiffSupport.c"
+}
+
+
+static gchar** _vala_array_dup17 (gchar** self, int length) {
+ gchar** result;
+ int i;
+#line 98 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = g_new0 (gchar*, length + 1);
+#line 98 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ for (i = 0; i < length; i++) {
+#line 1046 "TiffSupport.c"
+ gchar* _tmp0_ = NULL;
+#line 98 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = g_strdup (self[i]);
+#line 98 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result[i] = _tmp0_;
+#line 1052 "TiffSupport.c"
+ }
+#line 98 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 1056 "TiffSupport.c"
+}
+
+
+static gchar** photos_tiff_file_format_properties_real_get_mime_types (PhotoFileFormatProperties* base, int* result_length1) {
+ PhotosTiffFileFormatProperties * self;
+ gchar** result = NULL;
+ gchar** _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ gchar** _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+ gchar** _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+#line 97 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_TIFF_FILE_FORMAT_PROPERTIES, PhotosTiffFileFormatProperties);
+#line 98 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = photos_tiff_file_format_properties_KNOWN_MIME_TYPES;
+#line 98 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0__length1 = photos_tiff_file_format_properties_KNOWN_MIME_TYPES_length1;
+#line 98 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup17 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
+#line 98 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp1__length1 = _tmp0__length1;
+#line 98 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 98 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp2__length1 = _tmp1__length1;
+#line 98 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ if (result_length1) {
+#line 98 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ *result_length1 = _tmp2__length1;
+#line 1087 "TiffSupport.c"
+ }
+#line 98 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = _tmp2_;
+#line 98 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 1093 "TiffSupport.c"
+}
+
+
+PhotosTiffFileFormatProperties* photos_tiff_file_format_properties_construct (GType object_type) {
+ PhotosTiffFileFormatProperties* self = NULL;
+#line 54 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = (PhotosTiffFileFormatProperties*) photo_file_format_properties_construct (object_type);
+#line 54 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return self;
+#line 1103 "TiffSupport.c"
+}
+
+
+PhotosTiffFileFormatProperties* photos_tiff_file_format_properties_new (void) {
+#line 54 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return photos_tiff_file_format_properties_construct (PHOTOS_TYPE_TIFF_FILE_FORMAT_PROPERTIES);
+#line 1110 "TiffSupport.c"
+}
+
+
+static void photos_tiff_file_format_properties_class_init (PhotosTiffFileFormatPropertiesClass * klass) {
+ gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar** _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ gchar** _tmp4_ = NULL;
+#line 54 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ photos_tiff_file_format_properties_parent_class = g_type_class_peek_parent (klass);
+#line 54 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->finalize = photos_tiff_file_format_properties_finalize;
+#line 54 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_file_format = photos_tiff_file_format_properties_real_get_file_format;
+#line 54 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_flags = photos_tiff_file_format_properties_real_get_flags;
+#line 54 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_default_extension = photos_tiff_file_format_properties_real_get_default_extension;
+#line 54 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_user_visible_name = photos_tiff_file_format_properties_real_get_user_visible_name;
+#line 54 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_known_extensions = photos_tiff_file_format_properties_real_get_known_extensions;
+#line 54 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_default_mime_type = photos_tiff_file_format_properties_real_get_default_mime_type;
+#line 54 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ ((PhotoFileFormatPropertiesClass *) klass)->get_mime_types = photos_tiff_file_format_properties_real_get_mime_types;
+#line 55 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = g_strdup ("tif");
+#line 55 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp1_ = g_strdup ("tiff");
+#line 55 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp2_ = g_new0 (gchar*, 2 + 1);
+#line 55 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp2_[0] = _tmp0_;
+#line 55 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp2_[1] = _tmp1_;
+#line 55 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ photos_tiff_file_format_properties_KNOWN_EXTENSIONS = _tmp2_;
+#line 55 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ photos_tiff_file_format_properties_KNOWN_EXTENSIONS_length1 = 2;
+#line 59 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp3_ = g_strdup ("image/tiff");
+#line 59 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp4_ = g_new0 (gchar*, 1 + 1);
+#line 59 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp4_[0] = _tmp3_;
+#line 59 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ photos_tiff_file_format_properties_KNOWN_MIME_TYPES = _tmp4_;
+#line 59 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ photos_tiff_file_format_properties_KNOWN_MIME_TYPES_length1 = 1;
+#line 1162 "TiffSupport.c"
+}
+
+
+static void photos_tiff_file_format_properties_instance_init (PhotosTiffFileFormatProperties * self) {
+}
+
+
+static void photos_tiff_file_format_properties_finalize (PhotoFileFormatProperties* obj) {
+ PhotosTiffFileFormatProperties * self;
+#line 54 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, PHOTOS_TYPE_TIFF_FILE_FORMAT_PROPERTIES, PhotosTiffFileFormatProperties);
+#line 54 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ PHOTO_FILE_FORMAT_PROPERTIES_CLASS (photos_tiff_file_format_properties_parent_class)->finalize (obj);
+#line 1176 "TiffSupport.c"
+}
+
+
+GType photos_tiff_file_format_properties_get_type (void) {
+ static volatile gsize photos_tiff_file_format_properties_type_id__volatile = 0;
+ if (g_once_init_enter (&photos_tiff_file_format_properties_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PhotosTiffFileFormatPropertiesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photos_tiff_file_format_properties_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotosTiffFileFormatProperties), 0, (GInstanceInitFunc) photos_tiff_file_format_properties_instance_init, NULL };
+ GType photos_tiff_file_format_properties_type_id;
+ photos_tiff_file_format_properties_type_id = g_type_register_static (TYPE_PHOTO_FILE_FORMAT_PROPERTIES, "PhotosTiffFileFormatProperties", &g_define_type_info, 0);
+ g_once_init_leave (&photos_tiff_file_format_properties_type_id__volatile, photos_tiff_file_format_properties_type_id);
+ }
+ return photos_tiff_file_format_properties_type_id__volatile;
+}
+
+
+PhotosTiffSniffer* photos_tiff_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options) {
+ PhotosTiffSniffer* self = NULL;
+ GFile* _tmp0_ = NULL;
+ PhotoFileSnifferOptions _tmp1_ = 0;
+#line 103 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ g_return_val_if_fail (G_IS_FILE (file), NULL);
+#line 104 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = file;
+#line 104 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp1_ = options;
+#line 104 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = (PhotosTiffSniffer*) gdk_sniffer_construct (object_type, _tmp0_, _tmp1_);
+#line 103 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return self;
+#line 1206 "TiffSupport.c"
+}
+
+
+PhotosTiffSniffer* photos_tiff_sniffer_new (GFile* file, PhotoFileSnifferOptions options) {
+#line 103 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return photos_tiff_sniffer_construct (PHOTOS_TYPE_TIFF_SNIFFER, file, options);
+#line 1213 "TiffSupport.c"
+}
+
+
+static gpointer _detected_photo_information_ref0 (gpointer self) {
+#line 118 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return self ? detected_photo_information_ref (self) : NULL;
+#line 1220 "TiffSupport.c"
+}
+
+
+static DetectedPhotoInformation* photos_tiff_sniffer_real_sniff (PhotoFileSniffer* base, gboolean* is_corrupted, GError** error) {
+ PhotosTiffSniffer * self;
+ gboolean _vala_is_corrupted = FALSE;
+ DetectedPhotoInformation* result = NULL;
+ gboolean _tmp0_ = FALSE;
+ GFile* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+ DetectedPhotoInformation* detected = NULL;
+ gboolean _tmp3_ = FALSE;
+ DetectedPhotoInformation* _tmp4_ = NULL;
+ DetectedPhotoInformation* _tmp5_ = NULL;
+ DetectedPhotoInformation* _tmp6_ = NULL;
+ DetectedPhotoInformation* _tmp7_ = NULL;
+ PhotoFileFormat _tmp8_ = 0;
+ DetectedPhotoInformation* _tmp10_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 107 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_TIFF_SNIFFER, PhotosTiffSniffer);
+#line 109 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _vala_is_corrupted = FALSE;
+#line 111 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer)->file;
+#line 111 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp2_ = photos_is_tiff (_tmp1_, NULL, &_inner_error_);
+#line 111 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = _tmp2_;
+#line 111 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 111 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 111 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return NULL;
+#line 1256 "TiffSupport.c"
+ }
+#line 111 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ if (!_tmp0_) {
+#line 112 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = NULL;
+#line 112 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ if (is_corrupted) {
+#line 112 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ *is_corrupted = _vala_is_corrupted;
+#line 1266 "TiffSupport.c"
+ }
+#line 112 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 1270 "TiffSupport.c"
+ }
+#line 114 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp4_ = PHOTO_FILE_SNIFFER_CLASS (photos_tiff_sniffer_parent_class)->sniff (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_GDK_SNIFFER, GdkSniffer), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer), &_tmp3_, &_inner_error_);
+#line 114 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _vala_is_corrupted = _tmp3_;
+#line 114 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ detected = _tmp4_;
+#line 114 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 114 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 114 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return NULL;
+#line 1284 "TiffSupport.c"
+ }
+#line 115 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp5_ = detected;
+#line 115 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ if (_tmp5_ == NULL) {
+#line 116 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = NULL;
+#line 116 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _detected_photo_information_unref0 (detected);
+#line 116 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ if (is_corrupted) {
+#line 116 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ *is_corrupted = _vala_is_corrupted;
+#line 1298 "TiffSupport.c"
+ }
+#line 116 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 1302 "TiffSupport.c"
+ }
+#line 118 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp7_ = detected;
+#line 118 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp8_ = _tmp7_->file_format;
+#line 118 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ if (_tmp8_ == PHOTO_FILE_FORMAT_TIFF) {
+#line 1310 "TiffSupport.c"
+ DetectedPhotoInformation* _tmp9_ = NULL;
+#line 118 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp9_ = detected;
+#line 118 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp6_ = _tmp9_;
+#line 1316 "TiffSupport.c"
+ } else {
+#line 118 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp6_ = NULL;
+#line 1320 "TiffSupport.c"
+ }
+#line 118 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp10_ = _detected_photo_information_ref0 (_tmp6_);
+#line 118 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = _tmp10_;
+#line 118 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _detected_photo_information_unref0 (detected);
+#line 118 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ if (is_corrupted) {
+#line 118 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ *is_corrupted = _vala_is_corrupted;
+#line 1332 "TiffSupport.c"
+ }
+#line 118 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 1336 "TiffSupport.c"
+}
+
+
+static void photos_tiff_sniffer_class_init (PhotosTiffSnifferClass * klass) {
+#line 102 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ photos_tiff_sniffer_parent_class = g_type_class_peek_parent (klass);
+#line 102 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ ((PhotoFileSnifferClass *) klass)->sniff = photos_tiff_sniffer_real_sniff;
+#line 1345 "TiffSupport.c"
+}
+
+
+static void photos_tiff_sniffer_instance_init (PhotosTiffSniffer * self) {
+}
+
+
+GType photos_tiff_sniffer_get_type (void) {
+ static volatile gsize photos_tiff_sniffer_type_id__volatile = 0;
+ if (g_once_init_enter (&photos_tiff_sniffer_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PhotosTiffSnifferClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photos_tiff_sniffer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotosTiffSniffer), 0, (GInstanceInitFunc) photos_tiff_sniffer_instance_init, NULL };
+ GType photos_tiff_sniffer_type_id;
+ photos_tiff_sniffer_type_id = g_type_register_static (TYPE_GDK_SNIFFER, "PhotosTiffSniffer", &g_define_type_info, 0);
+ g_once_init_leave (&photos_tiff_sniffer_type_id__volatile, photos_tiff_sniffer_type_id);
+ }
+ return photos_tiff_sniffer_type_id__volatile;
+}
+
+
+PhotosTiffReader* photos_tiff_reader_construct (GType object_type, const gchar* filepath) {
+ PhotosTiffReader* self = NULL;
+ const gchar* _tmp0_ = NULL;
+#line 123 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 124 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = filepath;
+#line 124 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = (PhotosTiffReader*) gdk_reader_construct (object_type, _tmp0_, PHOTO_FILE_FORMAT_TIFF);
+#line 123 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return self;
+#line 1376 "TiffSupport.c"
+}
+
+
+PhotosTiffReader* photos_tiff_reader_new (const gchar* filepath) {
+#line 123 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return photos_tiff_reader_construct (PHOTOS_TYPE_TIFF_READER, filepath);
+#line 1383 "TiffSupport.c"
+}
+
+
+static void photos_tiff_reader_class_init (PhotosTiffReaderClass * klass) {
+#line 122 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ photos_tiff_reader_parent_class = g_type_class_peek_parent (klass);
+#line 1390 "TiffSupport.c"
+}
+
+
+static void photos_tiff_reader_instance_init (PhotosTiffReader * self) {
+}
+
+
+GType photos_tiff_reader_get_type (void) {
+ static volatile gsize photos_tiff_reader_type_id__volatile = 0;
+ if (g_once_init_enter (&photos_tiff_reader_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PhotosTiffReaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photos_tiff_reader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotosTiffReader), 0, (GInstanceInitFunc) photos_tiff_reader_instance_init, NULL };
+ GType photos_tiff_reader_type_id;
+ photos_tiff_reader_type_id = g_type_register_static (TYPE_GDK_READER, "PhotosTiffReader", &g_define_type_info, 0);
+ g_once_init_leave (&photos_tiff_reader_type_id__volatile, photos_tiff_reader_type_id);
+ }
+ return photos_tiff_reader_type_id__volatile;
+}
+
+
+PhotosTiffWriter* photos_tiff_writer_construct (GType object_type, const gchar* filepath) {
+ PhotosTiffWriter* self = NULL;
+ const gchar* _tmp0_ = NULL;
+#line 135 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 136 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = filepath;
+#line 136 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = (PhotosTiffWriter*) photo_file_writer_construct (object_type, _tmp0_, PHOTO_FILE_FORMAT_TIFF);
+#line 135 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return self;
+#line 1421 "TiffSupport.c"
+}
+
+
+PhotosTiffWriter* photos_tiff_writer_new (const gchar* filepath) {
+#line 135 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return photos_tiff_writer_construct (PHOTOS_TYPE_TIFF_WRITER, filepath);
+#line 1428 "TiffSupport.c"
+}
+
+
+static void photos_tiff_writer_real_write (PhotoFileWriter* base, GdkPixbuf* pixbuf, JpegQuality quality, GError** error) {
+ PhotosTiffWriter * self;
+ GdkPixbuf* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 139 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_TIFF_WRITER, PhotosTiffWriter);
+#line 139 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ g_return_if_fail (GDK_IS_PIXBUF (pixbuf));
+#line 140 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = pixbuf;
+#line 140 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp1_ = photo_file_adapter_get_filepath (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 140 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 140 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ gdk_pixbuf_save (_tmp0_, _tmp2_, "tiff", &_inner_error_, "compression", PHOTOS_TIFF_WRITER_COMPRESSION_LZW, NULL);
+#line 140 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _g_free0 (_tmp2_);
+#line 140 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 140 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 140 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return;
+#line 1458 "TiffSupport.c"
+ }
+}
+
+
+static void photos_tiff_writer_class_init (PhotosTiffWriterClass * klass) {
+#line 128 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ photos_tiff_writer_parent_class = g_type_class_peek_parent (klass);
+#line 128 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ ((PhotoFileWriterClass *) klass)->write = photos_tiff_writer_real_write;
+#line 1468 "TiffSupport.c"
+}
+
+
+static void photos_tiff_writer_instance_init (PhotosTiffWriter * self) {
+}
+
+
+GType photos_tiff_writer_get_type (void) {
+ static volatile gsize photos_tiff_writer_type_id__volatile = 0;
+ if (g_once_init_enter (&photos_tiff_writer_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PhotosTiffWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photos_tiff_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotosTiffWriter), 0, (GInstanceInitFunc) photos_tiff_writer_instance_init, NULL };
+ GType photos_tiff_writer_type_id;
+ photos_tiff_writer_type_id = g_type_register_static (TYPE_PHOTO_FILE_WRITER, "PhotosTiffWriter", &g_define_type_info, 0);
+ g_once_init_leave (&photos_tiff_writer_type_id__volatile, photos_tiff_writer_type_id);
+ }
+ return photos_tiff_writer_type_id__volatile;
+}
+
+
+PhotosTiffMetadataWriter* photos_tiff_metadata_writer_construct (GType object_type, const gchar* filepath) {
+ PhotosTiffMetadataWriter* self = NULL;
+ const gchar* _tmp0_ = NULL;
+#line 145 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ g_return_val_if_fail (filepath != NULL, NULL);
+#line 146 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = filepath;
+#line 146 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = (PhotosTiffMetadataWriter*) photo_file_metadata_writer_construct (object_type, _tmp0_, PHOTO_FILE_FORMAT_TIFF);
+#line 145 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return self;
+#line 1499 "TiffSupport.c"
+}
+
+
+PhotosTiffMetadataWriter* photos_tiff_metadata_writer_new (const gchar* filepath) {
+#line 145 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return photos_tiff_metadata_writer_construct (PHOTOS_TYPE_TIFF_METADATA_WRITER, filepath);
+#line 1506 "TiffSupport.c"
+}
+
+
+static void photos_tiff_metadata_writer_real_write_metadata (PhotoFileMetadataWriter* base, PhotoMetadata* metadata, GError** error) {
+ PhotosTiffMetadataWriter * self;
+ PhotoMetadata* _tmp0_ = NULL;
+ GFile* _tmp1_ = NULL;
+ GFile* _tmp2_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 149 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, PHOTOS_TYPE_TIFF_METADATA_WRITER, PhotosTiffMetadataWriter);
+#line 149 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ g_return_if_fail (IS_PHOTO_METADATA (metadata));
+#line 150 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = metadata;
+#line 150 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp1_ = photo_file_adapter_get_file (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+#line 150 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 150 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ photo_metadata_write_to_file (_tmp0_, _tmp2_, &_inner_error_);
+#line 150 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _g_object_unref0 (_tmp2_);
+#line 150 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 150 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 150 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return;
+#line 1536 "TiffSupport.c"
+ }
+}
+
+
+static void photos_tiff_metadata_writer_class_init (PhotosTiffMetadataWriterClass * klass) {
+#line 144 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ photos_tiff_metadata_writer_parent_class = g_type_class_peek_parent (klass);
+#line 144 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ ((PhotoFileMetadataWriterClass *) klass)->write_metadata = photos_tiff_metadata_writer_real_write_metadata;
+#line 1546 "TiffSupport.c"
+}
+
+
+static void photos_tiff_metadata_writer_instance_init (PhotosTiffMetadataWriter * self) {
+}
+
+
+GType photos_tiff_metadata_writer_get_type (void) {
+ static volatile gsize photos_tiff_metadata_writer_type_id__volatile = 0;
+ if (g_once_init_enter (&photos_tiff_metadata_writer_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PhotosTiffMetadataWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photos_tiff_metadata_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotosTiffMetadataWriter), 0, (GInstanceInitFunc) photos_tiff_metadata_writer_instance_init, NULL };
+ GType photos_tiff_metadata_writer_type_id;
+ photos_tiff_metadata_writer_type_id = g_type_register_static (TYPE_PHOTO_FILE_METADATA_WRITER, "PhotosTiffMetadataWriter", &g_define_type_info, 0);
+ g_once_init_leave (&photos_tiff_metadata_writer_type_id__volatile, photos_tiff_metadata_writer_type_id);
+ }
+ return photos_tiff_metadata_writer_type_id__volatile;
+}
+
+
+gboolean photos_is_tiff (GFile* file, GCancellable* cancellable, GError** error) {
+ gboolean result = FALSE;
+ GFileInputStream* _tmp0_ = NULL;
+ GFile* _tmp1_ = NULL;
+ GFileInputStream* _tmp2_ = NULL;
+ GDataInputStream* dins = NULL;
+ GDataInputStream* _tmp3_ = NULL;
+ GDataStreamByteOrder order = 0;
+ guint16 _tmp4_ = 0U;
+ GDataInputStream* _tmp5_ = NULL;
+ GCancellable* _tmp6_ = NULL;
+ guint16 _tmp7_ = 0U;
+ GDataInputStream* _tmp8_ = NULL;
+ GDataStreamByteOrder _tmp9_ = 0;
+ guint16 lue = 0U;
+ GDataInputStream* _tmp10_ = NULL;
+ GCancellable* _tmp11_ = NULL;
+ guint16 _tmp12_ = 0U;
+ guint16 _tmp13_ = 0U;
+ GError * _inner_error_ = NULL;
+#line 154 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ g_return_val_if_fail (G_IS_FILE (file), FALSE);
+#line 154 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ g_return_val_if_fail ((cancellable == NULL) || G_IS_CANCELLABLE (cancellable), FALSE);
+#line 155 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp1_ = file;
+#line 155 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp2_ = g_file_read (_tmp1_, NULL, &_inner_error_);
+#line 155 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp0_ = _tmp2_;
+#line 155 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 155 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 155 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return FALSE;
+#line 1602 "TiffSupport.c"
+ }
+#line 155 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp3_ = g_data_input_stream_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, G_TYPE_INPUT_STREAM, GInputStream));
+#line 155 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ dins = _tmp3_;
+#line 159 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp5_ = dins;
+#line 159 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp6_ = cancellable;
+#line 159 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp7_ = g_data_input_stream_read_uint16 (_tmp5_, _tmp6_, &_inner_error_);
+#line 159 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp4_ = _tmp7_;
+#line 159 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 159 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 159 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _g_object_unref0 (dins);
+#line 159 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _g_object_unref0 (_tmp0_);
+#line 159 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return FALSE;
+#line 1626 "TiffSupport.c"
+ }
+#line 159 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ switch (_tmp4_) {
+#line 159 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ case 0x4949:
+#line 1632 "TiffSupport.c"
+ {
+#line 161 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ order = G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN;
+#line 162 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ break;
+#line 1638 "TiffSupport.c"
+ }
+#line 159 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ case 0x4D4D:
+#line 1642 "TiffSupport.c"
+ {
+#line 165 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ order = G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN;
+#line 166 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ break;
+#line 1648 "TiffSupport.c"
+ }
+ default:
+ {
+#line 169 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = FALSE;
+#line 169 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _g_object_unref0 (dins);
+#line 169 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _g_object_unref0 (_tmp0_);
+#line 169 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 1660 "TiffSupport.c"
+ }
+ }
+#line 172 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp8_ = dins;
+#line 172 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp9_ = order;
+#line 172 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ g_data_input_stream_set_byte_order (_tmp8_, _tmp9_);
+#line 175 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp10_ = dins;
+#line 175 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp11_ = cancellable;
+#line 175 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp12_ = g_data_input_stream_read_uint16 (_tmp10_, _tmp11_, &_inner_error_);
+#line 175 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ lue = _tmp12_;
+#line 175 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 175 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 175 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _g_object_unref0 (dins);
+#line 175 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _g_object_unref0 (_tmp0_);
+#line 175 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return FALSE;
+#line 1687 "TiffSupport.c"
+ }
+#line 176 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _tmp13_ = lue;
+#line 176 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ if (((gint) _tmp13_) != 42) {
+#line 177 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = FALSE;
+#line 177 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _g_object_unref0 (dins);
+#line 177 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _g_object_unref0 (_tmp0_);
+#line 177 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 1701 "TiffSupport.c"
+ }
+#line 180 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ result = TRUE;
+#line 180 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _g_object_unref0 (dins);
+#line 180 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ _g_object_unref0 (_tmp0_);
+#line 180 "/home/jens/Source/shotwell/src/photos/TiffSupport.vala"
+ return result;
+#line 1711 "TiffSupport.c"
+}
+
+
+
diff --git a/src/photos/mk/photos.mk b/src/photos/mk/photos.mk
deleted file mode 100644
index 6be33a4..0000000
--- a/src/photos/mk/photos.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-
-# UNIT_NAME is the Vala namespace. A file named UNIT_NAME.vala must be in this directory with
-# a init() and terminate() function declared in the namespace.
-UNIT_NAME := Photos
-
-# UNIT_DIR should match the subdirectory the files are located in. Generally UNIT_NAME in all
-# lowercase. The name of this file should be UNIT_DIR.mk.
-UNIT_DIR := photos
-
-# All Vala files in the unit should be listed here with no subdirectory prefix.
-#
-# NOTE: Do *not* include the unit's master file, i.e. UNIT_NAME.vala.
-UNIT_FILES := \
- PhotoFileAdapter.vala \
- PhotoFileFormat.vala \
- PhotoFileSniffer.vala \
- PhotoMetadata.vala \
- GRaw.vala \
- GdkSupport.vala \
- JfifSupport.vala \
- BmpSupport.vala \
- RawSupport.vala \
- PngSupport.vala \
- TiffSupport.vala
-
-# Any unit this unit relies upon (and should be initialized before it's initialized) should
-# be listed here using its Vala namespace.
-#
-# NOTE: All units are assumed to rely upon the unit-unit. Do not include that here.
-UNIT_USES :=
-
-# List any additional files that are used in the build process as a part of this unit that should
-# be packaged in the tarball. File names should be relative to the unit's home directory.
-UNIT_RC :=
-
-# unitize.mk must be called at the end of each UNIT_DIR.mk file.
-include unitize.mk
-