summaryrefslogtreecommitdiff
path: root/src/db/VersionTable.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-10-01 07:17:16 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-10-01 07:17:16 +0200
commit71137cc5832110d91599d68790402cf196762ed3 (patch)
treee7985bbfb6ca50ea738b38a9f852ee51431d48a7 /src/db/VersionTable.c
parent8ae550d463720d5d1c0e253af29843ff15de1a54 (diff)
parent1e92964463e564bb3359a7110342182fcfdc67f2 (diff)
Merge branch 'release/debian/0.30.1-1'debian/0.30.1-1
Diffstat (limited to 'src/db/VersionTable.c')
-rw-r--r--src/db/VersionTable.c597
1 files changed, 0 insertions, 597 deletions
diff --git a/src/db/VersionTable.c b/src/db/VersionTable.c
deleted file mode 100644
index a5847d7..0000000
--- a/src/db/VersionTable.c
+++ /dev/null
@@ -1,597 +0,0 @@
-/* VersionTable.c generated by valac 0.40.4, the Vala compiler
- * generated from VersionTable.vala, do not modify */
-
-/* Copyright 2016 Software Freedom Conservancy Inc.
- *
- * This software is licensed under the GNU Lesser General Public License
- * (version 2.1 or later). See the COPYING file in this distribution.
- */
-
-
-#include <glib.h>
-#include <glib-object.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sqlite3.h>
-
-
-#define TYPE_DATABASE_TABLE (database_table_get_type ())
-#define DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_TABLE, DatabaseTable))
-#define DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_TABLE, DatabaseTableClass))
-#define IS_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_TABLE))
-#define IS_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_TABLE))
-#define DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_TABLE, DatabaseTableClass))
-
-typedef struct _DatabaseTable DatabaseTable;
-typedef struct _DatabaseTableClass DatabaseTableClass;
-typedef struct _DatabaseTablePrivate DatabaseTablePrivate;
-
-#define TYPE_VERSION_TABLE (version_table_get_type ())
-#define VERSION_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VERSION_TABLE, VersionTable))
-#define VERSION_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VERSION_TABLE, VersionTableClass))
-#define IS_VERSION_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VERSION_TABLE))
-#define IS_VERSION_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VERSION_TABLE))
-#define VERSION_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VERSION_TABLE, VersionTableClass))
-
-typedef struct _VersionTable VersionTable;
-typedef struct _VersionTableClass VersionTableClass;
-typedef struct _VersionTablePrivate VersionTablePrivate;
-#define _sqlite3_finalize0(var) ((var == NULL) ? NULL : (var = (sqlite3_finalize (var), NULL)))
-#define _database_table_unref0(var) ((var == NULL) ? NULL : (var = (database_table_unref (var), NULL)))
-#define _g_free0(var) (var = (g_free (var), NULL))
-#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
-#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
-#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
-#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
-
-struct _DatabaseTable {
- GTypeInstance parent_instance;
- volatile int ref_count;
- DatabaseTablePrivate * priv;
- gchar* table_name;
-};
-
-struct _DatabaseTableClass {
- GTypeClass parent_class;
- void (*finalize) (DatabaseTable *self);
-};
-
-struct _VersionTable {
- DatabaseTable parent_instance;
- VersionTablePrivate * priv;
-};
-
-struct _VersionTableClass {
- DatabaseTableClass parent_class;
-};
-
-
-static gpointer version_table_parent_class = NULL;
-static VersionTable* version_table_instance;
-static VersionTable* version_table_instance = NULL;
-extern sqlite3* database_table_db;
-
-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);
-gpointer value_get_database_table (const GValue* value);
-GType database_table_get_type (void) G_GNUC_CONST;
-GType version_table_get_type (void) G_GNUC_CONST;
-static VersionTable* version_table_new (void);
-static VersionTable* version_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);
-VersionTable* version_table_get_instance (void);
-gint version_table_get_version (VersionTable* self,
- gchar* * app_version);
-void version_table_set_version (VersionTable* self,
- gint version,
- const gchar* app_version,
- const gchar* user_data);
-void version_table_update_version (VersionTable* self,
- gint version,
- const gchar* app_version);
-static void version_table_finalize (DatabaseTable * obj);
-
-
-static VersionTable*
-version_table_construct (GType object_type)
-{
- VersionTable* self = NULL;
- sqlite3_stmt* stmt = NULL;
- gint res = 0;
- sqlite3* _tmp0_;
- sqlite3_stmt* _tmp1_ = NULL;
- gint _tmp2_;
- gint _tmp3_;
- sqlite3_stmt* _tmp4_;
- gint _tmp5_;
-#line 10 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- self = (VersionTable*) database_table_construct (object_type);
-#line 12 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp0_ = database_table_db;
-#line 12 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp2_ = sqlite3_prepare_v2 (_tmp0_, "CREATE TABLE IF NOT EXISTS VersionTable (" "id INTEGER PRIMARY KEY, " "schema_version INTEGER, " "app_version TEXT, " "user_data TEXT NULL" ")", -1, &_tmp1_, NULL);
-#line 12 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _sqlite3_finalize0 (stmt);
-#line 12 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- stmt = _tmp1_;
-#line 12 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- res = _tmp2_;
-#line 18 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp3_ = res;
-#line 18 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _vala_assert (_tmp3_ == SQLITE_OK, "res == Sqlite.OK");
-#line 20 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp4_ = stmt;
-#line 20 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- res = sqlite3_step (_tmp4_);
-#line 21 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp5_ = res;
-#line 21 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- if (_tmp5_ != SQLITE_DONE) {
-#line 145 "VersionTable.c"
- gint _tmp6_;
-#line 22 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp6_ = res;
-#line 22 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- database_table_fatal ("create version table", _tmp6_);
-#line 151 "VersionTable.c"
- }
-#line 24 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- database_table_set_table_name (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_TABLE, DatabaseTable), "VersionTable");
-#line 10 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _sqlite3_finalize0 (stmt);
-#line 10 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- return self;
-#line 159 "VersionTable.c"
-}
-
-
-static VersionTable*
-version_table_new (void)
-{
-#line 10 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- return version_table_construct (TYPE_VERSION_TABLE);
-#line 168 "VersionTable.c"
-}
-
-
-static gpointer
-_database_table_ref0 (gpointer self)
-{
-#line 31 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- return self ? database_table_ref (self) : NULL;
-#line 177 "VersionTable.c"
-}
-
-
-VersionTable*
-version_table_get_instance (void)
-{
- VersionTable* result = NULL;
- VersionTable* _tmp0_;
- VersionTable* _tmp2_;
- VersionTable* _tmp3_;
-#line 28 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp0_ = version_table_instance;
-#line 28 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- if (_tmp0_ == NULL) {
-#line 192 "VersionTable.c"
- VersionTable* _tmp1_;
-#line 29 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp1_ = version_table_new ();
-#line 29 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _database_table_unref0 (version_table_instance);
-#line 29 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- version_table_instance = _tmp1_;
-#line 200 "VersionTable.c"
- }
-#line 31 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp2_ = version_table_instance;
-#line 31 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp3_ = _database_table_ref0 (_tmp2_);
-#line 31 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- result = _tmp3_;
-#line 31 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- return result;
-#line 210 "VersionTable.c"
-}
-
-
-gint
-version_table_get_version (VersionTable* self,
- gchar* * app_version)
-{
- gchar* _vala_app_version = NULL;
- gint result = 0;
- sqlite3_stmt* stmt = NULL;
- gint res = 0;
- sqlite3* _tmp0_;
- sqlite3_stmt* _tmp1_ = NULL;
- gint _tmp2_;
- gint _tmp3_;
- sqlite3_stmt* _tmp4_;
- gint _tmp5_;
- sqlite3_stmt* _tmp8_;
- const gchar* _tmp9_;
- gchar* _tmp10_;
- sqlite3_stmt* _tmp11_;
-#line 34 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- g_return_val_if_fail (IS_VERSION_TABLE (self), 0);
-#line 36 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp0_ = database_table_db;
-#line 36 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp2_ = sqlite3_prepare_v2 (_tmp0_, "SELECT schema_version, app_version FROM VersionTable ORDER BY schema_v" \
-"ersion DESC LIMIT 1", -1, &_tmp1_, NULL);
-#line 36 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _sqlite3_finalize0 (stmt);
-#line 36 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- stmt = _tmp1_;
-#line 36 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- res = _tmp2_;
-#line 38 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp3_ = res;
-#line 38 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _vala_assert (_tmp3_ == SQLITE_OK, "res == Sqlite.OK");
-#line 40 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp4_ = stmt;
-#line 40 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- res = sqlite3_step (_tmp4_);
-#line 41 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp5_ = res;
-#line 41 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- if (_tmp5_ != SQLITE_ROW) {
-#line 256 "VersionTable.c"
- gint _tmp6_;
-#line 42 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp6_ = res;
-#line 42 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- if (_tmp6_ != SQLITE_DONE) {
-#line 262 "VersionTable.c"
- gint _tmp7_;
-#line 43 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp7_ = res;
-#line 43 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- database_table_fatal ("get_version", _tmp7_);
-#line 268 "VersionTable.c"
- }
-#line 45 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _g_free0 (_vala_app_version);
-#line 45 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _vala_app_version = NULL;
-#line 47 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- result = -1;
-#line 47 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _sqlite3_finalize0 (stmt);
-#line 47 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- if (app_version) {
-#line 47 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- *app_version = _vala_app_version;
-#line 282 "VersionTable.c"
- } else {
-#line 47 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _g_free0 (_vala_app_version);
-#line 286 "VersionTable.c"
- }
-#line 47 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- return result;
-#line 290 "VersionTable.c"
- }
-#line 50 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp8_ = stmt;
-#line 50 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp9_ = sqlite3_column_text (_tmp8_, 1);
-#line 50 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp10_ = g_strdup (_tmp9_);
-#line 50 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _g_free0 (_vala_app_version);
-#line 50 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _vala_app_version = _tmp10_;
-#line 52 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp11_ = stmt;
-#line 52 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- result = sqlite3_column_int (_tmp11_, 0);
-#line 52 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _sqlite3_finalize0 (stmt);
-#line 52 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- if (app_version) {
-#line 52 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- *app_version = _vala_app_version;
-#line 312 "VersionTable.c"
- } else {
-#line 52 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _g_free0 (_vala_app_version);
-#line 316 "VersionTable.c"
- }
-#line 52 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- return result;
-#line 320 "VersionTable.c"
-}
-
-
-void
-version_table_set_version (VersionTable* self,
- gint version,
- const gchar* app_version,
- const gchar* user_data)
-{
- sqlite3_stmt* stmt = NULL;
- gchar* bitbucket = NULL;
- gchar* _tmp0_ = NULL;
- gint _tmp1_;
- gint res = 0;
- sqlite3_stmt* _tmp10_;
- gint _tmp11_;
- sqlite3_stmt* _tmp12_;
- gchar* _tmp13_;
- GDestroyNotify _tmp14_;
- gint _tmp15_;
- sqlite3_stmt* _tmp16_;
- gchar* _tmp17_;
- GDestroyNotify _tmp18_;
- gint _tmp19_;
- sqlite3_stmt* _tmp20_;
- gint _tmp21_;
-#line 55 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- g_return_if_fail (IS_VERSION_TABLE (self));
-#line 55 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- g_return_if_fail (app_version != NULL);
-#line 59 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp1_ = version_table_get_version (self, &_tmp0_);
-#line 59 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _g_free0 (bitbucket);
-#line 59 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- bitbucket = _tmp0_;
-#line 59 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- if (_tmp1_ != -1) {
-#line 359 "VersionTable.c"
- gint res = 0;
- sqlite3* _tmp2_;
- sqlite3_stmt* _tmp3_ = NULL;
- gint _tmp4_;
- gint _tmp5_;
-#line 61 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp2_ = database_table_db;
-#line 61 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp4_ = sqlite3_prepare_v2 (_tmp2_, "UPDATE VersionTable SET schema_version=?, app_version=?, user_data=?", -1, &_tmp3_, NULL);
-#line 61 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _sqlite3_finalize0 (stmt);
-#line 61 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- stmt = _tmp3_;
-#line 61 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- res = _tmp4_;
-#line 63 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp5_ = res;
-#line 63 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _vala_assert (_tmp5_ == SQLITE_OK, "res == Sqlite.OK");
-#line 379 "VersionTable.c"
- } else {
- gint res = 0;
- sqlite3* _tmp6_;
- sqlite3_stmt* _tmp7_ = NULL;
- gint _tmp8_;
- gint _tmp9_;
-#line 66 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp6_ = database_table_db;
-#line 66 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp8_ = sqlite3_prepare_v2 (_tmp6_, "INSERT INTO VersionTable (schema_version, app_version, user_data) VALU" \
-"ES (?,?, ?)", -1, &_tmp7_, NULL);
-#line 66 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _sqlite3_finalize0 (stmt);
-#line 66 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- stmt = _tmp7_;
-#line 66 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- res = _tmp8_;
-#line 68 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp9_ = res;
-#line 68 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _vala_assert (_tmp9_ == SQLITE_OK, "res == Sqlite.OK");
-#line 400 "VersionTable.c"
- }
-#line 71 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp10_ = stmt;
-#line 71 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- res = sqlite3_bind_int (_tmp10_, 1, version);
-#line 72 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp11_ = res;
-#line 72 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _vala_assert (_tmp11_ == SQLITE_OK, "res == Sqlite.OK");
-#line 73 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp12_ = stmt;
-#line 73 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp13_ = g_strdup (app_version);
-#line 73 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp14_ = g_free;
-#line 73 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- res = sqlite3_bind_text (_tmp12_, 2, _tmp13_, -1, _tmp14_);
-#line 74 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp15_ = res;
-#line 74 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _vala_assert (_tmp15_ == SQLITE_OK, "res == Sqlite.OK");
-#line 75 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp16_ = stmt;
-#line 75 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp17_ = g_strdup (user_data);
-#line 75 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp18_ = g_free;
-#line 75 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- res = sqlite3_bind_text (_tmp16_, 3, _tmp17_, -1, _tmp18_);
-#line 76 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp19_ = res;
-#line 76 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _vala_assert (_tmp19_ == SQLITE_OK, "res == Sqlite.OK");
-#line 78 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp20_ = stmt;
-#line 78 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- res = sqlite3_step (_tmp20_);
-#line 79 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp21_ = res;
-#line 79 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- if (_tmp21_ != SQLITE_DONE) {
-#line 442 "VersionTable.c"
- gchar* _tmp22_;
- gchar* _tmp23_;
- gint _tmp24_;
-#line 80 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp22_ = g_strdup_printf ("set_version %d %s %s", version, app_version, user_data);
-#line 80 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp23_ = _tmp22_;
-#line 80 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp24_ = res;
-#line 80 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- database_table_fatal (_tmp23_, _tmp24_);
-#line 80 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _g_free0 (_tmp23_);
-#line 456 "VersionTable.c"
- }
-#line 55 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _g_free0 (bitbucket);
-#line 55 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _sqlite3_finalize0 (stmt);
-#line 462 "VersionTable.c"
-}
-
-
-void
-version_table_update_version (VersionTable* self,
- gint version,
- const gchar* app_version)
-{
- sqlite3_stmt* stmt = NULL;
- gint res = 0;
- sqlite3* _tmp0_;
- sqlite3_stmt* _tmp1_ = NULL;
- gint _tmp2_;
- gint _tmp3_;
- sqlite3_stmt* _tmp4_;
- gint _tmp5_;
- sqlite3_stmt* _tmp6_;
- gchar* _tmp7_;
- GDestroyNotify _tmp8_;
- gint _tmp9_;
- sqlite3_stmt* _tmp10_;
- gint _tmp11_;
-#line 83 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- g_return_if_fail (IS_VERSION_TABLE (self));
-#line 83 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- g_return_if_fail (app_version != NULL);
-#line 85 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp0_ = database_table_db;
-#line 85 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp2_ = sqlite3_prepare_v2 (_tmp0_, "UPDATE VersionTable SET schema_version=?, app_version=?", -1, &_tmp1_, NULL);
-#line 85 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _sqlite3_finalize0 (stmt);
-#line 85 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- stmt = _tmp1_;
-#line 85 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- res = _tmp2_;
-#line 86 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp3_ = res;
-#line 86 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _vala_assert (_tmp3_ == SQLITE_OK, "res == Sqlite.OK");
-#line 88 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp4_ = stmt;
-#line 88 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- res = sqlite3_bind_int (_tmp4_, 1, version);
-#line 89 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp5_ = res;
-#line 89 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _vala_assert (_tmp5_ == SQLITE_OK, "res == Sqlite.OK");
-#line 90 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp6_ = stmt;
-#line 90 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp7_ = g_strdup (app_version);
-#line 90 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp8_ = g_free;
-#line 90 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- res = sqlite3_bind_text (_tmp6_, 2, _tmp7_, -1, _tmp8_);
-#line 91 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp9_ = res;
-#line 91 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _vala_assert (_tmp9_ == SQLITE_OK, "res == Sqlite.OK");
-#line 93 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp10_ = stmt;
-#line 93 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- res = sqlite3_step (_tmp10_);
-#line 94 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp11_ = res;
-#line 94 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- if (_tmp11_ != SQLITE_DONE) {
-#line 531 "VersionTable.c"
- gchar* _tmp12_;
- gchar* _tmp13_;
- gint _tmp14_;
-#line 95 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp12_ = g_strdup_printf ("update_version %d", version);
-#line 95 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp13_ = _tmp12_;
-#line 95 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _tmp14_ = res;
-#line 95 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- database_table_fatal (_tmp13_, _tmp14_);
-#line 95 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _g_free0 (_tmp13_);
-#line 545 "VersionTable.c"
- }
-#line 83 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- _sqlite3_finalize0 (stmt);
-#line 549 "VersionTable.c"
-}
-
-
-static void
-version_table_class_init (VersionTableClass * klass)
-{
-#line 7 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- version_table_parent_class = g_type_class_peek_parent (klass);
-#line 7 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- ((DatabaseTableClass *) klass)->finalize = version_table_finalize;
-#line 560 "VersionTable.c"
-}
-
-
-static void
-version_table_instance_init (VersionTable * self)
-{
-}
-
-
-static void
-version_table_finalize (DatabaseTable * obj)
-{
- VersionTable * self;
-#line 7 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VERSION_TABLE, VersionTable);
-#line 7 "/home/jens/Source/shotwell/src/db/VersionTable.vala"
- DATABASE_TABLE_CLASS (version_table_parent_class)->finalize (obj);
-#line 578 "VersionTable.c"
-}
-
-
-GType
-version_table_get_type (void)
-{
- static volatile gsize version_table_type_id__volatile = 0;
- if (g_once_init_enter (&version_table_type_id__volatile)) {
- static const GTypeInfo g_define_type_info = { sizeof (VersionTableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) version_table_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (VersionTable), 0, (GInstanceInitFunc) version_table_instance_init, NULL };
- GType version_table_type_id;
- version_table_type_id = g_type_register_static (TYPE_DATABASE_TABLE, "VersionTable", &g_define_type_info, 0);
- g_once_init_leave (&version_table_type_id__volatile, version_table_type_id);
- }
- return version_table_type_id__volatile;
-}
-
-
-