本文整理了Java中org.cybergarage.upnp.Device.<init>()
方法的一些代码示例,展示了Device.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Device.<init>()
方法的具体详情如下:
包路径:org.cybergarage.upnp.Device
类名称:Device
方法名:<init>
暂无
代码示例来源:origin: i2p/i2p.i2p
private Device getDevice(Node rootNode)
{
if (rootNode == null)
return null;
Node devNode = rootNode.getNode(Device.ELEM_NAME);
if (devNode == null)
return null;
return new Device(rootNode, devNode);
}
代码示例来源:origin: i2p/i2p.i2p
public Device getRootDevice() {
Node rootNode = getRootNode();
if (rootNode == null)
return null;
Node devNode = rootNode.getNode(Device.ELEM_NAME);
if (devNode == null)
return null;
return new Device(rootNode, devNode);
}
代码示例来源:origin: i2p/i2p.i2p
public Device getDevice()
{
return new Device(getRootNode(), getDeviceNode());
}
代码示例来源:origin: i2p/i2p.i2p
/**
*
* @return A Device that contain this object.<br>
* Return <code>null</code> if this is a root device.
*/
public Device getParentDevice() {
if (isRootDevice())
return null;
Node devNode = getDeviceNode();
Node aux = null;
// <device><deviceList><device>
aux = devNode.getParentNode().getParentNode();
return new Device(aux);
}
代码示例来源:origin: i2p/i2p.i2p
public DeviceList getDeviceList() {
DeviceList devList = new DeviceList();
Node devListNode = getDeviceNode().getNode(DeviceList.ELEM_NAME);
if (devListNode == null)
return devList;
int nNode = devListNode.getNNodes();
for (int n = 0; n < nNode; n++) {
Node node = devListNode.getNode(n);
if (Device.isDeviceNode(node) == false)
continue;
Device dev = new Device(node);
devList.add(dev);
}
return devList;
}
代码示例来源:origin: cybergarage/cybergarage-upnp
private Device getDevice(Node rootNode)
{
if (rootNode == null)
return null;
Node devNode = rootNode.getNode(Device.ELEM_NAME);
if (devNode == null)
return null;
return new Device(rootNode, devNode);
}
代码示例来源:origin: geniusgithub/MediaPlayer
private Device getDevice(Node rootNode)
{
if (rootNode == null)
return null;
Node devNode = rootNode.getNode(Device.ELEM_NAME);
if (devNode == null)
return null;
return new Device(rootNode, devNode);
}
代码示例来源:origin: cybergarage/cybergarage-upnp
public Device getRootDevice() {
Node rootNode = getRootNode();
if (rootNode == null)
return null;
Node devNode = rootNode.getNode(Device.ELEM_NAME);
if (devNode == null)
return null;
return new Device(rootNode, devNode);
}
代码示例来源:origin: geniusgithub/MediaPlayer
public Device getRootDevice() {
Node rootNode = getRootNode();
if (rootNode == null)
return null;
Node devNode = rootNode.getNode(Device.ELEM_NAME);
if (devNode == null)
return null;
return new Device(rootNode, devNode);
}
代码示例来源:origin: geniusgithub/MediaPlayer
public Device getDevice()
{
return new Device(getRootNode(), getDeviceNode());
}
代码示例来源:origin: cybergarage/cybergarage-upnp
public Device getDevice()
{
return new Device(getRootNode(), getDeviceNode());
}
代码示例来源:origin: geniusgithub/MediaPlayer
/**
*
* @return A Device that contain this object.<br>
* Return <code>null</code> if this is a root device.
* @author Stefano "Kismet" Lenzi
*/
public Device getParentDevice() {
if (isRootDevice())
return null;
Node devNode = getDeviceNode();
Node aux = null;
// <device><deviceList><device>
aux = devNode.getParentNode().getParentNode();
return new Device(aux);
}
代码示例来源:origin: cybergarage/cybergarage-upnp
/**
*
* @return A Device that contain this object.<br>
* Return <code>null</code> if this is a root device.
* @author Stefano "Kismet" Lenzi
*/
public Device getParentDevice() {
if (isRootDevice())
return null;
Node devNode = getDeviceNode();
Node aux = null;
// <device><deviceList><device>
aux = devNode.getParentNode().getParentNode();
return new Device(aux);
}
代码示例来源:origin: org.apache.felix/org.apache.felix.upnp.basedriver
private static void buildDevice(String id,Device parent, ServiceReference sr) {
Node dev = new Node(Device.ELEM_NAME);
DeviceData dd = new DeviceData();
dd.setDescriptionURI(id+"/gen-desc.xml");
dev.setUserData(dd);
Device devUPnP = new Device(dev);
devUPnP.setFriendlyName((String) sr.getProperty(UPnPDevice.FRIENDLY_NAME));
devUPnP.setManufacture((String) sr.getProperty(UPnPDevice.MANUFACTURER));
devUPnP.setManufactureURL((String) sr.getProperty(UPnPDevice.MANUFACTURER_URL));
devUPnP.setModelDescription((String) sr.getProperty(UPnPDevice.MODEL_DESCRIPTION));
devUPnP.setModelName((String) sr.getProperty(UPnPDevice.MODEL_NAME));
devUPnP.setModelNumber((String) sr.getProperty(UPnPDevice.MODEL_NUMBER));
devUPnP.setModelURL((String) sr.getProperty(UPnPDevice.MODEL_URL));
devUPnP.setSerialNumber((String) sr.getProperty(UPnPDevice.SERIAL_NUMBER));
devUPnP.setUDN((String) sr.getProperty(UPnPDevice.UDN));
devUPnP.setUPC((String) sr.getProperty(UPnPDevice.UPC));
devUPnP.setLocation(id+"/gen-desc.xml");
addServices(id,devUPnP,sr);
addDevices(id,devUPnP,sr);
parent.addDevice(devUPnP); // twa: essential!!!!!!!
devUPnP.setPresentationURL((String) sr.getProperty(UPnPDevice.PRESENTATION_URL));
}
代码示例来源:origin: org.apache.felix/org.apache.felix.upnp.basedriver
dd.setDescriptionURI("/gen-desc.xml");
dev.setUserData(dd);
Device devUPnP = new Device(root,dev);
代码示例来源:origin: apache/felix
private static Device buildRootDeviceNode(Node root, ServiceReference sr){
Node dev = new Node(Device.ELEM_NAME);
root.addNode(dev);
DeviceData dd = new DeviceData();
dd.setDescriptionURI("/gen-desc.xml");
dev.setUserData(dd);
Device devUPnP = new Device(root,dev);
devUPnP.setDeviceType(extractDeviceType(sr));
devUPnP.setFriendlyName((String) sr.getProperty(UPnPDevice.FRIENDLY_NAME));
devUPnP.setManufacture((String) sr.getProperty(UPnPDevice.MANUFACTURER));
devUPnP.setManufactureURL((String) sr.getProperty(UPnPDevice.MANUFACTURER_URL));
devUPnP.setModelDescription((String) sr.getProperty(UPnPDevice.MODEL_DESCRIPTION));
devUPnP.setModelName((String) sr.getProperty(UPnPDevice.MODEL_NAME));
devUPnP.setModelNumber((String) sr.getProperty(UPnPDevice.MODEL_NUMBER));
devUPnP.setModelURL((String) sr.getProperty(UPnPDevice.MODEL_URL));
devUPnP.setSerialNumber((String) sr.getProperty(UPnPDevice.SERIAL_NUMBER));
devUPnP.setUDN((String) sr.getProperty(UPnPDevice.UDN));
devUPnP.setUPC((String) sr.getProperty(UPnPDevice.UPC));
devUPnP.setLocation("/gen-desc.xml");
addServices("",devUPnP,sr);
addDevices("",devUPnP,sr);
devUPnP.setPresentationURL((String) sr.getProperty(UPnPDevice.PRESENTATION_URL));
return devUPnP;
}
代码示例来源:origin: apache/felix
private static void buildDevice(String id,Device parent, ServiceReference sr) {
Node dev = new Node(Device.ELEM_NAME);
DeviceData dd = new DeviceData();
dd.setDescriptionURI(id+"/gen-desc.xml");
dev.setUserData(dd);
Device devUPnP = new Device(dev);
devUPnP.setDeviceType(extractDeviceType(sr));
devUPnP.setFriendlyName((String) sr.getProperty(UPnPDevice.FRIENDLY_NAME));
devUPnP.setManufacture((String) sr.getProperty(UPnPDevice.MANUFACTURER));
devUPnP.setManufactureURL((String) sr.getProperty(UPnPDevice.MANUFACTURER_URL));
devUPnP.setModelDescription((String) sr.getProperty(UPnPDevice.MODEL_DESCRIPTION));
devUPnP.setModelName((String) sr.getProperty(UPnPDevice.MODEL_NAME));
devUPnP.setModelNumber((String) sr.getProperty(UPnPDevice.MODEL_NUMBER));
devUPnP.setModelURL((String) sr.getProperty(UPnPDevice.MODEL_URL));
devUPnP.setSerialNumber((String) sr.getProperty(UPnPDevice.SERIAL_NUMBER));
devUPnP.setUDN((String) sr.getProperty(UPnPDevice.UDN));
devUPnP.setUPC((String) sr.getProperty(UPnPDevice.UPC));
devUPnP.setLocation(id+"/gen-desc.xml");
addServices(id,devUPnP,sr);
addDevices(id,devUPnP,sr);
parent.addDevice(devUPnP); // twa: essential!!!!!!!
devUPnP.setPresentationURL((String) sr.getProperty(UPnPDevice.PRESENTATION_URL));
}
代码示例来源:origin: geniusgithub/MediaPlayer
public DeviceList getDeviceList() {
DeviceList devList = new DeviceList();
Node devListNode = getDeviceNode().getNode(DeviceList.ELEM_NAME);
if (devListNode == null)
return devList;
int nNode = devListNode.getNNodes();
for (int n = 0; n < nNode; n++) {
Node node = devListNode.getNode(n);
if (Device.isDeviceNode(node) == false)
continue;
Device dev = new Device(node);
devList.add(dev);
}
return devList;
}
代码示例来源:origin: cybergarage/cybergarage-upnp
public DeviceList getDeviceList() {
DeviceList devList = new DeviceList();
Node devListNode = getDeviceNode().getNode(DeviceList.ELEM_NAME);
if (devListNode == null)
return devList;
int nNode = devListNode.getNNodes();
for (int n = 0; n < nNode; n++) {
Node node = devListNode.getNode(n);
if (Device.isDeviceNode(node) == false)
continue;
Device dev = new Device(node);
devList.add(dev);
}
return devList;
}
代码示例来源:origin: cybergarage/cybergarage-upnp
tvDev = new Device(DESCRIPTION_FILE_NAME);
内容来源于网络,如有侵权,请联系作者删除!