Add a DB method for checking whether transport keys exist.

This commit is contained in:
akwizgran
2021-05-19 10:42:17 +01:00
committed by Torsten Grote
parent b3c105bfa7
commit c0f5023b63
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,