mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Expose serialisation overhead without breaking encapsulation.
This commit is contained in:
@@ -5,9 +5,6 @@ import java.util.Collection;
|
||||
/** A packet acknowledging receipt of one or more batches. */
|
||||
public interface Ack {
|
||||
|
||||
/** The maximum number of batch IDs per ack. */
|
||||
static final int MAX_IDS_PER_ACK = 29959;
|
||||
|
||||
/** Returns the IDs of the acknowledged batches. */
|
||||
Collection<BatchId> getBatchIds();
|
||||
}
|
||||
|
||||
@@ -5,9 +5,6 @@ import java.util.Collection;
|
||||
/** A packet offering the recipient some messages. */
|
||||
public interface Offer {
|
||||
|
||||
/** The maximum number of message IDs per offer. */
|
||||
static final int MAX_IDS_PER_OFFER = 29959;
|
||||
|
||||
/** Returns the message IDs contained in the offer. */
|
||||
Collection<MessageId> getMessageIds();
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import java.util.Map;
|
||||
public interface SubscriptionUpdate {
|
||||
|
||||
/** The maximum number of subscriptions per update. */
|
||||
static final int MAX_SUBS_PER_UPDATE = 6393;
|
||||
static final int MAX_SUBS_PER_UPDATE = 6000;
|
||||
|
||||
/** Returns the subscriptions contained in the update. */
|
||||
Map<Group, Long> getSubscriptions();
|
||||
|
||||
12
api/net/sf/briar/api/serial/SerialComponent.java
Normal file
12
api/net/sf/briar/api/serial/SerialComponent.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package net.sf.briar.api.serial;
|
||||
|
||||
public interface SerialComponent {
|
||||
|
||||
int getSerialisedListEndLength();
|
||||
|
||||
int getSerialisedListStartLength();
|
||||
|
||||
int getSerialisedUniqueIdLength(int id);
|
||||
|
||||
int getSerialisedUserDefinedIdLength(int id);
|
||||
}
|
||||
Reference in New Issue
Block a user