Package org.openhab.binding.xbmc.rpc.calls

Examples of org.openhab.binding.xbmc.rpc.calls.ApplicationSetVolume


    playeropen.setFile(file);
    playeropen.execute();
  }

  public void applicationSetVolume(String volume) {
    final ApplicationSetVolume applicationsetvolume = new ApplicationSetVolume(client, httpUri);
       
    if (volume.equals("ON")) {
      this.volume = new BigDecimal(100);
    }
    else if (volume.equals("OFF")) {
      this.volume = new BigDecimal(0);
    }
    else if (volume.equals("DECREASE")) {
      this.volume = this.volume.subtract(VOLUMESTEP);
    }
    else if (volume.equals("INCREASE"))  {
      this.volume = this.volume.add(VOLUMESTEP);
    }
    else {
      try  {
        this.volume = new BigDecimal(volume);
      }
      catch (NumberFormatException e)  {       
        logger.error("applicationSetVolume cannot parse volume parameter: " + volume);
        this.volume = BigDecimal.ZERO;
      }
    }
       
    applicationsetvolume.setVolume(this.volume.intValue());
    applicationsetvolume.execute();
  }
View Full Code Here

TOP

Related Classes of org.openhab.binding.xbmc.rpc.calls.ApplicationSetVolume

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.