mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Create two new events to signal enabling and disabling of transports
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package org.briarproject.api.event;
|
||||
|
||||
import org.briarproject.api.TransportId;
|
||||
|
||||
/** An event that is broadcast when a transport is disabled. */
|
||||
public class TransportDisabledEvent extends Event {
|
||||
|
||||
private final TransportId transportId;
|
||||
|
||||
public TransportDisabledEvent(TransportId transportId) {
|
||||
this.transportId = transportId;
|
||||
}
|
||||
|
||||
public TransportId getTransportId() {
|
||||
return transportId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package org.briarproject.api.event;
|
||||
|
||||
import org.briarproject.api.TransportId;
|
||||
|
||||
/** An event that is broadcast when a transport is enabled. */
|
||||
public class TransportEnabledEvent extends Event {
|
||||
|
||||
private final TransportId transportId;
|
||||
|
||||
public TransportEnabledEvent(TransportId transportId) {
|
||||
this.transportId = transportId;
|
||||
}
|
||||
|
||||
public TransportId getTransportId() {
|
||||
return transportId;
|
||||
}
|
||||
}
|
||||
@@ -50,6 +50,9 @@ public interface PluginCallback {
|
||||
*/
|
||||
void showMessage(String... message);
|
||||
|
||||
/** Schedules the plugin to be polled immediately. */
|
||||
void pollNow();
|
||||
/** Signal that the transport got enabled. */
|
||||
void transportEnabled();
|
||||
|
||||
/** Signal that the transport got disabled. */
|
||||
void transportDisabled();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user