+cec_logical_addresses cec_get_active_devices(void)
+{
+ cec_logical_addresses addresses;
+ addresses.Clear();
+ if (cec_parser)
+ addresses = cec_parser->GetActiveDevices();
+ return addresses;
+}
+
+int cec_is_active_device(cec_logical_address iAddress)
+{
+ if (cec_parser)
+ return cec_parser->IsActiveDevice(iAddress) ? 1 : 0;
+ return -1;
+}
+
+int cec_is_active_device_type(cec_device_type type)
+{
+ if (cec_parser)
+ return cec_parser->IsActiveDeviceType(type) ? 1 : 0;
+ return -1;
+}
+
+int cec_set_hdmi_port(cec_logical_address iBaseDevice, uint8_t iPort)
+{
+ if (cec_parser)
+ return cec_parser->SetHDMIPort(iBaseDevice, iPort) ? 1 : 0;
+ return -1;
+}
+
+int cec_volume_up(int bSendRelease)
+{
+ if (cec_parser)
+ return cec_parser->VolumeUp(bSendRelease == 1);
+ return -1;
+}
+
+int cec_volume_down(int bSendRelease)
+{
+ if (cec_parser)
+ return cec_parser->VolumeDown(bSendRelease == 1);
+ return -1;
+}
+
+int cec_mute_audio(int bSendRelease)
+{
+ if (cec_parser)
+ return cec_parser->MuteAudio(bSendRelease == 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_device_osd_name(cec_logical_address iAddress)
+{
+ cec_osd_name retVal;
+ retVal.device = iAddress;
+ retVal.name[0] = 0;
+
+ if (cec_parser)
+ retVal = cec_parser->GetDeviceOSDName(iAddress);
+
+ return retVal;
+}
+
+int cec_enable_physical_address_detection(void)
+{
+ return cec_parser ? (cec_parser->EnablePhysicalAddressDetection() ? 1 : 0) : -1;
+}
+
+int cec_set_stream_path_logical(CEC::cec_logical_address iAddress)
+{
+ return cec_parser ? (cec_parser->SetStreamPath(iAddress) ? 1 : 0) : -1;
+}
+
+int cec_set_stream_path_physical(uint16_t iPhysicalAddress)
+{
+ return cec_parser ? (cec_parser->SetStreamPath(iPhysicalAddress) ? 1 : 0) : -1;
+}
+
+cec_logical_addresses cec_get_logical_addresses(void)
+{
+ cec_logical_addresses addr;
+ addr.Clear();
+ if (cec_parser)
+ addr = cec_parser->GetLogicalAddresses();
+ return addr;
+}
+
+int cec_get_current_configuration(libcec_configuration *configuration)
+{
+ return cec_parser ? (cec_parser->GetCurrentConfiguration(configuration) ? 1 : 0) : -1;
+}
+
+int cec_can_persist_configuration(void)
+{
+ return cec_parser ? (cec_parser->CanPersistConfiguration() ? 1 : 0) : -1;
+}
+
+int cec_persist_configuration(libcec_configuration *configuration)
+{
+ return cec_parser ? (cec_parser->PersistConfiguration(configuration) ? 1 : 0) : -1;
+}
+
+int cec_set_configuration(libcec_configuration *configuration)
+{
+ return cec_parser ? (cec_parser->SetConfiguration(configuration) ? 1 : 0) : -1;
+}
+
+void cec_rescan_devices(void)
+{
+ if (cec_parser)
+ cec_parser->RescanActiveDevices();
+}
+
+int cec_is_libcec_active_source(void)
+{
+ return cec_parser ? (cec_parser->IsLibCECActiveSource() ? 1 : 0) : -1;
+}
+
+int cec_get_device_information(const char *strPort, CEC::libcec_configuration *config, uint32_t iTimeoutMs)
+{
+ return cec_parser ? (cec_parser->GetDeviceInformation(strPort, config, iTimeoutMs) ? 1 : 0) : -1;
+}
+