+ return m_client ? m_client->GetDeviceVendorId(iAddress) : (uint64_t)CEC_VENDOR_UNKNOWN;
+}
+
+uint16_t CLibCEC::GetDevicePhysicalAddress(cec_logical_address iAddress)
+{
+ return m_client ? m_client->GetDevicePhysicalAddress(iAddress) : CEC_INVALID_PHYSICAL_ADDRESS;
+}
+
+cec_power_status CLibCEC::GetDevicePowerStatus(cec_logical_address iAddress)
+{
+ return m_client ? m_client->GetDevicePowerStatus(iAddress) : CEC_POWER_STATUS_UNKNOWN;
+}
+
+bool CLibCEC::PollDevice(cec_logical_address iAddress)
+{
+ return m_client ? m_client->PollDevice(iAddress) : false;
+}
+
+cec_logical_addresses CLibCEC::GetActiveDevices(void)
+{
+ cec_logical_addresses addresses;
+ addresses.Clear();
+ if (m_client)
+ addresses = m_client->GetActiveDevices();
+ return addresses;
+}
+
+bool CLibCEC::IsActiveDevice(cec_logical_address iAddress)
+{
+ return m_client ? m_client->IsActiveDevice(iAddress) : false;
+}
+
+bool CLibCEC::IsActiveDeviceType(cec_device_type type)
+{
+ return m_client ? m_client->IsActiveDeviceType(type) : false;
+}
+
+uint8_t CLibCEC::VolumeUp(bool bSendRelease /* = true */)
+{
+ return m_client ? m_client->SendVolumeUp(bSendRelease) : (uint8_t)CEC_AUDIO_VOLUME_STATUS_UNKNOWN;
+}
+
+uint8_t CLibCEC::VolumeDown(bool bSendRelease /* = true */)
+{
+ return m_client ? m_client->SendVolumeDown(bSendRelease) : (uint8_t)CEC_AUDIO_VOLUME_STATUS_UNKNOWN;
+}
+
+uint8_t CLibCEC::MuteAudio(bool UNUSED(bSendRelease) /* = true */)
+{
+ AddLog(CEC_LOG_WARNING, "deprecated function called: %s", __FUNCTION__);
+ return m_client ? m_client->SendMuteAudio() : (uint8_t)CEC_AUDIO_VOLUME_STATUS_UNKNOWN;
+}
+
+bool CLibCEC::SendKeypress(cec_logical_address iDestination, cec_user_control_code key, bool bWait /* = true */)
+{
+ return m_client ? m_client->SendKeypress(iDestination, key, bWait) : false;
+}
+
+bool CLibCEC::SendKeyRelease(cec_logical_address iDestination, bool bWait /* = true */)
+{
+ return m_client ? m_client->SendKeyRelease(iDestination, bWait) : false;
+}
+
+cec_osd_name CLibCEC::GetDeviceOSDName(cec_logical_address iAddress)
+{
+ cec_osd_name retVal;
+ retVal.device = CECDEVICE_UNKNOWN;
+ memset(retVal.name, 0, 14);
+
+ if (m_client)
+ retVal = m_client->GetDeviceOSDName(iAddress);
+ return retVal;
+}
+
+cec_logical_address CLibCEC::GetActiveSource(void)
+{
+ return m_client ? m_client->GetActiveSource() : CECDEVICE_UNKNOWN;
+}
+
+bool CLibCEC::IsActiveSource(cec_logical_address iAddress)
+{
+ return m_client ? m_client->IsActiveSource(iAddress) : false;
+}
+bool CLibCEC::SetStreamPath(cec_logical_address iAddress)
+{
+ return m_client ? m_client->SetStreamPath(iAddress) : false;
+}
+
+bool CLibCEC::SetStreamPath(uint16_t iPhysicalAddress)
+{
+ return m_client ? m_client->SetStreamPath(iPhysicalAddress) : false;
+}
+
+cec_logical_addresses CLibCEC::GetLogicalAddresses(void)
+{
+ cec_logical_addresses addresses;
+ addresses.Clear();
+ if (m_client)
+ addresses = m_client->GetLogicalAddresses();
+ return addresses;
+}
+
+cec_device_type CLibCEC::GetType(cec_logical_address address)
+{
+ return CCECTypeUtils::GetType(address);
+}
+
+uint16_t CLibCEC::GetMaskForType(cec_logical_address address)
+{
+ return CCECTypeUtils::GetMaskForType(address);
+}
+
+uint16_t CLibCEC::GetMaskForType(cec_device_type type)
+{
+ return CCECTypeUtils::GetMaskForType(type);
+}
+
+bool CLibCEC::IsValidPhysicalAddress(uint16_t iPhysicalAddress)
+{
+ return iPhysicalAddress >= CEC_MIN_PHYSICAL_ADDRESS &&
+ iPhysicalAddress <= CEC_MAX_PHYSICAL_ADDRESS;
+}
+
+void CLibCEC::CheckKeypressTimeout(void)
+{
+ // check all clients
+ for (vector<CCECClient *>::iterator it = m_clients.begin(); it != m_clients.end(); it++)
+ (*it)->CheckKeypressTimeout();
+}
+
+void CLibCEC::AddLog(const cec_log_level level, const char *strFormat, ...)
+{
+ CStdString strLog;
+
+ // format the message
+ va_list argList;
+ va_start(argList, strFormat);
+ strLog.FormatV(strFormat, argList);
+ va_end(argList);
+