typedef enum libcec_alert
{
- CEC_ALERT_SERVICE_DEVICE
+ CEC_ALERT_SERVICE_DEVICE,
+ CEC_ALERT_CONNECTION_LOST
} libcec_alert;
typedef enum libcec_parameter_type
AddLog(CEC_LOG_WARNING, "command buffer is full");
}
+void CLibCEC::Alert(const libcec_alert type, const libcec_parameter ¶m)
+{
+ CLibCEC *instance = CLibCEC::GetInstance();
+ if (!instance)
+ return;
+ CLockObject lock(instance->m_mutex);
+
+ libcec_configuration config;
+ instance->GetCurrentConfiguration(&config);
+
+ if (instance->m_callbacks &&
+ config.clientVersion >= CEC_CLIENT_VERSION_1_6_0 &&
+ instance->m_callbacks->CBCecAlert != NULL &&
+ instance->m_cec->IsInitialised())
+ instance->m_callbacks->CBCecAlert(instance->m_cbParam, type, param);
+}
+
void CLibCEC::CheckKeypressTimeout(void)
{
if (m_iCurrentButton != CEC_USER_CONTROL_CODE_UNKNOWN && GetTimeMs() - m_buttontime > CEC_BUTTON_TIMEOUT)
static void SetCurrentButton(cec_user_control_code iButtonCode);
virtual void CheckKeypressTimeout(void);
static int MenuStateChanged(const cec_menu_state newState);
+ static void Alert(const libcec_alert type, const libcec_parameter ¶m);
static CLibCEC *GetInstance(void);
static void SetInstance(CLibCEC *instance);