org.cybergarage.upnp.Device.getUDN()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(173)

本文整理了Java中org.cybergarage.upnp.Device.getUDN()方法的一些代码示例,展示了Device.getUDN()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Device.getUDN()方法的具体详情如下:
包路径:org.cybergarage.upnp.Device
类名称:Device
方法名:getUDN

Device.getUDN介绍

暂无

代码示例

代码示例来源:origin: i2p/i2p.i2p

public boolean hasUDN() {
  String udn = getUDN();
  if (udn == null || udn.length() <= 0)
    return false;
  return true;
}

代码示例来源:origin: i2p/i2p.i2p

private String getNotifyDeviceUSN() {
  if (isRootDevice() == false)
    return getUDN();
  return getUDN() + "::" + UPNP_ROOTDEVICE;
}

代码示例来源:origin: i2p/i2p.i2p

private String getNotifyDeviceNT() {
  if (isRootDevice() == false)
    return getUDN();
  return UPNP_ROOTDEVICE;
}

代码示例来源:origin: i2p/i2p.i2p

private String getNotifyDeviceTypeUSN() {
  return getUDN() + "::" + getDeviceType();
}

代码示例来源:origin: i2p/i2p.i2p

public boolean isDevice(String name) {
  if (name == null)
    return false;
  if (name.endsWith(getUDN()) == true)
    return true;
  if (name.equals(getFriendlyName()) == true)
    return true;
  if (name.endsWith(getDeviceType()) == true)
    return true;
  return false;
}

代码示例来源:origin: i2p/i2p.i2p

private String getNotifyServiceTypeUSN()
{
  return getDevice().getUDN() + "::" + getServiceType();
}

代码示例来源:origin: i2p/i2p.i2p

public boolean isRootDevice() {
  return getRootNode().getNode("device").getNodeValue(UDN)
      .equals(getUDN());
}

代码示例来源:origin: i2p/i2p.i2p

private void listSubDev(String prefix, Device dev, StringBuilder sb){
      if (prefix == null)
    sb.append("<p>").append(_t("Found Device")).append(": ");
  else
    sb.append("<li>").append(_t("Subdevice")).append(": ");
  sb.append(DataHelper.escapeHTML(dev.getFriendlyName()));
      if (prefix == null) {
    String ip = getIP(dev);
    if (ip != null)
      sb.append("<br>IP: ").append(ip);
    String udn = dev.getUDN();
    if (udn != null)
      sb.append("<br>UDN: ").append(DataHelper.escapeHTML(udn));
  }
  sb.append("</p>");
  listSubServices(dev, sb);
  
  DeviceList dl = dev.getDeviceList();
  if (dl.isEmpty())
    return;
  sb.append("<ul>\n");
  for(int j=0; j<dl.size(); j++) {
    Device subDev = dl.getDevice(j);
    if(subDev == null) continue;
    listSubDev(dev.getFriendlyName(), subDev, sb);
  }
  sb.append("</ul>\n");
}

代码示例来源:origin: i2p/i2p.i2p

System.out.println("<h3>Device " + (++i) +
          ": " + DataHelper.escapeHTML(device.getFriendlyName()) + "</h3>");
System.out.println("<p>UDN: " + DataHelper.escapeHTML(device.getUDN()));
System.out.println("<br>IP: " + getIP(device));
System.out.println(sb.toString());

代码示例来源:origin: i2p/i2p.i2p

String udn = dev.getUDN();
if (_log.shouldLog(Log.WARN))
  _log.warn("UP&P device removed : " + dev.getFriendlyName() + " UDN: " + udn);
    dev.isRootDevice() &&
    stringEquals(_router.getFriendlyName(), dev.getFriendlyName()) &&
    stringEquals(_router.getUDN(), udn)) {
    if (_log.shouldLog(Log.WARN))
      _log.warn("UP&P IGD device removed : " + dev.getFriendlyName());

代码示例来源:origin: i2p/i2p.i2p

String devUSN = getUDN();
if (isRootDevice == true)
  devUSN += "::" + USN.ROOTDEVICE;
    postSearchResponse(ssdpPacket, ST.ROOT_DEVICE, devUSN);
} else if (ST.isUUIDDevice(ssdpST) == true) {
  String devUDN = getUDN();
  if (ssdpST.equals(devUDN) == true)
    postSearchResponse(ssdpPacket, devUDN, devUSN);
  if (ssdpST.equals(devType) == true) {
    devUSN = getUDN() + "::" + devType;
    postSearchResponse(ssdpPacket, devType, devUSN);

代码示例来源:origin: i2p/i2p.i2p

String udn = dev.getUDN();
if (udn == null)
  udn = "???";

代码示例来源:origin: cybergarage/cybergarage-upnp

private String getNotifyDeviceNT() {
  if (isRootDevice() == false)
    return getUDN();
  return UPNP_ROOTDEVICE;
}

代码示例来源:origin: cybergarage/cybergarage-upnp

public boolean isDevice(String name) {
  if (name == null)
    return false;
  if (name.endsWith(getUDN()) == true)
    return true;
  if (name.equals(getFriendlyName()) == true)
    return true;
  if (name.endsWith(getDeviceType()) == true)
    return true;
  return false;
}

代码示例来源:origin: geniusgithub/MediaPlayer

public boolean isDevice(String name) {
  if (name == null)
    return false;
  if (name.endsWith(getUDN()) == true)
    return true;
  if (name.equals(getFriendlyName()) == true)
    return true;
  if (name.endsWith(getDeviceType()) == true)
    return true;
  return false;
}

代码示例来源:origin: org.apache.felix/org.apache.felix.upnp.basedriver

public synchronized void removeOSGiExpireDevice(Device dev) {
  /*
   * unregistering root device with all its children device from OSGi 
   * deleting root device and all its children from struct that conatin 
   * a list of local device
   */
  removeOSGiandUPnPDeviceHierarchy(((OSGiDeviceInfo) devices.get(dev
      .getUDN())).getOSGiDevice());
}

代码示例来源:origin: geniusgithub/MediaPlayer

public void update(Device device){
    mTVManuFacture.setText(device.getManufacture());
    mTVModelName.setText(device.getModelName());
    mTVModelDescription.setText(device.getModelDescription());
    mTVLocation.setText(device.getLocation());
    mTVUDN.setText(device.getUDN());
  }
}

代码示例来源:origin: geniusgithub/MediaPlayer

@Override
public void addDevice(Device d) {
  if (UpnpUtil.isMediaServerDevice(d)){
    AlwaysLog.i(TAG, "mediaserver addDevice dev = " + d.getUDN());
    dmsMediaMng.addDevice(d);
  }else if (UpnpUtil.isMediaRenderDevice(d)){
    AlwaysLog.i(TAG, "mediarender addDevice dev = " + d.getUDN());
    dmrMediaMng.addDevice(d);
  }
}

代码示例来源:origin: geniusgithub/MediaPlayer

@Override
public void removeDevice(Device d) {
  if (UpnpUtil.isMediaServerDevice(d)){
    AlwaysLog.i(TAG, "mediaserver removeDevice dev = " + d.getUDN());
    dmsMediaMng.removeDevice(d);
  }else if (UpnpUtil.isMediaRenderDevice(d)){
    AlwaysLog.i(TAG, "mediarender removeDevice dev = " + d.getUDN());
    dmrMediaMng.removeDevice(d);
  }
}

代码示例来源:origin: i2p/i2p.i2p

ssdpSock.post(ssdpReq);
String devUDN = getUDN();
ssdpReq.setNT(devUDN);
ssdpReq.setUSN(devUDN);

相关文章

Device类方法