• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Listeners.ResponseListener类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ConnectSdk.Windows.Service.Capability.Listeners.ResponseListener的典型用法代码示例。如果您正苦于以下问题:C# ResponseListener类的具体用法?C# ResponseListener怎么用?C# ResponseListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ResponseListener类属于ConnectSdk.Windows.Service.Capability.Listeners命名空间,在下文中一共展示了ResponseListener类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: UrlServiceSubscription

 public UrlServiceSubscription(DeviceService service, string uri, JsonObject payload, bool isWebOs,
     ResponseListener listener)
     : base(service, uri, payload, listener)
 {
     if (isWebOs)
         HttpMethod = "subscribe";
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:7,代码来源:URLServiceSubscription.cs


示例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);
        }
开发者ID:ConnectSDK,项目名称:Connect-SDK-Windows-Sampler,代码行数:31,代码来源:ModelCommandsImplementationApps.cs


示例3: ServiceCommand

 public ServiceCommand(IServiceCommandProcessor service, string targetUrl, Object payload, ResponseListener listener)
 {
     Service = service;
     Target = targetUrl;
     Payload = payload;
     responseListener = listener;
     HttpMethod = TypePost;
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:8,代码来源:ServiceCommand.cs


示例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);
                }
            }
        }
开发者ID:ConnectSDK,项目名称:Connect-SDK-Windows-Sampler,代码行数:49,代码来源:ModelCommandsImplementationKey.cs


示例5: InputCommandExecute

        private void InputCommandExecute(object obj)
        {
            var listener = new ResponseListener
                (
                loadEventArg =>
                {
                    var launchPickerSession = LoadEventArgs.GetValue<LaunchSession>(loadEventArg);
                    inputPickerSession = launchPickerSession;
                },
                serviceCommandError =>
                {

                }
                );
            externalInputControl.LaunchInputPicker(listener);
        }
开发者ID:ConnectSDK,项目名称:Connect-SDK-Windows-Sampler,代码行数:16,代码来源:ModelCommandsImplementationSystem.cs


示例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);
        }
开发者ID:ConnectSDK,项目名称:Connect-SDK-Windows-Sampler,代码行数:22,代码来源:ModelCommandsImplementationWebApp.cs


示例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);
     }
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:8,代码来源:NetcastTVService.cs


示例8: Pause

 public void Pause(ResponseListener listener)
 {
     SendVirtualKeyCode((int)NetcastVirtualKeycodes.PAUSE, listener);
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:4,代码来源:NetcastTVService.cs


示例9: Next

 public void Next(ResponseListener listener)
 {
     throw new NotImplementedException();
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:4,代码来源:NetcastTVService.cs


示例10: LaunchYouTube

 public void LaunchYouTube(string contentId, ResponseListener listener)
 {
     const string appName = "YouTube";
     LaunchNamedApplication(appName, listener);
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:5,代码来源:NetcastTVService.cs


示例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);
        }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:30,代码来源:NetcastTVService.cs


示例12: LaunchBrowser

 public void LaunchBrowser(string url, ResponseListener listener)
 {
     const string appName = "Internet";
     LaunchNamedApplication(appName, listener);
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:5,代码来源:NetcastTVService.cs


示例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);
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:9,代码来源:NetcastTVService.cs


示例14: GetExternalInputList

 public void GetExternalInputList(ResponseListener listener)
 {
     throw new NotImplementedException();
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:4,代码来源:NetcastTVService.cs


示例15: LaunchAppWithInfo

 public void LaunchAppWithInfo(AppInfo appInfo, ResponseListener listener)
 {
     LaunchAppWithInfo(appInfo, null, listener);
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:4,代码来源:NetcastTVService.cs


示例16: GetPlayState

 public void GetPlayState(ResponseListener listener)
 {
     Util.PostError(listener, ServiceCommandError.NotSupported());
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:4,代码来源:NetcastTVService.cs


示例17: LaunchHulu

 public void LaunchHulu(string contentId, ResponseListener listener)
 {
     const string appName = "Hulu";
     LaunchNamedApplication(appName, listener);
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:5,代码来源:NetcastTVService.cs


示例18: GetPosition

 public void GetPosition(ResponseListener listener)
 {
     if (dlnaService != null)
     {
         dlnaService.GetPosition(listener);
     }
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:7,代码来源:NetcastTVService.cs


示例19: LaunchNetflix

        public void LaunchNetflix(string contentId, ResponseListener listener)
        {
            //    string appName = "Netflix";

            //    getApplication(appName, new ResponseListener() {

            //        public void onSuccess( AppInfo appInfo) {
            //            JsonObject jsonObj = new JsonObject();

            //            try {
            //                jsonObj.put("id", appInfo.getId());
            //                jsonObj.put("name", appName);
            //            } catch (Exception e) {
            //                throw e;
            //            }

            //            ResponseListener responseListener = new ResponseListener() {

            //                public void onSuccess(Object response) {
            //                    LaunchSession launchSession = LaunchSession.launchSessionForAppId(appInfo.getId());
            //                    launchSession.setAppName(appName);
            //                    launchSession.setService(NetcastTVService.this);
            //                    launchSession.setSessionType(LaunchSessionType.App);

            //                    Util.PostSuccess(listener, launchSession);
            //                }

            //                public void onError(ServiceCommandError error) {
            //                    if ( listener != null )
            //                        Util.PostError(listener, error);
            //                }
            //            };

            //            string requestURL = getUDAPRequestURL(UDAP_PATH_APPTOAPP_COMMAND);

            //            Dictionary<string,string> ps = new Dictionary<string,string>();
            //            ps.Add("name", "SearchCMDPlaySDPContent");
            //            ps.Add("content_type", "1");
            //            ps.Add("conts_exec_type", "20");
            //            ps.Add("conts_plex_type_flag", "N");
            //            ps.Add("conts_search_id", "2023237");
            //            ps.Add("conts_age", "18");
            //            ps.Add("exec_id", "netflix");
            //            ps.Add("item_id", "-Q m=http%3A%2F%2Fapi.netflix.com%2Fcatalog%2Ftitles%2Fmovies%2F" + contentId + "&amp;source_type=4&amp;trackId=6054700&amp;trackUrl=https%3A%2F%2Fapi.netflix.com%2FAPI_APP_ID_6261%3F%23Search%3F");
            //            ps.Add("app_type", "");

            //            string httpMessage = getUDAPMessageBody(UDAP_API_COMMAND, ps);

            //            ServiceCommand request = new ServiceCommand(NetcastTVService.this, requestURL, httpMessage, responseListener);
            //            request.send();
            //        }

            //        public void onError(ServiceCommandError error) {
            //            if ( listener != null )
            //                Util.PostError(listener, error);
            //        }
            //    });
        }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:58,代码来源:NetcastTVService.cs


示例20: GetRunningApp

 public void GetRunningApp(ResponseListener listener)
 {
     // Do nothing - Not Supported
     Util.PostError(listener, ServiceCommandError.NotSupported());
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:5,代码来源:NetcastTVService.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Database.MySqlCommand类代码示例发布时间:2022-05-24
下一篇:
C# Core.ConfuserContext类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap