void Clear(void)
{
for (unsigned int iPtr = 0; iPtr < 16; iPtr++)
- Addresses[iPtr] = CecLogicalAddress::Unregistered;
+ Addresses[iPtr] = CecLogicalAddress::Unknown;
}
bool IsSet(CecLogicalAddress iAddress)
{
- return Addresses[(unsigned int)iAddress] != CecLogicalAddress::Unregistered;
+ return Addresses[(unsigned int)iAddress] != CecLogicalAddress::Unknown;
}
void Set(CecLogicalAddress iAddress)
netConfig->ActivateSource = config.bActivateSource == 1;
netConfig->WakeDevices->Clear();
- int iDevices(0);
for (uint8_t iPtr = 0; iPtr <= 16; iPtr++)
if (config.wakeDevices[iPtr])
- netConfig->WakeDevices->Addresses[iDevices++] = (CecLogicalAddress)iPtr;
+ netConfig->WakeDevices->Set((CecLogicalAddress)iPtr);
netConfig->PowerOffDevices->Clear();
- iDevices = 0;
for (uint8_t iPtr = 0; iPtr <= 16; iPtr++)
if (config.powerOffDevices[iPtr])
- netConfig->PowerOffDevices->Addresses[iDevices++] = (CecLogicalAddress)iPtr;
+ netConfig->PowerOffDevices->Set((CecLogicalAddress)iPtr);
netConfig->PowerOffScreensaver = config.bPowerOffScreensaver == 1;
netConfig->PowerOffOnStandby = config.bPowerOffOnStandby == 1;
configuration->TvVendor = (CecVendorId)config.tvVendor;
configuration->WakeDevices->Clear();
- int iDevices(0);
for (uint8_t iPtr = 0; iPtr <= 16; iPtr++)
if (config.wakeDevices[iPtr])
- configuration->WakeDevices->Addresses[iDevices++] = (CecLogicalAddress)iPtr;
+ configuration->WakeDevices->Set((CecLogicalAddress)iPtr);
configuration->PowerOffDevices->Clear();
- iDevices = 0;
for (uint8_t iPtr = 0; iPtr <= 16; iPtr++)
if (config.powerOffDevices[iPtr])
- configuration->PowerOffDevices->Addresses[iDevices++] = (CecLogicalAddress)iPtr;
+ configuration->PowerOffDevices->Set((CecLogicalAddress)iPtr);
configuration->UseTVMenuLanguage = config.bUseTVMenuLanguage == 1;
for (unsigned int iPtr = 0; iPtr < 5; iPtr++)