mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Removed TransportUpdate and TransportAck.
This commit is contained in:
@@ -23,10 +23,4 @@ public interface PacketReader {
|
||||
|
||||
boolean hasSubscriptionUpdate() throws IOException;
|
||||
SubscriptionUpdate readSubscriptionUpdate() throws IOException;
|
||||
|
||||
boolean hasTransportAck() throws IOException;
|
||||
TransportAck readTransportAck() throws IOException;
|
||||
|
||||
boolean hasTransportUpdate() throws IOException;
|
||||
TransportUpdate readTransportUpdate() throws IOException;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,4 @@ public interface PacketTypes {
|
||||
byte REQUEST = 3;
|
||||
byte SUBSCRIPTION_ACK = 6;
|
||||
byte SUBSCRIPTION_UPDATE = 7;
|
||||
byte TRANSPORT_ACK = 8;
|
||||
byte TRANSPORT_UPDATE = 9;
|
||||
}
|
||||
|
||||
@@ -22,9 +22,5 @@ public interface PacketWriter {
|
||||
|
||||
void writeSubscriptionUpdate(SubscriptionUpdate u) throws IOException;
|
||||
|
||||
void writeTransportAck(TransportAck a) throws IOException;
|
||||
|
||||
void writeTransportUpdate(TransportUpdate u) throws IOException;
|
||||
|
||||
void flush() throws IOException;
|
||||
}
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
package org.briarproject.api.sync;
|
||||
|
||||
import org.briarproject.api.TransportId;
|
||||
|
||||
/** A packet acknowledging a {@link TransportUpdate}. */
|
||||
public class TransportAck {
|
||||
|
||||
private final TransportId id;
|
||||
private final long version;
|
||||
|
||||
public TransportAck(TransportId id, long version) {
|
||||
this.id = id;
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
/** Returns the identifier of the updated transport. */
|
||||
public TransportId getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/** Returns the version number of the acknowledged update. */
|
||||
public long getVersion() {
|
||||
return version;
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package org.briarproject.api.sync;
|
||||
|
||||
import org.briarproject.api.TransportId;
|
||||
import org.briarproject.api.TransportProperties;
|
||||
|
||||
/**
|
||||
* A packet updating the recipient's view of the sender's transport properties.
|
||||
*/
|
||||
public class TransportUpdate {
|
||||
|
||||
private final TransportId id;
|
||||
private final TransportProperties properties;
|
||||
private final long version;
|
||||
|
||||
public TransportUpdate(TransportId id, TransportProperties properties,
|
||||
long version) {
|
||||
this.id = id;
|
||||
this.properties = properties;
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
/** Returns the identifier of the updated transport. */
|
||||
public TransportId getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/** Returns the transport's updated properties. */
|
||||
public TransportProperties getProperties() {
|
||||
return properties;
|
||||
}
|
||||
|
||||
/** Returns the update's version number. */
|
||||
public long getVersion() {
|
||||
return version;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user