X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fadapter%2FAdapterCommunication.h;h=38d0a13b0369bf40d6726029ef195d21bceb24a6;hb=b5117104dff139ffb5dbc6fe3ec995a4ed554f67;hp=98ecd2e2a975c378756959799386f8cb396dc0b6;hpb=cba904a6dc0be488b9e761861f752653ec5e6801;p=deb_libcec.git diff --git a/src/lib/adapter/AdapterCommunication.h b/src/lib/adapter/AdapterCommunication.h index 98ecd2e..38d0a13 100644 --- a/src/lib/adapter/AdapterCommunication.h +++ b/src/lib/adapter/AdapterCommunication.h @@ -46,9 +46,12 @@ namespace CEC ADAPTER_MESSAGE_STATE_ERROR /**< an error occured */ } cec_adapter_message_state; - struct IAdapterCommunicationCallback + class IAdapterCommunicationCallback { 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 @@ -57,9 +60,12 @@ namespace CEC virtual bool OnCommandReceived(const cec_command &command) = 0; }; - struct IAdapterCommunication + class IAdapterCommunication { public: + IAdapterCommunication(void) {} + virtual ~IAdapterCommunication(void) {} + /*! * @brief Open a connection to the CEC adapter * @param cb The callback struct. if set to NULL, the Read() method has to be used to read commands. if set, OnCommandReceived() will be called for each command that was received @@ -148,5 +154,10 @@ namespace CEC * @return The name of the port */ virtual CStdString GetPortName(void) = 0; + + /*! + * @return The physical address, if the adapter supports this. 0 otherwise. + */ + virtual uint16_t GetPhysicalAddress(void) = 0; }; };