*/
virtual int8_t GetLibVersion(void) = 0;
+ /*!
+ * @see cec_get_lib_version
+ */
+ virtual int8_t GetLibVersionMinor(void) = 0;
+
/*!
* @see cec_get_next_log_message
*/
*/
extern DECLSPEC int8_t cec_get_lib_version(void);
+/*!
+ * @return Get the minor version of libcec.
+ */
+extern DECLSPEC int8_t cec_get_lib_version_minor(void);
+
/*!
* @brief Power on the connected CEC capable devices.
* @param address The logical address to power on.
#define MSGEND 0xFE
#define MSGESC 0xFD
#define ESCOFFSET 3
+#define CEC_BUTTON_TIMEOUT 500
+
#define CEC_MIN_VERSION 8
#define CEC_LIB_VERSION 8
-#define CEC_BUTTON_TIMEOUT 500
+#define CEC_LIB_VERSION_MINOR 1
#ifdef __cplusplus
};
return m_comm ? m_comm->StartBootloader() : false;
}
-int8_t CLibCEC::GetMinVersion(void)
-{
- return CEC_MIN_VERSION;
-}
-
-int8_t CLibCEC::GetLibVersion(void)
-{
- return CEC_LIB_VERSION;
-}
-
bool CLibCEC::GetNextLogMessage(cec_log_message *message)
{
return (m_logBuffer.Pop(*message));
virtual bool PingAdapter(void);
virtual bool StartBootloader(void);
- virtual int8_t GetMinVersion(void);
- virtual int8_t GetLibVersion(void);
+ virtual int8_t GetMinVersion(void) { return CEC_MIN_VERSION; };
+ virtual int8_t GetLibVersion(void) { return CEC_LIB_VERSION; };
+ virtual int8_t GetLibVersionMinor(void) { return CEC_LIB_VERSION_MINOR; };
virtual bool GetNextLogMessage(cec_log_message *message);
virtual bool GetNextKeypress(cec_keypress *key);
return -1;
}
+int8_t cec_get_lib_version_minor(void)
+{
+ if (cec_parser)
+ return cec_parser->GetLibVersionMinor();
+ return -1;
+}
+
int cec_get_next_log_message(cec_log_message *message)
{
if (cec_parser)
return 1;
}
CStdString strLog;
- strLog.Format("CEC Parser created - libcec version %d", parser->GetLibVersion());
+ strLog.Format("CEC Parser created - libcec version %d.%d", parser->GetLibVersion(), parser->GetLibVersionMinor());
cout << strLog.c_str() << endl;
//make stdin non-blocking