mirror of
https://github.com/developersu/ns-usbloader.git
synced 2025-05-13 14:44:48 -04:00
Initial commit
This commit is contained in:
commit
c21417c043
20 changed files with 1904 additions and 0 deletions
25
src/main/java/nsusbloader/MediatorControl.java
Normal file
25
src/main/java/nsusbloader/MediatorControl.java
Normal file
|
@ -0,0 +1,25 @@
|
|||
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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue