本文整理了Java中org.cybergarage.upnp.Device.getServiceList()
方法的一些代码示例,展示了Device.getServiceList()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Device.getServiceList()
方法的具体详情如下:
包路径:org.cybergarage.upnp.Device
类名称:Device
方法名:getServiceList
暂无
代码示例来源:origin: i2p/i2p.i2p
public void setQueryListener(QueryListener listener) {
ServiceList serviceList = getServiceList();
int nServices = serviceList.size();
for (int n = 0; n < nServices; n++) {
Service service = serviceList.getService(n);
service.setQueryListener(listener);
}
}
代码示例来源:origin: i2p/i2p.i2p
public void setActionListener(ActionListener listener) {
ServiceList serviceList = getServiceList();
int nServices = serviceList.size();
for (int n = 0; n < nServices; n++) {
Service service = serviceList.getService(n);
service.setActionListener(listener);
}
}
代码示例来源:origin: i2p/i2p.i2p
private void listSubServices(Device dev, StringBuilder sb) {
ServiceList sl = dev.getServiceList();
if (sl.isEmpty())
return;
代码示例来源:origin: i2p/i2p.i2p
public Service getSubscriberService(String uuid) {
ServiceList serviceList = getServiceList();
int serviceCnt = serviceList.size();
for (int n = 0; n < serviceCnt; n++) {
Service service = serviceList.getService(n);
String sid = service.getSID();
if (uuid.equals(sid) == true)
return service;
}
DeviceList devList = getDeviceList();
int devCnt = devList.size();
for (int n = 0; n < devCnt; n++) {
Device dev = devList.getDevice(n);
Service service = dev.getSubscriberService(uuid);
if (service != null)
return service;
}
return null;
}
代码示例来源:origin: i2p/i2p.i2p
public StateVariable getStateVariable(String serviceType, String name) {
if (serviceType == null && name == null)
return null;
ServiceList serviceList = getServiceList();
int serviceCnt = serviceList.size();
for (int n = 0; n < serviceCnt; n++) {
Service service = serviceList.getService(n);
// Thanks for Theo Beisch (11/09/04)
if (serviceType != null) {
if (service.getServiceType().equals(serviceType) == false)
continue;
}
StateVariable stateVar = service.getStateVariable(name);
if (stateVar != null)
return stateVar;
}
DeviceList devList = getDeviceList();
int devCnt = devList.size();
for (int n = 0; n < devCnt; n++) {
Device dev = devList.getDevice(n);
StateVariable stateVar = dev.getStateVariable(serviceType, name);
if (stateVar != null)
return stateVar;
}
return null;
}
代码示例来源:origin: i2p/i2p.i2p
public Service getServiceBySCPDURL(String searchUrl) {
ServiceList serviceList = getServiceList();
int serviceCnt = serviceList.size();
for (int n = 0; n < serviceCnt; n++) {
Service service = serviceList.getService(n);
if (service.isSCPDURL(searchUrl) == true)
return service;
}
DeviceList devList = getDeviceList();
int devCnt = devList.size();
for (int n = 0; n < devCnt; n++) {
Device dev = devList.getDevice(n);
Service service = dev.getServiceBySCPDURL(searchUrl);
if (service != null)
return service;
}
return null;
}
代码示例来源:origin: i2p/i2p.i2p
public Service getService(String name) {
ServiceList serviceList = getServiceList();
int serviceCnt = serviceList.size();
for (int n = 0; n < serviceCnt; n++) {
Service service = serviceList.getService(n);
if (service.isService(name) == true)
return service;
}
DeviceList devList = getDeviceList();
int devCnt = devList.size();
for (int n = 0; n < devCnt; n++) {
Device dev = devList.getDevice(n);
Service service = dev.getService(name);
if (service != null)
return service;
}
return null;
}
代码示例来源:origin: i2p/i2p.i2p
public Service getServiceByControlURL(String searchUrl) {
ServiceList serviceList = getServiceList();
int serviceCnt = serviceList.size();
for (int n = 0; n < serviceCnt; n++) {
Service service = serviceList.getService(n);
if (service.isControlURL(searchUrl) == true)
return service;
}
DeviceList devList = getDeviceList();
int devCnt = devList.size();
for (int n = 0; n < devCnt; n++) {
Device dev = devList.getDevice(n);
Service service = dev.getServiceByControlURL(searchUrl);
if (service != null)
return service;
}
return null;
}
代码示例来源:origin: i2p/i2p.i2p
public Service getServiceByEventSubURL(String searchUrl) {
ServiceList serviceList = getServiceList();
int serviceCnt = serviceList.size();
for (int n = 0; n < serviceCnt; n++) {
Service service = serviceList.getService(n);
if (service.isEventSubURL(searchUrl) == true)
return service;
}
DeviceList devList = getDeviceList();
int devCnt = devList.size();
for (int n = 0; n < devCnt; n++) {
Device dev = devList.getDevice(n);
Service service = dev.getServiceByEventSubURL(searchUrl);
if (service != null)
return service;
}
return null;
}
代码示例来源:origin: i2p/i2p.i2p
public void unsubscribe(Device device)
{
ServiceList serviceList = device.getServiceList();
int serviceCnt = serviceList.size();
for (int n=0; n<serviceCnt; n++) {
Service service = serviceList.getService(n);
if (service.hasSID() == true)
unsubscribe(service);
}
DeviceList childDevList = device.getDeviceList();
int childDevCnt = childDevList.size();
for (int n=0; n<childDevCnt; n++) {
Device cdev = childDevList.getDevice(n);
unsubscribe(cdev);
}
}
代码示例来源:origin: i2p/i2p.i2p
public Action getAction(String name) {
ServiceList serviceList = getServiceList();
int serviceCnt = serviceList.size();
for (int n = 0; n < serviceCnt; n++) {
Service service = serviceList.getService(n);
ActionList actionList = service.getActionList();
int actionCnt = actionList.size();
for (int i = 0; i < actionCnt; i++) {
Action action = (Action) actionList.getAction(i);
String actionName = action.getName();
if (actionName == null)
continue;
if (actionName.equals(name) == true)
return action;
}
}
DeviceList devList = getDeviceList();
int devCnt = devList.size();
for (int n = 0; n < devCnt; n++) {
Device dev = devList.getDevice(n);
Action action = dev.getAction(name);
if (action != null)
return action;
}
return null;
}
代码示例来源:origin: i2p/i2p.i2p
public void renewSubscriberService(Device dev, long timeout)
{
ServiceList serviceList = dev.getServiceList();
int serviceCnt = serviceList.size();
for (int n=0; n<serviceCnt; n++) {
Service service = serviceList.getService(n);
if (service.isSubscribed() == false)
continue;
String sid = service.getSID();
boolean isRenewed = subscribe(service, sid, timeout);
if (isRenewed == false)
subscribe(service, timeout);
}
DeviceList cdevList = dev.getDeviceList();
int cdevCnt = cdevList.size();
for (int n=0; n<cdevCnt; n++) {
Device cdev = cdevList.getDevice(n);
renewSubscriberService(cdev, timeout);
}
}
代码示例来源:origin: i2p/i2p.i2p
private void updateConfigId(Device dev) {
int configId = 0;
DeviceList cdevList = dev.getDeviceList();
int cdevCnt = cdevList.size();
for (int n = 0; n < cdevCnt; n++) {
Device cdev = cdevList.getDevice(n);
updateConfigId(cdev);
configId += cdev.getConfigId();
configId &= UPnP.CONFIGID_UPNP_ORG_MAX;
}
ServiceList serviceList = dev.getServiceList();
int serviceCnt = serviceList.size();
for (int n = 0; n < serviceCnt; n++) {
Service service = serviceList.getService(n);
service.updateConfigId();
configId += service.getConfigId();
configId &= UPnP.CONFIGID_UPNP_ORG_MAX;
}
Node devNode = getDeviceNode();
if (devNode == null)
return;
String devDescXml = devNode.toString();
configId += UPnP.caluculateConfigId(devDescXml);
configId &= UPnP.CONFIGID_UPNP_ORG_MAX;
devNode.setAttribute(CONFIG_ID, configId);
}
代码示例来源:origin: i2p/i2p.i2p
ServiceList serviceList = getServiceList();
int serviceCnt = serviceList.size();
for (int n = 0; n < serviceCnt; n++) {
代码示例来源:origin: i2p/i2p.i2p
ServiceList serviceList = getServiceList();
int serviceCnt = serviceList.size();
for (int n = 0; n < serviceCnt; n++) {
代码示例来源:origin: cybergarage/cybergarage-upnp
public void setQueryListener(QueryListener listener) {
ServiceList serviceList = getServiceList();
int nServices = serviceList.size();
for (int n = 0; n < nServices; n++) {
Service service = serviceList.getService(n);
service.setQueryListener(listener);
}
}
代码示例来源:origin: geniusgithub/MediaPlayer
public void setQueryListener(QueryListener listener) {
ServiceList serviceList = getServiceList();
int nServices = serviceList.size();
for (int n = 0; n < nServices; n++) {
Service service = serviceList.getService(n);
service.setQueryListener(listener);
}
}
代码示例来源:origin: cybergarage/cybergarage-upnp
public void setActionListener(ActionListener listener) {
ServiceList serviceList = getServiceList();
int nServices = serviceList.size();
for (int n = 0; n < nServices; n++) {
Service service = serviceList.getService(n);
service.setActionListener(listener);
}
}
代码示例来源:origin: geniusgithub/MediaPlayer
public void setActionListener(ActionListener listener) {
ServiceList serviceList = getServiceList();
int nServices = serviceList.size();
for (int n = 0; n < nServices; n++) {
Service service = serviceList.getService(n);
service.setActionListener(listener);
}
}
代码示例来源:origin: i2p/i2p.i2p
ServiceList serviceList = getServiceList();
int serviceCnt = serviceList.size();
for (int n = 0; n < serviceCnt; n++) {
内容来源于网络,如有侵权,请联系作者删除!