diff -r 99c407831232 -r e5910d7b6a81 Server/Actions/ActionCecDeviceStandby.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Server/Actions/ActionCecDeviceStandby.cs Tue Jul 26 15:05:57 2016 +0200 @@ -0,0 +1,41 @@ +using CecSharp; +using SharpLib.Ear; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Runtime.Serialization; +using System.Text; +using System.Threading.Tasks; + +namespace SharpDisplayManager +{ + [DataContract] + [AttributeAction(Id = "Cec.Device.Standby", Name = "CEC Device Standby", Description = "Puts on standby the specified CEC device on your HDMI bus.")] + public class ActionCecDeviceStandby : ActionCecDevice + { + /// + /// + /// + /// + public override string Brief() + { + return "CEC Standby " + Device.ToString(); + } + + /// + /// + /// + public override void Execute() + { + if (Cec.Client.Static == null) + { + Console.WriteLine("WARNING: No CEC client installed."); + return; + } + + Cec.Client.Static.Lib.StandbyDevices(Device); + } + + } +}