示例#1
0
        public static Device CreateLinnMediaRendererDevice(Device aHost)
        {
            string udn = aHost.Udn;

            udn  = udn.Substring(0, udn.Length - 2);
            udn += "71";

            string hostLocation = aHost.Find(kKeyUpnpLocation);
            bool   isVolkano1   = true;

            if (hostLocation.Contains(aHost.Udn))
            {
                hostLocation = hostLocation.Replace(aHost.Udn, udn);
                isVolkano1   = false;
            }

            Uri host     = new Uri(hostLocation);
            Uri location = host;

            if (isVolkano1)
            {
                location = new Uri(host, "/MediaRenderer/device.xml");
            }

            DeviceUpnp device = new DeviceUpnp(udn, location.AbsoluteUri);

            return(device);
        }
示例#2
0
        public override Device RelatedDevice(string aUdn)
        {
            Device device = new DeviceUpnp(aUdn, Find(kKeyUpnpLocation));

            string xml = Find(kKeyUpnpDeviceXml);

            if (xml != null)
            {
                device.Add(kKeyUpnpDeviceXml, xml);
            }

            return(device);
        }
示例#3
0
        public static Device CreateLinnMediaRendererDevice(Device aHost)
        {
            string udn = aHost.Udn;

            udn  = udn.Substring(0, udn.Length - 2);
            udn += "71";


            Uri host     = new Uri(aHost.Find(kKeyUpnpLocation));
            Uri location = new Uri(host, "/MediaRenderer/device.xml");

            DeviceUpnp device = new DeviceUpnp(udn, location.AbsoluteUri);

            return(device);
        }