Store settings in the DB, listen for events when settings are updated.

This commit is contained in:
akwizgran
2014-03-10 17:59:13 +00:00
parent abaf1d7e96
commit d151633a60
9 changed files with 187 additions and 56 deletions

View File

@@ -9,6 +9,7 @@ import org.briarproject.api.AuthorId;
import org.briarproject.api.Contact;
import org.briarproject.api.ContactId;
import org.briarproject.api.LocalAuthor;
import org.briarproject.api.Settings;
import org.briarproject.api.TransportConfig;
import org.briarproject.api.TransportId;
import org.briarproject.api.TransportProperties;
@@ -233,6 +234,9 @@ public interface DatabaseComponent {
/** Returns all temporary secrets. */
Collection<TemporarySecret> getSecrets() throws DbException;
/** Returns all settings. */
Settings getSettings() throws DbException;
/** Returns the maximum latencies of all local transports. */
Map<TransportId, Long> getTransportLatencies() throws DbException;
@@ -263,6 +267,9 @@ public interface DatabaseComponent {
void mergeLocalProperties(TransportId t, TransportProperties p)
throws DbException;
/** Merges the given settings with the existing settings. */
void mergeSettings(Settings s) throws DbException;
/** Processes an ack from the given contact. */
void receiveAck(ContactId c, Ack a) throws DbException;