Return a connection context for outgoing connections (the secret will

be included in this context in the near future).
This commit is contained in:
akwizgran
2011-11-15 17:47:30 +00:00
parent fabdaf5957
commit d02a68edfc
13 changed files with 78 additions and 30 deletions

View File

@@ -28,6 +28,7 @@ import net.sf.briar.api.protocol.writers.OfferWriter;
import net.sf.briar.api.protocol.writers.RequestWriter;
import net.sf.briar.api.protocol.writers.SubscriptionUpdateWriter;
import net.sf.briar.api.protocol.writers.TransportUpdateWriter;
import net.sf.briar.api.transport.ConnectionContext;
import net.sf.briar.api.transport.ConnectionWindow;
/**
@@ -114,10 +115,11 @@ public interface DatabaseComponent {
TransportConfig getConfig(TransportId t) throws DbException;
/**
* Returns an outgoing connection number for the given contact and
* Returns an outgoing connection context for the given contact and
* transport.
*/
long getConnectionNumber(ContactId c, TransportIndex i) throws DbException;
ConnectionContext getConnectionContext(ContactId c, TransportIndex i)
throws DbException;
/**
* Returns the connection reordering window for the given contact and

View File

@@ -0,0 +1,10 @@
package net.sf.briar.api.transport;
import net.sf.briar.api.ContactId;
import net.sf.briar.api.protocol.TransportIndex;
public interface ConnectionContextFactory {
ConnectionContext createConnectionContext(ContactId c, TransportIndex i,
long connection);
}