public override void ProcessResponse(XDocument info, AVRDevice device)
        {
            if (info?.Root == null)
            {
                return;
            }

            XNamespace ns = info.Root.Name.Namespace;
            XElement   responseElement = info.Element(ns + RESPONSE_STR);

            if (responseElement != null && !responseElement.IsEmpty)
            {
                foreach (XElement commandElement in responseElement.Elements(ns + COMMAND_STR))
                {
                    XElement sourceElement = commandElement.Element(ns + SOURCE_STR);
                    if (sourceElement != null)
                    {
                        //TODO

                        /*
                         * AVRInputSource src = device.InputSources.First((x)=> x.Name.Equals(sourceElement.Value));
                         * if (src != null)
                         * {
                         *  device.MainZoneStatus.ActiveInputSource = src;
                         * }
                         */
                    }
                }
            }
        }
Beispiel #2
0
        public override void ProcessResponse(XDocument info, AVRDevice device)
        {
            if (info == null || info.Root == null)
            {
                return;
            }

            XNamespace ns = info.Root.Name.Namespace;
            XName      s  = ns + RESPONSE_STR;
            XElement   responseElement = info.Element(s);

            if (responseElement != null && !responseElement.IsEmpty)
            {
                foreach (XElement commandElement in responseElement.Elements(ns + COMMAND_STR))
                {
                    XElement functionElement = commandElement.Element(ns + FUNCTIONRENAME_STR);
                    if (functionElement != null && !functionElement.IsEmpty)
                    {
                        foreach (var item in functionElement.Elements())
                        {
                            AVRInputSource renameSource = new AVRInputSource()
                            {
                                Name    = item.Element(ns + NAME_STR)?.Value,
                                Renamed = item.Element(ns + RENAME_STR)?.Value
                            };
                            //TODO

                            /*
                             * if (!device.InputSources.Contains(renameSource))
                             * {
                             *  device.InputSources.Add(renameSource);
                             * }
                             */
                        }
                    }
                }
            }
        }
        public override void ProcessResponse(XDocument info, AVRDevice device)
        {
            if (info == null || info.Root == null)
            {
                return;
            }

            XNamespace ns = info.Root.Name.Namespace;
            XElement   responseElement = info.Element(ns + RESPONSE_STR);

            if (responseElement != null && !responseElement.IsEmpty)
            {
                foreach (XElement commandElement in responseElement.Elements(ns + COMMAND_STR))
                {
                    string        muteStat = commandElement.Element(ns + MUTE_STR)?.Value;
                    AVRMuteStatus status;
                    if (AVRMuteStatus.TryParse(muteStat, true, out status))
                    {
                        //TODO
                        //device.MainZoneStatus.MuteStatus = status;
                    }
                }
            }
        }
Beispiel #4
0
 public override void ProcessResponse(XDocument info, AVRDevice device)
 {
     throw new NotImplementedException();
 }
Beispiel #5
0
 /*
  * <item>
  *  <Mute>
  *      <value>
  *          on
  *      </value>
  *  </Mute>
  * </item>
  */
 public override bool ProcessResponse(XDocument info, AVRDevice device)
 {
     //TODO
     //return device.MainZoneStatus.FromResponse(info, device);
     return(true);
 }