Examples of StateVariableValue


Examples of org.fourthline.cling.model.state.StateVariableValue

        }

        // Sum it all up and return it in the initial event to the GENA subscriber
        StateVariable variable = getService().getStateVariable("LastChange");
        Collection<StateVariableValue> values = new ArrayList();
        values.add(new StateVariableValue(variable, lc.toString()));
        return values;
    }
View Full Code Here

Examples of org.teleal.cling.model.state.StateVariableValue

  }


  public String getCurrentVolume(){
    if(stateMap != null && isConfigured()) {
      StateVariableValue status = stateMap.get("VolumeMaster");
      return status.getValue().toString();
    } else {
      return null;
    }   
  }
View Full Code Here

Examples of org.teleal.cling.model.state.StateVariableValue

        // find all the CommandTypes that are defined for each
        // StateVariable
        List<SonosCommandType> supportedCommands = SonosCommandType
            .getCommandByVariable(stateVariable);

        StateVariableValue status = values.get(stateVariable);

        for (SonosCommandType sonosCommandType : supportedCommands) {

          // create a new State based on the type of Sonos Command and
          // the status value in the map
          Type newState = null;
          try {
            newState = createStateForType((Class<? extends State>) sonosCommandType.getTypeClass(), status
                .getValue().toString());
          } catch (BindingConfigParseException e) {
            logger.error(
                "Error parsing a value {} to a state variable of type {}",
                status.toString(), sonosCommandType
                .getTypeClass().toString());
          }

          for (SonosBindingProvider provider : providers) {
            List<String> qualifiedItems = provider.getItemNames(sonosZonePlayerCache.getByDevice(device).getId(), sonosCommandType.getSonosCommand());
View Full Code Here

Examples of org.teleal.cling.model.state.StateVariableValue

  }


  protected boolean isUpdatedValue(String valueName,StateVariableValue newValue) {
    if(newValue != null && valueName != null) {
      StateVariableValue oldValue = stateMap.get(valueName);

      if(newValue.getValue()== null) {
        // we will *not* store an empty value, thank you.
        return false;
      } else {
        if(oldValue == null) {
          // there was nothing stored before
          return true;
        } else {
          if (oldValue.getValue() == null) {
            // something was defined, but no value present
            return true;
          } else {
            if(newValue.getValue().equals(oldValue.getValue())) {
              return false;
            } else {
              return true;
            }
          }
View Full Code Here

Examples of org.teleal.cling.model.state.StateVariableValue

        SonosZonePlayer coordinator = sonosBinding.getCoordinatorForZonePlayer(this);
        //coordinator.setCurrentURI(theEntry);
        coordinator.addURIToQueue(theEntry);

        if(stateMap != null && isConfigured()) {
          StateVariableValue firstTrackNumberEnqueued = stateMap.get("FirstTrackNumberEnqueued");
          if(firstTrackNumberEnqueued!=null) {
            coordinator.seek("TRACK_NR", firstTrackNumberEnqueued.getValue().toString());
          }
        }

        coordinator.play();
View Full Code Here

Examples of org.teleal.cling.model.state.StateVariableValue

    }
  }

  public String getZoneName() {
    if(stateMap != null && isConfigured()) {
      StateVariableValue value = stateMap.get("ZoneName");
      if(value != null) {
        return value.getValue().toString();
      }
    }
    return null;

  }
View Full Code Here

Examples of org.teleal.cling.model.state.StateVariableValue

  }

  public String getZoneGroupID() {
    if(stateMap != null && isConfigured()) {
      StateVariableValue value = stateMap.get("LocalGroupUUID");
      if(value != null) {
        return value.getValue().toString();
      }
    }
    return null;

  }
View Full Code Here

Examples of org.teleal.cling.model.state.StateVariableValue

  }

  public boolean isGroupCoordinator() {
    if(stateMap != null && isConfigured()) {
      StateVariableValue value = stateMap.get("GroupCoordinatorIsLocal");
      if(value != null) {
        return (Boolean) value.getValue();
      }
    }

    return false;
View Full Code Here

Examples of org.teleal.cling.model.state.StateVariableValue

    }
  }

  public String getMute(){
    if(stateMap != null && isConfigured()) {
      StateVariableValue value = stateMap.get("MuteMaster");
      if(value != null) {
        return value.getValue().toString();
      }
    }

    return null;
View Full Code Here

Examples of org.teleal.cling.model.state.StateVariableValue

    }
  }

  public String getVolume() {
    if(stateMap != null && isConfigured()) {
      StateVariableValue value = stateMap.get("VolumeMaster");
      if(value != null) {
        return value.getValue().toString();
      }
    }

    return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.