abstractavtransportservice.java

来自「android_UPNP_DLNA_控制点」· Java 代码 · 共 342 行 · 第 1/2 页

JAVA
342
字号
/* * Copyright (C) 2010 Teleal GmbH, Switzerland * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of * the License, or (at your option) any later version. * * 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.  See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program.  If not, see <http://www.gnu.org/licenses/>. */package org.teleal.cling.support.avtransport;import org.teleal.cling.binding.annotations.UpnpAction;import org.teleal.cling.binding.annotations.UpnpInputArgument;import org.teleal.cling.binding.annotations.UpnpOutputArgument;import org.teleal.cling.binding.annotations.UpnpService;import org.teleal.cling.binding.annotations.UpnpServiceId;import org.teleal.cling.binding.annotations.UpnpServiceType;import org.teleal.cling.binding.annotations.UpnpStateVariable;import org.teleal.cling.binding.annotations.UpnpStateVariables;import org.teleal.cling.model.types.UnsignedIntegerFourBytes;import org.teleal.cling.support.model.TransportState;import org.teleal.cling.support.model.DeviceCapabilities;import org.teleal.cling.support.model.MediaInfo;import org.teleal.cling.support.model.PlayMode;import org.teleal.cling.support.model.PositionInfo;import org.teleal.cling.support.model.RecordMediumWriteStatus;import org.teleal.cling.support.model.RecordQualityMode;import org.teleal.cling.support.model.SeekMode;import org.teleal.cling.support.model.TransportInfo;import org.teleal.cling.support.model.TransportSettings;import org.teleal.cling.support.model.TransportStatus;import org.teleal.cling.support.avtransport.lastchange.AVTransportLastChangeParser;import org.teleal.cling.support.model.StorageMedium;import org.teleal.cling.support.lastchange.LastChange;import java.beans.PropertyChangeSupport;/** * Skeleton of service with "LastChange" eventing support. * * @author Christian Bauer */@UpnpService(        serviceId = @UpnpServiceId("AVTransport"),        serviceType = @UpnpServiceType(value = "AVTransport", version = 1),        stringConvertibleTypes = LastChange.class)@UpnpStateVariables({        @UpnpStateVariable(                name = "TransportState",                sendEvents = false,                allowedValuesEnum = TransportState.class),        @UpnpStateVariable(                name = "TransportStatus",                sendEvents = false,                allowedValuesEnum = TransportStatus.class),        @UpnpStateVariable(                name = "PlaybackStorageMedium",                sendEvents = false,                defaultValue = "NONE",                allowedValuesEnum = StorageMedium.class),        @UpnpStateVariable(                name = "RecordStorageMedium",                sendEvents = false,                defaultValue = "NOT_IMPLEMENTED",                allowedValuesEnum = StorageMedium.class),        @UpnpStateVariable(                name = "PossiblePlaybackStorageMedia",                sendEvents = false,                datatype = "string",                defaultValue = "NETWORK"),        @UpnpStateVariable(                name = "PossibleRecordStorageMedia",                sendEvents = false,                datatype = "string",                defaultValue = "NOT_IMPLEMENTED"),        @UpnpStateVariable( // TODO                name = "CurrentPlayMode",                sendEvents = false,                defaultValue = "NORMAL",                allowedValuesEnum = PlayMode.class),        @UpnpStateVariable( // TODO                name = "TransportPlaySpeed",                sendEvents = false,                datatype = "string",                defaultValue = "1"), // 1, 1/2, 2, -1, 1/10, etc.        @UpnpStateVariable(                name = "RecordMediumWriteStatus",                sendEvents = false,                defaultValue = "NOT_IMPLEMENTED",                allowedValuesEnum = RecordMediumWriteStatus.class),        @UpnpStateVariable(                name = "CurrentRecordQualityMode",                sendEvents = false,                defaultValue = "NOT_IMPLEMENTED",                allowedValuesEnum = RecordQualityMode.class),        @UpnpStateVariable(                name = "PossibleRecordQualityModes",                sendEvents = false,                datatype = "string",                defaultValue = "NOT_IMPLEMENTED"),        @UpnpStateVariable(                name = "NumberOfTracks",                sendEvents = false,                datatype = "ui4",                defaultValue = "0"),        @UpnpStateVariable(                name = "CurrentTrack",                sendEvents = false,                datatype = "ui4",                defaultValue = "0"),        @UpnpStateVariable(                name = "CurrentTrackDuration",                sendEvents = false,                datatype = "string"), // H+:MM:SS[.F+] or H+:MM:SS[.F0/F1]        @UpnpStateVariable(                name = "CurrentMediaDuration",                sendEvents = false,                datatype = "string",                defaultValue = "00:00:00"),        @UpnpStateVariable(                name = "CurrentTrackMetaData",                sendEvents = false,                datatype = "string",                defaultValue = "NOT_IMPLEMENTED"),        @UpnpStateVariable(                name = "CurrentTrackURI",                sendEvents = false,                datatype = "string"),        @UpnpStateVariable(                name = "AVTransportURI",                sendEvents = false,                datatype = "string"),        @UpnpStateVariable(                name = "AVTransportURIMetaData",                sendEvents = false,                datatype = "string",                defaultValue = "NOT_IMPLEMENTED"),        @UpnpStateVariable(                name = "NextAVTransportURI",                sendEvents = false,                datatype = "string",                defaultValue = "NOT_IMPLEMENTED"),        @UpnpStateVariable(                name = "NextAVTransportURIMetaData",                sendEvents = false,                datatype = "string",                defaultValue = "NOT_IMPLEMENTED"),        @UpnpStateVariable(                name = "RelativeTimePosition",                sendEvents = false,                datatype = "string"), // H+:MM:SS[.F+] or H+:MM:SS[.F0/F1] (in track)        @UpnpStateVariable(                name = "AbsoluteTimePosition",                sendEvents = false,                datatype = "string"), // H+:MM:SS[.F+] or H+:MM:SS[.F0/F1] (in media)        @UpnpStateVariable(                name = "RelativeCounterPosition",                sendEvents = false,                datatype = "i4",                defaultValue = "2147483647"), // Max value means not implemented        @UpnpStateVariable(                name = "AbsoluteCounterPosition",

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?