cec: set the power status to 'on' when receiving CEC_USER_CONTROL_CODE_POWER
[deb_libcec.git] / src / lib / LibCECC.cpp
index a3be5f3bea89df0498af40851132a293f4ce6040..a2e58c509434ce5a4fb37a8408b15b306bcec340 100644 (file)
@@ -48,6 +48,12 @@ int cec_init(const char *strDeviceName, cec_logical_address iLogicalAddress /* =
   return (cec_parser != NULL) ? 1 : 0;
 }
 
+int cec_init_typed(const char *strDeviceName, cec_device_type_list devicesTypes)
+{
+  cec_parser = (ICECAdapter *) CECInit(strDeviceName, devicesTypes);
+  return (cec_parser != NULL) ? 1 : 0;
+}
+
 void cec_destroy(void)
 {
   cec_close();
@@ -222,4 +228,11 @@ cec_power_status cec_get_device_power_status(cec_logical_address iLogicalAddress
   return CEC_POWER_STATUS_UNKNOWN;
 }
 
+int cec_poll_device(cec_logical_address iLogicalAddress)
+{
+  if (cec_parser)
+    return cec_parser->PollDevice(iLogicalAddress);
+  return -1;
+}
+
 //@}