- ADAPTER_MESSAGE_STATE_UNKNOWN = 0, /**< the initial state */
- ADAPTER_MESSAGE_STATE_WAITING_TO_BE_SENT, /**< waiting in the send queue of the adapter, or timed out */
- ADAPTER_MESSAGE_STATE_SENT, /**< sent and waiting on an ACK */
- ADAPTER_MESSAGE_STATE_SENT_NOT_ACKED, /**< sent, but failed to ACK */
- ADAPTER_MESSAGE_STATE_SENT_ACKED, /**< sent, and ACK received */
- ADAPTER_MESSAGE_STATE_INCOMING, /**< received from another device */
- ADAPTER_MESSAGE_STATE_ERROR /**< an error occured */
- } cec_adapter_message_state;
+ public:
+ IAdapterCommunicationCallback(void) {}
+ virtual ~IAdapterCommunicationCallback(void) {}
+
+ /*!
+ * @brief Callback method for IAdapterCommunication, called when a new cec_command is received
+ * @param command The command that has been received
+ * @return True when it was handled by this listener, false otherwise.
+ */
+ virtual bool OnCommandReceived(const cec_command &command) = 0;
+
+ /*!
+ * @brief Callback method for IAdapterCommunication, called when a poll was received.
+ * @param initiator The initiator that sent the poll.
+ * @param destination The destination of the poll message.
+ */
+ virtual void HandlePoll(cec_logical_address initiator, cec_logical_address destination) = 0;
+
+ /*!
+ * @brief Callback method for IAdapterCommunication, called when a receive failed message was received.
+ * @param initiator The initiator that sent the receive failed message.
+ * @return True when this is an error, false otherwise.
+ */
+ virtual bool HandleReceiveFailed(cec_logical_address initiator) = 0;
+ };