| 45 | using namespace CEC; |
| 46 | |
| 47 | CCECDeviceMap::CCECDeviceMap(CCECProcessor *processor) : |
| 48 | m_processor(processor) |
| 49 | { |
| 50 | for (uint8_t iPtr = CECDEVICE_TV; iPtr <= CECDEVICE_BROADCAST; iPtr++) |
| 51 | { |
| 52 | switch(iPtr) |
| 53 | { |
| 54 | case CECDEVICE_AUDIOSYSTEM: |
| 55 | m_busDevices.insert(std::make_pair<cec_logical_address, CCECBusDevice *>((cec_logical_address)iPtr, new CCECAudioSystem(processor, (cec_logical_address) iPtr))); |
| 56 | break; |
| 57 | case CECDEVICE_PLAYBACKDEVICE1: |
| 58 | case CECDEVICE_PLAYBACKDEVICE2: |
| 59 | case CECDEVICE_PLAYBACKDEVICE3: |
| 60 | m_busDevices.insert(std::make_pair<cec_logical_address, CCECBusDevice *>((cec_logical_address)iPtr, new CCECPlaybackDevice(processor, (cec_logical_address) iPtr))); |
| 61 | break; |
| 62 | case CECDEVICE_RECORDINGDEVICE1: |
| 63 | case CECDEVICE_RECORDINGDEVICE2: |
| 64 | case CECDEVICE_RECORDINGDEVICE3: |
| 65 | m_busDevices.insert(std::make_pair<cec_logical_address, CCECBusDevice *>((cec_logical_address)iPtr, new CCECRecordingDevice(processor, (cec_logical_address) iPtr))); |
| 66 | break; |
| 67 | case CECDEVICE_TUNER1: |
| 68 | case CECDEVICE_TUNER2: |
| 69 | case CECDEVICE_TUNER3: |
| 70 | case CECDEVICE_TUNER4: |
| 71 | m_busDevices.insert(std::make_pair<cec_logical_address, CCECBusDevice *>((cec_logical_address)iPtr, new CCECTuner(processor, (cec_logical_address) iPtr))); |
| 72 | break; |
| 73 | case CECDEVICE_TV: |
| 74 | m_busDevices.insert(std::make_pair<cec_logical_address, CCECBusDevice *>((cec_logical_address)iPtr, new CCECTV(processor, (cec_logical_address) iPtr))); |
| 75 | break; |
| 76 | default: |
| 77 | m_busDevices.insert(std::make_pair<cec_logical_address, CCECBusDevice *>((cec_logical_address)iPtr, new CCECBusDevice(processor, (cec_logical_address) iPtr))); |
| 78 | break; |
| 79 | } |
| 80 | } |
| 81 | } |
| 82 | CCECDeviceMap::~CCECDeviceMap(void) |
| 83 | { |
| 84 | Clear(); |
nothing calls this directly
no outgoing calls
no test coverage detected