本文整理汇总了Java中org.fourthline.cling.model.types.UnsignedIntegerTwoBytes类的典型用法代码示例。如果您正苦于以下问题:Java UnsignedIntegerTwoBytes类的具体用法?Java UnsignedIntegerTwoBytes怎么用?Java UnsignedIntegerTwoBytes使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UnsignedIntegerTwoBytes类属于org.fourthline.cling.model.types包,在下文中一共展示了UnsignedIntegerTwoBytes类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getVolume
import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; //导入依赖的package包/类
@Override
public UnsignedIntegerTwoBytes getVolume(UnsignedIntegerFourBytes instanceId,
String channelName) throws RenderingControlException {
Log.d(getClass().getName(), "getVolume() ");
return new UnsignedIntegerTwoBytes(upnpClient.getVolume());
}
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:8,代码来源:YaaccAudioRenderingControlService.java
示例2: getVolume
import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; //导入依赖的package包/类
@Override
@UpnpAction(out = @UpnpOutputArgument(name = "CurrentVolume", stateVariable = "Volume"))
public UnsignedIntegerTwoBytes getVolume(
@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes arg0,
@UpnpInputArgument(name = "Channel") String arg1)
throws RenderingControlException {
// TODO Auto-generated method stub
return new UnsignedIntegerTwoBytes(
mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC));
}
开发者ID:sky24987,项目名称:UPlayer,代码行数:11,代码来源:RenderingControlService.java
示例3: setVolume
import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; //导入依赖的package包/类
@Override
@UpnpAction
public void setVolume(
@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes arg0,
@UpnpInputArgument(name = "Channel") String arg1,
@UpnpInputArgument(name = "DesiredVolume", stateVariable = "Volume") UnsignedIntegerTwoBytes arg2)
throws RenderingControlException {
// TODO Auto-generated method stub
int volume = arg2.getValue().intValue();
int maxVolume = mAudioManager
.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
Log.e(LOG_TAG, "MaxVolume:" + maxVolume + "currentVolume" + volume);
if (volume >= 0 && volume <= maxVolume) {
mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, volume,
AudioManager.FLAG_PLAY_SOUND | AudioManager.FLAG_SHOW_UI);
if (volume > 0)
mAudioManager.setStreamMute(AudioManager.STREAM_MUSIC, false);
boolean isMute = volume == 0 ? true : false;
getLastChange().setEventedValue(
getDefaultInstanceID(),
new RenderingControlVariable.Volume(new ChannelVolume(
Channel.Master, volume)),
new RenderingControlVariable.Mute(new ChannelMute(
Channel.Master, isMute)));
getLastChange().fire(getPropertyChangeSupport());
} else
throw new RenderingControlException(ErrorCode.INVALID_ARGS,
"The volume is invalid.");
}
开发者ID:sky24987,项目名称:UPlayer,代码行数:30,代码来源:RenderingControlService.java
示例4: PortMapping
import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; //导入依赖的package包/类
public PortMapping(Map<String, ActionArgumentValue<Service>> map) {
this(
(Boolean) map.get("NewEnabled").getValue(),
(UnsignedIntegerFourBytes) map.get("NewLeaseDuration").getValue(),
(String) map.get("NewRemoteHost").getValue(),
(UnsignedIntegerTwoBytes) map.get("NewExternalPort").getValue(),
(UnsignedIntegerTwoBytes) map.get("NewInternalPort").getValue(),
(String) map.get("NewInternalClient").getValue(),
Protocol.valueOf(map.get("NewProtocol").toString()),
(String) map.get("NewPortMappingDescription").getValue()
);
}
开发者ID:offbye,项目名称:DroidDLNA,代码行数:13,代码来源:PortMapping.java
示例5: getAttributes
import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; //导入依赖的package包/类
@Override
public Map.Entry<String, String>[] getAttributes() {
return new Map.Entry[]{
new AbstractMap.SimpleEntry<String, String>(
"val",
new UnsignedIntegerTwoBytesDatatype().getString(
new UnsignedIntegerTwoBytes(getValue().getVolumeDB())
)
),
new AbstractMap.SimpleEntry<String, String>(
"channel",
getValue().getChannel().name()
)
};
}
开发者ID:offbye,项目名称:DroidDLNA,代码行数:16,代码来源:EventedValueChannelVolumeDB.java
示例6: getAttributes
import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; //导入依赖的package包/类
@Override
public Map.Entry<String, String>[] getAttributes() {
return new Map.Entry[]{
new AbstractMap.SimpleEntry<String, String>(
"val",
new UnsignedIntegerTwoBytesDatatype().getString(
new UnsignedIntegerTwoBytes(getValue().getVolume())
)
),
new AbstractMap.SimpleEntry<String, String>(
"channel",
getValue().getChannel().name()
)
};
}
开发者ID:offbye,项目名称:DroidDLNA,代码行数:16,代码来源:EventedValueChannelVolume.java
示例7: getVolume
import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; //导入依赖的package包/类
@Override
public UnsignedIntegerTwoBytes getVolume(UnsignedIntegerFourBytes instanceId, String channelName) throws RenderingControlException {
checkChannel(channelName);
int vol = (int) (getInstance(instanceId).getVolume() * 100);
log.fine("Getting backend volume: " + vol);
return new UnsignedIntegerTwoBytes(vol);
}
开发者ID:offbye,项目名称:DroidDLNA,代码行数:8,代码来源:AudioRenderingControl.java
示例8: setVolume
import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; //导入依赖的package包/类
@Override
public void setVolume(UnsignedIntegerFourBytes instanceId, String channelName, UnsignedIntegerTwoBytes desiredVolume) throws RenderingControlException {
checkChannel(channelName);
double vol = desiredVolume.getValue() / 100d;
log.fine("Setting backend volume to: " + vol);
getInstance(instanceId).setVolume(vol);
}
开发者ID:offbye,项目名称:DroidDLNA,代码行数:8,代码来源:AudioRenderingControl.java
示例9: setVolume
import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; //导入依赖的package包/类
@Override
public void setVolume(UnsignedIntegerFourBytes instanceId, String channelName,
UnsignedIntegerTwoBytes desiredVolume) throws RenderingControlException {
Log.d(getClass().getName(), "setVolume() ");
upnpClient.setVolume(desiredVolume.getValue().intValue());
}
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:7,代码来源:YaaccAudioRenderingControlService.java
示例10: getVolume
import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; //导入依赖的package包/类
@Override
public UnsignedIntegerTwoBytes getVolume(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes unsignedIntegerFourBytes, @UpnpInputArgument(name = "Channel") String s) throws RenderingControlException {
return null;
}
开发者ID:hezhubo,项目名称:HPlayer,代码行数:5,代码来源:AudioRenderingControl.java
示例11: getExternalPort
import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; //导入依赖的package包/类
public UnsignedIntegerTwoBytes getExternalPort() {
return externalPort;
}
开发者ID:offbye,项目名称:DroidDLNA,代码行数:4,代码来源:PortMapping.java
示例12: setExternalPort
import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; //导入依赖的package包/类
public void setExternalPort(UnsignedIntegerTwoBytes externalPort) {
this.externalPort = externalPort;
}
开发者ID:offbye,项目名称:DroidDLNA,代码行数:4,代码来源:PortMapping.java
示例13: getInternalPort
import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; //导入依赖的package包/类
public UnsignedIntegerTwoBytes getInternalPort() {
return internalPort;
}
开发者ID:offbye,项目名称:DroidDLNA,代码行数:4,代码来源:PortMapping.java
示例14: setInternalPort
import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; //导入依赖的package包/类
public void setInternalPort(UnsignedIntegerTwoBytes internalPort) {
this.internalPort = internalPort;
}
开发者ID:offbye,项目名称:DroidDLNA,代码行数:4,代码来源:PortMapping.java
示例15: getVolume
import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; //导入依赖的package包/类
@UpnpAction(out = @UpnpOutputArgument(name = "CurrentVolume", stateVariable = "Volume"))
public abstract UnsignedIntegerTwoBytes getVolume(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId,
@UpnpInputArgument(name = "Channel") String channelName) throws RenderingControlException;
开发者ID:offbye,项目名称:DroidDLNA,代码行数:4,代码来源:AbstractAudioRenderingControl.java
示例16: setVolume
import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; //导入依赖的package包/类
@UpnpAction
public abstract void setVolume(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId,
@UpnpInputArgument(name = "Channel") String channelName,
@UpnpInputArgument(name = "DesiredVolume", stateVariable = "Volume") UnsignedIntegerTwoBytes desiredVolume) throws RenderingControlException;
开发者ID:offbye,项目名称:DroidDLNA,代码行数:5,代码来源:AbstractAudioRenderingControl.java
示例17: SetVolume
import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; //导入依赖的package包/类
public SetVolume(UnsignedIntegerFourBytes instanceId, Service service, long newVolume) {
super(new ActionInvocation(service.getAction("SetVolume")));
getActionInvocation().setInput("InstanceID", instanceId);
getActionInvocation().setInput("Channel", Channel.Master.toString());
getActionInvocation().setInput("DesiredVolume", new UnsignedIntegerTwoBytes(newVolume));
}
开发者ID:offbye,项目名称:DroidDLNA,代码行数:7,代码来源:SetVolume.java
示例18: Brightness
import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; //导入依赖的package包/类
public Brightness(UnsignedIntegerTwoBytes value) {
super(value);
}
开发者ID:offbye,项目名称:DroidDLNA,代码行数:4,代码来源:RenderingControlVariable.java
示例19: Contrast
import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; //导入依赖的package包/类
public Contrast(UnsignedIntegerTwoBytes value) {
super(value);
}
开发者ID:offbye,项目名称:DroidDLNA,代码行数:4,代码来源:RenderingControlVariable.java
示例20: Sharpness
import org.fourthline.cling.model.types.UnsignedIntegerTwoBytes; //导入依赖的package包/类
public Sharpness(UnsignedIntegerTwoBytes value) {
super(value);
}
开发者ID:offbye,项目名称:DroidDLNA,代码行数:4,代码来源:RenderingControlVariable.java
注:本文中的org.fourthline.cling.model.types.UnsignedIntegerTwoBytes类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论