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/EventTable.c | |
parent | f1353e9ffd34db5f755c7da0b3f9c10638fbfd38 (diff) | |
parent | 5c8be07095cc04a6d8a95204b0504fd7ab030154 (diff) |
Merge branch 'release/0.28.3-1'0.28.3-1
Diffstat (limited to 'src/db/EventTable.c')
-rw-r--r-- | src/db/EventTable.c | 1274 |
1 files changed, 649 insertions, 625 deletions
diff --git a/src/db/EventTable.c b/src/db/EventTable.c index 462ebc8..ce14303 100644 --- a/src/db/EventTable.c +++ b/src/db/EventTable.c @@ -1,4 +1,4 @@ -/* EventTable.c generated by valac 0.36.6, the Vala compiler +/* EventTable.c generated by valac 0.40.4, the Vala compiler * generated from EventTable.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> @@ -146,88 +147,136 @@ GType event_id_get_type (void) G_GNUC_CONST; EventID* event_id_dup (const EventID* self); void event_id_free (EventID* self); #define EVENT_ID_INVALID ((gint64) -1) -void event_id_init (EventID *self, gint64 id); +void event_id_init (EventID *self, + gint64 id); gboolean event_id_is_invalid (EventID *self); gboolean event_id_is_valid (EventID *self); gpointer event_row_ref (gpointer instance); void event_row_unref (gpointer instance); -GParamSpec* param_spec_event_row (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_event_row (GValue* value, gpointer v_object); -void value_take_event_row (GValue* value, gpointer v_object); +GParamSpec* param_spec_event_row (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void value_set_event_row (GValue* value, + gpointer v_object); +void value_take_event_row (GValue* value, + gpointer v_object); gpointer value_get_event_row (const GValue* value); GType event_row_get_type (void) G_GNUC_CONST; -enum { - EVENT_ROW_DUMMY_PROPERTY -}; EventRow* event_row_new (void); EventRow* event_row_construct (GType object_type); static void event_row_finalize (EventRow * 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 event_table_get_type (void) G_GNUC_CONST; -enum { - EVENT_TABLE_DUMMY_PROPERTY -}; static EventTable* event_table_new (void); static EventTable* event_table_construct (GType object_type); DatabaseTable* database_table_construct (GType object_type); -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); +void database_table_set_table_name (DatabaseTable* self, + const gchar* table_name); EventTable* event_table_get_instance (void); -static gchar* event_table_source_id_upgrade (EventTable* self, gint64 primary_photo_id, const gchar* primary_source_id); +static gchar* event_table_source_id_upgrade (EventTable* self, + gint64 primary_photo_id, + const gchar* primary_source_id); gpointer media_collection_registry_ref (gpointer instance); void media_collection_registry_unref (gpointer instance); -GParamSpec* param_spec_media_collection_registry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_media_collection_registry (GValue* value, gpointer v_object); -void value_take_media_collection_registry (GValue* value, gpointer v_object); +GParamSpec* param_spec_media_collection_registry (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void value_set_media_collection_registry (GValue* value, + gpointer v_object); +void value_take_media_collection_registry (GValue* value, + gpointer v_object); gpointer value_get_media_collection_registry (const GValue* value); GType media_collection_registry_get_type (void) G_GNUC_CONST; MediaCollectionRegistry* media_collection_registry_get_instance (void); -gboolean media_collection_registry_is_valid_source_id (MediaCollectionRegistry* self, const gchar* source_id); +gboolean media_collection_registry_is_valid_source_id (MediaCollectionRegistry* self, + const gchar* source_id); #define PHOTO_ID_INVALID ((gint64) -1) GType photo_id_get_type (void) G_GNUC_CONST; PhotoID* photo_id_dup (const PhotoID* self); void photo_id_free (PhotoID* self); gchar* photo_id_upgrade_photo_id_to_source_id (PhotoID* photo_id); -void photo_id_init (PhotoID *self, gint64 id); +void photo_id_init (PhotoID *self, + gint64 id); GQuark database_error_quark (void); -EventRow* event_table_create (EventTable* self, const gchar* primary_source_id, const gchar* comment, GError** error); +EventRow* event_table_create (EventTable* self, + const gchar* primary_source_id, + const gchar* comment, + GError** error); gulong now_sec (void); -void database_table_throw_error (const gchar* method, gint res, GError** error); -void event_table_create_from_row (EventTable* self, EventRow* row, EventID* result); -EventRow* event_table_get_row (EventTable* self, EventID* event_id); -void event_table_remove (EventTable* self, EventID* event_id, GError** error); -void database_table_delete_by_id (DatabaseTable* self, gint64 id, GError** error); +void database_table_throw_error (const gchar* method, + gint res, + GError** error); +void event_table_create_from_row (EventTable* self, + EventRow* row, + EventID* result); +EventRow* event_table_get_row (EventTable* self, + EventID* event_id); +void event_table_remove (EventTable* self, + EventID* event_id, + GError** error); +void database_table_delete_by_id (DatabaseTable* self, + gint64 id, + GError** error); GeeArrayList* event_table_get_events (EventTable* self); -gboolean event_table_rename (EventTable* self, EventID* event_id, const gchar* name); -gboolean database_table_update_text_by_id (DatabaseTable* self, gint64 id, const gchar* column, const gchar* text); -gchar* event_table_get_name (EventTable* self, EventID* event_id); -gboolean database_table_select_by_id (DatabaseTable* self, gint64 id, const gchar* columns, sqlite3_stmt* * stmt); -gchar* event_table_get_primary_source_id (EventTable* self, EventID* event_id); -gboolean event_table_set_primary_source_id (EventTable* self, EventID* event_id, const gchar* primary_source_id); -time_t event_table_get_time_created (EventTable* self, EventID* event_id); -gboolean event_table_set_comment (EventTable* self, EventID* event_id, const gchar* new_comment); +gboolean event_table_rename (EventTable* self, + EventID* event_id, + const gchar* name); +gboolean database_table_update_text_by_id (DatabaseTable* self, + gint64 id, + const gchar* column, + const gchar* text); +gchar* event_table_get_name (EventTable* self, + EventID* event_id); +gboolean database_table_select_by_id (DatabaseTable* self, + gint64 id, + const gchar* columns, + sqlite3_stmt* * stmt); +gchar* event_table_get_primary_source_id (EventTable* self, + EventID* event_id); +gboolean event_table_set_primary_source_id (EventTable* self, + EventID* event_id, + const gchar* primary_source_id); +time_t event_table_get_time_created (EventTable* self, + EventID* event_id); +gboolean event_table_set_comment (EventTable* self, + EventID* event_id, + const gchar* new_comment); static void event_table_finalize (DatabaseTable * obj); -void event_id_init (EventID *self, gint64 id) { - gint64 _tmp0_; +void +event_id_init (EventID *self, + gint64 id) +{ #line 12 "/home/jens/Source/shotwell/src/db/EventTable.vala" memset (self, 0, sizeof (EventID)); #line 13 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp0_ = id; -#line 13 "/home/jens/Source/shotwell/src/db/EventTable.vala" - (*self).id = _tmp0_; -#line 227 "EventTable.c" + (*self).id = id; +#line 274 "EventTable.c" } -gboolean event_id_is_invalid (EventID *self) { +gboolean +event_id_is_invalid (EventID *self) +{ gboolean result = FALSE; gint64 _tmp0_; #line 17 "/home/jens/Source/shotwell/src/db/EventTable.vala" @@ -236,11 +285,13 @@ gboolean event_id_is_invalid (EventID *self) { result = _tmp0_ == EVENT_ID_INVALID; #line 17 "/home/jens/Source/shotwell/src/db/EventTable.vala" return result; -#line 240 "EventTable.c" +#line 289 "EventTable.c" } -gboolean event_id_is_valid (EventID *self) { +gboolean +event_id_is_valid (EventID *self) +{ gboolean result = FALSE; gint64 _tmp0_; #line 21 "/home/jens/Source/shotwell/src/db/EventTable.vala" @@ -249,11 +300,13 @@ gboolean event_id_is_valid (EventID *self) { result = _tmp0_ != EVENT_ID_INVALID; #line 21 "/home/jens/Source/shotwell/src/db/EventTable.vala" return result; -#line 253 "EventTable.c" +#line 304 "EventTable.c" } -EventID* event_id_dup (const EventID* self) { +EventID* +event_id_dup (const EventID* self) +{ EventID* dup; #line 7 "/home/jens/Source/shotwell/src/db/EventTable.vala" dup = g_new0 (EventID, 1); @@ -261,18 +314,22 @@ EventID* event_id_dup (const EventID* self) { memcpy (dup, self, sizeof (EventID)); #line 7 "/home/jens/Source/shotwell/src/db/EventTable.vala" return dup; -#line 265 "EventTable.c" +#line 318 "EventTable.c" } -void event_id_free (EventID* self) { +void +event_id_free (EventID* self) +{ #line 7 "/home/jens/Source/shotwell/src/db/EventTable.vala" g_free (self); -#line 272 "EventTable.c" +#line 327 "EventTable.c" } -GType event_id_get_type (void) { +GType +event_id_get_type (void) +{ static volatile gsize event_id_type_id__volatile = 0; if (g_once_init_enter (&event_id_type_id__volatile)) { GType event_id_type_id; @@ -283,121 +340,150 @@ GType event_id_get_type (void) { } -EventRow* event_row_construct (GType object_type) { +EventRow* +event_row_construct (GType object_type) +{ EventRow* self = NULL; #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" self = (EventRow*) g_type_create_instance (object_type); #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" return self; -#line 293 "EventTable.c" +#line 352 "EventTable.c" } -EventRow* event_row_new (void) { +EventRow* +event_row_new (void) +{ #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" return event_row_construct (TYPE_EVENT_ROW); -#line 300 "EventTable.c" +#line 361 "EventTable.c" } -static void value_event_row_init (GValue* value) { +static void +value_event_row_init (GValue* value) +{ #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" value->data[0].v_pointer = NULL; -#line 307 "EventTable.c" +#line 370 "EventTable.c" } -static void value_event_row_free_value (GValue* value) { +static void +value_event_row_free_value (GValue* value) +{ #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" if (value->data[0].v_pointer) { #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" event_row_unref (value->data[0].v_pointer); -#line 316 "EventTable.c" +#line 381 "EventTable.c" } } -static void value_event_row_copy_value (const GValue* src_value, GValue* dest_value) { +static void +value_event_row_copy_value (const GValue* src_value, + GValue* dest_value) +{ #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" if (src_value->data[0].v_pointer) { #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" dest_value->data[0].v_pointer = event_row_ref (src_value->data[0].v_pointer); -#line 326 "EventTable.c" +#line 394 "EventTable.c" } else { #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" dest_value->data[0].v_pointer = NULL; -#line 330 "EventTable.c" +#line 398 "EventTable.c" } } -static gpointer value_event_row_peek_pointer (const GValue* value) { +static gpointer +value_event_row_peek_pointer (const GValue* value) +{ #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" return value->data[0].v_pointer; -#line 338 "EventTable.c" +#line 408 "EventTable.c" } -static gchar* value_event_row_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +static gchar* +value_event_row_collect_value (GValue* value, + guint n_collect_values, + GTypeCValue* collect_values, + guint collect_flags) +{ #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" if (collect_values[0].v_pointer) { -#line 345 "EventTable.c" +#line 420 "EventTable.c" EventRow * object; object = collect_values[0].v_pointer; #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" if (object->parent_instance.g_class == NULL) { #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 352 "EventTable.c" +#line 427 "EventTable.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { #line 25 "/home/jens/Source/shotwell/src/db/EventTable.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 356 "EventTable.c" +#line 431 "EventTable.c" } #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" value->data[0].v_pointer = event_row_ref (object); -#line 360 "EventTable.c" +#line 435 "EventTable.c" } else { #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" value->data[0].v_pointer = NULL; -#line 364 "EventTable.c" +#line 439 "EventTable.c" } #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" return NULL; -#line 368 "EventTable.c" +#line 443 "EventTable.c" } -static gchar* value_event_row_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +static gchar* +value_event_row_lcopy_value (const GValue* value, + guint n_collect_values, + GTypeCValue* collect_values, + guint collect_flags) +{ EventRow ** object_p; object_p = collect_values[0].v_pointer; #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" if (!object_p) { #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 379 "EventTable.c" +#line 459 "EventTable.c" } #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" if (!value->data[0].v_pointer) { #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" *object_p = NULL; -#line 385 "EventTable.c" +#line 465 "EventTable.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" *object_p = value->data[0].v_pointer; -#line 389 "EventTable.c" +#line 469 "EventTable.c" } else { #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" *object_p = event_row_ref (value->data[0].v_pointer); -#line 393 "EventTable.c" +#line 473 "EventTable.c" } #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" return NULL; -#line 397 "EventTable.c" +#line 477 "EventTable.c" } -GParamSpec* param_spec_event_row (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { +GParamSpec* +param_spec_event_row (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags) +{ ParamSpecEventRow* spec; #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" g_return_val_if_fail (g_type_is_a (object_type, TYPE_EVENT_ROW), NULL); @@ -407,20 +493,25 @@ GParamSpec* param_spec_event_row (const gchar* name, const gchar* nick, const gc G_PARAM_SPEC (spec)->value_type = object_type; #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" return G_PARAM_SPEC (spec); -#line 411 "EventTable.c" +#line 497 "EventTable.c" } -gpointer value_get_event_row (const GValue* value) { +gpointer +value_get_event_row (const GValue* value) +{ #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_EVENT_ROW), NULL); #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" return value->data[0].v_pointer; -#line 420 "EventTable.c" +#line 508 "EventTable.c" } -void value_set_event_row (GValue* value, gpointer v_object) { +void +value_set_event_row (GValue* value, + gpointer v_object) +{ EventRow * old; #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_EVENT_ROW)); @@ -436,22 +527,25 @@ void value_set_event_row (GValue* value, gpointer v_object) { value->data[0].v_pointer = v_object; #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" event_row_ref (value->data[0].v_pointer); -#line 440 "EventTable.c" +#line 531 "EventTable.c" } else { #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" value->data[0].v_pointer = NULL; -#line 444 "EventTable.c" +#line 535 "EventTable.c" } #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" if (old) { #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" event_row_unref (old); -#line 450 "EventTable.c" +#line 541 "EventTable.c" } } -void value_take_event_row (GValue* value, gpointer v_object) { +void +value_take_event_row (GValue* value, + gpointer v_object) +{ EventRow * old; #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_EVENT_ROW)); @@ -465,38 +559,44 @@ void value_take_event_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/EventTable.vala" value->data[0].v_pointer = v_object; -#line 469 "EventTable.c" +#line 563 "EventTable.c" } else { #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" value->data[0].v_pointer = NULL; -#line 473 "EventTable.c" +#line 567 "EventTable.c" } #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" if (old) { #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" event_row_unref (old); -#line 479 "EventTable.c" +#line 573 "EventTable.c" } } -static void event_row_class_init (EventRowClass * klass) { +static void +event_row_class_init (EventRowClass * klass) +{ #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" event_row_parent_class = g_type_class_peek_parent (klass); #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" ((EventRowClass *) klass)->finalize = event_row_finalize; -#line 489 "EventTable.c" +#line 585 "EventTable.c" } -static void event_row_instance_init (EventRow * self) { +static void +event_row_instance_init (EventRow * self) +{ #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" self->ref_count = 1; -#line 496 "EventTable.c" +#line 594 "EventTable.c" } -static void event_row_finalize (EventRow * obj) { +static void +event_row_finalize (EventRow * obj) +{ EventRow * self; #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_EVENT_ROW, EventRow); @@ -508,11 +608,13 @@ static void event_row_finalize (EventRow * obj) { _g_free0 (self->primary_source_id); #line 30 "/home/jens/Source/shotwell/src/db/EventTable.vala" _g_free0 (self->comment); -#line 512 "EventTable.c" +#line 612 "EventTable.c" } -GType event_row_get_type (void) { +GType +event_row_get_type (void) +{ static volatile gsize event_row_type_id__volatile = 0; if (g_once_init_enter (&event_row_type_id__volatile)) { static const GTypeValueTable g_define_type_value_table = { value_event_row_init, value_event_row_free_value, value_event_row_copy_value, value_event_row_peek_pointer, "p", value_event_row_collect_value, "p", value_event_row_lcopy_value }; @@ -526,18 +628,22 @@ GType event_row_get_type (void) { } -gpointer event_row_ref (gpointer instance) { +gpointer +event_row_ref (gpointer instance) +{ EventRow * self; self = instance; #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" g_atomic_int_inc (&self->ref_count); #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" return instance; -#line 537 "EventTable.c" +#line 641 "EventTable.c" } -void event_row_unref (gpointer instance) { +void +event_row_unref (gpointer instance) +{ EventRow * self; self = instance; #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" @@ -546,12 +652,14 @@ void event_row_unref (gpointer instance) { EVENT_ROW_GET_CLASS (self)->finalize (self); #line 25 "/home/jens/Source/shotwell/src/db/EventTable.vala" g_type_free_instance ((GTypeInstance *) self); -#line 550 "EventTable.c" +#line 656 "EventTable.c" } } -static EventTable* event_table_construct (GType object_type) { +static EventTable* +event_table_construct (GType object_type) +{ EventTable* self = NULL; sqlite3_stmt* stmt = NULL; gint res = 0; @@ -561,7 +669,6 @@ static EventTable* event_table_construct (GType object_type) { gint _tmp3_; sqlite3_stmt* _tmp4_; gint _tmp5_; - gint _tmp6_; #line 36 "/home/jens/Source/shotwell/src/db/EventTable.vala" self = (EventTable*) database_table_construct (object_type); #line 38 "/home/jens/Source/shotwell/src/db/EventTable.vala" @@ -581,20 +688,18 @@ static EventTable* event_table_construct (GType object_type) { #line 48 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp4_ = stmt; #line 48 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp5_ = sqlite3_step (_tmp4_); -#line 48 "/home/jens/Source/shotwell/src/db/EventTable.vala" - res = _tmp5_; + res = sqlite3_step (_tmp4_); #line 49 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp6_ = res; + _tmp5_ = res; #line 49 "/home/jens/Source/shotwell/src/db/EventTable.vala" - if (_tmp6_ != SQLITE_DONE) { -#line 592 "EventTable.c" - gint _tmp7_; + if (_tmp5_ != SQLITE_DONE) { +#line 697 "EventTable.c" + gint _tmp6_; #line 50 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp7_ = res; + _tmp6_ = res; #line 50 "/home/jens/Source/shotwell/src/db/EventTable.vala" - database_table_fatal ("create photo table", _tmp7_); -#line 598 "EventTable.c" + database_table_fatal ("create photo table", _tmp6_); +#line 703 "EventTable.c" } #line 52 "/home/jens/Source/shotwell/src/db/EventTable.vala" database_table_set_table_name (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_TABLE, DatabaseTable), "EventTable"); @@ -602,25 +707,31 @@ static EventTable* event_table_construct (GType object_type) { _sqlite3_finalize0 (stmt); #line 36 "/home/jens/Source/shotwell/src/db/EventTable.vala" return self; -#line 606 "EventTable.c" +#line 711 "EventTable.c" } -static EventTable* event_table_new (void) { +static EventTable* +event_table_new (void) +{ #line 36 "/home/jens/Source/shotwell/src/db/EventTable.vala" return event_table_construct (TYPE_EVENT_TABLE); -#line 613 "EventTable.c" +#line 720 "EventTable.c" } -static gpointer _database_table_ref0 (gpointer self) { +static gpointer +_database_table_ref0 (gpointer self) +{ #line 59 "/home/jens/Source/shotwell/src/db/EventTable.vala" return self ? database_table_ref (self) : NULL; -#line 620 "EventTable.c" +#line 729 "EventTable.c" } -EventTable* event_table_get_instance (void) { +EventTable* +event_table_get_instance (void) +{ EventTable* result = NULL; EventTable* _tmp0_; EventTable* _tmp2_; @@ -629,7 +740,7 @@ EventTable* event_table_get_instance (void) { _tmp0_ = event_table_instance; #line 56 "/home/jens/Source/shotwell/src/db/EventTable.vala" if (_tmp0_ == NULL) { -#line 633 "EventTable.c" +#line 744 "EventTable.c" EventTable* _tmp1_; #line 57 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp1_ = event_table_new (); @@ -637,7 +748,7 @@ EventTable* event_table_get_instance (void) { _database_table_unref0 (event_table_instance); #line 57 "/home/jens/Source/shotwell/src/db/EventTable.vala" event_table_instance = _tmp1_; -#line 641 "EventTable.c" +#line 752 "EventTable.c" } #line 59 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp2_ = event_table_instance; @@ -647,18 +758,19 @@ EventTable* event_table_get_instance (void) { result = _tmp3_; #line 59 "/home/jens/Source/shotwell/src/db/EventTable.vala" return result; -#line 651 "EventTable.c" +#line 762 "EventTable.c" } -static gchar* event_table_source_id_upgrade (EventTable* self, gint64 primary_photo_id, const gchar* primary_source_id) { +static gchar* +event_table_source_id_upgrade (EventTable* self, + gint64 primary_photo_id, + const gchar* primary_source_id) +{ gchar* result = NULL; MediaCollectionRegistry* _tmp0_; MediaCollectionRegistry* _tmp1_; - const gchar* _tmp2_; - gboolean _tmp3_; - gboolean _tmp4_; - gint64 _tmp7_; + gboolean _tmp2_; #line 63 "/home/jens/Source/shotwell/src/db/EventTable.vala" g_return_val_if_fail (IS_EVENT_TABLE (self), NULL); #line 64 "/home/jens/Source/shotwell/src/db/EventTable.vala" @@ -666,201 +778,163 @@ static gchar* event_table_source_id_upgrade (EventTable* self, gint64 primary_ph #line 64 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp1_ = _tmp0_; #line 64 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp2_ = primary_source_id; -#line 64 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp3_ = media_collection_registry_is_valid_source_id (_tmp1_, _tmp2_); -#line 64 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp4_ = _tmp3_; + _tmp2_ = media_collection_registry_is_valid_source_id (_tmp1_, primary_source_id); #line 64 "/home/jens/Source/shotwell/src/db/EventTable.vala" _media_collection_registry_unref0 (_tmp1_); #line 64 "/home/jens/Source/shotwell/src/db/EventTable.vala" - if (_tmp4_) { -#line 679 "EventTable.c" - const gchar* _tmp5_; - gchar* _tmp6_; -#line 65 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp5_ = primary_source_id; + if (_tmp2_) { +#line 787 "EventTable.c" + gchar* _tmp3_; #line 65 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp6_ = g_strdup (_tmp5_); + _tmp3_ = g_strdup (primary_source_id); #line 65 "/home/jens/Source/shotwell/src/db/EventTable.vala" - result = _tmp6_; + result = _tmp3_; #line 65 "/home/jens/Source/shotwell/src/db/EventTable.vala" return result; -#line 690 "EventTable.c" +#line 795 "EventTable.c" } #line 67 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp7_ = primary_photo_id; -#line 67 "/home/jens/Source/shotwell/src/db/EventTable.vala" - if (_tmp7_ != PHOTO_ID_INVALID) { -#line 696 "EventTable.c" - gint64 _tmp8_; - PhotoID _tmp9_ = {0}; - gchar* _tmp10_; -#line 69 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp8_ = primary_photo_id; + if (primary_photo_id != PHOTO_ID_INVALID) { +#line 799 "EventTable.c" + PhotoID _tmp4_ = {0}; + gchar* _tmp5_; #line 69 "/home/jens/Source/shotwell/src/db/EventTable.vala" - photo_id_init (&_tmp9_, _tmp8_); + photo_id_init (&_tmp4_, primary_photo_id); #line 69 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp10_ = photo_id_upgrade_photo_id_to_source_id (&_tmp9_); + _tmp5_ = photo_id_upgrade_photo_id_to_source_id (&_tmp4_); #line 69 "/home/jens/Source/shotwell/src/db/EventTable.vala" - result = _tmp10_; + result = _tmp5_; #line 69 "/home/jens/Source/shotwell/src/db/EventTable.vala" return result; -#line 710 "EventTable.c" +#line 810 "EventTable.c" } #line 71 "/home/jens/Source/shotwell/src/db/EventTable.vala" result = NULL; #line 71 "/home/jens/Source/shotwell/src/db/EventTable.vala" return result; -#line 716 "EventTable.c" +#line 816 "EventTable.c" } -EventRow* event_table_create (EventTable* self, const gchar* primary_source_id, const gchar* comment, GError** error) { +EventRow* +event_table_create (EventTable* self, + const gchar* primary_source_id, + const gchar* comment, + GError** error) +{ EventRow* result = NULL; gboolean _tmp0_ = FALSE; - const gchar* _tmp1_; sqlite3_stmt* stmt = NULL; gint res = 0; - sqlite3* _tmp3_; - sqlite3_stmt* _tmp4_ = NULL; - gint _tmp5_; - gint _tmp6_; + sqlite3* _tmp1_; + sqlite3_stmt* _tmp2_ = NULL; + gint _tmp3_; + gint _tmp4_; time_t time_created = 0; - gulong _tmp7_; - sqlite3_stmt* _tmp8_; - const gchar* _tmp9_; - gchar* _tmp10_; - GDestroyNotify _tmp11_; - gint _tmp12_; - gint _tmp13_; - sqlite3_stmt* _tmp14_; - time_t _tmp15_; - gint _tmp16_; + sqlite3_stmt* _tmp5_; + gchar* _tmp6_; + GDestroyNotify _tmp7_; + gint _tmp8_; + sqlite3_stmt* _tmp9_; + time_t _tmp10_; + gint _tmp11_; + sqlite3_stmt* _tmp12_; + gchar* _tmp13_; + GDestroyNotify _tmp14_; + gint _tmp15_; + sqlite3_stmt* _tmp16_; gint _tmp17_; - sqlite3_stmt* _tmp18_; - const gchar* _tmp19_; - gchar* _tmp20_; - GDestroyNotify _tmp21_; - gint _tmp22_; - gint _tmp23_; - sqlite3_stmt* _tmp24_; - gint _tmp25_; - gint _tmp26_; EventRow* row = NULL; - EventRow* _tmp28_; - EventRow* _tmp29_; - sqlite3* _tmp30_; - gint64 _tmp31_; - EventRow* _tmp32_; - EventRow* _tmp33_; - const gchar* _tmp34_; - gchar* _tmp35_; - EventRow* _tmp36_; - time_t _tmp37_; - EventRow* _tmp38_; - const gchar* _tmp39_; - gchar* _tmp40_; + EventRow* _tmp19_; + EventRow* _tmp20_; + sqlite3* _tmp21_; + EventRow* _tmp22_; + EventRow* _tmp23_; + gchar* _tmp24_; + EventRow* _tmp25_; + time_t _tmp26_; + EventRow* _tmp27_; + gchar* _tmp28_; GError * _inner_error_ = NULL; #line 74 "/home/jens/Source/shotwell/src/db/EventTable.vala" g_return_val_if_fail (IS_EVENT_TABLE (self), NULL); #line 75 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp1_ = primary_source_id; -#line 75 "/home/jens/Source/shotwell/src/db/EventTable.vala" - if (_tmp1_ != NULL) { -#line 772 "EventTable.c" - const gchar* _tmp2_; -#line 75 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp2_ = primary_source_id; + if (primary_source_id != NULL) { #line 75 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp0_ = g_strcmp0 (_tmp2_, "") != 0; -#line 778 "EventTable.c" + _tmp0_ = g_strcmp0 (primary_source_id, "") != 0; +#line 866 "EventTable.c" } else { #line 75 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp0_ = FALSE; -#line 782 "EventTable.c" +#line 870 "EventTable.c" } #line 75 "/home/jens/Source/shotwell/src/db/EventTable.vala" _vala_assert (_tmp0_, "primary_source_id != null && primary_source_id != \"\""); #line 78 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp3_ = database_table_db; + _tmp1_ = database_table_db; #line 78 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp5_ = sqlite3_prepare_v2 (_tmp3_, "INSERT INTO EventTable (primary_source_id, time_created, comment) VALU" \ -"ES (?, ?, ?)", -1, &_tmp4_, NULL); + _tmp3_ = sqlite3_prepare_v2 (_tmp1_, "INSERT INTO EventTable (primary_source_id, time_created, comment) VALU" \ +"ES (?, ?, ?)", -1, &_tmp2_, NULL); #line 78 "/home/jens/Source/shotwell/src/db/EventTable.vala" _sqlite3_finalize0 (stmt); #line 78 "/home/jens/Source/shotwell/src/db/EventTable.vala" - stmt = _tmp4_; + stmt = _tmp2_; #line 78 "/home/jens/Source/shotwell/src/db/EventTable.vala" - res = _tmp5_; + res = _tmp3_; #line 81 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp6_ = res; + _tmp4_ = res; #line 81 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _vala_assert (_tmp6_ == SQLITE_OK, "res == Sqlite.OK"); -#line 83 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp7_ = now_sec (); + _vala_assert (_tmp4_ == SQLITE_OK, "res == Sqlite.OK"); #line 83 "/home/jens/Source/shotwell/src/db/EventTable.vala" - time_created = (time_t) _tmp7_; -#line 85 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp8_ = stmt; + time_created = (time_t) now_sec (); #line 85 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp9_ = primary_source_id; + _tmp5_ = stmt; #line 85 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp10_ = g_strdup (_tmp9_); + _tmp6_ = g_strdup (primary_source_id); #line 85 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp11_ = g_free; + _tmp7_ = g_free; #line 85 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp12_ = sqlite3_bind_text (_tmp8_, 1, _tmp10_, -1, _tmp11_); -#line 85 "/home/jens/Source/shotwell/src/db/EventTable.vala" - res = _tmp12_; + res = sqlite3_bind_text (_tmp5_, 1, _tmp6_, -1, _tmp7_); #line 86 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp13_ = res; + _tmp8_ = res; #line 86 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _vala_assert (_tmp13_ == SQLITE_OK, "res == Sqlite.OK"); -#line 87 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp14_ = stmt; + _vala_assert (_tmp8_ == SQLITE_OK, "res == Sqlite.OK"); #line 87 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp15_ = time_created; + _tmp9_ = stmt; #line 87 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp16_ = sqlite3_bind_int64 (_tmp14_, 2, (gint64) _tmp15_); + _tmp10_ = time_created; #line 87 "/home/jens/Source/shotwell/src/db/EventTable.vala" - res = _tmp16_; + res = sqlite3_bind_int64 (_tmp9_, 2, (gint64) _tmp10_); #line 88 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp17_ = res; + _tmp11_ = res; #line 88 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _vala_assert (_tmp17_ == SQLITE_OK, "res == Sqlite.OK"); -#line 89 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp18_ = stmt; -#line 89 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp19_ = comment; + _vala_assert (_tmp11_ == SQLITE_OK, "res == Sqlite.OK"); #line 89 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp20_ = g_strdup (_tmp19_); + _tmp12_ = stmt; #line 89 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp21_ = g_free; + _tmp13_ = g_strdup (comment); #line 89 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp22_ = sqlite3_bind_text (_tmp18_, 3, _tmp20_, -1, _tmp21_); + _tmp14_ = g_free; #line 89 "/home/jens/Source/shotwell/src/db/EventTable.vala" - res = _tmp22_; + res = sqlite3_bind_text (_tmp12_, 3, _tmp13_, -1, _tmp14_); #line 90 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp23_ = res; + _tmp15_ = res; #line 90 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _vala_assert (_tmp23_ == SQLITE_OK, "res == Sqlite.OK"); + _vala_assert (_tmp15_ == SQLITE_OK, "res == Sqlite.OK"); #line 92 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp24_ = stmt; + _tmp16_ = stmt; #line 92 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp25_ = sqlite3_step (_tmp24_); -#line 92 "/home/jens/Source/shotwell/src/db/EventTable.vala" - res = _tmp25_; + res = sqlite3_step (_tmp16_); #line 93 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp26_ = res; + _tmp17_ = res; #line 93 "/home/jens/Source/shotwell/src/db/EventTable.vala" - if (_tmp26_ != SQLITE_DONE) { -#line 858 "EventTable.c" - gint _tmp27_; + if (_tmp17_ != SQLITE_DONE) { +#line 932 "EventTable.c" + gint _tmp18_; #line 94 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp27_ = res; + _tmp18_ = res; #line 94 "/home/jens/Source/shotwell/src/db/EventTable.vala" - database_table_throw_error ("EventTable.create", _tmp27_, &_inner_error_); + database_table_throw_error ("EventTable.create", _tmp18_, &_inner_error_); #line 94 "/home/jens/Source/shotwell/src/db/EventTable.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 94 "/home/jens/Source/shotwell/src/db/EventTable.vala" @@ -871,7 +945,7 @@ EventRow* event_table_create (EventTable* self, const gchar* primary_source_id, _sqlite3_finalize0 (stmt); #line 94 "/home/jens/Source/shotwell/src/db/EventTable.vala" return NULL; -#line 874 "EventTable.c" +#line 948 "EventTable.c" } else { #line 94 "/home/jens/Source/shotwell/src/db/EventTable.vala" _sqlite3_finalize0 (stmt); @@ -881,65 +955,63 @@ EventRow* event_table_create (EventTable* self, const gchar* primary_source_id, g_clear_error (&_inner_error_); #line 94 "/home/jens/Source/shotwell/src/db/EventTable.vala" return NULL; -#line 884 "EventTable.c" +#line 958 "EventTable.c" } } } #line 96 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp28_ = event_row_new (); + _tmp19_ = event_row_new (); #line 96 "/home/jens/Source/shotwell/src/db/EventTable.vala" - row = _tmp28_; + row = _tmp19_; #line 97 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp29_ = row; -#line 97 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp30_ = database_table_db; + _tmp20_ = row; #line 97 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp31_ = sqlite3_last_insert_rowid (_tmp30_); + _tmp21_ = database_table_db; #line 97 "/home/jens/Source/shotwell/src/db/EventTable.vala" - event_id_init (&_tmp29_->event_id, _tmp31_); + event_id_init (&_tmp20_->event_id, sqlite3_last_insert_rowid (_tmp21_)); #line 98 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp32_ = row; + _tmp22_ = row; #line 98 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _g_free0 (_tmp32_->name); + _g_free0 (_tmp22_->name); #line 98 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp32_->name = NULL; -#line 99 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp33_ = row; + _tmp22_->name = NULL; #line 99 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp34_ = primary_source_id; + _tmp23_ = row; #line 99 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp35_ = g_strdup (_tmp34_); + _tmp24_ = g_strdup (primary_source_id); #line 99 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _g_free0 (_tmp33_->primary_source_id); + _g_free0 (_tmp23_->primary_source_id); #line 99 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp33_->primary_source_id = _tmp35_; + _tmp23_->primary_source_id = _tmp24_; #line 100 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp36_ = row; + _tmp25_ = row; #line 100 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp37_ = time_created; + _tmp26_ = time_created; #line 100 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp36_->time_created = _tmp37_; + _tmp25_->time_created = _tmp26_; #line 101 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp38_ = row; -#line 101 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp39_ = comment; + _tmp27_ = row; #line 101 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp40_ = g_strdup (_tmp39_); + _tmp28_ = g_strdup (comment); #line 101 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _g_free0 (_tmp38_->comment); + _g_free0 (_tmp27_->comment); #line 101 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp38_->comment = _tmp40_; + _tmp27_->comment = _tmp28_; #line 103 "/home/jens/Source/shotwell/src/db/EventTable.vala" result = row; #line 103 "/home/jens/Source/shotwell/src/db/EventTable.vala" _sqlite3_finalize0 (stmt); #line 103 "/home/jens/Source/shotwell/src/db/EventTable.vala" return result; -#line 938 "EventTable.c" +#line 1006 "EventTable.c" } -void event_table_create_from_row (EventTable* self, EventRow* row, EventID* result) { +void +event_table_create_from_row (EventTable* self, + EventRow* row, + EventID* result) +{ sqlite3_stmt* stmt = NULL; gint res = 0; sqlite3* _tmp0_; @@ -947,40 +1019,29 @@ void event_table_create_from_row (EventTable* self, EventRow* row, EventID* resu gint _tmp2_; gint _tmp3_; sqlite3_stmt* _tmp4_; - EventRow* _tmp5_; - const gchar* _tmp6_; - gchar* _tmp7_; - GDestroyNotify _tmp8_; - gint _tmp9_; + const gchar* _tmp5_; + gchar* _tmp6_; + GDestroyNotify _tmp7_; + gint _tmp8_; + sqlite3_stmt* _tmp9_; gint _tmp10_; sqlite3_stmt* _tmp11_; - gint _tmp12_; - gint _tmp13_; - sqlite3_stmt* _tmp14_; - EventRow* _tmp15_; - const gchar* _tmp16_; - gchar* _tmp17_; - GDestroyNotify _tmp18_; - gint _tmp19_; - gint _tmp20_; - sqlite3_stmt* _tmp21_; - EventRow* _tmp22_; - time_t _tmp23_; - gint _tmp24_; + const gchar* _tmp12_; + gchar* _tmp13_; + GDestroyNotify _tmp14_; + gint _tmp15_; + sqlite3_stmt* _tmp16_; + time_t _tmp17_; + gint _tmp18_; + sqlite3_stmt* _tmp19_; + const gchar* _tmp20_; + gchar* _tmp21_; + GDestroyNotify _tmp22_; + gint _tmp23_; + sqlite3_stmt* _tmp24_; gint _tmp25_; - sqlite3_stmt* _tmp26_; - EventRow* _tmp27_; - const gchar* _tmp28_; - gchar* _tmp29_; - GDestroyNotify _tmp30_; - gint _tmp31_; - gint _tmp32_; - sqlite3_stmt* _tmp33_; - gint _tmp34_; - gint _tmp35_; - sqlite3* _tmp38_; - gint64 _tmp39_; - EventID _tmp40_ = {0}; + sqlite3* _tmp28_; + EventID _tmp29_ = {0}; #line 109 "/home/jens/Source/shotwell/src/db/EventTable.vala" g_return_if_fail (IS_EVENT_TABLE (self)); #line 109 "/home/jens/Source/shotwell/src/db/EventTable.vala" @@ -1003,125 +1064,106 @@ void event_table_create_from_row (EventTable* self, EventRow* row, EventID* resu #line 115 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp4_ = stmt; #line 115 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp5_ = row; -#line 115 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp6_ = _tmp5_->name; + _tmp5_ = row->name; #line 115 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp7_ = g_strdup (_tmp6_); -#line 115 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp8_ = g_free; + _tmp6_ = g_strdup (_tmp5_); #line 115 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp9_ = sqlite3_bind_text (_tmp4_, 1, _tmp7_, -1, _tmp8_); + _tmp7_ = g_free; #line 115 "/home/jens/Source/shotwell/src/db/EventTable.vala" - res = _tmp9_; + res = sqlite3_bind_text (_tmp4_, 1, _tmp6_, -1, _tmp7_); #line 116 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp10_ = res; + _tmp8_ = res; #line 116 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _vala_assert (_tmp10_ == SQLITE_OK, "res == Sqlite.OK"); -#line 117 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp11_ = stmt; + _vala_assert (_tmp8_ == SQLITE_OK, "res == Sqlite.OK"); #line 117 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp12_ = sqlite3_bind_int64 (_tmp11_, 2, PHOTO_ID_INVALID); + _tmp9_ = stmt; #line 117 "/home/jens/Source/shotwell/src/db/EventTable.vala" - res = _tmp12_; + res = sqlite3_bind_int64 (_tmp9_, 2, PHOTO_ID_INVALID); #line 118 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp13_ = res; + _tmp10_ = res; #line 118 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _vala_assert (_tmp13_ == SQLITE_OK, "res == Sqlite.OK"); -#line 119 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp14_ = stmt; -#line 119 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp15_ = row; + _vala_assert (_tmp10_ == SQLITE_OK, "res == Sqlite.OK"); #line 119 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp16_ = _tmp15_->primary_source_id; + _tmp11_ = stmt; #line 119 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp17_ = g_strdup (_tmp16_); + _tmp12_ = row->primary_source_id; #line 119 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp18_ = g_free; + _tmp13_ = g_strdup (_tmp12_); #line 119 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp19_ = sqlite3_bind_text (_tmp14_, 3, _tmp17_, -1, _tmp18_); + _tmp14_ = g_free; #line 119 "/home/jens/Source/shotwell/src/db/EventTable.vala" - res = _tmp19_; + res = sqlite3_bind_text (_tmp11_, 3, _tmp13_, -1, _tmp14_); #line 120 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp20_ = res; + _tmp15_ = res; #line 120 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _vala_assert (_tmp20_ == SQLITE_OK, "res == Sqlite.OK"); -#line 121 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp21_ = stmt; -#line 121 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp22_ = row; + _vala_assert (_tmp15_ == SQLITE_OK, "res == Sqlite.OK"); #line 121 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp23_ = _tmp22_->time_created; + _tmp16_ = stmt; #line 121 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp24_ = sqlite3_bind_int64 (_tmp21_, 4, (gint64) _tmp23_); + _tmp17_ = row->time_created; #line 121 "/home/jens/Source/shotwell/src/db/EventTable.vala" - res = _tmp24_; + res = sqlite3_bind_int64 (_tmp16_, 4, (gint64) _tmp17_); #line 122 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp25_ = res; + _tmp18_ = res; #line 122 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _vala_assert (_tmp25_ == SQLITE_OK, "res == Sqlite.OK"); -#line 123 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp26_ = stmt; + _vala_assert (_tmp18_ == SQLITE_OK, "res == Sqlite.OK"); #line 123 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp27_ = row; + _tmp19_ = stmt; #line 123 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp28_ = _tmp27_->comment; + _tmp20_ = row->comment; #line 123 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp29_ = g_strdup (_tmp28_); + _tmp21_ = g_strdup (_tmp20_); #line 123 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp30_ = g_free; + _tmp22_ = g_free; #line 123 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp31_ = sqlite3_bind_text (_tmp26_, 5, _tmp29_, -1, _tmp30_); -#line 123 "/home/jens/Source/shotwell/src/db/EventTable.vala" - res = _tmp31_; + res = sqlite3_bind_text (_tmp19_, 5, _tmp21_, -1, _tmp22_); #line 124 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp32_ = res; + _tmp23_ = res; #line 124 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _vala_assert (_tmp32_ == SQLITE_OK, "res == Sqlite.OK"); -#line 126 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp33_ = stmt; + _vala_assert (_tmp23_ == SQLITE_OK, "res == Sqlite.OK"); #line 126 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp34_ = sqlite3_step (_tmp33_); + _tmp24_ = stmt; #line 126 "/home/jens/Source/shotwell/src/db/EventTable.vala" - res = _tmp34_; + res = sqlite3_step (_tmp24_); #line 127 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp35_ = res; + _tmp25_ = res; #line 127 "/home/jens/Source/shotwell/src/db/EventTable.vala" - if (_tmp35_ != SQLITE_DONE) { -#line 1090 "EventTable.c" - gint _tmp36_; - EventID _tmp37_ = {0}; + if (_tmp25_ != SQLITE_DONE) { +#line 1131 "EventTable.c" + gint _tmp26_; + EventID _tmp27_ = {0}; #line 128 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp36_ = res; + _tmp26_ = res; #line 128 "/home/jens/Source/shotwell/src/db/EventTable.vala" - database_table_fatal ("Event create_from_row", _tmp36_); + database_table_fatal ("Event create_from_row", _tmp26_); #line 130 "/home/jens/Source/shotwell/src/db/EventTable.vala" - event_id_init (&_tmp37_, EVENT_ID_INVALID); + event_id_init (&_tmp27_, EVENT_ID_INVALID); #line 130 "/home/jens/Source/shotwell/src/db/EventTable.vala" - *result = _tmp37_; + *result = _tmp27_; #line 130 "/home/jens/Source/shotwell/src/db/EventTable.vala" _sqlite3_finalize0 (stmt); #line 130 "/home/jens/Source/shotwell/src/db/EventTable.vala" return; -#line 1105 "EventTable.c" +#line 1146 "EventTable.c" } #line 133 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp38_ = database_table_db; + _tmp28_ = database_table_db; #line 133 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp39_ = sqlite3_last_insert_rowid (_tmp38_); + event_id_init (&_tmp29_, sqlite3_last_insert_rowid (_tmp28_)); #line 133 "/home/jens/Source/shotwell/src/db/EventTable.vala" - event_id_init (&_tmp40_, _tmp39_); -#line 133 "/home/jens/Source/shotwell/src/db/EventTable.vala" - *result = _tmp40_; + *result = _tmp29_; #line 133 "/home/jens/Source/shotwell/src/db/EventTable.vala" _sqlite3_finalize0 (stmt); #line 133 "/home/jens/Source/shotwell/src/db/EventTable.vala" return; -#line 1119 "EventTable.c" +#line 1158 "EventTable.c" } -EventRow* event_table_get_row (EventTable* self, EventID* event_id) { +EventRow* +event_table_get_row (EventTable* self, + EventID* event_id) +{ EventRow* result = NULL; sqlite3_stmt* stmt = NULL; gint res = 0; @@ -1133,33 +1175,29 @@ EventRow* event_table_get_row (EventTable* self, EventID* event_id) { EventID _tmp5_; gint64 _tmp6_; gint _tmp7_; - gint _tmp8_; - sqlite3_stmt* _tmp9_; - gint _tmp10_; + sqlite3_stmt* _tmp8_; EventRow* row = NULL; - EventRow* _tmp11_; + EventRow* _tmp9_; + EventRow* _tmp10_; + EventID _tmp11_; EventRow* _tmp12_; - EventID _tmp13_; - EventRow* _tmp14_; - sqlite3_stmt* _tmp15_; - const gchar* _tmp16_; - gchar* _tmp17_; - gboolean _tmp18_ = FALSE; - EventRow* _tmp19_; - const gchar* _tmp20_; - EventRow* _tmp26_; - sqlite3_stmt* _tmp27_; - gint64 _tmp28_; - sqlite3_stmt* _tmp29_; - const gchar* _tmp30_; - gchar* _tmp31_; - EventRow* _tmp32_; - sqlite3_stmt* _tmp33_; - gint64 _tmp34_; - EventRow* _tmp35_; - sqlite3_stmt* _tmp36_; - const gchar* _tmp37_; - gchar* _tmp38_; + sqlite3_stmt* _tmp13_; + const gchar* _tmp14_; + gchar* _tmp15_; + gboolean _tmp16_ = FALSE; + EventRow* _tmp17_; + const gchar* _tmp18_; + EventRow* _tmp24_; + sqlite3_stmt* _tmp25_; + sqlite3_stmt* _tmp26_; + const gchar* _tmp27_; + gchar* _tmp28_; + EventRow* _tmp29_; + sqlite3_stmt* _tmp30_; + EventRow* _tmp31_; + sqlite3_stmt* _tmp32_; + const gchar* _tmp33_; + gchar* _tmp34_; #line 136 "/home/jens/Source/shotwell/src/db/EventTable.vala" g_return_val_if_fail (IS_EVENT_TABLE (self), NULL); #line 136 "/home/jens/Source/shotwell/src/db/EventTable.vala" @@ -1186,135 +1224,131 @@ EventRow* event_table_get_row (EventTable* self, EventID* event_id) { #line 142 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp6_ = _tmp5_.id; #line 142 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp7_ = sqlite3_bind_int64 (_tmp4_, 1, _tmp6_); -#line 142 "/home/jens/Source/shotwell/src/db/EventTable.vala" - res = _tmp7_; + res = sqlite3_bind_int64 (_tmp4_, 1, _tmp6_); #line 143 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp8_ = res; + _tmp7_ = res; #line 143 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _vala_assert (_tmp8_ == SQLITE_OK, "res == Sqlite.OK"); -#line 145 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp9_ = stmt; + _vala_assert (_tmp7_ == SQLITE_OK, "res == Sqlite.OK"); #line 145 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp10_ = sqlite3_step (_tmp9_); + _tmp8_ = stmt; #line 145 "/home/jens/Source/shotwell/src/db/EventTable.vala" - if (_tmp10_ != SQLITE_ROW) { + if (sqlite3_step (_tmp8_) != SQLITE_ROW) { #line 146 "/home/jens/Source/shotwell/src/db/EventTable.vala" result = NULL; #line 146 "/home/jens/Source/shotwell/src/db/EventTable.vala" _sqlite3_finalize0 (stmt); #line 146 "/home/jens/Source/shotwell/src/db/EventTable.vala" return result; -#line 1206 "EventTable.c" +#line 1240 "EventTable.c" } #line 148 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp11_ = event_row_new (); + _tmp9_ = event_row_new (); #line 148 "/home/jens/Source/shotwell/src/db/EventTable.vala" - row = _tmp11_; + row = _tmp9_; #line 149 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp12_ = row; + _tmp10_ = row; #line 149 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp13_ = *event_id; + _tmp11_ = *event_id; #line 149 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp12_->event_id = _tmp13_; + _tmp10_->event_id = _tmp11_; #line 150 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp14_ = row; + _tmp12_ = row; #line 150 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp15_ = stmt; + _tmp13_ = stmt; #line 150 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp16_ = sqlite3_column_text (_tmp15_, 0); + _tmp14_ = sqlite3_column_text (_tmp13_, 0); #line 150 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp17_ = g_strdup (_tmp16_); + _tmp15_ = g_strdup (_tmp14_); #line 150 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _g_free0 (_tmp14_->name); + _g_free0 (_tmp12_->name); #line 150 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp14_->name = _tmp17_; + _tmp12_->name = _tmp15_; #line 151 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp19_ = row; + _tmp17_ = row; #line 151 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp20_ = _tmp19_->name; + _tmp18_ = _tmp17_->name; #line 151 "/home/jens/Source/shotwell/src/db/EventTable.vala" - if (_tmp20_ != NULL) { -#line 1236 "EventTable.c" - EventRow* _tmp21_; - const gchar* _tmp22_; - gint _tmp23_; - gint _tmp24_; + if (_tmp18_ != NULL) { +#line 1270 "EventTable.c" + EventRow* _tmp19_; + const gchar* _tmp20_; + gint _tmp21_; + gint _tmp22_; #line 151 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp21_ = row; + _tmp19_ = row; #line 151 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp22_ = _tmp21_->name; + _tmp20_ = _tmp19_->name; #line 151 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp23_ = strlen (_tmp22_); + _tmp21_ = strlen (_tmp20_); #line 151 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp24_ = _tmp23_; + _tmp22_ = _tmp21_; #line 151 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp18_ = _tmp24_ == 0; -#line 1251 "EventTable.c" + _tmp16_ = _tmp22_ == 0; +#line 1285 "EventTable.c" } else { #line 151 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp18_ = FALSE; -#line 1255 "EventTable.c" + _tmp16_ = FALSE; +#line 1289 "EventTable.c" } #line 151 "/home/jens/Source/shotwell/src/db/EventTable.vala" - if (_tmp18_) { -#line 1259 "EventTable.c" - EventRow* _tmp25_; + if (_tmp16_) { +#line 1293 "EventTable.c" + EventRow* _tmp23_; #line 152 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp25_ = row; + _tmp23_ = row; #line 152 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _g_free0 (_tmp25_->name); + _g_free0 (_tmp23_->name); #line 152 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp25_->name = NULL; -#line 1267 "EventTable.c" + _tmp23_->name = NULL; +#line 1301 "EventTable.c" } #line 153 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp26_ = row; + _tmp24_ = row; #line 153 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp27_ = stmt; + _tmp25_ = stmt; #line 153 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp28_ = sqlite3_column_int64 (_tmp27_, 1); -#line 153 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp29_ = stmt; + _tmp26_ = stmt; #line 153 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp30_ = sqlite3_column_text (_tmp29_, 2); + _tmp27_ = sqlite3_column_text (_tmp26_, 2); #line 153 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp31_ = event_table_source_id_upgrade (self, _tmp28_, _tmp30_); + _tmp28_ = event_table_source_id_upgrade (self, sqlite3_column_int64 (_tmp25_, 1), _tmp27_); #line 153 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _g_free0 (_tmp26_->primary_source_id); + _g_free0 (_tmp24_->primary_source_id); #line 153 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp26_->primary_source_id = _tmp31_; + _tmp24_->primary_source_id = _tmp28_; #line 154 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp32_ = row; -#line 154 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp33_ = stmt; + _tmp29_ = row; #line 154 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp34_ = sqlite3_column_int64 (_tmp33_, 3); + _tmp30_ = stmt; #line 154 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp32_->time_created = (time_t) _tmp34_; + _tmp29_->time_created = (time_t) sqlite3_column_int64 (_tmp30_, 3); #line 155 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp35_ = row; + _tmp31_ = row; #line 155 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp36_ = stmt; + _tmp32_ = stmt; #line 155 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp37_ = sqlite3_column_text (_tmp36_, 4); + _tmp33_ = sqlite3_column_text (_tmp32_, 4); #line 155 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp38_ = g_strdup (_tmp37_); + _tmp34_ = g_strdup (_tmp33_); #line 155 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _g_free0 (_tmp35_->comment); + _g_free0 (_tmp31_->comment); #line 155 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp35_->comment = _tmp38_; + _tmp31_->comment = _tmp34_; #line 157 "/home/jens/Source/shotwell/src/db/EventTable.vala" result = row; #line 157 "/home/jens/Source/shotwell/src/db/EventTable.vala" _sqlite3_finalize0 (stmt); #line 157 "/home/jens/Source/shotwell/src/db/EventTable.vala" return result; -#line 1311 "EventTable.c" +#line 1341 "EventTable.c" } -void event_table_remove (EventTable* self, EventID* event_id, GError** error) { +void +event_table_remove (EventTable* self, + EventID* event_id, + GError** error) +{ EventID _tmp0_; gint64 _tmp1_; GError * _inner_error_ = NULL; @@ -1336,7 +1370,7 @@ void event_table_remove (EventTable* self, EventID* event_id, GError** error) { g_propagate_error (error, _inner_error_); #line 161 "/home/jens/Source/shotwell/src/db/EventTable.vala" return; -#line 1337 "EventTable.c" +#line 1371 "EventTable.c" } else { #line 161 "/home/jens/Source/shotwell/src/db/EventTable.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); @@ -1344,13 +1378,15 @@ void event_table_remove (EventTable* self, EventID* event_id, GError** error) { g_clear_error (&_inner_error_); #line 161 "/home/jens/Source/shotwell/src/db/EventTable.vala" return; -#line 1345 "EventTable.c" +#line 1379 "EventTable.c" } } } -GeeArrayList* event_table_get_events (EventTable* self) { +GeeArrayList* +event_table_get_events (EventTable* self) +{ GeeArrayList* result = NULL; sqlite3_stmt* stmt = NULL; gint res = 0; @@ -1381,146 +1417,134 @@ GeeArrayList* event_table_get_events (EventTable* self) { _tmp4_ = gee_array_list_new (TYPE_EVENT_ROW, (GBoxedCopyFunc) event_row_ref, (GDestroyNotify) event_row_unref, NULL, NULL, NULL); #line 170 "/home/jens/Source/shotwell/src/db/EventTable.vala" event_rows = _tmp4_; -#line 1381 "EventTable.c" +#line 1417 "EventTable.c" { gboolean _tmp5_ = FALSE; #line 171 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp5_ = TRUE; #line 171 "/home/jens/Source/shotwell/src/db/EventTable.vala" while (TRUE) { -#line 1388 "EventTable.c" +#line 1424 "EventTable.c" sqlite3_stmt* _tmp6_; gint _tmp7_; - gint _tmp8_; EventRow* row = NULL; + EventRow* _tmp10_; EventRow* _tmp11_; - EventRow* _tmp12_; - sqlite3_stmt* _tmp13_; - gint64 _tmp14_; - EventRow* _tmp15_; - sqlite3_stmt* _tmp16_; - const gchar* _tmp17_; - gchar* _tmp18_; - EventRow* _tmp19_; - sqlite3_stmt* _tmp20_; - gint64 _tmp21_; - sqlite3_stmt* _tmp22_; - const gchar* _tmp23_; - gchar* _tmp24_; - EventRow* _tmp25_; - sqlite3_stmt* _tmp26_; - gint64 _tmp27_; - EventRow* _tmp28_; - sqlite3_stmt* _tmp29_; - const gchar* _tmp30_; - gchar* _tmp31_; - GeeArrayList* _tmp32_; - EventRow* _tmp33_; + sqlite3_stmt* _tmp12_; + EventRow* _tmp13_; + sqlite3_stmt* _tmp14_; + const gchar* _tmp15_; + gchar* _tmp16_; + EventRow* _tmp17_; + sqlite3_stmt* _tmp18_; + sqlite3_stmt* _tmp19_; + const gchar* _tmp20_; + gchar* _tmp21_; + EventRow* _tmp22_; + sqlite3_stmt* _tmp23_; + EventRow* _tmp24_; + sqlite3_stmt* _tmp25_; + const gchar* _tmp26_; + gchar* _tmp27_; + GeeArrayList* _tmp28_; + EventRow* _tmp29_; #line 171 "/home/jens/Source/shotwell/src/db/EventTable.vala" if (!_tmp5_) { -#line 1418 "EventTable.c" +#line 1450 "EventTable.c" } #line 171 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp5_ = FALSE; #line 172 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp6_ = stmt; #line 172 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp7_ = sqlite3_step (_tmp6_); -#line 172 "/home/jens/Source/shotwell/src/db/EventTable.vala" - res = _tmp7_; + res = sqlite3_step (_tmp6_); #line 173 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp8_ = res; + _tmp7_ = res; #line 173 "/home/jens/Source/shotwell/src/db/EventTable.vala" - if (_tmp8_ == SQLITE_DONE) { + if (_tmp7_ == SQLITE_DONE) { #line 174 "/home/jens/Source/shotwell/src/db/EventTable.vala" break; -#line 1434 "EventTable.c" +#line 1464 "EventTable.c" } else { - gint _tmp9_; + gint _tmp8_; #line 175 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp9_ = res; + _tmp8_ = res; #line 175 "/home/jens/Source/shotwell/src/db/EventTable.vala" - if (_tmp9_ != SQLITE_ROW) { -#line 1441 "EventTable.c" - gint _tmp10_; + if (_tmp8_ != SQLITE_ROW) { +#line 1471 "EventTable.c" + gint _tmp9_; #line 176 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp10_ = res; + _tmp9_ = res; #line 176 "/home/jens/Source/shotwell/src/db/EventTable.vala" - database_table_fatal ("get_events", _tmp10_); + database_table_fatal ("get_events", _tmp9_); #line 178 "/home/jens/Source/shotwell/src/db/EventTable.vala" break; -#line 1449 "EventTable.c" +#line 1479 "EventTable.c" } } #line 181 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp11_ = event_row_new (); + _tmp10_ = event_row_new (); #line 181 "/home/jens/Source/shotwell/src/db/EventTable.vala" - row = _tmp11_; + row = _tmp10_; #line 183 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp12_ = row; + _tmp11_ = row; #line 183 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp13_ = stmt; + _tmp12_ = stmt; #line 183 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp14_ = sqlite3_column_int64 (_tmp13_, 0); -#line 183 "/home/jens/Source/shotwell/src/db/EventTable.vala" - event_id_init (&_tmp12_->event_id, _tmp14_); + event_id_init (&_tmp11_->event_id, sqlite3_column_int64 (_tmp12_, 0)); #line 184 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp15_ = row; + _tmp13_ = row; #line 184 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp16_ = stmt; + _tmp14_ = stmt; #line 184 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp17_ = sqlite3_column_text (_tmp16_, 1); + _tmp15_ = sqlite3_column_text (_tmp14_, 1); #line 184 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp18_ = g_strdup (_tmp17_); + _tmp16_ = g_strdup (_tmp15_); #line 184 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _g_free0 (_tmp15_->name); + _g_free0 (_tmp13_->name); #line 184 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp15_->name = _tmp18_; -#line 185 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp19_ = row; + _tmp13_->name = _tmp16_; #line 185 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp20_ = stmt; + _tmp17_ = row; #line 185 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp21_ = sqlite3_column_int64 (_tmp20_, 2); + _tmp18_ = stmt; #line 185 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp22_ = stmt; + _tmp19_ = stmt; #line 185 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp23_ = sqlite3_column_text (_tmp22_, 3); + _tmp20_ = sqlite3_column_text (_tmp19_, 3); #line 185 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp24_ = event_table_source_id_upgrade (self, _tmp21_, _tmp23_); + _tmp21_ = event_table_source_id_upgrade (self, sqlite3_column_int64 (_tmp18_, 2), _tmp20_); #line 185 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _g_free0 (_tmp19_->primary_source_id); + _g_free0 (_tmp17_->primary_source_id); #line 185 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp19_->primary_source_id = _tmp24_; + _tmp17_->primary_source_id = _tmp21_; #line 186 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp25_ = row; + _tmp22_ = row; #line 186 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp26_ = stmt; + _tmp23_ = stmt; #line 186 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp27_ = sqlite3_column_int64 (_tmp26_, 4); -#line 186 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp25_->time_created = (time_t) _tmp27_; + _tmp22_->time_created = (time_t) sqlite3_column_int64 (_tmp23_, 4); #line 187 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp28_ = row; + _tmp24_ = row; #line 187 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp29_ = stmt; + _tmp25_ = stmt; #line 187 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp30_ = sqlite3_column_text (_tmp29_, 5); + _tmp26_ = sqlite3_column_text (_tmp25_, 5); #line 187 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp31_ = g_strdup (_tmp30_); + _tmp27_ = g_strdup (_tmp26_); #line 187 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _g_free0 (_tmp28_->comment); + _g_free0 (_tmp24_->comment); #line 187 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp28_->comment = _tmp31_; + _tmp24_->comment = _tmp27_; #line 189 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp32_ = event_rows; + _tmp28_ = event_rows; #line 189 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp33_ = row; + _tmp29_ = row; #line 189 "/home/jens/Source/shotwell/src/db/EventTable.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp33_); + gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp29_); #line 171 "/home/jens/Source/shotwell/src/db/EventTable.vala" _event_row_unref0 (row); -#line 1520 "EventTable.c" +#line 1544 "EventTable.c" } } #line 192 "/home/jens/Source/shotwell/src/db/EventTable.vala" @@ -1529,52 +1553,49 @@ GeeArrayList* event_table_get_events (EventTable* self) { _sqlite3_finalize0 (stmt); #line 192 "/home/jens/Source/shotwell/src/db/EventTable.vala" return result; -#line 1529 "EventTable.c" +#line 1553 "EventTable.c" } -gboolean event_table_rename (EventTable* self, EventID* event_id, const gchar* name) { +gboolean +event_table_rename (EventTable* self, + EventID* event_id, + const gchar* name) +{ gboolean result = FALSE; const gchar* _tmp0_ = NULL; - const gchar* _tmp1_; - EventID _tmp3_; - gint64 _tmp4_; - gboolean _tmp5_; + EventID _tmp1_; + gint64 _tmp2_; #line 195 "/home/jens/Source/shotwell/src/db/EventTable.vala" g_return_val_if_fail (IS_EVENT_TABLE (self), FALSE); #line 195 "/home/jens/Source/shotwell/src/db/EventTable.vala" g_return_val_if_fail (event_id != NULL, FALSE); #line 196 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp1_ = name; -#line 196 "/home/jens/Source/shotwell/src/db/EventTable.vala" - if (_tmp1_ != NULL) { -#line 1548 "EventTable.c" - const gchar* _tmp2_; + if (name != NULL) { #line 196 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp2_ = name; -#line 196 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp0_ = _tmp2_; -#line 1554 "EventTable.c" + _tmp0_ = name; +#line 1574 "EventTable.c" } else { #line 196 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp0_ = ""; -#line 1558 "EventTable.c" +#line 1578 "EventTable.c" } #line 196 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp3_ = *event_id; -#line 196 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp4_ = _tmp3_.id; + _tmp1_ = *event_id; #line 196 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp5_ = database_table_update_text_by_id (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_TABLE, DatabaseTable), _tmp4_, "name", _tmp0_); + _tmp2_ = _tmp1_.id; #line 196 "/home/jens/Source/shotwell/src/db/EventTable.vala" - result = _tmp5_; + result = database_table_update_text_by_id (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_TABLE, DatabaseTable), _tmp2_, "name", _tmp0_); #line 196 "/home/jens/Source/shotwell/src/db/EventTable.vala" return result; -#line 1570 "EventTable.c" +#line 1588 "EventTable.c" } -gchar* event_table_get_name (EventTable* self, EventID* event_id) { +gchar* +event_table_get_name (EventTable* self, + EventID* event_id) +{ gchar* result = NULL; sqlite3_stmt* stmt = NULL; EventID _tmp0_; @@ -1611,7 +1632,7 @@ gchar* event_table_get_name (EventTable* self, EventID* event_id) { _sqlite3_finalize0 (stmt); #line 202 "/home/jens/Source/shotwell/src/db/EventTable.vala" return result; -#line 1611 "EventTable.c" +#line 1632 "EventTable.c" } #line 204 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp4_ = stmt; @@ -1625,7 +1646,7 @@ gchar* event_table_get_name (EventTable* self, EventID* event_id) { _tmp9_ = name; #line 206 "/home/jens/Source/shotwell/src/db/EventTable.vala" if (_tmp9_ != NULL) { -#line 1625 "EventTable.c" +#line 1646 "EventTable.c" const gchar* _tmp10_; gint _tmp11_; gint _tmp12_; @@ -1637,25 +1658,25 @@ gchar* event_table_get_name (EventTable* self, EventID* event_id) { _tmp12_ = _tmp11_; #line 206 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp8_ = _tmp12_ > 0; -#line 1637 "EventTable.c" +#line 1658 "EventTable.c" } else { #line 206 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp8_ = FALSE; -#line 1641 "EventTable.c" +#line 1662 "EventTable.c" } #line 206 "/home/jens/Source/shotwell/src/db/EventTable.vala" if (_tmp8_) { -#line 1645 "EventTable.c" +#line 1666 "EventTable.c" const gchar* _tmp13_; #line 206 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp13_ = name; #line 206 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp7_ = _tmp13_; -#line 1651 "EventTable.c" +#line 1672 "EventTable.c" } else { #line 206 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp7_ = NULL; -#line 1655 "EventTable.c" +#line 1676 "EventTable.c" } #line 206 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp14_ = g_strdup (_tmp7_); @@ -1667,11 +1688,14 @@ gchar* event_table_get_name (EventTable* self, EventID* event_id) { _sqlite3_finalize0 (stmt); #line 206 "/home/jens/Source/shotwell/src/db/EventTable.vala" return result; -#line 1667 "EventTable.c" +#line 1688 "EventTable.c" } -gchar* event_table_get_primary_source_id (EventTable* self, EventID* event_id) { +gchar* +event_table_get_primary_source_id (EventTable* self, + EventID* event_id) +{ gchar* result = NULL; sqlite3_stmt* stmt = NULL; EventID _tmp0_; @@ -1703,7 +1727,7 @@ gchar* event_table_get_primary_source_id (EventTable* self, EventID* event_id) { _sqlite3_finalize0 (stmt); #line 212 "/home/jens/Source/shotwell/src/db/EventTable.vala" return result; -#line 1703 "EventTable.c" +#line 1727 "EventTable.c" } #line 214 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp4_ = stmt; @@ -1717,16 +1741,18 @@ gchar* event_table_get_primary_source_id (EventTable* self, EventID* event_id) { _sqlite3_finalize0 (stmt); #line 214 "/home/jens/Source/shotwell/src/db/EventTable.vala" return result; -#line 1717 "EventTable.c" +#line 1741 "EventTable.c" } -gboolean event_table_set_primary_source_id (EventTable* self, EventID* event_id, const gchar* primary_source_id) { +gboolean +event_table_set_primary_source_id (EventTable* self, + EventID* event_id, + const gchar* primary_source_id) +{ gboolean result = FALSE; EventID _tmp0_; gint64 _tmp1_; - const gchar* _tmp2_; - gboolean _tmp3_; #line 217 "/home/jens/Source/shotwell/src/db/EventTable.vala" g_return_val_if_fail (IS_EVENT_TABLE (self), FALSE); #line 217 "/home/jens/Source/shotwell/src/db/EventTable.vala" @@ -1738,18 +1764,17 @@ gboolean event_table_set_primary_source_id (EventTable* self, EventID* event_id, #line 218 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp1_ = _tmp0_.id; #line 218 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp2_ = primary_source_id; -#line 218 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp3_ = database_table_update_text_by_id (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_TABLE, DatabaseTable), _tmp1_, "primary_source_id", _tmp2_); -#line 218 "/home/jens/Source/shotwell/src/db/EventTable.vala" - result = _tmp3_; + result = database_table_update_text_by_id (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_TABLE, DatabaseTable), _tmp1_, "primary_source_id", primary_source_id); #line 218 "/home/jens/Source/shotwell/src/db/EventTable.vala" return result; -#line 1745 "EventTable.c" +#line 1767 "EventTable.c" } -time_t event_table_get_time_created (EventTable* self, EventID* event_id) { +time_t +event_table_get_time_created (EventTable* self, + EventID* event_id) +{ time_t result = 0; sqlite3_stmt* stmt = NULL; EventID _tmp0_; @@ -1757,7 +1782,6 @@ time_t event_table_get_time_created (EventTable* self, EventID* event_id) { sqlite3_stmt* _tmp2_ = NULL; gboolean _tmp3_; sqlite3_stmt* _tmp4_; - gint64 _tmp5_; #line 221 "/home/jens/Source/shotwell/src/db/EventTable.vala" g_return_val_if_fail (IS_EVENT_TABLE (self), 0); #line 221 "/home/jens/Source/shotwell/src/db/EventTable.vala" @@ -1780,29 +1804,29 @@ time_t event_table_get_time_created (EventTable* self, EventID* event_id) { _sqlite3_finalize0 (stmt); #line 224 "/home/jens/Source/shotwell/src/db/EventTable.vala" return result; -#line 1780 "EventTable.c" +#line 1804 "EventTable.c" } #line 226 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp4_ = stmt; #line 226 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp5_ = sqlite3_column_int64 (_tmp4_, 0); -#line 226 "/home/jens/Source/shotwell/src/db/EventTable.vala" - result = (time_t) _tmp5_; + result = (time_t) sqlite3_column_int64 (_tmp4_, 0); #line 226 "/home/jens/Source/shotwell/src/db/EventTable.vala" _sqlite3_finalize0 (stmt); #line 226 "/home/jens/Source/shotwell/src/db/EventTable.vala" return result; -#line 1792 "EventTable.c" +#line 1814 "EventTable.c" } -gboolean event_table_set_comment (EventTable* self, EventID* event_id, const gchar* new_comment) { +gboolean +event_table_set_comment (EventTable* self, + EventID* event_id, + const gchar* new_comment) +{ gboolean result = FALSE; const gchar* _tmp0_ = NULL; - const gchar* _tmp1_; - EventID _tmp3_; - gint64 _tmp4_; - gboolean _tmp5_; + EventID _tmp1_; + gint64 _tmp2_; #line 229 "/home/jens/Source/shotwell/src/db/EventTable.vala" g_return_val_if_fail (IS_EVENT_TABLE (self), FALSE); #line 229 "/home/jens/Source/shotwell/src/db/EventTable.vala" @@ -1810,59 +1834,59 @@ gboolean event_table_set_comment (EventTable* self, EventID* event_id, const gch #line 229 "/home/jens/Source/shotwell/src/db/EventTable.vala" g_return_val_if_fail (new_comment != NULL, FALSE); #line 230 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp1_ = new_comment; -#line 230 "/home/jens/Source/shotwell/src/db/EventTable.vala" - if (_tmp1_ != NULL) { -#line 1813 "EventTable.c" - const gchar* _tmp2_; + if (new_comment != NULL) { #line 230 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp2_ = new_comment; -#line 230 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp0_ = _tmp2_; -#line 1819 "EventTable.c" + _tmp0_ = new_comment; +#line 1837 "EventTable.c" } else { #line 230 "/home/jens/Source/shotwell/src/db/EventTable.vala" _tmp0_ = ""; -#line 1823 "EventTable.c" +#line 1841 "EventTable.c" } #line 230 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp3_ = *event_id; -#line 230 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp4_ = _tmp3_.id; + _tmp1_ = *event_id; #line 230 "/home/jens/Source/shotwell/src/db/EventTable.vala" - _tmp5_ = database_table_update_text_by_id (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_TABLE, DatabaseTable), _tmp4_, "comment", _tmp0_); + _tmp2_ = _tmp1_.id; #line 230 "/home/jens/Source/shotwell/src/db/EventTable.vala" - result = _tmp5_; + result = database_table_update_text_by_id (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_TABLE, DatabaseTable), _tmp2_, "comment", _tmp0_); #line 230 "/home/jens/Source/shotwell/src/db/EventTable.vala" return result; -#line 1835 "EventTable.c" +#line 1851 "EventTable.c" } -static void event_table_class_init (EventTableClass * klass) { +static void +event_table_class_init (EventTableClass * klass) +{ #line 33 "/home/jens/Source/shotwell/src/db/EventTable.vala" event_table_parent_class = g_type_class_peek_parent (klass); #line 33 "/home/jens/Source/shotwell/src/db/EventTable.vala" ((DatabaseTableClass *) klass)->finalize = event_table_finalize; -#line 1844 "EventTable.c" +#line 1862 "EventTable.c" } -static void event_table_instance_init (EventTable * self) { +static void +event_table_instance_init (EventTable * self) +{ } -static void event_table_finalize (DatabaseTable * obj) { +static void +event_table_finalize (DatabaseTable * obj) +{ EventTable * self; #line 33 "/home/jens/Source/shotwell/src/db/EventTable.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_EVENT_TABLE, EventTable); #line 33 "/home/jens/Source/shotwell/src/db/EventTable.vala" DATABASE_TABLE_CLASS (event_table_parent_class)->finalize (obj); -#line 1858 "EventTable.c" +#line 1880 "EventTable.c" } -GType event_table_get_type (void) { +GType +event_table_get_type (void) +{ static volatile gsize event_table_type_id__volatile = 0; if (g_once_init_enter (&event_table_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (EventTableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) event_table_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventTable), 0, (GInstanceInitFunc) event_table_instance_init, NULL }; |