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


Java ActionListener.actionControlReceived方法代码示例

本文整理汇总了Java中org.cybergarage.upnp.control.ActionListener.actionControlReceived方法的典型用法代码示例。如果您正苦于以下问题:Java ActionListener.actionControlReceived方法的具体用法?Java ActionListener.actionControlReceived怎么用?Java ActionListener.actionControlReceived使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.cybergarage.upnp.control.ActionListener的用法示例。


在下文中一共展示了ActionListener.actionControlReceived方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: performActionListener

import org.cybergarage.upnp.control.ActionListener; //导入方法依赖的package包/类
public boolean performActionListener(ActionRequest actionReq)
{
	ActionListener listener = (ActionListener)getActionListener();
	if (listener == null)
		return false;
	ActionResponse actionRes = new ActionResponse();
	setStatus(UPnPStatus.INVALID_ACTION);
	clearOutputAgumentValues();
	if (listener.actionControlReceived(this) == true) {
		actionRes.setResponse(this);
	}
	else {
		UPnPStatus upnpStatus = getStatus();
		actionRes.setFaultResponse(upnpStatus.getCode(), upnpStatus.getDescription());
	}
	if (Debug.isOn() == true)
		actionRes.print();
	actionReq.post(actionRes);
	return true;
}
 
开发者ID:NoYouShutup,项目名称:CryptMeme,代码行数:21,代码来源:Action.java

示例2: actionControlReceived

import org.cybergarage.upnp.control.ActionListener; //导入方法依赖的package包/类
public boolean actionControlReceived(Action action) {
    if (action.getName() == null) {
        return false;
    }
    MediaRenderer dmr = getMediaRenderer();
    if (dmr == null) {
        return false;
    }
    ActionListener listener = dmr.getActionListener();
    if (listener == null) {
        return false;
    }
    listener.actionControlReceived(action);
    return false;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:16,代码来源:ConnectionManager.java

示例3: actionControlReceived

import org.cybergarage.upnp.control.ActionListener; //导入方法依赖的package包/类
public boolean actionControlReceived(Action action) {
    String actionName = action.getName();
    if (actionName == null) {
        return false;
    }
    boolean isActionSuccess = false;
    if (actionName.equals(SETAVTRANSPORTURI)) {
        AVTransportInfo avTransInfo = new AVTransportInfo();
        avTransInfo.setInstanceID(action.getArgument("InstanceID").getIntegerValue());
        avTransInfo.setURI(action.getArgument(CURRENTURI).getValue());
        avTransInfo.setURIMetaData(action.getArgument(CURRENTURIMETADATA).getValue());
        setCurrentAvTransInfo(avTransInfo);
        isActionSuccess = true;
    }
    if (actionName.equals(SETNEXTAVTRANSPORTURI)) {
        avTransInfo = new AVTransportInfo();
        avTransInfo.setInstanceID(action.getArgument("InstanceID").getIntegerValue());
        avTransInfo.setURI(action.getArgument(NEXTURI).getValue());
        avTransInfo.setURIMetaData(action.getArgument(NEXTURIMETADATA).getValue());
        setNextAvTransInfo(avTransInfo);
        isActionSuccess = true;
    }
    if (actionName.equals(GETMEDIAINFO)) {
        int instanceID = action.getArgument("InstanceID").getIntegerValue();
        synchronized (this.avTransInfoList) {
            int avTransInfoCnt = this.avTransInfoList.size();
            for (int n = 0; n < avTransInfoCnt; n++) {
                avTransInfo = this.avTransInfoList.getAVTransportInfo(n);
                if (avTransInfo != null && avTransInfo.getInstanceID() == instanceID) {
                    action.getArgument(CURRENTURI).setValue(avTransInfo.getURI());
                    action.getArgument(CURRENTURIMETADATA).setValue(avTransInfo.getURIMetaData());
                }
            }
        }
        return false;
    }
    if (actionName.equals(PLAY)) {
        instanceID = action.getArgument("InstanceID").getIntegerValue();
        int speed = action.getArgument(SPEED).getIntegerValue();
        isActionSuccess = true;
    }
    if (actionName.equals(STOP)) {
        instanceID = action.getArgument("InstanceID").getIntegerValue();
        isActionSuccess = true;
    }
    if (actionName.equals(PAUSE)) {
        instanceID = action.getArgument("InstanceID").getIntegerValue();
        isActionSuccess = true;
    }
    MediaRenderer dmr = getMediaRenderer();
    if (dmr == null) {
        return isActionSuccess;
    }
    ActionListener listener = dmr.getActionListener();
    if (listener == null) {
        return isActionSuccess;
    }
    listener.actionControlReceived(action);
    return isActionSuccess;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:61,代码来源:AVTransport.java


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