<ClInclude Include="..\include\cectypes.h" />
<ClInclude Include="..\src\lib\AdapterCommunication.h" />
<ClInclude Include="..\src\lib\AdapterDetection.h" />
+ <ClInclude Include="..\src\lib\CECBusDevice.h" />
<ClInclude Include="..\src\lib\CECProcessor.h" />
+ <ClInclude Include="..\src\lib\implementations\ANCommandHandler.h" />
+ <ClInclude Include="..\src\lib\implementations\CECCommandHandler.h" />
+ <ClInclude Include="..\src\lib\implementations\SLCommandHandler.h" />
<ClInclude Include="..\src\lib\LibCEC.h" />
<ClInclude Include="..\src\lib\platform\baudrate.h" />
<ClInclude Include="..\src\lib\platform\os-dependent.h" />
<ItemGroup>
<ClCompile Include="..\src\lib\AdapterCommunication.cpp" />
<ClCompile Include="..\src\lib\AdapterDetection.cpp" />
+ <ClCompile Include="..\src\lib\CECBusDevice.cpp" />
<ClCompile Include="..\src\lib\CECProcessor.cpp" />
+ <ClCompile Include="..\src\lib\implementations\ANCommandHandler.cpp" />
+ <ClCompile Include="..\src\lib\implementations\CECCommandHandler.cpp" />
+ <ClCompile Include="..\src\lib\implementations\SLCommandHandler.cpp" />
<ClCompile Include="..\src\lib\LibCEC.cpp" />
<ClCompile Include="..\src\lib\LibCECC.cpp" />
<ClCompile Include="..\src\lib\LibCECDll.cpp" />
<Filter Include="exports">
<UniqueIdentifier>{01b9c84a-dcfe-4bdc-b983-69e3e3929b0f}</UniqueIdentifier>
</Filter>
+ <Filter Include="implementations">
+ <UniqueIdentifier>{03bd59df-ccac-4664-b61b-3151bb219efa}</UniqueIdentifier>
+ </Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\lib\util\buffer.h">
<ClInclude Include="..\include\cectypes.h">
<Filter>exports</Filter>
</ClInclude>
+ <ClInclude Include="..\src\lib\implementations\ANCommandHandler.h">
+ <Filter>implementations</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\lib\implementations\CECCommandHandler.h">
+ <Filter>implementations</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\lib\implementations\SLCommandHandler.h">
+ <Filter>implementations</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\lib\CECBusDevice.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\lib\AdapterCommunication.cpp" />
<ClCompile Include="..\src\lib\platform\windows\serialport.cpp">
<Filter>platform</Filter>
</ClCompile>
+ <ClCompile Include="..\src\lib\implementations\ANCommandHandler.cpp">
+ <Filter>implementations</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\lib\implementations\CECCommandHandler.cpp">
+ <Filter>implementations</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\lib\implementations\SLCommandHandler.cpp">
+ <Filter>implementations</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\lib\CECBusDevice.cpp" />
</ItemGroup>
</Project>
\ No newline at end of file
m_processor->AddLog(level, strMessage);
}
-void CCECBusDevice::SetVendorId(uint16_t iVendorId, uint8_t iVendorClass /* = 0 */)
+void CCECBusDevice::SetVendorId(uint32_t iVendorId, uint8_t iVendorClass /* = 0 */)
{
m_iVendorId = iVendorId;
m_iVendorClass = iVendorClass;
virtual cec_logical_address GetMyLogicalAddress(void) const;
virtual uint16_t GetMyPhysicalAddress(void) const;
- virtual void SetVendorId(uint16_t iVendorId, uint8_t iVendorClass = 0);
+ virtual void SetVendorId(uint32_t iVendorId, uint8_t iVendorClass = 0);
virtual const char *GetVendorName(void) const { return CECVendorIdToString(m_iVendorId); }
- virtual uint64_t GetVendorId(void) const { return m_iVendorId; }
+ virtual uint32_t GetVendorId(void) const { return m_iVendorId; }
virtual uint8_t GetVendorClass(void) const { return m_iVendorClass; }
virtual uint64_t GetLastActive(void) const { return m_iLastActive; }
cec_logical_address m_iLogicalAddress;
CCECProcessor *m_processor;
CCECCommandHandler *m_handler;
- uint64_t m_iVendorId;
+ uint32_t m_iVendorId;
uint8_t m_iVendorClass;
uint64_t m_iLastActive;
CMutex m_mutex;
return;
}
- uint64_t iVendorId = ((uint64_t)data[0] << 3) +
- ((uint64_t)data[1] << 2) +
- (uint64_t)data[2];
+ uint32_t iVendorId = ((uint32_t)data[0] << 3) +
+ ((uint32_t)data[1] << 2) +
+ (uint32_t)data[2];
m_busDevices[(uint8_t)device]->SetVendorId(iVendorId, data.size >= 4 ? data[3] : 0);
}
*/
#include "ANCommandHandler.h"
-#include "CECBusDevice.h"
-#include "CECProcessor.h"
-#include "util/StdString.h"
+#include "../CECBusDevice.h"
+#include "../CECProcessor.h"
+#include "../util/StdString.h"
using namespace CEC;
bool CANCommandHandler::HandleCommand(const cec_command &command)
{
- bool bHandled(true);
+ bool bHandled(false);
if (command.destination == m_busDevice->GetMyLogicalAddress())
{
switch(command.opcode)
{
case CEC_OPCODE_VENDOR_REMOTE_BUTTON_DOWN:
+ bHandled = true;
HandleVendorRemoteButtonDown(command);
break;
case CEC_OPCODE_VENDOR_REMOTE_BUTTON_UP:
+ bHandled = true;
HandleUserControlRelease(command);
break;
default:
- bHandled = false;
- break;
- }
- }
- else if (command.destination == CECDEVICE_BROADCAST)
- {
- switch(command.opcode)
- {
- // TODO
- default:
- bHandled = false;
break;
}
}
*/
#include "CECCommandHandler.h"
-#include "CECBusDevice.h"
-#include "CECProcessor.h"
+#include "../CECBusDevice.h"
+#include "../CECProcessor.h"
using namespace CEC;