public AVTransport(UnsignedIntegerFourBytes instanceID, LastChange lastChange, StorageMedium[] possiblePlayMedia) { this.instanceID = instanceID; this.lastChange = lastChange; setDeviceCapabilities(new DeviceCapabilities(possiblePlayMedia)); setMediaInfo(new MediaInfo()); setTransportInfo(new TransportInfo()); setPositionInfo(new PositionInfo()); setTransportSettings(new TransportSettings()); }
@Override public void setOnElement(Element element) { if (getValue() != null) getValue().setOnElement(element); } }
@Override public String toString() { return "(PositionInfo) Track: " + getTrack() + " RelTime: " + getRelTime() + " Duration: " + getTrackDuration() + " Percent: " + getElapsedPercent(); } }
/** * Adds {@link Item} or {@link Container} typed instances, ignores everything else. */ public DIDLContent addObject(Object object) { if(object instanceof Item) { addItem((Item)object); } else if(object instanceof Container) { addContainer((Container)object); } return this; }
public DLNAProtocolInfo(ProtocolInfo template) { this(template.getProtocol(), template.getNetwork(), template.getContentFormat(), template.getAdditionalInfo() ); }
@Override public int hashCode() { int result = connectionID; result = 31 * result + rcsID; result = 31 * result + avTransportID; result = 31 * result + (protocolInfo != null ? protocolInfo.hashCode() : 0); result = 31 * result + (peerConnectionManager != null ? peerConnectionManager.hashCode() : 0); result = 31 * result + peerConnectionID; result = 31 * result + direction.hashCode(); result = 31 * result + connectionStatus.hashCode(); return result; }
/** * Creates a default "active" connection with identifier "0". */ public ConnectionManagerService() { this(new ConnectionInfo()); }
public <V> V getFirstPropertyValue(java.lang.Class<? extends Property<V>> propertyClass) { Property<V> prop = getFirstProperty(propertyClass); return prop == null ? null : prop.getValue(); }
public DIDLObject replaceProperties(java.lang.Class<? extends Property> propertyClass, Property[] properties) { if (properties.length == 0) return this; removeProperties(propertyClass); return addProperties(properties); }
static public RecordMediumWriteStatus valueOrUnknownOf(String s) { if (s == null) return UNKNOWN; try { return valueOf(s); } catch (IllegalArgumentException ex) { return UNKNOWN; } } }
@Override public String toString() { return protocol.toString() + ":" + network + ":" + contentFormat + ":" + additionalInfo; } }
public DIDLObject addProperties(Property[] properties) { if (properties == null) return this; for (Property property : properties) { addProperty(property); } return this; }
@Override protected org.fourthline.cling.support.model.TransportState enumValueOf(String s) { return org.fourthline.cling.support.model.TransportState.valueOf(s); } }
@Override protected PlayMode enumValueOf(String s) { return PlayMode.valueOf(s); } }
@Override protected StorageMedium enumValueOf(String s) { return StorageMedium.valueOf(s); } }
/** * Creates a default "active" connection with identifier "0". */ public ConnectionManagerService(ProtocolInfos sourceProtocolInfo, ProtocolInfos sinkProtocolInfo) { this(sourceProtocolInfo, sinkProtocolInfo, new ConnectionInfo()); }
@Override protected org.fourthline.cling.support.model.RecordMediumWriteStatus enumValueOf(String s) { return org.fourthline.cling.support.model.RecordMediumWriteStatus.valueOf(s); } }