diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2018-07-09 12:10:38 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2018-07-09 12:10:38 +0200 |
commit | 709e2d6f5652ec90c194a4ec2b530bebc6f952cb (patch) | |
tree | 496b2f3899e1d5728ee9ae76095cc5056c317447 /src/db/TombstoneTable.c | |
parent | f1353e9ffd34db5f755c7da0b3f9c10638fbfd38 (diff) | |
parent | 5c8be07095cc04a6d8a95204b0504fd7ab030154 (diff) |
Merge branch 'release/0.28.3-1'0.28.3-1
Diffstat (limited to 'src/db/TombstoneTable.c')
-rw-r--r-- | src/db/TombstoneTable.c | 871 |
1 files changed, 466 insertions, 405 deletions
diff --git a/src/db/TombstoneTable.c b/src/db/TombstoneTable.c index 8c9400e..b7b9f58 100644 --- a/src/db/TombstoneTable.c +++ b/src/db/TombstoneTable.c @@ -1,4 +1,4 @@ -/* TombstoneTable.c generated by valac 0.36.6, the Vala compiler +/* TombstoneTable.c generated by valac 0.40.4, the Vala compiler * generated from TombstoneTable.vala, do not modify */ /* Copyright 2016 Software Freedom Conservancy Inc. @@ -7,6 +7,7 @@ * (version 2.1 or later). See the COPYING file in this distribution. */ + #include <glib.h> #include <glib-object.h> #include <string.h> @@ -134,70 +135,105 @@ GType tombstone_id_get_type (void) G_GNUC_CONST; TombstoneID* tombstone_id_dup (const TombstoneID* self); void tombstone_id_free (TombstoneID* self); #define TOMBSTONE_ID_INVALID ((gint64) -1) -void tombstone_id_init (TombstoneID *self, gint64 id); +void tombstone_id_init (TombstoneID *self, + gint64 id); gboolean tombstone_id_is_invalid (TombstoneID *self); gboolean tombstone_id_is_valid (TombstoneID *self); gpointer tombstone_row_ref (gpointer instance); void tombstone_row_unref (gpointer instance); -GParamSpec* param_spec_tombstone_row (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_tombstone_row (GValue* value, gpointer v_object); -void value_take_tombstone_row (GValue* value, gpointer v_object); +GParamSpec* param_spec_tombstone_row (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void value_set_tombstone_row (GValue* value, + gpointer v_object); +void value_take_tombstone_row (GValue* value, + gpointer v_object); gpointer value_get_tombstone_row (const GValue* value); GType tombstone_row_get_type (void) G_GNUC_CONST; GType tombstone_reason_get_type (void) G_GNUC_CONST; -enum { - TOMBSTONE_ROW_DUMMY_PROPERTY -}; TombstoneRow* tombstone_row_new (void); TombstoneRow* tombstone_row_construct (GType object_type); static void tombstone_row_finalize (TombstoneRow * obj); gpointer database_table_ref (gpointer instance); void database_table_unref (gpointer instance); -GParamSpec* param_spec_database_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_database_table (GValue* value, gpointer v_object); -void value_take_database_table (GValue* value, gpointer v_object); +GParamSpec* param_spec_database_table (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void value_set_database_table (GValue* value, + gpointer v_object); +void value_take_database_table (GValue* value, + gpointer v_object); gpointer value_get_database_table (const GValue* value); GType database_table_get_type (void) G_GNUC_CONST; GType tombstone_table_get_type (void) G_GNUC_CONST; -enum { - TOMBSTONE_TABLE_DUMMY_PROPERTY -}; static TombstoneTable* tombstone_table_new (void); static TombstoneTable* tombstone_table_construct (GType object_type); DatabaseTable* database_table_construct (GType object_type); -void database_table_set_table_name (DatabaseTable* self, const gchar* table_name); -void database_table_fatal (const gchar* op, gint res); +void database_table_set_table_name (DatabaseTable* self, + const gchar* table_name); +void database_table_fatal (const gchar* op, + gint res); TombstoneTable* tombstone_table_get_instance (void); GQuark database_error_quark (void); -TombstoneRow* tombstone_table_add (TombstoneTable* self, const gchar* filepath, gint64 filesize, const gchar* md5, TombstoneReason reason, GError** error); +TombstoneRow* tombstone_table_add (TombstoneTable* self, + const gchar* filepath, + gint64 filesize, + const gchar* md5, + TombstoneReason reason, + GError** error); gulong now_sec (void); gint tombstone_reason_serialize (TombstoneReason self); -void database_table_throw_error (const gchar* method, gint res, GError** error); -TombstoneRow** tombstone_table_fetch_all (TombstoneTable* self, int* result_length1, GError** error); +void database_table_throw_error (const gchar* method, + gint res, + GError** error); +TombstoneRow** tombstone_table_fetch_all (TombstoneTable* self, + int* result_length1, + GError** error); gint database_table_get_row_count (DatabaseTable* self); TombstoneReason tombstone_reason_unserialize (gint value); -void tombstone_table_update_file (TombstoneTable* self, TombstoneID* tombstone_id, const gchar* filepath, GError** error); -void database_table_update_text_by_id_2 (DatabaseTable* self, gint64 id, const gchar* column, const gchar* text, GError** error); -void tombstone_table_remove (TombstoneTable* self, TombstoneID* tombstone_id, GError** error); -void database_table_delete_by_id (DatabaseTable* self, gint64 id, GError** error); +void tombstone_table_update_file (TombstoneTable* self, + TombstoneID* tombstone_id, + const gchar* filepath, + GError** error); +void database_table_update_text_by_id_2 (DatabaseTable* self, + gint64 id, + const gchar* column, + const gchar* text, + GError** error); +void tombstone_table_remove (TombstoneTable* self, + TombstoneID* tombstone_id, + GError** error); +void database_table_delete_by_id (DatabaseTable* self, + gint64 id, + GError** error); static void tombstone_table_finalize (DatabaseTable * 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); - - -void tombstone_id_init (TombstoneID *self, gint64 id) { - gint64 _tmp0_; +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); + + +void +tombstone_id_init (TombstoneID *self, + gint64 id) +{ #line 12 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" memset (self, 0, sizeof (TombstoneID)); #line 13 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp0_ = id; -#line 13 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - (*self).id = _tmp0_; -#line 197 "TombstoneTable.c" + (*self).id = id; +#line 231 "TombstoneTable.c" } -gboolean tombstone_id_is_invalid (TombstoneID *self) { +gboolean +tombstone_id_is_invalid (TombstoneID *self) +{ gboolean result = FALSE; gint64 _tmp0_; #line 17 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" @@ -206,11 +242,13 @@ gboolean tombstone_id_is_invalid (TombstoneID *self) { result = _tmp0_ == TOMBSTONE_ID_INVALID; #line 17 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return result; -#line 210 "TombstoneTable.c" +#line 246 "TombstoneTable.c" } -gboolean tombstone_id_is_valid (TombstoneID *self) { +gboolean +tombstone_id_is_valid (TombstoneID *self) +{ gboolean result = FALSE; gint64 _tmp0_; #line 21 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" @@ -219,11 +257,13 @@ gboolean tombstone_id_is_valid (TombstoneID *self) { result = _tmp0_ != TOMBSTONE_ID_INVALID; #line 21 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return result; -#line 223 "TombstoneTable.c" +#line 261 "TombstoneTable.c" } -TombstoneID* tombstone_id_dup (const TombstoneID* self) { +TombstoneID* +tombstone_id_dup (const TombstoneID* self) +{ TombstoneID* dup; #line 7 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" dup = g_new0 (TombstoneID, 1); @@ -231,18 +271,22 @@ TombstoneID* tombstone_id_dup (const TombstoneID* self) { memcpy (dup, self, sizeof (TombstoneID)); #line 7 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return dup; -#line 235 "TombstoneTable.c" +#line 275 "TombstoneTable.c" } -void tombstone_id_free (TombstoneID* self) { +void +tombstone_id_free (TombstoneID* self) +{ #line 7 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" g_free (self); -#line 242 "TombstoneTable.c" +#line 284 "TombstoneTable.c" } -GType tombstone_id_get_type (void) { +GType +tombstone_id_get_type (void) +{ static volatile gsize tombstone_id_type_id__volatile = 0; if (g_once_init_enter (&tombstone_id_type_id__volatile)) { GType tombstone_id_type_id; @@ -253,121 +297,150 @@ GType tombstone_id_get_type (void) { } -TombstoneRow* tombstone_row_construct (GType object_type) { +TombstoneRow* +tombstone_row_construct (GType object_type) +{ TombstoneRow* self = NULL; #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" self = (TombstoneRow*) g_type_create_instance (object_type); #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return self; -#line 263 "TombstoneTable.c" +#line 309 "TombstoneTable.c" } -TombstoneRow* tombstone_row_new (void) { +TombstoneRow* +tombstone_row_new (void) +{ #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return tombstone_row_construct (TYPE_TOMBSTONE_ROW); -#line 270 "TombstoneTable.c" +#line 318 "TombstoneTable.c" } -static void value_tombstone_row_init (GValue* value) { +static void +value_tombstone_row_init (GValue* value) +{ #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" value->data[0].v_pointer = NULL; -#line 277 "TombstoneTable.c" +#line 327 "TombstoneTable.c" } -static void value_tombstone_row_free_value (GValue* value) { +static void +value_tombstone_row_free_value (GValue* value) +{ #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" if (value->data[0].v_pointer) { #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" tombstone_row_unref (value->data[0].v_pointer); -#line 286 "TombstoneTable.c" +#line 338 "TombstoneTable.c" } } -static void value_tombstone_row_copy_value (const GValue* src_value, GValue* dest_value) { +static void +value_tombstone_row_copy_value (const GValue* src_value, + GValue* dest_value) +{ #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" if (src_value->data[0].v_pointer) { #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" dest_value->data[0].v_pointer = tombstone_row_ref (src_value->data[0].v_pointer); -#line 296 "TombstoneTable.c" +#line 351 "TombstoneTable.c" } else { #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" dest_value->data[0].v_pointer = NULL; -#line 300 "TombstoneTable.c" +#line 355 "TombstoneTable.c" } } -static gpointer value_tombstone_row_peek_pointer (const GValue* value) { +static gpointer +value_tombstone_row_peek_pointer (const GValue* value) +{ #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return value->data[0].v_pointer; -#line 308 "TombstoneTable.c" +#line 365 "TombstoneTable.c" } -static gchar* value_tombstone_row_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +static gchar* +value_tombstone_row_collect_value (GValue* value, + guint n_collect_values, + GTypeCValue* collect_values, + guint collect_flags) +{ #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" if (collect_values[0].v_pointer) { -#line 315 "TombstoneTable.c" +#line 377 "TombstoneTable.c" TombstoneRow * object; object = collect_values[0].v_pointer; #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" if (object->parent_instance.g_class == NULL) { #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 322 "TombstoneTable.c" +#line 384 "TombstoneTable.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.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 326 "TombstoneTable.c" +#line 388 "TombstoneTable.c" } #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" value->data[0].v_pointer = tombstone_row_ref (object); -#line 330 "TombstoneTable.c" +#line 392 "TombstoneTable.c" } else { #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" value->data[0].v_pointer = NULL; -#line 334 "TombstoneTable.c" +#line 396 "TombstoneTable.c" } #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return NULL; -#line 338 "TombstoneTable.c" +#line 400 "TombstoneTable.c" } -static gchar* value_tombstone_row_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +static gchar* +value_tombstone_row_lcopy_value (const GValue* value, + guint n_collect_values, + GTypeCValue* collect_values, + guint collect_flags) +{ TombstoneRow ** object_p; object_p = collect_values[0].v_pointer; #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" if (!object_p) { #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 349 "TombstoneTable.c" +#line 416 "TombstoneTable.c" } #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" if (!value->data[0].v_pointer) { #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" *object_p = NULL; -#line 355 "TombstoneTable.c" +#line 422 "TombstoneTable.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" *object_p = value->data[0].v_pointer; -#line 359 "TombstoneTable.c" +#line 426 "TombstoneTable.c" } else { #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" *object_p = tombstone_row_ref (value->data[0].v_pointer); -#line 363 "TombstoneTable.c" +#line 430 "TombstoneTable.c" } #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return NULL; -#line 367 "TombstoneTable.c" +#line 434 "TombstoneTable.c" } -GParamSpec* param_spec_tombstone_row (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { +GParamSpec* +param_spec_tombstone_row (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags) +{ ParamSpecTombstoneRow* spec; #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" g_return_val_if_fail (g_type_is_a (object_type, TYPE_TOMBSTONE_ROW), NULL); @@ -377,20 +450,25 @@ GParamSpec* param_spec_tombstone_row (const gchar* name, const gchar* nick, cons G_PARAM_SPEC (spec)->value_type = object_type; #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return G_PARAM_SPEC (spec); -#line 381 "TombstoneTable.c" +#line 454 "TombstoneTable.c" } -gpointer value_get_tombstone_row (const GValue* value) { +gpointer +value_get_tombstone_row (const GValue* value) +{ #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TOMBSTONE_ROW), NULL); #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return value->data[0].v_pointer; -#line 390 "TombstoneTable.c" +#line 465 "TombstoneTable.c" } -void value_set_tombstone_row (GValue* value, gpointer v_object) { +void +value_set_tombstone_row (GValue* value, + gpointer v_object) +{ TombstoneRow * old; #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TOMBSTONE_ROW)); @@ -406,22 +484,25 @@ void value_set_tombstone_row (GValue* value, gpointer v_object) { value->data[0].v_pointer = v_object; #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" tombstone_row_ref (value->data[0].v_pointer); -#line 410 "TombstoneTable.c" +#line 488 "TombstoneTable.c" } else { #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" value->data[0].v_pointer = NULL; -#line 414 "TombstoneTable.c" +#line 492 "TombstoneTable.c" } #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" if (old) { #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" tombstone_row_unref (old); -#line 420 "TombstoneTable.c" +#line 498 "TombstoneTable.c" } } -void value_take_tombstone_row (GValue* value, gpointer v_object) { +void +value_take_tombstone_row (GValue* value, + gpointer v_object) +{ TombstoneRow * old; #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TOMBSTONE_ROW)); @@ -435,38 +516,44 @@ void value_take_tombstone_row (GValue* value, gpointer v_object) { g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" value->data[0].v_pointer = v_object; -#line 439 "TombstoneTable.c" +#line 520 "TombstoneTable.c" } else { #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" value->data[0].v_pointer = NULL; -#line 443 "TombstoneTable.c" +#line 524 "TombstoneTable.c" } #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" if (old) { #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" tombstone_row_unref (old); -#line 449 "TombstoneTable.c" +#line 530 "TombstoneTable.c" } } -static void tombstone_row_class_init (TombstoneRowClass * klass) { +static void +tombstone_row_class_init (TombstoneRowClass * klass) +{ #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" tombstone_row_parent_class = g_type_class_peek_parent (klass); #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" ((TombstoneRowClass *) klass)->finalize = tombstone_row_finalize; -#line 459 "TombstoneTable.c" +#line 542 "TombstoneTable.c" } -static void tombstone_row_instance_init (TombstoneRow * self) { +static void +tombstone_row_instance_init (TombstoneRow * self) +{ #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" self->ref_count = 1; -#line 466 "TombstoneTable.c" +#line 551 "TombstoneTable.c" } -static void tombstone_row_finalize (TombstoneRow * obj) { +static void +tombstone_row_finalize (TombstoneRow * obj) +{ TombstoneRow * self; #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TOMBSTONE_ROW, TombstoneRow); @@ -476,11 +563,13 @@ static void tombstone_row_finalize (TombstoneRow * obj) { _g_free0 (self->filepath); #line 29 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" _g_free0 (self->md5); -#line 480 "TombstoneTable.c" +#line 567 "TombstoneTable.c" } -GType tombstone_row_get_type (void) { +GType +tombstone_row_get_type (void) +{ static volatile gsize tombstone_row_type_id__volatile = 0; if (g_once_init_enter (&tombstone_row_type_id__volatile)) { static const GTypeValueTable g_define_type_value_table = { value_tombstone_row_init, value_tombstone_row_free_value, value_tombstone_row_copy_value, value_tombstone_row_peek_pointer, "p", value_tombstone_row_collect_value, "p", value_tombstone_row_lcopy_value }; @@ -494,18 +583,22 @@ GType tombstone_row_get_type (void) { } -gpointer tombstone_row_ref (gpointer instance) { +gpointer +tombstone_row_ref (gpointer instance) +{ TombstoneRow * self; self = instance; #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" g_atomic_int_inc (&self->ref_count); #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return instance; -#line 505 "TombstoneTable.c" +#line 596 "TombstoneTable.c" } -void tombstone_row_unref (gpointer instance) { +void +tombstone_row_unref (gpointer instance) +{ TombstoneRow * self; self = instance; #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" @@ -514,12 +607,14 @@ void tombstone_row_unref (gpointer instance) { TOMBSTONE_ROW_GET_CLASS (self)->finalize (self); #line 25 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" g_type_free_instance ((GTypeInstance *) self); -#line 518 "TombstoneTable.c" +#line 611 "TombstoneTable.c" } } -static TombstoneTable* tombstone_table_construct (GType object_type) { +static TombstoneTable* +tombstone_table_construct (GType object_type) +{ TombstoneTable* self = NULL; sqlite3_stmt* stmt = NULL; gint res = 0; @@ -529,7 +624,6 @@ static TombstoneTable* tombstone_table_construct (GType object_type) { gint _tmp3_; sqlite3_stmt* _tmp4_; gint _tmp5_; - gint _tmp6_; #line 37 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" self = (TombstoneTable*) database_table_construct (object_type); #line 38 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" @@ -551,44 +645,48 @@ static TombstoneTable* tombstone_table_construct (GType object_type) { #line 53 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" _tmp4_ = stmt; #line 53 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp5_ = sqlite3_step (_tmp4_); -#line 53 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - res = _tmp5_; + res = sqlite3_step (_tmp4_); #line 54 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp6_ = res; + _tmp5_ = res; #line 54 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - if (_tmp6_ != SQLITE_DONE) { -#line 562 "TombstoneTable.c" - gint _tmp7_; + if (_tmp5_ != SQLITE_DONE) { +#line 654 "TombstoneTable.c" + gint _tmp6_; #line 55 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp7_ = res; + _tmp6_ = res; #line 55 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - database_table_fatal ("create TombstoneTable", _tmp7_); -#line 568 "TombstoneTable.c" + database_table_fatal ("create TombstoneTable", _tmp6_); +#line 660 "TombstoneTable.c" } #line 37 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" _sqlite3_finalize0 (stmt); #line 37 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return self; -#line 574 "TombstoneTable.c" +#line 666 "TombstoneTable.c" } -static TombstoneTable* tombstone_table_new (void) { +static TombstoneTable* +tombstone_table_new (void) +{ #line 37 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return tombstone_table_construct (TYPE_TOMBSTONE_TABLE); -#line 581 "TombstoneTable.c" +#line 675 "TombstoneTable.c" } -static gpointer _database_table_ref0 (gpointer self) { +static gpointer +_database_table_ref0 (gpointer self) +{ #line 62 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return self ? database_table_ref (self) : NULL; -#line 588 "TombstoneTable.c" +#line 684 "TombstoneTable.c" } -TombstoneTable* tombstone_table_get_instance (void) { +TombstoneTable* +tombstone_table_get_instance (void) +{ TombstoneTable* result = NULL; TombstoneTable* _tmp0_; TombstoneTable* _tmp2_; @@ -597,7 +695,7 @@ TombstoneTable* tombstone_table_get_instance (void) { _tmp0_ = tombstone_table_instance; #line 59 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" if (_tmp0_ == NULL) { -#line 601 "TombstoneTable.c" +#line 699 "TombstoneTable.c" TombstoneTable* _tmp1_; #line 60 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" _tmp1_ = tombstone_table_new (); @@ -605,7 +703,7 @@ TombstoneTable* tombstone_table_get_instance (void) { _database_table_unref0 (tombstone_table_instance); #line 60 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" tombstone_table_instance = _tmp1_; -#line 609 "TombstoneTable.c" +#line 707 "TombstoneTable.c" } #line 62 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" _tmp2_ = tombstone_table_instance; @@ -615,11 +713,18 @@ TombstoneTable* tombstone_table_get_instance (void) { result = _tmp3_; #line 62 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return result; -#line 619 "TombstoneTable.c" +#line 717 "TombstoneTable.c" } -TombstoneRow* tombstone_table_add (TombstoneTable* self, const gchar* filepath, gint64 filesize, const gchar* md5, TombstoneReason reason, GError** error) { +TombstoneRow* +tombstone_table_add (TombstoneTable* self, + const gchar* filepath, + gint64 filesize, + const gchar* md5, + TombstoneReason reason, + GError** error) +{ TombstoneRow* result = NULL; sqlite3_stmt* stmt = NULL; gint res = 0; @@ -628,52 +733,35 @@ TombstoneRow* tombstone_table_add (TombstoneTable* self, const gchar* filepath, gint _tmp2_; gint _tmp3_; time_t time_created = 0; - gulong _tmp4_; - sqlite3_stmt* _tmp5_; - const gchar* _tmp6_; - gchar* _tmp7_; - GDestroyNotify _tmp8_; + sqlite3_stmt* _tmp4_; + gchar* _tmp5_; + GDestroyNotify _tmp6_; + gint _tmp7_; + sqlite3_stmt* _tmp8_; gint _tmp9_; - gint _tmp10_; - sqlite3_stmt* _tmp11_; - gint64 _tmp12_; + sqlite3_stmt* _tmp10_; + gchar* _tmp11_; + GDestroyNotify _tmp12_; gint _tmp13_; - gint _tmp14_; - sqlite3_stmt* _tmp15_; - const gchar* _tmp16_; - gchar* _tmp17_; - GDestroyNotify _tmp18_; - gint _tmp19_; + sqlite3_stmt* _tmp14_; + time_t _tmp15_; + gint _tmp16_; + sqlite3_stmt* _tmp17_; + gint _tmp18_; + sqlite3_stmt* _tmp19_; gint _tmp20_; - sqlite3_stmt* _tmp21_; - time_t _tmp22_; - gint _tmp23_; - gint _tmp24_; - sqlite3_stmt* _tmp25_; - TombstoneReason _tmp26_; - gint _tmp27_; - gint _tmp28_; - gint _tmp29_; - sqlite3_stmt* _tmp30_; - gint _tmp31_; - gint _tmp32_; TombstoneRow* row = NULL; - TombstoneRow* _tmp34_; - TombstoneRow* _tmp35_; - sqlite3* _tmp36_; - gint64 _tmp37_; - TombstoneRow* _tmp38_; - const gchar* _tmp39_; - gchar* _tmp40_; - TombstoneRow* _tmp41_; - gint64 _tmp42_; - TombstoneRow* _tmp43_; - const gchar* _tmp44_; - gchar* _tmp45_; - TombstoneRow* _tmp46_; - time_t _tmp47_; - TombstoneRow* _tmp48_; - TombstoneReason _tmp49_; + TombstoneRow* _tmp22_; + TombstoneRow* _tmp23_; + sqlite3* _tmp24_; + TombstoneRow* _tmp25_; + gchar* _tmp26_; + TombstoneRow* _tmp27_; + TombstoneRow* _tmp28_; + gchar* _tmp29_; + TombstoneRow* _tmp30_; + time_t _tmp31_; + TombstoneRow* _tmp32_; GError * _inner_error_ = NULL; #line 65 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" g_return_val_if_fail (IS_TOMBSTONE_TABLE (self), NULL); @@ -694,95 +782,71 @@ TombstoneRow* tombstone_table_add (TombstoneTable* self, const gchar* filepath, #line 72 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" _vala_assert (_tmp3_ == SQLITE_OK, "res == Sqlite.OK"); #line 74 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp4_ = now_sec (); -#line 74 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - time_created = (time_t) _tmp4_; -#line 76 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp5_ = stmt; + time_created = (time_t) now_sec (); #line 76 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp6_ = filepath; -#line 76 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp7_ = g_strdup (_tmp6_); + _tmp4_ = stmt; #line 76 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp8_ = g_free; + _tmp5_ = g_strdup (filepath); #line 76 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp9_ = sqlite3_bind_text (_tmp5_, 1, _tmp7_, -1, _tmp8_); + _tmp6_ = g_free; #line 76 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - res = _tmp9_; + res = sqlite3_bind_text (_tmp4_, 1, _tmp5_, -1, _tmp6_); #line 77 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp10_ = res; + _tmp7_ = res; #line 77 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _vala_assert (_tmp10_ == SQLITE_OK, "res == Sqlite.OK"); + _vala_assert (_tmp7_ == SQLITE_OK, "res == Sqlite.OK"); #line 78 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp11_ = stmt; + _tmp8_ = stmt; #line 78 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp12_ = filesize; -#line 78 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp13_ = sqlite3_bind_int64 (_tmp11_, 2, _tmp12_); -#line 78 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - res = _tmp13_; + res = sqlite3_bind_int64 (_tmp8_, 2, filesize); #line 79 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp14_ = res; + _tmp9_ = res; #line 79 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _vala_assert (_tmp14_ == SQLITE_OK, "res == Sqlite.OK"); -#line 80 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp15_ = stmt; -#line 80 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp16_ = md5; + _vala_assert (_tmp9_ == SQLITE_OK, "res == Sqlite.OK"); #line 80 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp17_ = g_strdup (_tmp16_); + _tmp10_ = stmt; #line 80 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp18_ = g_free; + _tmp11_ = g_strdup (md5); #line 80 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp19_ = sqlite3_bind_text (_tmp15_, 3, _tmp17_, -1, _tmp18_); + _tmp12_ = g_free; #line 80 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - res = _tmp19_; + res = sqlite3_bind_text (_tmp10_, 3, _tmp11_, -1, _tmp12_); #line 81 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp20_ = res; + _tmp13_ = res; #line 81 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _vala_assert (_tmp20_ == SQLITE_OK, "res == Sqlite.OK"); -#line 82 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp21_ = stmt; + _vala_assert (_tmp13_ == SQLITE_OK, "res == Sqlite.OK"); #line 82 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp22_ = time_created; + _tmp14_ = stmt; #line 82 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp23_ = sqlite3_bind_int64 (_tmp21_, 4, (gint64) _tmp22_); + _tmp15_ = time_created; #line 82 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - res = _tmp23_; + res = sqlite3_bind_int64 (_tmp14_, 4, (gint64) _tmp15_); #line 83 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp24_ = res; + _tmp16_ = res; #line 83 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _vala_assert (_tmp24_ == SQLITE_OK, "res == Sqlite.OK"); -#line 84 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp25_ = stmt; -#line 84 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp26_ = reason; + _vala_assert (_tmp16_ == SQLITE_OK, "res == Sqlite.OK"); #line 84 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp27_ = tombstone_reason_serialize (_tmp26_); + _tmp17_ = stmt; #line 84 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp28_ = sqlite3_bind_int (_tmp25_, 5, _tmp27_); -#line 84 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - res = _tmp28_; + res = sqlite3_bind_int (_tmp17_, 5, tombstone_reason_serialize (reason)); #line 85 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp29_ = res; + _tmp18_ = res; #line 85 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _vala_assert (_tmp29_ == SQLITE_OK, "res == Sqlite.OK"); -#line 87 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp30_ = stmt; + _vala_assert (_tmp18_ == SQLITE_OK, "res == Sqlite.OK"); #line 87 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp31_ = sqlite3_step (_tmp30_); + _tmp19_ = stmt; #line 87 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - res = _tmp31_; + res = sqlite3_step (_tmp19_); #line 88 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp32_ = res; + _tmp20_ = res; #line 88 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - if (_tmp32_ != SQLITE_DONE) { -#line 781 "TombstoneTable.c" - gint _tmp33_; + if (_tmp20_ != SQLITE_DONE) { +#line 845 "TombstoneTable.c" + gint _tmp21_; #line 89 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp33_ = res; + _tmp21_ = res; #line 89 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - database_table_throw_error ("TombstoneTable.add", _tmp33_, &_inner_error_); + database_table_throw_error ("TombstoneTable.add", _tmp21_, &_inner_error_); #line 89 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 89 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" @@ -793,7 +857,7 @@ TombstoneRow* tombstone_table_add (TombstoneTable* self, const gchar* filepath, _sqlite3_finalize0 (stmt); #line 89 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return NULL; -#line 797 "TombstoneTable.c" +#line 861 "TombstoneTable.c" } else { #line 89 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" _sqlite3_finalize0 (stmt); @@ -803,225 +867,210 @@ TombstoneRow* tombstone_table_add (TombstoneTable* self, const gchar* filepath, g_clear_error (&_inner_error_); #line 89 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return NULL; -#line 807 "TombstoneTable.c" +#line 871 "TombstoneTable.c" } } } #line 91 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp34_ = tombstone_row_new (); + _tmp22_ = tombstone_row_new (); #line 91 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - row = _tmp34_; + row = _tmp22_; #line 92 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp35_ = row; + _tmp23_ = row; #line 92 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp36_ = database_table_db; + _tmp24_ = database_table_db; #line 92 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp37_ = sqlite3_last_insert_rowid (_tmp36_); -#line 92 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - tombstone_id_init (&_tmp35_->id, _tmp37_); -#line 93 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp38_ = row; + tombstone_id_init (&_tmp23_->id, sqlite3_last_insert_rowid (_tmp24_)); #line 93 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp39_ = filepath; + _tmp25_ = row; #line 93 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp40_ = g_strdup (_tmp39_); + _tmp26_ = g_strdup (filepath); #line 93 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _g_free0 (_tmp38_->filepath); + _g_free0 (_tmp25_->filepath); #line 93 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp38_->filepath = _tmp40_; + _tmp25_->filepath = _tmp26_; #line 94 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp41_ = row; + _tmp27_ = row; #line 94 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp42_ = filesize; -#line 94 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp41_->filesize = _tmp42_; -#line 95 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp43_ = row; + _tmp27_->filesize = filesize; #line 95 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp44_ = md5; + _tmp28_ = row; #line 95 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp45_ = g_strdup (_tmp44_); + _tmp29_ = g_strdup (md5); #line 95 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _g_free0 (_tmp43_->md5); + _g_free0 (_tmp28_->md5); #line 95 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp43_->md5 = _tmp45_; + _tmp28_->md5 = _tmp29_; #line 96 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp46_ = row; + _tmp30_ = row; #line 96 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp47_ = time_created; + _tmp31_ = time_created; #line 96 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp46_->time_created = _tmp47_; + _tmp30_->time_created = _tmp31_; #line 97 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp48_ = row; + _tmp32_ = row; #line 97 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp49_ = reason; -#line 97 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp48_->reason = _tmp49_; + _tmp32_->reason = reason; #line 99 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" result = row; #line 99 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" _sqlite3_finalize0 (stmt); #line 99 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return result; -#line 867 "TombstoneTable.c" +#line 921 "TombstoneTable.c" } -static gpointer _tombstone_row_ref0 (gpointer self) { +static gpointer +_tombstone_row_ref0 (gpointer self) +{ #line 130 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return self ? tombstone_row_ref (self) : NULL; -#line 874 "TombstoneTable.c" +#line 930 "TombstoneTable.c" } -TombstoneRow** tombstone_table_fetch_all (TombstoneTable* self, int* result_length1, GError** error) { +TombstoneRow** +tombstone_table_fetch_all (TombstoneTable* self, + int* result_length1, + GError** error) +{ TombstoneRow** result = NULL; gint row_count = 0; gint _tmp0_; - gint _tmp1_; sqlite3_stmt* stmt = NULL; gint res = 0; - sqlite3* _tmp3_; - sqlite3_stmt* _tmp4_ = NULL; + sqlite3* _tmp2_; + sqlite3_stmt* _tmp3_ = NULL; + gint _tmp4_; gint _tmp5_; - gint _tmp6_; TombstoneRow** rows = NULL; - gint _tmp7_; - TombstoneRow** _tmp8_; + gint _tmp6_; + TombstoneRow** _tmp7_; gint rows_length1; gint _rows_size_; gint index = 0; - gint _tmp42_; - gint _tmp43_; - TombstoneRow** _tmp44_; - gint _tmp44__length1; + gint _tmp35_; + gint _tmp36_; + TombstoneRow** _tmp37_; + gint _tmp37__length1; GError * _inner_error_ = NULL; #line 102 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" g_return_val_if_fail (IS_TOMBSTONE_TABLE (self), NULL); #line 103 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp0_ = database_table_get_row_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_TABLE, DatabaseTable)); -#line 103 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - row_count = _tmp0_; + row_count = database_table_get_row_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_TABLE, DatabaseTable)); #line 104 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp1_ = row_count; + _tmp0_ = row_count; #line 104 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - if (_tmp1_ == 0) { -#line 910 "TombstoneTable.c" - TombstoneRow** _tmp2_; - gint _tmp2__length1; + if (_tmp0_ == 0) { +#line 967 "TombstoneTable.c" + TombstoneRow** _tmp1_; + gint _tmp1__length1; #line 105 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp2_ = NULL; + _tmp1_ = NULL; #line 105 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp2__length1 = 0; + _tmp1__length1 = 0; #line 105 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" if (result_length1) { #line 105 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - *result_length1 = _tmp2__length1; -#line 921 "TombstoneTable.c" + *result_length1 = _tmp1__length1; +#line 978 "TombstoneTable.c" } #line 105 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - result = _tmp2_; + result = _tmp1_; #line 105 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return result; -#line 927 "TombstoneTable.c" +#line 984 "TombstoneTable.c" } #line 108 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp3_ = database_table_db; + _tmp2_ = database_table_db; #line 108 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp5_ = sqlite3_prepare_v2 (_tmp3_, "SELECT id, filepath, filesize, md5, time_created, reason " "FROM TombstoneTable", -1, &_tmp4_, NULL); + _tmp4_ = sqlite3_prepare_v2 (_tmp2_, "SELECT id, filepath, filesize, md5, time_created, reason " "FROM TombstoneTable", -1, &_tmp3_, NULL); #line 108 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" _sqlite3_finalize0 (stmt); #line 108 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - stmt = _tmp4_; + stmt = _tmp3_; #line 108 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - res = _tmp5_; + res = _tmp4_; #line 110 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp6_ = res; + _tmp5_ = res; #line 110 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _vala_assert (_tmp6_ == SQLITE_OK, "res == Sqlite.OK"); + _vala_assert (_tmp5_ == SQLITE_OK, "res == Sqlite.OK"); #line 112 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp7_ = row_count; + _tmp6_ = row_count; #line 112 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp8_ = g_new0 (TombstoneRow*, _tmp7_ + 1); + _tmp7_ = g_new0 (TombstoneRow*, _tmp6_ + 1); #line 112 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - rows = _tmp8_; + rows = _tmp7_; #line 112 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - rows_length1 = _tmp7_; + rows_length1 = _tmp6_; #line 112 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" _rows_size_ = rows_length1; #line 114 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" index = 0; -#line 955 "TombstoneTable.c" +#line 1012 "TombstoneTable.c" { - gboolean _tmp9_ = FALSE; + gboolean _tmp8_ = FALSE; #line 115 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp9_ = TRUE; + _tmp8_ = TRUE; #line 115 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" while (TRUE) { -#line 962 "TombstoneTable.c" - sqlite3_stmt* _tmp10_; - gint _tmp11_; - gint _tmp12_; +#line 1019 "TombstoneTable.c" + sqlite3_stmt* _tmp9_; + gint _tmp10_; TombstoneRow* row = NULL; - TombstoneRow* _tmp15_; + TombstoneRow* _tmp13_; + TombstoneRow* _tmp14_; + sqlite3_stmt* _tmp15_; TombstoneRow* _tmp16_; sqlite3_stmt* _tmp17_; - gint64 _tmp18_; - TombstoneRow* _tmp19_; - sqlite3_stmt* _tmp20_; - const gchar* _tmp21_; - gchar* _tmp22_; - TombstoneRow* _tmp23_; - sqlite3_stmt* _tmp24_; - gint64 _tmp25_; + const gchar* _tmp18_; + gchar* _tmp19_; + TombstoneRow* _tmp20_; + sqlite3_stmt* _tmp21_; + TombstoneRow* _tmp22_; + sqlite3_stmt* _tmp23_; + const gchar* _tmp24_; + gchar* _tmp25_; TombstoneRow* _tmp26_; sqlite3_stmt* _tmp27_; - const gchar* _tmp28_; - gchar* _tmp29_; - TombstoneRow* _tmp30_; - sqlite3_stmt* _tmp31_; - gint64 _tmp32_; + TombstoneRow* _tmp28_; + sqlite3_stmt* _tmp29_; + TombstoneRow** _tmp30_; + gint _tmp30__length1; + gint _tmp31_; + TombstoneRow* _tmp32_; TombstoneRow* _tmp33_; - sqlite3_stmt* _tmp34_; - gint _tmp35_; - TombstoneReason _tmp36_; - TombstoneRow** _tmp37_; - gint _tmp37__length1; - gint _tmp38_; - TombstoneRow* _tmp39_; - TombstoneRow* _tmp40_; - TombstoneRow* _tmp41_; + TombstoneRow* _tmp34_; #line 115 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - if (!_tmp9_) { -#line 997 "TombstoneTable.c" + if (!_tmp8_) { +#line 1048 "TombstoneTable.c" } #line 115 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp9_ = FALSE; -#line 116 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp10_ = stmt; + _tmp8_ = FALSE; #line 116 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp11_ = sqlite3_step (_tmp10_); + _tmp9_ = stmt; #line 116 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - res = _tmp11_; + res = sqlite3_step (_tmp9_); #line 117 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp12_ = res; + _tmp10_ = res; #line 117 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - if (_tmp12_ == SQLITE_DONE) { + if (_tmp10_ == SQLITE_DONE) { #line 118 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" break; -#line 1013 "TombstoneTable.c" +#line 1062 "TombstoneTable.c" } else { - gint _tmp13_; + gint _tmp11_; #line 119 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp13_ = res; + _tmp11_ = res; #line 119 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - if (_tmp13_ != SQLITE_ROW) { -#line 1020 "TombstoneTable.c" - gint _tmp14_; + if (_tmp11_ != SQLITE_ROW) { +#line 1069 "TombstoneTable.c" + gint _tmp12_; #line 120 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp14_ = res; + _tmp12_ = res; #line 120 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - database_table_throw_error ("TombstoneTable.fetch_all", _tmp14_, &_inner_error_); + database_table_throw_error ("TombstoneTable.fetch_all", _tmp12_, &_inner_error_); #line 120 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 120 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" @@ -1034,7 +1083,7 @@ TombstoneRow** tombstone_table_fetch_all (TombstoneTable* self, int* result_leng _sqlite3_finalize0 (stmt); #line 120 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return NULL; -#line 1038 "TombstoneTable.c" +#line 1087 "TombstoneTable.c" } else { #line 120 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" rows = (_vala_array_free (rows, rows_length1, (GDestroyNotify) tombstone_row_unref), NULL); @@ -1046,126 +1095,120 @@ TombstoneRow** tombstone_table_fetch_all (TombstoneTable* self, int* result_leng g_clear_error (&_inner_error_); #line 120 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return NULL; -#line 1050 "TombstoneTable.c" +#line 1099 "TombstoneTable.c" } } } } #line 122 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp15_ = tombstone_row_new (); + _tmp13_ = tombstone_row_new (); #line 122 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - row = _tmp15_; + row = _tmp13_; #line 123 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp16_ = row; -#line 123 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp17_ = stmt; + _tmp14_ = row; #line 123 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp18_ = sqlite3_column_int64 (_tmp17_, 0); + _tmp15_ = stmt; #line 123 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - tombstone_id_init (&_tmp16_->id, _tmp18_); + tombstone_id_init (&_tmp14_->id, sqlite3_column_int64 (_tmp15_, 0)); #line 124 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp19_ = row; + _tmp16_ = row; #line 124 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp20_ = stmt; + _tmp17_ = stmt; #line 124 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp21_ = sqlite3_column_text (_tmp20_, 1); + _tmp18_ = sqlite3_column_text (_tmp17_, 1); #line 124 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp22_ = g_strdup (_tmp21_); + _tmp19_ = g_strdup (_tmp18_); #line 124 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _g_free0 (_tmp19_->filepath); + _g_free0 (_tmp16_->filepath); #line 124 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp19_->filepath = _tmp22_; + _tmp16_->filepath = _tmp19_; #line 125 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp23_ = row; + _tmp20_ = row; #line 125 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp24_ = stmt; + _tmp21_ = stmt; #line 125 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp25_ = sqlite3_column_int64 (_tmp24_, 2); -#line 125 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp23_->filesize = _tmp25_; + _tmp20_->filesize = sqlite3_column_int64 (_tmp21_, 2); #line 126 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp26_ = row; + _tmp22_ = row; #line 126 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp27_ = stmt; + _tmp23_ = stmt; #line 126 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp28_ = sqlite3_column_text (_tmp27_, 3); + _tmp24_ = sqlite3_column_text (_tmp23_, 3); #line 126 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp29_ = g_strdup (_tmp28_); + _tmp25_ = g_strdup (_tmp24_); #line 126 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _g_free0 (_tmp26_->md5); + _g_free0 (_tmp22_->md5); #line 126 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp26_->md5 = _tmp29_; -#line 127 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp30_ = row; + _tmp22_->md5 = _tmp25_; #line 127 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp31_ = stmt; + _tmp26_ = row; #line 127 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp32_ = sqlite3_column_int64 (_tmp31_, 4); + _tmp27_ = stmt; #line 127 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp30_->time_created = (time_t) _tmp32_; + _tmp26_->time_created = (time_t) sqlite3_column_int64 (_tmp27_, 4); #line 128 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp33_ = row; + _tmp28_ = row; #line 128 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp34_ = stmt; + _tmp29_ = stmt; #line 128 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp35_ = sqlite3_column_int (_tmp34_, 5); -#line 128 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp36_ = tombstone_reason_unserialize (_tmp35_); -#line 128 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp33_->reason = _tmp36_; + _tmp28_->reason = tombstone_reason_unserialize (sqlite3_column_int (_tmp29_, 5)); #line 130 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp37_ = rows; + _tmp30_ = rows; #line 130 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp37__length1 = rows_length1; + _tmp30__length1 = rows_length1; #line 130 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp38_ = index; + _tmp31_ = index; #line 130 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - index = _tmp38_ + 1; + index = _tmp31_ + 1; #line 130 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp39_ = row; + _tmp32_ = row; #line 130 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp40_ = _tombstone_row_ref0 (_tmp39_); + _tmp33_ = _tombstone_row_ref0 (_tmp32_); #line 130 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tombstone_row_unref0 (_tmp37_[_tmp38_]); + _tombstone_row_unref0 (_tmp30_[_tmp31_]); #line 130 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp37_[_tmp38_] = _tmp40_; + _tmp30_[_tmp31_] = _tmp33_; #line 130 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp41_ = _tmp37_[_tmp38_]; + _tmp34_ = _tmp30_[_tmp31_]; #line 115 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" _tombstone_row_unref0 (row); -#line 1137 "TombstoneTable.c" +#line 1176 "TombstoneTable.c" } } #line 133 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp42_ = index; + _tmp35_ = index; #line 133 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp43_ = row_count; + _tmp36_ = row_count; #line 133 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _vala_assert (_tmp42_ == _tmp43_, "index == row_count"); + _vala_assert (_tmp35_ == _tmp36_, "index == row_count"); #line 135 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp44_ = rows; + _tmp37_ = rows; #line 135 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp44__length1 = rows_length1; + _tmp37__length1 = rows_length1; #line 135 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" if (result_length1) { #line 135 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - *result_length1 = _tmp44__length1; -#line 1154 "TombstoneTable.c" + *result_length1 = _tmp37__length1; +#line 1193 "TombstoneTable.c" } #line 135 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - result = _tmp44_; + result = _tmp37_; #line 135 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" _sqlite3_finalize0 (stmt); #line 135 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return result; -#line 1162 "TombstoneTable.c" +#line 1201 "TombstoneTable.c" } -void tombstone_table_update_file (TombstoneTable* self, TombstoneID* tombstone_id, const gchar* filepath, GError** error) { +void +tombstone_table_update_file (TombstoneTable* self, + TombstoneID* tombstone_id, + const gchar* filepath, + GError** error) +{ TombstoneID _tmp0_; gint64 _tmp1_; - const gchar* _tmp2_; GError * _inner_error_ = NULL; #line 138 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" g_return_if_fail (IS_TOMBSTONE_TABLE (self)); @@ -1178,9 +1221,7 @@ void tombstone_table_update_file (TombstoneTable* self, TombstoneID* tombstone_i #line 139 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" _tmp1_ = _tmp0_.id; #line 139 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - _tmp2_ = filepath; -#line 139 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" - database_table_update_text_by_id_2 (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_TABLE, DatabaseTable), _tmp1_, "filepath", _tmp2_, &_inner_error_); + database_table_update_text_by_id_2 (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_TABLE, DatabaseTable), _tmp1_, "filepath", filepath, &_inner_error_); #line 139 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 139 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" @@ -1189,7 +1230,7 @@ void tombstone_table_update_file (TombstoneTable* self, TombstoneID* tombstone_i g_propagate_error (error, _inner_error_); #line 139 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return; -#line 1193 "TombstoneTable.c" +#line 1234 "TombstoneTable.c" } else { #line 139 "/home/jens/Source/shotwell/src/db/TombstoneTable.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); @@ -1197,13 +1238,17 @@ void tombstone_table_update_file (TombstoneTable* self, TombstoneID* tombstone_i g_clear_error (&_inner_error_); #line 139 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return; -#line 1201 "TombstoneTable.c" +#line 1242 "TombstoneTable.c" } } } -void tombstone_table_remove (TombstoneTable* self, TombstoneID* tombstone_id, GError** error) { +void +tombstone_table_remove (TombstoneTable* self, + TombstoneID* tombstone_id, + GError** error) +{ TombstoneID _tmp0_; gint64 _tmp1_; GError * _inner_error_ = NULL; @@ -1225,7 +1270,7 @@ void tombstone_table_remove (TombstoneTable* self, TombstoneID* tombstone_id, GE g_propagate_error (error, _inner_error_); #line 143 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return; -#line 1229 "TombstoneTable.c" +#line 1274 "TombstoneTable.c" } else { #line 143 "/home/jens/Source/shotwell/src/db/TombstoneTable.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); @@ -1233,36 +1278,44 @@ void tombstone_table_remove (TombstoneTable* self, TombstoneID* tombstone_id, GE g_clear_error (&_inner_error_); #line 143 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" return; -#line 1237 "TombstoneTable.c" +#line 1282 "TombstoneTable.c" } } } -static void tombstone_table_class_init (TombstoneTableClass * klass) { +static void +tombstone_table_class_init (TombstoneTableClass * klass) +{ #line 34 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" tombstone_table_parent_class = g_type_class_peek_parent (klass); #line 34 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" ((DatabaseTableClass *) klass)->finalize = tombstone_table_finalize; -#line 1248 "TombstoneTable.c" +#line 1295 "TombstoneTable.c" } -static void tombstone_table_instance_init (TombstoneTable * self) { +static void +tombstone_table_instance_init (TombstoneTable * self) +{ } -static void tombstone_table_finalize (DatabaseTable * obj) { +static void +tombstone_table_finalize (DatabaseTable * obj) +{ TombstoneTable * self; #line 34 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TOMBSTONE_TABLE, TombstoneTable); #line 34 "/home/jens/Source/shotwell/src/db/TombstoneTable.vala" DATABASE_TABLE_CLASS (tombstone_table_parent_class)->finalize (obj); -#line 1262 "TombstoneTable.c" +#line 1313 "TombstoneTable.c" } -GType tombstone_table_get_type (void) { +GType +tombstone_table_get_type (void) +{ static volatile gsize tombstone_table_type_id__volatile = 0; if (g_once_init_enter (&tombstone_table_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (TombstoneTableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tombstone_table_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TombstoneTable), 0, (GInstanceInitFunc) tombstone_table_instance_init, NULL }; @@ -1274,7 +1327,11 @@ GType tombstone_table_get_type (void) { } -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { +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) { @@ -1286,7 +1343,11 @@ static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNoti } -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { +static void +_vala_array_free (gpointer array, + gint array_length, + GDestroyNotify destroy_func) +{ _vala_array_destroy (array, array_length, destroy_func); g_free (array); } |