cec: don't retry polls
[deb_libcec.git] / src / lib / implementations / CECCommandHandler.h
index 9ef20aee0bfd58e62ae6108ea2c6c9553f3c2dd7..8c6d0c10506149e5faff24e997b3c1c06b4ab296 100644 (file)
  */
 
 #include <cectypes.h>
+#include <vector>
 
 namespace CEC
 {
+  class CCECProcessor;
   class CCECBusDevice;
 
   class CCECCommandHandler
@@ -45,8 +47,12 @@ namespace CEC
 
     virtual bool HandleCommand(const cec_command &command);
     virtual cec_vendor_id GetVendorId(void) { return CEC_VENDOR_UNKNOWN; };
+    virtual void HandlePoll(const cec_logical_address iInitiator, const cec_logical_address iDestination);
+    virtual bool HandleReceiveFailed(void);
 
   protected:
+    virtual bool HandleActiveSource(const cec_command &command);
+    virtual bool HandleDeckControl(const cec_command &command);
     virtual bool HandleDeviceCecVersion(const cec_command &command);
     virtual bool HandleDeviceVendorCommandWithId(const cec_command &command);
     virtual bool HandleDeviceVendorId(const cec_command &command);
@@ -57,22 +63,36 @@ namespace CEC
     virtual bool HandleGiveDeviceVendorId(const cec_command &command);
     virtual bool HandleGiveOSDName(const cec_command &command);
     virtual bool HandleGivePhysicalAddress(const cec_command &command);
+    virtual bool HandleGiveSystemAudioModeStatus(const cec_command &command);
+    virtual bool HandleImageViewOn(const cec_command &command);
     virtual bool HandleMenuRequest(const cec_command &command);
+    virtual bool HandleReportAudioStatus(const cec_command &command);
+    virtual bool HandleReportPhysicalAddress(const cec_command &command);
     virtual bool HandleReportPowerStatus(const cec_command &command);
     virtual bool HandleRequestActiveSource(const cec_command &command);
     virtual bool HandleRoutingChange(const cec_command &command);
+    virtual bool HandleRoutingInformation(const cec_command &command);
     virtual bool HandleSetMenuLanguage(const cec_command &command);
+    virtual bool HandleSetOSDName(const cec_command &command);
     virtual bool HandleSetStreamPath(const cec_command &command);
-    virtual bool HandleSetSystemAudioModeRequest(const cec_command &command);
-    virtual bool HandleGiveSystemAudioModeStatus(const cec_command &command);
+    virtual bool HandleSystemAudioModeRequest(const cec_command &command);
+    virtual bool HandleStandby(const cec_command &command);
+    virtual bool HandleSystemAudioModeStatus(const cec_command &command);
+    virtual bool HandleSetSystemAudioMode(const cec_command &command);
+    virtual bool HandleTextViewOn(const cec_command &command);
     virtual bool HandleUserControlPressed(const cec_command &command);
     virtual bool HandleUserControlRelease(const cec_command &command);
     virtual void UnhandledCommand(const cec_command &command);
 
+    virtual unsigned int GetMyDevices(std::vector<CCECBusDevice *> &devices) const;
     virtual CCECBusDevice *GetDevice(cec_logical_address iLogicalAddress) const;
     virtual CCECBusDevice *GetDeviceByPhysicalAddress(uint16_t iPhysicalAddress) const;
+    virtual CCECBusDevice *GetDeviceByType(cec_device_type type) const;
 
     virtual void SetVendorId(const cec_command &command);
+    virtual void SetPhysicalAddress(cec_logical_address iAddress, uint16_t iNewAddress);
+
+    CCECProcessor *m_processor;
     CCECBusDevice *m_busDevice;
   };
 };