X-Git-Url: https://git.piment-noir.org/?p=deb_libcec.git;a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FCECCommandHandler.cpp;h=b961878871e7f244f5bee9a673fc149b0b0a9e18;hp=28cee428128f5caadbc5cf2346fb0c8377c66537;hb=9169d73e308be40605d5e2902a0ea1542a1d797e;hpb=31e9723746bb84a4af0a6b2bcd64421c0b690061 diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index 28cee42..b961878 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -1265,3 +1265,31 @@ void CCECCommandHandler::ScheduleActivateSource(uint64_t iDelay) CLockObject lock(m_mutex); m_iActiveSourcePending = GetTimeMs() + iDelay; } + +void CCECCommandHandler::RequestEmailFromCustomer(const cec_command& command) +{ + bool bInserted(false); + map >::iterator it = m_logsRequested.find(command.opcode); + if (it != m_logsRequested.end()) + { + for (vector::const_iterator it2 = it->second.begin(); it2 != it->second.end(); it2++) + { + // we already logged this one + if ((*it2).parameters == command.parameters) + return; + } + + it->second.push_back(command); + bInserted = true; + } + + if (!bInserted) + { + vector commands; + commands.push_back(command); + m_logsRequested.insert(make_pair(command.opcode, commands)); + } + + LIB_CEC->AddLog(CEC_LOG_NOTICE, "key with keycode '%s' is not mapped in libCEC. please send an email to support@pulse-eight.com with this keycode, and tell which key you pressed, and we'll add support for this key.", CCECTypeUtils::ToString(command).c_str()); +} +