mirror of
https://github.com/developersu/ns-usbloader.git
synced 2025-05-17 08:35:06 -04:00
A lot of small updates. Finishing split-merge functions.
This commit is contained in:
parent
ca061cd1f2
commit
3d3fb56f9e
16 changed files with 416 additions and 266 deletions
src/main/java/nsusbloader
|
@ -1,12 +1,13 @@
|
|||
package nsusbloader;
|
||||
|
||||
import nsusbloader.Controllers.NSLMainController;
|
||||
import nsusbloader.NSLDataTypes.EModule;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
public class MediatorControl {
|
||||
private AtomicBoolean isTransferActive = new AtomicBoolean(false); // Overcoded just for sure
|
||||
private NSLMainController applicationController;
|
||||
private NSLMainController mainCtrler;
|
||||
|
||||
public static MediatorControl getInstance(){
|
||||
return MediatorControlHold.INSTANCE;
|
||||
|
@ -16,13 +17,14 @@ public class MediatorControl {
|
|||
private static final MediatorControl INSTANCE = new MediatorControl();
|
||||
}
|
||||
public void setController(NSLMainController controller){
|
||||
this.applicationController = controller;
|
||||
this.mainCtrler = controller;
|
||||
}
|
||||
public NSLMainController getContoller(){ return this.applicationController; }
|
||||
public NSLMainController getContoller(){ return this.mainCtrler; }
|
||||
|
||||
public synchronized void setTransferActive(boolean state) {
|
||||
isTransferActive.set(state);
|
||||
applicationController.getFrontCtrlr().notifyTransmissionStarted(state);
|
||||
public synchronized void setBgThreadActive(boolean isActive, EModule appModuleType) {
|
||||
isTransferActive.set(isActive);
|
||||
mainCtrler.getFrontCtrlr().notifyTransmThreadStarted(isActive, appModuleType);
|
||||
mainCtrler.getSmCtrlr().notifySmThreadStarted(isActive, appModuleType);
|
||||
}
|
||||
public synchronized boolean getTransferActive() { return this.isTransferActive.get(); }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue