コード例 #1
0
        /// <summary>
        /// DiscoveryPageViewModel constructor.
        /// </summary>
        public DiscoveryPageViewModel()
        {
            ActionText            = "Start search";
            TitleText             = "Service type";
            serviceDiscoveryModel = new ServiceDiscoveryModel();

            Services = new ObservableCollection <DnssdService>();

            ChangeDiscoveryStateCommand = new Command(ChangeDiscoveryState);
        }
コード例 #2
0
ファイル: Rssdp.cs プロジェクト: jeason0813/Antd
        public static ServiceDiscoveryModel GetDeviceDescription()
        {
            var antdPort    = Application.CurrentConfiguration.WebService.GuiWebServicePort;
            var specVersion = new SpecVersion {
                Major = "0", Minor = "0"
            };
            var services = new List <models.Service> {
                new models.Service {
                    ServiceType = $"antd_{antdPort}",
                    ServiceId   = "0",
                    ControlURL  = "",
                    EventSubURL = "",
                    SCPDURL     = ""
                },
                new models.Service {
                    ServiceType = "other service",
                    ServiceId   = "1",
                    ControlURL  = "",
                    EventSubURL = "",
                    SCPDURL     = ""
                },
            };
            var serviceList = new ServiceList {
                Service = services
            };
            var device = new Device {
                DeviceType       = "anthilla os device",
                FriendlyName     = Application.CurrentConfiguration.Host.HostName,
                Manufacturer     = "Anthilla SRL",
                ManufacturerURL  = "www.anthilla.com",
                ModelDescription = "anthilla os device",
                ModelName        = "anthilla os device",
                ModelNumber      = Application.CurrentConfiguration.Host.PartNumber.ToString(),
                ModelURL         = "www.anthilla.com",
                SerialNumber     = Application.CurrentConfiguration.Host.SerialNumber.ToString(),
                UDN         = Application.CurrentConfiguration.Host.MachineUid.ToString(),
                UPC         = Application.CurrentConfiguration.Host.MachineUid.ToString(),
                ServiceList = serviceList,
            };
            var descr = new ServiceDiscoveryModel {
                SpecVersion = specVersion,
                Device      = device
            };

            return(descr);
        }
コード例 #3
0
        public static ServiceDiscoveryModel GetDeviceDescription()
        {
            var antdPort    = new AppConfiguration().Get().AntdUiPort;
            var specVersion = new SpecVersion {
                Major = "0", Minor = "0"
            };
            var services = new List <Service> {
                new Service {
                    ServiceType = $"antd_{antdPort}",
                    ServiceId   = "0",
                    ControlURL  = "",
                    EventSubURL = "",
                    SCPDURL     = ""
                },
                new Service {
                    ServiceType = "other service",
                    ServiceId   = "1",
                    ControlURL  = "",
                    EventSubURL = "",
                    SCPDURL     = ""
                },
            };
            var serviceList = new ServiceList {
                Service = services
            };
            var device = new Device {
                DeviceType       = "anthilla os device",
                FriendlyName     = Hostname,
                Manufacturer     = "Anthilla SRL",
                ManufacturerURL  = "www.anthilla.com",
                ModelDescription = "anthilla os device",
                ModelName        = "anthilla os device",
                ModelNumber      = PartNumber,
                ModelURL         = "www.anthilla.com",
                SerialNumber     = SerialNumber,
                UDN         = MachineUid,
                UPC         = MachineUid,
                ServiceList = serviceList,
            };
            var descr = new ServiceDiscoveryModel {
                SpecVersion = specVersion,
                Device      = device
            };

            return(descr);
        }
コード例 #4
0
        /// <summary>
        /// RegisterPageViewModel constructor.
        /// </summary>
        public RegisterPageViewModel()
        {
            serviceDiscoveryModel = new ServiceDiscoveryModel();

            RegisterServiceCommand = new Command(RegisterService);
        }