X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=include%2Fcec.h;h=8570220e1800220829ee084792f7ef4dc352fab4;hb=d18ea27bd89c0244bef7077df2fbe0a687cf5f5e;hp=ba12a879c66b61e5db6153a8f8f4d8cea7f33562;hpb=a9ac151c8265f1d241799f7d6beaf4e13d4066ca;p=deb_libcec.git diff --git a/include/cec.h b/include/cec.h index ba12a87..8570220 100644 --- a/include/cec.h +++ b/include/cec.h @@ -36,7 +36,7 @@ #include "cectypes.h" -#define LIBCEC_VERSION_CURRENT CEC_SERVER_VERSION_2_0_2 +#define LIBCEC_VERSION_CURRENT CEC_SERVER_VERSION_CURRENT namespace CEC { @@ -72,6 +72,7 @@ namespace CEC virtual void Close(void) = 0; /*! + * @deprecated Use DetectAdapters() instead * @brief Try to find all connected CEC adapters. * @param deviceList The vector to store device descriptors in. * @param iBufSize The size of the deviceList buffer. @@ -251,6 +252,7 @@ namespace CEC virtual uint8_t VolumeDown(bool bSendRelease = true) = 0; /*! + * @deprecated Use AudioToggleMute() instead * @brief Sends a mute keypress to an audiosystem if it's present. * @param bSendRelease Send a key release after the keypress. * @return The new audio status. @@ -421,6 +423,40 @@ namespace CEC virtual const char *ToString(const cec_server_version version) = 0; virtual const char *ToString(const cec_user_control_code key) = 0; virtual const char *ToString(const cec_adapter_type type) = 0; + + /*! + * @brief Toggle the mute status of the AVR (if present) + * @return The new audio status. + */ + virtual uint8_t AudioToggleMute(void) = 0; + + /*! + * @brief Mute the AVR (if present) + * @return The new audio status. + */ + virtual uint8_t AudioMute(void) = 0; + + /*! + * @brief Mute the AVR (if connected) + * @return The new audio status. + */ + virtual uint8_t AudioUnmute(void) = 0; + + /*! + * @brief Get the current audio status (if an AVR is connected) + * @return The current audio status, or cec_audio_status if unknown. + */ + virtual uint8_t AudioStatus(void) = 0; + + /*! + * @brief Try to find all connected CEC adapters. + * @param deviceList The vector to store device descriptors in. + * @param iBufSize The size of the deviceList buffer. + * @param strDevicePath Optional device path. Only adds device descriptors that match the given device path. + * @return The number of devices that were found, or -1 when an error occured. + */ + virtual int8_t DetectAdapters(cec_adapter_descriptor *deviceList, uint8_t iBufSize, const char *strDevicePath = NULL) = 0; + }; };