cec: fixed - copy the class member values of the old handler when creating a new...
[deb_libcec.git] / src / lib / implementations / VLCommandHandler.h
index c3b0fe0337b261e5caf978d23076e9b12f929835..d1b25d2be0ee449822fb7c04b92bea76722fcd93 100644 (file)
@@ -38,8 +38,28 @@ namespace CEC
   class CVLCommandHandler : public CCECCommandHandler
   {
   public:
-    CVLCommandHandler(CCECBusDevice *busDevice);
+    CVLCommandHandler(CCECBusDevice *busDevice,
+                      int32_t iTransmitTimeout = CEC_DEFAULT_TRANSMIT_TIMEOUT,
+                      int32_t iTransmitWait = CEC_DEFAULT_TRANSMIT_WAIT,
+                      int8_t iTransmitRetries = CEC_DEFAULT_TRANSMIT_RETRIES,
+                      int64_t iActiveSourcePending = 0);
     virtual ~CVLCommandHandler(void) {};
-    virtual bool InitHandler(void);
+
+    bool InitHandler(void);
+
+    int HandleDeviceVendorCommandWithId(const cec_command &command);
+    int HandleStandby(const cec_command &command);
+    int HandleSystemAudioModeRequest(const cec_command &command);
+
+    int HandleVendorCommand(const cec_command &command);
+    bool PowerUpEventReceived(void);
+    bool SupportsDeviceType(const cec_device_type type) const { return type != CEC_DEVICE_TYPE_RECORDING_DEVICE; };
+    cec_device_type GetReplacementDeviceType(const cec_device_type type) const { return type == CEC_DEVICE_TYPE_RECORDING_DEVICE ? CEC_DEVICE_TYPE_PLAYBACK_DEVICE : type; }
+
+    bool SourceSwitchAllowed(void);
+
+  private:
+    PLATFORM::CMutex m_mutex;
+    uint64_t         m_iPowerUpEventReceived;
   };
 };