summaryrefslogtreecommitdiff
path: root/plugins/shotwell-data-imports/FSpotDatabase.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-05-01 14:43:08 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-05-01 14:43:08 +0200
commit2b3f22361da0c1d8e6ce70d71352821758186db7 (patch)
tree5d10633b47369b3aa52a05bf889ede0dbe5ee108 /plugins/shotwell-data-imports/FSpotDatabase.vala
parent211da5fc3048ca2b6ccee2166b0aaaade55cb84f (diff)
parentdc6c76eb04dfe3d4262a1806808f0bc0bf523238 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'plugins/shotwell-data-imports/FSpotDatabase.vala')
-rw-r--r--plugins/shotwell-data-imports/FSpotDatabase.vala58
1 files changed, 0 insertions, 58 deletions
diff --git a/plugins/shotwell-data-imports/FSpotDatabase.vala b/plugins/shotwell-data-imports/FSpotDatabase.vala
deleted file mode 100644
index 979171c..0000000
--- a/plugins/shotwell-data-imports/FSpotDatabase.vala
+++ /dev/null
@@ -1,58 +0,0 @@
-/* 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.
- */
-
-namespace DataImports.FSpot.Db {
-
-public const int64 NULL_ID = 0;
-public const int64 INVALID_ID = -1;
-
-/**
- * Initialization method for the whole module.
- */
-public void init() {
- FSpotDatabaseBehavior.create_behavior_map();
-}
-
-/**
- * An object that is able to read from the F-Spot
- * database and extract the relevant objects.
- */
-public class FSpotDatabase : Object {
- private Sqlite.Database fspot_db;
- private FSpotMetaTable meta_table;
- public FSpotPhotosTable photos_table;
- public FSpotPhotoVersionsTable photo_versions_table;
- public FSpotTagsTable tags_table;
- public FSpotRollsTable rolls_table;
- public int64 hidden_tag_id;
-
- public FSpotDatabase(File db_file) throws DatabaseError, Spit.DataImports.DataImportError {
- string filename = db_file.get_path();
- int res = Sqlite.Database.open_v2(filename, out fspot_db,
- Sqlite.OPEN_READONLY, null);
- if (res != Sqlite.OK)
- throw new DatabaseError.ERROR("Unable to open F-Spot database %s: %d", filename, res);
- meta_table = new FSpotMetaTable(fspot_db);
- hidden_tag_id = meta_table.get_hidden_tag_id();
-
- FSpotDatabaseBehavior db_behavior = new FSpotDatabaseBehavior(get_version());
-
- photos_table = new FSpotPhotosTable(fspot_db, db_behavior);
- photo_versions_table = new FSpotPhotoVersionsTable(fspot_db, db_behavior);
- tags_table = new FSpotTagsTable(fspot_db, db_behavior);
- rolls_table = new FSpotRollsTable(fspot_db, db_behavior);
- }
-
- ~FSpotDatabase() {
- }
-
- private Utils.VersionNumber get_version() throws DatabaseError {
- return new Utils.VersionNumber.from_string(meta_table.get_db_version());
- }
-}
-
-}
-