X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FLibCEC.h;h=ef1ded29f5c5fdee7272f4fd44f5f8b1e33513b9;hb=7ebbb1a62355c2819caa42e28b081eff027b336d;hp=e1b991bcb69c2265aa54641d8b6c273b828b55e0;hpb=2f37cb68d7f3c71c38065e0e830c564a01b6caf3;p=deb_libcec.git diff --git a/src/lib/LibCEC.h b/src/lib/LibCEC.h index e1b991b..ef1ded2 100644 --- a/src/lib/LibCEC.h +++ b/src/lib/LibCEC.h @@ -53,6 +53,7 @@ namespace CEC virtual bool Open(const char *strPort, uint32_t iTimeout = 10000); virtual void Close(void); + virtual bool EnableCallbacks(void *cbParam, ICECCallbacks *callbacks); virtual int8_t FindAdapters(cec_adapter *deviceList, uint8_t iBufSize, const char *strDevicePath = NULL); virtual bool PingAdapter(void); virtual bool StartBootloader(void); @@ -82,19 +83,22 @@ namespace CEC virtual cec_version GetDeviceCecVersion(cec_logical_address iAddress); virtual bool GetDeviceMenuLanguage(cec_logical_address iAddress, cec_menu_language *language); virtual uint64_t GetDeviceVendorId(cec_logical_address iAddress); + virtual uint16_t GetDevicePhysicalAddress(cec_logical_address iAddress); virtual cec_power_status GetDevicePowerStatus(cec_logical_address iAddress); virtual bool PollDevice(cec_logical_address iAddress); virtual cec_logical_addresses GetActiveDevices(void); virtual bool IsActiveDevice(cec_logical_address iAddress); virtual bool IsActiveDeviceType(cec_device_type type); virtual bool SetHDMIPort(cec_logical_address iBaseDevice, uint8_t iPort = CEC_DEFAULT_HDMI_PORT); - virtual uint8_t VolumeUp(bool bWait = true); - virtual uint8_t VolumeDown(bool bWait = true); - virtual uint8_t MuteAudio(bool bWait = true); - virtual bool SendKeypress(cec_logical_address iDestination, cec_user_control_code key, bool bWait = false); - virtual bool SendKeyRelease(cec_logical_address iDestination, bool bWait = false); - virtual cec_osd_name GetOSDName(cec_logical_address iAddress); + virtual uint8_t VolumeUp(bool bSendRelease = true); + virtual uint8_t VolumeDown(bool bSendRelease = true); + virtual uint8_t MuteAudio(bool bSendRelease = true); + virtual bool SendKeypress(cec_logical_address iDestination, cec_user_control_code key, bool bWait = true); + virtual bool SendKeyRelease(cec_logical_address iDestination, bool bWait = true); + virtual cec_osd_name GetDeviceOSDName(cec_logical_address iAddress); virtual bool EnablePhysicalAddressDetection(void); + virtual cec_logical_address GetActiveSource(void); + virtual bool IsActiveSource(cec_logical_address iAddress); const char *ToString(const cec_menu_state state); const char *ToString(const cec_version version); @@ -120,9 +124,11 @@ namespace CEC cec_user_control_code m_iCurrentButton; int64_t m_buttontime; CCECProcessor *m_cec; - CAdapterCommunication *m_comm; CecBuffer m_logBuffer; CecBuffer m_keyBuffer; CecBuffer m_commandBuffer; + ICECCallbacks *m_callbacks; + void *m_cbParam; + CMutex m_mutex; }; };