+ /*!
+ * @brief Register this client in the processor
+ * @return True when registered, false otherwise.
+ */
+ virtual bool OnRegister(void);
+
+ /*!
+ * @brief Called by the processor when this client is unregistered
+ */
+ virtual void OnUnregister(void) { SetRegistered(false); SetInitialised(false); }
+
+ /*!
+ * @brief Set the registered state of this client.
+ * @param bSetTo The new value.
+ */
+ virtual void SetRegistered(bool bSetTo);
+
+ /*!
+ * @brief Set the initialised state of this client.
+ * @param bSetTo The new value
+ */
+ virtual void SetInitialised(bool bSetTo);
+
+ /*!
+ * @brief Change the TV vendor id override setting.
+ * @param id The new value.
+ */
+ virtual void SetTVVendorOverride(const cec_vendor_id id);
+
+ /*!
+ * @brief Change the OSD name of the primary device that this client is controlling.
+ * @param strDeviceName The new value.
+ */
+ virtual void SetOSDName(const std::string &strDeviceName);
+
+ /*!
+ * @brief Change the value of the devices to wake.
+ * @param addresses The new value.
+ */
+ virtual void SetWakeDevices(const cec_logical_addresses &addresses);
+
+ /*!
+ * @brief Change the value of the client version setting.
+ * @param version The new version setting.
+ */
+ virtual void SetClientVersion(const cec_client_version version);
+
+ /*!
+ * @brief Change the device types that this client is controlling.
+ * @param deviceTypes The new types.
+ * @return True when the client needs to be re-registered to pick up the new setting, false otherwise.
+ */
+ virtual bool SetDeviceTypes(const cec_device_type_list &deviceTypes);
+
+ /*!
+ * @return A pointer to the current configuration of this client.
+ */
+ virtual libcec_configuration *GetConfiguration(void) { return &m_configuration; }
+
+ /*!
+ * @brief Called by the processor when registering this client to allocate the logical addresses.
+ * @return True when the addresses for all types were allocated, false otherwise.
+ */
+ virtual bool AllocateLogicalAddresses(void);
+
+ /*!
+ * @brief Try to allocate a logical address for a recording device controlled by this client.
+ * @return The logical address that was allocated, or CECDEVICE_UNKNOWN if none could be allocated.
+ */
+ virtual cec_logical_address AllocateLogicalAddressRecordingDevice(void);
+
+ /*!
+ * @brief Try to allocate a logical address for a tuner controlled by this client.
+ * @return The logical address that was allocated, or CECDEVICE_UNKNOWN if none could be allocated.
+ */
+ virtual cec_logical_address AllocateLogicalAddressTuner(void);
+
+ /*!
+ * @brief Try to allocate a logical address for a playback device controlled by this client.
+ * @return The logical address that was allocated, or CECDEVICE_UNKNOWN if none could be allocated.
+ */
+ virtual cec_logical_address AllocateLogicalAddressPlaybackDevice(void);
+
+ /*!
+ * @brief Try to allocate a logical address for an audiosystem controlled by this client.
+ * @return The logical address that was allocated, or CECDEVICE_UNKNOWN if none could be allocated.
+ */
+ virtual cec_logical_address AllocateLogicalAddressAudioSystem(void);
+
+ /*!
+ * @brief Change the physical address of the devices controlled by this client.
+ * @param iPhysicalAddress The new physical address.
+ * @return True when changed, false otherwise.
+ */
+ virtual bool SetDevicePhysicalAddress(const uint16_t iPhysicalAddress);
+
+ /*!
+ * @brief Try to autodetect the physical address.
+ * @return True when autodetected (and set in m_configuration), false otherwise.
+ */
+ virtual bool AutodetectPhysicalAddress(void);
+
+ /*!
+ * @brief Replaces all device types in m_configuration by types that are supported by the command handler of the TV
+ */
+ virtual void SetSupportedDeviceTypes(void);
+
+ virtual void CallbackAddCommand(const cec_command &command);
+ virtual void CallbackAddKey(const cec_keypress &key);
+ virtual void CallbackAddLog(const cec_log_message &message);
+ virtual void CallbackAlert(const libcec_alert type, const libcec_parameter ¶m);
+ virtual void CallbackConfigurationChanged(const libcec_configuration &config);
+ virtual int CallbackMenuStateChanged(const cec_menu_state newState);
+ virtual void CallbackSourceActivated(bool bActivated, const cec_logical_address logicalAddress);
+
+ CCECProcessor * m_processor; /**< a pointer to the processor */
+ libcec_configuration m_configuration; /**< the configuration of this client */
+ bool m_bInitialised; /**< true when initialised, false otherwise */
+ bool m_bRegistered; /**< true when registered in the processor, false otherwise */
+ PLATFORM::CMutex m_mutex; /**< mutex for changes to this instance */
+ PLATFORM::CMutex m_cbMutex; /**< mutex that is held when doing anything with callbacks */
+ cec_user_control_code m_iCurrentButton; /**< the control code of the button that's currently held down (if any) */
+ int64_t m_buttontime; /**< the timestamp when the button was pressed (in seconds since epoch), or 0 if none was pressed. */
+ int64_t m_iPreventForwardingPowerOffCommand; /**< prevent forwarding standby commands until this time */
+ int64_t m_iLastKeypressTime; /**< last time a key press was sent to the client */
+ cec_keypress m_lastKeypress; /**< the last key press that was sent to the client */