StephaneLenclud@220: using CecSharp; StephaneLenclud@220: using SharpLib.Ear; StephaneLenclud@220: using System; StephaneLenclud@220: using System.Collections.Generic; StephaneLenclud@220: using System.Linq; StephaneLenclud@220: using System.Runtime.InteropServices; StephaneLenclud@220: using System.Runtime.Serialization; StephaneLenclud@220: using System.Text; StephaneLenclud@220: using System.Threading.Tasks; StephaneLenclud@220: StephaneLenclud@220: namespace SharpDisplayManager StephaneLenclud@220: { StephaneLenclud@222: /// StephaneLenclud@222: /// Abstract CEC action using a device logical address. StephaneLenclud@222: /// StephaneLenclud@220: [DataContract] StephaneLenclud@220: public abstract class ActionCecDevice: SharpLib.Ear.Action StephaneLenclud@220: { StephaneLenclud@220: [DataMember] StephaneLenclud@231: [AttributeObjectProperty StephaneLenclud@220: ( StephaneLenclud@220: Id = "CEC.Device", StephaneLenclud@220: Name = "Device", StephaneLenclud@220: Description = "The logical address used by this action." StephaneLenclud@220: ) StephaneLenclud@220: ] StephaneLenclud@220: public CecLogicalAddress Device { get; set; } StephaneLenclud@222: StephaneLenclud@222: /// StephaneLenclud@222: /// StephaneLenclud@222: /// StephaneLenclud@222: public string DeviceName { StephaneLenclud@222: get StephaneLenclud@222: { StephaneLenclud@222: if (Device == CecLogicalAddress.Broadcast) StephaneLenclud@222: { StephaneLenclud@222: //Because of duplicate value in enumeration StephaneLenclud@222: return "Broadcast"; StephaneLenclud@222: } StephaneLenclud@222: StephaneLenclud@222: return Device.ToString(); StephaneLenclud@222: } StephaneLenclud@222: } StephaneLenclud@222: StephaneLenclud@220: } StephaneLenclud@220: }