Add a DB method for checking whether transport keys exist.

This commit is contained in:
akwizgran
2021-05-19 10:42:17 +01:00
parent 2ac3bdd3ae
commit ee6f571c31
5 changed files with 54 additions and 0 deletions

View File

@@ -150,6 +150,16 @@ public interface DatabaseComponent extends TransactionManager {
boolean containsPendingContact(Transaction txn, PendingContactId p)
throws DbException;
/**
* Returns true if the database contains keys for communicating with the
* given contact over the given transport. Handshake mode and rotation mode
* keys are included, whether activated or not.
* <p/>
* Read-only.
*/
boolean containsTransportKeys(Transaction txn, ContactId c, TransportId t)
throws DbException;
/**
* Deletes the message with the given ID. Unlike
* {@link #removeMessage(Transaction, MessageId)}, the message ID,