mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 11:49:04 +01:00
Hook up MessagingManager to MessageInputStreamFactory.
This commit is contained in:
@@ -1,11 +1,21 @@
|
||||
package org.briarproject.bramble.api.io;
|
||||
|
||||
import org.briarproject.bramble.api.db.DbException;
|
||||
import org.briarproject.bramble.api.db.NoSuchBlockException;
|
||||
import org.briarproject.bramble.api.sync.MessageId;
|
||||
|
||||
public interface BlockSource {
|
||||
|
||||
/**
|
||||
* Returns the number of blocks in the given message.
|
||||
*/
|
||||
int getBlockCount(MessageId m) throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the given block of the given message.
|
||||
*
|
||||
* @throws NoSuchBlockException if 'blockNumber' is greater than or equal
|
||||
* to the number of blocks in the message
|
||||
*/
|
||||
byte[] getBlock(MessageId m, int blockNumber) throws DbException;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user