cec: set a device type and name for each CCECBusDevice
[deb_libcec.git] / src / lib / devices / CECBusDevice.h
index 278c0386c5619b165870d7515bb636a440849659..8d5eafb92a2c2b86423c797a349efcb6a365be2a 100644 (file)
@@ -46,6 +46,7 @@ namespace CEC
     CCECBusDevice(CCECProcessor *processor, cec_logical_address address, uint16_t iPhysicalAddress = 0);
     virtual ~CCECBusDevice(void);
 
+    virtual bool                MyLogicalAddressContains(cec_logical_address address) const;
     virtual cec_logical_address GetMyLogicalAddress(void) const;
     virtual uint16_t            GetMyPhysicalAddress(void) const;
     virtual const char *        GetVendorName(void) { return GetVendor().AsString(); }
@@ -58,7 +59,7 @@ namespace CEC
     virtual cec_version         GetCecVersion(bool bRefresh = true);
     virtual cec_menu_language & GetMenuLanguage(bool bRefresh = true);
     virtual cec_power_status    GetPowerStatus(bool bRefresh = true);
-    virtual bool                PollDevice(void);
+    virtual bool                PollDevice(cec_logical_address source = CECDEVICE_UNKNOWN);
 
     virtual bool PowerOn(void);
     virtual bool Standby(void);
@@ -78,12 +79,12 @@ namespace CEC
     virtual CCECProcessor *GetProcessor() const { return m_processor; }
     virtual CCECCommandHandler *GetHandler(void) const { return m_handler; };
 
-    virtual bool ReportCECVersion(void);
-    virtual bool ReportDeckStatus(void);
-    virtual bool ReportMenuState(bool bActive = true);
-    virtual bool ReportOSDName(void);
-    virtual bool ReportPowerState(bool bOn = true);
-    virtual bool ReportVendorID(void);
+    virtual bool ReportCECVersion(cec_logical_address dest);
+    virtual bool ReportDeckStatus(cec_logical_address dest);
+    virtual bool ReportMenuState(cec_logical_address dest, bool bActive = true);
+    virtual bool ReportOSDName(cec_logical_address dest);
+    virtual bool ReportPowerState(cec_logical_address dest);
+    virtual bool ReportVendorID(cec_logical_address dest);
 
     virtual bool BroadcastActiveView(void);
     virtual bool BroadcastInactiveView(void);
@@ -91,6 +92,8 @@ namespace CEC
     virtual bool BroadcastActiveSource(void);
 
   protected:
+    cec_device_type     m_type;
+    CStdString          m_strDeviceName;
     uint16_t            m_iPhysicalAddress;
     cec_logical_address m_iLogicalAddress;
     cec_power_status    m_powerStatus;