org.fourthline.cling.model.meta.Device.getDisplayString()方法的使用及代码示例

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

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

Device.getDisplayString介绍

暂无

代码示例

代码示例来源:origin: 4thline/cling

public String getDetailsMessage() {
  StringBuilder sb = new StringBuilder();
  if (getDevice().isFullyHydrated()) {
    sb.append(getDevice().getDisplayString());
    sb.append("\n\n");
    for (Service service : getDevice().getServices()) {
      sb.append(service.getServiceType()).append("\n");
    }
  } else {
    sb.append(getString(R.string.deviceDetailsNotYetAvailable));
  }
  return sb.toString();
}
// DOC:DETAILS

代码示例来源:origin: 4thline/cling

@Override
public int indexOf(Object o) {
  if (o instanceof Device) {
    Device device = (Device) o;
    DeviceItem display = new DeviceItem(device, device.getDisplayString());
    return indexOf(display);
  }
  return super.indexOf(o);
}

代码示例来源:origin: 4thline/cling

protected Container createRootContainer(Service service) {
  Container rootContainer = new Container();
  rootContainer.setId("0");
  rootContainer.setTitle("Content Directory on " + service.getDevice().getDisplayString());
  return rootContainer;
}

代码示例来源:origin: 4thline/cling

@Override
  public String toString() {
    String name =
      getDevice().getDetails() != null && getDevice().getDetails().getFriendlyName() != null
        ? getDevice().getDetails().getFriendlyName()
        : getDevice().getDisplayString();
    // Display a little star while the device is being loaded (see performance optimization earlier)
    return device.isFullyHydrated() ? name : name + " *";
  }
}

代码示例来源:origin: 4thline/cling

nodeDevice.getDisplayString()
        + " (UPnP Version: " + nodeDevice.getVersion().getMajor() + "." + nodeDevice.getVersion().getMinor() + ")"
);

代码示例来源:origin: trishika/DroidUPnP

@Override
public String getDisplayString()
{
  return device.getDisplayString();
}

代码示例来源:origin: fire3/sailorcast

@Override
public String getDisplayString()
{
  return device.getDisplayString();
}

代码示例来源:origin: kaklakariada/portmapper

private static String getName(final Service<?, ?> service) {
  return service.getDevice().getDisplayString();
}

代码示例来源:origin: hubing8658/UPnP-DLNA-Demo

public String getDetailsMsg() {
    StringBuilder sb = new StringBuilder();
    if (device.isFullyHydrated()) {
      sb.append(device.getDisplayString());
      sb.append("\n\n");
//            sb.append(device.getIdentity().getUdn()).append("\n");
//            sb.append("max-age:" + device.getIdentity().getMaxAgeSeconds()).append("\n");
      for (Service srv : device.getServices()) {
        sb.append(srv.getServiceType()).append("\n");
      }
    } else {
      sb.append("正在查找设备详情,请稍后.");
    }
    return sb.toString();
  }

代码示例来源:origin: tinyMediaManager/tinyMediaManager

/**
 * Sets a device as our player for play/stop and other services<br>
 * Use getAvailablePlayers() for a list of them.
 * 
 * @param device
 *          device for playing
 */
public void setPlayer(Device device) {
 this.playerService = device.findService(new UDAServiceId("AVTransport"));
 if (this.playerService == null) {
  LOGGER.warn("Could not find AVTransportService on device " + device.getDisplayString());
 }
}

代码示例来源:origin: hezhubo/HPlayer

private Container createRootContainer(Service service) {
  Container rootContainer = new Container();
  rootContainer.setId("0");
  rootContainer.setTitle("Content Directory on "
      + service.getDevice().getDisplayString());
  containerIdList = new ArrayList<>();
  containerIdList.add("0");
  return rootContainer;
}

代码示例来源:origin: org.fourthline.cling/cling-support

protected Container createRootContainer(Service service) {
  Container rootContainer = new Container();
  rootContainer.setId("0");
  rootContainer.setTitle("Content Directory on " + service.getDevice().getDisplayString());
  return rootContainer;
}

代码示例来源:origin: hubing8658/UPnP-DLNA-Demo

@Override
public String toString() {
  String name = device.getDetails() != null && device.getDetails().getFriendlyName() != null
      ? device.getDetails().getFriendlyName() : device.getDisplayString();
  return device.isFullyHydrated() ? name : name + " *";
}

相关文章