win32: sync visual studio project file. use uint32_t instead of uint64_t for the...
authorLars Op den Kamp <lars.opdenkamp@pulse-eight.com>
Thu, 27 Oct 2011 17:51:57 +0000 (19:51 +0200)
committerLars Op den Kamp <lars.opdenkamp@pulse-eight.com>
Thu, 27 Oct 2011 17:51:57 +0000 (19:51 +0200)
project/libcec.vcxproj
project/libcec.vcxproj.filters
src/lib/CECBusDevice.cpp
src/lib/CECBusDevice.h
src/lib/CECProcessor.cpp
src/lib/implementations/ANCommandHandler.cpp
src/lib/implementations/CECCommandHandler.cpp

index ab7e00eef4cc4a506ff728dff13017404c04c1fe..f2b9f3f5c1f47e2dd844a4071cc7b4b1647097ee 100644 (file)
     <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" />
index c677d84c1ef1045bda334fca4ff4bd5d89b30490..febfd09dae0f79824580bd57b47bc86060d7a87f 100644 (file)
@@ -10,6 +10,9 @@
     <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
index b3d338f03bfde4efedd213797e7651f331231477..d0104d077b3a6dbc7a2d30ce30e45b20a59959be 100644 (file)
@@ -70,7 +70,7 @@ void CCECBusDevice::AddLog(cec_log_level level, const CStdString &strMessage)
   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;
index 613c766b387b50644de8d32489553cf33f33466c..dcd30a14da0f26bd491d9dffe6f71d03e325c160 100644 (file)
@@ -52,9 +52,9 @@ namespace CEC
     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; }
@@ -74,7 +74,7 @@ namespace CEC
     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;
index 648ec205babcd70cf6faf3b9e34ff1fea00048c7..6bfab0d7b9e0a11f1aecd776abc1681988763443 100644 (file)
@@ -533,9 +533,9 @@ void CCECProcessor::ParseVendorId(cec_logical_address device, const cec_datapack
     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);
 }
index 575c4c3ac20fb478ab3cbbadd9ee1a36e61443d9..32565ed0541f07357f76782b51e4f3c7e9761f0a 100644 (file)
@@ -32,9 +32,9 @@
  */
 
 #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;
 
@@ -74,29 +74,20 @@ bool CANCommandHandler::HandleVendorRemoteButtonDown(const cec_command &command)
 
 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;
     }
   }
index 314313d26156a78815b63e3d650a7967b74797c2..572b3a62c4dfe5023bd5c4a83fef3eed72c8f984 100644 (file)
@@ -32,8 +32,8 @@
  */
 
 #include "CECCommandHandler.h"
-#include "CECBusDevice.h"
-#include "CECProcessor.h"
+#include "../CECBusDevice.h"
+#include "../CECProcessor.h"
 
 using namespace CEC;