Move part of exec.mimis into core.mimis, correct most compile errors
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
dependencies {
|
||||
compile project(':core.legacy')
|
||||
compile project(':core.mimis')
|
||||
compile project(':device.lirc')
|
||||
compile project(':exec.mimis')
|
||||
|
||||
compile 'com.esotericsoftware.yamlbeans:yamlbeans:1.09'
|
||||
|
||||
@@ -19,9 +19,8 @@ package extra;
|
||||
import map.DenonRC176EventMap;
|
||||
import map.PhiliphsRCLE011EventMap;
|
||||
import map.SamsungBN5901015AEventMap;
|
||||
|
||||
import com.github.boukefalos.lirc.state.TaskMap;
|
||||
import com.github.boukefalos.lirc.state.TaskMapCycle;
|
||||
import mimis.state.TaskMap;
|
||||
import mimis.state.TaskMapCycle;
|
||||
|
||||
public class LircTaskMapCycle extends TaskMapCycle {
|
||||
protected static final long serialVersionUID = 1L;
|
||||
@@ -29,8 +28,8 @@ public class LircTaskMapCycle extends TaskMapCycle {
|
||||
public TaskMap denonRC176, philiphsRCLE011, samsungBN5901015A;
|
||||
|
||||
public LircTaskMapCycle() {
|
||||
register(denonRC176 = new DenonRC176EventMap());
|
||||
register(philiphsRCLE011 = new PhiliphsRCLE011EventMap());
|
||||
register(samsungBN5901015A = new SamsungBN5901015AEventMap());
|
||||
add(denonRC176 = new DenonRC176EventMap());
|
||||
add(philiphsRCLE011 = new PhiliphsRCLE011EventMap());
|
||||
add(samsungBN5901015A = new SamsungBN5901015AEventMap());
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
/**
|
||||
* Copyright (C) 2015 Rik Veenboer <rik.veenboer@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package extra;
|
||||
|
||||
import mimis.input.Input;
|
||||
import mimis.value.Action;
|
||||
import mimis.value.Signal;
|
||||
import mimis.value.Target;
|
||||
|
||||
public class Task implements Input {
|
||||
protected static final long serialVersionUID = 1L;
|
||||
|
||||
public static final Target TARGET = Target.ALL;
|
||||
public static final Signal SIGNAL = Signal.NONE;
|
||||
|
||||
protected Target target;
|
||||
protected Action action;
|
||||
protected Signal signal;
|
||||
|
||||
public Task(Action action) {
|
||||
this(action, TARGET);
|
||||
}
|
||||
|
||||
public Task(Action action, Target target) {
|
||||
this(action, target, SIGNAL);
|
||||
}
|
||||
|
||||
public Task(Action action, Target target, Signal signal) {
|
||||
this.target = target;
|
||||
this.action = action;
|
||||
this.signal = signal;
|
||||
}
|
||||
|
||||
public Target getTarget() {
|
||||
return target;
|
||||
}
|
||||
|
||||
public Action getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public Signal getSignal() {
|
||||
return signal;
|
||||
}
|
||||
|
||||
public Task setSignal(Signal signal) {
|
||||
return new Task(action, target, signal);
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ package map;
|
||||
|
||||
import com.github.boukefalos.lirc.button.remote.DenonRC176Button;
|
||||
|
||||
import extra.Task;
|
||||
import mimis.input.Task;
|
||||
import mimis.state.TaskMap;
|
||||
import mimis.value.Action;
|
||||
import mimis.value.Target;
|
||||
@@ -28,23 +28,23 @@ public class DenonRC176EventMap extends TaskMap {
|
||||
|
||||
public DenonRC176EventMap() {
|
||||
/* Mimis */
|
||||
receive(DenonRC176Button.TUNER_UP, new Task(Action.NEXT, Target.MAIN));
|
||||
receive(DenonRC176Button.TUNER_DOWN, new Task(Action.PREVIOUS, Target.MAIN));
|
||||
add(DenonRC176Button.TUNER_UP, new Task(Action.NEXT, Target.MAIN));
|
||||
add(DenonRC176Button.TUNER_DOWN, new Task(Action.PREVIOUS, Target.MAIN));
|
||||
|
||||
/* Application */
|
||||
receive(DenonRC176Button.AMP_POWER, new Task(Action.START, Target.CURRENT));
|
||||
receive(DenonRC176Button.CD_NEXT, new Task(Action.NEXT, Target.CURRENT));
|
||||
receive(DenonRC176Button.CD_PREVIOUS, new Task(Action.PREVIOUS, Target.CURRENT));
|
||||
receive(DenonRC176Button.TAPE_REWIND, new Task(Action.REWIND, Target.CURRENT));
|
||||
receive(DenonRC176Button.CD_PLAY, new Task(Action.PLAY, Target.CURRENT));
|
||||
receive(DenonRC176Button.CD_PAUSE, new Task(Action.PLAY, Target.CURRENT));
|
||||
receive(DenonRC176Button.TAPE_FORWARD, new Task(Action.FORWARD, Target.CURRENT));
|
||||
receive(DenonRC176Button.AMP_MUTE, new Task(Action.MUTE, Target.CURRENT));
|
||||
receive(DenonRC176Button.AMP_VOLUME_UP, new Task(Action.VOLUME_UP, Target.CURRENT));
|
||||
receive(DenonRC176Button.AMP_VOLUME_DOWN, new Task(Action.VOLUME_DOWN, Target.CURRENT));
|
||||
receive(DenonRC176Button.CD_REPEAT, new Task(Action.REPEAT, Target.CURRENT));
|
||||
receive(DenonRC176Button.CD_SHUFFLE, new Task(Action.SHUFFLE, Target.CURRENT));
|
||||
receive(DenonRC176Button.TAPE_AB, new Task(Action.LIKE, Target.CURRENT));
|
||||
receive(DenonRC176Button.TAPE_REC, new Task(Action.DISLIKE, Target.CURRENT));
|
||||
add(DenonRC176Button.AMP_POWER, new Task(Action.START, Target.CURRENT));
|
||||
add(DenonRC176Button.CD_NEXT, new Task(Action.NEXT, Target.CURRENT));
|
||||
add(DenonRC176Button.CD_PREVIOUS, new Task(Action.PREVIOUS, Target.CURRENT));
|
||||
add(DenonRC176Button.TAPE_REWIND, new Task(Action.REWIND, Target.CURRENT));
|
||||
add(DenonRC176Button.CD_PLAY, new Task(Action.PLAY, Target.CURRENT));
|
||||
add(DenonRC176Button.CD_PAUSE, new Task(Action.PLAY, Target.CURRENT));
|
||||
add(DenonRC176Button.TAPE_FORWARD, new Task(Action.FORWARD, Target.CURRENT));
|
||||
add(DenonRC176Button.AMP_MUTE, new Task(Action.MUTE, Target.CURRENT));
|
||||
add(DenonRC176Button.AMP_VOLUME_UP, new Task(Action.VOLUME_UP, Target.CURRENT));
|
||||
add(DenonRC176Button.AMP_VOLUME_DOWN, new Task(Action.VOLUME_DOWN, Target.CURRENT));
|
||||
add(DenonRC176Button.CD_REPEAT, new Task(Action.REPEAT, Target.CURRENT));
|
||||
add(DenonRC176Button.CD_SHUFFLE, new Task(Action.SHUFFLE, Target.CURRENT));
|
||||
add(DenonRC176Button.TAPE_AB, new Task(Action.LIKE, Target.CURRENT));
|
||||
add(DenonRC176Button.TAPE_REC, new Task(Action.DISLIKE, Target.CURRENT));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,34 +17,34 @@
|
||||
package map;
|
||||
|
||||
import com.github.boukefalos.lirc.button.remote.PhiliphsRCLE011Button;
|
||||
import com.github.boukefalos.lirc.state.TaskMap;
|
||||
import com.github.boukefalos.lirc.value.Action;
|
||||
import com.github.boukefalos.lirc.value.Target;
|
||||
|
||||
import extra.Task;
|
||||
import mimis.input.Task;
|
||||
import mimis.state.TaskMap;
|
||||
import mimis.value.Action;
|
||||
import mimis.value.Target;
|
||||
|
||||
public class PhiliphsRCLE011EventMap extends TaskMap {
|
||||
protected static final long serialVersionUID = 1L;
|
||||
|
||||
public PhiliphsRCLE011EventMap() {
|
||||
/* Mimis */
|
||||
receive(PhiliphsRCLE011Button.UP, new Task(Action.NEXT, Target.MAIN));
|
||||
receive(PhiliphsRCLE011Button.DOWN, new Task(Action.PREVIOUS, Target.MAIN));
|
||||
add(PhiliphsRCLE011Button.UP, new Task(Action.NEXT, Target.MAIN));
|
||||
add(PhiliphsRCLE011Button.DOWN, new Task(Action.PREVIOUS, Target.MAIN));
|
||||
|
||||
/* Application */
|
||||
receive(PhiliphsRCLE011Button.POWER, new Task(Action.START, Target.CURRENT));
|
||||
receive(PhiliphsRCLE011Button.PROGRAM_UP, new Task(Action.NEXT, Target.CURRENT));
|
||||
receive(PhiliphsRCLE011Button.PROGRAM_DOWN, new Task(Action.PREVIOUS, Target.CURRENT));
|
||||
receive(PhiliphsRCLE011Button.LEFT, new Task(Action.REWIND, Target.CURRENT));
|
||||
receive(PhiliphsRCLE011Button.TUNE, new Task(Action.PLAY, Target.CURRENT));
|
||||
receive(PhiliphsRCLE011Button.RIGHT, new Task(Action.FORWARD, Target.CURRENT));
|
||||
receive(PhiliphsRCLE011Button.VOLUME_DOWN, new Task(Action.VOLUME_DOWN, Target.CURRENT));
|
||||
receive(PhiliphsRCLE011Button.MUTE, new Task(Action.MUTE, Target.CURRENT));
|
||||
receive(PhiliphsRCLE011Button.VOLUME_UP, new Task(Action.VOLUME_UP, Target.CURRENT));
|
||||
receive(PhiliphsRCLE011Button.CLOCK, new Task(Action.REPEAT, Target.CURRENT));
|
||||
receive(PhiliphsRCLE011Button.OUT, new Task(Action.SHUFFLE, Target.CURRENT));
|
||||
receive(PhiliphsRCLE011Button.SQUARE, new Task(Action.FULLSCREEN, Target.CURRENT));
|
||||
receive(PhiliphsRCLE011Button.RED, new Task(Action.DISLIKE, Target.CURRENT));
|
||||
receive(PhiliphsRCLE011Button.GREEN, new Task(Action.LIKE, Target.CURRENT));
|
||||
add(PhiliphsRCLE011Button.POWER, new Task(Action.START, Target.CURRENT));
|
||||
add(PhiliphsRCLE011Button.PROGRAM_UP, new Task(Action.NEXT, Target.CURRENT));
|
||||
add(PhiliphsRCLE011Button.PROGRAM_DOWN, new Task(Action.PREVIOUS, Target.CURRENT));
|
||||
add(PhiliphsRCLE011Button.LEFT, new Task(Action.REWIND, Target.CURRENT));
|
||||
add(PhiliphsRCLE011Button.TUNE, new Task(Action.PLAY, Target.CURRENT));
|
||||
add(PhiliphsRCLE011Button.RIGHT, new Task(Action.FORWARD, Target.CURRENT));
|
||||
add(PhiliphsRCLE011Button.VOLUME_DOWN, new Task(Action.VOLUME_DOWN, Target.CURRENT));
|
||||
add(PhiliphsRCLE011Button.MUTE, new Task(Action.MUTE, Target.CURRENT));
|
||||
add(PhiliphsRCLE011Button.VOLUME_UP, new Task(Action.VOLUME_UP, Target.CURRENT));
|
||||
add(PhiliphsRCLE011Button.CLOCK, new Task(Action.REPEAT, Target.CURRENT));
|
||||
add(PhiliphsRCLE011Button.OUT, new Task(Action.SHUFFLE, Target.CURRENT));
|
||||
add(PhiliphsRCLE011Button.SQUARE, new Task(Action.FULLSCREEN, Target.CURRENT));
|
||||
add(PhiliphsRCLE011Button.RED, new Task(Action.DISLIKE, Target.CURRENT));
|
||||
add(PhiliphsRCLE011Button.GREEN, new Task(Action.LIKE, Target.CURRENT));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,16 +17,16 @@
|
||||
package map;
|
||||
|
||||
import com.github.boukefalos.lirc.button.remote.SamsungBN5901015AButton;
|
||||
import com.github.boukefalos.lirc.state.TaskMap;
|
||||
import com.github.boukefalos.lirc.value.Action;
|
||||
import com.github.boukefalos.lirc.value.Target;
|
||||
|
||||
import extra.Task;
|
||||
import mimis.input.Task;
|
||||
import mimis.state.TaskMap;
|
||||
import mimis.value.Action;
|
||||
import mimis.value.Target;
|
||||
|
||||
public class SamsungBN5901015AEventMap extends TaskMap {
|
||||
protected static final long serialVersionUID = 1L;
|
||||
|
||||
public SamsungBN5901015AEventMap() {
|
||||
receive(SamsungBN5901015AButton.VOLUME_UP, new Task(Action.VOLUME_UP, Target.CURRENT));
|
||||
add(SamsungBN5901015AButton.VOLUME_UP, new Task(Action.VOLUME_UP, Target.CURRENT));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user