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); }
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); }
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); }