MCPcopy Create free account
hub / github.com/Pulse-Eight/libcec / SetSupportedDeviceTypes

Method SetSupportedDeviceTypes

src/libcec/CECClient.cpp:291–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289}
290
291void CCECClient::SetSupportedDeviceTypes(void)
292{
293 cec_device_type_list types;
294 types.Clear();
295
296 // get the command handler for the tv
297 CCECCommandHandler *tvHandler = m_processor->GetTV()->GetHandler();
298 if (!tvHandler)
299 return;
300
301 // check all device types
302 for (uint8_t iPtr = 0; iPtr < 5; iPtr++)
303 {
304 if (m_configuration.deviceTypes.types[iPtr] == CEC_DEVICE_TYPE_RESERVED)
305 continue;
306
307 // get the supported device type. the handler will replace types it doesn't support by one it does support
308 cec_device_type type = tvHandler->GetReplacementDeviceType(m_configuration.deviceTypes.types[iPtr]);
309 if (!types.IsSet(type))
310 types.Add(type);
311 }
312 m_processor->GetTV()->MarkHandlerReady();
313
314 // set the new type list
315 m_configuration.deviceTypes = types;
316
317 SaveConfiguration(m_configuration);
318}
319
320bool CCECClient::AllocateLogicalAddresses(void)
321{

Callers

nothing calls this directly

Calls 7

GetHandlerMethod · 0.80
GetTVMethod · 0.80
AddMethod · 0.80
MarkHandlerReadyMethod · 0.80
ClearMethod · 0.45
IsSetMethod · 0.45

Tested by

no test coverage detected