summaryrefslogtreecommitdiff
path: root/src/photos/PhotoFileSniffer.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-06-25 21:12:13 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-06-25 21:12:13 +0200
commit059a62ee3c820a42fbce980c3256049adecc9100 (patch)
treee51eab94fd7d65459640ca227fb2257bb41d2acb /src/photos/PhotoFileSniffer.c
parent55778740c211992cc86ea87588ab62c6750f36d1 (diff)
parente8f4d7a9cdd37c5a9fb3b6991a4e9173829808da (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'src/photos/PhotoFileSniffer.c')
-rw-r--r--src/photos/PhotoFileSniffer.c634
1 files changed, 410 insertions, 224 deletions
diff --git a/src/photos/PhotoFileSniffer.c b/src/photos/PhotoFileSniffer.c
index e632525..04d5d07 100644
--- a/src/photos/PhotoFileSniffer.c
+++ b/src/photos/PhotoFileSniffer.c
@@ -1,4 +1,4 @@
-/* PhotoFileSniffer.c generated by valac 0.36.6, the Vala compiler
+/* PhotoFileSniffer.c generated by valac 0.40.4, the Vala compiler
* generated from PhotoFileSniffer.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -7,6 +7,7 @@
* See the COPYING file in this distribution.
*/
+
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
@@ -180,181 +181,239 @@ 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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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*
+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"
+#line 282 "PhotoFileSniffer.c"
}
-DetectedPhotoInformation* detected_photo_information_new (void) {
+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"
+#line 291 "PhotoFileSniffer.c"
}
-static void value_detected_photo_information_init (GValue* value) {
+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"
+#line 300 "PhotoFileSniffer.c"
}
-static void value_detected_photo_information_free_value (GValue* value) {
+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"
+#line 311 "PhotoFileSniffer.c"
}
}
-static void value_detected_photo_information_copy_value (const GValue* src_value, GValue* dest_value) {
+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"
+#line 324 "PhotoFileSniffer.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
dest_value->data[0].v_pointer = NULL;
-#line 287 "PhotoFileSniffer.c"
+#line 328 "PhotoFileSniffer.c"
}
}
-static gpointer value_detected_photo_information_peek_pointer (const GValue* value) {
+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"
+#line 338 "PhotoFileSniffer.c"
}
-static gchar* value_detected_photo_information_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+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"
+#line 350 "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"
+#line 357 "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 361 "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"
+#line 365 "PhotoFileSniffer.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
value->data[0].v_pointer = NULL;
-#line 321 "PhotoFileSniffer.c"
+#line 369 "PhotoFileSniffer.c"
}
#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
return NULL;
-#line 325 "PhotoFileSniffer.c"
+#line 373 "PhotoFileSniffer.c"
}
-static gchar* value_detected_photo_information_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+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 389 "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"
+#line 395 "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"
+#line 399 "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 403 "PhotoFileSniffer.c"
}
#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
return NULL;
-#line 354 "PhotoFileSniffer.c"
+#line 407 "PhotoFileSniffer.c"
}
-GParamSpec* param_spec_detected_photo_information (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+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);
@@ -364,20 +423,25 @@ GParamSpec* param_spec_detected_photo_information (const gchar* name, const gcha
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"
+#line 427 "PhotoFileSniffer.c"
}
-gpointer value_get_detected_photo_information (const GValue* value) {
+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"
+#line 438 "PhotoFileSniffer.c"
}
-void value_set_detected_photo_information (GValue* value, gpointer v_object) {
+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));
@@ -393,22 +457,25 @@ void value_set_detected_photo_information (GValue* value, gpointer v_object) {
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"
+#line 461 "PhotoFileSniffer.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
value->data[0].v_pointer = NULL;
-#line 401 "PhotoFileSniffer.c"
+#line 465 "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"
+#line 471 "PhotoFileSniffer.c"
}
}
-void value_take_detected_photo_information (GValue* value, gpointer v_object) {
+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));
@@ -422,31 +489,35 @@ void value_take_detected_photo_information (GValue* value, gpointer v_object) {
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"
+#line 493 "PhotoFileSniffer.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
value->data[0].v_pointer = NULL;
-#line 430 "PhotoFileSniffer.c"
+#line 497 "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"
+#line 503 "PhotoFileSniffer.c"
}
}
-static void detected_photo_information_class_init (DetectedPhotoInformationClass * klass) {
+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"
+#line 515 "PhotoFileSniffer.c"
}
-static void detected_photo_information_instance_init (DetectedPhotoInformation * self) {
+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"
@@ -469,11 +540,13 @@ static void detected_photo_information_instance_init (DetectedPhotoInformation *
self->bits_per_channel = 0;
#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
self->ref_count = 1;
-#line 473 "PhotoFileSniffer.c"
+#line 544 "PhotoFileSniffer.c"
}
-static void detected_photo_information_finalize (DetectedPhotoInformation * obj) {
+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);
@@ -489,11 +562,13 @@ static void detected_photo_information_finalize (DetectedPhotoInformation * obj)
_g_free0 (self->thumbnail_md5);
#line 13 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
_g_free0 (self->format_name);
-#line 493 "PhotoFileSniffer.c"
+#line 566 "PhotoFileSniffer.c"
}
-GType detected_photo_information_get_type (void) {
+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 };
@@ -507,18 +582,22 @@ GType detected_photo_information_get_type (void) {
}
-gpointer detected_photo_information_ref (gpointer instance) {
+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"
+#line 595 "PhotoFileSniffer.c"
}
-void detected_photo_information_unref (gpointer instance) {
+void
+detected_photo_information_unref (gpointer instance)
+{
DetectedPhotoInformation * self;
self = instance;
#line 7 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
@@ -527,12 +606,14 @@ void detected_photo_information_unref (gpointer instance) {
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"
+#line 610 "PhotoFileSniffer.c"
}
}
-GType photo_file_sniffer_options_get_type (void) {
+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}};
@@ -544,161 +625,191 @@ GType photo_file_sniffer_options_get_type (void) {
}
-static gpointer _g_object_ref0 (gpointer self) {
+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"
+#line 634 "PhotoFileSniffer.c"
}
-PhotoFileSniffer* photo_file_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options) {
+PhotoFileSniffer*
+photo_file_sniffer_construct (GType object_type,
+ GFile* file,
+ PhotoFileSnifferOptions options)
+{
PhotoFileSniffer* self = NULL;
GFile* _tmp0_;
- GFile* _tmp1_;
- PhotoFileSnifferOptions _tmp2_;
- PhotoFileSnifferOptions _tmp3_;
#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_);
+ _tmp0_ = _g_object_ref0 (file);
#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;
+ self->file = _tmp0_;
#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;
+ self->options = options;
#line 46 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
- self->calc_md5 = (_tmp3_ & PHOTO_FILE_SNIFFER_OPTIONS_NO_MD5) == 0;
+ self->calc_md5 = (options & PHOTO_FILE_SNIFFER_OPTIONS_NO_MD5) == 0;
#line 42 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
return self;
-#line 583 "PhotoFileSniffer.c"
+#line 661 "PhotoFileSniffer.c"
}
-static DetectedPhotoInformation* photo_file_sniffer_real_sniff (PhotoFileSniffer* self, gboolean* is_corrupted, GError** error) {
+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"
+#line 674 "PhotoFileSniffer.c"
}
-DetectedPhotoInformation* photo_file_sniffer_sniff (PhotoFileSniffer* self, gboolean* is_corrupted, GError** error) {
+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"
+#line 687 "PhotoFileSniffer.c"
}
-static void value_photo_file_sniffer_init (GValue* value) {
+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"
+#line 696 "PhotoFileSniffer.c"
}
-static void value_photo_file_sniffer_free_value (GValue* value) {
+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"
+#line 707 "PhotoFileSniffer.c"
}
}
-static void value_photo_file_sniffer_copy_value (const GValue* src_value, GValue* dest_value) {
+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"
+#line 720 "PhotoFileSniffer.c"
} else {
#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
dest_value->data[0].v_pointer = NULL;
-#line 631 "PhotoFileSniffer.c"
+#line 724 "PhotoFileSniffer.c"
}
}
-static gpointer value_photo_file_sniffer_peek_pointer (const GValue* value) {
+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"
+#line 734 "PhotoFileSniffer.c"
}
-static gchar* value_photo_file_sniffer_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+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"
+#line 746 "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"
+#line 753 "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 757 "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"
+#line 761 "PhotoFileSniffer.c"
} else {
#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
value->data[0].v_pointer = NULL;
-#line 665 "PhotoFileSniffer.c"
+#line 765 "PhotoFileSniffer.c"
}
#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
return NULL;
-#line 669 "PhotoFileSniffer.c"
+#line 769 "PhotoFileSniffer.c"
}
-static gchar* value_photo_file_sniffer_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+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 785 "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"
+#line 791 "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"
+#line 795 "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 799 "PhotoFileSniffer.c"
}
#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
return NULL;
-#line 698 "PhotoFileSniffer.c"
+#line 803 "PhotoFileSniffer.c"
}
-GParamSpec* param_spec_photo_file_sniffer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+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);
@@ -708,20 +819,25 @@ GParamSpec* param_spec_photo_file_sniffer (const gchar* name, const gchar* nick,
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"
+#line 823 "PhotoFileSniffer.c"
}
-gpointer value_get_photo_file_sniffer (const GValue* value) {
+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"
+#line 834 "PhotoFileSniffer.c"
}
-void value_set_photo_file_sniffer (GValue* value, gpointer v_object) {
+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));
@@ -737,22 +853,25 @@ void value_set_photo_file_sniffer (GValue* value, gpointer v_object) {
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"
+#line 857 "PhotoFileSniffer.c"
} else {
#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
value->data[0].v_pointer = NULL;
-#line 745 "PhotoFileSniffer.c"
+#line 861 "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"
+#line 867 "PhotoFileSniffer.c"
}
}
-void value_take_photo_file_sniffer (GValue* value, gpointer v_object) {
+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));
@@ -766,40 +885,46 @@ void value_take_photo_file_sniffer (GValue* value, gpointer v_object) {
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"
+#line 889 "PhotoFileSniffer.c"
} else {
#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
value->data[0].v_pointer = NULL;
-#line 774 "PhotoFileSniffer.c"
+#line 893 "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"
+#line 899 "PhotoFileSniffer.c"
}
}
-static void photo_file_sniffer_class_init (PhotoFileSnifferClass * klass) {
+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 = (DetectedPhotoInformation* (*) (PhotoFileSniffer *, gboolean*, GError**)) photo_file_sniffer_real_sniff;
-#line 792 "PhotoFileSniffer.c"
+#line 913 "PhotoFileSniffer.c"
}
-static void photo_file_sniffer_instance_init (PhotoFileSniffer * self) {
+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"
+#line 922 "PhotoFileSniffer.c"
}
-static void photo_file_sniffer_finalize (PhotoFileSniffer * obj) {
+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);
@@ -807,11 +932,13 @@ static void photo_file_sniffer_finalize (PhotoFileSniffer * obj) {
g_signal_handlers_destroy (self);
#line 38 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
_g_object_unref0 (self->file);
-#line 811 "PhotoFileSniffer.c"
+#line 936 "PhotoFileSniffer.c"
}
-GType photo_file_sniffer_get_type (void) {
+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 };
@@ -825,18 +952,22 @@ GType photo_file_sniffer_get_type (void) {
}
-gpointer photo_file_sniffer_ref (gpointer instance) {
+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"
+#line 965 "PhotoFileSniffer.c"
}
-void photo_file_sniffer_unref (gpointer instance) {
+void
+photo_file_sniffer_unref (gpointer instance)
+{
PhotoFileSniffer * self;
self = instance;
#line 32 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
@@ -845,53 +976,58 @@ void photo_file_sniffer_unref (gpointer instance) {
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"
+#line 980 "PhotoFileSniffer.c"
}
}
-PhotoFileInterrogator* photo_file_interrogator_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options) {
+PhotoFileInterrogator*
+photo_file_interrogator_construct (GType object_type,
+ GFile* file,
+ PhotoFileSnifferOptions options)
+{
PhotoFileInterrogator* self = NULL;
GFile* _tmp0_;
- GFile* _tmp1_;
- PhotoFileSnifferOptions _tmp2_;
#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_);
+ _tmp0_ = _g_object_ref0 (file);
#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_;
+ self->priv->file = _tmp0_;
#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_;
+ self->priv->options = options;
#line 67 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
return self;
-#line 877 "PhotoFileSniffer.c"
+#line 1006 "PhotoFileSniffer.c"
}
-PhotoFileInterrogator* photo_file_interrogator_new (GFile* file, PhotoFileSnifferOptions options) {
+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"
+#line 1016 "PhotoFileSniffer.c"
}
-static gpointer _detected_photo_information_ref0 (gpointer self) {
+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"
+#line 1025 "PhotoFileSniffer.c"
}
-DetectedPhotoInformation* photo_file_interrogator_get_detected_photo_information (PhotoFileInterrogator* self) {
+DetectedPhotoInformation*
+photo_file_interrogator_get_detected_photo_information (PhotoFileInterrogator* self)
+{
DetectedPhotoInformation* result = NULL;
DetectedPhotoInformation* _tmp0_;
DetectedPhotoInformation* _tmp1_;
@@ -905,11 +1041,13 @@ DetectedPhotoInformation* photo_file_interrogator_get_detected_photo_information
result = _tmp1_;
#line 76 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
return result;
-#line 909 "PhotoFileSniffer.c"
+#line 1045 "PhotoFileSniffer.c"
}
-gboolean photo_file_interrogator_get_is_photo_corrupted (PhotoFileInterrogator* self) {
+gboolean
+photo_file_interrogator_get_is_photo_corrupted (PhotoFileInterrogator* self)
+{
gboolean result = FALSE;
gboolean _tmp0_;
#line 80 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
@@ -920,11 +1058,14 @@ gboolean photo_file_interrogator_get_is_photo_corrupted (PhotoFileInterrogator*
result = _tmp0_;
#line 81 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
return result;
-#line 924 "PhotoFileSniffer.c"
+#line 1062 "PhotoFileSniffer.c"
}
-void photo_file_interrogator_interrogate (PhotoFileInterrogator* self, GError** error) {
+void
+photo_file_interrogator_interrogate (PhotoFileInterrogator* self,
+ GError** error)
+{
gint _tmp0_;
PhotoFileFormat* _tmp1_;
GError * _inner_error_ = NULL;
@@ -932,7 +1073,7 @@ void photo_file_interrogator_interrogate (PhotoFileInterrogator* self, GError**
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"
+#line 1077 "PhotoFileSniffer.c"
{
PhotoFileFormat* file_format_collection = NULL;
gint file_format_collection_length1 = 0;
@@ -944,11 +1085,11 @@ void photo_file_interrogator_interrogate (PhotoFileInterrogator* self, GError**
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"
+#line 1089 "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"
+#line 1093 "PhotoFileSniffer.c"
{
PhotoFileSniffer* sniffer = NULL;
PhotoFileFormat _tmp2_;
@@ -991,7 +1132,7 @@ void photo_file_interrogator_interrogate (PhotoFileInterrogator* self, GError**
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 1136 "PhotoFileSniffer.c"
}
#line 89 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
_tmp10_ = _tmp6_;
@@ -1005,21 +1146,21 @@ void photo_file_interrogator_interrogate (PhotoFileInterrogator* self, GError**
_tmp12_ = self->priv->detected;
#line 90 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
if (_tmp12_ != NULL) {
-#line 1009 "PhotoFileSniffer.c"
+#line 1150 "PhotoFileSniffer.c"
gboolean _tmp13_;
#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"
+#line 1156 "PhotoFileSniffer.c"
} else {
#line 90 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
_tmp11_ = FALSE;
-#line 1019 "PhotoFileSniffer.c"
+#line 1160 "PhotoFileSniffer.c"
}
#line 90 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
if (_tmp11_) {
-#line 1023 "PhotoFileSniffer.c"
+#line 1164 "PhotoFileSniffer.c"
DetectedPhotoInformation* _tmp14_;
PhotoFileFormat _tmp15_;
PhotoFileFormat _tmp16_;
@@ -1037,14 +1178,14 @@ void photo_file_interrogator_interrogate (PhotoFileInterrogator* self, GError**
_photo_file_sniffer_unref0 (sniffer);
#line 93 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
break;
-#line 1041 "PhotoFileSniffer.c"
+#line 1182 "PhotoFileSniffer.c"
} else {
gboolean _tmp17_;
#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"
+#line 1189 "PhotoFileSniffer.c"
GFile* _tmp18_;
gchar* _tmp19_;
gchar* _tmp20_;
@@ -1071,121 +1212,146 @@ void photo_file_interrogator_interrogate (PhotoFileInterrogator* self, GError**
_photo_file_sniffer_unref0 (sniffer);
#line 99 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
break;
-#line 1074 "PhotoFileSniffer.c"
+#line 1215 "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 1222 "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"
+#line 1227 "PhotoFileSniffer.c"
}
}
-static void value_photo_file_interrogator_init (GValue* value) {
+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"
+#line 1237 "PhotoFileSniffer.c"
}
-static void value_photo_file_interrogator_free_value (GValue* value) {
+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"
+#line 1248 "PhotoFileSniffer.c"
}
}
-static void value_photo_file_interrogator_copy_value (const GValue* src_value, GValue* dest_value) {
+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"
+#line 1261 "PhotoFileSniffer.c"
} else {
#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
dest_value->data[0].v_pointer = NULL;
-#line 1117 "PhotoFileSniffer.c"
+#line 1265 "PhotoFileSniffer.c"
}
}
-static gpointer value_photo_file_interrogator_peek_pointer (const GValue* value) {
+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"
+#line 1275 "PhotoFileSniffer.c"
}
-static gchar* value_photo_file_interrogator_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+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"
+#line 1287 "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"
+#line 1294 "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 1298 "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"
+#line 1302 "PhotoFileSniffer.c"
} else {
#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
value->data[0].v_pointer = NULL;
-#line 1151 "PhotoFileSniffer.c"
+#line 1306 "PhotoFileSniffer.c"
}
#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
return NULL;
-#line 1155 "PhotoFileSniffer.c"
+#line 1310 "PhotoFileSniffer.c"
}
-static gchar* value_photo_file_interrogator_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+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 1326 "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"
+#line 1332 "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"
+#line 1336 "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 1340 "PhotoFileSniffer.c"
}
#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
return NULL;
-#line 1184 "PhotoFileSniffer.c"
+#line 1344 "PhotoFileSniffer.c"
}
-GParamSpec* param_spec_photo_file_interrogator (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+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);
@@ -1195,20 +1361,25 @@ GParamSpec* param_spec_photo_file_interrogator (const gchar* name, const gchar*
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"
+#line 1364 "PhotoFileSniffer.c"
}
-gpointer value_get_photo_file_interrogator (const GValue* value) {
+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"
+#line 1375 "PhotoFileSniffer.c"
}
-void value_set_photo_file_interrogator (GValue* value, gpointer v_object) {
+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));
@@ -1224,22 +1395,25 @@ void value_set_photo_file_interrogator (GValue* value, gpointer v_object) {
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"
+#line 1398 "PhotoFileSniffer.c"
} else {
#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
value->data[0].v_pointer = NULL;
-#line 1231 "PhotoFileSniffer.c"
+#line 1402 "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"
+#line 1408 "PhotoFileSniffer.c"
}
}
-void value_take_photo_file_interrogator (GValue* value, gpointer v_object) {
+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));
@@ -1253,33 +1427,37 @@ void value_take_photo_file_interrogator (GValue* value, gpointer v_object) {
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"
+#line 1430 "PhotoFileSniffer.c"
} else {
#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
value->data[0].v_pointer = NULL;
-#line 1260 "PhotoFileSniffer.c"
+#line 1434 "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"
+#line 1440 "PhotoFileSniffer.c"
}
}
-static void photo_file_interrogator_class_init (PhotoFileInterrogatorClass * klass) {
+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"
+#line 1454 "PhotoFileSniffer.c"
}
-static void photo_file_interrogator_instance_init (PhotoFileInterrogator * self) {
+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"
@@ -1288,11 +1466,13 @@ static void photo_file_interrogator_instance_init (PhotoFileInterrogator * self)
self->priv->is_photo_corrupted = FALSE;
#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
self->ref_count = 1;
-#line 1291 "PhotoFileSniffer.c"
+#line 1469 "PhotoFileSniffer.c"
}
-static void photo_file_interrogator_finalize (PhotoFileInterrogator * obj) {
+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);
@@ -1302,11 +1482,13 @@ static void photo_file_interrogator_finalize (PhotoFileInterrogator * obj) {
_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"
+#line 1485 "PhotoFileSniffer.c"
}
-GType photo_file_interrogator_get_type (void) {
+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 };
@@ -1320,18 +1502,22 @@ GType photo_file_interrogator_get_type (void) {
}
-gpointer photo_file_interrogator_ref (gpointer instance) {
+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"
+#line 1514 "PhotoFileSniffer.c"
}
-void photo_file_interrogator_unref (gpointer instance) {
+void
+photo_file_interrogator_unref (gpointer instance)
+{
PhotoFileInterrogator * self;
self = instance;
#line 61 "/home/jens/Source/shotwell/src/photos/PhotoFileSniffer.vala"
@@ -1340,7 +1526,7 @@ void photo_file_interrogator_unref (gpointer instance) {
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"
+#line 1529 "PhotoFileSniffer.c"
}
}