X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FLibCEC.cpp;h=c24b4ed96e7d2ffcd8cb93fdbc7051d3325a0d30;hb=d9de2aae6b2f47b8e1faacc69adba7406b9d85f0;hp=a27ad9dbc45530e02a38ed3a3b408b64db6f9955;hpb=6d2bc8defa92bf09ab5b6600a1d17b81c024b3d8;p=deb_libcec.git diff --git a/src/lib/LibCEC.cpp b/src/lib/LibCEC.cpp index a27ad9d..c24b4ed 100644 --- a/src/lib/LibCEC.cpp +++ b/src/lib/LibCEC.cpp @@ -1,7 +1,7 @@ /* * This file is part of the libCEC(R) library. * - * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited. All rights reserved. + * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved. * libCEC(R) is an original work, containing original code. * * libCEC(R) is a trademark of Pulse-Eight Limited. @@ -559,3 +559,21 @@ uint8_t CLibCEC::AudioStatus(void) { return m_client ? m_client->AudioStatus() : (uint8_t)CEC_AUDIO_VOLUME_STATUS_UNKNOWN; } + +int8_t CLibCEC::DetectAdapters(cec_adapter_descriptor *deviceList, uint8_t iBufSize, const char *strDevicePath /* = NULL */, bool bQuickScan /* = false */) +{ + int8_t iAdaptersFound = CAdapterFactory(this).DetectAdapters(deviceList, iBufSize, strDevicePath); + if (!bQuickScan) + { + for (int8_t iPtr = 0; iPtr < iAdaptersFound; iPtr++) + { + libcec_configuration config; + GetDeviceInformation(deviceList[iPtr].strComName, &config); + deviceList[iPtr].iFirmwareVersion = config.iFirmwareVersion; + deviceList[iPtr].iPhysicalAddress = config.iPhysicalAddress; + deviceList[iPtr].iFirmwareBuildDate = config.iFirmwareBuildDate; + deviceList[iPtr].adapterType = config.adapterType; + } + } + return iAdaptersFound; +}