本文整理汇总了Java中org.cybergarage.upnp.Action.getOutputArgumentList方法的典型用法代码示例。如果您正苦于以下问题:Java Action.getOutputArgumentList方法的具体用法?Java Action.getOutputArgumentList怎么用?Java Action.getOutputArgumentList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.cybergarage.upnp.Action
的用法示例。
在下文中一共展示了Action.getOutputArgumentList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toString
import org.cybergarage.upnp.Action; //导入方法依赖的package包/类
private String toString(String action, String arg, Service serv) {
synchronized(toStringLock) {
if ((!action.equals(_lastAction)) ||
(!serv.equals(_lastService)) ||
_lastArgumentList == null) {
Action getIP = serv.getAction(action);
if(getIP == null || !getIP.postControlAction()) {
_lastAction = null;
return null;
}
_lastAction = action;
_lastService = serv;
_lastArgumentList = getIP.getOutputArgumentList();
}
return _lastArgumentList.getArgument(arg).getValue();
}
}
示例2: toString
import org.cybergarage.upnp.Action; //导入方法依赖的package包/类
private String toString(String action, String arg, Service serv) {
synchronized(toStringLock) {
if ((!action.equals(_lastAction)) ||
(!serv.equals(_lastService)) ||
_lastArgumentList == null) {
Action getIP = serv.getAction(action);
if(getIP == null || !getIP.postControlAction()) {
_lastAction = null;
return null;
}
_lastAction = action;
_lastService = serv;
_lastArgumentList = getIP.getOutputArgumentList();
}
String rv = _lastArgumentList.getArgument(arg).getValue();
return DataHelper.escapeHTML(rv);
}
}
示例3: GetExternalIPAddress
import org.cybergarage.upnp.Action; //导入方法依赖的package包/类
public static String GetExternalIPAddress(Device device)
{
String externalIp = "";
org.cybergarage.upnp.Service wanIPConnectionSer = device
.getService(UpnpConstant.SERVICE_TYPE.WANIPConnection);
if (wanIPConnectionSer != null)
{
Action action = wanIPConnectionSer
.getAction(UpnpConstant.ACTION.GetExternalIPAddress);
if (action != null)
{
if (action.postControlAction())
{
ArgumentList out = action.getOutputArgumentList();
if (out != null)
{
Argument argument = out
.getArgument(UpnpConstant.NewExternalIPAddress);
if (argument != null)
{
return argument.getValue();
}
}
}
}
else
{
Log.d(tag, "GetExternalIPAddress no IP find");
}
}
return externalIp;
}
示例4: GetGenericPortMappingEntry
import org.cybergarage.upnp.Action; //导入方法依赖的package包/类
public static MappingEntity GetGenericPortMappingEntry(Device device,
int NewPortMappingIndex)
{
MappingEntity entity = null;
org.cybergarage.upnp.Service wanIPConnectionSer = device
.getService(UpnpConstant.SERVICE_TYPE.WANIPConnection);
if (wanIPConnectionSer != null)
{
Action portMappingAction = wanIPConnectionSer
.getAction(UpnpConstant.ACTION.GetGenericPortMappingEntry);
if (portMappingAction != null)
{
ArgumentList argumentList = portMappingAction.getArgumentList();
argumentList.getArgument("NewPortMappingIndex").setValue(
Integer.toString(NewPortMappingIndex));
if (portMappingAction.postControlAction())
{
ArgumentList out = portMappingAction.getOutputArgumentList();
if (out != null)
{
entity = new MappingEntity();
for (int i = 0; i < out.size(); i++)
{
String key = ((Argument) out.get(i)).getName();
String value = ((Argument) out.get(i)).getValue();
if (key.equals("NewRemoteHost"))
entity.NewRemoteHost = value;
if (key.equals("NewExternalPort"))
entity.NewExternalPort = value;
if (key.equals("NewProtocol"))
entity.NewProtocol = value;
if (key.equals("NewInternalPort"))
entity.NewInternalPort = value;
if (key.equals("NewInternalClient"))
entity.NewInternalClient = value;
if (key.equals("NewEnabled"))
entity.NewEnabled = value;
if (key.equals("NewPortMappingDescription"))
entity.NewPortMappingDescription = value;
if (key.equals("NewLeaseDuration"))
entity.NewLeaseDuration = value;
}
Log.d(tag, entity.toString());
}
}
}
}
return entity;
}