CLockObject lock(m_mutex);
m_iActiveSourcePending = GetTimeMs() + iDelay;
}
+
+void CCECCommandHandler::RequestEmailFromCustomer(const cec_command& command)
+{
+ bool bInserted(false);
+ map<cec_opcode, vector<cec_command> >::iterator it = m_logsRequested.find(command.opcode);
+ if (it != m_logsRequested.end())
+ {
+ for (vector<cec_command>::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<cec_command> 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());
+}
+
#include <vector>
#include <string>
+#include <map>
#include "lib/platform/threads/mutex.h"
namespace CEC
virtual int HandleVendorRemoteButtonDown(const cec_command& command);
virtual int HandleVendorRemoteButtonUp(const cec_command & UNUSED(command)) { return COMMAND_HANDLED; }
virtual void UnhandledCommand(const cec_command &command, const cec_abort_reason reason);
+ virtual void RequestEmailFromCustomer(const cec_command& command);
virtual void VendorPreActivateSourceHook(void) {};
int64_t m_iActiveSourcePending;
PLATFORM::CMutex m_mutex;
int64_t m_iPowerStatusRequested;
+ std::map<cec_opcode, std::vector<cec_command> > m_logsRequested;
};
};