mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Allow Validator to access metadata for pending messages
Database queries for metadata only returned it for messages that were delivered already. However, there are cases (e.g. a pending message needs to be delivered) where the validator needs to retrieve the metadata from the database. For these cases, a special database query has been introduced.
This commit is contained in:
@@ -262,7 +262,7 @@ public interface DatabaseComponent {
|
||||
byte[] getRawMessage(Transaction txn, MessageId m) throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the metadata for all messages in the given group.
|
||||
* Returns the metadata for all delivered messages in the given group.
|
||||
* <p/>
|
||||
* Read-only.
|
||||
*/
|
||||
@@ -280,13 +280,22 @@ public interface DatabaseComponent {
|
||||
Metadata query) throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the metadata for the given message.
|
||||
* Returns the metadata for the given delivered message.
|
||||
* <p/>
|
||||
* Read-only.
|
||||
*/
|
||||
Metadata getMessageMetadata(Transaction txn, MessageId m)
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the metadata for the given delivered and pending message.
|
||||
* This is meant to be only used by the ValidationManager
|
||||
* <p/>
|
||||
* Read-only.
|
||||
*/
|
||||
Metadata getMessageMetadataForValidator(Transaction txn, MessageId m)
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the status of all messages in the given group with respect to
|
||||
* the given contact.
|
||||
|
||||
Reference in New Issue
Block a user