mirror of
https://github.com/developersu/ns-usbloader.git
synced 2025-05-09 13:52:02 -04:00
25 lines
741 B
Java
25 lines
741 B
Java
package nsusbloader;
|
|
|
|
class MediatorControl {
|
|
private boolean isTransferActive = false;
|
|
private NSLMainController applicationController;
|
|
|
|
static MediatorControl getInstance(){
|
|
return MediatorControlHold.INSTANCE;
|
|
}
|
|
|
|
private static class MediatorControlHold {
|
|
private static final MediatorControl INSTANCE = new MediatorControl();
|
|
}
|
|
void registerController(NSLMainController controller){
|
|
this.applicationController = controller;
|
|
}
|
|
|
|
synchronized void setTransferActive(boolean state) {
|
|
isTransferActive = state;
|
|
applicationController.notifyTransmissionStarted(state);
|
|
}
|
|
synchronized boolean getTransferActive() {
|
|
return this.isTransferActive;
|
|
}
|
|
}
|