Package org.teleal.cling.model.types

Examples of org.teleal.cling.model.types.UDAServiceId


      // Create a GENA subscription of each service for this device, if supported by the device       
      List<SonosCommandType> subscriptionCommands = SonosCommandType.getSubscriptions();
      List<String> addedSubscriptions = new ArrayList<String>();

      for(SonosCommandType c : subscriptionCommands){
        Service service = device.findService(new UDAServiceId(c.getService()));     
        if(service != null && !addedSubscriptions.contains(c.getService())) {
          SonosPlayerSubscriptionCallback callback = new SonosPlayerSubscriptionCallback(service,interval);
          addedSubscriptions.add(c.getService());
          upnpService.getControlPoint().execute(callback);
        }
View Full Code Here


    return "Sonos [udn=" + udn + ", device=" + device +"]";
  }

  public boolean play() {
    if(isConfigured()) {
      Service service = device.findService(new UDAServiceId("AVTransport"));
      Action action = service.getAction("Play");
      ActionInvocation invocation = new ActionInvocation(action);

      invocation.setInput("Speed", "1");
View Full Code Here

  }

  public boolean stop() {
    if(isConfigured()) {
      Service service = device.findService(new UDAServiceId("AVTransport"));
      Action action = service.getAction("Stop");
      ActionInvocation invocation = new ActionInvocation(action);

      executeActionInvocation(invocation);
View Full Code Here

    }
  }

  public boolean pause() {
    if(isConfigured()) {
      Service service = device.findService(new UDAServiceId("AVTransport"));
      Action action = service.getAction("Pause");
      ActionInvocation invocation = new ActionInvocation(action);

      executeActionInvocation(invocation);
View Full Code Here

    }
  }

  public boolean next() {
    if(isConfigured()) {
      Service service = device.findService(new UDAServiceId("AVTransport"));
      Action action = service.getAction("Next");
      ActionInvocation invocation = new ActionInvocation(action);

      executeActionInvocation(invocation);
View Full Code Here

    }
  }

  public boolean previous() {
    if(isConfigured()) {
      Service service = device.findService(new UDAServiceId("AVTransport"));
      Action action = service.getAction("Previous");
      ActionInvocation invocation = new ActionInvocation(action);

      executeActionInvocation(invocation);
View Full Code Here

  public boolean becomeStandAlonePlayer() {

    if(isConfigured()) {

      Service service = device.findService(new UDAServiceId("AVTransport"));
      Action action = service.getAction("BecomeCoordinatorOfStandaloneGroup");
      ActionInvocation invocation = new ActionInvocation(action);

      executeActionInvocation(invocation);
View Full Code Here

  }

  public boolean setMute(String string) {
    if(string != null && isConfigured()) {

      Service service = device.findService(new UDAServiceId("RenderingControl"));
      Action action = service.getAction("SetMute");
      ActionInvocation invocation = new ActionInvocation(action);

      try {
        invocation.setInput("Channel", "Master");
View Full Code Here

  }

  public boolean setVolume(String value) {
    if(value != null && isConfigured()) {

      Service service = device.findService(new UDAServiceId("RenderingControl"));
      Action action = service.getAction("SetVolume");
      ActionInvocation invocation = new ActionInvocation(action);

      try {
        String newValue = value;
View Full Code Here

  public boolean updateTime() {

    if(isConfigured()) {

      Service service = device.findService(new UDAServiceId("AlarmClock"));
      Action action = service.getAction("GetTimeNow");
      ActionInvocation invocation = new ActionInvocation(action);

      executeActionInvocation(invocation);
View Full Code Here

TOP

Related Classes of org.teleal.cling.model.types.UDAServiceId

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.