| 57 | } |
| 58 | |
| 59 | bool CRLCommandHandler::InitHandler(void) |
| 60 | { |
| 61 | if (m_bHandlerInited) |
| 62 | return true; |
| 63 | m_bHandlerInited = true; |
| 64 | |
| 65 | if (m_busDevice->GetLogicalAddress() != CECDEVICE_TV) |
| 66 | return true; |
| 67 | |
| 68 | CCECBusDevice *primary = m_processor->GetPrimaryDevice(); |
| 69 | if (primary && primary->GetLogicalAddress() != CECDEVICE_UNREGISTERED) |
| 70 | { |
| 71 | /* imitate Toshiba devices */ |
| 72 | if (m_busDevice->GetLogicalAddress() != primary->GetLogicalAddress()) |
| 73 | { |
| 74 | primary->SetVendorId(CEC_VENDOR_TOSHIBA); |
| 75 | primary->ReplaceHandler(false); |
| 76 | } |
| 77 | |
| 78 | if (m_busDevice->GetLogicalAddress() == CECDEVICE_TV) |
| 79 | { |
| 80 | /* send the vendor id */ |
| 81 | primary->TransmitVendorID(CECDEVICE_BROADCAST, false, false); |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | return true; |
| 86 | } |
| 87 | |
| 88 | int CRLCommandHandler::HandleDeviceVendorCommandWithId(const cec_command &command) |
| 89 | { |
no test coverage detected