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


Java UpnpResponse类代码示例

本文整理汇总了Java中org.fourthline.cling.model.message.UpnpResponse的典型用法代码示例。如果您正苦于以下问题:Java UpnpResponse类的具体用法?Java UpnpResponse怎么用?Java UpnpResponse使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


UpnpResponse类属于org.fourthline.cling.model.message包,在下文中一共展示了UpnpResponse类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: failure

import org.fourthline.cling.model.message.UpnpResponse; //导入依赖的package包/类
@Override
public void failure(ActionInvocation actioninvocation,
                    UpnpResponse upnpresponse, String s) {
    Log.d(getClass().getName(), "Failure UpnpResponse: " + upnpresponse);
    if (upnpresponse != null) {
        Log.d(getClass().getName(),
                "UpnpResponse: " + upnpresponse.getResponseDetails());
        Log.d(getClass().getName(),
                "UpnpResponse: " + upnpresponse.getStatusMessage());
        Log.d(getClass().getName(),
                "UpnpResponse: " + upnpresponse.getStatusCode());
    }
    hasFailures = true;
    Log.d(getClass().getName(), "s: " + s);
    actionState.actionFinished = true;
}
 
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:17,代码来源:SyncAVTransportPlayer.java

示例2: setDeviceVolume

import org.fourthline.cling.model.message.UpnpResponse; //导入依赖的package包/类
/**
 * 设置音量
 */
public void setDeviceVolume(int volume) {
    ActionCallback setVolume = new SetVolume(renderingControlService, volume) {

        @Override
        public void failure(ActionInvocation arg0, UpnpResponse arg1, String arg2) {
            onFailureCallBack(SET_VOLUME, arg2);
        }

        @Override
        public void success(ActionInvocation invocation) {
            onSuccessCallBack(SET_VOLUME);
        }
    };
    mUpnpService.getControlPoint().execute(setVolume);
}
 
开发者ID:hezhubo,项目名称:HPlayer,代码行数:19,代码来源:UpnpControlSet.java

示例3: setDeviceMute

import org.fourthline.cling.model.message.UpnpResponse; //导入依赖的package包/类
/**
 * 设置静音
 */
public void setDeviceMute(boolean mute) {
    ActionCallback setMute = new SetMute(renderingControlService, mute) {

        @Override
        public void failure(ActionInvocation arg0, UpnpResponse arg1, String arg2) {
            onFailureCallBack(SET_MUTE, arg2);
        }

        @Override
        public void success(ActionInvocation invocation) {
            onSuccessCallBack(SET_MUTE);
        }
    };
    mUpnpService.getControlPoint().execute(setMute);
}
 
开发者ID:hezhubo,项目名称:HPlayer,代码行数:19,代码来源:UpnpControlSet.java

示例4: onVideoSeek

import org.fourthline.cling.model.message.UpnpResponse; //导入依赖的package包/类
/**
 * 视频跳转
 */
public void onVideoSeek(int schedule) {
    String seekToTime = generateTime(schedule);
    ActionCallback seek = new Seek(avTransportService, seekToTime) {

        @Override
        public void failure(ActionInvocation arg0, UpnpResponse arg1, String arg2) {
            onFailureCallBack(SEEK, arg2);
        }

        @Override
        public void success(ActionInvocation invocation) {
            onSuccessCallBack(SEEK);
        }
    };
    mUpnpService.getControlPoint().execute(seek);
}
 
开发者ID:hezhubo,项目名称:HPlayer,代码行数:20,代码来源:UpnpControlSet.java

示例5: setUrl

import org.fourthline.cling.model.message.UpnpResponse; //导入依赖的package包/类
public void setUrl(String url, String metadata) {
	SetAVTransportURI callback = new SetAVTransportURI(mAvTransportService,
			url, metadata) {

		@SuppressWarnings("rawtypes")
		@Override
		public void failure(ActionInvocation actionInvocation,
				UpnpResponse response, String message) {
			// TODO Auto-generated method stub
			Log.e(LOG_TAG, "Set play uri failed! the reason is:" + message
					+ "the response details is:" + response);
			Utils.showToast(mContext, message);
		}
	};
	if (mAvTransportService != null)
		mAndroidUpnpService.getControlPoint().execute(callback);

}
 
开发者ID:sky24987,项目名称:UPlayer,代码行数:19,代码来源:Controller.java

示例6: play

import org.fourthline.cling.model.message.UpnpResponse; //导入依赖的package包/类
public void play() {
	Play callback = new Play(mAvTransportService) {

		@SuppressWarnings("rawtypes")
		@Override
		public void failure(ActionInvocation actionInvocation,
				UpnpResponse response, String message) {
			// TODO Auto-generated method stub
			Log.e(LOG_TAG, "Play failed! the reason is:" + message
					+ "the response details is:" + response);
			Utils.showToast(mContext, message);
		}
	};
	if (mAvTransportService != null)
		mAndroidUpnpService.getControlPoint().execute(callback);
}
 
开发者ID:sky24987,项目名称:UPlayer,代码行数:17,代码来源:Controller.java

示例7: pause

import org.fourthline.cling.model.message.UpnpResponse; //导入依赖的package包/类
public void pause() {
	Pause callback = new Pause(mAvTransportService) {

		@SuppressWarnings("rawtypes")
		@Override
		public void failure(ActionInvocation actionInvocation,
				UpnpResponse response, String message) {
			// TODO Auto-generated method stub
			Log.e(LOG_TAG, "Pause failed! the reason is:" + message
					+ "the response details is:" + response);
			Utils.showToast(mContext, message);
		}
	};
	if (mAvTransportService != null)
		mAndroidUpnpService.getControlPoint().execute(callback);
}
 
开发者ID:sky24987,项目名称:UPlayer,代码行数:17,代码来源:Controller.java

示例8: stop

import org.fourthline.cling.model.message.UpnpResponse; //导入依赖的package包/类
public void stop() {
	Stop callback = new Stop(mAvTransportService) {

		@SuppressWarnings("rawtypes")
		@Override
		public void failure(ActionInvocation actionInvocation,
				UpnpResponse response, String message) {
			// TODO Auto-generated method stub
			Log.e(LOG_TAG, "Stop failed! the reason is:" + message
					+ "the response details is:" + response);
			Utils.showToast(mContext, message);
		}
	};

	if (mAvTransportService != null)
		mAndroidUpnpService.getControlPoint().execute(callback);
}
 
开发者ID:sky24987,项目名称:UPlayer,代码行数:18,代码来源:Controller.java

示例9: seek

import org.fourthline.cling.model.message.UpnpResponse; //导入依赖的package包/类
public void seek(SeekMode mode, String target) {
	Seek callback = new Seek(mAvTransportService, mode, target) {

		@SuppressWarnings("rawtypes")
		@Override
		public void failure(ActionInvocation actionInvocation,
				UpnpResponse response, String message) {
			// TODO Auto-generated method stub
			Log.e(LOG_TAG, "Seek failed! the reason is:" + message
					+ "the response details is:" + response);
			Utils.showToast(mContext, message);
		}
	};
	if (mAvTransportService != null)
		mAndroidUpnpService.getControlPoint().execute(callback);
}
 
开发者ID:sky24987,项目名称:UPlayer,代码行数:17,代码来源:Controller.java

示例10: setMute

import org.fourthline.cling.model.message.UpnpResponse; //导入依赖的package包/类
public void setMute(boolean desiredMute) {
	SetMute callback = new SetMute(mRendererControlService, desiredMute) {

		@SuppressWarnings("rawtypes")
		@Override
		public void failure(ActionInvocation actionInvocation,
				UpnpResponse response, String message) {
			// TODO Auto-generated method stub
			Log.e(LOG_TAG, "SetMute failed! the reason is:" + message
					+ "the response details is:" + response);
			Utils.showToast(mContext, message);
		}
	};
	if (mRendererControlService != null)
		mAndroidUpnpService.getControlPoint().execute(callback);
}
 
开发者ID:sky24987,项目名称:UPlayer,代码行数:17,代码来源:Controller.java

示例11: setVolume

import org.fourthline.cling.model.message.UpnpResponse; //导入依赖的package包/类
public void setVolume(long newVolume) {
	SetVolume callback = new SetVolume(mRendererControlService, newVolume) {

		@SuppressWarnings("rawtypes")
		@Override
		public void failure(ActionInvocation actionInvocation,
				UpnpResponse response, String message) {
			// TODO Auto-generated method stub
			Log.e(LOG_TAG, "SetVolume failed! the reason is:" + message
					+ "the response details is:" + response);
			Utils.showToast(mContext, message);
		}
	};
	if (mRendererControlService != null)
		mAndroidUpnpService.getControlPoint().execute(callback);
}
 
开发者ID:sky24987,项目名称:UPlayer,代码行数:17,代码来源:Controller.java

示例12: play

import org.fourthline.cling.model.message.UpnpResponse; //导入依赖的package包/类
public static void play() {
    Device device = SystemManager.getInstance().getSelectedDevice();
    //Check selected device
    if (device == null) return;

    Service avtService = device.findService(SystemManager.AV_TRANSPORT_SERVICE);
    if (avtService != null) {
        ControlPoint cp = SystemManager.getInstance().getControlPoint();
        cp.execute(new Play(avtService) {
            @Override
            public void success(ActionInvocation invocation) {
                Log.i(TAG, "Play success.");
            }

            @Override
            public void failure(ActionInvocation arg0, UpnpResponse arg1, String arg2) {
                Log.e(TAG, "Play failed");
            }
        });
    }
}
 
开发者ID:kevinshine,项目名称:BeyondUPnP,代码行数:22,代码来源:PlaybackCommand.java

示例13: pause

import org.fourthline.cling.model.message.UpnpResponse; //导入依赖的package包/类
public static void pause() {
    Device device = SystemManager.getInstance().getSelectedDevice();
    //Check selected device
    if (device == null) return;

    Service avtService = device.findService(SystemManager.AV_TRANSPORT_SERVICE);
    if (avtService != null) {
        ControlPoint cp = SystemManager.getInstance().getControlPoint();
        cp.execute(new Pause(avtService) {
            @Override
            public void success(ActionInvocation invocation) {
                Log.i(TAG, "Pause success.");
            }

            @Override
            public void failure(ActionInvocation arg0, UpnpResponse arg1, String arg2) {
                Log.e(TAG, "Pause failed");
            }
        });
    }
}
 
开发者ID:kevinshine,项目名称:BeyondUPnP,代码行数:22,代码来源:PlaybackCommand.java

示例14: stop

import org.fourthline.cling.model.message.UpnpResponse; //导入依赖的package包/类
public static void stop() {
    Device device = SystemManager.getInstance().getSelectedDevice();
    //Check selected device
    if (device == null) return;

    Service avtService = device.findService(SystemManager.AV_TRANSPORT_SERVICE);
    if (avtService != null) {
        ControlPoint cp = SystemManager.getInstance().getControlPoint();
        cp.execute(new Stop(avtService) {
            @Override
            public void success(ActionInvocation invocation) {
                Log.i(TAG, "Stop success.");
            }

            @Override
            public void failure(ActionInvocation arg0, UpnpResponse arg1, String arg2) {
                Log.e(TAG, "Stop failed");
            }
        });
    }
}
 
开发者ID:kevinshine,项目名称:BeyondUPnP,代码行数:22,代码来源:PlaybackCommand.java

示例15: getVolume

import org.fourthline.cling.model.message.UpnpResponse; //导入依赖的package包/类
public static void getVolume(final Handler handler) {
    Device device = SystemManager.getInstance().getSelectedDevice();
    //Check selected device
    if (device == null) return;

    Service rcService = device.findService(SystemManager.RENDERING_CONTROL_SERVICE);
    if (rcService != null) {
        ControlPoint cp = SystemManager.getInstance().getControlPoint();
        cp.execute(new GetVolume(rcService) {

            @Override
            public void received(ActionInvocation actionInvocation, int currentVolume) {
                //Send currentVolume to handler.
                Log.i(TAG, "GetVolume:" + currentVolume);
                Message msg = Message.obtain(handler, NowplayingFragment.GET_VOLUME_ACTION, currentVolume, 0);
                msg.sendToTarget();
            }

            @Override
            public void failure(ActionInvocation invocation, UpnpResponse operation, String defaultMsg) {
                Log.e(TAG, "GetVolume failed");
            }
        });
    }
}
 
开发者ID:kevinshine,项目名称:BeyondUPnP,代码行数:26,代码来源:PlaybackCommand.java


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