Merge branch '2013-db-method-for-amount-of-data-to-sync' into '1802-sync-via-removable-storage'

Add DB method for getting amount of data to sync

See merge request briar/briar!1452
This commit is contained in:
akwizgran
2021-05-10 12:00:11 +00:00
6 changed files with 98 additions and 8 deletions

View File

@@ -292,6 +292,16 @@ public interface DatabaseComponent extends TransactionManager {
*/
Message getMessage(Transaction txn, MessageId m) throws DbException;
/**
* Returns the total length, including headers, of any messages that are
* eligible to be sent to the given contact via a transport with the given
* max latency.
* <p/>
* Read-only.
*/
long getMessageBytesToSend(Transaction txn, ContactId c, int maxLatency)
throws DbException;
/**
* Returns the IDs of all delivered messages in the given group.
* <p/>