当前位置: 首页>>代码示例>>Java>>正文


Java Action.getOutputArgumentList方法代码示例

本文整理汇总了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();
	}
}
 
开发者ID:NoYouShutup,项目名称:CryptMeme,代码行数:18,代码来源:UPnP.java

示例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);
	}
}
 
开发者ID:NoYouShutup,项目名称:CryptMeme,代码行数:19,代码来源:UPnP.java

示例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;
}
 
开发者ID:xunboo,项目名称:JJCamera,代码行数:34,代码来源:UpnpCommand.java

示例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;
}
 
开发者ID:xunboo,项目名称:JJCamera,代码行数:52,代码来源:UpnpCommand.java


注:本文中的org.cybergarage.upnp.Action.getOutputArgumentList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。