LibCecSharp: added missing client and server version 1.7.1
[deb_libcec.git] / src / LibCecSharp / CecSharpTypes.h
index 14630197f51a561227d005175519552b23ea502f..2eec98e5132ccf02e105df2ed76de0ad2b3feb8d 100644 (file)
@@ -247,6 +247,7 @@ namespace CecSharp
                F5                          = 0x75,
                Data                        = 0x76,
                Max                         = 0x76,
+               SamsungReturn               = 0x91,
                Unknown
        };
 
@@ -355,7 +356,10 @@ namespace CecSharp
                Version1_5_3  = 0x1503,
                Version1_6_0  = 0x1600,
                Version1_6_1  = 0x1601,
-    Version1_6_2  = 0x1602
+               Version1_6_2  = 0x1602,
+               Version1_6_3  = 0x1603,
+               Version1_7_0  = 0x1700,
+               Version1_7_1  = 0x1701
        };
 
        public enum class CecServerVersion
@@ -367,7 +371,10 @@ namespace CecSharp
                Version1_5_3  = 0x1503,
                Version1_6_0  = 0x1600,
                Version1_6_1  = 0x1601,
-    Version1_6_2  = 0x1602
+               Version1_6_2  = 0x1602,
+               Version1_6_3  = 0x1603,
+               Version1_7_0  = 0x1700,
+               Version1_7_1  = 0x1701
        };
 
        public ref class CecAdapter
@@ -508,7 +515,7 @@ namespace CecSharp
        public ref class CecKeypress
        {
        public:
-               CecKeypress(int iKeycode, unsigned int iDuration)
+               CecKeypress(CecUserControlCode iKeycode, unsigned int iDuration)
                {
                        Keycode  = iKeycode;
                        Duration = iDuration;
@@ -517,14 +524,14 @@ namespace CecSharp
 
                CecKeypress(void)
                {
-                       Keycode  = 0;
+                       Keycode  = CecUserControlCode::Unknown;
                        Duration = 0;
                        Empty    = true;
                }
 
-               property bool         Empty;
-               property int          Keycode;
-               property unsigned int Duration;
+               property bool               Empty;
+               property CecUserControlCode Keycode;
+               property unsigned int       Duration;
        };
 
        public ref class CecLogMessage
@@ -649,6 +656,9 @@ namespace CecSharp
 
                        if (ServerVersion >= CecServerVersion::Version1_6_2)
                                DeviceLanguage = gcnew System::String(config.strDeviceLanguage);
+
+                       if (ServerVersion >= CecServerVersion::Version1_6_3)
+                         MonitorOnlyClient = config.bMonitorOnly == 1;
                }
 
                property System::String ^     DeviceName;
@@ -674,6 +684,7 @@ namespace CecSharp
                property uint16_t             FirmwareVersion;
                property bool                 PowerOffDevicesOnStandby;
                property bool                 ShutdownOnStandby;
+               property bool                 MonitorOnlyClient;
                property System::String ^     DeviceLanguage;
                property CecCallbackMethods ^ Callbacks;
        };
@@ -831,7 +842,7 @@ namespace CecSharp
                {
                        int iReturn(0);
                        if (m_bHasCallbacks)
-                               iReturn = m_callbacks->ReceiveKeypress(gcnew CecKeypress(key.keycode, key.duration));
+                               iReturn = m_callbacks->ReceiveKeypress(gcnew CecKeypress((CecUserControlCode)key.keycode, key.duration));
                        return iReturn;
                }