diff options
author | fiaxh <git@lightrise.org> | 2021-03-19 23:07:40 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2021-03-21 12:41:39 +0100 |
commit | cdb4d77259e6c361aaca64a483a43d7441f4803d (patch) | |
tree | 6db053f9f0875f54261f3f7e7d6830612076e29d /libdino/src/service/database.vala | |
parent | ef2e3c774cab82a94a5e34399f2013d64c3cf03b (diff) | |
download | dino-cdb4d77259e6c361aaca64a483a43d7441f4803d.tar.gz dino-cdb4d77259e6c361aaca64a483a43d7441f4803d.zip |
Add support for unencrypted RTP calls to libdino
Co-authored-by: Marvin W <git@larma.de>
Diffstat (limited to 'libdino/src/service/database.vala')
-rw-r--r-- | libdino/src/service/database.vala | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/libdino/src/service/database.vala b/libdino/src/service/database.vala index 17499404..98e18d16 100644 --- a/libdino/src/service/database.vala +++ b/libdino/src/service/database.vala @@ -7,7 +7,7 @@ using Dino.Entities; namespace Dino { public class Database : Qlite.Database { - private const int VERSION = 19; + private const int VERSION = 20; public class AccountTable : Table { public Column<int> id = new Column.Integer("id") { primary_key = true, auto_increment = true }; @@ -155,6 +155,24 @@ public class Database : Qlite.Database { } } + public class CallTable : Table { + public Column<int> id = new Column.Integer("id") { primary_key = true, auto_increment = true }; + public Column<int> account_id = new Column.Integer("account_id") { not_null = true }; + public Column<int> counterpart_id = new Column.Integer("counterpart_id") { not_null = true }; + public Column<string> counterpart_resource = new Column.Text("counterpart_resource"); + public Column<string> our_resource = new Column.Text("our_resource"); + public Column<bool> direction = new Column.BoolInt("direction") { not_null = true }; + public Column<long> time = new Column.Long("time") { not_null = true }; + public Column<long> local_time = new Column.Long("local_time") { not_null = true }; + public Column<long> end_time = new Column.Long("end_time"); + public Column<int> state = new Column.Integer("state"); + + internal CallTable(Database db) { + base(db, "call"); + init({id, account_id, counterpart_id, counterpart_resource, our_resource, direction, time, local_time, end_time, state}); + } + } + public class ConversationTable : Table { public Column<int> id = new Column.Integer("id") { primary_key = true, auto_increment = true }; public Column<int> account_id = new Column.Integer("account_id") { not_null = true }; @@ -275,6 +293,7 @@ public class Database : Qlite.Database { public MessageCorrectionTable message_correction { get; private set; } public RealJidTable real_jid { get; private set; } public FileTransferTable file_transfer { get; private set; } + public CallTable call { get; private set; } public ConversationTable conversation { get; private set; } public AvatarTable avatar { get; private set; } public EntityIdentityTable entity_identity { get; private set; } @@ -298,6 +317,7 @@ public class Database : Qlite.Database { message_correction = new MessageCorrectionTable(this); real_jid = new RealJidTable(this); file_transfer = new FileTransferTable(this); + call = new CallTable(this); conversation = new ConversationTable(this); avatar = new AvatarTable(this); entity_identity = new EntityIdentityTable(this); @@ -306,7 +326,7 @@ public class Database : Qlite.Database { mam_catchup = new MamCatchupTable(this); settings = new SettingsTable(this); conversation_settings = new ConversationSettingsTable(this); - init({ account, jid, entity, content_item, message, message_correction, real_jid, file_transfer, conversation, avatar, entity_identity, entity_feature, roster, mam_catchup, settings, conversation_settings }); + init({ account, jid, entity, content_item, message, message_correction, real_jid, file_transfer, call, conversation, avatar, entity_identity, entity_feature, roster, mam_catchup, settings, conversation_settings }); try { exec("PRAGMA journal_mode = WAL"); |