aboutsummaryrefslogtreecommitdiff
path: root/libdino
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-03-12 14:44:09 +0100
committerfiaxh <git@mx.ax.lt>2017-03-12 14:44:09 +0100
commitf24b47c44db03a8d9ba611f827e71aeb1f63d0bd (patch)
tree85a2622877dab97b15ff4862505f3770adaf4bd0 /libdino
parentdbbe5e39d069196aa17951b12575492cfa8c7976 (diff)
downloaddino-f24b47c44db03a8d9ba611f827e71aeb1f63d0bd.tar.gz
dino-f24b47c44db03a8d9ba611f827e71aeb1f63d0bd.zip
PGP module: store data in own db, use pgp key as specified in account settings
Diffstat (limited to 'libdino')
-rw-r--r--libdino/src/service/database.vala25
1 files changed, 1 insertions, 24 deletions
diff --git a/libdino/src/service/database.vala b/libdino/src/service/database.vala
index 83686424..b50581f8 100644
--- a/libdino/src/service/database.vala
+++ b/libdino/src/service/database.vala
@@ -103,16 +103,6 @@ public class Database : Qlite.Database {
}
}
- public class PgpTable : Table {
- public Column<string> jid = new Column.Text("jid") { primary_key = true };
- public Column<string> key = new Column.Text("key") { not_null = true };
-
- protected PgpTable(Database db) {
- base(db, "pgp");
- init({jid, key});
- }
- }
-
public class EntityFeatureTable : Table {
public Column<string> entity = new Column.Text("entity");
public Column<string> feature = new Column.Text("feature");
@@ -129,7 +119,6 @@ public class Database : Qlite.Database {
public RealJidTable real_jid { get; private set; }
public ConversationTable conversation { get; private set; }
public AvatarTable avatar { get; private set; }
- public PgpTable pgp { get; private set; }
public EntityFeatureTable entity_feature { get; private set; }
public Database(string fileName) {
@@ -140,9 +129,8 @@ public class Database : Qlite.Database {
real_jid = new RealJidTable(this);
conversation = new ConversationTable(this);
avatar = new AvatarTable(this);
- pgp = new PgpTable(this);
entity_feature = new EntityFeatureTable(this);
- init({ account, jid, message, real_jid, conversation, avatar, pgp, entity_feature });
+ init({ account, jid, message, real_jid, conversation, avatar, entity_feature });
}
public override void migrate(long oldVersion) {
@@ -420,17 +408,6 @@ public class Database : Qlite.Database {
return ret;
}
- public void set_pgp_key(Jid jid, string key) {
- pgp.insert().or("REPLACE")
- .value(pgp.jid, jid.to_string())
- .value(pgp.key, key)
- .perform();
- }
-
- public string? get_pgp_key(Jid jid) {
- return pgp.select({pgp.key}).with(pgp.jid, "=", jid.to_string())[pgp.key];
- }
-
public void add_entity_features(string entity, ArrayList<string> features) {
foreach (string feature in features) {
entity_feature.insert()