Server/CecClient.cs
changeset 203 ce63ebb51da4
parent 202 8784c59c784e
child 206 33be8cb90c57
     1.1 --- a/Server/CecClient.cs	Sat Jul 16 00:24:08 2016 +0200
     1.2 +++ b/Server/CecClient.cs	Sun Jul 17 19:35:29 2016 +0200
     1.3 @@ -44,10 +44,10 @@
     1.4          /// </summary>
     1.5          /// <param name="aDeviceName"></param>
     1.6          /// <param name="aHdmiPort"></param>
     1.7 -        public Client(string aDeviceName, byte aHdmiPort, CecLogLevel aLogLevel = CecLogLevel.Warning)
     1.8 +        public Client(string aDeviceName, byte aHdmiPort, CecDeviceType aDeviceType = CecDeviceType.PlaybackDevice, CecLogLevel aLogLevel = CecLogLevel.Warning)
     1.9          {
    1.10              Config = new LibCECConfiguration();
    1.11 -            Config.DeviceTypes.Types[0] = CecDeviceType.RecordingDevice;
    1.12 +            Config.DeviceTypes.Types[0] = aDeviceType;
    1.13              Config.DeviceName = aDeviceName;
    1.14              Config.HDMIPort = aHdmiPort;
    1.15              //Config.ClientVersion = LibCECConfiguration.CurrentVersion;
    1.16 @@ -509,21 +509,7 @@
    1.17                      LogLevel = int.Parse(splitCommand[1]);                
    1.18              }
    1.19          }
    1.20 -
    1.21 -        /// TODO: remove that
    1.22 -        static void Main(string[] args)
    1.23 -        {
    1.24 -            Client p = new Client("CEC",2, CecLogLevel.All);
    1.25 -            if (p.Connect(10000))
    1.26 -            {
    1.27 -                p.MainLoop();
    1.28 -            }
    1.29 -            else
    1.30 -            {
    1.31 -                Console.WriteLine("Could not open a connection to the CEC adapter");
    1.32 -            }
    1.33 -        }
    1.34 -
    1.35 +       
    1.36          /// <summary>
    1.37          /// Provide direct access to CEC library
    1.38          /// </summary>