GetAttribute() public method

Query the value of one of the device's attributes
public GetAttribute ( string aKey, string &aValue ) : bool
aKey string The name of the attribute being queried. Available attributes /// will be listed in a protocol-specific header
aValue string The value of the attribute
return bool
Exemplo n.º 1
0
        private void PrintDeviceInfo(string aPrologue, ControlPoint.CpDevice aDevice)
        {
            string location;

            aDevice.GetAttribute("Upnp.Location", out location);
            string friendlyName;

            aDevice.GetAttribute("Upnp.FriendlyName", out friendlyName);
            Console.Write(aPrologue +
                          "\n    udn = " + aDevice.Udn() +
                          "\n    location = " + location +
                          "\n    name = " + friendlyName + "\n");
        }
Exemplo n.º 2
0
        public CpAVRenderer_OhNet(OpenHome.Net.ControlPoint.CpDevice _rendererDevice)
        {
            XMLParser xmlParser = new XMLParser();

                renderingControl = new CpProxyUpnpOrgRenderingControl1(_rendererDevice);
                renderingControl.SetPropertyInitialEvent(propertyChanged);
                renderingControl.SetPropertyChanged(propertyChanged);
                renderingControl.SetPropertyLastChangeChanged(propertyChanged);
                renderingControl.Subscribe();

                avRendererDevice = _rendererDevice;
                avRendererDevice.GetAttribute("Upnp.DeviceXml", out DeviceXml);

                ModelDescription = xmlParser.getNodeValue(DeviceXml, "modelDescription");
                FriendlyName = xmlParser.getNodeValue(DeviceXml, "friendlyName");
                Manufacturer = xmlParser.getNodeValue(DeviceXml, "manufacturer");
                UniqueDeviceName = avRendererDevice.Udn();

                Connections = new List<CpAVConnection>();
                Connections.Add(new CpAVConnection_OhNet(avRendererDevice));
        }
Exemplo n.º 3
0
 public CpMediaServer_OhNet(OpenHome.Net.ControlPoint.CpDevice _device)
 {
     mediaServerDevice = _device;
         mediaServerDevice.GetAttribute("Upnp.FriendlyName", out ServerFriendlyName);
         mediaServerDevice.GetAttribute("Upnp.DeviceXml", out DeviceXml);
         mediaServerDevice.GetAttribute("Upnp.Location", out Location);
         contentDirectory = new CpContentDirectory_OhNet_Raumfeld(_device);
 }