rpi: register callback for HPD. re-read the physical address when we received VC_HDMI...
[deb_libcec.git] / src / lib / adapter / AdapterCommunication.h
index 03880b6ef921dafaa46657aa6069c2c56456c47b..223e65fca4abf0ad3b67c0d904c7ed9fe403bc58 100644 (file)
@@ -75,6 +75,18 @@ namespace CEC
      */
     virtual bool HandleReceiveFailed(cec_logical_address initiator) = 0;
 
+    /*!
+     * @brief Callback method for IAdapterCommunication, called when a logical address that libCEC uses was taken by another device.
+     * @param oldAddress The logical address that was taken by another device.
+     */
+    virtual void HandleLogicalAddressLost(cec_logical_address oldAddress) = 0;
+
+    /*!
+     * @brief Callback method for IAdapterCommunication, called when the physical address changed.
+     * @param iNewAddress The new physical address.
+     */
+    virtual void HandlePhysicalAddressChanged(uint16_t iNewAddress) = 0;
+
     virtual CLibCEC *GetLib(void) const = 0;
   };
 
@@ -200,6 +212,28 @@ namespace CEC
      */
     virtual bool SupportsSourceLogicalAddress(const cec_logical_address address) = 0;
 
+    /*!
+     * @return The type of adapter that this instance is connected to.
+     */
+    virtual cec_adapter_type GetAdapterType(void) = 0;
+
+    /*!
+     * @return The (virtual) USB vendor id
+     */
+    virtual uint16_t GetAdapterVendorId(void) const = 0;
+
+    /*!
+     * @return The (virtual) USB product id
+     */
+    virtual uint16_t GetAdapterProductId(void) const = 0;
+
+    /*!
+     * @brief Marks the adapter as active or inactive source
+     * @param bSetTo True to mark as active source, false to mark as inactive source
+     * @param bClientUnregistered True when the client was unregistered, false when the device was explicitly marked as (in)active source
+     */
+    virtual void SetActiveSource(bool bSetTo, bool bClientUnregistered) = 0;
+
     IAdapterCommunicationCallback *m_callback;
   };
 };