mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Don't store subscription or transport updates that are older than those already received. Also some small changes to DatabaseComponent impls for readability.
This commit is contained in:
@@ -51,7 +51,8 @@ public interface DatabaseComponent {
|
||||
* Generates a bundle of acknowledgements, subscriptions, and batches of
|
||||
* messages for the given contact.
|
||||
*/
|
||||
void generateBundle(ContactId c, BundleWriter bundleBuilder) throws DbException, IOException, GeneralSecurityException;
|
||||
void generateBundle(ContactId c, BundleWriter bundleBuilder)
|
||||
throws DbException, IOException, GeneralSecurityException;
|
||||
|
||||
/** Returns the IDs of all contacts. */
|
||||
Set<ContactId> getContacts() throws DbException;
|
||||
@@ -73,7 +74,8 @@ public interface DatabaseComponent {
|
||||
* messages received from the given contact. Some or all of the messages
|
||||
* in the bundle may be stored.
|
||||
*/
|
||||
void receiveBundle(ContactId c, BundleReader b) throws DbException, IOException, GeneralSecurityException;
|
||||
void receiveBundle(ContactId c, BundleReader b) throws DbException,
|
||||
IOException, GeneralSecurityException;
|
||||
|
||||
/** Removes a contact (and all associated state) from the database. */
|
||||
void removeContact(ContactId c) throws DbException;
|
||||
@@ -81,12 +83,6 @@ public interface DatabaseComponent {
|
||||
/** Records the user's rating for the given author. */
|
||||
void setRating(AuthorId a, Rating r) throws DbException;
|
||||
|
||||
/**
|
||||
* Records the transport details for the given contact, replacing any
|
||||
* existing transport details.
|
||||
*/
|
||||
void setTransports(ContactId c, Map<String, String> transports) throws DbException;
|
||||
|
||||
/** Subscribes to the given group. */
|
||||
void subscribe(GroupId g) throws DbException;
|
||||
|
||||
|
||||
@@ -5,5 +5,6 @@ import java.security.GeneralSecurityException;
|
||||
|
||||
public interface MessageParser {
|
||||
|
||||
Message parseMessage(byte[] raw) throws IOException, GeneralSecurityException;
|
||||
Message parseMessage(byte[] raw) throws IOException,
|
||||
GeneralSecurityException;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user