Beispiel #1
0
 /**
  * This method does the pressKey for a list of commands with a given delay between the commands.
  *
  * @see com.comcast.cats.provider.RemoteProvider#pressKeys(java.util.List, java.lang.Integer)
  */
 @Override
 public boolean pressKeys(List<RemoteCommand> commands, Integer delay) {
   String commandStr = "";
   for (RemoteCommand command : commands) {
     commandStr = commandStr + "," + command.name();
   }
   return sleepOnTrue(irRest.pressKeys(keySet, commandStr, delay));
 }
Beispiel #2
0
 /**
  * This method takes a list of Remote commands, list of repeat counts and list of delays between
  * each remote command.
  *
  * @see com.comcast.cats.provider.RemoteProvider#enterCustomKeySequence(java.util.List,
  *     java.util.List, java.util.List)
  */
 @Override
 public boolean enterCustomKeySequence(
     List<RemoteCommand> commands, List<Integer> repeatCount, List<Integer> delay) {
   String commandStr = "";
   for (RemoteCommand command : commands) {
     commandStr = commandStr + "," + command.name();
   }
   String delayStr = "";
   for (Integer delayInt : delay) {
     delayStr = delayStr + "," + delayInt;
   }
   String countStr = "";
   for (Integer cnt : repeatCount) {
     countStr = countStr + "," + cnt;
   }
   return sleepOnTrue(irRest.enterCustomKeySequence(keySet, commandStr, delayStr, countStr));
 }
Beispiel #3
0
 /**
  * This method does the pressKey for a particular command with a repeat count
  *
  * @see
  *     com.comcast.cats.provider.RemoteProvider#pressKey(java.lang.Integer,com.comcast.cats.RemoteCommand)
  */
 @Override
 public boolean pressKey(Integer count, RemoteCommand command) {
   boolean returnValue = true;
   for (int index = 0; index < count; index++) {
     returnValue = sleepOnTrue(irRest.pressKey(keySet, command.toString()));
     if (!returnValue) {
       break;
     }
   }
   return returnValue;
 }
Beispiel #4
0
 /**
  * This method does the pressKey for a command and holds it for count time.
  *
  * @see com.comcast.cats.provider.RemoteProvider#pressKeyAndHold(com.comcast.cats.RemoteCommand,
  *     java.lang.Integer)
  */
 @Override
 public boolean pressKeyAndHold(RemoteCommand command, Integer count) {
   return irRest.pressKeyAndHold(keySet, command.toString(), String.valueOf(count));
 }
Beispiel #5
0
 /**
  * This method does the pressKey for a particular command with a specific delay
  *
  * @see
  *     com.comcast.cats.provider.RemoteProvider#pressKey(com.comcast.cats.RemoteCommand,java.lang.Integer)
  */
 @Override
 public boolean pressKey(RemoteCommand command, Integer delay) {
   setDelay(delay);
   return sleepOnTrue(irRest.pressKey(keySet, command.toString()));
 }
Beispiel #6
0
 /**
  * This method does the pressKey for a particular command
  *
  * @see com.comcast.cats.provider.RemoteProvider#pressKey(com.comcast.cats.RemoteCommand)
  */
 @Override
 public boolean pressKey(RemoteCommand command) {
   return sleepOnTrue(irRest.pressKey(keySet, command.toString()));
 }