From: Lars Op den Kamp Date: Tue, 2 Oct 2012 22:01:10 +0000 (+0200) Subject: removed deprecated constructor. cosmetics X-Git-Tag: upstream/2.2.0~1^2~17^2^2~52 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=cd7a6c70cedf468654236a93756952077442d27f;p=deb_libcec.git removed deprecated constructor. cosmetics --- diff --git a/src/lib/LibCEC.cpp b/src/lib/LibCEC.cpp index 1c6cf9d..b74bc33 100644 --- a/src/lib/LibCEC.cpp +++ b/src/lib/LibCEC.cpp @@ -36,7 +36,6 @@ #include "adapter/AdapterFactory.h" #include "adapter/AdapterCommunication.h" #include "CECProcessor.h" -#include "CECTypeUtils.h" #include "devices/CECAudioSystem.h" #include "devices/CECBusDevice.h" #include "devices/CECPlaybackDevice.h" @@ -51,16 +50,7 @@ using namespace std; using namespace CEC; using namespace PLATFORM; -//TODO replace deprecated constructor in 2.0 -CLibCEC::CLibCEC(const char *UNUSED(strDeviceName), cec_device_type_list UNUSED(types), uint16_t UNUSED(iPhysicalAddress) /* = 0 */) : - m_iStartTime(GetTimeMs()), - m_client(NULL) -{ - m_cec = new CCECProcessor(this); -} - -//TODO replace deprecated constructor in 2.0 -CLibCEC::CLibCEC(libcec_configuration *UNUSED(configuration)) : +CLibCEC::CLibCEC(void) : m_iStartTime(GetTimeMs()), m_client(NULL) { @@ -363,71 +353,6 @@ bool CLibCEC::IsValidPhysicalAddress(uint16_t iPhysicalAddress) iPhysicalAddress <= CEC_MAX_PHYSICAL_ADDRESS; } -const char *CLibCEC::ToString(const cec_device_type type) -{ - return CCECTypeUtils::ToString(type); -} - -const char *CLibCEC::ToString(const cec_menu_state state) -{ - return CCECTypeUtils::ToString(state); -} - -const char *CLibCEC::ToString(const cec_version version) -{ - return CCECTypeUtils::ToString(version); -} - -const char *CLibCEC::ToString(const cec_power_status status) -{ - return CCECTypeUtils::ToString(status); -} - -const char *CLibCEC::ToString(const cec_logical_address address) -{ - return CCECTypeUtils::ToString(address); -} - -const char *CLibCEC::ToString(const cec_deck_control_mode mode) -{ - return CCECTypeUtils::ToString(mode); -} - -const char *CLibCEC::ToString(const cec_deck_info status) -{ - return CCECTypeUtils::ToString(status); -} - -const char *CLibCEC::ToString(const cec_opcode opcode) -{ - return CCECTypeUtils::ToString(opcode); -} - -const char *CLibCEC::ToString(const cec_system_audio_status mode) -{ - return CCECTypeUtils::ToString(mode); -} - -const char *CLibCEC::ToString(const cec_audio_status status) -{ - return CCECTypeUtils::ToString(status); -} - -const char *CLibCEC::ToString(const cec_vendor_id vendor) -{ - return CCECTypeUtils::ToString(vendor); -} - -const char *CLibCEC::ToString(const cec_client_version version) -{ - return CCECTypeUtils::ToString(version); -} - -const char *CLibCEC::ToString(const cec_server_version version) -{ - return CCECTypeUtils::ToString(version); -} - void CLibCEC::CheckKeypressTimeout(void) { // check all clients @@ -507,7 +432,7 @@ void * CECInitialise(libcec_configuration *configuration) return NULL; // create a new libCEC instance - CLibCEC *lib = new CLibCEC(NULL); + CLibCEC *lib = new CLibCEC; // register a new client CCECClient *client(NULL); @@ -600,17 +525,7 @@ const char *CLibCEC::GetLibInfo(void) #endif } -const char *CLibCEC::ToString(const cec_user_control_code key) -{ - return CCECTypeUtils::ToString(key); -} - void CLibCEC::InitVideoStandalone(void) { CAdapterFactory::InitVideoStandalone(); } - -const char *CLibCEC::ToString(const cec_adapter_type type) -{ - return CCECTypeUtils::ToString(type); -} diff --git a/src/lib/LibCEC.h b/src/lib/LibCEC.h index 8ce02ab..d455861 100644 --- a/src/lib/LibCEC.h +++ b/src/lib/LibCEC.h @@ -34,6 +34,7 @@ #include #include "cec.h" #include "platform/util/buffer.h" +#include "CECTypeUtils.h" namespace CEC { @@ -44,8 +45,7 @@ namespace CEC class CLibCEC : public ICECAdapter { public: - CLibCEC(const char *strDeviceName, cec_device_type_list types, uint16_t iPhysicalAddress = 0); - CLibCEC(libcec_configuration *configuration); + CLibCEC(void); virtual ~CLibCEC(void); /*! @@ -100,19 +100,21 @@ namespace CEC void RescanActiveDevices(void); bool IsLibCECActiveSource(void); - const char *ToString(const cec_menu_state state); - const char *ToString(const cec_version version); - const char *ToString(const cec_power_status status); - const char *ToString(const cec_logical_address address); - const char *ToString(const cec_deck_control_mode mode); - const char *ToString(const cec_deck_info status); - const char *ToString(const cec_opcode opcode); - const char *ToString(const cec_system_audio_status mode); - const char *ToString(const cec_audio_status status); - const char *ToString(const cec_vendor_id vendor); - const char *ToString(const cec_client_version version); - const char *ToString(const cec_server_version version); - const char *ToString(const cec_device_type type); + const char *ToString(const cec_menu_state state) { return CCECTypeUtils::ToString(state); } + const char *ToString(const cec_version version) { return CCECTypeUtils::ToString(version); } + const char *ToString(const cec_power_status status) { return CCECTypeUtils::ToString(status); } + const char *ToString(const cec_logical_address address) { return CCECTypeUtils::ToString(address); } + const char *ToString(const cec_deck_control_mode mode) { return CCECTypeUtils::ToString(mode); } + const char *ToString(const cec_deck_info status) { return CCECTypeUtils::ToString(status); } + const char *ToString(const cec_opcode opcode) { return CCECTypeUtils::ToString(opcode); } + const char *ToString(const cec_system_audio_status mode) { return CCECTypeUtils::ToString(mode); } + const char *ToString(const cec_audio_status status) { return CCECTypeUtils::ToString(status); } + const char *ToString(const cec_vendor_id vendor) { return CCECTypeUtils::ToString(vendor); } + const char *ToString(const cec_client_version version) { return CCECTypeUtils::ToString(version); } + const char *ToString(const cec_server_version version) { return CCECTypeUtils::ToString(version); } + const char *ToString(const cec_device_type type) { return CCECTypeUtils::ToString(type); } + const char *ToString(const cec_user_control_code key) { return CCECTypeUtils::ToString(key); } + const char *ToString(const cec_adapter_type type) { return CCECTypeUtils::ToString(type); } static cec_device_type GetType(cec_logical_address address); static uint16_t GetMaskForType(cec_logical_address address); @@ -131,9 +133,7 @@ namespace CEC void UnregisterClients(void); std::vector GetClients(void) { return m_clients; }; const char *GetLibInfo(void); - const char *ToString(const cec_user_control_code key); void InitVideoStandalone(void); - const char *ToString(const cec_adapter_type type); CCECProcessor * m_cec;