本文整理汇总了Java中org.fourthline.cling.support.renderingcontrol.callback.SetMute类的典型用法代码示例。如果您正苦于以下问题:Java SetMute类的具体用法?Java SetMute怎么用?Java SetMute使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SetMute类属于org.fourthline.cling.support.renderingcontrol.callback包,在下文中一共展示了SetMute类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setDeviceMute
import org.fourthline.cling.support.renderingcontrol.callback.SetMute; //导入依赖的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);
}
示例2: setMute
import org.fourthline.cling.support.renderingcontrol.callback.SetMute; //导入依赖的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);
}
示例3: setMute
import org.fourthline.cling.support.renderingcontrol.callback.SetMute; //导入依赖的package包/类
@Override
public void setMute(final boolean mute)
{
if (getRenderingControlService() == null)
return;
controlPoint.execute(new SetMute(getRenderingControlService(), mute) {
@Override
public void success(ActionInvocation invocation)
{
Log.v(TAG, "Success setting mute status ! ");
rendererState.setMute(mute);
}
@Override
public void failure(ActionInvocation arg0, UpnpResponse arg1, String arg2)
{
Log.w(TAG, "Fail to set mute status ! " + arg2);
}
});
}
示例4: testRenderingControlActionSetMute
import org.fourthline.cling.support.renderingcontrol.callback.SetMute; //导入依赖的package包/类
public void testRenderingControlActionSetMute() {
UpnpClient upnpClient = getInitializedUpnpClientWithDevice(OPENBIT_AVTRANSPORT_DEVICE2);
Device<?, ?, ?> device = upnpClient
.getDevice(OPENBIT_AVTRANSPORT_DEVICE2);
Service avservice = getRenderingControlService(device);
// GetTransportInfo
Log.d(getClass().getName(), "Action SetMute ");
actionFinished = false;
SetMute actionCallback = new SetMute(avservice, true) {
@Override
public void success(ActionInvocation invocation) {
super.success(invocation);
displaySuccess(invocation);
}
@Override
public void failure(ActionInvocation actioninvocation,
UpnpResponse upnpresponse, String s) {
Log.d(getClass().getName(), "Failure UpnpResponse: "
+ upnpresponse);
Log.d(getClass().getName(),
"UpnpResponse: " + upnpresponse.getResponseDetails());
actionFinished = true;
}
};
upnpClient.getControlPoint().execute(actionCallback);
waitForActionComplete();
}