Encode transport properties more compactly in QR codes.

This commit is contained in:
akwizgran
2016-11-07 16:25:30 +00:00
parent 7327029fca
commit 04d4ecad05
20 changed files with 326 additions and 168 deletions

View File

@@ -1,21 +1,26 @@
package org.briarproject.api.plugins;
import org.briarproject.api.TransportId;
import org.briarproject.api.nullsafety.NotNullByDefault;
import org.briarproject.api.plugins.duplex.DuplexPlugin;
import org.briarproject.api.plugins.simplex.SimplexPlugin;
import java.util.Collection;
import javax.annotation.Nullable;
/**
* Responsible for starting transport plugins at startup and stopping them at
* shutdown.
*/
@NotNullByDefault
public interface PluginManager {
/**
* Returns the plugin for the given transport, or null if no such plugin
* has been created.
*/
@Nullable
Plugin getPlugin(TransportId t);
/**

View File

@@ -2,8 +2,8 @@ package org.briarproject.api.plugins.duplex;
import org.briarproject.api.contact.ContactId;
import org.briarproject.api.crypto.PseudoRandom;
import org.briarproject.api.data.BdfList;
import org.briarproject.api.keyagreement.KeyAgreementListener;
import org.briarproject.api.keyagreement.TransportDescriptor;
import org.briarproject.api.plugins.Plugin;
/** An interface for transport plugins that support duplex communication. */
@@ -40,5 +40,5 @@ public interface DuplexPlugin extends Plugin {
* Returns null if no connection can be established within the given time.
*/
DuplexTransportConnection createKeyAgreementConnection(
byte[] remoteCommitment, TransportDescriptor d, long timeout);
byte[] remoteCommitment, BdfList descriptor, long timeout);
}