diff options
author | Jens Georg <mail@jensge.org> | 2015-04-17 00:15:57 +0200 |
---|---|---|
committer | Jens Georg <mail@jensge.org> | 2015-06-22 23:45:54 +0200 |
commit | 86c1d0890a3bbf0e34af08e6526692793a38f352 (patch) | |
tree | 52b0dedc98237bf2a73709643e187841004a20f6 /src/plugins/media-export/rygel-media-export-media-cache.vala | |
parent | 0cf8cc83c3ad90da3b30b45b9bdf2e40034d0f9e (diff) | |
download | rygel-86c1d0890a3bbf0e34af08e6526692793a38f352.tar.gz |
build,db,media-export: Move database stuff
Move database handling code to own library to prepare inclusion of new
SQLite3 based plugins and avoid code duplication.
Diffstat (limited to 'src/plugins/media-export/rygel-media-export-media-cache.vala')
-rw-r--r-- | src/plugins/media-export/rygel-media-export-media-cache.vala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/media-export/rygel-media-export-media-cache.vala b/src/plugins/media-export/rygel-media-export-media-cache.vala index 332f34dc..9c8ff1da 100644 --- a/src/plugins/media-export/rygel-media-export-media-cache.vala +++ b/src/plugins/media-export/rygel-media-export-media-cache.vala @@ -27,6 +27,7 @@ using Gee; using GUPnP; using Sqlite; +using Rygel.Database; public errordomain Rygel.MediaExport.MediaCacheError { SQLITE_ERROR, @@ -52,7 +53,7 @@ internal struct Rygel.MediaExport.ExistsCacheEntry { */ public class Rygel.MediaExport.MediaCache : Object { // Private members - private Database db; + private Database.Database db; private ObjectFactory factory; private SQLFactory sql; private HashMap<string, ExistsCacheEntry?> exists_cache; @@ -617,7 +618,7 @@ public class Rygel.MediaExport.MediaCache : Object { } private void open_db (string name) throws Error { - this.db = new Database (name); + this.db = new Database.Database (name); int old_version = -1; int current_version = int.parse (SQLFactory.SCHEMA_VERSION); @@ -1170,7 +1171,7 @@ public class Rygel.MediaExport.MediaCache : Object { return operator.to_string (); } - private DatabaseCursor exec_cursor (SQLString id, + private Database.Cursor exec_cursor (SQLString id, GLib.Value[]? values = null) throws DatabaseError { return this.db.exec_cursor (this.sql.make (id), values); |