mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Use namespaced strings for Transport IDs
This commit is contained in:
@@ -49,20 +49,17 @@ import static java.util.logging.Level.INFO;
|
||||
import static java.util.logging.Level.WARNING;
|
||||
import static javax.bluetooth.DiscoveryAgent.GIAC;
|
||||
import static org.briarproject.api.keyagreement.KeyAgreementConstants.TRANSPORT_ID_BLUETOOTH;
|
||||
import static org.briarproject.api.plugins.BluetoothConstants.ID;
|
||||
import static org.briarproject.api.plugins.BluetoothConstants.PROP_ADDRESS;
|
||||
import static org.briarproject.api.plugins.BluetoothConstants.PROP_UUID;
|
||||
import static org.briarproject.api.plugins.BluetoothConstants.UUID_BYTES;
|
||||
|
||||
@MethodsNotNullByDefault
|
||||
@ParametersNotNullByDefault
|
||||
class BluetoothPlugin implements DuplexPlugin {
|
||||
|
||||
// Share an ID with the Android Bluetooth plugin
|
||||
static final TransportId ID = new TransportId("bt");
|
||||
|
||||
private static final Logger LOG =
|
||||
Logger.getLogger(BluetoothPlugin.class.getName());
|
||||
private static final int UUID_BYTES = 16;
|
||||
|
||||
private static final String PROP_ADDRESS = "address";
|
||||
private static final String PROP_UUID = "uuid";
|
||||
|
||||
private final Executor ioExecutor;
|
||||
private final SecureRandom secureRandom;
|
||||
@@ -507,7 +504,7 @@ class BluetoothPlugin implements DuplexPlugin {
|
||||
|
||||
private final StreamConnectionNotifier ss;
|
||||
|
||||
BluetoothKeyAgreementListener(BdfList descriptor,
|
||||
private BluetoothKeyAgreementListener(BdfList descriptor,
|
||||
StreamConnectionNotifier ss) {
|
||||
super(descriptor);
|
||||
this.ss = ss;
|
||||
|
||||
@@ -10,6 +10,8 @@ import org.briarproject.api.plugins.duplex.DuplexPluginFactory;
|
||||
import java.security.SecureRandom;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import static org.briarproject.api.plugins.BluetoothConstants.ID;
|
||||
|
||||
public class BluetoothPluginFactory implements DuplexPluginFactory {
|
||||
|
||||
private static final int MAX_LATENCY = 30 * 1000; // 30 seconds
|
||||
@@ -30,7 +32,7 @@ public class BluetoothPluginFactory implements DuplexPluginFactory {
|
||||
|
||||
@Override
|
||||
public TransportId getId() {
|
||||
return BluetoothPlugin.ID;
|
||||
return ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,8 @@ import static java.util.logging.Level.WARNING;
|
||||
class RemovableDrivePlugin extends FilePlugin
|
||||
implements RemovableDriveMonitor.Callback {
|
||||
|
||||
static final TransportId ID = new TransportId("file");
|
||||
static final TransportId ID =
|
||||
new TransportId("org.briarproject.bramble.file");
|
||||
|
||||
private static final Logger LOG =
|
||||
Logger.getLogger(RemovableDrivePlugin.class.getName());
|
||||
|
||||
@@ -28,7 +28,8 @@ import static java.util.logging.Level.WARNING;
|
||||
@ParametersNotNullByDefault
|
||||
class ModemPlugin implements DuplexPlugin, Modem.Callback {
|
||||
|
||||
static final TransportId ID = new TransportId("modem");
|
||||
static final TransportId ID =
|
||||
new TransportId("org.briarproject.bramble.modem");
|
||||
|
||||
private static final Logger LOG =
|
||||
Logger.getLogger(ModemPlugin.class.getName());
|
||||
|
||||
Reference in New Issue
Block a user