mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Separated contact transports from secrets and cleaned up some tests.
This commit is contained in:
@@ -1,23 +1,33 @@
|
||||
package net.sf.briar.api;
|
||||
package net.sf.briar.api.db;
|
||||
|
||||
import net.sf.briar.api.ContactId;
|
||||
import net.sf.briar.api.protocol.TransportId;
|
||||
|
||||
public class ContactTransport extends TemporarySecret {
|
||||
public class ContactTransport {
|
||||
|
||||
private final ContactId contactId;
|
||||
private final TransportId transportId;
|
||||
private final long epoch, clockDiff, latency;
|
||||
private final boolean alice;
|
||||
|
||||
public ContactTransport(ContactId contactId, TransportId transportId,
|
||||
long epoch, long clockDiff, long latency, boolean alice,
|
||||
long period, byte[] secret, long outgoing, long centre,
|
||||
byte[] bitmap) {
|
||||
super(contactId, transportId, period, secret, outgoing, centre, bitmap);
|
||||
long epoch, long clockDiff, long latency, boolean alice) {
|
||||
this.contactId = contactId;
|
||||
this.transportId = transportId;
|
||||
this.epoch = epoch;
|
||||
this.clockDiff = clockDiff;
|
||||
this.latency = latency;
|
||||
this.alice = alice;
|
||||
}
|
||||
|
||||
public ContactId getContactId() {
|
||||
return contactId;
|
||||
}
|
||||
|
||||
public TransportId getTransportId() {
|
||||
return transportId;
|
||||
}
|
||||
|
||||
public long getEpoch() {
|
||||
return epoch;
|
||||
}
|
||||
@@ -5,9 +5,7 @@ import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sf.briar.api.ContactId;
|
||||
import net.sf.briar.api.ContactTransport;
|
||||
import net.sf.briar.api.Rating;
|
||||
import net.sf.briar.api.TemporarySecret;
|
||||
import net.sf.briar.api.TransportConfig;
|
||||
import net.sf.briar.api.TransportProperties;
|
||||
import net.sf.briar.api.db.event.DatabaseListener;
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
package net.sf.briar.api;
|
||||
package net.sf.briar.api.db;
|
||||
|
||||
import net.sf.briar.api.ContactId;
|
||||
import net.sf.briar.api.protocol.TransportId;
|
||||
|
||||
public class TemporarySecret {
|
||||
|
||||
protected final ContactId contactId;
|
||||
protected final TransportId transportId;
|
||||
protected final long period, outgoing, centre;
|
||||
protected final byte[] secret, bitmap;
|
||||
private final ContactId contactId;
|
||||
private final TransportId transportId;
|
||||
private final long period, outgoing, centre;
|
||||
private final byte[] secret, bitmap;
|
||||
|
||||
public TemporarySecret(ContactId contactId, TransportId transportId,
|
||||
long period, byte[] secret, long outgoing, long centre,
|
||||
Reference in New Issue
Block a user