cec: added vendor ID for Philips
[deb_libcec.git] / src / lib / LibCECC.cpp
index 0193124e84cb07d78b78ceb5b8c0ad49a12d6e9c..e71cd11a1ad5d008976627fb4db64d24b4ed6743 100644 (file)
@@ -245,6 +245,7 @@ int cec_poll_device(cec_logical_address iLogicalAddress)
 cec_logical_addresses cec_get_active_devices(void)
 {
   cec_logical_addresses addresses;
+  addresses.Clear();
   if (cec_parser)
     addresses = cec_parser->GetActiveDevices();
   return addresses;
@@ -271,25 +272,51 @@ int cec_set_hdmi_port(uint8_t iPort)
   return -1;
 }
 
-int cec_volume_up(int bWait /* = 1 */)
+int cec_volume_up(int bWait)
 {
   if (cec_parser)
     return cec_parser->VolumeUp(bWait == 1);
   return -1;
 }
 
-int cec_volume_down(int bWait /* = 1 */)
+int cec_volume_down(int bWait)
 {
   if (cec_parser)
     return cec_parser->VolumeDown(bWait == 1);
   return -1;
 }
 
-int cec_mute_audio(int bWait /* = 1 */)
+int cec_mute_audio(int bWait)
 {
   if (cec_parser)
     return cec_parser->MuteAudio(bWait == 1);
   return -1;
 }
 
+int cec_send_keypress(cec_logical_address iDestination, cec_user_control_code key, int bWait)
+{
+  if (cec_parser)
+    return cec_parser->SendKeypress(iDestination, key, bWait == 1) ? 1 : 0;
+  return -1;
+}
+
+int cec_send_key_release(cec_logical_address iDestination, int bWait)
+{
+  if (cec_parser)
+    return cec_parser->SendKeyRelease(iDestination, bWait == 1) ? 1 : 0;
+  return -1;
+}
+
+cec_osd_name cec_get_osd_name(cec_logical_address iAddress)
+{
+  cec_osd_name retVal;
+  retVal.device = iAddress;
+  retVal.name[0] = 0;
+
+  if (cec_parser)
+    retVal = cec_parser->GetOSDName(iAddress);
+
+  return retVal;
+}
+
 //@}