From: Lars Op den Kamp Date: Thu, 3 Nov 2011 21:57:39 +0000 (+0100) Subject: cec: set lib interface version back to 1.0 and rename GetLibVersion() to GetLibVersio... X-Git-Tag: upstream/2.2.0~1^2~122 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d75be19be59f575e3794761118ff7643bfaf9809;p=deb_libcec.git cec: set lib interface version back to 1.0 and rename GetLibVersion() to GetLibVersionMajor() and GetMinVersion() to GetMinLibVersion() --- diff --git a/include/cec.h b/include/cec.h index 5ef2026..58ea58f 100644 --- a/include/cec.h +++ b/include/cec.h @@ -71,17 +71,17 @@ namespace CEC //@} /*! - * @see cec_get_min_version + * @see cec_get_min_lib_version */ - virtual int8_t GetMinVersion(void) = 0; + virtual int8_t GetMinLibVersion(void) = 0; /*! - * @see cec_get_lib_version + * @see cec_get_lib_version_major */ - virtual int8_t GetLibVersion(void) = 0; + virtual int8_t GetLibVersionMajor(void) = 0; /*! - * @see cec_get_lib_version + * @see cec_get_lib_version_minor */ virtual int8_t GetLibVersionMinor(void) = 0; diff --git a/include/cecc.h b/include/cecc.h index 8ca688c..e1c2942 100644 --- a/include/cecc.h +++ b/include/cecc.h @@ -98,12 +98,12 @@ extern DECLSPEC int cec_start_bootloader(void); /*! * @return Get the minimal version of libcec that this version of libcec can interface with. */ -extern DECLSPEC int8_t cec_get_min_version(void); +extern DECLSPEC int8_t cec_get_min_lib_version(void); /*! - * @return Get the version of libcec. + * @return Get the major version of libcec. */ -extern DECLSPEC int8_t cec_get_lib_version(void); +extern DECLSPEC int8_t cec_get_lib_version_major(void); /*! * @return Get the minor version of libcec. diff --git a/include/cectypes.h b/include/cectypes.h index 188e7de..a347f1b 100644 --- a/include/cectypes.h +++ b/include/cectypes.h @@ -740,9 +740,9 @@ typedef struct cec_vendor #define ESCOFFSET 3 #define CEC_BUTTON_TIMEOUT 500 -#define CEC_MIN_VERSION 8 -#define CEC_LIB_VERSION 8 -#define CEC_LIB_VERSION_MINOR 1 +#define CEC_MIN_LIB_VERSION 1 +#define CEC_LIB_VERSION_MAJOR 1 +#define CEC_LIB_VERSION_MINOR 0 #ifdef __cplusplus }; diff --git a/src/lib/LibCEC.h b/src/lib/LibCEC.h index 1997039..5d11f11 100644 --- a/src/lib/LibCEC.h +++ b/src/lib/LibCEC.h @@ -56,8 +56,8 @@ namespace CEC virtual bool PingAdapter(void); virtual bool StartBootloader(void); - virtual int8_t GetMinVersion(void) { return CEC_MIN_VERSION; }; - virtual int8_t GetLibVersion(void) { return CEC_LIB_VERSION; }; + virtual int8_t GetMinLibVersion(void) { return CEC_MIN_LIB_VERSION; }; + virtual int8_t GetLibVersionMajor(void) { return CEC_LIB_VERSION_MAJOR; }; virtual int8_t GetLibVersionMinor(void) { return CEC_LIB_VERSION_MINOR; }; virtual bool GetNextLogMessage(cec_log_message *message); diff --git a/src/lib/LibCECC.cpp b/src/lib/LibCECC.cpp index b792044..a3be5f3 100644 --- a/src/lib/LibCECC.cpp +++ b/src/lib/LibCECC.cpp @@ -92,14 +92,14 @@ int cec_start_bootloader(void) int8_t cec_get_min_version(void) { if (cec_parser) - return cec_parser->GetMinVersion(); + return cec_parser->GetMinLibVersion(); return -1; } -int8_t cec_get_lib_version(void) +int8_t cec_get_lib_version_major(void) { if (cec_parser) - return cec_parser->GetLibVersion(); + return cec_parser->GetLibVersionMajor(); return -1; } diff --git a/src/testclient/main.cpp b/src/testclient/main.cpp index b57491a..8efffed 100644 --- a/src/testclient/main.cpp +++ b/src/testclient/main.cpp @@ -44,7 +44,7 @@ using namespace CEC; using namespace std; -#define CEC_TEST_CLIENT_VERSION 8 +#define CEC_TEST_CLIENT_VERSION 1 #include @@ -245,7 +245,7 @@ void show_console_help(void) int main (int argc, char *argv[]) { ICECAdapter *parser = LoadLibCec("CECTester"); - if (!parser || parser->GetMinVersion() > CEC_TEST_CLIENT_VERSION) + if (!parser || parser->GetMinLibVersion() > CEC_TEST_CLIENT_VERSION) { #ifdef __WINDOWS__ cout << "Cannot load libcec.dll" << endl; @@ -255,7 +255,7 @@ int main (int argc, char *argv[]) return 1; } CStdString strLog; - strLog.Format("CEC Parser created - libcec version %d.%d", parser->GetLibVersion(), parser->GetLibVersionMinor()); + strLog.Format("CEC Parser created - libcec version %d.%d", parser->GetLibVersionMajor(), parser->GetLibVersionMinor()); cout << strLog.c_str() << endl; //make stdin non-blocking