From: Lars Op den Kamp Date: Fri, 10 Feb 2012 11:53:11 +0000 (+0100) Subject: cec: added GetLogicalAddresses() and SetStreamPath() to LibCecSharp X-Git-Tag: upstream/2.2.0~1^2~35^2~111 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=a9fb46b4e785365d573b7f06f18d32576efbdbe6;p=deb_libcec.git cec: added GetLogicalAddresses() and SetStreamPath() to LibCecSharp --- diff --git a/src/LibCecSharp/CecSharpTypes.h b/src/LibCecSharp/CecSharpTypes.h index 2c158a5..64172bb 100644 --- a/src/LibCecSharp/CecSharpTypes.h +++ b/src/LibCecSharp/CecSharpTypes.h @@ -369,6 +369,7 @@ namespace CecSharp return Addresses[(unsigned int)iAddress] != CecLogicalAddress::Unregistered; } + property CecLogicalAddress Primary; property array ^ Addresses; }; diff --git a/src/LibCecSharp/LibCecSharp.cpp b/src/LibCecSharp/LibCecSharp.cpp index 6cdc6ab..698c817 100644 --- a/src/LibCecSharp/LibCecSharp.cpp +++ b/src/LibCecSharp/LibCecSharp.cpp @@ -388,6 +388,26 @@ namespace CecSharp return m_libCec->GetDevicePhysicalAddress((cec_logical_address)iAddress); } + bool SetStreamPath(CecLogicalAddress iAddress) + { + return m_libCec->SetStreamPath((cec_logical_address)iAddress); + } + + bool SetStreamPath(uint16_t iPhysicalAddress) + { + return m_libCec->SetStreamPath(iPhysicalAddress); + } + + CecLogicalAddresses ^GetLogicalAddresses(void) + { + CecLogicalAddresses ^addr = gcnew CecLogicalAddresses(); + cec_logical_addresses libAddr = m_libCec->GetLogicalAddresses(); + for (unsigned int iPtr = 0; iPtr < 16; iPtr++) + addr->Addresses[iPtr] = (CecLogicalAddress)libAddr.addresses[iPtr]; + addr->Primary = (CecLogicalAddress)libAddr.primary; + return addr; + } + bool GetCurrentConfiguration(LibCECConfiguration ^configuration) { libcec_configuration config;