diff options
author | fiaxh <git@lightrise.org> | 2021-04-08 12:07:04 +0200 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2021-04-09 22:23:13 +0200 |
commit | 8d1c6c29be7018c74ec3f8ea05f5849eac5b4069 (patch) | |
tree | dde27c13cd0ae8af31b9194b3450c58d4fe9cf02 /libdino/src/entity/call.vala | |
parent | 3454201e5a3da058ccbef0bbaf467599912a8c38 (diff) | |
download | dino-8d1c6c29be7018c74ec3f8ea05f5849eac5b4069.tar.gz dino-8d1c6c29be7018c74ec3f8ea05f5849eac5b4069.zip |
Display+store call encryption info
Diffstat (limited to 'libdino/src/entity/call.vala')
-rw-r--r-- | libdino/src/entity/call.vala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libdino/src/entity/call.vala b/libdino/src/entity/call.vala index 7891dae7..577b3ab8 100644 --- a/libdino/src/entity/call.vala +++ b/libdino/src/entity/call.vala @@ -32,6 +32,7 @@ namespace Dino.Entities { public DateTime time { get; set; } public DateTime local_time { get; set; } public DateTime end_time { get; set; } + public Encryption encryption { get; set; default=Encryption.NONE; } public State state { get; set; } @@ -57,6 +58,7 @@ namespace Dino.Entities { time = new DateTime.from_unix_utc(row[db.call.time]); local_time = new DateTime.from_unix_utc(row[db.call.local_time]); end_time = new DateTime.from_unix_utc(row[db.call.end_time]); + encryption = (Encryption) row[db.call.encryption]; state = (State) row[db.call.state]; notify.connect(on_update); @@ -74,6 +76,7 @@ namespace Dino.Entities { .value(db.call.direction, direction) .value(db.call.time, (long) time.to_unix()) .value(db.call.local_time, (long) local_time.to_unix()) + .value(db.call.encryption, encryption) .value(db.call.state, State.ENDED); // No point in persisting states that can't survive a restart if (end_time != null) { builder.value(db.call.end_time, (long) end_time.to_unix()); @@ -116,6 +119,8 @@ namespace Dino.Entities { update_builder.set(db.call.local_time, (long) local_time.to_unix()); break; case "end-time": update_builder.set(db.call.end_time, (long) end_time.to_unix()); break; + case "encryption": + update_builder.set(db.call.encryption, encryption); break; case "state": // No point in persisting states that can't survive a restart if (state == State.RINGING || state == State.ESTABLISHING || state == State.IN_PROGRESS) return; |