forked from I2P_Developers/i2p.i2p
Unmodified cybergarage-upnp from github rev 9499b03 2015-02-05 https://github.com/cybergarage/cybergarage-upnp/commits/master which is the same as rev 3ed1af9 2014-07-28 except for the addition of README.md which we aren't using. This is post-version 3.0. Omitted files: router/java/src/org/cybergarage/xml/parser/XercesParser.java router/java/src/org/cybergarage/xml/parser/XmlPullParser.java router/java/src/org/cybergarage/xml/parser/kXML2Parser.java chmod all files back to 644. Diverging from 2.1 checkin rev 59eae97dbb470d8c4a1e4dba3a9763e134bb0c53 in prep for merging. License unchanged. Compile tested only.
72 lines
1.6 KiB
Java
72 lines
1.6 KiB
Java
/******************************************************************
|
|
*
|
|
* CyberUPnP for Java
|
|
*
|
|
* Copyright (C) Satoshi Konno 2002-2003
|
|
*
|
|
* File: ST.java
|
|
*
|
|
* Revision;
|
|
*
|
|
* 01/07/03
|
|
* - first revision.
|
|
*
|
|
******************************************************************/
|
|
|
|
package org.cybergarage.upnp.device;
|
|
|
|
public class ST
|
|
{
|
|
public final static String ALL_DEVICE = "ssdp:all";
|
|
public final static String ROOT_DEVICE = "upnp:rootdevice";
|
|
public final static String UUID_DEVICE = "uuid";
|
|
public final static String URN_DEVICE = "urn:schemas-upnp-org:device:";
|
|
public final static String URN_SERVICE = "urn:schemas-upnp-org:service:";
|
|
|
|
public final static boolean isAllDevice(String value)
|
|
{
|
|
if (value == null)
|
|
return false;
|
|
if (value.equals(ALL_DEVICE) == true)
|
|
return true;
|
|
return value.equals("\"" + ALL_DEVICE + "\"");
|
|
}
|
|
|
|
public final static boolean isRootDevice(String value)
|
|
{
|
|
if (value == null)
|
|
return false;
|
|
if (value.equals(ROOT_DEVICE) == true)
|
|
return true;
|
|
return value.equals("\"" + ROOT_DEVICE + "\"");
|
|
}
|
|
|
|
public final static boolean isUUIDDevice(String value)
|
|
{
|
|
if (value == null)
|
|
return false;
|
|
if (value.startsWith(UUID_DEVICE) == true)
|
|
return true;
|
|
return value.startsWith("\"" + UUID_DEVICE);
|
|
}
|
|
|
|
public final static boolean isURNDevice(String value)
|
|
{
|
|
if (value == null)
|
|
return false;
|
|
if (value.startsWith(URN_DEVICE) == true)
|
|
return true;
|
|
return value.startsWith("\"" + URN_DEVICE);
|
|
}
|
|
|
|
public final static boolean isURNService(String value)
|
|
{
|
|
if (value == null)
|
|
return false;
|
|
if (value.startsWith(URN_SERVICE) == true)
|
|
return true;
|
|
return value.startsWith("\"" + URN_SERVICE);
|
|
}
|
|
}
|
|
|