extern DECLSPEC int cec_is_libcec_active_source(void);
+#ifdef __cplusplus
+extern DECLSPEC int cec_get_device_information(const char *strPort, CEC::libcec_configuration *config, uint32_t iTimeoutMs);
+#else
+extern DECLSPEC int cec_get_device_information(const char *strPort, libcec_configuration *config, uint32_t iTimeoutMs);
+#endif
+
#ifdef __cplusplus
};
#endif
return bReturn;
}
+ bool IsLibCECActiveSource()
+ {
+ return m_libCec->IsLibCECActiveSource();
+ }
+
+ bool GetDeviceInformation(String ^ port, LibCECConfiguration ^configuration, uint32_t timeoutMs)
+ {
+ bool bReturn(false);
+ marshal_context ^ context = gcnew marshal_context();
+
+ libcec_configuration config;
+ config.Clear();
+
+ const char* strPortC = port->Length > 0 ? context->marshal_as<const char*>(port) : NULL;
+
+ if (m_libCec->GetDeviceInformation(strPortC, &config, timeoutMs))
+ {
+ configuration->Update(config);
+ bReturn = true;
+ }
+
+ delete context;
+ return bReturn;
+ }
+
String ^ ToString(CecLogicalAddress iAddress)
{
const char *retVal = m_libCec->ToString((cec_logical_address)iAddress);
return cec_parser ? (cec_parser->IsLibCECActiveSource() ? 1 : 0) : -1;
}
+int cec_get_device_information(const char *strPort, CEC::libcec_configuration *config, uint32_t iTimeoutMs)
+{
+ return cec_parser ? (cec_parser->GetDeviceInformation(strPort, config, iTimeoutMs) ? 1 : 0) : -1;
+}
+
//@}