cec: added 'scan' command to cec-client, that displays info about devices on the...
[deb_libcec.git] / src / lib / LibCEC.cpp
index 26fd7b0bdb68b26402b6e3ca1588cd938f124ed3..1ded155bbf233e2e59302ac89f1971182840f43f 100644 (file)
@@ -203,7 +203,7 @@ bool CLibCEC::SetDeckInfo(cec_deck_info info, bool bSendUpdate /* = true */)
 
 bool CLibCEC::SetInactiveView(void)
 {
-  return m_cec ? m_cec->SetInactiveView() : false;
+  return m_cec ? m_cec->TransmitInactiveSource() : false;
 }
 
 bool CLibCEC::SetMenuState(cec_menu_state state, bool bSendUpdate /* = true */)
@@ -261,6 +261,7 @@ bool CLibCEC::PollDevice(cec_logical_address iAddress)
 cec_logical_addresses CLibCEC::GetActiveDevices(void)
 {
   cec_logical_addresses addresses;
+  addresses.Clear();
   if (m_cec)
     addresses = m_cec->GetActiveDevices();
   return addresses;
@@ -302,6 +303,32 @@ uint8_t CLibCEC::MuteAudio(bool bWait /* = true */)
   return 0;
 }
 
+bool CLibCEC::SendKeypress(cec_logical_address iDestination, cec_user_control_code key, bool bWait /* = false */)
+{
+  if (m_cec)
+    return m_cec->SendKeypress(iDestination, key, bWait);
+  return false;
+}
+
+bool CLibCEC::SendKeyRelease(cec_logical_address iDestination, bool bWait /* = false */)
+{
+  if (m_cec)
+    return m_cec->SendKeyRelease(iDestination, bWait);
+  return false;
+}
+
+cec_osd_name CLibCEC::GetOSDName(cec_logical_address iAddress)
+{
+  cec_osd_name retVal;
+  retVal.device = iAddress;
+  retVal.name[0] = 0;
+
+  if (m_cec)
+    retVal = m_cec->GetDeviceOSDName(iAddress);
+
+  return retVal;
+}
+
 void CLibCEC::AddLog(cec_log_level level, const string &strMessage)
 {
   if (m_cec)
@@ -387,3 +414,53 @@ void CECDestroy(CEC::ICECAdapter *instance)
   if (lib)
     delete lib;
 }
+
+const char *CLibCEC::ToString(const cec_menu_state state)
+{
+  return m_cec->ToString(state);
+}
+
+const char *CLibCEC::ToString(const cec_version version)
+{
+  return m_cec->ToString(version);
+}
+
+const char *CLibCEC::ToString(const cec_power_status status)
+{
+  return m_cec->ToString(status);
+}
+
+const char *CLibCEC::ToString(const cec_logical_address address)
+{
+  return m_cec->ToString(address);
+}
+
+const char *CLibCEC::ToString(const cec_deck_control_mode mode)
+{
+  return m_cec->ToString(mode);
+}
+
+const char *CLibCEC::ToString(const cec_deck_info status)
+{
+  return m_cec->ToString(status);
+}
+
+const char *CLibCEC::ToString(const cec_opcode opcode)
+{
+  return m_cec->ToString(opcode);
+}
+
+const char *CLibCEC::ToString(const cec_system_audio_status mode)
+{
+  return m_cec->ToString(mode);
+}
+
+const char *CLibCEC::ToString(const cec_audio_status status)
+{
+  return m_cec->ToString(status);
+}
+
+const char *CLibCEC::ToString(const cec_vendor_id vendor)
+{
+  return m_cec->ToString(vendor);
+}