public PositionInfo(long track, String trackMetaData, String trackURI) { this.track = new UnsignedIntegerFourBytes(track); this.trackMetaData = trackMetaData; this.trackURI = trackURI; }
public PositionInfo(long track, String trackDuration, String trackMetaData, String trackURI, String relTime, String absTime, int relCount, int absCount) { this.track = new UnsignedIntegerFourBytes(track); this.trackDuration = trackDuration; this.trackMetaData = trackMetaData; this.trackURI = trackURI; this.relTime = relTime; this.absTime = absTime; this.relCount = relCount; this.absCount = absCount; }
public BrowseResult(String result, long count, long totalMatches, long updatedId) { this( result, new UnsignedIntegerFourBytes(count), new UnsignedIntegerFourBytes(totalMatches), new UnsignedIntegerFourBytes(updatedId) ); }
public PortMapping(String remoteHost, UnsignedIntegerTwoBytes externalPort, Protocol protocol) { this( true, new UnsignedIntegerFourBytes(0), remoteHost, externalPort, null, null, protocol, null ); }
public SearchResult(String result, long count, long totalMatches, long updateID) { this( result, new UnsignedIntegerFourBytes(count), new UnsignedIntegerFourBytes(totalMatches), new UnsignedIntegerFourBytes(updateID) ); }
public PositionInfo(long track, String trackDuration, String trackURI, String relTime, String absTime) { this.track = new UnsignedIntegerFourBytes(track); this.trackDuration = trackDuration; this.trackURI = trackURI; this.relTime = relTime; this.absTime = absTime; }
public GetMute(Service service) { this(new UnsignedIntegerFourBytes(0), service); } public GetMute(UnsignedIntegerFourBytes instanceId, Service service) {
public GetTransportInfo(Service service) { this(new UnsignedIntegerFourBytes(0), service); }
public Previous(Service service) { this(new UnsignedIntegerFourBytes(0), service); }
public Seek(Service service, String relativeTimeTarget) { this(new UnsignedIntegerFourBytes(0), service, SeekMode.REL_TIME, relativeTimeTarget); }
@Override public UnsignedIntegerFourBytes[] getCurrentInstanceIds() { synchronized (stateMachines) { UnsignedIntegerFourBytes[] ids = new UnsignedIntegerFourBytes[stateMachines.size()]; int i = 0; for (Long id : stateMachines.keySet()) { ids[i] = new UnsignedIntegerFourBytes(id); i++; } return ids; } }
public UnsignedIntegerFourBytes valueOf(String s) throws InvalidValueException { if (s.equals("")) return null; try { return new UnsignedIntegerFourBytes(s); } catch (NumberFormatException ex) { throw new InvalidValueException("Can't convert string to number or not in range: " + s, ex); } }
public BufferBytesHeader() { setValue(new UnsignedIntegerFourBytes(0L)); }
public UnsignedIntegerFourBytes getUptime() { return new UnsignedIntegerFourBytes(getUptimeSeconds()); }
public void setString(String s) throws InvalidHeaderException { // Cut off leading zeros if (!"0".equals(s)) { while(s.startsWith("0")) { s = s.substring(1); } } try { setValue(new UnsignedIntegerFourBytes(s)); } catch (NumberFormatException ex) { throw new InvalidHeaderException("Invalid event sequence, " + ex.getMessage()); } }
public PortMapping(int port, String internalClient, Protocol protocol, String description) { this( true, new UnsignedIntegerFourBytes(0), null, new UnsignedIntegerTwoBytes(port), new UnsignedIntegerTwoBytes(port), internalClient, protocol, description ); }
@Override public void setString(String s) throws InvalidHeaderException { try { setValue(new UnsignedIntegerFourBytes(s)); return; } catch (NumberFormatException numberFormatException) { } throw new InvalidHeaderException("Invalid header value: " + s); }
public PortMapping(int port, String internalClient, Protocol protocol) { this( true, new UnsignedIntegerFourBytes(0), null, new UnsignedIntegerTwoBytes(port), new UnsignedIntegerTwoBytes(port), internalClient, protocol, null ); }
@Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { super.startElement(uri, localName, qName, attributes); if (CONSTANTS.InstanceID.equals(localName)) { String valAttr = attributes.getValue(CONSTANTS.val.name()); if (valAttr != null) { InstanceID instanceID = new InstanceID(new UnsignedIntegerFourBytes(valAttr)); getInstance().getInstanceIDs().add(instanceID); new InstanceIDHandler(instanceID, this); } } } }
@UpnpAction(out = { @UpnpOutputArgument(name = "ConnectionIDs") }) synchronized public CSV<UnsignedIntegerFourBytes> getCurrentConnectionIDs() { CSV<UnsignedIntegerFourBytes> csv = new CSVUnsignedIntegerFourBytes(); for (Integer connectionID : activeConnections.keySet()) { csv.add(new UnsignedIntegerFourBytes(connectionID)); } log.fine("Returning current connection IDs: " + csv.size()); return csv; }