From bdea456b7452426807b34d5dc6d2cac9bf93b0f6 Mon Sep 17 00:00:00 2001 From: p34032716 Date: Wed, 13 Jan 2016 20:55:22 +0100 Subject: [PATCH] add ui8 implementation introduced with UPnP 2.0 (needs Java 8) --- .../cling/model/gena/GENASubscription.java | 14 ++-- .../model/gena/LocalGENASubscription.java | 13 +--- .../model/gena/RemoteGENASubscription.java | 6 +- .../gena/IncomingEventRequestMessage.java | 14 ++-- .../gena/OutgoingEventRequestMessage.java | 15 ++--- .../message/header/EventSequenceHeader.java | 8 +-- .../cling/model/types/Datatype.java | 22 +++--- .../types/UnsignedIntegerEightBytes.java | 35 ++++++++++ .../UnsignedIntegerEightBytesDatatype.java | 32 +++++++++ ....java => UnsignedIntegerFourDatatype.java} | 2 +- .../model/types/UnsignedVariableInteger.java | 6 +- .../csv/CSVUnsignedIntegerFourBytes.java | 4 +- .../cling/protocol/sync/ReceivingEvent.java | 5 +- .../cling/protocol/sync/SendingEvent.java | 8 +-- .../SwitchPowerAnnotatedClass.java | 2 +- .../control/ActionInvokeOutgoingTest.java | 22 +----- .../gena/InvalidEventXMLProcessingTest.java | 4 +- .../gena/OutgoingSubscriptionFailureTest.java | 5 +- .../OutgoingSubscriptionLifecycleTest.java | 7 +- .../local/LocalActionInvocationCSVTest.java | 43 +++++------- .../cling/test/model/DatatypesTest.java | 28 +++----- .../display/WindowedDisplayHandler.java | 9 ++- .../gstreamer/GstAVTransportService.java | 64 ++++++++---------- .../gstreamer/GstAudioRenderingControl.java | 26 +++---- .../gstreamer/GstMediaPlayer.java | 44 ++++-------- .../gstreamer/GstMediaPlayers.java | 8 +-- .../gstreamer/GstMediaRenderer.java | 19 ++---- .../mediarenderer/MediaPlayerStateTest.java | 8 +-- .../AbstractAVTransportService.java | 67 +++++++------------ .../callback/GetCurrentTransportActions.java | 6 +- .../callback/GetDeviceCapabilities.java | 6 +- .../avtransport/callback/GetMediaInfo.java | 6 +- .../avtransport/callback/GetPositionInfo.java | 6 +- .../callback/GetTransportInfo.java | 6 +- .../support/avtransport/callback/Next.java | 6 +- .../support/avtransport/callback/Pause.java | 6 +- .../support/avtransport/callback/Play.java | 10 +-- .../avtransport/callback/Previous.java | 6 +- .../support/avtransport/callback/Seek.java | 10 +-- .../callback/SetAVTransportURI.java | 10 +-- .../avtransport/callback/SetPlayMode.java | 6 +- .../support/avtransport/callback/Stop.java | 6 +- .../avtransport/impl/AVTransportService.java | 64 ++++++++---------- .../lastchange/AVTransportVariable.java | 23 ++----- ...stractPeeringConnectionManagerService.java | 10 +-- .../ConnectionManagerService.java | 17 ++--- .../AbstractContentDirectoryService.java | 23 +++---- .../contentdirectory/callback/Browse.java | 12 ++-- .../callback/GetSystemUpdateID.java | 2 +- .../contentdirectory/callback/Search.java | 12 ++-- .../support/igd/callback/GetStatusInfo.java | 4 +- .../cling/support/lastchange/Event.java | 8 +-- .../EventedValueUnsignedIntegerFourBytes.java | 6 +- .../cling/support/lastchange/InstanceID.java | 10 +-- .../cling/support/lastchange/LastChange.java | 18 ++--- .../LastChangeAwareServiceManager.java | 8 +-- .../lastchange/LastChangeDelegator.java | 8 +-- .../support/lastchange/LastChangeParser.java | 31 +++++---- .../cling/support/model/AVTransport.java | 22 +++--- .../cling/support/model/BrowseResult.java | 28 ++++---- .../cling/support/model/Connection.java | 11 ++- .../cling/support/model/MediaInfo.java | 24 +++---- .../cling/support/model/PortMapping.java | 32 ++++----- .../cling/support/model/PositionInfo.java | 28 ++++---- .../cling/support/model/SearchResult.java | 26 +++---- .../message/header/BufferBytesHeader.java | 8 +-- .../AbstractAudioRenderingControl.java | 46 +++++-------- .../renderingcontrol/callback/GetMute.java | 6 +- .../renderingcontrol/callback/GetVolume.java | 6 +- .../renderingcontrol/callback/SetMute.java | 6 +- .../renderingcontrol/callback/SetVolume.java | 6 +- ...AbstractMediaReceiverRegistrarService.java | 27 +++----- .../test/java/example/igd/IGDSampleData.java | 18 +---- .../example/mediarenderer/LastChangeTest.java | 18 ++--- .../MediaRendererSampleData.java | 14 ++-- .../avtransport/impl/AVTransportCallback.java | 4 +- .../impl/AVTransportPresenter.java | 42 ++++-------- .../impl/DetailPresenter.java | 15 +---- .../igd/impl/PortMappingEditViewImpl.java | 4 +- .../impl/RenderingControlCallback.java | 9 +-- .../impl/RenderingControlPresenter.java | 8 +-- 81 files changed, 576 insertions(+), 718 deletions(-) create mode 100644 core/src/main/java/org/fourthline/cling/model/types/UnsignedIntegerEightBytes.java create mode 100644 core/src/main/java/org/fourthline/cling/model/types/UnsignedIntegerEightBytesDatatype.java rename core/src/main/java/org/fourthline/cling/model/types/{UnsignedIntegerFourBytesDatatype.java => UnsignedIntegerFourDatatype.java} (91%) diff --git a/core/src/main/java/org/fourthline/cling/model/gena/GENASubscription.java b/core/src/main/java/org/fourthline/cling/model/gena/GENASubscription.java index ade3ea42e..51df2e86b 100644 --- a/core/src/main/java/org/fourthline/cling/model/gena/GENASubscription.java +++ b/core/src/main/java/org/fourthline/cling/model/gena/GENASubscription.java @@ -15,13 +15,13 @@ package org.fourthline.cling.model.gena; -import java.util.LinkedHashMap; -import java.util.Map; - import org.fourthline.cling.model.UserConstants; import org.fourthline.cling.model.meta.Service; import org.fourthline.cling.model.state.StateVariableValue; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; + +import java.util.LinkedHashMap; +import java.util.Map; /** * An established subscription, with identifer, expiration duration, sequence handling, and state variable values. @@ -38,8 +38,8 @@ public abstract class GENASubscription { protected S service; protected String subscriptionId; protected int requestedDurationSeconds = UserConstants.DEFAULT_SUBSCRIPTION_DURATION_SECONDS; - protected int actualDurationSeconds; - protected UnsignedIntegerFourBytes currentSequence; + protected int actualDurationSeconds; + protected UnsignedIntegerEightBytes currentSequence; protected Map> currentValues = new LinkedHashMap<>(); /** @@ -78,7 +78,7 @@ synchronized public void setActualSubscriptionDurationSeconds(int seconds) { this.actualDurationSeconds = seconds; } - synchronized public UnsignedIntegerFourBytes getCurrentSequence() { + synchronized public UnsignedIntegerEightBytes getCurrentSequence() { return currentSequence; } diff --git a/core/src/main/java/org/fourthline/cling/model/gena/LocalGENASubscription.java b/core/src/main/java/org/fourthline/cling/model/gena/LocalGENASubscription.java index 4b8a81153..0fb772880 100644 --- a/core/src/main/java/org/fourthline/cling/model/gena/LocalGENASubscription.java +++ b/core/src/main/java/org/fourthline/cling/model/gena/LocalGENASubscription.java @@ -21,20 +21,13 @@ import org.fourthline.cling.model.meta.LocalService; import org.fourthline.cling.model.meta.StateVariable; import org.fourthline.cling.model.state.StateVariableValue; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.seamless.util.Exceptions; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.net.URL; -import java.util.Collection; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.UUID; +import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; @@ -97,7 +90,7 @@ public LocalGENASubscription(LocalService service, } this.subscriptionId = SubscriptionIdHeader.PREFIX + UUID.randomUUID(); - this.currentSequence = new UnsignedIntegerFourBytes(0); + this.currentSequence = new UnsignedIntegerEightBytes(0); this.callbackURLs = callbackURLs; } diff --git a/core/src/main/java/org/fourthline/cling/model/gena/RemoteGENASubscription.java b/core/src/main/java/org/fourthline/cling/model/gena/RemoteGENASubscription.java index 7a5520dad..00ab1bc1f 100644 --- a/core/src/main/java/org/fourthline/cling/model/gena/RemoteGENASubscription.java +++ b/core/src/main/java/org/fourthline/cling/model/gena/RemoteGENASubscription.java @@ -18,11 +18,11 @@ import org.fourthline.cling.model.Location; import org.fourthline.cling.model.Namespace; import org.fourthline.cling.model.NetworkAddress; +import org.fourthline.cling.model.UnsupportedDataException; import org.fourthline.cling.model.message.UpnpResponse; import org.fourthline.cling.model.meta.RemoteService; import org.fourthline.cling.model.state.StateVariableValue; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; -import org.fourthline.cling.model.UnsupportedDataException; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import java.beans.PropertyChangeSupport; import java.net.URL; @@ -83,7 +83,7 @@ synchronized public void end(CancelReason reason, UpnpResponse response) { ended(reason, response); } - synchronized public void receive(UnsignedIntegerFourBytes sequence, Collection newValues) { + synchronized public void receive(UnsignedIntegerEightBytes sequence, Collection newValues) { if (this.currentSequence != null) { diff --git a/core/src/main/java/org/fourthline/cling/model/message/gena/IncomingEventRequestMessage.java b/core/src/main/java/org/fourthline/cling/model/message/gena/IncomingEventRequestMessage.java index 820c9e7f0..2f5775f7a 100644 --- a/core/src/main/java/org/fourthline/cling/model/message/gena/IncomingEventRequestMessage.java +++ b/core/src/main/java/org/fourthline/cling/model/message/gena/IncomingEventRequestMessage.java @@ -15,19 +15,15 @@ package org.fourthline.cling.model.message.gena; +import org.fourthline.cling.model.message.StreamRequestMessage; +import org.fourthline.cling.model.message.header.*; import org.fourthline.cling.model.meta.RemoteService; import org.fourthline.cling.model.state.StateVariableValue; -import org.fourthline.cling.model.message.StreamRequestMessage; -import org.fourthline.cling.model.message.header.UpnpHeader; -import org.fourthline.cling.model.message.header.SubscriptionIdHeader; -import org.fourthline.cling.model.message.header.NTEventHeader; -import org.fourthline.cling.model.message.header.NTSHeader; -import org.fourthline.cling.model.message.header.EventSequenceHeader; import org.fourthline.cling.model.types.NotificationSubtype; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; -import java.util.List; import java.util.ArrayList; +import java.util.List; /** * @author Christian Bauer @@ -56,7 +52,7 @@ public String getSubscrptionId() { return header != null ? header.getValue() : null; } - public UnsignedIntegerFourBytes getSequence() { + public UnsignedIntegerEightBytes getSequence() { EventSequenceHeader header = getHeaders().getFirstHeader(UpnpHeader.Type.SEQ, EventSequenceHeader.class); return header != null ? header.getValue() : null; } diff --git a/core/src/main/java/org/fourthline/cling/model/message/gena/OutgoingEventRequestMessage.java b/core/src/main/java/org/fourthline/cling/model/message/gena/OutgoingEventRequestMessage.java index fba09e62f..3d686f050 100644 --- a/core/src/main/java/org/fourthline/cling/model/message/gena/OutgoingEventRequestMessage.java +++ b/core/src/main/java/org/fourthline/cling/model/message/gena/OutgoingEventRequestMessage.java @@ -15,18 +15,13 @@ package org.fourthline.cling.model.message.gena; -import org.fourthline.cling.model.state.StateVariableValue; +import org.fourthline.cling.model.gena.GENASubscription; import org.fourthline.cling.model.message.StreamRequestMessage; import org.fourthline.cling.model.message.UpnpRequest; -import org.fourthline.cling.model.message.header.ContentTypeHeader; -import org.fourthline.cling.model.message.header.EventSequenceHeader; -import org.fourthline.cling.model.message.header.NTEventHeader; -import org.fourthline.cling.model.message.header.NTSHeader; -import org.fourthline.cling.model.message.header.SubscriptionIdHeader; -import org.fourthline.cling.model.message.header.UpnpHeader; +import org.fourthline.cling.model.message.header.*; +import org.fourthline.cling.model.state.StateVariableValue; import org.fourthline.cling.model.types.NotificationSubtype; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; -import org.fourthline.cling.model.gena.GENASubscription; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import java.net.URL; import java.util.Collection; @@ -40,7 +35,7 @@ public class OutgoingEventRequestMessage extends StreamRequestMessage { public OutgoingEventRequestMessage(GENASubscription subscription, URL callbackURL, - UnsignedIntegerFourBytes sequence, + UnsignedIntegerEightBytes sequence, Collection values) { super(new UpnpRequest(UpnpRequest.Method.NOTIFY, callbackURL)); diff --git a/core/src/main/java/org/fourthline/cling/model/message/header/EventSequenceHeader.java b/core/src/main/java/org/fourthline/cling/model/message/header/EventSequenceHeader.java index 410e9dee3..f9f61738e 100644 --- a/core/src/main/java/org/fourthline/cling/model/message/header/EventSequenceHeader.java +++ b/core/src/main/java/org/fourthline/cling/model/message/header/EventSequenceHeader.java @@ -15,18 +15,18 @@ package org.fourthline.cling.model.message.header; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; /** * @author Christian Bauer */ -public class EventSequenceHeader extends UpnpHeader { +public class EventSequenceHeader extends UpnpHeader { public EventSequenceHeader() { } public EventSequenceHeader(long value) { - setValue(new UnsignedIntegerFourBytes(value)); + setValue(new UnsignedIntegerEightBytes(value)); } public void setString(String s) throws InvalidHeaderException { @@ -39,7 +39,7 @@ public void setString(String s) throws InvalidHeaderException { } try { - setValue(new UnsignedIntegerFourBytes(s)); + setValue(new UnsignedIntegerEightBytes(s)); } catch (NumberFormatException ex) { throw new InvalidHeaderException("Invalid event sequence, " + ex.getMessage()); } diff --git a/core/src/main/java/org/fourthline/cling/model/types/Datatype.java b/core/src/main/java/org/fourthline/cling/model/types/Datatype.java index 7116e0ae8..17b59ed4c 100644 --- a/core/src/main/java/org/fourthline/cling/model/types/Datatype.java +++ b/core/src/main/java/org/fourthline/cling/model/types/Datatype.java @@ -17,8 +17,8 @@ import java.util.Calendar; import java.util.HashMap; -import java.util.Map; import java.util.Locale; +import java.util.Map; /** * The type of a state variable value, able to convert to/from string representation. @@ -39,7 +39,7 @@ public interface Datatype { * Java type. *

*/ - public static enum Default { + enum Default { BOOLEAN(Boolean.class, Builtin.BOOLEAN), BOOLEAN_PRIMITIVE(Boolean.TYPE, Builtin.BOOLEAN), @@ -49,7 +49,7 @@ public static enum Default { INTEGER_PRIMITIVE(Integer.TYPE, Builtin.I4), UNSIGNED_INTEGER_ONE_BYTE(UnsignedIntegerOneByte.class, Builtin.UI1), UNSIGNED_INTEGER_TWO_BYTES(UnsignedIntegerTwoBytes.class, Builtin.UI2), - UNSIGNED_INTEGER_FOUR_BYTES(UnsignedIntegerFourBytes.class, Builtin.UI4), + UNSIGNED_INTEGER_FOUR_BYTES(UnsignedIntegerEightBytes.class, Builtin.UI4), FLOAT(Float.class, Builtin.R4), FLOAT_PRIMITIVE(Float.TYPE, Builtin.R4), DOUBLE(Double.class, Builtin.FLOAT), @@ -95,11 +95,11 @@ public String toString() { /** * Mapping from UPnP built-in standardized type to actual subtype of {@link Datatype}. */ - public static enum Builtin { + enum Builtin { UI1("ui1", new UnsignedIntegerOneByteDatatype()), UI2("ui2", new UnsignedIntegerTwoBytesDatatype()), - UI4("ui4", new UnsignedIntegerFourBytesDatatype()), + UI4("ui4", new UnsignedIntegerEightBytesDatatype()), I1("i1", new IntegerDatatype(1)), I2("i2", new IntegerDatatype(2)), I2_SHORT("i2", new ShortDatatype()), @@ -187,19 +187,19 @@ public static boolean isNumeric(Builtin builtin) { /** * @return true if this datatype can handle values of the given Java type. */ - public boolean isHandlingJavaType(Class type); + boolean isHandlingJavaType(Class type); /** * @return The built-in UPnP standardized type this datatype is mapped to or * null if this is a custom datatype. */ - public Builtin getBuiltin(); + Builtin getBuiltin(); /** * @param value The value to validate or null. * @return Returns true if the value was null, validation result otherwise. */ - public boolean isValid(V value); + boolean isValid(V value); /** * Transforms a value supported by this datatype into a string representation. @@ -212,7 +212,7 @@ public static boolean isNumeric(Builtin builtin) { * @return The transformed value as a string, or an empty string when the value is null, never returns null. * @throws InvalidValueException */ - public String getString(V value) throws InvalidValueException; + String getString(V value) throws InvalidValueException; /** * Transforms a string representation into a value of the supported type. @@ -221,13 +221,13 @@ public static boolean isNumeric(Builtin builtin) { * @return The converted value or null if the string was null or empty. * @throws InvalidValueException If the string couldn't be parsed. */ - public V valueOf(String s) throws InvalidValueException; + V valueOf(String s) throws InvalidValueException; /** * @return Metadata about this datatype, a nice string for display that describes * this datatype (e.g. concrete class name). */ - public String getDisplayString(); + String getDisplayString(); } diff --git a/core/src/main/java/org/fourthline/cling/model/types/UnsignedIntegerEightBytes.java b/core/src/main/java/org/fourthline/cling/model/types/UnsignedIntegerEightBytes.java new file mode 100644 index 000000000..60f6a3946 --- /dev/null +++ b/core/src/main/java/org/fourthline/cling/model/types/UnsignedIntegerEightBytes.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2013 4th Line GmbH, Switzerland + * + * The contents of this file are subject to the terms of either the GNU + * Lesser General Public License Version 2 or later ("LGPL") or the + * Common Development and Distribution License Version 1 or later + * ("CDDL") (collectively, the "License"). You may not use this file + * except in compliance with the License. See LICENSE.txt for more + * information. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +package org.fourthline.cling.model.types; + +/** + * @author Christian Bauer + */ +final public class UnsignedIntegerEightBytes extends UnsignedVariableInteger { + + public UnsignedIntegerEightBytes(long value) throws NumberFormatException { + super(value); + } + + public UnsignedIntegerEightBytes(String s) throws NumberFormatException { + super(s); + } + + public Bits getBits() { + return Bits.SIXTYFOUR; + } + +} \ No newline at end of file diff --git a/core/src/main/java/org/fourthline/cling/model/types/UnsignedIntegerEightBytesDatatype.java b/core/src/main/java/org/fourthline/cling/model/types/UnsignedIntegerEightBytesDatatype.java new file mode 100644 index 000000000..376792dc2 --- /dev/null +++ b/core/src/main/java/org/fourthline/cling/model/types/UnsignedIntegerEightBytesDatatype.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2013 4th Line GmbH, Switzerland + * + * The contents of this file are subject to the terms of either the GNU + * Lesser General Public License Version 2 or later ("LGPL") or the + * Common Development and Distribution License Version 1 or later + * ("CDDL") (collectively, the "License"). You may not use this file + * except in compliance with the License. See LICENSE.txt for more + * information. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +package org.fourthline.cling.model.types; + +/** + * @author Christian Bauer + */ +public class UnsignedIntegerEightBytesDatatype extends AbstractDatatype { + + public UnsignedIntegerEightBytes valueOf(String s) throws InvalidValueException { + if (s.equals("")) return null; + try { + return new UnsignedIntegerEightBytes(s); + } catch (NumberFormatException ex) { + throw new InvalidValueException("Can't convert string to number or not in range: " + s, ex); + } + } + +} \ No newline at end of file diff --git a/core/src/main/java/org/fourthline/cling/model/types/UnsignedIntegerFourBytesDatatype.java b/core/src/main/java/org/fourthline/cling/model/types/UnsignedIntegerFourDatatype.java similarity index 91% rename from core/src/main/java/org/fourthline/cling/model/types/UnsignedIntegerFourBytesDatatype.java rename to core/src/main/java/org/fourthline/cling/model/types/UnsignedIntegerFourDatatype.java index f8b1ba44f..7094eb4ce 100644 --- a/core/src/main/java/org/fourthline/cling/model/types/UnsignedIntegerFourBytesDatatype.java +++ b/core/src/main/java/org/fourthline/cling/model/types/UnsignedIntegerFourDatatype.java @@ -18,7 +18,7 @@ /** * @author Christian Bauer */ -public class UnsignedIntegerFourBytesDatatype extends AbstractDatatype { +public class UnsignedIntegerFourDatatype extends AbstractDatatype { public UnsignedIntegerFourBytes valueOf(String s) throws InvalidValueException { if (s.equals("")) return null; diff --git a/core/src/main/java/org/fourthline/cling/model/types/UnsignedVariableInteger.java b/core/src/main/java/org/fourthline/cling/model/types/UnsignedVariableInteger.java index e139e0fe4..9dad9526a 100644 --- a/core/src/main/java/org/fourthline/cling/model/types/UnsignedVariableInteger.java +++ b/core/src/main/java/org/fourthline/cling/model/types/UnsignedVariableInteger.java @@ -30,7 +30,8 @@ public enum Bits { EIGHT(0xffL), SIXTEEN(0xffffL), TWENTYFOUR(0xffffffL), - THIRTYTWO(0xffffffffL); + THIRTYTWO(0xffffffffL), + SIXTYFOUR(0x7fffffffffffffffL); //Long.toHexString(Long.MAX_VALUE) private long maxValue; @@ -100,9 +101,8 @@ public boolean equals(Object o) { UnsignedVariableInteger that = (UnsignedVariableInteger) o; - if (value != that.value) return false; + return value == that.value; - return true; } @Override diff --git a/core/src/main/java/org/fourthline/cling/model/types/csv/CSVUnsignedIntegerFourBytes.java b/core/src/main/java/org/fourthline/cling/model/types/csv/CSVUnsignedIntegerFourBytes.java index 5b56467ad..3c82a6f49 100644 --- a/core/src/main/java/org/fourthline/cling/model/types/csv/CSVUnsignedIntegerFourBytes.java +++ b/core/src/main/java/org/fourthline/cling/model/types/csv/CSVUnsignedIntegerFourBytes.java @@ -16,12 +16,12 @@ package org.fourthline.cling.model.types.csv; import org.fourthline.cling.model.types.InvalidValueException; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; /** * @author Christian Bauer */ -public class CSVUnsignedIntegerFourBytes extends CSV { +public class CSVUnsignedIntegerFourBytes extends CSV { public CSVUnsignedIntegerFourBytes() { } diff --git a/core/src/main/java/org/fourthline/cling/protocol/sync/ReceivingEvent.java b/core/src/main/java/org/fourthline/cling/protocol/sync/ReceivingEvent.java index cc2ba66f7..77ca805ab 100644 --- a/core/src/main/java/org/fourthline/cling/protocol/sync/ReceivingEvent.java +++ b/core/src/main/java/org/fourthline/cling/protocol/sync/ReceivingEvent.java @@ -16,14 +16,15 @@ package org.fourthline.cling.protocol.sync; import org.fourthline.cling.UpnpService; +import org.fourthline.cling.model.UnsupportedDataException; import org.fourthline.cling.model.gena.RemoteGENASubscription; import org.fourthline.cling.model.message.StreamRequestMessage; import org.fourthline.cling.model.message.UpnpResponse; import org.fourthline.cling.model.message.gena.IncomingEventRequestMessage; import org.fourthline.cling.model.message.gena.OutgoingEventResponseMessage; import org.fourthline.cling.model.resource.ServiceEventCallbackResource; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.protocol.ReceivingSync; -import org.fourthline.cling.model.UnsupportedDataException; import org.fourthline.cling.transport.RouterException; import java.util.logging.Logger; @@ -33,7 +34,7 @@ *

* Attempts to find an outgoing (remote) subscription matching the callback and subscription identifier. * Once found, the GENA event message payload will be transformed and the - * {@link org.fourthline.cling.model.gena.RemoteGENASubscription#receive(org.fourthline.cling.model.types.UnsignedIntegerFourBytes, + * {@link org.fourthline.cling.model.gena.RemoteGENASubscription#receive(UnsignedIntegerEightBytes, * java.util.Collection)} method will be called asynchronously using the executor * returned by {@link org.fourthline.cling.UpnpServiceConfiguration#getRegistryListenerExecutor()}. *

diff --git a/core/src/main/java/org/fourthline/cling/protocol/sync/SendingEvent.java b/core/src/main/java/org/fourthline/cling/protocol/sync/SendingEvent.java index 92049639a..4eaaa3df4 100644 --- a/core/src/main/java/org/fourthline/cling/protocol/sync/SendingEvent.java +++ b/core/src/main/java/org/fourthline/cling/protocol/sync/SendingEvent.java @@ -15,16 +15,16 @@ package org.fourthline.cling.protocol.sync; -import java.util.logging.Logger; import org.fourthline.cling.UpnpService; import org.fourthline.cling.model.gena.LocalGENASubscription; import org.fourthline.cling.model.message.StreamResponseMessage; import org.fourthline.cling.model.message.gena.OutgoingEventRequestMessage; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.protocol.SendingSync; import org.fourthline.cling.transport.RouterException; import java.net.URL; +import java.util.logging.Logger; /** * Sending GENA event messages to remote subscribers. @@ -42,9 +42,9 @@ public class SendingEvent extends SendingSyncinti4 * org.fourthline.cling.model.types.UnsignedIntegerOneByteui1 * org.fourthline.cling.model.types.UnsignedIntegerTwoBytesui2 - * org.fourthline.cling.model.types.UnsignedIntegerFourBytesui4 + * org.fourthline.cling.model.types.UnsignedIntegerEightBytesui4 * java.lang.Floatr4 * floatr4 * java.lang.Doublefloat diff --git a/core/src/test/java/org/fourthline/cling/test/control/ActionInvokeOutgoingTest.java b/core/src/test/java/org/fourthline/cling/test/control/ActionInvokeOutgoingTest.java index f1d95bef1..90c9ece99 100644 --- a/core/src/test/java/org/fourthline/cling/test/control/ActionInvokeOutgoingTest.java +++ b/core/src/test/java/org/fourthline/cling/test/control/ActionInvokeOutgoingTest.java @@ -26,31 +26,15 @@ import org.fourthline.cling.model.message.header.ContentTypeHeader; import org.fourthline.cling.model.message.header.SoapActionHeader; import org.fourthline.cling.model.message.header.UpnpHeader; -import org.fourthline.cling.model.meta.Action; -import org.fourthline.cling.model.meta.ActionArgument; -import org.fourthline.cling.model.meta.DeviceDetails; -import org.fourthline.cling.model.meta.LocalDevice; -import org.fourthline.cling.model.meta.LocalService; -import org.fourthline.cling.model.meta.RemoteDevice; -import org.fourthline.cling.model.meta.RemoteService; -import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.meta.StateVariable; -import org.fourthline.cling.model.meta.StateVariableEventDetails; -import org.fourthline.cling.model.meta.StateVariableTypeDetails; +import org.fourthline.cling.model.meta.*; import org.fourthline.cling.model.profile.ClientInfo; -import org.fourthline.cling.model.types.Datatype; -import org.fourthline.cling.model.types.ErrorCode; -import org.fourthline.cling.model.types.UDADeviceType; -import org.fourthline.cling.model.types.UDAServiceId; -import org.fourthline.cling.model.types.UDAServiceType; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.*; import org.fourthline.cling.test.data.SampleData; import org.fourthline.cling.test.data.SampleServiceOne; import org.fourthline.cling.transport.RouterException; import org.testng.annotations.Test; import java.net.URI; -import java.util.Arrays; import static org.testng.Assert.assertEquals; @@ -495,7 +479,7 @@ public void failure(ActionInvocation invocation, UpnpResponse operation, String assert actionInvocation.getFailure() == null; // The illegal "-1" value should have been converted (with warning) to 0 - assertEquals(actionInvocation.getOutput("Result").getValue(), new UnsignedIntegerFourBytes(0)); + assertEquals(actionInvocation.getOutput("Result").getValue(), new UnsignedIntegerEightBytes(0)); } /* TODO: M-POST support diff --git a/core/src/test/java/org/fourthline/cling/test/gena/InvalidEventXMLProcessingTest.java b/core/src/test/java/org/fourthline/cling/test/gena/InvalidEventXMLProcessingTest.java index 7be4dd5b3..053cd8afc 100644 --- a/core/src/test/java/org/fourthline/cling/test/gena/InvalidEventXMLProcessingTest.java +++ b/core/src/test/java/org/fourthline/cling/test/gena/InvalidEventXMLProcessingTest.java @@ -30,7 +30,7 @@ import org.fourthline.cling.model.message.gena.OutgoingEventRequestMessage; import org.fourthline.cling.model.meta.RemoteService; import org.fourthline.cling.model.state.StateVariableValue; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.test.data.SampleData; import org.fourthline.cling.transport.impl.PullGENAEventProcessorImpl; import org.fourthline.cling.transport.impl.RecoveringGENAEventProcessorImpl; @@ -162,7 +162,7 @@ public void eventReceived() { public void invalidMessage(UnsupportedDataException ex) { } }; - subscription.receive(new UnsignedIntegerFourBytes(0), new ArrayList()); + subscription.receive(new UnsignedIntegerEightBytes(0), new ArrayList()); OutgoingEventRequestMessage outgoingCall = new OutgoingEventRequestMessage(subscription, SampleData.getLocalBaseURL()); diff --git a/core/src/test/java/org/fourthline/cling/test/gena/OutgoingSubscriptionFailureTest.java b/core/src/test/java/org/fourthline/cling/test/gena/OutgoingSubscriptionFailureTest.java index 42a00de14..4ae353c3c 100644 --- a/core/src/test/java/org/fourthline/cling/test/gena/OutgoingSubscriptionFailureTest.java +++ b/core/src/test/java/org/fourthline/cling/test/gena/OutgoingSubscriptionFailureTest.java @@ -35,10 +35,9 @@ import org.fourthline.cling.model.meta.RemoteDevice; import org.fourthline.cling.model.meta.RemoteService; import org.fourthline.cling.model.state.StateVariableValue; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.protocol.ReceivingSync; import org.fourthline.cling.test.data.SampleData; -import org.fourthline.cling.transport.Router; import org.seamless.util.URIUtil; import org.testng.annotations.Test; @@ -260,7 +259,7 @@ protected IncomingEventRequestMessage createEventRequestMessage(UpnpService upnp OutgoingEventRequestMessage outgoing = new OutgoingEventRequestMessage( callback.getSubscription(), URIUtil.toURL(URI.create("http://10.0.0.123/some/callback")), - new UnsignedIntegerFourBytes(sequence), + new UnsignedIntegerEightBytes(sequence), values ); outgoing.getOperation().setUri( diff --git a/core/src/test/java/org/fourthline/cling/test/gena/OutgoingSubscriptionLifecycleTest.java b/core/src/test/java/org/fourthline/cling/test/gena/OutgoingSubscriptionLifecycleTest.java index af9516656..34bd5d060 100644 --- a/core/src/test/java/org/fourthline/cling/test/gena/OutgoingSubscriptionLifecycleTest.java +++ b/core/src/test/java/org/fourthline/cling/test/gena/OutgoingSubscriptionLifecycleTest.java @@ -36,10 +36,9 @@ import org.fourthline.cling.model.meta.RemoteDevice; import org.fourthline.cling.model.meta.RemoteService; import org.fourthline.cling.model.state.StateVariableValue; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.protocol.ProtocolCreationException; import org.fourthline.cling.test.data.SampleData; -import org.fourthline.cling.transport.RouterException; import org.seamless.util.URIUtil; import org.testng.annotations.Test; @@ -336,7 +335,7 @@ protected IncomingEventRequestMessage createEventRequestMessage(final UpnpServic OutgoingEventRequestMessage outgoing = new OutgoingEventRequestMessage( callback.getSubscription(), URIUtil.toURL(URI.create("http://10.0.0.123/this/is/ignored/anyway")), - new UnsignedIntegerFourBytes(0), + new UnsignedIntegerEightBytes(0), values ); outgoing.getOperation().setUri( @@ -362,7 +361,7 @@ protected IncomingEventRequestMessage createEventRequestMessage(final UpnpServic OutgoingEventRequestMessage outgoing = new OutgoingEventRequestMessage( subscription, URIUtil.toURL(URI.create("http://10.0.0.123/this/is/ignored/anyway")), - new UnsignedIntegerFourBytes(0), + new UnsignedIntegerEightBytes(0), values ); outgoing.getOperation().setUri( diff --git a/core/src/test/java/org/fourthline/cling/test/local/LocalActionInvocationCSVTest.java b/core/src/test/java/org/fourthline/cling/test/local/LocalActionInvocationCSVTest.java index 4ca2ac5e7..8f7554e95 100644 --- a/core/src/test/java/org/fourthline/cling/test/local/LocalActionInvocationCSVTest.java +++ b/core/src/test/java/org/fourthline/cling/test/local/LocalActionInvocationCSVTest.java @@ -15,25 +15,14 @@ package org.fourthline.cling.test.local; -import org.fourthline.cling.binding.annotations.AnnotationLocalServiceBinder; -import org.fourthline.cling.binding.annotations.UpnpAction; -import org.fourthline.cling.binding.annotations.UpnpInputArgument; -import org.fourthline.cling.binding.annotations.UpnpOutputArgument; -import org.fourthline.cling.binding.annotations.UpnpService; -import org.fourthline.cling.binding.annotations.UpnpServiceId; -import org.fourthline.cling.binding.annotations.UpnpServiceType; -import org.fourthline.cling.binding.annotations.UpnpStateVariable; +import org.fourthline.cling.binding.annotations.*; import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.DeviceDetails; import org.fourthline.cling.model.meta.LocalDevice; import org.fourthline.cling.model.meta.LocalService; import org.fourthline.cling.model.types.UDADeviceType; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; -import org.fourthline.cling.model.types.csv.CSV; -import org.fourthline.cling.model.types.csv.CSVBoolean; -import org.fourthline.cling.model.types.csv.CSVInteger; -import org.fourthline.cling.model.types.csv.CSVString; -import org.fourthline.cling.model.types.csv.CSVUnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; +import org.fourthline.cling.model.types.csv.*; import org.fourthline.cling.test.data.SampleData; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -102,16 +91,16 @@ public void invokeActions(LocalDevice device) throws Exception { assertEquals(csvBoolean.get(1), new Boolean(true)); assertEquals(csvBoolean.get(2), new Boolean(false)); - List testUifour = new CSVUnsignedIntegerFourBytes(); - testUifour.add(new UnsignedIntegerFourBytes(123)); - testUifour.add(new UnsignedIntegerFourBytes(456)); - testUifour.add(new UnsignedIntegerFourBytes(789)); + List testUifour = new CSVUnsignedIntegerFourBytes(); + testUifour.add(new UnsignedIntegerEightBytes(123)); + testUifour.add(new UnsignedIntegerEightBytes(456)); + testUifour.add(new UnsignedIntegerEightBytes(789)); result = executeActions(svc, "SetUifourVar", "GetUifourVar", testUifour); - List csvUifour = new CSVUnsignedIntegerFourBytes(result); + List csvUifour = new CSVUnsignedIntegerFourBytes(result); assert csvUifour.size() == 3; - assertEquals(csvUifour.get(0), new UnsignedIntegerFourBytes(123)); - assertEquals(csvUifour.get(1), new UnsignedIntegerFourBytes(456)); - assertEquals(csvUifour.get(2), new UnsignedIntegerFourBytes(789)); + assertEquals(csvUifour.get(0), new UnsignedIntegerEightBytes(123)); + assertEquals(csvUifour.get(1), new UnsignedIntegerEightBytes(456)); + assertEquals(csvUifour.get(2), new UnsignedIntegerEightBytes(789)); } protected String executeActions(LocalService svc, String setAction, String getAction, List input) throws Exception { @@ -148,7 +137,7 @@ public static class TestServiceOne { private CSV booleanVar; @UpnpStateVariable(sendEvents = false) - private CSV uifourVar; + private CSV uifourVar; @UpnpAction public void setStringVar(@UpnpInputArgument(name = "StringVar") CSVString stringVar) { @@ -196,13 +185,13 @@ public CSV getBooleanVar() { public void setUifourVar(@UpnpInputArgument(name = "UifourVar") CSVUnsignedIntegerFourBytes uifourVar) { this.uifourVar = uifourVar; assertEquals(uifourVar.size(), 3); - assertEquals(uifourVar.get(0), new UnsignedIntegerFourBytes(123)); - assertEquals(uifourVar.get(1), new UnsignedIntegerFourBytes(456)); - assertEquals(uifourVar.get(2), new UnsignedIntegerFourBytes(789)); + assertEquals(uifourVar.get(0), new UnsignedIntegerEightBytes(123)); + assertEquals(uifourVar.get(1), new UnsignedIntegerEightBytes(456)); + assertEquals(uifourVar.get(2), new UnsignedIntegerEightBytes(789)); } @UpnpAction(out = @UpnpOutputArgument(name = "UifourVar")) - public CSV getUifourVar() { + public CSV getUifourVar() { return uifourVar; } diff --git a/core/src/test/java/org/fourthline/cling/test/model/DatatypesTest.java b/core/src/test/java/org/fourthline/cling/test/model/DatatypesTest.java index 3ccfa43c9..4db5a728c 100644 --- a/core/src/test/java/org/fourthline/cling/test/model/DatatypesTest.java +++ b/core/src/test/java/org/fourthline/cling/test/model/DatatypesTest.java @@ -15,26 +15,12 @@ package org.fourthline.cling.test.model; -import org.fourthline.cling.model.types.Base64Datatype; -import org.fourthline.cling.model.types.DLNADoc; -import org.fourthline.cling.model.types.Datatype; -import org.fourthline.cling.model.types.DateTimeDatatype; -import org.fourthline.cling.model.types.DoubleDatatype; -import org.fourthline.cling.model.types.FloatDatatype; -import org.fourthline.cling.model.types.IntegerDatatype; -import org.fourthline.cling.model.types.InvalidValueException; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytesDatatype; -import org.fourthline.cling.model.types.UnsignedIntegerOneByteDatatype; -import org.fourthline.cling.model.types.UnsignedIntegerTwoBytesDatatype; +import org.fourthline.cling.model.types.*; import org.fourthline.cling.model.types.csv.CSVBoolean; import org.fourthline.cling.model.types.csv.CSVString; import org.testng.annotations.Test; -import java.util.Arrays; -import java.util.Calendar; -import java.util.Date; -import java.util.List; -import java.util.TimeZone; +import java.util.*; import static org.testng.Assert.assertEquals; @@ -59,12 +45,16 @@ public void validUnsignedIntegers() { UnsignedIntegerTwoBytesDatatype typeTwo = new UnsignedIntegerTwoBytesDatatype(); assertEquals(typeTwo.valueOf("257").getValue(), Long.valueOf(257l)); - UnsignedIntegerFourBytesDatatype typeFour = new UnsignedIntegerFourBytesDatatype(); + UnsignedIntegerEightBytesDatatype typeEight = new UnsignedIntegerEightBytesDatatype(); + assertEquals(typeEight.valueOf("9223372036854775807").getValue(), Long.valueOf(9223372036854775807L)); + assertEquals(typeEight.valueOf("4294967296").getValue(), Long.valueOf(4294967296L)); + + UnsignedIntegerFourDatatype typeFour = new UnsignedIntegerFourDatatype(); assertEquals(typeFour.valueOf("65536").getValue(), Long.valueOf(65536l)); - assertEquals(typeFour.valueOf("4294967295").getValue(), Long.valueOf(4294967295l)); + assertEquals(typeFour.valueOf("4294967295").getValue(), Long.valueOf(4294967295L)); // Well, no need to write another test for that - assertEquals(typeFour.valueOf("4294967295").increment(true).getValue(), Long.valueOf(1)); + assertEquals(typeEight.valueOf(Long.valueOf(0xffffffffffffffffL+1).toString()).increment(true).getValue(), Long.valueOf(1)); } diff --git a/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/display/WindowedDisplayHandler.java b/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/display/WindowedDisplayHandler.java index 188919ab0..8e08f5db7 100644 --- a/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/display/WindowedDisplayHandler.java +++ b/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/display/WindowedDisplayHandler.java @@ -17,11 +17,10 @@ import org.fourthline.cling.mediarenderer.MediaRenderer; import org.fourthline.cling.mediarenderer.gstreamer.GstMediaPlayer; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; -import javax.swing.JFrame; -import javax.swing.SwingUtilities; -import java.awt.Dimension; +import javax.swing.*; +import java.awt.*; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.util.HashMap; @@ -36,7 +35,7 @@ public class WindowedDisplayHandler implements DisplayHandler { final private static Logger log = Logger.getLogger(WindowedDisplayHandler.class.getName()); - final protected Map playerWindows = new HashMap<>(); + final protected Map playerWindows = new HashMap<>(); public WindowedDisplayHandler() { MediaRenderer.APP.log(Level.INFO, "Enabling window handler for each player instance"); diff --git a/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/gstreamer/GstAVTransportService.java b/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/gstreamer/GstAVTransportService.java index 8fb989638..065166d0d 100644 --- a/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/gstreamer/GstAVTransportService.java +++ b/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/gstreamer/GstAVTransportService.java @@ -15,24 +15,16 @@ package org.fourthline.cling.mediarenderer.gstreamer; -import org.gstreamer.ClockTime; -import org.gstreamer.State; import org.fourthline.cling.model.ModelUtil; import org.fourthline.cling.model.types.ErrorCode; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.avtransport.AVTransportErrorCode; import org.fourthline.cling.support.avtransport.AVTransportException; import org.fourthline.cling.support.avtransport.AbstractAVTransportService; -import org.fourthline.cling.support.model.DeviceCapabilities; -import org.fourthline.cling.support.model.MediaInfo; -import org.fourthline.cling.support.model.PlayMode; -import org.fourthline.cling.support.model.PositionInfo; -import org.fourthline.cling.support.model.SeekMode; -import org.fourthline.cling.support.model.TransportAction; -import org.fourthline.cling.support.model.TransportInfo; -import org.fourthline.cling.support.model.TransportSettings; -import org.fourthline.cling.support.model.StorageMedium; import org.fourthline.cling.support.lastchange.LastChange; +import org.fourthline.cling.support.model.*; +import org.gstreamer.ClockTime; +import org.gstreamer.State; import org.seamless.http.HttpFetch; import org.seamless.util.URIUtil; @@ -47,18 +39,18 @@ public class GstAVTransportService extends AbstractAVTransportService { final private static Logger log = Logger.getLogger(GstAVTransportService.class.getName()); - final private Map players; + final private Map players; - protected GstAVTransportService(LastChange lastChange, Map players) { + protected GstAVTransportService(LastChange lastChange, Map players) { super(lastChange); this.players = players; } - protected Map getPlayers() { + protected Map getPlayers() { return players; } - protected GstMediaPlayer getInstance(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + protected GstMediaPlayer getInstance(UnsignedIntegerEightBytes instanceId) throws AVTransportException { GstMediaPlayer player = getPlayers().get(instanceId); if (player == null) { throw new AVTransportException(AVTransportErrorCode.INVALID_INSTANCE_ID); @@ -67,7 +59,7 @@ protected GstMediaPlayer getInstance(UnsignedIntegerFourBytes instanceId) throws } @Override - public void setAVTransportURI(UnsignedIntegerFourBytes instanceId, + public void setAVTransportURI(UnsignedIntegerEightBytes instanceId, String currentURI, String currentURIMetaData) throws AVTransportException { URI uri; @@ -101,55 +93,55 @@ public void setAVTransportURI(UnsignedIntegerFourBytes instanceId, } @Override - public MediaInfo getMediaInfo(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + public MediaInfo getMediaInfo(UnsignedIntegerEightBytes instanceId) throws AVTransportException { return getInstance(instanceId).getCurrentMediaInfo(); } @Override - public TransportInfo getTransportInfo(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + public TransportInfo getTransportInfo(UnsignedIntegerEightBytes instanceId) throws AVTransportException { return getInstance(instanceId).getCurrentTransportInfo(); } @Override - public PositionInfo getPositionInfo(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + public PositionInfo getPositionInfo(UnsignedIntegerEightBytes instanceId) throws AVTransportException { return getInstance(instanceId).getCurrentPositionInfo(); } @Override - public DeviceCapabilities getDeviceCapabilities(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + public DeviceCapabilities getDeviceCapabilities(UnsignedIntegerEightBytes instanceId) throws AVTransportException { getInstance(instanceId); return new DeviceCapabilities(new StorageMedium[]{StorageMedium.NETWORK}); } @Override - public TransportSettings getTransportSettings(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + public TransportSettings getTransportSettings(UnsignedIntegerEightBytes instanceId) throws AVTransportException { getInstance(instanceId); return new TransportSettings(PlayMode.NORMAL); } @Override - public void stop(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + public void stop(UnsignedIntegerEightBytes instanceId) throws AVTransportException { getInstance(instanceId).stop(); } @Override - public void play(UnsignedIntegerFourBytes instanceId, String speed) throws AVTransportException { + public void play(UnsignedIntegerEightBytes instanceId, String speed) throws AVTransportException { getInstance(instanceId).play(); } @Override - public void pause(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + public void pause(UnsignedIntegerEightBytes instanceId) throws AVTransportException { getInstance(instanceId).pause(); } @Override - public void record(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + public void record(UnsignedIntegerEightBytes instanceId) throws AVTransportException { // Not implemented log.info("### TODO: Not implemented: Record"); } @Override - public void seek(UnsignedIntegerFourBytes instanceId, String unit, String target) throws AVTransportException { + public void seek(UnsignedIntegerEightBytes instanceId, String unit, String target) throws AVTransportException { final GstMediaPlayer player = getInstance(instanceId); SeekMode seekMode; try { @@ -176,19 +168,19 @@ public void seek(UnsignedIntegerFourBytes instanceId, String unit, String target } @Override - public void next(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + public void next(UnsignedIntegerEightBytes instanceId) throws AVTransportException { // Not implemented log.info("### TODO: Not implemented: Next"); } @Override - public void previous(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + public void previous(UnsignedIntegerEightBytes instanceId) throws AVTransportException { // Not implemented log.info("### TODO: Not implemented: Previous"); } @Override - public void setNextAVTransportURI(UnsignedIntegerFourBytes instanceId, + public void setNextAVTransportURI(UnsignedIntegerEightBytes instanceId, String nextURI, String nextURIMetaData) throws AVTransportException { log.info("### TODO: Not implemented: SetNextAVTransportURI"); @@ -196,27 +188,27 @@ public void setNextAVTransportURI(UnsignedIntegerFourBytes instanceId, } @Override - public void setPlayMode(UnsignedIntegerFourBytes instanceId, String newPlayMode) throws AVTransportException { + public void setPlayMode(UnsignedIntegerEightBytes instanceId, String newPlayMode) throws AVTransportException { // Not implemented log.info("### TODO: Not implemented: SetPlayMode"); } @Override - public void setRecordQualityMode(UnsignedIntegerFourBytes instanceId, String newRecordQualityMode) throws AVTransportException { + public void setRecordQualityMode(UnsignedIntegerEightBytes instanceId, String newRecordQualityMode) throws AVTransportException { // Not implemented log.info("### TODO: Not implemented: SetRecordQualityMode"); } @Override - protected TransportAction[] getCurrentTransportActions(UnsignedIntegerFourBytes instanceId) throws Exception { + protected TransportAction[] getCurrentTransportActions(UnsignedIntegerEightBytes instanceId) throws Exception { return getInstance(instanceId).getCurrentTransportActions(); } @Override - public UnsignedIntegerFourBytes[] getCurrentInstanceIds() { - UnsignedIntegerFourBytes[] ids = new UnsignedIntegerFourBytes[getPlayers().size()]; + public UnsignedIntegerEightBytes[] getCurrentInstanceIds() { + UnsignedIntegerEightBytes[] ids = new UnsignedIntegerEightBytes[getPlayers().size()]; int i = 0; - for (UnsignedIntegerFourBytes id : getPlayers().keySet()) { + for (UnsignedIntegerEightBytes id : getPlayers().keySet()) { ids[i] = id; i++; } diff --git a/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/gstreamer/GstAudioRenderingControl.java b/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/gstreamer/GstAudioRenderingControl.java index 253eac0c6..921f2027f 100644 --- a/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/gstreamer/GstAudioRenderingControl.java +++ b/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/gstreamer/GstAudioRenderingControl.java @@ -16,13 +16,13 @@ package org.fourthline.cling.mediarenderer.gstreamer; import org.fourthline.cling.model.types.ErrorCode; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; import org.fourthline.cling.support.lastchange.LastChange; +import org.fourthline.cling.support.model.Channel; import org.fourthline.cling.support.renderingcontrol.AbstractAudioRenderingControl; import org.fourthline.cling.support.renderingcontrol.RenderingControlErrorCode; import org.fourthline.cling.support.renderingcontrol.RenderingControlException; -import org.fourthline.cling.support.model.Channel; import java.util.Map; import java.util.logging.Logger; @@ -34,18 +34,18 @@ public class GstAudioRenderingControl extends AbstractAudioRenderingControl { final private static Logger log = Logger.getLogger(GstAudioRenderingControl.class.getName()); - final private Map players; + final private Map players; - protected GstAudioRenderingControl(LastChange lastChange, Map players) { + protected GstAudioRenderingControl(LastChange lastChange, Map players) { super(lastChange); this.players = players; } - protected Map getPlayers() { + protected Map getPlayers() { return players; } - protected GstMediaPlayer getInstance(UnsignedIntegerFourBytes instanceId) throws RenderingControlException { + protected GstMediaPlayer getInstance(UnsignedIntegerEightBytes instanceId) throws RenderingControlException { GstMediaPlayer player = getPlayers().get(instanceId); if (player == null) { throw new RenderingControlException(RenderingControlErrorCode.INVALID_INSTANCE_ID); @@ -60,20 +60,20 @@ protected void checkChannel(String channelName) throws RenderingControlException } @Override - public boolean getMute(UnsignedIntegerFourBytes instanceId, String channelName) throws RenderingControlException { + public boolean getMute(UnsignedIntegerEightBytes instanceId, String channelName) throws RenderingControlException { checkChannel(channelName); return getInstance(instanceId).getVolume() == 0; } @Override - public void setMute(UnsignedIntegerFourBytes instanceId, String channelName, boolean desiredMute) throws RenderingControlException { + public void setMute(UnsignedIntegerEightBytes instanceId, String channelName, boolean desiredMute) throws RenderingControlException { checkChannel(channelName); log.fine("Setting backend mute to: " + desiredMute); getInstance(instanceId).setMute(desiredMute); } @Override - public UnsignedIntegerTwoBytes getVolume(UnsignedIntegerFourBytes instanceId, String channelName) throws RenderingControlException { + public UnsignedIntegerTwoBytes getVolume(UnsignedIntegerEightBytes instanceId, String channelName) throws RenderingControlException { checkChannel(channelName); int vol = (int) (getInstance(instanceId).getVolume() * 100); log.fine("Getting backend volume: " + vol); @@ -81,7 +81,7 @@ public UnsignedIntegerTwoBytes getVolume(UnsignedIntegerFourBytes instanceId, St } @Override - public void setVolume(UnsignedIntegerFourBytes instanceId, String channelName, UnsignedIntegerTwoBytes desiredVolume) throws RenderingControlException { + public void setVolume(UnsignedIntegerEightBytes instanceId, String channelName, UnsignedIntegerTwoBytes desiredVolume) throws RenderingControlException { checkChannel(channelName); double vol = desiredVolume.getValue() / 100d; log.fine("Setting backend volume to: " + vol); @@ -96,10 +96,10 @@ protected Channel[] getCurrentChannels() { } @Override - public UnsignedIntegerFourBytes[] getCurrentInstanceIds() { - UnsignedIntegerFourBytes[] ids = new UnsignedIntegerFourBytes[getPlayers().size()]; + public UnsignedIntegerEightBytes[] getCurrentInstanceIds() { + UnsignedIntegerEightBytes[] ids = new UnsignedIntegerEightBytes[getPlayers().size()]; int i = 0; - for (UnsignedIntegerFourBytes id : getPlayers().keySet()) { + for (UnsignedIntegerEightBytes id : getPlayers().keySet()) { ids[i] = id; i++; } diff --git a/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/gstreamer/GstMediaPlayer.java b/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/gstreamer/GstMediaPlayer.java index 2d268cf46..e9c2f3316 100644 --- a/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/gstreamer/GstMediaPlayer.java +++ b/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/gstreamer/GstMediaPlayer.java @@ -15,38 +15,18 @@ package org.fourthline.cling.mediarenderer.gstreamer; -import org.gstreamer.Bus; -import org.gstreamer.Caps; -import org.gstreamer.ClockTime; -import org.gstreamer.Element; -import org.gstreamer.GstObject; -import org.gstreamer.Pad; -import org.gstreamer.State; -import org.gstreamer.Structure; -import org.gstreamer.TagList; -import org.gstreamer.media.PlayBinMediaPlayer; -import org.gstreamer.media.event.DurationChangedEvent; -import org.gstreamer.media.event.EndOfMediaEvent; -import org.gstreamer.media.event.MediaListener; -import org.gstreamer.media.event.PauseEvent; -import org.gstreamer.media.event.PositionChangedEvent; -import org.gstreamer.media.event.StartEvent; -import org.gstreamer.media.event.StopEvent; -import org.gstreamer.swing.VideoComponent; import org.fourthline.cling.model.ModelUtil; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; -import org.fourthline.cling.support.model.MediaInfo; -import org.fourthline.cling.support.model.TransportAction; -import org.fourthline.cling.support.model.TransportState; -import org.fourthline.cling.support.model.PositionInfo; -import org.fourthline.cling.support.model.TransportInfo; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.avtransport.lastchange.AVTransportVariable; -import org.fourthline.cling.support.model.StorageMedium; import org.fourthline.cling.support.lastchange.LastChange; -import org.fourthline.cling.support.model.Channel; +import org.fourthline.cling.support.model.*; import org.fourthline.cling.support.renderingcontrol.lastchange.ChannelMute; import org.fourthline.cling.support.renderingcontrol.lastchange.ChannelVolume; import org.fourthline.cling.support.renderingcontrol.lastchange.RenderingControlVariable; +import org.gstreamer.*; +import org.gstreamer.media.PlayBinMediaPlayer; +import org.gstreamer.media.event.*; +import org.gstreamer.swing.VideoComponent; import java.net.URI; import java.util.logging.Logger; @@ -58,9 +38,9 @@ public class GstMediaPlayer extends PlayBinMediaPlayer { final private static Logger log = Logger.getLogger(GstMediaPlayer.class.getName()); - final private UnsignedIntegerFourBytes instanceId; - final private LastChange avTransportLastChange; - final private LastChange renderingControlLastChange; + final private UnsignedIntegerEightBytes instanceId; + final private LastChange avTransportLastChange; + final private LastChange renderingControlLastChange; final private VideoComponent videoComponent = new VideoComponent(); @@ -70,7 +50,7 @@ public class GstMediaPlayer extends PlayBinMediaPlayer { private MediaInfo currentMediaInfo = new MediaInfo(); private double storedVolume; - public GstMediaPlayer(UnsignedIntegerFourBytes instanceId, + public GstMediaPlayer(UnsignedIntegerEightBytes instanceId, LastChange avTransportLastChange, LastChange renderingControlLastChange) { super(); @@ -101,7 +81,7 @@ public GstMediaPlayer(UnsignedIntegerFourBytes instanceId, setVideoSink(videoComponent.getElement()); } - public UnsignedIntegerFourBytes getInstanceId() { + public UnsignedIntegerEightBytes getInstanceId() { return instanceId; } @@ -334,7 +314,7 @@ public void durationChanged(final DurationChangedEvent evt) { new MediaInfo( currentMediaInfo.getCurrentURI(), "", - new UnsignedIntegerFourBytes(1), + new UnsignedIntegerEightBytes(1), newValue, StorageMedium.NETWORK ); diff --git a/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/gstreamer/GstMediaPlayers.java b/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/gstreamer/GstMediaPlayers.java index e795cc69e..60a0fb7e1 100644 --- a/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/gstreamer/GstMediaPlayers.java +++ b/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/gstreamer/GstMediaPlayers.java @@ -15,9 +15,9 @@ package org.fourthline.cling.mediarenderer.gstreamer; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; -import org.fourthline.cling.support.model.TransportState; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.lastchange.LastChange; +import org.fourthline.cling.support.model.TransportState; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; @@ -25,7 +25,7 @@ /** * @author Christian Bauer */ -public class GstMediaPlayers extends ConcurrentHashMap { +public class GstMediaPlayers extends ConcurrentHashMap { final private static Logger log = Logger.getLogger(GstMediaPlayers.class.getName()); @@ -43,7 +43,7 @@ public GstMediaPlayers(int numberOfPlayers, GstMediaPlayer player = new GstMediaPlayer( - new UnsignedIntegerFourBytes(i), + new UnsignedIntegerEightBytes(i), avTransportLastChange, renderingControlLastChange ) { diff --git a/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/gstreamer/GstMediaRenderer.java b/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/gstreamer/GstMediaRenderer.java index 7046a402f..70d8d47ec 100644 --- a/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/gstreamer/GstMediaRenderer.java +++ b/mediarenderer/src/main/java/org/fourthline/cling/mediarenderer/gstreamer/GstMediaRenderer.java @@ -23,24 +23,17 @@ import org.fourthline.cling.model.ModelUtil; import org.fourthline.cling.model.ServiceManager; import org.fourthline.cling.model.ValidationException; -import org.fourthline.cling.model.meta.DeviceDetails; -import org.fourthline.cling.model.meta.DeviceIdentity; -import org.fourthline.cling.model.meta.Icon; -import org.fourthline.cling.model.meta.LocalDevice; -import org.fourthline.cling.model.meta.LocalService; -import org.fourthline.cling.model.meta.ManufacturerDetails; -import org.fourthline.cling.model.meta.ModelDetails; +import org.fourthline.cling.model.meta.*; import org.fourthline.cling.model.types.UDADeviceType; import org.fourthline.cling.model.types.UDN; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; -import org.fourthline.cling.support.lastchange.LastChangeAwareServiceManager; -import org.fourthline.cling.support.model.TransportState; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.avtransport.lastchange.AVTransportLastChangeParser; import org.fourthline.cling.support.lastchange.LastChange; +import org.fourthline.cling.support.lastchange.LastChangeAwareServiceManager; +import org.fourthline.cling.support.model.TransportState; import org.fourthline.cling.support.renderingcontrol.lastchange.RenderingControlLastChangeParser; import java.io.IOException; -import java.net.URI; import java.util.Map; import java.util.logging.Level; @@ -57,7 +50,7 @@ public class GstMediaRenderer { final protected LastChange avTransportLastChange = new LastChange(new AVTransportLastChangeParser()); final protected LastChange renderingControlLastChange = new LastChange(new RenderingControlLastChangeParser()); - final protected Map mediaPlayers; + final protected Map mediaPlayers; final protected ServiceManager connectionManager; final protected LastChangeAwareServiceManager avTransport; @@ -186,7 +179,7 @@ synchronized public void setDisplayHandler(DisplayHandler displayHandler) { this.displayHandler = displayHandler; } - synchronized public Map getMediaPlayers() { + synchronized public Map getMediaPlayers() { return mediaPlayers; } diff --git a/mediarenderer/src/test/java/org/fourthline/cling/test/mediarenderer/MediaPlayerStateTest.java b/mediarenderer/src/test/java/org/fourthline/cling/test/mediarenderer/MediaPlayerStateTest.java index 6ceb72821..65067505e 100644 --- a/mediarenderer/src/test/java/org/fourthline/cling/test/mediarenderer/MediaPlayerStateTest.java +++ b/mediarenderer/src/test/java/org/fourthline/cling/test/mediarenderer/MediaPlayerStateTest.java @@ -15,14 +15,14 @@ package org.fourthline.cling.test.mediarenderer; -import org.gstreamer.Gst; -import org.gstreamer.State; import org.fourthline.cling.mediarenderer.gstreamer.GstMediaPlayer; import org.fourthline.cling.mediarenderer.gstreamer.GstMediaPlayers; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.avtransport.lastchange.AVTransportLastChangeParser; import org.fourthline.cling.support.lastchange.LastChange; import org.fourthline.cling.support.renderingcontrol.lastchange.RenderingControlLastChangeParser; +import org.gstreamer.Gst; +import org.gstreamer.State; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; @@ -45,7 +45,7 @@ public void initGStreamer() { @Test public void lastChangePropagation() throws Exception { - UnsignedIntegerFourBytes instanceId = new UnsignedIntegerFourBytes(0); + UnsignedIntegerEightBytes instanceId = new UnsignedIntegerEightBytes(0); LastChange avTransportLastChange = new LastChange(new AVTransportLastChangeParser()); LastChange renderingControlLastChange = new LastChange(new RenderingControlLastChangeParser()); diff --git a/support/src/main/java/org/fourthline/cling/support/avtransport/AbstractAVTransportService.java b/support/src/main/java/org/fourthline/cling/support/avtransport/AbstractAVTransportService.java index 3ca046525..5487e9b3b 100644 --- a/support/src/main/java/org/fourthline/cling/support/avtransport/AbstractAVTransportService.java +++ b/support/src/main/java/org/fourthline/cling/support/avtransport/AbstractAVTransportService.java @@ -15,33 +15,14 @@ package org.fourthline.cling.support.avtransport; -import org.fourthline.cling.binding.annotations.UpnpAction; -import org.fourthline.cling.binding.annotations.UpnpInputArgument; -import org.fourthline.cling.binding.annotations.UpnpOutputArgument; -import org.fourthline.cling.binding.annotations.UpnpService; -import org.fourthline.cling.binding.annotations.UpnpServiceId; -import org.fourthline.cling.binding.annotations.UpnpServiceType; -import org.fourthline.cling.binding.annotations.UpnpStateVariable; -import org.fourthline.cling.binding.annotations.UpnpStateVariables; +import org.fourthline.cling.binding.annotations.*; import org.fourthline.cling.model.ModelUtil; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.avtransport.lastchange.AVTransportLastChangeParser; import org.fourthline.cling.support.avtransport.lastchange.AVTransportVariable; import org.fourthline.cling.support.lastchange.LastChange; import org.fourthline.cling.support.lastchange.LastChangeDelegator; -import org.fourthline.cling.support.model.DeviceCapabilities; -import org.fourthline.cling.support.model.MediaInfo; -import org.fourthline.cling.support.model.PlayMode; -import org.fourthline.cling.support.model.PositionInfo; -import org.fourthline.cling.support.model.RecordMediumWriteStatus; -import org.fourthline.cling.support.model.RecordQualityMode; -import org.fourthline.cling.support.model.SeekMode; -import org.fourthline.cling.support.model.StorageMedium; -import org.fourthline.cling.support.model.TransportAction; -import org.fourthline.cling.support.model.TransportInfo; -import org.fourthline.cling.support.model.TransportSettings; -import org.fourthline.cling.support.model.TransportState; -import org.fourthline.cling.support.model.TransportStatus; +import org.fourthline.cling.support.model.*; import java.beans.PropertyChangeSupport; import java.net.URI; @@ -224,7 +205,7 @@ public LastChange getLastChange() { } @Override - public void appendCurrentState(LastChange lc, UnsignedIntegerFourBytes instanceId) throws Exception { + public void appendCurrentState(LastChange lc, UnsignedIntegerEightBytes instanceId) throws Exception { MediaInfo mediaInfo = getMediaInfo(instanceId); TransportInfo transportInfo = getTransportInfo(instanceId); @@ -262,18 +243,18 @@ public PropertyChangeSupport getPropertyChangeSupport() { return propertyChangeSupport; } - public static UnsignedIntegerFourBytes getDefaultInstanceID() { - return new UnsignedIntegerFourBytes(0); + public static UnsignedIntegerEightBytes getDefaultInstanceID() { + return new UnsignedIntegerEightBytes(0); } @UpnpAction - public abstract void setAVTransportURI(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId, + public abstract void setAVTransportURI(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId, @UpnpInputArgument(name = "CurrentURI", stateVariable = "AVTransportURI") String currentURI, @UpnpInputArgument(name = "CurrentURIMetaData", stateVariable = "AVTransportURIMetaData") String currentURIMetaData) throws AVTransportException; @UpnpAction - public abstract void setNextAVTransportURI(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId, + public abstract void setNextAVTransportURI(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId, @UpnpInputArgument(name = "NextURI", stateVariable = "AVTransportURI") String nextURI, @UpnpInputArgument(name = "NextURIMetaData", stateVariable = "AVTransportURIMetaData") String nextURIMetaData) throws AVTransportException; @@ -289,7 +270,7 @@ public abstract void setNextAVTransportURI(@UpnpInputArgument(name = "InstanceID @UpnpOutputArgument(name = "RecordMedium", stateVariable = "RecordStorageMedium", getterName = "getRecordMedium"), @UpnpOutputArgument(name = "WriteStatus", stateVariable = "RecordMediumWriteStatus", getterName = "getWriteStatus") }) - public abstract MediaInfo getMediaInfo(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId) + public abstract MediaInfo getMediaInfo(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId) throws AVTransportException; @UpnpAction(out = { @@ -297,7 +278,7 @@ public abstract MediaInfo getMediaInfo(@UpnpInputArgument(name = "InstanceID") U @UpnpOutputArgument(name = "CurrentTransportStatus", stateVariable = "TransportStatus", getterName = "getCurrentTransportStatus"), @UpnpOutputArgument(name = "CurrentSpeed", stateVariable = "TransportPlaySpeed", getterName = "getCurrentSpeed") }) - public abstract TransportInfo getTransportInfo(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId) + public abstract TransportInfo getTransportInfo(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId) throws AVTransportException; @UpnpAction(out = { @@ -310,7 +291,7 @@ public abstract TransportInfo getTransportInfo(@UpnpInputArgument(name = "Instan @UpnpOutputArgument(name = "RelCount", stateVariable = "RelativeCounterPosition", getterName = "getRelCount"), @UpnpOutputArgument(name = "AbsCount", stateVariable = "AbsoluteCounterPosition", getterName = "getAbsCount") }) - public abstract PositionInfo getPositionInfo(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId) + public abstract PositionInfo getPositionInfo(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId) throws AVTransportException; @UpnpAction(out = { @@ -318,59 +299,59 @@ public abstract PositionInfo getPositionInfo(@UpnpInputArgument(name = "Instance @UpnpOutputArgument(name = "RecMedia", stateVariable = "PossibleRecordStorageMedia", getterName = "getRecMediaString"), @UpnpOutputArgument(name = "RecQualityModes", stateVariable = "PossibleRecordQualityModes", getterName = "getRecQualityModesString") }) - public abstract DeviceCapabilities getDeviceCapabilities(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId) + public abstract DeviceCapabilities getDeviceCapabilities(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId) throws AVTransportException; @UpnpAction(out = { @UpnpOutputArgument(name = "PlayMode", stateVariable = "CurrentPlayMode", getterName = "getPlayMode"), @UpnpOutputArgument(name = "RecQualityMode", stateVariable = "CurrentRecordQualityMode", getterName = "getRecQualityMode") }) - public abstract TransportSettings getTransportSettings(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId) + public abstract TransportSettings getTransportSettings(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId) throws AVTransportException; @UpnpAction - public abstract void stop(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId) + public abstract void stop(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId) throws AVTransportException; @UpnpAction - public abstract void play(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId, + public abstract void play(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId, @UpnpInputArgument(name = "Speed", stateVariable = "TransportPlaySpeed") String speed) throws AVTransportException; @UpnpAction - public abstract void pause(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId) + public abstract void pause(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId) throws AVTransportException; @UpnpAction - public abstract void record(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId) + public abstract void record(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId) throws AVTransportException; @UpnpAction - public abstract void seek(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId, + public abstract void seek(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId, @UpnpInputArgument(name = "Unit", stateVariable = "A_ARG_TYPE_SeekMode") String unit, @UpnpInputArgument(name = "Target", stateVariable = "A_ARG_TYPE_SeekTarget") String target) throws AVTransportException; @UpnpAction - public abstract void next(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId) + public abstract void next(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId) throws AVTransportException; @UpnpAction - public abstract void previous(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId) + public abstract void previous(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId) throws AVTransportException; @UpnpAction - public abstract void setPlayMode(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId, + public abstract void setPlayMode(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId, @UpnpInputArgument(name = "NewPlayMode", stateVariable = "CurrentPlayMode") String newPlayMode) throws AVTransportException; @UpnpAction - public abstract void setRecordQualityMode(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId, + public abstract void setRecordQualityMode(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId, @UpnpInputArgument(name = "NewRecordQualityMode", stateVariable = "CurrentRecordQualityMode") String newRecordQualityMode) throws AVTransportException; @UpnpAction(name = "GetCurrentTransportActions", out = @UpnpOutputArgument(name = "Actions", stateVariable = "CurrentTransportActions")) - public String getCurrentTransportActionsString(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId) + public String getCurrentTransportActionsString(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId) throws AVTransportException { try { return ModelUtil.toCommaSeparatedList(getCurrentTransportActions(instanceId)); @@ -379,5 +360,5 @@ public String getCurrentTransportActionsString(@UpnpInputArgument(name = "Instan } } - protected abstract TransportAction[] getCurrentTransportActions(UnsignedIntegerFourBytes instanceId) throws Exception; + protected abstract TransportAction[] getCurrentTransportActions(UnsignedIntegerEightBytes instanceId) throws Exception; } diff --git a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/GetCurrentTransportActions.java b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/GetCurrentTransportActions.java index 32bfaf3b3..0a5fa0227 100644 --- a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/GetCurrentTransportActions.java +++ b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/GetCurrentTransportActions.java @@ -18,7 +18,7 @@ import org.fourthline.cling.controlpoint.ActionCallback; import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.model.TransportAction; import java.util.logging.Logger; @@ -31,10 +31,10 @@ public abstract class GetCurrentTransportActions extends ActionCallback { private static Logger log = Logger.getLogger(GetCurrentTransportActions.class.getName()); public GetCurrentTransportActions(Service service) { - this(new UnsignedIntegerFourBytes(0), service); + this(new UnsignedIntegerEightBytes(0), service); } - public GetCurrentTransportActions(UnsignedIntegerFourBytes instanceId, Service service) { + public GetCurrentTransportActions(UnsignedIntegerEightBytes instanceId, Service service) { super(new ActionInvocation(service.getAction("GetCurrentTransportActions"))); getActionInvocation().setInput("InstanceID", instanceId); } diff --git a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/GetDeviceCapabilities.java b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/GetDeviceCapabilities.java index b01ae4e79..601d7d266 100644 --- a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/GetDeviceCapabilities.java +++ b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/GetDeviceCapabilities.java @@ -18,7 +18,7 @@ import org.fourthline.cling.controlpoint.ActionCallback; import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.model.DeviceCapabilities; import java.util.logging.Logger; @@ -32,10 +32,10 @@ public abstract class GetDeviceCapabilities extends ActionCallback { private static Logger log = Logger.getLogger(GetDeviceCapabilities.class.getName()); public GetDeviceCapabilities(Service service) { - this(new UnsignedIntegerFourBytes(0), service); + this(new UnsignedIntegerEightBytes(0), service); } - public GetDeviceCapabilities(UnsignedIntegerFourBytes instanceId, Service service) { + public GetDeviceCapabilities(UnsignedIntegerEightBytes instanceId, Service service) { super(new ActionInvocation(service.getAction("GetDeviceCapabilities"))); getActionInvocation().setInput("InstanceID", instanceId); } diff --git a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/GetMediaInfo.java b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/GetMediaInfo.java index 69635ffb2..2eccf6c7c 100644 --- a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/GetMediaInfo.java +++ b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/GetMediaInfo.java @@ -18,7 +18,7 @@ import org.fourthline.cling.controlpoint.ActionCallback; import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.model.MediaInfo; import java.util.logging.Logger; @@ -32,10 +32,10 @@ public abstract class GetMediaInfo extends ActionCallback { private static Logger log = Logger.getLogger(GetMediaInfo.class.getName()); public GetMediaInfo(Service service) { - this(new UnsignedIntegerFourBytes(0), service); + this(new UnsignedIntegerEightBytes(0), service); } - public GetMediaInfo(UnsignedIntegerFourBytes instanceId, Service service) { + public GetMediaInfo(UnsignedIntegerEightBytes instanceId, Service service) { super(new ActionInvocation(service.getAction("GetMediaInfo"))); getActionInvocation().setInput("InstanceID", instanceId); } diff --git a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/GetPositionInfo.java b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/GetPositionInfo.java index a25e78468..a1097c911 100644 --- a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/GetPositionInfo.java +++ b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/GetPositionInfo.java @@ -18,7 +18,7 @@ import org.fourthline.cling.controlpoint.ActionCallback; import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.model.PositionInfo; import java.util.logging.Logger; @@ -32,10 +32,10 @@ public abstract class GetPositionInfo extends ActionCallback { private static Logger log = Logger.getLogger(GetPositionInfo.class.getName()); public GetPositionInfo(Service service) { - this(new UnsignedIntegerFourBytes(0), service); + this(new UnsignedIntegerEightBytes(0), service); } - public GetPositionInfo(UnsignedIntegerFourBytes instanceId, Service service) { + public GetPositionInfo(UnsignedIntegerEightBytes instanceId, Service service) { super(new ActionInvocation(service.getAction("GetPositionInfo"))); getActionInvocation().setInput("InstanceID", instanceId); } diff --git a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/GetTransportInfo.java b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/GetTransportInfo.java index 1194580c4..790e2dd41 100644 --- a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/GetTransportInfo.java +++ b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/GetTransportInfo.java @@ -18,7 +18,7 @@ import org.fourthline.cling.controlpoint.ActionCallback; import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.model.TransportInfo; import java.util.logging.Logger; @@ -32,10 +32,10 @@ public abstract class GetTransportInfo extends ActionCallback { private static Logger log = Logger.getLogger(GetTransportInfo.class.getName()); public GetTransportInfo(Service service) { - this(new UnsignedIntegerFourBytes(0), service); + this(new UnsignedIntegerEightBytes(0), service); } - public GetTransportInfo(UnsignedIntegerFourBytes instanceId, Service service) { + public GetTransportInfo(UnsignedIntegerEightBytes instanceId, Service service) { super(new ActionInvocation(service.getAction("GetTransportInfo"))); getActionInvocation().setInput("InstanceID", instanceId); } diff --git a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Next.java b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Next.java index 6c756563d..101a4ae2b 100644 --- a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Next.java +++ b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Next.java @@ -19,7 +19,7 @@ import org.fourthline.cling.controlpoint.ControlPoint; import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import java.util.logging.Logger; @@ -40,10 +40,10 @@ protected Next(ActionInvocation actionInvocation) { } public Next(Service service) { - this(new UnsignedIntegerFourBytes(0), service); + this(new UnsignedIntegerEightBytes(0), service); } - public Next(UnsignedIntegerFourBytes instanceId, Service service) { + public Next(UnsignedIntegerEightBytes instanceId, Service service) { super(new ActionInvocation(service.getAction("Next"))); getActionInvocation().setInput("InstanceID", instanceId); } diff --git a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Pause.java b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Pause.java index 96512ea73..ed5204358 100644 --- a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Pause.java +++ b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Pause.java @@ -19,7 +19,7 @@ import org.fourthline.cling.controlpoint.ControlPoint; import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import java.util.logging.Logger; @@ -40,10 +40,10 @@ protected Pause(ActionInvocation actionInvocation) { } public Pause(Service service) { - this(new UnsignedIntegerFourBytes(0), service); + this(new UnsignedIntegerEightBytes(0), service); } - public Pause(UnsignedIntegerFourBytes instanceId, Service service) { + public Pause(UnsignedIntegerEightBytes instanceId, Service service) { super(new ActionInvocation(service.getAction("Pause"))); getActionInvocation().setInput("InstanceID", instanceId); } diff --git a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Play.java b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Play.java index 6179fe64f..853aaa906 100644 --- a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Play.java +++ b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Play.java @@ -18,7 +18,7 @@ import org.fourthline.cling.controlpoint.ActionCallback; import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import java.util.logging.Logger; @@ -31,18 +31,18 @@ public abstract class Play extends ActionCallback { private static Logger log = Logger.getLogger(Play.class.getName()); public Play(Service service) { - this(new UnsignedIntegerFourBytes(0), service, "1"); + this(new UnsignedIntegerEightBytes(0), service, "1"); } public Play(Service service, String speed) { - this(new UnsignedIntegerFourBytes(0), service, speed); + this(new UnsignedIntegerEightBytes(0), service, speed); } - public Play(UnsignedIntegerFourBytes instanceId, Service service) { + public Play(UnsignedIntegerEightBytes instanceId, Service service) { this(instanceId, service, "1"); } - public Play(UnsignedIntegerFourBytes instanceId, Service service, String speed) { + public Play(UnsignedIntegerEightBytes instanceId, Service service, String speed) { super(new ActionInvocation(service.getAction("Play"))); getActionInvocation().setInput("InstanceID", instanceId); getActionInvocation().setInput("Speed", speed); diff --git a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Previous.java b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Previous.java index ae3b80d06..9efc87253 100644 --- a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Previous.java +++ b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Previous.java @@ -19,7 +19,7 @@ import org.fourthline.cling.controlpoint.ControlPoint; import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import java.util.logging.Logger; @@ -40,10 +40,10 @@ protected Previous(ActionInvocation actionInvocation) { } public Previous(Service service) { - this(new UnsignedIntegerFourBytes(0), service); + this(new UnsignedIntegerEightBytes(0), service); } - public Previous(UnsignedIntegerFourBytes instanceId, Service service) { + public Previous(UnsignedIntegerEightBytes instanceId, Service service) { super(new ActionInvocation(service.getAction("Previous"))); getActionInvocation().setInput("InstanceID", instanceId); } diff --git a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Seek.java b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Seek.java index 1da559e5c..de15058c4 100644 --- a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Seek.java +++ b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Seek.java @@ -18,7 +18,7 @@ import org.fourthline.cling.controlpoint.ActionCallback; import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.model.SeekMode; import java.util.logging.Logger; @@ -32,18 +32,18 @@ public abstract class Seek extends ActionCallback { private static Logger log = Logger.getLogger(Seek.class.getName()); public Seek(Service service, String relativeTimeTarget) { - this(new UnsignedIntegerFourBytes(0), service, SeekMode.REL_TIME, relativeTimeTarget); + this(new UnsignedIntegerEightBytes(0), service, SeekMode.REL_TIME, relativeTimeTarget); } - public Seek(UnsignedIntegerFourBytes instanceId, Service service, String relativeTimeTarget) { + public Seek(UnsignedIntegerEightBytes instanceId, Service service, String relativeTimeTarget) { this(instanceId, service, SeekMode.REL_TIME, relativeTimeTarget); } public Seek(Service service, SeekMode mode, String target) { - this(new UnsignedIntegerFourBytes(0), service, mode, target); + this(new UnsignedIntegerEightBytes(0), service, mode, target); } - public Seek(UnsignedIntegerFourBytes instanceId, Service service, SeekMode mode, String target) { + public Seek(UnsignedIntegerEightBytes instanceId, Service service, SeekMode mode, String target) { super(new ActionInvocation(service.getAction("Seek"))); getActionInvocation().setInput("InstanceID", instanceId); getActionInvocation().setInput("Unit", mode.name()); diff --git a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/SetAVTransportURI.java b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/SetAVTransportURI.java index 159e3b583..6d7013f75 100644 --- a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/SetAVTransportURI.java +++ b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/SetAVTransportURI.java @@ -18,7 +18,7 @@ import org.fourthline.cling.controlpoint.ActionCallback; import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import java.util.logging.Logger; @@ -30,18 +30,18 @@ public abstract class SetAVTransportURI extends ActionCallback { private static Logger log = Logger.getLogger(SetAVTransportURI.class.getName()); public SetAVTransportURI(Service service, String uri) { - this(new UnsignedIntegerFourBytes(0), service, uri, null); + this(new UnsignedIntegerEightBytes(0), service, uri, null); } public SetAVTransportURI(Service service, String uri, String metadata) { - this(new UnsignedIntegerFourBytes(0), service, uri, metadata); + this(new UnsignedIntegerEightBytes(0), service, uri, metadata); } - public SetAVTransportURI(UnsignedIntegerFourBytes instanceId, Service service, String uri) { + public SetAVTransportURI(UnsignedIntegerEightBytes instanceId, Service service, String uri) { this(instanceId, service, uri, null); } - public SetAVTransportURI(UnsignedIntegerFourBytes instanceId, Service service, String uri, String metadata) { + public SetAVTransportURI(UnsignedIntegerEightBytes instanceId, Service service, String uri, String metadata) { super(new ActionInvocation(service.getAction("SetAVTransportURI"))); log.fine("Creating SetAVTransportURI action for URI: " + uri); getActionInvocation().setInput("InstanceID", instanceId); diff --git a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/SetPlayMode.java b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/SetPlayMode.java index 846376635..d9375a67b 100644 --- a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/SetPlayMode.java +++ b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/SetPlayMode.java @@ -18,7 +18,7 @@ import org.fourthline.cling.controlpoint.ActionCallback; import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.model.PlayMode; import java.util.logging.Logger; @@ -31,10 +31,10 @@ public abstract class SetPlayMode extends ActionCallback { private static Logger log = Logger.getLogger(SetPlayMode.class.getName()); public SetPlayMode(Service service, PlayMode playMode) { - this(new UnsignedIntegerFourBytes(0), service, playMode); + this(new UnsignedIntegerEightBytes(0), service, playMode); } - public SetPlayMode(UnsignedIntegerFourBytes instanceId, Service service, PlayMode playMode) { + public SetPlayMode(UnsignedIntegerEightBytes instanceId, Service service, PlayMode playMode) { super(new ActionInvocation(service.getAction("SetPlayMode"))); getActionInvocation().setInput("InstanceID", instanceId); getActionInvocation().setInput("NewPlayMode", playMode.toString()); diff --git a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Stop.java b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Stop.java index 8a83a57a9..c914b5751 100644 --- a/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Stop.java +++ b/support/src/main/java/org/fourthline/cling/support/avtransport/callback/Stop.java @@ -18,7 +18,7 @@ import org.fourthline.cling.controlpoint.ActionCallback; import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import java.util.logging.Logger; @@ -31,10 +31,10 @@ public abstract class Stop extends ActionCallback { private static Logger log = Logger.getLogger(Stop.class.getName()); public Stop(Service service) { - this(new UnsignedIntegerFourBytes(0), service); + this(new UnsignedIntegerEightBytes(0), service); } - public Stop(UnsignedIntegerFourBytes instanceId, Service service) { + public Stop(UnsignedIntegerEightBytes instanceId, Service service) { super(new ActionInvocation(service.getAction("Stop"))); getActionInvocation().setInput("InstanceID", instanceId); } diff --git a/support/src/main/java/org/fourthline/cling/support/avtransport/impl/AVTransportService.java b/support/src/main/java/org/fourthline/cling/support/avtransport/impl/AVTransportService.java index d59543218..41bbef163 100644 --- a/support/src/main/java/org/fourthline/cling/support/avtransport/impl/AVTransportService.java +++ b/support/src/main/java/org/fourthline/cling/support/avtransport/impl/AVTransportService.java @@ -16,23 +16,13 @@ package org.fourthline.cling.support.avtransport.impl; import org.fourthline.cling.model.types.ErrorCode; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.avtransport.AVTransportErrorCode; import org.fourthline.cling.support.avtransport.AVTransportException; import org.fourthline.cling.support.avtransport.AbstractAVTransportService; import org.fourthline.cling.support.avtransport.impl.state.AbstractState; import org.fourthline.cling.support.lastchange.LastChange; -import org.fourthline.cling.support.model.AVTransport; -import org.fourthline.cling.support.model.DeviceCapabilities; -import org.fourthline.cling.support.model.MediaInfo; -import org.fourthline.cling.support.model.PlayMode; -import org.fourthline.cling.support.model.PositionInfo; -import org.fourthline.cling.support.model.RecordQualityMode; -import org.fourthline.cling.support.model.SeekMode; -import org.fourthline.cling.support.model.StorageMedium; -import org.fourthline.cling.support.model.TransportAction; -import org.fourthline.cling.support.model.TransportInfo; -import org.fourthline.cling.support.model.TransportSettings; +import org.fourthline.cling.support.model.*; import org.seamless.statemachine.StateMachineBuilder; import org.seamless.statemachine.TransitionException; @@ -70,7 +60,7 @@ * AVTransport. *

*

- * Override the {@link #createTransport(org.fourthline.cling.model.types.UnsignedIntegerFourBytes, org.fourthline.cling.support.lastchange.LastChange)} + * Override the {@link #createTransport(UnsignedIntegerEightBytes, org.fourthline.cling.support.lastchange.LastChange)} * method to utilize a subclass of AVTransport as your internal state holder. *

* @@ -99,7 +89,7 @@ public AVTransportService(Class stateMachineD this.transportClass = transportClass; } - public void setAVTransportURI(UnsignedIntegerFourBytes instanceId, + public void setAVTransportURI(UnsignedIntegerEightBytes instanceId, String currentURI, String currentURIMetaData) throws AVTransportException { @@ -120,7 +110,7 @@ public void setAVTransportURI(UnsignedIntegerFourBytes instanceId, } } - public void setNextAVTransportURI(UnsignedIntegerFourBytes instanceId, + public void setNextAVTransportURI(UnsignedIntegerEightBytes instanceId, String nextURI, String nextURIMetaData) throws AVTransportException { @@ -141,7 +131,7 @@ public void setNextAVTransportURI(UnsignedIntegerFourBytes instanceId, } } - public void setPlayMode(UnsignedIntegerFourBytes instanceId, String newPlayMode) throws AVTransportException { + public void setPlayMode(UnsignedIntegerEightBytes instanceId, String newPlayMode) throws AVTransportException { AVTransport transport = findStateMachine(instanceId).getCurrentState().getTransport(); try { transport.setTransportSettings( @@ -157,7 +147,7 @@ public void setPlayMode(UnsignedIntegerFourBytes instanceId, String newPlayMode) } } - public void setRecordQualityMode(UnsignedIntegerFourBytes instanceId, String newRecordQualityMode) throws AVTransportException { + public void setRecordQualityMode(UnsignedIntegerEightBytes instanceId, String newRecordQualityMode) throws AVTransportException { AVTransport transport = findStateMachine(instanceId).getCurrentState().getTransport(); try { transport.setTransportSettings( @@ -173,27 +163,27 @@ public void setRecordQualityMode(UnsignedIntegerFourBytes instanceId, String new } } - public MediaInfo getMediaInfo(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + public MediaInfo getMediaInfo(UnsignedIntegerEightBytes instanceId) throws AVTransportException { return findStateMachine(instanceId).getCurrentState().getTransport().getMediaInfo(); } - public TransportInfo getTransportInfo(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + public TransportInfo getTransportInfo(UnsignedIntegerEightBytes instanceId) throws AVTransportException { return findStateMachine(instanceId).getCurrentState().getTransport().getTransportInfo(); } - public PositionInfo getPositionInfo(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + public PositionInfo getPositionInfo(UnsignedIntegerEightBytes instanceId) throws AVTransportException { return findStateMachine(instanceId).getCurrentState().getTransport().getPositionInfo(); } - public DeviceCapabilities getDeviceCapabilities(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + public DeviceCapabilities getDeviceCapabilities(UnsignedIntegerEightBytes instanceId) throws AVTransportException { return findStateMachine(instanceId).getCurrentState().getTransport().getDeviceCapabilities(); } - public TransportSettings getTransportSettings(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + public TransportSettings getTransportSettings(UnsignedIntegerEightBytes instanceId) throws AVTransportException { return findStateMachine(instanceId).getCurrentState().getTransport().getTransportSettings(); } - public void stop(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + public void stop(UnsignedIntegerEightBytes instanceId) throws AVTransportException { try { findStateMachine(instanceId).stop(); } catch (TransitionException ex) { @@ -201,7 +191,7 @@ public void stop(UnsignedIntegerFourBytes instanceId) throws AVTransportExceptio } } - public void play(UnsignedIntegerFourBytes instanceId, String speed) throws AVTransportException { + public void play(UnsignedIntegerEightBytes instanceId, String speed) throws AVTransportException { try { findStateMachine(instanceId).play(speed); } catch (TransitionException ex) { @@ -209,7 +199,7 @@ public void play(UnsignedIntegerFourBytes instanceId, String speed) throws AVTra } } - public void pause(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + public void pause(UnsignedIntegerEightBytes instanceId) throws AVTransportException { try { findStateMachine(instanceId).pause(); } catch (TransitionException ex) { @@ -217,7 +207,7 @@ public void pause(UnsignedIntegerFourBytes instanceId) throws AVTransportExcepti } } - public void record(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + public void record(UnsignedIntegerEightBytes instanceId) throws AVTransportException { try { findStateMachine(instanceId).record(); } catch (TransitionException ex) { @@ -225,7 +215,7 @@ public void record(UnsignedIntegerFourBytes instanceId) throws AVTransportExcept } } - public void seek(UnsignedIntegerFourBytes instanceId, String unit, String target) throws AVTransportException { + public void seek(UnsignedIntegerEightBytes instanceId, String unit, String target) throws AVTransportException { SeekMode seekMode; try { seekMode = SeekMode.valueOrExceptionOf(unit); @@ -242,7 +232,7 @@ public void seek(UnsignedIntegerFourBytes instanceId, String unit, String target } } - public void next(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + public void next(UnsignedIntegerEightBytes instanceId) throws AVTransportException { try { findStateMachine(instanceId).next(); } catch (TransitionException ex) { @@ -250,7 +240,7 @@ public void next(UnsignedIntegerFourBytes instanceId) throws AVTransportExceptio } } - public void previous(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + public void previous(UnsignedIntegerEightBytes instanceId) throws AVTransportException { try { findStateMachine(instanceId).previous(); } catch (TransitionException ex) { @@ -259,7 +249,7 @@ public void previous(UnsignedIntegerFourBytes instanceId) throws AVTransportExce } @Override - protected TransportAction[] getCurrentTransportActions(UnsignedIntegerFourBytes instanceId) throws Exception { + protected TransportAction[] getCurrentTransportActions(UnsignedIntegerEightBytes instanceId) throws Exception { AVTransportStateMachine stateMachine = findStateMachine(instanceId); try { return stateMachine.getCurrentState().getCurrentTransportActions(); @@ -269,23 +259,23 @@ protected TransportAction[] getCurrentTransportActions(UnsignedIntegerFourBytes } @Override - public UnsignedIntegerFourBytes[] getCurrentInstanceIds() { + public UnsignedIntegerEightBytes[] getCurrentInstanceIds() { synchronized (stateMachines) { - UnsignedIntegerFourBytes[] ids = new UnsignedIntegerFourBytes[stateMachines.size()]; + UnsignedIntegerEightBytes[] ids = new UnsignedIntegerEightBytes[stateMachines.size()]; int i = 0; for (Long id : stateMachines.keySet()) { - ids[i] = new UnsignedIntegerFourBytes(id); + ids[i] = new UnsignedIntegerEightBytes(id); i++; } return ids; } } - protected AVTransportStateMachine findStateMachine(UnsignedIntegerFourBytes instanceId) throws AVTransportException { + protected AVTransportStateMachine findStateMachine(UnsignedIntegerEightBytes instanceId) throws AVTransportException { return findStateMachine(instanceId, true); } - protected AVTransportStateMachine findStateMachine(UnsignedIntegerFourBytes instanceId, boolean createDefaultTransport) throws AVTransportException { + protected AVTransportStateMachine findStateMachine(UnsignedIntegerEightBytes instanceId, boolean createDefaultTransport) throws AVTransportException { synchronized (stateMachines) { long id = instanceId.getValue(); AVTransportStateMachine stateMachine = stateMachines.get(id); @@ -301,7 +291,7 @@ protected AVTransportStateMachine findStateMachine(UnsignedIntegerFourBytes inst } } - protected AVTransportStateMachine createStateMachine(UnsignedIntegerFourBytes instanceId) { + protected AVTransportStateMachine createStateMachine(UnsignedIntegerEightBytes instanceId) { // Create a proxy that delegates all calls to the right state implementation, working on the T state return StateMachineBuilder.build( stateMachineDefinition, @@ -311,7 +301,7 @@ protected AVTransportStateMachine createStateMachine(UnsignedIntegerFourBytes in ); } - protected AVTransport createTransport(UnsignedIntegerFourBytes instanceId, LastChange lastChange) { + protected AVTransport createTransport(UnsignedIntegerEightBytes instanceId, LastChange lastChange) { return new AVTransport(instanceId, lastChange, StorageMedium.NETWORK); } diff --git a/support/src/main/java/org/fourthline/cling/support/avtransport/lastchange/AVTransportVariable.java b/support/src/main/java/org/fourthline/cling/support/avtransport/lastchange/AVTransportVariable.java index dc943241d..1c936efd8 100644 --- a/support/src/main/java/org/fourthline/cling/support/avtransport/lastchange/AVTransportVariable.java +++ b/support/src/main/java/org/fourthline/cling/support/avtransport/lastchange/AVTransportVariable.java @@ -15,26 +15,17 @@ package org.fourthline.cling.support.avtransport.lastchange; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.InvalidValueException; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; +import org.fourthline.cling.support.lastchange.*; import org.fourthline.cling.support.model.PlayMode; import org.fourthline.cling.support.model.RecordQualityMode; -import org.fourthline.cling.support.model.TransportAction; import org.fourthline.cling.support.model.StorageMedium; -import org.fourthline.cling.support.lastchange.EventedValue; -import org.fourthline.cling.support.lastchange.EventedValueEnum; -import org.fourthline.cling.support.lastchange.EventedValueEnumArray; -import org.fourthline.cling.support.lastchange.EventedValueString; -import org.fourthline.cling.support.lastchange.EventedValueURI; -import org.fourthline.cling.support.lastchange.EventedValueUnsignedIntegerFourBytes; +import org.fourthline.cling.support.model.TransportAction; import java.net.URI; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; import java.util.regex.Pattern; -import org.fourthline.cling.model.types.InvalidValueException; /** * @author Christian Bauer @@ -224,7 +215,7 @@ protected RecordQualityMode[] enumValueOf(String[] names) { } public static class NumberOfTracks extends EventedValueUnsignedIntegerFourBytes { - public NumberOfTracks(UnsignedIntegerFourBytes value) { + public NumberOfTracks(UnsignedIntegerEightBytes value) { super(value); } @@ -234,7 +225,7 @@ public NumberOfTracks(Map.Entry[] attributes) { } public static class CurrentTrack extends EventedValueUnsignedIntegerFourBytes { - public CurrentTrack(UnsignedIntegerFourBytes value) { + public CurrentTrack(UnsignedIntegerEightBytes value) { super(value); } diff --git a/support/src/main/java/org/fourthline/cling/support/connectionmanager/AbstractPeeringConnectionManagerService.java b/support/src/main/java/org/fourthline/cling/support/connectionmanager/AbstractPeeringConnectionManagerService.java index 371a41604..89c709546 100644 --- a/support/src/main/java/org/fourthline/cling/support/connectionmanager/AbstractPeeringConnectionManagerService.java +++ b/support/src/main/java/org/fourthline/cling/support/connectionmanager/AbstractPeeringConnectionManagerService.java @@ -25,7 +25,7 @@ import org.fourthline.cling.model.message.UpnpResponse; import org.fourthline.cling.model.meta.Service; import org.fourthline.cling.model.types.ErrorCode; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.model.types.csv.CSV; import org.fourthline.cling.support.connectionmanager.callback.ConnectionComplete; import org.fourthline.cling.support.connectionmanager.callback.PrepareForConnection; @@ -70,18 +70,18 @@ synchronized protected int getNewConnectionId() { } synchronized protected void storeConnection(ConnectionInfo info) { - CSV oldConnectionIDs = getCurrentConnectionIDs(); + CSV oldConnectionIDs = getCurrentConnectionIDs(); activeConnections.put(info.getConnectionID(), info); log.fine("Connection stored, firing event: " + info.getConnectionID()); - CSV newConnectionIDs = getCurrentConnectionIDs(); + CSV newConnectionIDs = getCurrentConnectionIDs(); getPropertyChangeSupport().firePropertyChange("CurrentConnectionIDs", oldConnectionIDs, newConnectionIDs); } synchronized protected void removeConnection(int connectionID) { - CSV oldConnectionIDs = getCurrentConnectionIDs(); + CSV oldConnectionIDs = getCurrentConnectionIDs(); activeConnections.remove(connectionID); log.fine("Connection removed, firing event: " + connectionID); - CSV newConnectionIDs = getCurrentConnectionIDs(); + CSV newConnectionIDs = getCurrentConnectionIDs(); getPropertyChangeSupport().firePropertyChange("CurrentConnectionIDs", oldConnectionIDs, newConnectionIDs); } diff --git a/support/src/main/java/org/fourthline/cling/support/connectionmanager/ConnectionManagerService.java b/support/src/main/java/org/fourthline/cling/support/connectionmanager/ConnectionManagerService.java index a99d17aa8..a0e5bdbb3 100644 --- a/support/src/main/java/org/fourthline/cling/support/connectionmanager/ConnectionManagerService.java +++ b/support/src/main/java/org/fourthline/cling/support/connectionmanager/ConnectionManagerService.java @@ -15,17 +15,10 @@ package org.fourthline.cling.support.connectionmanager; -import org.fourthline.cling.binding.annotations.UpnpAction; -import org.fourthline.cling.binding.annotations.UpnpInputArgument; -import org.fourthline.cling.binding.annotations.UpnpOutputArgument; -import org.fourthline.cling.binding.annotations.UpnpService; -import org.fourthline.cling.binding.annotations.UpnpServiceId; -import org.fourthline.cling.binding.annotations.UpnpServiceType; -import org.fourthline.cling.binding.annotations.UpnpStateVariable; -import org.fourthline.cling.binding.annotations.UpnpStateVariables; +import org.fourthline.cling.binding.annotations.*; import org.fourthline.cling.model.ServiceReference; import org.fourthline.cling.model.action.ActionException; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.model.types.csv.CSV; import org.fourthline.cling.model.types.csv.CSVUnsignedIntegerFourBytes; import org.fourthline.cling.support.model.ConnectionInfo; @@ -135,10 +128,10 @@ synchronized public ConnectionInfo getCurrentConnectionInfo(@UpnpInputArgument(n @UpnpAction(out = { @UpnpOutputArgument(name = "ConnectionIDs") }) - synchronized public CSV getCurrentConnectionIDs() { - CSV csv = new CSVUnsignedIntegerFourBytes(); + synchronized public CSV getCurrentConnectionIDs() { + CSV csv = new CSVUnsignedIntegerFourBytes(); for (Integer connectionID : activeConnections.keySet()) { - csv.add(new UnsignedIntegerFourBytes(connectionID)); + csv.add(new UnsignedIntegerEightBytes(connectionID)); } log.fine("Returning current connection IDs: " + csv.size()); return csv; diff --git a/support/src/main/java/org/fourthline/cling/support/contentdirectory/AbstractContentDirectoryService.java b/support/src/main/java/org/fourthline/cling/support/contentdirectory/AbstractContentDirectoryService.java index 57b41d54a..fa2f9145f 100644 --- a/support/src/main/java/org/fourthline/cling/support/contentdirectory/AbstractContentDirectoryService.java +++ b/support/src/main/java/org/fourthline/cling/support/contentdirectory/AbstractContentDirectoryService.java @@ -14,16 +14,9 @@ */ package org.fourthline.cling.support.contentdirectory; -import org.fourthline.cling.binding.annotations.UpnpAction; -import org.fourthline.cling.binding.annotations.UpnpInputArgument; -import org.fourthline.cling.binding.annotations.UpnpOutputArgument; -import org.fourthline.cling.binding.annotations.UpnpService; -import org.fourthline.cling.binding.annotations.UpnpServiceId; -import org.fourthline.cling.binding.annotations.UpnpServiceType; -import org.fourthline.cling.binding.annotations.UpnpStateVariable; -import org.fourthline.cling.binding.annotations.UpnpStateVariables; +import org.fourthline.cling.binding.annotations.*; import org.fourthline.cling.model.types.ErrorCode; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.model.types.csv.CSV; import org.fourthline.cling.model.types.csv.CSVString; import org.fourthline.cling.support.model.BrowseFlag; @@ -109,7 +102,7 @@ public abstract class AbstractContentDirectoryService { defaultValue = "0", eventMaximumRateMilliseconds = 200 ) - private UnsignedIntegerFourBytes systemUpdateID = new UnsignedIntegerFourBytes(0); + private UnsignedIntegerEightBytes systemUpdateID = new UnsignedIntegerEightBytes(0); final protected PropertyChangeSupport propertyChangeSupport; @@ -141,7 +134,7 @@ public CSV getSortCapabilities() { } @UpnpAction(out = @UpnpOutputArgument(name = "Id")) - synchronized public UnsignedIntegerFourBytes getSystemUpdateID() { + synchronized public UnsignedIntegerEightBytes getSystemUpdateID() { return systemUpdateID; } @@ -184,8 +177,8 @@ public BrowseResult browse( @UpnpInputArgument(name = "ObjectID", aliases = "ContainerID") String objectId, @UpnpInputArgument(name = "BrowseFlag") String browseFlag, @UpnpInputArgument(name = "Filter") String filter, - @UpnpInputArgument(name = "StartingIndex", stateVariable = "A_ARG_TYPE_Index") UnsignedIntegerFourBytes firstResult, - @UpnpInputArgument(name = "RequestedCount", stateVariable = "A_ARG_TYPE_Count") UnsignedIntegerFourBytes maxResults, + @UpnpInputArgument(name = "StartingIndex", stateVariable = "A_ARG_TYPE_Index") UnsignedIntegerEightBytes firstResult, + @UpnpInputArgument(name = "RequestedCount", stateVariable = "A_ARG_TYPE_Count") UnsignedIntegerEightBytes maxResults, @UpnpInputArgument(name = "SortCriteria") String orderBy) throws ContentDirectoryException { @@ -245,8 +238,8 @@ public BrowseResult search( @UpnpInputArgument(name = "ContainerID", stateVariable = "A_ARG_TYPE_ObjectID") String containerId, @UpnpInputArgument(name = "SearchCriteria") String searchCriteria, @UpnpInputArgument(name = "Filter") String filter, - @UpnpInputArgument(name = "StartingIndex", stateVariable = "A_ARG_TYPE_Index") UnsignedIntegerFourBytes firstResult, - @UpnpInputArgument(name = "RequestedCount", stateVariable = "A_ARG_TYPE_Count") UnsignedIntegerFourBytes maxResults, + @UpnpInputArgument(name = "StartingIndex", stateVariable = "A_ARG_TYPE_Index") UnsignedIntegerEightBytes firstResult, + @UpnpInputArgument(name = "RequestedCount", stateVariable = "A_ARG_TYPE_Count") UnsignedIntegerEightBytes maxResults, @UpnpInputArgument(name = "SortCriteria") String orderBy) throws ContentDirectoryException { diff --git a/support/src/main/java/org/fourthline/cling/support/contentdirectory/callback/Browse.java b/support/src/main/java/org/fourthline/cling/support/contentdirectory/callback/Browse.java index 60f15075c..df8e31250 100644 --- a/support/src/main/java/org/fourthline/cling/support/contentdirectory/callback/Browse.java +++ b/support/src/main/java/org/fourthline/cling/support/contentdirectory/callback/Browse.java @@ -20,7 +20,7 @@ import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.Service; import org.fourthline.cling.model.types.ErrorCode; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.contentdirectory.DIDLParser; import org.fourthline.cling.support.model.BrowseFlag; import org.fourthline.cling.support.model.BrowseResult; @@ -76,9 +76,9 @@ public Browse(Service service, String objectID, BrowseFlag flag, getActionInvocation().setInput("ObjectID", objectID); getActionInvocation().setInput("BrowseFlag", flag.toString()); getActionInvocation().setInput("Filter", filter); - getActionInvocation().setInput("StartingIndex", new UnsignedIntegerFourBytes(firstResult)); + getActionInvocation().setInput("StartingIndex", new UnsignedIntegerEightBytes(firstResult)); getActionInvocation().setInput("RequestedCount", - new UnsignedIntegerFourBytes(maxResults == null ? getDefaultMaxResults() : maxResults) + new UnsignedIntegerEightBytes(maxResults == null ? getDefaultMaxResults() : maxResults) ); getActionInvocation().setInput("SortCriteria", SortCriterion.toString(orderBy)); } @@ -94,9 +94,9 @@ public void success(ActionInvocation invocation) { BrowseResult result = new BrowseResult( invocation.getOutput("Result").getValue().toString(), - (UnsignedIntegerFourBytes) invocation.getOutput("NumberReturned").getValue(), - (UnsignedIntegerFourBytes) invocation.getOutput("TotalMatches").getValue(), - (UnsignedIntegerFourBytes) invocation.getOutput("UpdateID").getValue() + (UnsignedIntegerEightBytes) invocation.getOutput("NumberReturned").getValue(), + (UnsignedIntegerEightBytes) invocation.getOutput("TotalMatches").getValue(), + (UnsignedIntegerEightBytes) invocation.getOutput("UpdateID").getValue() ); boolean proceed = receivedRaw(invocation, result); diff --git a/support/src/main/java/org/fourthline/cling/support/contentdirectory/callback/GetSystemUpdateID.java b/support/src/main/java/org/fourthline/cling/support/contentdirectory/callback/GetSystemUpdateID.java index 71584b709..3034535bf 100644 --- a/support/src/main/java/org/fourthline/cling/support/contentdirectory/callback/GetSystemUpdateID.java +++ b/support/src/main/java/org/fourthline/cling/support/contentdirectory/callback/GetSystemUpdateID.java @@ -34,7 +34,7 @@ public void success(ActionInvocation invocation) { boolean ok = true; long id = 0; try { - id = Long.valueOf(invocation.getOutput("Id").getValue().toString()); // UnsignedIntegerFourBytes... + id = Long.valueOf(invocation.getOutput("Id").getValue().toString()); // UnsignedIntegerEightBytes... } catch (Exception ex) { invocation.setFailure(new ActionException(ErrorCode.ACTION_FAILED, "Can't parse GetSystemUpdateID response: " + ex, ex)); failure(invocation, null); diff --git a/support/src/main/java/org/fourthline/cling/support/contentdirectory/callback/Search.java b/support/src/main/java/org/fourthline/cling/support/contentdirectory/callback/Search.java index 819044fa6..7c275b52c 100644 --- a/support/src/main/java/org/fourthline/cling/support/contentdirectory/callback/Search.java +++ b/support/src/main/java/org/fourthline/cling/support/contentdirectory/callback/Search.java @@ -20,7 +20,7 @@ import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.Service; import org.fourthline.cling.model.types.ErrorCode; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.contentdirectory.DIDLParser; import org.fourthline.cling.support.model.DIDLContent; import org.fourthline.cling.support.model.SearchResult; @@ -74,10 +74,10 @@ public Search(Service service, String containerId, String searchCriteria, String getActionInvocation().setInput("ContainerID", containerId); getActionInvocation().setInput("SearchCriteria", searchCriteria); getActionInvocation().setInput("Filter", filter); - getActionInvocation().setInput("StartingIndex", new UnsignedIntegerFourBytes(firstResult)); + getActionInvocation().setInput("StartingIndex", new UnsignedIntegerEightBytes(firstResult)); getActionInvocation().setInput( "RequestedCount", - new UnsignedIntegerFourBytes(maxResults == null ? getDefaultMaxResults() : maxResults) + new UnsignedIntegerEightBytes(maxResults == null ? getDefaultMaxResults() : maxResults) ); getActionInvocation().setInput("SortCriteria", SortCriterion.toString(orderBy)); } @@ -94,9 +94,9 @@ public void success(ActionInvocation actionInvocation) { SearchResult result = new SearchResult( actionInvocation.getOutput("Result").getValue().toString(), - (UnsignedIntegerFourBytes) actionInvocation.getOutput("NumberReturned").getValue(), - (UnsignedIntegerFourBytes) actionInvocation.getOutput("TotalMatches").getValue(), - (UnsignedIntegerFourBytes) actionInvocation.getOutput("UpdateID").getValue()); + (UnsignedIntegerEightBytes) actionInvocation.getOutput("NumberReturned").getValue(), + (UnsignedIntegerEightBytes) actionInvocation.getOutput("TotalMatches").getValue(), + (UnsignedIntegerEightBytes) actionInvocation.getOutput("UpdateID").getValue()); boolean proceed = receivedRaw(actionInvocation, result); diff --git a/support/src/main/java/org/fourthline/cling/support/igd/callback/GetStatusInfo.java b/support/src/main/java/org/fourthline/cling/support/igd/callback/GetStatusInfo.java index 3a497a79d..6375def21 100644 --- a/support/src/main/java/org/fourthline/cling/support/igd/callback/GetStatusInfo.java +++ b/support/src/main/java/org/fourthline/cling/support/igd/callback/GetStatusInfo.java @@ -20,7 +20,7 @@ import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.Service; import org.fourthline.cling.model.types.ErrorCode; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.model.Connection; /** @@ -42,7 +42,7 @@ public void success(ActionInvocation invocation) { Connection.Error lastError = Connection.Error.valueOf(invocation.getOutput("NewLastConnectionError").getValue().toString()); - success(new Connection.StatusInfo(status, (UnsignedIntegerFourBytes) invocation.getOutput("NewUptime").getValue(), lastError)); + success(new Connection.StatusInfo(status, (UnsignedIntegerEightBytes) invocation.getOutput("NewUptime").getValue(), lastError)); } catch (Exception ex) { invocation.setFailure( diff --git a/support/src/main/java/org/fourthline/cling/support/lastchange/Event.java b/support/src/main/java/org/fourthline/cling/support/lastchange/Event.java index 5cc5d2784..ea60bd032 100644 --- a/support/src/main/java/org/fourthline/cling/support/lastchange/Event.java +++ b/support/src/main/java/org/fourthline/cling/support/lastchange/Event.java @@ -15,7 +15,7 @@ package org.fourthline.cling.support.lastchange; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import java.util.ArrayList; import java.util.Iterator; @@ -39,7 +39,7 @@ public List getInstanceIDs() { return instanceIDs; } - public InstanceID getInstanceID(UnsignedIntegerFourBytes id) { + public InstanceID getInstanceID(UnsignedIntegerEightBytes id) { for (InstanceID instanceID : instanceIDs) { if (instanceID.getId().equals(id)) return instanceID; } @@ -50,7 +50,7 @@ public void clear() { instanceIDs = new ArrayList<>(); } - public void setEventedValue(UnsignedIntegerFourBytes id, EventedValue ev) { + public void setEventedValue(UnsignedIntegerEightBytes id, EventedValue ev) { InstanceID instanceID = null; for (InstanceID i : getInstanceIDs()) { if (i.getId().equals(id)) { @@ -72,7 +72,7 @@ public void setEventedValue(UnsignedIntegerFourBytes id, EventedValue ev) { instanceID.getValues().add(ev); } - public EV getEventedValue(UnsignedIntegerFourBytes id, Class type) { + public EV getEventedValue(UnsignedIntegerEightBytes id, Class type) { for (InstanceID instanceID : getInstanceIDs()) { if (instanceID.getId().equals(id)) { for (EventedValue eventedValue : instanceID.getValues()) { diff --git a/support/src/main/java/org/fourthline/cling/support/lastchange/EventedValueUnsignedIntegerFourBytes.java b/support/src/main/java/org/fourthline/cling/support/lastchange/EventedValueUnsignedIntegerFourBytes.java index c7d53a498..ad11149b7 100644 --- a/support/src/main/java/org/fourthline/cling/support/lastchange/EventedValueUnsignedIntegerFourBytes.java +++ b/support/src/main/java/org/fourthline/cling/support/lastchange/EventedValueUnsignedIntegerFourBytes.java @@ -16,16 +16,16 @@ package org.fourthline.cling.support.lastchange; import org.fourthline.cling.model.types.Datatype; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import java.util.Map; /** * @author Christian Bauer */ -public class EventedValueUnsignedIntegerFourBytes extends EventedValue { +public class EventedValueUnsignedIntegerFourBytes extends EventedValue { - public EventedValueUnsignedIntegerFourBytes(UnsignedIntegerFourBytes value) { + public EventedValueUnsignedIntegerFourBytes(UnsignedIntegerEightBytes value) { super(value); } diff --git a/support/src/main/java/org/fourthline/cling/support/lastchange/InstanceID.java b/support/src/main/java/org/fourthline/cling/support/lastchange/InstanceID.java index b6592dc19..dc17b5408 100644 --- a/support/src/main/java/org/fourthline/cling/support/lastchange/InstanceID.java +++ b/support/src/main/java/org/fourthline/cling/support/lastchange/InstanceID.java @@ -15,7 +15,7 @@ package org.fourthline.cling.support.lastchange; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import java.util.ArrayList; import java.util.List; @@ -25,19 +25,19 @@ */ public class InstanceID { - protected UnsignedIntegerFourBytes id; + protected UnsignedIntegerEightBytes id; protected List values = new ArrayList<>(); - public InstanceID(UnsignedIntegerFourBytes id) { + public InstanceID(UnsignedIntegerEightBytes id) { this(id, new ArrayList()); } - public InstanceID(UnsignedIntegerFourBytes id, List values) { + public InstanceID(UnsignedIntegerEightBytes id, List values) { this.id = id; this.values = values; } - public UnsignedIntegerFourBytes getId() { + public UnsignedIntegerEightBytes getId() { return id; } diff --git a/support/src/main/java/org/fourthline/cling/support/lastchange/LastChange.java b/support/src/main/java/org/fourthline/cling/support/lastchange/LastChange.java index 1fb5f2b52..95f0a25af 100644 --- a/support/src/main/java/org/fourthline/cling/support/lastchange/LastChange.java +++ b/support/src/main/java/org/fourthline/cling/support/lastchange/LastChange.java @@ -15,7 +15,7 @@ package org.fourthline.cling.support.lastchange; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import java.beans.PropertyChangeSupport; import java.util.ArrayList; @@ -75,10 +75,10 @@ synchronized public void reset() { } synchronized public void setEventedValue(int instanceID, EventedValue... ev) { - setEventedValue(new UnsignedIntegerFourBytes(instanceID), ev); + setEventedValue(new UnsignedIntegerEightBytes(instanceID), ev); } - synchronized public void setEventedValue(UnsignedIntegerFourBytes instanceID, EventedValue... ev) { + synchronized public void setEventedValue(UnsignedIntegerEightBytes instanceID, EventedValue... ev) { for (EventedValue eventedValue : ev) { if (eventedValue != null) event.setEventedValue(instanceID, eventedValue); @@ -86,24 +86,24 @@ synchronized public void setEventedValue(UnsignedIntegerFourBytes instanceID, Ev } } - synchronized public UnsignedIntegerFourBytes[] getInstanceIDs() { - List list = new ArrayList<>(); + synchronized public UnsignedIntegerEightBytes[] getInstanceIDs() { + List list = new ArrayList<>(); for (InstanceID instanceID : event.getInstanceIDs()) { list.add(instanceID.getId()); } - return list.toArray(new UnsignedIntegerFourBytes[list.size()]); + return list.toArray(new UnsignedIntegerEightBytes[list.size()]); } - synchronized EventedValue[] getEventedValues(UnsignedIntegerFourBytes instanceID) { + synchronized EventedValue[] getEventedValues(UnsignedIntegerEightBytes instanceID) { InstanceID inst = event.getInstanceID(instanceID); return inst != null ? inst.getValues().toArray(new EventedValue[inst.getValues().size()]) : null; } synchronized public EV getEventedValue(int instanceID, Class type) { - return getEventedValue(new UnsignedIntegerFourBytes(instanceID), type); + return getEventedValue(new UnsignedIntegerEightBytes(instanceID), type); } - synchronized public EV getEventedValue(UnsignedIntegerFourBytes id, Class type) { + synchronized public EV getEventedValue(UnsignedIntegerEightBytes id, Class type) { return event.getEventedValue(id, type); } diff --git a/support/src/main/java/org/fourthline/cling/support/lastchange/LastChangeAwareServiceManager.java b/support/src/main/java/org/fourthline/cling/support/lastchange/LastChangeAwareServiceManager.java index a699252c6..60d136cb8 100644 --- a/support/src/main/java/org/fourthline/cling/support/lastchange/LastChangeAwareServiceManager.java +++ b/support/src/main/java/org/fourthline/cling/support/lastchange/LastChangeAwareServiceManager.java @@ -19,7 +19,7 @@ import org.fourthline.cling.model.meta.LocalService; import org.fourthline.cling.model.meta.StateVariable; import org.fourthline.cling.model.state.StateVariableValue; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import java.util.ArrayList; import java.util.Collection; @@ -86,15 +86,15 @@ protected Collection readInitialEventedStateVariableValues() LastChange lc = new LastChange(getLastChangeParser()); // Get the current "logical" instances of the service - UnsignedIntegerFourBytes[] ids = getImplementation().getCurrentInstanceIds(); + UnsignedIntegerEightBytes[] ids = getImplementation().getCurrentInstanceIds(); if (ids.length > 0) { - for (UnsignedIntegerFourBytes instanceId : ids) { + for (UnsignedIntegerEightBytes instanceId : ids) { // Iterate through all "logical" instances and ask them what their state is getImplementation().appendCurrentState(lc, instanceId); } } else { // Use the default "logical" instance with ID 0 - getImplementation().appendCurrentState(lc, new UnsignedIntegerFourBytes(0)); + getImplementation().appendCurrentState(lc, new UnsignedIntegerEightBytes(0)); } // Sum it all up and return it in the initial event to the GENA subscriber diff --git a/support/src/main/java/org/fourthline/cling/support/lastchange/LastChangeDelegator.java b/support/src/main/java/org/fourthline/cling/support/lastchange/LastChangeDelegator.java index 8503c346d..eb3dbcac8 100644 --- a/support/src/main/java/org/fourthline/cling/support/lastchange/LastChangeDelegator.java +++ b/support/src/main/java/org/fourthline/cling/support/lastchange/LastChangeDelegator.java @@ -15,7 +15,7 @@ package org.fourthline.cling.support.lastchange; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; /** * Any service implementation using the "LastChange" mechanism. @@ -30,11 +30,11 @@ */ public interface LastChangeDelegator { - public LastChange getLastChange(); + LastChange getLastChange(); - public void appendCurrentState(LastChange lc, UnsignedIntegerFourBytes instanceId) throws Exception; + void appendCurrentState(LastChange lc, UnsignedIntegerEightBytes instanceId) throws Exception; - public abstract UnsignedIntegerFourBytes[] getCurrentInstanceIds(); + UnsignedIntegerEightBytes[] getCurrentInstanceIds(); } diff --git a/support/src/main/java/org/fourthline/cling/support/lastchange/LastChangeParser.java b/support/src/main/java/org/fourthline/cling/support/lastchange/LastChangeParser.java index a62e2fd7e..ddbb7899e 100644 --- a/support/src/main/java/org/fourthline/cling/support/lastchange/LastChangeParser.java +++ b/support/src/main/java/org/fourthline/cling/support/lastchange/LastChangeParser.java @@ -15,24 +15,11 @@ package org.fourthline.cling.support.lastchange; -import static org.fourthline.cling.model.XMLUtil.appendNewElement; - -import java.io.InputStream; -import java.io.StringReader; -import java.lang.reflect.Constructor; -import java.util.Collections; -import java.util.Map; -import java.util.Set; -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.xml.parsers.DocumentBuilderFactory; - import org.fourthline.cling.model.XMLUtil; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.shared.AbstractMap; -import org.seamless.util.io.IO; import org.seamless.util.Exceptions; +import org.seamless.util.io.IO; import org.seamless.xml.DOMParser; import org.seamless.xml.SAXParser; import org.w3c.dom.Document; @@ -41,6 +28,18 @@ import org.xml.sax.InputSource; import org.xml.sax.SAXException; +import javax.xml.parsers.DocumentBuilderFactory; +import java.io.InputStream; +import java.io.StringReader; +import java.lang.reflect.Constructor; +import java.util.Collections; +import java.util.Map; +import java.util.Set; +import java.util.logging.Level; +import java.util.logging.Logger; + +import static org.fourthline.cling.model.XMLUtil.appendNewElement; + /** * Reads and writes the "LastChange" XML content. *

@@ -148,7 +147,7 @@ public void startElement(String uri, String localName, String qName, Attributes if (CONSTANTS.InstanceID.equals(localName)) { String valAttr = attributes.getValue(CONSTANTS.val.name()); if (valAttr != null) { - InstanceID instanceID = new InstanceID(new UnsignedIntegerFourBytes(valAttr)); + InstanceID instanceID = new InstanceID(new UnsignedIntegerEightBytes(valAttr)); getInstance().getInstanceIDs().add(instanceID); new InstanceIDHandler(instanceID, this); } diff --git a/support/src/main/java/org/fourthline/cling/support/model/AVTransport.java b/support/src/main/java/org/fourthline/cling/support/model/AVTransport.java index e3e953cd7..f1127f303 100644 --- a/support/src/main/java/org/fourthline/cling/support/model/AVTransport.java +++ b/support/src/main/java/org/fourthline/cling/support/model/AVTransport.java @@ -15,7 +15,7 @@ package org.fourthline.cling.support.model; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.lastchange.LastChange; /** @@ -25,19 +25,19 @@ */ public class AVTransport { - final protected UnsignedIntegerFourBytes instanceID; - final protected LastChange lastChange; - protected MediaInfo mediaInfo; - protected TransportInfo transportInfo; - protected PositionInfo positionInfo; - protected DeviceCapabilities deviceCapabilities; - protected TransportSettings transportSettings; + final protected UnsignedIntegerEightBytes instanceID; + final protected LastChange lastChange; + protected MediaInfo mediaInfo; + protected TransportInfo transportInfo; + protected PositionInfo positionInfo; + protected DeviceCapabilities deviceCapabilities; + protected TransportSettings transportSettings; - public AVTransport(UnsignedIntegerFourBytes instanceID, LastChange lastChange, StorageMedium possiblePlayMedium) { + public AVTransport(UnsignedIntegerEightBytes instanceID, LastChange lastChange, StorageMedium possiblePlayMedium) { this(instanceID, lastChange, new StorageMedium[]{possiblePlayMedium}); } - public AVTransport(UnsignedIntegerFourBytes instanceID, LastChange lastChange, StorageMedium[] possiblePlayMedia) { + public AVTransport(UnsignedIntegerEightBytes instanceID, LastChange lastChange, StorageMedium[] possiblePlayMedia) { this.instanceID = instanceID; this.lastChange = lastChange; setDeviceCapabilities(new DeviceCapabilities(possiblePlayMedia)); @@ -47,7 +47,7 @@ public AVTransport(UnsignedIntegerFourBytes instanceID, LastChange lastChange, S setTransportSettings(new TransportSettings()); } - public UnsignedIntegerFourBytes getInstanceId() { + public UnsignedIntegerEightBytes getInstanceId() { return instanceID; } diff --git a/support/src/main/java/org/fourthline/cling/support/model/BrowseResult.java b/support/src/main/java/org/fourthline/cling/support/model/BrowseResult.java index 825fccece..ab8912e17 100644 --- a/support/src/main/java/org/fourthline/cling/support/model/BrowseResult.java +++ b/support/src/main/java/org/fourthline/cling/support/model/BrowseResult.java @@ -15,7 +15,7 @@ package org.fourthline.cling.support.model; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; /** * @author Alessio Gaeta @@ -23,14 +23,14 @@ */ public class BrowseResult { - protected String result; - protected UnsignedIntegerFourBytes count; - protected UnsignedIntegerFourBytes totalMatches; - protected UnsignedIntegerFourBytes containerUpdateID; + protected String result; + protected UnsignedIntegerEightBytes count; + protected UnsignedIntegerEightBytes totalMatches; + protected UnsignedIntegerEightBytes containerUpdateID; - public BrowseResult(String result, UnsignedIntegerFourBytes count, - UnsignedIntegerFourBytes totalMatches, - UnsignedIntegerFourBytes containerUpdateID) { + public BrowseResult(String result, UnsignedIntegerEightBytes count, + UnsignedIntegerEightBytes totalMatches, + UnsignedIntegerEightBytes containerUpdateID) { this.result = result; this.count = count; this.totalMatches = totalMatches; @@ -44,9 +44,9 @@ public BrowseResult(String result, long count, long totalMatches) { public BrowseResult(String result, long count, long totalMatches, long updatedId) { this( result, - new UnsignedIntegerFourBytes(count), - new UnsignedIntegerFourBytes(totalMatches), - new UnsignedIntegerFourBytes(updatedId) + new UnsignedIntegerEightBytes(count), + new UnsignedIntegerEightBytes(totalMatches), + new UnsignedIntegerEightBytes(updatedId) ); } @@ -54,7 +54,7 @@ public String getResult() { return result; } - public UnsignedIntegerFourBytes getCount() { + public UnsignedIntegerEightBytes getCount() { return count; } @@ -62,7 +62,7 @@ public long getCountLong() { return count.getValue(); } - public UnsignedIntegerFourBytes getTotalMatches() { + public UnsignedIntegerEightBytes getTotalMatches() { return totalMatches; } @@ -70,7 +70,7 @@ public long getTotalMatchesLong() { return totalMatches.getValue(); } - public UnsignedIntegerFourBytes getContainerUpdateID() { + public UnsignedIntegerEightBytes getContainerUpdateID() { return containerUpdateID; } diff --git a/support/src/main/java/org/fourthline/cling/support/model/Connection.java b/support/src/main/java/org/fourthline/cling/support/model/Connection.java index 3f7cc7a52..909eea596 100644 --- a/support/src/main/java/org/fourthline/cling/support/model/Connection.java +++ b/support/src/main/java/org/fourthline/cling/support/model/Connection.java @@ -15,7 +15,7 @@ package org.fourthline.cling.support.model; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; /** * @author Christian Bauer @@ -28,7 +28,7 @@ static public class StatusInfo { private long uptimeSeconds; private Error lastError; - public StatusInfo(Status status, UnsignedIntegerFourBytes uptime, Error lastError) { + public StatusInfo(Status status, UnsignedIntegerEightBytes uptime, Error lastError) { this(status, uptime.getValue(), lastError); } @@ -46,8 +46,8 @@ public long getUptimeSeconds() { return uptimeSeconds; } - public UnsignedIntegerFourBytes getUptime() { - return new UnsignedIntegerFourBytes(getUptimeSeconds()); + public UnsignedIntegerEightBytes getUptime() { + return new UnsignedIntegerEightBytes(getUptimeSeconds()); } public Error getLastError() { @@ -63,9 +63,8 @@ public boolean equals(Object o) { if (uptimeSeconds != that.uptimeSeconds) return false; if (lastError != that.lastError) return false; - if (status != that.status) return false; + return status == that.status; - return true; } @Override diff --git a/support/src/main/java/org/fourthline/cling/support/model/MediaInfo.java b/support/src/main/java/org/fourthline/cling/support/model/MediaInfo.java index 50a90e44a..bb4596322 100644 --- a/support/src/main/java/org/fourthline/cling/support/model/MediaInfo.java +++ b/support/src/main/java/org/fourthline/cling/support/model/MediaInfo.java @@ -15,8 +15,8 @@ package org.fourthline.cling.support.model; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; import org.fourthline.cling.model.action.ActionArgumentValue; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import java.util.Map; @@ -30,11 +30,11 @@ public class MediaInfo { private String nextURI = "NOT_IMPLEMENTED"; private String nextURIMetaData = "NOT_IMPLEMENTED"; - private UnsignedIntegerFourBytes numberOfTracks = new UnsignedIntegerFourBytes(0); - private String mediaDuration = "00:00:00"; - private StorageMedium playMedium = StorageMedium.NONE; - private StorageMedium recordMedium = StorageMedium.NOT_IMPLEMENTED; - private RecordMediumWriteStatus writeStatus = RecordMediumWriteStatus.NOT_IMPLEMENTED; + private UnsignedIntegerEightBytes numberOfTracks = new UnsignedIntegerEightBytes(0); + private String mediaDuration = "00:00:00"; + private StorageMedium playMedium = StorageMedium.NONE; + private StorageMedium recordMedium = StorageMedium.NOT_IMPLEMENTED; + private RecordMediumWriteStatus writeStatus = RecordMediumWriteStatus.NOT_IMPLEMENTED; public MediaInfo() { } @@ -46,7 +46,7 @@ public MediaInfo(Map args) { (String) args.get("NextURI").getValue(), (String) args.get("NextURIMetaData").getValue(), - (UnsignedIntegerFourBytes) args.get("NrTracks").getValue(), + (UnsignedIntegerEightBytes) args.get("NrTracks").getValue(), (String) args.get("MediaDuration").getValue(), StorageMedium.valueOrVendorSpecificOf((String) args.get("PlayMedium").getValue()), StorageMedium.valueOrVendorSpecificOf((String) args.get("RecordMedium").getValue()), @@ -60,7 +60,7 @@ public MediaInfo(String currentURI, String currentURIMetaData) { } public MediaInfo(String currentURI, String currentURIMetaData, - UnsignedIntegerFourBytes numberOfTracks, String mediaDuration, + UnsignedIntegerEightBytes numberOfTracks, String mediaDuration, StorageMedium playMedium) { this.currentURI = currentURI; this.currentURIMetaData = currentURIMetaData; @@ -70,7 +70,7 @@ public MediaInfo(String currentURI, String currentURIMetaData, } public MediaInfo(String currentURI, String currentURIMetaData, - UnsignedIntegerFourBytes numberOfTracks, String mediaDuration, + UnsignedIntegerEightBytes numberOfTracks, String mediaDuration, StorageMedium playMedium, StorageMedium recordMedium, RecordMediumWriteStatus writeStatus) { this.currentURI = currentURI; @@ -84,7 +84,7 @@ public MediaInfo(String currentURI, String currentURIMetaData, public MediaInfo(String currentURI, String currentURIMetaData, String nextURI, String nextURIMetaData, - UnsignedIntegerFourBytes numberOfTracks, String mediaDuration, + UnsignedIntegerEightBytes numberOfTracks, String mediaDuration, StorageMedium playMedium) { this.currentURI = currentURI; this.currentURIMetaData = currentURIMetaData; @@ -97,7 +97,7 @@ public MediaInfo(String currentURI, String currentURIMetaData, public MediaInfo(String currentURI, String currentURIMetaData, String nextURI, String nextURIMetaData, - UnsignedIntegerFourBytes numberOfTracks, String mediaDuration, + UnsignedIntegerEightBytes numberOfTracks, String mediaDuration, StorageMedium playMedium, StorageMedium recordMedium, RecordMediumWriteStatus writeStatus) { this.currentURI = currentURI; @@ -127,7 +127,7 @@ public String getNextURIMetaData() { return nextURIMetaData; } - public UnsignedIntegerFourBytes getNumberOfTracks() { + public UnsignedIntegerEightBytes getNumberOfTracks() { return numberOfTracks; } diff --git a/support/src/main/java/org/fourthline/cling/support/model/PortMapping.java b/support/src/main/java/org/fourthline/cling/support/model/PortMapping.java index ac00fef09..1784f9652 100644 --- a/support/src/main/java/org/fourthline/cling/support/model/PortMapping.java +++ b/support/src/main/java/org/fourthline/cling/support/model/PortMapping.java @@ -17,7 +17,7 @@ import org.fourthline.cling.model.action.ActionArgumentValue; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; import java.util.Map; @@ -32,14 +32,14 @@ public enum Protocol { TCP } - private boolean enabled; - private UnsignedIntegerFourBytes leaseDurationSeconds; - private String remoteHost; - private UnsignedIntegerTwoBytes externalPort; - private UnsignedIntegerTwoBytes internalPort; - private String internalClient; - private Protocol protocol; - private String description; + private boolean enabled; + private UnsignedIntegerEightBytes leaseDurationSeconds; + private String remoteHost; + private UnsignedIntegerTwoBytes externalPort; + private UnsignedIntegerTwoBytes internalPort; + private String internalClient; + private Protocol protocol; + private String description; public PortMapping() { } @@ -48,7 +48,7 @@ public PortMapping() { public PortMapping(Map> map) { this( (Boolean) map.get("NewEnabled").getValue(), - (UnsignedIntegerFourBytes) map.get("NewLeaseDuration").getValue(), + (UnsignedIntegerEightBytes) map.get("NewLeaseDuration").getValue(), (String) map.get("NewRemoteHost").getValue(), (UnsignedIntegerTwoBytes) map.get("NewExternalPort").getValue(), (UnsignedIntegerTwoBytes) map.get("NewInternalPort").getValue(), @@ -61,7 +61,7 @@ public PortMapping(Map> map) { public PortMapping(int port, String internalClient, Protocol protocol) { this( true, - new UnsignedIntegerFourBytes(0), + new UnsignedIntegerEightBytes(0), null, new UnsignedIntegerTwoBytes(port), new UnsignedIntegerTwoBytes(port), @@ -74,7 +74,7 @@ public PortMapping(int port, String internalClient, Protocol protocol) { public PortMapping(int port, String internalClient, Protocol protocol, String description) { this( true, - new UnsignedIntegerFourBytes(0), + new UnsignedIntegerEightBytes(0), null, new UnsignedIntegerTwoBytes(port), new UnsignedIntegerTwoBytes(port), @@ -87,7 +87,7 @@ public PortMapping(int port, String internalClient, Protocol protocol, String de public PortMapping(String remoteHost, UnsignedIntegerTwoBytes externalPort, Protocol protocol) { this( true, - new UnsignedIntegerFourBytes(0), + new UnsignedIntegerEightBytes(0), remoteHost, externalPort, null, @@ -97,7 +97,7 @@ public PortMapping(String remoteHost, UnsignedIntegerTwoBytes externalPort, Prot ); } - public PortMapping(boolean enabled, UnsignedIntegerFourBytes leaseDurationSeconds, String remoteHost, UnsignedIntegerTwoBytes externalPort, + public PortMapping(boolean enabled, UnsignedIntegerEightBytes leaseDurationSeconds, String remoteHost, UnsignedIntegerTwoBytes externalPort, UnsignedIntegerTwoBytes internalPort, String internalClient, Protocol protocol, String description) { this.enabled = enabled; this.leaseDurationSeconds = leaseDurationSeconds; @@ -117,11 +117,11 @@ public void setEnabled(boolean enabled) { this.enabled = enabled; } - public UnsignedIntegerFourBytes getLeaseDurationSeconds() { + public UnsignedIntegerEightBytes getLeaseDurationSeconds() { return leaseDurationSeconds; } - public void setLeaseDurationSeconds(UnsignedIntegerFourBytes leaseDurationSeconds) { + public void setLeaseDurationSeconds(UnsignedIntegerEightBytes leaseDurationSeconds) { this.leaseDurationSeconds = leaseDurationSeconds; } diff --git a/support/src/main/java/org/fourthline/cling/support/model/PositionInfo.java b/support/src/main/java/org/fourthline/cling/support/model/PositionInfo.java index b97172e3c..bb68b5c1d 100644 --- a/support/src/main/java/org/fourthline/cling/support/model/PositionInfo.java +++ b/support/src/main/java/org/fourthline/cling/support/model/PositionInfo.java @@ -17,7 +17,7 @@ import org.fourthline.cling.model.ModelUtil; import org.fourthline.cling.model.action.ActionArgumentValue; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import java.util.Map; @@ -26,21 +26,21 @@ */ public class PositionInfo { - private UnsignedIntegerFourBytes track = new UnsignedIntegerFourBytes(0); - private String trackDuration = "00:00:00"; - private String trackMetaData = "NOT_IMPLEMENTED"; - private String trackURI = ""; - private String relTime = "00:00:00"; - private String absTime = "00:00:00"; // TODO: MORE VALUES IN DOMAIN! - private int relCount = Integer.MAX_VALUE; // Indicates that we don't support this - private int absCount = Integer.MAX_VALUE; + private UnsignedIntegerEightBytes track = new UnsignedIntegerEightBytes(0); + private String trackDuration = "00:00:00"; + private String trackMetaData = "NOT_IMPLEMENTED"; + private String trackURI = ""; + private String relTime = "00:00:00"; + private String absTime = "00:00:00"; // TODO: MORE VALUES IN DOMAIN! + private int relCount = Integer.MAX_VALUE; // Indicates that we don't support this + private int absCount = Integer.MAX_VALUE; public PositionInfo() { } public PositionInfo(Map args) { this( - ((UnsignedIntegerFourBytes) args.get("Track").getValue()).getValue(), + ((UnsignedIntegerEightBytes) args.get("Track").getValue()).getValue(), (String) args.get("TrackDuration").getValue(), (String) args.get("TrackMetaData").getValue(), (String) args.get("TrackURI").getValue(), @@ -75,7 +75,7 @@ public PositionInfo(PositionInfo copy, long relTimeSeconds, long absTimeSeconds) public PositionInfo(long track, String trackDuration, String trackURI, String relTime, String absTime) { - this.track = new UnsignedIntegerFourBytes(track); + this.track = new UnsignedIntegerEightBytes(track); this.trackDuration = trackDuration; this.trackURI = trackURI; this.relTime = relTime; @@ -85,7 +85,7 @@ public PositionInfo(long track, String trackDuration, String 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.track = new UnsignedIntegerEightBytes(track); this.trackDuration = trackDuration; this.trackMetaData = trackMetaData; this.trackURI = trackURI; @@ -96,12 +96,12 @@ public PositionInfo(long track, String trackDuration, } public PositionInfo(long track, String trackMetaData, String trackURI) { - this.track = new UnsignedIntegerFourBytes(track); + this.track = new UnsignedIntegerEightBytes(track); this.trackMetaData = trackMetaData; this.trackURI = trackURI; } - public UnsignedIntegerFourBytes getTrack() { + public UnsignedIntegerEightBytes getTrack() { return track; } diff --git a/support/src/main/java/org/fourthline/cling/support/model/SearchResult.java b/support/src/main/java/org/fourthline/cling/support/model/SearchResult.java index f2ff19bd2..a63518219 100644 --- a/support/src/main/java/org/fourthline/cling/support/model/SearchResult.java +++ b/support/src/main/java/org/fourthline/cling/support/model/SearchResult.java @@ -15,7 +15,7 @@ package org.fourthline.cling.support.model; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; /** * @author TK Kocheran <rfkrocktk@gmail.com> @@ -24,15 +24,15 @@ public class SearchResult { protected String result; - protected UnsignedIntegerFourBytes count; + protected UnsignedIntegerEightBytes count; - protected UnsignedIntegerFourBytes totalMatches; + protected UnsignedIntegerEightBytes totalMatches; - protected UnsignedIntegerFourBytes containerUpdateID; + protected UnsignedIntegerEightBytes containerUpdateID; - public SearchResult(String result, UnsignedIntegerFourBytes count, - UnsignedIntegerFourBytes totalMatches, - UnsignedIntegerFourBytes containerUpdateID) { + public SearchResult(String result, UnsignedIntegerEightBytes count, + UnsignedIntegerEightBytes totalMatches, + UnsignedIntegerEightBytes containerUpdateID) { this.result = result; this.count = count; this.totalMatches = totalMatches; @@ -46,9 +46,9 @@ public SearchResult(String result, long count, long totalMatches) { public SearchResult(String result, long count, long totalMatches, long updateID) { this( result, - new UnsignedIntegerFourBytes(count), - new UnsignedIntegerFourBytes(totalMatches), - new UnsignedIntegerFourBytes(updateID) + new UnsignedIntegerEightBytes(count), + new UnsignedIntegerEightBytes(totalMatches), + new UnsignedIntegerEightBytes(updateID) ); } @@ -56,7 +56,7 @@ public String getResult() { return result; } - public UnsignedIntegerFourBytes getCount() { + public UnsignedIntegerEightBytes getCount() { return count; } @@ -64,7 +64,7 @@ public long getCountLong() { return count.getValue(); } - public UnsignedIntegerFourBytes getTotalMatches() { + public UnsignedIntegerEightBytes getTotalMatches() { return totalMatches; } @@ -72,7 +72,7 @@ public long getTotalMatchesLong() { return totalMatches.getValue(); } - public UnsignedIntegerFourBytes getContainerUpdateID() { + public UnsignedIntegerEightBytes getContainerUpdateID() { return containerUpdateID; } diff --git a/support/src/main/java/org/fourthline/cling/support/model/dlna/message/header/BufferBytesHeader.java b/support/src/main/java/org/fourthline/cling/support/model/dlna/message/header/BufferBytesHeader.java index 284d1ab12..c52f6d42f 100644 --- a/support/src/main/java/org/fourthline/cling/support/model/dlna/message/header/BufferBytesHeader.java +++ b/support/src/main/java/org/fourthline/cling/support/model/dlna/message/header/BufferBytesHeader.java @@ -15,21 +15,21 @@ package org.fourthline.cling.support.model.dlna.message.header; import org.fourthline.cling.model.message.header.InvalidHeaderException; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; /** * @author Mario Franco */ -public class BufferBytesHeader extends DLNAHeader { +public class BufferBytesHeader extends DLNAHeader { public BufferBytesHeader() { - setValue(new UnsignedIntegerFourBytes(0L)); + setValue(new UnsignedIntegerEightBytes(0L)); } @Override public void setString(String s) throws InvalidHeaderException { try { - setValue(new UnsignedIntegerFourBytes(s)); + setValue(new UnsignedIntegerEightBytes(s)); return; } catch (NumberFormatException numberFormatException) { } diff --git a/support/src/main/java/org/fourthline/cling/support/renderingcontrol/AbstractAudioRenderingControl.java b/support/src/main/java/org/fourthline/cling/support/renderingcontrol/AbstractAudioRenderingControl.java index a1f52e881..ea56ff3e2 100644 --- a/support/src/main/java/org/fourthline/cling/support/renderingcontrol/AbstractAudioRenderingControl.java +++ b/support/src/main/java/org/fourthline/cling/support/renderingcontrol/AbstractAudioRenderingControl.java @@ -15,28 +15,16 @@ package org.fourthline.cling.support.renderingcontrol; -import org.fourthline.cling.binding.annotations.UpnpAction; -import org.fourthline.cling.binding.annotations.UpnpInputArgument; -import org.fourthline.cling.binding.annotations.UpnpOutputArgument; -import org.fourthline.cling.binding.annotations.UpnpService; -import org.fourthline.cling.binding.annotations.UpnpServiceId; -import org.fourthline.cling.binding.annotations.UpnpServiceType; -import org.fourthline.cling.binding.annotations.UpnpStateVariable; -import org.fourthline.cling.binding.annotations.UpnpStateVariables; +import org.fourthline.cling.binding.annotations.*; import org.fourthline.cling.model.types.ErrorCode; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; import org.fourthline.cling.support.lastchange.LastChange; import org.fourthline.cling.support.lastchange.LastChangeDelegator; import org.fourthline.cling.support.model.Channel; import org.fourthline.cling.support.model.PresetName; import org.fourthline.cling.support.model.VolumeDBRange; -import org.fourthline.cling.support.renderingcontrol.lastchange.ChannelLoudness; -import org.fourthline.cling.support.renderingcontrol.lastchange.ChannelMute; -import org.fourthline.cling.support.renderingcontrol.lastchange.ChannelVolume; -import org.fourthline.cling.support.renderingcontrol.lastchange.ChannelVolumeDB; -import org.fourthline.cling.support.renderingcontrol.lastchange.RenderingControlLastChangeParser; -import org.fourthline.cling.support.renderingcontrol.lastchange.RenderingControlVariable; +import org.fourthline.cling.support.renderingcontrol.lastchange.*; import java.beans.PropertyChangeSupport; @@ -120,7 +108,7 @@ public LastChange getLastChange() { } @Override - public void appendCurrentState(LastChange lc, UnsignedIntegerFourBytes instanceId) throws Exception { + public void appendCurrentState(LastChange lc, UnsignedIntegerEightBytes instanceId) throws Exception { for (Channel channel : getCurrentChannels()) { String channelString = channel.name(); lc.setEventedValue( @@ -138,46 +126,46 @@ public PropertyChangeSupport getPropertyChangeSupport() { return propertyChangeSupport; } - public static UnsignedIntegerFourBytes getDefaultInstanceID() { - return new UnsignedIntegerFourBytes(0); + public static UnsignedIntegerEightBytes getDefaultInstanceID() { + return new UnsignedIntegerEightBytes(0); } @UpnpAction(out = @UpnpOutputArgument(name = "CurrentPresetNameList", stateVariable = "PresetNameList")) - public String listPresets(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId) throws RenderingControlException { + public String listPresets(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId) throws RenderingControlException { return PresetName.FactoryDefaults.toString(); } @UpnpAction - public void selectPreset(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId, + public void selectPreset(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId, @UpnpInputArgument(name = "PresetName") String presetName) throws RenderingControlException { } @UpnpAction(out = @UpnpOutputArgument(name = "CurrentMute", stateVariable = "Mute")) - public abstract boolean getMute(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId, + public abstract boolean getMute(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId, @UpnpInputArgument(name = "Channel") String channelName) throws RenderingControlException; @UpnpAction - public abstract void setMute(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId, + public abstract void setMute(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId, @UpnpInputArgument(name = "Channel") String channelName, @UpnpInputArgument(name = "DesiredMute", stateVariable = "Mute") boolean desiredMute) throws RenderingControlException; @UpnpAction(out = @UpnpOutputArgument(name = "CurrentVolume", stateVariable = "Volume")) - public abstract UnsignedIntegerTwoBytes getVolume(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId, + public abstract UnsignedIntegerTwoBytes getVolume(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId, @UpnpInputArgument(name = "Channel") String channelName) throws RenderingControlException; @UpnpAction - public abstract void setVolume(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId, + public abstract void setVolume(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId, @UpnpInputArgument(name = "Channel") String channelName, @UpnpInputArgument(name = "DesiredVolume", stateVariable = "Volume") UnsignedIntegerTwoBytes desiredVolume) throws RenderingControlException; @UpnpAction(out = @UpnpOutputArgument(name = "CurrentVolume", stateVariable = "VolumeDB")) - public Integer getVolumeDB(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId, + public Integer getVolumeDB(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId, @UpnpInputArgument(name = "Channel") String channelName) throws RenderingControlException { return 0; } @UpnpAction - public void setVolumeDB(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId, + public void setVolumeDB(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId, @UpnpInputArgument(name = "Channel") String channelName, @UpnpInputArgument(name = "DesiredVolume", stateVariable = "VolumeDB") Integer desiredVolumeDB) throws RenderingControlException { /* @@ -191,19 +179,19 @@ public void setVolumeDB(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerF @UpnpOutputArgument(name = "MinValue", stateVariable = "VolumeDB", getterName = "getMinValue"), @UpnpOutputArgument(name = "MaxValue", stateVariable = "VolumeDB", getterName = "getMaxValue") }) - public VolumeDBRange getVolumeDBRange(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId, + public VolumeDBRange getVolumeDBRange(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId, @UpnpInputArgument(name = "Channel") String channelName) throws RenderingControlException { return new VolumeDBRange(0, 0); } @UpnpAction(out = @UpnpOutputArgument(name = "CurrentLoudness", stateVariable = "Loudness")) - public boolean getLoudness(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId, + public boolean getLoudness(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId, @UpnpInputArgument(name = "Channel") String channelName) throws RenderingControlException { return false; } @UpnpAction - public void setLoudness(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId, + public void setLoudness(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerEightBytes instanceId, @UpnpInputArgument(name = "Channel") String channelName, @UpnpInputArgument(name = "DesiredLoudness", stateVariable = "Loudness") boolean desiredLoudness) throws RenderingControlException { /* diff --git a/support/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/GetMute.java b/support/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/GetMute.java index 3f0bc9a7f..9b18eaafe 100644 --- a/support/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/GetMute.java +++ b/support/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/GetMute.java @@ -18,7 +18,7 @@ import org.fourthline.cling.controlpoint.ActionCallback; import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.model.Channel; import java.util.logging.Logger; @@ -32,9 +32,9 @@ public abstract class GetMute extends ActionCallback { private static Logger log = Logger.getLogger(GetMute.class.getName()); public GetMute(Service service) { - this(new UnsignedIntegerFourBytes(0), service); + this(new UnsignedIntegerEightBytes(0), service); } - public GetMute(UnsignedIntegerFourBytes instanceId, Service service) { + public GetMute(UnsignedIntegerEightBytes instanceId, Service service) { super(new ActionInvocation(service.getAction("GetMute"))); getActionInvocation().setInput("InstanceID", instanceId); getActionInvocation().setInput("Channel", Channel.Master.toString()); diff --git a/support/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/GetVolume.java b/support/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/GetVolume.java index 405905730..ad8802984 100644 --- a/support/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/GetVolume.java +++ b/support/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/GetVolume.java @@ -20,7 +20,7 @@ import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.Service; import org.fourthline.cling.model.types.ErrorCode; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.model.Channel; import java.util.logging.Logger; @@ -34,10 +34,10 @@ public abstract class GetVolume extends ActionCallback { private static Logger log = Logger.getLogger(GetVolume.class.getName()); public GetVolume(Service service) { - this(new UnsignedIntegerFourBytes(0), service); + this(new UnsignedIntegerEightBytes(0), service); } - public GetVolume(UnsignedIntegerFourBytes instanceId, Service service) { + public GetVolume(UnsignedIntegerEightBytes instanceId, Service service) { super(new ActionInvocation(service.getAction("GetVolume"))); getActionInvocation().setInput("InstanceID", instanceId); getActionInvocation().setInput("Channel", Channel.Master.toString()); diff --git a/support/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/SetMute.java b/support/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/SetMute.java index 0ea6ff2ef..89fe38445 100644 --- a/support/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/SetMute.java +++ b/support/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/SetMute.java @@ -18,7 +18,7 @@ import org.fourthline.cling.controlpoint.ActionCallback; import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.model.Channel; import java.util.logging.Logger; @@ -32,10 +32,10 @@ public abstract class SetMute extends ActionCallback { private static Logger log = Logger.getLogger(SetMute.class.getName()); public SetMute(Service service, boolean desiredMute) { - this(new UnsignedIntegerFourBytes(0), service, desiredMute); + this(new UnsignedIntegerEightBytes(0), service, desiredMute); } - public SetMute(UnsignedIntegerFourBytes instanceId, Service service, boolean desiredMute) { + public SetMute(UnsignedIntegerEightBytes instanceId, Service service, boolean desiredMute) { super(new ActionInvocation(service.getAction("SetMute"))); getActionInvocation().setInput("InstanceID", instanceId); getActionInvocation().setInput("Channel", Channel.Master.toString()); diff --git a/support/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/SetVolume.java b/support/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/SetVolume.java index ef6afb932..2b7db91b3 100644 --- a/support/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/SetVolume.java +++ b/support/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/SetVolume.java @@ -18,7 +18,7 @@ import org.fourthline.cling.controlpoint.ActionCallback; import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; import org.fourthline.cling.support.model.Channel; @@ -33,10 +33,10 @@ public abstract class SetVolume extends ActionCallback { private static Logger log = Logger.getLogger(SetVolume.class.getName()); public SetVolume(Service service, long newVolume) { - this(new UnsignedIntegerFourBytes(0), service, newVolume); + this(new UnsignedIntegerEightBytes(0), service, newVolume); } - public SetVolume(UnsignedIntegerFourBytes instanceId, Service service, long newVolume) { + public SetVolume(UnsignedIntegerEightBytes instanceId, Service service, long newVolume) { super(new ActionInvocation(service.getAction("SetVolume"))); getActionInvocation().setInput("InstanceID", instanceId); getActionInvocation().setInput("Channel", Channel.Master.toString()); diff --git a/support/src/main/java/org/fourthline/cling/support/xmicrosoft/AbstractMediaReceiverRegistrarService.java b/support/src/main/java/org/fourthline/cling/support/xmicrosoft/AbstractMediaReceiverRegistrarService.java index a635dcf74..150aac0ec 100644 --- a/support/src/main/java/org/fourthline/cling/support/xmicrosoft/AbstractMediaReceiverRegistrarService.java +++ b/support/src/main/java/org/fourthline/cling/support/xmicrosoft/AbstractMediaReceiverRegistrarService.java @@ -15,15 +15,8 @@ package org.fourthline.cling.support.xmicrosoft; -import org.fourthline.cling.binding.annotations.UpnpAction; -import org.fourthline.cling.binding.annotations.UpnpInputArgument; -import org.fourthline.cling.binding.annotations.UpnpOutputArgument; -import org.fourthline.cling.binding.annotations.UpnpService; -import org.fourthline.cling.binding.annotations.UpnpServiceId; -import org.fourthline.cling.binding.annotations.UpnpServiceType; -import org.fourthline.cling.binding.annotations.UpnpStateVariable; -import org.fourthline.cling.binding.annotations.UpnpStateVariables; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.binding.annotations.*; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import java.beans.PropertyChangeSupport; @@ -64,16 +57,16 @@ public abstract class AbstractMediaReceiverRegistrarService { final protected PropertyChangeSupport propertyChangeSupport; @UpnpStateVariable(eventMinimumDelta = 1) - private UnsignedIntegerFourBytes authorizationGrantedUpdateID = new UnsignedIntegerFourBytes(0); + private UnsignedIntegerEightBytes authorizationGrantedUpdateID = new UnsignedIntegerEightBytes(0); @UpnpStateVariable(eventMinimumDelta = 1) - private UnsignedIntegerFourBytes authorizationDeniedUpdateID = new UnsignedIntegerFourBytes(0); + private UnsignedIntegerEightBytes authorizationDeniedUpdateID = new UnsignedIntegerEightBytes(0); @UpnpStateVariable - private UnsignedIntegerFourBytes validationSucceededUpdateID = new UnsignedIntegerFourBytes(0); + private UnsignedIntegerEightBytes validationSucceededUpdateID = new UnsignedIntegerEightBytes(0); @UpnpStateVariable - private UnsignedIntegerFourBytes validationRevokedUpdateID = new UnsignedIntegerFourBytes(0); + private UnsignedIntegerEightBytes validationRevokedUpdateID = new UnsignedIntegerEightBytes(0); protected AbstractMediaReceiverRegistrarService() { this(null); @@ -89,22 +82,22 @@ public PropertyChangeSupport getPropertyChangeSupport() { @UpnpAction(out = @UpnpOutputArgument(name = "AuthorizationGrantedUpdateID")) - public UnsignedIntegerFourBytes getAuthorizationGrantedUpdateID() { + public UnsignedIntegerEightBytes getAuthorizationGrantedUpdateID() { return authorizationGrantedUpdateID; } @UpnpAction(out = @UpnpOutputArgument(name = "AuthorizationDeniedUpdateID")) - public UnsignedIntegerFourBytes getAuthorizationDeniedUpdateID() { + public UnsignedIntegerEightBytes getAuthorizationDeniedUpdateID() { return authorizationDeniedUpdateID; } @UpnpAction(out = @UpnpOutputArgument(name = "ValidationSucceededUpdateID")) - public UnsignedIntegerFourBytes getValidationSucceededUpdateID() { + public UnsignedIntegerEightBytes getValidationSucceededUpdateID() { return validationSucceededUpdateID; } @UpnpAction(out = @UpnpOutputArgument(name = "ValidationRevokedUpdateID")) - public UnsignedIntegerFourBytes getValidationRevokedUpdateID() { + public UnsignedIntegerEightBytes getValidationRevokedUpdateID() { return validationRevokedUpdateID; } diff --git a/support/src/test/java/example/igd/IGDSampleData.java b/support/src/test/java/example/igd/IGDSampleData.java index 2f4d374de..6910a2754 100644 --- a/support/src/test/java/example/igd/IGDSampleData.java +++ b/support/src/test/java/example/igd/IGDSampleData.java @@ -14,26 +14,14 @@ */ package example.igd; -import org.fourthline.cling.binding.annotations.AnnotationLocalServiceBinder; -import org.fourthline.cling.binding.annotations.UpnpAction; -import org.fourthline.cling.binding.annotations.UpnpInputArgument; -import org.fourthline.cling.binding.annotations.UpnpOutputArgument; -import org.fourthline.cling.binding.annotations.UpnpService; -import org.fourthline.cling.binding.annotations.UpnpServiceId; -import org.fourthline.cling.binding.annotations.UpnpServiceType; -import org.fourthline.cling.binding.annotations.UpnpStateVariable; -import org.fourthline.cling.binding.annotations.UpnpStateVariables; +import org.fourthline.cling.binding.annotations.*; import org.fourthline.cling.model.DefaultServiceManager; import org.fourthline.cling.model.action.ActionException; import org.fourthline.cling.model.meta.DeviceDetails; import org.fourthline.cling.model.meta.DeviceIdentity; import org.fourthline.cling.model.meta.LocalDevice; import org.fourthline.cling.model.meta.LocalService; -import org.fourthline.cling.model.types.ErrorCode; -import org.fourthline.cling.model.types.UDADeviceType; -import org.fourthline.cling.model.types.UDN; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; -import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; +import org.fourthline.cling.model.types.*; import org.fourthline.cling.support.model.Connection; import org.fourthline.cling.support.model.PortMapping; @@ -124,7 +112,7 @@ public void addPortMapping( @UpnpInputArgument(name = "NewInternalClient", stateVariable = "InternalClient") String internalClient, @UpnpInputArgument(name = "NewEnabled", stateVariable = "PortMappingEnabled") Boolean enabled, @UpnpInputArgument(name = "NewPortMappingDescription", stateVariable = "PortMappingDescription") String description, - @UpnpInputArgument(name = "NewLeaseDuration", stateVariable = "PortMappingLeaseDuration") UnsignedIntegerFourBytes leaseDuration + @UpnpInputArgument(name = "NewLeaseDuration", stateVariable = "PortMappingLeaseDuration") UnsignedIntegerEightBytes leaseDuration ) throws ActionException { try { addPortMapping(new PortMapping( diff --git a/support/src/test/java/example/mediarenderer/LastChangeTest.java b/support/src/test/java/example/mediarenderer/LastChangeTest.java index 3554e7e07..d25eaead5 100644 --- a/support/src/test/java/example/mediarenderer/LastChangeTest.java +++ b/support/src/test/java/example/mediarenderer/LastChangeTest.java @@ -22,7 +22,7 @@ import org.fourthline.cling.model.meta.LocalDevice; import org.fourthline.cling.model.meta.LocalService; import org.fourthline.cling.model.state.StateVariableValue; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; import org.fourthline.cling.support.avtransport.lastchange.AVTransportLastChangeParser; import org.fourthline.cling.support.avtransport.lastchange.AVTransportVariable; @@ -30,15 +30,7 @@ import org.fourthline.cling.support.lastchange.Event; import org.fourthline.cling.support.lastchange.LastChange; import org.fourthline.cling.support.lastchange.LastChangeParser; -import org.fourthline.cling.support.model.Channel; -import org.fourthline.cling.support.model.DIDLContent; -import org.fourthline.cling.support.model.PlayMode; -import org.fourthline.cling.support.model.RecordMediumWriteStatus; -import org.fourthline.cling.support.model.RecordQualityMode; -import org.fourthline.cling.support.model.StorageMedium; -import org.fourthline.cling.support.model.TransportAction; -import org.fourthline.cling.support.model.TransportState; -import org.fourthline.cling.support.model.TransportStatus; +import org.fourthline.cling.support.model.*; import org.fourthline.cling.support.renderingcontrol.lastchange.ChannelVolume; import org.fourthline.cling.support.renderingcontrol.lastchange.RenderingControlLastChangeParser; import org.fourthline.cling.support.renderingcontrol.lastchange.RenderingControlVariable; @@ -123,7 +115,7 @@ public void parseLastChangeXML() throws Exception { Event event = avTransportParser.parseResource("org/fourthline/cling/test/support/lastchange/samples/avtransport-roku.xml"); assertEquals(event.getInstanceIDs().size(), 1); - UnsignedIntegerFourBytes instanceId = new UnsignedIntegerFourBytes(0); + UnsignedIntegerEightBytes instanceId = new UnsignedIntegerEightBytes(0); assertEquals( event.getEventedValue(instanceId, AVTransportVariable.TransportState.class).getValue(), TransportState.STOPPED @@ -183,13 +175,13 @@ public void eventReceived(GENASubscription sub) { assertEquals(lastChange.getEventedValue(0, AVTransportVariable.CurrentMediaDuration.class).getValue(), "00:00:00"); assertEquals(lastChange.getEventedValue(0, AVTransportVariable.CurrentPlayMode.class).getValue(), PlayMode.NORMAL); assertEquals(lastChange.getEventedValue(0, AVTransportVariable.CurrentRecordQualityMode.class).getValue(), RecordQualityMode.NOT_IMPLEMENTED); - assertEquals(lastChange.getEventedValue(0, AVTransportVariable.CurrentTrack.class).getValue(), new UnsignedIntegerFourBytes(0)); + assertEquals(lastChange.getEventedValue(0, AVTransportVariable.CurrentTrack.class).getValue(), new UnsignedIntegerEightBytes(0)); assertEquals(lastChange.getEventedValue(0, AVTransportVariable.CurrentTrackDuration.class).getValue(), "00:00:00"); assertEquals(lastChange.getEventedValue(0, AVTransportVariable.CurrentTrackMetaData.class).getValue(), "NOT_IMPLEMENTED"); assertEquals(lastChange.getEventedValue(0, AVTransportVariable.CurrentTrackURI.class).getValue(), null); assertEquals(lastChange.getEventedValue(0, AVTransportVariable.CurrentTransportActions.class).getValue(), new TransportAction[]{TransportAction.Stop}); assertEquals(lastChange.getEventedValue(0, AVTransportVariable.NextAVTransportURI.class).getValue().toString(), "NOT_IMPLEMENTED"); // TODO: That's weird - assertEquals(lastChange.getEventedValue(0, AVTransportVariable.NumberOfTracks.class).getValue(), new UnsignedIntegerFourBytes(0)); + assertEquals(lastChange.getEventedValue(0, AVTransportVariable.NumberOfTracks.class).getValue(), new UnsignedIntegerEightBytes(0)); assertEquals(lastChange.getEventedValue(0, AVTransportVariable.PossiblePlaybackStorageMedia.class).getValue(), new StorageMedium[]{StorageMedium.NETWORK}); assertEquals(lastChange.getEventedValue(0, AVTransportVariable.PossibleRecordQualityModes.class).getValue(), new RecordQualityMode[]{RecordQualityMode.NOT_IMPLEMENTED}); assertEquals(lastChange.getEventedValue(0, AVTransportVariable.PossibleRecordStorageMedia.class).getValue(), new StorageMedium[]{StorageMedium.NOT_IMPLEMENTED}); diff --git a/support/src/test/java/example/mediarenderer/MediaRendererSampleData.java b/support/src/test/java/example/mediarenderer/MediaRendererSampleData.java index 135ddaeed..27d61335d 100644 --- a/support/src/test/java/example/mediarenderer/MediaRendererSampleData.java +++ b/support/src/test/java/example/mediarenderer/MediaRendererSampleData.java @@ -21,7 +21,7 @@ import org.fourthline.cling.model.meta.LocalService; import org.fourthline.cling.model.types.UDADeviceType; import org.fourthline.cling.model.types.UDN; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; import org.fourthline.cling.support.avtransport.impl.AVTransportService; import org.fourthline.cling.support.avtransport.lastchange.AVTransportLastChangeParser; @@ -92,22 +92,22 @@ public static LocalDevice createDevice() throws Exception { public static class AudioRenderingControlService extends AbstractAudioRenderingControl { @Override - public boolean getMute(UnsignedIntegerFourBytes instanceId, String channelName) throws RenderingControlException { + public boolean getMute(UnsignedIntegerEightBytes instanceId, String channelName) throws RenderingControlException { return false; } @Override - public void setMute(UnsignedIntegerFourBytes instanceId, String channelName, boolean desiredMute) throws RenderingControlException { + public void setMute(UnsignedIntegerEightBytes instanceId, String channelName, boolean desiredMute) throws RenderingControlException { } @Override - public UnsignedIntegerTwoBytes getVolume(UnsignedIntegerFourBytes instanceId, String channelName) throws RenderingControlException { + public UnsignedIntegerTwoBytes getVolume(UnsignedIntegerEightBytes instanceId, String channelName) throws RenderingControlException { return new UnsignedIntegerTwoBytes(50); } @Override - public void setVolume(UnsignedIntegerFourBytes instanceId, String channelName, UnsignedIntegerTwoBytes desiredVolume) throws RenderingControlException { + public void setVolume(UnsignedIntegerEightBytes instanceId, String channelName, UnsignedIntegerTwoBytes desiredVolume) throws RenderingControlException { } @@ -119,8 +119,8 @@ protected Channel[] getCurrentChannels() { } @Override - public UnsignedIntegerFourBytes[] getCurrentInstanceIds() { - return new UnsignedIntegerFourBytes[0]; + public UnsignedIntegerEightBytes[] getCurrentInstanceIds() { + return new UnsignedIntegerEightBytes[0]; } } diff --git a/workbench/src/main/java/org/fourthline/cling/workbench/plugins/avtransport/impl/AVTransportCallback.java b/workbench/src/main/java/org/fourthline/cling/workbench/plugins/avtransport/impl/AVTransportCallback.java index 8bb24de83..4a0f2631f 100644 --- a/workbench/src/main/java/org/fourthline/cling/workbench/plugins/avtransport/impl/AVTransportCallback.java +++ b/workbench/src/main/java/org/fourthline/cling/workbench/plugins/avtransport/impl/AVTransportCallback.java @@ -20,7 +20,7 @@ import org.fourthline.cling.model.gena.GENASubscription; import org.fourthline.cling.model.message.UpnpResponse; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.avtransport.lastchange.AVTransportLastChangeParser; import org.fourthline.cling.support.avtransport.lastchange.AVTransportVariable; import org.fourthline.cling.support.lastchange.LastChange; @@ -86,7 +86,7 @@ protected void eventReceived(GENASubscription subscription) { SwingUtilities.invokeLater(new Runnable() { public void run() { - for (UnsignedIntegerFourBytes instanceId : lastChange.getInstanceIDs()) { + for (UnsignedIntegerEightBytes instanceId : lastChange.getInstanceIDs()) { AVTransportControlPoint.LOGGER.fine( "Processing LastChange event values for instance: " + instanceId diff --git a/workbench/src/main/java/org/fourthline/cling/workbench/plugins/avtransport/impl/AVTransportPresenter.java b/workbench/src/main/java/org/fourthline/cling/workbench/plugins/avtransport/impl/AVTransportPresenter.java index ff542153e..35199e02e 100644 --- a/workbench/src/main/java/org/fourthline/cling/workbench/plugins/avtransport/impl/AVTransportPresenter.java +++ b/workbench/src/main/java/org/fourthline/cling/workbench/plugins/avtransport/impl/AVTransportPresenter.java @@ -21,23 +21,9 @@ import org.fourthline.cling.model.gena.CancelReason; import org.fourthline.cling.model.message.UpnpResponse; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; -import org.fourthline.cling.support.avtransport.callback.GetMediaInfo; -import org.fourthline.cling.support.avtransport.callback.GetPositionInfo; -import org.fourthline.cling.support.avtransport.callback.GetTransportInfo; -import org.fourthline.cling.support.avtransport.callback.Next; -import org.fourthline.cling.support.avtransport.callback.Pause; -import org.fourthline.cling.support.avtransport.callback.Play; -import org.fourthline.cling.support.avtransport.callback.Previous; -import org.fourthline.cling.support.avtransport.callback.Seek; -import org.fourthline.cling.support.avtransport.callback.SetAVTransportURI; -import org.fourthline.cling.support.avtransport.callback.SetPlayMode; -import org.fourthline.cling.support.avtransport.callback.Stop; -import org.fourthline.cling.support.model.MediaInfo; -import org.fourthline.cling.support.model.PlayMode; -import org.fourthline.cling.support.model.PositionInfo; -import org.fourthline.cling.support.model.TransportInfo; -import org.fourthline.cling.support.model.TransportState; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; +import org.fourthline.cling.support.avtransport.callback.*; +import org.fourthline.cling.support.model.*; import org.fourthline.cling.workbench.plugins.avtransport.AVTransportControlPoint; import org.fourthline.cling.workbench.plugins.avtransport.AVTransportView; @@ -129,7 +115,7 @@ public void run() { @Override public void onSetAVTransportURISelected(int instanceId, final String uri) { controlPoint.execute( - new SetAVTransportURI(new UnsignedIntegerFourBytes(instanceId), service, uri) { + new SetAVTransportURI(new UnsignedIntegerEightBytes(instanceId), service, uri) { @Override public void success(ActionInvocation invocation) { AVTransportControlPoint.LOGGER.info("New transport URI set: " + uri); @@ -149,7 +135,7 @@ public void failure(ActionInvocation invocation, @Override public void onPauseSelected(int instanceId) { controlPoint.execute( - new Pause(new UnsignedIntegerFourBytes(instanceId), service) { + new Pause(new UnsignedIntegerEightBytes(instanceId), service) { @Override public void success(ActionInvocation invocation) { AVTransportControlPoint.LOGGER.info( @@ -170,7 +156,7 @@ public void failure(ActionInvocation invocation, @Override public void onPlaySelected(int instanceId) { controlPoint.execute( - new Play(new UnsignedIntegerFourBytes(instanceId), service) { + new Play(new UnsignedIntegerEightBytes(instanceId), service) { @Override public void success(ActionInvocation invocation) { AVTransportControlPoint.LOGGER.info( @@ -191,7 +177,7 @@ public void failure(ActionInvocation invocation, @Override public void onStopSelected(int instanceId) { controlPoint.execute( - new Stop(new UnsignedIntegerFourBytes(instanceId), service) { + new Stop(new UnsignedIntegerEightBytes(instanceId), service) { @Override public void success(ActionInvocation invocation) { AVTransportControlPoint.LOGGER.info( @@ -223,7 +209,7 @@ public void onSeekSelected(int instanceId, String target) { // Now do the asynchronous remote seek controlPoint.execute( - new Seek(new UnsignedIntegerFourBytes(instanceId), service, target) { + new Seek(new UnsignedIntegerEightBytes(instanceId), service, target) { @Override public void success(final ActionInvocation invocation) { AVTransportControlPoint.LOGGER.info( @@ -259,7 +245,7 @@ public void onSeekSelected(int instanceId, int deltaSeconds, boolean forwards) { @Override public void onPreviousSelected(int instanceId) { controlPoint.execute( - new Previous(new UnsignedIntegerFourBytes(instanceId), service) { + new Previous(new UnsignedIntegerEightBytes(instanceId), service) { @Override public void success(ActionInvocation invocation) { AVTransportControlPoint.LOGGER.info( @@ -280,7 +266,7 @@ public void failure(ActionInvocation invocation, @Override public void onNextSelected(int instanceId) { controlPoint.execute( - new Next(new UnsignedIntegerFourBytes(instanceId), service) { + new Next(new UnsignedIntegerEightBytes(instanceId), service) { @Override public void success(ActionInvocation invocation) { AVTransportControlPoint.LOGGER.info( @@ -301,7 +287,7 @@ public void failure(ActionInvocation invocation, @Override public void onUpdatePositionInfo(final int instanceId) { controlPoint.execute( - new GetPositionInfo(new UnsignedIntegerFourBytes(instanceId), service) { + new GetPositionInfo(new UnsignedIntegerEightBytes(instanceId), service) { @Override public void received(ActionInvocation actionInvocation, final PositionInfo positionInfo) { SwingUtilities.invokeLater(new Runnable() { @@ -326,7 +312,7 @@ public void failure(ActionInvocation invocation, @Override public void onSetPlayModeSelected(final int instanceId, PlayMode playMode) { controlPoint.execute( - new SetPlayMode(new UnsignedIntegerFourBytes(instanceId), service, playMode) { + new SetPlayMode(new UnsignedIntegerEightBytes(instanceId), service, playMode) { @Override public void success(ActionInvocation invocation) { AVTransportControlPoint.LOGGER.info( @@ -347,7 +333,7 @@ public void failure(ActionInvocation invocation, public void updateTransportInfo(final int instanceId) { controlPoint.execute( - new GetTransportInfo(new UnsignedIntegerFourBytes(instanceId), service) { + new GetTransportInfo(new UnsignedIntegerEightBytes(instanceId), service) { @Override public void received(ActionInvocation actionInvocation, final TransportInfo transportInfo) { SwingUtilities.invokeLater(new Runnable() { @@ -372,7 +358,7 @@ public void failure(ActionInvocation invocation, public void updateMediaInfo(final int instanceId) { controlPoint.execute( - new GetMediaInfo(new UnsignedIntegerFourBytes(instanceId), service) { + new GetMediaInfo(new UnsignedIntegerEightBytes(instanceId), service) { @Override public void received(ActionInvocation actionInvocation, final MediaInfo mediaInfo) { SwingUtilities.invokeLater(new Runnable() { diff --git a/workbench/src/main/java/org/fourthline/cling/workbench/plugins/contentdirectory/impl/DetailPresenter.java b/workbench/src/main/java/org/fourthline/cling/workbench/plugins/contentdirectory/impl/DetailPresenter.java index 34c9e3a8f..c87daa4c6 100644 --- a/workbench/src/main/java/org/fourthline/cling/workbench/plugins/contentdirectory/impl/DetailPresenter.java +++ b/workbench/src/main/java/org/fourthline/cling/workbench/plugins/contentdirectory/impl/DetailPresenter.java @@ -20,11 +20,7 @@ import org.fourthline.cling.model.message.UpnpResponse; import org.fourthline.cling.model.meta.Device; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.DeviceType; -import org.fourthline.cling.model.types.ServiceType; -import org.fourthline.cling.model.types.UDADeviceType; -import org.fourthline.cling.model.types.UDAServiceType; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.*; import org.fourthline.cling.support.avtransport.callback.SetAVTransportURI; import org.fourthline.cling.support.connectionmanager.callback.GetProtocolInfo; import org.fourthline.cling.support.model.Protocol; @@ -38,12 +34,7 @@ import org.seamless.util.MimeType; import javax.inject.Inject; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; +import java.util.*; /** * @author Christian Bauer @@ -203,7 +194,7 @@ protected boolean isProtocolInfoMatch(List supportedProtocols, Res protected void sendToMediaRenderer(final int instanceId, final Service avTransportService, String uri) { SetAVTransportURI setAVTransportURIActionCallback = - new SetAVTransportURI(new UnsignedIntegerFourBytes(instanceId), avTransportService, uri) { + new SetAVTransportURI(new UnsignedIntegerEightBytes(instanceId), avTransportService, uri) { @Override public void success(ActionInvocation invocation) { diff --git a/workbench/src/main/java/org/fourthline/cling/workbench/plugins/igd/impl/PortMappingEditViewImpl.java b/workbench/src/main/java/org/fourthline/cling/workbench/plugins/igd/impl/PortMappingEditViewImpl.java index ede889900..ac19ac309 100644 --- a/workbench/src/main/java/org/fourthline/cling/workbench/plugins/igd/impl/PortMappingEditViewImpl.java +++ b/workbench/src/main/java/org/fourthline/cling/workbench/plugins/igd/impl/PortMappingEditViewImpl.java @@ -15,7 +15,7 @@ package org.fourthline.cling.workbench.plugins.igd.impl; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; import org.fourthline.cling.support.model.PortMapping; import org.fourthline.cling.workbench.Workbench; @@ -134,7 +134,7 @@ public PortMapping getPortMapping() { try { PortMapping pm = new PortMapping(); pm.setEnabled(enabledField.isSelected()); - pm.setLeaseDurationSeconds(new UnsignedIntegerFourBytes(leaseDurationField.getText())); + pm.setLeaseDurationSeconds(new UnsignedIntegerEightBytes(leaseDurationField.getText())); pm.setRemoteHost(remoteHostField.getText()); pm.setExternalPort(new UnsignedIntegerTwoBytes(externalPortField.getText())); pm.setProtocol((PortMapping.Protocol) protocolField.getSelectedItem()); diff --git a/workbench/src/main/java/org/fourthline/cling/workbench/plugins/renderingcontrol/impl/RenderingControlCallback.java b/workbench/src/main/java/org/fourthline/cling/workbench/plugins/renderingcontrol/impl/RenderingControlCallback.java index 274a64c2c..66b00b5fc 100644 --- a/workbench/src/main/java/org/fourthline/cling/workbench/plugins/renderingcontrol/impl/RenderingControlCallback.java +++ b/workbench/src/main/java/org/fourthline/cling/workbench/plugins/renderingcontrol/impl/RenderingControlCallback.java @@ -20,18 +20,15 @@ import org.fourthline.cling.model.gena.GENASubscription; import org.fourthline.cling.model.message.UpnpResponse; import org.fourthline.cling.model.meta.Service; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.lastchange.LastChange; import org.fourthline.cling.support.model.Channel; import org.fourthline.cling.support.renderingcontrol.lastchange.RenderingControlLastChangeParser; import org.fourthline.cling.support.renderingcontrol.lastchange.RenderingControlVariable; -import org.fourthline.cling.workbench.Workbench; import org.fourthline.cling.workbench.plugins.renderingcontrol.RenderingControlPoint; -import org.seamless.swing.logging.LogMessage; -import javax.swing.SwingUtilities; +import javax.swing.*; import java.util.logging.Level; -import java.util.logging.Logger; /** * @author Christian Bauer @@ -84,7 +81,7 @@ public void eventReceived(GENASubscription subscription) { SwingUtilities.invokeLater(new Runnable() { public void run() { - for (UnsignedIntegerFourBytes instanceId : lastChange.getInstanceIDs()) { + for (UnsignedIntegerEightBytes instanceId : lastChange.getInstanceIDs()) { RenderingControlPoint.LOGGER.fine( "Processing LastChange event values for instance: " + instanceId diff --git a/workbench/src/main/java/org/fourthline/cling/workbench/plugins/renderingcontrol/impl/RenderingControlPresenter.java b/workbench/src/main/java/org/fourthline/cling/workbench/plugins/renderingcontrol/impl/RenderingControlPresenter.java index 470bb1bff..4f1aee4f2 100644 --- a/workbench/src/main/java/org/fourthline/cling/workbench/plugins/renderingcontrol/impl/RenderingControlPresenter.java +++ b/workbench/src/main/java/org/fourthline/cling/workbench/plugins/renderingcontrol/impl/RenderingControlPresenter.java @@ -21,7 +21,7 @@ import org.fourthline.cling.model.message.UpnpResponse; import org.fourthline.cling.model.meta.Service; import org.fourthline.cling.model.meta.StateVariableAllowedValueRange; -import org.fourthline.cling.model.types.UnsignedIntegerFourBytes; +import org.fourthline.cling.model.types.UnsignedIntegerEightBytes; import org.fourthline.cling.support.renderingcontrol.callback.GetVolume; import org.fourthline.cling.support.renderingcontrol.callback.SetMute; import org.fourthline.cling.support.renderingcontrol.callback.SetVolume; @@ -113,7 +113,7 @@ public void run() { @Override public void onMuteSelected(int instanceId, final boolean desiredMute) { - controlPoint.execute(new SetMute(new UnsignedIntegerFourBytes(instanceId), service, desiredMute) { + controlPoint.execute(new SetMute(new UnsignedIntegerEightBytes(instanceId), service, desiredMute) { @Override public void success(ActionInvocation invocation) { @@ -135,7 +135,7 @@ public void failure(ActionInvocation invocation, @Override public void onVolumeSelected(int instanceId, final int newVolume) { - controlPoint.execute(new SetVolume(new UnsignedIntegerFourBytes(instanceId), service, newVolume) { + controlPoint.execute(new SetVolume(new UnsignedIntegerEightBytes(instanceId), service, newVolume) { @Override public void success(ActionInvocation invocation) { RenderingControlPoint.LOGGER.info( @@ -155,7 +155,7 @@ public void failure(ActionInvocation invocation, } protected void updateVolume(final int instanceId) { - controlPoint.execute(new GetVolume(new UnsignedIntegerFourBytes(instanceId), service) { + controlPoint.execute(new GetVolume(new UnsignedIntegerEightBytes(instanceId), service) { @Override public void received(ActionInvocation actionInvocation, final int currentVolume) { SwingUtilities.invokeLater(new Runnable() {