mirror of
https://github.com/developersu/ns-usbloader.git
synced 2025-05-13 14:44:48 -04:00
v0.2-development intermediate results. Almost ready.
This commit is contained in:
parent
ad23eb0c82
commit
c4d0959cf3
14 changed files with 405 additions and 293 deletions
|
@ -1,7 +1,9 @@
|
|||
package nsusbloader;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
class MediatorControl {
|
||||
private boolean isTransferActive = false;
|
||||
private AtomicBoolean isTransferActive = new AtomicBoolean(false); // Overcoded just for sure
|
||||
private NSLMainController applicationController;
|
||||
|
||||
static MediatorControl getInstance(){
|
||||
|
@ -11,15 +13,14 @@ class MediatorControl {
|
|||
private static class MediatorControlHold {
|
||||
private static final MediatorControl INSTANCE = new MediatorControl();
|
||||
}
|
||||
void registerController(NSLMainController controller){
|
||||
void setController(NSLMainController controller){
|
||||
this.applicationController = controller;
|
||||
}
|
||||
NSLMainController getContoller(){ return this.applicationController; }
|
||||
|
||||
synchronized void setTransferActive(boolean state) {
|
||||
isTransferActive = state;
|
||||
isTransferActive.set(state);
|
||||
applicationController.notifyTransmissionStarted(state);
|
||||
}
|
||||
synchronized boolean getTransferActive() {
|
||||
return this.isTransferActive;
|
||||
}
|
||||
synchronized boolean getTransferActive() { return this.isTransferActive.get(); }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue