本文整理汇总了C#中ConnectSdk.Windows.Service.Capability.Listeners.ResponseListener类的典型用法代码示例。如果您正苦于以下问题:C# ResponseListener类的具体用法?C# ResponseListener怎么用?C# ResponseListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ResponseListener类属于ConnectSdk.Windows.Service.Capability.Listeners命名空间,在下文中一共展示了ResponseListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UrlServiceSubscription
public UrlServiceSubscription(DeviceService service, string uri, JsonObject payload, bool isWebOs,
ResponseListener listener)
: base(service, uri, payload, listener)
{
if (isWebOs)
HttpMethod = "subscribe";
}
示例2: AppStoreCommandExecute
private void AppStoreCommandExecute(object obj)
{
if (appStoreSession != null)
{
appStoreSession.Close(null);
appStoreSession = null;
}
var listener = new ResponseListener
(
loadEventArg =>
{
var session = LoadEventArgs.GetValue<LaunchSession>(loadEventArg);
appStoreSession = session;
},
serviceCommandError =>
{
}
);
String appId = null;
if (selectedDevice.GetServiceByName("Netcast TV") != null)
appId = "125071";
else if (selectedDevice.GetServiceByName("webOS TV") != null)
appId = "redbox";
else if (selectedDevice.GetServiceByName("Roku") != null)
appId = "13535";
launcher.LaunchAppStore(appId, listener);
}
示例3: ServiceCommand
public ServiceCommand(IServiceCommandProcessor service, string targetUrl, Object payload, ResponseListener listener)
{
Service = service;
Target = targetUrl;
Payload = payload;
responseListener = listener;
HttpMethod = TypePost;
}
示例4: SetControlKeys
private void SetControlKeys()
{
if (selectedDevice != null)
{
KeyCommand.Enabled = selectedDevice.HasCapability(KeyControl.KeyCode);
ChannelCommand.Enabled = selectedDevice.HasCapability(TvControl.ChannelUp);
PowerCommand.Enabled = selectedDevice.HasCapability(PowerControl.Off);
if (selectedDevice.HasCapability(TvControl.ChannelList))
{
var listener = new ResponseListener
(
loadEventArg =>
{
var channels = LoadEventArgs.GetValue<List<ChannelInfo>>(loadEventArg);
App.MainDispatcher.RunAsync(CoreDispatcherPriority.High, () =>
{
Channels = channels;
});
},
serviceCommandError =>
{
}
);
tvControl.GetChannelList(listener);
}
if (selectedDevice.HasCapability(TvControl.ChannelSubscribe))
{
var listener = new ResponseListener
(
loadEventArg =>
{
var channel = LoadEventArgs.GetValue<ChannelInfo>(loadEventArg);
App.MainDispatcher.RunAsync(CoreDispatcherPriority.High, () =>
{
SelectedChannel = channel;
});
},
serviceCommandError =>
{
}
);
tvControl.SubscribeCurrentChannel(listener);
}
}
}
示例5: InputCommandExecute
private void InputCommandExecute(object obj)
{
var listener = new ResponseListener
(
loadEventArg =>
{
var launchPickerSession = LoadEventArgs.GetValue<LaunchSession>(loadEventArg);
inputPickerSession = launchPickerSession;
},
serviceCommandError =>
{
}
);
externalInputControl.LaunchInputPicker(listener);
}
示例6: CloseWebAppCommandExecute
private void CloseWebAppCommandExecute(object obj)
{
CloseWebAppCommand.Enabled = false;
SendMessageCommand.Enabled = false;
SendJsonCommand.Enabled = false;
LeaveWebAppCommand.Enabled = false;
isLaunched = false;
mWebAppSession.WebAppSessionListener = null;
var listener = new ResponseListener
(
loadEventArg =>
{
LaunchWebAppCommand.Enabled = true;
},
serviceCommandError =>
{
LaunchWebAppCommand.Enabled = true;
}
);
mWebAppSession.Close(listener);
}
示例7: PlayMedia
public void PlayMedia(string url, string mimeType, string title, string description, string iconSrc,
bool shouldLoop, ResponseListener listener)
{
if (dlnaService != null)
{
dlnaService.PlayMedia(url, mimeType, title, description, iconSrc, shouldLoop, listener);
}
}
示例8: Pause
public void Pause(ResponseListener listener)
{
SendVirtualKeyCode((int)NetcastVirtualKeycodes.PAUSE, listener);
}
示例9: Next
public void Next(ResponseListener listener)
{
throw new NotImplementedException();
}
示例10: LaunchYouTube
public void LaunchYouTube(string contentId, ResponseListener listener)
{
const string appName = "YouTube";
LaunchNamedApplication(appName, listener);
}
示例11: LaunchInputPicker
public void LaunchInputPicker(ResponseListener pListener)
{
const string appName = "Input List";
var encodedStr = HttpMessage.Encode(appName);
var responseListener = new ResponseListener
(
loadEventArg =>
{
var responseLaunchListener = new ResponseListener
(
loadEventArg2 =>
{
if (inputPickerSession == null)
{
inputPickerSession = (LaunchSession)loadEventArg2;
}
Util.PostSuccess(pListener, loadEventArg2);
},
serviceCommandError => Util.PostError(pListener, serviceCommandError)
);
LaunchApplication(appName, ((AppInfo)loadEventArg).Id, null, responseLaunchListener);
},
serviceCommandError => Util.PostError(pListener, serviceCommandError)
);
GetApplication(encodedStr, responseListener);
}
示例12: LaunchBrowser
public void LaunchBrowser(string url, ResponseListener listener)
{
const string appName = "Internet";
LaunchNamedApplication(appName, listener);
}
示例13: GetMute
public void GetMute(ResponseListener listener)
{
var responseListener = new ResponseListener
(
loadEventArg => Util.PostSuccess(listener, ((VolumeStatus)loadEventArg).IsMute),
serviceCommandError => Util.PostError(listener, serviceCommandError)
);
GetVolumeStatus(responseListener);
}
示例14: GetExternalInputList
public void GetExternalInputList(ResponseListener listener)
{
throw new NotImplementedException();
}
示例15: LaunchAppWithInfo
public void LaunchAppWithInfo(AppInfo appInfo, ResponseListener listener)
{
LaunchAppWithInfo(appInfo, null, listener);
}