cec: changed all Handle...() commands to return a cec_abort_reason and send the corre...
[deb_libcec.git] / src / lib / implementations / VLCommandHandler.h
index 57213e96e5328d869286e167c2fd308c750c2be5..893905766318586502b45d08de7b40fffea25404 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -40,9 +40,20 @@ namespace CEC
   public:
     CVLCommandHandler(CCECBusDevice *busDevice);
     virtual ~CVLCommandHandler(void) {};
-    virtual cec_vendor_id GetVendorId(void) { return CEC_VENDOR_PANASONIC; };
 
-  protected:
-    virtual bool HandleSetStreamPath(const cec_command &command);
+    bool InitHandler(void);
+
+    int HandleDeviceVendorCommandWithId(const cec_command &command);
+    bool TransmitActiveSource(const cec_logical_address iInitiator, uint16_t iPhysicalAddress);
+    bool TransmitPendingActiveSourceCommands(void);
+
+    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; }
+
+  private:
+    PLATFORM::CMutex m_mutex;
+    bool             m_bActiveSourcePending;
+    bool             m_bPowerUpEventReceived;
   };
 };