本文整理了Java中org.cybergarage.upnp.Device.isDeviceType()
方法的一些代码示例,展示了Device.isDeviceType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Device.isDeviceType()
方法的具体详情如下:
包路径:org.cybergarage.upnp.Device
类名称:Device
方法名:isDeviceType
暂无
代码示例来源:origin: cybergarage/cybergarage-upnp
public Device getServerDevice(String name)
{
Device foundDev = getDevice(name);
if (foundDev.isDeviceType(MediaServer.DEVICE_TYPE))
return foundDev;
return null;
}
代码示例来源:origin: cybergarage/cybergarage-upnp
public Device getRendererDevice(String name)
{
Device foundDev = getDevice(name);
if (foundDev.isDeviceType(MediaRenderer.DEVICE_TYPE))
return foundDev;
return null;
}
代码示例来源:origin: geniusgithub/MediaPlayer
public Device getServerDevice(String name)
{
Device foundDev = getDevice(name);
if (foundDev.isDeviceType(MediaServer.DEVICE_TYPE))
return foundDev;
return null;
}
代码示例来源:origin: geniusgithub/MediaPlayer
public Device getRendererDevice(String name)
{
Device foundDev = getDevice(name);
if (foundDev.isDeviceType(MediaRenderer.DEVICE_TYPE))
return foundDev;
return null;
}
代码示例来源:origin: cybergarage/cybergarage-upnp
public synchronized void updateDeviceComboList()
{
DeviceList devList = ctrlPoint.getDeviceList();
int devCnt = devList.size();
for (int n=0; n<devCnt; n++) {
Device dev = devList.getDevice(n);
if (dev.isDeviceType("urn:schemas-upnp-org:device:InternetGatewayDevice:1") == false)
continue;
String devComboName = getDeviceComboName(dev);
int itemCnt = deviceCombo.getItemCount();
boolean hasSameDeviceName = false;
for (int i=0; i<itemCnt; i++) {
String itemName = (String)deviceCombo.getItemAt(i);
if (itemName == null)
continue;
if (itemName.compareTo(devComboName) == 0) {
hasSameDeviceName = true;
break;
}
}
if (hasSameDeviceName == false) {
deviceCombo.addItem(devComboName);
}
}
}
代码示例来源:origin: cybergarage/cybergarage-upnp
public void printMediaServers()
{
DeviceList devList = getDeviceList();
int devCnt = devList.size();
int mediaServerCnt = 0;
for (int n=0; n<devCnt; n++) {
Device dev = devList.getDevice(n);
if (dev.isDeviceType(MediaServer.DEVICE_TYPE) == false)
continue;
System.out.println("[" + n + "] " + dev.getFriendlyName() + ", " + dev.getLeaseTime() + ", " + dev.getElapsedTime());
printContentDirectory(dev);
mediaServerCnt++;
}
if (mediaServerCnt == 0) {
System.out.println("MediaServer is not found");
}
}
代码示例来源:origin: cybergarage/cybergarage-upnp
private DeviceList getDeviceList(String deviceType)
{
DeviceList devList = new DeviceList();
DeviceList allDevList = getDeviceList();
int allDevCnt = allDevList.size();
for (int n=0; n<allDevCnt; n++) {
Device dev = allDevList.getDevice(n);
if (dev.isDeviceType(deviceType) == false)
continue;
devList.add(dev);
}
return devList;
}
代码示例来源:origin: geniusgithub/MediaPlayer
public void printMediaServers()
{
DeviceList devList = getDeviceList();
int devCnt = devList.size();
int mediaServerCnt = 0;
for (int n=0; n<devCnt; n++) {
Device dev = devList.getDevice(n);
if (dev.isDeviceType(MediaServer.DEVICE_TYPE) == false)
continue;
System.out.println("[" + n + "] " + dev.getFriendlyName() + ", " + dev.getLeaseTime() + ", " + dev.getElapsedTime());
printContentDirectory(dev);
mediaServerCnt++;
}
if (mediaServerCnt == 0) {
System.out.println("MediaServer is not found");
}
}
代码示例来源:origin: geniusgithub/MediaPlayer
private DeviceList getDeviceList(String deviceType)
{
DeviceList devList = new DeviceList();
DeviceList allDevList = getDeviceList();
int allDevCnt = allDevList.size();
for (int n=0; n<allDevCnt; n++) {
Device dev = allDevList.getDevice(n);
if (dev.isDeviceType(deviceType) == false)
continue;
devList.add(dev);
}
return devList;
}
代码示例来源:origin: cybergarage/cybergarage-upnp
for (int n=0; n<devCnt; n++) {
Device dev = devList.getDevice(n);
if (dev.isDeviceType(MediaServer.DEVICE_TYPE) == false)
continue;
System.out.println("[" + n + "] " + dev.getFriendlyName() + ", " + dev.getLeaseTime() + ", " + dev.getElapsedTime());
代码示例来源:origin: geniusgithub/MediaPlayer
for (int n=0; n<devCnt; n++) {
Device dev = devList.getDevice(n);
if (dev.isDeviceType(MediaServer.DEVICE_TYPE) == false)
continue;
System.out.println("[" + n + "] " + dev.getFriendlyName() + ", " + dev.getLeaseTime() + ", " + dev.getElapsedTime());
内容来源于网络,如有侵权,请联系作者删除!